Built motion from commit 3dfe8e8.|0.0.70
authorDaniele Cinti <daniele.cinti@xcally.com>
Wed, 23 Mar 2016 14:38:04 +0000 (15:38 +0100)
committerDaniele Cinti <daniele.cinti@xcally.com>
Wed, 23 Mar 2016 14:38:04 +0000 (15:38 +0100)
592 files changed:
package.json
public/app/7f4f3cd9.app.js [moved from public/app/9803d603.app.js with 54% similarity]
public/app/e59e4d75.app.css [moved from public/app/e9688178.app.css with 60% similarity]
public/assets/css/global/custom.css
public/assets/css/global/profile-old.css [moved from public/assets/css/profile-old.css with 99% similarity]
public/assets/images/media/CmCall.png [new file with mode: 0644]
public/assets/languages/locale-en_EN.json
public/assets/languages/locale-it.json
public/assets/plugins/jscripty/js/Actions.js
public/assets/plugins/jscripty/js/Dialogs.js
public/assets/plugins/jscripty/js/Editor.js
public/assets/plugins/jscripty/js/EditorUi.js
public/assets/plugins/jscripty/js/Graph.js
public/assets/plugins/jscripty/js/Menus.js
public/assets/plugins/jscripty/js/Shapes.js
public/assets/plugins/jscripty/js/Sidebar.js
public/assets/plugins/jscripty/js/Toolbar.js
public/assets/plugins/jscripty/js/custom.js
public/assets/plugins/mxgraph/js/mxClient.js
public/assets/plugins/square/js/Actions.js
public/assets/plugins/square/js/Dialogs.js
public/assets/plugins/square/js/Editor.js
public/assets/plugins/square/js/EditorUi.js
public/assets/plugins/square/js/Graph.js
public/assets/plugins/square/js/Menus.js
public/assets/plugins/square/js/Shapes.js
public/assets/plugins/square/js/Sidebar.js
public/assets/plugins/square/js/Toolbar.js
public/assets/plugins/square/js/custom.js
public/assets/scripts/components-dropdowns.js
public/index.html
release-notes/changelog_0.0.66.txt [deleted file]
release-notes/changelog_0.0.70.txt [new file with mode: 0644]
scripts/post-merge.sh
server/api/action/action.controller.js
server/api/action/action.socket.js
server/api/action/index.js
server/api/agent/agent.controller.js
server/api/agent/agent.socket.js
server/api/agent/index.js
server/api/ami/ami.ami.js
server/api/ami/ami.controller.js
server/api/ami/ami.socket.js
server/api/ami/ami.spec.js
server/api/ami/index.js
server/api/automation/automation.controller.js
server/api/automation/automation.socket.js
server/api/automation/automation.spec.js
server/api/automation/index.js
server/api/canned_answer/canned_answer.controller.js
server/api/canned_answer/canned_answer.socket.js
server/api/canned_answer/index.js
server/api/chanspy/chanspy.controller.js
server/api/chanspy/chanspy.socket.js
server/api/chanspy/index.js
server/api/chat_application/chat_application.controller.js
server/api/chat_application/chat_application.socket.js
server/api/chat_application/chat_application.spec.js
server/api/chat_application/index.js
server/api/chat_enquiry/enquiry.controller.js
server/api/chat_enquiry/enquiry.socket.js
server/api/chat_enquiry/index.js
server/api/chat_message/chat_message.controller.js
server/api/chat_message/chat_message.socket.js
server/api/chat_message/chat_message.spec.js
server/api/chat_message/index.js
server/api/chat_proactive_action/chat_proactive_action.controller.js
server/api/chat_proactive_action/chat_proactive_action.socket.js
server/api/chat_proactive_action/index.js
server/api/chat_proactive_action/index.spec.js
server/api/chat_queue/chat_queue.controller.js
server/api/chat_queue/chat_queue.socket.js
server/api/chat_queue/index.js
server/api/chat_room/chat_room.controller.js
server/api/chat_room/chat_room.socket.js
server/api/chat_room/index.js
server/api/chat_visitor/chat_visitor.controller.js
server/api/chat_visitor/chat_visitor.socket.js
server/api/chat_visitor/index.js
server/api/chat_website/chat_website.controller.js
server/api/chat_website/chat_website.socket.js
server/api/chat_website/index.js
server/api/chat_websites_field/chat_websites_field.controller.js
server/api/chat_websites_field/chat_websites_field.socket.js
server/api/chat_websites_field/index.js
server/api/chat_websites_field/index.spec.js
server/api/company/company.controller.js
server/api/company/company.socket.js
server/api/company/company.spec.js
server/api/company/index.js
server/api/contact_manager/contact_manager.controller.js
server/api/contact_manager/contact_manager.socket.js
server/api/contact_manager/contact_manager.spec.js
server/api/contact_manager/index.js
server/api/custom_report/custom_report.controller.js
server/api/custom_report/custom_report.socket.js
server/api/custom_report/custom_report.spec.js
server/api/custom_report/index.js
server/api/dashboard/dashboard.controller.js
server/api/dashboard/dashboard.socket.js
server/api/dashboard/dashboard.spec.js
server/api/dashboard/index.js
server/api/default_report/default_report.controller.js
server/api/default_report/default_report.socket.js
server/api/default_report/default_report.spec.js
server/api/default_report/index.js
server/api/desk_account/desk_account.controller.js
server/api/desk_account/desk_account.socket.js
server/api/desk_account/desk_account.spec.js
server/api/desk_account/index.js
server/api/desk_configuration/desk_configuration.controller.js
server/api/desk_configuration/desk_configuration.socket.js
server/api/desk_configuration/index.js
server/api/desk_configuration/index.spec.js
server/api/desk_field/desk_field.controller.js
server/api/desk_field/desk_field.socket.js
server/api/desk_field/index.js
server/api/desk_field/index.spec.js
server/api/extracted_report/extracted_report.controller.js
server/api/extracted_report/extracted_report.socket.js
server/api/extracted_report/extracted_report.spec.js
server/api/extracted_report/index.js
server/api/fax_account/fax_account.controller.js
server/api/fax_account/fax_account.socket.js
server/api/fax_account/fax_account.spec.js
server/api/fax_account/index.js
server/api/fax_application/fax_application.controller.js
server/api/fax_application/fax_application.socket.js
server/api/fax_application/fax_application.spec.js
server/api/fax_application/index.js
server/api/fax_message/fax_message.ami.js
server/api/fax_message/fax_message.controller.js
server/api/fax_message/fax_message.socket.js
server/api/fax_message/fax_message.spec.js
server/api/fax_message/index.js
server/api/fax_queue/fax_queue.controller.js
server/api/fax_queue/fax_queue.socket.js
server/api/fax_queue/fax_queue.spec.js
server/api/fax_queue/index.js
server/api/fax_room/fax_room.controller.js
server/api/fax_room/fax_room.kue.js
server/api/fax_room/fax_room.socket.js
server/api/fax_room/fax_room.spec.js
server/api/fax_room/index.js
server/api/freshdesk_account/freshdesk_account.controller.js
server/api/freshdesk_account/freshdesk_account.socket.js
server/api/freshdesk_account/index.js
server/api/freshdesk_account/index.spec.js
server/api/freshdesk_configuration/freshdesk_configuration.controller.js
server/api/freshdesk_configuration/freshdesk_configuration.socket.js
server/api/freshdesk_configuration/index.js
server/api/freshdesk_configuration/index.spec.js
server/api/freshdesk_field/freshdesk_field.controller.js
server/api/freshdesk_field/freshdesk_field.socket.js
server/api/freshdesk_field/index.js
server/api/freshdesk_field/index.spec.js
server/api/integration/index.js
server/api/integration/integration.controller.js
server/api/integration/integration.socket.js
server/api/integration/integration.spec.js
server/api/interval/index.js
server/api/interval/interval.controller.js
server/api/interval/interval.socket.js
server/api/interval/interval.spec.js
server/api/jscripty_project/index.js
server/api/jscripty_project/index.spec.js
server/api/jscripty_project/jscripty_project.controller.js
server/api/jscripty_project/jscripty_project.socket.js
server/api/license/index.js
server/api/license/license.controller.js
server/api/license/license.socket.js
server/api/mail_account/index.js
server/api/mail_account/mail_account.controller.js
server/api/mail_account/mail_account.socket.js
server/api/mail_application/index.js
server/api/mail_application/mail_application.controller.js
server/api/mail_application/mail_application.socket.js
server/api/mail_application/mail_application.spec.js
server/api/mail_attachment/index.js
server/api/mail_attachment/mail_attachment.controller.js
server/api/mail_attachment/mail_attachment.socket.js
server/api/mail_message/index.js
server/api/mail_message/mail_message.controller.js
server/api/mail_message/mail_message.socket.js
server/api/mail_queue/index.js
server/api/mail_queue/mail_queue.controller.js
server/api/mail_queue/mail_queue.socket.js
server/api/mail_room/index.js
server/api/mail_room/mail_room.controller.js
server/api/mail_room/mail_room.socket.js
server/api/mail_server_in/index.js
server/api/mail_server_in/mail_server_in.controller.js
server/api/mail_server_in/mail_server_in.socket.js
server/api/mail_server_out/index.js
server/api/mail_server_out/mail_server_out.controller.js
server/api/mail_server_out/mail_server_out.socket.js
server/api/mail_template/index.js
server/api/mail_template/mail_template.controller.js
server/api/mail_template/mail_template.socket.js
server/api/metric/index.js
server/api/metric/metric.controller.js
server/api/metric/metric.socket.js
server/api/metric/metric.spec.js
server/api/module/index.js
server/api/module/module.controller.js
server/api/module/module.socket.js
server/api/module/module.spec.js
server/api/module/setting/index.js
server/api/module/setting/setting.controller.js
server/api/module/setting/setting.socket.js
server/api/module/setting/setting.spec.js
server/api/motionbar/index.js
server/api/motionbar/motionbar.controller.js
server/api/motionbar/motionbar.socket.js
server/api/motionbar/motionbar.spec.js
server/api/pause/index.js
server/api/pause/pause.controller.js
server/api/pause/pause.socket.js
server/api/report_agent/index.js
server/api/report_agent/report_agent.controller.js
server/api/report_agent/report_agent.socket.js
server/api/report_call/index.js
server/api/report_call/report_call.controller.js
server/api/report_call/report_call.socket.js
server/api/report_chat/index.js
server/api/report_chat/report_chat.controller.js
server/api/report_chat/report_chat.socket.js
server/api/report_chat_session/index.js
server/api/report_chat_session/report_chat_session.controller.js
server/api/report_chat_session/report_chat_session.socket.js
server/api/report_integration/index.js
server/api/report_integration/report_integration.controller.js
server/api/report_integration/report_integration.socket.js
server/api/report_mail/index.js
server/api/report_mail/report_mail.controller.js
server/api/report_mail/report_mail.socket.js
server/api/report_mail_session/index.js
server/api/report_mail_session/report_mail_session.controller.js
server/api/report_mail_session/report_mail_session.socket.js
server/api/report_queue/index.js
server/api/report_queue/report_queue.controller.js
server/api/report_queue/report_queue.socket.js
server/api/report_tree/index.js
server/api/report_tree/report_tree.controller.js
server/api/report_tree/report_tree.socket.js
server/api/report_tree/report_tree.spec.js
server/api/salesforce_account/index.js
server/api/salesforce_account/index.spec.js
server/api/salesforce_account/salesforce_account.controller.js
server/api/salesforce_account/salesforce_account.socket.js
server/api/salesforce_configuration/index.js
server/api/salesforce_configuration/index.spec.js
server/api/salesforce_configuration/salesforce_configuration.controller.js
server/api/salesforce_configuration/salesforce_configuration.socket.js
server/api/salesforce_field/index.js
server/api/salesforce_field/index.spec.js
server/api/salesforce_field/salesforce_field.controller.js
server/api/salesforce_field/salesforce_field.socket.js
server/api/service/index.js
server/api/service/service.controller.js
server/api/service/service.socket.js
server/api/service/service.spec.js
server/api/setting/index.js
server/api/setting/setting.controller.js
server/api/setting/setting.socket.js
server/api/sound/index.js
server/api/sound/sound.controller.js
server/api/sound/sound.socket.js
server/api/sound/sound.spec.js
server/api/square_odbc/index.js
server/api/square_odbc/square_odbc.controller.js
server/api/square_odbc/square_odbc.socket.js
server/api/square_odbc/square_odbc.spec.js
server/api/square_project/index.js
server/api/square_project/square_project.controller.js
server/api/square_project/square_project.socket.js
server/api/sugarcrm_account/index.js
server/api/sugarcrm_account/index.spec.js
server/api/sugarcrm_account/sugarcrm_account.controller.js
server/api/sugarcrm_account/sugarcrm_account.socket.js
server/api/sugarcrm_configuration/index.js
server/api/sugarcrm_configuration/index.spec.js
server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js
server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js
server/api/sugarcrm_field/index.js
server/api/sugarcrm_field/index.spec.js
server/api/sugarcrm_field/sugarcrm_field.controller.js
server/api/sugarcrm_field/sugarcrm_field.socket.js
server/api/tag/index.js
server/api/tag/tag.controller.js
server/api/tag/tag.socket.js
server/api/tag/tag.spec.js
server/api/team/index.js
server/api/team/team.controller.js
server/api/team/team.socket.js
server/api/team/team.spec.js
server/api/telephone/index.js
server/api/telephone/telephone.controller.js
server/api/telephone/telephone.socket.js
server/api/trigger/index.js
server/api/trigger/trigger.controller.js
server/api/trigger/trigger.socket.js
server/api/trigger/trigger.spec.js
server/api/trunk/index.js
server/api/trunk/trunk.controller.js
server/api/trunk/trunk.socket.js
server/api/update/index.js
server/api/update/update.controller.js
server/api/user/index.js
server/api/user/user.controller.js
server/api/user/user.socket.js
server/api/user_has_chat_queue/index.js
server/api/user_has_chat_queue/user_has_chat_queue.controller.js
server/api/user_has_chat_queue/user_has_chat_queue.socket.js
server/api/user_has_chat_queue/user_has_chat_queue.spec.js
server/api/user_has_chat_room/index.js
server/api/user_has_chat_room/user_has_chat_room.controller.js
server/api/user_has_chat_room/user_has_chat_room.socket.js
server/api/user_has_chat_room/user_has_chat_room.spec.js
server/api/user_has_fax_queue/index.js
server/api/user_has_fax_queue/user_has_fax_queue.controller.js
server/api/user_has_fax_queue/user_has_fax_queue.socket.js
server/api/user_has_fax_queue/user_has_fax_queue.spec.js
server/api/user_has_mail_queue/index.js
server/api/user_has_mail_queue/user_has_mail_queue.controller.js
server/api/user_has_mail_queue/user_has_mail_queue.socket.js
server/api/user_has_service/index.js
server/api/user_has_service/user_has_service.controller.js
server/api/user_has_service/user_has_service.socket.js
server/api/user_has_service/user_has_service.spec.js
server/api/user_has_team/index.js
server/api/user_has_team/user_has_team.controller.js
server/api/user_has_team/user_has_team.model.js
server/api/user_has_team/user_has_team.socket.js
server/api/user_has_team/user_has_team.spec.js
server/api/user_has_voice_queue/index.js
server/api/user_has_voice_queue/user_has_voice_queue.controller.js
server/api/user_has_voice_queue/user_has_voice_queue.socket.js
server/api/user_has_voice_queue/user_has_voice_queue.spec.js [deleted file]
server/api/variable/index.js
server/api/variable/variable.controller.js
server/api/variable/variable.socket.js
server/api/voice_context/index.js
server/api/voice_context/voice_context.controller.js
server/api/voice_context/voice_context.socket.js
server/api/voice_context/voice_context.spec.js
server/api/voice_extension/index.js
server/api/voice_extension/voice_extension.controller.js
server/api/voice_extension/voice_extension.socket.js
server/api/voice_extension/voice_extension.spec.js
server/api/voice_musiconhold/index.js
server/api/voice_musiconhold/voice_musiconhold.controller.js
server/api/voice_musiconhold/voice_musiconhold.socket.js
server/api/voice_musiconhold/voice_musiconhold.spec.js
server/api/voice_queue/index.js
server/api/voice_queue/voice_queue.controller.js
server/api/voice_queue/voice_queue.socket.js
server/api/voice_recording/index.js
server/api/voice_recording/voice_recording.controller.js
server/api/voice_recording/voice_recording.socket.js
server/api/voice_voicemail/index.js
server/api/voice_voicemail/voice_voicemail.controller.js
server/api/voice_voicemail/voice_voicemail.socket.js
server/api/voice_voicemail/voice_voicemail.spec.js
server/api/voice_voicemail_messages/index.js
server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js
server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js
server/api/widget/index.js
server/api/widget/widget.controller.js
server/api/widget/widget.spec.js
server/api/xchatty/index.js
server/api/xchatty/xchatty.controller.js
server/api/xchatty/xchatty.socket.js
server/api/zendesk_account/index.js
server/api/zendesk_account/zendesk_account.controller.js
server/api/zendesk_account/zendesk_account.socket.js
server/api/zendesk_account/zendesk_account.spec.js
server/api/zendesk_configuration/index.js
server/api/zendesk_configuration/zendesk_configuration.controller.js
server/api/zendesk_configuration/zendesk_configuration.socket.js
server/api/zendesk_configuration/zendesk_configuration.spec.js
server/api/zendesk_field/index.js
server/api/zendesk_field/zendesk_field.controller.js
server/api/zendesk_field/zendesk_field.socket.js
server/api/zendesk_field/zendesk_field.spec.js
server/app.js
server/auth/auth.service.js
server/auth/facebook/index.js
server/auth/facebook/passport.js
server/auth/google/index.js
server/auth/google/passport.js
server/auth/index.js
server/auth/local/index.js
server/auth/local/local.ami.js
server/auth/local/passport.js
server/auth/twitter/index.js
server/auth/twitter/passport.js
server/config/agi.js
server/config/ami/action.js
server/config/ami/acw.js
server/config/ami/agent.js
server/config/ami/call.js
server/config/ami/index.js
server/config/ami/member.js
server/config/ami/queue_caller.js
server/config/ami/queue_member.js
server/config/ami/recording.js
server/config/ami/socket.js
server/config/ami/transfer.js
server/config/ami/trunk.js
server/config/ami/user.js
server/config/ami/voice_context.js
server/config/analytics.js
server/config/autodialer/index.js
server/config/autodialer/process.js
server/config/automations/fax.js
server/config/automations/mail.js
server/config/express.js
server/config/fax.js
server/config/history/history.js
server/config/history/reportMove.js
server/config/imap/imap.js
server/config/imap/index.js
server/config/integration.js
server/config/integrations/index.js
server/config/integrations/zendesk.js
server/config/license/index.js
server/config/license/license.service.js
server/config/local.env.sample.js
server/config/logger.js
server/config/routing/chat/index.js
server/config/routing/chat/session.js
server/config/routing/mail/index.js
server/config/routing/mail/session.js
server/config/seed.js
server/config/seedp.js
server/config/smtp/index.js
server/config/smtp/smtp.js
server/config/socketio.js
server/config/tools/chanspy.js
server/config/tools/chatRoom.js
server/config/tools/dashboard.js
server/config/tools/index.js
server/config/tools/interval.js
server/config/tools/user.js
server/config/triggers/chat.js
server/config/triggers/cm.js
server/config/triggers/index.js
server/config/triggers/mail.js
server/config/triggers/util.js
server/config/triggers/voice.js
server/config/util/error.js
server/config/util/index.js
server/files/attachments/79_newsletter_foto.png [new file with mode: 0644]
server/files/attachments/dotted.gif [new file with mode: 0644]
server/files/attachments/facebook-icon.png [new file with mode: 0644]
server/files/attachments/logo_small.jpg [new file with mode: 0644]
server/files/attachments/planetmultistore.png [new file with mode: 0644]
server/files/attachments/planetmultistore_mini.png [new file with mode: 0644]
server/files/attachments/promo.png [new file with mode: 0644]
server/files/attachments/youtube-icon.png [new file with mode: 0644]
server/migrations/20160315183016-motion.js
server/models/action.js
server/models/asterisk_manager.js
server/models/asterisk_manager_interface.js
server/models/autodialer_contact.js
server/models/autodialer_process.js
server/models/automation.js
server/models/canned_answer.js
server/models/channel.js
server/models/chanspy.js
server/models/chat_application.js
server/models/chat_enquiry.js
server/models/chat_message.js
server/models/chat_proactive_action.js
server/models/chat_queue.js
server/models/chat_room.js
server/models/chat_visitor.js
server/models/chat_website.js
server/models/chat_websites_field.js
server/models/company.js
server/models/contact.js
server/models/contact_email.js [deleted file]
server/models/contact_has_custom_field.js [deleted file]
server/models/contact_phone.js [deleted file]
server/models/custom_field.js
server/models/custom_report.js
server/models/dashboard.js
server/models/default_report.js
server/models/desk_account.js
server/models/desk_configuration.js
server/models/desk_field.js
server/models/event.js
server/models/extracted_report.js
server/models/fax_account.js
server/models/fax_application.js
server/models/fax_message.js
server/models/fax_queue.js
server/models/fax_room.js
server/models/freshdesk_account.js
server/models/freshdesk_configuration.js
server/models/freshdesk_field.js
server/models/history/report_agent_history.js
server/models/history/report_call_history.js
server/models/history/report_chat_history.js
server/models/history/report_chat_session_history.js
server/models/history/report_integration_history.js
server/models/history/report_mail_history.js
server/models/history/report_mail_session_history.js
server/models/history/report_member_history.js
server/models/history/report_queue_history.js
server/models/history/report_square_detail_history.js
server/models/history/report_square_history.js
server/models/history/report_tranfer_history.js
server/models/index.js
server/models/integration.js
server/models/interval.js
server/models/jscripty_project.js
server/models/mail_account.js
server/models/mail_application.js
server/models/mail_attachment.js
server/models/mail_automation.js
server/models/mail_message.js
server/models/mail_queue.js
server/models/mail_room.js
server/models/mail_room_status.js
server/models/mail_server_in.js
server/models/mail_server_out.js
server/models/mail_template.js
server/models/mail_trigger.js
server/models/metric.js
server/models/module.js
server/models/motionbar.js
server/models/pause.js
server/models/report_agent.js
server/models/report_call.js
server/models/report_chat.js
server/models/report_chat_session.js
server/models/report_field.js
server/models/report_integration.js
server/models/report_jscripty_input.js
server/models/report_jscripty_question.js
server/models/report_jscripty_session.js
server/models/report_mail.js
server/models/report_mail_session.js
server/models/report_member.js
server/models/report_queue.js
server/models/report_square.js
server/models/report_square_detail.js
server/models/report_tranfer.js
server/models/report_tree.js
server/models/salesforce_account.js
server/models/salesforce_configuration.js
server/models/salesforce_field.js
server/models/service.js
server/models/settings.js
server/models/sound.js
server/models/square_odbc.js
server/models/square_project.js
server/models/sugarcrm_account.js
server/models/sugarcrm_configuration.js
server/models/sugarcrm_field.js
server/models/tag.js
server/models/team.js
server/models/telephone.js
server/models/tools_action.js
server/models/tools_condition.js
server/models/trigger.js
server/models/trunk.js
server/models/user.js
server/models/user_has_chat_queue.js
server/models/user_has_chat_room.js
server/models/user_has_fax_queue.js
server/models/user_has_mail_queue.js
server/models/user_has_service.js
server/models/user_has_team.js
server/models/user_has_voice_queue.js
server/models/variable.js
server/models/voice_context.js
server/models/voice_extension.js
server/models/voice_musiconhold.js
server/models/voice_queue.js
server/models/voice_recording.js
server/models/voice_voicemail.js
server/models/voice_voicemail_messages.js
server/models/zendesk_account.js
server/models/zendesk_configuration.js
server/models/zendesk_field.js
server/routes.js
server/utils/report_build.js
server/utils/report_extraction.js
server/utils/voice_extension.js

index 1696026..5506441 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "motion",
-  "version": "0.0.66",
+  "version": "0.0.70",
   "main": "server/app.js",
   "dependencies": {
     "accept-language-parser": "^1.0.2",
@@ -27,7 +27,6 @@
     "formidable": "^1.0.17",
     "freshdesk": "^0.1.1",
     "fs-extra": "^0.26.2",
-    "generator-adf-widget": "^0.3.2",
     "geoip-lite": "^1.1.6",
     "html-pdf": "^1.4.0",
     "html-to-text": "^1.6.2",
@@ -56,7 +55,6 @@
     "passport-local": "~1.0.0",
     "passport-twitter": "latest",
     "pdfmake": "^0.1.18",
-    "phantomjs": "^1.9.19",
     "remove": "^0.1.5",
     "request-promise": "^2.0.1",
     "reverse-mustache": "^1.6.2",
     "socket.io": "^1.4.5",
     "socket.io-client": "^1.4.5",
     "socketio-jwt": "^4.3.3",
-    "sox": "^0.1.0",
-    "spindrift": "0.0.6",
+    "sox": "github:gcareri/node-sox",
     "string-to-json": "^0.1.0",
     "tiff-to-png": "^1.0.2",
     "to-csv": "^0.1.0",
     "ua-parser-js": "^0.7.9",
     "upload-file": "^1.2.0",
     "wait.for": "^0.6.6",
-    "xml2js": "^0.4.15",
-    "yo": "^1.5.0"
+    "xml2js": "^0.4.15"
   },
   "devDependencies": {
     "connect-livereload": "~0.5.3",
similarity index 54%
rename from public/app/9803d603.app.js
rename to public/app/7f4f3cd9.app.js
index c71f8c2..f4ba39c 100644 (file)
@@ -1,18 +1,18 @@
-"use strict";angular.module("xCallyShuttleApp",["adf","adf.structures.base","adf.widget.clock","adf.widget.iframe","adf.widget.counter","adf.widget.pie-chart","angular-md5","angular.filter","angularFileUpload","btford.socket-io","chart.js","checklist-model","colorpicker.module","frapontillo.bootstrap-switch","infinite-scroll","LocalStorageModule","mgo-angular-wizard","ng-slide-down","ngAnimate","ngBootstrap","ngCookies","ngCsv","ngFileSaver","ngJsTree","ngMap","ngPapaParse","ngResource","ngSanitize","notification","oc.lazyLoad","pascalprecht.translate","pdf","remoteValidation","smart-table","sprintf","textAngular","timer","toastr","permission","ui-notification","ui.bootstrap.modal","ui.bootstrap.dropdown","ui.bootstrap.popover","ui.bootstrap.timepicker","ui.bootstrap.tooltip","ui.bootstrap.tpls","ui.bootstrap.accordion","ui.bootstrap.progressbar","ui.bootstrap.typeahead","ui.grid","ui.grid.autoResize","ui.grid.draggable-rows","ui.grid.exporter","ui.grid.grouping","ui.grid.moveColumns","ui.grid.pagination","ui.grid.treeView","ui.grid.selection","ui.grid.exporter","ui.grid.resizeColumns","ui.router","ui.navbar","ui.select","ui.sortable","xeditable","ngAudio","truncate","ngScrollbars","ngEmoticons","angularSpinner","builder","builder.components","validator","angular-clipboard","ng-code-mirror","angularMoment"]).config(["$stateProvider","$urlRouterProvider","$locationProvider","$httpProvider","$translateProvider","localStorageServiceProvider","dashboardProvider","ScrollBarsProvider",function(a,b,c,d,e,f,g,h){b.otherwise("/dashboard/voice"),e.useStaticFilesLoader({prefix:"assets/languages/locale-",suffix:".json"}),e.preferredLanguage("en_EN"),e.useLocalStorage(),e.useSanitizeValueStrategy("sanitize"),c.html5Mode(!0),d.interceptors.push("authInterceptor"),g.structure("4-4-4",{rows:[{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("3-3-3-3",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"}]}]}),f.setPrefix("xcally"),h.defaults={scrollButtons:{scrollAmount:"auto",enable:!0},axis:"y"}}]).factory("settings",["$rootScope","$interval","License","localStorageService",function(a,b,c,d){return a.settings={patternName:"[A-Za-z0-9._]+",layout:{pageSidebarClosed:d.get("sidebarClosed")||!1,pageQuickSidebarOpened:!1,pageBodySolid:!1,pageAutoScrollOnLoad:1e3}},c.get(function(b){b.license&&(a.license=b.license,a.soundPath=b.soundPath)}),a.settings}]).factory("authInterceptor",["$rootScope","$q","$cookieStore",function(a,b,c){return{request:function(a){return a.headers=a.headers||{},c.get("token")&&(a.headers.Authorization="Bearer "+c.get("token")),a}}}]).run(["$rootScope","$location","$state","$stateParams","$window","$q","$http","Auth","RoleStore","editableThemes","editableOptions",function(a,b,c,d,e,f,g,h,i,j,k){g.get("/api/settings/1").success(function(b){a.license=b.license}).error(function(a){console.error(a)}),a.$state=c,a.$stateParams=d,j.bs3.inputClass="input-sm",j.bs3.buttonsClass="btn-xs",k.theme="bs3",a.online=navigator.onLine,e.addEventListener("offline",function(){a.$apply(function(){a.online=!1})},!1),e.addEventListener("online",function(){a.$apply(function(){a.online=!0})},!1),a.$on("$stateChangeStart",function(a,c){h.isLoggedInAsync(function(a){c.authenticate&&!a&&b.path("/login")})}),a.updateTableConfig=function(a,b){var c=_.find(a,{name:"All"});c&&(c.value=b)},i.defineRole("admin",[],function(){return h.isAdmin()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics",{url:"/analytics",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Extracted",["$resource",function(a){return a("/api/analytics/extracted/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted",{url:"/extracted",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticExtractedListCtrl",["$scope","$translate","gridOptions","Extracted",function(a,b,c,d){a.moment=moment,a.Extracted=d,a.initView=function(){var b={exporterCsvFilename:"ExtractedReports.csv",columnDefs:[{name:"name"},{name:"startDate",displayName:"APPLICATION_START_DATE"},{name:"endDate",displayName:"APPLICATION_END_DATE"},{name:"createdAt",displayName:"APPLICATION_RUN_DATE"},{name:"startDate",displayName:"APPLICATION_START_DATE"},{name:"output"},{name:"status"},{name:"action",width:140,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{directive:"<motion-file-download data-ng-show=\"row.entity.status == 'completed'\" resource=\"grid.appScope.Extracted\" params=\"{id:row.entity.id,controller:'download'}\" mimetype=\"'application/'+row.entity.output.toLowerCase()\" filename=\"row.entity.name+'_'+grid.appScope.moment(row.entity.startDate).format('MM-DD-YYYY').toString()+'_'+grid.appScope.moment(row.entity.endDate).format('MM-DD-YYYY').toString()+'.'+row.entity.output.toLowerCase()\"></motion-file-download>"}]}]};a.gridOptions=c.gridOptions(d,b,a,{order:"createdAt DESC"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted.list",{url:"/list",templateUrl:"app/analytic/extracted/list/list.html",controller:"AnalyticExtractedListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.tables=[{name:"Agent Report",value:"report_agent_history"},{name:"Mail Report",value:"report_mail_session_history"},{name:"Queue Report",value:"report_queue_history"},{name:"Integration Report",value:"report_integration_history"},{name:"Chat Report",value:"report_chat_session_history"}],a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCtrl",["$scope","xAlert","Modal","$uibModal","$log","gridOptions","Metric","$translate",function(a,b,c,d,e,f,g,h){a.$translate=h,a.initView=function(){var b={exporterCsvFilename:"Metrics.csv",columnDefs:[{name:"name"},{name:"table",cellTemplate:"<div style=\"padding:5px\">{{'APPLICATION_'+row.entity.table.toUpperCase() | translate}}</div>"},{name:"description"},{name:"action",width:125,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/analytics/metrics/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(g,b,a)},a.create=function(){var c=d.open({animation:!0,templateUrl:"app/analytic/metric/list/create.modal.html",controller:"AnalyticMetricListCreateModalCtrl"});c.result.then(function(c){return g.save(c).$promise.then(function(){a.gridOptions.getPage(),b.show(h.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(a.data.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.list",{url:"/list",templateUrl:"app/analytic/metric/list/list.html",controller:"AnalyticMetricListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Metric",["$resource",function(a){return a("/api/analytics/metrics/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics",{url:"/metrics",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","Metric",function(a,b,c,d,e,f){a.tables=[{name:"Agent Report",value:"report_agent_history"},{name:"Mail Report",value:"report_mail_session_history"},{name:"Queue Report",value:"report_queue_history"},{name:"Integration Report",value:"report_integration_history"},{name:"Chat Report",value:"report_chat_session_history"}],a.getMetric=function(){return f.get({id:d.id}).$promise.then(function(b){a.metric=b})["catch"](function(a){e.path("/analytics/metrics/list")})},a.updateMetric=function(){return f.update({id:d.id},a.metric).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.view",{url:"/view/:id",templateUrl:"app/analytic/metric/view/view.html",controller:"AnalyticMetricViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.metrics.view.settings",{url:"/settings",templateUrl:"app/analytic/metric/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("customReport",["$resource",function(a){return a("/api/analytics/reports/custom/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("defaultReport",["$resource",function(a){return a("/api/analytics/reports/default/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ReportListCopyModalCtrl",["$scope","$uibModalInstance","$log","customTreeData",function(a,b,c,d){a.customTreeData=d,a.forms={dashboard:void 0},a.item={},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){c.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0}},a.ac=function(){return!0},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.open_all()},a.ok=function(){b.close({parent:a.customTree.get_selected(!0).pop().id})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListCreateModalCtrl",["$scope","$uibModalInstance","path",function(a,b,c){a.path=c,a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListExtractModalCtrl",["$scope","$uibModalInstance",function(a,b){a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={Yesterday:[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],"Last 7 days":[moment().subtract(7,"days"),moment()],"Last 30 days":[moment().subtract(30,"days"),moment()],"This month":[moment().startOf("month"),moment().endOf("month")]},a.extract=function(c){var d={startDate:a.dates.startDate.toISOString(),endDate:a.dates.endDate.toISOString(),output:c};b.close(d)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticReportListCtrl",["$scope","xAlert","$translate","$location","$log","Modal","$uibModal","FileSaver","Blob","gridOptions","customReport","defaultReport","reportTree",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){var b,c={},d=a.defaultTree.get_selected(),e=a.customTree.get_selected();if(d.length)b=d.pop(),a.selectedNode=a.defaultTree.get_path(b," / "),c={parent:b},a.gridOptions=j.gridOptions(l,o,a,c,!0),a.gridOptions.getPage();else{if(!e.length)return;b=e.pop(),a.selectedNode=a.customTree.get_path(b," / "),c={parent:b},a.gridOptions=j.gridOptions(k,o,a,c,!0),a.gridOptions.getPage()}}var o={exporterCsvFilename:"reports.csv",columnDefs:[{name:"name"},{name:"description"},{name:"manage",buttons:[{"class":"blue-hoki",href:"/analytics/reports/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green",name:"copy",onClick:"grid.appScope.copy(row.entity.id)"},{"class":"purple",name:"export",onClick:"grid.appScope.export(row.entity.id)"}]},{name:"actions",buttons:[{"class":"yellow",name:"preview",onClick:"grid.appScope.preview(row.entity.id)"},{"class":"green-turquoise",name:"run",onClick:"grid.appScope.extract(row.entity.id)"}]}]};a.searchField="",a.ac=function(){return!0},a.initDefaultScopeTree=function(){a.defaultTree=a.defaultTreeInstance.jstree(!0),a.defaultTree.deselect_all(),a.defaultTree.close_all(),a.defaultTree.open_node({id:1}),a.defaultTreeReady=!0,a.defaultTreeActive=!0,a.previousDefaultNode=""},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.close_all(),a.customTree.open_node({id:1}),a.customTreeReady=!0,a.previousCustomNode=""},a.$watchGroup(["defaultTreeReady","customTreeReady"],function(b,c,d){b[0]&&b[1]&&a.defaultTree.select_node({id:"1"})}),a.updateCustomTree=function(){var d={tree:angular.toJson(a.customTree.get_json("#",{flat:!0}))};return m.update({id:2},d).$promise.then(function(a){console.log("Custom Tree Updated")})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.configTrees=function(){a.defaultTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0,themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["search"]},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0,themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["contextmenu","dnd","search"],contextmenu:{items:function(b,d){var e={create:{label:c.instant("APPLICATION_CREATE"),action:function(c){a.customTree.create_node(b),a.customTree.open_node(b)}},rename:{label:c.instant("APPLICATION_RENAME"),action:function(c){a.customTree.edit(b)}},remove:{label:c.instant("APPLICATION_REMOVE"),action:function(c){console.log(b),a.deleteNode(b.text,b)}}};return"#"===b.parent&&(delete e.rename,delete e.remove),d(e),e}}}},a.deleteNode=f.confirm["delete"](function(b){a.customTree.delete_node(b),a.previousCustomNode==b.id&&a.customTree.select_node({id:b.parent})}),a.searchTrees=function(){a.defaultTree.search(a.searchField),a.customTree.search(a.searchField)},a.selectDefaultNode=function(){if(a.customTreeReady){a.previousCustomNode="";var b=a.defaultTree.get_selected(!0),c=b.pop();if(a.defaultTree.deselect_node(b[0],!0),a.customTree.deselect_all(),a.defaultTree.select_node(c,!0),c.id===a.previousDefaultNode)return void console.log("def");a.previousDefaultNode=c.id,a.defaultTreeActive=!0,n()}},a.selectCustomNode=function(){if(a.defaultTreeReady){a.previousDefaultNode="";var b=a.customTree.get_selected(!0),c=b.pop();if(a.customTree.deselect_node(b[0],!0),a.defaultTree.deselect_all(),a.customTree.select_node(c,!0),c.id===a.previousCustomNode)return void console.log("cus");a.previousCustomNode=c.id,a.defaultTreeActive=!1,n()}},a.getTrees=function(){return m.query().$promise.then(function(b){a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),a.configTrees()})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.create=function(){var c=g.open({animation:!0,templateUrl:"app/analytic/report/list/create.modal.html",controller:"ReportListCreateModalCtrl",resolve:{path:function(){return a.selectedNode}}});c.result.then(function(c){return c.parent=a.previousCustomNode,k.save(c).$promise.then(function(a){d.path("/analytics/reports/view/"+a.id+"/settings")})["catch"](function(a){b.show(a.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})},a.copy=function(d){var f=a.defaultTreeActive?l:k,h=g.open({animation:!0,templateUrl:"app/analytic/report/list/copy.modal.html",controller:"ReportListCopyModalCtrl",resolve:{customTreeData:function(){return a.customTreeData}}});h.result.then(function(e){return f.save({id:d,controller:"copy"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})},a["export"]=function(c){var d=a.defaultTreeActive?l:k;return d.get({id:c}).$promise.then(function(a){delete a.id,delete a.createdAt,delete a.updatedAt,delete a.deletedAt,_.forEach(a.Fields,function(a){delete a.id,delete a.CustomReportId,a.Metric&&(delete a.Metric.id,a.Metric.name+="_"+_.random(9999))});var b=new i([angular.toJson(a)],{type:"application/json;charset=utf-8"});h.saveAs(b,a.name+".json")})["catch"](function(a){console.error(data),b.show(a.message,"danger")})},a["import"]=function(d){var e=JSON.parse(d);e.parent=a.previousCustomNode;var f=e.name&&e.parent?!0:!1,g=!0;return _.forEach(e.Fields,function(a){a.field&&a.alias||(g=!1)}),f&&g?k.save({controller:"import"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")}):void b.show(c.instant("MESSAGE_INVALID_JSON"),"danger")},a.preview=function(b){g.open({animation:!0,templateUrl:"app/analytic/report/list/preview.modal.html",controller:"ReportListPreviewModalCtrl",size:"full",resolve:{report:function(){return{id:b,tree:a.defaultTreeActive?"default":"custom"}}}})},a.extract=function(d){var f=g.open({animation:!0,templateUrl:"app/analytic/report/list/extract.modal.html",controller:"ReportListExtractModalCtrl",size:"md",resolve:{report:function(){return{id:d,tree:a.defaultTreeActive?"default":"custom"}}}});f.result.then(function(e){var f=a.defaultTreeActive?l:k;return f.get({id:d,controller:"extract",action:e.output,startDate:e.startDate,endDate:e.endDate}).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.list",{url:"/list",templateUrl:"app/analytic/report/list/list.html",controller:"AnalyticReportListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ReportListPreviewModalCtrl",["$scope","$uibModalInstance","report","xAlert","$translate","$timeout","customReport","defaultReport",function(a,b,c,d,e,f,g,h){a.forms={dashboard:void 0},a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={Yesterday:[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],"Last 7 days":[moment().subtract(7,"days"),moment()],"Last 30 days":[moment().subtract(30,"days"),moment()],"This month":[moment().startOf("month"),moment().endOf("month")]};var i={pageNumber:1,pageSize:25,sort:null,where:{},order:{}};a.gridOptions={paginationPageSizes:[10,25,50],paginationPageSize:25,useExternalPagination:!0,enableSorting:!1,enableFiltering:!0,useExternalFiltering:!0,enableGrouping:!1,enableColumnMenus:!1,treeRowHeaderAlwaysVisible:!1,gridMenuShowHideColumns:!1,enableGridMenu:!1,onRegisterApi:function(b){a.gridApi=b,b.pagination.on.paginationChanged(a,function(b,c){i.offset=(b-1)*c,i.limit=c,a.getPage()}),b.core.on.filterChanged(a,function(){var b=this.grid,c={};b.columns.forEach(function(a){console.log(a),a.filters[0].term&&(c[a.field]=a.filters[0].term)}),i.where=c,a.getPage()})}},a.getPage=function(){var b={params:{offset:i.offset,limit:i.limit,startDate:a.dates.startDate.toISOString(),endDate:a.dates.endDate.toISOString()}};_.forOwn(i.where,function(a,c){b.params[c]=a}),console.log(b);var f="custom"===c.tree?g:h;return f.get({id:c.id,controller:"preview"},b).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.paginationPageSizes[3]=b.count,a.gridOptions.data=b.rows,a.showResult=!0})["catch"](function(a){d.show(e.instant(a.message),"danger")})},a.cancel=function(){b.dismiss("cancel")},f(function(){a.getPage()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports",{url:"/reports",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("reportTree",["$resource",function(a){return a("/api/analytics/reports/trees/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("AnalyticReportViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){function g(e){var f=_.find(a.tables,{table:e}).url;b.get(f).success(function(b){a.tableFields=_.map(b,function(a,b){return{name:b,value:b}})}).error(function(a){c.show(d.instant(a.message),"danger")})}function h(e){console.log(e),b.get("/api/analytics/metrics/table",{params:{table:e}}).success(function(b){_.forEach(b,function(b){a.tableFields.push({name:"<strong>Metric.</strong>"+b.name,value:b.metric,MetricId:b.id})})}).error(function(a){c.show(d.instant(a.message),"danger")})}function i(a){return String(a).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function j(a){if(!a)return"";for(var b="(",c=0;c<a.rules.length;c++)c>0&&(b+=" <strong>"+a.operator+"</strong> "),b+=a.rules[c].group?j(a.rules[c].group):a.rules[c].field+" "+i(a.rules[c].condition)+" '"+("like"===a.rules[c].condition?"%"+a.rules[c].value+"%":a.rules[c].value)+"'";return b+")"}a.$translate=d,a.tempReport={},a.tables=[{name:"Agent Report",table:"report_agent_history",url:"/api/report/agents/describe"},{name:"Mail Report",table:"report_mail_session_history",url:"/api/report/mail/sessions/describe"},{name:"Queue Report",table:"report_queue_history",url:"/api/report/queues/describe"},{name:"Chat Report",table:"report_chat_session_history",url:"/api/report/chat/sessions/describe"}];var k={group:{operator:"AND",rules:[]}};a.getReport=function(){a.firstLoad=!0,b.get("/api/analytics/reports/custom/"+e.id).success(function(b){a.report=b,_.forEach(a.report.Fields,function(a){delete a.id}),a.report.conditions=a.report.conditions?JSON.parse(a.report.conditions):_.clone(k,!0),a.getPreview(a.report.Fields.length)}).error(function(a){console.error(a),f.path("/analytics/reports/list")})},a.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},a.$watch("report.table",function(b,c){console.log(b),b&&(console.log("is newvalue"),g(b),h(b),c&&(console.log("is oldvalue"),a.tempReport[c]={conditions:a.report.conditions,fields:a.report.Fields}),a.firstLoad?a.firstLoad=!1:a.tempReport[b]?(a.report.Fields=a.tempReport[b].fields,a.report.conditions=a.tempReport[b].conditions):(a.report.Fields=[],a.report.conditions=_.clone(k,!0)))},!0),a.setMetricId=function(b,c){a.report.Fields[c].MetricId=b.MetricId?b.MetricId:null},a.groupByField=[{name:"APPLICATION_YES",value:!0},{name:"APPLICATION_NO",value:!1}],a.functions=[{name:"Sum",value:"SUM"},{name:"Count",value:"COUNT"},{name:"Count Distinct",value:"COUNT DISTINCT"},{name:"Maximum",value:"MAX"},{name:"Minimum",value:"MIN"},{name:"Average",value:"AVG"},{name:"Group Concat",value:"GROUP_CONCAT"},{name:"Group Concat(asc)",value:"GROUP_CONCAT ASC"},{name:"Group Concat(desc)",value:"GROUP_CONCAT DESC"}],a.addField=function(){a.report.Fields.push({groupBy:!1})},a.removeField=function(b){a.report.Fields.splice(b,1)},a.sortableOptions={"ui-floating":!0,cancel:".unsortable",handle:".report-field-handle",axis:"y"},a.updateReport=function(){if(a.report.Fields.length){var f=angular.copy(a.report);f.conditions=angular.toJson(f.conditions),b.put("/api/analytics/reports/custom/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.getPreview(!0)}).error(function(b){c.show(d.instant(b.message),"danger"),f.conditions=JSON.parse(f.conditions),a.report=f})}else c.show(d.instant("MESSAGE_SELECT_A_FIELD"),"danger")},a.$watch("report.conditions",function(b){a.output=b?j(b.group):"()"},!0),a.gridOptions={enableFiltering:!0,treeRowHeaderAlwaysVisible:!1,enableGridMenu:!0},a.getPreview=function(f){b.get("/api/analytics/reports/custom/"+e.id+"/preview/",{params:{limit:20}}).success(function(b){a.gridOptions.data=b.rows}).error(function(a){f&&c.show(d.instant(a.message||"MESSAGE_QUERY_NOT_VALID"),"warning")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.view",{url:"/view/:id",templateUrl:"app/analytic/report/view/view.html",controller:"AnalyticReportViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.reports.view.settings",{url:"/settings",templateUrl:"app/analytic/report/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels",{url:"/channels",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat",{url:"/chat",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("ChatEnquiry",["$resource",function(a){return a("/api/chat/enquiries/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatMessage",["$resource",function(a){return a("/api/chat/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatReport",["$resource",function(a){return a("/api/report/chats/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatRoom",["$resource",function(a){return a("/api/chat/rooms/:id/:controller",{id:"@id"},{me:{method:"GET",isArray:!0,params:{id:"me"}},users:{method:"GET",params:{id:"users"}},externals:{method:"GET",isArray:!0,params:{id:"type",controller:"external"}},groups:{method:"GET",isArray:!0,params:{id:"groups"}},update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatVisitor",["$resource",function(a){return a("/api/chat/visitors/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineListCtrl",["$scope","ChatVisitor","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_offline_messages.csv",columnDefs:[{name:"fullname",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"ChatWebsite.name",displayName:"Website",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/offline/view/{{row.entity.id}}/detail",name:"detail"}]}]};a.gridOptions=c.gridOptions(b,d,a,{origin:"enquiry"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.list",{url:"/list",templateUrl:"app/channels/chat/offline/list/list.html",controller:"ChatOfflineListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline",{url:"/offline",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineViewCtrl",["$scope","$stateParams","ChatVisitor",function(a,b,c){a.initView=function(){return c.get({id:b.id}).$promise.then(function(b){a.chatVisitor=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.view",{url:"/view/:id",templateUrl:"app/channels/chat/offline/view/view.html",controller:"ChatOfflineViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.offline.view.detail",{url:"/detail",templateUrl:"app/channels/chat/offline/view/view.detail.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/news.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineListCtrl",["$scope","ChatRoom","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_online_messages.csv",columnDefs:[{name:"ChatVisitor.fullname",displayName:"APPLICATION_FULLNAME",cellClass:"text-center"},{name:"ChatVisitor.email",displayName:"APPLICATION_EMAIL",cellClass:"text-center"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/online/view/{{row.entity.id}}/detail",name:"detail"}]}]};a.gridOptions=c.gridOptions(b,d,a,{type:"external"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.list",{url:"/list",templateUrl:"app/channels/chat/online/list/list.html",controller:"ChatOnlineListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online",{url:"/online",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineViewCtrl",["$scope","$stateParams","ChatRoom",function(a,b,c){a.initView=function(){return a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:400,scrollInertia:0},c.get({id:b.id}).$promise.then(function(b){a.chatRoom=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.view",{url:"/view/:id",templateUrl:"app/channels/chat/online/view/view.html",controller:"ChatOnlineViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.online.view.detail",{url:"/detail",templateUrl:"app/channels/chat/online/view/view.detail.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/news.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("PreviewCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").directive("preview",function(){return{templateUrl:"app/channels/chat/preview/preview.html",restrict:"EA",link:function(a,b,c){}}}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("preview",{url:"/preview",templateUrl:"app/channels/chat/preview/preview.html",controller:"PreviewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ChatQueue",["$resource",function(a){return a("/api/chat/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCtrl",["$scope","ChatQueue","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"chat_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/queues/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},
-a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/mail/queue/list/list.create.modal.html",controller:"ChatQueueListCreateCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","ChatQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.list",{url:"/list",templateUrl:"app/channels/chat/queue/list/list.html",controller:"ChatQueueListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatQueueViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","ChatQueue","Team",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){b.get("/api/chat/queues/"+e.id).success(function(b){b.penalty=0,a.queue=b}).error(function(a){console.error(a)})},a.updateChatQueue=function(){var f=angular.copy(a.queue);b.put("/api/chat/queues/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){a.queue=f,b.errors.forEach(function(a){c.show(a.message,"danger")})})},a.getTeams=function(){return g.get().$promise.then(function(b){return a.teams=b.rows,f.query({id:e.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindChatQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasChatQueue.penalty}}),h)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.view",{url:"/view/:id",templateUrl:"app/channels/chat/queue/view/view.html",controller:"ChatQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.queues.view.settings",{url:"/settings",templateUrl:"app/channels/chat/queue/view/view.settings.html"}).state("main.channels.chat.queues.view.agents",{url:"/agents",templateUrl:"app/channels/chat/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","ChatQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.chatPause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_chat_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.ChatQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_chat_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.ChatQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.chatPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.ChatQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.chatQueues=b.rows,e.syncUpdates("chat_queue",a.chatQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.chatQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"chatPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><timer data-ng-if="row.entity.pause" start-time="grid.appScope.moment(row.entity.lastPauseAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span><span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.chatQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_chat_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/queue.modal.add.html",controller:"ChatRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.chatQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.chatQueues,function(a){return _.includes(b.queues,a.id)}),channel:"chat",data1:e,data3:b.queues.join(","),data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"chat",data1:a,data3:b,data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/agent.modal.info.html",controller:"ChatRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/chat/realtime/view/agent/agent.html",controller:"ChatRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewQueueCtrl",["$scope","$http","socket","ChatQueue","Agent",function(a,b,c,d,e){a.initQueues=function(){a.gridOptions={enableSorting:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,showTreeExpandNoChildren:!1,columnDefs:[{name:"queueName",displayName:"Queue"},{name:"fullname",displayName:"Agent",cellClass:"text-center"},{name:"online",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><i data-ng-if="row.entity.online != null" class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i></div>'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-if=\"row.entity.chatPause != null\" data-ng-class=\"row.entity.chatPause ? 'icon-control-pause font-red' : 'icon-control-play font-green'\"></i></div>"},{name:"pauseType",cellClass:"text-center",cellTemplate:'<span data-ng-if="row.entity.chatPause">{{row.entity.pauseType}}</span>'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><time data-ng-if="row.entity.lastLoginAt" is="relative-time" datetime="{{row.entity.lastLoginAt}}">April 1, 2014</time></div>'}],onRegisterApi:function(b){a.gridApi=b,a.gridApi.treeBase.on.rowExpanded(a,function(b){var c=_.findIndex(a.gridOptions.data,{$$hashKey:b.entity.$$hashKey});b.entity.Users&&b.entity.Users.forEach(function(b){_.find(a.gridOptions.data,{name:b.name})||a.gridOptions.data.splice(c+1,0,b)})})}},d.get(function(b){a.gridOptions.data=[],b.rows.forEach(function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b),b.Users&&b.Users.forEach(function(b){b.agentName=b.name,a.gridOptions.data.push(b)})}),c.socket.on("agent:save",function(b){var c=_.filter(a.gridOptions.data,{agentName:b.name});c.forEach(function(a){a.online=b.online,a.lastLoginAt=b.lastLoginAt})}),c.socket.on("chat_queue:save",function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b)}),c.socket.on("chat_queue:remove",function(b){_.remov(a.gridOptions.data,{queueName:b.name})}),c.socket.on("user_has_chat_queue:save",function(b){var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.ChatQueueId});e.get({id:b.UserId}).$promise.then(function(b){a.gridOptions.data.splice(c+1,0,{id:b.id,name:b.name,fullname:b.fullname,agentName:b.name,online:b.online,lastLoginAt:b.lastLoginAt})})["catch"](function(a){console.error(a)})}),c.socket.on("user_has_chat_queue:remove",function(b){for(var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.ChatQueueId}),d=c+1;d<a.gridOptions.data.length;d++)a.gridOptions.data[d].id==b.UserId&&a.gridOptions.data.splice(d,1)})},function(a){console.error(a)})},a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){c.unsyncUpdates("report_mail:save"),c.unsyncUpdates("report_mail:update")}),a.initAgents=function(){b.get("/api/report/mails").success(function(b){a.agents=b,c.socket.on("report_mail:save",function(b){var c=_.find(a.agents,{id:b.id});c||a.agents.unshift(b)}),c.socket.on("report_mail:update",function(b){var c=_.find(a.agents,{id:b.id}),d=a.agents.indexOf(c);c&&_.merge(a.agents[d],b)})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.queues",{url:"/queues",templateUrl:"app/channels/chat/realtime/view/queue/queue.html",controller:"ChatRealtimeViewQueueCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewSessionCtrl",["$scope","$http","socket","uiGridConstants",function(a,b,c,d){a.initSessions=function(){a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"uniqueid",cellClass:"text-center",width:150,enableSorting:!1,enableFiltering:!0},{name:"application",displayName:"APPLICATION_APP",headerCellFilter:"translate",cellClass:"text-center"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center"},{name:"agentname",cellClass:"text-center"},{name:"websitename",displayName:"APPLICATION_WEB_SITE",headerCellFilter:"translate"},{name:"joinAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.joinAt" is="relative-time" datetime="{{row.entity.joinAt}}">April 1, 2014</time>',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.leaveAt" is="relative-time" datetime="{{row.entity.leaveAt}}">April 1, 2014</time>'},{name:"unmanagedAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.unmanagedAt" is="relative-time" datetime="{{row.entity.unmanagedAt}}">April 1, 2014</time>'}],data:[]},b.get("/api/report/chat/sessions").success(function(b){a.gridOptions.data=b.rows,c.socket.on("report_chat_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id}),d=a.gridOptions.data.indexOf(c);c?_.merge(a.gridOptions.data[d],b):a.gridOptions.data.unshift(b)})}).error(function(a){console.error(a)})},a.$on("$destroy",function(){c.unsyncUpdates("report_chat:save"),c.unsyncUpdates("report_chat:update")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.sessions",{url:"/sessions",templateUrl:"app/channels/chat/realtime/view/session/session.html",controller:"ChatRealtimeViewSessionCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewCtrl",["$scope",function(a){a.agents=[{name:"Queues",link:"main.chat.realtime.view.agent.queues"},{name:"Timeline",link:"main.chat.realtime.view.agent.timeline"}],a.sessions=[{name:"Sessions",link:"main.chat.realtime.view.sessions"}]}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view",{url:"/view",templateUrl:"app/channels/chat/realtime/view/view.html",controller:"ChatRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatVisitorListCtrl",["$scope","ChatVisitor","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"chat_visitors.csv",columnDefs:[{name:"fullname",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"origin",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/visitors/view/{{row.entity.id}}/profile",name:"profile"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.list",{url:"/list",templateUrl:"app/channels/chat/visitor/list/list.html",controller:"ChatVisitorListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatVisitorViewCtrl",["$scope","$stateParams","ChatVisitor",function(a,b,c){a.initView=function(){return c.get({id:b.id}).$promise.then(function(b){a.chatVisitor=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.view",{url:"/view/:id",templateUrl:"app/channels/chat/visitor/view/view.html",controller:"ChatVisitorViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.visitors.view.profile",{url:"/profile",templateUrl:"app/channels/chat/visitor/view/view.profile.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors",{url:"/visitors",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("ChatApplication",["$resource",function(a){return a("/api/chat/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatWebsite",["$resource",function(a){return a("/api/chat/websites/:websiteId/:controller/:id",{id:"@websiteId"},{update:{method:"PUT"},updateFields:{method:"PUT",isArray:!0}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteListCtrl",["$scope","gridOptions","ChatWebsite",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_websites.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.id}}/embedding/view",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.list",{url:"/list",templateUrl:"app/channels/chat/website/list/list.html",controller:"ChatWebsiteListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"chat_applications.csv",columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.ChatQueue ? row.entity.ChatQueue.name : row.entity.User.name}}</span></div>"},{name:"timeout",cellClass:"text-center"},{name:"interval",cellClass:"text-center"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.ChatWebsiteId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.list",{url:"/list",templateUrl:"app/channels/chat/website/view/action/list/list.html",controller:"ChatWebsiteViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","ChatApplication","ChatQueue","Agent","Interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],k.get({id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1]),a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.show(d.instant("Something went wrong!"),"danger")})},a.getQueues=function(){return l.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return m.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return n.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){var b=["*","*","*","*"],e={app:a.application.app,timeout:a.application.timeout,chatAccountId:c.id};switch(a.application.app){case"agent":e.UserId=a.application.UserId;break;case"queue":e.chatQueueId=a.application.chatQueueId}switch(a.application.intType){case"always":e.interval=b.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(b[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?b[1]="*":b[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?b[2]="*":b[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?b[3]="*":b[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",e.interval=b.join(","),delete a.application.IntervalId;break;case"list":e.IntervalId=a.application.IntervalId}return k.update({id:c.actionId},e).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/chat/website/view/action/view/view.html",controller:"ChatWebsiteViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionWizardCtrl",["$scope","$http","Agent","Interval","ChatQueue","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={app:"queue",intType:"always",alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return e.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return d.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){var c=["*","*","*","*"],d={app:a.application.app,timeout:a.application.timeout,ChatWebsiteId:f.websiteId};switch(a.application.app){case"agent":d.UserId=a.application.UserId;break;case"queue":d.ChatQueueId=a.application.ChatQueueId}switch(a.application.intType){case"always":d.interval=c.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(c[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?c[1]="*":c[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?c[2]="*":c[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?c[3]="*":c[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",d.interval=c.join(","),delete a.application.IntervalId;break;case"list":d.IntervalId=a.application.IntervalId}b.post("/api/chat/applications",d).success(function(){h.path("/channels/chat/websites/view/"+f.websiteId+"/actions/list")}).error(function(a){console.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/view/action/wizard/wizard.html",controller:"ChatWebsiteViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding",{url:"/embedding",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewEmbeddingViewCtrl",["$scope","$stateParams","$translate","clipboard","xAlert","ChatWebsite",function(a,b,c,d,e,f){a.initView=function(){return f.get({websiteId:b.websiteId,controller:"snippet"}).$promise.then(function(b){a.snippetCode=b.html})["catch"](function(a){e.show(a.message,"danger")})},a.copyToClipboard=function(){d.copyText(a.snippetCode),e.show(c.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding.view",{url:"/view",templateUrl:"app/channels/chat/website/view/embedding/view/view.html",controller:"ChatWebsiteViewEmbeddingViewCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form",{url:"/forms",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewFormViewCtrl",["$scope","$builder","$validator","$stateParams","$translate","ChatWebsite","xAlert",function(a,b,c,d,e,f,g){a.saveForm=function(a){var c=angular.copy(b.forms[a]);return c.length>3?g.show("You can insert at least 3 input elements","danger"):(_.forEach(c,function(a){
-delete a.id}),f.updateFields({websiteId:d.websiteId,controller:"fields",id:a},c).$promise.then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")}))},a.getChatWebsiteFields=function(a){return f.query({websiteId:d.websiteId,controller:"fields",id:a}).$promise.then(function(c){_.forEach(c,function(c){b.addFormObject(a,c)})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form.view",{url:"/view",templateUrl:"app/channels/chat/website/view/form/view/view.html",controller:"ChatWebsiteViewFormViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewProactiveListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","$uibModal",function(a,b,c,d,e,f,g){a.initProactiveActions=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"name"},{name:"type"},{name:"action",width:125,buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"proactive"})},a.createItem=function(b){var c=g.open({animation:!0,templateUrl:"app/channels/chat/website/view/proactive/list/list.create.modal.html",controller:"ChatWebsiteProactiveListCreateCtrl",resolve:{item:b}});c.result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteProactiveListCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","ChatWebsite","xAlert","item",function(a,b,c,d,e,f,g){a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_PROACTIVE_ACTION"):b.instant("APPLICATION_NEW_PROACTIVE_ACTION"),a.possibleType=[{type:"mouseOver",title:"Mouse Over"},{type:"timeout",title:"Timeout"}],a.save=function(){return g?e.update({websiteId:d.websiteId,controller:"proactive",id:a.item.id},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.show(a.data.message,"danger")}):e.save({websiteId:d.websiteId,controller:"proactive"},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive.list",{url:"/list",templateUrl:"app/channels/chat/website/view/proactive/list/list.html",controller:"ChatWebsiteViewProactiveListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive",{url:"/proactive",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet",{url:"/snippet",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewSnippetViewCtrl",["$scope","$http","$stateParams","$translate","Template",function(a,b,c,d,e){a.$translate=d,a.statePreview={state:"online"},a.enquirySwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.lang={HeaderCurrentlyChatting:"Live Chat",HeaderOffline:"Contact us",OperatorOfflineMessage:"It appears as if all operators are currently offline.",OfflineMessage:"<strong>We're not online.</strong><br/>It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.",EnquiryMessagePlaceholder:"Your message...",EnquiryButtonText:"Leave message",EnquirySubmitSuccess:"Your message was sucessfully submitted - we will contact you as soon as possible.",OperatorComposing:"{fullname} is typing...",FirstMessageText:"",ExitChatButtonText:"Exit Chat",ExitChatQuestionText:"Are you sure?",ExitChatButtonConfirmText:"Yes",ExitChatButtonCancelText:"No",MessagePlaceholderText:"Your message...",MessageSendButtonText:"Send",ValidationEmailRequired:"Please enter your email address",ValidationEmailInvalid:"Please enter a valid email address",ValidationEmailMaxLength:"The email address may not exceed 85 characters",ValidationUsernameRequired:"Please enter your name",ValidationUsernameMaxLength:"The name may not exceed 45 characters",ValidationEnquiryRequired:"Please enter your enquiry",ValidationEnquiryMaxLength:"The enquiry may not exceed 1500 characters",ValidationMessageRequired:"Please enter your message",ValidationMessageMaxLength:"The message may not exceed 750 characters"},a.initView=function(){e.get().$promise.then(function(b){console.log(b),a.mailTemplates=b.rows})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet.view",{url:"/view",templateUrl:"app/channels/chat/website/view/snippet/view/view.html",controller:"ChatWebsiteViewSnippetViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewCtrl",["$scope","xAlert","$http","$location","$stateParams","$translate","WizardHandler","ChatApplication","ChatWebsite",function(a,b,c,d,e,f,g,h,i){a.initApplication=function(){a.forms={},a.application={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.deleteItem=function(a){return h["delete"]({id:a}).$promise.then(function(){b.show(f.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(f.instant("Something went wrong!"),"danger")})},a.initView=function(){return i.get({id:e.websiteId}).$promise.then(function(b){a.chatWebsite=b})["catch"](function(a){b.show(a.message,"danger")})},a.updateItem=function(){return i.update({id:a.chatWebsite.id},a.chatWebsite).$promise.then(function(){b.show(f.instant("MESSAGE_CHAT_WEBSITE_UPDATE_SUCCESS")+"!","success")})["catch"](function(){b.show(f.instant("MESSAGE_CHAT_WEBSITE_UPDATE_FAILURE"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view",{url:"/view/:websiteId",templateUrl:"app/channels/chat/website/view/view.html",controller:"ChatWebsiteViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites",{url:"/websites",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","ChatWebsite",function(a,b,c,d,e,f,g){a.$translate=d,a.forms={formSetting:void 0,formAppearance:void 0,formLabel:void 0,formFunctionality:void 0},a.next=function(){e.wizard().next()},a.exitValidation=function(a){return a},a.item={},a.createItem=function(){return g.save(a.item).$promise.then(function(){f.show(d.instant("MESSAGE_CHAT_WEBSITE_CREATE_SUCCESS"),"success"),c.path("/channels/chat/websites/list")})["catch"](function(a){f.show(d.instant("MESSAGE_CHAT_WEBSITE_CREATE_FAILURE"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/wizard/wizard.html",controller:"ChatWebsiteWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountListCtrl",["$scope","$http","xAlert","$translate","socket","Modal","$rootScope","$log","stResource",function(a,b,c,d,e,f,g,h,i){a.conf={faxAccountsByPage:{name:"10",value:10}},a.faxAccountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.fax_accounts={checked:[]},a.check=function(b,c){c?a.fax_accounts.checked=angular.copy(_.map(a.displayedFaxAccounts,"id")):a.fax_accounts.checked=[]},a.initList=function(b){e.unsyncUpdates("fax_account"),b.url="/api/fax/accounts",i.getPage(b).then(function(c){a.displayedFaxAccounts=c.rows,b.pagination.numberOfPages=c.total_pages,g.updateTableConfig(a.faxAccountsByPage,a.displayedFaxAccounts.length),g.updateTableConfig(a.conf.faxAccountsByPage,a.displayedFaxAccounts.length)}),e.socket.on("fax_account:save",function(){a.initList(b)}),e.socket.on("fax_account:remove",function(c){a.fax_accounts.checked=_.without(a.fax_accounts.checked,c.id),a.initList(b)})},a.deleteItem=f.confirm["delete"](function(a){b["delete"]("api/fax/accounts/"+a).success(function(){c.show(d.instant("MESSAGE_FAX_ACCOUNT_DELETE_SUCCESS"),"success")}).error(function(){c.show(d.instant("MESSAGE_FAX_ACCOUNT_DELETE_FAILURE"),"danger")})}),a.deleteItems=f.confirm["delete"](function(){b["delete"]("/api/fax/accounts",{params:{id:a.fax_accounts.checked}}).success(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){c.show(d.instant(a.message),"danger")})}),a.getFaxAccounts=function(b){return _.map(a.faxAccountsByPage,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.$on("$destroy",function(){e.unsyncUpdates("fax_account")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.list",{url:"/list",templateUrl:"app/channels/fax/account/list/list.html",controller:"FaxAccountListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.forms={},a.sortableOptions={stop:function(){b.post("api/fax/accounts/"+c.id+"/applications",{applications:_.map(a.faxApplications,"id")}).success(function(b){a.faxApplications=b}).error(function(a){console.error(a)})},"ui-floating":!0},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.initApplication=function(){a.forms={},a.application={}},a.deleteItem=i.confirm["delete"](function(a){b["delete"]("api/fax/applications/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.getAppdata=function(b,c){switch(b){case"agent":return a.agents?_.find(a.agents,{id:c}).name:c;case"queue":return a.faxQueues?_.find(a.faxQueues,{id:c}).name:c}return"UNKNOWN"},a.createItem=function(){switch(a.application.appdata=a.application.appdata.id,a.application.app){case"agent":a.application.UserId=parseInt(a.application.appdata,10);break;case"queue":a.application.FaxQueueId=parseInt(a.application.appdata,10)}a.application.FaxAccountId=c.id,b.post("api/fax/applications",a.application).success(function(){e.path("/channels/fax/accounts/view/"+c.id+"/routes")}).error(function(){h.show("Something went wrong!","danger")})},a.$watch("application.app",function(c){if(c){var d;switch(c){case"agent":d="api/agents";break;case"queue":d="api/fax/queues"}b.get(d).success(function(b){a.items=b.rows})}},!0),a.initView=function(){b.get("/api/trunks").success(function(b){a.trunks=b.rows}).error(function(a){console.log(a)}),b.get("/api/fax/accounts/"+c.id).success(function(b){a.account=b}).error(function(){})},a.getAgents=function(){b.get("api/fax/agents").success(function(b){a.agents=b})},a.getFaxApplications=function(){b.get("/api/fax/applications",{params:{FaxAccountId:c.id}}).success(function(b){a.faxApplications=b,g.socket.on("fax_application:remove",function(b){_.remove(a.faxApplications,{id:b.id})})}),b.get("/api/agents").success(function(b){a.agents=b.rows}),b.get("/api/fax/queues").success(function(b){a.faxQueues=b.rows})},a.updateItemFaxAccount=function(){b.put("/api/fax/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_FAX_ACCOUNT_UPDATE_SUCCESS")+".","success")}).error(function(){h.show(d.instant("MESSAGE_FAX_ACCOUNT_UPDATE_FAILURE")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view",{url:"/view/:id",templateUrl:"app/channels/fax/account/view/view.html",controller:"FaxAccountViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.channels.fax.accounts.view.settings",{url:"/settings",templateUrl:"app/channels/fax/account/view/view.settings.html",authenticate:!0}).state("main.channels.fax.accounts.view.routes",{url:"/routes",templateUrl:"app/channels/fax/account/view/view.routes.html",authenticate:!0}).state("main.channels.fax.accounts.view.applications",{url:"/applications",templateUrl:"app/channels/fax/account/view/view.applications.html",authenticate:!0})}]),angular.module("xCallyShuttleApp").controller("FaxAccountWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.ecm=!1,a.item.minrate="9600",a.item.maxrate="33600",b.get("/api/trunks").success(function(b){a.trunks=b.rows}).error(function(a){console.error(a)})},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("api/fax/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_FAX_ACCOUNT_CREATE_SUCCESS")+".","success"),c.path("/channels/fax/accounts/list")}).error(function(){e.show(d.instant("MESSAGE_FAX_ACCOUNT_CREATE_FAILURE")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/fax/account/wizard/wizard.html",controller:"FaxAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax",{url:"/fax",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("FaxInboxComposeCtrl",["$scope","$http","FileUploader","$location","Auth","xAlert","$cookieStore","$translate",function(a,b,c,d,e,f,g,h){a.forms={},a.form={to:[],sto:[]},b.get("api/fax/accounts").success(function(b){a.faxAccounts=b.rows}),a.isNewMessageFromEmpty=!0;var i=a.uploader=new c({url:"api/fax/messages",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+g.get("token")}});i.filters.push({name:"pdfFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|pdf|".indexOf(b)}}),i.onBeforeUploadItem=function(b){b.formData.push({accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,userId:e.getCurrentUser().id,html:a.form.html?a.form.html:""})},i.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d)},i.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d)},i.onCompleteAll=function(){i.clearQueue(),f.show(h.instant("MESSAGE_WELL_DONE"),"success"),d.path("/channels/fax/inbox/incoming")},i.onWhenAddingFileFailed=function(){f.show(h.instant("MESSAGE_WRONG_FORMAT"),"danger")},a.sendFax=function(){return a.form.sto.length?void(i.queue.length?i.uploadAll():b.post("api/fax/messages",{accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,userId:e.getCurrentUser().id,html:a.form.html,onlyText:!0}).success(function(){f.show(h.instant("MESSAGE_WELL_DONE"),"success"),d.path("/channels/fax/inbox/incoming")}).error(function(a){f.show(h.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),console.error(a)})):(a.forms.compose.to.$valid=!1,void(a.forms.compose.to.$invalid=!0))},a.cancel=function(){a.form.sto=[],delete a.form.from}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.compose",{url:"/compose",templateUrl:"app/channels/fax/inbox/room/room.html",controller:"FaxInboxComposeCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxInboxCtrl",["$scope","$http","$location","$translate","$timeout","$notification","Auth","socket","$interval",function(a,b,c,d,e,f,g,h,i){a.go=function(a,d,e){e?b.put("/api/fax/rooms/"+d,{status:e}).success(function(){c.path(a)}).error(function(a){console.error(a)}):c.path(a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox",{url:"/inbox",templateUrl:"app/channels/fax/inbox/inbox.html",controller:"FaxInboxCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/inbox.css","assets/css/todo.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxIncomingCtrl",["$scope","$http","$location","socket","Auth","xAlert",function(a,b,c,d,e,f){a.$location=c,a.getRooms=function(){e.isAdmin()?b.get("api/fax/rooms").success(function(b){a.faxRooms=b,d.syncUpdates("fax_room",a.faxRooms)}).error(function(a){console.error(a),f.show($translate.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")}):b.get("api/fax/rooms/agent/"+e.getCurrentUser().id).success(function(b){a.faxRooms=b,d.socket.on("fax_room:update",function(b){b.UserId===e.getCurrentUser().id&&a.faxRooms.push(b)})}).error(function(a){f.show($translate.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.incoming",{url:"/incoming",templateUrl:"app/channels/fax/inbox/incoming/incoming.html",controller:"FaxInboxIncomingCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxInboxRoomCtrl",["$scope","$http","$stateParams","$location","FileUploader","socket","Auth","xAlert","$translate","$cookieStore",function(a,b,c,d,e,f,g,h,i,j){function k(){a.lastMessage=_.reject(a.faxRoom.FaxMessages,function(a){return"RECEIVED"!==a.status}),a.lastMessage=_.sortByOrder(a.lastMessage,["id"],["desc"])[0],a.lastMessage&&(console.log(a.faxRoom),a.form.from=a.faxRoom.FaxAccount,a.form.to=[a.lastMessage.From.phone],a.form.sto=[a.lastMessage.From.phone])}var l=a.uploader=new e({url:"api/fax/messages",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+j.get("token")}});l.filters.push({name:"pdfFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|pdf|".indexOf(b)}}),l.onBeforeUploadItem=function(b){console.log(a.form.from.id,a.form.sto[0],a.isNewMessageFromEmpty,c.id,g.getCurrentUser().id),b.formData.push({accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,roomId:c.id,userId:g.getCurrentUser().id,html:a.form.html}),console.log(b)},l.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d)},l.onErrorItem=function(a,b,c,d){console.info("onErrorItem",b,c,d)},l.onCompleteAll=function(){l.clearQueue(),h.show(i.instant("MESSAGE_WELL_DONE"),"success")},l.onWhenAddingFileFailed=function(){h.show(i.instant("MESSAGE_WRONG_FORMAT"),"danger")},a.initRoomView=function(){a.isNewMessageFromEmpty=!0,a.Auth=g,a.forms={},a.form={to:[],sto:[]},b.get("api/agents").success(function(b){a.agents=b}),b.get("api/fax/accounts").success(function(b){a.faxAccounts=b.rows}),c.id&&b.get("/api/fax/rooms/"+c.id).success(function(b){a.faxRoom=b,a.isNewMessageFromEmpty=!1,f.syncUpdates("fax_message",[],function(b,c){"created"===b&&c.FaxRoomId===a.faxRoom.id&&(a.faxRoom.FaxMessages.push(c),k())}),k()}).error(function(a){console.error(a),h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.sendFax=function(){return a.form.sto.length?void(l.queue.length?l.uploadAll():b.post("api/fax/messages",{accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,userId:g.getCurrentUser().id,html:a.form.html,onlyText:!0}).success(function(){h.show(i.instant("MESSAGE_WELL_DONE"),"success"),console.log("Fax Message sent")}).error(function(a){h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),console.error(a)})):(a.forms.compose.to.$valid=!1,void(a.forms.compose.to.$invalid=!0))},a.assignAgent=function(a){b.put("/api/fax/rooms/"+c.id,{UserId:a}).success(function(){h.show(i.instant("MESSAGE_WELL_DONE"),"danger")}).error(function(){h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateStatus=function(d){b.put("/api/fax/rooms/"+c.id,{status:d}).success(function(b){a.faxRoom.status=b.status,h.show(i.instant("MESSAGE_WELL_DONE"),"danger")}).error(function(a){console.error(a),h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){a.form.sto=[],delete a.form.from,l.clearQueue()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.room",{url:"/room/:id",templateUrl:"app/channels/fax/inbox/room/room.html",controller:"FaxInboxRoomCtrl"})}]),angular.module("xCallyShuttleApp").factory("FaxQueue",["$resource",function(a){return a("/api/fax/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCtrl",["$scope","FaxQueue","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"fax_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/fax/queues/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/fax/queue/list/list.create.modal.html",controller:"FaxQueueListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","FaxQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.list",{url:"/list",templateUrl:"app/channels/fax/queue/list/list.html",controller:"FaxQueueListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","FaxQueue","Team",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return f.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){e.show(a.message,"danger")})},a.updateFaxQueue=function(){return f.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")})},a.getTeams=function(){return g.get().$promise.then(function(b){return a.teams=b.rows,f.query({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasFaxQueue.penalty}}),h)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.view",{url:"/view/:id",templateUrl:"app/channels/fax/queue/view/view.html",controller:"FaxQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.fax.queues.view.settings",{url:"/settings",templateUrl:"app/channels/fax/queue/view/view.settings.html"}).state("main.channels.fax.queues.view.agents",{url:"/agents",templateUrl:"app/channels/fax/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","FaxQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.faxPause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_fax_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.FaxQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_fax_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.FaxQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.faxPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.FaxQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.faxQueues=b.rows,e.syncUpdates("fax_queue",a.faxQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.faxQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"faxPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><timer data-ng-if="row.entity.pause" start-time="grid.appScope.moment(row.entity.lastPauseAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span><span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.faxQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,
-enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_fax_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/queue.modal.add.html",controller:"FaxRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.faxQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.faxQueues,function(a){return _.includes(b.queues,a.id)}),channel:"fax",data1:e,data3:b.queues.join(","),data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"fax",data1:a,data3:b,data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/agent.modal.info.html",controller:"FaxRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/fax/realtime/view/agent/agent.html",controller:"FaxRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view",{url:"/view",templateUrl:"app/channels/fax/realtime/view/view.html",controller:"FaxRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailAccount",["$resource",function(a){return a("/api/mail/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MailAccountListCtrl",["$scope","gridOptions","MailAccount","$stateParams",function(a,b,c,d){a.initView=function(){var e={exporterCsvFilename:"mail_accounts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"MailServerIn.state",width:100,cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"row.entity.MailServerIn.state === 'CONNECTED' ? 'label-success' : 'label-danger'\">{{row.entity.MailServerIn.state}}</span></div>",displayName:"IMAP",enableSorting:!1,enableFiltering:!1},{name:"MailServerOut.state",width:110,cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"row.entity.MailServerOut.state === 'CONNECTED' ? 'label-success' : 'label-danger'\">{{row.entity.MailServerOut.state}}</span></div>",displayName:"SMTP",enableSorting:!1,enableFiltering:!1},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,e,a,{accountId:d.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.list",{url:"/list",templateUrl:"app/channels/mail/account/list/list.html",controller:"MailAccountListCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailServerIn",["$resource",function(a){return a("/api/mail/servers/in/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailServerOut",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller",{id:"@id"},{update:{method:"PUT"},test:{method:"GET"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionListCtrl",["$scope","gridOptions","MailAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"mail_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.MailQueue ? row.entity.MailQueue.name : row.entity.User.name}}</span></div>"},{name:"timeout",cellClass:"text-center"},{name:"interval",cellClass:"text-center"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.MailAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/mail/account/view/action/list/list.html",controller:"MailAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","MailQueue",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],b.get("/api/mail/applications/"+c.actionId).success(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1]),a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})}).error(function(a){console.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){var e=["*","*","*","*"],g={app:a.application.app,timeout:a.application.timeout,MailAccountId:c.id};switch(a.application.app){case"agent":g.UserId=a.application.UserId;break;case"queue":g.MailQueueId=a.application.MailQueueId}switch(a.application.intType){case"always":g.interval=e.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(e[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?e[1]="*":e[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?e[2]="*":e[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?e[3]="*":e[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",g.interval=e.join(","),delete a.application.IntervalId;break;case"list":g.IntervalId=a.application.IntervalId}b.put("/api/mail/applications/"+c.actionId,g).success(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/mail/account/view/action/view/view.html",controller:"MailAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionWizardCtrl",["$scope","$http","Agent","MailQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){var c=["*","*","*","*"],d={app:a.application.app,timeout:a.application.timeout,MailAccountId:f.accountId};switch(a.application.app){case"agent":d.UserId=a.application.UserId;break;case"queue":d.MailQueueId=a.application.MailQueueId}switch(a.application.intType){case"always":d.interval=c.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(c[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?c[1]="*":c[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?c[2]="*":c[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?c[3]="*":c[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",d.interval=c.join(","),delete a.application.IntervalId;break;case"list":d.IntervalId=a.application.IntervalId}b.post("/api/mail/applications",d).success(function(){h.path("/channels/mail/accounts/view/"+f.accountId+"/actions/list")}).error(function(a){console.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/view/action/wizard/wizard.html",controller:"MailAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","MailAccount","MailMessage","MailServerIn","MailServerOut","usSpinnerService",function(a,b,c,d,e,f,g,h,i,j,k){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){return g.get({id:c.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){f.show(a.message,"danger")})},a.updateItemMailAccount=function(){return g.update({id:c.accountId},{name:a.account.name,description:a.account.description,address:a.account.address,fidelity:a.account.fidelity,timeout:a.account.timeout}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.updateItemMailServerIn=function(){return i.update({id:a.account.MailServerIn.id},a.account.MailServerIn).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.updateItemMailServerOut=function(){return j.update({id:a.account.MailServerOut.id},a.account.MailServerOut).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.test=function(){return k.spin("spinner-grid"),j.test({id:a.account.MailServerOut.id,controller:"test"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),f.show(a.message||a.data.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/mail/account/view/view.html",controller:"MailAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.channels.mail.accounts.view.settings",{url:"/settings",templateUrl:"app/channels/mail/account/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","MailAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={MailServerIn:{port:993,ssl:!0,"delete":!1,protocol:"IMAP",filter:"UNSEEN",mailbox:"INBOX",keepalive:!0,authTimeout:5e3,connTimeout:1e4},MailServerOut:{port:465,ssl:!0}}},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/channels/mail/accounts/list")})["catch"](function(a){f.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/wizard/wizard.html",controller:"MailAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox",{url:"/inbox",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MailInboxListCtrl",["$scope","$rootScope","MailRoom","gridOptions","uiGridConstants","Auth",function(a,b,c,d,e,f){a.initView=function(){var g={exporterCsvFilename:"mail_rooms.csv",enableRowHeaderSelection:f.isAdmin(),columnDefs:[{name:"id",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!1},{name:"subject"},{name:"from",cellClass:"text-center"},{name:"MailAccount.name",displayName:"Account",cellClass:"text-center",enableSorting:!1,enableFiltering:!1},{name:"users",displayName:"APPLICATION_AGENTS",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{(row.entity.Users | map:'fullname').join(', ')}}</div>",enableSorting:!1,enableFiltering:!1},{name:"status",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"{'label-info': row.entity.status === 'OPEN', 'label-danger': row.entity.status === 'NEW','label-success': row.entity.status === 'CLOSED'}\">{{row.entity.status}}</span></div>",filter:{type:e.filter.SELECT,selectOptions:[{value:"NEW",label:"NEW"},{value:"OPEN",label:"OPEN"},{value:"CLOSED",label:"CLOSED"}]},width:100},{name:"createdAt",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><time is="relative-time" datetime="{{row.entity.createdAt}}">April 1, 2014</time></div>',enableSorting:!1,enableFiltering:!1,width:125},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/inbox/view/{{row.entity.id}}/room",name:"open"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.id, row.entity.id)",hide:!f.isAdmin()}]}]};a.gridOptions=d.gridOptions(c,g,a),b.$on("mailMessageEvent",function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.list",{url:"/list",templateUrl:"app/channels/mail/inbox/list/list.html",controller:"MailInboxListCtrl"})}]),angular.module("xCallyShuttleApp").directive("mail",function(){return{templateUrl:"app/channels/mail/inbox/mail/mail.html",restrict:"EA",scope:{mailMessage:"=message"}}}),angular.module("xCallyShuttleApp").directive("note",function(){return{templateUrl:"app/channels/mail/inbox/note/note.html",restrict:"EA",scope:{mailMessage:"=message"}}}),angular.module("xCallyShuttleApp").controller("MailInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","MailRoom","xAlert",function(a,b,c,d,e,f,g){a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:d.id,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:d.id,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewCtrl",["$scope","$location","$cookieStore","$stateParams","$translate","$uibModal","CannedAnswer","socket","Agent","MailAccount","MailRoom","MailAttachment","MailMessage","FileUploader","Auth","xAlert","usSpinnerService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r,s=[];a.onSelectAnswer=function(b){a.form.html+=b,a.selectedAnswer=""},a.getAnswers=function(a){return g.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},a.initRoom=function(){a.Auth=o,a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:781,scrollInertia:0},a.forms={},a.selectedAnswer="",a.form={disabled:!1,from:[],to:[],sto:[],cc:[],scc:[],html:""},h.socket.on("mail_message:save",function(b){return a.mailRoom&&b.MailRoomId===d.id?m.get({id:b.id}).$promise.then(function(b){a.mailRoom.MailMessages.unshift(b)})["catch"](function(a){console.error(a)}):void 0}),r=a.uploader=new n({url:"api/mail/attachments",autoUpload:!0,withCredentials:!0,headers:{Authorization:"Bearer "+c.get("token")}}),r.removeFromQueue=function(a){var b=this;return l["delete"]({id:a.basename}).$promise.then(function(){var c=b.getIndexOfItem(a),d=b.queue[c];d.isUploading&&d.cancel(),b.queue.splice(c,1),d._destroy(),b.progress=b._getTotalProgress(),s=_.reject(s,{basename:a.basename})})["catch"](function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},r.onErrorItem=function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},r.onSuccessItem=function(a,b){var c={size:b.size,path:b.path,name:b.name,basename:b.basename,type:b.type};a=_.merge(a,c),s.push(c)},i.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)}),j.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)}),d.id&&k.get({id:d.id}).$promise.then(function(b){a.mailRoom=b,a.form.from.push(b.MailAccount.address);var c=_.last(a.mailRoom.MailMessages);a.form.to=a.form.cc=a.form.bcc=_.union(c.from,c.to,c.cc,c.bcc),a.form.sto=_.remove(a.form.to,function(a){return a!==b.MailAccount.address}),"NEW"===a.mailRoom.status&&k.update({id:d.id},{status:"OPEN"})})["catch"](function(a){console.error(a)})},a.cancel=function(){a.form.disabled=!1,a.form.from=[],a.form.to=[],a.form.sto=[],a.form.cc=[],a.form.scc=[],delete a.form.subject,delete a.form.html},a.updateStatus=function(a){return k.update({id:d.id},{status:a}).$promise.then(function(){p.show(e.instant("MESSAGE_STATUS_UPDATE_SUCCESS"),"success"),b.path("/channels/mail/inbox/list")})["catch"](function(a){p.show(a.message,"danger")})},a.loadAgents=function(){f.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.agents.modal.html",controller:"MailInboxViewModalAgentCtrl"})},a.loadTemplate=function(){f.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.templates.modal.html",controller:"MailInboxViewModalTemplateCtrl"}).result.then(function(b){a.form.subject=b.template.subject,a.form.html=b.template.html})},a.loadNote=function(){f.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.notes.modal.html",controller:"MailInboxViewModalNoteCtrl"})},a.sendMail=function(){var c={},f={subject:a.mailRoom?a.mailRoom.subject:a.form.subject,from:a.form.from,to:a.form.sto||[],cc:a.form.scc||[],html:a.form.html||null,text:a.form.text||null,inReplyTo:c.messageId||null,status:"SENDING",MailAttachments:s};return q.spin("spinner-grid"),a.form.disabled=!0,a.mailRoom?(c=_.last(a.mailRoom.MailMessages,{status:"RECEIVED"}),f.inReplyTo=c.messageId||null,k.save({id:d.id,controller:"messages"},f).$promise.then(function(){p.show(e.instant("MESSAGE_WELL_DONE"),"success"),b.path("/channels/mail/inbox/list")})["catch"](function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){q.stop("spinner-grid"),a.form.disabled=!1})):m.save(f).$promise.then(function(){p.show(e.instant("MESSAGE_MAIL_MESSAGE_SEND_SUCCESS"),"success"),b.path("/channels/mail/inbox/list")})["catch"](function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){q.stop("spinner-grid"),a.form.disabled=!1})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view",{url:"/view",templateUrl:"app/channels/mail/inbox/view/view.html"}).state("main.channels.mail.inbox.view.compose",{url:"/compose",templateUrl:"app/channels/mail/inbox/view/view.room.html",controller:"MailInboxViewCtrl"}).state("main.channels.mail.inbox.view.room",{url:"/:id/room",templateUrl:"app/channels/mail/inbox/view/view.room.html",controller:"MailInboxViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalNoteCtrl",["$scope","$uibModalInstance","$stateParams","$translate","MailRoom","xAlert",function(a,b,c,d,e,f){a.initModal=function(){a.item={}},a.ok=function(){return e.save({id:c.id,controller:"messages"},{text:a.item.text,status:"NOTE"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close()})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalTemplateCtrl",["$scope","$uibModalInstance","Template",function(a,b,c){a.initModal=function(){return a.item={},c.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail",{url:"/mail",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("MailAttachment",["$resource",function(a){return a("/api/mail/attachments/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").factory("MailMessage",["$resource",function(a){return a("/api/mail/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailReport",["$resource",function(a){return a("/api/report/mails/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailRoom",["$resource",function(a){return a("/api/mail/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MailQueueListCtrl",["$scope","MailQueue","gridOptions","$uibModal","xAlert",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"voice_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/queues/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/mail/queue/list/list.create.modal.html",controller:"MailQueueListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("MailQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","MailQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.list",{url:"/list",templateUrl:"app/channels/mail/queue/list/list.html",controller:"MailQueueListCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailQueue",["$resource",function(a){return a("/api/mail/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/scripts/components-dropdowns.js"]})}]},data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MailQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","Team","MailQueue",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return g.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return g["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return g.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateMailQueue=function(){return g.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})},a.getTeams=function(){return f.get().$promise.then(function(b){return a.teams=b.rows,g.query({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasMailQueue.penalty}}),h)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.view",{url:"/view/:id",templateUrl:"app/channels/mail/queue/view/view.html",controller:"MailQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.mail.queues.view.settings",{url:"/settings",templateUrl:"app/channels/mail/queue/view/view.settings.html"}).state("main.channels.mail.queues.view.agents",{url:"/agents",templateUrl:"app/channels/mail/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]
-})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","MailQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.mailPause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_mail_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.MailQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_mail_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.MailQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.mailPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.MailQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.mailQueues=b.rows,e.syncUpdates("mail_queue",a.mailQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.mailQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"mailPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><timer data-ng-if="row.entity.pause" start-time="grid.appScope.moment(row.entity.lastPauseAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span><span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.mailQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_mail_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/queue.modal.add.html",controller:"MailRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.mailQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.mailQueues,function(a){return _.includes(b.queues,a.id)}),channel:"mail",data1:e,data3:b.queues.join(","),data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"mail",data1:a,data3:b,data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/agent.modal.info.html",controller:"MailRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/mail/realtime/view/agent/agent.html",controller:"MailRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewQueueCtrl",["$scope","$http","socket","MailQueue","Agent",function(a,b,c,d,e){a.initQueues=function(){a.gridOptions={enableSorting:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,showTreeExpandNoChildren:!1,columnDefs:[{name:"queueName",displayName:"Queue"},{name:"fullname",displayName:"Agent",cellClass:"text-center"},{name:"online",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><i data-ng-if="row.entity.online != null" class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i></div>'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-if=\"row.entity.mailPause != null\" data-ng-class=\"row.entity.mailPause ? 'icon-control-pause font-red' : 'icon-control-play font-green'\"></i></div>"},{name:"pauseType",cellClass:"text-center",cellTemplate:'<span data-ng-if="row.entity.mailPause">{{row.entity.pauseType}}</span>'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><time data-ng-if="row.entity.agentName" is="relative-time" datetime="{{row.entity.lastLoginAt}}">April 1, 2014</time></div>'}],onRegisterApi:function(b){a.gridApi=b,a.gridApi.treeBase.on.rowExpanded(a,function(b){var c=_.findIndex(a.gridOptions.data,{$$hashKey:b.entity.$$hashKey});b.entity.Users&&b.entity.Users.forEach(function(b){_.find(a.gridOptions.data,{name:b.name})||a.gridOptions.data.splice(c+1,0,b)})})}},d.get(function(b){a.gridOptions.data=[],b.rows.forEach(function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b),b.Users&&b.Users.forEach(function(b){b.agentName=b.name,a.gridOptions.data.push(b)})}),c.socket.on("agent:save",function(b){var c=_.filter(a.gridOptions.data,{agentName:b.name});c.forEach(function(a){a.online=b.online,a.lastLoginAt=b.lastLoginAt})}),c.socket.on("mail_queue:save",function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b)}),c.socket.on("mail_queue:remove",function(b){_.remov(a.gridOptions.data,{queueName:b.name})}),c.socket.on("user_has_mail_queue:save",function(b){var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.MailQueueId});e.get({id:b.UserId}).$promise.then(function(b){a.gridOptions.data.splice(c+1,0,{id:b.id,name:b.name,fullname:b.fullname,agentName:b.name,online:b.online,lastLoginAt:b.lastLoginAt})})["catch"](function(a){console.error(a)})}),c.socket.on("user_has_mail_queue:remove",function(b){for(var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.MailQueueId}),d=c+1;d<a.gridOptions.data.length;d++)a.gridOptions.data[d].id==b.UserId&&a.gridOptions.data.splice(d,1)})},function(a){console.error(a)})},a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){c.unsyncUpdates("report_mail:save"),c.unsyncUpdates("report_mail:update")}),a.initAgents=function(){b.get("/api/report/mails").success(function(b){a.agents=b,c.socket.on("report_mail:save",function(b){var c=_.find(a.agents,{id:b.id});c||a.agents.unshift(b)}),c.socket.on("report_mail:update",function(b){var c=_.find(a.agents,{id:b.id}),d=a.agents.indexOf(c);c&&_.merge(a.agents[d],b)})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.queues",{url:"/queues",templateUrl:"app/channels/mail/realtime/view/queue/queue.html",controller:"MailRealtimeViewQueueCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewSessionCtrl",["$scope","$http","socket","uiGridConstants",function(a,b,c,d){a.initSessions=function(){a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"uniqueid",displayName:"",cellClass:"text-center",width:150,enableSorting:!1,enableFiltering:!0},{name:"application",displayName:"APPLICATION_APP",headerCellFilter:"translate",cellClass:"text-center"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center"},{name:"agentname",cellClass:"text-center"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"joinAt",displayName:"joinAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.joinAt" is="relative-time" datetime="{{row.entity.joinAt}}">April 1, 2014</time>',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",displayName:"leaveAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.leaveAt" is="relative-time" datetime="{{row.entity.leaveAt}}">April 1, 2014</time>'},{name:"unmanagedAt",displayName:"unmanangedAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.unmanagedAt" is="relative-time" datetime="{{row.entity.unmanagedAt}}">April 1, 2014</time>'}],data:[]},b.get("/api/report/mail/sessions").success(function(b){a.gridOptions.data=b.rows,c.socket.on("report_mail_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id}),d=a.gridOptions.data.indexOf(c);c?_.merge(a.gridOptions.data[d],b):a.gridOptions.data.unshift(b)})}).error(function(a){console.error(a)})},a.$on("$destroy",function(){c.unsyncUpdates("report_mail:save"),c.unsyncUpdates("report_mail:update")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.sessions",{url:"/sessions",templateUrl:"app/channels/mail/realtime/view/session/session.html",controller:"MailRealtimeViewSessionCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view",{url:"/view",templateUrl:"app/channels/mail/realtime/view/view.html",controller:"MailRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportCall",["$resource",function(a){return a("/api/report/calls/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChanSpy",["$resource",function(a){return a("/api/chanspy/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy",{url:"/chanspy",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCtrl",["$scope","$uibModal","ChanSpy","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"chanspy.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/channels/voice/chanspy/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/channels/voice/chanspy/list/list.create.modal.html",controller:"ChanSpyListCreateCtrl"});c.result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCreateCtrl",["$scope","$translate","$uibModalInstance","ChanSpy","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.save=function(){return a.item.options=a.item.options.join(""),d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.list",{url:"/list",templateUrl:"app/channels/voice/chanspy/list/list.html",controller:"ChanSpyListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChanSpyViewCtrl",["$scope","$translate","$stateParams","xAlert","ChanSpy",function(a,b,c,d,e){a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.getChanSpy=function(){return e.get({id:c.id}).$promise.then(function(b){b.options=b.options.split(""),a.chanspy=b})["catch"](function(a){d.show(a.data.message,"danger")})},a.updateChanSpy=function(){var f=angular.copy(a.chanspy);return f.options=f.options.join(""),e.update({id:c.id},f).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.view",{url:"/view/:id",templateUrl:"app/channels/voice/chanspy/view/view.html",controller:"ChanSpyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.chanspy.view.settings",{url:"/settings",templateUrl:"app/channels/voice/chanspy/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceContext",["$resource",function(a){return a("/api/voice/contexts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts",{url:"/contexts",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceContextListCtrl",["$scope","VoiceContext","gridOptions","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:170,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/channels/voice/contexts/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var c=d.open({animation:!0,templateUrl:"app/channels/voice/context/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});c.result.then(function(c){return b.save(c).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.show(a.data.message,"danger")})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.list",{url:"/list",templateUrl:"app/channels/voice/context/list/list.html",controller:"VoiceContextListCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceContextViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.getContext=function(){b.get("/api/voice/contexts/"+e.id).success(function(b){a.context=b}).error(function(a){console.error(a),f.path("/voice/contexts/list")})},a.updateVoiceContext=function(){var f=angular.copy(a.context);b.put("/api/voice/contexts/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.context=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.view",{url:"/view/:id",templateUrl:"app/channels/voice/context/view/view.html",controller:"VoiceContextViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.contexts.view.settings",{url:"/settings",templateUrl:"app/channels/voice/context/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("VoiceMohListCtrl",["$scope","gridOptions","VoiceMoh","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_mohs.csv",columnDefs:[{name:"name"},{name:"directory"},{name:"sort"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/voice/mohs/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/voice/moh/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});b.result.then(function(b){return c.save(b).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.list",{url:"/list",templateUrl:"app/channels/voice/moh/list/list.html",controller:"VoiceMohListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceMoh",["$resource",function(a){return a("/api/voice/musiconholds/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs",{url:"/mohs",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceMohViewCtrl",["$scope","$http","xAlert","$translate","VoiceMoh","$stateParams","socket","Modal","$sce","$location","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.$translate=d,a.audioSources={},a.sortOptions=[{value:"random",name:"APPLICATION_RANDOM"},{value:"alpha",name:"APPLICATION_ALPHABETICAL"}],a.getMoh=function(){return e.get({id:f.id}).$promise.then(function(b){delete b.stamp,a.moh=b})["catch"](function(a){c.show(a.message,"danger")})},a.updateVoiceMoh=function(){return console.log("update"),e.update({id:f.id},a.moh).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.show(a.message,"danger")})},a.addMohs=function(){return e.save({id:f.id,controller:"files"},a.item).$promise.then(function(){j.path("/channels/voice/mohs/view/"+f.id+"/audios")})["catch"](function(a){c.show(a.message,"danger")})},a.getAudioFiles=function(){return e.get({id:f.id,controller:"files"}).$promise.then(function(b){a.audioFiles=b.files,a.mohPath=b.path,a.audioFiles.forEach(function(a){l(a)})})["catch"](function(a){c.show(a.message,"danger")})},a.getSecureSrc=function(a){return i.trustAsResourceUrl(a)},a.getSounds=function(){return a.item={sounds:[]},k.get().$promise.then(function(b){a.soundList=b.rows})["catch"](function(a){c.show(a.message,"danger")})};var l=function(c){b.get("/api/voice/musiconholds/stream",{params:{path:encodeURI(a.mohPath+"/"+c)}}).success(function(b){a.audioSources[c]="data:audio/ogg;base64,"+b}).error(function(a){console.error(a)})};a.deleteItem=h.confirm["delete"](function(e){b["delete"]("/api/voice/musiconholds/"+f.id+"/files",{params:{filename:e}}).success(function(){_.remove(a.audioFiles,function(a){return a===e}),c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){c.show(a.message,"danger")})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.view",{url:"/view/:id",templateUrl:"app/channels/voice/moh/view/view.html",controller:"VoiceMohViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.mohs.view.settings",{url:"/settings",templateUrl:"app/channels/voice/moh/view/view.settings.html"}).state("main.channels.voice.mohs.view.audios",{url:"/audios",templateUrl:"app/channels/voice/moh/view/view.audios.html",cache:!1}).state("main.channels.voice.mohs.view.add",{url:"/add",templateUrl:"app/channels/voice/moh/view/view.addFiles.html",cache:!1})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCtrl",["$scope","$rootScope","VoiceQueue","gridOptions","$uibModal",function(a,b,c,d,e){a.initView=function(){var b={exporterCsvFilename:"voice_queues.csv",primaryKey:"name",columnDefs:[{name:"name"},{name:"strategy"},{name:"description"},{name:"action",width:200,buttons:[{"class":"blue-hoki",href:"/channels/voice/queues/view/{{row.entity.name}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/voice/queues/view/{{row.entity.name}}/agents",name:"agents"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var b=e.open({animation:!0,templateUrl:"app/channels/voice/queue/list/list.create.modal.html",controller:"VoiceQueueListCreateCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","VoiceQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.list",{url:"/list",templateUrl:"app/channels/voice/queue/list/list.html",controller:"VoiceQueueListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("ReportQueue",["$resource",function(a){return a("/api/report/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","VoiceQueue","VoiceContext","Team",function(a,b,c,d,e,f,g,h,i,j){a.penalty=0,a.binaryChoices=[{name:"Yes",value:1},{name:"No",value:0}],a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.monitorFormats=[{name:"wav",value:"wav"},{name:"gsm",value:"gsm"},{name:"Inactive",value:""}],a.queueAnnounces=[{display_name:"Default",value:null},{display_name:"Disabled",value:""}];var k=function(){return{select:function(b){return h.save({id:a.queue.name,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return h["delete"]({id:a.queue.name,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){return h.get({id:e.id}).$promise.then(function(b){b.joinempty=""===b.joinempty?[]:b.joinempty.split(","),b.leavewhenempty=""===b.leavewhenempty?[]:b.leavewhenempty.split(","),b.periodic_announce=""===b.periodic_announce?[]:b.periodic_announce.split(","),b.penalty=0,a.queue=b})["catch"](function(a){g.path("/channels/voice/queues/list")})},a.updateVoiceQueue=function(){var b=angular.copy(a.queue);return b.joinempty=b.joinempty.join(","),b.leavewhenempty=b.leavewhenempty.join(","),b.periodic_announce=b.periodic_announce.join(","),b.context||(b.context=null),h.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(d.instant(a.data.message),"danger")})},a.getTeams=function(){return j.get().$promise.then(function(b){return a.teams=b.rows,h.query({id:e.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasVoiceQueue.penalty}}),k)})["catch"](function(a){console.error(a)})},a.getContexts=function(){return i.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){c.show(d.instant(data.message),"danger")})},a.getMohs=function(){b.get("/api/voice/musiconholds").success(function(b){a.voiceMohs=b.rows,f.syncUpdates("voice_musiconhold",a.voiceMohs);
-}).error(function(a){c.show(a.message,"danger")})},a.getSounds=function(){b.get("/api/sounds").success(function(b){a.queueAnnounces=a.queueAnnounces.concat(b),a.periodicAnnounces=angular.copy(b.rows),b.rows.unshift({display_name:"None",converted_path:null,value:""}),a.sounds=b.rows,f.syncUpdates("sound",a.sounds)}).error(function(a){console.error(a)})},a.returnAnnouncePath=function(a){return a.converted_path?a.converted_path+"/"+a.save_name:null===a.value?null:a.value}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.view",{url:"/view/:id",templateUrl:"app/channels/voice/queue/view/view.html",controller:"VoiceQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.queues.view.settings",{url:"/settings",templateUrl:"app/channels/voice/queue/view/view.settings.html"}).state("main.channels.voice.queues.view.agents",{url:"/agents",templateUrl:"app/channels/voice/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){return a("/api/voice/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","VoiceQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.voicePause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].status=b.status,a.gridOptions.data[d].statusAt=b.statusAt,a.gridOptions.data[d].queueStatus=b.queueStatus,a.gridOptions.data[d].queueStatusAt=b.queueStatusAt,a.gridOptions.data[d].lastQueue=b.lastQueue,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_voice_queue:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.UserId,queue:b.queue});if(!c&&b.logged){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,agent:b.membername,callstaken:b.callstaken?b.callstaken:0,online:d.online})}else c&&!b.logged?_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue}):c&&b.logged&&(c.callstaken=b.callstaken?b.callstaken:0)}),e.socket.on("user_has_voice_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.voicePause,pauseType:b.pauseType,status:b.status||"UNKNOWN",statusAt:b.statusAt,queueStatus:b.queueStatus||"READY",queueStatusAt:b.queueStatusAt,lastQueue:b.lastQueue,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.VoiceQueues.forEach(function(c){c.UserHasVoiceQueue.logged&&a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,agent:b.name,callstaken:c.UserHasVoiceQueue.callstaken?c.UserHasVoiceQueue.callstaken:0,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.voiceQueues=b.rows,e.syncUpdates("voice_queue",a.voiceQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.voiceQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{'APPLICATION_'+row.entity.status | translate}} <span data-ng-if=\"row.entity.statusAt && (row.entity.status === 'BUSY' || row.entity.status === 'ONHOLD' || row.entity.status === 'INUSE')\">(<timer start-time=\"grid.appScope.moment(row.entity.statusAt).unix()*1000\">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></span></div>",filter:{type:m.filter.SELECT,selectOptions:[{value:"UNKNOWN",label:d.instant("APPLICATION_UNKNOWN")},{value:"NOT_INUSE",label:d.instant("APPLICATION_NOT_INUSE")},{value:"INUSE",label:d.instant("APPLICATION_INUSE")},{value:"BUSY",label:d.instant("APPLICATION_BUSY")},{value:"INVALID",label:d.instant("APPLICATION_INVALID")},{value:"UNAVAILABLE",label:d.instant("APPLICATION_UNAVAILABLE")},{value:"RINGING",label:d.instant("APPLICATION_RINGING")},{value:"RINGINUSE",label:d.instant("APPLICATION_RINGINUSE")},{value:"ONHOLD",label:d.instant("APPLICATION_ONHOLD")}]}},{name:"queueStatus",width:400,displayName:"APPLICATION_QUEUE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><span>{{\'APPLICATION_\'+row.entity.queueStatus.toUpperCase() | translate}}</span><span data-ng-if="(row.entity.queueStatus!==\'complete\' && (row.entity.queueStatus!==\'paused\' || row.entity.pauseType === \'ACW\'))"> [{{row.entity.lastQueue}}]</span><span data-ng-if="row.entity.pause"> [{{row.entity.pauseType}}]</span><timer data-ng-if="row.entity.queueStatusAt && row.entity.queueStatus!==\'complete\'" start-time="grid.appScope.moment(row.entity.queueStatusAt).unix()*1000"> [{{hhours}}:{{mminutes}}:{{sseconds}}]</timer></span><span class="left-margin"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i></span><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"paused",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_CONNECT")},{value:"complete",label:d.instant("APPLICATION_COMPLETE")},{value:"called",label:d.instant("APPLICATION_CALLED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"callstaken",displayName:"APPLICATION_CALLS_TAKEN",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.callstaken !== null">{{row.entity.callstaken}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1,width:100},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queue" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queue)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.voiceQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_voice_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(d.instant(a.message||a.data.message||a.translatedMessage||a.data.translatedMessage),"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/queue.modal.add.html",controller:"VoiceRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.voiceQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(a){return i.save({name:"QueueAdd",agent:e,queues:a.queues,channel:"voice",data1:e,data3:a.queues.join(","),data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queue:b,channel:"voice",data1:a,data3:b,data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/agent.modal.info.html",controller:"VoiceRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/voice/realtime/view/agent/agent.html",controller:"VoiceRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentReportCtrl",["$scope","$http","socket",function(a,b,c){a.$on("$destroy",function(){c.unsyncUpdates("report_agent")}),a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.initReport=function(){a.agents=[],b.get("/api/report/agents").success(function(b){a.agents=b,c.syncUpdates("report_agent",a.agents)}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").filter("VoiceRealtimeViewAgentReportFilter",function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueReportCtrl",["$scope","$http","socket",function(a,b,c){a.$on("$destroy",function(){c.unsyncUpdates("report_queue")}),a.conf={queuesByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.queuesByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.initReport=function(){a.queues=[],b.get("/api/report/queues").success(function(b){console.log(b),a.queues=b,c.syncUpdates("report_queue",a.queues)}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").filter("VoiceRealtimeViewQueueReportFilter",function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueuePauseModalCtrl",["$scope","$uibModalInstance","items","data",function(a,b,c,d){a.items=c,a.data=d,console.log(d),a.selected={item:a.items[0],queue:_.isArray(d)?a.data[0].queue:a.data.queue,membername:_.isArray(d)?a.data[0].membername:a.data.membername,"interface":_.isArray(d)?a.data[0]["interface"]:a.data["interface"]},a.ok=function(c,e){var f;_.isArray(d)?(f=[],d.forEach(function(b){f.push({action:"QueuePause",queue:b.queue,membername:b.membername,"interface":b["interface"],paused:c,reason:a.selected.item})})):f={action:"QueuePause",queue:a.selected.queue,membername:a.selected.membername,"interface":a.selected["interface"],paused:c,reason:a.selected.item},b.close(f)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueCtrl",["$scope","$http","$log","$uibModal","$translate","socket","xAlert",function(a,b,c,d,e,f,g){a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){f.unsyncUpdates("user_has_voice_queue")}),a.groups=[],a.pauses=["pausa1","pausa2","pausa3"],a.pause=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/channels/voice/realtime/view/queue/pause.modal.html",controller:"VoiceRealtimeViewQueuePauseModalCtrl",resolve:{items:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){_.isArray(a)?a.forEach(function(a){b.post("/api/ami",a).then(function(a){console.log(a),g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.log(a),g.show(a.data.message,"danger")})}):b.post("/api/ami",a).then(function(a){console.log(a),g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.log(a),g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.add=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/channels/voice/realtime/view/queue/queue.modal.add.html",controller:"VoiceRealtimeViewQueueQueueModalCtrl",resolve:{pauses:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){console.log("action",a),b.post("/api/voice/user_has_queues",a).then(function(){a.login?b.post("/api/ami",a).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")}),console.log(a)},function(){c.info("Modal dismissed at: "+new Date)})},a.remove=function(a,f){var h=d.open({animation:!0,size:a,templateUrl:"app/channels/voice/realtime/view/queue/queue.modal.remove.html",controller:"VoiceRealtimeViewQueueQueueModalCtrl",resolve:{pauses:function(){return null},data:function(){return f}}});h.result.then(function(a){_.isArray(a)?a.forEach(function(a){b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})}):b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.initQueues=function(){b.get("/api/voice/user_has_queues").success(function(b){a.queues=b,a.groups=_.map(_.groupBy(a.queues,"queue"),function(a,b){return{queue:b,agents:a}}),console.log("ok"),f.socket.on("user_has_voice_queue:save",function(b){console.log("item",b);var c=_.find(a.groups,{queue:b.queue}),d=a.groups.indexOf(c);if(c){var e=_.find(c.agents,{membername:b.membername});e?_.merge(e,b):a.groups[d].agents.push(b)}else{var f={queue:b.queue,agents:[b]};a.groups.unshift(f)}}),f.socket.on("user_has_voice_queue:remove",function(b){var c=_.find(a.groups,{queue:b.queue});_.remove(c.agents,{membername:b.membername}),c.agents.length||_.remove(a.groups,{queue:b.queue})}),f.socket.on("report_agent:save",function(b){var c=_.find(a.groups,{queue:b.queue}),d=a.groups.indexOf(c);if(c){var e=_.find(c.agents,{membername:b.membername});e?_.merge(e,b):a.groups[d].agents.push(b)}else{var f={queue:b.queue,agents:[b]};a.groups.unshift(f)}})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueQueueModalCtrl",["$scope","$uibModalInstance","$http","pauses","data",function(a,b,c,d,e){a.initAdd=function(){a.data=e,a.pauses=d,a.selected={penalty:0,paused:!1,reason:a.pauses[0]},a.$watch("selected.agent",function(b){b&&(a.selected.membername=b.name,a.selected["interface"]="SIP/"+b.name,a.selected.UserId=b.id)}),c.get("/api/agents",{params:{page:0,per_page:500}}).success(function(b){a.agents=_.reject(b.rows,function(b){return _.find(a.data,{membername:b.name})?!0:!1}),a.selected.queue=a.data[0]?a.data[0].queue:null}).error(function(a){console.error(a)})},a.initRemove=function(){a.data=e,console.log(e),_.isArray(e)?a.selected={queue:a.data[0].queue,logout:!1}:a.selected={membername:a.data.membername,"interface":a.data["interface"],queue:a.data.queue,logout:!1,UserId:a.data.UserId}},a.okAdd=function(){var c={action:"QueueAdd",queue:a.selected.queue,membername:a.selected.membername,"interface":a.selected["interface"],penalty:a.selected.penalty,paused:a.selected.paused,UserId:a.selected.UserId};c.paused&&(c.reason=a.selected.reason),b.close(c)},a.okRemove=function(){var c;_.isArray(a.data)?(c=[],a.data.forEach(function(b){c.push({action:"QueueRemove",queue:b.queue,"interface":b["interface"],logout:a.selected.logout,UserId:b.UserId})})):c={action:"QueueRemove",queue:a.selected.queue,logout:a.selected.logout,"interface":a.selected["interface"],UserId:a.selected.UserId},b.close(c)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewCtrl",["$scope",function(a){a.agents=[{name:"View1",link:"main.channels.voice.realtime.view.agents"},{name:"View2",link:"main.channels.voice.realtime.view.areports"}],a.queues=[{name:"View1",link:"main.channels.voice.realtime.view.queues"},{name:"View2",link:"main.channels.voice.realtime.view.qreports"}]}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view",{url:"/view",templateUrl:"app/channels/voice/realtime/view/view.html",controller:"VoiceRealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRecordingListCtrl",["$scope","$translate","$sce","Recording","gridOptions","xAlert","uiGridConstants",function(a,b,c,d,e,f,g){a.Recording=d;a.updateRating=function(a,c){d.patch({id:a,rating:c}).$promise.then(function(){f.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.initView=function(){var b={exporterCsvFilename:"recordings.csv",rowHeight:30,columnDefs:[{name:"uniqueid"},{name:"calleridnum"},{name:"calleridname"},{name:"connectedlinenum"},{name:"connectedlinename"},{name:"rating",filter:{type:g.filter.SELECT,selectOptions:[{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}]},cellClass:"ui-grid-vcenter",width:"100",cellTemplate:'<div><uib-rating data-ng-model="row.entity.rating" data-ng-click="grid.appScope.updateRating(row.entity.uniqueid, row.entity.rating)" aria-labelledby="default-rating"></uib-rating></div>'},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:'<audio-file-download params="{id:row.entity.uniqueid,controller:\'stream\'}" resource="grid.appScope.Recording"></audio-file-download>'}]},{name:"action",width:150,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.uniqueid, row.entity.uniqueid)"},{directive:'<motion-file-download params="{id:row.entity.uniqueid,controller:\'stream\'}" resource="grid.appScope.Recording" mimetype="audio/wav" btnclass="btn btn-xs blue-hoki" filename="row.entity.uniqueid+\'.wav\'"></motion-file-download>'}]}]};a.gridOptions=e.gridOptions(d,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings.list",{url:"/list",templateUrl:"app/channels/voice/recording/list/list.html",controller:"VoiceRecordingListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Recording",["$resource",function(a){return a("/api/voice/recordings/:id/:controller",{id:"@id"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings",{url:"/recordings",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound",{url:"/inbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$location","$translate",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"inbound",appdata:"Inbound Call",context:"from-voip-provider"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),f.path("/channels/voice/routes/inbound/view/"+a.id+"/applications")})["catch"](function(a){console.log(a),e.show(g.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}), </span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:170,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/inbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"inbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/inbound/list/create.modal.html",controller:"VoiceRouteInboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.list",{url:"/list",templateUrl:"app/channels/voice/route/inbound/list/list.html",controller:"VoiceRouteInboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function s(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=b,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableSorting:!1,enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"action",enableSorting:!1,enableColumnMenu:!1,displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}],onRegisterApi:function(b){b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()})}},a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&r(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.$watch("main.app",function(d){if(d){var e,f;switch(c.appId||(a.application={app:d,interval:a.application.interval||"*,*,*,*",appdata:[]}),d){case"Queue":e=l,f=m;break;case"Playback":e=m;break;case"AGI":e=n;break;case"Goto":e=o;break;case"Voicemail":e=q;break;default:e=null,f=null}if(e)return e.get().$promise.then(function(b){
-a.items=b.rows}).then(function(){return f?f.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.show(b.instant(a.message),"danger")})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications})["catch"](function(a){e.path("/channels/voice/routes/inbound/list")})},a.getApplication=function(){void 0===a.selectedApp&&e.path("/channels/voice/routes/inbound/list");var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(a.main.app=b?b.value:"custom","Set"===a.main.app){var c=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=c[0],a.application.value=c[1]}if(!b){var d=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[d]}s()},a.openApplication=function(b){a.selectedApp=b,e.path("/channels/voice/routes/inbound/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.selectedApp=void 0,a.route.exten=a.$application.checkUnderscore(a.route.exten),k.update({id:a.route.id},a.route).$promise.then(function(a){h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/inbound/view/"+c.id+"/"+d)})["catch"](function(a){console.log(a),h.show(b.instant(a.data.translatedMessage),"danger")})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.deleteApp=g.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/inbound/view/view.html",controller:"VoiceRouteInboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.inbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/inbound/view/view.settings.html"}).state("main.channels.voice.routes.inbound.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/inbound/view/view.applications.html"}).state("main.channels.voice.routes.inbound.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html"}).state("main.channels.voice.routes.inbound.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal",{url:"/internal",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCreateCtrl",["$scope","$uibModalInstance","Route","application","$location","$translate","xAlert",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"internal",appdata:"Internal Call",context:"from-sip"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),e.path("/channels/voice/routes/internal/view/"+a.id+"/applications")})["catch"](function(a){g.show(f.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InternalRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:170,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/internal/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"internal"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/internal/list/create.modal.html",controller:"VoiceRouteInternalListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.list",{url:"/list",templateUrl:"app/channels/voice/route/internal/list/list.html",controller:"VoiceRouteInternalListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function s(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=b,a.selectedApp=void 0,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableSorting:!1,enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1,width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}],onRegisterApi:function(b){b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()})}},a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&r(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.$watch("main.app",function(d){if(d){var e,f;switch(c.appId||(a.application={app:d,interval:a.application.interval||"*,*,*,*",appdata:[]}),d){case"Queue":e=l,f=m;break;case"Playback":e=m;break;case"AGI":e=n;break;case"Goto":e=o;break;case"Voicemail":e=q;break;default:e=null,f=null}if(e)return e.get().$promise.then(function(b){a.items=b.rows}).then(function(){return f?f.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.show(b.instant(a.message),"danger")})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications})["catch"](function(a){e.path("/channels/voice/routes/internal/list")})},a.getApplication=function(){console.log(a.selectedApp),void 0===a.selectedApp&&e.path("/channels/voice/routes/internal/list");var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(a.main.app=b?b.value:"custom","Set"===a.main.app){var c=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=c[0],a.application.value=c[1]}if(!b){var d=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[d]}s()},a.openApplication=function(b){a.selectedApp=b,e.path("/channels/voice/routes/internal/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.selectedApp=void 0,a.route.exten=a.$application.checkUnderscore(a.route.exten),k.update({id:a.route.id},a.route).$promise.then(function(a){h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/internal/view/"+c.id+"/"+d)})["catch"](function(a){h.show(b.instant(a.data.translatedMessage),"danger")})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.deleteApp=g.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/internal/view/view.html",controller:"VoiceRouteInternalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.internal.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/internal/view/view.settings.html"}).state("main.channels.voice.routes.internal.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/internal/view/view.applications.html"}).state("main.channels.voice.routes.internal.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html"}).state("main.channels.voice.routes.internal.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html"})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$translate","$location","Tag",function(a,b,c,d,e,f,g,h){a.$application=d.application,a.forms={route:void 0},a.item={type:"outbound",appdata:"Outbound Call",context:"from-sip"},a.getTags=function(){return h.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){e.show(f.instant(a.data.translatedMessage),"danger")})},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),g.path("/channels/voice/routes/outbound/view/"+a.id+"/routes")})["catch"](function(a){e.show(f.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"OutboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_DESTINATION_PATTERN"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:170,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/outbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"outbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/outbound/list/create.modal.html",controller:"VoiceRouteOutboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.list",{url:"/list",templateUrl:"app/channels/voice/route/outbound/list/list.html",controller:"VoiceRouteOutboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound",{url:"/outbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","application","interval","Route","Trunk","VoiceContext","Interval","Tag",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function q(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=c,a.$application=i.application,a.$interval=j.interval,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.gridOptions={rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",cellClass:"ui-grid-vcenter",cellTemplate:"<div><span data-ng-if=\"row.entity.app === 'Dial'\">Default</span><span data-ng-if=\"row.entity.app !== 'Dial'\">{{row.entity.app}}</span></div>",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableSorting:!1,enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"action",displayName:"APPLICATION_ACTION",enableSorting:!1,enableColumnMenu:!1,headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}],onRegisterApi:function(b){b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()})}},a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={info:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""},a.applications=[{name:"Default",value:"Dial"},{name:"Custom",value:"custom"}]},a.$watch("interval",function(a){a&&p(a)},!0),a.$watch("main.app",function(e){if(e){var f,g;switch(d.appId||(a.application={app:e,interval:a.application.interval||"*,*,*,*",appdata:[]}),e){case"Dial":f=l,g=m;break;default:f=null,g=null}if(f)return f.get().$promise.then(function(b){a.items=b.rows}).then(function(){return g?g.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){b.show(c.instant(a.message),"danger")})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,f.path(b)},a.getIntervals=function(){return n.get().$promise.then(function(b){a.Intervals=b.rows,e.syncUpdates("interval",a.Intervals)})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.getRoute=function(){return k.get({id:d.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications})["catch"](function(a){f.path("/channels/voice/routes/outbound/list")})},a.getApplication=function(){void 0===a.selectedApp&&f.path("/channels/voice/routes/outbound/list");var b=_.find(a.applications,{value:a.route.Applications[a.selectedApp].app});if(a.main.app=b?b.value:"custom",!b){var c=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[c]}q()},a.openApplication=function(b){a.selectedApp=b,f.path("/channels/voice/routes/outbound/view/"+d.id+"/routes/settings")},a.updateRoute=function(e){return a.selectedApp=void 0,a.route.exten=a.$application.checkUnderscore(a.route.exten),k.update({id:a.route.id},a.route).$promise.then(function(a){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),e&&f.path("/channels/voice/routes/outbound/view/"+d.id+"/"+e)})["catch"](function(a){b.show(c.instant(a.data.translatedMessage),"danger")})},a.getContexts=function(){return m.get().$promise.then(function(b){a.voiceContexts=b.rows,e.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.getTags=function(){return o.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){b.show(c.instant(a.data.translatedMessage),"danger")})},a.deleteApp=h.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("routes")},a.goNext=function(){g.wizard().next()},a.previous=function(){g.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){e.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/outbound/view/view.html",controller:"VoiceRouteOutboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.outbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.settings.html"}).state("main.channels.voice.routes.outbound.view.routes",{url:"/routes",templateUrl:"app/channels/voice/route/outbound/view/view.routes.html"}).state("main.channels.voice.routes.outbound.view.route",{url:"/route",templateUrl:"app/channels/voice/route/outbound/view/view.route.html"}).state("main.channels.voice.routes.outbound.view.routes.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.routeSettings.html"})}]),angular.module("xCallyShuttleApp").factory("Route",["$resource",function(a){return a("/api/voice/extensions/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes",{url:"/routes",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice",{url:"/voice",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailListCtrl",["$scope","VoiceMail","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"voice_mails.csv",primaryKey:"uniqueid",columnDefs:[{name:"mailbox"},{name:"fullname"},{name:"email"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/voice/voicemails/view/{{row.entity.uniqueid}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.mailbox, row.entity.uniqueid)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.list",{url:"/list",templateUrl:"app/channels/voice/voicemail/list/list.html",controller:"VoiceVoicemailListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailViewCtrl",["$scope","VoiceMail","VoiceMailMessage","VoiceContext","$http","xAlert","$translate","$stateParams","socket","$sce","Modal","$location","gridOptions",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){var b={exporterCsvFilename:"voice_mail_messages.csv",primaryKey:"id",columnDefs:[{name:"callerid"},{name:"stamp",displayName:"APPLICATION_DATE",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{grid.appScope.moment(row.entity.stamp).format('YYYY-MM-DD HH:mm:ss')}}</div>"},{name:"duration",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.duration*1000 | date:'mm:ss'}}</div>"},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:'<audio-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage"></audio-file-download>'}]},{name:"action",width:150,buttons:[{directive:'<motion-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage" mimetype="audio/wav" btnclass="btn btn-xs blue-hoki" filename="row.entity.msg_id+\'.wav\'"></motion-file-download>'},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.id, row.entity.id)"}]}]};a.gridOptions=m.gridOptions(c,b,a,{mailbox:a.voicemail.mailbox,context:a.voicemail.context})}a.moment=moment,a.VoiceMailMessage=c,a.getVoicemail=function(){return b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b})["catch"](function(a){l.path("/voice/voicemails/list")})},a.updateVoiceVoicemail=function(){return b.update({id:h.uniqueid},a.voicemail).$promise.then(function(){f.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(g.instant(a.message),"danger")})},a.getContexts=function(){return d.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){f.show(a.message,"danger")})},a.getMessages=function(){return a.voicemail?void n():b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b,n()})["catch"](function(a){l.path("/voice/voicemails/view/"+h.uniqueid+"/settings")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.view",{url:"/view/:uniqueid",templateUrl:"app/channels/voice/voicemail/view/view.html",controller:"VoiceVoicemailViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.voicemails.view.settings",{url:"/settings",templateUrl:"app/channels/voice/voicemail/view/view.settings.html"}).state("main.channels.voice.voicemails.view.messages",{url:"/messages",templateUrl:"app/channels/voice/voicemail/view/view.messages.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceMail",["$resource",function(a){return a("/api/voice/voicemails/:id/:controller",{uniqueid:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails",{url:"/voicemails",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("VoiceMailMessage",["$resource",function(a){return a("/api/voice/voicemails/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailWizardCtrl",["$scope","VoiceMail","xAlert","WizardHandler","$location","Setting",function(a,b,c,d,e,f){a.initWizard=function(){a.form={},a.item={context:"from-voicemail"}},a.next=function(){d.wizard().next()},a.previous=function(){d.wizard().previous()},a.exitValidation=function(a){return a},a.getFirstFreeMailbox=function(){f.get({controller:"mailbox"}).$promise.then(function(b){a.item.mailbox=b.value})["catch"](function(a){c.show(a.data.message,"danger")})},a.createItem=function(){return a.item.customer_id=a.item.mailbox,b.save(a.item).$promise.then(function(){e.path("/channels/voice/voicemails/list")})["catch"](function(a){c.show(data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.wizard",{url:"/wizard",templateUrl:"app/channels/voice/voicemail/wizard/wizard.html",controller:"VoiceVoicemailWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){return a("/api/voice/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Company",["$resource",function(a){return a("/api/contactmanager/companies/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies",{url:"/companies",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("CompanyListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyListCtrl",["$scope","$http","$translate","xAlert","Modal","$uibModal","$log","Company","gridOptions","$location",function(a,b,c,d,e,f,g,h,i,j){a.initView=function(){var b={exporterCsvFilename:"Companies.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",name:"profile",href:"/contactmanager/companies/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var a=f.open({animation:!0,templateUrl:"app/contactmanager/company/list/create.modal.html",controller:"CompanyListCreateModalCtrl"
-});a.result.then(function(a){b.post("/api/contactmanager/companies",a).then(function(a){j.path("/contactmanager/companies/view/"+a.id+"/settings")})["catch"](function(a){d.show(a.data.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.list",{url:"/list",templateUrl:"app/contactmanager/company/list/list.html",controller:"ContactManagerCompanyListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.getCompany=function(){b.get("/api/contactmanager/companies/"+e.id).success(function(b){a.company=b}).error(function(a){f.path("/contactmanager/companies/list")})},a.updateCompany=function(){var f=angular.copy(a.company);b.put("/api/contactmanager/companies/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.company=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.view",{url:"/view/:id",templateUrl:"app/contactmanager/company/view/view.html",controller:"ContactManagerCompanyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.companies.view.settings",{url:"/settings",templateUrl:"app/contactmanager/company/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Contact",["$resource",function(a){return a("/api/contactmanager/contacts/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts",{url:"/contacts",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListImportModalCtrl",["$scope","$uibModalInstance","indexes","csv","xAlert","socket","$http","$translate",function(a,b,c,d,e,f,g,h){function i(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);var c={Phones:[],Emails:[],customFields:{}};_.forOwn(a.item,function(e,f){switch(f){case"Phones":a.item.Phones.forEach(function(a){""!==d[b][a]&&c.Phones.push({phone:d[b][a]})});break;case"Emails":a.item.Emails.forEach(function(a){""!==d[b][a]&&c.Emails.push({email:d[b][a]})});break;case"customFields":_.forOwn(a.item.customFields,function(a,e){c.customFields[e]=d[b][a]});break;case"tags":c.tags=[],a.item.tags.forEach(function(a){""!==d[b][a]&&c.tags.push(d[b][a])});break;default:c[f]=d[b][e]}}),c.tags=c.tags?c.tags.join(","):void 0,_.forOwn(c.customFields,function(a,b){""===a&&delete c.customFields[b]}),c.ServiceId=a.item.ServiceId,c.CompanyId=a.item.CompanyId||null,g.post("/api/contactmanager/contacts",c).success(function(c){a["import"].success+=j,a["import"].succeeded+=1,i(b+1)}).error(function(c){a["import"].fail+=j,a["import"].failed+=1,i(b+1)})}a.indexes=c,a.importing=!1,a.submitted=!1,a.stopped=!1,a["import"]={success:0,fail:0,succeeded:0,failed:0},a.csvLength=d.length;var j=100/a.csvLength;a.forms={dashboard:void 0},a.item={},a.start=function(){a.importing=!0,a.submitted=!0,i(0)},a.getServices=function(){g.get("/api/contactmanager/services/").success(function(b){a.services=b.rows,a.item.ServiceId=1,a.getCustomFields()}).error(function(a){e.show(h.instant(a.message)+"!","danger")})},a.getCustomFields=function(){g.get("/api/contactmanager/services/"+a.item.ServiceId+"/customfields").success(function(b){a.customFields=b,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),f.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),f.socket.on("custom_field:save",function(b){if(b.ServiceId===a.item.ServiceId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})}).error(function(a){console.error(a),e.show(a.message,"danger")})},a.close=function(){b.close()},a.stop=function(){a.stopped=!0}}]),angular.module("xCallyShuttleApp").controller("ContactManagerContactListCtrl",["$scope","$translate","Modal","FileUploader","Papa","$uibModal","$log","Contact","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Contacts.csv",columnDefs:[{name:"fullname"},{name:"Service.name",displayName:"APPLICATION_SERVICE",field:"Service.name",enableSorting:!1,enableFiltering:!1},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",name:"profile",onClick:"grid.appScope.openContactTab(row.entity)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},d.FileSelect.prototype.isEmptyAfterSelection=function(){return!0};var j=a.uploader=new d({queueLimit:1,clearInputAfterAddedToQueue:!0});j.onAfterAddingFile=function(b){console.log("fileadded"),e.parse(b._file,{header:!0,complete:function(b){a.uploader.clearQueue(),a["import"](b.data)},error:function(a){console.log(a)}})},a["import"]=function(b){var c=f.open({animation:!0,size:"lg",backdrop:"static",keyboard:!1,templateUrl:"app/contactmanager/contact/list/import.modal.html",controller:"ContactManagerListImportModalCtrl",resolve:{indexes:function(){return _.keys(b[0])},csv:function(){return b}}});c.result.then(function(b){a.gridOptions.getPage()},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts.list",{url:"/list",templateUrl:"app/contactmanager/contact/list/list.html",controller:"ContactManagerContactListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager",{url:"/contactmanager",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceListCtrl",["$scope","$http","$translate","Modal","xAlert","$uibModal","$log","Service","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Services.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",name:"profile",href:"/contactmanager/services/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var d=f.open({animation:!0,templateUrl:"app/contactmanager/service/list/create.modal.html",controller:"ContactManagerServiceListCreateModalCtrl"});d.result.then(function(d){b.post("/api/contactmanager/services/",d).then(function(b){a.gridOptions.getPage(),e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.services.list",{url:"/list",templateUrl:"app/contactmanager/service/list/list.html",controller:"ContactManagerServiceListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Service",["$resource",function(a){return a("/api/contactmanager/services/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.services",{url:"/services",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceCustomFieldViewCreateModalCtrl",["$scope","$uibModalInstance","$translate",function(a,b,c){a.$translate=c,a.forms={dashboard:void 0},a.item={},a.choices=[{value:""}],a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)},a.types=[{name:"APPLICATION_TEXT",value:"text"},{name:"APPLICATION_SELECT",value:"select"}],a.ok=function(){"select"===a.item.type&&(a.item.values=angular.toJson(a.choices)),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","$uibModal","$log","Modal",function(a,b,c,d,e,f,g,h,i,j){var k=function(){return{select:function(c){b.post("/api/contactmanager/services/"+a.service.id+"/agents",{agents:c}).success(function(){a.getTeams()}).error(function(a){console.error(a)})},deselect:function(c){b.put("/api/contactmanager/services/"+a.service.id+"/agents",{agents:c}).success(function(){a.getTeams()}).error(function(a){console.error(a)})}}};a.getService=function(){b.get("/api/contactmanager/services/"+e.id).success(function(b){a.service=b}).error(function(a){console.error(a),g.path("/contactmanager/services/list")})},a.updateService=function(){var f=angular.copy(a.service);b.put("/api/contactmanager/services/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.service=f})},a.getTeams=function(){b.get("/api/teams").success(function(c){a.teams=c.rows,b({url:"/api/contactmanager/user_has_services",method:"GET",params:{service:a.service.id}}).success(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b,"UserId"),k)})}).error(function(a){console.error(a)})},a.getServiceCustomFields=function(){b.get("/api/contactmanager/services/"+e.id+"/customfields").success(function(b){a.customFields=b,f.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),f.socket.on("custom_field:save",function(b){if(b.ServiceId===e.id){var c=_.find(a.customFields,{id:b.id});c||a.customFields.push(b)}})}).error(function(a){console.error(a),g.path("/contactmanager/services/view/"+e.id+"/settings")})},a.create=function(){var a=h.open({animation:!0,templateUrl:"app/contactmanager/service/view/create.modal.html",controller:"ContactManagerServiceCustomFieldViewCreateModalCtrl"});a.result.then(function(a){b.post("/api/contactmanager/services/"+e.id+"/customfields/",a).then(function(a){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.data.message,"danger")})},function(){i.info("Modal dismissed at: "+new Date)})},a.deleteItem=j.confirm["delete"](function(a){b["delete"]("/api/contactmanager/services/customfields/"+a).success(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){c.show(a.message,"danger")})}),a.getCustomField=function(){b.get("/api/contactmanager/services/customfields/"+e.cfId).success(function(b){a.customField=b,"select"===a.customField.type&&(a.choices=JSON.parse(a.customField.values))}).error(function(a){console.error(a),g.path("/contactmanager/customfields/list")})},a.updateCustomField=function(){"select"===a.customField.type&&(a.customField.values=angular.toJson(a.choices));var f=angular.copy(a.customField);b.put("/api/contactmanager/services/customfields/"+e.cfId,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.customField=f})},a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.services.view",{url:"/view/:id",templateUrl:"app/contactmanager/service/view/view.html",controller:"ContactManagerServiceViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.services.view.settings",{url:"/settings",templateUrl:"app/contactmanager/service/view/view.settings.html"}).state("main.contactmanager.services.view.agents",{url:"/agents",templateUrl:"app/contactmanager/service/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.contactmanager.services.view.customfields",{url:"/customfields",templateUrl:"app/contactmanager/service/view/view.customFields.html"}).state("main.contactmanager.services.view.customfields.settings",{url:"/settings/:cfId",templateUrl:"app/contactmanager/service/view/view.customFieldSettings.html",controller:"ContactManagerServiceViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("DashboardCtrl",["$scope","$translate",function(a,b){a.voice=[{name:b.instant("APPLICATION_QUEUE"),link:"main.dashboard.voice"}],a.mail=[{name:b.instant("APPLICATION_QUEUE"),link:"main.dashboard.mail"}]}]),angular.module("xCallyShuttleApp").factory("Dashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.dashboard",{"abstract":!0,url:"/dashboard",templateUrl:"app/dashboard/dashboard.html",controller:"DashboardCtrl"}).state("main.dashboard.voice",{url:"/voice",controller:"DashboardVoiceCtrl",templateUrl:"app/dashboard/voice/voice.html"}).state("main.dashboard.mail",{url:"/mail",controller:"DashboardMailCtrl",templateUrl:"app/dashboard/mail/mail.html"})}]),angular.module("xCallyShuttleApp").controller("DashboardMailCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").controller("DashboardVoiceCtrl",["$scope","Auth","ReportQueue","ReportCall","socket",function(a,b,c,d,e){a.Auth=b,a.initWaiting=function(){return c.get({id:"waiting"}).$promise.then(function(b){a.waiting=b.value,e.socket.on("dashboard:waiting",function(b){a.waiting=b.value})})["catch"](function(a){console.error(a)})},a.initActive=function(){return c.get({id:"active"}).$promise.then(function(b){a.active=b.value,e.socket.on("dashboard:active",function(b){a.active=b.value})})["catch"](function(a){console.error(a)})},a.initAnswered=function(){return c.get({id:"answered"}).$promise.then(function(b){a.answered=b.value,e.socket.on("dashboard:answered",function(b){a.answered=b.value})})["catch"](function(a){console.error(a)})},a.initAbandoned=function(){return c.get({id:"abandoned"}).$promise.then(function(b){a.abandoned=b.value,e.socket.on("dashboard:abandoned",function(b){a.abandoned=b.value})})["catch"](function(a){console.error(a)})},a.initAvgAnswerTime=function(){return c.get({id:"avganswertime"}).$promise.then(function(b){a.avganswertime=b.value,e.socket.on("dashboard:avganswertime",function(b){a.avganswertime=b.value})})["catch"](function(a){console.error(a)})},a.initAvgTalkTime=function(){return c.get({id:"avgtalktime"}).$promise.then(function(b){a.avgtalktime=b.value,e.socket.on("dashboard:avgtalktime",function(b){a.avgtalktime=b.value})})["catch"](function(a){console.error(a)})},a.initAnswerRate=function(){return c.get({id:"answerrate"}).$promise.then(function(b){a.answerrate=b.value,e.socket.on("dashboard:answerrate",function(b){a.answerrate=b.value})})["catch"](function(a){console.error(a)})},a.initTotalOffered=function(){return c.get({id:"totaloffered"}).$promise.then(function(b){a.totaloffered=b.value,e.socket.on("dashboard:totaloffered",function(b){a.totaloffered=b.value})})["catch"](function(a){console.error(a)})},a.initUnmanaged=function(){return c.get({id:"unmanaged"}).$promise.then(function(b){a.unmanaged=b.value,e.socket.on("dashboard:unmanaged",function(b){a.unmanaged=b.value})})["catch"](function(a){console.error(a)})},a.initAbandonRate=function(){return c.get({id:"abandonrate"}).$promise.then(function(b){a.abandonrate=b.value,e.socket.on("dashboard:abandonrate",function(b){a.abandonrate=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutbound=function(){return d.get({id:"manualoutbound"}).$promise.then(function(b){a.manualoutbound=b.value,e.socket.on("dashboard:manualoutbound",function(b){a.manualoutbound=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundGlobalDuration=function(){return d.get({id:"manualoutboundglobalduration"}).$promise.then(function(b){a.manualoutboundglobalduration=b.value,e.socket.on("dashboard:manualoutboundglobalduration",function(b){a.manualoutboundglobalduration=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundAvgDuration=function(){return d.get({id:"manualoutboundavgduration"}).$promise.then(function(b){a.manualoutboundavgduration=b.value,e.socket.on("dashboard:manualoutboundavgduration",function(b){a.manualoutboundavgduration=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundAnswered=function(){return d.get({id:"manualoutboundanswered"}).$promise.then(function(b){a.manualoutboundanswered=b.value,e.socket.on("dashboard:manualoutboundanswered",function(b){a.manualoutboundanswered=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundAnswerRate=function(){return d.get({id:"manualoutboundanswerrate"}).$promise.then(function(b){a.manualoutboundanswerrate=b.value,e.socket.on("dashboard:manualoutboundanswerrate",function(b){a.manualoutboundanswerrate=b.value})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk",{url:"/desk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("DeskAccount",["$resource",function(a){return a("/api/desk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("DeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedDeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedDeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("desk_account"),b.url="/api/desk/accounts",h.getPage(b).then(function(d){a.displayedDeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedDeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedDeskAccounts.length)}),f.socket.on("desk_account:save",function(){a.initList(b)}),f.socket.on("desk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/desk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/desk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.checkAccount=function(a){b.get("/api/desk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.list",{url:"/list",templateUrl:"app/desk/list/list.html",controller:"DeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("DeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","desk_com",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){g.unsyncUpdates("desk_configuration"),g.unsyncUpdates("desk_field")}),a.initView=function(){b.get("/api/desk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){h.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/desk/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/desk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,g.socket.on("desk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.deleteConfiguration=i.confirm["delete"](function(a){b["delete"]("api/desk/configurations/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/desk/configurations",a.configuration).success(function(a){e.path("desk/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){h.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/desk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=j.fields.concat(b)}).error(function(a){h.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/desk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,g.socket.on("desk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){h.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/desk/fields/"+a.id).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/desk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/desk/fields/"+a.id,a).success(function(){}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(b.customField=_.result(c,"custom",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.data.choices?c.data.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.view",{url:"/view/:id",templateUrl:"app/desk/view/view.html",controller:"DeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.desk.view.account",{url:"/account",templateUrl:"app/desk/view/view.account.html"}).state("main.desk.view.configurations",{url:"/configurations",templateUrl:"app/desk/view/view.configurations.html"}).state("main.desk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/desk/view/view.configurationSettings.html",controller:"DeskViewCtrl"}).state("main.desk.view.configuration",{url:"/configuration",templateUrl:"app/desk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("DeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/desk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/desk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.wizard",{url:"/wizard",templateUrl:"app/desk/wizard/wizard.html",controller:"DeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk",{url:"/freshdesk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("FreshdeskAccount",["$resource",function(a){return a("/api/freshdesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedFreshdeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedFreshdeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("freshdesk_account"),b.url="/api/freshdesk/accounts",h.getPage(b).then(function(d){a.displayedFreshdeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedFreshdeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedFreshdeskAccounts.length)}),f.socket.on("freshdesk_account:save",function(){a.initList(b)}),f.socket.on("freshdesk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/freshdesk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/freshdesk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.checkAccount=function(a){b.get("/api/freshdesk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.list",{url:"/list",templateUrl:"app/freshdesk/list/list.html",controller:"FreshdeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("freshdesk_configuration"),h.unsyncUpdates("freshdesk_field")}),a.initView=function(){b.get("/api/freshdesk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/freshdesk/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/freshdesk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("freshdesk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/freshdesk/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/freshdesk/configurations",a.configuration).success(function(a){e.path("freshdesk/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/freshdesk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=[],b=f("freshdesk")(b),_.forEach(b,function(b){a.accountFields.push(b.ticket_field)})}).error(function(a){i.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/freshdesk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("freshdesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/freshdesk/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger");
-})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/freshdesk/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"name",b.idField);c&&(b.customField=!_.result(c,"default",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.choices.length>0?c.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.view",{url:"/view/:id",templateUrl:"app/freshdesk/view/view.html",controller:"FreshdeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.freshdesk.view.account",{url:"/account",templateUrl:"app/freshdesk/view/view.account.html"}).state("main.freshdesk.view.configurations",{url:"/configurations",templateUrl:"app/freshdesk/view/view.configurations.html"}).state("main.freshdesk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/freshdesk/view/view.configurationSettings.html",controller:"FreshdeskViewCtrl"}).state("main.freshdesk.view.configuration",{url:"/configuration",templateUrl:"app/freshdesk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("FreshdeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/freshdesk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/freshdesk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.wizard",{url:"/wizard",templateUrl:"app/freshdesk/wizard/wizard.html",controller:"FreshdeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations",{url:"/integrations",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Integration",["$resource",function(a){return a("/api/integrations/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").controller("IntegrationListCtrl",["$scope","Modal","socket","FileUploader","Integration","xAlert",function(a,b,c,d,e,f){a.integrationsByPage=10;var g=a.uploader=new d({url:"api/integrations",autoUpload:!0,removeAfterUpload:!0});g.filters.push({name:"zipFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|zip|".indexOf(b)}}),g.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),f.show(b.name,"success")},g.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),b.errors.forEach(function(a){f.show(a.message,"danger")})},a.deleteItem=b.confirm["delete"](function(a){e["delete"]({id:a},function(){f.show("Integration Removed","success")},function(a){f.show(a.data.errors,"danger")})}),a.initList=function(){a.integrations=e.query({},function(a){c.syncUpdates("integration",a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations.list",{url:"/list",templateUrl:"app/integration/list/list.html",controller:"IntegrationListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty",{url:"/jscripty",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("JscriptyProject",["$resource",function(a){return a("/api/jscripty/projects/:id/:controller/:action/:action2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCtrl",["$scope","$uibModal","JscriptyProject","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:300,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/view/{{row.entity.id}}",name:"settings"},{"class":"green",name:"start",onClick:"grid.appScope.openJscriptyTab(row.entity)"},{"class":"purple",href:"/jscripty/projects/report/{{row.entity.id}}/sessions",name:"report"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/jscripty/project/list/list.create.modal.html",controller:"JscriptyProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","JscriptyProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){console.log(a),e.show(b.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.list",{url:"/list",templateUrl:"app/jscripty/project/list/list.html",controller:"JscriptyProjectListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectReportCtrl",["$scope","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope","gridOptions","JscriptyProject","$location",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.projectStats={started:0,incomplete:0,completed:0},a.projectId=d.id,a.initView=function(){return l.get({id:d.id,controller:"sessions"}).$promise.then(function(b){a.projectId=d.id,console.log(a.projectId);var c=_.groupBy(b.rows,"status");a.projectStats.started=c.started?c.started.length:0,a.projectStats.completed=c.completed?c.completed.length:0,a.projectStats.incomplete=c.incomplete?c.incomplete.length:0})["catch"](function(a){h.show(a.message,"danger")})},a.getProjectSessions=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"projectId",displayName:"APPLICATION_PROJECTID"},{name:"session_id",displayName:"APPLICATION_SESSIONID"},{name:"createdAt",displayName:"APPLICATION_STARTEDAT"},{name:"completedAt",displayName:"APPLICATION_COMPLETEDAT"},{name:"status",displayName:"APPLICATION_STATUS"},{name:"last_question_id",displayName:"APPLICATION_LASTQUESTIONID"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/report/{{row.entity.projectId}}/session/{{row.entity.session_id}}",name:"Detail"}]}]};a.gridOptions=k.gridOptions(l,b,a,{id:d.id,controller:"sessions"})},a.getSessionDetails=function(){console.log(d.sessionId),b.get("/api/jscripty/projects/"+d.id+"/sessions/"+d.sessionId).success(function(b){a.sessionQuestions=b[0],console.log("session",a.sessionQuestions)})["catch"](function(a){h.show(a.message,"danger")})},a.getQuestionSummary=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"question_id",width:150,displayName:"APPLICATION_QUESTIONID"},{name:"question_type",width:150,displayName:"APPLICATION_QUESTIONTYPE"},{name:"question_label",width:200,displayName:"APPLICATION_QUESTIONLABEL"},{name:"question_text",displayName:"APPLICATION_QUESTION"},{name:"count",width:100,displayName:"APPLICATION_COUNT"}]};a.gridOptions=k.gridOptions(l,b,a,{id:d.id,controller:"questions",action:"summary"})},a.getQuestionDetail=function(){b.get("/api/jscripty/projects/"+d.id+"/questions/detail").success(function(b){var c=_.groupBy(b,"question_id");_.forEach(c,function(a,b){c[b]=_.groupBy(a,"question_label"),_.forEach(c[b],function(a,d){c[b][d]=_.groupBy(a,"question_text")})}),a.questionDetail=c,console.log("detail",a.questionDetail)})["catch"](function(a){h.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.report",{url:"/report/:id",templateUrl:"app/jscripty/project/report/report.html",controller:"JscriptyProjectReportCtrl"}).state("main.jscripty.projects.report.sessions",{url:"/sessions",templateUrl:"app/jscripty/project/report/report.sessions.html"}).state("main.jscripty.projects.report.summary",{url:"/summary",templateUrl:"app/jscripty/project/report/report.summary.html"}).state("main.jscripty.projects.report.detail",{url:"/detail",templateUrl:"app/jscripty/project/report/report.detail.html"}).state("main.jscripty.projects.report.sessionDetail",{url:"/session/:sessionId",controller:"JscriptyProjectReportCtrl",templateUrl:"app/jscripty/project/report/report.session.detail.html"})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectViewCtrl",["$scope","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope",function(a,b,c,d,e,f,g,h,i,j){a.jscriptyProject={},a.getProject=function(){b.get("/api/jscripty/projects/"+d.id).success(function(b){a.jscriptyProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!=a&&-1!=a.indexOf("Script error."));else{var d=new Image;d.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(e){}},b.token=f.getToken();var a=new EditorUi(new Editor);a.openString(b.draft,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}}),e.syncUpdates("jscripty_project",[b],function(a,c,d){c.id===b.id})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.view",{url:"/view/:id",templateUrl:"app/jscripty/project/view/view.html",controller:"JscriptyProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/jscripty/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/jscripty/js/Editor.js","assets/plugins/jscripty/js/Graph.js","assets/plugins/jscripty/js/EditorUi.js","assets/plugins/jscripty/js/Actions.js","assets/plugins/jscripty/js/Menus.js","assets/plugins/jscripty/js/Sidebar.js","assets/plugins/jscripty/js/Toolbar.js","assets/plugins/jscripty/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("LoginCtrl",["$scope","Auth","$location","$window","$rootScope",function(a,b,c,d,e){a.year=moment().year(),a.userLogin={},a.userSignUp={},a.loginSubmitted=!1,a.signupSubmitted=!1,a.errorLogin=!1,a.errorSignup=!1,a.errorLog="",a.flagLogin1=!1,a.toogleLogin=function(){a.flagLogin1=!a.flagLogin1},e.bodyLayout="login",a.$on("$viewContentLoaded",function(){Metronic.init(),Layout.init()}),a.login=function(d){a.loginSubmitted=!0,d.$valid?b.login({name:a.userLogin.name,password:a.userLogin.password,remember:a.userLogin.remember}).then(function(){c.path("/dashboard/voice")})["catch"](function(b){a.errorLog=b.message,a.errorLogin=!0}):a.errorLogin=!0},a.signup=function(d){a.signupSubmitted=!0,d.$valid?b.createUser({email:a.userSignUp.email,fullname:a.userSignUp.fullname,name:a.userSignUp.name,password:a.userSignUp.password,role:a.userSignUp.role,online:!0}).then(function(){c.path("/")})["catch"](function(b){a.errorLog=b.message,a.errorSignup=!0}):a.errorSignup=!0},a.loginOauth=function(a){d.location.href="/auth/"+a}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("login",{url:"/login",templateUrl:"app/login/login.html",controller:"LoginCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Action",["$resource",function(a){return a("/api/actions/:name/:controller",{name:"@name"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").directive("actionBuilderTemplate",["$compile","xAlert","$http","$timeout","Template","$translate",function(a,b,c,d,e,f){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"app/main/template/actionBuilder/template.actionBuilderTemplate.html",compile:function(c,g){var h,i;return h=c.contents().remove(),function(c,g,j){function k(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=k(),d(function(){return e.get().$promise.then(function(a){c.templates=a.rows})["catch"](function(a){b.show(f.instant(a.message),"danger")})}),i||(i=a(h)),g.append(i(c,function(a){return a}))}}}}]).directive("actionBuilderIntegration",["$compile","xAlert","$http","$timeout","Integration","$translate","ZendeskAccount","DeskAccount","SalesforceAccount","FreshdeskAccount","SugarcrmAccount",function(a,b,c,d,e,f,g,h,i,j,k){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"app/main/template/actionBuilder/template.actionBuilderIntegration.html",compile:function(c,l){var m,n;return m=c.contents().remove(),function(c,l,o){function p(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=p(),d(function(){return e.get({active:1}).$promise.then(function(a){c.integrations=a.rows,c.element.data1&&q()})["catch"](function(a){b.show(f.instant(a.message),"danger")})});var q=function(){var a;switch(c.element.data1){case"zendesk":a=g;break;case"desk":a=h;break;case"salesforce":a=i;break;case"freshdesk":a=j;break;case"sugarcrm":a=k}return a.get().$promise.then(function(a){c.accounts=a.rows,c.element.data2&&r()})["catch"](function(a){b.show(f.instant(a.message),"danger")})},r=function(){c.configurations=_.find(c.accounts,{id:Number(c.element.data2)}).Configurations};c.changeIntegration=function(){c.element.data2="",q()},c.changeAccount=function(){c.element.data3="",r()},n||(n=a(m)),l.append(n(c,function(a){return a}))}}}}]).directive("actionBuilderStatus",["$compile","xAlert","$http","$timeout","$translate",function(a,b,c,d,e){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"app/main/template/actionBuilder/template.actionBuilderStatus.html",compile:function(b,c){var d,e;return d=b.contents().remove(),function(b,c,f){function g(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}b.randomName=g(),b.states=[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],e||(e=a(d)),c.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").factory("Ami",["$resource",function(a){return a("/api/ami/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChooseContactModalCtrl",["$scope","$uibModalInstance","eventId","$http","xAlert","$translate",function(a,b,c,d,e,f){a.open=function(a){b.close(a)},a.getContacts=function(){d.get("/api/contactmanager/contacts/"+c+"/checkevent").success(function(b){a.contacts=b}).error(function(a){e.show(f.instant(a.message)+"!","danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("CloseEditedTabModalCtrl",["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").factory("gridOptions",["Modal","xAlert","$translate","$interval","$q","usSpinnerService",function(a,b,c,d,e,f){return{gridOptions:function(d,g,h,i,j){h.id=[];var k={offset:0,limit:10};g.draggable&&(g.rowTemplate='<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',g.useExternalPagination=!1,g.enablePaginationControls=!1,g.showGridFooter=!1);var l=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")},m=function(){return h.gridOptions.enablePaginationControls||(delete k.offset,delete k.limit),f.spin("spinner-grid"),d.get(i?_.merge(k,i):k).$promise.then(function(a){h.gridOptions.totalItems=a.count,h.gridOptions.data=a.rows,l(a.rows.length)})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})};return h.deleteItem=a.confirm["delete"](function(a){var e=i?angular.copy(i):{};return _.merge(e,{id:a}),d.remove(e).$promise.then(function(){m(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.show(a.message?a.message:a.data.message,"danger")})}),h.deleteItems=a.confirm["delete"](function(){var a=i?angular.copy(i):{};return _.merge(a,{ids:h.id}),d["delete"](a).$promise.then(function(){m(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.show(a.message?a.message:a.data.message,"danger")})}),g.columnDefs.forEach(function(a){a.hasOwnProperty("displayName")||(a.displayName="APPLICATION_"+a.name.toUpperCase()),a.headerCellFilter="translate",a.hasOwnProperty("buttons")&&(a.displayName="",a.cellClass="ui-grid-vcenter",a.enableSorting=!1,a.enableFiltering=!1,a.enableColumnMenu=!1,a.cellTemplate="<div>",a.buttons.forEach(function(b){b.directive?a.cellTemplate+=b.directive:(a.cellTemplate+="<a",a.cellTemplate+=b.hide?' data-ng-hide="true" ':" ",a.cellTemplate+=b["class"]?' class="btn btn-xs '+b["class"]+'" ':" ",a.cellTemplate+=b.href?' data-ng-href="'+b.href+'" ':" ",a.cellTemplate+=b.onClick?' data-ng-click="'+b.onClick+'" ':" ",a.cellTemplate+=">",a.cellTemplate+="{{'"+(b.displayName||"APPLICATION_"+b.name.toUpperCase())+"' | translate}}",a.cellTemplate+="</a> ")}),a.cellTemplate+="<div>",delete a.buttons)}),_.merge({enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableRowSelection:!0,enableSelectAll:!0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,getPage:m,gridMenuTitleFilter:function(a){var b=e.defer();return b.resolve(c.instant(a)),b.promise},onRegisterApi:function(a){h.gridApi=a,h.gridApi.selection.on.rowSelectionChanged(h,function(a){a.isSelected?h.id.push(h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id):_.pull(h.id,h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id)}),h.gridApi.selection.on.rowSelectionChangedBatch(h,function(a){a[0].isSelected?h.id=_.union(h.id,_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id")):_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id").forEach(function(a){_.pull(h.id,a)})}),h.gridApi.core.on.sortChanged(h,function(a,b){0===b.length?k.order=null:k.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),m()}),h.gridApi.pagination.on.paginationChanged(h,function(a,b){k.offset=(a-1)*b,k.limit=b,m()}),h.gridApi.core.on.filterChanged(h,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?k[a.name]=a.filters[0].term:delete k[a.name]}),m()}),h.gridApi.draggableRows.on.rowDropped(h,function(a){a.fromIndex!==a.toIndex&&d.update(i,h.gridOptions.data).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(a.message,"danger")})}),j||m()}},g)}}}]),angular.module("xCallyShuttleApp").controller("MainCtrl",["$scope","$http","$rootScope","$cookies","$translate","$interval","socket","Auth","xAlert","$uibModal","$log","$state",function(a,b,c,d,e,f,g,h,i,j,k,l){a.awesomeThings=[],a.isLoggedIn=h.isLoggedIn,a.isAdmin=h.isAdmin,a.getCurrentUser=h.getCurrentUser,a.workspaces=[],a.mainTab={active:!0},a.closeTab=function(b){if(a.workspaces[b].edited){var c=j.open({animation:!0,templateUrl:"app/main/closeEditedTab.modal.html",controller:"CloseEditedTabModalCtrl"});c.result.then(function(c){a.workspaces.splice(b,1)},function(){k.info("Modal dismissed at: "+new Date)})}else a.workspaces.splice(b,1)},a.createContact=function(c,d){console.log("item tags",d.tags),d.tags=d.tags?d.tags.join(","):void 0,console.log("item tags after",d.tags),_.forOwn(d.customFields,function(a,b){""===a&&delete d.customFields[b]}),b.post("/api/contactmanager/contacts",d).success(function(b){a.workspaces.splice(c,1),a.openContactTab({fullname:b.fullname,id:b.id}),i.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){i.show(a.message,"danger")})};var m=function(b){var c=j.open({animation:!0,templateUrl:"app/main/chooseContact.modal.html",controller:"ChooseContactModalCtrl",resolve:{eventId:function(){return b.id}}});c.result.then(function(c){c?a.openContactTab(c):a.newContact(b)},function(){k.info("Modal dismissed at: "+new Date)})};a.updateContact=function(c,d){var f=angular.copy(d);f.tags=f.tags?f.tags.join(","):void 0,f.CompanyId||(f.CompanyId=null),b.put("/api/contactmanager/contacts/"+f.id,f).success(function(){a.workspaces[c].edited=!1,i.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){i.show(e.instant(a.message)+"!","danger")})},g.socket.on("report_integration:contactmanager",function(a){console.log("choosecontact"),m(a)}),a.openContactTab=function(b){var c=_.find(a.workspaces,{contactID:b.id});c?c.active=!0:a.workspaces.push({name:b.fullname,type:"contact",contactID:b.id,active:!0})},a.openJscriptyTab=function(b){a.workspaces.push({name:b.name,type:"jscripty",active:!0,data:b})},a.newContact=function(b){a.workspaces.push({name:"New Contact",type:"newContact",active:!0,data:b||null})},a.$on("$viewContentLoaded",function(){Metronic.init()}),c.language=e.use(),a.changeLanguage=function(a){e.use(a).then(function(a){c.language=a,("main.jscripty.projects.view"===l.current.name||"main.square.projects.view"===l.current.name)&&l.go(l.current,{},{reload:!0})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").directive("ngSpinnerBar",["$rootScope",function(a){return{link:function(b,c){c.addClass("hide"),a.$on("$stateChangeStart",function(){"spinner-page"===c[0].id&&c.removeClass("hide")}),a.$on("$stateChangeSuccess",function(){"spinner-page"===c[0].id&&(c.addClass("hide"),$("body").removeClass("page-on-load"),Layout.setSidebarMenuActiveLink("match"),setTimeout(function(){Metronic.scrollTop()},1e3))}),a.$on("$spinnerStart",function(){"spinner-request"===c[0].id&&c.removeClass("hide")}),a.$on("$spinnerStop",function(){"spinner-request"===c[0].id&&c.addClass("hide")}),a.$on("$stateNotFound",function(){"spinner-page"===c[0].id&&c.addClass("hide")}),a.$on("$stateChangeError",function(){"spinner-page"===c[0].id&&c.addClass("hide")})}}}]).directive("a",function(){return{restrict:"E",link:function(a,b,c){(c.ngClick||""===c.href||"#"===c.href)&&b.on("click",function(a){a.preventDefault()})}}}).directive("nxEqual",function(){return{require:"ngModel",link:function(a,b,c,d){return c.nxEqual?(a.$watch(c.nxEqual,function(a){d.$setValidity("nxEqual",a===d.$viewValue)}),void d.$parsers.push(function(b){var e=b===a.$eval(c.nxEqual);return d.$setValidity("nxEqual",e),e?b:void 0})):void console.error("nxEqual expects a model as an argument!")}}}).directive("ngEnter",function(){return function(a,b,c){b.bind("keydown keypress",function(b){13===b.which&&(a.$apply(function(){a.$eval(c.ngEnter)}),b.preventDefault())})}}).directive("dropdownMenuHover",function(){return{link:function(a,b){b.dropdownHover()}}}).directive("uiSelectRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.uiSelectRequired=function(a){return a&&a.length}}}}).directive("rpattern",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){function e(a,b){return null==b||""===b||!h||a.test(b)?(d.$setValidity("pattern",!0),b):void d.$setValidity("pattern",!1)}var f,g=c.rpattern,h=!0;g&&(g.match(/^\/(.*)\/$/)?(g=new RegExp(g.substr(1,g.length-2)),f=function(a){return e(g,a)}):f=function(b){var c=a.$eval(g);if(!c||!c.test)throw new Error("Expected "+g+" to be a RegExp but was "+c);return e(c,b)}),d.$formatters.push(f),d.$parsers.push(f),c.$observe("required",function(a){h=a,f(d.$viewValue)})}}}).directive("conditionBuilder",["$compile","xAlert","$http","$timeout",function(a,b,c,d){return{restrict:"E",scope:{element:"=",serviceindex:"=",service:"=",form:"="},templateUrl:"app/main/template/template.conditionBuilder.html",compile:function(c,e){var f,g;return f=c.contents().remove(),function(c,e,h){function i(a){var d=_.find(c.service.services[c.serviceindex].conditions,{value:a});if(d)if(c.elementType=d.type,d.arr)c.values=d.arr;else if(d.resource)return d.resource.get().$promise.then(function(a){c.values=_.map(a.rows,function(a){return{name:a[d.resValue],value:a[d.resValue]}})})["catch"](function(a){b.show($translate.instant(a.message),"danger")})}function j(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c._=_,c.randomName=j(),d(function(){c.element.field&&i(c.element.field)}),c.checkCondition=function(a){c.element.value="",c.element.operator="",i(a)},g||(g=a(f)),e.append(g(c,function(a){return a}))}}}}]).directive("newContact",["$compile","xAlert","$http","socket","$translate","$timeout",function(a,b,c,d,e,f){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.newContactTab.html",compile:function(a,g){return function(a,g,h){function i(){a.$watch("item",function(b,c){angular.equals(b,c)||(a.workspace.edited=!0)},!0)}a.forms={general:{}},a.firstLoad=!0,a.item={Phones:[],Emails:[],customFields:{}},a.checkboxes={},a.init=function(){a.workspace.data&&(a.item.fullname=a.workspace.data.calleridname?a.workspace.data.calleridname:a.workspace.data.messageId?a.workspace.data.messageId:a.workspace.data.uniqueid?a.workspace.data.uniqueid:"",a.workspace.data.calleridnum&&a.item.Phones.push({phone:a.workspace.data.calleridnum}),a.workspace.data.from&&a.item.Emails.push({email:a.workspace.data.from})),a.getTags(),a.getCompanies(),a.getServices()},a.getServices=function(){c.get("/api/contactmanager/services/").success(function(b){a.services=b.rows,a.item.ServiceId=1,a.getCustomFields()}).error(function(a){b.show(e.instant(a.message)+"!","danger")})},a.getCustomFields=function(){c.get("/api/contactmanager/services/"+a.item.ServiceId+"/customfields").success(function(b){a.customFields=b,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),d.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),d.socket.on("custom_field:save",function(b){if(b.ServiceId===a.item.ServiceId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}}),!a.firstLoad||a.workspace.data?(a.workspace.edited=!0,a.firstLoad=!1):(a.firstLoad=!1,i())}).error(function(a){console.error(a),b.show(a.message,"danger")})},a.getTags=function(){c.get("/api/tags").success(function(b){a.tags=_.map(b.rows,"name")}).error(function(a){console.error(a),b.show(a.message,"danger")})},a.getCompanies=function(){c.get("/api/contactmanager/companies").success(function(b){a.companies=b.rows,d.syncUpdates("company",a.companies)}).error(function(a){console.error(a),b.show(a.message,"danger")})},a.addField=function(b){a.item[b].push({})},a.removeField=function(b,c){a.item[b].splice(c,1)},f(function(){a.init()})}}}}]).directive("contact",["$compile","xAlert","$http","socket","$timeout",function(a,b,c,d,e){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.contactTab.html",compile:function(a,f){return function(a,f,g){function h(){a.$watch("contact",function(b,c){angular.equals(b,c)||(a.workspace.edited=!0)},!0)}a.moment=moment,a.forms={general:{}},a.detail={tab:"main"},a.log={journal:{show:"Phones",type:"Inbounds",detail:"general"},history:{show:"Phones",type:"HistoryInbounds",detail:"general"}},a.columns={Phones:{general:{header:["APPLICATION_SOURCE","APPLICATION_DESTINATION","APPLICATION_DATE"],indexes:["source","destination","createdAt"]},QueueCalls:{header:["APPLICATION_CALLERID","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["calleridnum","queue","createdAt"]},ReportAgents:{header:["APPLICATION_AGENT","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["membername","queue","agentcalledAt"]},HistoryQueueCalls:{header:["APPLICATION_CALLERID","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["calleridnum","queue","createdAt"]},HistoryReportAgents:{header:["APPLICATION_AGENT","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["membername","queue","createdAt"]}},Emails:{general:{header:["APPLICATION_FROM","APPLICATION_TO","APPLICATION_DATE"],indexes:["from","to","createdAt"]}}},a.rows={journal:[],history:[]},a.itemsByPage=15,a._=_,a.getRows=function(b){a.rows[b]=[],_.forEach(a.contact[a.log[b].show],function(c){"general"===a.log[b].detail?a.rows[b]=a.rows[b].concat(c[a.log[b].type]):_.forEach(c[a.log[b].type],function(c){a.rows[b]=a.rows[b].concat(c[a.log[b].detail])})})},a.addField=function(b){a.contact[b].push({})},a.removeField=function(b,c){a.contact[b].splice(c,1)},a.getContact=function(){c.get("/api/contactmanager/contacts/"+a.workspace.contactID).success(function(b){b.tags=b.tags?b.tags.split(","):[],a.contact=b,a.getRows("journal"),a.getRows("history"),a.getCustomFields(b.ServiceId),a.contact.customFields={},a.contact.CustomFields.forEach(function(b){console.log("cfmap"),a.contact.customFields[b.id]=b.ContactHasCustomField.value}),h()}).error(function(a){console.error(a),b.show(a.message,"danger")})},a.getTags=function(){c.get("/api/tags").success(function(b){a.tags=_.map(b.rows,"name")}).error(function(a){console.error(a),
-b.show(a.message,"danger")})},a.getCompanies=function(){c.get("/api/contactmanager/companies").success(function(b){a.companies=b.rows,d.syncUpdates("company",a.companies)}).error(function(a){console.error(a),b.show(a.message,"danger")})},a.getCustomFields=function(e){c.get("/api/contactmanager/services/"+e+"/customfields").success(function(b){a.customFields=b,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),d.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),d.socket.on("custom_field:save",function(b){if(b.ServiceId===e){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})}).error(function(a){console.error(a),b.show(a.message,"danger")})},e(function(){a.getTags(),a.getCompanies(),a.getContact()})}}}}]).directive("jscripty",["$compile","xAlert","$http","socket",function(a,b,c,d){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.jscriptyTab.html",compile:function(a,d){return function(a,d,e){a.count=0,a.questions=[];var f=0,g=a.workspace.data.id;c.get("/api/jscripty/projects/"+g+"/download").success(function(b){if(b){c.post("/api/jscripty/projects/"+g+"/sessions",{projectId:g,status:"started"}).success(function(a){f=a.session_id,console.log(a)});var d=mxUtils.parseXml(b),e=new mxCodec(d);a.decObj=e.decode(d.documentElement);a.questions[a.count]=a.currentQuestion=_.find(a.decObj.cells,function(a){return a.vertex&&"start"==a.value.nodeName})}else console.log("No project published!"),alert("No project published!"),a.submit({index:a.index})}),a.next=function(b,c){a.currentQuestion.answer&&a.currentQuestion.answer!=c&&(a.questions=_.take(a.questions,a.count+1)),a.currentQuestion.answer=c,a.questions[a.count]=a.currentQuestion;var d=[];_.forEach(b.edges,function(a,c){if(a.source.id==b.id&&a.value){var e=a.value.split(",");e.length>1&&(_.forEach(e,function(c,d){var e=Object.create(a);e.setValue(c),b.edges.push(e)}),d.push(a))}}),_.forEach(d,function(a){_.remove(b.edges,function(b){return b.value==a.value&&b.id==a.id})}),a.currentQuestion=b,a.count++,a.questions[a.count]=b,a.saveQuestions()},a.end=function(){var d="completed";if("end"!=a.questions[a.questions.length-1].value.nodeName){var d="incomplete";a.saveQuestions()}c.put("/api/jscripty/projects/"+g+"/sessions/"+f,{status:d,completedAt:Date(),last_question_id:a.currentQuestion.id}).success(function(c){b.show("Project Ended","success"),a.submit({index:a.index})})},a.back=function(){a.count--,a.currentQuestion=a.questions[a.count]},a.setCurrentQuestion=function(b){a.count=b,a.currentQuestion=a.questions[a.count]},a.saveQuestions=function(){var b=[],d=[];_.forEach(a.questions,function(a,c){a.children&&_.forEach(a.children,function(a,b){d[b]={input_id:a.id,input_type:a.getAttribute("type",""),input_label:a.getAttribute("label",""),input_value:"checkbox"!=a.getAttribute("type","")||a.answer?a.answer:"Not selected"}}),b[c]={sessionId:f,projectId:g,question_id:a.id,question_type:a.value.nodeName,question_label:a.getAttribute("label",""),question_text:a.getAttribute("question",""),question_other_label:a.getAttribute("other"),question_other_answer:a.otheranswer,question_answer:a.answer,ReportJscriptyInputs:d},d=[]}),c.post("/api/jscripty/projects/"+g+"/sessions/"+f+"/questions/",b).success(function(a){})}}}}}]).directive("reportBuilder",["$compile",function(a){return{restrict:"E",scope:{group:"=",fields:"=",forms:"=",firstCall:"="},templateUrl:"app/main/template/template.reportBuilderView.html",compile:function(b,c){var d,e;return d=b.contents().remove(),function(b,c,f){b.operators=[{name:"AND"},{name:"OR"}],b.conditions=[{name:"="},{name:"!="},{name:"<"},{name:"<="},{name:">"},{name:">="},{name:"LIKE"}],b.addCondition=function(){b.group.rules.push({condition:"=",field:"",value:""})},b.removeCondition=function(a){b.group.rules.splice(a,1)},b.addGroup=function(){b.group.rules.push({group:{operator:"AND",rules:[{condition:"=",field:"",value:""}]}})},b.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},b.removeGroup=function(){b.$parent.group&&b.$parent.group.rules.splice(b.$parent.$index,1)},e||(e=a(d)),c.append(e(b,function(a){return a}))}}}}]).directive("dynamicName",["$compile",function(a){return{restrict:"A",terminal:!0,priority:1e3,link:function(b,c,d){c.attr("name",b.$eval(d.dynamicName)),c.removeAttr("dynamic-name"),a(c)(b)}}}]).directive("onReadFile",["$parse",function(a){return{restrict:"A",scope:!1,link:function(b,c,d){var e=a(d.onReadFile);c.on("change",function(a){var c=new FileReader;c.onload=function(a){b.$apply(function(){e(b,{$fileContent:a.target.result})})},c.readAsText((a.srcElement||a.target).files[0])})}}}]).directive("motionFileDownload",["xAlert","$http","$translate","$timeout","$location","FileSaver","$compile",function(a,b,c,d,e,f,g){return{restrict:"E",template:'<a uib-tooltip=\'{{tooltiptext}}\' class="{{btnclass || \'btn default btn-xs blue-hoki\'}}" href="" data-ng-click="download()" ng-bind-html="btncontent || (\'APPLICATION_DOWNLOAD\' | translate)"></a>',scope:{mimetype:"=",filename:"=",resource:"=",params:"=",btnclass:"@",btncontent:"@",tooltiptext:"@"},link:function(b,d,e){var g=d.children()[0];b.$on("download-start",function(){$(g).attr("disabled","disabled")}),b.$on("downloaded",function(a,c){var d=base64ToBlob(c,b.mimetype);f.saveAs(d,b.filename),$(g).attr("disabled",!1)}),b.download=function(){return b.$emit("download-start"),b.resource.get(b.params).$promise.then(function(a){b.$emit("downloaded",a.downloadString)})["catch"](function(d){a.show(c.instant(d.translatedMessage||d.data.translatedMessage||d.message||d.data.message),"danger"),b.download=function(){}})}}}}]).directive("audioFileDownload",["xAlert","$http","$translate","$sce",function(a,b,c,d){return{restrict:"E",template:'<button type="button" class="btn default btn-xs blue-hoki" data-ng-click="download()"><i class="icon-control-play"></i> {{ \'APPLICATION_PREVIEW\' | translate}}</button>',scope:{resource:"=",params:"="},link:function(b,e,f){var g=e.children()[0];b.$on("download-start",function(a,b){$(g).attr("disabled","disabled").html('<i class="icon-refresh"></i> Loading...')}),b.$on("downloaded",function(a,b){var c=new Audio(d.trustAsResourceUrl("data:audio/ogg;base64,"+b));c.controls=!0,$(g).remove(),e.append(c),c.play()}),b.$on("error",function(a,b){$(g).removeClass("blue-stripe").addClass("red-stripe").html('<i class="icon-ban"></i> Error!')}),b.download=function(){return b.$emit("download-start"),b.resource.get(b.params).$promise.then(function(a){b.$emit("downloaded",a.downloadString)})["catch"](function(b){a.show(c.instant(b.translatedMessage||b.data.translatedMessage||b.message||b.data.message),"danger")})}}}}]).directive("uiRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.required=function(a,b){return!(b&&0===b.length&&"true"===c.uiRequired)},c.$observe("uiRequired",function(){d.$setValidity("required",!("true"===c.uiRequired&&d.$viewValue&&0===d.$viewValue.length))})}}}),angular.module("xCallyShuttleApp").filter("propsFilter",function(){return function(a,b){var c=[];return angular.isArray(a)?a.forEach(function(a){for(var d=!1,e=Object.keys(b),f=0;f<e.length;f++){var g=e[f],h=b[g].toLowerCase();if(-1!==a[g].toString().toLowerCase().indexOf(h)){d=!0;break}}d&&c.push(a)}):c=a,c}}).filter("capitalize",function(){return function(a){return a?a.replace(/([^\W_]+[^\s-]*) */g,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}):""}}).filter("salesforce",function(){var a=["CallDisposition","CallDurationInSeconds","CallObject","CallType","IsArchived","Priority","Status","Type"];return function(b){return _.remove(b,function(b){return b.custom===!1&&a.indexOf(b.name)<0}),b}}).filter("sugarcrm",function(){var a=["account_id","account_name","account_name1","assigned_user_name","assigned_user_id","case_number","created_by","created_by_name","date_entered","date_modified","deleted","description","id","modified_by_name","modified_user_id","name"];return function(b){return _.remove(b,function(b){return a.indexOf(b.name)>=0}),b}}).filter("freshdesk",function(){var a=["requester","subject","agent","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.ticket_field.name)>=0}),b}}).filter("zendesk",function(){var a=["subject","assignee","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.type)>=0}),b}}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main",{"abstract":!0,templateUrl:"app/main/main.html",controller:"MainCtrl",resolve:{authorization:["$q","Auth","$state","$timeout","$location",function(a,b,c,d,e){return b.getToken()?a.when():(d(function(){e.path("/login")}),a.reject())}],deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/plugins/mxgraph/js/mxClient.js"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("xAlert",["$translate","Notification",function(a,b){return{show:function(c,d){switch(d){case"success":b.success({message:c,title:'<i class="glyphicon glyphicon-ok"></i> <strong>'+a.instant("MESSAGE_SUCCESS")+"!</strong>",delay:5e3});break;case"info":b.info({message:c,title:'<i class="glyphicon glyphicon-info-sign"></i> <strong>'+a.instant("MESSAGE_INFO")+"!</strong>",delay:5e3});break;case"danger":b.error({message:c,title:'<i class="glyphicon glyphicon-exclamation-sign"></i> <strong>'+a.instant("MESSAGE_ERROR")+"!</strong>",delay:1e4});break;case"warning":b.warning({message:c,title:'<i class="glyphicon glyphicon-warning-sign"></i> <strong>'+a.instant("MESSAGE_WARNING")+"!</strong>",delay:1e4});break;default:b.info(c)}}}}]).factory("stResource",["$q","$filter","$timeout","$rootScope","$http","$translate","xAlert",function(a,b,c,d,e,f,g){return{getPage:function(b){var c={page:Math.ceil(b.pagination.start/b.pagination.number),per_page:b.pagination.number};b.sort.predicate&&(c.sort_by=b.sort.predicate,c.sort_order=b.sort.reverse?"DESC":"ASC"),_.forIn(b.search.predicateObject,function(a,b){c[b]=a}),b.search.params&&(c.clientQuery={},_.forIn(b.search.params,function(a,b){c.clientQuery[b]=a})),d.$broadcast("$spinnerStart"),e.get(b.url,{params:c}).success(function(a){h.resolve(a),d.$broadcast("$spinnerStop")}).error(function(a){g.show(f.instant(a.message),"danger"),d.$broadcast("$spinnerStop")});var h=a.defer();return h.promise}}}]),angular.module("xCallyShuttleApp").factory("Widget",["$resource",function(a){return a("/api/widgets/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MarketCtrl",["$scope","$http","$translate","socket","xAlert","Modal","$timeout",function(a,b,c,d,e,f,g){function h(a,b){return Math.floor(Math.random()*(b-a+1))+a}a.initView=function(){b.get("/api/integrations").success(function(b){a.integrations=b.rows,a.groupedIntegration=_.chunk(a.integrations,4),d.syncUpdates("integration",a.integrations,function(){a.groupedIntegration=_.chunk(a.integrations,4)})}).error(function(a){e.show(a.message,"danger")})},a.isProgressing=!1,a.$on("$destroy",function(){d.unsyncUpdates("integration")}),a.installIntegration=function(d){a.status="Downloading",a.percentage=h(1,50),a.isProgressing=!0,d.downloading=!0,b.put("/api/integrations/"+d.id,{active:!0}).success(function(){g(function(){a.percentage=h(51,99),a.status="Installing"},2500),g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",d.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)}).error(function(){d.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.uninstallIntegration=function(d){a.status="Uninstalling",a.percentage=h(1,99),a.isProgressing=!0,d.downloading=!0,b.put("/api/integrations/"+d.id,{active:!1}).success(function(){g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",d.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)}).error(function(){d.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.market",{url:"/market",templateUrl:"app/market/market.html",controller:"MarketCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MotionbarCtrl",["$scope","$stateParams","$cookieStore","settings","Auth",function(a,b,c,d,e){e.loginWithToken(b.token,b.userId,b.name),a.getCurrentUser=e.getCurrentUser,d.layout.pageQuickSidebarOpened=!0}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("motionbar",{url:"/motionbar",template:"<div ui-view></div>","abstract":!0}).state("motionbar.chat",{url:"/chat?token&userId&name",templateUrl:"app/motionbar/motionbar.chat.html",controller:"MotionbarCtrl"})}]),angular.module("xCallyShuttleApp").controller("SalesforceListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedSalesforceAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedSalesforceAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("salesforce_account"),b.url="/api/salesforce/accounts",h.getPage(b).then(function(d){a.displayedSalesforceAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedSalesforceAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedSalesforceAccounts.length)}),f.socket.on("salesforce_account:save",function(){a.initList(b)}),f.socket.on("salesforce_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/salesforce/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/salesforce/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.checkAccount=function(a){b.get("/api/salesforce/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.list",{url:"/list",templateUrl:"app/salesforce/list/list.html",controller:"SalesforceListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce",{url:"/salesforce",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("SalesforceAccount",["$resource",function(a){return a("/api/salesforce/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","$filter",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){g.unsyncUpdates("salesforce_configuration"),g.unsyncUpdates("salesforce_field")}),a.initView=function(){b.get("/api/salesforce/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){h.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/salesforce/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/salesforce/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,g.socket.on("salesforce_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.deleteConfiguration=i.confirm["delete"](function(a){b["delete"]("api/salesforce/configurations/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/salesforce/configurations",a.configuration).success(function(a){e.path("salesforce/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){h.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/salesforce/accounts/"+c.id+"/fields").success(function(b){a.accountFields=_.sortByOrder(j("salesforce")(b),"name","asc")}).error(function(a){h.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/salesforce/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,g.socket.on("salesforce_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){h.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/salesforce/fields/"+a.id).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/salesforce/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/salesforce/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/salesforce/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/salesforce/fields/"+a.id,a).success(function(){}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){b.content="",a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);if(c)switch(c.type){case"picklist":return c.picklistValues;default:return}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view",{url:"/view/:id",templateUrl:"app/salesforce/view/view.html",controller:"SalesforceViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.salesforce.view.account",{url:"/account",templateUrl:"app/salesforce/view/view.account.html"}).state("main.salesforce.view.configurations",{url:"/configurations",templateUrl:"app/salesforce/view/view.configurations.html"}).state("main.salesforce.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/salesforce/view/view.configurationSettings.html",controller:"SalesforceViewCtrl"}).state("main.salesforce.view.configuration",{url:"/configuration",templateUrl:"app/salesforce/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("SalesforceWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/salesforce/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/salesforce/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.wizard",{url:"/wizard",templateUrl:"app/salesforce/wizard/wizard.html",controller:"SalesforceWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("License",["$resource",function(a){return a("/api/licenses/:id/:controller",{id:"@id"},{request:{method:"POST",params:{id:"request"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license",{url:"/license",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("LicenseViewCtrl",["$scope","$rootScope","$translate","License","xAlert",function(a,b,c,d,e){a.initView=function(){d.get(function(b){a.item=b.license})},a.submitRequest=function(){d.request(a.item,function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")},function(a){switch(a.status){case 304:e.show(a.statusText,"info");break;default:e.show(a.statusText,"danger")}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license.view",{url:"/view",templateUrl:"app/setting/license/view/view.html",controller:"LicenseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/pricing-tables.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting",{url:"/setting",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Setting",["$resource",function(a){return a("/api/settings/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Smtp",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp",{url:"/smtp",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SmtpViewCtrl",["$scope","$stateParams","$translate","MailServerOut","xAlert","usSpinnerService",function(a,b,c,d,e,f){a.initView=function(){a.item={},d.get({id:"service"}).$promise.then(function(b){a.item=b})["catch"](function(a){e.show(a.message,"danger")})},a.updateItem=function(){return a.item.id?d.update({id:a.item.id},a.item).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")}):(a.item.service=!0,d.save(a.item).$promise.then(function(b){a.item=b,e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")}))},a.test=function(){return f.spin("spinner-grid"),d.test({id:a.item.id,controller:"test"}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})["finally"](function(){f.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp.view",{url:"/view",templateUrl:"app/setting/smtp/view/view.html",controller:"SmtpViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("UpdateListCtrl",["$scope","gridOptions","$uibModal","$location","Update",function(a,b,c,d,e){a.initCounter=function(){a.$on("timer-stopped",function(a,b){console.log("Timer Stopped - data = ",b),d.path("/dashboard/voice")})},a.initView=function(){var c={exporterCsvFilename:"updates.csv",enableFiltering:!1,enableSorting:!1,enablePaginationControls:!1,enableSelectAll:!1,columnDefs:[{name:"message"},{width:125,name:"version",cellClass:"text-center ui-grid-vcenter"},{width:125,name:"createdAt",displayName:"APPLICATION_UPDATED_AT",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'}]};a.gridOptions=b.gridOptions(e,c,a)},a.pull=function(){c.open({animation:!0,templateUrl:"app/setting/update/list/list.pull.html",controller:"UpdateListPullCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates.list",{url:"/list",templateUrl:"app/setting/update/list/list.html",controller:"UpdateListCtrl"}).state("main.setting.updates.landing",{url:"/landing",templateUrl:"app/setting/update/list/landing.html",controller:"UpdateListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/error.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("UpdateListPullCtrl",["$scope","$uibModalInstance","$translate","$location","Update",function(a,b,c,d,e){a.modal={dismissable:!0,title:"Confirm Checkout",html:"Are you sure you want to checkout?",buttons:[{classes:"btn btn-success",text:"Checkout",click:function(){return b.dismiss("close"),d.path("/setting/updates/landing"),e.pull()}},{classes:"btn default",text:"Cancel",click:function(){b.dismiss("cancel")}}]}}]),angular.module("xCallyShuttleApp").factory("Update",["$resource",function(a){return a("/api/updates/:id/:controller",{id:"@id"},{pull:{method:"GET",params:{id:"pull"}},checkout:{method:"GET",params:{id:"checkout"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates",{url:"/updates",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCtrl",["$scope","$uibModal","$translate","SquareOdbc","gridOptions","xAlert",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"odbc.csv",columnDefs:[{name:"name"},{name:"dsn",displayName:"APPLICATION_ODBC"},{name:"description"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/square/odbc/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-jungle",name:"check",displayName:"APPLICATION_CHECK_CONNECTION",onClick:"grid.appScope.checkConnection(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(d,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/odbc/list/list.create.modal.html",controller:"SquareOdbcListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})},a.checkConnection=function(a){return d.get({id:a,controller:"check"}).$promise.then(function(){f.show(c.instant("MESSAGE_CONNECTION_VERIFIED"),"success")})["catch"](function(){f.show(c.instant("MESSAGE_CONNECTION_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareOdbc","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.item.dsn||(a.item.dsn="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion"),a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.list",{url:"/list",templateUrl:"app/square/odbc/list/list.html",controller:"SquareOdbcListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc",{url:"/odbc",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareOdbc",["$resource",function(a){return a("/api/square/odbc/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcViewCtrl",["$scope","$translate","$stateParams","SquareOdbc","xAlert",function(a,b,c,d,e){a.odbc={},a.getOdbc=function(){return d.get({id:c.id}).$promise.then(function(b){a.odbc=b})["catch"](function(a){e.show(a.data.message,"danger")})},a.updateOdbc=function(){var f=angular.copy(a.odbc);return d.update({id:c.id},f).$promise.then(function(){e.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.view",{url:"/view/:id",templateUrl:"app/square/odbc/view/view.html",controller:"SquareOdbcViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.square.odbc.view.settings",{url:"/settings",templateUrl:"app/square/odbc/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCtrl",["$scope","$uibModal","SquareProject","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"projects.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/square/projects/view/{{row.entity.id}}",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/project/list/list.create.modal.html",controller:"SquareProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.list",{url:"/list",templateUrl:"app/square/project/list/list.html",controller:"SquareProjectListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareProject",["$resource",function(a){
-return a("/api/square/projects/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareProjectViewCtrl",["$scope","$stateParams","Auth","xAlert","SquareProject",function(a,b,c,d,e){a.squareProject={},a.getProject=function(){return e.get({id:b.id}).$promise.then(function(b){a.squareProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!==a&&-1!==a.indexOf("Script error."));else{var e=new Image;e.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(f){d.show(f,"danger")}},b.token=c.getToken();var a=new EditorUi(new Editor);a.openString(b.preproduction,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}})})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.view",{url:"/view/:id",templateUrl:"app/square/project/view/view.html",controller:"SquareProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/square/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/square/js/Editor.js","assets/plugins/square/js/Graph.js","assets/plugins/square/js/EditorUi.js","assets/plugins/square/js/Actions.js","assets/plugins/square/js/Menus.js","assets/plugins/square/js/Sidebar.js","assets/plugins/square/js/Toolbar.js","assets/plugins/square/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square",{url:"/square",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Agent",["$resource",function(a){return a("/api/agents/:id/:controller",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents",{url:"/agents",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AgentListCtrl",["$scope","Agent","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"agents.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"internal"},{name:"email"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/staff/agents/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.list",{url:"/list",templateUrl:"app/staff/agent/list/list.html",controller:"AgentListCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("AgentViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$cookieStore","Agent","FileUploader","Auth","User",function(a,b,c,d,e,f,g,h,i,j){a.Auth=i,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.updatePassword=function(){var b={newPassword:a.agent.newPwd};return i.isAdmin()?b.id=e.id:b.oldPassword=a.agent.currentPwd,j.changePassword(b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.message,"danger")})};var k=a.uploader=new h({url:"api/users/"+e.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+f.get("token")}});k.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),k.onSuccessItem=function(b,e){a.agent.userpic=e.userpic,a.agent.id===i.getCurrentUser().id&&(i.getCurrentUser().userpic=e.userpic),c.show(d.instant("MESSAGE_WELL_DONE"),"success")},k.onErrorItem=function(){c.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},k.onCompleteAll=function(){k.clearQueue()},a.initView=function(){return g.get({id:e.id}).$promise.then(function(b){a.agent=b,a.agent.transport=a.agent.transport?a.agent.transport.split(","):[],a.agent.allow=a.agent.allow?a.agent.allow.split(";"):[],a.agent.nat=a.agent.nat?a.agent.nat.split(","):[]})["catch"](function(a){c.show(a.message,"danger")})},a.patchItem=function(){return g.patch({id:e.id},{chatCapacity:a.agent.chatCapacity,mailCapacity:a.agent.mailCapacity,faxCapacity:a.agent.faxCapacity}).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.message,"danger")})},a.updateItem=function(){var b=angular.copy(a.agent);return delete b.password,delete b.md5secret,b.transport=b.transport.join(","),b.allow=b.allow.join(";"),b.nat=b.nat.join(","),g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.view",{url:"/view/:id",templateUrl:"app/staff/agent/view/view.html",controller:"AgentViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.agents.view.account",{url:"/account",templateUrl:"app/staff/agent/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.agents.view.voice",{url:"/voice",templateUrl:"app/staff/agent/view/view.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.chat",{url:"/chat",templateUrl:"app/staff/agent/view/view.chat.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.mail",{url:"/mail",templateUrl:"app/staff/agent/view/view.mail.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.fax",{url:"/fax",templateUrl:"app/staff/agent/view/view.fax.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.phonebar",{url:"/phonebar",templateUrl:"app/staff/agent/view/view.phonebar.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("AgentWizardCtrl",["$scope","$rootScope","Agent","Setting","xAlert","$location","$translate","$http","WizardHandler",function(a,b,c,d,e,f,g,h,i){a.forms={info:void 0,voice:void 0},a.item={role:"agent",allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},a.next=function(){i.wizard().next()},a.exitValidation=function(a){return a},a.getFirstFreeInternal=function(){return d.get({controller:"internal"}).$promise.then(function(b){a.item.internal=b.value})["catch"](function(a){e.show(a.data.message,"danger")})},a.createItem=function(){var b=angular.copy(a.item);return b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),c.save(b).$promise.then(function(){f.path("/staff/agents/list")})["catch"](function(a){e.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.wizard",{url:"/wizard",templateUrl:"app/staff/agent/wizard/wizard.html",controller:"AgentWizardCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff",{url:"/staff",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TeamCreateCtrl",["$scope","$uibModalInstance","Team","xAlert",function(a,b,c,d){a.form={},a.item={},a.ok=function(){return c.save(a.item).$promise.then(function(){b.close(a.item)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("TeamListCtrl",["$scope","Team","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"teams.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/staff/teams/view/{{row.entity.id}}/settings",name:"profile"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){d.open({animation:!0,templateUrl:"app/staff/team/list/create.modal.html",controller:"TeamCreateCtrl"}).result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.list",{url:"/list",templateUrl:"app/staff/team/list/list.html",controller:"TeamListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Team",["$resource",function(a){return a("/api/teams/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams",{url:"/teams",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TeamViewCtrl",["$scope","$http","$stateParams","$translate","Team","Agent","xAlert",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return console.log("agents",b),e.save({id:a.team.id,controller:"agents"},{agents:b})},deselect:function(b){return e["delete"]({id:a.team.id,controller:"agents",agents:b})}}};a.initView=function(){return e.get({id:c.id}).$promise.then(function(b){a.team=b})["catch"](function(a){g.show(a.message,"danger")})},a.initAgents=function(){return f.get().$promise.then(function(b){return a.agents=b.rows,e.query({id:c.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindTeam(_.map(b,"id"),_.map(a.agents,function(a){return{id:a.id,name:a.name,fullname:a.fullname,internal:a.internal}}),h)})["catch"](function(a){g.show(a.message,"danger")})},a.updateItem=function(){var b=angular.copy(a.team);return e.update({id:c.id},b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.view",{url:"/view/:id",templateUrl:"app/staff/team/view/view.html",controller:"TeamViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.teams.view.agents",{url:"/agents",templateUrl:"app/staff/team/view/view.agents.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]}])}]}}).state("main.staff.teams.view.settings",{url:"/settings",templateUrl:"app/staff/team/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TelephoneListCtrl",["$scope","Telephone","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"fullname"},{name:"name"},{name:"accountcode"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/staff/telephones/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.list",{url:"/list",templateUrl:"app/staff/telephone/list/list.html",controller:"TelephoneListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Telephone",["$resource",function(a){return a("/api/telephones/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones",{url:"/telephones",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TelephoneViewCtrl",["$scope","$http","$stateParams","$translate","$cookieStore","Auth","xAlert","Telephone",function(a,b,c,d,e,f,g,h){a.initView=function(){a.Auth=f,a.forms={},h.get({id:c.id}).$promise.then(function(b){delete b.password,a.item=b,a.item.transport=a.item.transport?a.item.transport.split(","):[],a.item.allow=a.item.allow?a.item.allow.split(";"):[]})["catch"](function(a){g.show(a.message,"danger")})},a.updateItem=function(){var b=angular.copy(a.item);b.transport=b.transport.join(","),b.allow=b.allow.join(";"),h.update(b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.view",{url:"/view/:id",templateUrl:"app/staff/telephone/view/view.html",controller:"TelephoneViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.telephones.view.account",{url:"/account",templateUrl:"app/staff/telephone/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("TelephoneWizardCtrl",["$scope","$http","$location","WizardHandler","xAlert","$translate","Telephone",function(a,b,c,d,e,f,g){a.next=function(){d.wizard().next()},a.exitValidation=function(a){return a},a.initWizard=function(){return a.forms={},a.item={allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},g.get({id:"internal"}).$promise.then(function(b){a.item.internal=b.internal})["catch"](function(a){console.error(a)})},a.createItem=function(){var b=angular.copy(a.item);return b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),g.save(b).$promise.then(function(){c.path("/staff/telephones/list")})["catch"](function(a){e.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.wizard",{url:"/wizard",templateUrl:"app/staff/telephone/wizard/wizard.html",controller:"TelephoneWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("UserListCtrl",["$scope","User","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"users.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"email"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/staff/users/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.list",{url:"/list",templateUrl:"app/staff/user/list/list.html",controller:"UserListCtrl"})}]),angular.module("xCallyShuttleApp").factory("User",["$resource",function(a){return a("/api/users/:id/:controller",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},me:{method:"GET",params:{id:"me"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users",{url:"/users",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("UserViewCtrl",["$scope","$stateParams","$cookieStore","$translate","FileUploader","User","Auth","xAlert",function(a,b,c,d,e,f,g,h){a.Auth=g,a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.user=b,a.user.transport=a.user.transport?a.user.transport.split(","):[],a.user.allow=a.user.allow?a.user.allow.split(";"):[]})["catch"](function(a){h.show(a.message,"danger")})},a.updateItem=function(){var c=angular.copy(a.user);return delete c.password,delete c.md5secret,c.transport=c.transport.join(","),c.allow=c.allow.join(";"),f.update({id:b.id},c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.show(a.message,"danger")})},a.updatePassword=function(){var c={newPassword:a.user.newPwd};return g.isAdmin()?c.id=b.id:c.oldPassword=a.user.currentPwd,f.changePassword(c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.show(a.message,"danger")})};var i=a.uploader=new e({url:"api/users/"+b.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+c.get("token")}});i.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),i.onSuccessItem=function(b,c){a.user.userpic=c.userpic,a.user.id===g.getCurrentUser().id&&(g.getCurrentUser().userpic=c.userpic),h.show(d.instant("MESSAGE_WELL_DONE"),"success")},i.onErrorItem=function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},i.onCompleteAll=function(){i.clearQueue()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.view",{url:"/view/:id",templateUrl:"app/staff/user/view/view.html",controller:"UserViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.users.view.account",{url:"/account",templateUrl:"app/staff/user/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("UserWizardCtrl",["$scope","$location","WizardHandler","xAlert","$translate","User",function(a,b,c,d,e,f){a.forms={info:void 0,voice:void 0},a.item={role:"user",host:"dynamic",context:"from-sip"},a.next=function(){c.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return f.save(a.item).$promise.then(function(){b.path("/staff/users/list")})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.wizard",{url:"/wizard",templateUrl:"app/staff/user/wizard/wizard.html",controller:"UserWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmListCtrl",["$scope","SugarcrmAccount","gridOptions","xAlert","$translate","Modal",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"sugarcrm_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_REMOTE_ADDRESS"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/sugarcrm/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",displayName:"APPLICATION_CHECK_CONNECTION",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.get({id:a,controller:"check"}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(a){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.list",{url:"/list",templateUrl:"app/sugarcrm/list/list.html",controller:"SugarcrmListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm",{url:"/sugarcrm",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmAccount",["$resource",function(a){return a("/api/sugarcrm/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmConfiguration",["$resource",function(a){return a("/api/sugarcrm/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmField",["$resource",function(a){return a("/api/sugarcrm/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SugarcrmViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("sugarcrm_configuration"),h.unsyncUpdates("sugarcrm_field")}),a.initView=function(){b.get("/api/sugarcrm/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/sugarcrm/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/sugarcrm/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("sugarcrm_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/sugarcrm/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/sugarcrm/configurations",a.configuration).success(function(a){e.path("sugarcrm/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/sugarcrm/accounts/"+c.id+"/fields").success(function(b){a.accountFields=_.sortByOrder(f("sugarcrm")(_.toArray(b)),"name","asc"),_.forEach(b,function(a){a.options=_.toArray(a.options)})}).error(function(a){i.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/sugarcrm/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("sugarcrm_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/sugarcrm/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/sugarcrm/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){b.content="",a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.options.length>0?c.options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.view",{url:"/view/:id",templateUrl:"app/sugarcrm/view/view.html",controller:"SugarcrmViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.sugarcrm.view.account",{url:"/account",templateUrl:"app/sugarcrm/view/view.account.html"}).state("main.sugarcrm.view.configurations",{url:"/configurations",templateUrl:"app/sugarcrm/view/view.configurations.html"}).state("main.sugarcrm.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/sugarcrm/view/view.configurationSettings.html",controller:"SugarcrmViewCtrl"}).state("main.sugarcrm.view.configuration",{url:"/configuration",templateUrl:"app/sugarcrm/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmkWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("api/sugarcrm/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/sugarcrm/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.wizard",{url:"/wizard",templateUrl:"app/sugarcrm/wizard/wizard.html",controller:"SugarcrmkWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("CannedAnswer",["$resource",function(a){return a("/api/answers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers",{url:"/answers",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnswerListCtrl",["$scope","$uibModal","CannedAnswer","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"answers.csv",columnDefs:[{name:"key",displayName:"APPLICATION_NAME"},{name:"value"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/answers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.key, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){b.open({animation:!0,templateUrl:"app/tools/answer/list/list.create.modal.html",controller:"AnswerListCreateCtrl"}).result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("AnswerListCreateCtrl",["$scope","$translate","$uibModalInstance","CannedAnswer","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.list",{url:"/list",templateUrl:"app/tools/answer/list/list.html",controller:"AnswerListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AnswerViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","CannedAnswer",function(a,b,c,d,e,f,g){a.getAnswer=function(){return g.get({id:e.id}).$promise.then(function(b){a.answer=b})["catch"](function(a){c.show(a.data.message,"danger")})},a.updateAnswer=function(){var b=angular.copy(a.answer);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.view",{url:"/view/:id",templateUrl:"app/tools/answer/view/view.html",controller:"AnswerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.answers.view.settings",{url:"/settings",templateUrl:"app/tools/answer/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Automation",["$resource",function(a){return a("/api/automations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations",{url:"/automations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AutomationListCtrl",["$scope","$http","$translate","xAlert","Automation","gridOptions",function(a,b,c,d,e,f){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Automations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',
-width:100,enableFiltering:!1},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/automations/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.updateItem=function(a){return e.update({id:a.id},a).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.list",{url:"/list",templateUrl:"app/tools/automation/list/list.html",controller:"AutomationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AutomationViewCtrl",["$scope","$stateParams","$http","$translate","xAlert","automations","Automation","$location",function(a,b,c,d,e,f,g,h){a.$automations=f,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.automation[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.automation[b].splice(c,1)},a.addAction=function(){a.automation.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.automation.Actions.splice(b,1)},a.initView=function(){return g.get({id:b.id}).$promise.then(function(b){a.automation=b})["catch"](function(a){e.show(a.message,"danger"),h.path("/tools/automations/list")})},a.updateAutomation=function(){return g.update({id:b.id},a.automation).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.show(a.message,"danger")})},a.exitValidation=function(b){return console.log(b&&(a.automation.All.length||a.automation.Any.length)&&a.automation.Actions.length),b&&(a.automation.All.length||a.automation.Any.length)&&a.automation.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.view",{url:"/view/:id",templateUrl:"app/tools/automation/view/view.html",controller:"AutomationViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.automations.view.settings",{url:"/settings",templateUrl:"app/tools/automation/view/view.settings.html"}).state("main.tools.automations.view.routes",{url:"/routes",templateUrl:"app/tools/automation/view/view.routes.html"}).state("main.tools.automations.view.application",{url:"/application",templateUrl:"app/tools/automation/view/view.application.html"})}]),angular.module("xCallyShuttleApp").controller("AutomationWizardCtrl",["$scope","$http","$location","xAlert","automations","WizardHandler","Automation",function(a,b,c,d,e,f,g){a.$automations=e,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="voice",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/automations/list")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return b&&(a.item.All.length||a.item.Any.length)&&a.item.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.wizard",{url:"/wizard",templateUrl:"app/tools/automation/wizard/wizard.html",controller:"AutomationWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("Interval",["$resource",function(a){return a("/api/intervals/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals",{url:"/intervals",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("IntervalListCtrl",["$scope","$uibModal","Interval","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"intervals.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/intervals/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/interval/list/list.create.modal.html",controller:"IntervalListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("IntervalListCreateCtrl",["$scope","$translate","$uibModalInstance","Interval","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(b.instant(a.data.message),"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.list",{url:"/list",templateUrl:"app/tools/interval/list/list.html",controller:"IntervalListCtrl"})}]),angular.module("xCallyShuttleApp").controller("IntervalViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","interval",function(a,b,c,d,e,f,g,h,i,j){function k(b){console.log(b);var c,d,e,f;c=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(d=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(d+="-"+b.wd_to)):d="*",b.md_from&&"always"!==b.md_from?(e=b.md_from,b.md_to&&"always"!==b.md_to&&(e+="-"+b.md_to)):e="*",b.m_from&&"always"!==b.m_from?(f=b.m_from,b.m_to&&"always"!==b.m_to&&(f+="-"+b.m_to)):f="*",void 0!==a.selectedSubInterval?a.interval.SubIntervals[a.selectedSubInterval].interval=c+","+d+","+e+","+f:a.subinterval.interval=c+","+d+","+e+","+f}a.$translate=d,a.$interval=j.interval,a.selectedSubInterval=void 0,a.gridOptions={columnDefs:[{name:"name",displayName:"APPLICATION_NAME",headerCellFilter:"translate"},{name:"interval",displayName:"APPLICATION_INTERVAL",headerCellFilter:"translate"},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openSubInterval(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteSubInterval(row.entity.name+\' interval\', gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}]},a.forms={subinterval:void 0,general:void 0},a.initSubInterval=function(b){b&&(a.selectedSubInterval=void 0),a.subinterval={},a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0}},a.next=function(){h.wizard().next()},a.previous=function(){h.wizard().previous()},a.exitValidation=function(a){return a},a.deselectAndRedirect=function(b){a.selectedSubInterval=void 0,g.path(b)},a.getInterval=function(){b.get("/api/intervals/"+e.id).success(function(b){a.interval=b,a.gridOptions.data=b.SubIntervals}).error(function(a){console.error(a),g.path("/tools/intervals/list")})},a.openSubInterval=function(b){a.selectedSubInterval=b,g.path("/tools/intervals/view/"+e.id+"/subintervals/settings")},a.updateInterval=function(f){a.selectedSubInterval=void 0,b.put("/api/intervals/"+e.id,a.interval).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),f&&g.path("/tools/intervals/view/"+e.id+"/"+f)}).error(function(a){c.show(d.instant(a.message),"danger")})},a.getSubInterval=function(){void 0===a.selectedSubInterval&&g.path("/tools/intervals/list"),a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date)};var b,c=a.interval.SubIntervals[a.selectedSubInterval]?a.interval.SubIntervals[a.selectedSubInterval].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.splittedInterval.t_from=moment(b[0],"HH:mm"),a.splittedInterval.t_to=moment(b[1],"HH:mm"),a.splittedInterval.alwaysTime=!1):(a.splittedInterval.t_from=moment(new Date),a.splittedInterval.t_to=moment(new Date),a.splittedInterval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.splittedInterval.wd_from=b[0],a.splittedInterval.wd_to=b[1]?b[1]:"always"):(a.splittedInterval.wd_from="always",a.splittedInterval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.splittedInterval.md_from=b[0],a.splittedInterval.md_to=b[1]?b[1]:"always"):(a.splittedInterval.md_from="always",a.splittedInterval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.splittedInterval.m_from=b[0],a.splittedInterval.m_to=b[1]?b[1]:"always"):(a.splittedInterval.m_from="always",a.splittedInterval.m_to="always")}})},a.$watch("splittedInterval",function(a){a&&k(a)},!0),a.addSubInterval=function(){a.interval.SubIntervals.push(a.subinterval),a.updateInterval("subintervals")},a.deleteSubInterval=i.confirm["delete"](function(b){a.interval.SubIntervals.splice(b,1),a.updateInterval()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.view",{url:"/view/:id",templateUrl:"app/tools/interval/view/view.html",controller:"IntervalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.intervals.view.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.settings.html"}).state("main.tools.intervals.view.subintervals",{url:"/subintervals",templateUrl:"app/tools/interval/view/view.subintervals.html"}).state("main.tools.intervals.view.subinterval",{url:"/subinterval",templateUrl:"app/tools/interval/view/view.subinterval.html"}).state("main.tools.intervals.view.subintervals.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.subintervalSettings.html"})}]),angular.module("xCallyShuttleApp").controller("PauseListCtrl",["$scope","$log","$uibModal","$translate","Pause","gridOptions",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"pauses.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/pauses/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.createItem=function(){var b=c.open({animation:!0,templateUrl:"app/tools/pause/list/list.create.modal.html",controller:"PauseListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("PauseListCreateCtrl",["$scope","$translate","$uibModalInstance","Pause","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.list",{url:"/list",templateUrl:"app/tools/pause/list/list.html",controller:"PauseListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Pause",["$resource",function(a){return a("/api/pauses/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses",{url:"/pauses",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("PauseViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Pause",function(a,b,c,d,e,f,g){a.getPause=function(){return g.get({id:e.id}).$promise.then(function(b){a.pause=b})["catch"](function(a){c.show(a.data.message,"danger")})},a.updatePause=function(){var b=angular.copy(a.pause);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.view",{url:"/view/:id",templateUrl:"app/tools/pause/view/view.html",controller:"PauseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.pauses.view.settings",{url:"/settings",templateUrl:"app/tools/pause/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SoundListCtrl",["$scope","$http","socket","Modal","$q","FileUploader","$translate","xAlert","$cookieStore","$sce","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.Sound=k,a.isCollapsed=!0,a.downloadButtonContent='<i class="icon-cloud-download"></i>',a.downloadButtonClass="btn btn-xs blue-hoki",a["delete"]=d.confirm["delete"](function(a){b["delete"]("/api/sounds/"+a).success(function(a){}).error(function(a){console.log(a)})}),a.updateAudio=function(a,c){var d=e.defer();return b.put("/api/sounds/"+a,c).success(function(a){d.resolve()}).error(function(a){console.log(a.message),d.reject(a.message)}),d.promise},a.$on("$destroy",function(){c.unsyncUpdates("sound")}),a.initList=function(){b.get("/api/sounds").success(function(b){a.sounds=b.rows,b.rows.length||(a.isCollapsed=!1),c.syncUpdates("sound",a.sounds,function(){a.sounds.length||(a.isCollapsed=!1)})}).error(function(a){})};var l=a.uploader=new f({url:"/api/sounds",withCredentials:!0,headers:{Authorization:"Bearer "+i.get("token")}});l.filters.push({name:"customFilter",fn:function(a,b){return this.queue.length<10}}),l.onWhenAddingFileFailed=function(a,b,c){console.info("onWhenAddingFileFailed",a,b,c)},l.onAfterAddingFile=function(a){console.info("onAfterAddingFile",a)},l.onAfterAddingAll=function(a){console.info("onAfterAddingAll",a)},l.onBeforeUploadItem=function(a){console.info("onBeforeUploadItem",a)},l.onProgressItem=function(a,b){console.info("onProgressItem",a,b),a.isUploading=!0},l.onProgressAll=function(a){console.info("onProgressAll",a)},l.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),a.isUploading=!1},l.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),a.responseMessage=b,a.isUploading=!1},l.onCancelItem=function(a,b,c,d){console.info("onCancelItem",a,b,c,d),a.isUploading=!1},l.onCompleteItem=function(a,b,c,d){console.info("onCompleteItem",a,b,c,d),a.isUploading=!1},l.onCompleteAll=function(){console.info("onCompleteAll")},console.info("uploader",l)}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds.list",{url:"/list",templateUrl:"app/tools/sound/list/list.html",controller:"SoundListCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("Sound",["$resource",function(a){return a("/api/sounds/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds",{url:"/sounds",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TagListCtrl",["$scope","$uibModal","Tag","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"tag.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/tags/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/tag/list/list.create.modal.html",controller:"TagListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("TagListCreateCtrl",["$scope","$translate","$uibModalInstance","Tag","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.list",{url:"/list",templateUrl:"app/tools/tag/list/list.html",controller:"TagListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Tag",["$resource",function(a){return a("/api/tags/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags",{url:"/tags",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TagViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Tag",function(a,b,c,d,e,f,g){a.getTag=function(){return g.get({id:e.id}).$promise.then(function(b){a.tag=b})["catch"](function(a){c.show(a.data.message,"danger")})},a.updateTag=function(){var b=angular.copy(a.tag);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.view",{url:"/view/:id",templateUrl:"app/tools/tag/view/view.html",controller:"TagViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.tags.view.settings",{url:"/settings",templateUrl:"app/tools/tag/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateListCtrl",["$scope","Template","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"templates.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/tools/templates/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.list",{url:"/list",templateUrl:"app/tools/template/list/list.html",controller:"TemplateListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Template",["$resource",function(a){return a("/api/mail/templates/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates",{url:"/templates",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TemplateViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","Template",function(a,b,c,d,e,f){a.initItem=function(){a.form={},a.item={},a.groups=[{title:"Voice",variables:[]},{title:"Chat",variables:["username","email","text","chatWebsite"]},{title:"Mail",variables:[]},{title:"Fax",variables:[]}],a.item=f.get({id:d.id})},a.updateItem=function(){f.update(a.item).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.view",{url:"/view/:id",templateUrl:"app/tools/template/view/view.html",controller:"TemplateViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.templates.view.settings",{url:"/settings",templateUrl:"app/tools/template/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateWizardCtrl",["$scope","$location","$http","WizardHandler","xAlert","Template",function(a,b,c,d,e,f){a.initWizard=function(){a.item={},a.form={},a.groups=[{title:"Voice",variables:[]},{title:"Chat",variables:["username","email","text","chatWebsite"]},{title:"Mail",variables:[]},{title:"Fax",variables:[]}]},a.next=function(){d.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return f.save({name:a.item.name,description:a.item.description,subject:a.item.subject||null,html:a.item.html||null,text:a.item.text||null}).$promise.then(function(){b.path("/tools/templates/list")})["catch"](function(a){e.show(data.err.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.wizard",{url:"/wizard",templateUrl:"app/tools/template/wizard/wizard.html",controller:"TemplateWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools",{url:"/tools",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TriggerListCtrl",["$scope","$http","$translate","Modal","xAlert","Trigger","gridOptions",function(a,b,c,d,e,f,g){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Triggers.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',width:100,enableFiltering:!1},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/triggers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=g.gridOptions(f,b,a)},a.updateItem=function(a){return f.update({id:a.id},a).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.list",{url:"/list",templateUrl:"app/tools/trigger/list/list.html",controller:"TriggerListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trigger",["$resource",function(a){return a("/api/triggers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers",{url:"/triggers",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TriggerViewCtrl",["$scope","$stateParams","$translate","xAlert","triggers","Trigger","$location",function(a,b,c,d,e,f,g){a.$triggers=e,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.trigger[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.trigger[b].splice(c,1)},a.addAction=function(){a.trigger.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.trigger.Actions.splice(b,1)},a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.trigger=b})["catch"](function(a){d.show(a.message,"danger"),g.path("/tools/triggers/list")})},a.updateTrigger=function(){return f.update({id:b.id},a.trigger).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},a.exitValidation=function(b){return console.log(b&&(a.trigger.All.length||a.trigger.Any.length)&&a.trigger.Actions.length),b&&(a.trigger.All.length||a.trigger.Any.length)&&a.trigger.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.view",{url:"/view/:id",templateUrl:"app/tools/trigger/view/view.html",controller:"TriggerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.triggers.view.settings",{url:"/settings",templateUrl:"app/tools/trigger/view/view.settings.html"}).state("main.tools.triggers.view.routes",{url:"/routes",templateUrl:"app/tools/trigger/view/view.routes.html"}).state("main.tools.triggers.view.application",{url:"/application",templateUrl:"app/tools/trigger/view/view.application.html"})}]),angular.module("xCallyShuttleApp").controller("TriggerWizardCtrl",["$scope","$http","$location","xAlert","triggers","WizardHandler","Trigger",function(a,b,c,d,e,f,g){a.$triggers=e,a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="voice",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/triggers/list")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return b&&(a.item.All.length||a.item.Any.length)&&a.item.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.wizard",{url:"/wizard",templateUrl:"app/tools/trigger/wizard/wizard.html",controller:"TriggerWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("TrunkListCtrl",["$scope","Trunk","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"Trunks.csv",columnDefs:[{name:"name"},{name:"host"},{name:"context"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/trunks/view/{{row.entity.name}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.list",{url:"/list",templateUrl:"app/tools/trunk/list/list.html",controller:"TrunkListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trunk",["$resource",function(a){return a("/api/trunks/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks",{url:"/trunks",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TrunkViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","Trunk","VoiceContext",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return h.get({id:e.id}).$promise.then(function(b){b.nat=b.nat?b.nat.split(","):[],b.allow=b.allow?b.allow.split(";"):[],b.insecure=b.insecure?b.insecure.split(","):[],b.transport=b.transport?b.transport.split(","):[],a.trunk=b})["catch"](function(a){console.error(a),g.path("/tools/trunks/list")})},a.updateTrunk=function(){""===a.trunk.password&&delete a.trunk.password;var b=angular.copy(a.trunk);return b.nat=b.nat.join(","),b.allow=b.allow.join(";"),b.insecure=b.insecure.join(","),b.transport=b.transport.join(","),h.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.show(a.data.message,"danger")})},a.getContexts=function(){return i.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){c.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.view",{url:"/view/:id",templateUrl:"app/tools/trunk/view/view.html",controller:"TrunkViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.trunks.view.settings",{url:"/settings",templateUrl:"app/tools/trunk/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TrunkWizardCtrl",["$scope","$http","WizardHandler","$location","xAlert","socket","$translate",function(a,b,c,d,e,f,g){a.initWizard=function(){a.forms={},a.item={context:"from-voip-provider"}},a.next=function(d){d?b.post("/api/trunks/validate/",a.item).success(function(a){console.log(a),a.length?e.show(g.instant("MESSAGE_EXIST_TRUNK"),"danger"):c.wizard().next()}).error(function(a){e.show(g.instant(a.message),"danger")}):c.wizard().next()},a.previous=function(){c.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("/api/trunks/",a.item).success(function(){d.path("/tools/trunks/list");
-}).error(function(a){e.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.wizard",{url:"/wizard",templateUrl:"app/tools/trunk/wizard/wizard.html",controller:"TrunkWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("VariableListCtrl",["$scope","$uibModal","Variable","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"variables.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/variables/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/variable/list/list.create.modal.html",controller:"VariableListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VariableListCreateCtrl",["$scope","$translate","$uibModalInstance","Variable","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.list",{url:"/list",templateUrl:"app/tools/variable/list/list.html",controller:"VariableListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Variable",["$resource",function(a){return a("/api/variables/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables",{url:"/variables",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VariableViewCtrl",["$scope","$translate","$stateParams","xAlert","Variable",function(a,b,c,d,e){a.getVariable=function(){return e.get({id:c.id}).$promise.then(function(b){a.variable=b})["catch"](function(a){d.show(a.data.message,"danger")})},a.updateVariable=function(){return e.update({id:c.id},a.variable).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.view",{url:"/view/:id",templateUrl:"app/tools/variable/view/view.html",controller:"VariableViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.variables.view.settings",{url:"/settings",templateUrl:"app/tools/variable/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCloneModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCtrl",["$scope","$http","$translate","xAlert","Modal","$uibModal","$log","YourDashboard","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:220,buttons:[{"class":"green",href:"/tools/yourdashboards/show/{{row.entity.id}}",name:"view"},{"class":"blue-hoki",href:"/tools/yourdashboards/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"purple",name:"clone",onClick:"grid.appScope.clone(row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var b=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/create.modal.html",controller:"YourdashboardListCreateModalCtrl"});b.result.then(function(b){return h.save(b).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})},a.clone=function(b){var e=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/clone.modal.html",controller:"YourdashboardListCloneModalCtrl"});e.result.then(function(e){return h.save({id:b,controller:"clone"},e).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.list",{url:"/list",templateUrl:"app/tools/yourdashboard/list/list.html",controller:"YourdashboardListCtrl"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardShowCtrl",["$scope","localStorageService","$http","xAlert","$translate","Auth","$stateParams","$location",function(a,b,c,d,e,f,g,h){a.Auth=f,a.getDashboard=function(){c.get("/api/dashboards/"+g.id).success(function(b){var c={name:"dashboard",structure:"4-8",enableconfirmdelete:!0,maximizable:!0,collapsible:!0};b.model=JSON.parse(b.model||'{"title":"Dashboard"}'),b.editable=f.isAdmin()&&b.editable?!0:!1,a.dashboard=_.merge(c,b)}).error(function(a){h.path("/tools/yourdashboards/list")})};var i=function(b,f,h){var i=angular.copy(a.dashboard);i.name=a.dashboard.model.title,i.model=JSON.stringify(i.model),c.put("/api/dashboards/"+g.id,i).success(function(){d.show(e.instant("MESSAGE_DASHBOARD_SAVED")+"!","success")}).error(function(b){d.show(b.message,"danger"),i.model=JSON.parse(i.model),i.name="dashboard",a.dashboard=i})};a.$on("adfDashboardChanged",i),a.$on("destroy",function(){console.log("main dashboard")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.show",{url:"/show/:id",templateUrl:"app/tools/yourdashboard/show/show.html",controller:"YourdashboardShowCtrl"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.getDashboard=function(){b.get("/api/dashboards/"+e.id).success(function(b){delete b.model,a.dashboard=b}).error(function(a){f.path("/tools/yourdashboards/list")})},a.updateDashboard=function(){var f=angular.copy(a.dashboard);b.put("/api/dashboards/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.dashboard=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.view",{url:"/view/:id",templateUrl:"app/tools/yourdashboard/view/view.html",controller:"YourdashboardViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.yourdashboards.view.settings",{url:"/settings",templateUrl:"app/tools/yourdashboard/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("YourDashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards",{url:"/yourdashboards",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskListCtrl",["$scope","ZendeskAccount","gridOptions","xAlert","$translate",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"zendesk_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_REMOTE_ADDRESS"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",displayName:"APPLICATION_CHECK_CONNECTION",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.check({id:a}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.list",{url:"/list",templateUrl:"app/zendesk/list/list.html",controller:"ZendeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations",{url:"/configurations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationListCtrl",["$scope","$stateParams","$translate","gridOptions","ZendeskConfiguration","$uibModal","xAlert",function(a,b,c,d,e,f,g){a.initView=function(){var c={exporterCsvFilename:"zendesk_configurations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.AccountId}}/configurations/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(e,c,a,{accountId:b.id})},a.createItem=function(){var c=f.open({animation:!0,templateUrl:"app/zendesk/view/configuration/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});c.result.then(function(c){return e.save({accountId:b.id},c).$promise.then(function(){a.gridOptions.getPage()})["catch"](function(a){g.show(a.data.message,"danger")})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.list",{url:"/list",templateUrl:"app/zendesk/view/configuration/list/list.html",controller:"ZendeskViewConfigurationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationViewCtrl",["$scope","$stateParams","$filter","$translate","socket","ZendeskConfiguration","xAlert","variable","Variable","ZendeskAccount","Tag","ZendeskField",function(a,b,c,d,e,f,g,h,i,j,k,l){a.$on("$destroy",function(){e.unsyncUpdates("zendesk_field")}),a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:300,scrollInertia:0},a.fieldType=[{type:"string",title:"String"},{type:"variable",title:"Variable"},{type:"customVariable",title:"Custom Variable"}],a.descFieldType=[{type:"string",title:"String"},{type:"keyValue",title:"Key Value"}],a.initView=function(){a.configurationName="",a.subjectConfig=[],a.descriptionConfig=[],a.fieldConfig=[],a.selectedTags={tags:[]},a.variables=h},a.getConfiguration=function(){return f.get({accountId:b.id,id:b.configurationId}).$promise.then(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,a.selectedTags={tags:_.map(b.Tags,function(a){return a.id})},e.socket.on("zendesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})})["catch"](function(a){g.show(a.message,"danger")})},a.getCustomVariables=function(){return i.get().$promise.then(function(b){a.customVariables=b.rows})["catch"](function(a){g.show(a.message,"danger")})},a.getFields=function(){return j.fields({id:b.id}).$promise.then(function(b){a.accountFields=c("zendesk")(b)})["catch"](function(a){g.show(a.message,"danger")})},a.getTags=function(){return k.get().$promise.then(function(b){a.tags=b.rows})["catch"](function(a){g.show(a.message,"danger")})},a.addItem=function(c){switch(c){case"subject":case"description":var d={type:"string",content:""};break;case"field":var d={content:""}}return f.save({accountId:b.id,id:b.configurationId,controller:c},d).$promise.then(function(b){switch(c){case"subject":a.subjectConfig.push(b);break;case"description":a.descriptionConfig.push(b);break;case"field":a.fieldConfig.push(b)}})["catch"](function(a){g.show(a.data.message,"danger")})},a.changeType=function(b){"variable"===b.type?(b.content="",b.variableName=""):"string"===b.type?(b.VariableId=null,b.variableName=""):"customVariable"===b.type&&(b.VariableId=null,b.content=""),a.updateField(b)},a.updateField=function(a){return l.update({accountId:b.id,configurationId:b.configurationId,id:a.id},a).$promise.then(function(){})["catch"](function(){g.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.removeItem=function(a){return l["delete"]({accountId:b.id,configurationId:b.configurationId,id:a.id}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(){g.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.changeDescType=function(b){"keyValue"===b.type?(b.content="","string"===b.keyType?(b.VariableId=null,b.variableName=""):"variable"===b.keyType?(b.keyContent="",b.VariableId=null):"customVariable"===b.keyType&&(b.keyContent="",b.variableName="")):"string"===b.type&&(b.VariableId=null,b.variableName="",b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.variableName="",b.nameField="",b.VariableId=null,b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(c.system_field_options?(b.customField=!1,b.nameField=c.title.toLowerCase()):b.customField=!0)}a.updateField(b)},a.updateTags=function(){return f.update({accountId:b.id,id:b.configurationId,controller:"tags"},a.selectedTags.tags).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){g.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.system_field_options?c.system_field_options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.view",{url:"/view/:configurationId",templateUrl:"app/zendesk/view/configuration/view/view.html",controller:"ZendeskViewConfigurationViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewCtrl",["$scope","$stateParams","$translate","xAlert","Modal","ZendeskAccount",function(a,b,c,d,e,f){a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.account=b})["catch"](function(a){d.show(a.message,"danger")})},a.updateItem=function(){return f.update({id:b.id},a.account).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(){d.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view",{url:"/view/:id",templateUrl:"app/zendesk/view/view.html",controller:"ZendeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.zendesk.view.account",{url:"/account",templateUrl:"app/zendesk/view/view.account.html"})}]),angular.module("xCallyShuttleApp").controller("ZendeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler","ZendeskAccount",function(a,b,c,d,e,f,g){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.authType="password"},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/zendesk/list")})["catch"](function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.wizard",{url:"/wizard",templateUrl:"app/zendesk/wizard/wizard.html",controller:"ZendeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("ZendeskAccount",["$resource",function(a){return a("/api/zendesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"},fields:{params:{controller:"fields"},isArray:!0},check:{params:{controller:"check"}}})}]).factory("ZendeskConfiguration",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]).factory("ZendeskField",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:configurationId/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk",{url:"/zendesk",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").service("application",function(){var a={applications:[{name:"Queue",value:"Queue"},{name:"Playback",value:"Playback"},{name:"Dial",value:"Dial"},{name:"Cally-Square IVR",value:"AGI"},{name:"GoTo",value:"Goto"},{name:"Hangup",value:"Hangup"},{name:"Set",value:"Set"},{name:"Custom",value:"custom"},{name:"VoiceMail",value:"Voicemail"}],queueOptions:[{value:"C",name:"APPLICATION_QUEUE_OPTION_C"},{value:"c",name:"APPLICATION_QUEUE_OPTION_c"},{value:"d",name:"APPLICATION_QUEUE_OPTION_d"},{value:"F",name:"APPLICATION_QUEUE_OPTION_F"},{value:"h",name:"APPLICATION_QUEUE_OPTION_h"},{value:"H",name:"APPLICATION_QUEUE_OPTION_H"},{value:"n",name:"APPLICATION_QUEUE_OPTION_n"},{value:"i",name:"APPLICATION_QUEUE_OPTION_i"},{value:"I",name:"APPLICATION_QUEUE_OPTION_I"},{value:"r",name:"APPLICATION_QUEUE_OPTION_r"},{value:"R",name:"APPLICATION_QUEUE_OPTION_R"},{value:"t",name:"APPLICATION_QUEUE_OPTION_t"},{value:"T",name:"APPLICATION_QUEUE_OPTION_T"},{value:"w",name:"APPLICATION_QUEUE_OPTION_w"},{value:"W",name:"APPLICATION_QUEUE_OPTION_W"},{value:"k",name:"APPLICATION_QUEUE_OPTION_k"},{value:"K",name:"APPLICATION_QUEUE_OPTION_K"},{value:"x",name:"APPLICATION_QUEUE_OPTION_x"},{value:"X",name:"APPLICATION_QUEUE_OPTION_X"}],audioOptions:[{value:"skip",name:"APPLICATION_PLAYBACK_OPTION_SKIP"},{value:"noanswer",name:"APPLICATION_PLAYBACK_OPTION_NOANSWER"},{value:"j",name:"APPLICATION_PLAYBACK_OPTION_J"},{value:"say",name:"APPLICATION_PLAYBACK_OPTION_SAY"}],hangupCauses:[{value:"",name:"--"},{value:"1",name:"APPLICATION_HANGUP_CAUSE_1"},{value:"16",name:"APPLICATION_HANGUP_CAUSE_16"},{value:"17",name:"APPLICATION_HANGUP_CAUSE_17"},{value:"18",name:"APPLICATION_HANGUP_CAUSE_18"},{value:"21",name:"APPLICATION_HANGUP_CAUSE_21"},{value:"22",name:"APPLICATION_HANGUP_CAUSE_22"},{value:"27",name:"APPLICATION_HANGUP_CAUSE_27"},{value:"38",name:"APPLICATION_HANGUP_CAUSE_38"},{value:"41",name:"APPLICATION_HANGUP_CAUSE_41"}],intTypes:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"custom",name:"APPLICATION_CUSTOM"},{value:"list",name:"APPLICATION_FROM_LIST"}],checkUnderscore:function(a){return 0===a.indexOf("_")?a:"_"+a}};return{application:a}}),angular.module("xCallyShuttleApp").factory("Auth",["$location","$rootScope","$http","User","$cookieStore","$q",function(a,b,c,d,e,f){var g={};return e.get("token")&&(g=d.me()),{login:function(a,h){var i=h||angular.noop,j=f.defer();return c.post("/auth/local",{name:a.name,password:a.password,remember:a.remember}).success(function(a){return e.put("role",a.role),e.put("token",a.token),e.put("userId",a.userId),g=d.me({},function(){b.$broadcast("login")}),j.resolve(a),i()}).error(function(a){return this.logout(),j.reject(a),i(a)}.bind(this)),j.promise},loginWithToken:function(a,b,c){e.put("token",a),e.put("userId",b),e.put("name",c),g=d.me()},logout:function(){c.put("/api/users/"+g.id,{online:!1}).success(function(){e.remove("role"),e.remove("token"),e.remove("userId"),g={},b.$broadcast("logout")}).error(function(a){return a})},createUser:function(a,b){var c=b||angular.noop;return d.save(a,function(b){return e.put("token",b.token),g=d.me(),c(a)},function(a){return this.logout(),c(a)}.bind(this)).$promise},changePassword:function(a,b,c){var e=c||angular.noop;return d.changePassword({id:g.id},{oldPassword:a,newPassword:b},function(a){return e(null,a)},function(a){return e(a)}).$promise},getCurrentUser:function(){return g},isLoggedIn:function(){return g.hasOwnProperty("role")},isLoggedInAsync:function(a){g.hasOwnProperty("$promise")?g.$promise.then(function(){a(!0)})["catch"](function(){a(!1)}):a(g.hasOwnProperty("role")?!0:!1)},isAdmin:function(){return"admin"===(e.get("role")||g.role)||"user"===(e.get("role")||g.role)},getRole:function(){return g.role},getToken:function(){return e.get("token")},getUserId:function(){return console.log(e.get("userId")),e.get("userId")},getName:function(){return e.get("name")}}}]),angular.module("xCallyShuttleApp").service("automations",function(){var a={voice:{conditions:[],actions:[]},mail:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},chat:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},fax:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]}},b=["voice","mail","chat","fax"];return{services:a,channels:b}}),angular.module("xCallyShuttleApp").service("desk_com",function(){var a=[{id:"priority",label:"Priority",custom:!1,data:{choices:[1,2,3,4,5,6,7,8,9,10]}},{id:"status",label:"Status",custom:!1,data:{choices:["new","open","pending","resolved","closed"]}},{id:"type",label:"Type",custom:!1,data:{choices:["chat","twitter","email","qna","facebook","phone"]}}];return{fields:a}}),angular.module("xCallyShuttleApp").controller("FooterController",["$scope","$http",function(a,b){a.year=moment().year(),a.$on("$includeContentLoaded",function(){Layout.initFooter()}),a.initFooter=function(){b.get("/api/settings/info").success(function(b){a.info=b}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("HeaderController",["$scope","$rootScope","$location","$state","$http","$notification","Auth","xAlert","socket","ngAudio","settings","toastr","localStorageService","MailReport","ChatReport",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a.toggleQuickSidebar=function(){k.layout.pageQuickSidebarOpened=!k.layout.pageQuickSidebarOpened,k.layout.pageQuickSidebarOpened||m.remove("chatRoomId")},a.toogleSidebar=function(){k.layout.pageSidebarClosed=!k.layout.pageSidebarClosed,m.set("sidebarClosed",k.layout.pageSidebarClosed)},a.initHeader=function(){var c=j.load("api/xchatty/assets?resource=notification/xc_blubb.mp3"),d={};"agent"===g.getCurrentUser().role&&(i.socket.on("report_mail:save",function(a){c.play();var d=f("MAIL CHANNEL",{icon:"assets/images/media/channels/mail64.png",body:"NEW Incoming Mail Message!",delay:1e3*a.timeslot});d.$on("click",function(){return n.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){h.show("Mail properly assigned","success"),b.$broadcast("mailMessageEvent",{message:"Mail properly assigned.."})})["catch"](function(a){h.show(a.data.message,"danger")})})}),i.socket.on("report_chat:save",function(a){c.play(),d[a.uniqueid]&&(d[a.uniqueid].close(),delete d[a.uniqueid]),d[a.uniqueid]=f("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Chat Visitor!",delay:1e3*a.timeslot}),d[a.uniqueid].$on("click",function(){return o.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){h.show("Chat properly assigned","success"),b.$broadcast("mailMessageEvent",{message:"Chat properly assigned.."})})["catch"](function(a){h.show(a.data.message,"danger")})})}),i.socket.on("chat_message:save",function(a){c.play();var d=m.get("chatRoomId");if((!d||d!==a.ChatRoomId)&&a.UserId&&a.UserId!==g.getCurrentUser().id){var e=f(a.User.fullname,{icon:"assets/images/media/channels/chat64.png",body:a.body.length>35?a.body.substring(0,35)+"...":a.body,delay:1e4});e.$on("click",function(){b.$broadcast("chatMessageEvent",{chatRoomId:a.ChatRoomId})})}}),i.socket.on("user_has_chat_room:save",function(a){c.play(),b.$broadcast("chatGroupEvent",a)})),e({url:"/api/fax/user_has_queues",method:"GET",params:{UserId:g.getCurrentUser().id}}).success(function(b){a.faxQueues=_.map(b,"FaxQueueId"),a.faxQueues.forEach(function(a){i.socket.on("FAX:QUEUE:"+a,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})})}),i.socket.on("FAX:AGENT:"+g.getCurrentUser().id,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){b(g.getCurrentUser().id),l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})})}).error(function(a){console.error(a)}),i.socket.on("user_has_fax_queue:save",function(b){b=_.map(b,function(a){return a.UserId=parseInt(a.UserId,10),a}),b=_.find(b,{UserId:g.getCurrentUser().id}),b&&-1===_.indexOf(a.faxQueues,b.FaxQueueId)&&(a.faxQueues.push(b.FaxQueueId),i.socket.on("FAX:QUEUE:"+b.FaxQueueId,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){b(g.getCurrentUser().id),l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})}))}),i.socket.on("user_has_fax_queue:remove",function(b){_.indexOf(b.where.UserId,g.getCurrentUser().id.toString())>=0&&_.indexOf(a.faxQueues,b.where.FaxQueueId)>=0&&(a.faxQueues=_.remove(a.faxQueues,b.where.FaxQueueId),i.socket.removeAllListeners("FAX:QUEUE:"+b.where.FaxQueueId))})},a.logout=function(){e.get("/auth/local/logout").success(function(){g.logout(),c.path("/login")}).error(function(a){console.error(a)})},a.isActive=function(a){return a===c.path()}}]),angular.module("xCallyShuttleApp").service("interval",function(){var a={months:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"jan",name:"APPLICATION_JANUARY"},{value:"feb",name:"APPLICATION_FEBRUARY"},{value:"mar",name:"APPLICATION_MARCH"},{value:"apr",name:"APPLICATION_APRIL"},{value:"may",name:"APPLICATION_MAY"},{value:"jun",name:"APPLICATION_JUNE"},{value:"jul",name:"APPLICATION_JULY"},{value:"aug",name:"APPLICATION_AUGUST"},{value:"sep",name:"APPLICATION_SEPTEMBER"},{value:"oct",name:"APPLICATION_OCTOBER"},{value:"nov",name:"APPLICATION_NOVEMBER"},{value:"dec",name:"APPLICATION_DECEMBER"}],daysOfWeek:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"mon",name:"APPLICATION_MONDAY"},{value:"tue",name:"APPLICATION_TUESDAY"},{value:"wed",name:"APPLICATION_WEDNESDAY"},{value:"thu",name:"APPLICATION_THURSDAY"},{value:"fri",name:"APPLICATION_FRIDAY"},{value:"sat",name:"APPLICATION_SATURDAY"},{value:"sun",name:"APPLICATION_SUNDAY"}],daysOfMonth:["always",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]};return{interval:a}}),angular.module("xCallyShuttleApp").factory("Modal",["$rootScope","$uibModal",function(a,b){function c(c,d){console.log("openModal",d);var e=a.$new();return c=c||{},d=d||"modal-default",angular.extend(e,c),b.open({templateUrl:"components/modal/delete.html",windowClass:d,scope:e})}return{confirm:{"delete":function(a){return a=a||angular.noop,function(){console.log(Array.prototype.slice.call(arguments));var b,d=Array.prototype.slice.call(arguments),e=d.shift();b=c({modal:{dismissable:!0,title:"Confirm Delete",html:"<p>Are you sure you want to delete"+(e?"<strong> "+e+"</strong>":" selected items")+"?</p>",buttons:[{classes:"btn red",text:"Delete",click:function(a){b.close(a)}},{classes:"btn default",text:"Cancel",click:function(a){b.dismiss(a)}}]}},"over-topbar center"),b.result.then(function(b){a.apply(b,d)})}}}}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarControllerAddModal",["$scope","$uibModalInstance","Agent","items",function(a,b,c,d){a.items=d,a.agents=c.get(function(b){a.agents=b,a.items.forEach(function(b){_.remove(a.agents.rows,{id:b.id})})}),a.selected={items:[]},a.modal={title:"APPLICATION_AGENTS_SELECTION"},a.ok=function(){b.close(_.union(_.map(a.selected.items,"id"),_.map(a.items,"id")))},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarControllerCloseModal",["$scope","$uibModalInstance",function(a,b){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_CHAT"},a.ok=function(){b.close()},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarController",["$scope","$rootScope","$window","$http","$uibModal","$log","$timeout","$interval","Auth","Agent","User","ChatRoom","ChatMessage","socket","settings","localStorageService","xAlert","$translate","QuickSidebarFactory",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){
-a.emojiMessage={},a.options=s.options,a.message={body:"",user:""};var t=a.currentUser=i.getCurrentUser(),u=function(b){switch(a.messagesTab=!0,o.layout.pageQuickSidebarOpened=!0,p.set("chatRoomId",b.id),p.set("messagesTab",a.messagesTab),a.chatRoom=b,b.type){case"internal":a.currentTab=0;break;case"external":a.currentTab=2,_.find(a.chatRooms,{id:b.id})||a.chatRooms.push(b)}b.Users.length>2&&(a.currentTab=3),g(function(){angular.element("page-quick-sidebar-chat-user-messages").mCustomScrollbar("scrollTo","last")},1500)},v=function(a){console.error(a)};a.$on("$includeContentLoaded",function(){p.get("chatRoomId")&&l.get({id:p.get("chatRoomId")},u,v),p.get("currentTab")&&(a.currentTab=p.get("currentTab"))}),a.agents=j.get({offset:0,limit:1e3},function(){n.syncUpdates("agent",a.agents.rows)}),a.users=k.get({offset:0,limit:1e3},function(){n.syncUpdates("user",a.users.rows)}),a.currentTab=0,a.messagesTab=!1,a.chatRooms=l.me(function(b){a.chatRooms=b},function(a){console.error(a)}),n.socket.on("report_chat:assignment",function(a){a.agentid&&l.get({id:a.chatroomid},u,v)}),n.socket.on("chat_room:save",function(b){if(a.chatRoom&&a.chatRoom.id===b.id){_.merge(a.chatRoom,b);var c=_.find(a.chatRooms,{id:b.id});c&&_.merge(c,b)}}),n.socket.on("chat_message:save",function(b){a.chatRoom&&a.chatRoom.id===b.ChatRoomId&&(a.chatRoom.ChatMessages.push(b),angular.element("page-quick-sidebar-chat-user-messages").mCustomScrollbar("scrollTo","last"))}),n.socket.on("user_has_chat_room:save",function(b){var c=_.findIndex(a.chatRooms,{id:b.id});c>=0?a.chatRooms[c]=b:a.chatRooms.push(b)}),b.$on("chatMessageEvent",function(a,b){l.get({id:b.chatRoomId},u,v)}),b.$on("chatGroupEvent",function(b,c){a.currentTab=3,a.messagesTab=!0,o.layout.pageQuickSidebarOpened=!0,a.chatRoom=c}),a.goToTab=function(b){a.currentTab=b,a.messagesTab=!1,a.chatRoom=null,p.set("currentTab",a.currentTab),p.set("messagesTab",a.messagesTab),p.remove("chatRoomId")},a.goToMessage=function(a,b){a?l.users({users:[t.id,a]},u,v):l.get({id:b},u,v)},a.sendMessage=function(){a.message.body.trim().length&&m.save({ChatRoomId:a.chatRoom.id,body:a.message.body},function(){a.message.body=""},function(a){console.error(a)})},a.goBack=function(){a.messagesTab=!1,a.chatRoom=null,p.set("messagesTab",a.messagesTab),p.remove("chatRoomId")},a.closeChatRoom=function(a,b){var c=e.open({animation:!0,size:b,templateUrl:"components/quickSidebar/modal/close.html",controller:"QuickSidebarControllerCloseModal"});c.result.then(function(){l.update({id:a,status:"CLOSED",completeReason:"agent"}).$promise.then(function(){q.show(r.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){q.show(a.data.message,"danger")})})},a.addAgent=function(b,c){var f=e.open({animation:!0,size:c,templateUrl:"components/quickSidebar/modal/add.html",controller:"QuickSidebarControllerAddModal",resolve:{items:function(){return _.map(a.chatRoom.Users?a.chatRoom.Users:[],function(a){return{id:a.id,fullname:a.fullname}})}}});f.result.then(function(a){d.put("/api/chat/rooms/"+b+"/users",{users:a}).then(function(){q.show(r.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){q.show(a.data.message,"danger")})})};var w=function(){var b=angular.element(c),d=function(){return{h:b.height(),w:b.width()}};a.$watch(d,function(b){a.style={height:b.h-46-46-46+"px"},a.style2={height:b.h-46-46-46-180+"px"}},!0),b.bind("resize",function(){a.$apply()})};w(),a.$on("$destroy",function(){n.unsyncUpdates("agent"),n.unsyncUpdates("user")})}]),angular.module("xCallyShuttleApp").directive("resizeQuickSidebar",["$window",function(a){return function(b){var c=angular.element(a);b.getWindowDimensions=function(){return{h:c.height(),w:c.width()}},b.$watch(b.getWindowDimensions,function(a){b.style={height:a.h-46-46-46+"px"}},!0),c.bind("resize",function(){b.$apply()})}}]),angular.module("xCallyShuttleApp").factory("QuickSidebarFactory",function(){return{options:{link:!0,linkTarget:"_blank",pdf:{embed:!1},image:{embed:!0},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,ytAuthKey:"_nkO9h1A7HlVyiUICO17oA"}}}}),angular.module("xCallyShuttleApp").filter("QuickSidebarFilterUsersGreaterThan",function(){return function(a,b){var c=[];return a.forEach(function(a){var d=0;a.ChatVisitor&&d++,d+=a.Users.length,d>b&&c.push(a)}),c}}).filter("QuickSidebarFilterUsersLowerThan",function(){return function(a,b){var c=[];return a.forEach(function(a){a.Users.length<b&&c.push(a)}),c}}),angular.module("xCallyShuttleApp").controller("SidebarController",["$scope","$rootScope","$resource","$location","Auth","$http","xAlert","$stateParams","socket",function(a,b,c,d,e,f,g,h,i){a.Auth=e,a.$stateParams=h,a.$on("$includeContentLoaded",function(){Metronic.init(),Layout.initSidebar()}),a.isAssociated=function(a){if(e.isAdmin())return!0;if(e.getCurrentUser().Modules)for(var b=0;b<e.getCurrentUser().Modules.length;b++)if(e.getCurrentUser().Modules[b].name===a)return!0;return!1},a.getSidebarDashboards=function(){f.get("/api/dashboards").then(function(b){a.dashboards=b.data.rows,i.syncUpdates("dashboard",a.dashboards)})["catch"](function(a){g.show("Error loading your dashboards","danger")})},a.getSidebarIntegrations=function(){f.get("/api/integrations").success(function(b){a.integrations=b.rows,i.syncUpdates("integration",a.integrations)}).error(function(a){g.show(a.message,"danger")})},a.isActive=function(a){return a===d.path()},a.$on("destroy",function(){i.unsyncUpdates("dashboard"),i.unsyncUpdates("integration")})}]),angular.module("xCallyShuttleApp").factory("socket",["$rootScope","$window","socketFactory","Auth",function(a,b,c,d){var e=d.getCurrentUser(),f=io("",{query:"token="+d.getToken()+"&userId="+(e.id||d.getUserId())+"&name="+(e.name||d.getName())+"&role="+(e.role||"agent")+"&source=browser",path:"/socket.io-client"}),g=c({ioSocket:f});return a.$on("logout",function(){g&&(g.disconnect(!0),b.location.reload())}),{socket:g,syncUpdates:function(a,b,c){c=c||angular.noop,g.on(a+":save",function(a){var d=_.find(b,{id:a.id}),e=b.indexOf(d),f="created";d?(_.merge(b[e],a),f="updated"):b.unshift(a),c(f,a,b)}),g.on(a+":remove",function(a){var d="deleted";_.remove(b,{id:a.id}),c(d,a,b)})},unsyncUpdates:function(a){g.removeAllListeners(a+":save"),g.removeAllListeners(a+":remove")},syncUpdatesByAttributes:function(a,b,c,d){d=d||angular.noop,g.on(a+":save",function(a){var e=!0;if(_.forIn(b,function(b,c){return a[c]&&a[c]===b?!0:e=!1}),e){var f=_.find(c,{id:a.id}),g=c.indexOf(f),h="created";f?(_.merge(c[g],a),h="updated"):c.unshift(a),d(h,a,c)}}),g.on(a+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},syncMailMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncMailMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")},syncFaxMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncFaxMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")}}}]),angular.module("xCallyShuttleApp").service("triggers",["VoiceQueue",function(a){var b={voice:{conditions:[{name:"APPLICATION_QUEUE",value:"queue",type:"select",resource:a,resValue:"name",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_CALL_STATUS",value:"lastevent",type:"select",arr:[{name:"called",value:"called"},{name:"connect",value:"connect"},{name:"complete",value:"complete"},{name:"rejected",value:"rejected"},{name:"abandoned",value:"abandoned"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]}],actions:[{name:"APPLICATION_CONTACT_MANAGER",value:"contactManager"},{name:"APPLICATION_INTEGRATIONS",value:"integration",propertyField:"select"}]},mail:{conditions:[{name:"APPLICATION_FROM",value:"from",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_CC",value:"cc",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_SUBJECT",value:"subject",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]}],actions:[{name:"APPLICATION_TEMPLATE",value:"template"},{name:"APPLICATION_CONTACT_MANAGER",value:"contactManager"}]},chat:{conditions:[],actions:[]},fax:{conditions:[],actions:[]}},c=["voice","mail","chat","fax"];return{services:b,channels:c}}]),angular.module("xCallyShuttleApp").service("variable",function(){var a=[{title:"Unique ID",name:"uniqueid",group:"voice_queue"},{title:"Caller Number",name:"calleridnum",group:"voice_queue"},{title:"Caller Name",name:"calleridname",group:"voice_queue"},{title:"Queue",name:"queue",group:"voice_queue"},{title:"Called Number",name:"destcalleridnum",group:"voice_queue"},{title:"Called Name",name:"destcalleridname",group:"voice_queue"},{title:"Hold Time",name:"holdtime",group:"voice_queue"},{title:"Talk Time",name:"talktime",group:"voice_queue"},{title:"Connected Time",name:"agentconnectAt",group:"voice_queue"},{title:"Called Time",name:"agentcalledAt",group:"voice_queue"},{title:"DNID",name:"destexten",group:"voice_queue"},{title:"Complete Time",name:"agentcompleteAt",group:"voice_queue"},{title:"No Answer Time",name:"agentringnoanswerAt",group:"voice_queue"}];return a}),function(a,b){angular.module("adf.widget.counter",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("counter",{title:"Single Value",description:"Single Value for db results",templateUrl:"{widgetsPath}/counter/src/view.html",controller:"apiwidgetCounterViewCtrl",edit:{templateUrl:"{widgetsPath}/counter/src/edit.html",controller:"apiwidgetCounterEditCtrl"}})}]).service("apiServiceCounter",["Widget",function(a){return{get:function(b){return a.get({select:b.select,condition:encodeURIComponent(b.condition),table:b.report,controller:"counter"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiwidgetCounterEditCtrl",["$scope",function(a){a.config.reportTables=[{name:"Agents",value:"report_agent"},{name:"Calls",value:"report_call"},{name:"Dials",value:"report_dial"},{name:"Queues",value:"report_queue"},{name:"Users",value:"users"},{name:"Chat Sessions",value:"report_chat_session"},{name:"Mail Sessions",value:"report_mail_session"}],a.config.colors=[{name:"Blue",value:"blue-madison"},{name:"Red",value:"red-intense"},{name:"Green",value:"green-haze"},{name:"Purple",value:"purple-plum"},{name:"Orange",value:"yellow-casablanca"},{name:"Yellow",value:"yellow-crusta"}],a.config.icons=[{name:"Talk bubbles",value:"fa-comments"},{name:"Bar Chart",value:"fa-bar-chart"},{name:"Shopping Cart",value:"fa-shopping-cart"},{name:"Globe",value:"fa-globe"}],a.config.select=a.config.select?a.config.select:"COUNT(*)",a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE"}]).controller("apiwidgetCounterViewCtrl",["$scope","$interval","apiServiceCounter",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.condition=a.config.condition?a.config.condition:null,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE",a.counterApiCall=function(){a.config.report&&c.get(a.config).then(function(b){b?b.result&&b.result.length>1||_.keys(b.result[0]).length>1?(a.tooManyResults=!0,a.result=null):(a.tooManyResults=!1,null!==_.values(b.result[0])[0]?a.result=_.values(b.result[0])[0].toString():a.result="--"):a.result=null})},a.counterApiCall();var d=b(function(){a.counterApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.counter").run(["$templateCache",function(a){a.put("{widgetsPath}/counter/src/edit.html","<form role=form><div class=form-group><label for=select>Select</label> <input type=text class=form-control id=condition ng-model=config.select placeholder=Select></div><div class=form-group><label class=control-label>From</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder=From>{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"report.value as report in config.reportTables | filter: $select.search\"><div ng-bind-html=\"report.name | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label for=condition>Where</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder=Where></div><div class=form-group><label for=condition>{{'APPLICATION_REFRESH_TIMEOUT' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder=\"{{'APPLICATION_REFRESH_TIMEOUT' | translate}}\" min=1></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_COLOR' | translate}}</label><ui-select data-ng-model=config.color name=color theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_COLOR' | translate }}\">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"color.value as color in config.colors | filter: $select.search\"><div ng-bind-html=\"color.name | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_ICON' | translate}}</label><ui-select data-ng-model=config.icon name=icon theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_ICON' | translate }}\">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"icon.value as icon in config.icons | filter: $select.search\"><div ng-bind-html=\"icon.name | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_DETAILS' | translate}}</label> <input type=text class=form-control id=details ng-model=config.details maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_DETAILS' | translate}}\"></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK' | translate}}</label> <input type=text class=form-control id=link ng-model=config.link placeholder=http://yourlink></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}</label> <input type=text class=form-control id=linkText ng-model=config.linkText maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}\"></div></form>"),a.put("{widgetsPath}/counter/src/view.html",'<div class=dashboard-stat ng-class=config.color ng-if=result><div class=visual><i class=fa ng-class=config.icon></i></div><div class=details><div class=number>{{result}}</div><div class=desc>{{config.details}}</div></div><a class=more href={{config.link}}>{{config.linkText}} <i class="m-icon-swapright m-icon-white"></i></a></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=tooManyResults><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_TOO_MANY_RESULTS\' | translate}}</div><div class="alert alert-danger" role=alert ng-if="!result && !tooManyResults"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_QUERY_NOT_VALID\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.pie-chart",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("pie-chart",{title:"Pie-Chart",description:"Display a pie-chart starting from DB values",templateUrl:"{widgetsPath}/pie-chart/src/view.html",controller:"apiWidgetPieChartViewCtrl",edit:{templateUrl:"{widgetsPath}/pie-chart/src/edit.html",controller:"apiWidgetPieChartEditCtrl"}})}]).service("apiServicePieChart",["Widget",function(a){return{get:function(b){return a.get({condition:encodeURIComponent(b.condition),table:b.report,fields:b.fields,controller:"piechart"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiWidgetPieChartEditCtrl",["$scope",function(a){function b(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=[{name:"Agents",value:"report_agent"},{name:"Calls",value:"report_call"},{name:"Dials",value:"report_dial"},{name:"Queues",value:"report_queue"},{name:"Users",value:"users"},{name:"Chat Sessions",value:"report_chat_session"},{name:"Mail Sessions",value:"report_mail_session"}],a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetPieChartViewCtrl",["$scope","$interval","apiServicePieChart",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.pieChartApiCall=function(){a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){if(b&&b.result&&1===b.result.length){a.labels=[],a.data=[];for(var c in b.result[0])a.labels.push(c),a.data.push(b.result[0][c])}else a.labels=[],a.data=[]})},a.pieChartApiCall();var d=b(function(){a.pieChartApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.pie-chart").run(["$templateCache",function(a){a.put("{widgetsPath}/pie-chart/src/edit.html",'<form role=form><div class=form-group><label class=control-label>{{\'APPLICATION_REPORT\' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="report.value as report in config.reportTables | filter: $select.search"><div ng-bind-html="report.name | highlight: $select.search"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{\'APPLICATION_FIELDS\' | translate}}</label></div><div class=padding-bottom ng-repeat="field in config.fields"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if="config.fields.length>1"><button class="btn btn-danger" type=button data-ng-click=removeField($index)><i class="fa fa-times"></i> {{\'APPLICATION_REMOVE\' | translate}}</button></span></div></div></div><button type=button class="btn btn-sm green mbottom20" ng-click=addField()><i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}</button><div class=form-group><label for=condition>{{\'APPLICATION_CONDITION\' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder="{{\'APPLICATION_CONDITION\' | translate}}"></div><div class=form-group><label for=condition>{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder="{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}" min=1></div></form>'),a.put("{widgetsPath}/pie-chart/src/view.html",'<div ng-if=labels.length ng-style=config.style><canvas id=doughnut class="chart chart-doughnut" chart-data=data chart-labels=labels legend=true></canvas></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_METRIC_AND_CHECK_OTHER\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.table",["adf.provider"]).value("apiServiceUrlTable","/api/widgets/table").config(["dashboardProvider",function(a){a.widget("table",{title:"Table",description:"Show tabbed results from db",templateUrl:"{widgetsPath}/table/src/view.html",controller:"apiWidgetTableViewCtrl",edit:{templateUrl:"{widgetsPath}/table/src/edit.html",controller:"apiWidgetTableEditCtrl"}})}]).service("apiServiceTable",["$q","$http","apiServiceUrlTable",function(a,b,c){return{get:function(d){var e=a.defer();return b.get(c,{params:{condition:encodeURIComponent(d.condition),table:d.report,fields:d.fields}}).success(function(a){a?e.resolve(a):e.reject()}).error(function(a){console.log(a),e.reject()}),e.promise}}}]).controller("apiWidgetTableEditCtrl",["$scope",function(a){function b(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=[{name:"Agents",value:"agent"},{name:"Calls",value:"call"},{name:"Dials",value:"dial"},{name:"Members",value:"member"},{name:"Queues",value:"queue"}],a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetTableViewCtrl",["$scope","$interval","apiServiceTable",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.style={"max-height":a.config.height+"px",overflow:"scroll"},a.tableApiCall=function(){a.config.condition&&a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){a.results=b})},a.tableApiCall();var d=b(function(){a.tableApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.table").run(["$templateCache",function(a){a.put("{widgetsPath}/table/src/edit.html",'<form role=form><div class=form-group><label class=control-label>{{\'APPLICATION_REPORT\' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="report.value as report in config.reportTables | filter: $select.search"><div ng-bind-html="report.name | highlight: $select.search"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{\'APPLICATION_METRICS\' | translate}}</label></div><div class=padding-bottom ng-repeat="field in config.fields"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if="config.fields.length>1"><button class="btn btn-danger" type=button data-ng-click=removeField($index)><i class="fa fa-times"></i> {{\'APPLICATION_REMOVE\' | translate}}</button></span></div></div></div><button type=button class="btn btn-sm green mbottom20" ng-click=addField()><i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}</button><div class=form-group><label for=condition>{{\'APPLICATION_CONDITION\' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder="{{\'APPLICATION_CONDITION\' | translate}}"></div><div class=form-group><label for=condition>{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder="{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}" min=1></div><div class=form-group><label for=condition>{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}</label> <input type=number class=form-control id=height ng-model=config.height placeholder="{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}" min=350></div></form>'),a.put("{widgetsPath}/table/src/view.html",'<div ng-if=results ng-style=config.style><table st-table=results class="table table-striped table-bordered table-hover"><div class=table-responsive><thead><tr><th colspan={{config.fields.length}}><div class=row><div class=col-md-6></div><div class=col-md-6><div class="input-group input-medium pull-right"><input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class=form-control type=search> <span class=input-group-addon><i class="fa fa-search"></i></span></div></div></div></th></tr><tr><th ng-repeat="field in config.fields">{{field.alias}}</th></tr></thead><tbody><tr data-ng-repeat="result in results" class=animate-repeat><td ng-repeat="field in config.fields">{{result[field.alias]}}</td></tr><tr data-ng-hide=results.length><td colspan={{config.fields.length}} style=text-align:center;><i>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</i></td></tr></tbody><tfoot><tr><td colspan={{config.fields.length}} class=text-center><div st-pagination class=pagination st-items-by-page=10 st-displayed-pages=3></div></td></tr></tfoot></div></table></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_FIELD_AND_CHECK_OTHER\' | translate}}</div>')}])}(window),function(){angular.module("pdf",[]).directive("ngPdf",["$window",function(a){return{restrict:"E",templateUrl:function(a,b){return b.templateUrl?b.templateUrl:"partials/viewer.html"},link:function(b,c,d){var e=d.pdfUrl,f=null,g=d.page?d.page:1,h=d.scale>0?d.scale:1,i=c.find("canvas"),j=i[0],k=j.getContext("2d"),l=angular.element(a);l.on("scroll",function(){b.$apply(function(){b.scroll=l[0].scrollY})}),PDFJS.disableWorker=!0,b.pageNum=g,b.renderPage=function(a){f.getPage(a).then(function(a){var e,f,g,i={};"page-fit"!==d.scale||h?e=a.getViewport(h):(e=a.getViewport(1),f=c[0].clientWidth/e.width,g=c[0].clientHeight/e.height,h=Math.min(f,g)),j.height=e.height,j.width=e.width,i={canvasContext:k,viewport:e},a.render(i).promise.then(function(){"function"==typeof b.onPageRender&&b.onPageRender()})})},b.goPrevious=function(){b.pageToDisplay<=1||(b.pageNum=parseInt(b.pageNum)-1)},b.goNext=function(){b.pageToDisplay>=f.numPages||(b.pageNum=parseInt(b.pageNum)+1)},b.zoomIn=function(){return h=parseFloat(h)+.2,b.renderPage(b.pageToDisplay),h},b.zoomOut=function(){return h=parseFloat(h)-.2,b.renderPage(b.pageToDisplay),h},b.changePage=function(){b.renderPage(b.pageToDisplay)},b.rotate=function(){"rotate0"===j.getAttribute("class")?j.setAttribute("class","rotate90"):"rotate90"===j.getAttribute("class")?j.setAttribute("class","rotate180"):"rotate180"===j.getAttribute("class")?j.setAttribute("class","rotate270"):j.setAttribute("class","rotate0")},PDFJS.getDocument(e,null,null,b.onProgress).then(function(a){"function"==typeof b.onLoad&&b.onLoad(),f=a,b.renderPage(b.pageToDisplay),b.$apply(function(){b.pageCount=a.numPages})},function(a){a&&"function"==typeof b.onError&&b.onError(a)}),b.$watch("pageNum",function(a){b.pageToDisplay=parseInt(a),null!==f&&b.renderPage(b.pageToDisplay)})}}}])}();var Metronic=function(){var a,b=!1,c=!1,d=!1,e=!1,f=[],g="assets/",h="img/",i="plugins/",j="css/",k={blue:"#89C4F4",red:"#F3565D",green:"#1bbc9b",purple:"#9b59b6",grey:"#95a5a6",yellow:"#F8CB00"},l=function(){"rtl"===$("body").css("direction")&&(b=!0),c=!!navigator.userAgent.match(/MSIE 8.0/),d=!!navigator.userAgent.match(/MSIE 9.0/),e=!!navigator.userAgent.match(/MSIE 10.0/),e&&$("html").addClass("ie10"),(e||d||c)&&$("html").addClass("ie")},m=function(){for(var a=0;a<f.length;a++){var b=f[a];b.call()}},n=function(){var a;if(c){var b;$(window).resize(function(){b!=document.documentElement.clientHeight&&(a&&clearTimeout(a),a=setTimeout(function(){m()},50),b=document.documentElement.clientHeight)})}else $(window).resize(function(){a&&clearTimeout(a),a=setTimeout(function(){m()},50)})},o=function(){$("body").on("click",".portlet > .portlet-title > .tools > a.remove",function(a){a.preventDefault();var b=$(this).closest(".portlet");$("body").hasClass("page-portlet-fullscreen")&&$("body").removeClass("page-portlet-fullscreen"),b.find(".portlet-title .fullscreen").tooltip("destroy"),b.find(".portlet-title > .tools > .reload").tooltip("destroy"),b.find(".portlet-title > .tools > .remove").tooltip("destroy"),b.find(".portlet-title > .tools > .config").tooltip("destroy"),b.find(".portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip("destroy"),b.remove()}),$("body").on("click",".portlet > .portlet-title .fullscreen",function(a){a.preventDefault();var b=$(this).closest(".portlet");if(b.hasClass("portlet-fullscreen"))$(this).removeClass("on"),b.removeClass("portlet-fullscreen"),$("body").removeClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height","auto");else{var c=Metronic.getViewPort().height-b.children(".portlet-title").outerHeight()-parseInt(b.children(".portlet-body").css("padding-top"))-parseInt(b.children(".portlet-body").css("padding-bottom"));$(this).addClass("on"),b.addClass("portlet-fullscreen"),$("body").addClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height",c)}}),$("body").on("click",".portlet > .portlet-title > .tools > a.reload",function(a){a.preventDefault();var b=$(this).closest(".portlet").children(".portlet-body"),c=$(this).attr("data-url"),d=$(this).attr("data-error-display");c?(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),$.ajax({type:"GET",cache:!1,url:c,dataType:"html",success:function(a){Metronic.unblockUI(b),b.html(a)},error:function(a,c,e){Metronic.unblockUI(b);var f="Error on reloading the content. Please check your connection and try again.";"toastr"==d&&toastr?toastr.error(f):"notific8"==d&&$.notific8?($.notific8("zindex",11500),$.notific8(f,{theme:"ruby",life:3e3})):alert(f)}})):(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),window.setTimeout(function(){Metronic.unblockUI(b)},1e3))}),$('.portlet .portlet-title a.reload[data-load="true"]').click(),$("body").on("click",".portlet > .portlet-title > .tools > .collapse, .portlet .portlet-title > .tools > .expand",function(a){
-a.preventDefault()})},p=function(){if($().uniform){var a=$("input[type=checkbox]:not(.toggle, .make-switch, .icheck), input[type=radio]:not(.toggle, .star, .make-switch, .icheck)");a.size()>0&&a.each(function(){0===$(this).parents(".checker").size()&&$(this).show()})}},q=function(){$().iCheck&&$(".icheck").each(function(){var a=$(this).attr("data-checkbox")?$(this).attr("data-checkbox"):"icheckbox_minimal-grey",b=$(this).attr("data-radio")?$(this).attr("data-radio"):"iradio_minimal-grey";a.indexOf("_line")>-1||b.indexOf("_line")>-1?$(this).iCheck({checkboxClass:a,radioClass:b,insert:'<div class="icheck_line-icon"></div>'+$(this).attr("data-label")}):$(this).iCheck({checkboxClass:a,radioClass:b})})},r=function(){$().bootstrapSwitch&&$(".make-switch").bootstrapSwitch()},s=function(){$().confirmation&&$("[data-toggle=confirmation]").confirmation({container:"body",btnOkClass:"btn-xs btn-success",btnCancelClass:"btn-xs btn-danger"})},t=function(){$("body").on("shown.bs.collapse",".accordion.scrollable",function(a){Metronic.scrollTo($(a.target))})},u=function(){if(location.hash){var a=location.hash.substr(1);$('a[href="#'+a+'"]').parents(".tab-pane:hidden").each(function(){var a=$(this).attr("id");$('a[href="#'+a+'"]').click()}),$('a[href="#'+a+'"]').click()}},v=function(){$("body").on("hide.bs.modal",function(){$(".modal:visible").size()>1&&$("html").hasClass("modal-open")===!1?$("html").addClass("modal-open"):$(".modal:visible").size()<=1&&$("html").removeClass("modal-open")}),$("body").on("show.bs.modal",".modal",function(){$(this).hasClass("modal-scroll")&&$("body").addClass("modal-open-noscroll")}),$("body").on("hide.bs.modal",".modal",function(){$("body").removeClass("modal-open-noscroll")}),$("body").on("hidden.bs.modal",".modal:not(.modal-cached)",function(){$(this).removeData("bs.modal")})},w=function(){$(".tooltips").tooltip(),$(".portlet > .portlet-title .fullscreen").tooltip({container:"body",title:"Fullscreen"}),$(".portlet > .portlet-title > .tools > .reload").tooltip({container:"body",title:"Reload"}),$(".portlet > .portlet-title > .tools > .remove").tooltip({container:"body",title:"Remove"}),$(".portlet > .portlet-title > .tools > .config").tooltip({container:"body",title:"Settings"}),$(".portlet > .portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip({container:"body",title:"Collapse/Expand"})},x=function(){$("body").on("click",".dropdown-menu.hold-on-click",function(a){a.stopPropagation()})},y=function(){$("body").on("click",'[data-close="alert"]',function(a){$(this).parent(".alert").hide(),$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-close="note"]',function(a){$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-remove="note"]',function(a){$(this).closest(".note").remove(),a.preventDefault()})},z=function(){$('[data-hover="dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")})},A=function(){$(".popovers").popover(),$(document).on("click.bs.popover.data-api",function(b){a&&a.popover("hide")})},B=function(){Metronic.initSlimScroll(".scroller")},C=function(){jQuery.fancybox&&$(".fancybox-button").size()>0&&$(".fancybox-button").fancybox({groupAttr:"data-rel",prevEffect:"none",nextEffect:"none",closeBtn:!0,helpers:{title:{type:"inside"}}})},D=function(){(c||d)&&$("input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)").each(function(){var a=$(this);""===a.val()&&""!==a.attr("placeholder")&&a.addClass("placeholder").val(a.attr("placeholder")),a.focus(function(){a.val()==a.attr("placeholder")&&a.val("")}),a.blur(function(){(""===a.val()||a.val()==a.attr("placeholder"))&&a.val(a.attr("placeholder"))})})},E=function(){$().select2&&$(".select2me").select2({placeholder:"Select"})};return{init:function(){l(),n(),p(),q(),r(),B(),C(),E(),o(),y(),x(),u(),w(),A(),t(),v(),s(),D()},initAjax:function(){p(),q(),r(),z(),B(),E(),C(),x(),w(),A(),t(),s()},initComponents:function(){this.initAjax()},setLastPopedPopover:function(b){a=b},addResizeHandler:function(a){f.push(a)},runResizeHandlers:function(){m()},scrollTo:function(a,b){var c=a&&a.size()>0?a.offset().top:0;a&&($("body").hasClass("page-header-fixed")&&(c-=$(".page-header").height()),c+=b?b:-1*a.height()),$("html,body").animate({scrollTop:c},"slow")},initSlimScroll:function(a){$(a).each(function(){if(!$(this).attr("data-initialized")){var a;a=$(this).attr("data-height")?$(this).attr("data-height"):$(this).css("height"),$(this).slimScroll({allowPageScroll:!0,size:"7px",color:$(this).attr("data-handle-color")?$(this).attr("data-handle-color"):"#bbb",wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",railColor:$(this).attr("data-rail-color")?$(this).attr("data-rail-color"):"#eaeaea",position:b?"left":"right",height:a,alwaysVisible:"1"==$(this).attr("data-always-visible")?!0:!1,railVisible:"1"==$(this).attr("data-rail-visible")?!0:!1,disableFadeOut:!0}),$(this).attr("data-initialized","1")}})},destroySlimScroll:function(a){$(a).each(function(){if("1"===$(this).attr("data-initialized")){$(this).removeAttr("data-initialized"),$(this).removeAttr("style");var a={};$(this).attr("data-handle-color")&&(a["data-handle-color"]=$(this).attr("data-handle-color")),$(this).attr("data-wrapper-class")&&(a["data-wrapper-class"]=$(this).attr("data-wrapper-class")),$(this).attr("data-rail-color")&&(a["data-rail-color"]=$(this).attr("data-rail-color")),$(this).attr("data-always-visible")&&(a["data-always-visible"]=$(this).attr("data-always-visible")),$(this).attr("data-rail-visible")&&(a["data-rail-visible"]=$(this).attr("data-rail-visible")),$(this).slimScroll({wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",destroy:!0});var b=$(this);$.each(a,function(a,c){b.attr(a,c)})}})},scrollTop:function(){Metronic.scrollTo()},blockUI:function(a){a=$.extend(!0,{},a);var b="";if(b=a.animate?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><div class="block-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div>':a.iconOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""></div>':a.textOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>":'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>",a.target){var c=$(a.target);c.height()<=$(window).height()&&(a.cenrerY=!0),c.block({message:b,baseZ:a.zIndex?a.zIndex:1e3,centerY:void 0!==a.cenrerY?a.cenrerY:!1,css:{top:"10%",border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})}else $.blockUI({message:b,baseZ:a.zIndex?a.zIndex:1e3,css:{border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})},unblockUI:function(a){a?$(a).unblock({onUnblock:function(){$(a).css("position",""),$(a).css("zoom","")}}):$.unblockUI()},startPageLoading:function(a){a&&a.animate?($(".page-spinner-bar").remove(),$("body").append('<div class="page-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>')):($(".page-loading").remove(),$("body").append('<div class="page-loading"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif"/>&nbsp;&nbsp;<span>'+(a&&a.message?a.message:"Loading...")+"</span></div>"))},stopPageLoading:function(){$(".page-loading, .page-spinner-bar").remove()},alert:function(a){a=$.extend(!0,{container:"",place:"append",type:"success",message:"",close:!0,reset:!0,focus:!0,closeInSeconds:0,icon:""},a);var b=Metronic.getUniqueID("Metronic_alert"),c='<div id="'+b+'" class="Metronic-alerts alert alert-'+a.type+' fade in">'+(a.close?'<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>':"")+(""!==a.icon?'<i class="fa-lg fa fa-'+a.icon+'"></i>  ':"")+a.message+"</div>";return a.reset&&$(".Metronic-alerts").remove(),a.container?"append"==a.place?$(a.container).append(c):$(a.container).prepend(c):$("body").hasClass("page-container-bg-solid")?$(".page-title").after(c):$(".page-bar").size()>0?$(".page-bar").after(c):$(".page-breadcrumb").after(c),a.focus&&Metronic.scrollTo($("#"+b)),a.closeInSeconds>0&&setTimeout(function(){$("#"+b).remove()},1e3*a.closeInSeconds),b},initUniform:function(a){a?$(a).each(function(){0===$(this).parents(".checker").size()&&($(this).show(),$(this).uniform())}):p()},updateUniform:function(a){$.uniform.update(a)},initFancybox:function(){C()},getActualVal:function(a){return a=$(a),a.val()===a.attr("placeholder")?"":a.val()},getURLParameter:function(a){var b,c,d=window.location.search.substring(1),e=d.split("&");for(b=0;b<e.length;b++)if(c=e[b].split("="),c[0]==a)return unescape(c[1]);return null},isTouchDevice:function(){try{return document.createEvent("TouchEvent"),!0}catch(a){return!1}},getViewPort:function(){var a=window,b="inner";return"innerWidth"in window||(b="client",a=document.documentElement||document.body),{width:a[b+"Width"],height:a[b+"Height"]}},getUniqueID:function(a){return"prefix_"+Math.floor(Math.random()*(new Date).getTime())},isIE8:function(){return c},isIE9:function(){return d},isRTL:function(){return b},isAngularJsApp:function(){return"undefined"==typeof angular?!1:!0},getAssetsPath:function(){return g},setAssetsPath:function(a){g=a},setGlobalImgPath:function(a){h=a},getGlobalImgPath:function(){return g+h},setGlobalPluginsPath:function(a){i=a},getGlobalPluginsPath:function(){return g+i},getGlobalCssPath:function(){return g+j},getBrandColor:function(a){return k[a]?k[a]:""},getResponsiveBreakpoint:function(a){var b={xs:480,sm:768,md:900,lg:1200};return b[a]?b[a]:0}}}(),Layout=function(){var a="img/",b="css/",c=Metronic.getResponsiveBreakpoint("md"),d=function(){var a,b=$(".page-content"),d=$(".page-sidebar"),e=$("body");if(e.hasClass("page-footer-fixed")===!0&&e.hasClass("page-sidebar-fixed")===!1){var f=Metronic.getViewPort().height-$(".page-footer").outerHeight()-$(".page-header").outerHeight();b.height()<f&&b.attr("style","min-height:"+f+"px")}else{if(e.hasClass("page-sidebar-fixed"))a=g(),e.hasClass("page-footer-fixed")===!1&&(a-=$(".page-footer").outerHeight());else{var h=$(".page-header").outerHeight(),i=$(".page-footer").outerHeight();a=Metronic.getViewPort().width<c?Metronic.getViewPort().height-h-i:d.height()+20,a+h+i<=Metronic.getViewPort().height&&(a=Metronic.getViewPort().height-h-i)}b.attr("style","min-height:"+a+"px")}},e=function(a,b){var d=location.hash.toLowerCase(),e=$(".page-sidebar-menu");if("click"===a||"set"===a?b=$(b):"match"===a&&e.find("li > a").each(function(){var a=$(this).attr("href").toLowerCase();return a.length>1&&d.substr(1,a.length-1)==a.substr(1)?void(b=$(this)):void 0}),b&&0!=b.size()&&"javascript:;"!==b.attr("href").toLowerCase()&&"#"!==b.attr("href").toLowerCase()){parseInt(e.data("slide-speed")),e.data("keep-expanded");e.find("li.active").removeClass("active"),e.find("li > a > .selected").remove(),e.hasClass("page-sidebar-menu-hover-submenu")===!1?e.find("li.open").each(function(){0===$(this).children(".sub-menu").size()&&($(this).removeClass("open"),$(this).find("> a > .arrow.open").removeClass("open"))}):e.find("li.open").removeClass("open"),b.parents("li").each(function(){$(this).addClass("active"),$(this).find("> a > span.arrow").addClass("open"),1===$(this).parent("ul.page-sidebar-menu").size()&&$(this).find("> a").append('<span class="selected"></span>'),1===$(this).children("ul.sub-menu").size()&&$(this).addClass("open")}),"click"===a&&Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click()}},f=function(){jQuery(".page-sidebar").on("click","li > a",function(a){var b=$(this).next().hasClass("sub-menu");if(!(Metronic.getViewPort().width>=c&&1===$(this).parents(".page-sidebar-menu-hover-submenu").size())){if(b===!1)return void(Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click());if(!$(this).next().hasClass("sub-menu always-open")){var e=$(this).parent().parent(),f=$(this),g=$(".page-sidebar-menu"),h=jQuery(this).next(),i=g.data("auto-scroll"),j=parseInt(g.data("slide-speed")),k=g.data("keep-expanded");k!==!0&&(e.children("li.open").children("a").children(".arrow").removeClass("open"),e.children("li.open").children(".sub-menu:not(.always-open)").slideUp(j),e.children("li.open").removeClass("open"));var l=-200;h.is(":visible")?(jQuery(".arrow",jQuery(this)).removeClass("open"),jQuery(this).parent().removeClass("open"),h.slideUp(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})):b&&(jQuery(".arrow",jQuery(this)).addClass("open"),jQuery(this).parent().addClass("open"),h.slideDown(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})),a.preventDefault()}}}),jQuery(".page-sidebar").on("click"," li > a.ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=jQuery(".page-sidebar ul"),e=($(".page-content"),$(".page-content .page-content-body"));d.children("li.active").removeClass("active"),d.children("arrow.open").removeClass("open"),$(this).parents("li").each(function(){$(this).addClass("active"),$(this).children("a > span.arrow").addClass("open")}),$(this).parents("li").addClass("active"),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),Metronic.startPageLoading();var f=$(this);$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){0===f.parents("li.open").size()&&$(".page-sidebar-menu > li.open > a").click(),Metronic.stopPageLoading(),e.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){Metronic.stopPageLoading(),e.html("<h4>Could not load the requested content.</h4>")}})}),jQuery(".page-content").on("click",".ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=($(".page-content"),$(".page-content .page-content-body"));Metronic.startPageLoading(),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){Metronic.stopPageLoading(),d.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){d.html("<h4>Could not load the requested content.</h4>"),Metronic.stopPageLoading()}})}),i(),$(".page-sidebar").on("click",".sidebar-search .remove",function(a){a.preventDefault(),$(".sidebar-search").removeClass("open")}),$(".page-sidebar .sidebar-search").on("keypress","input.form-control",function(a){return 13==a.which?($(".sidebar-search").submit(),!1):void 0}),0!==$(".sidebar-search").size()&&($(".sidebar-search .input-group").on("click",function(a){a.stopPropagation()}),$("body").on("click",function(){$(".sidebar-search").hasClass("open")&&$(".sidebar-search").removeClass("open")}))},g=function(){var a=Metronic.getViewPort().height-$(".page-header").outerHeight();return $("body").hasClass("page-footer-fixed")&&(a-=$(".page-footer").outerHeight()),a},h=function(){var a=$(".page-sidebar-menu");return Metronic.destroySlimScroll(a),0===$(".page-sidebar-fixed").size()?void d():void(Metronic.getViewPort().width>=c&&(a.attr("data-height",g()),Metronic.initSlimScroll(a),d()))},i=function(){var a=$("body");a.hasClass("page-sidebar-fixed")&&$(".page-sidebar").on("mouseenter",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").removeClass("page-sidebar-menu-closed")}).on("mouseleave",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").addClass("page-sidebar-menu-closed")})},j=function(){$("body");$.cookie&&"1"===$.cookie("sidebar_closed")&&Metronic.getViewPort().width>=c?($("body").addClass("page-sidebar-closed"),$(".page-sidebar-menu").addClass("page-sidebar-menu-closed")):$.cookie&&$.cookie("sidebar_closed","0")},k=function(){$(".page-header").on("click",'.hor-menu a[data-toggle="tab"]',function(a){a.preventDefault();var b=$(".hor-menu .nav"),c=b.find("li.current");$("li.active",c).removeClass("active"),$(".selected",c).remove();var d=$(this).parents("li").last();d.addClass("current"),d.find("a:first").append('<span class="selected"></span>')}),$(".page-header").on("click",".search-form",function(a){$(this).addClass("open"),$(this).find(".form-control").focus(),$(".page-header .search-form .form-control").on("blur",function(a){$(this).closest(".search-form").removeClass("open"),$(this).unbind("blur")})}),$(".page-header").on("keypress",".hor-menu .search-form .form-control",function(a){return 13==a.which?($(this).closest(".search-form").submit(),!1):void 0}),$(".page-header").on("mousedown",".search-form.open .submit",function(a){a.preventDefault(),a.stopPropagation(),$(this).closest(".search-form").submit()}),$('[data-hover="megamenu-dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")}),$(document).on("click",".mega-menu-dropdown .dropdown-menu",function(a){a.stopPropagation()})},l=function(){$("body").on("shown.bs.tab",'a[data-toggle="tab"]',function(){d()})},m=function(){var a=300,b=500;navigator.userAgent.match(/iPhone|iPad|iPod/i)?$(window).bind("touchend touchcancel touchleave",function(c){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}):$(window).scroll(function(){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}),$(".scroll-to-top").click(function(a){return a.preventDefault(),$("html, body").animate({scrollTop:0},b),!1})},n=function(){var a,b=$(".full-height-content");if(a=Metronic.getViewPort().height-$(".page-header").outerHeight(!0)-$(".page-footer").outerHeight(!0)-$(".page-title").outerHeight(!0)-$(".page-bar").outerHeight(!0),b.hasClass("portlet")){var d=b.find(".portlet-body");if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(d.find(".full-height-content-body"));a=a-b.find(".portlet-title").outerHeight(!0)-parseInt(b.find(".portlet-body").css("padding-top"))-parseInt(b.find(".portlet-body").css("padding-bottom"))-2,b.hasClass("full-height-content-scrollable")?(a-=35,d.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(d.find(".full-height-content-body"))):d.css("min-height",a)}else{if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(b.find(".full-height-content-body"));b.hasClass("full-height-content-scrollable")?(a-=35,b.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(b.find(".full-height-content-body"))):b.css("min-height",a)}};return{initHeader:function(){k()},setSidebarMenuActiveLink:function(a,b){e(a,b)},initSidebar:function(){h(),f(),j(),Metronic.isAngularJsApp()&&e("match"),Metronic.addResizeHandler(h)},initContent:function(){n(),l(),Metronic.addResizeHandler(d),Metronic.addResizeHandler(n)},initFooter:function(){m()},init:function(){this.initHeader(),this.initSidebar(),this.initContent(),this.initFooter()},fixContentHeight:function(){d()},initFixedSidebarHoverEffect:function(){i()},initFixedSidebar:function(){h()},getLayoutImgPath:function(){return Metronic.getAssetsPath()+a},getLayoutCssPath:function(){return Metronic.getAssetsPath()+b}}}();angular.module("xCallyShuttleApp").run(["$templateCache",function(a){a.put("app/analytic/extracted/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n   <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-file-pdf-o"></i>\n                                      <a href="/analytics/extracted/list">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="fa fa-file-pdf-o font-green-sharp"></i>\n                                     <span class="caption-subject">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_METRIC\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.metric" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TABLE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.table" name="table" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n          <div ng-bind-html="table.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TABLE-->\n\n    <!-- START METRIC -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$invalid}">\n      <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="item.metric" required/></textarea>\n      <span data-ng-show="(forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END METRIC -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="metric.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.metric.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/metric/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-calculator"></i>\n                                       <a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-calculator font-green-sharp"></i>\n                                      <span class="caption-subject">{{ \'APPLICATION_METRICS\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_METRIC\' | translate }}\n                                                </button>\n                                     </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getMetric()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n                                       <i data-ng-show="metric" class="fa fa-angle-right"></i>\n                               </li>\n                         <li data-ng-show="metric">\n                                    <a href="#">{{metric.name}}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/metric.png" class="img-responsive">\n                             </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{metric.name}}\n                                       </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.analytics.metrics.view.settings\')}">\n                                                    <a data-ng-href="/analytics/metrics/view/{{metric.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/view/view.settings.html",'<div class="row">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                              </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateMetric()" novalidate>\n\n                                                      <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="metric.name" required/>\n                                                         <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START TABLE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <ui-select data-ng-model="metric.table" name="table" theme="bootstrap" required>\n                                                                      <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n                                                                          <div ng-bind-html="table.name | highlight: $select.search"></div>\n                                                                     </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="(forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$error.required" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TABLE-->\n\n                                                   <!-- START METRIC -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': (forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                               <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="metric.metric" required/></textarea>\n                                                             <span data-ng-show="(forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END METRIC -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="metric.description"></textarea>\n                                                        </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
+"use strict";angular.module("xCallyShuttleApp",["adf","adf.structures.base","adf.widget.clock","adf.widget.iframe","adf.widget.counter","adf.widget.pie-chart","angular-md5","angular.filter","angularFileUpload","btford.socket-io","chart.js","checklist-model","colorpicker.module","frapontillo.bootstrap-switch","infinite-scroll","LocalStorageModule","mgo-angular-wizard","ng-slide-down","ngAnimate","ngBootstrap","ngCookies","ngCsv","ngFileSaver","ngJsTree","ngMap","ngPapaParse","ngResource","ngSanitize","notification","oc.lazyLoad","pascalprecht.translate","pdf","remoteValidation","smart-table","sprintf","textAngular","timer","toastr","permission","ui-notification","ui.bootstrap.modal","ui.bootstrap.dropdown","ui.bootstrap.popover","ui.bootstrap.timepicker","ui.bootstrap.tooltip","ui.bootstrap.tpls","ui.bootstrap.accordion","ui.bootstrap.progressbar","ui.bootstrap.typeahead","ui.grid","ui.grid.autoResize","ui.grid.draggable-rows","ui.grid.exporter","ui.grid.grouping","ui.grid.moveColumns","ui.grid.pagination","ui.grid.treeView","ui.grid.selection","ui.grid.exporter","ui.grid.resizeColumns","ui.router","ui.navbar","ui.select","ui.sortable","xeditable","ngAudio","truncate","ngScrollbars","ngEmoticons","angularSpinner","builder","builder.components","validator","angular-clipboard","ng-code-mirror","angularMoment"]).config(["$stateProvider","$urlRouterProvider","$locationProvider","$httpProvider","$translateProvider","localStorageServiceProvider","dashboardProvider","ScrollBarsProvider",function(a,b,c,d,e,f,g,h){b.otherwise("/dashboard/voice"),e.useStaticFilesLoader({prefix:"assets/languages/locale-",suffix:".json"}),e.preferredLanguage("en_EN"),e.useLocalStorage(),e.useSanitizeValueStrategy("sanitize"),c.html5Mode(!0),d.interceptors.push("authInterceptor"),g.structure("4-4-4",{rows:[{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("3-3-3-3",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"}]}]}),f.setPrefix("xcally"),h.defaults={scrollButtons:{scrollAmount:"auto",enable:!0},axis:"y"}}]).factory("settings",["$rootScope","$interval","License","localStorageService",function(a,b,c,d){return a.settings={patternName:"[A-Za-z0-9._]+",layout:{pageSidebarClosed:d.get("sidebarClosed")||!1,pageQuickSidebarOpened:!1,pageBodySolid:!1,pageAutoScrollOnLoad:1e3}},c.get(function(b){b.license&&(a.license=b.license,a.soundPath=b.soundPath)}),a.settings}]).factory("authInterceptor",["$rootScope","$q","$cookieStore",function(a,b,c){return{request:function(a){return a.headers=a.headers||{},c.get("token")&&(a.headers.Authorization="Bearer "+c.get("token")),a}}}]).run(["$rootScope","$location","$state","$stateParams","$window","$q","$http","Auth","RoleStore","editableThemes","editableOptions",function(a,b,c,d,e,f,g,h,i,j,k){g.get("/api/settings/1").success(function(b){a.license=b.license}).error(function(a){console.error(a)}),a.$state=c,a.$stateParams=d,j.bs3.inputClass="input-sm",j.bs3.buttonsClass="btn-xs",k.theme="bs3",a.online=navigator.onLine,e.addEventListener("offline",function(){a.$apply(function(){a.online=!1})},!1),e.addEventListener("online",function(){a.$apply(function(){a.online=!0})},!1),a.$on("$stateChangeStart",function(a,c){h.isLoggedInAsync(function(a){c.authenticate&&!a&&b.path("/login")})}),a.updateTableConfig=function(a,b){var c=_.find(a,{name:"All"});c&&(c.value=b)},i.defineRole("admin",[],function(){return h.isAdmin()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics",{url:"/analytics",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Extracted",["$resource",function(a){return a("/api/analytics/extracted/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted",{url:"/extracted",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticExtractedListCtrl",["$scope","$translate","gridOptions","Extracted",function(a,b,c,d){a.moment=moment,a.Extracted=d,a.initView=function(){var b={exporterCsvFilename:"ExtractedReports.csv",columnDefs:[{name:"name"},{name:"startDate",displayName:"APPLICATION_START_DATE"},{name:"endDate",displayName:"APPLICATION_END_DATE"},{name:"createdAt",displayName:"APPLICATION_RUN_DATE"},{name:"startDate",displayName:"APPLICATION_START_DATE"},{name:"output"},{name:"status"},{name:"action",width:140,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{directive:"<motion-file-download data-ng-show=\"row.entity.status == 'completed'\" resource=\"grid.appScope.Extracted\" params=\"{id:row.entity.id,controller:'download'}\" mimetype=\"'application/'+row.entity.output.toLowerCase()\" filename=\"row.entity.name+'_'+grid.appScope.moment(row.entity.startDate).format('MM-DD-YYYY').toString()+'_'+grid.appScope.moment(row.entity.endDate).format('MM-DD-YYYY').toString()+'.'+row.entity.output.toLowerCase()\"></motion-file-download>"}]}]};a.gridOptions=c.gridOptions(d,b,a,{order:"createdAt DESC"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted.list",{url:"/list",templateUrl:"app/analytic/extracted/list/list.html",controller:"AnalyticExtractedListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.tables=[{name:"Agent Report",value:"report_agent_history"},{name:"Mail Report",value:"report_mail_session_history"},{name:"Queue Report",value:"report_queue_history"},{name:"Integration Report",value:"report_integration_history"},{name:"Chat Report",value:"report_chat_session_history"}],a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCtrl",["$scope","xAlert","Modal","$uibModal","$log","gridOptions","Metric","$translate",function(a,b,c,d,e,f,g,h){a.$translate=h,a.initView=function(){var b={exporterCsvFilename:"Metrics.csv",columnDefs:[{name:"name"},{name:"table",cellTemplate:"<div style=\"padding:5px\">{{'APPLICATION_'+row.entity.table.toUpperCase() | translate}}</div>"},{name:"description"},{name:"action",width:125,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/analytics/metrics/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(g,b,a)},a.create=function(){var c=d.open({animation:!0,templateUrl:"app/analytic/metric/list/create.modal.html",controller:"AnalyticMetricListCreateModalCtrl"});c.result.then(function(c){return g.save(c).$promise.then(function(){a.gridOptions.getPage(),b.show(h.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(a.data.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.list",{url:"/list",templateUrl:"app/analytic/metric/list/list.html",controller:"AnalyticMetricListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Metric",["$resource",function(a){return a("/api/analytics/metrics/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics",{url:"/metrics",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","Metric",function(a,b,c,d,e,f){a.tables=[{name:"Agent Report",value:"report_agent_history"},{name:"Mail Report",value:"report_mail_session_history"},{name:"Queue Report",value:"report_queue_history"},{name:"Integration Report",value:"report_integration_history"},{name:"Chat Report",value:"report_chat_session_history"}],a.getMetric=function(){return f.get({id:d.id}).$promise.then(function(b){a.metric=b})["catch"](function(a){e.path("/analytics/metrics/list")})},a.updateMetric=function(){return f.update({id:d.id},a.metric).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.view",{url:"/view/:id",templateUrl:"app/analytic/metric/view/view.html",controller:"AnalyticMetricViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.metrics.view.settings",{url:"/settings",templateUrl:"app/analytic/metric/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("customReport",["$resource",function(a){return a("/api/analytics/reports/custom/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("defaultReport",["$resource",function(a){return a("/api/analytics/reports/default/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ReportListCopyModalCtrl",["$scope","$uibModalInstance","$log","customTreeData",function(a,b,c,d){a.customTreeData=d,a.forms={dashboard:void 0},a.item={},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){c.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0}},a.ac=function(){return!0},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.open_all()},a.ok=function(){b.close({parent:a.customTree.get_selected(!0).pop().id})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListCreateModalCtrl",["$scope","$uibModalInstance","path",function(a,b,c){a.path=c,a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListExtractModalCtrl",["$scope","$uibModalInstance",function(a,b){a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={Yesterday:[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],"Last 7 days":[moment().subtract(7,"days"),moment()],"Last 30 days":[moment().subtract(30,"days"),moment()],"This month":[moment().startOf("month"),moment().endOf("month")]},a.extract=function(c){var d={startDate:a.dates.startDate.toISOString(),endDate:a.dates.endDate.toISOString(),output:c};b.close(d)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticReportListCtrl",["$scope","xAlert","$translate","$location","$log","Modal","$uibModal","FileSaver","Blob","gridOptions","customReport","defaultReport","reportTree",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){var b,c={},d=a.defaultTree.get_selected(),e=a.customTree.get_selected();if(d.length)b=d.pop(),a.selectedNode=a.defaultTree.get_path(b," / "),c={parent:b},a.gridOptions=j.gridOptions(l,o,a,c,!0),a.gridOptions.getPage();else{if(!e.length)return;b=e.pop(),a.selectedNode=a.customTree.get_path(b," / "),c={parent:b},a.gridOptions=j.gridOptions(k,o,a,c,!0),a.gridOptions.getPage()}}var o={exporterCsvFilename:"reports.csv",columnDefs:[{name:"name"},{name:"description"},{name:"manage",width:120,buttons:[{"class":"blue-hoki",href:"/analytics/reports/view/{{row.entity.id}}/settings",icon:"icon-settings",title:c.instant("APPLICATION_SETTINGS")},{"class":"red-sunglo",icon:"fa fa-trash-o",title:c.instant("APPLICATION_DELETE"),onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green",icon:"fa fa-files-o",title:c.instant("APPLICATION_COPY"),onClick:"grid.appScope.copy(row.entity.id)"},{"class":"purple",icon:"fa fa-download",title:c.instant("APPLICATION_EXPORT"),onClick:"grid.appScope.export(row.entity.id)"}]},{name:"actions",buttons:[{"class":"yellow",name:"preview",onClick:"grid.appScope.preview(row.entity.id)"},{"class":"green-turquoise",name:"run",onClick:"grid.appScope.extract(row.entity.id)"}]}]};a.searchField="",a.ac=function(){return!0},a.initDefaultScopeTree=function(){a.defaultTree=a.defaultTreeInstance.jstree(!0),a.defaultTree.deselect_all(),a.defaultTree.close_all(),a.defaultTree.open_node({id:1}),a.defaultTreeReady=!0,a.defaultTreeActive=!0,a.previousDefaultNode=""},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.close_all(),a.customTree.open_node({id:1}),a.customTreeReady=!0,a.previousCustomNode=""},a.$watchGroup(["defaultTreeReady","customTreeReady"],function(b,c,d){b[0]&&b[1]&&a.defaultTree.select_node({id:"1"})}),a.updateCustomTree=function(){var d={tree:angular.toJson(a.customTree.get_json("#",{flat:!0}))};return m.update({id:2},d).$promise.then(function(a){console.log("Custom Tree Updated")})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.configTrees=function(){a.defaultTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0,themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["search"]},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0,themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["contextmenu","dnd","search"],contextmenu:{items:function(b,d){var e={create:{label:c.instant("APPLICATION_CREATE"),action:function(c){a.customTree.create_node(b),a.customTree.open_node(b)}},rename:{label:c.instant("APPLICATION_RENAME"),action:function(c){a.customTree.edit(b)}},remove:{label:c.instant("APPLICATION_REMOVE"),action:function(c){console.log(b),a.deleteNode(b.text,b)}}};return"#"===b.parent&&(delete e.rename,delete e.remove),d(e),e}}}},a.deleteNode=f.confirm["delete"](function(b){a.customTree.delete_node(b),a.previousCustomNode==b.id&&a.customTree.select_node({id:b.parent})}),a.searchTrees=function(){a.defaultTree.search(a.searchField),a.customTree.search(a.searchField)},a.selectDefaultNode=function(){if(a.customTreeReady){a.previousCustomNode="";var b=a.defaultTree.get_selected(!0),c=b.pop();if(a.defaultTree.deselect_node(b[0],!0),a.customTree.deselect_all(),a.defaultTree.select_node(c,!0),c.id===a.previousDefaultNode)return void console.log("def");a.previousDefaultNode=c.id,a.defaultTreeActive=!0,n()}},a.selectCustomNode=function(){if(a.defaultTreeReady){a.previousDefaultNode="";var b=a.customTree.get_selected(!0),c=b.pop();if(a.customTree.deselect_node(b[0],!0),a.defaultTree.deselect_all(),a.customTree.select_node(c,!0),c.id===a.previousCustomNode)return void console.log("cus");a.previousCustomNode=c.id,a.defaultTreeActive=!1,n()}},a.getTrees=function(){return m.query().$promise.then(function(b){a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),a.configTrees()})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.create=function(){var c=g.open({animation:!0,templateUrl:"app/analytic/report/list/create.modal.html",controller:"ReportListCreateModalCtrl",resolve:{path:function(){return a.selectedNode}}});c.result.then(function(c){return c.parent=a.previousCustomNode,k.save(c).$promise.then(function(a){d.path("/analytics/reports/view/"+a.id+"/settings")})["catch"](function(a){b.show(a.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})},a.copy=function(d){var f=a.defaultTreeActive?l:k,h=g.open({animation:!0,templateUrl:"app/analytic/report/list/copy.modal.html",controller:"ReportListCopyModalCtrl",resolve:{customTreeData:function(){return a.customTreeData}}});h.result.then(function(e){return f.save({id:d,controller:"copy"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})},a["export"]=function(c){var d=a.defaultTreeActive?l:k;return d.get({id:c}).$promise.then(function(a){delete a.id,delete a.createdAt,delete a.updatedAt,delete a.deletedAt,_.forEach(a.Fields,function(a){delete a.id,delete a.CustomReportId,a.Metric&&(delete a.Metric.id,a.Metric.name+="_"+_.random(9999))});var b=new i([angular.toJson(a)],{type:"application/json;charset=utf-8"});h.saveAs(b,a.name+".json")})["catch"](function(a){console.error(data),b.show(a.message,"danger")})},a["import"]=function(d){var e=JSON.parse(d);e.parent=a.previousCustomNode;var f=e.name&&e.parent?!0:!1,g=!0;return _.forEach(e.Fields,function(a){a.field&&a.alias||(g=!1)}),f&&g?k.save({controller:"import"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")}):void b.show(c.instant("MESSAGE_INVALID_JSON"),"danger")},a.preview=function(b){g.open({animation:!0,templateUrl:"app/analytic/report/list/preview.modal.html",controller:"ReportListPreviewModalCtrl",size:"full",resolve:{report:function(){return{id:b,tree:a.defaultTreeActive?"default":"custom"}}}})},a.extract=function(d){var f=g.open({animation:!0,templateUrl:"app/analytic/report/list/extract.modal.html",controller:"ReportListExtractModalCtrl",size:"md",resolve:{report:function(){return{id:d,tree:a.defaultTreeActive?"default":"custom"}}}});f.result.then(function(e){var f=a.defaultTreeActive?l:k;return f.get({id:d,controller:"extract",action:e.output,startDate:e.startDate,endDate:e.endDate}).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message,"danger")})},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.list",{url:"/list",templateUrl:"app/analytic/report/list/list.html",controller:"AnalyticReportListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ReportListPreviewModalCtrl",["$scope","$uibModalInstance","report","xAlert","$translate","$timeout","customReport","defaultReport",function(a,b,c,d,e,f,g,h){a.forms={dashboard:void 0},a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={Yesterday:[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],"Last 7 days":[moment().subtract(7,"days"),moment()],"Last 30 days":[moment().subtract(30,"days"),moment()],"This month":[moment().startOf("month"),moment().endOf("month")]};var i={pageNumber:1,pageSize:25,sort:null,where:{},order:{}};a.gridOptions={paginationPageSizes:[10,25,50],paginationPageSize:25,useExternalPagination:!0,enableSorting:!1,enableFiltering:!0,useExternalFiltering:!0,enableGrouping:!1,enableColumnMenus:!1,treeRowHeaderAlwaysVisible:!1,gridMenuShowHideColumns:!1,enableGridMenu:!1,onRegisterApi:function(b){a.gridApi=b,b.pagination.on.paginationChanged(a,function(b,c){i.offset=(b-1)*c,i.limit=c,a.getPage()}),b.core.on.filterChanged(a,function(){var b=this.grid,c={};b.columns.forEach(function(a){console.log(a),a.filters[0].term&&(c[a.field]=a.filters[0].term)}),i.where=c,a.getPage()})}},a.getPage=function(){var b={params:{offset:i.offset,limit:i.limit,startDate:a.dates.startDate.toISOString(),endDate:a.dates.endDate.toISOString()}};_.forOwn(i.where,function(a,c){b.params[c]=a}),console.log(b);var f="custom"===c.tree?g:h;return f.get({id:c.id,controller:"preview"},b).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.paginationPageSizes[3]=b.count,a.gridOptions.data=b.rows,a.showResult=!0})["catch"](function(a){d.show(e.instant(a.message),"danger")})},a.cancel=function(){b.dismiss("cancel")},f(function(){a.getPage()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports",{url:"/reports",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("reportTree",["$resource",function(a){return a("/api/analytics/reports/trees/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("AnalyticReportViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){function g(e){var f=_.find(a.tables,{table:e}).url;b.get(f).success(function(b){a.tableFields=_.map(b,function(a,b){return{name:b,value:b}})}).error(function(a){c.show(d.instant(a.message),"danger")})}function h(e){console.log(e),b.get("/api/analytics/metrics/table",{params:{table:e}}).success(function(b){_.forEach(b,function(b){a.tableFields.push({name:"<strong>Metric.</strong>"+b.name,value:b.metric,MetricId:b.id})})}).error(function(a){c.show(d.instant(a.message),"danger")})}function i(a){return String(a).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function j(a){if(!a)return"";for(var b="(",c=0;c<a.rules.length;c++)c>0&&(b+=" <strong>"+a.operator+"</strong> "),b+=a.rules[c].group?j(a.rules[c].group):a.rules[c].field+" "+i(a.rules[c].condition)+" '"+("like"===a.rules[c].condition?"%"+a.rules[c].value+"%":a.rules[c].value)+"'";return b+")"}a.$translate=d,a.tempReport={},a.tables=[{name:"Agent Report",table:"report_agent_history",url:"/api/report/agents/describe"},{name:"Mail Report",table:"report_mail_session_history",url:"/api/report/mail/sessions/describe"},{name:"Queue Report",table:"report_queue_history",url:"/api/report/queues/describe"},{name:"Chat Report",table:"report_chat_session_history",url:"/api/report/chat/sessions/describe"}];var k={group:{operator:"AND",rules:[]}};a.getReport=function(){a.firstLoad=!0,b.get("/api/analytics/reports/custom/"+e.id).success(function(b){a.report=b,_.forEach(a.report.Fields,function(a){delete a.id}),a.report.conditions=a.report.conditions?JSON.parse(a.report.conditions):_.clone(k,!0),a.getPreview(a.report.Fields.length)}).error(function(a){console.error(a),f.path("/analytics/reports/list")})},a.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},a.$watch("report.table",function(b,c){console.log(b),b&&(console.log("is newvalue"),g(b),h(b),c&&(console.log("is oldvalue"),a.tempReport[c]={conditions:a.report.conditions,fields:a.report.Fields}),a.firstLoad?a.firstLoad=!1:a.tempReport[b]?(a.report.Fields=a.tempReport[b].fields,a.report.conditions=a.tempReport[b].conditions):(a.report.Fields=[],a.report.conditions=_.clone(k,!0)))},!0),a.setMetricId=function(b,c){a.report.Fields[c].MetricId=b.MetricId?b.MetricId:null},a.groupByField=[{name:"APPLICATION_YES",value:!0},{name:"APPLICATION_NO",value:!1}],a.functions=[{name:"Sum",value:"SUM"},{name:"Count",value:"COUNT"},{name:"Count Distinct",value:"COUNT DISTINCT"},{name:"Maximum",value:"MAX"},{name:"Minimum",value:"MIN"},{name:"Average",value:"AVG"},{name:"Group Concat",value:"GROUP_CONCAT"},{name:"Group Concat(asc)",value:"GROUP_CONCAT ASC"},{name:"Group Concat(desc)",value:"GROUP_CONCAT DESC"}],a.addField=function(){a.report.Fields.push({groupBy:!1})},a.removeField=function(b){a.report.Fields.splice(b,1)},a.sortableOptions={"ui-floating":!0,cancel:".unsortable",handle:".report-field-handle",axis:"y"},a.updateReport=function(){if(a.report.Fields.length){var f=angular.copy(a.report);f.conditions=angular.toJson(f.conditions),b.put("/api/analytics/reports/custom/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.getPreview(!0)}).error(function(b){c.show(d.instant(b.message),"danger"),f.conditions=JSON.parse(f.conditions),a.report=f})}else c.show(d.instant("MESSAGE_SELECT_A_FIELD"),"danger")},a.$watch("report.conditions",function(b){a.output=b?j(b.group):"()"},!0),a.gridOptions={enableFiltering:!0,treeRowHeaderAlwaysVisible:!1,enableGridMenu:!0},a.getPreview=function(f){b.get("/api/analytics/reports/custom/"+e.id+"/preview/",{params:{limit:20}}).success(function(b){a.gridOptions.data=b.rows}).error(function(a){f&&c.show(d.instant(a.message||"MESSAGE_QUERY_NOT_VALID"),"warning")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.view",{url:"/view/:id",templateUrl:"app/analytic/report/view/view.html",controller:"AnalyticReportViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.reports.view.settings",{url:"/settings",templateUrl:"app/analytic/report/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels",{url:"/channels",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat",{url:"/chat",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("ChatEnquiry",["$resource",function(a){return a("/api/chat/enquiries/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatMessage",["$resource",function(a){return a("/api/chat/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatReport",["$resource",function(a){return a("/api/report/chats/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatRoom",["$resource",function(a){return a("/api/chat/rooms/:id/:controller",{id:"@id"},{me:{method:"GET",isArray:!0,params:{id:"me"}},users:{method:"GET",params:{id:"users"}},externals:{method:"GET",isArray:!0,params:{id:"type",controller:"external"}},groups:{method:"GET",isArray:!0,params:{id:"groups"}},update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatVisitor",["$resource",function(a){return a("/api/chat/visitors/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineListCtrl",["$scope","ChatVisitor","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_offline_messages.csv",columnDefs:[{name:"fullname",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"ChatWebsite.name",displayName:"Website",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/offline/view/{{row.entity.id}}/detail",name:"detail"}]}]};a.gridOptions=c.gridOptions(b,d,a,{origin:"enquiry"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.list",{url:"/list",templateUrl:"app/channels/chat/offline/list/list.html",controller:"ChatOfflineListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline",{url:"/offline",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineViewCtrl",["$scope","$stateParams","ChatVisitor",function(a,b,c){a.initView=function(){return c.get({id:b.id}).$promise.then(function(b){a.chatVisitor=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.view",{url:"/view/:id",templateUrl:"app/channels/chat/offline/view/view.html",controller:"ChatOfflineViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.offline.view.detail",{url:"/detail",templateUrl:"app/channels/chat/offline/view/view.detail.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/news.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineListCtrl",["$scope","ChatRoom","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_online_messages.csv",columnDefs:[{name:"ChatVisitor.fullname",displayName:"APPLICATION_FULLNAME",cellClass:"text-center"},{name:"ChatVisitor.email",displayName:"APPLICATION_EMAIL",cellClass:"text-center"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/online/view/{{row.entity.id}}/detail",name:"detail"}]}]};a.gridOptions=c.gridOptions(b,d,a,{type:"external"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.list",{url:"/list",templateUrl:"app/channels/chat/online/list/list.html",controller:"ChatOnlineListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online",{url:"/online",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineViewCtrl",["$scope","$stateParams","ChatRoom",function(a,b,c){a.initView=function(){return a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:400,scrollInertia:0},c.get({id:b.id}).$promise.then(function(b){a.chatRoom=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.view",{url:"/view/:id",templateUrl:"app/channels/chat/online/view/view.html",controller:"ChatOnlineViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.online.view.detail",{url:"/detail",templateUrl:"app/channels/chat/online/view/view.detail.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/news.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("PreviewCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").directive("preview",function(){return{templateUrl:"app/channels/chat/preview/preview.html",restrict:"EA",link:function(a,b,c){}}}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("preview",{url:"/preview",templateUrl:"app/channels/chat/preview/preview.html",controller:"PreviewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ChatQueue",["$resource",function(a){return a("/api/chat/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCtrl",["$scope","ChatQueue","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"chat_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/queues/view/{{row.entity.id}}/settings",
+name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/mail/queue/list/list.create.modal.html",controller:"ChatQueueListCreateCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","ChatQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.list",{url:"/list",templateUrl:"app/channels/chat/queue/list/list.html",controller:"ChatQueueListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatQueueViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","ChatQueue","Team",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){b.get("/api/chat/queues/"+e.id).success(function(b){b.penalty=0,a.queue=b}).error(function(a){console.error(a)})},a.updateChatQueue=function(){var f=angular.copy(a.queue);b.put("/api/chat/queues/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){a.queue=f,b.errors.forEach(function(a){c.show(a.message,"danger")})})},a.getTeams=function(){return g.get().$promise.then(function(b){return a.teams=b.rows,f.query({id:e.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindChatQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasChatQueue.penalty}}),h)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.view",{url:"/view/:id",templateUrl:"app/channels/chat/queue/view/view.html",controller:"ChatQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.queues.view.settings",{url:"/settings",templateUrl:"app/channels/chat/queue/view/view.settings.html"}).state("main.channels.chat.queues.view.agents",{url:"/agents",templateUrl:"app/channels/chat/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","ChatQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.chatPause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_chat_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.ChatQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_chat_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.ChatQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.chatPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.ChatQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.chatQueues=b.rows,e.syncUpdates("chat_queue",a.chatQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.chatQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"chatPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><timer data-ng-if="row.entity.pause" start-time="grid.appScope.moment(row.entity.lastPauseAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span><span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.chatQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_chat_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/queue.modal.add.html",controller:"ChatRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.chatQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.chatQueues,function(a){return _.includes(b.queues,a.id)}),channel:"chat",data1:e,data3:b.queues.join(","),data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"chat",data1:a,data3:b,data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/agent.modal.info.html",controller:"ChatRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/chat/realtime/view/agent/agent.html",controller:"ChatRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewQueueCtrl",["$scope","$http","socket","ChatQueue","Agent",function(a,b,c,d,e){a.initQueues=function(){a.gridOptions={enableSorting:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,showTreeExpandNoChildren:!1,columnDefs:[{name:"queueName",displayName:"Queue"},{name:"fullname",displayName:"Agent",cellClass:"text-center"},{name:"online",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><i data-ng-if="row.entity.online != null" class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i></div>'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-if=\"row.entity.chatPause != null\" data-ng-class=\"row.entity.chatPause ? 'icon-control-pause font-red' : 'icon-control-play font-green'\"></i></div>"},{name:"pauseType",cellClass:"text-center",cellTemplate:'<span data-ng-if="row.entity.chatPause">{{row.entity.pauseType}}</span>'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><time data-ng-if="row.entity.lastLoginAt" is="relative-time" datetime="{{row.entity.lastLoginAt}}">April 1, 2014</time></div>'}],onRegisterApi:function(b){a.gridApi=b,a.gridApi.treeBase.on.rowExpanded(a,function(b){var c=_.findIndex(a.gridOptions.data,{$$hashKey:b.entity.$$hashKey});b.entity.Users&&b.entity.Users.forEach(function(b){_.find(a.gridOptions.data,{name:b.name})||a.gridOptions.data.splice(c+1,0,b)})})}},d.get(function(b){a.gridOptions.data=[],b.rows.forEach(function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b),b.Users&&b.Users.forEach(function(b){b.agentName=b.name,a.gridOptions.data.push(b)})}),c.socket.on("agent:save",function(b){var c=_.filter(a.gridOptions.data,{agentName:b.name});c.forEach(function(a){a.online=b.online,a.lastLoginAt=b.lastLoginAt})}),c.socket.on("chat_queue:save",function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b)}),c.socket.on("chat_queue:remove",function(b){_.remov(a.gridOptions.data,{queueName:b.name})}),c.socket.on("user_has_chat_queue:save",function(b){var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.ChatQueueId});e.get({id:b.UserId}).$promise.then(function(b){a.gridOptions.data.splice(c+1,0,{id:b.id,name:b.name,fullname:b.fullname,agentName:b.name,online:b.online,lastLoginAt:b.lastLoginAt})})["catch"](function(a){console.error(a)})}),c.socket.on("user_has_chat_queue:remove",function(b){for(var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.ChatQueueId}),d=c+1;d<a.gridOptions.data.length;d++)a.gridOptions.data[d].id==b.UserId&&a.gridOptions.data.splice(d,1)})},function(a){console.error(a)})},a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){c.unsyncUpdates("report_mail:save"),c.unsyncUpdates("report_mail:update")}),a.initAgents=function(){b.get("/api/report/mails").success(function(b){a.agents=b,c.socket.on("report_mail:save",function(b){var c=_.find(a.agents,{id:b.id});c||a.agents.unshift(b)}),c.socket.on("report_mail:update",function(b){var c=_.find(a.agents,{id:b.id}),d=a.agents.indexOf(c);c&&_.merge(a.agents[d],b)})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.queues",{url:"/queues",templateUrl:"app/channels/chat/realtime/view/queue/queue.html",controller:"ChatRealtimeViewQueueCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewSessionCtrl",["$scope","$http","socket","uiGridConstants",function(a,b,c,d){a.initSessions=function(){a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"uniqueid",cellClass:"text-center",width:150,enableSorting:!1,enableFiltering:!0},{name:"application",displayName:"APPLICATION_APP",headerCellFilter:"translate",cellClass:"text-center"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center"},{name:"agentname",cellClass:"text-center"},{name:"websitename",displayName:"APPLICATION_WEB_SITE",headerCellFilter:"translate"},{name:"joinAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.joinAt" is="relative-time" datetime="{{row.entity.joinAt}}">April 1, 2014</time>',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.leaveAt" is="relative-time" datetime="{{row.entity.leaveAt}}">April 1, 2014</time>'},{name:"unmanagedAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.unmanagedAt" is="relative-time" datetime="{{row.entity.unmanagedAt}}">April 1, 2014</time>'}],data:[]},b.get("/api/report/chat/sessions").success(function(b){a.gridOptions.data=b.rows,c.socket.on("report_chat_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id}),d=a.gridOptions.data.indexOf(c);c?_.merge(a.gridOptions.data[d],b):a.gridOptions.data.unshift(b)})}).error(function(a){console.error(a)})},a.$on("$destroy",function(){c.unsyncUpdates("report_chat:save"),c.unsyncUpdates("report_chat:update")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.sessions",{url:"/sessions",templateUrl:"app/channels/chat/realtime/view/session/session.html",controller:"ChatRealtimeViewSessionCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewCtrl",["$scope",function(a){a.agents=[{name:"Queues",link:"main.chat.realtime.view.agent.queues"},{name:"Timeline",link:"main.chat.realtime.view.agent.timeline"}],a.sessions=[{name:"Sessions",link:"main.chat.realtime.view.sessions"}]}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view",{url:"/view",templateUrl:"app/channels/chat/realtime/view/view.html",controller:"ChatRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatVisitorListCtrl",["$scope","ChatVisitor","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"chat_visitors.csv",columnDefs:[{name:"fullname",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"origin",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/visitors/view/{{row.entity.id}}/profile",name:"profile"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.list",{url:"/list",templateUrl:"app/channels/chat/visitor/list/list.html",controller:"ChatVisitorListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatVisitorViewCtrl",["$scope","$stateParams","ChatVisitor",function(a,b,c){a.initView=function(){return c.get({id:b.id}).$promise.then(function(b){a.chatVisitor=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.view",{url:"/view/:id",templateUrl:"app/channels/chat/visitor/view/view.html",controller:"ChatVisitorViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.visitors.view.profile",{url:"/profile",templateUrl:"app/channels/chat/visitor/view/view.profile.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors",{url:"/visitors",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("ChatApplication",["$resource",function(a){return a("/api/chat/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatWebsite",["$resource",function(a){return a("/api/chat/websites/:websiteId/:controller/:id",{id:"@websiteId"},{update:{method:"PUT"},updateFields:{method:"PUT",isArray:!0}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteListCtrl",["$scope","gridOptions","ChatWebsite",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_websites.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.id}}/embedding/view",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.list",{url:"/list",templateUrl:"app/channels/chat/website/list/list.html",controller:"ChatWebsiteListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"chat_applications.csv",columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.ChatQueue ? row.entity.ChatQueue.name : row.entity.User.name}}</span></div>"},{name:"timeout",cellClass:"text-center"},{name:"interval",cellClass:"text-center"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.ChatWebsiteId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.list",{url:"/list",templateUrl:"app/channels/chat/website/view/action/list/list.html",controller:"ChatWebsiteViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","ChatApplication","ChatQueue","Agent","Interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],k.get({id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1]),a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.show(d.instant("Something went wrong!"),"danger")})},a.getQueues=function(){return l.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return m.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return n.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){var b=["*","*","*","*"],e={app:a.application.app,timeout:a.application.timeout,chatAccountId:c.id};switch(a.application.app){case"agent":e.UserId=a.application.UserId;break;case"queue":e.chatQueueId=a.application.chatQueueId}switch(a.application.intType){case"always":e.interval=b.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(b[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?b[1]="*":b[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?b[2]="*":b[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?b[3]="*":b[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",e.interval=b.join(","),delete a.application.IntervalId;break;case"list":e.IntervalId=a.application.IntervalId}return k.update({id:c.actionId},e).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/chat/website/view/action/view/view.html",controller:"ChatWebsiteViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionWizardCtrl",["$scope","$http","Agent","Interval","ChatQueue","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={app:"queue",intType:"always",alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return e.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return d.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){var c=["*","*","*","*"],d={app:a.application.app,timeout:a.application.timeout,ChatWebsiteId:f.websiteId};switch(a.application.app){case"agent":d.UserId=a.application.UserId;break;case"queue":d.ChatQueueId=a.application.ChatQueueId}switch(a.application.intType){case"always":d.interval=c.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(c[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?c[1]="*":c[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?c[2]="*":c[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?c[3]="*":c[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",d.interval=c.join(","),delete a.application.IntervalId;break;case"list":d.IntervalId=a.application.IntervalId}b.post("/api/chat/applications",d).success(function(){h.path("/channels/chat/websites/view/"+f.websiteId+"/actions/list")}).error(function(a){console.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/view/action/wizard/wizard.html",controller:"ChatWebsiteViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding",{url:"/embedding",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewEmbeddingViewCtrl",["$scope","$stateParams","$translate","clipboard","xAlert","ChatWebsite",function(a,b,c,d,e,f){a.initView=function(){return f.get({websiteId:b.websiteId,controller:"snippet"}).$promise.then(function(b){a.snippetCode=b.html})["catch"](function(a){e.show(a.message,"danger")})},a.copyToClipboard=function(){d.copyText(a.snippetCode),e.show(c.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding.view",{url:"/view",templateUrl:"app/channels/chat/website/view/embedding/view/view.html",controller:"ChatWebsiteViewEmbeddingViewCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form",{url:"/forms",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewFormViewCtrl",["$scope","$builder","$validator","$stateParams","$translate","ChatWebsite","xAlert",function(a,b,c,d,e,f,g){
+a.saveForm=function(a){var c=angular.copy(b.forms[a]);return c.length>3?g.show("You can insert at least 3 input elements","danger"):(_.forEach(c,function(a){delete a.id}),f.updateFields({websiteId:d.websiteId,controller:"fields",id:a},c).$promise.then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")}))},a.getChatWebsiteFields=function(a){return f.query({websiteId:d.websiteId,controller:"fields",id:a}).$promise.then(function(c){_.forEach(c,function(c){b.addFormObject(a,c)})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form.view",{url:"/view",templateUrl:"app/channels/chat/website/view/form/view/view.html",controller:"ChatWebsiteViewFormViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewProactiveListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","$uibModal",function(a,b,c,d,e,f,g){a.initProactiveActions=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"name"},{name:"type"},{name:"action",width:125,buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"proactive"})},a.createItem=function(b){var c=g.open({animation:!0,templateUrl:"app/channels/chat/website/view/proactive/list/list.create.modal.html",controller:"ChatWebsiteProactiveListCreateCtrl",resolve:{item:b}});c.result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteProactiveListCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","ChatWebsite","xAlert","item",function(a,b,c,d,e,f,g){a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_PROACTIVE_ACTION"):b.instant("APPLICATION_NEW_PROACTIVE_ACTION"),a.possibleType=[{type:"mouseOver",title:"Mouse Over"},{type:"timeout",title:"Timeout"}],a.save=function(){return g?e.update({websiteId:d.websiteId,controller:"proactive",id:a.item.id},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.show(a.data.message,"danger")}):e.save({websiteId:d.websiteId,controller:"proactive"},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive.list",{url:"/list",templateUrl:"app/channels/chat/website/view/proactive/list/list.html",controller:"ChatWebsiteViewProactiveListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive",{url:"/proactive",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet",{url:"/snippet",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewSnippetViewCtrl",["$scope","$http","$stateParams","$translate","Template",function(a,b,c,d,e){a.$translate=d,a.statePreview={state:"online"},a.enquirySwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.lang={HeaderCurrentlyChatting:"Live Chat",HeaderOffline:"Contact us",OperatorOfflineMessage:"It appears as if all operators are currently offline.",OfflineMessage:"<strong>We're not online.</strong><br/>It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.",EnquiryMessagePlaceholder:"Your message...",EnquiryButtonText:"Leave message",EnquirySubmitSuccess:"Your message was sucessfully submitted - we will contact you as soon as possible.",OperatorComposing:"{fullname} is typing...",FirstMessageText:"",ExitChatButtonText:"Exit Chat",ExitChatQuestionText:"Are you sure?",ExitChatButtonConfirmText:"Yes",ExitChatButtonCancelText:"No",MessagePlaceholderText:"Your message...",MessageSendButtonText:"Send",ValidationEmailRequired:"Please enter your email address",ValidationEmailInvalid:"Please enter a valid email address",ValidationEmailMaxLength:"The email address may not exceed 85 characters",ValidationUsernameRequired:"Please enter your name",ValidationUsernameMaxLength:"The name may not exceed 45 characters",ValidationEnquiryRequired:"Please enter your enquiry",ValidationEnquiryMaxLength:"The enquiry may not exceed 1500 characters",ValidationMessageRequired:"Please enter your message",ValidationMessageMaxLength:"The message may not exceed 750 characters"},a.initView=function(){e.get().$promise.then(function(b){console.log(b),a.mailTemplates=b.rows})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet.view",{url:"/view",templateUrl:"app/channels/chat/website/view/snippet/view/view.html",controller:"ChatWebsiteViewSnippetViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewCtrl",["$scope","xAlert","$http","$location","$stateParams","$translate","WizardHandler","ChatApplication","ChatWebsite",function(a,b,c,d,e,f,g,h,i){a.initApplication=function(){a.forms={},a.application={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.deleteItem=function(a){return h["delete"]({id:a}).$promise.then(function(){b.show(f.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(f.instant("Something went wrong!"),"danger")})},a.initView=function(){return i.get({id:e.websiteId}).$promise.then(function(b){a.chatWebsite=b})["catch"](function(a){b.show(a.message,"danger")})},a.updateItem=function(){return i.update({id:a.chatWebsite.id},a.chatWebsite).$promise.then(function(){b.show(f.instant("MESSAGE_CHAT_WEBSITE_UPDATE_SUCCESS")+"!","success")})["catch"](function(){b.show(f.instant("MESSAGE_CHAT_WEBSITE_UPDATE_FAILURE"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view",{url:"/view/:websiteId",templateUrl:"app/channels/chat/website/view/view.html",controller:"ChatWebsiteViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites",{url:"/websites",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","ChatWebsite",function(a,b,c,d,e,f,g){a.$translate=d,a.forms={formSetting:void 0,formAppearance:void 0,formLabel:void 0,formFunctionality:void 0},a.next=function(){e.wizard().next()},a.exitValidation=function(a){return a},a.item={},a.createItem=function(){return g.save(a.item).$promise.then(function(){f.show(d.instant("MESSAGE_CHAT_WEBSITE_CREATE_SUCCESS"),"success"),c.path("/channels/chat/websites/list")})["catch"](function(a){f.show(d.instant("MESSAGE_CHAT_WEBSITE_CREATE_FAILURE"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/wizard/wizard.html",controller:"ChatWebsiteWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountListCtrl",["$scope","$http","xAlert","$translate","socket","Modal","$rootScope","$log","stResource",function(a,b,c,d,e,f,g,h,i){a.conf={faxAccountsByPage:{name:"10",value:10}},a.faxAccountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.fax_accounts={checked:[]},a.check=function(b,c){c?a.fax_accounts.checked=angular.copy(_.map(a.displayedFaxAccounts,"id")):a.fax_accounts.checked=[]},a.initList=function(b){e.unsyncUpdates("fax_account"),b.url="/api/fax/accounts",i.getPage(b).then(function(c){a.displayedFaxAccounts=c.rows,b.pagination.numberOfPages=c.total_pages,g.updateTableConfig(a.faxAccountsByPage,a.displayedFaxAccounts.length),g.updateTableConfig(a.conf.faxAccountsByPage,a.displayedFaxAccounts.length)}),e.socket.on("fax_account:save",function(){a.initList(b)}),e.socket.on("fax_account:remove",function(c){a.fax_accounts.checked=_.without(a.fax_accounts.checked,c.id),a.initList(b)})},a.deleteItem=f.confirm["delete"](function(a){b["delete"]("api/fax/accounts/"+a).success(function(){c.show(d.instant("MESSAGE_FAX_ACCOUNT_DELETE_SUCCESS"),"success")}).error(function(){c.show(d.instant("MESSAGE_FAX_ACCOUNT_DELETE_FAILURE"),"danger")})}),a.deleteItems=f.confirm["delete"](function(){b["delete"]("/api/fax/accounts",{params:{id:a.fax_accounts.checked}}).success(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){c.show(d.instant(a.message),"danger")})}),a.getFaxAccounts=function(b){return _.map(a.faxAccountsByPage,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.$on("$destroy",function(){e.unsyncUpdates("fax_account")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.list",{url:"/list",templateUrl:"app/channels/fax/account/list/list.html",controller:"FaxAccountListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.forms={},a.sortableOptions={stop:function(){b.post("api/fax/accounts/"+c.id+"/applications",{applications:_.map(a.faxApplications,"id")}).success(function(b){a.faxApplications=b}).error(function(a){console.error(a)})},"ui-floating":!0},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.initApplication=function(){a.forms={},a.application={}},a.deleteItem=i.confirm["delete"](function(a){b["delete"]("api/fax/applications/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.getAppdata=function(b,c){switch(b){case"agent":return a.agents?_.find(a.agents,{id:c}).name:c;case"queue":return a.faxQueues?_.find(a.faxQueues,{id:c}).name:c}return"UNKNOWN"},a.createItem=function(){switch(a.application.appdata=a.application.appdata.id,a.application.app){case"agent":a.application.UserId=parseInt(a.application.appdata,10);break;case"queue":a.application.FaxQueueId=parseInt(a.application.appdata,10)}a.application.FaxAccountId=c.id,b.post("api/fax/applications",a.application).success(function(){e.path("/channels/fax/accounts/view/"+c.id+"/routes")}).error(function(){h.show("Something went wrong!","danger")})},a.$watch("application.app",function(c){if(c){var d;switch(c){case"agent":d="api/agents";break;case"queue":d="api/fax/queues"}b.get(d).success(function(b){a.items=b.rows})}},!0),a.initView=function(){b.get("/api/trunks").success(function(b){a.trunks=b.rows}).error(function(a){console.log(a)}),b.get("/api/fax/accounts/"+c.id).success(function(b){a.account=b}).error(function(){})},a.getAgents=function(){b.get("api/fax/agents").success(function(b){a.agents=b})},a.getFaxApplications=function(){b.get("/api/fax/applications",{params:{FaxAccountId:c.id}}).success(function(b){a.faxApplications=b,g.socket.on("fax_application:remove",function(b){_.remove(a.faxApplications,{id:b.id})})}),b.get("/api/agents").success(function(b){a.agents=b.rows}),b.get("/api/fax/queues").success(function(b){a.faxQueues=b.rows})},a.updateItemFaxAccount=function(){b.put("/api/fax/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_FAX_ACCOUNT_UPDATE_SUCCESS")+".","success")}).error(function(){h.show(d.instant("MESSAGE_FAX_ACCOUNT_UPDATE_FAILURE")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view",{url:"/view/:id",templateUrl:"app/channels/fax/account/view/view.html",controller:"FaxAccountViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.channels.fax.accounts.view.settings",{url:"/settings",templateUrl:"app/channels/fax/account/view/view.settings.html",authenticate:!0}).state("main.channels.fax.accounts.view.routes",{url:"/routes",templateUrl:"app/channels/fax/account/view/view.routes.html",authenticate:!0}).state("main.channels.fax.accounts.view.applications",{url:"/applications",templateUrl:"app/channels/fax/account/view/view.applications.html",authenticate:!0})}]),angular.module("xCallyShuttleApp").controller("FaxAccountWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.ecm=!1,a.item.minrate="9600",a.item.maxrate="33600",b.get("/api/trunks").success(function(b){a.trunks=b.rows}).error(function(a){console.error(a)})},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("api/fax/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_FAX_ACCOUNT_CREATE_SUCCESS")+".","success"),c.path("/channels/fax/accounts/list")}).error(function(){e.show(d.instant("MESSAGE_FAX_ACCOUNT_CREATE_FAILURE")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/fax/account/wizard/wizard.html",controller:"FaxAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax",{url:"/fax",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("FaxInboxComposeCtrl",["$scope","$http","FileUploader","$location","Auth","xAlert","$cookieStore","$translate",function(a,b,c,d,e,f,g,h){a.forms={},a.form={to:[],sto:[]},b.get("api/fax/accounts").success(function(b){a.faxAccounts=b.rows}),a.isNewMessageFromEmpty=!0;var i=a.uploader=new c({url:"api/fax/messages",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+g.get("token")}});i.filters.push({name:"pdfFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|pdf|".indexOf(b)}}),i.onBeforeUploadItem=function(b){b.formData.push({accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,userId:e.getCurrentUser().id,html:a.form.html?a.form.html:""})},i.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d)},i.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d)},i.onCompleteAll=function(){i.clearQueue(),f.show(h.instant("MESSAGE_WELL_DONE"),"success"),d.path("/channels/fax/inbox/incoming")},i.onWhenAddingFileFailed=function(){f.show(h.instant("MESSAGE_WRONG_FORMAT"),"danger")},a.sendFax=function(){return a.form.sto.length?void(i.queue.length?i.uploadAll():b.post("api/fax/messages",{accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,userId:e.getCurrentUser().id,html:a.form.html,onlyText:!0}).success(function(){f.show(h.instant("MESSAGE_WELL_DONE"),"success"),d.path("/channels/fax/inbox/incoming")}).error(function(a){f.show(h.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),console.error(a)})):(a.forms.compose.to.$valid=!1,void(a.forms.compose.to.$invalid=!0))},a.cancel=function(){a.form.sto=[],delete a.form.from}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.compose",{url:"/compose",templateUrl:"app/channels/fax/inbox/room/room.html",controller:"FaxInboxComposeCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxInboxCtrl",["$scope","$http","$location","$translate","$timeout","$notification","Auth","socket","$interval",function(a,b,c,d,e,f,g,h,i){a.go=function(a,d,e){e?b.put("/api/fax/rooms/"+d,{status:e}).success(function(){c.path(a)}).error(function(a){console.error(a)}):c.path(a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox",{url:"/inbox",templateUrl:"app/channels/fax/inbox/inbox.html",controller:"FaxInboxCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/inbox.css","assets/css/todo.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxIncomingCtrl",["$scope","$http","$location","socket","Auth","xAlert",function(a,b,c,d,e,f){a.$location=c,a.getRooms=function(){e.isAdmin()?b.get("api/fax/rooms").success(function(b){a.faxRooms=b,d.syncUpdates("fax_room",a.faxRooms)}).error(function(a){console.error(a),f.show($translate.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")}):b.get("api/fax/rooms/agent/"+e.getCurrentUser().id).success(function(b){a.faxRooms=b,d.socket.on("fax_room:update",function(b){b.UserId===e.getCurrentUser().id&&a.faxRooms.push(b)})}).error(function(a){f.show($translate.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.incoming",{url:"/incoming",templateUrl:"app/channels/fax/inbox/incoming/incoming.html",controller:"FaxInboxIncomingCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxInboxRoomCtrl",["$scope","$http","$stateParams","$location","FileUploader","socket","Auth","xAlert","$translate","$cookieStore",function(a,b,c,d,e,f,g,h,i,j){function k(){a.lastMessage=_.reject(a.faxRoom.FaxMessages,function(a){return"RECEIVED"!==a.status}),a.lastMessage=_.sortByOrder(a.lastMessage,["id"],["desc"])[0],a.lastMessage&&(console.log(a.faxRoom),a.form.from=a.faxRoom.FaxAccount,a.form.to=[a.lastMessage.From.phone],a.form.sto=[a.lastMessage.From.phone])}var l=a.uploader=new e({url:"api/fax/messages",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+j.get("token")}});l.filters.push({name:"pdfFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|pdf|".indexOf(b)}}),l.onBeforeUploadItem=function(b){console.log(a.form.from.id,a.form.sto[0],a.isNewMessageFromEmpty,c.id,g.getCurrentUser().id),b.formData.push({accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,roomId:c.id,userId:g.getCurrentUser().id,html:a.form.html}),console.log(b)},l.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d)},l.onErrorItem=function(a,b,c,d){console.info("onErrorItem",b,c,d)},l.onCompleteAll=function(){l.clearQueue(),h.show(i.instant("MESSAGE_WELL_DONE"),"success")},l.onWhenAddingFileFailed=function(){h.show(i.instant("MESSAGE_WRONG_FORMAT"),"danger")},a.initRoomView=function(){a.isNewMessageFromEmpty=!0,a.Auth=g,a.forms={},a.form={to:[],sto:[]},b.get("api/agents").success(function(b){a.agents=b}),b.get("api/fax/accounts").success(function(b){a.faxAccounts=b.rows}),c.id&&b.get("/api/fax/rooms/"+c.id).success(function(b){a.faxRoom=b,a.isNewMessageFromEmpty=!1,f.syncUpdates("fax_message",[],function(b,c){"created"===b&&c.FaxRoomId===a.faxRoom.id&&(a.faxRoom.FaxMessages.push(c),k())}),k()}).error(function(a){console.error(a),h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.sendFax=function(){return a.form.sto.length?void(l.queue.length?l.uploadAll():b.post("api/fax/messages",{accountId:a.form.from.id,toNum:a.form.sto[0],isNewRoom:a.isNewMessageFromEmpty,userId:g.getCurrentUser().id,html:a.form.html,onlyText:!0}).success(function(){h.show(i.instant("MESSAGE_WELL_DONE"),"success"),console.log("Fax Message sent")}).error(function(a){h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),console.error(a)})):(a.forms.compose.to.$valid=!1,void(a.forms.compose.to.$invalid=!0))},a.assignAgent=function(a){b.put("/api/fax/rooms/"+c.id,{UserId:a}).success(function(){h.show(i.instant("MESSAGE_WELL_DONE"),"danger")}).error(function(){h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateStatus=function(d){b.put("/api/fax/rooms/"+c.id,{status:d}).success(function(b){a.faxRoom.status=b.status,h.show(i.instant("MESSAGE_WELL_DONE"),"danger")}).error(function(a){console.error(a),h.show(i.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){a.form.sto=[],delete a.form.from,l.clearQueue()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.room",{url:"/room/:id",templateUrl:"app/channels/fax/inbox/room/room.html",controller:"FaxInboxRoomCtrl"})}]),angular.module("xCallyShuttleApp").factory("FaxQueue",["$resource",function(a){return a("/api/fax/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCtrl",["$scope","FaxQueue","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"fax_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/fax/queues/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/fax/queue/list/list.create.modal.html",controller:"FaxQueueListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","FaxQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.list",{url:"/list",templateUrl:"app/channels/fax/queue/list/list.html",controller:"FaxQueueListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","FaxQueue","Team",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return f.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){e.show(a.message,"danger")})},a.updateFaxQueue=function(){return f.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")})},a.getTeams=function(){return g.get().$promise.then(function(b){return a.teams=b.rows,f.query({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasFaxQueue.penalty}}),h)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.view",{url:"/view/:id",templateUrl:"app/channels/fax/queue/view/view.html",controller:"FaxQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.fax.queues.view.settings",{url:"/settings",templateUrl:"app/channels/fax/queue/view/view.settings.html"}).state("main.channels.fax.queues.view.agents",{url:"/agents",templateUrl:"app/channels/fax/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","FaxQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.faxPause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_fax_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.FaxQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_fax_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.FaxQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.faxPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.FaxQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.faxQueues=b.rows,e.syncUpdates("fax_queue",a.faxQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.faxQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"faxPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><timer data-ng-if="row.entity.pause" start-time="grid.appScope.moment(row.entity.lastPauseAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span><span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.faxQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',
+enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_fax_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/queue.modal.add.html",controller:"FaxRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.faxQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.faxQueues,function(a){return _.includes(b.queues,a.id)}),channel:"fax",data1:e,data3:b.queues.join(","),data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"fax",data1:a,data3:b,data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/agent.modal.info.html",controller:"FaxRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/fax/realtime/view/agent/agent.html",controller:"FaxRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view",{url:"/view",templateUrl:"app/channels/fax/realtime/view/view.html",controller:"FaxRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailAccount",["$resource",function(a){return a("/api/mail/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MailAccountListCtrl",["$scope","gridOptions","MailAccount","$stateParams",function(a,b,c,d){a.initView=function(){var e={exporterCsvFilename:"mail_accounts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"MailServerIn.state",width:100,cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"row.entity.MailServerIn.state === 'CONNECTED' ? 'label-success' : 'label-danger'\">{{row.entity.MailServerIn.state}}</span></div>",displayName:"IMAP",enableSorting:!1,enableFiltering:!1},{name:"MailServerOut.state",width:110,cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"row.entity.MailServerOut.state === 'CONNECTED' ? 'label-success' : 'label-danger'\">{{row.entity.MailServerOut.state}}</span></div>",displayName:"SMTP",enableSorting:!1,enableFiltering:!1},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,e,a,{accountId:d.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.list",{url:"/list",templateUrl:"app/channels/mail/account/list/list.html",controller:"MailAccountListCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailServerIn",["$resource",function(a){return a("/api/mail/servers/in/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailServerOut",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller",{id:"@id"},{update:{method:"PUT"},test:{method:"GET"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionListCtrl",["$scope","gridOptions","MailAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"mail_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.MailQueue ? row.entity.MailQueue.name : row.entity.User.name}}</span></div>"},{name:"timeout",cellClass:"text-center"},{name:"interval",cellClass:"text-center"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.MailAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/mail/account/view/action/list/list.html",controller:"MailAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","MailQueue",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],b.get("/api/mail/applications/"+c.actionId).success(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1]),a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})}).error(function(a){console.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){var e=["*","*","*","*"],g={app:a.application.app,timeout:a.application.timeout,MailAccountId:c.id};switch(a.application.app){case"agent":g.UserId=a.application.UserId;break;case"queue":g.MailQueueId=a.application.MailQueueId}switch(a.application.intType){case"always":g.interval=e.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(e[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?e[1]="*":e[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?e[2]="*":e[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?e[3]="*":e[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",g.interval=e.join(","),delete a.application.IntervalId;break;case"list":g.IntervalId=a.application.IntervalId}b.put("/api/mail/applications/"+c.actionId,g).success(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){f.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/mail/account/view/action/view/view.html",controller:"MailAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionWizardCtrl",["$scope","$http","Agent","MailQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){var c=["*","*","*","*"],d={app:a.application.app,timeout:a.application.timeout,MailAccountId:f.accountId};switch(a.application.app){case"agent":d.UserId=a.application.UserId;break;case"queue":d.MailQueueId=a.application.MailQueueId}switch(a.application.intType){case"always":d.interval=c.join(","),delete a.application.IntervalId;break;case"custom":a.application.alwaysTime||(c[0]=a.application.alwaysTime?"*":a.application.t_from_hm+"-"+a.application.t_to_hm),a.application.wd_from&&a.application.wd_to&&"always"===a.application.wd_from&&"always"===a.application.wd_to?c[1]="*":c[1]=a.application.wd_from&&a.application.wd_to?a.application.wd_from+"-"+a.application.wd_to:"*",a.application.md_from&&a.application.md_to&&"always"===a.application.md_from&&"always"===a.application.md_to?c[2]="*":c[2]=a.application.md_from&&a.application.md_to?a.application.md_from+"-"+a.application.md_to:"*",a.application.m_from&&a.application.m_to&&"always"===a.application.m_from&&"always"===a.application.m_to?c[3]="*":c[3]=a.application.m_from&&a.application.m_to?a.application.m_from+"-"+a.application.m_to:"*",d.interval=c.join(","),delete a.application.IntervalId;break;case"list":d.IntervalId=a.application.IntervalId}b.post("/api/mail/applications",d).success(function(){h.path("/channels/mail/accounts/view/"+f.accountId+"/actions/list")}).error(function(a){console.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/view/action/wizard/wizard.html",controller:"MailAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewCtrl",["$scope","$http","$stateParams","$translate","$location","$timeout","socket","xAlert","MailAccount","MailMessage","MailServerIn","MailServerOut","usSpinnerService",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.$on("$destroy",function(){g.socket.removeAllListeners("mail_message:sent"),g.socket.removeAllListeners("mail_message:failed")}),a.initView=function(){return g.socket.on("mail_message:sent",function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success"),m.stop("spinner-grid")}),g.socket.on("mail_message:failed",function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),m.stop("spinner-grid")}),i.get({id:c.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){h.show(a.message,"danger")})},a.updateItemMailAccount=function(){return i.update({id:c.accountId},{name:a.account.name,description:a.account.description,address:a.account.address,fidelity:a.account.fidelity,timeout:a.account.timeout}).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.show(a.message,"danger")})},a.updateItemMailServerIn=function(){return k.update({id:a.account.MailServerIn.id},a.account.MailServerIn).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.show(a.message,"danger")})},a.updateItemMailServerOut=function(){return l.update({id:a.account.MailServerOut.id},a.account.MailServerOut).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.show(a.message,"danger")})},a.test=function(){return m.spin("spinner-grid"),l.test({id:a.account.MailServerOut.id,controller:"test"}).$promise["finally"](function(){f(function(){m.stop("spinner-grid")},a.CONST_TIMEOUT)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/mail/account/view/view.html",controller:"MailAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.channels.mail.accounts.view.settings",{url:"/settings",templateUrl:"app/channels/mail/account/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","MailAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={MailServerIn:{port:993,ssl:!0,"delete":!1,protocol:"IMAP",filter:"UNSEEN",mailbox:"INBOX",keepalive:!0,authTimeout:5,connTimeout:10},MailServerOut:{port:465,ssl:!0}}},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/channels/mail/accounts/list")})["catch"](function(a){f.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/wizard/wizard.html",controller:"MailAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox",{url:"/inbox",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MailInboxListCtrl",["$scope","$rootScope","$uibModal","MailRoom","gridOptions","uiGridConstants","Auth",function(a,b,c,d,e,f,g){a.loadAgents=function(a){c.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.agents.modal.html",controller:"MailInboxViewModalAgentCtrl",resolve:{roomId:a}})},a.initView=function(){var c={exporterCsvFilename:"mail_rooms.csv",enableRowHeaderSelection:g.isAdmin(),columnDefs:[{name:"id",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!1},{name:"subject"},{name:"from",cellClass:"text-center"},{name:"MailAccount.name",displayName:"Account",cellClass:"text-center",enableSorting:!1,enableFiltering:!1},{name:"users",displayName:"APPLICATION_AGENTS",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{(row.entity.Users | map:'fullname').join(', ')}}</div>",enableSorting:!1,enableFiltering:!1},{name:"status",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"{'label-info': row.entity.status === 'OPEN', 'label-danger': row.entity.status === 'NEW','label-success': row.entity.status === 'CLOSED'}\">{{row.entity.status}}</span></div>",filter:{type:f.filter.SELECT,selectOptions:[{value:"NEW",label:"NEW"},{value:"OPEN",label:"OPEN"},{value:"CLOSED",label:"CLOSED"}]},width:100},{name:"createdAt",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><time is="relative-time" datetime="{{row.entity.createdAt}}">April 1, 2014</time></div>',enableSorting:!1,enableFiltering:!1,width:125},{name:"action",width:175,buttons:[{"class":"blue-hoki",href:"/channels/mail/inbox/view/{{row.entity.id}}/room",name:"open"},{"class":"green-meadow",href:"#",name:"agents",onClick:"grid.appScope.loadAgents(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.id, row.entity.id)",hide:!g.isAdmin()}]}]};a.gridOptions=e.gridOptions(d,c,a),b.$on("mailMessageEvent",function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.list",{url:"/list",templateUrl:"app/channels/mail/inbox/list/list.html",controller:"MailInboxListCtrl"})}]),angular.module("xCallyShuttleApp").directive("mail",function(){return{templateUrl:"app/channels/mail/inbox/mail/mail.html",restrict:"EA",scope:{mailMessage:"=message"}}}),angular.module("xCallyShuttleApp").directive("note",function(){return{templateUrl:"app/channels/mail/inbox/note/note.html",restrict:"EA",scope:{mailMessage:"=message"}}}),angular.module("xCallyShuttleApp").controller("MailInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","MailRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h){console.log("roomId",h),a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:d.id||h,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:d.id||h,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewCtrl",["$scope","$location","$cookieStore","$stateParams","$translate","$uibModal","CannedAnswer","socket","Agent","MailAccount","MailRoom","MailAttachment","MailMessage","FileUploader","Auth","xAlert","usSpinnerService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r,s=[];a.onSelectAnswer=function(b){a.form.html+=b,a.selectedAnswer=""},a.getAnswers=function(a){return g.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},a.initRoom=function(){a.Auth=o,a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:781,scrollInertia:0},a.forms={},a.selectedAnswer="",a.form={disabled:!1,from:[],to:[],sto:[],cc:[],scc:[],html:""},h.socket.on("mail_message:save",function(b){return a.mailRoom&&b.MailRoomId===d.id?m.get({id:b.id}).$promise.then(function(b){a.mailRoom.MailMessages.unshift(b)})["catch"](function(a){console.error(a)}):void 0}),r=a.uploader=new n({url:"api/mail/attachments",autoUpload:!0,withCredentials:!0,headers:{Authorization:"Bearer "+c.get("token")}}),r.removeFromQueue=function(a){var b=this;return l["delete"]({id:a.basename}).$promise.then(function(){var c=b.getIndexOfItem(a),d=b.queue[c];d.isUploading&&d.cancel(),b.queue.splice(c,1),d._destroy(),b.progress=b._getTotalProgress(),s=_.reject(s,{basename:a.basename})})["catch"](function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},r.onErrorItem=function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},r.onSuccessItem=function(a,b){var c={size:b.size,path:b.path,name:b.name,basename:b.basename,type:b.type};a=_.merge(a,c),s.push(c)},i.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)}),j.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)}),d.id&&k.get({id:d.id}).$promise.then(function(b){a.mailRoom=b,a.form.from.push(b.MailAccount.address);var c=_.last(a.mailRoom.MailMessages);a.form.to=a.form.cc=a.form.bcc=_.union(c.from,c.to,c.cc,c.bcc),a.form.sto=_.remove(a.form.to,function(a){return a!==b.MailAccount.address}),"NEW"===a.mailRoom.status&&k.update({id:d.id},{status:"OPEN"})})["catch"](function(a){console.error(a)})},a.cancel=function(){a.form.disabled=!1,a.form.from=[],a.form.to=[],a.form.sto=[],a.form.cc=[],a.form.scc=[],delete a.form.subject,delete a.form.html},a.updateStatus=function(a){return k.update({id:d.id},{status:a}).$promise.then(function(){p.show(e.instant("MESSAGE_STATUS_UPDATE_SUCCESS"),"success"),b.path("/channels/mail/inbox/list")})["catch"](function(a){p.show(a.message,"danger")})},a.loadAgents=function(){f.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.agents.modal.html",controller:"MailInboxViewModalAgentCtrl"})},a.loadTemplate=function(){f.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.templates.modal.html",controller:"MailInboxViewModalTemplateCtrl"}).result.then(function(b){a.form.subject=b.template.subject,a.form.html=b.template.html})},a.loadNote=function(){f.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.notes.modal.html",controller:"MailInboxViewModalNoteCtrl"})},a.sendMail=function(){var c={},f={subject:a.mailRoom?a.mailRoom.subject:a.form.subject,from:a.form.from,to:a.form.sto||[],cc:a.form.scc||[],html:a.form.html||null,text:a.form.text||null,inReplyTo:c.messageId||null,status:"SENDING",MailAttachments:s};return q.spin("spinner-grid"),a.form.disabled=!0,a.mailRoom?(c=_.last(a.mailRoom.MailMessages,{status:"RECEIVED"}),f.inReplyTo=c.messageId||null,k.save({id:d.id,controller:"messages"},f).$promise.then(function(){p.show(e.instant("MESSAGE_WELL_DONE"),"success"),b.path("/channels/mail/inbox/list")})["catch"](function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){q.stop("spinner-grid"),a.form.disabled=!1})):m.save(f).$promise.then(function(){p.show(e.instant("MESSAGE_MAIL_MESSAGE_SEND_SUCCESS"),"success"),b.path("/channels/mail/inbox/list")})["catch"](function(){p.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){q.stop("spinner-grid"),a.form.disabled=!1})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view",{url:"/view",templateUrl:"app/channels/mail/inbox/view/view.html"}).state("main.channels.mail.inbox.view.compose",{url:"/compose",templateUrl:"app/channels/mail/inbox/view/view.room.html",controller:"MailInboxViewCtrl"}).state("main.channels.mail.inbox.view.room",{url:"/:id/room",templateUrl:"app/channels/mail/inbox/view/view.room.html",controller:"MailInboxViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalNoteCtrl",["$scope","$uibModalInstance","$stateParams","$translate","MailRoom","xAlert",function(a,b,c,d,e,f){a.initModal=function(){a.item={}},a.ok=function(){return e.save({id:c.id,controller:"messages"},{text:a.item.text,status:"NOTE"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close()})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalTemplateCtrl",["$scope","$uibModalInstance","Template",function(a,b,c){a.initModal=function(){return a.item={},c.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail",{url:"/mail",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("MailAttachment",["$resource",function(a){return a("/api/mail/attachments/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").factory("MailMessage",["$resource",function(a){return a("/api/mail/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailReport",["$resource",function(a){return a("/api/report/mails/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailRoom",["$resource",function(a){return a("/api/mail/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MailQueueListCtrl",["$scope","MailQueue","gridOptions","$uibModal","xAlert",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"voice_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/queues/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/mail/queue/list/list.create.modal.html",controller:"MailQueueListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("MailQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","MailQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.list",{url:"/list",templateUrl:"app/channels/mail/queue/list/list.html",controller:"MailQueueListCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailQueue",["$resource",function(a){return a("/api/mail/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/scripts/components-dropdowns.js"]})}]},data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MailQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","Team","MailQueue",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return g.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return g["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return g.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateMailQueue=function(){return g.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})},a.getTeams=function(){return f.get().$promise.then(function(b){return a.teams=b.rows,g.query({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasMailQueue.penalty}}),h)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.view",{url:"/view/:id",templateUrl:"app/channels/mail/queue/view/view.html",
+controller:"MailQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.mail.queues.view.settings",{url:"/settings",templateUrl:"app/channels/mail/queue/view/view.settings.html"}).state("main.channels.mail.queues.view.agents",{url:"/agents",templateUrl:"app/channels/mail/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","MailQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.mailPause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_mail_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.MailQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_mail_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.MailQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.mailPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.MailQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.mailQueues=b.rows,e.syncUpdates("mail_queue",a.mailQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.mailQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"mailPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><timer data-ng-if="row.entity.pause" start-time="grid.appScope.moment(row.entity.lastPauseAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span><span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.mailQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_mail_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/queue.modal.add.html",controller:"MailRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.mailQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.mailQueues,function(a){return _.includes(b.queues,a.id)}),channel:"mail",data1:e,data3:b.queues.join(","),data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"mail",data1:a,data3:b,data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/agent.modal.info.html",controller:"MailRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/mail/realtime/view/agent/agent.html",controller:"MailRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewQueueCtrl",["$scope","$http","socket","MailQueue","Agent",function(a,b,c,d,e){a.initQueues=function(){a.gridOptions={enableSorting:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,showTreeExpandNoChildren:!1,columnDefs:[{name:"queueName",displayName:"Queue"},{name:"fullname",displayName:"Agent",cellClass:"text-center"},{name:"online",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><i data-ng-if="row.entity.online != null" class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i></div>'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-if=\"row.entity.mailPause != null\" data-ng-class=\"row.entity.mailPause ? 'icon-control-pause font-red' : 'icon-control-play font-green'\"></i></div>"},{name:"pauseType",cellClass:"text-center",cellTemplate:'<span data-ng-if="row.entity.mailPause">{{row.entity.pauseType}}</span>'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><time data-ng-if="row.entity.agentName" is="relative-time" datetime="{{row.entity.lastLoginAt}}">April 1, 2014</time></div>'}],onRegisterApi:function(b){a.gridApi=b,a.gridApi.treeBase.on.rowExpanded(a,function(b){var c=_.findIndex(a.gridOptions.data,{$$hashKey:b.entity.$$hashKey});b.entity.Users&&b.entity.Users.forEach(function(b){_.find(a.gridOptions.data,{name:b.name})||a.gridOptions.data.splice(c+1,0,b)})})}},d.get(function(b){a.gridOptions.data=[],b.rows.forEach(function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b),b.Users&&b.Users.forEach(function(b){b.agentName=b.name,a.gridOptions.data.push(b)})}),c.socket.on("agent:save",function(b){var c=_.filter(a.gridOptions.data,{agentName:b.name});c.forEach(function(a){a.online=b.online,a.lastLoginAt=b.lastLoginAt})}),c.socket.on("mail_queue:save",function(b){b.$$treeLevel=0,b.queueName=b.name,a.gridOptions.data.push(b)}),c.socket.on("mail_queue:remove",function(b){_.remov(a.gridOptions.data,{queueName:b.name})}),c.socket.on("user_has_mail_queue:save",function(b){var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.MailQueueId});e.get({id:b.UserId}).$promise.then(function(b){a.gridOptions.data.splice(c+1,0,{id:b.id,name:b.name,fullname:b.fullname,agentName:b.name,online:b.online,lastLoginAt:b.lastLoginAt})})["catch"](function(a){console.error(a)})}),c.socket.on("user_has_mail_queue:remove",function(b){for(var c=_.findIndex(a.gridOptions.data,function(a){return a.queueName&&a.id===b.MailQueueId}),d=c+1;d<a.gridOptions.data.length;d++)a.gridOptions.data[d].id==b.UserId&&a.gridOptions.data.splice(d,1)})},function(a){console.error(a)})},a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){c.unsyncUpdates("report_mail:save"),c.unsyncUpdates("report_mail:update")}),a.initAgents=function(){b.get("/api/report/mails").success(function(b){a.agents=b,c.socket.on("report_mail:save",function(b){var c=_.find(a.agents,{id:b.id});c||a.agents.unshift(b)}),c.socket.on("report_mail:update",function(b){var c=_.find(a.agents,{id:b.id}),d=a.agents.indexOf(c);c&&_.merge(a.agents[d],b)})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.queues",{url:"/queues",templateUrl:"app/channels/mail/realtime/view/queue/queue.html",controller:"MailRealtimeViewQueueCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewSessionCtrl",["$scope","$http","socket","uiGridConstants",function(a,b,c,d){a.initSessions=function(){a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"uniqueid",displayName:"",cellClass:"text-center",width:150,enableSorting:!1,enableFiltering:!0},{name:"application",displayName:"APPLICATION_APP",headerCellFilter:"translate",cellClass:"text-center"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center"},{name:"agentname",cellClass:"text-center"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"joinAt",displayName:"joinAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.joinAt" is="relative-time" datetime="{{row.entity.joinAt}}">April 1, 2014</time>',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",displayName:"leaveAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.leaveAt" is="relative-time" datetime="{{row.entity.leaveAt}}">April 1, 2014</time>'},{name:"unmanagedAt",displayName:"unmanangedAt",cellClass:"text-center",cellTemplate:'<time data-ng-if="row.entity.unmanagedAt" is="relative-time" datetime="{{row.entity.unmanagedAt}}">April 1, 2014</time>'}],data:[]},b.get("/api/report/mail/sessions").success(function(b){a.gridOptions.data=b.rows,c.socket.on("report_mail_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id}),d=a.gridOptions.data.indexOf(c);c?_.merge(a.gridOptions.data[d],b):a.gridOptions.data.unshift(b)})}).error(function(a){console.error(a)})},a.$on("$destroy",function(){c.unsyncUpdates("report_mail:save"),c.unsyncUpdates("report_mail:update")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.sessions",{url:"/sessions",templateUrl:"app/channels/mail/realtime/view/session/session.html",controller:"MailRealtimeViewSessionCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view",{url:"/view",templateUrl:"app/channels/mail/realtime/view/view.html",controller:"MailRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportCall",["$resource",function(a){return a("/api/report/calls/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChanSpy",["$resource",function(a){return a("/api/chanspy/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy",{url:"/chanspy",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCtrl",["$scope","$uibModal","ChanSpy","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"chanspy.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/channels/voice/chanspy/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/channels/voice/chanspy/list/list.create.modal.html",controller:"ChanSpyListCreateCtrl"});c.result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCreateCtrl",["$scope","$translate","$uibModalInstance","ChanSpy","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.save=function(){return a.item.options=a.item.options.join(""),d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.list",{url:"/list",templateUrl:"app/channels/voice/chanspy/list/list.html",controller:"ChanSpyListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChanSpyViewCtrl",["$scope","$translate","$stateParams","xAlert","ChanSpy",function(a,b,c,d,e){a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.getChanSpy=function(){return e.get({id:c.id}).$promise.then(function(b){b.options=b.options.split(""),a.chanspy=b})["catch"](function(a){d.show(a.data.message,"danger")})},a.updateChanSpy=function(){var f=angular.copy(a.chanspy);return f.options=f.options.join(""),e.update({id:c.id},f).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.view",{url:"/view/:id",templateUrl:"app/channels/voice/chanspy/view/view.html",controller:"ChanSpyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.chanspy.view.settings",{url:"/settings",templateUrl:"app/channels/voice/chanspy/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceContext",["$resource",function(a){return a("/api/voice/contexts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts",{url:"/contexts",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceContextListCtrl",["$scope","VoiceContext","gridOptions","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:170,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/channels/voice/contexts/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var c=d.open({animation:!0,templateUrl:"app/channels/voice/context/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});c.result.then(function(c){return b.save(c).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.show(a.data.message,"danger")})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.list",{url:"/list",templateUrl:"app/channels/voice/context/list/list.html",controller:"VoiceContextListCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceContextViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.getContext=function(){b.get("/api/voice/contexts/"+e.id).success(function(b){a.context=b}).error(function(a){console.error(a),f.path("/voice/contexts/list")})},a.updateVoiceContext=function(){var f=angular.copy(a.context);b.put("/api/voice/contexts/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.context=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.view",{url:"/view/:id",templateUrl:"app/channels/voice/context/view/view.html",controller:"VoiceContextViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.contexts.view.settings",{url:"/settings",templateUrl:"app/channels/voice/context/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("VoiceMohListCtrl",["$scope","gridOptions","VoiceMoh","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_mohs.csv",columnDefs:[{name:"name"},{name:"directory"},{name:"sort"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/voice/mohs/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/voice/moh/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});b.result.then(function(b){return c.save(b).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.list",{url:"/list",templateUrl:"app/channels/voice/moh/list/list.html",controller:"VoiceMohListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceMoh",["$resource",function(a){return a("/api/voice/musiconholds/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs",{url:"/mohs",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceMohViewCtrl",["$scope","$http","xAlert","$translate","VoiceMoh","$stateParams","socket","Modal","$sce","$location","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.$translate=d,a.audioSources={},a.sortOptions=[{value:"random",name:"APPLICATION_RANDOM"},{value:"alpha",name:"APPLICATION_ALPHABETICAL"}],a.getMoh=function(){return e.get({id:f.id}).$promise.then(function(b){delete b.stamp,a.moh=b})["catch"](function(a){c.show(a.message,"danger")})},a.updateVoiceMoh=function(){return console.log("update"),e.update({id:f.id},a.moh).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.show(a.message,"danger")})},a.addMohs=function(){return e.save({id:f.id,controller:"files"},a.item).$promise.then(function(){j.path("/channels/voice/mohs/view/"+f.id+"/audios")})["catch"](function(a){c.show(a.message,"danger")})},a.getAudioFiles=function(){return e.get({id:f.id,controller:"files"}).$promise.then(function(b){a.audioFiles=b.files,a.mohPath=b.path,a.audioFiles.forEach(function(a){l(a)})})["catch"](function(a){c.show(a.message,"danger")})},a.getSecureSrc=function(a){return i.trustAsResourceUrl(a)},a.getSounds=function(){return a.item={sounds:[]},k.get().$promise.then(function(b){a.soundList=b.rows})["catch"](function(a){c.show(a.message,"danger")})};var l=function(c){b.get("/api/voice/musiconholds/stream",{params:{path:encodeURI(a.mohPath+"/"+c)}}).success(function(b){a.audioSources[c]="data:audio/ogg;base64,"+b}).error(function(a){console.error(a)})};a.deleteItem=h.confirm["delete"](function(e){b["delete"]("/api/voice/musiconholds/"+f.id+"/files",{params:{filename:e}}).success(function(){_.remove(a.audioFiles,function(a){return a===e}),c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){c.show(a.message,"danger")})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.view",{url:"/view/:id",templateUrl:"app/channels/voice/moh/view/view.html",controller:"VoiceMohViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.mohs.view.settings",{url:"/settings",templateUrl:"app/channels/voice/moh/view/view.settings.html"}).state("main.channels.voice.mohs.view.audios",{url:"/audios",templateUrl:"app/channels/voice/moh/view/view.audios.html",cache:!1}).state("main.channels.voice.mohs.view.add",{url:"/add",templateUrl:"app/channels/voice/moh/view/view.addFiles.html",cache:!1})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCtrl",["$scope","$rootScope","VoiceQueue","gridOptions","$uibModal",function(a,b,c,d,e){a.initView=function(){var b={exporterCsvFilename:"voice_queues.csv",primaryKey:"name",columnDefs:[{name:"name"},{name:"strategy"},{name:"description"},{name:"action",width:200,buttons:[{"class":"blue-hoki",href:"/channels/voice/queues/view/{{row.entity.name}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/voice/queues/view/{{row.entity.name}}/agents",name:"agents"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var b=e.open({animation:!0,templateUrl:"app/channels/voice/queue/list/list.create.modal.html",controller:"VoiceQueueListCreateCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","VoiceQueue",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.list",{url:"/list",templateUrl:"app/channels/voice/queue/list/list.html",controller:"VoiceQueueListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("ReportQueue",["$resource",function(a){return a("/api/report/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","VoiceQueue","VoiceContext","Team",function(a,b,c,d,e,f,g,h,i,j){a.penalty=0,a.binaryChoices=[{name:"Yes",value:1},{name:"No",value:0}],a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.monitorFormats=[{name:"wav",value:"wav"},{name:"gsm",value:"gsm"},{name:"Inactive",value:""}],a.queueAnnounces=[{display_name:"Default",value:null},{display_name:"Disabled",value:""}];var k=function(){return{select:function(b){return h.save({id:a.queue.name,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return h["delete"]({id:a.queue.name,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){return h.get({id:e.id}).$promise.then(function(b){b.joinempty=""===b.joinempty?[]:b.joinempty.split(","),b.leavewhenempty=""===b.leavewhenempty?[]:b.leavewhenempty.split(","),b.periodic_announce=""===b.periodic_announce?[]:b.periodic_announce.split(","),b.penalty=0,a.queue=b})["catch"](function(a){g.path("/channels/voice/queues/list")})},a.updateVoiceQueue=function(){var b=angular.copy(a.queue);return b.joinempty=b.joinempty.join(","),b.leavewhenempty=b.leavewhenempty.join(","),
+b.periodic_announce=b.periodic_announce.join(","),b.context||(b.context=null),h.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(d.instant(a.data.message),"danger")})},a.getTeams=function(){return j.get().$promise.then(function(b){return a.teams=b.rows,h.query({id:e.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b,function(a){return{id:a.id,penalty:a.UserHasVoiceQueue.penalty}}),k)})["catch"](function(a){console.error(a)})},a.getContexts=function(){return i.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){c.show(d.instant(data.message),"danger")})},a.getMohs=function(){b.get("/api/voice/musiconholds").success(function(b){a.voiceMohs=b.rows,f.syncUpdates("voice_musiconhold",a.voiceMohs)}).error(function(a){c.show(a.message,"danger")})},a.getSounds=function(){b.get("/api/sounds").success(function(b){a.queueAnnounces=a.queueAnnounces.concat(b),a.periodicAnnounces=angular.copy(b.rows),b.rows.unshift({display_name:"None",converted_path:null,value:""}),a.sounds=b.rows,f.syncUpdates("sound",a.sounds)}).error(function(a){console.error(a)})},a.returnAnnouncePath=function(a){return a.converted_path?a.converted_path+"/"+a.save_name:null===a.value?null:a.value}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.view",{url:"/view/:id",templateUrl:"app/channels/voice/queue/view/view.html",controller:"VoiceQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.queues.view.settings",{url:"/settings",templateUrl:"app/channels/voice/queue/view/view.settings.html"}).state("main.channels.voice.queues.view.agents",{url:"/agents",templateUrl:"app/channels/voice/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){return a("/api/voice/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","VoiceQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("spinner-grid"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].online=b.online,a.gridOptions.data[d].lastLoginAt=b.lastLoginAt,a.gridOptions.data[d].pause=b.voicePause,a.gridOptions.data[d].pauseType=b.pauseType,a.gridOptions.data[d].lastPauseAt=b.lastPauseAt,a.gridOptions.data[d].status=b.status,a.gridOptions.data[d].statusAt=b.statusAt,a.gridOptions.data[d].queueStatus=b.queueStatus,a.gridOptions.data[d].queueStatusAt=b.queueStatusAt,a.gridOptions.data[d].lastQueue=b.lastQueue,a.gridOptions.data[d].ipaddr=b.ipaddr,a.gridOptions.data[d].port=b.port,a.gridOptions.data[d].fullcontact=b.fullcontact,a.gridOptions.data[d].useragent=b.useragent,a.gridOptions.data[d].lastms=b.lastms,a.gridOptions.data[d].internal=b.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=b.online)})}}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_voice_queue:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.UserId,queue:b.queue});if(!c&&b.logged){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,agent:b.membername,callstaken:b.callstaken?b.callstaken:0,online:d.online})}else c&&!b.logged?_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue}):c&&b.logged&&(c.callstaken=b.callstaken?b.callstaken:0)}),e.socket.on("user_has_voice_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.voicePause,pauseType:b.pauseType,status:b.status||"UNKNOWN",statusAt:b.statusAt,queueStatus:b.queueStatus||"READY",queueStatusAt:b.queueStatusAt,lastQueue:b.lastQueue,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.VoiceQueues.forEach(function(c){c.UserHasVoiceQueue.logged&&a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,agent:b.name,callstaken:c.UserHasVoiceQueue.callstaken?c.UserHasVoiceQueue.callstaken:0,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.show(a.message,"danger")})}function r(){return j.get().$promise.then(function(b){a.voiceQueues=b.rows,e.syncUpdates("voice_queue",a.voiceQueues)})["catch"](function(a){f.show(a.message,"danger")})}a.voiceQueues=[];var s={offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="icon-user" data-ng-class="row.entity.online ? \'font-green\' : \'font-red\'"></i> <span data-ng-if="row.entity.online" class="left-margin">(<timer start-time="grid.appScope.moment(row.entity.lastLoginAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{'APPLICATION_'+row.entity.status | translate}} <span data-ng-if=\"row.entity.statusAt && (row.entity.status === 'BUSY' || row.entity.status === 'ONHOLD' || row.entity.status === 'INUSE')\">(<timer start-time=\"grid.appScope.moment(row.entity.statusAt).unix()*1000\">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>)</span></span></div>",filter:{type:m.filter.SELECT,selectOptions:[{value:"UNKNOWN",label:d.instant("APPLICATION_UNKNOWN")},{value:"NOT_INUSE",label:d.instant("APPLICATION_NOT_INUSE")},{value:"INUSE",label:d.instant("APPLICATION_INUSE")},{value:"BUSY",label:d.instant("APPLICATION_BUSY")},{value:"INVALID",label:d.instant("APPLICATION_INVALID")},{value:"UNAVAILABLE",label:d.instant("APPLICATION_UNAVAILABLE")},{value:"RINGING",label:d.instant("APPLICATION_RINGING")},{value:"RINGINUSE",label:d.instant("APPLICATION_RINGINUSE")},{value:"ONHOLD",label:d.instant("APPLICATION_ONHOLD")}]}},{name:"queueStatus",width:400,displayName:"APPLICATION_QUEUE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><span>{{\'APPLICATION_\'+row.entity.queueStatus.toUpperCase() | translate}}</span><span data-ng-if="(row.entity.queueStatus!==\'complete\' && (row.entity.queueStatus!==\'paused\' || row.entity.pauseType === \'ACW\'))"> [{{row.entity.lastQueue}}]</span><span data-ng-if="row.entity.pause"> [{{row.entity.pauseType}}]</span><timer data-ng-if="row.entity.queueStatusAt && row.entity.queueStatus!==\'complete\'" start-time="grid.appScope.moment(row.entity.queueStatusAt).unix()*1000"> [{{hhours}}:{{mminutes}}:{{sseconds}}]</timer></span><span class="left-margin"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="icon-control-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="icon-control-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i></span><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"paused",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_CONNECT")},{value:"complete",label:d.instant("APPLICATION_COMPLETE")},{value:"called",label:d.instant("APPLICATION_CALLED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"callstaken",displayName:"APPLICATION_CALLS_TAKEN",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.callstaken !== null">{{row.entity.callstaken}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1,width:100},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queue" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queue)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.voiceQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i> {{\'APPLICATION_INFO\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),o()};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_voice_queue")}),a.pause=function(a,b,c){return i.save({name:b,agent:a,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(d.instant(a.message||a.data.message||a.translatedMessage||a.data.translatedMessage),"danger")})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/queue.modal.add.html",controller:"VoiceRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.voiceQueues,function(b){return _.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})?!0:!1})}}});g.result.then(function(a){return i.save({name:"QueueAdd",agent:e,queues:a.queues,channel:"voice",data1:e,data3:a.queues.join(","),data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queue:b,channel:"voice",data1:a,data3:b,data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/agent.modal.info.html",controller:"VoiceRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/voice/realtime/view/agent/agent.html",controller:"VoiceRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentReportCtrl",["$scope","$http","socket",function(a,b,c){a.$on("$destroy",function(){c.unsyncUpdates("report_agent")}),a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.initReport=function(){a.agents=[],b.get("/api/report/agents").success(function(b){a.agents=b,c.syncUpdates("report_agent",a.agents)}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").filter("VoiceRealtimeViewAgentReportFilter",function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueReportCtrl",["$scope","$http","socket",function(a,b,c){a.$on("$destroy",function(){c.unsyncUpdates("report_queue")}),a.conf={queuesByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.queuesByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.initReport=function(){a.queues=[],b.get("/api/report/queues").success(function(b){console.log(b),a.queues=b,c.syncUpdates("report_queue",a.queues)}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").filter("VoiceRealtimeViewQueueReportFilter",function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueuePauseModalCtrl",["$scope","$uibModalInstance","items","data",function(a,b,c,d){a.items=c,a.data=d,console.log(d),a.selected={item:a.items[0],queue:_.isArray(d)?a.data[0].queue:a.data.queue,membername:_.isArray(d)?a.data[0].membername:a.data.membername,"interface":_.isArray(d)?a.data[0]["interface"]:a.data["interface"]},a.ok=function(c,e){var f;_.isArray(d)?(f=[],d.forEach(function(b){f.push({action:"QueuePause",queue:b.queue,membername:b.membername,"interface":b["interface"],paused:c,reason:a.selected.item})})):f={action:"QueuePause",queue:a.selected.queue,membername:a.selected.membername,"interface":a.selected["interface"],paused:c,reason:a.selected.item},b.close(f)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueCtrl",["$scope","$http","$log","$uibModal","$translate","socket","xAlert",function(a,b,c,d,e,f,g){a.conf={agentsByPage:{name:"10",value:10},labels:["fullname","name","email"]},a.agentsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.$on("$destroy",function(){f.unsyncUpdates("user_has_voice_queue")}),a.groups=[],a.pauses=["pausa1","pausa2","pausa3"],a.pause=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/channels/voice/realtime/view/queue/pause.modal.html",controller:"VoiceRealtimeViewQueuePauseModalCtrl",resolve:{items:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){_.isArray(a)?a.forEach(function(a){b.post("/api/ami",a).then(function(a){console.log(a),g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.log(a),g.show(a.data.message,"danger")})}):b.post("/api/ami",a).then(function(a){console.log(a),g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.log(a),g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.add=function(f,h){var i=d.open({animation:!0,size:f,templateUrl:"app/channels/voice/realtime/view/queue/queue.modal.add.html",controller:"VoiceRealtimeViewQueueQueueModalCtrl",resolve:{pauses:function(){return a.pauses},data:function(){return h}}});i.result.then(function(a){console.log("action",a),b.post("/api/voice/user_has_queues",a).then(function(){a.login?b.post("/api/ami",a).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")}),console.log(a)},function(){c.info("Modal dismissed at: "+new Date)})},a.remove=function(a,f){var h=d.open({animation:!0,size:a,templateUrl:"app/channels/voice/realtime/view/queue/queue.modal.remove.html",controller:"VoiceRealtimeViewQueueQueueModalCtrl",resolve:{pauses:function(){return null},data:function(){return f}}});h.result.then(function(a){_.isArray(a)?a.forEach(function(a){b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})}):b.post("/api/ami",a).then(function(){a.logout?b.put("/api/voice/queues/"+a.queue+"/agents",{agents:[a.UserId]}).then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")}):g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.data.message,"danger")})},function(){c.info("Modal dismissed at: "+new Date)})},a.initQueues=function(){b.get("/api/voice/user_has_queues").success(function(b){a.queues=b,a.groups=_.map(_.groupBy(a.queues,"queue"),function(a,b){return{queue:b,agents:a}}),console.log("ok"),f.socket.on("user_has_voice_queue:save",function(b){console.log("item",b);var c=_.find(a.groups,{queue:b.queue}),d=a.groups.indexOf(c);if(c){var e=_.find(c.agents,{membername:b.membername});e?_.merge(e,b):a.groups[d].agents.push(b)}else{var f={queue:b.queue,agents:[b]};a.groups.unshift(f)}}),f.socket.on("user_has_voice_queue:remove",function(b){var c=_.find(a.groups,{queue:b.queue});_.remove(c.agents,{membername:b.membername}),c.agents.length||_.remove(a.groups,{queue:b.queue})}),f.socket.on("report_agent:save",function(b){var c=_.find(a.groups,{queue:b.queue}),d=a.groups.indexOf(c);if(c){var e=_.find(c.agents,{membername:b.membername});e?_.merge(e,b):a.groups[d].agents.push(b)}else{var f={queue:b.queue,agents:[b]};a.groups.unshift(f)}})}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueQueueModalCtrl",["$scope","$uibModalInstance","$http","pauses","data",function(a,b,c,d,e){a.initAdd=function(){a.data=e,a.pauses=d,a.selected={penalty:0,paused:!1,reason:a.pauses[0]},a.$watch("selected.agent",function(b){b&&(a.selected.membername=b.name,a.selected["interface"]="SIP/"+b.name,a.selected.UserId=b.id)}),c.get("/api/agents",{params:{page:0,per_page:500}}).success(function(b){a.agents=_.reject(b.rows,function(b){return _.find(a.data,{membername:b.name})?!0:!1}),a.selected.queue=a.data[0]?a.data[0].queue:null}).error(function(a){console.error(a)})},a.initRemove=function(){a.data=e,console.log(e),_.isArray(e)?a.selected={queue:a.data[0].queue,logout:!1}:a.selected={membername:a.data.membername,"interface":a.data["interface"],queue:a.data.queue,logout:!1,UserId:a.data.UserId}},a.okAdd=function(){var c={action:"QueueAdd",queue:a.selected.queue,membername:a.selected.membername,"interface":a.selected["interface"],penalty:a.selected.penalty,paused:a.selected.paused,UserId:a.selected.UserId};c.paused&&(c.reason=a.selected.reason),b.close(c)},a.okRemove=function(){var c;_.isArray(a.data)?(c=[],a.data.forEach(function(b){c.push({action:"QueueRemove",queue:b.queue,"interface":b["interface"],logout:a.selected.logout,UserId:b.UserId})})):c={action:"QueueRemove",queue:a.selected.queue,logout:a.selected.logout,"interface":a.selected["interface"],UserId:a.selected.UserId},b.close(c)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewCtrl",["$scope",function(a){a.agents=[{name:"View1",link:"main.channels.voice.realtime.view.agents"},{name:"View2",link:"main.channels.voice.realtime.view.areports"}],a.queues=[{name:"View1",link:"main.channels.voice.realtime.view.queues"},{name:"View2",link:"main.channels.voice.realtime.view.qreports"}]}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view",{url:"/view",templateUrl:"app/channels/voice/realtime/view/view.html",controller:"VoiceRealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRecordingListCtrl",["$scope","$translate","$sce","Recording","gridOptions","xAlert","uiGridConstants",function(a,b,c,d,e,f,g){a.Recording=d;a.updateRating=function(a,c){d.patch({id:a,rating:c}).$promise.then(function(){f.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(a.message,"danger")})},a.initView=function(){var b={exporterCsvFilename:"recordings.csv",rowHeight:30,columnDefs:[{name:"uniqueid"},{name:"calleridnum"},{name:"calleridname"},{name:"connectedlinenum"},{name:"connectedlinename"},{name:"rating",filter:{type:g.filter.SELECT,selectOptions:[{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}]},cellClass:"ui-grid-vcenter",width:"100",cellTemplate:'<div><uib-rating data-ng-model="row.entity.rating" data-ng-click="grid.appScope.updateRating(row.entity.uniqueid, row.entity.rating)" aria-labelledby="default-rating"></uib-rating></div>'},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:'<audio-file-download params="{id:row.entity.uniqueid,controller:\'stream\'}" resource="grid.appScope.Recording"></audio-file-download>'}]},{name:"action",width:150,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.uniqueid, row.entity.uniqueid)"},{directive:'<motion-file-download params="{id:row.entity.uniqueid,controller:\'stream\'}" resource="grid.appScope.Recording" mimetype="audio/wav" btnclass="btn btn-xs blue-hoki" filename="row.entity.uniqueid+\'.wav\'"></motion-file-download>'}]}]};a.gridOptions=e.gridOptions(d,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings.list",{url:"/list",templateUrl:"app/channels/voice/recording/list/list.html",controller:"VoiceRecordingListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Recording",["$resource",function(a){return a("/api/voice/recordings/:id/:controller",{id:"@id"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings",{url:"/recordings",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound",{url:"/inbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$location","$translate",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"inbound",appdata:"Inbound Call",context:"from-voip-provider"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),f.path("/channels/voice/routes/inbound/view/"+a.id+"/applications")})["catch"](function(a){console.log(a),e.show(g.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}), </span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:170,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/inbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"inbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/inbound/list/create.modal.html",controller:"VoiceRouteInboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.list",{url:"/list",templateUrl:"app/channels/voice/route/inbound/list/list.html",controller:"VoiceRouteInboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function s(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=b,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableSorting:!1,enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"action",enableSorting:!1,enableColumnMenu:!1,displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}],onRegisterApi:function(b){b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()})}},a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",
+m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&r(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.$watch("main.app",function(d){if(d){var e,f;switch(c.appId||(a.application={app:d,interval:a.application.interval||"*,*,*,*",appdata:[]}),d){case"Queue":e=l,f=m;break;case"Playback":e=m;break;case"AGI":e=n;break;case"Goto":e=o;break;case"Voicemail":e=q;break;default:e=null,f=null}if(e)return e.get().$promise.then(function(b){a.items=b.rows}).then(function(){return f?f.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.show(b.instant(a.message),"danger")})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications})["catch"](function(a){e.path("/channels/voice/routes/inbound/list")})},a.getApplication=function(){void 0===a.selectedApp&&e.path("/channels/voice/routes/inbound/list");var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(a.main.app=b?b.value:"custom","Set"===a.main.app){var c=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=c[0],a.application.value=c[1]}if(!b){var d=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[d]}s()},a.openApplication=function(b){a.selectedApp=b,e.path("/channels/voice/routes/inbound/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.selectedApp=void 0,a.route.exten=a.$application.checkUnderscore(a.route.exten),k.update({id:a.route.id},a.route).$promise.then(function(a){h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/inbound/view/"+c.id+"/"+d)})["catch"](function(a){console.log(a),h.show(b.instant(a.data.translatedMessage),"danger")})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.deleteApp=g.confirm["delete"](function(b){console.log(b),console.log(a.route.Applications[b]),a.route.Applications.splice(b,1)}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/inbound/view/view.html",controller:"VoiceRouteInboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.inbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/inbound/view/view.settings.html"}).state("main.channels.voice.routes.inbound.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/inbound/view/view.applications.html"}).state("main.channels.voice.routes.inbound.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html"}).state("main.channels.voice.routes.inbound.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal",{url:"/internal",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCreateCtrl",["$scope","$uibModalInstance","Route","application","$location","$translate","xAlert",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"internal",appdata:"Internal Call",context:"from-sip"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),e.path("/channels/voice/routes/internal/view/"+a.id+"/applications")})["catch"](function(a){g.show(f.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InternalRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:170,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/internal/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"internal"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/internal/list/create.modal.html",controller:"VoiceRouteInternalListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.list",{url:"/list",templateUrl:"app/channels/voice/route/internal/list/list.html",controller:"VoiceRouteInternalListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function s(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=b,a.selectedApp=void 0,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableSorting:!1,enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1,width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}],onRegisterApi:function(b){b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()})}},a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&r(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.$watch("main.app",function(d){if(d){var e,f;switch(c.appId||(a.application={app:d,interval:a.application.interval||"*,*,*,*",appdata:[]}),d){case"Queue":e=l,f=m;break;case"Playback":e=m;break;case"AGI":e=n;break;case"Goto":e=o;break;case"Voicemail":e=q;break;default:e=null,f=null}if(e)return e.get().$promise.then(function(b){a.items=b.rows}).then(function(){return f?f.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.show(b.instant(a.message),"danger")})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications})["catch"](function(a){e.path("/channels/voice/routes/internal/list")})},a.getApplication=function(){console.log(a.selectedApp),void 0===a.selectedApp&&e.path("/channels/voice/routes/internal/list");var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(a.main.app=b?b.value:"custom","Set"===a.main.app){var c=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=c[0],a.application.value=c[1]}if(!b){var d=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[d]}s()},a.openApplication=function(b){a.selectedApp=b,e.path("/channels/voice/routes/internal/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.selectedApp=void 0,a.route.exten=a.$application.checkUnderscore(a.route.exten),k.update({id:a.route.id},a.route).$promise.then(function(a){h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/internal/view/"+c.id+"/"+d)})["catch"](function(a){h.show(b.instant(a.data.translatedMessage),"danger")})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.show(b.instant(a.message),"danger")})},a.deleteApp=g.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/internal/view/view.html",controller:"VoiceRouteInternalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.internal.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/internal/view/view.settings.html"}).state("main.channels.voice.routes.internal.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/internal/view/view.applications.html"}).state("main.channels.voice.routes.internal.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html"}).state("main.channels.voice.routes.internal.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html"})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$translate","$location","Tag",function(a,b,c,d,e,f,g,h){a.$application=d.application,a.forms={route:void 0},a.item={type:"outbound",appdata:"Outbound Call",context:"from-sip"},a.getTags=function(){return h.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){e.show(f.instant(a.data.translatedMessage),"danger")})},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),g.path("/channels/voice/routes/outbound/view/"+a.id+"/routes")})["catch"](function(a){e.show(f.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"OutboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_DESTINATION_PATTERN"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:170,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/outbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"outbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/outbound/list/create.modal.html",controller:"VoiceRouteOutboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.list",{url:"/list",templateUrl:"app/channels/voice/route/outbound/list/list.html",controller:"VoiceRouteOutboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound",{url:"/outbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","application","interval","Route","Trunk","VoiceContext","Interval","Tag",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function q(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=c,a.$application=i.application,a.$interval=j.interval,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.gridOptions={rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",cellClass:"ui-grid-vcenter",cellTemplate:"<div><span data-ng-if=\"row.entity.app === 'Dial'\">Default</span><span data-ng-if=\"row.entity.app !== 'Dial'\">{{row.entity.app}}</span></div>",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableSorting:!1,enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"action",displayName:"APPLICATION_ACTION",enableSorting:!1,enableColumnMenu:!1,headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}],onRegisterApi:function(b){b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()})}},a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={info:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""},a.applications=[{name:"Default",value:"Dial"},{name:"Custom",value:"custom"}]},a.$watch("interval",function(a){a&&p(a)},!0),a.$watch("main.app",function(e){if(e){var f,g;switch(d.appId||(a.application={app:e,interval:a.application.interval||"*,*,*,*",appdata:[]}),e){case"Dial":f=l,g=m;break;default:f=null,g=null}if(f)return f.get().$promise.then(function(b){a.items=b.rows}).then(function(){return g?g.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){b.show(c.instant(a.message),"danger")})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,f.path(b)},a.getIntervals=function(){return n.get().$promise.then(function(b){a.Intervals=b.rows,e.syncUpdates("interval",a.Intervals)})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.getRoute=function(){return k.get({id:d.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications})["catch"](function(a){f.path("/channels/voice/routes/outbound/list")})},a.getApplication=function(){void 0===a.selectedApp&&f.path("/channels/voice/routes/outbound/list");var b=_.find(a.applications,{value:a.route.Applications[a.selectedApp].app});if(a.main.app=b?b.value:"custom",!b){var c=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[c]}q()},a.openApplication=function(b){a.selectedApp=b,f.path("/channels/voice/routes/outbound/view/"+d.id+"/routes/settings")},a.updateRoute=function(e){return a.selectedApp=void 0,a.route.exten=a.$application.checkUnderscore(a.route.exten),k.update({id:a.route.id},a.route).$promise.then(function(a){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),e&&f.path("/channels/voice/routes/outbound/view/"+d.id+"/"+e)})["catch"](function(a){b.show(c.instant(a.data.translatedMessage),"danger")})},a.getContexts=function(){return m.get().$promise.then(function(b){a.voiceContexts=b.rows,e.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.getTags=function(){return o.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){b.show(c.instant(a.data.translatedMessage),"danger")})},a.deleteApp=h.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("routes")},a.goNext=function(){g.wizard().next()},a.previous=function(){g.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){e.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/outbound/view/view.html",controller:"VoiceRouteOutboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.outbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.settings.html"}).state("main.channels.voice.routes.outbound.view.routes",{url:"/routes",templateUrl:"app/channels/voice/route/outbound/view/view.routes.html"}).state("main.channels.voice.routes.outbound.view.route",{url:"/route",templateUrl:"app/channels/voice/route/outbound/view/view.route.html"}).state("main.channels.voice.routes.outbound.view.routes.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.routeSettings.html"})}]),angular.module("xCallyShuttleApp").factory("Route",["$resource",function(a){return a("/api/voice/extensions/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes",{url:"/routes",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice",{url:"/voice",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailListCtrl",["$scope","VoiceMail","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"voice_mails.csv",primaryKey:"uniqueid",columnDefs:[{name:"mailbox"},{name:"fullname"},{name:"email"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/voice/voicemails/view/{{row.entity.uniqueid}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.mailbox, row.entity.uniqueid)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.list",{url:"/list",templateUrl:"app/channels/voice/voicemail/list/list.html",controller:"VoiceVoicemailListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailViewCtrl",["$scope","VoiceMail","VoiceMailMessage","VoiceContext","$http","xAlert","$translate","$stateParams","socket","$sce","Modal","$location","gridOptions",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){var b={exporterCsvFilename:"voice_mail_messages.csv",primaryKey:"id",columnDefs:[{name:"callerid"},{name:"stamp",displayName:"APPLICATION_DATE",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{grid.appScope.moment(row.entity.stamp).format('YYYY-MM-DD HH:mm:ss')}}</div>"},{name:"duration",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.duration*1000 | date:'mm:ss'}}</div>"},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:'<audio-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage"></audio-file-download>'}]},{name:"action",width:150,buttons:[{directive:'<motion-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage" mimetype="audio/wav" btnclass="btn btn-xs blue-hoki" filename="row.entity.msg_id+\'.wav\'"></motion-file-download>'},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.id, row.entity.id)"}]}]};a.gridOptions=m.gridOptions(c,b,a,{mailbox:a.voicemail.mailbox,context:a.voicemail.context})}a.moment=moment,a.VoiceMailMessage=c,a.getVoicemail=function(){return b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b})["catch"](function(a){l.path("/voice/voicemails/list")})},a.updateVoiceVoicemail=function(){return b.update({id:h.uniqueid},a.voicemail).$promise.then(function(){f.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.show(g.instant(a.message),"danger")})},a.getContexts=function(){return d.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){f.show(a.message,"danger")})},a.getMessages=function(){return a.voicemail?void n():b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b,n()})["catch"](function(a){l.path("/voice/voicemails/view/"+h.uniqueid+"/settings")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.view",{url:"/view/:uniqueid",templateUrl:"app/channels/voice/voicemail/view/view.html",controller:"VoiceVoicemailViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.voicemails.view.settings",{url:"/settings",templateUrl:"app/channels/voice/voicemail/view/view.settings.html"}).state("main.channels.voice.voicemails.view.messages",{url:"/messages",templateUrl:"app/channels/voice/voicemail/view/view.messages.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceMail",["$resource",function(a){return a("/api/voice/voicemails/:id/:controller",{uniqueid:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails",{url:"/voicemails",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("VoiceMailMessage",["$resource",function(a){return a("/api/voice/voicemails/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailWizardCtrl",["$scope","VoiceMail","xAlert","WizardHandler","$location","Setting",function(a,b,c,d,e,f){a.initWizard=function(){a.form={},a.item={context:"from-voicemail"}},a.next=function(){d.wizard().next()},a.previous=function(){d.wizard().previous()},a.exitValidation=function(a){return a},a.getFirstFreeMailbox=function(){f.get({controller:"mailbox"}).$promise.then(function(b){a.item.mailbox=b.value})["catch"](function(a){c.show(a.data.message,"danger")})},a.createItem=function(){return a.item.customer_id=a.item.mailbox,b.save(a.item).$promise.then(function(){e.path("/channels/voice/voicemails/list")})["catch"](function(a){c.show(data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.wizard",{url:"/wizard",templateUrl:"app/channels/voice/voicemail/wizard/wizard.html",controller:"VoiceVoicemailWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){return a("/api/voice/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Company",["$resource",function(a){return a("/api/contactmanager/companies/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies",{url:"/companies",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("CompanyListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){
+a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyListCtrl",["$scope","$http","$translate","xAlert","Modal","$uibModal","$log","Company","gridOptions","$location",function(a,b,c,d,e,f,g,h,i,j){a.initView=function(){var b={exporterCsvFilename:"Companies.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",name:"profile",href:"/contactmanager/companies/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var a=f.open({animation:!0,templateUrl:"app/contactmanager/company/list/create.modal.html",controller:"CompanyListCreateModalCtrl"});a.result.then(function(a){b.post("/api/contactmanager/companies",a).then(function(a){j.path("/contactmanager/companies/view/"+a.id+"/settings")})["catch"](function(a){d.show(a.data.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.list",{url:"/list",templateUrl:"app/contactmanager/company/list/list.html",controller:"ContactManagerCompanyListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.getCompany=function(){b.get("/api/contactmanager/companies/"+e.id).success(function(b){a.company=b}).error(function(a){f.path("/contactmanager/companies/list")})},a.updateCompany=function(){var f=angular.copy(a.company);b.put("/api/contactmanager/companies/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.company=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.view",{url:"/view/:id",templateUrl:"app/contactmanager/company/view/view.html",controller:"ContactManagerCompanyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.companies.view.settings",{url:"/settings",templateUrl:"app/contactmanager/company/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Contact",["$resource",function(a){return a("/api/contactmanager/contacts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts",{url:"/contacts",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListImportModalCtrl",["$scope","$uibModalInstance","indexes","csv","xAlert","socket","$http","$translate",function(a,b,c,d,e,f,g,h){function i(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);var c={Phones:[],Emails:[],customFields:{}};_.forOwn(a.item,function(e,f){switch(f){case"Phones":a.item.Phones.forEach(function(a){""!==d[b][a]&&c.Phones.push({phone:d[b][a]})});break;case"Emails":a.item.Emails.forEach(function(a){""!==d[b][a]&&c.Emails.push({email:d[b][a]})});break;case"customFields":_.forOwn(a.item.customFields,function(a,e){c.customFields[e]=d[b][a]});break;case"tags":c.tags=[],a.item.tags.forEach(function(a){""!==d[b][a]&&c.tags.push(d[b][a])});break;default:c[f]=d[b][e]}}),c.tags=c.tags?c.tags.join(","):void 0,_.forOwn(c.customFields,function(a,b){""===a&&delete c.customFields[b]}),c.ServiceId=a.item.ServiceId,c.CompanyId=a.item.CompanyId||null,g.post("/api/contactmanager/contacts",c).success(function(c){a["import"].success+=j,a["import"].succeeded+=1,i(b+1)}).error(function(c){a["import"].fail+=j,a["import"].failed+=1,i(b+1)})}a.indexes=c,a.importing=!1,a.submitted=!1,a.stopped=!1,a["import"]={success:0,fail:0,succeeded:0,failed:0},a.csvLength=d.length;var j=100/a.csvLength;a.forms={dashboard:void 0},a.item={},a.start=function(){a.importing=!0,a.submitted=!0,i(0)},a.getServices=function(){g.get("/api/contactmanager/services/").success(function(b){a.services=b.rows,a.item.ServiceId=1,a.getCustomFields()}).error(function(a){e.show(h.instant(a.message)+"!","danger")})},a.getCustomFields=function(){g.get("/api/contactmanager/services/"+a.item.ServiceId+"/customfields").success(function(b){a.customFields=b,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),f.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),f.socket.on("custom_field:save",function(b){if(b.ServiceId===a.item.ServiceId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})}).error(function(a){console.error(a),e.show(a.message,"danger")})},a.close=function(){b.close()},a.stop=function(){a.stopped=!0}}]),angular.module("xCallyShuttleApp").controller("ContactManagerContactListCtrl",["$scope","$translate","Modal","FileUploader","Papa","$uibModal","$log","Contact","gridOptions","Service","uiGridConstants","xAlert",function(a,b,c,d,e,f,g,h,i,j,k,l){a.initView=function(){return j.get().$promise.then(function(b){a.services=[],b.rows.forEach(function(b,c){a.services.push({value:b.id,label:b.name})})}).then(function(){var b={exporterCsvFilename:"Contacts.csv",columnDefs:[{name:"firstName"},{name:"lastName"},{name:"phone"},{name:"mobile"},{name:"email"},{name:"ServiceId",displayName:"APPLICATION_SERVICE",field:"Service.name",filter:{type:k.filter.SELECT,selectOptions:a.services}},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",name:"profile",onClick:"grid.appScope.openContactTab(row.entity)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)})["catch"](function(a){l.show(b.instant(a.message)+"!","danger")})},d.FileSelect.prototype.isEmptyAfterSelection=function(){return!0};var m=a.uploader=new d({queueLimit:1,clearInputAfterAddedToQueue:!0});m.onAfterAddingFile=function(b){console.log("fileadded"),e.parse(b._file,{header:!0,complete:function(b){a.uploader.clearQueue(),a["import"](b.data)},error:function(a){console.log(a)}})},a["import"]=function(b){var c=f.open({animation:!0,size:"lg",backdrop:"static",keyboard:!1,templateUrl:"app/contactmanager/contact/list/import.modal.html",controller:"ContactManagerListImportModalCtrl",resolve:{indexes:function(){return _.keys(b[0])},csv:function(){return b}}});c.result.then(function(b){a.gridOptions.getPage()},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts.list",{url:"/list",templateUrl:"app/contactmanager/contact/list/list.html",controller:"ContactManagerContactListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager",{url:"/contactmanager",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceListCtrl",["$scope","$http","$translate","Modal","xAlert","$uibModal","$log","Service","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Services.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",name:"settings",href:"/contactmanager/services/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var d=f.open({animation:!0,templateUrl:"app/contactmanager/service/list/create.modal.html",controller:"ContactManagerServiceListCreateModalCtrl"});d.result.then(function(d){b.post("/api/contactmanager/services/",d).then(function(b){a.gridOptions.getPage(),e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.services.list",{url:"/list",templateUrl:"app/contactmanager/service/list/list.html",controller:"ContactManagerServiceListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Service",["$resource",function(a){return a("/api/contactmanager/services/:serviceId/:controller/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.services",{url:"/services",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceCustomFieldViewCreateModalCtrl",["$scope","$uibModalInstance","$translate",function(a,b,c){a.$translate=c,a.forms={dashboard:void 0},a.item={},a.choices=[{value:""}],a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)},a.types=[{name:"APPLICATION_TEXT",value:"text"},{name:"APPLICATION_SELECT",value:"select"}],a.ok=function(){"select"===a.item.type&&(a.item.values=angular.toJson(a.choices)),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerServiceViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","$uibModal","$log","Modal","Service","Team","gridOptions",function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(){return{select:function(b){return j.save({serviceId:a.service.id,controller:"agents"},{agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return j["delete"]({serviceId:a.service.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getService=function(){return j.get({serviceId:d.id}).$promise.then(function(b){a.service=b})["catch"](function(a){f.path("/contactmanager/services/list")})},a.updateService=function(){return j.update({serviceId:d.id},a.service).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.getTeams=function(){return k.get().$promise.then(function(b){return a.teams=b.rows,j.query({serviceId:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b,function(a){return{id:a.id}}),m)})["catch"](function(a){console.error(a)})},a.initCustomFields=function(){var b={exporterCsvFilename:"customfields.csv",primaryKey:"id",columnDefs:[{name:"name"},{name:"type"},{name:"description"},{name:"action",width:200,buttons:[{"class":"blue-hoki",href:"/contactmanager/services/view/{{grid.appScope.$stateParams.id}}/customfields/settings/{{row.entity.id}}",name:"settings"},{"class":"red-sunglo",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)",name:"delete"}]}]};a.gridOptions=l.gridOptions(j,b,a,{serviceId:d.id,controller:"customfields"})},a.create=function(){var e=g.open({animation:!0,templateUrl:"app/contactmanager/service/view/create.modal.html",controller:"ContactManagerServiceCustomFieldViewCreateModalCtrl"});e.result.then(function(e){return j.save({serviceId:d.id,controller:"customfields"},e).$promise.then(function(d){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.show(a.message||a.data.message,"danger")})},function(){h.info("Modal dismissed at: "+new Date)})},a.getCustomField=function(){return j.get({serviceId:d.id,controller:"customfields",id:d.cfId}).$promise.then(function(b){console.log(b),a.customField=b,"select"===a.customField.type&&(a.choices=JSON.parse(a.customField.values))})["catch"](function(a){console.error(a),f.path("/contactmanager/customfields/list")})},a.updateCustomField=function(){var e=angular.copy(a.customField);return"select"===e.type&&(e.values=angular.toJson(a.choices)),j.update({serviceId:d.id,controller:"customfields",id:d.cfId},e).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(c.instant(a.message),"danger")})},a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.services.view",{url:"/view/:id",templateUrl:"app/contactmanager/service/view/view.html",controller:"ContactManagerServiceViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.services.view.settings",{url:"/settings",templateUrl:"app/contactmanager/service/view/view.settings.html"}).state("main.contactmanager.services.view.agents",{url:"/agents",templateUrl:"app/contactmanager/service/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.contactmanager.services.view.customfields",{url:"/customfields",templateUrl:"app/contactmanager/service/view/view.customFields.html"}).state("main.contactmanager.services.view.customfields.settings",{url:"/settings/:cfId",templateUrl:"app/contactmanager/service/view/view.customFieldSettings.html",controller:"ContactManagerServiceViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("DashboardCtrl",["$scope","$translate",function(a,b){a.voice=[{name:b.instant("APPLICATION_QUEUE"),link:"main.dashboard.voice"}],a.mail=[{name:b.instant("APPLICATION_QUEUE"),link:"main.dashboard.mail"}]}]),angular.module("xCallyShuttleApp").factory("Dashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.dashboard",{"abstract":!0,url:"/dashboard",templateUrl:"app/dashboard/dashboard.html",controller:"DashboardCtrl"}).state("main.dashboard.voice",{url:"/voice",controller:"DashboardVoiceCtrl",templateUrl:"app/dashboard/voice/voice.html"}).state("main.dashboard.mail",{url:"/mail",controller:"DashboardMailCtrl",templateUrl:"app/dashboard/mail/mail.html"})}]),angular.module("xCallyShuttleApp").controller("DashboardMailCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").controller("DashboardVoiceCtrl",["$scope","Auth","ReportQueue","ReportCall","socket",function(a,b,c,d,e){a.Auth=b,a.initWaiting=function(){return c.get({id:"waiting"}).$promise.then(function(b){a.waiting=b.value,e.socket.on("dashboard:waiting",function(b){a.waiting=b.value})})["catch"](function(a){console.error(a)})},a.initActive=function(){return c.get({id:"active"}).$promise.then(function(b){a.active=b.value,e.socket.on("dashboard:active",function(b){a.active=b.value})})["catch"](function(a){console.error(a)})},a.initAnswered=function(){return c.get({id:"answered"}).$promise.then(function(b){a.answered=b.value,e.socket.on("dashboard:answered",function(b){a.answered=b.value})})["catch"](function(a){console.error(a)})},a.initAbandoned=function(){return c.get({id:"abandoned"}).$promise.then(function(b){a.abandoned=b.value,e.socket.on("dashboard:abandoned",function(b){a.abandoned=b.value})})["catch"](function(a){console.error(a)})},a.initAvgAnswerTime=function(){return c.get({id:"avganswertime"}).$promise.then(function(b){a.avganswertime=b.value,e.socket.on("dashboard:avganswertime",function(b){a.avganswertime=b.value})})["catch"](function(a){console.error(a)})},a.initAvgTalkTime=function(){return c.get({id:"avgtalktime"}).$promise.then(function(b){a.avgtalktime=b.value,e.socket.on("dashboard:avgtalktime",function(b){a.avgtalktime=b.value})})["catch"](function(a){console.error(a)})},a.initAnswerRate=function(){return c.get({id:"answerrate"}).$promise.then(function(b){a.answerrate=b.value,e.socket.on("dashboard:answerrate",function(b){a.answerrate=b.value})})["catch"](function(a){console.error(a)})},a.initTotalOffered=function(){return c.get({id:"totaloffered"}).$promise.then(function(b){a.totaloffered=b.value,e.socket.on("dashboard:totaloffered",function(b){a.totaloffered=b.value})})["catch"](function(a){console.error(a)})},a.initUnmanaged=function(){return c.get({id:"unmanaged"}).$promise.then(function(b){a.unmanaged=b.value,e.socket.on("dashboard:unmanaged",function(b){a.unmanaged=b.value})})["catch"](function(a){console.error(a)})},a.initAbandonRate=function(){return c.get({id:"abandonrate"}).$promise.then(function(b){a.abandonrate=b.value,e.socket.on("dashboard:abandonrate",function(b){a.abandonrate=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutbound=function(){return d.get({id:"manualoutbound"}).$promise.then(function(b){a.manualoutbound=b.value,e.socket.on("dashboard:manualoutbound",function(b){a.manualoutbound=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundGlobalDuration=function(){return d.get({id:"manualoutboundglobalduration"}).$promise.then(function(b){a.manualoutboundglobalduration=b.value,e.socket.on("dashboard:manualoutboundglobalduration",function(b){a.manualoutboundglobalduration=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundAvgDuration=function(){return d.get({id:"manualoutboundavgduration"}).$promise.then(function(b){a.manualoutboundavgduration=b.value,e.socket.on("dashboard:manualoutboundavgduration",function(b){a.manualoutboundavgduration=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundAnswered=function(){return d.get({id:"manualoutboundanswered"}).$promise.then(function(b){a.manualoutboundanswered=b.value,e.socket.on("dashboard:manualoutboundanswered",function(b){a.manualoutboundanswered=b.value})})["catch"](function(a){console.error(a)})},a.initManualOutboundAnswerRate=function(){return d.get({id:"manualoutboundanswerrate"}).$promise.then(function(b){a.manualoutboundanswerrate=b.value,e.socket.on("dashboard:manualoutboundanswerrate",function(b){a.manualoutboundanswerrate=b.value})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk",{url:"/desk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("DeskAccount",["$resource",function(a){return a("/api/desk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("DeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedDeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedDeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("desk_account"),b.url="/api/desk/accounts",h.getPage(b).then(function(d){a.displayedDeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedDeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedDeskAccounts.length)}),f.socket.on("desk_account:save",function(){a.initList(b)}),f.socket.on("desk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/desk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/desk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.checkAccount=function(a){b.get("/api/desk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.list",{url:"/list",templateUrl:"app/desk/list/list.html",controller:"DeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("DeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","desk_com",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){g.unsyncUpdates("desk_configuration"),g.unsyncUpdates("desk_field")}),a.initView=function(){b.get("/api/desk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){h.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/desk/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/desk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,g.socket.on("desk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.deleteConfiguration=i.confirm["delete"](function(a){b["delete"]("api/desk/configurations/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/desk/configurations",a.configuration).success(function(a){e.path("desk/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){h.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/desk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=j.fields.concat(b)}).error(function(a){h.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/desk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,g.socket.on("desk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){h.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/desk/fields/"+a.id).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/desk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/desk/fields/"+a.id,a).success(function(){}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(b.customField=_.result(c,"custom",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.data.choices?c.data.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.view",{url:"/view/:id",templateUrl:"app/desk/view/view.html",controller:"DeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.desk.view.account",{url:"/account",templateUrl:"app/desk/view/view.account.html"}).state("main.desk.view.configurations",{url:"/configurations",templateUrl:"app/desk/view/view.configurations.html"}).state("main.desk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/desk/view/view.configurationSettings.html",controller:"DeskViewCtrl"}).state("main.desk.view.configuration",{url:"/configuration",templateUrl:"app/desk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("DeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/desk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/desk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.wizard",{url:"/wizard",templateUrl:"app/desk/wizard/wizard.html",controller:"DeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk",{url:"/freshdesk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("FreshdeskAccount",["$resource",function(a){return a("/api/freshdesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedFreshdeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedFreshdeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("freshdesk_account"),b.url="/api/freshdesk/accounts",h.getPage(b).then(function(d){a.displayedFreshdeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedFreshdeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedFreshdeskAccounts.length)}),f.socket.on("freshdesk_account:save",function(){a.initList(b)}),f.socket.on("freshdesk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/freshdesk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/freshdesk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.checkAccount=function(a){b.get("/api/freshdesk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.list",{url:"/list",templateUrl:"app/freshdesk/list/list.html",controller:"FreshdeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("freshdesk_configuration"),h.unsyncUpdates("freshdesk_field")}),a.initView=function(){b.get("/api/freshdesk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/freshdesk/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/freshdesk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("freshdesk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/freshdesk/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/freshdesk/configurations",a.configuration).success(function(a){e.path("freshdesk/view/"+c.id+"/configurations/settings/"+a.id);
+}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/freshdesk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=[],b=f("freshdesk")(b),_.forEach(b,function(b){a.accountFields.push(b.ticket_field)})}).error(function(a){i.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/freshdesk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("freshdesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/freshdesk/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/freshdesk/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"name",b.idField);c&&(b.customField=!_.result(c,"default",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.choices.length>0?c.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.view",{url:"/view/:id",templateUrl:"app/freshdesk/view/view.html",controller:"FreshdeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.freshdesk.view.account",{url:"/account",templateUrl:"app/freshdesk/view/view.account.html"}).state("main.freshdesk.view.configurations",{url:"/configurations",templateUrl:"app/freshdesk/view/view.configurations.html"}).state("main.freshdesk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/freshdesk/view/view.configurationSettings.html",controller:"FreshdeskViewCtrl"}).state("main.freshdesk.view.configuration",{url:"/configuration",templateUrl:"app/freshdesk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("FreshdeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/freshdesk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/freshdesk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.wizard",{url:"/wizard",templateUrl:"app/freshdesk/wizard/wizard.html",controller:"FreshdeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations",{url:"/integrations",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Integration",["$resource",function(a){return a("/api/integrations/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").controller("IntegrationListCtrl",["$scope","Modal","socket","FileUploader","Integration","xAlert",function(a,b,c,d,e,f){a.integrationsByPage=10;var g=a.uploader=new d({url:"api/integrations",autoUpload:!0,removeAfterUpload:!0});g.filters.push({name:"zipFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|zip|".indexOf(b)}}),g.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),f.show(b.name,"success")},g.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),b.errors.forEach(function(a){f.show(a.message,"danger")})},a.deleteItem=b.confirm["delete"](function(a){e["delete"]({id:a},function(){f.show("Integration Removed","success")},function(a){f.show(a.data.errors,"danger")})}),a.initList=function(){a.integrations=e.query({},function(a){c.syncUpdates("integration",a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations.list",{url:"/list",templateUrl:"app/integration/list/list.html",controller:"IntegrationListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty",{url:"/jscripty",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("JscriptyProject",["$resource",function(a){return a("/api/jscripty/projects/:id/:controller/:action/:action2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCtrl",["$scope","$uibModal","JscriptyProject","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:300,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/view/{{row.entity.id}}",name:"settings"},{"class":"green",name:"start",onClick:"grid.appScope.openJscriptyTab(row.entity)"},{"class":"purple",href:"/jscripty/projects/report/{{row.entity.id}}/sessions",name:"report"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/jscripty/project/list/list.create.modal.html",controller:"JscriptyProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","JscriptyProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){console.log(a),e.show(b.instant(a.data.translatedMessage),"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.list",{url:"/list",templateUrl:"app/jscripty/project/list/list.html",controller:"JscriptyProjectListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectReportCtrl",["$scope","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope","gridOptions","JscriptyProject","$location",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.projectStats={started:0,incomplete:0,completed:0},a.projectId=d.id,a.initView=function(){return l.get({id:d.id,controller:"sessions"}).$promise.then(function(b){a.projectId=d.id,console.log(a.projectId);var c=_.groupBy(b.rows,"status");a.projectStats.started=c.started?c.started.length:0,a.projectStats.completed=c.completed?c.completed.length:0,a.projectStats.incomplete=c.incomplete?c.incomplete.length:0})["catch"](function(a){h.show(a.message,"danger")})},a.getProjectSessions=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"projectId",displayName:"APPLICATION_PROJECTID"},{name:"session_id",displayName:"APPLICATION_SESSIONID"},{name:"createdAt",displayName:"APPLICATION_STARTEDAT"},{name:"completedAt",displayName:"APPLICATION_COMPLETEDAT"},{name:"status",displayName:"APPLICATION_STATUS"},{name:"last_question_id",displayName:"APPLICATION_LASTQUESTIONID"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/report/{{row.entity.projectId}}/session/{{row.entity.session_id}}",name:"Detail"}]}]};a.gridOptions=k.gridOptions(l,b,a,{id:d.id,controller:"sessions"})},a.getSessionDetails=function(){console.log(d.sessionId),b.get("/api/jscripty/projects/"+d.id+"/sessions/"+d.sessionId).success(function(b){a.sessionQuestions=b[0],console.log("session",a.sessionQuestions)})["catch"](function(a){h.show(a.message,"danger")})},a.getQuestionSummary=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"question_id",width:150,displayName:"APPLICATION_QUESTIONID"},{name:"question_type",width:150,displayName:"APPLICATION_QUESTIONTYPE"},{name:"question_label",width:200,displayName:"APPLICATION_QUESTIONLABEL"},{name:"question_text",displayName:"APPLICATION_QUESTION"},{name:"count",width:100,displayName:"APPLICATION_COUNT"}]};a.gridOptions=k.gridOptions(l,b,a,{id:d.id,controller:"questions",action:"summary"})},a.getQuestionDetail=function(){b.get("/api/jscripty/projects/"+d.id+"/questions/detail").success(function(b){var c=_.groupBy(b,"question_id");_.forEach(c,function(a,b){c[b]=_.groupBy(a,"question_label"),_.forEach(c[b],function(a,d){c[b][d]=_.groupBy(a,"question_text")})}),a.questionDetail=c,console.log("detail",a.questionDetail)})["catch"](function(a){h.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.report",{url:"/report/:id",templateUrl:"app/jscripty/project/report/report.html",controller:"JscriptyProjectReportCtrl"}).state("main.jscripty.projects.report.sessions",{url:"/sessions",templateUrl:"app/jscripty/project/report/report.sessions.html"}).state("main.jscripty.projects.report.summary",{url:"/summary",templateUrl:"app/jscripty/project/report/report.summary.html"}).state("main.jscripty.projects.report.detail",{url:"/detail",templateUrl:"app/jscripty/project/report/report.detail.html"}).state("main.jscripty.projects.report.sessionDetail",{url:"/session/:sessionId",controller:"JscriptyProjectReportCtrl",templateUrl:"app/jscripty/project/report/report.session.detail.html"})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectViewCtrl",["$scope","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope",function(a,b,c,d,e,f,g,h,i,j){a.jscriptyProject={},a.getProject=function(){b.get("/api/jscripty/projects/"+d.id).success(function(b){a.jscriptyProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!=a&&-1!=a.indexOf("Script error."));else{var d=new Image;d.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(e){}},b.token=f.getToken();var a=new EditorUi(new Editor);a.openString(b.draft,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}}),e.syncUpdates("jscripty_project",[b],function(a,c,d){c.id===b.id})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.view",{url:"/view/:id",templateUrl:"app/jscripty/project/view/view.html",controller:"JscriptyProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/jscripty/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/jscripty/js/Editor.js","assets/plugins/jscripty/js/Graph.js","assets/plugins/jscripty/js/EditorUi.js","assets/plugins/jscripty/js/Actions.js","assets/plugins/jscripty/js/Menus.js","assets/plugins/jscripty/js/Sidebar.js","assets/plugins/jscripty/js/Toolbar.js","assets/plugins/jscripty/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("LoginCtrl",["$scope","Auth","$location","$window","$rootScope",function(a,b,c,d,e){a.year=moment().year(),a.userLogin={},a.userSignUp={},a.loginSubmitted=!1,a.signupSubmitted=!1,a.errorLogin=!1,a.errorSignup=!1,a.errorLog="",a.flagLogin1=!1,a.toogleLogin=function(){a.flagLogin1=!a.flagLogin1},e.bodyLayout="login",a.$on("$viewContentLoaded",function(){Metronic.init(),Layout.init()}),a.login=function(d){a.loginSubmitted=!0,d.$valid?b.login({name:a.userLogin.name,password:a.userLogin.password,remember:a.userLogin.remember}).then(function(){c.path("/dashboard/voice")})["catch"](function(b){a.errorLog=b.message,a.errorLogin=!0}):a.errorLogin=!0},a.signup=function(d){a.signupSubmitted=!0,d.$valid?b.createUser({email:a.userSignUp.email,fullname:a.userSignUp.fullname,name:a.userSignUp.name,password:a.userSignUp.password,role:a.userSignUp.role,online:!0}).then(function(){c.path("/")})["catch"](function(b){a.errorLog=b.message,a.errorSignup=!0}):a.errorSignup=!0},a.loginOauth=function(a){d.location.href="/auth/"+a}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("login",{url:"/login",templateUrl:"app/login/login.html",controller:"LoginCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Action",["$resource",function(a){return a("/api/actions/:name/:controller",{name:"@name"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").directive("actionBuilderTemplate",["$compile","xAlert","$http","$timeout","Template","$translate",function(a,b,c,d,e,f){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"app/main/template/actionBuilder/template.actionBuilderTemplate.html",compile:function(c,g){var h,i;return h=c.contents().remove(),function(c,g,j){function k(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=k(),d(function(){return e.get().$promise.then(function(a){c.templates=a.rows})["catch"](function(a){b.show(f.instant(a.message),"danger")})}),i||(i=a(h)),g.append(i(c,function(a){return a}))}}}}]).directive("actionBuilderIntegration",["$compile","xAlert","$http","$timeout","Integration","$translate","ZendeskAccount","DeskAccount","SalesforceAccount","FreshdeskAccount","SugarcrmAccount",function(a,b,c,d,e,f,g,h,i,j,k){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"app/main/template/actionBuilder/template.actionBuilderIntegration.html",compile:function(c,l){var m,n;return m=c.contents().remove(),function(c,l,o){function p(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=p(),d(function(){return e.get({active:1}).$promise.then(function(a){c.integrations=a.rows,c.element.data1&&q()})["catch"](function(a){b.show(f.instant(a.message),"danger")})});var q=function(){var a;switch(c.element.data1){case"zendesk":a=g;break;case"desk":a=h;break;case"salesforce":a=i;break;case"freshdesk":a=j;break;case"sugarcrm":a=k}return a.get().$promise.then(function(a){c.accounts=a.rows,c.element.data2&&r()})["catch"](function(a){b.show(f.instant(a.message),"danger")})},r=function(){c.configurations=_.find(c.accounts,{id:Number(c.element.data2)}).Configurations};c.changeIntegration=function(){c.element.data2="",q()},c.changeAccount=function(){c.element.data3="",r()},n||(n=a(m)),l.append(n(c,function(a){return a}))}}}}]).directive("actionBuilderStatus",["$compile","xAlert","$http","$timeout","$translate",function(a,b,c,d,e){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"app/main/template/actionBuilder/template.actionBuilderStatus.html",compile:function(b,c){var d,e;return d=b.contents().remove(),function(b,c,f){function g(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}b.randomName=g(),b.states=[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],e||(e=a(d)),c.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").factory("Ami",["$resource",function(a){return a("/api/ami/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChooseContactModalCtrl",["$scope","$uibModalInstance","eventId","$http","xAlert","$translate",function(a,b,c,d,e,f){a.open=function(a){b.close(a)},a.getContacts=function(){d.get("/api/contactmanager/contacts/"+c+"/checkevent").success(function(b){a.contacts=b}).error(function(a){e.show(f.instant(a.message)+"!","danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("CloseEditedTabModalCtrl",["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").factory("gridOptions",["Modal","xAlert","$translate","$interval","$q","usSpinnerService",function(a,b,c,d,e,f){return{gridOptions:function(d,g,h,i,j,k){h.id=[];var l=k?"gridOptions"+k:"gridOptions",m={offset:0,limit:10};g.draggable&&(g.rowTemplate='<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',g.useExternalPagination=!1,g.enablePaginationControls=!1,g.showGridFooter=!1);var n=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")},o=function(){return h[l].enablePaginationControls||(delete m.offset,delete m.limit),f.spin("spinner-grid"),d.get(i?_.merge(m,i):m).$promise.then(function(a){h[l].totalItems=a.count,h[l].data=a.rows,n(a.rows.length)})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})};return h.deleteItem=a.confirm["delete"](function(a){var e=i?angular.copy(i):{};return _.merge(e,{id:a}),d.remove(e).$promise.then(function(){o(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.show(a.message?a.message:a.data.message,"danger")})}),h.deleteItems=a.confirm["delete"](function(){var a=i?angular.copy(i):{};return _.merge(a,{ids:h.id}),d["delete"](a).$promise.then(function(){o(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.show(a.message?a.message:a.data.message,"danger")})}),g.columnDefs.forEach(function(a){a.hasOwnProperty("displayName")||(a.displayName="APPLICATION_"+a.name.toUpperCase()),a.headerCellFilter="translate",a.hasOwnProperty("buttons")&&(a.displayName="",a.cellClass="ui-grid-vcenter",a.enableSorting=!1,a.enableFiltering=!1,a.enableColumnMenu=!1,a.cellTemplate="<div>",a.buttons.forEach(function(b){b.directive?a.cellTemplate+=b.directive:(a.cellTemplate+="<a",a.cellTemplate+=b.hide?' data-ng-hide="true" ':" ",a.cellTemplate+=b["class"]?' class="btn btn-xs '+b["class"]+'" ':" ",a.cellTemplate+=b.href?' data-ng-href="'+b.href+'" ':" ",a.cellTemplate+=b.onClick?' data-ng-click="'+b.onClick+'" ':" ",a.cellTemplate+=b.title?' title="'+b.title+'"':"",a.cellTemplate+=">",a.cellTemplate+=b.icon?'<i class="'+b.icon+'"></i>':"",a.cellTemplate+=b.displayName||b.name?"{{'"+(b.displayName||"APPLICATION_"+b.name.toUpperCase())+"' | translate}}":"",a.cellTemplate+="</a> ")}),a.cellTemplate+="<div>",delete a.buttons)}),_.merge({enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableRowSelection:!0,enableSelectAll:!0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,getPage:o,gridMenuTitleFilter:function(a){var b=e.defer();return b.resolve(c.instant(a)),b.promise},onRegisterApi:function(a){h.gridApi=a,h.gridApi.selection.on.rowSelectionChanged(h,function(a){a.isSelected?h.id.push(h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id):_.pull(h.id,h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id)}),h.gridApi.selection.on.rowSelectionChangedBatch(h,function(a){a[0].isSelected?h.id=_.union(h.id,_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id")):_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id").forEach(function(a){_.pull(h.id,a)})}),h.gridApi.core.on.sortChanged(h,function(a,b){0===b.length?m.order=null:m.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),o()}),h.gridApi.pagination.on.paginationChanged(h,function(a,b){m.offset=(a-1)*b,m.limit=b,o()}),h.gridApi.core.on.filterChanged(h,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?m[a.name]=a.filters[0].term:delete m[a.name]}),o()}),h.gridApi.draggableRows.on.rowDropped(h,function(a){a.fromIndex!==a.toIndex&&d.update(i,h[l].data).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.show(a.message,"danger")})}),j||o()}},g)}}}]),angular.module("xCallyShuttleApp").controller("MainCtrl",["$scope","$rootScope","$translate","socket","Auth","xAlert","$uibModal","$log","$state","Contact",function(a,b,c,d,e,f,g,h,i,j){a.awesomeThings=[],a.isLoggedIn=e.isLoggedIn,a.isAdmin=e.isAdmin,a.getCurrentUser=e.getCurrentUser,a.workspaces=[],a.mainTab={active:!0},a.closeTab=function(b){if(a.workspaces[b].edited){var c=g.open({animation:!0,templateUrl:"app/main/closeEditedTab.modal.html",controller:"CloseEditedTabModalCtrl"});c.result.then(function(c){a.workspaces.splice(b,1)},function(){h.info("Modal dismissed at: "+new Date)})}else a.workspaces.splice(b,1)},a.createContact=function(b,d){return d.tags=d.tags?d.tags.join(","):void 0,j.save(d).$promise.then(function(d){a.workspaces.splice(b,1);var e=d.firstName;d.lastName&&(e+=" "+d.lastName),a.openContactTab({fullname:d.fullname,id:d.id}),f.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){f.show(a.message,"danger")})};var k=function(b){var c=g.open({animation:!0,templateUrl:"app/main/chooseContact.modal.html",controller:"ChooseContactModalCtrl",resolve:{eventId:function(){return b.id}}});c.result.then(function(c){c?a.openContactTab(c):a.newContact(b)},function(){h.info("Modal dismissed at: "+new Date)})};a.updateContact=function(b,d){var e=angular.copy(d);return e.tags=e.tags?e.tags.join(","):void 0,e.CompanyId||(e.CompanyId=null),j.update({id:e.id},e).$promise.then(function(){a.workspaces[b].edited=!1,f.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){f.show(c.instant(a.message)+"!","danger")})},d.socket.on("report_integration:contactmanager",function(a){console.log("choosecontact"),k(a)}),a.openContactTab=function(b){var c=_.find(a.workspaces,{contactID:b.id});if(c)c.active=!0;else{var d=b.firstName;b.lastName&&(d+=" "+b.lastName),a.workspaces.push({name:d,type:"contact",contactID:b.id,active:!0,eventData:b.uniqueid?b:null})}},a.openJscriptyTab=function(b){a.workspaces.push({name:b.name,type:"jscripty",active:!0,data:b})},a.newContact=function(b){a.workspaces.push({name:"New Contact",type:"newContact",active:!0,data:b||null,eventData:b&&b.uniqueid?b:""})},a.$on("$viewContentLoaded",function(){Metronic.init()}),b.language=c.use(),a.changeLanguage=function(a){c.use(a).then(function(a){b.language=a,("main.jscripty.projects.view"===i.current.name||"main.square.projects.view"===i.current.name)&&i.go(i.current,{},{reload:!0})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").directive("ngSpinnerBar",["$rootScope",function(a){return{link:function(b,c){c.addClass("hide"),a.$on("$stateChangeStart",function(){"spinner-page"===c[0].id&&c.removeClass("hide")}),a.$on("$stateChangeSuccess",function(){"spinner-page"===c[0].id&&(c.addClass("hide"),$("body").removeClass("page-on-load"),Layout.setSidebarMenuActiveLink("match"),setTimeout(function(){Metronic.scrollTop()},1e3))}),a.$on("$spinnerStart",function(){"spinner-request"===c[0].id&&c.removeClass("hide")}),a.$on("$spinnerStop",function(){"spinner-request"===c[0].id&&c.addClass("hide")}),a.$on("$stateNotFound",function(){"spinner-page"===c[0].id&&c.addClass("hide")}),a.$on("$stateChangeError",function(){"spinner-page"===c[0].id&&c.addClass("hide")})}}}]).directive("a",function(){return{restrict:"E",link:function(a,b,c){(c.ngClick||""===c.href||"#"===c.href)&&b.on("click",function(a){a.preventDefault()})}}}).directive("nxEqual",function(){return{require:"ngModel",link:function(a,b,c,d){return c.nxEqual?(a.$watch(c.nxEqual,function(a){d.$setValidity("nxEqual",a===d.$viewValue)}),void d.$parsers.push(function(b){var e=b===a.$eval(c.nxEqual);return d.$setValidity("nxEqual",e),e?b:void 0})):void console.error("nxEqual expects a model as an argument!")}}}).directive("ngEnter",function(){return function(a,b,c){b.bind("keydown keypress",function(b){13===b.which&&(a.$apply(function(){a.$eval(c.ngEnter)}),b.preventDefault())})}}).directive("dropdownMenuHover",function(){return{link:function(a,b){b.dropdownHover()}}}).directive("uiSelectRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.uiSelectRequired=function(a){return a&&a.length}}}}).directive("rpattern",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){function e(a,b){return null==b||""===b||!h||a.test(b)?(d.$setValidity("pattern",!0),b):void d.$setValidity("pattern",!1)}var f,g=c.rpattern,h=!0;g&&(g.match(/^\/(.*)\/$/)?(g=new RegExp(g.substr(1,g.length-2)),f=function(a){return e(g,a)}):f=function(b){var c=a.$eval(g);if(!c||!c.test)throw new Error("Expected "+g+" to be a RegExp but was "+c);return e(c,b)}),d.$formatters.push(f),d.$parsers.push(f),c.$observe("required",function(a){h=a,f(d.$viewValue)})}}}).directive("conditionBuilder",["$compile","xAlert","$timeout",function(a,b,c){return{restrict:"E",scope:{element:"=",serviceindex:"=",service:"=",form:"="},templateUrl:"app/main/template/template.conditionBuilder.html",compile:function(d,e){var f,g;return f=d.contents().remove(),function(d,e,h){function i(a){var c=_.find(d.service.services[d.serviceindex].conditions,{value:a});if(c)if(d.elementType=c.type,c.arr)d.values=c.arr;else if(c.resource)return c.resource.get().$promise.then(function(a){d.values=_.map(a.rows,function(a){return{name:a[c.resValue],value:a[c.resValue]}})})["catch"](function(a){b.show($translate.instant(a.message),"danger")})}function j(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}d._=_,d.randomName=j(),c(function(){d.element.field&&i(d.element.field)}),d.checkCondition=function(a){d.element.value="",d.element.operator="",i(a)},g||(g=a(f)),e.append(g(d,function(a){return a}))}}}}]).directive("newContact",["$compile","xAlert","socket","$translate","$timeout","Service","Tag","Company",function(a,b,c,d,e,f,g,h){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.contactTab.html",compile:function(a,i){return function(a,i,j){function k(){a.$watch("contact",function(b,c){angular.equals(b,c)||(a.workspace.edited=!0)},!0)}a.forms={general:{}},a.firstLoad=!0,a.detail={tab:"main"},a.contact={},a.submitButtonLabel=d.instant("APPLICATION_CONFIRM"),a.init=function(){a.workspace.data&&(a.contact.firstName=a.workspace.data.calleridname?a.workspace.data.calleridname:a.workspace.data.messageId?a.workspace.data.messageId:a.workspace.data.uniqueid?a.workspace.data.uniqueid:"",a.workspace.data.calleridnum&&(a.contact.phone=a.workspace.data.calleridnum),a.workspace.data.from&&(a.contact.email=a.workspace.data.from)),a.getTags(),a.getCompanies(),a.getServices()},a.getServices=function(){return f.get().$promise.then(function(b){a.services=b.rows,c.syncUpdates("service",a.services),a.contact.ServiceId=1,a.getCustomFields()})["catch"](function(a){b.show(d.instant(a.message)+"!","danger")})},a.getCustomFields=function(){return f.get({serviceId:a.contact.ServiceId,controller:"customfields"}).$promise.then(function(b){a.customFields=b.rows,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),c.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),c.socket.on("custom_field:save",function(b){if(b.ServiceId===a.contact.ServiceId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}}),!a.firstLoad||a.workspace.data?(a.workspace.edited=!0,a.firstLoad=!1):(a.firstLoad=!1,k())})["catch"](function(a){console.error(a),b.show(a.message,"danger")})},a.getTags=function(){return g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a),b.show(a.message,"danger")})},a.getCompanies=function(){return h.get().$promise.then(function(b){a.companies=b.rows,c.syncUpdates("company",a.companies)})["catch"](function(a){console.error(a),b.show(a.message,"danger")})},e(function(){a.init()})}}}}]).directive("contact",["$compile","xAlert","socket","$timeout","Service","Tag","Company","Contact","$translate","gridOptions",function(a,b,c,d,e,f,g,h,i,j){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.contactTab.html",compile:function(a,k){return function(a,k,l){function m(b){var c={exporterCsvFilename:b+".csv",columnDefs:[{name:a.columns[a.log[b].show][a.log[b].detail].indexes[0],displayName:a.columns[a.log[b].show][a.log[b].detail].header[0],headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:a.columns[a.log[b].show][a.log[b].detail].indexes[1],displayName:a.columns[a.log[b].show][a.log[b].detail].header[1],headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:a.columns[a.log[b].show][a.log[b].detail].indexes[2],displayName:a.columns[a.log[b].show][a.log[b].detail].header[2],headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1}]};a["gridOptions"+b]=j.gridOptions(h,c,a,_.merge({id:a.workspace.contactID,controller:"log",logType:b},a.log[b]),!0,b),a["gridOptions"+b].getPage();
+}a.moment=moment,a.submitButtonLabel=i.instant("APPLICATION_UPDATE"),a.forms={general:{}},a.detail={tab:"main"},a.log={journal:{show:"phone",type:"inbound",detail:"general"},history:{show:"phone",type:"inbound",detail:"general"}},a.columns={phone:{general:{header:["APPLICATION_SOURCE","APPLICATION_DESTINATION","APPLICATION_DATE"],indexes:["source","destination","createdAt"]},queue:{header:["APPLICATION_CALLERID","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["calleridnum","queue","createdAt"]},agent:{header:["APPLICATION_AGENT","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["membername","queue","agentcalledAt"]}},email:{general:{header:["APPLICATION_FROM","APPLICATION_TO","APPLICATION_DATE"],indexes:["from","to","createdAt"]}}},a.updateLog=function(b,c,d,e){c&&(a.log[b].show=c),d&&(a.log[b].detail=d),e&&(a.log[b].type=e),m(b)},a.getContact=function(){return h.get({id:a.workspace.contactID}).$promise.then(function(b){b.tags=b.tags?b.tags.split(","):[],a.contact=b,a.getCustomFields(b.ServiceId),a.updateLog("journal"),a.updateLog("history")})["catch"](function(a){console.error(a),b.show(a.message,"danger")})},a.getTags=function(){return f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a),b.show(a.message,"danger")})},a.getCompanies=function(){return g.get().$promise.then(function(b){a.companies=b.rows,c.syncUpdates("company",a.companies)})["catch"](function(a){console.error(a),b.show(a.message,"danger")})},a.getCustomFields=function(d){return e.get({serviceId:d,controller:"customfields"}).$promise.then(function(b){a.customFields=b.rows,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),c.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),c.socket.on("custom_field:save",function(b){if(b.ServiceId===d){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})})["catch"](function(a){console.error(a),b.show(a.message,"danger")})},d(function(){a.getTags(),a.getCompanies(),a.getContact()})}}}}]).directive("jscripty",["$compile","xAlert","$http","socket",function(a,b,c,d){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.jscriptyTab.html",compile:function(a,d){return function(a,d,e){a.count=0,a.questions=[];var f=0,g=a.workspace.data.id;c.get("/api/jscripty/projects/"+g+"/download").success(function(b){if(b){c.post("/api/jscripty/projects/"+g+"/sessions",{projectId:g,status:"started"}).success(function(a){f=a.session_id,console.log(a)});var d=mxUtils.parseXml(b),e=new mxCodec(d);a.decObj=e.decode(d.documentElement);a.questions[a.count]=a.currentQuestion=_.find(a.decObj.cells,function(a){return a.vertex&&"start"==a.value.nodeName})}else console.log("No project published!"),alert("No project published!"),a.submit({index:a.index})}),a.next=function(b,c){a.currentQuestion.answer&&a.currentQuestion.answer!=c&&(a.questions=_.take(a.questions,a.count+1)),a.currentQuestion.answer=c,a.questions[a.count]=a.currentQuestion;var d=[];_.forEach(b.edges,function(a,c){if(a.source.id==b.id&&a.value){var e=a.value.split(",");e.length>1&&(_.forEach(e,function(c,d){var e=Object.create(a);e.setValue(c),b.edges.push(e)}),d.push(a))}}),_.forEach(d,function(a){_.remove(b.edges,function(b){return b.value==a.value&&b.id==a.id})}),a.currentQuestion=b,a.count++,a.questions[a.count]=b,a.saveQuestions()},a.end=function(){var d="completed";if("end"!=a.questions[a.questions.length-1].value.nodeName){var d="incomplete";a.saveQuestions()}c.put("/api/jscripty/projects/"+g+"/sessions/"+f,{status:d,completedAt:Date(),last_question_id:a.currentQuestion.id}).success(function(c){b.show("Project Ended","success"),a.submit({index:a.index})})},a.back=function(){a.count--,a.currentQuestion=a.questions[a.count]},a.setCurrentQuestion=function(b){a.count=b,a.currentQuestion=a.questions[a.count]},a.saveQuestions=function(){var b=[],d=[];_.forEach(a.questions,function(a,c){a.children&&_.forEach(a.children,function(a,b){d[b]={input_id:a.id,input_type:a.getAttribute("type",""),input_label:a.getAttribute("label",""),input_value:"checkbox"!=a.getAttribute("type","")||a.answer?a.answer:"Not selected"}}),b[c]={sessionId:f,projectId:g,question_id:a.id,question_type:a.value.nodeName,question_label:a.getAttribute("label",""),question_text:a.getAttribute("question",""),question_other_label:a.getAttribute("other"),question_other_answer:a.otheranswer,question_answer:a.answer,ReportJscriptyInputs:d},d=[]}),c.post("/api/jscripty/projects/"+g+"/sessions/"+f+"/questions/",b).success(function(a){})}}}}}]).directive("reportBuilder",["$compile",function(a){return{restrict:"E",scope:{group:"=",fields:"=",forms:"=",firstCall:"="},templateUrl:"app/main/template/template.reportBuilderView.html",compile:function(b,c){var d,e;return d=b.contents().remove(),function(b,c,f){b.operators=[{name:"AND"},{name:"OR"}],b.conditions=[{name:"="},{name:"!="},{name:"<"},{name:"<="},{name:">"},{name:">="},{name:"LIKE"}],b.addCondition=function(){b.group.rules.push({condition:"=",field:"",value:""})},b.removeCondition=function(a){b.group.rules.splice(a,1)},b.addGroup=function(){b.group.rules.push({group:{operator:"AND",rules:[{condition:"=",field:"",value:""}]}})},b.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},b.removeGroup=function(){b.$parent.group&&b.$parent.group.rules.splice(b.$parent.$index,1)},e||(e=a(d)),c.append(e(b,function(a){return a}))}}}}]).directive("dynamicName",["$compile",function(a){return{restrict:"A",terminal:!0,priority:1e3,link:function(b,c,d){c.attr("name",b.$eval(d.dynamicName)),c.removeAttr("dynamic-name"),a(c)(b)}}}]).directive("onReadFile",["$parse",function(a){return{restrict:"A",scope:!1,link:function(b,c,d){var e=a(d.onReadFile);c.on("change",function(a){var c=new FileReader;c.onload=function(a){b.$apply(function(){e(b,{$fileContent:a.target.result})})},c.readAsText((a.srcElement||a.target).files[0])})}}}]).directive("motionFileDownload",["xAlert","$translate","$timeout","$location","FileSaver","$compile",function(a,b,c,d,e,f){return{restrict:"E",template:'<a uib-tooltip=\'{{tooltiptext}}\' class="{{btnclass || \'btn default btn-xs blue-hoki\'}}" href="" data-ng-click="download()" ng-bind-html="btncontent || (\'APPLICATION_DOWNLOAD\' | translate)"></a>',scope:{mimetype:"=",filename:"=",resource:"=",params:"=",btnclass:"@",btncontent:"@",tooltiptext:"@"},link:function(c,d,f){var g=d.children()[0];c.$on("download-start",function(){$(g).attr("disabled","disabled")}),c.$on("downloaded",function(a,b){var d=base64ToBlob(b,c.mimetype);e.saveAs(d,c.filename),$(g).attr("disabled",!1)}),c.download=function(){return c.$emit("download-start"),c.resource.get(c.params).$promise.then(function(a){c.$emit("downloaded",a.downloadString)})["catch"](function(d){a.show(b.instant(d.translatedMessage||d.data.translatedMessage||d.message||d.data.message),"danger"),c.download=function(){}})}}}}]).directive("audioFileDownload",["xAlert","$translate","$sce",function(a,b,c){return{restrict:"E",template:'<button type="button" class="btn default btn-xs blue-hoki" data-ng-click="download()"><i class="icon-control-play"></i> {{ \'APPLICATION_PREVIEW\' | translate}}</button>',scope:{resource:"=",params:"="},link:function(d,e,f){var g=e.children()[0];d.$on("download-start",function(a,b){$(g).attr("disabled","disabled").html('<i class="icon-refresh"></i> Loading...')}),d.$on("downloaded",function(a,b){var d=new Audio(c.trustAsResourceUrl("data:audio/ogg;base64,"+b));d.controls=!0,$(g).remove(),e.append(d),d.play()}),d.$on("error",function(a,b){$(g).removeClass("blue-stripe").addClass("red-stripe").html('<i class="icon-ban"></i> Error!')}),d.download=function(){return d.$emit("download-start"),d.resource.get(d.params).$promise.then(function(a){d.$emit("downloaded",a.downloadString)})["catch"](function(c){a.show(b.instant(c.translatedMessage||c.data.translatedMessage||c.message||c.data.message),"danger")})}}}}]).directive("uiRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.required=function(a,b){return!(b&&0===b.length&&"true"===c.uiRequired)},c.$observe("uiRequired",function(){d.$setValidity("required",!("true"===c.uiRequired&&d.$viewValue&&0===d.$viewValue.length))})}}}),angular.module("xCallyShuttleApp").filter("propsFilter",function(){return function(a,b){var c=[];return angular.isArray(a)?a.forEach(function(a){for(var d=!1,e=Object.keys(b),f=0;f<e.length;f++){var g=e[f],h=b[g].toLowerCase();if(-1!==a[g].toString().toLowerCase().indexOf(h)){d=!0;break}}d&&c.push(a)}):c=a,c}}).filter("capitalize",function(){return function(a){return a?a.replace(/([^\W_]+[^\s-]*) */g,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}):""}}).filter("salesforce",function(){var a=["CallDisposition","CallDurationInSeconds","CallObject","CallType","IsArchived","Priority","Status","Type"];return function(b){return _.remove(b,function(b){return b.custom===!1&&a.indexOf(b.name)<0}),b}}).filter("sugarcrm",function(){var a=["account_id","account_name","account_name1","assigned_user_name","assigned_user_id","case_number","created_by","created_by_name","date_entered","date_modified","deleted","description","id","modified_by_name","modified_user_id","name"];return function(b){return _.remove(b,function(b){return a.indexOf(b.name)>=0}),b}}).filter("freshdesk",function(){var a=["requester","subject","agent","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.ticket_field.name)>=0}),b}}).filter("zendesk",function(){var a=["subject","assignee","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.type)>=0}),b}}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main",{"abstract":!0,templateUrl:"app/main/main.html",controller:"MainCtrl",resolve:{authorization:["$q","Auth","$state","$timeout","$location",function(a,b,c,d,e){return b.getToken()?a.when():(d(function(){e.path("/login")}),a.reject())}],deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/plugins/mxgraph/js/mxClient.js"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("xAlert",["$translate","Notification",function(a,b){return{show:function(c,d){switch(d){case"success":b.success({message:c,title:'<i class="glyphicon glyphicon-ok"></i> <strong>'+a.instant("MESSAGE_SUCCESS")+"!</strong>",delay:5e3});break;case"info":b.info({message:c,title:'<i class="glyphicon glyphicon-info-sign"></i> <strong>'+a.instant("MESSAGE_INFO")+"!</strong>",delay:5e3});break;case"danger":b.error({message:c,title:'<i class="glyphicon glyphicon-exclamation-sign"></i> <strong>'+a.instant("MESSAGE_ERROR")+"!</strong>",delay:1e4});break;case"warning":b.warning({message:c,title:'<i class="glyphicon glyphicon-warning-sign"></i> <strong>'+a.instant("MESSAGE_WARNING")+"!</strong>",delay:1e4});break;default:b.info(c)}}}}]).factory("stResource",["$q","$filter","$timeout","$rootScope","$http","$translate","xAlert",function(a,b,c,d,e,f,g){return{getPage:function(b){var c={page:Math.ceil(b.pagination.start/b.pagination.number),per_page:b.pagination.number};b.sort.predicate&&(c.sort_by=b.sort.predicate,c.sort_order=b.sort.reverse?"DESC":"ASC"),_.forIn(b.search.predicateObject,function(a,b){c[b]=a}),b.search.params&&(c.clientQuery={},_.forIn(b.search.params,function(a,b){c.clientQuery[b]=a})),d.$broadcast("$spinnerStart"),e.get(b.url,{params:c}).success(function(a){h.resolve(a),d.$broadcast("$spinnerStop")}).error(function(a){g.show(f.instant(a.message),"danger"),d.$broadcast("$spinnerStop")});var h=a.defer();return h.promise}}}]),angular.module("xCallyShuttleApp").factory("Widget",["$resource",function(a){return a("/api/widgets/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MarketCtrl",["$scope","$http","$translate","socket","xAlert","Modal","$timeout",function(a,b,c,d,e,f,g){function h(a,b){return Math.floor(Math.random()*(b-a+1))+a}a.initView=function(){b.get("/api/integrations").success(function(b){a.integrations=b.rows,a.groupedIntegration=_.chunk(a.integrations,4),d.syncUpdates("integration",a.integrations,function(){a.groupedIntegration=_.chunk(a.integrations,4)})}).error(function(a){e.show(a.message,"danger")})},a.isProgressing=!1,a.$on("$destroy",function(){d.unsyncUpdates("integration")}),a.installIntegration=function(d){a.status="Downloading",a.percentage=h(1,50),a.isProgressing=!0,d.downloading=!0,b.put("/api/integrations/"+d.id,{active:!0}).success(function(){g(function(){a.percentage=h(51,99),a.status="Installing"},2500),g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",d.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)}).error(function(){d.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.uninstallIntegration=function(d){a.status="Uninstalling",a.percentage=h(1,99),a.isProgressing=!0,d.downloading=!0,b.put("/api/integrations/"+d.id,{active:!1}).success(function(){g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",d.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)}).error(function(){d.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.market",{url:"/market",templateUrl:"app/market/market.html",controller:"MarketCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MotionbarCtrl",["$scope","$stateParams","$cookieStore","settings","Auth",function(a,b,c,d,e){e.loginWithToken(b.token,b.userId,b.name),a.getCurrentUser=e.getCurrentUser,d.layout.pageQuickSidebarOpened=!0}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("motionbar",{url:"/motionbar",template:"<div ui-view></div>","abstract":!0}).state("motionbar.chat",{url:"/chat?token&userId&name",templateUrl:"app/motionbar/motionbar.chat.html",controller:"MotionbarCtrl"})}]),angular.module("xCallyShuttleApp").controller("SalesforceListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedSalesforceAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedSalesforceAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("salesforce_account"),b.url="/api/salesforce/accounts",h.getPage(b).then(function(d){a.displayedSalesforceAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedSalesforceAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedSalesforceAccounts.length)}),f.socket.on("salesforce_account:save",function(){a.initList(b)}),f.socket.on("salesforce_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/salesforce/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/salesforce/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.show(e.instant(a.message),"danger")})}),a.checkAccount=function(a){b.get("/api/salesforce/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.list",{url:"/list",templateUrl:"app/salesforce/list/list.html",controller:"SalesforceListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce",{url:"/salesforce",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("SalesforceAccount",["$resource",function(a){return a("/api/salesforce/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","$filter",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){g.unsyncUpdates("salesforce_configuration"),g.unsyncUpdates("salesforce_field")}),a.initView=function(){b.get("/api/salesforce/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){h.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/salesforce/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/salesforce/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,g.socket.on("salesforce_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.deleteConfiguration=i.confirm["delete"](function(a){b["delete"]("api/salesforce/configurations/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/salesforce/configurations",a.configuration).success(function(a){e.path("salesforce/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){h.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/salesforce/accounts/"+c.id+"/fields").success(function(b){a.accountFields=_.sortByOrder(j("salesforce")(b),"name","asc")}).error(function(a){h.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/salesforce/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,g.socket.on("salesforce_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){h.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){h.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/salesforce/fields/"+a.id).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/salesforce/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/salesforce/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/salesforce/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/salesforce/fields/"+a.id,a).success(function(){}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){b.content="",a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);if(c)switch(c.type){case"picklist":return c.picklistValues;default:return}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view",{url:"/view/:id",templateUrl:"app/salesforce/view/view.html",controller:"SalesforceViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.salesforce.view.account",{url:"/account",templateUrl:"app/salesforce/view/view.account.html"}).state("main.salesforce.view.configurations",{url:"/configurations",templateUrl:"app/salesforce/view/view.configurations.html"}).state("main.salesforce.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/salesforce/view/view.configurationSettings.html",controller:"SalesforceViewCtrl"}).state("main.salesforce.view.configuration",{url:"/configuration",templateUrl:"app/salesforce/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("SalesforceWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/salesforce/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/salesforce/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.wizard",{url:"/wizard",templateUrl:"app/salesforce/wizard/wizard.html",controller:"SalesforceWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("License",["$resource",function(a){return a("/api/licenses/:id/:controller",{id:"@id"},{request:{method:"POST",params:{id:"request"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license",{url:"/license",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("LicenseViewCtrl",["$scope","$rootScope","$translate","License","xAlert",function(a,b,c,d,e){a.initView=function(){d.get(function(b){a.item=b.license})},a.submitRequest=function(){d.request(a.item,function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")},function(a){switch(a.status){case 304:e.show(a.statusText,"info");break;default:e.show(a.statusText,"danger")}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license.view",{url:"/view",templateUrl:"app/setting/license/view/view.html",controller:"LicenseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/pricing-tables.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting",{url:"/setting",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Setting",["$resource",function(a){return a("/api/settings/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Smtp",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp",{url:"/smtp",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SmtpViewCtrl",["$scope","$stateParams","$translate","MailServerOut","xAlert","usSpinnerService",function(a,b,c,d,e,f){a.initView=function(){a.item={},d.get({id:"service"}).$promise.then(function(b){a.item=b})["catch"](function(a){e.show(a.message,"danger")})},a.updateItem=function(){return a.item.id?d.update({id:a.item.id},a.item).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")}):(a.item.service=!0,d.save(a.item).$promise.then(function(b){a.item=b,e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")}))},a.test=function(){return f.spin("spinner-grid"),d.test({id:a.item.id,controller:"test"}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})["finally"](function(){f.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp.view",{url:"/view",templateUrl:"app/setting/smtp/view/view.html",controller:"SmtpViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("UpdateListCtrl",["$scope","gridOptions","$uibModal","$location","Update",function(a,b,c,d,e){a.initCounter=function(){a.$on("timer-stopped",function(a,b){console.log("Timer Stopped - data = ",b),d.path("/dashboard/voice")})},a.initView=function(){var c={exporterCsvFilename:"updates.csv",enableFiltering:!1,enableSorting:!1,enablePaginationControls:!1,enableSelectAll:!1,columnDefs:[{name:"message"},{width:125,name:"version",cellClass:"text-center ui-grid-vcenter"},{width:125,name:"createdAt",displayName:"APPLICATION_UPDATED_AT",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'}]};a.gridOptions=b.gridOptions(e,c,a)},a.pull=function(){c.open({animation:!0,templateUrl:"app/setting/update/list/list.pull.html",controller:"UpdateListPullCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates.list",{url:"/list",templateUrl:"app/setting/update/list/list.html",controller:"UpdateListCtrl"}).state("main.setting.updates.landing",{url:"/landing",templateUrl:"app/setting/update/list/landing.html",controller:"UpdateListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/error.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("UpdateListPullCtrl",["$scope","$uibModalInstance","$translate","$location","Update","xAlert",function(a,b,c,d,e,f){a.modal={dismissable:!0,title:"Confirm Checkout",html:"Are you sure you want to checkout?",buttons:[{classes:"btn btn-success",text:"Checkout",click:function(){return b.dismiss("close"),e.pull().$promise.then(function(){d.path("/setting/updates/landing")})["catch"](function(a){console.error("err",a),f.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}},{classes:"btn default",text:"Cancel",click:function(){b.dismiss("cancel")}}]}}]),angular.module("xCallyShuttleApp").factory("Update",["$resource",function(a){return a("/api/updates/:id/:controller",{id:"@id"},{pull:{method:"GET",params:{id:"pull"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates",{url:"/updates",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCtrl",["$scope","$uibModal","$translate","SquareOdbc","gridOptions","xAlert",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"odbc.csv",columnDefs:[{name:"name"},{name:"dsn",displayName:"APPLICATION_ODBC"},{name:"description"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/square/odbc/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-jungle",name:"check",displayName:"APPLICATION_CHECK_CONNECTION",onClick:"grid.appScope.checkConnection(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(d,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/odbc/list/list.create.modal.html",controller:"SquareOdbcListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})},a.checkConnection=function(a){return d.get({id:a,controller:"check"}).$promise.then(function(){f.show(c.instant("MESSAGE_CONNECTION_VERIFIED"),"success")})["catch"](function(){f.show(c.instant("MESSAGE_CONNECTION_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareOdbc","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.item.dsn||(a.item.dsn="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion"),a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.list",{url:"/list",templateUrl:"app/square/odbc/list/list.html",controller:"SquareOdbcListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc",{url:"/odbc",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareOdbc",["$resource",function(a){return a("/api/square/odbc/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcViewCtrl",["$scope","$translate","$stateParams","SquareOdbc","xAlert",function(a,b,c,d,e){a.odbc={},a.getOdbc=function(){return d.get({id:c.id}).$promise.then(function(b){a.odbc=b})["catch"](function(a){e.show(a.data.message,"danger")})},a.updateOdbc=function(){var f=angular.copy(a.odbc);return d.update({id:c.id},f).$promise.then(function(){e.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.view",{url:"/view/:id",templateUrl:"app/square/odbc/view/view.html",controller:"SquareOdbcViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.square.odbc.view.settings",{url:"/settings",templateUrl:"app/square/odbc/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCtrl",["$scope","$uibModal","SquareProject","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"projects.csv",columnDefs:[{name:"name"},{name:"description"
+},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/square/projects/view/{{row.entity.id}}",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/project/list/list.create.modal.html",controller:"SquareProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.list",{url:"/list",templateUrl:"app/square/project/list/list.html",controller:"SquareProjectListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareProject",["$resource",function(a){return a("/api/square/projects/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareProjectViewCtrl",["$scope","$stateParams","Auth","xAlert","SquareProject",function(a,b,c,d,e){a.squareProject={},a.getProject=function(){return e.get({id:b.id}).$promise.then(function(b){a.squareProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!==a&&-1!==a.indexOf("Script error."));else{var e=new Image;e.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(f){d.show(f,"danger")}},b.token=c.getToken();var a=new EditorUi(new Editor);a.openString(b.preproduction,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}})})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.view",{url:"/view/:id",templateUrl:"app/square/project/view/view.html",controller:"SquareProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/square/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/square/js/Editor.js","assets/plugins/square/js/Graph.js","assets/plugins/square/js/EditorUi.js","assets/plugins/square/js/Actions.js","assets/plugins/square/js/Menus.js","assets/plugins/square/js/Sidebar.js","assets/plugins/square/js/Toolbar.js","assets/plugins/square/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square",{url:"/square",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Agent",["$resource",function(a){return a("/api/agents/:id/:controller",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents",{url:"/agents",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AgentListCtrl",["$scope","Agent","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"agents.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"internal"},{name:"email"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/staff/agents/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.list",{url:"/list",templateUrl:"app/staff/agent/list/list.html",controller:"AgentListCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("AgentViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$cookieStore","Agent","FileUploader","Auth","User",function(a,b,c,d,e,f,g,h,i,j){a.Auth=i,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.updatePassword=function(){var b={newPassword:a.agent.newPwd};return i.isAdmin()?b.id=e.id:b.oldPassword=a.agent.currentPwd,j.changePassword(b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.message,"danger")})};var k=a.uploader=new h({url:"api/users/"+e.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+f.get("token")}});k.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),k.onSuccessItem=function(b,e){a.agent.userpic=e.userpic,a.agent.id===i.getCurrentUser().id&&(i.getCurrentUser().userpic=e.userpic),c.show(d.instant("MESSAGE_WELL_DONE"),"success")},k.onErrorItem=function(){c.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},k.onCompleteAll=function(){k.clearQueue()},a.initView=function(){return g.get({id:e.id}).$promise.then(function(b){a.agent=b,a.agent.transport=a.agent.transport?a.agent.transport.split(","):[],a.agent.allow=a.agent.allow?a.agent.allow.split(";"):[],a.agent.nat=a.agent.nat?a.agent.nat.split(","):[]})["catch"](function(a){c.show(a.message,"danger")})},a.patchItem=function(){return g.patch({id:e.id},{chatCapacity:a.agent.chatCapacity,mailCapacity:a.agent.mailCapacity,faxCapacity:a.agent.faxCapacity}).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.message,"danger")})},a.updateItem=function(){var b=angular.copy(a.agent);return delete b.password,delete b.md5secret,b.transport=b.transport.join(","),b.allow=b.allow.join(";"),b.nat=b.nat.join(","),g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.view",{url:"/view/:id",templateUrl:"app/staff/agent/view/view.html",controller:"AgentViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.agents.view.account",{url:"/account",templateUrl:"app/staff/agent/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.agents.view.voice",{url:"/voice",templateUrl:"app/staff/agent/view/view.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.chat",{url:"/chat",templateUrl:"app/staff/agent/view/view.chat.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.mail",{url:"/mail",templateUrl:"app/staff/agent/view/view.mail.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.fax",{url:"/fax",templateUrl:"app/staff/agent/view/view.fax.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.agents.view.phonebar",{url:"/phonebar",templateUrl:"app/staff/agent/view/view.phonebar.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("AgentWizardCtrl",["$scope","$rootScope","Agent","Setting","xAlert","$location","$translate","$http","WizardHandler",function(a,b,c,d,e,f,g,h,i){a.forms={info:void 0,voice:void 0},a.item={role:"agent",allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},a.next=function(){i.wizard().next()},a.exitValidation=function(a){return a},a.getFirstFreeInternal=function(){return d.get({controller:"internal"}).$promise.then(function(b){a.item.internal=b.value})["catch"](function(a){e.show(a.data.message,"danger")})},a.createItem=function(){var b=angular.copy(a.item);return b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),c.save(b).$promise.then(function(){f.path("/staff/agents/list")})["catch"](function(a){e.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.wizard",{url:"/wizard",templateUrl:"app/staff/agent/wizard/wizard.html",controller:"AgentWizardCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff",{url:"/staff",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TeamCreateCtrl",["$scope","$uibModalInstance","Team","xAlert",function(a,b,c,d){a.form={},a.item={},a.ok=function(){return c.save(a.item).$promise.then(function(){b.close(a.item)})["catch"](function(a){d.show(a.data.message,"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("TeamListCtrl",["$scope","Team","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"teams.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/staff/teams/view/{{row.entity.id}}/settings",name:"profile"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){d.open({animation:!0,templateUrl:"app/staff/team/list/create.modal.html",controller:"TeamCreateCtrl"}).result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.list",{url:"/list",templateUrl:"app/staff/team/list/list.html",controller:"TeamListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Team",["$resource",function(a){return a("/api/teams/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams",{url:"/teams",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TeamViewCtrl",["$scope","$http","$stateParams","$translate","Team","Agent","xAlert",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return console.log("agents",b),e.save({id:a.team.id,controller:"agents"},{agents:b})},deselect:function(b){return e["delete"]({id:a.team.id,controller:"agents",agents:b})}}};a.initView=function(){return e.get({id:c.id}).$promise.then(function(b){a.team=b})["catch"](function(a){g.show(a.message,"danger")})},a.initAgents=function(){return f.get().$promise.then(function(b){return a.agents=b.rows,e.query({id:c.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindTeam(_.map(b,"id"),_.map(a.agents,function(a){return{id:a.id,name:a.name,fullname:a.fullname,internal:a.internal}}),h)})["catch"](function(a){g.show(a.message,"danger")})},a.updateItem=function(){var b=angular.copy(a.team);return e.update({id:c.id},b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.view",{url:"/view/:id",templateUrl:"app/staff/team/view/view.html",controller:"TeamViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.teams.view.agents",{url:"/agents",templateUrl:"app/staff/team/view/view.agents.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]}])}]}}).state("main.staff.teams.view.settings",{url:"/settings",templateUrl:"app/staff/team/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TelephoneListCtrl",["$scope","Telephone","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"fullname"},{name:"name"},{name:"accountcode"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/staff/telephones/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.list",{url:"/list",templateUrl:"app/staff/telephone/list/list.html",controller:"TelephoneListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Telephone",["$resource",function(a){return a("/api/telephones/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones",{url:"/telephones",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TelephoneViewCtrl",["$scope","$http","$stateParams","$translate","$cookieStore","Auth","xAlert","Telephone",function(a,b,c,d,e,f,g,h){a.initView=function(){a.Auth=f,a.forms={},h.get({id:c.id}).$promise.then(function(b){delete b.password,a.item=b,a.item.transport=a.item.transport?a.item.transport.split(","):[],a.item.allow=a.item.allow?a.item.allow.split(";"):[]})["catch"](function(a){g.show(a.message,"danger")})},a.updateItem=function(){var b=angular.copy(a.item);b.transport=b.transport.join(","),b.allow=b.allow.join(";"),h.update(b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.view",{url:"/view/:id",templateUrl:"app/staff/telephone/view/view.html",controller:"TelephoneViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.telephones.view.account",{url:"/account",templateUrl:"app/staff/telephone/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("TelephoneWizardCtrl",["$scope","$http","$location","WizardHandler","xAlert","$translate","Telephone",function(a,b,c,d,e,f,g){a.next=function(){d.wizard().next()},a.exitValidation=function(a){return a},a.initWizard=function(){return a.forms={},a.item={allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},g.get({id:"internal"}).$promise.then(function(b){a.item.internal=b.internal})["catch"](function(a){console.error(a)})},a.createItem=function(){var b=angular.copy(a.item);return b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),g.save(b).$promise.then(function(){c.path("/staff/telephones/list")})["catch"](function(a){e.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.wizard",{url:"/wizard",templateUrl:"app/staff/telephone/wizard/wizard.html",controller:"TelephoneWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("UserListCtrl",["$scope","User","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"users.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"email"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/staff/users/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.list",{url:"/list",templateUrl:"app/staff/user/list/list.html",controller:"UserListCtrl"})}]),angular.module("xCallyShuttleApp").factory("User",["$resource",function(a){return a("/api/users/:id/:controller",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},me:{method:"GET",params:{id:"me"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users",{url:"/users",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("UserViewCtrl",["$scope","$stateParams","$cookieStore","$translate","FileUploader","User","Auth","xAlert",function(a,b,c,d,e,f,g,h){a.Auth=g,a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.user=b,a.user.transport=a.user.transport?a.user.transport.split(","):[],a.user.allow=a.user.allow?a.user.allow.split(";"):[]})["catch"](function(a){h.show(a.message,"danger")})},a.updateItem=function(){var c=angular.copy(a.user);return delete c.password,delete c.md5secret,c.transport=c.transport.join(","),c.allow=c.allow.join(";"),f.update({id:b.id},c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.show(a.message,"danger")})},a.updatePassword=function(){var c={newPassword:a.user.newPwd};return g.isAdmin()?c.id=b.id:c.oldPassword=a.user.currentPwd,f.changePassword(c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.show(a.message,"danger")})};var i=a.uploader=new e({url:"api/users/"+b.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+c.get("token")}});i.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),i.onSuccessItem=function(b,c){a.user.userpic=c.userpic,a.user.id===g.getCurrentUser().id&&(g.getCurrentUser().userpic=c.userpic),h.show(d.instant("MESSAGE_WELL_DONE"),"success")},i.onErrorItem=function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},i.onCompleteAll=function(){i.clearQueue()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.view",{url:"/view/:id",templateUrl:"app/staff/user/view/view.html",controller:"UserViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.users.view.account",{url:"/account",templateUrl:"app/staff/user/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("UserWizardCtrl",["$scope","$location","WizardHandler","xAlert","$translate","User",function(a,b,c,d,e,f){a.forms={info:void 0,voice:void 0},a.item={role:"user",host:"dynamic",context:"from-sip"},a.next=function(){c.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return f.save(a.item).$promise.then(function(){b.path("/staff/users/list")})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.wizard",{url:"/wizard",templateUrl:"app/staff/user/wizard/wizard.html",controller:"UserWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmListCtrl",["$scope","SugarcrmAccount","gridOptions","xAlert","$translate","Modal",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"sugarcrm_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_REMOTE_ADDRESS"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/sugarcrm/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",displayName:"APPLICATION_CHECK_CONNECTION",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.get({id:a,controller:"check"}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(a){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.list",{url:"/list",templateUrl:"app/sugarcrm/list/list.html",controller:"SugarcrmListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm",{url:"/sugarcrm",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmAccount",["$resource",function(a){return a("/api/sugarcrm/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmConfiguration",["$resource",function(a){return a("/api/sugarcrm/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmField",["$resource",function(a){return a("/api/sugarcrm/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SugarcrmViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("sugarcrm_configuration"),h.unsyncUpdates("sugarcrm_field")}),a.initView=function(){b.get("/api/sugarcrm/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.show(a.message,"danger")})},a.updateItem=function(){b.put("/api/sugarcrm/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/sugarcrm/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("sugarcrm_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/sugarcrm/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/sugarcrm/configurations",a.configuration).success(function(a){e.path("sugarcrm/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/sugarcrm/accounts/"+c.id+"/fields").success(function(b){a.accountFields=_.sortByOrder(f("sugarcrm")(_.toArray(b)),"name","asc"),_.forEach(b,function(a){a.options=_.toArray(a.options)})}).error(function(a){i.show(a.message,"danger")})},a.getConfiguration=function(){b.get("/api/sugarcrm/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("sugarcrm_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.show(a.message,"danger")})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.show(a.message,"danger")})},a.removeItem=function(a){b["delete"]("api/sugarcrm/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/sugarcrm/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){b.content="",a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.options.length>0?c.options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.view",{url:"/view/:id",templateUrl:"app/sugarcrm/view/view.html",controller:"SugarcrmViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.sugarcrm.view.account",{url:"/account",templateUrl:"app/sugarcrm/view/view.account.html"}).state("main.sugarcrm.view.configurations",{url:"/configurations",templateUrl:"app/sugarcrm/view/view.configurations.html"}).state("main.sugarcrm.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/sugarcrm/view/view.configurationSettings.html",controller:"SugarcrmViewCtrl"}).state("main.sugarcrm.view.configuration",{url:"/configuration",templateUrl:"app/sugarcrm/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmkWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("api/sugarcrm/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/sugarcrm/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.wizard",{url:"/wizard",templateUrl:"app/sugarcrm/wizard/wizard.html",controller:"SugarcrmkWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("CannedAnswer",["$resource",function(a){return a("/api/answers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers",{url:"/answers",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnswerListCtrl",["$scope","$uibModal","CannedAnswer","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"answers.csv",columnDefs:[{name:"key",displayName:"APPLICATION_NAME"},{name:"value"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/answers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.key, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){b.open({animation:!0,templateUrl:"app/tools/answer/list/list.create.modal.html",controller:"AnswerListCreateCtrl"}).result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("AnswerListCreateCtrl",["$scope","$translate","$uibModalInstance","CannedAnswer","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.list",{url:"/list",templateUrl:"app/tools/answer/list/list.html",controller:"AnswerListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AnswerViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","CannedAnswer",function(a,b,c,d,e,f,g){a.getAnswer=function(){return g.get({id:e.id}).$promise.then(function(b){a.answer=b})["catch"](function(a){c.show(a.data.message,"danger")})},a.updateAnswer=function(){var b=angular.copy(a.answer);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.data.message,"danger")})}}]),
+angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.view",{url:"/view/:id",templateUrl:"app/tools/answer/view/view.html",controller:"AnswerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.answers.view.settings",{url:"/settings",templateUrl:"app/tools/answer/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Automation",["$resource",function(a){return a("/api/automations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations",{url:"/automations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AutomationListCtrl",["$scope","$http","$translate","xAlert","Automation","gridOptions",function(a,b,c,d,e,f){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Automations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',width:100,enableFiltering:!1},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/automations/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.updateItem=function(a){return e.update({id:a.id},a).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.list",{url:"/list",templateUrl:"app/tools/automation/list/list.html",controller:"AutomationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AutomationViewCtrl",["$scope","$stateParams","$http","$translate","xAlert","automations","Automation","$location",function(a,b,c,d,e,f,g,h){a.$automations=f,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.automation[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.automation[b].splice(c,1)},a.addAction=function(){a.automation.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.automation.Actions.splice(b,1)},a.initView=function(){return g.get({id:b.id}).$promise.then(function(b){a.automation=b})["catch"](function(a){e.show(a.message,"danger"),h.path("/tools/automations/list")})},a.updateAutomation=function(){return g.update({id:b.id},a.automation).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.show(a.message,"danger")})},a.exitValidation=function(b){return console.log(b&&(a.automation.All.length||a.automation.Any.length)&&a.automation.Actions.length),b&&(a.automation.All.length||a.automation.Any.length)&&a.automation.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.view",{url:"/view/:id",templateUrl:"app/tools/automation/view/view.html",controller:"AutomationViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.automations.view.settings",{url:"/settings",templateUrl:"app/tools/automation/view/view.settings.html"}).state("main.tools.automations.view.routes",{url:"/routes",templateUrl:"app/tools/automation/view/view.routes.html"}).state("main.tools.automations.view.application",{url:"/application",templateUrl:"app/tools/automation/view/view.application.html"})}]),angular.module("xCallyShuttleApp").controller("AutomationWizardCtrl",["$scope","$http","$location","xAlert","automations","WizardHandler","Automation",function(a,b,c,d,e,f,g){a.$automations=e,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="voice",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/automations/list")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return b&&(a.item.All.length||a.item.Any.length)&&a.item.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.wizard",{url:"/wizard",templateUrl:"app/tools/automation/wizard/wizard.html",controller:"AutomationWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("Interval",["$resource",function(a){return a("/api/intervals/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals",{url:"/intervals",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("IntervalListCtrl",["$scope","$uibModal","Interval","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"intervals.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/intervals/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/interval/list/list.create.modal.html",controller:"IntervalListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("IntervalListCreateCtrl",["$scope","$translate","$uibModalInstance","Interval","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(b.instant(a.data.message),"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.list",{url:"/list",templateUrl:"app/tools/interval/list/list.html",controller:"IntervalListCtrl"})}]),angular.module("xCallyShuttleApp").controller("IntervalViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","interval",function(a,b,c,d,e,f,g,h,i,j){function k(b){console.log(b);var c,d,e,f;c=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(d=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(d+="-"+b.wd_to)):d="*",b.md_from&&"always"!==b.md_from?(e=b.md_from,b.md_to&&"always"!==b.md_to&&(e+="-"+b.md_to)):e="*",b.m_from&&"always"!==b.m_from?(f=b.m_from,b.m_to&&"always"!==b.m_to&&(f+="-"+b.m_to)):f="*",void 0!==a.selectedSubInterval?a.interval.SubIntervals[a.selectedSubInterval].interval=c+","+d+","+e+","+f:a.subinterval.interval=c+","+d+","+e+","+f}a.$translate=d,a.$interval=j.interval,a.selectedSubInterval=void 0,a.gridOptions={columnDefs:[{name:"name",displayName:"APPLICATION_NAME",headerCellFilter:"translate"},{name:"interval",displayName:"APPLICATION_INTERVAL",headerCellFilter:"translate"},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openSubInterval(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteSubInterval(row.entity.name+\' interval\', gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}]},a.forms={subinterval:void 0,general:void 0},a.initSubInterval=function(b){b&&(a.selectedSubInterval=void 0),a.subinterval={},a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0}},a.next=function(){h.wizard().next()},a.previous=function(){h.wizard().previous()},a.exitValidation=function(a){return a},a.deselectAndRedirect=function(b){a.selectedSubInterval=void 0,g.path(b)},a.getInterval=function(){b.get("/api/intervals/"+e.id).success(function(b){a.interval=b,a.gridOptions.data=b.SubIntervals}).error(function(a){console.error(a),g.path("/tools/intervals/list")})},a.openSubInterval=function(b){a.selectedSubInterval=b,g.path("/tools/intervals/view/"+e.id+"/subintervals/settings")},a.updateInterval=function(f){a.selectedSubInterval=void 0,b.put("/api/intervals/"+e.id,a.interval).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),f&&g.path("/tools/intervals/view/"+e.id+"/"+f)}).error(function(a){c.show(d.instant(a.message),"danger")})},a.getSubInterval=function(){void 0===a.selectedSubInterval&&g.path("/tools/intervals/list"),a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date)};var b,c=a.interval.SubIntervals[a.selectedSubInterval]?a.interval.SubIntervals[a.selectedSubInterval].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.splittedInterval.t_from=moment(b[0],"HH:mm"),a.splittedInterval.t_to=moment(b[1],"HH:mm"),a.splittedInterval.alwaysTime=!1):(a.splittedInterval.t_from=moment(new Date),a.splittedInterval.t_to=moment(new Date),a.splittedInterval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.splittedInterval.wd_from=b[0],a.splittedInterval.wd_to=b[1]?b[1]:"always"):(a.splittedInterval.wd_from="always",a.splittedInterval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.splittedInterval.md_from=b[0],a.splittedInterval.md_to=b[1]?b[1]:"always"):(a.splittedInterval.md_from="always",a.splittedInterval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.splittedInterval.m_from=b[0],a.splittedInterval.m_to=b[1]?b[1]:"always"):(a.splittedInterval.m_from="always",a.splittedInterval.m_to="always")}})},a.$watch("splittedInterval",function(a){a&&k(a)},!0),a.addSubInterval=function(){a.interval.SubIntervals.push(a.subinterval),a.updateInterval("subintervals")},a.deleteSubInterval=i.confirm["delete"](function(b){a.interval.SubIntervals.splice(b,1),a.updateInterval()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.view",{url:"/view/:id",templateUrl:"app/tools/interval/view/view.html",controller:"IntervalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.intervals.view.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.settings.html"}).state("main.tools.intervals.view.subintervals",{url:"/subintervals",templateUrl:"app/tools/interval/view/view.subintervals.html"}).state("main.tools.intervals.view.subinterval",{url:"/subinterval",templateUrl:"app/tools/interval/view/view.subinterval.html"}).state("main.tools.intervals.view.subintervals.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.subintervalSettings.html"})}]),angular.module("xCallyShuttleApp").controller("PauseListCtrl",["$scope","$log","$uibModal","$translate","Pause","gridOptions",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"pauses.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/pauses/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.createItem=function(){var b=c.open({animation:!0,templateUrl:"app/tools/pause/list/list.create.modal.html",controller:"PauseListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("PauseListCreateCtrl",["$scope","$translate","$uibModalInstance","Pause","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.list",{url:"/list",templateUrl:"app/tools/pause/list/list.html",controller:"PauseListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Pause",["$resource",function(a){return a("/api/pauses/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses",{url:"/pauses",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("PauseViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Pause",function(a,b,c,d,e,f,g){a.getPause=function(){return g.get({id:e.id}).$promise.then(function(b){a.pause=b})["catch"](function(a){c.show(a.data.message,"danger")})},a.updatePause=function(){var b=angular.copy(a.pause);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.view",{url:"/view/:id",templateUrl:"app/tools/pause/view/view.html",controller:"PauseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.pauses.view.settings",{url:"/settings",templateUrl:"app/tools/pause/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SoundListCtrl",["$scope","$http","socket","Modal","$q","FileUploader","$translate","xAlert","$cookieStore","$sce","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.Sound=k,a.isCollapsed=!0,a.downloadButtonContent='<i class="icon-cloud-download"></i>',a.downloadButtonClass="btn btn-xs blue-hoki",a["delete"]=d.confirm["delete"](function(a){b["delete"]("/api/sounds/"+a).success(function(a){}).error(function(a){console.log(a)})}),a.updateAudio=function(a,c){var d=e.defer();return b.put("/api/sounds/"+a,c).success(function(a){d.resolve()}).error(function(a){console.log(a.message),d.reject(a.message)}),d.promise},a.$on("$destroy",function(){c.unsyncUpdates("sound")}),a.initList=function(){b.get("/api/sounds").success(function(b){a.sounds=b.rows,b.rows.length||(a.isCollapsed=!1),c.syncUpdates("sound",a.sounds,function(){a.sounds.length||(a.isCollapsed=!1)})}).error(function(a){})};var l=a.uploader=new f({url:"/api/sounds",withCredentials:!0,headers:{Authorization:"Bearer "+i.get("token")}});l.filters.push({name:"customFilter",fn:function(a,b){return this.queue.length<10}}),l.onWhenAddingFileFailed=function(a,b,c){console.info("onWhenAddingFileFailed",a,b,c)},l.onAfterAddingFile=function(a){console.info("onAfterAddingFile",a)},l.onAfterAddingAll=function(a){console.info("onAfterAddingAll",a)},l.onBeforeUploadItem=function(a){console.info("onBeforeUploadItem",a)},l.onProgressItem=function(a,b){console.info("onProgressItem",a,b),a.isUploading=!0},l.onProgressAll=function(a){console.info("onProgressAll",a)},l.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),a.isUploading=!1},l.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),a.responseMessage=b,a.isUploading=!1},l.onCancelItem=function(a,b,c,d){console.info("onCancelItem",a,b,c,d),a.isUploading=!1},l.onCompleteItem=function(a,b,c,d){console.info("onCompleteItem",a,b,c,d),a.isUploading=!1},l.onCompleteAll=function(){console.info("onCompleteAll")},console.info("uploader",l)}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds.list",{url:"/list",templateUrl:"app/tools/sound/list/list.html",controller:"SoundListCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("Sound",["$resource",function(a){return a("/api/sounds/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds",{url:"/sounds",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TagListCtrl",["$scope","$uibModal","Tag","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"tag.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/tags/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/tag/list/list.create.modal.html",controller:"TagListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("TagListCreateCtrl",["$scope","$translate","$uibModalInstance","Tag","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.list",{url:"/list",templateUrl:"app/tools/tag/list/list.html",controller:"TagListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Tag",["$resource",function(a){return a("/api/tags/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags",{url:"/tags",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TagViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Tag",function(a,b,c,d,e,f,g){a.getTag=function(){return g.get({id:e.id}).$promise.then(function(b){a.tag=b})["catch"](function(a){c.show(a.data.message,"danger")})},a.updateTag=function(){var b=angular.copy(a.tag);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.view",{url:"/view/:id",templateUrl:"app/tools/tag/view/view.html",controller:"TagViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.tags.view.settings",{url:"/settings",templateUrl:"app/tools/tag/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateListCtrl",["$scope","Template","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"templates.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/tools/templates/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.list",{url:"/list",templateUrl:"app/tools/template/list/list.html",controller:"TemplateListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Template",["$resource",function(a){return a("/api/mail/templates/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates",{url:"/templates",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TemplateViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","Template",function(a,b,c,d,e,f){a.initItem=function(){a.form={},a.item={},a.groups=[{title:"Voice",variables:[]},{title:"Chat",variables:["username","email","text","chatWebsite"]},{title:"Mail",variables:[]},{title:"Fax",variables:[]}],a.item=f.get({id:d.id})},a.updateItem=function(){f.update(a.item).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.view",{url:"/view/:id",templateUrl:"app/tools/template/view/view.html",controller:"TemplateViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.templates.view.settings",{url:"/settings",templateUrl:"app/tools/template/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateWizardCtrl",["$scope","$location","$http","WizardHandler","xAlert","Template",function(a,b,c,d,e,f){a.initWizard=function(){a.item={},a.form={},a.groups=[{title:"Voice",variables:[]},{title:"Chat",variables:["username","email","text","chatWebsite"]},{title:"Mail",variables:[]},{title:"Fax",variables:[]}]},a.next=function(){d.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return f.save({name:a.item.name,description:a.item.description,subject:a.item.subject||null,html:a.item.html||null,text:a.item.text||null}).$promise.then(function(){b.path("/tools/templates/list")})["catch"](function(a){e.show(data.err.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.wizard",{url:"/wizard",templateUrl:"app/tools/template/wizard/wizard.html",controller:"TemplateWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools",{url:"/tools",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TriggerListCtrl",["$scope","$http","$translate","Modal","xAlert","Trigger","gridOptions",function(a,b,c,d,e,f,g){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Triggers.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',width:100,enableFiltering:!1},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/triggers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=g.gridOptions(f,b,a)},a.updateItem=function(a){return f.update({id:a.id},a).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.list",{url:"/list",templateUrl:"app/tools/trigger/list/list.html",controller:"TriggerListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trigger",["$resource",function(a){return a("/api/triggers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers",{url:"/triggers",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TriggerViewCtrl",["$scope","$stateParams","$translate","xAlert","triggers","Trigger","$location",function(a,b,c,d,e,f,g){a.$triggers=e,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.trigger[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.trigger[b].splice(c,1)},a.addAction=function(){a.trigger.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.trigger.Actions.splice(b,1)},a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.trigger=b})["catch"](function(a){d.show(a.message,"danger"),g.path("/tools/triggers/list")})},a.updateTrigger=function(){return f.update({id:b.id},a.trigger).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},a.exitValidation=function(b){return console.log(b&&(a.trigger.All.length||a.trigger.Any.length)&&a.trigger.Actions.length),b&&(a.trigger.All.length||a.trigger.Any.length)&&a.trigger.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.view",{url:"/view/:id",templateUrl:"app/tools/trigger/view/view.html",controller:"TriggerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.triggers.view.settings",{url:"/settings",templateUrl:"app/tools/trigger/view/view.settings.html"}).state("main.tools.triggers.view.routes",{url:"/routes",templateUrl:"app/tools/trigger/view/view.routes.html"}).state("main.tools.triggers.view.application",{url:"/application",templateUrl:"app/tools/trigger/view/view.application.html"})}]),angular.module("xCallyShuttleApp").controller("TriggerWizardCtrl",["$scope","$http","$location","xAlert","triggers","WizardHandler","Trigger",function(a,b,c,d,e,f,g){a.$triggers=e,a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="voice",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/triggers/list")})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return b&&(a.item.All.length||a.item.Any.length)&&a.item.Actions.length?!0:!1}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.wizard",{url:"/wizard",templateUrl:"app/tools/trigger/wizard/wizard.html",controller:"TriggerWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("TrunkListCtrl",["$scope","Trunk","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"Trunks.csv",columnDefs:[{name:"name"},{name:"host"},{name:"context"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/trunks/view/{{row.entity.name}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.list",{url:"/list",templateUrl:"app/tools/trunk/list/list.html",controller:"TrunkListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trunk",["$resource",function(a){return a("/api/trunks/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks",{url:"/trunks",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TrunkViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","Trunk","VoiceContext",function(a,b,c,d,e,f,g,h,i){
+a.initView=function(){return h.get({id:e.id}).$promise.then(function(b){b.nat=b.nat?b.nat.split(","):[],b.allow=b.allow?b.allow.split(";"):[],b.insecure=b.insecure?b.insecure.split(","):[],b.transport=b.transport?b.transport.split(","):[],a.trunk=b})["catch"](function(a){console.error(a),g.path("/tools/trunks/list")})},a.updateTrunk=function(){""===a.trunk.password&&delete a.trunk.password;var b=angular.copy(a.trunk);return b.nat=b.nat.join(","),b.allow=b.allow.join(";"),b.insecure=b.insecure.join(","),b.transport=b.transport.join(","),h.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.show(a.data.message,"danger")})},a.getContexts=function(){return i.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){c.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.view",{url:"/view/:id",templateUrl:"app/tools/trunk/view/view.html",controller:"TrunkViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.trunks.view.settings",{url:"/settings",templateUrl:"app/tools/trunk/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TrunkWizardCtrl",["$scope","$http","WizardHandler","$location","xAlert","socket","$translate",function(a,b,c,d,e,f,g){a.initWizard=function(){a.forms={},a.item={context:"from-voip-provider"}},a.next=function(d){d?b.post("/api/trunks/validate/",a.item).success(function(a){console.log(a),a.length?e.show(g.instant("MESSAGE_EXIST_TRUNK"),"danger"):c.wizard().next()}).error(function(a){e.show(g.instant(a.message),"danger")}):c.wizard().next()},a.previous=function(){c.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("/api/trunks/",a.item).success(function(){d.path("/tools/trunks/list")}).error(function(a){e.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.wizard",{url:"/wizard",templateUrl:"app/tools/trunk/wizard/wizard.html",controller:"TrunkWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("VariableListCtrl",["$scope","$uibModal","Variable","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"variables.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/tools/variables/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/variable/list/list.create.modal.html",controller:"VariableListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VariableListCreateCtrl",["$scope","$translate","$uibModalInstance","Variable","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.show(a.data.message,"danger")})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.list",{url:"/list",templateUrl:"app/tools/variable/list/list.html",controller:"VariableListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Variable",["$resource",function(a){return a("/api/variables/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables",{url:"/variables",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VariableViewCtrl",["$scope","$translate","$stateParams","xAlert","Variable",function(a,b,c,d,e){a.getVariable=function(){return e.get({id:c.id}).$promise.then(function(b){a.variable=b})["catch"](function(a){d.show(a.data.message,"danger")})},a.updateVariable=function(){return e.update({id:c.id},a.variable).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.view",{url:"/view/:id",templateUrl:"app/tools/variable/view/view.html",controller:"VariableViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.variables.view.settings",{url:"/settings",templateUrl:"app/tools/variable/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCloneModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCtrl",["$scope","$http","$translate","xAlert","Modal","$uibModal","$log","YourDashboard","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:220,buttons:[{"class":"green",href:"/tools/yourdashboards/show/{{row.entity.id}}",name:"view"},{"class":"blue-hoki",href:"/tools/yourdashboards/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"purple",name:"clone",onClick:"grid.appScope.clone(row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var b=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/create.modal.html",controller:"YourdashboardListCreateModalCtrl"});b.result.then(function(b){return h.save(b).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})},a.clone=function(b){var e=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/clone.modal.html",controller:"YourdashboardListCloneModalCtrl"});e.result.then(function(e){return h.save({id:b,controller:"clone"},e).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.show(a.message,"danger")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.list",{url:"/list",templateUrl:"app/tools/yourdashboard/list/list.html",controller:"YourdashboardListCtrl"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardShowCtrl",["$scope","localStorageService","$http","xAlert","$translate","Auth","$stateParams","$location",function(a,b,c,d,e,f,g,h){a.Auth=f,a.getDashboard=function(){c.get("/api/dashboards/"+g.id).success(function(b){var c={name:"dashboard",structure:"4-8",enableconfirmdelete:!0,maximizable:!0,collapsible:!0};b.model=JSON.parse(b.model||'{"title":"Dashboard"}'),b.editable=f.isAdmin()&&b.editable?!0:!1,a.dashboard=_.merge(c,b)}).error(function(a){h.path("/tools/yourdashboards/list")})};var i=function(b,f,h){var i=angular.copy(a.dashboard);i.name=a.dashboard.model.title,i.model=JSON.stringify(i.model),c.put("/api/dashboards/"+g.id,i).success(function(){d.show(e.instant("MESSAGE_DASHBOARD_SAVED")+"!","success")}).error(function(b){d.show(b.message,"danger"),i.model=JSON.parse(i.model),i.name="dashboard",a.dashboard=i})};a.$on("adfDashboardChanged",i),a.$on("destroy",function(){console.log("main dashboard")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.show",{url:"/show/:id",templateUrl:"app/tools/yourdashboard/show/show.html",controller:"YourdashboardShowCtrl"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.getDashboard=function(){b.get("/api/dashboards/"+e.id).success(function(b){delete b.model,a.dashboard=b}).error(function(a){f.path("/tools/yourdashboards/list")})},a.updateDashboard=function(){var f=angular.copy(a.dashboard);b.put("/api/dashboards/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.show(d.instant(b.message),"danger"),a.dashboard=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.view",{url:"/view/:id",templateUrl:"app/tools/yourdashboard/view/view.html",controller:"YourdashboardViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.yourdashboards.view.settings",{url:"/settings",templateUrl:"app/tools/yourdashboard/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("YourDashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards",{url:"/yourdashboards",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskListCtrl",["$scope","ZendeskAccount","gridOptions","xAlert","$translate",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"zendesk_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_REMOTE_ADDRESS"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",displayName:"APPLICATION_CHECK_CONNECTION",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.check({id:a}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.list",{url:"/list",templateUrl:"app/zendesk/list/list.html",controller:"ZendeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations",{url:"/configurations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationListCtrl",["$scope","$stateParams","$translate","gridOptions","ZendeskConfiguration","$uibModal","xAlert",function(a,b,c,d,e,f,g){a.initView=function(){var c={exporterCsvFilename:"zendesk_configurations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.AccountId}}/configurations/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(e,c,a,{accountId:b.id})},a.createItem=function(){var c=f.open({animation:!0,templateUrl:"app/zendesk/view/configuration/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});c.result.then(function(c){return e.save({accountId:b.id},c).$promise.then(function(){a.gridOptions.getPage()})["catch"](function(a){g.show(a.data.message,"danger")})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.list",{url:"/list",templateUrl:"app/zendesk/view/configuration/list/list.html",controller:"ZendeskViewConfigurationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationViewCtrl",["$scope","$stateParams","$filter","$translate","socket","ZendeskConfiguration","xAlert","variable","Variable","ZendeskAccount","Tag","ZendeskField",function(a,b,c,d,e,f,g,h,i,j,k,l){a.$on("$destroy",function(){e.unsyncUpdates("zendesk_field")}),a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:300,scrollInertia:0},a.fieldType=[{type:"string",title:"String"},{type:"variable",title:"Variable"},{type:"customVariable",title:"Custom Variable"}],a.descFieldType=[{type:"string",title:"String"},{type:"keyValue",title:"Key Value"}],a.initView=function(){a.configurationName="",a.subjectConfig=[],a.descriptionConfig=[],a.fieldConfig=[],a.selectedTags={tags:[]},a.variables=h},a.getConfiguration=function(){return f.get({accountId:b.id,id:b.configurationId}).$promise.then(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,a.selectedTags={tags:_.map(b.Tags,function(a){return a.id})},e.socket.on("zendesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})})["catch"](function(a){g.show(a.message,"danger")})},a.getCustomVariables=function(){return i.get().$promise.then(function(b){a.customVariables=b.rows})["catch"](function(a){g.show(a.message,"danger")})},a.getFields=function(){return j.fields({id:b.id}).$promise.then(function(b){a.accountFields=c("zendesk")(b)})["catch"](function(a){g.show(a.message,"danger")})},a.getTags=function(){return k.get().$promise.then(function(b){a.tags=b.rows})["catch"](function(a){g.show(a.message,"danger")})},a.addItem=function(c){switch(c){case"subject":case"description":var d={type:"string",content:""};break;case"field":var d={content:""}}return f.save({accountId:b.id,id:b.configurationId,controller:c},d).$promise.then(function(b){switch(c){case"subject":a.subjectConfig.push(b);break;case"description":a.descriptionConfig.push(b);break;case"field":a.fieldConfig.push(b)}})["catch"](function(a){g.show(a.data.message,"danger")})},a.changeType=function(b){"variable"===b.type?(b.content="",b.variableName=""):"string"===b.type?(b.VariableId=null,b.variableName=""):"customVariable"===b.type&&(b.VariableId=null,b.content=""),a.updateField(b)},a.updateField=function(a){return l.update({accountId:b.id,configurationId:b.configurationId,id:a.id},a).$promise.then(function(){})["catch"](function(){g.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.removeItem=function(a){return l["delete"]({accountId:b.id,configurationId:b.configurationId,id:a.id}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(){g.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.changeDescType=function(b){"keyValue"===b.type?(b.content="","string"===b.keyType?(b.VariableId=null,b.variableName=""):"variable"===b.keyType?(b.keyContent="",b.VariableId=null):"customVariable"===b.keyType&&(b.keyContent="",b.variableName="")):"string"===b.type&&(b.VariableId=null,b.variableName="",b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.variableName="",b.nameField="",b.VariableId=null,b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(c.system_field_options?(b.customField=!1,b.nameField=c.title.toLowerCase()):b.customField=!0)}a.updateField(b)},a.updateTags=function(){return f.update({accountId:b.id,id:b.configurationId,controller:"tags"},a.selectedTags.tags).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){g.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.system_field_options?c.system_field_options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.view",{url:"/view/:configurationId",templateUrl:"app/zendesk/view/configuration/view/view.html",controller:"ZendeskViewConfigurationViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewCtrl",["$scope","$stateParams","$translate","xAlert","Modal","ZendeskAccount",function(a,b,c,d,e,f){a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.account=b})["catch"](function(a){d.show(a.message,"danger")})},a.updateItem=function(){return f.update({id:b.id},a.account).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(){d.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view",{url:"/view/:id",templateUrl:"app/zendesk/view/view.html",controller:"ZendeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.zendesk.view.account",{url:"/account",templateUrl:"app/zendesk/view/view.account.html"})}]),angular.module("xCallyShuttleApp").controller("ZendeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler","ZendeskAccount",function(a,b,c,d,e,f,g){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.authType="password"},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/zendesk/list")})["catch"](function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.wizard",{url:"/wizard",templateUrl:"app/zendesk/wizard/wizard.html",controller:"ZendeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("ZendeskAccount",["$resource",function(a){return a("/api/zendesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"},fields:{params:{controller:"fields"},isArray:!0},check:{params:{controller:"check"}}})}]).factory("ZendeskConfiguration",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]).factory("ZendeskField",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:configurationId/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk",{url:"/zendesk",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").service("application",function(){var a={applications:[{name:"Queue",value:"Queue"},{name:"Playback",value:"Playback"},{name:"Dial",value:"Dial"},{name:"Cally-Square IVR",value:"AGI"},{name:"GoTo",value:"Goto"},{name:"Hangup",value:"Hangup"},{name:"Set",value:"Set"},{name:"Custom",value:"custom"},{name:"VoiceMail",value:"Voicemail"}],queueOptions:[{value:"C",name:"APPLICATION_QUEUE_OPTION_C"},{value:"c",name:"APPLICATION_QUEUE_OPTION_c"},{value:"d",name:"APPLICATION_QUEUE_OPTION_d"},{value:"F",name:"APPLICATION_QUEUE_OPTION_F"},{value:"h",name:"APPLICATION_QUEUE_OPTION_h"},{value:"H",name:"APPLICATION_QUEUE_OPTION_H"},{value:"n",name:"APPLICATION_QUEUE_OPTION_n"},{value:"i",name:"APPLICATION_QUEUE_OPTION_i"},{value:"I",name:"APPLICATION_QUEUE_OPTION_I"},{value:"r",name:"APPLICATION_QUEUE_OPTION_r"},{value:"R",name:"APPLICATION_QUEUE_OPTION_R"},{value:"t",name:"APPLICATION_QUEUE_OPTION_t"},{value:"T",name:"APPLICATION_QUEUE_OPTION_T"},{value:"w",name:"APPLICATION_QUEUE_OPTION_w"},{value:"W",name:"APPLICATION_QUEUE_OPTION_W"},{value:"k",name:"APPLICATION_QUEUE_OPTION_k"},{value:"K",name:"APPLICATION_QUEUE_OPTION_K"},{value:"x",name:"APPLICATION_QUEUE_OPTION_x"},{value:"X",name:"APPLICATION_QUEUE_OPTION_X"}],audioOptions:[{value:"skip",name:"APPLICATION_PLAYBACK_OPTION_SKIP"},{value:"noanswer",name:"APPLICATION_PLAYBACK_OPTION_NOANSWER"},{value:"j",name:"APPLICATION_PLAYBACK_OPTION_J"},{value:"say",name:"APPLICATION_PLAYBACK_OPTION_SAY"}],hangupCauses:[{value:"",name:"--"},{value:"1",name:"APPLICATION_HANGUP_CAUSE_1"},{value:"16",name:"APPLICATION_HANGUP_CAUSE_16"},{value:"17",name:"APPLICATION_HANGUP_CAUSE_17"},{value:"18",name:"APPLICATION_HANGUP_CAUSE_18"},{value:"21",name:"APPLICATION_HANGUP_CAUSE_21"},{value:"22",name:"APPLICATION_HANGUP_CAUSE_22"},{value:"27",name:"APPLICATION_HANGUP_CAUSE_27"},{value:"38",name:"APPLICATION_HANGUP_CAUSE_38"},{value:"41",name:"APPLICATION_HANGUP_CAUSE_41"}],intTypes:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"custom",name:"APPLICATION_CUSTOM"},{value:"list",name:"APPLICATION_FROM_LIST"}],checkUnderscore:function(a){return 0===a.indexOf("_")?a:"_"+a}};return{application:a}}),angular.module("xCallyShuttleApp").factory("Auth",["$location","$rootScope","$http","User","$cookieStore","$q",function(a,b,c,d,e,f){var g={};return e.get("token")&&(g=d.me()),{login:function(a,h){var i=h||angular.noop,j=f.defer();return c.post("/auth/local",{name:a.name,password:a.password,remember:a.remember}).success(function(a){return e.put("role",a.role),e.put("token",a.token),e.put("userId",a.userId),g=d.me({},function(){b.$broadcast("login")}),j.resolve(a),i()}).error(function(a){return this.logout(),j.reject(a),i(a)}.bind(this)),j.promise},loginWithToken:function(a,b,c){e.put("token",a),e.put("userId",b),e.put("name",c),g=d.me()},logout:function(){c.put("/api/users/"+g.id,{online:!1}).success(function(){e.remove("role"),e.remove("token"),e.remove("userId"),g={},b.$broadcast("logout")}).error(function(a){return a})},createUser:function(a,b){var c=b||angular.noop;return d.save(a,function(b){return e.put("token",b.token),g=d.me(),c(a)},function(a){return this.logout(),c(a)}.bind(this)).$promise},changePassword:function(a,b,c){var e=c||angular.noop;return d.changePassword({id:g.id},{oldPassword:a,newPassword:b},function(a){return e(null,a)},function(a){return e(a)}).$promise},getCurrentUser:function(){return g},isLoggedIn:function(){return g.hasOwnProperty("role")},isLoggedInAsync:function(a){g.hasOwnProperty("$promise")?g.$promise.then(function(){a(!0)})["catch"](function(){a(!1)}):a(g.hasOwnProperty("role")?!0:!1)},isAdmin:function(){return"admin"===(e.get("role")||g.role)||"user"===(e.get("role")||g.role)},getRole:function(){return g.role},getToken:function(){return e.get("token")},getUserId:function(){return console.log(e.get("userId")),e.get("userId")},getName:function(){return e.get("name")}}}]),angular.module("xCallyShuttleApp").service("automations",function(){var a={voice:{conditions:[],actions:[]},mail:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},chat:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},fax:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]}},b=["voice","mail","chat","fax"];return{services:a,channels:b}}),angular.module("xCallyShuttleApp").service("desk_com",function(){var a=[{id:"priority",label:"Priority",custom:!1,data:{choices:[1,2,3,4,5,6,7,8,9,10]}},{id:"status",label:"Status",custom:!1,data:{choices:["new","open","pending","resolved","closed"]}},{id:"type",label:"Type",custom:!1,data:{choices:["chat","twitter","email","qna","facebook","phone"]}}];return{fields:a}}),angular.module("xCallyShuttleApp").controller("FooterController",["$scope","$http",function(a,b){a.year=moment().year(),a.$on("$includeContentLoaded",function(){Layout.initFooter()}),a.initFooter=function(){b.get("/api/settings/info").success(function(b){a.info=b}).error(function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("HeaderController",["$scope","$rootScope","$location","$state","$http","$notification","Auth","xAlert","socket","ngAudio","settings","toastr","localStorageService","MailReport","ChatReport",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a.toggleQuickSidebar=function(){k.layout.pageQuickSidebarOpened=!k.layout.pageQuickSidebarOpened,k.layout.pageQuickSidebarOpened||m.remove("chatRoomId")},a.toogleSidebar=function(){k.layout.pageSidebarClosed=!k.layout.pageSidebarClosed,m.set("sidebarClosed",k.layout.pageSidebarClosed)},a.initHeader=function(){var c=j.load("api/xchatty/assets?resource=notification/xc_blubb.mp3"),d={};"agent"===g.getCurrentUser().role&&(i.socket.on("report_mail:save",function(a){c.play();var d=f("MAIL CHANNEL",{icon:"assets/images/media/channels/mail64.png",body:"NEW Incoming Mail Message!",delay:1e3*a.timeslot});d.$on("click",function(){return n.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){h.show("Mail properly assigned","success"),b.$broadcast("mailMessageEvent",{message:"Mail properly assigned.."})})["catch"](function(a){h.show(a.data.message,"danger")})})}),i.socket.on("report_chat:save",function(a){c.play(),d[a.uniqueid]&&(d[a.uniqueid].close(),delete d[a.uniqueid]),d[a.uniqueid]=f("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Chat Visitor!",delay:1e3*a.timeslot}),d[a.uniqueid].$on("click",function(){return o.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){h.show("Chat properly assigned","success"),b.$broadcast("mailMessageEvent",{message:"Chat properly assigned.."})})["catch"](function(a){h.show(a.data.message,"danger")})})}),i.socket.on("chat_message:save",function(a){c.play();var d=m.get("chatRoomId");if((!d||d!==a.ChatRoomId)&&a.UserId&&a.UserId!==g.getCurrentUser().id){var e=f(a.User.fullname,{icon:"assets/images/media/channels/chat64.png",body:a.body.length>35?a.body.substring(0,35)+"...":a.body,delay:1e4});e.$on("click",function(){b.$broadcast("chatMessageEvent",{chatRoomId:a.ChatRoomId})})}}),i.socket.on("user_has_chat_room:save",function(a){c.play(),b.$broadcast("chatGroupEvent",a)})),e({url:"/api/fax/user_has_queues",method:"GET",params:{UserId:g.getCurrentUser().id}}).success(function(b){a.faxQueues=_.map(b,"FaxQueueId"),a.faxQueues.forEach(function(a){i.socket.on("FAX:QUEUE:"+a,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})})}),i.socket.on("FAX:AGENT:"+g.getCurrentUser().id,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){b(g.getCurrentUser().id),l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})})}).error(function(a){console.error(a)}),i.socket.on("user_has_fax_queue:save",function(b){b=_.map(b,function(a){return a.UserId=parseInt(a.UserId,10),a}),b=_.find(b,{UserId:g.getCurrentUser().id}),b&&-1===_.indexOf(a.faxQueues,b.FaxQueueId)&&(a.faxQueues.push(b.FaxQueueId),i.socket.on("FAX:QUEUE:"+b.FaxQueueId,function(a,b){var c=f("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*a.timeout});c.$on("click",function(){e.put("/api/fax/rooms/"+a.roomId,{UserId:g.getCurrentUser().id}).success(function(){c.close(),b(g.getCurrentUser().id),l.success("Fax properly assigned","Success",{closeButton:!0,timeOut:5e3})}).error(function(){b(g.getCurrentUser().id),l.warning("Fax already assigned","Warning",{closeButton:!0,timeOut:5e3})})})}))}),i.socket.on("user_has_fax_queue:remove",function(b){_.indexOf(b.where.UserId,g.getCurrentUser().id.toString())>=0&&_.indexOf(a.faxQueues,b.where.FaxQueueId)>=0&&(a.faxQueues=_.remove(a.faxQueues,b.where.FaxQueueId),i.socket.removeAllListeners("FAX:QUEUE:"+b.where.FaxQueueId))})},a.logout=function(){e.get("/auth/local/logout").success(function(){g.logout(),c.path("/login")}).error(function(a){console.error(a)})},a.isActive=function(a){return a===c.path()}}]),angular.module("xCallyShuttleApp").service("interval",function(){var a={months:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"jan",name:"APPLICATION_JANUARY"},{value:"feb",name:"APPLICATION_FEBRUARY"},{value:"mar",name:"APPLICATION_MARCH"},{value:"apr",name:"APPLICATION_APRIL"},{value:"may",name:"APPLICATION_MAY"},{value:"jun",name:"APPLICATION_JUNE"},{value:"jul",name:"APPLICATION_JULY"},{value:"aug",name:"APPLICATION_AUGUST"},{value:"sep",name:"APPLICATION_SEPTEMBER"},{value:"oct",name:"APPLICATION_OCTOBER"},{value:"nov",name:"APPLICATION_NOVEMBER"},{value:"dec",name:"APPLICATION_DECEMBER"}],daysOfWeek:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"mon",name:"APPLICATION_MONDAY"},{value:"tue",name:"APPLICATION_TUESDAY"},{value:"wed",name:"APPLICATION_WEDNESDAY"
+},{value:"thu",name:"APPLICATION_THURSDAY"},{value:"fri",name:"APPLICATION_FRIDAY"},{value:"sat",name:"APPLICATION_SATURDAY"},{value:"sun",name:"APPLICATION_SUNDAY"}],daysOfMonth:["always",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]};return{interval:a}}),angular.module("xCallyShuttleApp").factory("Modal",["$rootScope","$uibModal",function(a,b){function c(c,d){console.log("openModal",d);var e=a.$new();return c=c||{},d=d||"modal-default",angular.extend(e,c),b.open({templateUrl:"components/modal/delete.html",windowClass:d,scope:e})}return{confirm:{"delete":function(a){return a=a||angular.noop,function(){console.log(Array.prototype.slice.call(arguments));var b,d=Array.prototype.slice.call(arguments),e=d.shift();b=c({modal:{dismissable:!0,title:"Confirm Delete",html:"<p>Are you sure you want to delete"+(e?"<strong> "+e+"</strong>":" selected items")+"?</p>",buttons:[{classes:"btn red",text:"Delete",click:function(a){b.close(a)}},{classes:"btn default",text:"Cancel",click:function(a){b.dismiss(a)}}]}},"over-topbar center"),b.result.then(function(b){a.apply(b,d)})}}}}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarControllerAddModal",["$scope","$uibModalInstance","Agent","items",function(a,b,c,d){a.items=d,a.agents=c.get(function(b){a.agents=b,a.items.forEach(function(b){_.remove(a.agents.rows,{id:b.id})})}),a.selected={items:[]},a.modal={title:"APPLICATION_AGENTS_SELECTION"},a.ok=function(){b.close(_.union(_.map(a.selected.items,"id"),_.map(a.items,"id")))},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarControllerCloseModal",["$scope","$uibModalInstance",function(a,b){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_CHAT"},a.ok=function(){b.close()},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("QuickSidebarController",["$scope","$rootScope","$window","$http","$uibModal","$log","$timeout","$interval","Auth","Agent","User","ChatRoom","ChatMessage","socket","settings","localStorageService","xAlert","$translate","QuickSidebarFactory",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){a.emojiMessage={},a.options=s.options,a.message={body:"",user:""};var t=a.currentUser=i.getCurrentUser(),u=function(b){switch(a.messagesTab=!0,o.layout.pageQuickSidebarOpened=!0,p.set("chatRoomId",b.id),p.set("messagesTab",a.messagesTab),a.chatRoom=b,b.type){case"internal":a.currentTab=0;break;case"external":a.currentTab=2,_.find(a.chatRooms,{id:b.id})||a.chatRooms.push(b)}b.Users.length>2&&(a.currentTab=3),g(function(){angular.element("page-quick-sidebar-chat-user-messages").mCustomScrollbar("scrollTo","last")},1500)},v=function(a){console.error(a)};a.$on("$includeContentLoaded",function(){p.get("chatRoomId")&&l.get({id:p.get("chatRoomId")},u,v),p.get("currentTab")&&(a.currentTab=p.get("currentTab"))}),a.agents=j.get({offset:0,limit:1e3},function(){n.syncUpdates("agent",a.agents.rows)}),a.users=k.get({offset:0,limit:1e3},function(){n.syncUpdates("user",a.users.rows)}),a.currentTab=0,a.messagesTab=!1,a.chatRooms=l.me(function(b){a.chatRooms=b},function(a){console.error(a)}),n.socket.on("report_chat:assignment",function(a){a.agentid&&l.get({id:a.chatroomid},u,v)}),n.socket.on("chat_room:save",function(b){if(a.chatRoom&&a.chatRoom.id===b.id){_.merge(a.chatRoom,b);var c=_.find(a.chatRooms,{id:b.id});c&&_.merge(c,b)}}),n.socket.on("chat_message:save",function(b){a.chatRoom&&a.chatRoom.id===b.ChatRoomId&&(a.chatRoom.ChatMessages.push(b),angular.element("page-quick-sidebar-chat-user-messages").mCustomScrollbar("scrollTo","last"))}),n.socket.on("user_has_chat_room:save",function(b){var c=_.findIndex(a.chatRooms,{id:b.id});c>=0?a.chatRooms[c]=b:a.chatRooms.push(b)}),b.$on("chatMessageEvent",function(a,b){l.get({id:b.chatRoomId},u,v)}),b.$on("chatGroupEvent",function(b,c){a.currentTab=3,a.messagesTab=!0,o.layout.pageQuickSidebarOpened=!0,a.chatRoom=c}),a.goToTab=function(b){a.currentTab=b,a.messagesTab=!1,a.chatRoom=null,p.set("currentTab",a.currentTab),p.set("messagesTab",a.messagesTab),p.remove("chatRoomId")},a.goToMessage=function(a,b){a?l.users({users:[t.id,a]},u,v):l.get({id:b},u,v)},a.sendMessage=function(){a.message.body.trim().length&&m.save({ChatRoomId:a.chatRoom.id,body:a.message.body},function(){a.message.body=""},function(a){console.error(a)})},a.goBack=function(){a.messagesTab=!1,a.chatRoom=null,p.set("messagesTab",a.messagesTab),p.remove("chatRoomId")},a.closeChatRoom=function(a,b){var c=e.open({animation:!0,size:b,templateUrl:"components/quickSidebar/modal/close.html",controller:"QuickSidebarControllerCloseModal"});c.result.then(function(){l.update({id:a,status:"CLOSED",completeReason:"agent"}).$promise.then(function(){q.show(r.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){q.show(a.data.message,"danger")})})},a.addAgent=function(b,c){var f=e.open({animation:!0,size:c,templateUrl:"components/quickSidebar/modal/add.html",controller:"QuickSidebarControllerAddModal",resolve:{items:function(){return _.map(a.chatRoom.Users?a.chatRoom.Users:[],function(a){return{id:a.id,fullname:a.fullname}})}}});f.result.then(function(a){d.put("/api/chat/rooms/"+b+"/users",{users:a}).then(function(){q.show(r.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){q.show(a.data.message,"danger")})})};var w=function(){var b=angular.element(c),d=function(){return{h:b.height(),w:b.width()}};a.$watch(d,function(b){a.style={height:b.h-46-46-46+"px"},a.style2={height:b.h-46-46-46-180+"px"}},!0),b.bind("resize",function(){a.$apply()})};w(),a.$on("$destroy",function(){n.unsyncUpdates("agent"),n.unsyncUpdates("user")})}]),angular.module("xCallyShuttleApp").directive("resizeQuickSidebar",["$window",function(a){return function(b){var c=angular.element(a);b.getWindowDimensions=function(){return{h:c.height(),w:c.width()}},b.$watch(b.getWindowDimensions,function(a){b.style={height:a.h-46-46-46+"px"}},!0),c.bind("resize",function(){b.$apply()})}}]),angular.module("xCallyShuttleApp").factory("QuickSidebarFactory",function(){return{options:{link:!0,linkTarget:"_blank",pdf:{embed:!1},image:{embed:!0},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,ytAuthKey:"_nkO9h1A7HlVyiUICO17oA"}}}}),angular.module("xCallyShuttleApp").filter("QuickSidebarFilterUsersGreaterThan",function(){return function(a,b){var c=[];return a.forEach(function(a){var d=0;a.ChatVisitor&&d++,d+=a.Users.length,d>b&&c.push(a)}),c}}).filter("QuickSidebarFilterUsersLowerThan",function(){return function(a,b){var c=[];return a.forEach(function(a){a.Users.length<b&&c.push(a)}),c}}),angular.module("xCallyShuttleApp").controller("SidebarController",["$scope","$rootScope","$resource","$location","Auth","$http","xAlert","$stateParams","socket",function(a,b,c,d,e,f,g,h,i){a.Auth=e,a.$stateParams=h,a.$on("$includeContentLoaded",function(){Metronic.init(),Layout.initSidebar()}),a.isAssociated=function(a){if(e.isAdmin())return!0;if(e.getCurrentUser().Modules)for(var b=0;b<e.getCurrentUser().Modules.length;b++)if(e.getCurrentUser().Modules[b].name===a)return!0;return!1},a.getSidebarDashboards=function(){f.get("/api/dashboards").then(function(b){a.dashboards=b.data.rows,i.syncUpdates("dashboard",a.dashboards)})["catch"](function(a){g.show("Error loading your dashboards","danger")})},a.getSidebarIntegrations=function(){f.get("/api/integrations").success(function(b){a.integrations=b.rows,i.syncUpdates("integration",a.integrations)}).error(function(a){g.show(a.message,"danger")})},a.isActive=function(a){return a===d.path()},a.$on("destroy",function(){i.unsyncUpdates("dashboard"),i.unsyncUpdates("integration")})}]),angular.module("xCallyShuttleApp").factory("socket",["$rootScope","$window","socketFactory","Auth",function(a,b,c,d){var e=d.getCurrentUser(),f=io("",{query:"token="+d.getToken()+"&userId="+(e.id||d.getUserId())+"&name="+(e.name||d.getName())+"&role="+(e.role||"agent")+"&source=browser",path:"/socket.io-client"}),g=c({ioSocket:f});return a.$on("logout",function(){g&&(g.disconnect(!0),b.location.reload())}),{socket:g,syncUpdates:function(a,b,c){c=c||angular.noop,g.on(a+":save",function(a){var d=_.find(b,{id:a.id}),e=b.indexOf(d),f="created";d?(_.merge(b[e],a),f="updated"):b.unshift(a),c(f,a,b)}),g.on(a+":remove",function(a){var d="deleted";_.remove(b,{id:a.id}),c(d,a,b)})},unsyncUpdates:function(a){g.removeAllListeners(a+":save"),g.removeAllListeners(a+":remove")},syncUpdatesByAttributes:function(a,b,c,d){d=d||angular.noop,g.on(a+":save",function(a){var e=!0;if(_.forIn(b,function(b,c){return a[c]&&a[c]===b?!0:e=!1}),e){var f=_.find(c,{id:a.id}),g=c.indexOf(f),h="created";f?(_.merge(c[g],a),h="updated"):c.unshift(a),d(h,a,c)}}),g.on(a+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},syncMailMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncMailMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")},syncFaxMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncFaxMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")}}}]),angular.module("xCallyShuttleApp").service("triggers",["VoiceQueue",function(a){var b={voice:{conditions:[{name:"APPLICATION_QUEUE",value:"queue",type:"select",resource:a,resValue:"name",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_CALL_STATUS",value:"lastevent",type:"select",arr:[{name:"called",value:"called"},{name:"connect",value:"connect"},{name:"complete",value:"complete"},{name:"rejected",value:"rejected"},{name:"abandoned",value:"abandoned"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]}],actions:[{name:"APPLICATION_CONTACT_MANAGER",value:"contactManager"},{name:"APPLICATION_INTEGRATIONS",value:"integration",propertyField:"select"}]},mail:{conditions:[{name:"APPLICATION_FROM",value:"from",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_CC",value:"cc",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_SUBJECT",value:"subject",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]}],actions:[{name:"APPLICATION_TEMPLATE",value:"template"},{name:"APPLICATION_CONTACT_MANAGER",value:"contactManager"}]},chat:{conditions:[],actions:[]},fax:{conditions:[],actions:[]}},c=["voice","mail","chat","fax"];return{services:b,channels:c}}]),angular.module("xCallyShuttleApp").service("variable",function(){var a=[{title:"Unique ID",name:"uniqueid",group:"voice_queue"},{title:"Caller Number",name:"calleridnum",group:"voice_queue"},{title:"Caller Name",name:"calleridname",group:"voice_queue"},{title:"Queue",name:"queue",group:"voice_queue"},{title:"Called Number",name:"destcalleridnum",group:"voice_queue"},{title:"Called Name",name:"destcalleridname",group:"voice_queue"},{title:"Hold Time",name:"holdtime",group:"voice_queue"},{title:"Talk Time",name:"talktime",group:"voice_queue"},{title:"Connected Time",name:"agentconnectAt",group:"voice_queue"},{title:"Called Time",name:"agentcalledAt",group:"voice_queue"},{title:"DNID",name:"destexten",group:"voice_queue"},{title:"Complete Time",name:"agentcompleteAt",group:"voice_queue"},{title:"No Answer Time",name:"agentringnoanswerAt",group:"voice_queue"}];return a}),function(a,b){angular.module("adf.widget.counter",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("counter",{title:"Single Value",description:"Single Value for db results",templateUrl:"{widgetsPath}/counter/src/view.html",controller:"apiwidgetCounterViewCtrl",edit:{templateUrl:"{widgetsPath}/counter/src/edit.html",controller:"apiwidgetCounterEditCtrl"}})}]).service("apiServiceCounter",["Widget",function(a){return{get:function(b){return a.get({select:b.select,condition:encodeURIComponent(b.condition),table:b.report,controller:"counter"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiwidgetCounterEditCtrl",["$scope",function(a){a.config.reportTables=[{name:"Agents",value:"report_agent"},{name:"Calls",value:"report_call"},{name:"Dials",value:"report_dial"},{name:"Queues",value:"report_queue"},{name:"Users",value:"users"},{name:"Chat Sessions",value:"report_chat_session"},{name:"Mail Sessions",value:"report_mail_session"}],a.config.colors=[{name:"Blue",value:"blue-madison"},{name:"Red",value:"red-intense"},{name:"Green",value:"green-haze"},{name:"Purple",value:"purple-plum"},{name:"Orange",value:"yellow-casablanca"},{name:"Yellow",value:"yellow-crusta"}],a.config.icons=[{name:"Talk bubbles",value:"fa-comments"},{name:"Bar Chart",value:"fa-bar-chart"},{name:"Shopping Cart",value:"fa-shopping-cart"},{name:"Globe",value:"fa-globe"}],a.config.select=a.config.select?a.config.select:"COUNT(*)",a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE"}]).controller("apiwidgetCounterViewCtrl",["$scope","$interval","apiServiceCounter",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.condition=a.config.condition?a.config.condition:null,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE",a.counterApiCall=function(){a.config.report&&c.get(a.config).then(function(b){b?b.result&&b.result.length>1||_.keys(b.result[0]).length>1?(a.tooManyResults=!0,a.result=null):(a.tooManyResults=!1,null!==_.values(b.result[0])[0]?a.result=_.values(b.result[0])[0].toString():a.result="--"):a.result=null})},a.counterApiCall();var d=b(function(){a.counterApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.counter").run(["$templateCache",function(a){a.put("{widgetsPath}/counter/src/edit.html","<form role=form><div class=form-group><label for=select>Select</label> <input type=text class=form-control id=condition ng-model=config.select placeholder=Select></div><div class=form-group><label class=control-label>From</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder=From>{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"report.value as report in config.reportTables | filter: $select.search\"><div ng-bind-html=\"report.name | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label for=condition>Where</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder=Where></div><div class=form-group><label for=condition>{{'APPLICATION_REFRESH_TIMEOUT' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder=\"{{'APPLICATION_REFRESH_TIMEOUT' | translate}}\" min=1></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_COLOR' | translate}}</label><ui-select data-ng-model=config.color name=color theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_COLOR' | translate }}\">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"color.value as color in config.colors | filter: $select.search\"><div ng-bind-html=\"color.name | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_ICON' | translate}}</label><ui-select data-ng-model=config.icon name=icon theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_ICON' | translate }}\">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat=\"icon.value as icon in config.icons | filter: $select.search\"><div ng-bind-html=\"icon.name | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_DETAILS' | translate}}</label> <input type=text class=form-control id=details ng-model=config.details maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_DETAILS' | translate}}\"></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK' | translate}}</label> <input type=text class=form-control id=link ng-model=config.link placeholder=http://yourlink></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}</label> <input type=text class=form-control id=linkText ng-model=config.linkText maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}\"></div></form>"),a.put("{widgetsPath}/counter/src/view.html",'<div class=dashboard-stat ng-class=config.color ng-if=result><div class=visual><i class=fa ng-class=config.icon></i></div><div class=details><div class=number>{{result}}</div><div class=desc>{{config.details}}</div></div><a class=more href={{config.link}}>{{config.linkText}} <i class="m-icon-swapright m-icon-white"></i></a></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=tooManyResults><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_TOO_MANY_RESULTS\' | translate}}</div><div class="alert alert-danger" role=alert ng-if="!result && !tooManyResults"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_QUERY_NOT_VALID\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.pie-chart",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("pie-chart",{title:"Pie-Chart",description:"Display a pie-chart starting from DB values",templateUrl:"{widgetsPath}/pie-chart/src/view.html",controller:"apiWidgetPieChartViewCtrl",edit:{templateUrl:"{widgetsPath}/pie-chart/src/edit.html",controller:"apiWidgetPieChartEditCtrl"}})}]).service("apiServicePieChart",["Widget",function(a){return{get:function(b){return a.get({condition:encodeURIComponent(b.condition),table:b.report,fields:b.fields,controller:"piechart"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiWidgetPieChartEditCtrl",["$scope",function(a){function b(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=[{name:"Agents",value:"report_agent"},{name:"Calls",value:"report_call"},{name:"Dials",value:"report_dial"},{name:"Queues",value:"report_queue"},{name:"Users",value:"users"},{name:"Chat Sessions",value:"report_chat_session"},{name:"Mail Sessions",value:"report_mail_session"}],a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetPieChartViewCtrl",["$scope","$interval","apiServicePieChart",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.pieChartApiCall=function(){a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){if(b&&b.result&&1===b.result.length){a.labels=[],a.data=[];for(var c in b.result[0])a.labels.push(c),a.data.push(b.result[0][c])}else a.labels=[],a.data=[]})},a.pieChartApiCall();var d=b(function(){a.pieChartApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.pie-chart").run(["$templateCache",function(a){a.put("{widgetsPath}/pie-chart/src/edit.html",'<form role=form><div class=form-group><label class=control-label>{{\'APPLICATION_REPORT\' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="report.value as report in config.reportTables | filter: $select.search"><div ng-bind-html="report.name | highlight: $select.search"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{\'APPLICATION_FIELDS\' | translate}}</label></div><div class=padding-bottom ng-repeat="field in config.fields"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if="config.fields.length>1"><button class="btn btn-danger" type=button data-ng-click=removeField($index)><i class="fa fa-times"></i> {{\'APPLICATION_REMOVE\' | translate}}</button></span></div></div></div><button type=button class="btn btn-sm green mbottom20" ng-click=addField()><i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}</button><div class=form-group><label for=condition>{{\'APPLICATION_CONDITION\' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder="{{\'APPLICATION_CONDITION\' | translate}}"></div><div class=form-group><label for=condition>{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder="{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}" min=1></div></form>'),a.put("{widgetsPath}/pie-chart/src/view.html",'<div ng-if=labels.length ng-style=config.style><canvas id=doughnut class="chart chart-doughnut" chart-data=data chart-labels=labels legend=true></canvas></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_METRIC_AND_CHECK_OTHER\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.table",["adf.provider"]).value("apiServiceUrlTable","/api/widgets/table").config(["dashboardProvider",function(a){a.widget("table",{title:"Table",description:"Show tabbed results from db",templateUrl:"{widgetsPath}/table/src/view.html",controller:"apiWidgetTableViewCtrl",edit:{templateUrl:"{widgetsPath}/table/src/edit.html",controller:"apiWidgetTableEditCtrl"}})}]).service("apiServiceTable",["$q","$http","apiServiceUrlTable",function(a,b,c){return{get:function(d){var e=a.defer();return b.get(c,{params:{condition:encodeURIComponent(d.condition),table:d.report,fields:d.fields}}).success(function(a){a?e.resolve(a):e.reject()}).error(function(a){console.log(a),e.reject()}),e.promise}}}]).controller("apiWidgetTableEditCtrl",["$scope",function(a){function b(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=[{name:"Agents",value:"agent"},{name:"Calls",value:"call"},{name:"Dials",value:"dial"},{name:"Members",value:"member"},{name:"Queues",value:"queue"}],a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetTableViewCtrl",["$scope","$interval","apiServiceTable",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.style={"max-height":a.config.height+"px",overflow:"scroll"},a.tableApiCall=function(){a.config.condition&&a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){a.results=b})},a.tableApiCall();var d=b(function(){a.tableApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.table").run(["$templateCache",function(a){a.put("{widgetsPath}/table/src/edit.html",'<form role=form><div class=form-group><label class=control-label>{{\'APPLICATION_REPORT\' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="report.value as report in config.reportTables | filter: $select.search"><div ng-bind-html="report.name | highlight: $select.search"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{\'APPLICATION_METRICS\' | translate}}</label></div><div class=padding-bottom ng-repeat="field in config.fields"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if="config.fields.length>1"><button class="btn btn-danger" type=button data-ng-click=removeField($index)><i class="fa fa-times"></i> {{\'APPLICATION_REMOVE\' | translate}}</button></span></div></div></div><button type=button class="btn btn-sm green mbottom20" ng-click=addField()><i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}</button><div class=form-group><label for=condition>{{\'APPLICATION_CONDITION\' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder="{{\'APPLICATION_CONDITION\' | translate}}"></div><div class=form-group><label for=condition>{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder="{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}" min=1></div><div class=form-group><label for=condition>{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}</label> <input type=number class=form-control id=height ng-model=config.height placeholder="{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}" min=350></div></form>'),a.put("{widgetsPath}/table/src/view.html",'<div ng-if=results ng-style=config.style><table st-table=results class="table table-striped table-bordered table-hover"><div class=table-responsive><thead><tr><th colspan={{config.fields.length}}><div class=row><div class=col-md-6></div><div class=col-md-6><div class="input-group input-medium pull-right"><input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class=form-control type=search> <span class=input-group-addon><i class="fa fa-search"></i></span></div></div></div></th></tr><tr><th ng-repeat="field in config.fields">{{field.alias}}</th></tr></thead><tbody><tr data-ng-repeat="result in results" class=animate-repeat><td ng-repeat="field in config.fields">{{result[field.alias]}}</td></tr><tr data-ng-hide=results.length><td colspan={{config.fields.length}} style=text-align:center;><i>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</i></td></tr></tbody><tfoot><tr><td colspan={{config.fields.length}} class=text-center><div st-pagination class=pagination st-items-by-page=10 st-displayed-pages=3></div></td></tr></tfoot></div></table></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_FIELD_AND_CHECK_OTHER\' | translate}}</div>')}])}(window),function(){angular.module("pdf",[]).directive("ngPdf",["$window",function(a){return{restrict:"E",templateUrl:function(a,b){return b.templateUrl?b.templateUrl:"partials/viewer.html"},link:function(b,c,d){var e=d.pdfUrl,f=null,g=d.page?d.page:1,h=d.scale>0?d.scale:1,i=c.find("canvas"),j=i[0],k=j.getContext("2d"),l=angular.element(a);l.on("scroll",function(){b.$apply(function(){b.scroll=l[0].scrollY})}),PDFJS.disableWorker=!0,b.pageNum=g,b.renderPage=function(a){f.getPage(a).then(function(a){var e,f,g,i={};"page-fit"!==d.scale||h?e=a.getViewport(h):(e=a.getViewport(1),f=c[0].clientWidth/e.width,g=c[0].clientHeight/e.height,h=Math.min(f,g)),j.height=e.height,j.width=e.width,i={canvasContext:k,viewport:e},a.render(i).promise.then(function(){"function"==typeof b.onPageRender&&b.onPageRender()})})},b.goPrevious=function(){b.pageToDisplay<=1||(b.pageNum=parseInt(b.pageNum)-1)},b.goNext=function(){b.pageToDisplay>=f.numPages||(b.pageNum=parseInt(b.pageNum)+1)},b.zoomIn=function(){return h=parseFloat(h)+.2,b.renderPage(b.pageToDisplay),h},b.zoomOut=function(){return h=parseFloat(h)-.2,b.renderPage(b.pageToDisplay),h},b.changePage=function(){b.renderPage(b.pageToDisplay)},b.rotate=function(){"rotate0"===j.getAttribute("class")?j.setAttribute("class","rotate90"):"rotate90"===j.getAttribute("class")?j.setAttribute("class","rotate180"):"rotate180"===j.getAttribute("class")?j.setAttribute("class","rotate270"):j.setAttribute("class","rotate0")},PDFJS.getDocument(e,null,null,b.onProgress).then(function(a){"function"==typeof b.onLoad&&b.onLoad(),f=a,b.renderPage(b.pageToDisplay),b.$apply(function(){b.pageCount=a.numPages})},function(a){a&&"function"==typeof b.onError&&b.onError(a)}),b.$watch("pageNum",function(a){b.pageToDisplay=parseInt(a),null!==f&&b.renderPage(b.pageToDisplay)})}}}])}();var Metronic=function(){var a,b=!1,c=!1,d=!1,e=!1,f=[],g="assets/",h="img/",i="plugins/",j="css/",k={blue:"#89C4F4",red:"#F3565D",green:"#1bbc9b",purple:"#9b59b6",grey:"#95a5a6",yellow:"#F8CB00"},l=function(){"rtl"===$("body").css("direction")&&(b=!0),c=!!navigator.userAgent.match(/MSIE 8.0/),d=!!navigator.userAgent.match(/MSIE 9.0/),e=!!navigator.userAgent.match(/MSIE 10.0/),e&&$("html").addClass("ie10"),(e||d||c)&&$("html").addClass("ie")},m=function(){for(var a=0;a<f.length;a++){var b=f[a];b.call()}},n=function(){var a;if(c){var b;$(window).resize(function(){b!=document.documentElement.clientHeight&&(a&&clearTimeout(a),a=setTimeout(function(){m()},50),b=document.documentElement.clientHeight)})}else $(window).resize(function(){a&&clearTimeout(a),a=setTimeout(function(){m()},50)})},o=function(){$("body").on("click",".portlet > .portlet-title > .tools > a.remove",function(a){
+a.preventDefault();var b=$(this).closest(".portlet");$("body").hasClass("page-portlet-fullscreen")&&$("body").removeClass("page-portlet-fullscreen"),b.find(".portlet-title .fullscreen").tooltip("destroy"),b.find(".portlet-title > .tools > .reload").tooltip("destroy"),b.find(".portlet-title > .tools > .remove").tooltip("destroy"),b.find(".portlet-title > .tools > .config").tooltip("destroy"),b.find(".portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip("destroy"),b.remove()}),$("body").on("click",".portlet > .portlet-title .fullscreen",function(a){a.preventDefault();var b=$(this).closest(".portlet");if(b.hasClass("portlet-fullscreen"))$(this).removeClass("on"),b.removeClass("portlet-fullscreen"),$("body").removeClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height","auto");else{var c=Metronic.getViewPort().height-b.children(".portlet-title").outerHeight()-parseInt(b.children(".portlet-body").css("padding-top"))-parseInt(b.children(".portlet-body").css("padding-bottom"));$(this).addClass("on"),b.addClass("portlet-fullscreen"),$("body").addClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height",c)}}),$("body").on("click",".portlet > .portlet-title > .tools > a.reload",function(a){a.preventDefault();var b=$(this).closest(".portlet").children(".portlet-body"),c=$(this).attr("data-url"),d=$(this).attr("data-error-display");c?(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),$.ajax({type:"GET",cache:!1,url:c,dataType:"html",success:function(a){Metronic.unblockUI(b),b.html(a)},error:function(a,c,e){Metronic.unblockUI(b);var f="Error on reloading the content. Please check your connection and try again.";"toastr"==d&&toastr?toastr.error(f):"notific8"==d&&$.notific8?($.notific8("zindex",11500),$.notific8(f,{theme:"ruby",life:3e3})):alert(f)}})):(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),window.setTimeout(function(){Metronic.unblockUI(b)},1e3))}),$('.portlet .portlet-title a.reload[data-load="true"]').click(),$("body").on("click",".portlet > .portlet-title > .tools > .collapse, .portlet .portlet-title > .tools > .expand",function(a){a.preventDefault()})},p=function(){if($().uniform){var a=$("input[type=checkbox]:not(.toggle, .make-switch, .icheck), input[type=radio]:not(.toggle, .star, .make-switch, .icheck)");a.size()>0&&a.each(function(){0===$(this).parents(".checker").size()&&$(this).show()})}},q=function(){$().iCheck&&$(".icheck").each(function(){var a=$(this).attr("data-checkbox")?$(this).attr("data-checkbox"):"icheckbox_minimal-grey",b=$(this).attr("data-radio")?$(this).attr("data-radio"):"iradio_minimal-grey";a.indexOf("_line")>-1||b.indexOf("_line")>-1?$(this).iCheck({checkboxClass:a,radioClass:b,insert:'<div class="icheck_line-icon"></div>'+$(this).attr("data-label")}):$(this).iCheck({checkboxClass:a,radioClass:b})})},r=function(){$().bootstrapSwitch&&$(".make-switch").bootstrapSwitch()},s=function(){$().confirmation&&$("[data-toggle=confirmation]").confirmation({container:"body",btnOkClass:"btn-xs btn-success",btnCancelClass:"btn-xs btn-danger"})},t=function(){$("body").on("shown.bs.collapse",".accordion.scrollable",function(a){Metronic.scrollTo($(a.target))})},u=function(){if(location.hash){var a=location.hash.substr(1);$('a[href="#'+a+'"]').parents(".tab-pane:hidden").each(function(){var a=$(this).attr("id");$('a[href="#'+a+'"]').click()}),$('a[href="#'+a+'"]').click()}},v=function(){$("body").on("hide.bs.modal",function(){$(".modal:visible").size()>1&&$("html").hasClass("modal-open")===!1?$("html").addClass("modal-open"):$(".modal:visible").size()<=1&&$("html").removeClass("modal-open")}),$("body").on("show.bs.modal",".modal",function(){$(this).hasClass("modal-scroll")&&$("body").addClass("modal-open-noscroll")}),$("body").on("hide.bs.modal",".modal",function(){$("body").removeClass("modal-open-noscroll")}),$("body").on("hidden.bs.modal",".modal:not(.modal-cached)",function(){$(this).removeData("bs.modal")})},w=function(){$(".tooltips").tooltip(),$(".portlet > .portlet-title .fullscreen").tooltip({container:"body",title:"Fullscreen"}),$(".portlet > .portlet-title > .tools > .reload").tooltip({container:"body",title:"Reload"}),$(".portlet > .portlet-title > .tools > .remove").tooltip({container:"body",title:"Remove"}),$(".portlet > .portlet-title > .tools > .config").tooltip({container:"body",title:"Settings"}),$(".portlet > .portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip({container:"body",title:"Collapse/Expand"})},x=function(){$("body").on("click",".dropdown-menu.hold-on-click",function(a){a.stopPropagation()})},y=function(){$("body").on("click",'[data-close="alert"]',function(a){$(this).parent(".alert").hide(),$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-close="note"]',function(a){$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-remove="note"]',function(a){$(this).closest(".note").remove(),a.preventDefault()})},z=function(){$('[data-hover="dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")})},A=function(){$(".popovers").popover(),$(document).on("click.bs.popover.data-api",function(b){a&&a.popover("hide")})},B=function(){Metronic.initSlimScroll(".scroller")},C=function(){jQuery.fancybox&&$(".fancybox-button").size()>0&&$(".fancybox-button").fancybox({groupAttr:"data-rel",prevEffect:"none",nextEffect:"none",closeBtn:!0,helpers:{title:{type:"inside"}}})},D=function(){(c||d)&&$("input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)").each(function(){var a=$(this);""===a.val()&&""!==a.attr("placeholder")&&a.addClass("placeholder").val(a.attr("placeholder")),a.focus(function(){a.val()==a.attr("placeholder")&&a.val("")}),a.blur(function(){(""===a.val()||a.val()==a.attr("placeholder"))&&a.val(a.attr("placeholder"))})})},E=function(){$().select2&&$(".select2me").select2({placeholder:"Select"})};return{init:function(){l(),n(),p(),q(),r(),B(),C(),E(),o(),y(),x(),u(),w(),A(),t(),v(),s(),D()},initAjax:function(){p(),q(),r(),z(),B(),E(),C(),x(),w(),A(),t(),s()},initComponents:function(){this.initAjax()},setLastPopedPopover:function(b){a=b},addResizeHandler:function(a){f.push(a)},runResizeHandlers:function(){m()},scrollTo:function(a,b){var c=a&&a.size()>0?a.offset().top:0;a&&($("body").hasClass("page-header-fixed")&&(c-=$(".page-header").height()),c+=b?b:-1*a.height()),$("html,body").animate({scrollTop:c},"slow")},initSlimScroll:function(a){$(a).each(function(){if(!$(this).attr("data-initialized")){var a;a=$(this).attr("data-height")?$(this).attr("data-height"):$(this).css("height"),$(this).slimScroll({allowPageScroll:!0,size:"7px",color:$(this).attr("data-handle-color")?$(this).attr("data-handle-color"):"#bbb",wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",railColor:$(this).attr("data-rail-color")?$(this).attr("data-rail-color"):"#eaeaea",position:b?"left":"right",height:a,alwaysVisible:"1"==$(this).attr("data-always-visible")?!0:!1,railVisible:"1"==$(this).attr("data-rail-visible")?!0:!1,disableFadeOut:!0}),$(this).attr("data-initialized","1")}})},destroySlimScroll:function(a){$(a).each(function(){if("1"===$(this).attr("data-initialized")){$(this).removeAttr("data-initialized"),$(this).removeAttr("style");var a={};$(this).attr("data-handle-color")&&(a["data-handle-color"]=$(this).attr("data-handle-color")),$(this).attr("data-wrapper-class")&&(a["data-wrapper-class"]=$(this).attr("data-wrapper-class")),$(this).attr("data-rail-color")&&(a["data-rail-color"]=$(this).attr("data-rail-color")),$(this).attr("data-always-visible")&&(a["data-always-visible"]=$(this).attr("data-always-visible")),$(this).attr("data-rail-visible")&&(a["data-rail-visible"]=$(this).attr("data-rail-visible")),$(this).slimScroll({wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",destroy:!0});var b=$(this);$.each(a,function(a,c){b.attr(a,c)})}})},scrollTop:function(){Metronic.scrollTo()},blockUI:function(a){a=$.extend(!0,{},a);var b="";if(b=a.animate?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><div class="block-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div>':a.iconOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""></div>':a.textOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>":'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>",a.target){var c=$(a.target);c.height()<=$(window).height()&&(a.cenrerY=!0),c.block({message:b,baseZ:a.zIndex?a.zIndex:1e3,centerY:void 0!==a.cenrerY?a.cenrerY:!1,css:{top:"10%",border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})}else $.blockUI({message:b,baseZ:a.zIndex?a.zIndex:1e3,css:{border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})},unblockUI:function(a){a?$(a).unblock({onUnblock:function(){$(a).css("position",""),$(a).css("zoom","")}}):$.unblockUI()},startPageLoading:function(a){a&&a.animate?($(".page-spinner-bar").remove(),$("body").append('<div class="page-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>')):($(".page-loading").remove(),$("body").append('<div class="page-loading"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif"/>&nbsp;&nbsp;<span>'+(a&&a.message?a.message:"Loading...")+"</span></div>"))},stopPageLoading:function(){$(".page-loading, .page-spinner-bar").remove()},alert:function(a){a=$.extend(!0,{container:"",place:"append",type:"success",message:"",close:!0,reset:!0,focus:!0,closeInSeconds:0,icon:""},a);var b=Metronic.getUniqueID("Metronic_alert"),c='<div id="'+b+'" class="Metronic-alerts alert alert-'+a.type+' fade in">'+(a.close?'<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>':"")+(""!==a.icon?'<i class="fa-lg fa fa-'+a.icon+'"></i>  ':"")+a.message+"</div>";return a.reset&&$(".Metronic-alerts").remove(),a.container?"append"==a.place?$(a.container).append(c):$(a.container).prepend(c):$("body").hasClass("page-container-bg-solid")?$(".page-title").after(c):$(".page-bar").size()>0?$(".page-bar").after(c):$(".page-breadcrumb").after(c),a.focus&&Metronic.scrollTo($("#"+b)),a.closeInSeconds>0&&setTimeout(function(){$("#"+b).remove()},1e3*a.closeInSeconds),b},initUniform:function(a){a?$(a).each(function(){0===$(this).parents(".checker").size()&&($(this).show(),$(this).uniform())}):p()},updateUniform:function(a){$.uniform.update(a)},initFancybox:function(){C()},getActualVal:function(a){return a=$(a),a.val()===a.attr("placeholder")?"":a.val()},getURLParameter:function(a){var b,c,d=window.location.search.substring(1),e=d.split("&");for(b=0;b<e.length;b++)if(c=e[b].split("="),c[0]==a)return unescape(c[1]);return null},isTouchDevice:function(){try{return document.createEvent("TouchEvent"),!0}catch(a){return!1}},getViewPort:function(){var a=window,b="inner";return"innerWidth"in window||(b="client",a=document.documentElement||document.body),{width:a[b+"Width"],height:a[b+"Height"]}},getUniqueID:function(a){return"prefix_"+Math.floor(Math.random()*(new Date).getTime())},isIE8:function(){return c},isIE9:function(){return d},isRTL:function(){return b},isAngularJsApp:function(){return"undefined"==typeof angular?!1:!0},getAssetsPath:function(){return g},setAssetsPath:function(a){g=a},setGlobalImgPath:function(a){h=a},getGlobalImgPath:function(){return g+h},setGlobalPluginsPath:function(a){i=a},getGlobalPluginsPath:function(){return g+i},getGlobalCssPath:function(){return g+j},getBrandColor:function(a){return k[a]?k[a]:""},getResponsiveBreakpoint:function(a){var b={xs:480,sm:768,md:900,lg:1200};return b[a]?b[a]:0}}}(),Layout=function(){var a="img/",b="css/",c=Metronic.getResponsiveBreakpoint("md"),d=function(){var a,b=$(".page-content"),d=$(".page-sidebar"),e=$("body");if(e.hasClass("page-footer-fixed")===!0&&e.hasClass("page-sidebar-fixed")===!1){var f=Metronic.getViewPort().height-$(".page-footer").outerHeight()-$(".page-header").outerHeight();b.height()<f&&b.attr("style","min-height:"+f+"px")}else{if(e.hasClass("page-sidebar-fixed"))a=g(),e.hasClass("page-footer-fixed")===!1&&(a-=$(".page-footer").outerHeight());else{var h=$(".page-header").outerHeight(),i=$(".page-footer").outerHeight();a=Metronic.getViewPort().width<c?Metronic.getViewPort().height-h-i:d.height()+20,a+h+i<=Metronic.getViewPort().height&&(a=Metronic.getViewPort().height-h-i)}b.attr("style","min-height:"+a+"px")}},e=function(a,b){var d=location.hash.toLowerCase(),e=$(".page-sidebar-menu");if("click"===a||"set"===a?b=$(b):"match"===a&&e.find("li > a").each(function(){var a=$(this).attr("href").toLowerCase();return a.length>1&&d.substr(1,a.length-1)==a.substr(1)?void(b=$(this)):void 0}),b&&0!=b.size()&&"javascript:;"!==b.attr("href").toLowerCase()&&"#"!==b.attr("href").toLowerCase()){parseInt(e.data("slide-speed")),e.data("keep-expanded");e.find("li.active").removeClass("active"),e.find("li > a > .selected").remove(),e.hasClass("page-sidebar-menu-hover-submenu")===!1?e.find("li.open").each(function(){0===$(this).children(".sub-menu").size()&&($(this).removeClass("open"),$(this).find("> a > .arrow.open").removeClass("open"))}):e.find("li.open").removeClass("open"),b.parents("li").each(function(){$(this).addClass("active"),$(this).find("> a > span.arrow").addClass("open"),1===$(this).parent("ul.page-sidebar-menu").size()&&$(this).find("> a").append('<span class="selected"></span>'),1===$(this).children("ul.sub-menu").size()&&$(this).addClass("open")}),"click"===a&&Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click()}},f=function(){jQuery(".page-sidebar").on("click","li > a",function(a){var b=$(this).next().hasClass("sub-menu");if(!(Metronic.getViewPort().width>=c&&1===$(this).parents(".page-sidebar-menu-hover-submenu").size())){if(b===!1)return void(Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click());if(!$(this).next().hasClass("sub-menu always-open")){var e=$(this).parent().parent(),f=$(this),g=$(".page-sidebar-menu"),h=jQuery(this).next(),i=g.data("auto-scroll"),j=parseInt(g.data("slide-speed")),k=g.data("keep-expanded");k!==!0&&(e.children("li.open").children("a").children(".arrow").removeClass("open"),e.children("li.open").children(".sub-menu:not(.always-open)").slideUp(j),e.children("li.open").removeClass("open"));var l=-200;h.is(":visible")?(jQuery(".arrow",jQuery(this)).removeClass("open"),jQuery(this).parent().removeClass("open"),h.slideUp(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})):b&&(jQuery(".arrow",jQuery(this)).addClass("open"),jQuery(this).parent().addClass("open"),h.slideDown(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})),a.preventDefault()}}}),jQuery(".page-sidebar").on("click"," li > a.ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=jQuery(".page-sidebar ul"),e=($(".page-content"),$(".page-content .page-content-body"));d.children("li.active").removeClass("active"),d.children("arrow.open").removeClass("open"),$(this).parents("li").each(function(){$(this).addClass("active"),$(this).children("a > span.arrow").addClass("open")}),$(this).parents("li").addClass("active"),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),Metronic.startPageLoading();var f=$(this);$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){0===f.parents("li.open").size()&&$(".page-sidebar-menu > li.open > a").click(),Metronic.stopPageLoading(),e.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){Metronic.stopPageLoading(),e.html("<h4>Could not load the requested content.</h4>")}})}),jQuery(".page-content").on("click",".ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=($(".page-content"),$(".page-content .page-content-body"));Metronic.startPageLoading(),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){Metronic.stopPageLoading(),d.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){d.html("<h4>Could not load the requested content.</h4>"),Metronic.stopPageLoading()}})}),i(),$(".page-sidebar").on("click",".sidebar-search .remove",function(a){a.preventDefault(),$(".sidebar-search").removeClass("open")}),$(".page-sidebar .sidebar-search").on("keypress","input.form-control",function(a){return 13==a.which?($(".sidebar-search").submit(),!1):void 0}),0!==$(".sidebar-search").size()&&($(".sidebar-search .input-group").on("click",function(a){a.stopPropagation()}),$("body").on("click",function(){$(".sidebar-search").hasClass("open")&&$(".sidebar-search").removeClass("open")}))},g=function(){var a=Metronic.getViewPort().height-$(".page-header").outerHeight();return $("body").hasClass("page-footer-fixed")&&(a-=$(".page-footer").outerHeight()),a},h=function(){var a=$(".page-sidebar-menu");return Metronic.destroySlimScroll(a),0===$(".page-sidebar-fixed").size()?void d():void(Metronic.getViewPort().width>=c&&(a.attr("data-height",g()),Metronic.initSlimScroll(a),d()))},i=function(){var a=$("body");a.hasClass("page-sidebar-fixed")&&$(".page-sidebar").on("mouseenter",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").removeClass("page-sidebar-menu-closed")}).on("mouseleave",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").addClass("page-sidebar-menu-closed")})},j=function(){$("body");$.cookie&&"1"===$.cookie("sidebar_closed")&&Metronic.getViewPort().width>=c?($("body").addClass("page-sidebar-closed"),$(".page-sidebar-menu").addClass("page-sidebar-menu-closed")):$.cookie&&$.cookie("sidebar_closed","0")},k=function(){$(".page-header").on("click",'.hor-menu a[data-toggle="tab"]',function(a){a.preventDefault();var b=$(".hor-menu .nav"),c=b.find("li.current");$("li.active",c).removeClass("active"),$(".selected",c).remove();var d=$(this).parents("li").last();d.addClass("current"),d.find("a:first").append('<span class="selected"></span>')}),$(".page-header").on("click",".search-form",function(a){$(this).addClass("open"),$(this).find(".form-control").focus(),$(".page-header .search-form .form-control").on("blur",function(a){$(this).closest(".search-form").removeClass("open"),$(this).unbind("blur")})}),$(".page-header").on("keypress",".hor-menu .search-form .form-control",function(a){return 13==a.which?($(this).closest(".search-form").submit(),!1):void 0}),$(".page-header").on("mousedown",".search-form.open .submit",function(a){a.preventDefault(),a.stopPropagation(),$(this).closest(".search-form").submit()}),$('[data-hover="megamenu-dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")}),$(document).on("click",".mega-menu-dropdown .dropdown-menu",function(a){a.stopPropagation()})},l=function(){$("body").on("shown.bs.tab",'a[data-toggle="tab"]',function(){d()})},m=function(){var a=300,b=500;navigator.userAgent.match(/iPhone|iPad|iPod/i)?$(window).bind("touchend touchcancel touchleave",function(c){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}):$(window).scroll(function(){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}),$(".scroll-to-top").click(function(a){return a.preventDefault(),$("html, body").animate({scrollTop:0},b),!1})},n=function(){var a,b=$(".full-height-content");if(a=Metronic.getViewPort().height-$(".page-header").outerHeight(!0)-$(".page-footer").outerHeight(!0)-$(".page-title").outerHeight(!0)-$(".page-bar").outerHeight(!0),b.hasClass("portlet")){var d=b.find(".portlet-body");if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(d.find(".full-height-content-body"));a=a-b.find(".portlet-title").outerHeight(!0)-parseInt(b.find(".portlet-body").css("padding-top"))-parseInt(b.find(".portlet-body").css("padding-bottom"))-2,b.hasClass("full-height-content-scrollable")?(a-=35,d.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(d.find(".full-height-content-body"))):d.css("min-height",a)}else{if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(b.find(".full-height-content-body"));b.hasClass("full-height-content-scrollable")?(a-=35,b.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(b.find(".full-height-content-body"))):b.css("min-height",a)}};return{initHeader:function(){k()},setSidebarMenuActiveLink:function(a,b){e(a,b)},initSidebar:function(){h(),f(),j(),Metronic.isAngularJsApp()&&e("match"),Metronic.addResizeHandler(h)},initContent:function(){n(),l(),Metronic.addResizeHandler(d),Metronic.addResizeHandler(n)},initFooter:function(){m()},init:function(){this.initHeader(),this.initSidebar(),this.initContent(),this.initFooter()},fixContentHeight:function(){d()},initFixedSidebarHoverEffect:function(){i()},initFixedSidebar:function(){h()},getLayoutImgPath:function(){return Metronic.getAssetsPath()+a},getLayoutCssPath:function(){return Metronic.getAssetsPath()+b}}}();angular.module("xCallyShuttleApp").run(["$templateCache",function(a){a.put("app/analytic/extracted/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-file-pdf-o"></i>\n                                      <a href="/analytics/extracted/list">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="fa fa-file-pdf-o font-green-sharp"></i>\n                                     <span class="caption-subject">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_METRIC\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.metric" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TABLE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.table" name="table" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n          <div ng-bind-html="table.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TABLE-->\n\n    <!-- START METRIC -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$invalid}">\n      <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="item.metric" required/></textarea>\n      <span data-ng-show="(forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END METRIC -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="metric.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.metric.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/metric/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-calculator"></i>\n                                       <a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-calculator font-green-sharp"></i>\n                                      <span class="caption-subject">{{ \'APPLICATION_METRICS\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_METRIC\' | translate }}\n                                                </button>\n                                     </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getMetric()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n                                       <i data-ng-show="metric" class="fa fa-angle-right"></i>\n                               </li>\n                         <li data-ng-show="metric">\n                                    <a href="#">{{metric.name}}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/metric.png" class="img-responsive">\n                             </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{metric.name}}\n                                       </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.analytics.metrics.view.settings\')}">\n                                                    <a data-ng-href="/analytics/metrics/view/{{metric.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/view/view.settings.html",'<div class="row">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                              </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateMetric()" novalidate>\n\n                                                      <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="metric.name" required/>\n                                                         <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START TABLE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <ui-select data-ng-model="metric.table" name="table" theme="bootstrap" required>\n                                                                      <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n                                                                          <div ng-bind-html="table.name | highlight: $select.search"></div>\n                                                                     </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="(forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$error.required" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TABLE-->\n\n                                                   <!-- START METRIC -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': (forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                               <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="metric.metric" required/></textarea>\n                                                             <span data-ng-show="(forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END METRIC -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="metric.description"></textarea>\n                                                        </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
 a.put("app/analytic/report/list/copy.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_COPY_REPORT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="portlet light bordered">\n    <div class="portlet-title">\n      <div class="caption font-green-sharp" style="padding-left:10px;">\n        <i class="icon-folder font-green-sharp"></i>\n        <span class="caption-subject">{{ \'APPLICATION_COPY_TO\' | translate }} </span>\n      </div>\n    </div>\n    <div class="portlet-body">\n      <div js-tree="customTreeConfig" ng-model="customTreeData" should-apply="ac()" tree="customTreeInstance" tree-events="ready:initCustomScopeTree;"></div>\n    </div>\n  </div>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-disabled="!customTree.get_selected(true).pop().id" ng-click="ok()" ng-disabled="forms.report.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_REPORT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.report" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PATH\' | translate}}<span class="required" aria-required="true"></span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_PATH\' | translate}}" class="form-control" data-ng-model="path" disabled/>\n      <span data-ng-show="(forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.report.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/extract.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_EXTRACT_REPORT\' | translate }}</h3>\n</div>\n<div class="modal-body" style="text-align:center;">\n  <form name="forms.report" class="form-inline mbottom20" novalidate>\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DATE_RANGE\' | translate}}<span class="required" aria-required="true"></span></label>\n      <input type="daterange" name="dates" ranges="ranges" placeholder="{{\'APPLICATION_DATE_RANGE\' | translate}}" class="form-control" data-ng-model="dates" required/>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn default green-jungle" type="button" data-ng-click="extract(\'csv\')"><i class="fa fa-file-excel-o"></i> {{ \'APPLICATION_SAVE_AS_CSV\' | translate }}</button>\n  <button class="btn default red-intense" type="button" data-ng-click="extract(\'pdf\')"><i class="fa fa-file-pdf-o"></i> {{ \'APPLICATION_SAVE_AS_PDF\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTrees()">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-book-open"></i>\n                                        <a href="/analytics/reports/list">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n                <div class="col-fixed">\n                       <!-- BEGIN Portlet PORTLET-->\n                 <div class="portlet light bordered">\n                          <div class="portlet-title">\n                                   <div class="caption font-green-sharp" style="padding-left:10px;">\n                                             <i class="icon-folder font-green-sharp"></i>\n                                          <span class="caption-subject">{{ \'APPLICATION_FOLDERS\' | translate }} </span>\n                                       </div>\n                                        <div class="inputs">\n                                          <div class="portlet-input input-inline input-small">\n                                                  <div class="input-icon right">\n                                                                <i class="icon-magnifier"></i>\n                                                                <input type="text" data-ng-model="searchField" data-ng-change="searchTrees()" class="form-control input-circle" placeholder="search...">\n                                                      </div>\n                                                </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <div js-tree="defaultTreeConfig" ng-model="defaultTreeData" should-apply="ac()" tree="defaultTreeInstance" tree-events="ready:initDefaultScopeTree;select_node:selectDefaultNode;"></div>\n                                     <div js-tree="customTreeConfig" ng-model="customTreeData" should-apply="ac()" tree="customTreeInstance" tree-events="ready:initCustomScopeTree;select_node:selectCustomNode;rename_node:updateCustomTree;delete_node:updateCustomTree;move_node:updateCustomTree;create_node:updateCustomTree;"></div>\n                                </div>\n                        </div>\n                        <!-- END Portlet PORTLET-->\n           </div>\n                <div class="row tree-row">\n                    <div class="col-md-12">\n                               <!-- BEGIN Portlet PORTLET-->\n                         <div class="portlet light bordered">\n                                  <div class="portlet-title">\n                                           <div class="caption font-green-sharp">\n                                                        <i class="icon-book-open font-green-sharp"></i>\n                                                       <span class="caption-subject">{{ \'APPLICATION_REPORTS\' | translate }}<span data-ng-if="selectedNode"> - {{selectedNode}}</span></span>\n                                              </div>\n                                                <div data-ng-if="!defaultTreeActive" class="actions">\n                                                 <div class="btn-group" data-ng-show="id.length">\n                                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                                           </a>\n                                                  </div>\n                                                        <div class="btn-group">\n                                                               <span class="btn default btn-file">\n                                                           <span class="fileinput-new">\n                                                          <i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_JSON\' | translate}}</span>\n                                                             <input type="file" on-read-file="import($fileContent)"/>\n                                                              </span>\n                                                       </div>\n                                                        <div class="btn-group">\n                                                               <button class="btn green-jungle " ng-click="create()">\n                                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_REPORT\' | translate }}\n                                                                </button>\n                                                     </div>\n                                                </div>\n                                        </div>\n                                        <div class="portlet-body">\n                                            <div ng-slide-down="gridOptions" lazy-render duration="1">\n                                            <!-- START TABLE -->\n                                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                                              </div>\n                                                <!-- END TABLE -->\n                                    </div>\n                                        </div>\n                                </div>\n                                <!-- END Portlet PORTLET-->\n                   </div>\n                </div>\n        </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/report/list/preview.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_REPORT_PREVIEW\' | translate }}</h3>\n</div>\n<div class="modal-body" style="text-align:center;">\n  <form name="forms.report" class="form-inline mbottom20" novalidate>\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DATE_RANGE\' | translate}}<span class="required" aria-required="true"></span></label>\n      <input type="daterange" name="dates" ranges="ranges" placeholder="{{\'APPLICATION_DATE_RANGE\' | translate}}" class="form-control" data-ng-model="dates" data-ng-change="getPage()" required/>\n    </div>\n  </form>\n  <div ng-slide-down="showResult" lazy-render duration="1">\n    <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="grid extract-grid">\n      <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n    </div>\n  </div>\n</div>\n<div class="modal-footer">\n<button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getReport()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-book-open"></i>\n                                        <a href="/analytics/reports/list">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n                                       <i data-ng-show="report" class="fa fa-angle-right"></i>\n                               </li>\n                         <li data-ng-show="report">\n                                    <a href="#">{{report.name}}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/report.png" class="img-responsive">\n                             </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{report.name}}\n                                       </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.analytics.reports.view.settings\')}">\n                                                    <a data-ng-href="/analytics/reports/view/{{report.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/report/view/view.settings.html",'<div class="row">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_REPORT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                              </div>\n                                <ul class="nav nav-tabs">\n                                     <li>\n                                          <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                                 <li class="active">\n                                           <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_BUILD\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_3" data-toggle="tab" data-ng-click="showResult = true">{{ \'APPLICATION_TEST_PREVIEW\' | translate}}</a>\n                                      </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n\n                          <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane" id="tab_1_1">\n                                           <form name="forms.general" data-ng-submit="forms.report.$valid && forms.general.$valid && updateReport()" novalidate>\n\n\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="report.name" required/>\n                                                         <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="report.description"></textarea>\n                                                        </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <!-- START TABLE INPUT -->\n\n\n                                                        <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n\n                                     </div>\n                                        <!-- END GENERAL TAB -->\n                                      <div class="tab-pane active" id="tab_1_2">\n                                            <form name="forms.report" data-ng-submit="forms.report.$valid && forms.general.$valid && updateReport()" novalidate>\n                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.report.table.$touched || forms.report.$submitted) && forms.report.table.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <ui-select data-ng-model="report.table" name="table" theme="bootstrap" required>\n                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                              <ui-select-choices repeat="table.table as table in tables | filter: $select.search">\n                                                                  <div ng-bind-html="table.name | highlight: $select.search"></div>\n                                                             </ui-select-choices>\n                                                  </ui-select>\n                                                  <span class="help-block">\n                                                     </span>\n                                                       <span data-ng-show="(forms.report.table.$touched || forms.report.$submitted) && forms.report.table.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END TABLE INPUT-->\n                                               <div data-ng-if="report.table" class="mbottom20 pbottom20">\n                                           <div class="portlet-title tabbable-line">\n                                                     <div class="caption caption-md">\n                                                              <i class="icon-globe theme-font hide"></i>\n                                                            <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_FIELDS\' | translate}} </span>\n                                                        </div>\n                                                </div>\n                                                                <!-- START TABLE -->\n                                                          <table class="table table-striped table-bordered table-hover">\n                                                                        <thead>\n                                                                               <tr>\n                                                                                  <th>{{ \'APPLICATION_FIELD\' | translate }} / {{ \'APPLICATION_METRIC\' | translate }}</th>\n                                                                                   <th>{{ \'APPLICATION_ALIAS\' | translate }}</th>\n                                                                                      <th>{{ \'APPLICATION_FUNCTION\' | translate }}</th>\n                                                                                   <th>{{ \'APPLICATION_GROUP_BY\' | translate }}</th>\n                                                                                   <th>{{ \'APPLICATION_ORDER_BY\' | translate }}</th>\n                                                                                   <th></th>\n                                                                                     <th></th>\n                                                                             </tr>\n                                                                 </thead>\n                                                                              <tbody ui-sortable="sortableOptions" data-ng-model="report.Fields">\n                                                                                   <tr data-ng-repeat="field in report.Fields">\n                                                                                          <td>\n                                                                                                  <!-- START FIELD -->\n                                                                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.report.$submitted && !field.field}">\n                                                                                                             <!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n                                                                                                               <ui-select data-ng-model="field.field" dynamic-name="randomName()" theme="bootstrap" on-select="setMetricId($item,$index)" required>\n                                                                                                                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}"><span ng-bind-html="$select.selected.name"></span></ui-select-match>\n                                                                                                                     <ui-select-choices repeat="tableField.value as tableField in tableFields | filter: $select.search">\n                                                                                                                           <div ng-bind-html="tableField.name | highlight: $select.search"></div>\n                                                                                                                        </ui-select-choices>\n                                                                                                          </ui-select>\n                                                                                                          <span data-ng-show="forms.report.$submitted && !field.field" class="help-block help-block-error">\n                                                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                                         </span>\n                                                                                                       </div>\n                                                                                                        <!-- END FIELD-->\n                                                                                             </td>\n                                                                                         <td>\n                                                                                                  <!-- START ALIAS -->\n                                                                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.report.$submitted && !field.alias}">\n                                                                                                             <!-- <label class="control-label">{{\'APPLICATION_ALIAS\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n                                                                                                               <input type="text" dynamic-name="randomName()" placeholder="{{\'APPLICATION_ALIAS\' | translate}}" class="form-control" data-ng-model="field.alias" required/>\n                                                                                                                <span data-ng-show="forms.report.$submitted && !field.alias" class="help-block help-block-error">\n                                                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                                         </span>\n                                                                                                       </div>\n                                                                                                        <!-- END ALIAS -->\n                                                                                            </td>\n                                                                                         <td>\n                                                                                                  <!-- START FUNCTION -->\n                                                                                                       <div class="form-group">\n                                                                                                              <!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n                                                                                                               <ui-select data-ng-model="field.function" name="function" theme="bootstrap">\n                                                                                                                  <ui-select-match placeholder="{{\'APPLICATION_FUNCTION\' | translate}}" allow-clear>{{$select.selected.name}}</ui-select-match>\n                                                                                                                       <ui-select-choices repeat="function.value as function in functions | filter: $select.search">\n                                                                                                                         <div ng-bind-html="function.name | highlight: $select.search"></div>\n                                                                                                                  </ui-select-choices>\n                                                                                                          </ui-select>\n                                                                                                  </div>\n                                                                                                        <!-- END FUNCTION-->\n                                                                                          </td>\n                                                                                         <td>\n                                                                                                  <!-- START GROUP_BY -->\n                                                                                                       <div class="form-group">\n                                                                                                              <!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n                                                                                                               <ui-select data-ng-model="field.groupBy" name="groupBy" theme="bootstrap" required>\n                                                                                                                   <ui-select-match placeholder="{{\'APPLICATION_GROUP_BY\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                                                       <ui-select-choices repeat="groupBy.value as groupBy in groupByField | filter: $select.search">\n                                                                                                                                {{$translate.instant(groupBy.name)}}\n                                                                                                                  </ui-select-choices>\n                                                                                                          </ui-select>\n                                                                                                  </div>\n                                                                                                        <!-- END GROUP_BY-->\n                                                                                          </td>\n                                                                                         <td>\n                                                                                                  <!-- START ORDER_BY -->\n                                                                                                       <div class="form-group">\n                                                                                                              <!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n                                                                                                               <ui-select data-ng-model="field.orderBy" name="orderBy" theme="bootstrap">\n                                                                                                                    <ui-select-match placeholder="{{\'APPLICATION_ORDER_BY\' | translate}}" allow-clear>{{$select.selected}}</ui-select-match>\n                                                                                                                    <ui-select-choices repeat="orderBy in [\'ASC\',\'DESC\'] | filter: $select.search">\n                                                                                                                           <div ng-bind-html="orderBy | highlight: $select.search"></div>\n                                                                                                                        </ui-select-choices>\n                                                                                                          </ui-select>\n                                                                                                  </div>\n                                                                                                        <!-- END TABLE INPUT-->\n                                                                                               </td>\n                                                                                         <td class="report-field-remove">\n                                                                                                      <button class="btn red" type="button" data-ng-click="removeField($index)"><i class="fa fa-times"></i></button>\n                                                                                                </td>\n                                                                                         <td class="report-field-handle">\n                                                                                                      <!-- <img data-ng-src="assets/images/move.png" class="img-responsive"> -->\n                                                                                            </td>\n                                                                                 </tr>\n                                                                                 <tr data-ng-hide="report.Fields.length" class="unsortable">\n                                                                                           <td colspan="7" style="text-align:center;">\n                                                                                                   <i>{{ \'MESSAGE_ADD_A_FIELD\' | translate }}</i>\n                                                                                              </td>\n                                                                                 </tr>\n                                                                         </tbody>\n                                                              </table>\n                                                              <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}\n                                                          </button>\n                                                             <!-- END TABLE -->\n                                                    </div>\n                                                                <div data-ng-if="report.Fields.length" class="mbottom20 pbottom20">\n                                                                   <div class="portlet-title tabbable-line">\n                                                                             <div class="caption caption-md">\n                                                                                      <i class="icon-globe theme-font hide"></i>\n                                                                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CONDITIONS\' | translate}} </span>\n                                                                            </div>\n                                                                        </div>\n                                                                        <div class="alert alert-info">\n                                                                                        <strong>Output</strong><br>\n                                                                                   <span ng-bind-html="output"></span>\n                                                                   </div>\n\n                                                                      <report-builder group="report.conditions.group" fields="report.Fields" forms="forms" firstCall=\'true\'></report-builder>\n                                                             </div>\n                                                                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                                          </form>\n                                       </div>\n                                        <div class="tab-pane" id="tab_1_3">\n                                           <div ng-slide-down="showResult" lazy-render duration="0.5">\n                                                   <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-move-columns class="grid">\n                                                             <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                                                      </div>\n                                                </div>\n                                        </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/chat/offline/list/list.html",'<div class="row">\n        <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-puzzle"></i>\n                                           <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                            <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bubble"></i>\n                                           <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                                <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-login"></i>\n                                            <a href="/channels/chat/offline/list">Offline</a>\n                                     </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-question font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/offline/view/view.detail.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n                          </div>\n                        </div>\n                        <div class="portlet-body row" data-ng-init="initView()">\n                              <div class="col-md-6">\n                                        <div class="news-blocks">\n                                             <h3>\n                                                  <a href="#" class="inactive-link">{{\'APPLICATION_MESSAGE\' | translate}}</a>\n                                                 <hr>\n                                          </h3>\n                                         <div class="news-block-tags">\n                                                 <em am-time-ago="chatVisitor.ChatEnquiry.createdAt"></em>\n                                             </div>\n                                                <p>\n                                                   {{chatVisitor.ChatEnquiry.text}}\n                                              </p>\n                                  </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <div class="news-blocks">\n                                             <h3>\n                                                  <a href="#" class="inactive-link">{{\'APPLICATION_VISITOR\' | translate}}</a>\n                                                 <hr>\n                                          </h3>\n                                         <div class="margin-top-20 profile-desc-link">\n                                                 <i class="icon-user"></i>\n                                                     <a href="#" class="inactive-link">{{chatVisitor.fullname}}</a>\n                                                </div>\n                                                <div class="margin-top-20 profile-desc-link">\n                                                 <i class="icon-envelope"></i>\n                                                 <a href="#" class="inactive-link">{{chatVisitor.email}}</a>\n                                           </div>\n                                                <div class="margin-top-20 profile-desc-link">\n                                                 <i class="icon-globe"></i>\n                                                    <a href="#" class="inactive-link">{{chatVisitor.remote_address}}</a>\n                                          </div>\n                                                <div class="margin-top-20 profile-desc-link">\n                                                 <i class="icon-home"></i>\n                                                     <a href="#" class="inactive-link">{{chatVisitor.referer}} - {{chatVisitor.ChatWebsite.name}}</a>\n                                              </div>\n                                                <div class="margin-top-20 profile-desc-link">\n                                                 <i class="icon-cursor"></i>\n                                                   <a href="#" class="inactive-link">{{chatVisitor.browser}}</a>\n                                         </div>\n                                                <div class="margin-top-20 profile-desc-link">\n                                                 <i class="icon-screen-desktop"></i>\n                                                   <a href="#" class="inactive-link">{{chatVisitor.os}}</a>\n                                              </div>\n                                        </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/chat/offline/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bubble"></i>\n                                   <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                        <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-login"></i>\n                                    <a href="/channels/chat/offline/list">Offline</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/enquiry.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- START USER TITLE -->\n                             <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{chatVisitor.ChatEnquiry.email}}\n                                     </div>\n                                        <div class="profile-usertitle-job">\n                                           {{chatVisitor.ChatEnquiry.username}}\n                                  </div>\n                                </div>\n                                <!-- END USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.channels.chat.offline.view.detail\')}">\n                                                  <a data-ng-href="/channels/chat/offline/view/{{chatVisitor.id}}/detail">\n                                                      <i class="icon-tag"></i>\n                                                      {{ \'APPLICATION_DETAIL\' | translate}} </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/online/list/list.html",'<div class="row">\n       <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-puzzle"></i>\n                                           <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                            <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bubble"></i>\n                                           <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                                <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-login"></i>\n                                            <a href="/channels/chat/offline/list">Offline</a>\n                                     </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-question font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/online/view/view.detail.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n                          </div>\n                        </div>\n                        <div class="portlet-body row" data-ng-init="initView()">\n                              <div class="col-md-6">\n                                        <div class="news-blocks">\n                                             <h3>\n                                                  <a href="#" class="inactive-link">{{\'APPLICATION_MESSAGES\' | translate}}</a>\n                                                        <!-- <a href="#" data-ng-click="export()" data-ng-show="chatRoom.ChatMessages.length" class="btn btn-sm blue pull-right"><i class="icon-cloud-download"></i> {{\'APPLICATION_EXPORT\' | translate}} CSV </a> -->\n                                                      <a href="api/chat/rooms/{{chatRoom.id}}/export" target="_blank" data-ng-show="chatRoom.ChatMessages.length" class="btn btn-sm blue pull-right"><i class="icon-cloud-download"></i> {{\'APPLICATION_EXPORT\' | translate}} CSV </a>\n                                                    <hr>\n                                          </h3>\n                                         <div class="news-block-tags">\n                                                 <em am-time-ago="chatRoom.ChatVisitor.ChatEnquiry.createdAt"></em>\n                                            </div>\n                                                <p>\n                                                   <div ng-scrollbars ng-scrollbars-config="config">\n                                                             <ul class="chats">\n                                                                    <li data-ng-class="{\'out\': message.User, \'in\':message.ChatVisitor}" data-ng-repeat="message in chatRoom.ChatMessages | orderBy:\'createdAt\'">\n                                                                            <img class="avatar" data-ng-src="api/users/avatar/{{message.User.userpic || \'unknown_avatar\'}}">\n                                                                            <div class="message">\n                                                                                 <span class="arrow">\n                                                                                  </span>\n                                                                                       <a href="#" class="name">\n                                                                                             {{message.User ? message.User.fullname : message.ChatVisitor.fullname}}\n                                                                                       </a>\n                                                                                  <span class="datetime">\n                                                                                               at {{message.createdAt | date: \'medium\'}}\n                                                                                   </span>\n                                                                                       <span class="body">\n                                                                                           {{message.body}}\n                                                                                      </span>\n                                                                               </div>\n                                                                        </li>\n                                                         </ul>\n                                                 </div>\n                                                </div>\n                                        </div>\n                                        <div class="col-md-6">\n                                                <div class="news-blocks">\n                                                     <h3>\n                                                          <a href="#" class="inactive-link">{{\'APPLICATION_VISITOR\' | translate}}</a>\n                                                         <hr>\n                                                  </h3>\n                                                 <div class="margin-top-20 profile-desc-link">\n                                                         <i class="icon-user"></i>\n                                                             <a href="#" class="inactive-link">{{chatRoom.ChatVisitor.fullname}}</a>\n                                                       </div>\n                                                        <div class="margin-top-20 profile-desc-link">\n                                                         <i class="icon-envelope"></i>\n                                                         <a href="#" class="inactive-link">{{chatRoom.ChatVisitor.email}}</a>\n                                                  </div>\n                                                        <div class="margin-top-20 profile-desc-link">\n                                                         <i class="icon-globe"></i>\n                                                            <a href="#" class="inactive-link">{{chatRoom.ChatVisitor.remote_address}}</a>\n                                                 </div>\n                                                        <div class="margin-top-20 profile-desc-link">\n                                                         <i class="icon-home"></i>\n                                                             <a href="#" class="inactive-link">{{chatRoom.ChatVisitor.referer}} - {{chatRoom.ChatVisitor.ChatWebsite.name}}</a>\n                                                    </div>\n                                                        <div class="margin-top-20 profile-desc-link">\n                                                         <i class="icon-cursor"></i>\n                                                           <a href="#" class="inactive-link">{{chatRoom.ChatVisitor.browser}}</a>\n                                                        </div>\n                                                        <div class="margin-top-20 profile-desc-link">\n                                                         <i class="icon-screen-desktop"></i>\n                                                           <a href="#" class="inactive-link">{{chatRoom.ChatVisitor.os}}</a>\n                                                     </div>\n                                                </div>\n                                        </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n'),
 a.put("app/channels/chat/online/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bubble"></i>\n                                   <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                        <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-login"></i>\n                                    <a href="/channels/chat/online/list">Online</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/enquiry.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- START USER TITLE -->\n                             <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{chatRoom.ChatVisitor.email}}\n                                        </div>\n                                        <div class="profile-usertitle-job">\n                                           {{chatRoom.ChatVisitor.fullname}}\n                                     </div>\n                                </div>\n                                <!-- END USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.channels.chat.online.view.detail\')}">\n                                                   <a data-ng-href="/channels/chat/online/view/{{chatRoom.id}}/detail">\n                                                  <i class="icon-tag"></i>\n                                                      {{ \'APPLICATION_DETAIL\' | translate}} </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/preview/preview.html",'<style>\n.xc_rating {\n  text-align: center;\n}\n.xc_rating_label > input{ /* HIDE RADIO */\n  display:none;\n}\n.xc_rating_label > input + img{ /* IMAGE STYLES */\n  cursor:pointer;\n  border:2px solid transparent;\n}\n.xc_rating_label > input:checked + img{ /* (CHECKED) IMAGE STYLES */\n  /*border:2px solid #f00;*/\n  background-color: #efefef;\n}\n\n.xc_label {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\n\n.xc_online_message,\n.xc_offline_message,\n.xc_rating_message\n{\n  text-align: center;\n}\n\n.xc_div_group {\n  margin: 10px 0 10px 0;\n}\n.xc_footer\n{\n  text-align: center;\n  padding-bottom: 5px;\n}\n\n.xc_powered\n{\n  color: grey;\n  font: 10px/16px "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;\n  padding-bottom: 5px;\n}\n\n.xc_chat_container\n{\n  //width:379px;\n  //position:fixed;\n  //bottom:0;\n  //right:50px;\n  z-index:9999;\n  background-color:transparent;\n}\n\n.xc_chat_container *\n{\n  font-family:Arial,Helvetica,sans-serif;\n  font-size:13px;\n  margin:0;\n  padding:0;\n}\n\n.xc_chat_container p\n{\n  margin:5px 0;\n}\n\n.xc_signup_wrapper\n{\n  max-height:375px;\n}\n\n.xc_conversation_container\n{\n  max-height:375px;\n  list-style:none;\n  overflow:auto;\n  margin:0;\n  padding:20px 10px;\n}\n\n.xc_conversation_container a\n{\n  color:#036;\n}\n\n.xc_conversation_container a.xc_btn_style\n{\n  color:#fff;\n}\n\ndiv.xc_chat_head\n{\n  color:#fff;\n  background:{{chatWebsite.color}};\n  //border-radius: 20px 20px 0px 0px !important;\n  height:52px;\n  line-height:55px;\n  cursor:pointer;\n}\n\ndiv.xc_chat_head.rounded\n{\n  border-radius: 20px 20px 0px 0px !important;\n}\n\ndiv.xc_chat_head.squared\n{\n  //border-radius: 20px 20px 0px 0px !important;\n}\n\n.xc_chat_head-title\n{\n  margin:5px 0 0 15px;\n  color: #fff;\n}\n\n.xc_header_icon\n{\n  display:block;\n  background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/icon_visitorchat.png);\n  width:21px;\n  height:16px;\n  float:right;\n  margin:20px 20px 0 0;\n}\n\n.xc_header_icon span.xc_notification_badge span\n{\n  display:block;\n  height:16px;\n  width:15px;\n  text-align:center;\n  font-size:9px;\n  color:#555;\n  position:relative;\n  top:-20px;\n  left:4px;\n  margin:0;\n  padding:0;\n}\n\n.xc_sub-head-spacer\n{\n  padding:1px;\n}\n\n.xc_conversation\n{\n  display:none;\n  margin:0 12px 0 11px;\n}\n\n.xc_chat_toggle_container\n{\n  /*background:mediumslateblue center 52px;*/\n  background: white;\n  border-style: solid;\n  border-width: 1px;\n  border-color: {{chatWebsite.color}};\n  //display:none;\n}\n\n.xc_signup_wrapper,.xc_notifications_wrapper,.xc_enquiry_wrapper,.xc_rating_wrapper\n{\n  //display:none;\n  display:block;\n  overflow:auto;\n  line-height:1;\n  padding:25px;\n}\n\n.xc_exit_chat_container\n{\n  text-align:right;\n  width:95%;\n  margin:0 auto;\n  padding:5px 1px 0 0;\n}\n\n.xc_exit_chat_container span,.xc_exit_chat_container a\n{\n  font-size:80%;\n  color:#666;\n  text-decoration:none;\n}\n\n.xc_exit_chat_container a:hover\n{\n  color:#333;\n}\n\na.xc_btn_exit_chat_confirm:hover\n{\n  color:red;\n}\n\na.xc_btn_exit_chat_cancel:hover\n{\n  color:#0c0;\n}\n\nform.xc_form_reply\n{\n  position:relative;\n}\n\n.xc_form_reply\n{\n  /*background-color:#e3e3e3;*/\n  text-align:center;\n  /*border-top:1px solid #d3d3d3;*/\n}\n\n.xc_input_message\n{\n  height:100px;\n  margin:10px auto 5px;\n}\n\n.xc_input_enquiry_message,\n.xc_input_rating_message\n{\n  height:100px;\n}\n\n.xc_form_signup,.xc_form_enquiry,.xc_form_rating\n{\n  /*text-align:center;*/\n}\n\n.xc_chat_container textarea,.xc_chat_container input[type=text]\n{\n  width:95%;\n  min-width:95%;\n  max-width:95%;\n  -webkit-box-sizing:border-box;\n  -moz-box-sizing:border-box;\n  box-sizing:border-box;\n  background-color:#fff;\n  border:1px solid #ccc;\n  -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  -moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  -webkit-transition:border linear .2s, box-shadow linear .2s;\n  -moz-transition:border linear .2s, box-shadow linear .2s;\n  -o-transition:border linear .2s, box-shadow linear .2s;\n  transition:border linear .2s, box-shadow linear .2s;\n  display:inline-block;\n  font-size:14px;\n  line-height:20px;\n  color:#555;\n  -webkit-border-radius:4px;\n  -moz-border-radius:4px;\n  border-radius:4px;\n  vertical-align:middle;\n  margin:3px 0;\n  padding:4px 6px;\n  resize: none;\n}\n\n.xc_chat_container textarea:focus,.xc_chat_container input[type=text]:focus\n{\n  outline: {{chatWebsite.color_focus}} auto 5px;\n}\n\n.xc_chat_container input[type=text]\n{\n  height: 30px;\n}\n\n.xc_message_sending textarea, .xc_enquiry_sending textarea\n{\n  background: #fff url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/loading.gif) 98% 5px no-repeat;\n}\n\n.xc_chatrow\n{\n  display:block;\n  border-top:1px dashed #e3e3e3;\n  margin:5px 0;\n  clear: both;\n}\n\n.xc_chatrow p\n{\n  color:#444;\n  word-wrap:break-word;\n}\n\n.xc_time\n{\n  float:right;\n  font-size:80%;\n  color:#ccc;\n  padding-left:12px;\n  margin:3px;\n}\n\n.xc_submission_pending\n{\n  background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_clock.png) left center norepeat;\n}\n\n.xc_submission_confirmed\n{\n  background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_tick.png) left center norepeat;\n}\n\n.xc_fullname\n{\n  font-weight:700;\n}\n\n.xc_fullname:after\n{\n  content:":";\n}\n\n.xc_avatar\n{\n  float: left;\n  margin: 0 5px 5px 0;\n  display: inline-block;\n  width: 40px;\n  height: 40px;\n  border-radius: 5px;\n  -moz-border-radius: 5px;\n  -webkit-border-radius: 5px;\n}\n\n.xc_smilie\n{\n  background-repeat:no-repeat;\n  display:inline-block;\n  width:18px;\n  height:18px;\n  text-indent:-9999px;\n  white-space:nowrap;\n}\n\n.xc_btn_load_more\n{\n  width:100%!important;\n}\n\n.xc_notifications_wrapper\n{\n  text-shadow:0 1px 0 rgba(255,255,255,0.5);\n}\n\n.xc_notification_success\n{\n  color:#468847;\n}\n\n.xc_notification_error\n{\n  color:#b94a48;\n}\n\n.xc_errorlist\n{\n  margin:0 0 0 25px;\n  padding:0;\n}\n\ni.xc_btn_notifications_close\n{\n  float:right;\n  font-weight:700;\n  font-size:20px;\n  color:#ccc;\n  cursor:pointer;\n  margin:-15px 0 0;\n  padding:0;\n}\n\n.xc_btn_style\n{\n  width:95%;\n  text-align:center;\n  line-height:1.2;\n  font-size:90%;\n  -moz-box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  -webkit-box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  background:0;\n  background-color:{{chatWebsite.color_button}};\n  -moz-border-radius:4px;\n  -webkit-border-radius:4px;\n  border-radius:4px;\n  border:1px solid {{chatWebsite.color_button}};\n  display:inline-block;\n  color:#fff;\n  font-weight:700;\n  text-decoration:none;\n  text-shadow:1px 1px 0 #000c17;\n  margin:0 auto 5px;\n  padding:2px 0;\n}\n\n.xc_btn_style:hover\n{\n  background:0;\n  background-color:{{chatWebsite.color_button}};\n  color: #fff;\n  text-decoration: none;\n}\n\n.xc_btn_style:active\n{\n  position:relative;\n  top:1px;\n}\n\n.xc_composing_container\n{\n  display: none;\n  width: 95%;\n  margin: 0 auto;\n  background: transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_pencil.png) 6px center no-repeat;\n  padding-left: 19px;\n  font-style: italic;\n}\n\n@media only screen and (max-height: 620px) {\n  .xc_conversation_container\n  {\n    max-height:300px!important;\n  }\n}\n\n@media only screen and (max-height: 545px) {\n  .xc_conversation_container\n  {\n    max-height:200px!important;\n  }\n}\n\n@media only screen and (max-height: 445px) {\n  .xc_conversation_container\n  {\n    max-height:150px!important;\n  }\n}\n\n@media only screen and (max-width: 480px) {\n  .xc_chat_container\n  {\n    width:95%!important;\n    right:auto!important;\n    -webkit-border-top-left-radius:15px;\n    -webkit-border-top-right-radius:15px;\n    -moz-border-radius-topleft:15px;\n    -moz-border-radius-topright:15px;\n    border-top-left-radius:15px;\n    border-top-right-radius:15px;\n    box-shadow:0 0 5px rgba(0,0,0,.5);\n    -webkit-box-shadow:0 0 5px rgba(0,0,0,.5);\n    -moz-box-shadow:0 0 5px rgba(0,0,0,.5);\n  }\n\n  div.xc_chat_head\n  {\n    background-color:#036;\n    background-image:none;\n    line-height:25px;\n    height:auto;\n    -webkit-border-top-left-radius:15px;\n    -webkit-border-top-right-radius:15px;\n    -moz-border-radius-topleft:15px;\n    -moz-border-radius-topright:15px;\n    border-top-left-radius:15px;\n    border-top-right-radius:15px;\n    padding:10px;\n  }\n\n  .xc_chat_toggle_container\n  {\n    background-color:#fff;\n    background-image:none;\n    border-color:#036;\n    border-style:solid;\n    border-width:0 1px;\n  }\n\n  .xc_header_icon\n  {\n    background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/icon_visitorchat.png);\n    margin:0;\n  }\n\n  .xc_header_icon span.xc_notification_badge span\n  {\n    top:-5px;\n    left:5px;\n  }\n\n  .xc_notification_success\n  {\n    background-color:#dff0d8;\n    border:1px solid #d6e9c6;\n  }\n\n  .xc_conversation_container\n  {\n    max-height:375px;\n    border-color:#036;\n  }\n\n  .xc_notification_error\n  {\n    background-color:#f2dede;\n    border:1px solid #eed3d7;\n  }\n\n  .xc_sub-head-spacer\n  {\n    display:none;\n    padding:0;\n  }\n\n  .xc_chat_head-title,.xc_conversation\n  {\n    margin:0;\n  }\n}\n</style>\n<div class="xc_chat_container">\n  <div class="xc_chat_head {{chatWebsite.header_shape}}">\n    <i class="xc_header_icon">\n      <span class="xc_notification_badge">\n        <span class="xc_notification_badge_number"></span>\n      </span>\n    </i>\n    <span class="xc_chat_head-title">{{statePreview.state == \'online\' ? chatWebsite.header_online : chatWebsite.header_offline}}</span>\n  </div>\n  <div class="xc_chat_toggle_container">\n    <div class="xc_sub-head-spacer"></div>\n    <!-- <div class="xc_notifications_wrapper">\n    <ul class="xc_errorlist"></ul>\n  </div> -->\n  <div class="xc_enquiry_wrapper" data-ng-show=\'statePreview.state == "offline"\'>\n    <form class="xc_form_enquiry" accept-charset="UTF-8">\n      <p class="xc_offline_message" ng-bind-html=\'chatWebsite.offline_message\'></p>\n      <br>\n      <div ng-if="chatWebsite.enquiry_enable">\n        <div class="xc_div_group">\n          <label for="enquiryFullname" class="xc_label">Name *</label>\n          <input id="enquiryFullname" maxlength="45" data-label="Name" type="text" name="data[Enquiry][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_enquiry_fullname" required/>\n        </div>\n        <br>\n        <div class="xc_div_group">\n          <label for="enquiryEmail" class="xc_label">Email Address *</label>\n          <input id="enquiryEmail" maxlength="85" type="text" data-label="Email Address" name="data[Enquiry][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_enquiry_email" required/>\n        </div>\n        <br>\n        <div class="xc_div_group">\n          <label for="enquiryMessage" class="xc_label">Message*</label>\n          <textarea id="enquiryMessage" data-label="Message" maxlength="1500" placeholder="{{chatWebsite.enquiry_message_placeholder}}" name="data[Enquiry][message]" class="xc_input_enquiry_message" required></textarea>\n        </div>\n        <br>\n        <button type="submit" class="xc_btn_enquiry xc_btn_style">{{chatWebsite.enquiry_button}}</button>\n      </div>\n    </form>\n  </div>\n  <div class="xc_signup_wrapper" data-ng-show=\'statePreview.state == "online"\'>\n    <form class="xc_form_signup" accept-charset="UTF-8">\n      <p class="xc_online_message" ng-bind-html=\'chatWebsite.online_message\'></p>\n      <br>\n      <div class="xc_div_group">\n        <label for="dataFullname" class="xc_label">Fullname *</label>\n        <input maxlength="45" id="dataFullname" data-label="Fullname" type="text" name="data[Discussion][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_fullname" required/>\n      </div>\n      <br>\n      <div class="xc_div_group">\n        <label for="dataEmail" class="xc_label">Email Address *</label>\n        <input maxlength="85" id="dataEmail" data-label="Email Address" type="text" name="data[Discussion][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_email" required/>\n      </div>\n      <br>\n      <input type="hidden" class="xc_input_visitor_time" name="data[Discussion][visitor_time]" />\n      <button type="submit" class="xc_btn_signup xc_btn_style">{{chatWebsite.start_chat_button}}</button>\n    </form>\n  </div>\n  <div class="xc_rating_wrapper" data-ng-show=\'statePreview.state == "rating"\'>\n    <form class="xc_form_rating" accept-charset="UTF-8">\n      <p class="xc_rating_message">{{chatWebsite.rating_message}}</p>\n      <br>\n      <div class="xc_rating">\n        <label class="xc_rating_label" style="padding:30px;">\n          <input type="radio" name="data[Rating][rating]" value="good" />\n          <img src="{{chatWebsite.remote}}/api/xchatty/assets?resource=images/like.png" alt="Good" height="50"/>\n        </label>\n        <label class="xc_rating_label" style="padding:30px;">\n          <input type="radio" name="data[Rating][rating]" value="bad"/>\n          <img src="{{chatWebsite.remote}}/api/xchatty/assets?resource=images/dislike.png" alt="Good" height="50"/>\n        </label>\n      </div>\n      <div class="xc_div_group">\n        <label for="ratingMessage" class="xc_label">Message</label>\n        <textarea id="ratingMessage" data-label="Message" maxlength="1500" name="data[Rating][message]" class="xc_input_rating_message"></textarea>\n      </div>\n      <button type="submit" class="xc_button_rating xc_btn_style">{{chatWebsite.rating_send}}</button>\n      <button type="button" class="xc_button_skip_rating xc_btn_style">{{chatWebsite.rating_skip}}</button>\n    </form>\n  </div>\n  <div class="xc_footer">\n    <div class="xc_powered"><a>Powered by Xenialab | Trademark xCALLY</a></div>\n  </div>\n</div>\n</div>\n'),a.put("app/channels/chat/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.general.name.$touched || form.general.$submitted) && form.general.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.general.name.$touched || form.general.$submitted) && form.general.name.$invalid && form.general.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.general.timeout.$touched || form.general.$submitted) && form.general.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required/>\n      <span data-ng-show="(form.general.timeout.$touched || form.general.$submitted) && form.general.timeout.$invalid && form.general.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START HEADER SHAPE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.general.strategy.$touched || form.general.$submitted) && form.general.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n        <ui-select-choices repeat="strategy in [\'rrmemory\',\'beepall\'] | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.general.strategy.$touched || form.general.$submitted) && form.general.strategy.$invalid && form.general.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END HEADER SHAPE -->\n\n\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/queue/list/list.html",'<div class="row">\n <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-puzzle"></i>\n                                           <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                            <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bubble"></i>\n                                           <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                                <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-docs"></i>\n                                             <a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n                                      </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle " href="#"  data-ng-click="createItem()">\n                                          <i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n                                 </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- BEGIN FORM-->\n                            <form action="index.html" class="form-horizontal form-row-seperated">\n                                 <div class="form-body">\n                                               <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n                                          <div class="input-group input-small mbottom20">\n                                                       <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n                                                 <div class="spinner-buttons input-group-btn btn-group-vertical">\n                                                              <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n                                                                       <i class="fa fa-angle-up"></i>\n                                                                </button>\n                                                             <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n                                                                   <i class="fa fa-angle-down"></i>\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="form-group last">\n                                                 <div class="col-md-12" id="multi-select-team">\n                                                        </div>\n                                                </div>\n                                        </div>\n                                </form>\n                               <!-- END FORM-->\n                      </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/chat/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bubble"></i>\n                                   <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                        <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="/channels/chat/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n                                     <i data-ng-show="queue" class="fa fa-angle-right"></i>\n                                </li>\n                         <li data-ng-show="queue">\n                                     <a href="#">{{queue.name}}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n                              </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{queue.name}}\n                                        </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.channels.chat.queues.view.settings\')}">\n                                                 <a data-ng-href="/channels/chat/queues/view/{{queue.id}}/settings">\n                                                   <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.channels.chat.queues.view.agents\')}">\n                                                   <a data-ng-href="/channels/chat/queues/view/{{queue.id}}/agents">\n                                                     <i class="icon-people"></i>\n                                                   {{ \'APPLICATION_AGENTS\' | translate}} </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/queue/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateChatQueue()" novalidate>\n                                     <!-- START NAME -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" required/>\n                                          <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END NAME -->\n\n                                   <!-- START DESCRIPTION -->\n                                    <div class="form-group">\n                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n                                      </div>\n                                        <!-- END DESCRIPTION -->\n\n                                    <!-- START TIMEOUT -->\n                                        <div class="form-group">\n                                              <label class="control-label">{{\'APPLICATION_AGENT\' | translate}} {{\'APPLICATION_TIMEOUT\' | translate}}</label>\n                                            <input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" min="1" data-ng-model="queue.timeout"/>\n                                        </div>\n                                        <!-- END TIMEOUT -->\n\n                                        <!-- START HEADER SHAPE -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n                                            <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n                                         <!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="chatWebsite.animation" required/> -->\n                                               <ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n                                                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n                                                     <ui-select-choices repeat="strategy in [\'rrmemory\',\'beepall\'] | filter: $select.search">\n                                                          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n                                                 </ui-select-choices>\n                                          </ui-select>\n                                  </div>\n                                        <!-- END HEADER SHAPE -->\n                                     <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/chat/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n        <div class="col-md-12">\n               <!-- START TABLE -->\n          <div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination auto-resize>\n                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n              </div>\n                <!-- END TABLE -->\n    </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/realtime/view/queue/queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initQueues()">\n        <div class="col-md-12">\n               <!-- START TABLE -->\n          <div ui-grid="gridOptions"  ui-grid-resize-columns class="ui-grid" ui-grid-tree-view auto-resize>\n                     <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n              </div>\n                <!-- END TABLE -->\n    </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
 a.put("app/channels/chat/realtime/view/session/session.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initSessions()">\n    <div class="col-md-12">\n               <!-- START TABLE -->\n          <div ui-grid="gridOptions"  ui-grid-resize-columns class="ui-grid" auto-resize>\n                       <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n              </div>\n                <!-- END TABLE -->\n    </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bubble"></i>\n                                   <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                        <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-energy"></i>\n                                   <a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <div>\n                 <nav class="navbar navbar-default" role="navigation">\n                         <div class="collapse navbar-collapse">\n                                        <ul class="nav navbar-nav">\n                                           <li data-ng-class="{\'active\': $state.is(\'main.channels.chat.realtime.view.agents\')}">\n                                                     <a href="/channels/chat/realtime/view/agents">\n                                                                {{\'APPLICATION_AGENTS\' | translate}}\n                                                        </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                        </nav>\n                </div>\n\n              <div ui-view></div>\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/visitor/list/list.html",'<div class="row">\n      <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-puzzle"></i>\n                                           <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                            <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bubble"></i>\n                                           <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                                <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-question"></i>\n                                         <a href="/channels/chat/visitors/list">{{ \'APPLICATION_VISITORS\' | translate }}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-question font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/visitor/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bubble"></i>\n                                   <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                        <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-question"></i>\n                                 <a href="/channels/chat/visitors/list">{{ \'APPLICATION_VISITORS\' | translate }}</a>\n                                 <i  class="fa fa-angle-right"></i>\n                            </li>\n                         <li data-ng-show="chatVisitor">\n                                       <a href="#">{{chatVisitor.fullname}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/visitor.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{chatVisitor.fullname}}\n                                      </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.channels.chat.visitors.view.profile\')}">\n                                                        <a data-ng-href="/channels/chat/visitors/view/{{chatVisitor.id}}/profile">\n                                                    <i class="icon-tag"></i>\n                                                      {{ \'APPLICATION_PROFILE\' | translate}} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/visitor/view/view.profile.html",'<div class="row">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_PROFILE\' | translate}}</span>\n                         </div>\n                        </div>\n                        <div class="portlet-body" data-ng-init="initView()">\n                          <div>\n                                 <h4 class="profile-desc-title">{{chatVisitor.email}}</h4>\n                                     <div class="margin-top-20 profile-desc-link">\n                                         <i class="icon-magnifier"></i>\n                                                <a href="#" class="inactive-link">{{chatVisitor.origin}}</a>\n                                  </div>\n                                        <div class="margin-top-20 profile-desc-link">\n                                         <i class="icon-globe"></i>\n                                            <a href="#" class="inactive-link">{{chatVisitor.remote_address}}</a>\n                                  </div>\n                                        <div class="margin-top-20 profile-desc-link">\n                                         <i class="icon-user"></i>\n                                             <a href="#" class="inactive-link">{{chatVisitor.user_agent | truncate: 50: \'...\'}}</a>\n                                      </div>\n                                        <div class="margin-top-20 profile-desc-link">\n                                         <i class="icon-flag"></i>\n                                             <a href="#" class="inactive-link">{{chatVisitor.visitor_language}}</a>\n                                        </div>\n                                        <div class="margin-top-20 profile-desc-link">\n                                         <i class="icon-home"></i>\n                                             <a href="#" class="inactive-link">{{chatVisitor.referer}}</a>\n                                 </div>\n                                        <div class="margin-top-20 profile-desc-link">\n                                         <i class="icon-cursor"></i>\n                                           <a href="#" class="inactive-link">{{chatVisitor.browser}}</a>\n                                 </div>\n                                        <div class="margin-top-20 profile-desc-link">\n                                         <i class="icon-screen-desktop"></i>\n                                           <a href="#" class="inactive-link">{{chatVisitor.os}}</a>\n                                      </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/chat/website/list/list.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bubble"></i>\n                                   <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n                                        <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-globe"></i>\n                                    <a href="#">{{ \'APPLICATION_WEB_SITES\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n        </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_WEB_SITES\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/channels/chat/websites/wizard">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_WEB_SITE\' | translate }}\n                                              </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/view/action/list/list.html",'<div class="row" data-ng-init="initActons()">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/channels/chat/websites/view/{{chatWebsite.id}}/actions/wizard" data-toggle="dropdown">\n                                                     <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n                                                </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/chat/website/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n      <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-directions font-green-sharp"></i>\n                                      <span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <form name="forms.settings" ng-submit="updateItem()" novalidate>\n                                      <!-- START APP -->\n                                    <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n                                          <label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                <ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n                                                     <ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                                                      <ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n                                                                <div ng-bind-html="app.name | highlight: $select.search"></div>\n                                                       </ui-select-choices>\n                                          </ui-select>\n                                          <span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END APP -->\n\n                                    <!-- START HOST -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n                                           <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                             <input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="0" required/>\n                                         <span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END HOST -->\n\n                                   <div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n                                          <!-- START QUEUE -->\n                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n                                                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                              <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n                                                                     <div ng-bind-html="queue.name | highlight: $select.search"></div>\n                                                             </ui-select-choices>\n                                                  </ui-select>\n                                                  <span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END QUEUE -->\n                                    </div>\n\n                                      <div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n                                          <!-- START AGENT -->\n                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n                                                       <label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n                                                          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n                                                                     <div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n                                                         </ui-select-choices>\n                                                  </ui-select>\n                                                  <span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END AGENT -->\n                                    </div>\n\n                                      <!-- START INTERVAL_TYPE -->\n                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n                                           <label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                              <ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n                                                        <ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n                                                               {{ intType.name | translate }}\n                                                        </ui-select-choices>\n                                          </ui-select>\n                                          <span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END INTERVAL_TYPE -->\n\n                                  <div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n                                                <!-- START TIME -->\n                                           <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                                                   <div class="input-group input-large">\n                                                         <fieldset class="pull-left" ng-disabled="application.alwaysTime">\n                                                                     <uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n                                                             </fieldset>\n                                                           <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                <fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n                                                              <!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n                                                     </div>\n                                                </div>\n                                                <!-- END TIME -->\n\n                                           <!-- START ALWAYS -->\n                                         <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n                                                 <div class="input-group input-large">\n                                                         <label class="control-label pointer-cursor">\n                                                                  <input\n                                                                                bs-switch\n                                                                             data-ng-model="application.alwaysTime"\n                                                                                type="checkbox"\n                                                                               switch-active="{{ isActive }}"\n                                                                                switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                                switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                                switch-on-color="{{ onColor }}"\n                                                                               switch-off-color="{{ offColor }}"\n                                                                             switch-animate="{{ animate }}"\n                                                                                switch-size="{{ size }}"\n                                                                              switch-label="{{ label }}"\n                                                                            switch-icon="{{ icon }}"\n                                                                              switch-radio-off="{{ radioOff }}"\n                                                                             switch-label-width="{{ labelWidth }}"\n                                                                         switch-handle-width="{{ handleWidth }}">\n                                                                      <!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n                                                               </label>\n                                                      </div>\n                                                </div>\n                                                <!-- END ALWAYS -->\n\n                                         <!-- START WEEKDAY -->\n                                                <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                                                        <div class="input-group input-large">\n                                                         <ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n                                                                      <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                     <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                {{ weekDay.name | translate}}\n                                                                 </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="input-group-addon">to</span>\n                                                             <ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n                                                                  <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                     <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                {{ weekDay.name | translate }}\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                  </div>\n                                                </div>\n                                                <!-- END WEEKDAY -->\n\n                                                <!-- START MONTHDAY -->\n                                               <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                                                       <div class="input-group input-large">\n                                                         <ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n                                                                      <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                               {{monthDay}}\n                                                                  </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="input-group-addon">to</span>\n                                                             <ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n                                                                  <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                               {{monthDay}}\n                                                                  </ui-select-choices>\n                                                          </ui-select>\n                                                  </div>\n                                                </div>\n                                                <!-- END MONTHDAY -->\n\n                                               <!-- START MONTH -->\n                                          <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                                                  <div class="input-group input-large">\n                                                         <ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n                                                                        <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                     <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                {{ month.name | translate }}\n                                                                  </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="input-group-addon">to</span>\n                                                             <ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n                                                                    <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                     <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                {{ month.name | translate }}\n                                                                  </ui-select-choices>\n                                                          </ui-select>\n                                                  </div>\n                                                </div>\n                                                <!-- END MONTH -->\n                                    </div>\n\n                                      <div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n                                          <!-- START INTERVALS -->\n                                              <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                    <ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n                                                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n                                                             <ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n                                                                    {{ interval.name}}\n                                                            </ui-select-choices>\n                                                  </ui-select>\n                                                  <span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END INTERVALS -->\n\n                                      </div>\n                                        <button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n                          </form>\n                       </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n        <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-directions font-green-sharp"></i>\n                                      <span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n                                     <wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n                                           <form name="forms.action" novalidate>\n                                                 <!-- START APP -->\n                                                    <div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n                                                               <label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                <ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n                                                                     <ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n                                                                                <div ng-bind-html="app.name | highlight: $select.search"></div>\n                                                                       </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END APP -->\n\n                                                    <!-- START HOST -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="0" required/>\n                                                         <span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END HOST -->\n\n                                                   <div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n                                                          <!-- START QUEUE -->\n                                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n                                                                     <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                        <ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n                                                                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                              <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n                                                                                     <div ng-bind-html="queue.name | highlight: $select.search"></div>\n                                                                             </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n                                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END QUEUE -->\n                                                    </div>\n\n                                                      <div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n                                                          <!-- START AGENT -->\n                                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n                                                                     <label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                        <ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n                                                                          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n                                                                                     <div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n                                                                         </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n                                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END AGENT -->\n                                                    </div>\n\n                                                      <!-- START INTERVAL_TYPE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n                                                         <label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                              <ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                        <ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n                                                                               {{ intType.name | translate }}\n                                                                        </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END INTERVAL_TYPE -->\n\n                                                  <div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n                                                                <!-- START TIME -->\n                                                           <div class="form-group">\n                                                                      <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                                                                   <div class="input-group input-large">\n                                                                         <fieldset class="pull-left" ng-disabled="application.alwaysTime">\n                                                                                     <uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n                                                                             </fieldset>\n                                                                           <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                                <fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n                                                                              <!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n                                                                     </div>\n                                                                </div>\n                                                                <!-- END TIME -->\n\n                                                           <!-- START ALWAYS -->\n                                                         <div class="form-group">\n                                                                      <label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n                                                                 <div class="input-group input-large">\n                                                                         <label class="control-label pointer-cursor">\n                                                                                  <input\n                                                                                                bs-switch\n                                                                                             data-ng-model="application.alwaysTime"\n                                                                                                type="checkbox"\n                                                                                               switch-active="{{ isActive }}"\n                                                                                                switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                                                switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                                                switch-on-color="{{ onColor }}"\n                                                                                               switch-off-color="{{ offColor }}"\n                                                                                             switch-animate="{{ animate }}"\n                                                                                                switch-size="{{ size }}"\n                                                                                              switch-label="{{ label }}"\n                                                                                            switch-icon="{{ icon }}"\n                                                                                              switch-radio-off="{{ radioOff }}"\n                                                                                             switch-label-width="{{ labelWidth }}"\n                                                                                         switch-handle-width="{{ handleWidth }}">\n                                                                                      <!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n                                                                               </label>\n                                                                      </div>\n                                                                </div>\n                                                                <!-- END ALWAYS -->\n\n                                                         <!-- START WEEKDAY -->\n                                                                <div class="form-group">\n                                                                      <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                                                                        <div class="input-group input-large">\n                                                                         <ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n                                                                                      <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                                     <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                                {{ weekDay.name | translate}}\n                                                                                 </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span class="input-group-addon">to</span>\n                                                                             <ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n                                                                                  <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                                     <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                                {{ weekDay.name | translate }}\n                                                                                        </ui-select-choices>\n                                                                          </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <!-- END WEEKDAY -->\n\n                                                                <!-- START MONTHDAY -->\n                                                               <div class="form-group">\n                                                                      <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                                                                       <div class="input-group input-large">\n                                                                         <ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n                                                                                      <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                                               {{monthDay}}\n                                                                                  </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span class="input-group-addon">to</span>\n                                                                             <ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n                                                                                  <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                                               {{monthDay}}\n                                                                                  </ui-select-choices>\n                                                                          </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <!-- END MONTHDAY -->\n\n                                                               <!-- START MONTH -->\n                                                          <div class="form-group">\n                                                                      <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                                                                  <div class="input-group input-large">\n                                                                         <ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n                                                                                        <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                                     <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                                {{ month.name | translate }}\n                                                                                  </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span class="input-group-addon">to</span>\n                                                                             <ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n                                                                                    <ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n                                                                                     <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                                {{ month.name | translate }}\n                                                                                  </ui-select-choices>\n                                                                          </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <!-- END MONTH -->\n                                                    </div>\n\n                                                      <div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n                                                          <!-- START INTERVALS -->\n                                                              <div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n                                                                   <label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                    <ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n                                                                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n                                                                             <ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n                                                                                    {{ interval.name}}\n                                                                            </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END INTERVALS -->\n\n                                                      </div>\n\n                                                      <input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n                                         </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <!-- <button class="btn green-haze" type="button" wz-previous><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button> -->\n                                              <input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                  </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
@@ -30,22 +30,22 @@ a.put("app/channels/voice/route/outbound/list/list.html",'<!-- BEGIN PAGE CONTEN
 a.put("app/channels/voice/route/outbound/view/view.routes.html",'<div ui-view class="profile-content">\n<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title  tabbable-line">\n                            <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group">\n                                               <a class="btn green-jungle " href="/channels/voice/routes/outbound/view/{{route.id}}/route" data-toggle="dropdown">\n                                                   <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n                                         </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div data-ng-if="selectedApp === undefined" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-draggable-rows>\n                                        <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/channels/voice/route/outbound/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_OUTBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                             </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body" data-ng-init="getContexts();getTags();">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateRoute()" novalidate>\n\n                                                       <!-- START EXTEN -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <input type="text" name="exten" placeholder="{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}" class="form-control" data-ng-model="route.exten" required/>\n                                                         <span data-ng-show="(forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$error.required" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END EXTEN -->\n\n                                                  <!-- START TAG -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.general.tag.$touched || forms.general.$submitted) && forms.general.tag.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_TAG\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select data-ng-model="route.tag" name="tag" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="tag.name as tag in tags | filter: $select.search">\n                                                                         <div ng-bind-html="tag.name | highlight: $select.search"></div>\n                                                                       </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="(forms.general.tag.$touched || forms.general.$submitted) && forms.general.tag.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TAG -->\n\n                                                    <!-- START CONTEXT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <ui-select data-ng-model="route.context" name="context" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n                                                                                <div ng-bind-html="context.name | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n                                                               </span>\n                                                               <span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONTEXT -->\n\n                                                        <!-- START RECORD -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': (forms.general.record.$touched || forms.general.$submitted) && forms.general.record.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_RECORDING\' | translate}}</label></br>\n                                                           <input\n                                                                    bs-switch\n                                                                         class="form-control"\n                                                              ng-model="route.record"\n                                                               type="checkbox"\n                                                               switch-active="{{ recordSwitch.isActive }}"\n                                                                   switch-on-text="{{ recordSwitch.onText }}"\n                                                                    switch-off-text="{{ recordSwitch.offText }}"\n                                                                  switch-on-color="{{ recordSwitch.onColor }}"\n                                                                  switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                                   switch-size="{{ recordSwitch.size }}"\n                                                                 switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                                 switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                                    switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                             <span data-ng-show="(forms.general.record.$touched || forms.general.$submitted) && forms.general.record.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END RECORD -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="route.description"/></textarea>\n                                                        </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/voice/route/view.application.html",'\n<div class="row" data-ng-init="initApplication(true); getIntervals();">\n  <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_NEW_APPLICATION\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="addApplication()">\n                                 <div class="profile-usertitle-name">\n                                          {{(main.app | capitalize) || \'Application\'}}\n                                        </div>\n                <wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.settings.$valid)">\n                                                 <form name="forms.settings" novalidate>\n                                                               <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                                  <!-- START APP -->\n                                                                    <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n                                                                          <label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                <ui-select data-ng-model="main.app" name="app" theme="bootstrap" required>\n                                                <ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                                              <ui-select-choices repeat="app.value as app in $application.applications| filter: $select.search">\n                                                      <div ng-bind-html="app.name | highlight: $select.search"></div>\n                                             </ui-select-choices>\n                                                </ui-select>\n                                                                                <span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END APP -->\n\n                                                                    <div id="Queue" class="app-settings" ng-slide-down="main.app == \'Queue\'" lazy-render duration="1">\n                                                                          <!-- START QUEUE -->\n                                                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n                                                                                       <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                                        <ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="queue" theme="bootstrap" required data-ng-disabled="!items.length">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                              <ui-select-choices repeat="queue.name as queue in items | filter: $select.search">\n                                                                                                    <div ng-bind-html="queue.name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                                  <div class="note note-warning" data-ng-hide="items.length">\n                                                                                           <h4 class="block">Warning!</h4>\n                                                                                               <p>\n                                                                                                   {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                                                                                             </p>\n                                                                                          <p>\n                                                                                                   {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                                                                                                </p>\n                                                                                  </div>\n                                                                                        <span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n                                                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END QUEUE -->\n\n                                                                          <!-- START OPTIONS -->\n                                                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n                                                                                   <label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n                                                                                  <input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n                                                                                       <span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n                                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END OPTIONS -->\n                                                                          <!-- START URL -->\n                                                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n                                                                                   <label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n                                                                                    <input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n                                                                                   <span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n                                                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END URL -->\n\n                                                                            <!-- START AUDIOFILE -->\n                                                                              <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n                                                                                       <label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}</label>\n                                                                                       <ui-select data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null" name="audiofile" theme="bootstrap" data-ng-disabled="!items2.length">\n                                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                                              <ui-select-choices repeat="soundPath+\'/\'+audio.save_name as audio in items2 | filter: $select.search">\n                                                                                                      <div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                                  <div class="note note-warning" data-ng-hide="items2.length">\n                                                                                          <h4 class="block">Warning!</h4>\n                                                                                               <p>\n                                                                                                   {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n                                                                                             </p>\n                                                                                          <p>\n                                                                                                   {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n                                                                                         </p>\n                                                                                  </div>\n                                                                                        <span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n                                                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END AUDIOFILE -->\n\n                                                                              <!-- START TIMEOUT -->\n                                                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n                                                                                   <label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n                                                                                        <input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[4]" data-ng-init="application.appdata[4] = null">\n                                                                                   <span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n                                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END TIMEOUT -->\n\n                                                                        </div>\n                                                                        <div id="Playback" class="app-settings" ng-slide-down="main.app == \'Playback\'" lazy-render duration="1">\n                                                                            <!-- START AUDIOFILE -->\n                                                                              <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n                                                                                       <label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                                   <ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="audiofile" theme="bootstrap" required data-ng-disabled="!items.length">\n                                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                                              <ui-select-choices repeat="soundPath+\'/\'+audio.save_name as audio in items | filter: $select.search">\n                                                                                                       <div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                                  <div class="note note-warning" data-ng-hide="items.length">\n                                                                                           <h4 class="block">Warning!</h4>\n                                                                                               <p>\n                                                                                                   {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n                                                                                             </p>\n                                                                                          <p>\n                                                                                                   {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n                                                                                         </p>\n                                                                                  </div>\n                                                                                        <span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n                                                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END AUDIOFILE -->\n\n                                                                              <!-- START OPTIONS -->\n                                                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n                                                                                   <label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n                                                                                  <input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n                                                                                       <span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n                                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END OPTIONS -->\n                                                                  </div>\n                                                                        <div id="Dial" class="app-settings" ng-slide-down="main.app == \'Dial\'" lazy-render duration="1">\n                                                                            <!-- START INTERFACE -->\n                                                                              <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid}">\n                                                                                       <label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}/{{ \'APPLICATION_IDENTIFIER\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                  <input type="text" name="interface" placeholder="SIP/0000" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" required>\n                                                                                 <span data-ng-show="(forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid && forms.settings.interface.$error.required" class="help-block help-block-error">\n                                                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END INTERFACE -->\n\n                                                                              <!-- START TIMEOUT -->\n                                                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n                                                                                   <label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n                                                                                        <input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n                                                                                   <span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n                                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END TIMEOUT -->\n\n                                                                                <!-- START OPTIONS -->\n                                                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n                                                                                   <label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n                                                                                        <input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n                                                                                        <span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n                                                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END OPTIONS -->\n\n                                                                                <!-- START URL -->\n                                                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n                                                                                   <label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n                                                                                    <input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n                                                                                   <span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n                                                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END URL -->\n                                                                      </div>\n                                                                        <div id="AGI" class="app-settings" ng-slide-down="main.app == \'AGI\'" lazy-render duration="1">\n                                                                              <!-- START PROJECT -->\n                                                                                <input type="hidden" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = \'agi://127.0.0.1/square\'">\n                                                                           <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$invalid}">\n                                                                                   <label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                                      <ui-select data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" name="project" theme="bootstrap" required data-ng-disabled="!items.length">\n                                                                                            <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                              <ui-select-choices repeat="project.name as project in items | filter: $select.search">\n                                                                                                        <div ng-bind-html="project.name | highlight: $select.search"></div>\n                                                                                           </ui-select-choices>\n                                                                                  </ui-select>\n                                                                                  <div class="note note-warning" data-ng-hide="items.length">\n                                                                                           <h4 class="block">Warning!</h4>\n                                                                                               <p>\n                                                                                                   {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n                                                                                           </p>\n                                                                                          <p>\n                                                                                                   {{\'APPLICATION_GO_TO\' | translate}} <a href="/square/projects/list">{{\'APPLICATION_PROJECTS\' | translate}}</a>\n                                                                                            </p>\n                                                                                  </div>\n                                                                                        <span data-ng-show="(forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$error.required" class="help-block help-block-error">\n                                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END PROJECT -->\n\n                                                                        </div>\n                                                                        <div id="Goto" class="app-settings" ng-slide-down="main.app == \'Goto\'" lazy-render duration="1">\n                                                                            <!-- START CONTEXT -->\n                                                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$invalid}">\n                                                                                   <label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                                      <ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="context" theme="bootstrap" required>\n                                                                                             <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                              <ui-select-choices repeat="context.name as context in items | filter: $select.search">\n                                                                                                        <div ng-bind-html="context.name | highlight: $select.search"></div>\n                                                                                           </ui-select-choices>\n                                                                                  </ui-select>\n                                                                                  <span data-ng-show="(forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$error.required" class="help-block help-block-error">\n                                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END CONTEXT -->\n\n                                                                                <!-- START EXTENSION -->\n                                                                              <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid}">\n                                                                                       <label class="control-label">{{ \'APPLICATION_EXTENSION\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                  <input type="text" name="extension" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" required>\n                                                                                 <span data-ng-show="(forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid && forms.settings.extension.$error.required" class="help-block help-block-error">\n                                                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END EXTENSION -->\n\n                                                                              <!-- START PRIORITY -->\n                                                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid}">\n                                                                                 <label class="control-label">{{ \'APPLICATION_PRIORITY\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                   <input type="text" pattern="[0-9]+" name="priority" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null" required>\n                                                                                 <span data-ng-show="(forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid" class="help-block help-block-error">\n                                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END PRIORITY -->\n                                                                 </div>\n                                                                        <div id="Hangup" class="app-settings" ng-slide-down="main.app == \'Hangup\'" lazy-render duration="1">\n                                                                                <!-- START HANGUPCAUSE -->\n                                                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$invalid}">\n                                                                                   <label class="control-label">{{\'APPLICATION_HANGUP_CAUSE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                                 <ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" theme="bootstrap" name="hangupCause" required>\n                                                                                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                          <ui-select-choices repeat="hangupCause.value as hangupCause in $application.hangupCauses | filter: $select.search">\n                                                                                                   <div ng-bind-html="hangupCause.name  | translate | highlight: $select.search"></div>\n                                                                                          </ui-select-choices>\n                                                                                  </ui-select>\n                                                                                  <span data-ng-show="(forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$error.required" class="help-block help-block-error">\n                                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END HANGUPCAUSE -->\n                                                                      </div>\n                                                                        <div id="Set" class="app-settings" ng-slide-down="main.app == \'Set\'" lazy-render duration="1">\n                                                                              <!-- START VARIABLE -->\n                                                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid}">\n                                                                                 <label class="control-label">{{ \'APPLICATION_VARIABLE\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                   <input type="text" name="variable" placeholder="" class="form-control" data-ng-model="application.variable" data-ng-init="application.appdata[0] = null" data-ng-change="updateSetAppdata()" required>\n                                                                                        <span data-ng-show="(forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid && forms.settings.variable.$error.required" class="help-block help-block-error">\n                                                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END VARIABLE -->\n\n                                                                               <!-- START VARVALUE -->\n                                                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid}">\n                                                                                 <label class="control-label">{{ \'APPLICATION_VALUE\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                      <input type="text" name="varvalue" placeholder="" class="form-control" data-ng-model="application.value" data-ng-change="updateSetAppdata()" required>\n                                                                                        <span data-ng-show="(forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid && forms.settings.varvalue.$error.required" class="help-block help-block-error">\n                                                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END VARVALUE -->\n                                                                 </div>\n                                                                        <div id="Custom" class="app-settings" ng-slide-down="main.app == \'custom\'" lazy-render duration="1">\n\n                                                                              <!-- START CUSTOMAPP -->\n                                                                              <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid}">\n                                                                                      <label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                 <input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="application.app" required>\n                                                                                 <span data-ng-show="(forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid && forms.settings.customApp.$error.required" class="help-block help-block-error">\n                                                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END CUSTOMAPP -->\n\n                                                                              <!-- START APPDATA -->\n                                                                                <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid}">\n                                                                                  <label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n                                                                                      <input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null">\n                                                                                 <span data-ng-show="(forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid && forms.settings.appdata.$error.required" class="help-block help-block-error">\n                                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END APPDATA -->\n                                                                  </div>\n                                                                        <div id="Voicemail" class="app-settings" ng-slide-down="main.app == \'Voicemail\'" lazy-render duration="1">\n                                                                          <!-- START VOICEMAIL -->\n                                                                              <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid}">\n                                                                                      <label class="control-label">{{ \'APPLICATION_MAILBOX\' | translate }}@{{ \'APPLICATION_CONTEXT\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                                  <ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" theme="bootstrap" name="voicemail" required data-ng-disabled="!items.length">\n                                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.mailbox}}</ui-select-match>\n                                                                                           <ui-select-choices repeat="mailbox.mailbox+\'@\'+mailbox.context as mailbox in items | filter: $select.search">\n                                                                                                       <div ng-bind-html="mailbox.mailbox | highlight: $select.search"></div>\n                                                                                                </ui-select-choices>\n                                                                                  </ui-select>\n                                                                                  <div class="note note-warning" data-ng-hide="items.length">\n                                                                                           <h4 class="block">Warning!</h4>\n                                                                                               <p>\n                                                                                                   {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n                                                                                         </p>\n                                                                                          <p>\n                                                                                                   {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/voicemails/list">{{\'APPLICATION_VOICEMAILS\' | translate}}</a>\n                                                                                                </p>\n                                                                                  </div>\n                                                                                        <span data-ng-show="(forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid && forms.settings.voicemail.$error.required" class="help-block help-block-error">\n                                                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                 </span>\n                                                                               </div>\n                                                                                <!-- END VOICEMAIL -->\n                                                                        </div>\n                                                                        <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                          </form>\n                                                               </wz-step>\n                                                                    <wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n                                                                               <form name="forms.interval" novalidate>\n                                                                               <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                                             <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                                  <!-- START INTERVAL_TYPE -->\n                                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n                                                                           <label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                                <ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n                                                                                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                  <ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n                                                                                               <div ng-bind-html="intType.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n                                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END INTERVAL_TYPE -->\n                                                                    <div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n                                                                                        <!-- START TIME -->\n                                                                                   <div class="form-group">\n                                                                                              <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                                                                                           <div class="input-group input-large">\n                                                                                                 <fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                                                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                                                        <fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                                                       <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n                                                                                         </div>\n                                                                                        </div>\n                                                                                        <!-- END TIME -->\n\n                                                                                   <!-- START WEEKDAY -->\n                                                                                        <div class="form-group">\n                                                                                              <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                                                                                                <div class="input-group input-large">\n                                                                                                 <ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n                                                                                                         <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                               <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                                                        {{$translate.instant(weekDay.name)}}\n                                                                                                          </ui-select-choices>\n                                                                                                  </ui-select>\n                                                                                                  <span class="input-group-addon">to</span>\n                                                                                                     <ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n                                                                                                             <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                               <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                                                        {{$translate.instant(weekDay.name)}}\n                                                                                                          </ui-select-choices>\n                                                                                                  </ui-select>\n                                                                                          </div>\n                                                                                        </div>\n                                                                                        <!-- END WEEKDAY -->\n\n                                                                                        <!-- START MONTHDAY -->\n                                                                                       <div class="form-group">\n                                                                                              <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                                                                                               <div class="input-group input-large">\n                                                                                                 <ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n                                                                                                         <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                                                               <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                                                                       {{monthDay}}\n                                                                                                          </ui-select-choices>\n                                                                                                  </ui-select>\n                                                                                                  <span class="input-group-addon">to</span>\n                                                                                                     <ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n                                                                                                             <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                                                               <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                                                                       {{monthDay}}\n                                                                                                          </ui-select-choices>\n                                                                                                  </ui-select>\n                                                                                          </div>\n                                                                                        </div>\n                                                                                        <!-- END MONTHDAY -->\n\n                                                                                       <!-- START MONTH -->\n                                                                                  <div class="form-group">\n                                                                                              <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                                                                                          <div class="input-group input-large">\n                                                                                                 <ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n                                                                                                           <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                               <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                                                        {{$translate.instant(month.name)}}\n                                                                                                            </ui-select-choices>\n                                                                                                  </ui-select>\n                                                                                                  <span class="input-group-addon">to</span>\n                                                                                                     <ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n                                                                                                               <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                               <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                                                        {{$translate.instant(month.name)}}\n                                                                                                            </ui-select-choices>\n                                                                                                  </ui-select>\n                                                                                          </div>\n                                                                                        </div>\n                                                                                        <!-- END MONTH -->\n                                                    </div>\n\n                                                      <div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n                                                                <!-- START INTERVALS -->\n                                                              <div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n                                                                     <label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                    <ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n                                                                          <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                          <ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n                                                                                    {{$translate.instant(interval.name)}}\n                                                                         </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n                                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END INTERVALS -->\n\n                                                      </div>\n                                                                <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                             <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                  </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n<!-- <pre>\n  {{application | json}}\n</pre>\n<pre>\n {{interval | json}}\n</pre> -->\n'),
 a.put("app/channels/voice/route/view.applicationSettings.html",'\n<div class="row" data-ng-init="initApplication();getIntervals();getApplication();">\n        <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD</a> </span>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="updateRoute(\'applications\')">\n                                    <div class="profile-usertitle-name">\n                                          {{(main.app | capitalize) || \'Application\'}}\n                                        </div>\n                <wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.settings.$valid)">\n                                                 <form name="forms.settings" novalidate>\n\n                                                             <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                          <div id="Queue" class="app-settings" ng-slide-down="main.app == \'Queue\'" lazy-render duration="1">\n                                                                  <!-- START QUEUE -->\n                                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n                                                                               <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                                <ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="queue" theme="bootstrap" required data-ng-disabled="!items.length">\n                                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                      <ui-select-choices repeat="queue.name as queue in items | filter: $select.search">\n                                                                                            <div ng-bind-html="queue.name | highlight: $select.search"></div>\n                                                                                     </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <div class="note note-warning" data-ng-hide="items.length">\n                                                                                   <h4 class="block">Warning!</h4>\n                                                                                       <p>\n                                                                                           {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                                                                                     </p>\n                                                                                  <p>\n                                                                                           {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                                                                                        </p>\n                                                                          </div>\n                                                                                <span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n                                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END QUEUE -->\n\n                                                                  <!-- START OPTIONS -->\n                                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n                                                                           <label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n                                                                          <ui-select multiple data-ng-model="route.Applications[selectedApp].appdata[1]" theme="bootstrap" name="app_options">\n                                                                                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($item.name)}}</ui-select-match>\n                                                                                     <ui-select-choices repeat="queueOpt.value as queueOpt in $application.queueOptions | filter: $select.search">\n                                                                                         {{$translate.instant(queueOpt.name)}}\n                                                                                 </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n                                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END OPTIONS -->\n\n                                                                        <!-- START URL -->\n                                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n                                                                           <label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n                                                                            <input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n                                                                            <span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END URL -->\n\n                                                                    <!-- START AUDIOFILE -->\n                                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n                                                                               <label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}</label>\n                                                                               <ui-select data-ng-model="route.Applications[selectedApp].appdata[3]" name="audiofile" theme="bootstrap" data-ng-disabled="!items2.length">\n                                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                                      <ui-select-choices repeat="soundPath+\'/\'+audio.save_name as audio in items2 | filter: $select.search">\n                                                                                              <div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n                                                                                     </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <div class="note note-warning" data-ng-hide="items2.length">\n                                                                                  <h4 class="block">Warning!</h4>\n                                                                                       <p>\n                                                                                           {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n                                                                                     </p>\n                                                                                  <p>\n                                                                                           {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n                                                                                 </p>\n                                                                          </div>\n                                                                                <span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n                                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END AUDIOFILE -->\n\n                                                                      <!-- START TIMEOUT -->\n                                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n                                                                           <label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n                                                                                <input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[4]">\n                                                                            <span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END TIMEOUT -->\n\n                                                                </div>\n                                                                <div id="Playback" class="app-settings" ng-slide-down="main.app == \'Playback\'" lazy-render duration="1">\n                                                                    <!-- START AUDIOFILE -->\n                                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n                                                                               <label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                           <ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="audiofile" theme="bootstrap" required data-ng-disabled="!items.length">\n                                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n                                                                                      <ui-select-choices repeat="soundPath+\'/\'+audio.save_name as audio in items | filter: $select.search">\n                                                                                               <div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n                                                                                     </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <div class="note note-warning" data-ng-hide="items.length">\n                                                                                   <h4 class="block">Warning!</h4>\n                                                                                       <p>\n                                                                                           {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n                                                                                     </p>\n                                                                                  <p>\n                                                                                           {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n                                                                                 </p>\n                                                                          </div>\n                                                                                <span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n                                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END AUDIOFILE -->\n\n                                                                      <!-- START OPTIONS -->\n                                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n                                                                           <label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n                                                                          <ui-select data-ng-model="route.Applications[selectedApp].appdata[1]" theme="bootstrap" name="app_options">\n                                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                  <ui-select-choices repeat="audioOpt.value as audioOpt in $application.audioOptions | filter: $select.search">\n                                                                                         {{$translate.instant(audioOpt.name)}}\n                                                                                 </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n                                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END OPTIONS -->\n                                                          </div>\n                                                                <div id="Dial" class="app-settings" ng-slide-down="main.app == \'Dial\'" lazy-render duration="1">\n                                                                    <!-- START INTERFACE -->\n                                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid}">\n                                                                               <label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}/{{ \'APPLICATION_IDENTIFIER\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                          <input type="text" name="interface" placeholder="SIP/0000" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" required>\n                                                                          <span data-ng-show="(forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid && forms.settings.interface.$error.required" class="help-block help-block-error">\n                                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END INTERFACE -->\n\n                                                                      <!-- START TIMEOUT -->\n                                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n                                                                           <label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n                                                                                <input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n                                                                            <span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END TIMEOUT -->\n\n                                                                        <!-- START OPTIONS -->\n                                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n                                                                           <label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n                                                                                <input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n                                                                         <span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END OPTIONS -->\n\n                                                                        <!-- START URL -->\n                                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n                                                                           <label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n                                                                            <input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n                                                                            <span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END URL -->\n                                                              </div>\n                                                                <div id="AGI" class="app-settings" ng-slide-down="main.app == \'AGI\'" lazy-render duration="1">\n                                                                      <!-- START PROJECT -->\n                                                                        <input type="hidden" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" data-ng-init="route.Applications[selectedApp].appdata[0] = \'agi://127.0.0.1/square\'">\n                                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$invalid}">\n                                                                           <label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                              <ui-select data-ng-model="route.Applications[selectedApp].appdata[1]" name="project" theme="bootstrap" required data-ng-disabled="!items.length">\n                                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                      <ui-select-choices repeat="project.name as project in items | filter: $select.search">\n                                                                                                <div ng-bind-html="project.name | highlight: $select.search"></div>\n                                                                                   </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <div class="note note-warning" data-ng-hide="items.length">\n                                                                                   <h4 class="block">Warning!</h4>\n                                                                                       <p>\n                                                                                           {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n                                                                                   </p>\n                                                                                  <p>\n                                                                                           {{\'APPLICATION_GO_TO\' | translate}} <a href="/square/projects/list">{{\'APPLICATION_PROJECTS\' | translate}}</a>\n                                                                                    </p>\n                                                                          </div>\n                                                                                <span data-ng-show="(forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$error.required" class="help-block help-block-error">\n                                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END PROJECT -->\n\n                                                                        <!-- START URL -->\n                                                                    <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n                                                                              <label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n                                                                            <div class="input-group">\n                                                                                     <input type="text" name="url" placeholder="agi://127.0.0.1/square" class="form-control" data-ng-model="application.url" data-ng-disabled="!application.urlEnabled" data-ng-required="application.urlEnabled" rpattern="/^agi:\\/\\/(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\/square$/">\n                                                                                        <span class="input-group-addon">\n                                                                                              <input type="checkbox" data-ng-model="application.urlEnabled">\n                                                                                        </span>\n                                                                               </div>\n                                                                                <span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                               <span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.pattern" class="help-block help-block-error">\n                                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                                                                           </span>\n                                                                       </div> -->\n                                                                    <!-- END URL -->\n\n                                                            </div>\n                                                                <div id="Goto" class="app-settings" ng-slide-down="main.app == \'Goto\'" lazy-render duration="1">\n                                                                    <!-- START CONTEXT -->\n                                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$invalid}">\n                                                                           <label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                              <ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="context" theme="bootstrap" required>\n                                                                                      <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                      <ui-select-choices repeat="context.name as context in items | filter: $select.search">\n                                                                                                <div ng-bind-html="context.name | highlight: $select.search"></div>\n                                                                                   </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$error.required" class="help-block help-block-error">\n                                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END CONTEXT -->\n\n                                                                        <!-- START EXTENSION -->\n                                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid}">\n                                                                               <label class="control-label">{{ \'APPLICATION_EXTENSION\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                          <input type="text" name="extension" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]" required>\n                                                                          <span data-ng-show="(forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid && forms.settings.extension.$error.required" class="help-block help-block-error">\n                                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END EXTENSION -->\n\n                                                                      <!-- START PRIORITY -->\n                                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid}">\n                                                                         <label class="control-label">{{ \'APPLICATION_PRIORITY\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                           <input type="text" pattern="[0-9]+" name="priority" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]" required>\n                                                                          <span data-ng-show="(forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END PRIORITY -->\n                                                         </div>\n                                                                <div id="Hangup" class="app-settings" ng-slide-down="main.app == \'Hangup\'" lazy-render duration="1">\n                                                                        <!-- START HANGUPCAUSE -->\n                                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$invalid}">\n                                                                           <label class="control-label">{{\'APPLICATION_HANGUP_CAUSE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                         <ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" theme="bootstrap" name="hangupCause" required>\n                                                                                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                  <ui-select-choices repeat="hangupCause.value as hangupCause in $application.hangupCauses | filter: $select.search">\n                                                                                           {{$translate.instant(hangupCause.name)}}\n                                                                                      </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$error.required" class="help-block help-block-error">\n                                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END HANGUPCAUSE -->\n                                                              </div>\n                                                                <div id="Set" class="app-settings" ng-slide-down="main.app == \'Set\'" lazy-render duration="1">\n                                                                      <!-- START VARIABLE -->\n                                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid}">\n                                                                         <label class="control-label">{{ \'APPLICATION_VARIABLE\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                           <input type="text" name="variable" placeholder="" class="form-control" data-ng-model="application.variable" data-ng-change="updateSetAppdataSettings()" required>\n                                                                             <span data-ng-show="(forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid && forms.settings.variable.$error.required" class="help-block help-block-error">\n                                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END VARIABLE -->\n\n                                                                       <!-- START VARVALUE -->\n                                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid}">\n                                                                         <label class="control-label">{{ \'APPLICATION_VALUE\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                              <input type="text" name="varvalue" placeholder="" class="form-control" data-ng-model="application.value" data-ng-change="updateSetAppdataSettings()" required>\n                                                                                <span data-ng-show="(forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid && forms.settings.varvalue.$error.required" class="help-block help-block-error">\n                                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END VARVALUE -->\n                                                         </div>\n                                                                <div id="Custom" class="app-settings" ng-slide-down="main.app == \'custom\'" lazy-render duration="1">\n\n                                                                      <!-- START CUSTOMAPP -->\n                                                                      <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid}">\n                                                                              <label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                         <input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].app" required>\n                                                                             <span data-ng-show="(forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid && forms.settings.customApp.$error.required" class="help-block help-block-error">\n                                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END CUSTOMAPP -->\n\n                                                                      <!-- START APPDATA -->\n                                                                        <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid}">\n                                                                          <label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n                                                                              <input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]">\n                                                                          <span data-ng-show="(forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid && forms.settings.appdata.$error.required" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END APPDATA -->\n                                                          </div>\n                                                                <div id="Voicemail" class="app-settings" ng-slide-down="main.app == \'Voicemail\'" lazy-render duration="1">\n                                                                  <!-- START VOICEMAIL -->\n                                                                      <div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid}">\n                                                                              <label class="control-label">{{ \'APPLICATION_MAILBOX\' | translate }}@{{ \'APPLICATION_CONTEXT\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                          <ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" theme="bootstrap" name="voicemail" required data-ng-disabled="!items.length">\n                                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.mailbox}}</ui-select-match>\n                                                                                   <ui-select-choices repeat="mailbox.mailbox+\'@\'+mailbox.context as mailbox in items | filter: $select.search">\n                                                                                               <div ng-bind-html="mailbox.mailbox | highlight: $select.search"></div>\n                                                                                        </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <div class="note note-warning" data-ng-hide="items.length">\n                                                                                   <h4 class="block">Warning!</h4>\n                                                                                       <p>\n                                                                                           {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n                                                                                 </p>\n                                                                                  <p>\n                                                                                           {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/voicemails/list">{{\'APPLICATION_VOICEMAILS\' | translate}}</a>\n                                                                                        </p>\n                                                                          </div>\n                                                                                <span data-ng-show="(forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid && forms.settings.voicemail.$error.required" class="help-block help-block-error">\n                                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <!-- END VOICEMAIL -->\n                                                                </div>\n                                                                <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                  </form>\n                                                       </wz-step>\n                                                            <wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n                                                                       <form name="forms.interval" novalidate>\n                                                                               <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                                             <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                          <!-- START INTERVAL_TYPE -->\n                                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n                                                                   <label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                        <ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n                                                                                <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                          <ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n                                                                                       {{$translate.instant(intType.name)}}\n                                                                          </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END INTERVAL_TYPE -->\n                                                            <div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n                                                                                <!-- START TIME -->\n                                                                           <div class="form-group">\n                                                                                      <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                                                                                   <div class="input-group input-large">\n                                                                                         <fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                                          <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                                                <fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                                               <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n                                                                                 </div>\n                                                                                        </div>\n                                                                                <!-- END TIME -->\n\n                                                                           <!-- START WEEKDAY -->\n                                                                                <div class="form-group">\n                                                                                      <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                                                                                        <div class="input-group input-large">\n                                                                                         <ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n                                                                                                 <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                       <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                                                {{$translate.instant(weekDay.name)}}\n                                                                                                  </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span class="input-group-addon">to</span>\n                                                                                             <ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n                                                                                                     <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                       <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                                                                                                                {{$translate.instant(weekDay.name)}}\n                                                                                                  </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                  </div>\n                                                                                </div>\n                                                                                <!-- END WEEKDAY -->\n\n                                                                                <!-- START MONTHDAY -->\n                                                                               <div class="form-group">\n                                                                                      <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                                                                                       <div class="input-group input-large">\n                                                                                         <ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n                                                                                                 <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                                                               {{monthDay}}\n                                                                                                  </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span class="input-group-addon">to</span>\n                                                                                             <ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n                                                                                                     <ui-select-match>{{$select.selected}}</ui-select-match>\n                                                                                                       <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                                                                                                               {{monthDay}}\n                                                                                                  </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                  </div>\n                                                                                </div>\n                                                                                <!-- END MONTHDAY -->\n\n                                                                               <!-- START MONTH -->\n                                                                          <div class="form-group">\n                                                                                      <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                                                                                  <div class="input-group input-large">\n                                                                                         <ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n                                                                                                   <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                       <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                                                {{$translate.instant(month.name)}}\n                                                                                                    </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                          <span class="input-group-addon">to</span>\n                                                                                             <ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n                                                                                                       <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                                                       <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                                                                                                                {{$translate.instant(month.name)}}\n                                                                                                    </ui-select-choices>\n                                                                                          </ui-select>\n                                                                                  </div>\n                                                                                </div>\n                                                                                <!-- END MONTH -->\n                                            </div>\n\n                                              <div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n                                                        <!-- START INTERVALS -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                            <ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n                                                                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                                                                  <ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n                                                                            {{$translate.instant(interval.name)}}\n                                                                 </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END INTERVALS -->\n\n                                              </div>\n                                                <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                                  </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
 a.put("app/channels/voice/voicemail/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n   <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-envelope-letter"></i>\n                                  <a href="#">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n                          </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-envelope-letter font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a> </span>\n                                </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="/channels/voice/voicemails/wizard">\n                                         <i class="icon-plus"></i> {{ \'APPLICATION_NEW_VOICEMAIL\' | translate }}\n                                     </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/voicemail/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getVoicemail()">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-envelope-letter"></i>\n                                  <a href="/channels/voice/voicemails/list">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n                                    <i data-ng-show="voicemail" class="fa fa-angle-right"></i>\n                            </li>\n                         <li data-ng-show="voicemail">\n                                 <a href="#">{{voicemail.mailbox}}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET main.channels -->\n                        <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/voicemail.png" class="img-responsive">\n                          </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{voicemail.mailbox}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.channels.voice.voicemails.view.settings\')}">\n                                                    <a data-ng-href="/channels/voice/voicemails/view/{{voicemail.uniqueid}}/settings"><i class="icon-settings"></i>{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                         </li>\n                                         <li data-ng-class="{active: $state.is(\'main.channels.voice.voicemails.view.messages\')}">\n                                                    <a data-ng-href="/channels/voice/voicemails/view/{{voicemail.uniqueid}}/messages"><i class="icon-speech"></i>{{ \'APPLICATION_MESSAGES\' | translate}} </a>\n                                           </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET main.channels -->\n            </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/voicemail/view/view.messages.html",'<div class="row" data-ng-init="getMessages()">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title  tabbable-line">\n                            <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_MESSAGES\' | translate}}</span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns data-ng-if="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                 <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/voice/voicemail/view/view.settings.html",'<div class="row" data-ng-init="getContexts()">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_VOICEMAIL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                           </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                                 <!-- <li>\n                                             <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n                                    </li> -->\n                             </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateVoiceVoicemail()" novalidate>\n\n                                                      <!-- START FULLNAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.fullname.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="voicemail.fullname" required/>\n                                                          <span data-ng-show="forms.general.$submitted && forms.general.fullname.$invalid" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END FULLNAME -->\n\n                                                       <!-- START EMAIL -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.email.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="voicemail.email" required/>\n                                                          <span data-ng-show="forms.general.$submitted && forms.general.host.$invalid" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END EMAIL -->\n\n                                                  <!-- START PASSWORD -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}</label>\n                                                             <input type="password" name="password" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="voicemail.password" />\n                                                          <span data-ng-show="forms.general.$submitted && forms.general.password.$invalid" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n                                                       <!-- START CONFIRM PASSWORD -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.rpassword.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}</label>\n                                                         <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="voicemail.rpassword" nx-equal="voicemail.password"/>\n                                                               <span data-ng-show="forms.general.$submitted && (forms.general.rpassword.$invalid || forms.general.rpassword.$invalid)" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONFIRM PASSWORD -->\n\n                                                       <!-- START MAILBOX -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.mailbox.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="voicemail.mailbox" required readonly/>\n                                                            <span data-ng-show="forms.general.$submitted && forms.general.mailbox.$invalid" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END MAILBOX -->\n\n                                                        <!-- START CONTEXT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <ui-select data-ng-model="voicemail.context" name="context" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n                                                                                <div ng-bind-html="context.name | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n                                                               </span>\n                                                               <span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONTEXT -->\n\n                                                        <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n                                      <!-- ADVANCED TAB -->\n                                 <!-- <div class="tab-pane" id="tab_1_2">\n                                              <form name="forms.advanced" data-ng-submit="updateVoiceVoicemail()" novalidate>\n\n\n                                                   <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div> -->\n                                    <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/channels/voice/voicemail/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard()">\n  <!-- BEGIN PAGE HEADER-->\n  <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-puzzle"></i>\n                           <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n                            <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-envelope-letter"></i>\n                          <a href="/channels/voice/voicemails/list">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n                            <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                      </li>\n         </ul>\n </div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="getFirstFreeMailbox()">\n     <div class="portlet-title">\n           <div class="caption font-green-sharp">\n                        <i class="icon-envelope-letter font-green-sharp"></i>\n                         <span class="caption-subject">{{ \'APPLICATION_VOICEMAIL\' | translate }} WIZARD</a> </span>\n                  </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(form.general.$valid)">\n                           <form name="form.general" novalidate>\n\n                                           <!-- START FULLNAME -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.fullname.$invalid}">\n                                                   <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                       <span data-ng-show="form.general.$submitted && form.general.fullname.$invalid" class="help-block help-block-error">\n                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END FULLNAME -->\n\n                                               <!-- START EMAIL -->\n                                          <div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.email.$invalid}">\n                                                      <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required/>\n                                                       <span data-ng-show="form.general.$submitted && form.general.host.$invalid" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END EMAIL -->\n\n                                          <!-- START PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.password.$invalid}">\n                                                   <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                   <span data-ng-show="form.general.$submitted && form.general.password.$invalid" class="help-block help-block-error">\n                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END PASSWORD -->\n\n                                               <!-- START CONFIRM PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.rpassword.$invalid}">\n                                                  <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n                                                        <span data-ng-show="form.general.$submitted && (form.general.rpassword.$invalid || form.general.rpassword.$invalid)" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END CONFIRM PASSWORD -->\n\n                                               <!-- START MAILBOX -->\n                                                <div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.mailbox.$invalid}">\n                                                    <label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                      <input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="item.mailbox" required readonly/>\n                                                 <span data-ng-show="form.general.$submitted && form.general.mailbox.$invalid" class="help-block help-block-error">\n                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END MAILBOX -->\n\n                                                <button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                    </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n            </wizard>\n     </div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/contactmanager/company/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_COMPANY\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.company" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.name.$touched || forms.company.$submitted) && forms.company.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.cmopany.name.$touched || forms.company.$submitted) && forms.company.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.company.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/company/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-briefcase"></i>\n                                        <a href="/contactmanager/companies/list">{{ \'APPLICATION_COMPANIES\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-briefcase font-green-sharp"></i>\n                                       <span class="caption-subject">{{ \'APPLICATION_COMPANIES\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_COMPANY\' | translate }}\n                                               </button>\n                                     </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/company/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getCompany()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-briefcase"></i>\n                                        <a href="/contactmanager/companies/list">{{ \'APPLICATION_COMPANIES\' | translate }}</a>\n                                      <i data-ng-show="company" class="fa fa-angle-right"></i>\n                              </li>\n                         <li data-ng-show="company">\n                                   <a href="#">{{company.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/company.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{company.name}}\n                                      </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.contactmanager.companies.view.settings\')}">\n                                                     <a data-ng-href="/contactmanager/companies/view/{{company.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/company/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_COMPANY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                             </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADDRESS\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_SHIPMENT_ADDRESS\' | translate}}</a>\n                                    </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateCompany()" novalidate>\n\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="company.name" required/>\n                                                                <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="company.description"></textarea>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n                                     <div class="tab-pane" id="tab_1_2">\n                                           <!-- START STREET -->\n                                         <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n                                                        <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                                                   <input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.street"/>\n                                                   <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END STREET -->\n\n                                         <!-- START POSTALCODE -->\n                                             <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n                                                        <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                                                       <input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.postalCode"/>\n                                                       <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END POSTALCODE -->\n\n                                             <!-- START CITY -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n                                                    <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                                                     <input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.city"/>\n                                                 <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END CITY -->\n                                             <!-- START COUNTRY -->\n                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n                                                      <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                                                  <input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.country"/>\n                                                        <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END COUNTRY -->\n                                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                        <div class="tab-pane" id="tab_1_3">\n                                           <!-- START STREET -->\n                                         <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sStreet.$touched || forms.general.$submitted) && forms.general.sStreet.$invalid}">\n                                                      <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                                                   <input type="text" name="sStreet" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.sStreet"/>\n                                                 <span data-ng-show="(forms.general.sStreet.$touched || forms.general.$submitted) && forms.general.sStreet.$error.required" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END STREET -->\n\n                                         <!-- START POSTALCODE -->\n                                             <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sPostalCode.$touched || forms.general.$submitted) && forms.general.sPostalCode.$invalid}">\n                                                      <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                                                       <input type="text" name="sPostalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.sPostalCode"/>\n                                                     <span data-ng-show="(forms.general.sPostalCode.$touched || forms.general.$submitted) && forms.general.sPostalCode.$error.required" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END POSTALCODE -->\n\n                                             <!-- START CITY -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sCity.$touched || forms.general.$submitted) && forms.general.sCity.$invalid}">\n                                                  <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                                                     <input type="text" name="sCity" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.sCity"/>\n                                                       <span data-ng-show="(forms.general.sCity.$touched || forms.general.$submitted) && forms.general.sCity.$error.required" class="help-block help-block-error">\n                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END CITY -->\n                                             <!-- START COUNTRY -->\n                                                <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sCountry.$touched || forms.general.$submitted) && forms.general.sCountry.$invalid}">\n                                                    <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                                                  <input type="text" name="sCountry" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.sCountry"/>\n                                                      <span data-ng-show="(forms.general.sCountry.$touched || forms.general.$submitted) && forms.general.sCountry.$error.required" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END COUNTRY -->\n                                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
-a.put("app/contactmanager/contact/list/import.modal.html",'<div class="modal-header" data-ng-init="getServices()">\n  <h3 class="modal-title">{{ \'APPLICATION_IMPORT_FROM_CSV\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.csv" novalidate>\n    <div class="row">\n      <div class="col-md-6">\n        <!-- START SERVICE -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.general.ServiceId.$invalid && forms.general.$submitted}">\n          <label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label>\n          <ui-select data-ng-model="item.ServiceId" theme="bootstrap" name="ServiceId" data-ng-disabled="disabled" data-ng-change="getCustomFields()">\n            <ui-select-match placeholder="{{ \'APPLICATION_SERVICE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n            <ui-select-choices repeat="service.id as service in services | filter: $select.search">\n              <div ng-bind-html="service.name | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.general.ServiceId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END SERVICE -->\n\n    <!-- START FULLNAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.fullname.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}</label>\n      <ui-select data-ng-model="item.fullname" theme="bootstrap" name="fullname" data-ng-disabled="disabled" required>\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_FULLNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.fullname.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END FULLNAME -->\n\n    <!-- START STREET -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.street.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n      <ui-select data-ng-model="item.street" theme="bootstrap" name="street" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_STREET\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.street.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STREET -->\n\n    <!-- START POSTALCODE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.postalCode.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n      <ui-select data-ng-model="item.postalCode" theme="bootstrap" name="postalCode" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_POSTALCODE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.postalCode.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END POSTALCODE -->\n\n    <!-- START CITY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.city.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n      <ui-select data-ng-model="item.city" theme="bootstrap" name="city" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_CITY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.city.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END CITY -->\n\n    <!-- START PHONES -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.Phones.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_PHONES\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.Phones" theme="bootstrap" name="Phones" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_PHONES\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.Phones.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONES -->\n\n  </div>\n  <div class="col-md-6">\n\n    <!-- START COUNTRY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.country.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n      <ui-select data-ng-model="item.country" theme="bootstrap" name="country" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COUNTRY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.country.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COUNTRY -->\n\n    <!-- START DATEOFBIRTH -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.dateOfBirth.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n      <ui-select data-ng-model="item.dateOfBirth" theme="bootstrap" name="dateOfBirth" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DATEOFBIRTH\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.dateOfBirth.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DATEOFBIRTH -->\n\n    <!-- START TAGS -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.tags.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.tags" theme="bootstrap" name="tags" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.tags.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TAGS -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.description.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <ui-select data-ng-model="item.description" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.description.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <!-- START EMAILS -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.Emails.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_EMAILS\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.Emails" theme="bootstrap" name="Emails" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_EMAILS\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.Emails.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EMAILS -->\n\n    <!-- START COMPANY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n      <ui-select data-ng-model="item.CompanyId" theme="bootstrap" name="CompanyId" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="company.id as company in companies | filter: $select.search">\n          <div ng-bind-html="company.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COMPANY -->\n\n  </div>\n  </div>\n\n  <!-- START CUSTOMFIELDS -->\n  <div data-ng-repeat="customField in customFields">\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv[customField.name].$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{customField.name}}</label>\n      <ui-select data-ng-if="!joinPrompt" data-ng-model="item.customFields[customField.id]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{customField.name}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv[customField.name].$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n  </div>\n  <!-- END CUSTOMFIELDS -->\n\n  <div>\n    <p>{{\'APPLICATION_IMPORT_SUCCEEDED\' | translate}}: {{import.succeeded}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.success + \'%\' }"></div>\n    </div>\n  </div>\n  <div>\n    <p>{{\'APPLICATION_IMPORT_FAILED\' | translate}}: {{import.failed}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.fail + \'%\' }"></div>\n    </div>\n  </div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="start()" ng-disabled="forms.csv.$invalid || !forms.csv.fullname || submitted">{{ \'APPLICATION_SUBMIT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="close()" data-ng-if="!importing">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="stop()" data-ng-if="importing">{{ \'APPLICATION_STOP\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/contact/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-users"></i>\n                                   <a href="/contactmanager/contacts/list">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="fa fa-users font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_CONTACTS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle" data-ng-click="newContact();">\n                                                       <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n                                               </button>\n                                             <span class="btn default btn-file">\n                                           <span class="fileinput-new">\n                                          <i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}</span>\n                                              <input type="file" nv-file-select="" uploader="uploader"/>\n                                            </span>\n                                       </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/service/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_SERVICE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.service" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.service.name.$touched || forms.service.$submitted) && forms.service.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.cmopany.name.$touched || forms.service.$submitted) && forms.service.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.service.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/service/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-tty"></i>\n                                     <a href="/contactmanager/services/list">{{ \'APPLICATION_SERVICES\' | translate }}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="fa fa-tty font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_SERVICES\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_SERVICE\' | translate }}\n                                               </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/service/view/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.customField" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TYPE -->\n    <div class="form-group"  data-ng-class="{\'has-error\': (forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid}">\n      <label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n        <ui-select-choices repeat="type.value as type in types| filter: $select.search">\n          {{$translate.instant(type.name)}}\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid && forms.customField.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TYPE -->\n\n    <div ng-slide-down="item.type == \'select\'" lazy-render duration="1">\n      <div>\n        <label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n      </div>\n      <div class="padding-bottom" ng-repeat="choice in choices">\n        <div class="form-group">\n          <div class="input-group">\n            <input type="text" class="form-control" ng-model="choice.value" required>\n            <span class="input-group-btn">\n            <button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n            </span>\n          </div>\n        </div>\n      </div>\n      <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n        <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n      </button>\n\n    </div>\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.customField.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/service/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n                          </div>\n                        </div>\n                        <div class="note note-warning" data-ng-hide="teams.length">\n                           <h4 class="block">Warning!</h4>\n                               <p>\n                                    {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n                             </p>\n                  </div>\n                        <div class="portlet-body">\n                            <!-- BEGIN FORM-->\n                            <form action="index.html" class="form-horizontal form-row-seperated">\n                                 <div class="form-body text-center">\n                                           <div class="form-group last">\n                                                 <div class="col-md-9" id="multi-select-team">\n                                                 </div>\n                                                </div>\n                                        </div>\n                                </form>\n                               <!-- END FORM-->\n                      </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/contactmanager/service/view/view.customFieldSettings.html",'<div class="row" data-ng-init="getCustomField()">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CUSTOM_FIELD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                                </div>\n                        </div>\n\n                      <div class="portlet-body">\n                                    <!-- GENERAL TAB -->\n                                          <form name="forms.general" data-ng-submit="forms.general.$valid && updateCustomField()" novalidate>\n\n                                                 <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="customField.name" required/>\n                                                            <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <div ng-slide-down="customField.type == \'select\'" lazy-render duration="1" class="mbottom20">\n                                                               <div>\n                                                                 <label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n                                                          </div>\n                                                                <div class="padding-bottom" ng-repeat="choice in choices">\n                                                                    <div class="form-group">\n                                                                              <div class="input-group">\n                                                                                     <input type="text" class="form-control" ng-model="choice.value" required>\n                                                                                     <span class="input-group-btn">\n                                                                                        <button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n                                                                                    </span>\n                                                                               </div>\n                                                                        </div>\n                                                                </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n                                                         </button>\n\n                                                   </div>\n\n                                                      <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="customField.description"></textarea>\n                                                   </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n\n                     </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/contactmanager/service/view/view.customFields.html",'<div ui-view class="profile-content">\n<div class="row" data-ng-init="getServiceCustomFields()">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title  tabbable-line">\n                            <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n                           </div>\n                                <div class="actions">\n          <div class="btn-group">\n            <button class="btn green-jungle " ng-click="create()">\n              <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}\n            </button>\n          </div>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <table class="table table-striped table-bordered table-hover">\n                                          <thead>\n                                               <tr>\n                <th>{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                               <th>{{ \'APPLICATION_TYPE\' | translate }}</th>\n                                                   <th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                            <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="customField in customFields" class="animate-repeat">\n                                                          <td>{{customField.name}}</td>\n                                                         <td>{{customField.type}}</td>\n                                                         <td>{{customField.description}}</td>\n                                        <td>\n                                                                    <a class="btn default btn-xs blue-stripe" data-ng-href="/contactmanager/services/view/{{service.id}}/customfields/settings/{{customField.id}}">\n                                                                               {{ \'APPLICATION_SETTINGS\' | translate}}\n                                             </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(customField.name,customField.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="customFields.length">\n                                                               <td colspan="4" style="text-align:center;">\n                                                                   <i>{{ \'MESSAGE_NO_AVAILABLE_CUSTOM_FIELDS\' | translate }}</i>\n                                                               </td>\n                                                 </tr>\n                                   </tbody>\n                            </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/contactmanager/service/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getService()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-tty"></i>\n                                     <a href="/contactmanager/services/list">{{ \'APPLICATION_SERVICES\' | translate }}</a>\n                                        <i data-ng-show="service" class="fa fa-angle-right"></i>\n                              </li>\n                         <li data-ng-show="service">\n                                   <a href="#">{{service.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/service.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{service.name}}\n                                      </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.contactmanager.services.view.settings\')}">\n                                                      <a data-ng-href="/contactmanager/services/view/{{service.id}}/settings">\n                                                      <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.contactmanager.services.view.agents\')}">\n                                                        <a data-ng-href="/contactmanager/services/view/{{service.id}}/agents">\n                                                        <i class="icon-people"></i>\n                                                   {{ \'APPLICATION_AGENTS\' | translate}} </a>\n                                          </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.contactmanager.services.view.customfields\')}">\n                                                    <a data-ng-href="/contactmanager/services/view/{{service.id}}/customfields">\n                                                  <i class="icon-pencil"></i>\n                                                   {{ \'APPLICATION_CUSTOM_FIELDS\' | translate}} </a>\n                                           </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/contactmanager/service/view/view.settings.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_SERVICE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                             </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateService()" novalidate>\n\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="service.name" data-ng-disabled="service.defaultEntry" required/>\n                                                                <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="service.description"></textarea>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/dashboard/dashboard.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div>\n                 <nav class="navbar navbar-default" role="navigation">\n                         <div class="navbar-header">\n                                   <button type="button" class="navbar-toggle" data-ng-init="navCollapsed = true" data-ng-click="navCollapsed = !navCollapsed">\n                                          <span class="sr-only">Toggle navigation</span>\n                                                <span class="icon-bar"></span>\n                                                <span class="icon-bar"></span>\n                                                <span class="icon-bar"></span>\n                                        </button>\n                             </div>\n\n                              <!-- Collect the nav links, forms, and other content for toggling -->\n                         <div class="collapse navbar-collapse" ng-class="!navCollapsed && \'in\'">\n                                     <ul class="nav navbar-nav">\n                                           <li data-ng-class="{active: $state.is(\'main.dashboard.voice\')}">\n                                                    <a href="/dashboard/voice">\n                                                           <b class=\'icon-earphones-alt\'></b>\n                                                          {{ \'APPLICATION_VOICE\' | translate }}\n                                                       </a>\n                                          </li>\n                                         <!-- <li data-ng-class="{active: $state.is(\'main.dashboard.mail\')}">\n                                                        <a href="/dashboard/mail">\n                                                            <b class=\'icon-envelope\'></b>\n                                                               {{ \'APPLICATION_MAIL\' | translate }}\n                                                        </a>\n                                          </li> -->\n                                     </ul>\n                         </div>\n                                <!-- /.navbar-collapse -->\n                    </nav>\n                </div>\n                <div ui-view></div>\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/dashboard/mail/mail.html",'<div class="col-md-12">\nThis is the mail view.\n</div>\n'),a.put("app/dashboard/voice/voice.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent">\n    <div>\n      test\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_INBOUND\' | translate }}</span>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initWaiting()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initActive()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-control-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{active || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ACTIVE\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAnswered()">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{answered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAbandoned()">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{abandoned || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDONED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAvgAnswerTime()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{avganswertime || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_ANSWER_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAvgTalkTime()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{avgtalktime || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_TALK_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAnswerRate()">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{answerrate || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAbandonRate()">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{abandonrate || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDON_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" data-ng-init="initTotalOffered()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{totaloffered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL_OFFERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" data-ng-init="initUnmanaged()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{unmanaged || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_UNMANAGED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_OUTBOUND\' | translate }}</span>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutbound()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-call-out"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutbound || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_MANUAL_OUTBOUND\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutboundGlobalDuration()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundglobalduration || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_GLOBAL_DURATION\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutboundAnswered()">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundanswered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutboundAvgDuration()">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundavgduration || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_DURATION\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" data-ng-init="initManualOutboundAnswerRate()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundanswerrate || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n    </fieldset>\n  </div>\n</div>\n'),a.put("app/desk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n   <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_DESK_COM\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="accounts.checked.length">\n                                                <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/desk/wizard">\n                                                      <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'authType\',\'consumerKey\',\'consumerSecret\',\'token\',\'tokenSecret\',\'password\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Authentication Type\', \'Consumer Key\', \'Consumer Secret\', \'Token\', \'Token Secret\', \'Password\']" field-separator=";" filename="desk_accounts.csv">\n                                   <i class="icon-cloud-download"></i></a>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <table st-table="displayedDeskAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                    <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="7">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="col-md-6">\n                                                                                        <div class="input-group input-medium pull-right">\n                                                                                             <input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n                                                                                         <span class="input-group-addon">\n                                                                                                      <i class="fa fa-search"></i>\n                                                                                          </span>\n                                                                                       </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </th>\n                                                 </tr>\n                                           <tr>\n                                                                <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                               <th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n                                                         <th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                                <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="account in displayedDeskAccounts" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n                                         <td>{{account.name}}</td>\n                                             <td>{{account.username}}</td>\n                                                           <td>{{account.remoteUri}}</td>\n                                                                <td>{{account.description}}</td>\n                                            <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/desk/view/{{account.id}}/account">\n                                                                           {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                                                  <a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n                                                                          {{ \'APPLICATION_CHECK_CONNECTION\' | translate }}\n                                            </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedDeskAccounts.length">\n                                                              <td colspan="7" style="text-align:center;">\n                                                                   <i>No account available</i>\n                                                           </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td/>\n                                             <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                 </div>\n                                                    </td>\n                                                 <td/>\n                                                             <td/>\n                                           </tr>\n                                           <tr>\n                                            <td colspan="7" class="text-center">\n                                                                    <div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n                                            </td>\n                                       </tr>\n                                       </tfoot>\n                                    </div>\n                                </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/view/view.account.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                            <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START AUTH TYPE -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n                                                              <ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                        <ui-select-choices repeat="type in [\'basic\', \'oauth\'] | filter: $select.search">\n                                                                          <div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'basic\'" lazy-render duration="1">\n                                                          <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                                <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n                                                       <!-- START CONSUMER KEY -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerKey.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                               <label class="control-label">{{\'APPLICATION_CONSUMER_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="consumerKey" placeholder="{{\'APPLICATION_CONSUMER_KEY\' | translate}}" class="form-control" data-ng-model="account.consumerKey" required/>\n                                                          <span data-ng-show="forms.formSetting.consumerKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONSUMER KEY -->\n\n              <!-- START CONSUMER SECRET -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                            <label class="control-label">{{\'APPLICATION_CONSUMER_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="consumerSecret" placeholder="{{\'APPLICATION_CONSUMER_SECRET\' | translate}}" class="form-control" data-ng-model="account.consumerSecret" required/>\n                                                         <span data-ng-show="forms.formSetting.consumerSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONSUMER SECRET -->\n\n              <!-- START TOKEN -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                             <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n                                                             <span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN -->\n\n              <!-- START TOKEN SECRET-->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.tokenSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                               <label class="control-label">{{\'APPLICATION_TOKEN_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="tokenSecret" placeholder="{{\'APPLICATION_TOKEN_SECRET\' | translate}}" class="form-control" data-ng-model="account.tokenSecret" required/>\n                                                          <span data-ng-show="forms.formSetting.tokenSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN SECRET-->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/desk/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n        <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n                              </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createConfiguration()">\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n                                                   <form name="formsConfiguration.info" novalidate>\n                                                              <!-- START NAME -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n                                                                  <span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END NAME -->\n                                                             <!-- START DESCRIPTION -->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n                                                              </div>\n                                                                <!-- END DESCRIPTION -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                       </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                          <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                      <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                            <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                                                    <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                                                               <!-- <pre>\n                                                                    {{descriptionItem|json}}\n                                                              </pre> -->\n                  <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                        <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n                     <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n                                                                        <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                      <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                             <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                    <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n                          <div ng-bind-html="item.label | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected}}</ui-select-match>\n                                  <ui-select-choices repeat="item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                  <div ng-bind-html="item | highlight: $select.search"></div>\n                                 </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                                <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                                 <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                               </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                               </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
+a.put("app/contactmanager/contact/list/import.modal.html",'<div class="modal-header" data-ng-init="getServices()">\n  <h3 class="modal-title">{{ \'APPLICATION_IMPORT_FROM_CSV\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.csv" novalidate>\n    <div class="row">\n      <div class="col-md-6">\n        <!-- START SERVICE -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.general.ServiceId.$invalid && forms.general.$submitted}">\n          <label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label>\n          <ui-select data-ng-model="item.ServiceId" theme="bootstrap" name="ServiceId" data-ng-disabled="disabled" data-ng-change="getCustomFields()">\n            <ui-select-match placeholder="{{ \'APPLICATION_SERVICE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n            <ui-select-choices repeat="service.id as service in services | filter: $select.search">\n              <div ng-bind-html="service.name | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.general.ServiceId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END SERVICE -->\n\n    <!-- START FULLNAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.fullname.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}</label>\n      <ui-select data-ng-model="item.fullname" theme="bootstrap" name="fullname" data-ng-disabled="disabled" required>\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_FULLNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.fullname.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END FULLNAME -->\n\n    <!-- START STREET -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.street.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n      <ui-select data-ng-model="item.street" theme="bootstrap" name="street" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_STREET\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.street.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STREET -->\n\n    <!-- START POSTALCODE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.postalCode.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n      <ui-select data-ng-model="item.postalCode" theme="bootstrap" name="postalCode" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_POSTALCODE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.postalCode.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END POSTALCODE -->\n\n    <!-- START CITY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.city.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n      <ui-select data-ng-model="item.city" theme="bootstrap" name="city" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_CITY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.city.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END CITY -->\n\n    <!-- START PHONES -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.Phones.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_PHONES\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.Phones" theme="bootstrap" name="Phones" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_PHONES\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.Phones.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONES -->\n\n  </div>\n  <div class="col-md-6">\n\n    <!-- START COUNTRY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.country.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n      <ui-select data-ng-model="item.country" theme="bootstrap" name="country" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COUNTRY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.country.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COUNTRY -->\n\n    <!-- START DATEOFBIRTH -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.dateOfBirth.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n      <ui-select data-ng-model="item.dateOfBirth" theme="bootstrap" name="dateOfBirth" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DATEOFBIRTH\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.dateOfBirth.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DATEOFBIRTH -->\n\n    <!-- START TAGS -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.tags.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.tags" theme="bootstrap" name="tags" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.tags.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TAGS -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.description.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <ui-select data-ng-model="item.description" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.description.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <!-- START EMAILS -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.Emails.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_EMAILS\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.Emails" theme="bootstrap" name="Emails" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_EMAILS\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.Emails.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EMAILS -->\n\n    <!-- START COMPANY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n      <ui-select data-ng-model="item.CompanyId" theme="bootstrap" name="CompanyId" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="company.id as company in companies | filter: $select.search">\n          <div ng-bind-html="company.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COMPANY -->\n\n  </div>\n  </div>\n\n  <!-- START CUSTOMFIELDS -->\n  <div data-ng-repeat="customField in customFields">\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv[customField.name].$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{customField.name}}</label>\n      <ui-select data-ng-if="!joinPrompt" data-ng-model="item.customFields[customField.id]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{customField.name}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv[customField.name].$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n  </div>\n  <!-- END CUSTOMFIELDS -->\n\n  <div>\n    <p>{{\'APPLICATION_IMPORT_SUCCEEDED\' | translate}}: {{import.succeeded}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.success + \'%\' }"></div>\n    </div>\n  </div>\n  <div>\n    <p>{{\'APPLICATION_IMPORT_FAILED\' | translate}}: {{import.failed}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.fail + \'%\' }"></div>\n    </div>\n  </div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="start()" ng-disabled="forms.csv.$invalid || !forms.csv.fullname || submitted">{{ \'APPLICATION_SUBMIT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="close()" data-ng-if="!importing">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="stop()" data-ng-if="importing">{{ \'APPLICATION_STOP\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/contact/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-users"></i>\n                                   <a href="/contactmanager/contacts/list">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="fa fa-users font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_CONTACTS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle" data-ng-click="newContact();">\n                                                       <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n                                               </button>\n                                             <span class="btn default btn-file">\n                                           <span class="fileinput-new">\n                                          <i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}</span>\n                                              <input type="file" nv-file-select="" uploader="uploader"/>\n                                            </span>\n                                       </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div data-ng-if="gridOptions"  ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                        <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/service/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_SERVICE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.service" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.service.name.$touched || forms.service.$submitted) && forms.service.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.service.name.$touched || forms.service.$submitted) && forms.service.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.service.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/service/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-tty"></i>\n                                     <a href="/contactmanager/services/list">{{ \'APPLICATION_SERVICES\' | translate }}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="fa fa-tty font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_SERVICES\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_SERVICE\' | translate }}\n                                               </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/service/view/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.customField" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.alias" required/>\n      <span data-ng-show="(forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TYPE -->\n    <div class="form-group"  data-ng-class="{\'has-error\': (forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid}">\n      <label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n        <ui-select-choices repeat="type.value as type in types| filter: $select.search">\n          {{$translate.instant(type.name)}}\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid && forms.customField.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TYPE -->\n\n    <div ng-slide-down="item.type == \'select\'" lazy-render duration="1">\n      <div>\n        <label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n      </div>\n      <div class="padding-bottom" ng-repeat="choice in choices">\n        <div class="form-group">\n          <div class="input-group">\n            <input type="text" class="form-control" ng-model="choice.value" required>\n            <span class="input-group-btn">\n            <button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n            </span>\n          </div>\n        </div>\n      </div>\n      <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n        <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n      </button>\n\n    </div>\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.customField.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/service/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n                          </div>\n                        </div>\n                        <div class="note note-warning" data-ng-hide="teams.length">\n                           <h4 class="block">Warning!</h4>\n                               <p>\n                                    {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n                             </p>\n                  </div>\n                        <div class="portlet-body">\n                            <!-- BEGIN FORM-->\n                            <form action="index.html" class="form-horizontal form-row-seperated">\n                                 <div class="form-body">\n                                               <div class="form-group last">\n                                                 <div class="col-md-12" id="multi-select-team">\n                                                        </div>\n                                                </div>\n                                        </div>\n                                </form>\n                               <!-- END FORM-->\n                      </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/contactmanager/service/view/view.customFieldSettings.html",'<div class="row" data-ng-init="getCustomField()">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CUSTOM_FIELD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                                </div>\n                        </div>\n\n                      <div class="portlet-body">\n                                    <!-- GENERAL TAB -->\n                                          <form name="forms.general" data-ng-submit="forms.general.$valid && updateCustomField()" novalidate>\n\n                                                 <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="customField.alias" required/>\n                                                           <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <div ng-slide-down="customField.type == \'select\'" lazy-render duration="1" class="mbottom20">\n                                                               <div>\n                                                                 <label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n                                                          </div>\n                                                                <div class="padding-bottom" ng-repeat="choice in choices">\n                                                                    <div class="form-group">\n                                                                              <div class="input-group">\n                                                                                     <input type="text" class="form-control" ng-model="choice.value" required>\n                                                                                     <span class="input-group-btn">\n                                                                                        <button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n                                                                                    </span>\n                                                                               </div>\n                                                                        </div>\n                                                                </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n                                                         </button>\n\n                                                   </div>\n\n                                                      <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="customField.description"></textarea>\n                                                   </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n\n                     </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/contactmanager/service/view/view.customFields.html",'<div ui-view class="profile-content">\n<div class="row" data-ng-init="initCustomFields()">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title  tabbable-line">\n                            <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n                           </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n          <div class="btn-group">\n            <button class="btn green-jungle " ng-click="create()">\n              <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}\n            </button>\n          </div>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/contactmanager/service/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getService()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-tty"></i>\n                                     <a href="/contactmanager/services/list">{{ \'APPLICATION_SERVICES\' | translate }}</a>\n                                        <i data-ng-show="service" class="fa fa-angle-right"></i>\n                              </li>\n                         <li data-ng-show="service">\n                                   <a href="#">{{service.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/service.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{service.name}}\n                                      </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.contactmanager.services.view.settings\')}">\n                                                      <a data-ng-href="/contactmanager/services/view/{{service.id}}/settings">\n                                                      <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.contactmanager.services.view.agents\')}">\n                                                        <a data-ng-href="/contactmanager/services/view/{{service.id}}/agents">\n                                                        <i class="icon-people"></i>\n                                                   {{ \'APPLICATION_AGENTS\' | translate}} </a>\n                                          </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.contactmanager.services.view.customfields\')}">\n                                                    <a data-ng-href="/contactmanager/services/view/{{service.id}}/customfields">\n                                                  <i class="icon-pencil"></i>\n                                                   {{ \'APPLICATION_CUSTOM_FIELDS\' | translate}} </a>\n                                           </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/service/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_SERVICE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                             </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateService()" novalidate>\n\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="service.name" data-ng-disabled="service.defaultEntry" required/>\n                                                                <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="service.description"></textarea>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
+a.put("app/dashboard/dashboard.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div>\n                 <nav class="navbar navbar-default" role="navigation">\n                         <div class="navbar-header">\n                                   <button type="button" class="navbar-toggle" data-ng-init="navCollapsed = true" data-ng-click="navCollapsed = !navCollapsed">\n                                          <span class="sr-only">Toggle navigation</span>\n                                                <span class="icon-bar"></span>\n                                                <span class="icon-bar"></span>\n                                                <span class="icon-bar"></span>\n                                        </button>\n                             </div>\n\n                              <!-- Collect the nav links, forms, and other content for toggling -->\n                         <div class="collapse navbar-collapse" ng-class="!navCollapsed && \'in\'">\n                                     <ul class="nav navbar-nav">\n                                           <li data-ng-class="{active: $state.is(\'main.dashboard.voice\')}">\n                                                    <a href="/dashboard/voice">\n                                                           <b class=\'icon-earphones-alt\'></b>\n                                                          {{ \'APPLICATION_VOICE\' | translate }}\n                                                       </a>\n                                          </li>\n                                         <!-- <li data-ng-class="{active: $state.is(\'main.dashboard.mail\')}">\n                                                        <a href="/dashboard/mail">\n                                                            <b class=\'icon-envelope\'></b>\n                                                               {{ \'APPLICATION_MAIL\' | translate }}\n                                                        </a>\n                                          </li> -->\n                                     </ul>\n                         </div>\n                                <!-- /.navbar-collapse -->\n                    </nav>\n                </div>\n                <div ui-view></div>\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/dashboard/mail/mail.html",'<div class="col-md-12">\nThis is the mail view.\n</div>\n'),a.put("app/dashboard/voice/voice.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent">\n    <div>\n      test\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_INBOUND\' | translate }}</span>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initWaiting()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initActive()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-control-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{active || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ACTIVE\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAnswered()">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{answered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAbandoned()">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{abandoned || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDONED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAvgAnswerTime()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{avganswertime || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_ANSWER_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAvgTalkTime()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{avgtalktime || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_TALK_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAnswerRate()">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{answerrate || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initAbandonRate()">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{abandonrate || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDON_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" data-ng-init="initTotalOffered()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{totaloffered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL_OFFERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" data-ng-init="initUnmanaged()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{unmanaged || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_UNMANAGED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_OUTBOUND\' | translate }}</span>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutbound()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-call-out"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutbound || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_MANUAL_OUTBOUND\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutboundGlobalDuration()">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundglobalduration || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_GLOBAL_DURATION\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutboundAnswered()">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundanswered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" data-ng-init="initManualOutboundAvgDuration()">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundavgduration || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_DURATION\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" data-ng-init="initManualOutboundAnswerRate()">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{manualoutboundanswerrate || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n    </fieldset>\n  </div>\n</div>\n'),a.put("app/desk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n   <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_DESK_COM\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="accounts.checked.length">\n                                                <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/desk/wizard">\n                                                      <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'authType\',\'consumerKey\',\'consumerSecret\',\'token\',\'tokenSecret\',\'password\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Authentication Type\', \'Consumer Key\', \'Consumer Secret\', \'Token\', \'Token Secret\', \'Password\']" field-separator=";" filename="desk_accounts.csv">\n                                   <i class="icon-cloud-download"></i></a>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <table st-table="displayedDeskAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                    <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="7">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="col-md-6">\n                                                                                        <div class="input-group input-medium pull-right">\n                                                                                             <input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n                                                                                         <span class="input-group-addon">\n                                                                                                      <i class="fa fa-search"></i>\n                                                                                          </span>\n                                                                                       </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </th>\n                                                 </tr>\n                                           <tr>\n                                                                <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                               <th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n                                                         <th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                                <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="account in displayedDeskAccounts" class="animate-repeat">\n                                                             <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n                                         <td>{{account.name}}</td>\n                                             <td>{{account.username}}</td>\n                                                           <td>{{account.remoteUri}}</td>\n                                                                <td>{{account.description}}</td>\n                                            <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/desk/view/{{account.id}}/account">\n                                                                           {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                                                  <a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n                                                                          {{ \'APPLICATION_CHECK_CONNECTION\' | translate }}\n                                            </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedDeskAccounts.length">\n                                                              <td colspan="7" style="text-align:center;">\n                                                                   <i>No account available</i>\n                                                           </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td/>\n                                             <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                 </div>\n                                                    </td>\n                                                 <td/>\n                                                             <td/>\n                                           </tr>\n                                           <tr>\n                                            <td colspan="7" class="text-center">\n                                                                    <div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n                                            </td>\n                                       </tr>\n                                       </tfoot>\n                                    </div>\n                                </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/view/view.account.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                            <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START AUTH TYPE -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n                                                              <ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                        <ui-select-choices repeat="type in [\'basic\', \'oauth\'] | filter: $select.search">\n                                                                          <div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'basic\'" lazy-render duration="1">\n                                                          <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                                <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n                                                       <!-- START CONSUMER KEY -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerKey.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                               <label class="control-label">{{\'APPLICATION_CONSUMER_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="consumerKey" placeholder="{{\'APPLICATION_CONSUMER_KEY\' | translate}}" class="form-control" data-ng-model="account.consumerKey" required/>\n                                                          <span data-ng-show="forms.formSetting.consumerKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONSUMER KEY -->\n\n              <!-- START CONSUMER SECRET -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                            <label class="control-label">{{\'APPLICATION_CONSUMER_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="consumerSecret" placeholder="{{\'APPLICATION_CONSUMER_SECRET\' | translate}}" class="form-control" data-ng-model="account.consumerSecret" required/>\n                                                         <span data-ng-show="forms.formSetting.consumerSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONSUMER SECRET -->\n\n              <!-- START TOKEN -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                             <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n                                                             <span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN -->\n\n              <!-- START TOKEN SECRET-->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.tokenSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n                                                               <label class="control-label">{{\'APPLICATION_TOKEN_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="tokenSecret" placeholder="{{\'APPLICATION_TOKEN_SECRET\' | translate}}" class="form-control" data-ng-model="account.tokenSecret" required/>\n                                                          <span data-ng-show="forms.formSetting.tokenSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN SECRET-->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/desk/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n        <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n                              </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createConfiguration()">\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n                                                   <form name="formsConfiguration.info" novalidate>\n                                                              <!-- START NAME -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n                                                                  <span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END NAME -->\n                                                             <!-- START DESCRIPTION -->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n                                                              </div>\n                                                                <!-- END DESCRIPTION -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                       </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                          <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                      <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                            <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                                                    <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                                                               <!-- <pre>\n                                                                    {{descriptionItem|json}}\n                                                              </pre> -->\n                  <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                        <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n                     <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n                                                                        <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                      <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                             <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                    <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n                          <div ng-bind-html="item.label | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected}}</ui-select-match>\n                                  <ui-select-choices repeat="item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                  <div ng-bind-html="item | highlight: $select.search"></div>\n                                 </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                                <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                                 <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                               </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                               </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
 a.put("app/desk/view/view.configurations.html",'<div ui-view class="profile-content">\n        <div class="row" data-ng-init="getConfigurations()">\n          <div class="col-md-12">\n                       <div class="portlet light">\n                           <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group">\n                                                       <a class="btn green-jungle " href="/desk/view/{{account.id}}/configuration" data-toggle="dropdown">\n                                                           <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <table class="table table-striped table-bordered table-hover">\n                                                  <thead>\n                                                       <tr>\n                                                            <th>{{\'APPLICATION_NAME\' | translate}}</th>\n                                                                     <th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n                                                                  <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                      </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="configuration in configurations">\n                                                                     <td>{{configuration.name}}</td>\n                                                                       <td>{{configuration.description}}</td>\n                                                      <td>\n                                                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/desk/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n                                                                                      {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                                  <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n                                                                                    {{ \'APPLICATION_DELETE\' | translate }}\n                                                      </a>\n                                                </td>\n                                               </tr>\n                                                             <tr data-ng-hide="configurations.length">\n                                                                     <td colspan="5" style="text-align:center;">\n                                                                           <i>No configuration available</i>\n                                                                     </td>\n                                                         </tr>\n                                           </tbody>\n                                    </table>\n                                      <!-- END TABLE -->\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/desk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n   <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/desk.png" class="img-responsive">\n                               </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.desk.view.account\')}">\n                                                  <a ng-href="/desk/view/{{account.id}}/account">\n                                                       <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.desk.view.configurations\') || $state.is(\'main.desk.view.configuration\')}">\n                                                      <a ng-href="/desk/view/{{account.id}}/configurations">\n                                                        <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n        <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n                                   </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/desk/accounts/validate/username"/>\n                                                         <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/desk/accounts/validate/remoteUri"/>\n                                                             <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n                                 </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START AUTH TYPE -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n                                                              <ui-select data-ng-model="item.authType" name="authType" theme="bootstrap" required>\n                                                                  <ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                        <ui-select-choices repeat="type in [\'basic\', \'oauth\'] | filter: $select.search">\n                                                                          <div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="item.authType == \'basic\'" lazy-render duration="1">\n                                                             <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                               <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START CONSUMER KEY -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerKey.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n                                                          <label class="control-label">{{\'APPLICATION_CONSUMER_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="consumerKey" placeholder="{{\'APPLICATION_CONSUMER_KEY\' | translate}}" class="form-control" data-ng-model="item.consumerKey" required/>\n                                                             <span data-ng-show="forms.formSetting.consumerKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONSUMER KEY -->\n\n              <!-- START CONSUMER SECRET -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerSecret.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n                                                               <label class="control-label">{{\'APPLICATION_CONSUMER_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="consumerSecret" placeholder="{{\'APPLICATION_CONSUMER_SECRET\' | translate}}" class="form-control" data-ng-model="item.consumerSecret" required/>\n                                                            <span data-ng-show="forms.formSetting.consumerSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONSUMER SECRET -->\n\n              <!-- START TOKEN -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n                                                                <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="item.token" required/>\n                                                                <span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN -->\n\n              <!-- START TOKEN SECRET-->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.tokenSecret.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n                                                          <label class="control-label">{{\'APPLICATION_TOKEN_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="tokenSecret" placeholder="{{\'APPLICATION_TOKEN_SECRET\' | translate}}" class="form-control" data-ng-model="item.tokenSecret" required/>\n                                                             <span data-ng-show="forms.formSetting.tokenSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN SECRET-->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_FRESHDESK\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="accounts.checked.length">\n                                                <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/freshdesk/wizard">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'apiKey\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Api Key\']" field-separator=";" filename="freshdesk_accounts.csv">\n                                        <i class="icon-cloud-download"></i></a>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <table st-table="displayedFreshdeskAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                       <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="7">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="col-md-6">\n                                                                                        <div class="input-group input-medium pull-right">\n                                                                                             <input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n                                                                                         <span class="input-group-addon">\n                                                                                                      <i class="fa fa-search"></i>\n                                                                                          </span>\n                                                                                       </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </th>\n                                                 </tr>\n                                           <tr>\n                                                                <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                               <th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n                                                         <th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                                <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="account in displayedFreshdeskAccounts" class="animate-repeat">\n                                                                <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n                                         <td>{{account.name}}</td>\n                                             <td>{{account.username}}</td>\n                                                           <td>{{account.remoteUri}}</td>\n                                                                <td>{{account.description}}</td>\n                                            <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/freshdesk/view/{{account.id}}/account">\n                                                                              {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                                                  <a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n                                                                          {{ \'APPLICATION_CHECK_CONNECTION\' | translate }}\n                                            </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedFreshdeskAccounts.length">\n                                                         <td colspan="7" style="text-align:center;">\n                                                                   <i>No account available</i>\n                                                           </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td/>\n                                             <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                 </div>\n                                                    </td>\n                                                 <td/>\n                                                             <td/>\n                                           </tr>\n                                           <tr>\n                                            <td colspan="7" class="text-center">\n                                                                    <div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n                                            </td>\n                                       </tr>\n                                       </tfoot>\n                                    </div>\n                                </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/view/view.account.html",'<div class="row">\n  <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                            <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START API KEY -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.apiKey.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_API_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="apiKey" placeholder="{{\'APPLICATION_API_KEY\' | translate}}" class="form-control" data-ng-model="account.apiKey" required/>\n                                                         <span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END API KEY -->\n\n                                                        <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/freshdesk/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n   <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n                              </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createConfiguration()">\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n                                                   <form name="formsConfiguration.info" novalidate>\n                                                              <!-- START NAME -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n                                                                  <span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END NAME -->\n                                                             <!-- START DESCRIPTION -->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n                                                              </div>\n                                                                <!-- END DESCRIPTION -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                       </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                          <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                      <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                            <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                                                    <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                                                               <!-- <pre>\n                                                                    {{descriptionItem|json}}\n                                                              </pre> -->\n                  <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                        <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n                     <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n                                                                        <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                      <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                             <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                    <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n                        <div ng-bind-html="item.label | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected[0]}}</ui-select-match>\n                               <ui-select-choices repeat="item[0] as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                               <div ng-bind-html="item[0] | highlight: $select.search"></div>\n                              </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                                <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                                 <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                               </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                               </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
 a.put("app/freshdesk/view/view.configurations.html",'<div ui-view class="profile-content">\n   <div class="row" data-ng-init="getConfigurations()">\n          <div class="col-md-12">\n                       <div class="portlet light">\n                           <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group">\n                                                       <a class="btn green-jungle " href="/freshdesk/view/{{account.id}}/configuration" data-toggle="dropdown">\n                                                              <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <table class="table table-striped table-bordered table-hover">\n                                                  <thead>\n                                                       <tr>\n                                                            <th>{{\'APPLICATION_NAME\' | translate}}</th>\n                                                                     <th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n                                                                  <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                      </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="configuration in configurations">\n                                                                     <td>{{configuration.name}}</td>\n                                                                       <td>{{configuration.description}}</td>\n                                                      <td>\n                                                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/freshdesk/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n                                                                                 {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                                  <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n                                                                                    {{ \'APPLICATION_DELETE\' | translate }}\n                                                      </a>\n                                                </td>\n                                               </tr>\n                                                             <tr data-ng-hide="configurations.length">\n                                                                     <td colspan="5" style="text-align:center;">\n                                                                           <i>No configuration available</i>\n                                                                     </td>\n                                                         </tr>\n                                           </tbody>\n                                    </table>\n                                      <!-- END TABLE -->\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/freshdesk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n                                     <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/freshdesk.png" class="img-responsive">\n                          </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.freshdesk.view.account\')}">\n                                                     <a ng-href="/freshdesk/view/{{account.id}}/account">\n                                                  <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.freshdesk.view.configurations\') || $state.is(\'main.freshdesk.view.configuration\')}">\n                                                    <a ng-href="/freshdesk/view/{{account.id}}/configurations">\n                                                   <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n   <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/freshdesk/accounts/validate/username"/>\n                                                                <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/freshdesk/accounts/validate/remoteUri"/>\n                                                                <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n                                 </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START API KEY -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.apiKey.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_API_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="apiKey" placeholder="{{\'APPLICATION_API_KEY\' | translate}}" class="form-control" data-ng-model="item.apiKey" required/>\n                                                            <span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END API KEY -->\n\n                                                        <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/integration/list/list.html",'\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-game-controller"></i>\n                                  <a href="/integrations/list">{{ \'APPLICATION_INTEGRATIONS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initList()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-eye font-green-sharp"></i>\n                                     <span class="caption-subject">{{ \'APPLICATION_INTEGRATIONS\' | translate }}</a> </span>\n                              </div>\n                                <div class="actions">\n                           <span class="btn green-jungle btn-file">\n            <span> <i class="icon-plus"></i> New App </span>\n            <input type="file" accept=".zip" nv-file-select="" uploader="uploader"/>\n          </span>\n          <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedIntegrations" filename="integrations.csv">\n                                    <i class="icon-cloud-download"></i></a>\n                                       <a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n                             </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <table st-table="displayedIntegrations" st-safe-src="integrations" class="table table-striped table-bordered table-hover">\n                                    <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="6">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <select class="form-control input-small select2me" data-ng-model="integrationsByPage">\n                                                                                                <option value="10">10</option>\n                                                                                                <option value="25">25</option>\n                                                                                                <option value="50">50</option>\n                                                                                                <option value="{{integrations.length}}">{{ \'APPLICATION_ALL\' | translate }}</option>\n                                                                                        </select>\n                                                                             </div>\n                                                                                <div class="col-md-6">\n                                                                                        <div class="input-group input-medium pull-right">\n                                                                                             <input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n                                                                                         <span class="input-group-addon">\n                                                                                                      <i class="fa fa-search"></i>\n                                                                                          </span>\n                                                                                       </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </th>\n                                                 </tr>\n                                           <tr>\n                                                                <th st-sort="id" width="5%" st-sort-default="reverse">{{ \'APPLICATION_ID\' | translate }}</th>\n                                                   <th st-sort="fullname">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                                <th st-sort="name">{{ \'APPLICATION_FILENAME\' | translate }}</th>\n                                                            <th st-sort="name">{{ \'APPLICATION_VERSION\' | translate }}</th>\n                                                 <th st-sort="name">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                 <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                  </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="integration in displayedIntegrations">\n                                                                <td>{{integration.id}}</td>\n                                                           <td>{{integration.name}}</td>\n                                                         <td>{{integration.filename}}</td>\n                                                             <td>{{integration.version}}</td>\n                                            <td>{{integration.description}}</td>\n                                                            <td>\n                                                                  <span class="btn default btn-xs blue-stripe btn-file">\n                                            <span> {{ \'APPLICATION_UPDATE\' | translate }} </span>\n                                       <input type="file" accept=".zip" nv-file-select="" uploader="uploader"/>\n                                    </span>\n                                             <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(integration.name, integration.id)">\n                                                                                {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="integrations.length">\n                                                               <td colspan="6" style="text-align:center;">\n                                                                   <i>No integrations available</i>\n                                                              </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td>\n                                                                  <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="id" class="form-control" type="search"/>\n                                                                    </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="filename" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_FILENAME\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                             <td>\n                                              </td>\n                                                             <td>\n                                              </td>\n                                                             <td>\n                                              </td>\n                                               </tr>\n                                           <tr>\n                                            <td colspan="6" class="text-center">\n                                            <div st-pagination class="pagination" st-items-by-page="integrationsByPage" st-displayed-pages="7"></div>\n                                           </td>\n                                       </tr>\n                                       </tfoot>\n                            </div>\n                                </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/jscripty/project/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/jscripty/project/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n        <li>\n          <i class="fa fa-slack"></i>\n          <a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n        </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_PROJECTS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" ng-click="createItem()">\n                                                  <i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }}\n                                               </a>\n                                  </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n\n                                        <!-- <div class="table-responsive"> -->\n\n\n                           <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n\n                          </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/jscripty/project/report/report.detail.html",'<div class="row">\n        <div class="col-md-12">\n               <!-- <div class="tab-pane" id="tab_1_3" data-ng-init="getQuestionDetail()"> -->\n               <div  id="tab_1_3" data-ng-init="getQuestionDetail()">\n\n                      <div class="row">\n                                             <div class="col-md-12">\n                                                       <div class="portlet ">\n                                                                                                        <div class="portlet-title">\n                                                                                                           <div class="caption">\n                                                                                                                 <i class="fa fa-list"></i>Questions Detail\n                                                                                                            </div>\n                                                                                                                <!-- <div class="tools">\n                                                                                                                      <a href="" class="fullscreen" data-original-title="" title="">\n                                                                                                                        </a>\n                                                                                                          </div> -->\n                                                                                                    </div>\n                                                                                                        <div class="portlet-body" id="questionDetail" >\n                                                                                                               <div class="row  margin-top-20">\n                                                                                                                      <div class="col-md-10 col-md-offset-1">\n                                                                                                                               <div class="panel panel-info" ng-show="!questionDetail">\n                                                                                                                                      {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}\n\n                                                                                                                          </div>\n                                                                                                                                <div class="panel panel-info" ng-repeat= " (id ,labels) in questionDetail ">\n                                                                                                                                                                  <div class="panel-heading">\n                                                                                                                                                                           <h3 class="panel-title">\n                                                                                                                                                                                              <i class="fa-chart "></i>Question Id: {{id}}\n                                                                                                                                                                                          </h3>\n\n                                                                                                                                                                       </div>\n                                                                                                                                                                        <div class="panel-body">\n                                                                                                                                                                                              <div class="row" ng-repeat= " (label , questions) in labels ">\n                                                                                                                                                                                                        <div class="col-md-10 col-md-offset-1">\n                                                                                                                                                                                                                       <div class="row">\n                                                                                                                                                                                                                             <h3 >\n                                                                                                                                                                                                                                         <i class="icon-bar-chart "></i> {{label}}\n                                                                                                                                                                                                                                             </h3>\n\n                                                                                                                                                                                                                       </div>\n                                                                                                                                                                                                                        <div class="row" ng-repeat= " (question , answers) in questions ">\n                                                                                                                                                                                                                            <div class="col-md-10 col-md-offset-1">\n                                                                                                                                                                                                                                       <div class="row" style="word-wrap: break-word;">\n                                                                                                                                                                                                                                              <h3 >\n                                                                                                                                                                                                                                                         <i class="icon-bar-chart "></i>\n\n                                                                                                                                                                                                                                                             </h3>\n                                                                                                                                                                                                                                                         {{question}}\n                                                                                                                                                                                                                                  </div>\n                                                                                                                                                                                                                                        <div class="row">\n                                                                                                                                                                                                                                             <div class="col-md-6 col-md-offset-3 ">\n                                                                                                                                                                                                                                               <table class="table  table-hover">\n                                                                                                                                                                                                                                                    <thead>\n                                                                                                                                                                                                                                                               <tr>\n                                                                                                                                                                                                                                                                  <th style="width=5%"> Answer  </th>\n                                                                                                                                                                                                                                                                   <th style="width=5%"> Count </th>\n                                                                                                                                                                                                                                                             </tr>\n                                                                                                                                                                                                                                                 </thead>\n                                                                                                                                                                                                                                                      <tbody>\n                                                                                                                                                                                                                                                               <tr ng-if= "answer.question_answer"  ng-repeat="answer in answers ">\n\n                                                                                                                                                                                                                                                                                                <td>{{answer.question_answer || \'No answer\'}}</td>\n                                                                                                                                                                                                                                                                                          <td>{{answer.count}}</td>\n\n                                                                                                                                                                                                                                                           </tr>\n\n                                                                                                                                                                                                                                                       </tbody>\n                                                                                                                                                                                                                                              </table>\n                                                                                                                                                                                                                                              </div>\n                                                                                                                                                                                                                                        </div>\n\n                                                                                                                                                                                                                              </div>\n                                                                                                                                                                                                                </div>\n                                                                                                                                                                                                        </div>\n\n\n                                                                                                                                                                                                    </div>\n\n\n                                                                                                                                                                    </div>\n                                                                                                                                </div>\n                                                                                                                                <!-- <div class="panel panel-info" ng-repeat= " question in questionDetail ">\n                                                                                                                                 <div class="panel-heading">\n                                                                                                                                           <h3 class="panel-title">\n                                                                                                                                                              <i class="icon-bar-chart "></i>\n                                                                                                                                                               {{question.question_label}}</h3>\n\n                                                                                                                                    </div>\n                                                                                                                                        <div class="panel-body">\n                                                                                                                                              <div class="row">\n                                                                                                                                                     <div class="col-md-10 col-md-offset-1 ">\n                                                                                                                                                              <strong>ID:      </strong>{{question.question_id}}\n                                                                                                                                                    </div>\n                                                                                                                                                </div>\n                                                                                                                                                <div class="row">\n                                                                                                                                                     <div class="col-md-10 col-md-offset-1 ">\n                                                                                                                                                              <strong>Question:        </strong>{{question.question_text}}\n                                                                                                                                                  </div>\n                                                                                                                                                </div>\n\n                                                                                                                                              <div class="row">\n                                                                                                                                                     <div class="col-md-6 col-md-offset-3 ">\n                                                                                                                                                       <table class="table  table-hover">\n                                                                                                                                                            <thead>\n                                                                                                                                                                       <tr>\n                                                                                                                                                                          <th style="width=5%"> Answer  </th>\n                                                                                                                                                                           <th style="width=5%"> Count </th>\n                                                                                                                                                                     </tr>\n                                                                                                                                                         </thead>\n                                                                                                                                                              <tbody>\n                                                                                                                                                                       <tr ng-if= "answer"  ng-repeat="answer in question.question_answers ">\n\n                                                                                                                                                                                                      <td>{{answer || \'No answer\'}}</td>\n                                                                                                                                                                                                  <td>{{question.count[$index]}}</td>\n\n                                                                                                                                                                 </tr>\n\n                                                                                                                                                               </tbody>\n                                                                                                                                                      </table>\n                                                                                                                                                      </div>\n                                                                                                                                                </div>\n                                                                                                                                                <div class="row" ng-if="question.question_other_label">\n                                                                                                                                                       <div class="col-md-10 col-md-offset-1 ">\n                                                                                                                                                              <i class="fa fa-cog "></i>\n                                                                                                                                                                    {{question.question_other_label}}\n                                                                                                                                                     </div>\n                                                                                                                                                </div>\n\n                                                                                                                                              <div class="row" ng-if="question.question_other_label">\n                                                                                                                                                       <div class="col-md-6 col-md-offset-3 ">\n                                                                                                                                                       <table class="table  table-hover">\n                                                                                                                                                            <thead>\n                                                                                                                                                                       <tr>\n                                                                                                                                                                          <th style="width=5%"> Value  </th>\n                                                                                                                                                                            <th style="width=5%"> Count </th>\n                                                                                                                                                                     </tr>\n                                                                                                                                                         </thead>\n                                                                                                                                                              <tbody>\n\n                                                                                                                                                                     <tr ng-if= "answer" ng-repeat="answer in question.question_other_answer ">\n\n                                                                                                                                                                                                  <td>{{answer || \'No value\'}}</td>\n                                                                                                                                                                                                   <td>{{question.question_other_count[$index]}}</td>\n\n                                                                                                                                                                  </tr>\n\n                                                                                                                                                               </tbody>\n                                                                                                                                                      </table>\n                                                                                                                                                      </div>\n                                                                                                                                                </div>\n                                                                                                                                        </div>\n                                                                                                                                </div> -->\n                                                                                                                    </div>\n\n                                                                                                              </div>\n\n                                                                                                      </div>\n                                                                                                </div>\n\n               </div>\n\n                     </div>\n\n              </div>\n                </div>\n                        </div>\n'),a.put("app/jscripty/project/report/report.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row margin-top-20" data-ng-init="initView()">\n                             <div class="col-md-12">\n\n                             <!-- BEGIN PROFILE SIDEBAR -->\n                                        <div class="profile-sidebar">\n               <div class="portlet light profile-sidebar-portlet">\n                                                                             <!-- SIDEBAR USERPIC -->\n                                                                              <div class="profile-userpic">\n                                                                                         <img src="assets/images/xcally.png" class="img-responsive" >\n                                                                          </div>\n                                                                                <!-- END SIDEBAR USERPIC -->\n                                                                          <!-- SIDEBAR USER TITLE -->\n                                                                           <div class="profile-usertitle">\n                                                                                               <div class="profile-usertitle-name">\n                                                                                          </div>\n                                                                                                <div class="profile-usertitle-job">\n\n                                                                                         </div>\n                                                                                </div>\n                                                                                <!-- END SIDEBAR USER TITLE -->\n\n                                                                             <!-- SIDEBAR MENU -->\n                                                                         <div class="profile-usermenu">\n                                                                                                        <ul class="nav">\n                                                                                                              <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.sessions\')}">\n                                                                                                          <!-- <li class="active"> -->\n\n                                                                                                                                        <a data-ng-href=\'/jscripty/projects/report/{{projectId}}/sessions\'>\n                                                                 <i class="icon-settings"></i>\n                                                                 Project Sessions</a>\n                                                                                                          </li>\n                                                         <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.summary\')}">\n                                                                                                                           <a data-ng-href=\'/jscripty/projects/report/{{projectId}}/summary\'>\n                                                                                          <i class="fa fa-bar-chart"></i>\n                                                                     Questions Summary</a>\n                                                           </li>\n                                                         <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.detail\')}">\n                                                                                                                            <a data-ng-href=\'/jscripty/projects/report/{{projectId}}/detail\'>\n                                                                                                           <i class="fa fa-list"></i>\n                                                                  Questions Detail</a>\n                                                            </li>\n                                                                                                 </ul>\n                                                                         </div>\n                                                                                <!-- END MENU -->\n\n                   </div>\n\n              </div>\n\n              <div class="profile-content margin-top-20">\n                                                                   <div class="row">\n                                                                             <div class="col-md-12">\n                                                                                                               <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n                                                                                                                    <div class="dashboard-stat2">\n                                                                                                                         <div class="display">\n                                                                                                                                 <div class="number">\n                                                                                                                                          <h3 class="font-green-sharp">{{projectStats.started}}</h3>\n                                                                                                                                            <small>Started</small>\n                                                                                                                                        </div>\n                                                                                                                                        <div class="icon">\n                                                                                                                                            <i class="icon-pie-chart"></i>\n                                                                                                                                        </div>\n                                                                                                                                </div>\n                                                                                                                                <div class="progress-info">\n                                                                                                                                   <div class="progress">\n                                                                                                                                                <span style="width: 100%;" class="progress-bar progress-bar-success green-sharp">\n                                                                                                                                             </span>\n                                                                                                                                       </div>\n                                                                                                                                        <div class="status">\n                                                                                                                                  </div>\n                                                                                                                                </div>\n                                                                                                                        </div>\n                                                                                                                </div>\n                                                                                                                <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n                                                                                                                    <div class="dashboard-stat2">\n                                                                                                                         <div class="display">\n                                                                                                                                 <div class="number">\n                                                                                                                                          <h3 class="font-red-haze">{{projectStats.incomplete}}</h3>\n                                                                                                                                            <small>Incomplete</small>\n                                                                                                                                     </div>\n                                                                                                                                        <div class="icon">\n                                                                                                                                            <i class="icon-chart"></i>\n                                                                                                                                    </div>\n                                                                                                                                </div>\n                                                                                                                                <div class="progress-info">\n                                                                                                                                   <div class="progress">\n                                                                                                                                                <span style="width: 100%;" class="progress-bar progress-bar-success red-haze">\n                                                                                                                                                </span>\n                                                                                                                                       </div>\n                                                                                                                                        <div class="status">\n                                                                                                                                  </div>\n                                                                                                                                </div>\n                                                                                                                        </div>\n                                                                                                                </div>\n                                                                                                                <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n                                                                                                                    <div class="dashboard-stat2">\n                                                                                                                         <div class="display">\n                                                                                                                                 <div class="number">\n                                                                                                                                          <h3 class="font-blue-sharp">{{projectStats.completed}}</h3>\n                                                                                                                                           <small>Completed</small>\n                                                                                                                                      </div>\n                                                                                                                                        <div class="icon">\n                                                                                                                                            <i class="icon-like"></i>\n                                                                                                                                     </div>\n                                                                                                                                </div>\n                                                                                                                                <div class="progress-info">\n                                                                                                                                   <div class="progress">\n                                                                                                                                                <span style="width: 100%;" class="progress-bar progress-bar-success blue-sharp">\n                                                                                                                                              </span>\n                                                                                                                                       </div>\n                                                                                                                                        <div class="status">\n                                                                                                                                  </div>\n                                                                                                                                </div>\n                                                                                                                        </div>\n                                                                                                                </div>\n                                                                                        </div>\n                                                        </div>\n\n                      <div class="row">\n                       <div ui-view class="col-md-12">\n                       </div>\n                        </div>\n              </div>\n        </div>\n        </div>\n'),a.put("app/jscripty/project/report/report.session.detail.html",'\n\n<div class="row" data-ng-init="getSessionDetails()">\n                   <div class="col-md-12">\n                                       <div class="portlet" >\n                                                                        <div class="portlet-title">\n                                                                           <div class="caption">\n                                                                                 <i class="fa fa-list"></i>Session Detail\n                                                                              </div>\n                                                                                <div class="tools">\n                                                                                   <a href="" class="fullscreen" data-original-title="" title="">\n                                                                                        </a>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="portlet-body"  id="sessionDetail" style="height: auto;">\n                                                                          <div class="row  margin-top-20">\n                                                                                      <div class="col-md-10 col-md-offset-1">\n                                                                                               <div class="panel panel-default">\n                                                                                                     <div class="panel-heading">\n                                                                                                           <p>\n                                                                                                                   <h3 class="panel-title">\n                                                                                                                              Session Id: {{sessionQuestions.session_id}}</h3>\n                                                                                                              </p>\n                                                                                                          <p>\n                                                                                                                   <h3 class="panel-title">\n                                                                                                                              Status: {{sessionQuestions.status}}</h3>\n                                                                                                              </p>\n                                                                                                          <p>\n                                                                                                                   <h3 class="panel-title">\n                                                                                                                              Started At: {{sessionQuestions.createdAt}}</h3>\n                                                                                                               </p>\n                                                                                                          <p ng-if="sessionQuestions.completedAt">\n                                                                                                                      <h3 class="panel-title">\n                                                                                                                              Closed At: {{sessionQuestions.completedAt}}</h3>\n                                                                                                              </p>\n                                                                                                  </div>\n\n                                                                                              </div>\n\n                                                                                              <div class="panel panel-info" ng-repeat=" question in sessionQuestions.ReportJscriptyQuestions |orderBy:\'id\'">\n                                                                                                      <div class="panel-heading">\n                                                                                                           <h3 class="panel-title">\n                                                                                                                              <i class="icon-bar-chart "></i>\n                                                                                                                               {{question.question_label}} [ID : {{question.question_id}}]</h3>\n\n                                                                                                    </div>\n                                                                                                        <div class="panel-body"  ng-if="question.question_text" >\n\n                                                                                                           <div class="row" style="word-wrap: break-word;">\n                                                                                                                      <div class="col-md-10 col-md-offset-1 ">\n                                                                                                                              <h4><strong>Question:    </strong></h4>{{question.question_text}}\n                                                                                                                     </div>\n                                                                                                                </div>\n                                                                                                                <div class="row" style="word-wrap: break-word;">\n                                                                                                                      <div class="col-md-10 col-md-offset-1 " ng-if="question.question_answer ">\n                                                                                                                            <h4><strong>Answer:      </strong></h4>{{question.question_answer}}\n                                                                                                                   </div>\n                                                                                                                </div>\n                                                                                                                <div ng-if="question.question_other_label" class="col-md-10 col-md-offset-1 ">\n                                                                                                                        <h4>\n                                                                                                                                  <i class="fa fa-cog "></i>\n                                                                                                                                    <strong>{{question.question_other_label}}: </strong>\n                                                                                                                  </h4>\n                                                                                                                 {{question.question_other_answer}}\n                                                                                                            </div>\n                                                                                                        </div>\n\n\n                                                                                                            <div class="row">\n                                                                                                                     <div class="col-md-6 col-md-offset-3 ">\n                                                                                                                               <table class="table  table-hover" ng-if="question.ReportJscriptyInputs.length">\n                                                                                                                                       <thead>\n                                                                                                                                               <tr>\n                                                                                                                                                  <th style="width=5%"> Label </th>\n                                                                                                                                                     <th style="width=5%">Answer </th>\n                                                                                                                                             </tr>\n                                                                                                                                 </thead>\n                                                                                                                                      <tbody>\n\n                                                                                                                                             <tr ng-repeat="input in question.ReportJscriptyInputs |orderBy:\'id\'">\n\n                                                                                                                                                                             <td>{{input.input_label}}</td>\n                                                                                                                                                                                <td>{{input.input_value || \'No Answer\'}}</td>\n\n                                                                                                                                             </tr>\n\n                                                                                                                                       </tbody>\n                                                                                                                              </table>\n\n                                                                                                                    </div>\n                                                                                                                </div>\n                                                                                                        </div>\n                                                                                                </div>\n                                                                                        </div>\n\n                                                                              </div>\n\n                                                                      </div>\n\n                                                              </div>\n                                        </div>\n        </div>\n'),
-a.put("app/jscripty/project/report/report.sessions.html",'<!-- <div ui-view class="profile-content"> -->\n\n   <div class="row" data-ng-init="getProjectSessions()">\n         <div class="col-md-12">\n                       <!-- <div class="tab-pane active" id="tab_1_1" > -->\n                          <div class="portlet box blue">\n                                                        <div class="portlet-title">\n                                                           <div class="caption">\n                                                                 <i class="icon-settings"></i>Project Sessions\n                                                         </div>\n                                                                <div class="tools">\n                                                                   <a href="" class="fullscreen" data-original-title="" title="">\n                                                                        </a>\n                                                          </div>\n                                                        </div>\n                                                        <div class="portlet-body" style="height: auto;">\n                                                              <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n\n                                                          </div>\n                                                        </div>\n                                </div>\n                        <!-- </div> -->\n                       </div>\n        </div>\n<!-- </div> -->\n'),a.put("app/jscripty/project/report/report.summary.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="tab-pane" id="tab_1_2" data-ng-init="getQuestionSummary()" >\n                      <div class="portlet box blue">\n                                                                        <div class="portlet-title">\n                                                                           <div class="caption">\n                                                                                 <i class="fa fa-bar-chart"></i>Questions Summary\n\n                                                                            </div>\n                                                                                <div class="tools">\n                                                                                   <a href="" class="fullscreen" data-original-title="" title="">\n                                                                                        </a>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="portlet-body" style="height: auto;">\n                                                                              <div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                                                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n\n                                                                          </div>\n\n                                                                      </div>\n\n                              </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/jscripty/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-edit"></i>\n                                            <a href="/jscripty/projects/list">{{ \'APPLICATION_JSCRIPTY\' | translate }}</a>\n                                              <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-slack"></i>\n                                           <a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n                                       </li>\n          <li>\n                                         <a ng-href="/jscripty/projects/view/{{jscriptyProject.id}}">{{jscriptyProject.name}}</a>\n          </li>\n                             </ul>\n                 </div>\n                </div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n              <div id="geEditor" class="geEditor"></div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n<script>\n\n\n</script>\n'),a.put("app/login/login.html",'<!-- BEGIN LOGO -->\n<div class="logo">\n     <a href="index.html">\n <img src="assets/images/logo-big.png" alt=""/>\n        </a>\n</div>\n<!-- END LOGO -->\n<!-- BEGIN LOGIN -->\n<div class="content">\n  <!-- BEGIN LOGIN FORM -->\n     <form class="login-form" name="loginForm" data-ng-show="!flagLogin1" data-ng-submit="login(loginForm)" novalidate>\n            <h3 class="form-title">Sign In</h3>\n           <div class="alert alert-danger" data-ng-class="{\'display-hide\': !loginSubmitted || !errorLogin}">\n                   <button class="close" data-close="alert"></button>\n                    <span>{{ errorLog ? errorLog : \'Enter any username and password.\'}}</span>\n          </div>\n                <div class="form-group" data-ng-class="{\'has-error\': loginSubmitted && loginForm.name.$invalid}">\n                   <label class="control-label">Username</label>\n      <div class="input-icon">\n        <i class="fa fa-user"></i>\n        <input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="Username" name="name" ng-model="userLogin.name" required/>\n      </div>\n      <span data-ng-show="loginSubmitted && loginForm.name.$invalid" class="help-block">Username is required.</span>\n           </div>\n                <div class="form-group" data-ng-class="{\'has-error\': loginSubmitted && loginForm.password.$invalid}">\n                       <label class="control-label">Password</label>\n      <div class="input-icon">\n        <i class="fa fa-lock"></i>\n        <input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="Password" name="password" ng-model="userLogin.password" required/>\n      </div>\n      <span data-ng-show="loginSubmitted && loginForm.password.$invalid" class="help-block">Password is required.</span>\n           </div>\n                <div class="form-actions">\n                    <button type="submit" class="btn btn-success uppercase">Login</button>\n      <label class="rememberme check">\n        <input type="checkbox"> Remember me\n      </label>\n                   <!-- <label class="rememberme check">\n                 <input type="checkbox" name="remember" value="1"/>Remember </label> -->\n                       <!-- <a href="javascript:;" id="forget-password" class="forget-password">Forgot Password?</a> -->\n             </div>\n                <div class="login-options">\n                   <h4>Follow Us on</h4>\n                 <ul class="social-icons">\n                             <li>\n                                  <a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xenialab"></a>\n                            </li>\n                         <li>\n                                  <a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xenialab"></a>\n                           </li>\n                         <li>\n                                  <a class="social-icon-color googleplus" data-original-title="Goole Plus" href="#"></a>\n                                </li>\n                         <li>\n                                  <a class="social-icon-color linkedin" data-original-title="Linkedin" href="#"></a>\n                            </li>\n                 </ul>\n         </div>\n        </form>\n</div>\n<div class="copyright">\n       xCALLY Motion | {{year}} - {{year + 1}} &copy; Powered by Xenialab\n</div>\n<!-- END LOGIN -->\n'),a.put("app/main/chooseContact.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_CHOOSE_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <table st-table="rowCollection" class="table table-striped">\n     <tbody>\n       <tr ng-repeat="contact in contacts">\n                  <td>{{contact.fullname}}</td>\n                 <td>{{contact.Service.name}}</td>\n             <td>\n        <button class="btn default btn-xs green-stripe" data-ng-click="open(contact)">\n          {{ \'APPLICATION_OPEN\' | translate}}\n        </button>\n      </td>\n         </tr>\n    <tr data-ng-hide="contacts.length">\n      <td colspan="3" style="text-align:center;">\n        <i>{{ \'MESSAGE_NO_CONTACTS_AVAILABLE\' | translate }}</i>\n      </td>\n    </tr>\n         </tbody>\n  </table>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="open()"><i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/closeEditedTab.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_CLOSE_EDITED_TAB\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/main.html",'<!-- BEGIN HEADER -->\n<div data-ng-include="\'components/header/header.html\'" data-ng-controller="HeaderController" class="page-header navbar navbar-fixed-top">\n</div>\n<!-- END HEADER -->\n\n<div class="clearfix">\n</div>\n<!-- BEGIN CONTAINER -->\n<div class="page-container" data-ng-init="initMain()">\n\n  <!-- BEGIN SIDEBAR -->\n  <div data-ng-include="\'components/sidebar/sidebar.html\'" data-ng-controller="SidebarController" class="page-sidebar-wrapper">\n  </div>\n  <!-- END SIDEBAR -->\n\n  <!-- BEGIN CONTENT -->\n  <div class="page-content-wrapper">\n    <div class="page-content" data-ng-class="{\'demo\': !license.expiration}">\n\n      <!-- BEGIN PAGE CONTENT -->\n      <uib-tabset>\n        <uib-tab select="addWorkspace()" active="mainTab.active">\n          <uib-tab-heading>\n            Motion <i class="icon-rocket"></i>\n          </uib-tab-heading>\n          <div ui-view class=""></div>\n        </uib-tab>\n        <uib-tab data-ng-repeat="workspace in workspaces" active="workspace.active" data-ng-switch="workspace.type">\n          <uib-tab-heading>\n            {{workspace.name}} <i class="icon-close pointer-cursor" data-ng-click="closeTab($index)"></i>\n          </uib-tab-heading>\n          <div class="" data-ng-switch="workspace.type">\n            <new-contact data-ng-switch-when="newContact" workspace="workspace" index="$index" on-submit="createContact(index,item)"></new-contact>\n            <contact data-ng-switch-when="contact" workspace="workspace" index="$index" on-submit="updateContact(index,item)"></contact>\n            <jscripty data-ng-switch-when="jscripty" workspace="workspace" index="$index" on-submit="closeTab(index)"></jscripty>\n          </div>\n        </uib-tab>\n      </uib-tabset>\n      <!-- END PAGE CONTENT  -->\n\n    </div>\n  </div>\n  <!-- END CONTENT -->\n\n  <!-- BEGIN QUICK SIDEBAR -->\n  <a href="javascript:;" class="page-quick-sidebar-toggler"><i class="icon-close"></i></a>\n  <div data-ng-include="\'components/quickSidebar/quickSidebar.html\'" data-ng-controller="QuickSidebarController" class="page-quick-sidebar-wrapper">\n  </div>\n  <!-- END QUICK SIDEBAR -->\n\n</div>\n<!-- END CONTAINER -->\n\n<!-- BEGIN FOOTER -->\n<div data-ng-include="\'components/footer/footer.html\'" data-ng-controller="FooterController" class="page-footer">\n</div>\n<!-- END FOOTER -->\n\n<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->\n<!-- BEGIN CORE PLUGINS -->\n<!--[if lt IE 9]>\n<script src="../../assets/global/plugins/respond.min.js"></script>\n<script src="../../assets/global/plugins/excanvas.min.js"></script>\n<![endif]-->\n\n<!-- END JAVASCRIPTS -->\n'),a.put("app/main/template/actionBuilder/template.actionBuilderIntegration.html",'<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" data-ng-change="changeIntegration()" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="integration.state as integration in integrations | filter: $select.search">\n      <div ng-bind-html="integration.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-2" data-ng-if="element.data1 && accounts && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" data-ng-change="changeAccount();" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-2" data-ng-if="element.data2 && configurations && randomName" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data3" name="data3{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="config.id as config in configurations | filter: $select.search">\n      <div ng-bind-html="config.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderStatus.html",'<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="status.value as status in states | filter: $select.search">\n      <div ng-bind-html="status.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderTemplate.html",'<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-2">\n  <input type="text" ng-model="element.data3" class="form-control"/>\n</div>\n'),a.put("app/main/template/template.conditionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-3" data-ng-class="{\'has-error\': (form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.field" name="field{{randomName}}" theme="bootstrap" data-ng-change="checkCondition(element.field)" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="condition.value as condition in service.services[serviceindex].conditions | filter: $select.search">\n      <div ng-bind-html="condition.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.field" class="form-group col-md-3" data-ng-class="{\'has-error\': (form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.operator" name="operator{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="operator.value as operator in _.find(service.services[serviceindex].conditions,{value:element.field}).operators | filter: $select.search">\n      <div ng-bind-html="operator.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-3" data-ng-if="elementType === \'input\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <input type="text" ng-model="element.value" class="form-control" name="value{{randomName}}" required/>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n</div>\n<div class="form-group col-md-3" data-ng-if="elementType === \'select\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.value" name="value{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="value.value as value in values| filter: $select.search">\n      <div ng-bind-html="value.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/template.contactTab.html",'<div class="row margin-top-20 contact-tab-container">\n  <div class="col-md-12 contact-tab">\n    <form name="forms.general" data-ng-submit="submit({index:index,item:contact})" novalidate>\n    <!-- BEGIN PROFILE SIDEBAR -->\n    <div class="profile-sidebar">\n      <!-- PORTLET MAIN -->\n      <div class="portlet light pbottom20">\n        <!-- SIDEBAR USERPIC -->\n        <div class="profile-userpic">\n          <img src="assets/images/media/contact.png" class="img-responsive" alt="">\n        </div>\n        <!-- END SIDEBAR USERPIC -->\n        <!-- SIDEBAR USER TITLE -->\n        <div class="profile-usertitle">\n          <div class="profile-usertitle-name">\n            {{contact.fullname}}\n          </div>\n          <div class="profile-usertitle-job">\n          </div>\n        </div>\n        <!-- END SIDEBAR USER TITLE -->\n        <!-- SIDEBAR BUTTONS -->\n        <div class="profile-userbuttons">\n          <button type="submit" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!contact.fullname">{{\'APPLICATION_UPDATE\' | translate}}</button>\n          <!-- <button type="button" class="btn btn-circle btn-danger btn-sm">Message</button> -->\n        </div>\n      </div>\n      <!-- END PORTLET MAIN -->\n      <!-- PORTLET MAIN -->\n      <!-- <div class="portlet light">\n\n        <div class="row list-separated profile-stat">\n          <div class="col-md-4 col-sm-4 col-xs-6">\n            <div class="uppercase profile-stat-title">\n               37\n            </div>\n            <div class="uppercase profile-stat-text">\n               Projects\n            </div>\n          </div>\n          <div class="col-md-4 col-sm-4 col-xs-6">\n            <div class="uppercase profile-stat-title">\n               51\n            </div>\n            <div class="uppercase profile-stat-text">\n               Tasks\n            </div>\n          </div>\n          <div class="col-md-4 col-sm-4 col-xs-6">\n            <div class="uppercase profile-stat-title">\n               61\n            </div>\n            <div class="uppercase profile-stat-text">\n               Uploads\n            </div>\n          </div>\n        </div>\n\n        <div>\n          <h4 class="profile-desc-title">{{\'APPLICATION_ABOUT\' | translate}} {{contact.fullname}}</h4>\n          <span class="profile-desc-text break-overflow">{{contact.description}}</span>\n          <div class="margin-top-20 profile-desc-link">\n            <i class="fa fa-globe"></i>\n            <a href="http://www.keenthemes.com">www.keenthemes.com</a>\n          </div>\n          <div class="margin-top-20 profile-desc-link">\n            <i class="fa fa-twitter"></i>\n            <a href="http://www.twitter.com/keenthemes/">@keenthemes</a>\n          </div>\n          <div class="margin-top-20 profile-desc-link">\n            <i class="fa fa-facebook"></i>\n            <a href="http://www.facebook.com/keenthemes/">keenthemes</a>\n          </div>\n        </div>\n      </div> -->\n      <!-- END PORTLET MAIN -->\n    </div>\n    <!-- END BEGIN PROFILE SIDEBAR -->\n    <!-- BEGIN PROFILE CONTENT -->\n    <div class="profile-content">\n      <div class="row">\n        <div class="col-md-6">\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light ">\n            <div class="portlet-title">\n              <div class="caption caption-md">\n                <i class="icon-bar-chart theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n              </div>\n              <div class="actions">\n                <div class="btn-group btn-group-devided" data-toggle="buttons">\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="detail.tab=\'main\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_MAIN\' | translate}}</label>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="detail.tab=\'address\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_ADDRESS\' | translate}}</label>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="detail.tab=\'other\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_OTHER\' | translate}}</label>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="detail.tab=\'customFields\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</label>\n                </div>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <div data-ng-class="{\'hidden\':detail.tab != \'main\'}" class="portlet-body contact-portlet">\n              <!-- START FULLNAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.fullname.$touched || forms.general.$submitted) && forms.general.fullname.$invalid}">\n                <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="contact.fullname" required/>\n                <span data-ng-show="(forms.general.fullname.$touched || forms.general.$submitted) && forms.general.fullname.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END FULLNAME -->\n\n              <!-- START COMPANY -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n                <ui-select data-ng-model="contact.CompanyId" theme="bootstrap" name="CompanyId" ng-disabled="disabled">\n                  <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                  <ui-select-choices repeat="company.id as company in companies | filter: $select.search">\n                    <div ng-bind-html="company.name | highlight: $select.search"></div>\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COMPANY -->\n\n              <!-- START TAGS -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.tags.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n                <ui-select tagging tagging-label="" multiple=\'true\' data-ng-model="contact.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                  <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n                  <ui-select-choices repeat="tag in tags | filter: $select.search">\n                    {{tag}}\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="forms.general.tags.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END TAGS -->\n              <!-- START SERVICE -->\n              <div class="form-group">\n                <label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label>\n                <input type="text" name="service" placeholder="{{\'APPLICATION_SERVICE\' | translate}}" class="form-control" data-ng-model="contact.Service.name" disabled/>\n              </div>\n              <!-- END SERVICE -->\n\n            </div>\n            <div data-ng-class="{\'hidden\':detail.tab != \'address\'}" class="portlet-body contact-portlet">\n              <!-- START STREET -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n                <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                <input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="contact.street"/>\n                <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END STREET -->\n\n              <!-- START POSTALCODE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n                <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                <input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="contact.postalCode"/>\n                <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END POSTALCODE -->\n\n              <!-- START CITY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n                <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                <input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="contact.city"/>\n                <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END CITY -->\n\n              <!-- START COUNTRY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n                <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                <input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="contact.country"/>\n                <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COUNTRY -->\n            </div>\n            <div data-ng-class="{\'hidden\':detail.tab != \'other\'}" class="portlet-body contact-portlet">\n              <!-- START DATEOFBIRTH -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$invalid}">\n                <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n                <input name="dateOfBirth" type="date" placeholder="{{\'APPLICATION_DATEOFBIRTH\' | translate}}" class="form-control date-picker" data-ng-model="contact.dateOfBirth"/>\n                <span data-ng-show="(forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END DATEOFBIRTH -->\n\n              <!-- START DESCRIPTION -->\n              <div class="form-group">\n                <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                <textarea style="resize: vertical;" type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="contact.description"></textarea>\n              </div>\n              <!-- END DESCRIPTION -->\n              <!-- START CREATED_BY -->\n              <div class="form-group">\n                <label class="control-label">{{\'APPLICATION_CREATED_BY\' | translate}}</label>\n                <input type="text" name="createdBy" placeholder="{{\'APPLICATION_CREATED_BY\' | translate}}" class="form-control" data-ng-model="contact.User.name" disabled/>\n              </div>\n              <!-- END CREATED_BY -->\n            </div>\n            <div data-ng-class="{\'hidden\':detail.tab != \'customFields\'}" class="portlet-body contact-portlet">\n              <div data-ng-repeat="customField in customFields">\n                <div data-ng-if="customField.active || _.find(contact.CustomFields,{id:customField.id})">\n                <div data-ng-if="customField.type==\'text\'" class="form-group" data-ng-class="{\'has-error\': (forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$invalid}">\n                  <label class="control-label">{{customField.name}}</label>\n                  <input data-ng-if="!joinPrompt" type="text" name="{{customField.name}}" placeholder="{{customField.name}}" class="form-control" data-ng-model="contact.customFields[customField.id]"/>\n                  <span data-ng-show="(forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <div data-ng-if="customField.type==\'select\'" class="form-group" data-ng-class="{\'has-error\': forms.general[customField.name].$invalid && forms.general.$submitted}">\n                  <label class="control-label">{{customField.name}}</label>\n                  <ui-select data-ng-if="!joinPrompt" data-ng-model="contact.customFields[customField.id]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n                    <ui-select-match allow-clear placeholder="{{customField.name}}">{{$select.selected.value}}</ui-select-match>\n                    <ui-select-choices repeat="choice.value as choice in customField.values | filter: $select.search">\n                      <div ng-bind-html="choice.value | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="forms.general[customField.name].$invalid && forms.general.$submitted" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n              </div>\n              </div>\n            </div>\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </div>\n        <div class="col-md-6">\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONTACTS\' | translate}}</span>\n              </div>\n              <ul class="nav nav-tabs">\n                <li class="active">\n                  <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PHONES\' | translate}}</a>\n                </li>\n                <li>\n                  <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_EMAILS\' | translate}}</a>\n                </li>\n              </ul>\n            </div>\n            <div class="portlet-body">\n              <!--BEGIN TABS-->\n              <div class="tab-content">\n                <div class="tab-pane active" id="tab_1_1">\n                  <div class="contact-portlet">\n                    <!-- START PHONES -->\n                    <div class="padding-bottom mbottom20">\n                    <div data-ng-if="contact.Phones.length>0">\n                      <label class="control-label">{{\'APPLICATION_PHONES\' | translate}}</label>\n                    </div>\n                    <div class="padding-bottom" ng-repeat="phone in contact.Phones">\n                      <div class="form-group">\n                        <div class="input-group">\n                          <input type="text" class="form-control" ng-model="phone.phone" required>\n                          <span class="input-group-btn">\n                          <button class="btn red" type="button"data-ng-click="removeField(\'Phones\',$index)"><i class="fa fa-times"></i></button>\n                          </span>\n                        </div>\n                      </div>\n                    </div>\n                    <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField(\'Phones\')">\n                      <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_PHONE\' | translate}}\n                    </button>\n                  </div>\n                  <!-- END PHONES -->\n                </div>\n              </div>\n                <div class="tab-pane" id="tab_1_2">\n                  <div class="contact-portlet">\n                    <!-- START EMAILS -->\n                      <div class="padding-bottom mbottom20">\n                      <div data-ng-if="contact.Emails.length>0">\n                        <label class="control-label">{{\'APPLICATION_EMAILS\' | translate}}</label>\n                      </div>\n                      <div class="padding-bottom" ng-repeat="email in contact.Emails">\n                        <div class="form-group">\n                          <div class="input-group">\n                            <input type="email" class="form-control" ng-model="email.email" required>\n                            <span class="input-group-btn">\n                            <button class="btn btn-danger" type="button" data-ng-click="removeField(\'Emails\',$index)"><i class="fa fa-times"></i></button>\n                            </span>\n                          </div>\n                        </div>\n                      </div>\n                      <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField(\'Emails\')">\n                        <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_EMAIL\' | translate}}\n                      </button>\n                    </div>\n                    <!-- END EMAILS -->\n                  </div>\n                </div>\n              </div>\n              <!--END TABS-->\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </div>\n      </div>\n      <div class="row">\n        <div class="col-md-12">\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_LOG\' | translate}}</span>\n              </div>\n              <ul class="nav nav-tabs">\n                <li class="active">\n                  <a href="#" data-target="#tab_2_1" data-toggle="tab">{{ \'APPLICATION_JOURNAL\' | translate}}</a>\n                </li>\n                <li>\n                  <a href="#" data-target="#tab_2_2" data-toggle="tab">{{ \'APPLICATION_HISTORY\' | translate}}</a>\n                </li>\n              </ul>\n            </div>\n            <div class="portlet-body">\n              <!--BEGIN TABS-->\n              <div class="tab-content">\n                <div class="tab-pane active" id="tab_2_1">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="log.journal.show=\'Phones\';getRows(\'journal\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_PHONES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.journal.show=\'Emails\';log.journal.detail=\'general\';getRows(\'journal\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_EMAILS\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="log.journal.type=\'Inbounds\';getRows(\'journal\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_INBOUND\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.journal.type=\'Outbounds\';getRows(\'journal\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_OUTBOUND\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.journal.show==\'Phones\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="log.journal.detail=\'general\';getRows(\'journal\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_GENERAL\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.journal.detail=\'QueueCalls\';getRows(\'journal\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_QUEUES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.journal.detail=\'ReportAgents\';getRows(\'journal\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_AGENTS\' | translate}}</label>\n                      </div>\n                    </div>\n                    <table st-table="journal" class="table table-striped">\n                                <thead>\n                               <tr>\n                                          <th data-ng-repeat="column in columns[log.journal.show][log.journal.detail].header">{{column | translate}}</th>\n                               </tr>\n                                 </thead>\n                              <tbody>\n                               <tr data-ng-repeat="row in rows[\'journal\']">\n                                        <td data-ng-repeat="col in columns[log.journal.show][log.journal.detail].indexes">{{col == \'createdAt\' ? moment(row[col]).format(\'DD/MM/YYYY HH:mm:ss\') : row[col]}}</td>\n                                 </tr>\n                      <tr data-ng-hide="rows[\'journal\'].length">\n                        <td colspan="{{columns[log.journal.show][log.journal.detail].header.length}}" class="text-center">\n                          {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}\n                        </td>\n                      </tr>\n                                 </tbody>\n                              <tfoot>\n                                       <tr>\n                                                  <td colspan="{{columns[log.journal.show][log.journal.detail].header.length}}" class="text-center">\n                                                    <div st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="7"></div>\n                                            </td>\n                                         </tr>\n                                 </tfoot>\n                      </table>\n\n                  </div>\n              </div>\n                <div class="tab-pane" id="tab_2_2">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="log.history.show=\'Phones\';getRows(\'history\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_PHONES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.history.show=\'Emails\';log.history.detail=\'general\';getRows(\'history\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_EMAILS\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="log.history.type=\'HistoryInbounds\';getRows(\'history\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_INBOUND\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.history.type=\'HistoryOutbounds\';getRows(\'history\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_OUTBOUND\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.history.show==\'Phones\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="log.history.detail=\'general\';getRows(\'history\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_GENERAL\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.history.detail=\'HistoryQueueCalls\';getRows(\'history\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_QUEUES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="log.history.detail=\'HistoryReportAgents\';getRows(\'history\');">\n                        <input type="radio" class="toggle">{{\'APPLICATION_AGENTS\' | translate}}</label>\n                      </div>\n                    </div>\n                    <table st-table="history" class="table table-striped">\n                      <thead>\n                      <tr>\n                        <th data-ng-repeat="column in columns[log.history.show][log.history.detail].header">{{column | translate}}</th>\n                      </tr>\n                      </thead>\n                      <tbody>\n                      <tr data-ng-repeat="row in rows[\'history\']">\n                        <td data-ng-repeat="col in columns[log.history.show][log.history.detail].indexes">{{col == \'createdAt\' ? moment(row[col]).format(\'DD/MM/YYYY HH:mm:ss\') : row[col]}}</td>\n                      </tr>\n                      <tr data-ng-hide="rows[\'history\'].length">\n                        <td colspan="{{columns[log.history.show][log.history.detail].header.length}}" class="text-center">\n                          {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}\n                        </td>\n                      </tr>\n                      </tbody>\n                      <tfoot>\n                        <tr>\n                          <td colspan="{{columns[log.history.show][log.history.detail].header.length}}" class="text-center">\n                            <div st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="7"></div>\n                          </td>\n                        </tr>\n                      </tfoot>\n                    </table>\n\n                  </div>\n                </div>\n              </div>\n              <!--END TABS-->\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </div>\n\n      </div>\n    </div>\n    <!-- END PROFILE CONTENT -->\n  </form>\n  </div>\n</div>\n'),
-a.put("app/main/template/template.jscriptyTab.html",'<div class="portlet light bordered">\n\n    <!-- BEGIN PORTLET BODY -->\n    <div class="portlet-body">\n          <div class="row">\n              <!-- BEGIN SIDEBAR -->\n                <div  class="profile-sidebar" style="width: 250px;">\n                  <!-- PORTLET MAIN -->\n                                       <!-- SIDEBAR MENU -->\n                                         <div class="profile-usermenu">\n                                                <ul class="nav">\n                                                              <li  ng-repeat= \'question in questions track by $index\' ng-class="{active: $index == count}">\n\n                                                                     <a  ng-click="setCurrentQuestion($index)" >\n                                                                                                                                   <i class="fa fa-check"></i> <label ng-if="attribute.nodeName == \'label\'" ng-repeat=\'attribute in question.value.attributes track by $index\'>{{attribute.value}}</label>\n\n                            </a>\n                                                       </li>\n                                                 </ul>\n                                         </div>\n                                        <!-- END SIDEBAR MENU -->\n                    <!-- END PORTLET MAIN -->\n                </div>\n                  <!-- END SIDEBAR -->\n                  <div   class="profile-content">\n                        <div class="portlet box blue-hoki">\n                                                                                                      <div class="portlet-title">\n\n                                                                                                         <div class="caption" >\n                                                                                                                        <i class="fa fa-edit"></i>\n                                 <span ng-if="attribute.nodeName ==\'label\'" ng-repeat=\'attribute in currentQuestion.value.attributes\' class="caption-subject">{{attribute.value}} </span>\n\n                                                                                                           </div>\n\n\n                                                                                                    </div>\n                                <div class="portlet-body form ">\n                                  <div class="row">\n                                                                                                                                         <div class="col-md-11 col-md-offset-1 ">\n                                        <form >\n                                          <div class="form-body" style="height: 400px; overflow-y: auto;overflow-x:hidden">\n\n                                             <!-- Question  -->\n                                             <div class="form-group" style="word-wrap: break-word;" >\n                                                <h3 ng-if="attribute.nodeName ==\'question\'" ng-repeat=\'attribute in currentQuestion.value.attributes\'>{{attribute.value}}</h3>\n                                              </div>\n                                              <!-- Buttons  -->\n\n                                                <div class="row">\n                                                  <div class="col-md-6">\n                                                    <ul class="nav nav-pills nav-stacked" >\n                                                      <li  ng-repeat=\'edge in currentQuestion.edges track by $index\'  style="background-color: #E8F7FC" ng-show="(edge.source.id == currentQuestion.id) && edge.value" ng-class="{active: (edge.value) == currentQuestion.answer}">\n                                                        <a  ng-click="next(edge.target, edge.value)" >\n                                                                <span style=" display:block;word-break:break-all;">{{edge.value}}</span>\n                                                            </a>\n                                                      </li>\n                                                    </ul>\n                                                  </div>\n                                                </div>\n\n\n                                               <!-- Question Other Option  -->\n\n                                               <div class="form-group" ng-if= "attribute.nodeName ==\'other\' && attribute.value " ng-repeat=\'attribute in currentQuestion.value.attributes track by $index\'>\n                                                 <div class="col-md-4">\n                                                   <label class="control-label">{{attribute.value}}</label>\n                                                 </div>\n                                                    <div class="col-md-8">\n                                                      <textarea  style="overflow:auto" ng-model="currentQuestion.otheranswer" placeholder="Enter text" rows="8" cols="40" ></textarea>\n                                                    </div>\n\n                                                                                                                          </div>\n                                              <!--  Inputs -->\n\n                                                  <div class="row margin-top-10"  ng-repeat=\'question in currentQuestion.children track by $index\'>\n                                                              <div class="col-md-10 col-md-offset-1">\n                                                                <div  ng-repeat=\'attribute in question.value.attributes track by $index\'>\n                                                                      <div  ng-switch="attribute.nodeName">\n                                                                          <div ng-class="col-md-2" ng-switch-when="label">\n                                                                            <label class="control-label" style=" display:block;word-break:break-all;" >{{attribute.value}}</label>\n\n                                                                          </div>\n\n                                                                          <div ng-class="attribute.value != \'checkbox\' ? \'col-md-10 pull-right\': \'col-md-2\'" ng-switch-when="type" ng-switch="attribute.value">\n                                                                              <input class="form-control" ng-switch-when="text" type="text" ng-model="question.answer" />\n                                                                              <input  class="form-control" ng-switch-when="number" type="number" ng-model="question.answer" />\n                                                                              <input  class=" pull-right"  ng-switch-when="checkbox" type="checkbox" ng-model="question.answer" ng-true-value="\'Selected\'" ng-false-value="\'Not Selected\'"/>\n                                                                              <textarea  class="form-control" ng-switch-when="textarea" ng-model="question.answer" rows="8" cols="40"></textarea>\n\n                                                                          </div>\n\n                                                                      </div>\n                                                                </div>\n                                                              </div>\n\n                                                  </div>\n\n                                          </div>\n                                          <!-- actions -->\n                                          <div class="form-actions">\n                                            <div class="btn-set pull-left">\n                                              <button class="btn red-haze "   ng-click="end()"><span class="fa fa-times" > End</span></button>\n\n                                            </div>\n                                            <div class="btn-set pull-right">\n                                               <button class="btn blue-haze"  ng-show="count" ng-click="back()"><span class="glyphicon glyphicon-chevron-left"></span>Back</button>\n                                                <button ng-repeat=\'edge in currentQuestion.edges track by $index\' ng-show="(edge.source.id == currentQuestion.id) && !edge.value" class="btn blue-hoki"   ng-click="next(edge.target)">Next<span class="glyphicon glyphicon-chevron-right" ></span></button>\n\n                                            </div>\n                                          </div>\n                                          </form>\n                                  </div>\n                                </div>\n                            </div>\n                        </div>\n                 </div>\n          </div>\n  </div>\n  <!-- END PORTLET BODY -->\n</div>\n'),a.put("app/main/template/template.newContactTab.html",'<div class="portlet light bordered">\n  <div class="portlet-title">\n    <div class="caption font-green-sharp">\n      <i class="icon-envelope-letter font-green-sharp"></i>\n      <span class="caption-subject">{{ \'APPLICATION_NEW_CONTACT\' | translate }}</a> </span>\n    </div>\n  </div>\n  <div class="portlet-body">\n        <form name="forms.general" data-ng-submit="submit({index: index,item: item})" novalidate>\n          <div class="portlet light">\n            <div class="portlet-title">\n              <div class="caption caption-md">\n                <i class="icon-bar-chart theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAILS\' | translate}}</span>\n              </div>\n              <div class="inputs">\n                <div class="portlet-input input-inline input-small ">\n                </div>\n              </div>\n            </div>\n            <div class="portlet-body">\n          <div class="row">\n            <div class="col-md-6">\n          <!-- START FULLNAME -->\n          <div class="form-group" data-ng-class="{\'has-error\': (forms.general.fullname.$touched || forms.general.$submitted) && forms.general.fullname.$invalid}">\n            <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n            <input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n            <span data-ng-show="(forms.general.fullname.$touched || forms.general.$submitted) && forms.general.fullname.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END FULLNAME -->\n\n          <!-- START COMPANY -->\n          <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n            <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n            <ui-select data-ng-model="item.CompanyId" theme="bootstrap" name="CompanyId" data-ng-disabled="disabled">\n              <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n              <ui-select-choices repeat="company.id as company in companies | filter: $select.search">\n                <div ng-bind-html="company.name | highlight: $select.search"></div>\n              </ui-select-choices>\n            </ui-select>\n            <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END COMPANY -->\n\n          <!-- START STREET -->\n          <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n            <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n            <input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="item.street"/>\n            <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END STREET -->\n\n          <!-- START POSTALCODE -->\n          <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n            <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n            <input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="item.postalCode"/>\n            <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END POSTALCODE -->\n\n          <!-- START CITY -->\n          <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n            <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n            <input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="item.city"/>\n            <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END CITY -->\n\n          <!-- START SERVICE -->\n          <div class="form-group" data-ng-class="{\'has-error\': forms.general.ServiceId.$invalid && forms.general.$submitted}">\n            <label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label>\n            <ui-select data-ng-model="item.ServiceId" theme="bootstrap" name="ServiceId" data-ng-disabled="disabled" data-ng-change="getCustomFields()">\n              <ui-select-match placeholder="{{ \'APPLICATION_SERVICE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n              <ui-select-choices repeat="service.id as service in services | filter: $select.search">\n                <div ng-bind-html="service.name | highlight: $select.search"></div>\n              </ui-select-choices>\n            </ui-select>\n            <span data-ng-show="forms.general.ServiceId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END SERVICE -->\n\n        </div>\n        <div class="col-md-6">\n          <!-- START COUNTRY -->\n          <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n            <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n            <input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="item.country"/>\n            <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END COUNTRY -->\n\n          <!-- START DATEOFBIRTH -->\n          <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$invalid}">\n            <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n            <input type="date" name="dateOfBirth" placeholder="{{\'APPLICATION_DATEOFBIRTH\' | translate}}" class="form-control" data-ng-model="item.dateOfBirth"/>\n            <span data-ng-show="(forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END DATEOFBIRTH -->\n\n          <!-- START TAGS -->\n          <div class="form-group" data-ng-class="{\'has-error\': forms.general.tags.$invalid && forms.general.$submitted}">\n            <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n            <ui-select tagging tagging-label="" multiple=\'true\' data-ng-model="item.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n              <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n              <ui-select-choices repeat="tag in tags | filter: $select.search">\n                {{tag}}\n              </ui-select-choices>\n            </ui-select>\n            <span data-ng-show="forms.general.tags.$invalid && forms.general.$submitted" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END TAGS -->\n\n          <!-- START DESCRIPTION -->\n          <div class="form-group">\n            <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n            <textarea style="resize: vertical;" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n          </div>\n          <!-- END DESCRIPTION -->\n\n        </div>\n      </div>\n    </div>\n  </div>\n  <!-- END PORTLET -->\n  <!-- START PORTLET -->\n  <div class="portlet light">\n    <div class="portlet-title">\n      <div class="caption caption-md">\n        <i class="icon-bar-chart theme-font hide"></i>\n        <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n      </div>\n      <div class="inputs">\n        <div class="portlet-input input-inline input-small ">\n        </div>\n      </div>\n    </div>\n    <div class="portlet-body">\n      <div data-ng-repeat="customField in customFields">\n        <div data-ng-if="customField.type==\'text\'" class="form-group" data-ng-class="{\'has-error\': (forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$invalid}">\n          <label class="control-label">{{customField.name}}</label>\n          <input type="text" name="{{customField.name}}" placeholder="{{customField.name}}" class="form-control" data-ng-model="item.customFields[customField.id]"/>\n          <span data-ng-show="(forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$error.required" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <div data-ng-if="customField.type==\'select\'" class="form-group" data-ng-class="{\'has-error\': forms.general[customField.name].$invalid && forms.general.$submitted}">\n          <label class="control-label">{{customField.name}}</label>\n          <ui-select data-ng-model="item.customFields[customField.id]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n            <ui-select-match allow-clear placeholder="{{customField.name}}">{{$select.selected.value}}</ui-select-match>\n            <ui-select-choices repeat="choice.value as choice in customField.values | filter: $select.search">\n              <div ng-bind-html="choice.value | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.general[customField.name].$invalid && forms.general.$submitted" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n      </div>\n    </div>\n  </div>\n  <!-- END PORTLET -->\n  <div class="row">\n    <div class="col-md-6">\n  <!-- START PORTLET -->\n  <div class="portlet light">\n    <div class="portlet-title">\n      <div class="caption caption-md">\n        <i class="icon-bar-chart theme-font hide"></i>\n        <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_PHONES\' | translate}}</span>\n      </div>\n      <div class="inputs">\n        <div class="portlet-input input-inline input-small ">\n        </div>\n      </div>\n    </div>\n    <div class="portlet-body">\n          <!-- START PHONES -->\n          <div class="">\n          <div data-ng-if="item.Phones.length>0">\n            <!-- <label class="control-label">{{\'APPLICATION_PHONES\' | translate}}</label> -->\n          </div>\n          <div class="padding-bottom" ng-repeat="phone in item.Phones">\n            <div class="form-group">\n              <div class="input-group">\n                <input type="text" class="form-control" ng-model="phone.phone" required>\n                <span class="input-group-btn">\n                <button class="btn red" type="button"data-ng-click="removeField(\'Phones\',$index)"><i class="fa fa-times"></i></button>\n                </span>\n              </div>\n            </div>\n          </div>\n          <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField(\'Phones\')">\n            <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_PHONE\' | translate}}\n          </button>\n        </div>\n        <!-- END PHONES -->\n      </div>\n    </div>\n    <!-- END PORTLET -->\n  </div>\n  <div class="col-md-6">\n    <!-- START PORTLET -->\n    <div class="portlet light">\n      <div class="portlet-title">\n        <div class="caption caption-md">\n          <i class="icon-bar-chart theme-font hide"></i>\n          <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_EMAILS\' | translate}}</span>\n        </div>\n        <div class="inputs">\n          <div class="portlet-input input-inline input-small ">\n          </div>\n        </div>\n      </div>\n      <div class="portlet-body">\n        <!-- START EMAILS -->\n          <div class="">\n          <div data-ng-if="item.Emails.length>0">\n            <!-- <label class="control-label">{{\'APPLICATION_EMAILS\' | translate}}</label> -->\n          </div>\n          <div class="padding-bottom" ng-repeat="email in item.Emails">\n            <div class="form-group">\n              <div class="input-group">\n                <input type="email" class="form-control" ng-model="email.email" required>\n                <span class="input-group-btn">\n                <button class="btn btn-danger" type="button" data-ng-click="removeField(\'Emails\',$index)"><i class="fa fa-times"></i></button>\n                </span>\n              </div>\n            </div>\n          </div>\n          <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField(\'Emails\')">\n            <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_EMAIL\' | translate}}\n          </button>\n        </div>\n        <!-- END EMAILS -->\n      </div>\n    </div>\n    <!-- END PORTLET -->\n  </div>\n</div>\n    <!-- START PORTLET -->\n    <div class="portlet light">\n      <div class="portlet-title">\n        <div class="caption caption-md">\n          <i class="icon-bar-chart theme-font hide"></i>\n          <!-- <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_PHONES\' | translate}}</span> -->\n        </div>\n        <div class="inputs">\n          <div class="portlet-input input-inline input-small ">\n          </div>\n        </div>\n      </div>\n      <div class="portlet-body">\n          <div class="mbottom20">\n          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONFIRM\' | translate}}" data-ng-disabled="!item.fullname || !item.ServiceId"/>\n        </div>\n      </div>\n    </div>\n    <!-- END PORTLET -->\n\n        </form>\n  </div>\n</div>\n'),a.put("app/main/template/template.reportBuilderView.html",'<div class="alert alert-warning alert-group">\n        <div class="form-inline" data-ng-class="{\'has-error\': forms.report.$submitted && !group.rules.length}">\n            <select ng-options="o.name as o.name for o in operators" ng-model="group.operator" class="form-control input-sm"></select>\n            <button style="margin-left: 5px" type="button" ng-click="addCondition()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_CONDITION\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="addGroup()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_GROUP\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="removeGroup()" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-minus-sign"></span> {{\'APPLICATION_REMOVE_GROUP\' | translate}}</button>\n        </div>\n        <div class="group-conditions">\n            <div ng-repeat="rule in group.rules | orderBy:\'index\'" class="condition">\n                <div ng-switch="rule.hasOwnProperty(\'group\')">\n                    <div ng-switch-when="true">\n                        <report-builder group="rule.group" fields="fields" forms="forms"></report-builder>\n                    </div>\n                    <div ng-switch-default="ng-switch-default">\n                        <div class="row">\n                          <div class="col-md-2" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.field}">\n                          <ui-select data-ng-model="rule.field" theme="bootstrap" dynamic-name="randomName()" required>\n                            <ui-select-match placeholder="">{{$select.selected.field | translate}}</ui-select-match>\n                            <ui-select-choices repeat="field.field as field in fields | filter: $select.search">\n                              <div ng-bind-html="field.field | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                          <span data-ng-show="forms.report.$submitted && !rule.field" class="help-block help-block-error">\n                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                          </span>\n                        </div>\n                          <ui-select data-ng-model="rule.condition" theme="bootstrap" class="col-md-1" dynamic-name="randomName()">\n                            <ui-select-match placeholder="">{{$select.selected.name}}</ui-select-match>\n                            <ui-select-choices repeat="condition.name as condition in conditions | filter: $select.search">\n                              <div ng-bind-html="condition.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                          <div class="col-md-2 left-margin" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.value}">\n                            <input type="text" ng-model="rule.value" class="form-control" dynamic-name="randomName()" required/>\n                            <span data-ng-show="forms.report.$submitted && !rule.value" class="help-block help-block-error">\n                                                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                                         </span>\n                          </div>\n                            <button style="margin-left: 5px" ng-click="removeCondition($index)" class="btn btn-sm btn-danger" type="button"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n'),a.put("app/market/market.html",'<div class="row">\n        <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/market">Market Place</a>\n          </li>\n        </ul>\n                    </div>\n                </div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <!-- Our Integration -->\n    <div class="headline">\n      <h3>Our Integrations</h3>\n    </div>\n    <div class="row thumbnails" data-ng-repeat="group in groupedIntegration">\n      <div class="col-md-3" data-ng-repeat="integration in group">\n        <div class="our-integrations">\n          <h3> {{integration.name}} <small> {{integration.author}}</small></h3>\n          <img data-ng-src="{{integration.logo}}" alt="{{integration.name}}" class="img-responsive"/>\n          <div class="integration-info" data-ng-if="!integration.downloading">\n            <p>\n              {{integration.description}}\n            </p>\n            <div class="pull-right">\n                  <a data-ng-disabled="isProgressing" data-ng-if="!integration.active" data-ng-click="installIntegration(integration)" href="#" class="btn btn-xs green-meadow">Install <i class="fa fa-download"></i></a>\n                                                  <a data-ng-disabled="isProgressing" data-ng-if="integration.active" data-ng-click="uninstallIntegration(integration)" href="#" class="btn btn-xs red-sunglo">Uninstall <i class="fa fa-trash"></i></a>\n                    <a href="https://wiki.xcallymotion.com/" class="btn btn-xs grey-cascade" target="_blank">More <i class="fa fa-link"></i></a>\n            </div>\n          </div>\n                                        <div class="integration-info" data-ng-if="integration.downloading">\n                                           <div>\n                                                 <uib-progressbar class="progress-striped active" value="percentage" type="success"><i style="color:black;">{{status}}</i></uib-progressbar>\n                                           </div>\n          </div>\n        </div>\n      </div>\n                </div>\n    <!--/thumbnails-->\n    <!-- //End Meer Our Team -->\n  </div>\n</div>\n'),a.put("app/motionbar/motionbar.chat.html",'<div data-ng-include="\'components/quickSidebar/quickSidebar.html\'" data-ng-controller="QuickSidebarController" class="page-quick-sidebar-wrapper" style="margin-top: -92px;"></div>\n'),a.put("app/salesforce/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_SALESFORCE\' | translate }}</a> </span>\n                                </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="accounts.checked.length">\n                                                <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/salesforce/wizard">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'password\',\'clientId\',\'clientSecret\',\'securityToken\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Password\', \'Client Id\', \'Client Secret\', \'Security token\']" field-separator=";" filename="salesforce_accounts.csv">\n                                      <i class="icon-cloud-download"></i></a>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <table st-table="displayedSalesforceAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                      <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="7">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="col-md-6">\n                                                                                        <div class="input-group input-medium pull-right">\n                                                                                             <input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n                                                                                         <span class="input-group-addon">\n                                                                                                      <i class="fa fa-search"></i>\n                                                                                          </span>\n                                                                                       </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </th>\n                                                 </tr>\n                                           <tr>\n                                                                <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                               <th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n                                                         <th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                                <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="account in displayedSalesforceAccounts" class="animate-repeat">\n                                                               <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n                                         <td>{{account.name}}</td>\n                                             <td>{{account.username}}</td>\n                                                           <td>{{account.remoteUri}}</td>\n                                                                <td>{{account.description}}</td>\n                                            <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/salesforce/view/{{account.id}}/account">\n                                                                             {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                                                  <a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n                                                                          {{ \'APPLICATION_CHECK_CONNECTION\' | translate }}\n                                            </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedSalesforceAccounts.length">\n                                                                <td colspan="7" style="text-align:center;">\n                                                                   <i>No account available</i>\n                                                           </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td/>\n                                             <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                 </div>\n                                                    </td>\n                                                 <td/>\n                                                             <td/>\n                                           </tr>\n                                           <tr>\n                                            <td colspan="7" class="text-center">\n                                                                    <div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n                                            </td>\n                                       </tr>\n                                       </tfoot>\n                                    </div>\n                                </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/salesforce/view/view.account.html",'<div class="row">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                            <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START PASSWORD -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                                <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                           <input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="account.clientId" required/>\n                                                           <span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="account.clientSecret" required/>\n                                                               <span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="account.securityToken" required/>\n                                                            <span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SECURITY TOKEN -->\n\n                                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/salesforce/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n  <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n                              </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createConfiguration()">\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n                                                   <form name="formsConfiguration.info" novalidate>\n                                                              <!-- START NAME -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n                                                                  <span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END NAME -->\n                                                             <!-- START DESCRIPTION -->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n                                                              </div>\n                                                                <!-- END DESCRIPTION -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                       </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                          <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                      <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                            <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                                                    <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                                                               <!-- <pre>\n                                                                    {{descriptionItem|json}}\n                                                              </pre> -->\n                  <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                        <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n                     <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n                                                                        <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                      <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                             <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                    <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n                        <div ng-bind-html="item.label | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                            <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                    <div ng-bind-html="item.value | highlight: $select.search"></div>\n                           </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                                <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                                 <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                               </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                               </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/salesforce/view/view.configurations.html",'<div ui-view class="profile-content">\n        <div class="row" data-ng-init="getConfigurations()">\n          <div class="col-md-12">\n                       <div class="portlet light">\n                           <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group">\n                                                       <a class="btn green-jungle " href="/salesforce/view/{{account.id}}/configuration" data-toggle="dropdown">\n                                                             <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <table class="table table-striped table-bordered table-hover">\n                                                  <thead>\n                                                       <tr>\n                                                            <th>{{\'APPLICATION_NAME\' | translate}}</th>\n                                                                     <th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n                                                                  <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                      </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="configuration in configurations">\n                                                                     <td>{{configuration.name}}</td>\n                                                                       <td>{{configuration.description}}</td>\n                                                      <td>\n                                                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/salesforce/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n                                                                                        {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                                  <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n                                                                                    {{ \'APPLICATION_DELETE\' | translate }}\n                                                      </a>\n                                                </td>\n                                               </tr>\n                                                             <tr data-ng-hide="configurations.length">\n                                                                     <td colspan="5" style="text-align:center;">\n                                                                           <i>No configuration available</i>\n                                                                     </td>\n                                                         </tr>\n                                           </tbody>\n                                    </table>\n                                      <!-- END TABLE -->\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/salesforce/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/salesforce.png" class="img-responsive">\n                         </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.salesforce.view.account\')}">\n                                                    <a ng-href="/salesforce/view/{{account.id}}/account">\n                                                 <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.salesforce.view.configurations\') || $state.is(\'main.salesforce.view.configuration\')}">\n                                                  <a ng-href="/salesforce/view/{{account.id}}/configurations">\n                                                  <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n  <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n                                   </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/salesforce/accounts/validate/username"/>\n                                                               <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required/>\n                                                                <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                           <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                           <input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="item.clientId" required/>\n                                                              <span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="item.clientSecret" required/>\n                                                          <span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="item.securityToken" required/>\n                                                               <span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SECURITY TOKEN -->\n\n                                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/setting/license/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div\n class="row" data-ng-init="initView()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n                               </li>\n        <li>\n          <i class="icon-info"></i>\n          <a href="#">{{ \'APPLICATION_LICENSE\' | translate }}</a>\n        </li>\n                  </ul>\n         </div>\n\n              <!-- BEGIN PROFILE CONTENT -->\n                <div class="profile-content">\n                 <div class="row">\n                             <div class="col-md-6">\n                                        <div class="pricing hover-effect">\n                                            <div class="pricing-head" data-ng-switch="license.months">\n                                                    <h3 ng-switch-when="1">{{\'APPLICATION_MONTH_TO_MONTH\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                      <h3 ng-switch-when="12">{{\'APPLICATION_YEARLY\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                     <h3 ng-switch-when="36">{{\'APPLICATION_PERPETUAL\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                  <h3 ng-switch-default>{{\'APPLICATION_UNKNOWN\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                      <h4><i>{{license.expiration ? (license.expiration | date:\'medium\') : \'DEMO\'}}</i>\n                                                 <span data-ng-show="license.expiration">Expiration Date </span>\n                                                       </h4>\n                                         </div>\n                                                <ul class="pricing-content list-unstyled">\n                                                    <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-eye"></i> {{\'APPLICATION_USERS\' | translate}}:\n                                                               </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    {{(license.users || license.users >= 0) ? license.users : \'unknown\'}}\n                                                               </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-people"></i> {{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}}):\n                                                             </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    {{(license.agents || license.agents >= 0)  ? license.agents : \'unknown\'}}\n                                                           </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-phone"></i> {{\'APPLICATION_TELEPHONES\' | translate}}:\n                                                                </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    {{(license.telephones || license.telephones >= 0) ? license.telephones : \'unknown\'}}\n                                                                </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-bubble"></i> {{\'APPLICATION_CHAT\' | translate}}:\n                                                             </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    <span class="label label-sm" data-ng-class="license.chat ? \'label-success\' : \'label-danger\'">{{license.chat ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                                                             </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-envelope"></i> {{\'APPLICATION_MAIL\' | translate}}:\n                                                           </div>\n                                                                <div class="col-md-3 text-center">\n                                                             <span class="label label-sm" data-ng-class="license.mail ? \'label-success\' : \'label-danger\'">{{license.mail ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                                                            </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-paper-plane"></i> {{\'APPLICATION_FAX\' | translate}}:\n                                                         </div>\n                                                                <div class="col-md-3 text-center">\n                                                                     <span class="label label-sm" data-ng-class="license.fax ? \'label-success\' : \'label-danger\'">{{license.fax ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                                                              </div>\n                                                        </li>\n                                         </ul>\n                                         <div class="pricing-footer">\n                                                  <p>\n                                                            {{license.description}}\n                                                      </p>\n                                                  <a href="#" class="btn yellow-crusta">\n                                                        {{\'APPLICATION_PRICES\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n                                                  </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <div class="portlet light bordered">\n                                          <div class="portlet-title">\n                                                   <div class="caption font-green-sharp">\n                                                                <i class="icon-info font-green-sharp"></i>\n                                                            <span class="caption-subject">FORM {{ \'APPLICATION_LICENSE\' | translate }}</a> </span>\n                                                      </div>\n                                                </div>\n                                                <div class="portlet-body">\n                                                    <form name="form" novalidate data-ng-submit="submitRequest()">\n\n                                                              <!-- START USERS -->\n                                                          <div class="form-group" data-ng-class="{\'has-error\': (form.users.$touched || form.$submitted) && form.users.$invalid}">\n                                                                     <label class="control-label">{{\'APPLICATION_USERS\' | translate}}</label>\n                                                                    <div class="input-icon">\n                                                                              <i class="icon-eye"></i>\n                                                                              <input type="number" name="users" placeholder="{{\'APPLICATION_USERS\' | translate}}" class="form-control" data-ng-model="item.users" min="0" required>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END USERS -->\n\n                                                          <!-- START AGENTS -->\n                                                         <div class="form-group" data-ng-class="{\'has-error\': (form.agents.$touched || form.$submitted) && form.agents.$invalid}">\n                                                                   <label class="control-label">{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})</label>\n                                                                     <div class="input-icon">\n                                                                              <i class="icon-people"></i>\n                                                                           <input type="number" name="agents" placeholder="{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})" class="form-control" data-ng-model="item.agents" min="0" required>\n                                                                      </div>\n                                                                        <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END AGENTS -->\n\n                                                         <!-- START TELEPHONES -->\n                                                             <div class="form-group" data-ng-class="{\'has-error\': (form.telephones.$touched || form.$submitted) && form.telephones.$invalid}">\n                                                                   <label class="control-label">{{\'APPLICATION_TELEPHONES\' | translate}}</label>\n                                                                       <div class="input-icon">\n                                                                              <i class="icon-phone"></i>\n                                                                            <input type="number" name="telephones" placeholder="{{\'APPLICATION_TELEPHONES\' | translate}}" class="form-control" data-ng-model="item.telephones" min="0" required>\n                                                                        </div>\n                                                                        <span data-ng-show="(form.telephones.$touched || forms.$submitted) && form.telephones.$error.required" class="help-block help-block-error">\n                                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END TELEPHONES -->\n\n                                                             <!-- START CHAT -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': (form.chat.$touched || form.$submitted) && form.chat.$invalid}">\n                                                                       <label class="control-label">{{\'APPLICATION_CHAT\' | translate}}</label>\n                                                                     <div class="input-group input-icon">\n                                                                          <i class="icon-bubble"></i>\n                                                                           <input type="text" placeholder="{{\'APPLICATION_CHAT\' | translate}}" class="form-control" readonly>\n                                                                          <span class="input-group-addon">\n                                                                                      <input type="checkbox" name="chat" data-ng-model="item.chat" required>\n                                                                                </span>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.chat.$touched || forms.$submitted) && form.chat.$error.required" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END CHAT -->\n\n                                                           <!-- START MAIL -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': (form.mail.$touched || form.$submitted) && form.mail.$invalid}">\n                                                                       <label class="control-label">{{\'APPLICATION_MAIL\' | translate}}</label>\n                                                                     <div class="input-group input-icon">\n                                                                          <i class="icon-envelope"></i>\n                                                                         <input type="text" placeholder="{{\'APPLICATION_MAIL\' | translate}}" class="form-control" readonly>\n                                                                          <span class="input-group-addon">\n                                                                                      <input type="checkbox" name="mail" data-ng-model="item.mail" required>\n                                                                                </span>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.mail.$touched || forms.$submitted) && form.mail.$error.required" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END MAIL -->\n\n                                                           <!-- START FAX -->\n                                                            <div class="form-group" data-ng-class="{\'has-error\': (form.fax.$touched || form.$submitted) && form.fax.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n                                                                      <div class="input-group input-icon">\n                                                                          <i class="icon-paper-plane"></i>\n                                                                              <input type="text" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" readonly>\n                                                                           <span class="input-group-addon">\n                                                                                      <input type="checkbox" name="fax" data-ng-model="item.fax" required>\n                                                                          </span>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.fax.$touched || forms.$submitted) && form.fax.$error.required" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END FAX -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_SUBMIT\' | translate}} {{\'APPLICATION_REQUEST\' | translate}}"/>\n                                                  </form>\n                                               </div>\n                                        </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/smtp/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-envelope"></i>\n                                 <a href="#">SMTP</a>\n                          </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE CONTENT -->\n                <div class="profile-content">\n                 <!-- START SMTP TAB -->\n                       <form name="form" data-ng-submit="form.$valid && updateItem()" novalidate>\n\n                          <!-- START HOST -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (form.host.$touched || form.$submitted) && form.host.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_OUTGOING_MAIL_SERVER\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                        <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.host" required/>\n                                   <span data-ng-show="(form.host.$touched || form.$submitted) && form.host.$invalid && form.host.$error.required" class="help-block help-block-error">\n                                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                               </div>\n                                <!-- END HOST -->\n\n                           <!-- START USERNAME -->\n                               <div class="form-group" data-ng-class="{\'has-error\': (form.username.$touched || form.$submitted) && form.username.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required/>\n                                       <span data-ng-show="(form.username.$touched || form.$submitted) && form.username.$invalid && form.username.$error.required" class="help-block help-block-error">\n                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                               </div>\n                                <!-- END USERNAME -->\n\n                               <!-- START PASSWORD -->\n                               <div class="form-group" data-ng-class="{\'has-error\': (form.password.$touched || form.$submitted) && form.password.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                   <span data-ng-show="(form.password.$touched || form.$submitted) && form.password.$invalid && form.password.$error.required" class="help-block help-block-error">\n                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                               </div>\n                                <!-- END PASSWORD -->\n\n                               <!-- START PORT -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (form.port.$touched || form.$submitted) && form.port.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                 <input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.port" required/>\n                                 <span data-ng-show="(form.form.$touched || form.$submitted) && form.port.$invalid && form.port.$error.required" class="help-block help-block-error">\n                                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                                       <span data-ng-show="(form.form.$touched || form.$submitted) && form.port.$invalid && form.port.$error.number" class="help-block help-block-error">\n                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n                                  </span>\n                               </div>\n                                <!-- END PORT -->\n\n                           <!-- START SSL -->\n                            <div class="form-group row">\n                                  <label class="col-md-3">\n                                              SSL\n                                   </label>\n                                      <label class="col-md-9">\n                                                      <input type="checkbox" data-ng-model="item.ssl">\n                                      </label>\n                              </div>\n                                <!-- END SSL -->\n                              <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          <input class="btn blue-madison" type="button" value="Test" data-ng-click="test()"/>\n                   </form>\n                       <!-- END SMTP TAB -->\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/landing.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-cloud-download"></i>\n          <a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n    <!-- BEGIN PAGE CONTENT-->\n    <div class="row" data-ng-init="initCounter()">\n      <div class="col-md-12 page-500">\n        <div class="number">\n          <timer interval="1000" countdown="180">{{countdown}}</timer>\n        </div>\n        <div class="details">\n          <h3>Wait! We need to restart xCALLY Motion server.</h3>\n          <p>\n            We are updatig it!<br/>\n            xCALLY Motion Team<br/><br/>\n          </p>\n        </div>\n      </div>\n    </div>\n    <!-- END PAGE CONTENT-->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-cloud-download"></i>\n                                   <a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-cloud-download font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_UPDATES\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <a class="btn btn-default" href="#" data-ng-click="pull()">\n                                           <i class="icon-cloud-download"></i> {{ \'APPLICATION_UPDATE\' | translate }}\n                                  </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body" data-ng-init="initView()">\n                          <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                        <!-- END Portlet PORTLET-->\n           </div>\n        </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/list.pull.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text" data-ng-bind="modal.text"></p>\n  <div data-ng-if="modal.html" data-ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button data-ng-repeat="button in modal.buttons" data-ng-class="button.classes" data-ng-click="button.click($event)" data-ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("app/square/odbc/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DSN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.dsn.$touched || form.$submitted) && form.dsn.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="dsn" placeholder="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion" class="form-control" data-ng-model="item.dsn" required/>\n      <p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n      <span data-ng-show="(form.dsn.$touched || form.$submitted) && form.dsn.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DSN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/square/odbc/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-superscript"></i>\n                                     <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                  <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="#">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_ODBCS\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ODBC\' | translate }}\n                                          </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getOdbc()">\n   <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-superscript"></i>\n                                     <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                  <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="/square/odbc/list">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n                                       <i data-ng-show="odbc" class="fa fa-angle-right"></i>\n                         </li>\n                         <li data-ng-show="odbc">\n                                      <a href="#">{{odbc.name}}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/odbc.png" class="img-responsive">\n                               </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{odbc.name}}\n                                 </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.square.odbc.view.settings\')}">\n                                                  <a data-ng-href="/square/odbc/view/{{odbc.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ODBC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateOdbc()" novalidate>\n\n                                                        <!-- START NAME -->\n                                 <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                 <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="odbc.name" required/>\n                                                           <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                       </span>\n                                     </div>\n                                <!-- END NAME -->\n\n                                                     <!-- START DSN -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="dsn" placeholder="{{\'APPLICATION_DSN\' | translate}}" class="form-control" data-ng-model="odbc.dsn" required/>\n                                                              <p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n                                          <span data-ng-show="(forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DSN -->\n\n                                                    <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="odbc.description"></textarea>\n                                                  </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/square/project/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/square/project/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-superscript"></i>\n                                     <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                  <i class="fa fa-angle-right"></i>\n                             </li>\n        <li>\n          <i class="fa fa-slack"></i>\n          <a href="#">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n        </li>\n                       </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_PROJECTS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }}\n                                               </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-superscript"></i>\n                                             <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                          <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-slack"></i>\n                                           <a href="/square/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n                                 </li>\n          <li>\n                                         <a ng-href="/square/projects/view/{{squareProject.id}}">{{squareProject.name}}</a>\n          </li>\n                           </ul>\n                 </div>\n                </div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n              <div id="geEditor" class="geEditor"></div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n<script>\n\n\n</script>\n'),
-a.put("app/staff/agent/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-people"></i>\n                                   <a href="#">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-people font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_AGENTS\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/staff/agents/wizard">\n                                                      <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AGENT\' | translate }}\n                                         </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.account.html",'<div class="row" data-ng-init="initView()">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\n                                               <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n                                       </li>\n                                 <li data-ng-show="Auth.isAdmin()">\n                                            <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n                                       </li>\n                                 <li data-ng-show="Auth.isAdmin() || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}">\n                                            <a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\n                                                <form name="forms.info" data-ng-submit="updateItem()" novalidate>\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="agent.fullname" required/>\n                                                          <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START USERNAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="agent.name" required/>\n                                                              <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START EMAIL -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="agent.email" required/>\n                                                              <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                                                           </span>\n                                                       </div>\n                                                        <!-- END EMAIL -->\n\n                                                  <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="agent.description"></textarea>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <!-- START INTERNAL -->\n                                                       <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <input type="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\n                                                              <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div> -->\n                                                    <!-- END INTERNAL -->\n\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END PERSONAL INFO TAB -->\n                                        <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_2">\n                                             <form action="#" role="form">\n                                                 <div class="form-group">\n                                                              <div class="fileinput fileinput-new" data-provides="fileinput">\n                                                                       <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n                                                                            <img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" alt=""/>\n                                                                   </div>\n                                                                        <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n                                                                       </div>\n                                                                        <div>\n                                                                         <span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n                                                                                 <span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n                                                                                 <input type="file" nv-file-select="" uploader="uploader" /><br/>\n                                                                              </span>\n                                                                               <button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n                                                                                    {{ \'APPLICATION_REMOVE\' | translate }}\n                                                                              </button>\n                                                                             <button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n                                                                                     {{ \'APPLICATION_CONFIRM\' | translate }}\n                                                                             </button>\n                                                                     </div>\n                                                                        <p>\n                                                                           </br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n                                                                  </p>\n                                                          </div>\n                                                        </div>\n                                                </form>\n                                               <div class="row">\n                                                     <div class="col-md-2">\n                                                                <table class="table" border="0">\n                                                                      <tbody>\n                                                                       <tr data-ng-repeat="item in uploader.queue">\n                                                                                  <td style="border-top-style:none">\n                                                                                            <strong>\n                                                                                                      {{ item.file.name }}\n                                                                                          </strong>\n                                                                                     </td>\n                                                                                 <td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n                                                                                             {{ item.file.size/1024/1024|number:2 }} MB\n                                                                                    </td>\n                                                                                 <td nowrap style="border-top-style:none">\n                                                                                             <button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n                                                                                                            <span class="glyphicon glyphicon-trash"></span> Remove\n                                                                                                </button>\n                                                                                     </td>\n                                                                         </tr>\n                                                                 </tbody>\n                                                              </table>\n                                                      </div>\n                                                </div>\n                                        </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n                                        <!-- CHANGE PASSWORD TAB -->\n                                  <div class="tab-pane" data-ng-show="Auth.isAdmin() || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}" id="tab_1_3">\n                                             <form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n                                                  <!-- START CURRENT PWD -->\n                                                    <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.currentPwd" required/>\n                                                             <span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CURRENT PWD -->\n                                                      <!-- START NEW PWD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.newPwd" required/>\n                                                         <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NEW PWD -->\n                                                  <!-- START RE-NEW PWD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.reNewPwd" nx-equal="agent.newPwd" required/>\n                                                            <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END RE-NEW PWD -->\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE PASSWORD TAB -->\n                              </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/agent/view/view.chat.html",'<div class="row" data-ng-init="initView()">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_CHAT\' | translate}}</span>\n                          </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- START CHAT TAB -->\n                               <form name="form" data-ng-submit="patchItem()" novalidate>\n                                    <!-- START CAPACITY -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n                                           <label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                             <input type="number" name="chatCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.chatCapacity" min="0" required/>\n                                            <span class="help-block">\n                                                     {{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n                                              </span>\n                                               <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END CAPACITY -->\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                               <!-- END CHAT TAB -->\n                 </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.fax.html",'<div class="row" data-ng-init="initView()">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_FAX\' | translate}}</span>\n                           </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- START CHAT TAB -->\n                               <form name="form" data-ng-submit="patchItem()" novalidate>\n                                    <!-- START CAPACITY -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n                                           <label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                             <input type="number" name="faxCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.faxCapacity" min="0" required/>\n                                              <span class="help-block">\n                                                     {{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n                                              </span>\n                                               <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END CAPACITY -->\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                               <!-- END CHAT TAB -->\n                 </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-people"></i>\n                                   <a href="/staff/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n                                     <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{agent.fullname}}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-userpic">\n                                 <img ng-src="api/users/avatar/{{agent.userpic ? agent.userpic : \'unknown_avatar\'}}" class="img-responsive">\n                         </div>\n                                <!-- END SIDEBAR USERPIC -->\n\n                                <!-- START SIDEBAR USER TITLE -->\n                             <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{agent.fullname}}\n                                    </div>\n                                        <div class="profile-usertitle-job">\n                                           {{agent.role}}\n                                        </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.agents.view.account\')}">\n                                                  <a data-ng-href="/staff/agents/view/{{agent.id}}/account">\n                                                    <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n                                         </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.voice\')}" data-ng-show="Auth.isAdmin()">\n                                                      <a data-ng-href="/staff/agents/view/{{agent.id}}/voice">\n                                                      <i class="icon-earphones-alt"></i>\n                                                    {{ \'APPLICATION_VOICE\' | translate}} </a>\n                                           </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.chat\')}" data-ng-show="Auth.isAdmin()">\n                                                       <a data-ng-href="/staff/agents/view/{{agent.id}}/chat">\n                                                       <i class="icon-bubble"></i>\n                                                   {{ \'APPLICATION_CHAT\' | translate}} </a>\n                                            </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.mail\')}" data-ng-show="Auth.isAdmin()">\n                                                       <a data-ng-href="/staff/agents/view/{{agent.id}}/mail">\n                                                       <i class="icon-envelope"></i>\n                                                 {{ \'APPLICATION_MAIL\' | translate}} </a>\n                                            </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.fax\')}" data-ng-show="Auth.isAdmin()">\n                                                        <a data-ng-href="/staff/agents/view/{{agent.id}}/fax">\n                                                        <i class="icon-paper-plane"></i>\n                                                      {{ \'APPLICATION_FAX\' | translate}} </a>\n                                             </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.phonebar\')}" data-ng-show="Auth.isAdmin()">\n                                                   <a data-ng-href="/staff/agents/view/{{agent.id}}/phonebar">\n                                                   <i class="icon-screen-desktop"></i>\n                                                   {{ \'APPLICATION_PHONE_BAR\' | translate}} </a>\n                                               </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n\n          <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.mail.html",'<div class="row" data-ng-init="initView()">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_MAIL\' | translate}}</span>\n                          </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- START CHAT TAB -->\n                               <form name="form" data-ng-submit="patchItem()" novalidate>\n                                    <!-- START CAPACITY -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n                                           <label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                             <input type="number" name="mailCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.mailCapacity" min="0" required/>\n                                            <span class="help-block">\n                                                     {{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n                                              </span>\n                                               <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END CAPACITY -->\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                               <!-- END CHAT TAB -->\n                 </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.phonebar.html",'<div class="row" data-ng-init="initView()">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_PHONE_BAR\' | translate}}</span>\n                             </div>\n                                <ul class="nav nav-tabs">\n                                     <li data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\n                                               <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                                 <li data-ng-show="Auth.isAdmin()">\n                                            <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CALL_FORWARDING\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\n                                                <form name="forms.general" data-ng-submit="updateItem()" novalidate>\n\n                                                        <!-- START DELETE -->\n                                                 <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_AUTO_ANSWER\' | translate}}\n                                                           </label>\n                                                              <label class="col-md-9">\n                                                                      <input type="checkbox" data-ng-model="agent.phoneBarAutoAnswer">\n                                                              </label>\n                                                      </div>\n                                                        <!-- END DELETE -->\n\n                                                 <!-- START DELETE -->\n                                                 <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_ENABLE_SETTINGS\' | translate}}\n                                                               </label>\n                                                              <label class="col-md-9">\n                                                                      <input type="checkbox" data-ng-model="agent.phoneBarEnableSettings">\n                                                          </label>\n                                                      </div>\n                                                        <!-- END DELETE -->\n\n                                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END PERSONAL INFO TAB -->\n                                        <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_2">\n                                             <form name="forms.callForwarding" data-ng-submit="updateItem()" novalidate>\n                                                   <!-- START UNCONDITIONAL -->\n                                                  <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_UNCONDITIONAL\' | translate}}\n                                                         </label>\n                                                              <label class="col-md-9">\n                                                                      <input name="phoneBarUnconditional" type="checkbox" data-ng-model="agent.phoneBarUnconditional">\n                                                              </label>\n                                                      </div>\n                                                        <!-- END UNCONDITIONAL -->\n\n                                                  <!-- START UNCONDITIONAL NUMBER -->\n                                                   <div class="form-group" data-ng-if="agent.phoneBarUnconditional" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$invalid}">\n                                                                <input type="text" name="phoneBarUnconditionalNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarUnconditionalNumber" required/>\n                                                          <span class="help-block">\n                                                                     <!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n                                                         </span>\n                                                               <span data-ng-show="(forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END UNCONDITIONAL NUMBER -->\n\n                                                   <!-- START NO REPLY -->\n                                                       <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_NO_REPLY\' | translate}}\n                                                              </label>\n                                                              <label class="col-md-9">\n                                                                      <input name="phoneBarNoReply" type="checkbox" data-ng-model="agent.phoneBarNoReply">\n                                                          </label>\n                                                      </div>\n                                                        <!-- END NO REPLY -->\n\n                                                       <!-- START NO REPLY -->\n                                                       <div class="form-group" data-ng-if="agent.phoneBarNoReply" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$invalid}">\n                                                          <input type="text" name="phoneBarNoReplyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarNoReplyNumber" required/>\n                                                              <span class="help-block">\n                                                                     <!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n                                                         </span>\n                                                               <span data-ng-show="(forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END REPLY -->\n\n                                                  <!-- START BUSY -->\n                                                   <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_BUSY\' | translate}}\n                                                          </label>\n                                                              <label class="col-md-9">\n                                                                      <input name="phoneBarBusy" type="checkbox" data-ng-model="agent.phoneBarBusy">\n                                                                </label>\n                                                      </div>\n                                                        <!-- END BUSY -->\n\n                                                   <!-- START BUSY NUMBER -->\n                                                    <div class="form-group" data-ng-if="agent.phoneBarBusy" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$invalid}">\n                                                           <input type="text" name="phoneBarBusyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarBusyNumber" required/>\n                                                            <span class="help-block">\n                                                                     <!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n                                                         </span>\n                                                               <span data-ng-show="(forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END BUSY NUMBER -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/agent/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n                         </div>\n                        </div>\n                        <div class="portlet-body">\n                            <form name="forms.voice" data-ng-submit="updateItem()" novalidate>\n\n                                  <!-- START INTERNAL -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$invalid}">\n                                          <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                              <input type="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\n                                              <span data-ng-show="(forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$error.required" class="help-block help-block-error">\n                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END INTERNAL -->\n\n                                       <!-- START TRANSPORT -->\n                                      <div class="form-group">\n                                              <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                               <ui-select multiple name="transport" ng-model="agent.transport" theme="bootstrap">\n                                                    <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                        <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                                {{transport}}\n                                                 </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                             </span>\n                                       </div>\n                                        <!-- END TRANSPORT -->\n\n                                      <!-- START HOST -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$invalid}">\n                                          <label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                         <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="agent.host" required/>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n                                          </span>\n                                               <span data-ng-show="(forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$error.required" class="help-block help-block-error">\n                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END HOST -->\n\n                                   <!-- START NAT -->\n                                    <div class="form-group">\n                                              <label class="control-label">{{ \'APPLICATION_NAT\' | translate}}</label>\n                                             <ui-select multiple data-ng-model="agent.nat" name="nat" theme="bootstrap">\n                                                   <ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$item}}</ui-select-match>\n                                                    <ui-select-choices repeat="nat in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n                                                            {{nat}}\n                                                       </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_NAT\' | translate }}\n                                           </span>\n                                       </div>\n                                        <!-- END NAT -->\n\n                                    <!-- START TYPE -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$invalid}">\n                                          <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                         <ui-select data-ng-model="agent.type" name="type" theme="bootstrap" required>\n                                                 <ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$select.selected}}</ui-select-match>\n                                                 <ui-select-choices repeat="type in [\'friend\', \'user\', \'peer\'] | filter: $select.search">\n                                                                <div ng-bind-html="type | highlight: $select.search"></div>\n                                                   </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_TYPE\' | translate }}\n                                          </span>\n                                               <span data-ng-show="(forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$error.required" class="help-block help-block-error">\n                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END TYPE -->\n\n                                   <!-- START CODEC -->\n                                  <div class="form-group">\n                                              <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                          <ui-select multiple ng-model="agent.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                     <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                    <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                              {{allow}}\n                                                     </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                         </span>\n                                       </div>\n                                        <!-- END CODEC -->\n\n                                  <!-- START STATUS -->\n                                 <div class="form-group">\n                                              <label class="control-label">{{\'APPLICATION_CHANSPY\' | translate}}</label></br>\n                                             <input\n                                                bs-switch\n                                             class="form-control"\n                                          ng-model="agent.chanspy"\n                                              type="checkbox"\n                                               name="auth"\n                                           switch-active="{{ recordSwitch.isActive }}"\n                                           switch-on-text="{{ recordSwitch.onText }}"\n                                            switch-off-text="{{ recordSwitch.offText }}"\n                                          switch-on-color="{{ recordSwitch.onColor }}"\n                                          switch-off-color="{{ recordSwitch.offColor }}"\n                                                switch-animate="{{ recordSwitch.animate }}"\n                                           switch-size="{{ recordSwitch.size }}"\n                                         switch-label="{{ recordSwitch.label }}"\n                                               switch-icon="{{ recordSwitch.icon }}"\n                                         switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                            switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                 </div>\n                                        <!-- END STATUS -->\n\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),
-a.put("app/staff/agent/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n     <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-people"></i>\n                           <a href="/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/agents/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                 </li>\n         </ul>\n </div>\n        <!-- END PAGE HEADER-->\n\n     <!-- BEGIN PORTLET-->\n <div class="portlet light bordered" data-ng-init="getFirstFreeInternal();">\n           <div class="portlet-title">\n                   <div class="caption font-green-sharp">\n                                <i class="icon-user font-green-sharp"></i>\n                            <span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }} WIZARD</a> </span>\n                      </div>\n                </div>\n                <div class="portlet-body">\n                    <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                                 <form name="forms.info" novalidate>\n\n                                         <!-- START NAME -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                   <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END NAME -->\n\n                                           <!-- START USERNAME -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required>\n                                                 <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n                                                   </span>\n                                               </div>\n                                                <!-- END USERNAME -->\n\n                                               <!-- START EMAIL -->\n                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                                                   <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required>\n                                                        <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                                                   </span>\n                                               </div>\n                                                <!-- END EMAIL -->\n\n                                          <!-- START PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                   <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END PASSWORD -->\n\n                                               <!-- START RE PASSWORD -->\n                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n                                                   <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n                                                        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END RE PASSWORD -->\n\n                                            <!-- START INTERNAL -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                      <div class="input-group">\n                                                             <input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n                                                              <span class="input-group-addon">\n                                                                      <input type="checkbox" data-ng-model="item.internalEnabled">\n                                                          </span>\n                                                       </div>\n                                                        <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END INTERNAL -->\n\n                                               <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                      </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n                                  <form name="forms.voice" novalidate>\n\n                                                <!-- START TRANSPORT -->\n                                              <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                                       <ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n                                                              <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                                <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                                        {{transport}}\n                                                         </ui-select-choices>\n                                                  </ui-select>\n                                                  <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                                     </span>\n                                               </div>\n                                                <!-- END TRANSPORT -->\n\n                                              <!-- START CODEC -->\n                                          <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                                  <ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                              <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                            <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                                      {{allow}}\n                                                             </ui-select-choices>\n                                                  </ui-select>\n                                                  <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                                 </span>\n                                               </div>\n                                                <!-- END CODEC -->\n\n                                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              <input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n                                   </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n                    </wizard>\n             </div>\n        </div>\n        <!-- END PORTLET-->\n</div>\n'),a.put("app/staff/team/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TEAM\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/staff/team/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-shield"></i>\n                                   <a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-shield font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_TEAMS\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="#" data-ng-click="createItem()">\n                                            <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEAM\' | translate }}\n                                  </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.agents.html",'<div class="row" data-ng-init="initAgents()">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                    <!-- GENERAL TAB -->\n                          <!-- BEGIN PORTLET-->\n                                 <!-- BEGIN FORM-->\n                                    <form action="index.html" class="form-horizontal form-row-seperated">\n                                         <div class="form-body">\n                                                       <div class="form-group last">\n                                                         <div class="col-md-12" id="multi-select-team">\n                                                                </div>\n                                                        </div>\n                                                </div>\n                                        </form>\n                                       <!-- END FORM-->\n                              <!-- END PORTLET-->\n                   <!-- END GENERAL TAB -->\n                      </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/team/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-shield"></i>\n                                   <a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{team.name}}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img ng-src="assets/images/media/team.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{team.name}}\n                                 </div>\n\n                              </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.teams.view.settings\')}">\n                                                  <a data-ng-href="/staff/teams/view/{{team.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.staff.teams.view.agents\')}">\n                                                    <a data-ng-href="/staff/teams/view/{{team.id}}/agents">\n                                                       <i class="icon-people"></i>\n                                                   {{ \'APPLICATION_AGENTS\' | translate}} </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content"></div>\n           <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.settings.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n                               </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- PERSONAL INFO TAB -->\n                            <div>\n\n                                       <form name="forms.info" data-ng-submit="updateItem()" novalidate>\n                                             <!-- START NAME -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="team.name" required/>\n                                                   <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END NAME -->\n\n                                           <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="team.description"/>\n                                               </div>\n                                                <!-- END DESCRIPTION -->\n\n                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </form>\n                               </div>\n                                <!-- END PERSONAL INFO TAB -->\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/telephone/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-phone"></i>\n                                    <a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-phone font-green-sharp"></i>\n                                   <span class="caption-subject">{{ \'APPLICATION_TELEPHONES\' | translate }}</a> </span>\n                                </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="/staff/telephones/wizard" data-toggle="dropdown">\n                                           <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TELEPHONE\' | translate }}\n                                     </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/telephone/view/view.account.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}}</span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_ACCOUNT\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_VOICE\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.info" data-ng-submit="updateItem() && forms.info.$valid" novalidate>\n\n                                    <!-- START NAME -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                           <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                       </span>\n                                     </div>\n                                <!-- END NAME -->\n\n                                   <!-- START USERNAME -->\n                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" required ng-remote-validate="/api/agents/validate/name"/>\n                                                                <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                       </span>\n                                                               <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.ngRemoteValidate" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                     </div>\n                                <!-- END USERNAME -->\n\n                                                 <!-- START INTERNAL -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" required ng-remote-validate="/api/agents/validate/internal"/>\n                                                           <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END INTERNAL -->\n\n                                                       <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                                  </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                    </form>\n                                   </div>\n                                        <!-- END PERSONAL INFO TAB -->\n\n                                      <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" id="tab_1_2">\n                                           <form name="forms.voice" data-ng-submit="updateItem() && forms.voice.$valid" novalidate>\n\n                                                    <!-- START TRANSPORT -->\n                                                      <div class="form-group">\n                                                              <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                                               <ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n                                                          <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                        <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                            {{transport}}\n                                                     </ui-select-choices>\n                                                        </ui-select>\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                                             </span>\n                                                       </div>\n                                                        <!-- END TRANSPORT -->\n\n                                                      <!-- START CODEC -->\n                                                  <div class="form-group">\n                                                              <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                                          <ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                          <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                            <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                          {{allow}}\n                                                         </ui-select-choices>\n                                                        </ui-select>\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CODEC -->\n\n                                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n                                                </form>\n                                       </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n\n                                      <!-- CHANGE PASSWORD TAB -->\n                                  <div class="tab-pane" id="tab_1_3" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id">\n                                             <form name="forms.changePwd" data-ng-submit="updateItem() && forms.changePwd.$valid" novalidate>\n                                                      <!-- START CURRENT PWD -->\n                                                    <!-- <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.currentPwd" required/>\n                                                              <span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div> -->\n                                                    <!-- END CURRENT PWD -->\n                                                      <!-- START NEW PWD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                                <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NEW PWD -->\n                                                  <!-- START RE-NEW PWD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.reNewPwd" nx-equal="item.password" required/>\n                                                            <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END RE-NEW PWD -->\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE PASSWORD TAB -->\n                              </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/telephone/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-phone"></i>\n                                    <a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n                                     <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{item.fullname}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR TELEPHONEPIC -->\n                         <div class="profile-userpic">\n                                 <!-- <img ng-src="api/telephones/avatar/{{item.userpic ? item.userpic : \'unknown_avatar\'}}" class="img-responsive"> -->\n                             </div>\n                                <!-- END SIDEBAR TELEPHONEPIC -->\n                             <!-- SIDEBAR TELEPHONE TITLE -->\n                              <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{item.fullname}}\n                                     </div>\n                                        <div class="profile-usertitle-job">\n                                           {{item.role}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR TELEPHONE TITLE -->\n\n                                <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.telephones.view.account\')}">\n                                                      <a data-ng-href="/telephones/view/{{item.id}}/account">\n                                                       <i class="icon-item"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/telephone/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n     <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-phone"></i>\n                            <a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n                             <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/staff/telephones/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                       </li>\n         </ul>\n </div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="initWizard()">\n      <div class="portlet-title">\n           <div class="caption font-green-sharp">\n                        <i class="icon-phone font-green-sharp"></i>\n                   <span class="caption-subject">{{ \'APPLICATION_TELEPHONE\' | translate }} WIZARD</a> </span>\n                  </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                     <form name="forms.info" novalidate>\n\n                           <!-- START NAME -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                   <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END NAME -->\n\n                           <!-- START USERNAME -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" ata-ng-pattern="settings.patternName"  required />\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.ngRemoteValidate" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                               </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n                                                   </span>\n                             </div>\n                        <!-- END USERNAME -->\n\n                       <!-- START PASSWORD -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                           <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END PASSWORD -->\n\n                       <!-- START RE PASSWORD -->\n                            <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n                             <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n                                <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                               <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END RE PASSWORD -->\n\n                                              <!-- START INTERNAL -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                      <div class="input-group">\n                                                     <input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled" ng-remote-validate="/api/agents/validate/internal"/>\n                                                   <span class="input-group-addon">\n                                                              <input type="checkbox" data-ng-model="item.internalEnabled">\n                                                  </span>\n                                                       </div>\n                                                        <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END INTERNAL -->\n\n                                               <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                            </form>\n                     </wz-step>\n\n                                <wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n                                  <form name="forms.voice" novalidate>\n\n                                                <!-- START TRANSPORT -->\n                                              <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                                       <ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n                                                  <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                    {{transport}}\n                                             </ui-select-choices>\n                                                </ui-select>\n                                                        <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                                     </span>\n                                               </div>\n                                                <!-- END TRANSPORT -->\n\n                                              <!-- START CODEC -->\n                                          <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                                  <ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                  <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                    <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                  {{allow}}\n                                                 </ui-select-choices>\n                                                </ui-select>\n                                                        <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                                 </span>\n                                               </div>\n                                                <!-- END CODEC -->\n\n                                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              <input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n                                   </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n            </wizard>\n     </div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),
-a.put("app/staff/user/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="#">{{ \'APPLICATION_USERS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-eye font-green-sharp"></i>\n                                     <span class="caption-subject">{{ \'APPLICATION_USERS\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="/staff/users/wizard" data-toggle="dropdown">\n                                                <i class="icon-plus"></i> {{ \'APPLICATION_NEW_USER\' | translate }}\n                                  </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.account.html",'<div class="row">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n                                    </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.info" data-ng-submit="updateItem()" novalidate>\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="user.fullname" required/>\n                                                           <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START USERNAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="user.name" required/>\n                                                               <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START EMAIL -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="user.email" required/>\n                                                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                                                           </span>\n                                                       </div>\n                                                        <!-- END EMAIL -->\n\n                                                  <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="user.description"></textarea>\n                                                  </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END PERSONAL INFO TAB -->\n                                        <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" id="tab_1_2">\n                                           <form action="#" role="form">\n                                                 <div class="form-group">\n                                                              <div class="fileinput fileinput-new" data-provides="fileinput">\n                                                                       <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n                                                                            <img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" alt=""/>\n                                                                   </div>\n                                                                        <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n                                                                       </div>\n                                                                        <div>\n                                                                         <span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n                                                                                 <span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n                                                                                 <input type="file" nv-file-select="" uploader="uploader" /><br/>\n                                                                              </span>\n                                                                               <button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n                                                                                    <span> {{ \'APPLICATION_REMOVE\' | translate }} </span>\n                                                                               </button>\n                                                                             <button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n                                                                                     <span> {{ \'APPLICATION_CONFIRM\' | translate }} </span>\n                                                                              </button>\n                                                                     </div>\n                                                                        <p>\n                                                                           </br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n                                                                  </p>\n                                                          </div>\n                                                        </div>\n                                                </form>\n                                               <div class="row">\n                                                     <div class="col-md-2">\n                                                                <table class="table" border="0">\n                                                                      <tbody>\n                                                                       <tr data-ng-repeat="item in uploader.queue">\n                                                                                  <td style="border-top-style:none">\n                                                                                            <strong>\n                                                                                                      {{ item.file.name }}\n                                                                                          </strong>\n                                                                                     </td>\n                                                                                 <td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n                                                                                             {{ item.file.size/1024/1024|number:2 }} MB\n                                                                                    </td>\n                                                                                 <td nowrap style="border-top-style:none">\n                                                                                             <button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n                                                                                                            <span class="glyphicon glyphicon-trash"></span> Remove\n                                                                                                </button>\n                                                                                     </td>\n                                                                         </tr>\n                                                                 </tbody>\n                                                              </table>\n                                                      </div>\n                                                </div>\n                                        </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n                                        <!-- CHANGE PASSWORD TAB -->\n                                  <div class="tab-pane" id="tab_1_3" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id">\n                                          <form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n                                                  <!-- START CURRENT PWD -->\n                                                    <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.currentPwd" required/>\n                                                              <span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CURRENT PWD -->\n                                                      <!-- START NEW PWD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.newPwd" required/>\n                                                          <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NEW PWD -->\n                                                  <!-- START RE-NEW PWD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.reNewPwd" nx-equal="user.newPwd" required/>\n                                                              <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END RE-NEW PWD -->\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE PASSWORD TAB -->\n                              </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/user/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="/staff/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{user.fullname}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-userpic">\n                                 <img ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{user.fullname}}\n                                     </div>\n                                        <div class="profile-usertitle-job">\n                                           {{user.role}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.users.view.account\')}">\n                                                   <a data-ng-href="/staff/users/view/{{user.id}}/account">\n                                                      <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n  <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-eye"></i>\n                              <a href="/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n                             <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/staff/users/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                    </li>\n         </ul>\n </div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered">\n          <div class="portlet-title">\n           <div class="caption font-green-sharp">\n                        <i class="icon-user font-green-sharp"></i>\n                    <span class="caption-subject">{{ \'APPLICATION_USER\' | translate }} WIZARD</a> </span>\n               </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                     <form name="forms.info" novalidate>\n\n                           <!-- START NAME -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                   <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END NAME -->\n\n                           <!-- START USERNAME -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n                                                   </span>\n                             </div>\n                        <!-- END USERNAME -->\n\n                       <!-- START EMAIL -->\n                          <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                             <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required />\n                              <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                         </span>\n                             </div>\n                        <!-- END EMAIL -->\n\n                          <!-- START PASSWORD -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                           <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END PASSWORD -->\n\n                       <!-- START RE PASSWORD -->\n                            <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n                             <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n                                <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                               <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END RE PASSWORD -->\n\n                                              <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                            </form>\n                     </wz-step>\n\n                                <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n            </wizard>\n     </div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/sugarcrm/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_SUGARCRM\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/sugarcrm/wizard" data-toggle="dropdown">\n                                                   <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid">\n                                 <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.account.html",'<div class="row">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                            <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START PASSWORD -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                                <span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END API KEY -->\n\n                                                        <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/sugarcrm/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n    <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n                              </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createConfiguration()">\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n                                                   <form name="formsConfiguration.info" novalidate>\n                                                              <!-- START NAME -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n                                                                  <span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END NAME -->\n                                                             <!-- START DESCRIPTION -->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n                                                              </div>\n                                                                <!-- END DESCRIPTION -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                       </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                          <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                      <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                            <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                                                    <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                                                               <!-- <pre>\n                                                                    {{descriptionItem|json}}\n                                                              </pre> -->\n                  <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                        <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n                     <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n                                                                        <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                      <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                             <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                    <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n                        <div ng-bind-html="item.label | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                             <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                                <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                                 <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                               </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                               </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
-a.put("app/sugarcrm/view/view.configurations.html",'<div ui-view class="profile-content">\n    <div class="row" data-ng-init="getConfigurations()">\n          <div class="col-md-12">\n                       <div class="portlet light">\n                           <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group">\n                                                       <a class="btn green-jungle " href="/sugarcrm/view/{{account.id}}/configuration" data-toggle="dropdown">\n                                                               <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <table class="table table-striped table-bordered table-hover">\n                                                  <thead>\n                                                       <tr>\n                                                            <th>{{\'APPLICATION_NAME\' | translate}}</th>\n                                                                     <th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n                                                                  <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                      </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="configuration in configurations">\n                                                                     <td>{{configuration.name}}</td>\n                                                                       <td>{{configuration.description}}</td>\n                                                      <td>\n                                                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/sugarcrm/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n                                                                                  {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                                  <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n                                                                                    {{ \'APPLICATION_DELETE\' | translate }}\n                                                      </a>\n                                                </td>\n                                               </tr>\n                                                             <tr data-ng-hide="configurations.length">\n                                                                     <td colspan="5" style="text-align:center;">\n                                                                           <i>No configuration available</i>\n                                                                     </td>\n                                                         </tr>\n                                           </tbody>\n                                    </table>\n                                      <!-- END TABLE -->\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/sugarcrm/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/sugarcrm.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.sugarcrm.view.account\')}">\n                                                      <a ng-href="/sugarcrm/view/{{account.id}}/account">\n                                                   <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.sugarcrm.view.configurations\') || $state.is(\'main.sugarcrm.view.configuration\')}">\n                                                      <a ng-href="/sugarcrm/view/{{account.id}}/configurations">\n                                                    <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n    <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required/>\n                                                               <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/sugarcrm/accounts/validate/remoteUri"/>\n                                                         <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n                                 </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                           <span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.key.$touched || form.$submitted) && form.key.$invalid}">\n      <label class="control-label">{{\'APPLICATION_KEY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="item.key" required/>\n      <span data-ng-show="(form.key.$touched || form.$submitted) && form.key.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START VALUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.value.$touched || form.$submitted) && form.value.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label></label>\n      <textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="item.value" required></textarea>\n      <span data-ng-show="(form.value.$touched || form.$submitted) && form.value.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VALUE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/answer/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-magic-wand"></i>\n                                       <a href="#">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-magic-wand font-green-sharp"></i>\n                                      <span class="caption-subject">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n                                             <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}\n                                 </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                          <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getAnswer()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-magic-wand"></i>\n                                       <a href="/tools/answers/list">{{ \'APPLICATION_CANNED_ANSWER\' | translate }}</a>\n                                     <i data-ng-show="answer" class="fa fa-angle-right"></i>\n                               </li>\n                         <li data-ng-show="answer">\n                                    <a href="#">{{answer.key}}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/answer.png" class="img-responsive">\n                             </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{answer.name}}\n                                       </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.answers.view.settings\')}">\n                                                        <a data-ng-href="/tools/answers/view/{{answer.id}}/settings">\n                                                         <i class="icon-settings"></i>\n                                                         {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.settings.html",'<div class="row">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CANNED_ANSWER\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateAnswer()" novalidate>\n\n                                                      <!-- START KEY -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="answer.key" required/>\n                                                            <span data-ng-show="(forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END KEY -->\n\n                                                    <!-- START VALUE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="answer.value" required></textarea>\n                                                         <span data-ng-show="(forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$error.required" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END VALUE -->\n\n                                                  <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="answer.description"></textarea>\n                                                        </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/automation/list/list.html",'<div class="row">\n     <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-wrench"></i>\n                                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                               <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bulb"></i>\n                                             <a href="#">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a> </span>\n                               </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle " href="/tools/automations/wizard">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AUTOMATION\' | translate }}\n                                            </a>\n                                  </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n                                   <i class="fa fa-angle-right" data-ng-show="automation"></i>\n                           </li>\n                         <li data-ng-show="automation">\n                                        <a href="#">{{ automation.description || automation.name }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n               <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/automation.png" class="img-responsive">\n                         </div>\n                                <!-- END SIDEBAR USERPIC -->\n\n                                <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{ automation.name }}\n                                 </div>\n                                        <div class="profile-usertitle-job">\n                                           {{ automation.description }}\n                                  </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.automations.view.settings\')}">\n                                                    <a href="/tools/automations/view/{{automation.id}}/settings">\n                                                 <i class="icon-bulb"></i>\n                                                     {{ \'APPLICATION_SETTINGS\' | translate }} </a>\n                                               </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.settings.html",'<div class="row">\n  <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <!-- <pre>\n                                    {{conditionsData.query | json}}\n                               </pre>\n                                <pre>\n                                 {{actionsData.query | json}}\n                          </pre> -->\n                            <form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateAutomation()" novalidate>\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="automation.name" required/>\n                                                             <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START TIMEOUT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.general.timeout.$touched && forms.general.timeout.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n                                                          <input type="number" name="timeout" min="1" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="automation.timeout" data-ng-init="item.timeout = 10" required/>\n                                                         <span data-ng-show="forms.general.timeout.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TIMEOUT -->\n\n                                                        <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                      <input\n                                                                    bs-switch\n                                                                         class="form-control"\n                                                              ng-model="automation.status"\n                                                                  type="checkbox"\n                                                                           name="status"\n                                                             switch-active="{{ recordSwitch.isActive }}"\n                                                                   switch-on-text="{{ recordSwitch.onText }}"\n                                                                    switch-off-text="{{ recordSwitch.offText }}"\n                                                                  switch-on-color="{{ recordSwitch.onColor }}"\n                                                                  switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                                   switch-size="{{ recordSwitch.size }}"\n                                                                 switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                                 switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                                    switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                     </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="automation.description"/>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                        <!-- END GENERAL TAB -->\n                                      <div class="tab-pane" id="tab_1_2">\n                                           <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in automation.All">\n                                                                    <condition-builder element="all" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in automation.Any">\n                                                                    <condition-builder element="any" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in automation.Actions">\n                                                                     <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n                                                                               <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $automations.services[automation.channel].actions | filter: $select.search">\n                                                                                           <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n                                                                           <action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n                                                                          <action-builder-status ng-switch-when="status" element="action" form="forms.general"></action-builder-status>\n                                                                 </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !automation.All.length && !automation.Any.length">\n                                                   <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !automation.Actions.length">\n                                                 <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                </div>\n                                </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),
-a.put("app/tools/automation/wizard/wizard.html",'<div class="row">\n   <div class="col-md-12">\n               <!-- BEGIN PAGE HEADER-->\n             <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n                <!-- END PAGE HEADER-->\n\n             <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }} WIZARD</a> </span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n                                     <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n                                              <form name="forms.general" data-ng-submit="submit()" novalidate>\n                                                      <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.general.name.$touched && forms.general.name.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.general.name.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START TIMEOUT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.general.timeout.$touched && forms.general.timeout.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n                                                          <input type="number" name="timeout" min="1" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.timeout" data-ng-init="item.timeout = 10" required/>\n                                                               <span data-ng-show="forms.general.timeout.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TIMEOUT -->\n\n                                                        <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                      <input\n                                                                    bs-switch\n                                                                         class="form-control"\n                                                              ng-model="item.status"\n                                                                type="checkbox"\n                                                                           name="status"\n                                                                         data-ng-init="item.status = 0"\n                                                                    switch-active="{{ recordSwitch.isActive }}"\n                                                                   switch-on-text="{{ recordSwitch.onText }}"\n                                                                    switch-off-text="{{ recordSwitch.offText }}"\n                                                                  switch-on-color="{{ recordSwitch.onColor }}"\n                                                                  switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                                   switch-size="{{ recordSwitch.size }}"\n                                                                 switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                                 switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                                    switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                     </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n                                            <form name="forms.settings" novalidate>\n                                               <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n                                                                   <label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                    <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n                                                                            <ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                          <ui-select-choices repeat="channel in $automations.channels | filter: $select.search">\n                                                                                        <div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n                                                                           </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in item.All">\n                                                                  <condition-builder element="all" serviceindex="item.channel" service="$automations" form="forms.settings"></condition-builder>\n                                                                        <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in item.Any">\n                                                                  <condition-builder element="any" serviceindex="item.channel" service="$automations" form="forms.settings"></condition-builder>\n                                                                        <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in item.Actions">\n                                                                   <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$invalid}">\n                                                                            <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $automations.services[item.channel].actions | filter: $select.search">\n                                                                                         <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.settings"></action-builder-template>\n                                                                          <action-builder-integration ng-switch-when="integration" element="action" form="forms.settings"></action-builder-integration>\n                                                                         <action-builder-status ng-switch-when="status" element="action" form="forms.settings"></action-builder-status>\n                                                                        </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                      </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_INTERVAL\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/interval/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-clock"></i>\n                                    <a href="#">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_INTERVALS\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }}\n                                              </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getInterval()">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-clock"></i>\n                                    <a href="/tools/intervals/list">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n                                       <i data-ng-show="interval" class="fa fa-angle-right"></i>\n                             </li>\n                         <li data-ng-show="interval">\n                                  <a href="#">{{interval.name}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/interval.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{interval.name}}\n                                     </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.intervals.view.settings\')}">\n                                                      <a data-ng-click="deselectAndRedirect(\'/tools/intervals/view/\'+interval.id+\'/settings\')">\n                                                 <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n'+"                                              <li data-ng-class=\"{active: $state.is('main.tools.intervals.view.subintervals') || $state.is('main.tools.intervals.view.subinterval') || $state.is('main.tools.intervals.view.subintervals.settings')}\">\n                                                    <a data-ng-click=\"deselectAndRedirect('/tools/intervals/view/'+interval.id+'/subintervals')\">\n                                                       <i class=\"icon-list\"></i>\n                                                   {{ 'APPLICATION_SUBINTERVALS' | translate}} </a>\n                                              </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class=\"profile-content\">\n               </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/tools/interval/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INTERVAL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateInterval()" novalidate>\n\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.name" required/>\n                                                               <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="interval.description"></textarea>\n                                                      </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/interval/view/view.subinterval.html",'\n<div class="row" data-ng-init="initSubInterval(true)">\n    <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="addSubInterval()">\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="subinterval.name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n                                                   <!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n                                                                       <fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                        <fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                       <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="splittedInterval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n              <!-- START MONTHDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTHDAY -->\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n                                                       <button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n                                             <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.subintervalSettings.html",'\n<div class="row" data-ng-init="initSubInterval();getSubInterval();">\n    <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_SUBINTERVAL_SETTINGS\' | translate }} WIZARD</a> </span>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="updateInterval(\'subintervals\')">\n                                 <div class="profile-usertitle-name">\n                                          {{subinterval.name}}\n                                  </div>\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.SubIntervals[selectedSubInterval].name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n              <!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n                                                                    <fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                        <fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                       <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="splittedInterval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n              <!-- START MONTHDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTHDAY -->\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n                                                       <button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n                                             <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/tools/interval/view/view.subintervals.html",'<div ui-view class="profile-content">\n<div class="row">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title  tabbable-line">\n                            <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SUBINTERVALS\' | translate}}</span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group">\n                                               <a class="btn green-jungle " href="/tools/intervals/view/{{interval.id}}/subinterval" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }}\n                                           </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div data-ng-if="selectedSubInterval === undefined" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-draggable-rows>\n                                        <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/tools/pause/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PAUSE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/pause/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-control-pause"></i>\n                                    <a href="#">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-control-pause font-green-sharp"></i>\n                                   <span class="caption-subject">{{ \'APPLICATION_PAUSES\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n                                             <i class="icon-plus"></i> {{ \'APPLICATION_NEW_PAUSE\' | translate }}\n                                 </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                          <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getPause()">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-pause"></i>\n                                    <a href="/tools/pauses/list">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n                                     <i data-ng-show="pause" class="fa fa-angle-right"></i>\n                                </li>\n                         <li data-ng-show="pause">\n                                     <a href="#">{{pause.name}}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/pause.png" class="img-responsive">\n                              </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{pause.name}}\n                                        </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.pauses.view.settings\')}">\n                                                 <a data-ng-href="/tools/pauses/view/{{pause.id}}/settings">\n                                                           <i class="icon-settings"></i>\n                                                         {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PAUSE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updatePause()" novalidate>\n\n                                                       <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="pause.name" required/>\n                                                          <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="pause.description"></textarea>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/sound/list/list.html",'<div class="page-bar">\n  <ul class="page-breadcrumb">\n    <li>\n      <i class="icon-rocket"></i>\n      <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n      <i class="fa fa-angle-right"></i>\n    </li>\n    <li>\n      <i class="icon-music-tone-alt"></i>\n      <a href="#">{{ \'APPLICATION_SOUNDS\' | translate }}</a>\n    </li>\n  </ul>\n  <div class="page-toolbar">\n  </div>\n</div>\n<!-- END PAGE HEADER-->\n<!-- BEGIN PAGE CONTENT-->\n<!-- Audio Portlets -->\n<div class="headline">\n  <h3><i class="icon-music-tone-alt sounds-title-icon"></i> {{ \'APPLICATION_SOUNDS\' | translate }}</h3>\n</div>\n<div class="portlet light bg-inverse">\n  <div class="portlet-title collapsible" ng-click="isCollapsed = !isCollapsed">\n    <div class="caption">\n      <i class="icon-puzzle font-red-flamingo"></i>\n      <span class="caption-subject bold font-red-flamingo uppercase">\n      {{\'APPLICATION_FILE_UPLOAD\' | translate}} </span>\n    </div>\n    <div class="tools">\n      <a href="" ng-class="{\'collapse\': !isCollapsed, \'expand\' : isCollapsed}">\n      </a>\n    </div>\n  </div>\n  <div class="portlet-body" ng-slide-down="!isCollapsed">\n    <div class="row" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">\n       <div class="col-md-4">\n                <div class="portlet light bordered">\n                          <div class="portlet-title">\n                                   <div class="caption font-green-sharp">\n                                        <i class="icon-settings font-green-sharp"></i>\n                                        <span class="caption-subject bold uppercase">{{\'APPLICATION_SELECT_FILES\' | translate}}</span>\n                                      <span class="caption-helper hide"></span>\n                             </div>\n                                <div class="actions">\n                                 </div>\n                        </div>\n                        <div class="portlet-body">\n                                    <div ng-show="uploader.isHTML5">\n                                      <div class="file-drop-zone margin-bottom-20" nv-file-over="" uploader="uploader" over-class="file-drop-zone-over">\n                                                    Base drop zone\n                                        </div>\n                                </div>\n                                <span class="btn default btn-file">\n                                   <span class="fileinput-new">\n                                  {{\'APPLICATION_FILE_UPLOAD\' | translate}}</span>\n                                    <input type="file" nv-file-select="" uploader="uploader" />\n                                   </span>\n                               <span class="btn default btn-file">\n                                   <span class="fileinput-new">\n                                  {{\'APPLICATION_MULTI_FILE_UPLOAD\' | translate}}</span>\n                              <input type="file" nv-file-select="" uploader="uploader" multiple  /><br/>\n          </span>\n          <p>\n            </br>\n            {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>wav, mp3, gsm, ogg</b>.\n          </p>\n          <p>\n            {{ \'MESSAGE_MAXIMUM_SOUND_UPLOAD_SIZE\' | translate }} <b>15 Mb</b>.\n          </p>\n                     </div>\n                </div>\n        </div>\n        <div class="col-md-8">\n                <div class="portlet light bordered">\n                          <div class="portlet-title">\n                                   <div class="caption font-green-sharp">\n                                        <i class="icon-settings font-green-sharp"></i>\n                                        <span class="caption-subject bold uppercase">{{\'APPLICATION_UPLOAD_QUEUE\' | translate}}</span>\n                                      <span class="caption-helper">{{\'APPLICATION_QUEUE_LENGTH\' | translate}}: {{ uploader.queue.length }}</span>\n                                 </div>\n                                <div class="actions">\n                                 </div>\n                        </div>\n                        <div class="portlet-body">\n                                    <div class="table-scrollable table-scrollable-borderless">\n                                            <table class="table table-hover table-light">\n                                                 <thead>\n                                                       <tr class="uppercase">\n                                                                <th width="50%">{{\'APPLICATION_NAME\' | translate}}</th>\n                                                             <th ng-show="uploader.isHTML5">{{\'APPLICATION_SIZE\' | translate}}</th>\n                                                              <th ng-show="uploader.isHTML5">{{\'APPLICATION_PROGRESS\' | translate}}</th>\n                                                                  <th>{{\'APPLICATION_STATUS\' | translate}}</th>\n                                                               <th>{{\'APPLICATION_MESSAGE\' | translate}}</th>\n                                                              <th>{{\'APPLICATION_ACTIONS\' | translate}}</th>\n                                                      </tr>\n                                                 </thead>\n                                              <tbody>\n                                                       <tr ng-repeat="item in uploader.queue">\n                                                               <td><strong>{{ item.file.name }}</strong></td>\n                                                                <td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n                                                                 <td ng-show="uploader.isHTML5">\n                                                                       <div class="progress progress-sm" style="margin-bottom: 0;">\n                                                                                  <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n                                                                         </div>\n                                                                </td>\n                                                                 <td class="text-center">\n                                                                      <span ng-show="item.isSuccess" class="text-success"><i class="glyphicon glyphicon-ok"></i></span>\n                                                                     <span ng-show="item.isCancel" class="text-info"><i class="glyphicon glyphicon-ban-circle"></i></span>\n                                                                         <span ng-show="item.isError" class="text-danger"><i class="glyphicon glyphicon-remove"></i></span>\n                                                                            <span ng-show="item.isUploading" class="text-info"><i class="glyphicon glyphicon-upload"></i></span>\n                                                                  </td>\n                                                                 <td class="text-center">\n                                                                      <span ng-show="item.responseMessage" class="text-danger">{{item.responseMessage}}</span>\n                                                              </td>\n                                                                 <td nowrap>\n                                                                           <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">\n                                                                       <span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD\' | translate}}\n                                                                       </button>\n                                                                     <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">\n                                                                        <span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL\' | translate}}\n                                                                           </button>\n                                                                     <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">\n                                                                         <span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n                                                                        </button>\n                                                             </td>\n                                                         </tr>\n                                                 </tbody>\n                                      </table>\n                              </div>\n                                <div>\n                                         <p>{{\'APPLICATION_UPLOAD_QUEUE_PROGRESS\' | translate}}:</p>\n                                         <div class="progress progress-sm" style="">\n                                                   <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': uploader.progress + \'%\' }"></div>\n                                     </div>\n                                </div>\n                                <button type="button" class="btn btn-success btn-s" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">\n                             <span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD_ALL\' | translate}}\n                                   </button>\n                             <button type="button" class="btn btn-warning btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">\n                              <span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL_ALL\' | translate}}\n                               </button>\n                             <button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">\n                             <span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE_ALL\' | translate}}\n                                    </button>\n                     </div>\n                </div>\n        </div>\n    </div>\n  </div>\n</div>\n<div class="row thumbnails" data-ng-init="initList()">\n  <div class="row" ng-show="sounds.length == 0">\n    <div class="col-md-12 page-404">\n      <div class="details">\n        <h3>{{ \'MESSAGE_NO_SOUNDS\' | translate }}</h3>\n        <p>\n          <a href="/">\n          {{ \'MESSAGE_RETURN_HOME\' | translate }} </a>\n          {{ \'MESSAGE_OR_UPLOAD_SOUND_FILE\' | translate }}\n        </p>\n      </div>\n    </div>\n  </div>\n  <div class="audio-portlet-wrapper animate-repeat" ng-repeat="sound in sounds">\n    <div class="audio-portlet">\n      <div class="audio-portlet-title"><a href="#" editable-text="sound.display_name" onbeforesave="updateAudio(sound.id,{display_name : $data})">{{ sound.display_name || "Empty" }}</a></div>\n      <img src="../assets/images/note_placeholder.png" alt="" class="img-responsive"/>\n      <div class="file-info">\n        <div class="audio-tag-wrapper">\n          <audio-file-download params="{id:sound.id,controller:\'stream\'}" resource="Sound"></audio-file-download>\n        </div>\n        <p id="description_div">\n          <a href="#" editable-text="sound.description" onbeforesave="updateAudio(sound.id,{description : $data})">{{ sound.description || "Empty" }}</a>\n        </p>\n        <p class="float-right">\n            <button class="btn btn-xs green-meadow" uib-tooltip-template="\'audioInfoTemplate.html\'"><i class="icon-list"></i></button>\n            <motion-file-download  params="{id:sound.id,controller:\'download\'}" resource="Sound" mimetype="\'audio/\'+sound.original_format" tooltiptext="Download" filename="sound.name+\'.\'+sound.original_format" btnclass="{{downloadButtonClass}}" btncontent=\'{{downloadButtonContent}}\'></motion-file-download>\n            <button uib-tooltip="Delete" class="btn btn-xs red-sunglo" ng-click="delete(sound.display_name, sound.id)" tooltip="Delete"><i class="icon-close" ></i></button>\n        </p>\n      </div>\n    </div>\n  </div>\n  <script type="text/ng-template" id="audioInfoTemplate.html">\n    <div>\n      <ul class="list-unstyled">\n        <li><b>Format : </b>{{sound.original_format}}</li>\n        <li><b>Duration : </b>{{sound.original_duration | date: \'mm:ss\'}}</li>\n        <li><b>Channels : </b>{{sound.original_channelCount}}</li>\n        <li><b>Bitrate : </b>{{sound.original_bitRate/1024}} kbs</li>\n        <li><b>Sample Rate : </b>{{sound.original_sampleRate/1000}} KHz</li>\n      </ul>\n    </div>\n  </script>\n</div>\n<!-- End Audio Portlets -->\n'),a.put("app/tools/tag/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TAG\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/tag/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-tag"></i>\n                                      <a href="#">{{ \'APPLICATION_TAGS\' | translate }}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TAGS\' | translate }}</a> </span>\n                              </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TAG\' | translate }}\n                                           </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTag()">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-tag"></i>\n                                      <a href="/tools/tags/list">{{ \'APPLICATION_TAGS\' | translate }}</a>\n                                 <i data-ng-show="tag" class="fa fa-angle-right"></i>\n                          </li>\n                         <li data-ng-show="tag">\n                                       <a href="#">{{tag.name}}</a>\n                          </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/tag.png" class="img-responsive">\n                                </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{tag.name}}\n                                  </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.tags.view.settings\')}">\n                                                   <a data-ng-href="/tools/tags/view/{{tag.id}}/settings">\n                                                       <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.settings.html",'<div class="row">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAG\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateTag()" novalidate>\n\n                                                 <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="tag.name" required/>\n                                                            <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="tag.description"></textarea>\n                                                   </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/template/list/list.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="#">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n        </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-wrench font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }}</span>\n                              </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/tools/templates/wizard">\n                                                   <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEMPLATE\' | translate }}\n                                              </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initItem()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="/mail/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n                                        <i data-ng-show="item" class="fa fa-angle-right"></i>\n                         </li>\n                         <li data-ng-show="item">\n                                      <a href="#">{{item.name}}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n\n                       <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/template.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{item.name}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.templates.view.settings\')}">\n                                                      <a data-ng-href="/tools/templates/view/{{item.id}}/settings">\n                                                         <i class="icon-settings"></i>\n                                                         {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n\n                          <form name="form" data-ng-submit="form.$valid && updateItem()" class="form-horizontal" novalidate>\n                                    <!-- START NAME -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n                                               <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n                                                                </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n                                                                  <span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <!-- START DESCRIPTION -->\n                                    <div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n                                                <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n                                                             </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n                                                                     <span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <hr>\n\n                                        <!-- START SUBJECT -->\n                                        <div class="form-group row" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n                                                <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-4">\n                                                                        <label class="control-label pull-right">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n                                                              </div>\n                                                                <div class="col-md-8">\n                                                                        <input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n                                                                 <span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END SUJBECT -->\n\n                                        <!-- START HTML -->\n                                   <div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n\n                                         <div class="col-md-4">\n                                                        <div class="portlet light bordered">\n                                                          <div class="portlet-title">\n                                                                   <div class="caption font-green-sharp">\n                                                                                <i class="icon-pencil"></i>{{\'APPLICATION_VARIABLES\' | translate}}\n                                                                  </div>\n                                                                </div>\n                                                                <div class="portlet-body">\n                                                                    <uib-accordion>\n                                                                   <uib-accordion-group heading="{{group.title | translate}}" data-ng-repeat="group in groups">\n                                                                    {{group.content | translate}}\n                                                                                   <ol>\n                                                                                          <li data-ng-repeat="variable in group.variables">\n                                                                                                      {{variable}}\n                                                                                         </li>\n                                                                                 </ol>\n                                                             </uib-accordion-group>\n                                                              </uib-accordion>\n                                                            </div>\n                                                        </div>\n                                                </div>\n                                                <div class="col-md-8">\n                                                        <div class="inbox-editor inbox-wysihtml5" text-angular data-ng-model="item.html" name="html"></div>\n                                                           <span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                               </div>\n                                        </div>\n                                        <!-- END HTML -->\n\n                                   <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),
-a.put("app/tools/template/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n  <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-wrench"></i>\n                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                               <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-docs"></i>\n                             <a href="/tools/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n                       </li>\n         </ul>\n </div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="initWizard()">\n      <div class="portlet-title">\n           <div class="caption font-green-sharp">\n                        <i class="icon-docs font-green-sharp"></i>\n                    <span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }} FORM</a> </span>\n            </div>\n        </div>\n        <div class="portlet-body">\n                    <form name="form" data-ng-submit="form.$valid && createItem()" class="form-horizontal" novalidate>\n                            <!-- START HEAD -->\n                           <div class="form">\n                                    <!-- START NAME -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n                                               <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n                                                                </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n                                                                  <span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <!-- START DESCRIPTION -->\n                                    <div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n                                                <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n                                                             </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n                                                                     <span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <!-- START SUBJECT -->\n                                        <div class="form-group" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n                                            <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n                                                         </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n                                                                 <span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END SUJBECT -->\n\n                                        <!-- START HTML -->\n                                   <div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n                                           <div class="col-md-4">\n                                                        <div class="portlet light bordered">\n                                                          <div class="portlet-title">\n                                                                   <div class="caption font-green-sharp">\n                                                                                <i class="icon-pencil"></i>{{\'APPLICATION_VARIABLES\' | translate}}\n                                                                  </div>\n                                                                </div>\n                                                                <div class="portlet-body">\n                                                                    <uib-accordion>\n                                                                   <uib-accordion-group heading="{{group.title | translate}}" data-ng-repeat="group in groups">\n                                                                    {{group.content | translate}}\n                                                                                   <ol>\n                                                                                          <li data-ng-repeat="variable in group.variables">\n                                                                                                      {{variable}}\n                                                                                         </li>\n                                                                                 </ol>\n                                                             </uib-accordion-group>\n                                                              </uib-accordion>\n                                                            </div>\n                                                        </div>\n                                                </div>\n                                                <div class="col-md-8">\n                                                        <div class="inbox-editor inbox-wysihtml5" text-angular data-ng-model="item.html" name="html"></div>\n                                                           <span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                               </div>\n                                        </div>\n                                        <!-- END HTML -->\n\n                           </div>\n                                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                       </form>\n       </div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/tools/trigger/list/list.html",'<div class="row">\n       <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-wrench"></i>\n                                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                               <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bulb"></i>\n                                             <a href="#">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n                                    </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle " href="/tools/triggers/wizard">\n                                                   <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRIGGER\' | translate }}\n                                               </a>\n                                  </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView();">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bulb"></i>\n                                     <a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n                                 <i class="fa fa-angle-right" data-ng-show="trigger"></i>\n                              </li>\n                         <li data-ng-show="trigger">\n                                   <a href="#">{{ trigger.description || trigger.name }}</a>\n                             </li>\n                 </ul>\n         </div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n               <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/trigger.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n\n                                <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{ trigger.name }}\n                                    </div>\n                                        <div class="profile-usertitle-job">\n                                           {{ trigger.description }}\n                                     </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.triggers.view.settings\')}">\n                                                       <a href="/tools/triggers/view/{{trigger.id}}/settings">\n                                                       <i class="icon-bulb"></i>\n                                                     {{ \'APPLICATION_SETTINGS\' | translate }} </a>\n                                               </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.settings.html",'<div class="row">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <!-- <pre>\n                                    {{conditionsData.query | json}}\n                               </pre>\n                                <pre>\n                                 {{actionsData.query | json}}\n                          </pre> -->\n                            <form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateTrigger()" novalidate>\n                               <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trigger.name" required/>\n                                                                <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                              <input\n                                                                bs-switch\n                                                             class="form-control"\n                                                          ng-model="trigger.status"\n                                                             type="checkbox"\n                                                               name="status"\n                                                         switch-active="{{ recordSwitch.isActive }}"\n                                                           switch-on-text="{{ recordSwitch.onText }}"\n                                                            switch-off-text="{{ recordSwitch.offText }}"\n                                                          switch-on-color="{{ recordSwitch.onColor }}"\n                                                          switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                           switch-size="{{ recordSwitch.size }}"\n                                                         switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                         switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                            switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                 </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trigger.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                        <!-- END GENERAL TAB -->\n                                      <div class="tab-pane" id="tab_1_2">\n                                           <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in trigger.All">\n                                                                       <condition-builder element="all" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n                                                                 <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in trigger.Any">\n                                                                       <condition-builder element="any" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n                                                                 <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in trigger.Actions">\n                                                                        <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n                                                                               <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $triggers.services[trigger.channel].actions | filter: $select.search">\n                                                                                         <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n                                                                           <action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n                                                                  </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !trigger.All.length && !trigger.Any.length">\n                                                 <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !trigger.Actions.length">\n                                                    <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                </div>\n                                </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/trigger/wizard/wizard.html",'<div class="row">\n    <div class="col-md-12">\n               <!-- BEGIN PAGE HEADER-->\n             <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bulb"></i>\n                                     <a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n                         </li>\n                 </ul>\n         </div>\n                <!-- END PAGE HEADER-->\n\n             <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }} WIZARD</span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n                                     <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n                                              <form name="forms.general" novalidate>\n                                                        <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                      <input\n                                                                    bs-switch\n                                                                         class="form-control"\n                                                              ng-model="item.status"\n                                                                type="checkbox"\n                                                                           name="status"\n                                                                         data-ng-init="item.status = 0"\n                                                                    switch-active="{{ recordSwitch.isActive }}"\n                                                                   switch-on-text="{{ recordSwitch.onText }}"\n                                                                    switch-off-text="{{ recordSwitch.offText }}"\n                                                                  switch-on-color="{{ recordSwitch.onColor }}"\n                                                                  switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                                   switch-size="{{ recordSwitch.size }}"\n                                                                 switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                                 switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                                    switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                     </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              </form>\n                                       </wz-step>\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n                                            <form name="forms.settings" novalidate>\n                                               <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n                                                                   <label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                    <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n                                                                            <ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                          <ui-select-choices repeat="channel in $triggers.channels | filter: $select.search">\n                                                                                   <div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n                                                                           </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in item.All">\n                                                                  <condition-builder element="all" serviceindex="item.channel" service="$triggers" form="forms.settings"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in item.Any">\n                                                                  <condition-builder element="any" serviceindex="item.channel" service="$triggers" form="forms.settings"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in item.Actions">\n                                                                   <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$invalid}">\n                                                                            <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $triggers.services[item.channel].actions | filter: $select.search">\n                                                                                            <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.settings"></action-builder-template>\n                                                                          <action-builder-integration ng-switch-when="integration" element="action" form="forms.settings"></action-builder-integration>\n                                                                 </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                      </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-link"></i>\n                                     <a href="#">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-link font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TRUNKS\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="/tools/trunks/wizard" data-toggle="dropdown">\n                                               <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRUNK\' | translate }}\n                                 </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-link"></i>\n                                     <a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n                                     <i data-ng-show="trunk" class="fa fa-angle-right"></i>\n                                </li>\n                         <li data-ng-show="trunk">\n                                     <a href="#">{{trunk.name}}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/trunk.png" class="img-responsive">\n                              </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{trunk.name}}\n                                        </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.trunks.view.settings\')}">\n                                                 <a data-ng-href="/tools/trunks/view/{{trunk.name}}/settings"><i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                             </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/tools/trunk/view/view.settings.html",'<div class="row">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TRUNK\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n                                    </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_OTHER_FIELDS\' | translate}}</a>\n                                        </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body" data-ng-init="getContexts();">\n                              <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateTrunk()" novalidate>\n                                                 <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trunk.name" required readonly/>\n                                                         <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <div class="row">\n                                                             <div class="col-md-6">\n\n                                                      <!-- START HOST -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="trunk.host" required/>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="(forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END HOST -->\n\n                                                   <!-- START SECRET -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': (forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_SECRET\' | translate}}</label>\n                                                           <input type="password" name="secret" placeholder="{{\'APPLICATION_SECRET\' | translate}}" class="form-control" data-ng-model="trunk.secret">\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n                                                                </span>\n                                                               <span data-ng-show="(forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SECRET -->\n\n                                                 <!-- START CONTEXT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <ui-select data-ng-model="trunk.context" name="context" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n                                                                                <div ng-bind-html="context.name | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_VOICE_CONTEXT\' | translate }}\n                                                         </span>\n                                                               <span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONTEXT -->\n\n                                                        <!-- START CALLERID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_CALLERID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="callerid" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder="{{\'APPLICATION_CALLERID\' | translate}}" class="form-control" data-ng-model="trunk.callerid"/>\n                                                              <span class="help-block">\n                                                                             {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" &lt;number&gt;\n                                                                     </span>\n                                                               <span data-ng-show="(forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CALLERID -->\n\n                                                       <!-- START TYPE -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <ui-select data-ng-model="trunk.type" name="type" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'user\',\'peer\',\'friend\'] | filter: $select.search">\n                                                                          <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_TYPE\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="(forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TYPE -->\n\n                                                   <!-- START DTMFMODE -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_DTMFMODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <ui-select data-ng-model="trunk.dtmfmode" name="dtmfmode" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n                                                                   <ui-select-choices repeat="item in [\'rfc2833\', \'info\', \'shortinfo\', \'inband\',\'auto\'] | filter: $select.search">\n                                                                             <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_DTMFMODE\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="(forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DTMFMODE -->\n\n                                               </div>\n                                                <div class="col-md-6">\n\n                                                      <!-- START DEFAULT USER -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT_USER\' | translate}}" class="form-control" data-ng-model="trunk.defaultuser" required/>\n                                                            <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DEFAULT USER -->\n\n                                                   <!-- START NAT -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_NAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select multiple data-ng-model="trunk.nat" name="nat" theme="bootstrap" ui-required="true">\n                                                                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n                                                                           <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_NAT\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAT -->\n\n                                                    <!-- START QUALIFY -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_QUALIFY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <ui-select data-ng-model="trunk.qualify" name="qualify" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_QUALIFY\' | translate }}\n                                                               </span>\n                                                               <span data-ng-show="(forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END QUALIFY -->\n\n                                                        <!-- START ALLOW -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_ALLOW_CODEC\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select multiple data-ng-model="trunk.allow" name="allow" theme="bootstrap" ui-required="true">\n                                                                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'g723\',\'gsm\',\'ulaw\',\'alaw\',\'g726\',\'g722\',\'g729\',\'ilbc\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_ALLOW_CODEC\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$error.required" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END ALLOW -->\n\n                                                  <!-- START INSECURE -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_INSECURE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <ui-select multiple data-ng-model="trunk.insecure" name="insecure" theme="bootstrap" ui-required="true">\n                                                                      <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'port\',\'invite\',\'very\'] | filter: $select.search">\n                                                                          <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_INSECURE\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="(forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END INSECURE -->\n\n                                                       <!-- START CALLLIMIT -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.call_limit.$touched || forms.general.$submitted) && forms.general.call_limit.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_CALLLIMIT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                            <input type="number" min="0" name="call-limit" placeholder="{{\'APPLICATION_CALLLIMIT\' | translate}}" class="form-control" data-ng-model="trunk.call_limit"/>\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_CALLLIMIT\' | translate }}\n                                                             </span>\n                                                               <span data-ng-show="(forms.general.call_limit.$touched || forms.general.$submitted) && forms.general.call_limit.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CALLLIMIT -->\n\n                                              </div>\n                                        </div>\n\n                                                      <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trunk.description"></textarea>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n                                      <!-- ADVANCED TAB -->\n                                 <div class="tab-pane" id="tab_1_2">\n                                           <form name="forms.advanced" data-ng-submit="forms.advanced.$valid && updateTrunk()" novalidate>\n                                                       <div class="row">\n                                                             <div class="col-md-6">\n\n                                                      <!-- START REGISTRY -->\n                                                       <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n                                                         <input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="trunk.registry"/>\n                                                               <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n                                                              </span>\n                                                       </div>\n                                                        <!-- END REGISTRY -->\n\n                                                       <!-- START DIRECTMEDIA -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_DIRECTMEDIA\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select data-ng-model="trunk.directmedia" name="directmedia" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\', \'no\', \'nonat\', \'update\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_DIRECTMEDIA\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DIRECTMEDIA -->\n\n                                                    <!-- START CALLCOUNTER -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_CALLCOUNTER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select data-ng-model="trunk.callcounter" name="callcounter" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_CALLCOUNTER\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CALLCOUNTER -->\n\n                                                    <!-- START FROMDOMAIN -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromdomain.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_FROMDOMAIN\' | translate}}</label>\n                                                               <input type="text" name="fromdomain" placeholder="{{\'APPLICATION_FROMDOMAIN\' | translate}}" class="form-control" data-ng-model="trunk.fromdomain" />\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_FROMDOMAIN\' | translate }}\n                                                            </span>\n                                                               <span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromdomain.$invalid)" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END FROMDOMAIN -->\n\n                                                     <!-- START FROMUSER -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromuser.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_FROMUSER\' | translate}}</label>\n                                                         <input type="text" name="fromuser" placeholder="{{\'APPLICATION_FROMUSER\' | translate}}" class="form-control" data-ng-model="trunk.fromuser" />\n                                                              <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_FROMUSER\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromuser.$invalid)" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END FROMUSER -->\n\n                                               </div>\n                                                <div class="col-md-6">\n\n                                                      <!-- START OUTBOUNDPROXY -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.outboundproxy.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}</label>\n                                                            <input type="text" name="outboundproxy" placeholder="{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}" class="form-control" data-ng-model="trunk.outboundproxy" />\n                                                               <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_OUTBOUNDPROXY\' | translate }}\n                                                         </span>\n                                                               <span data-ng-show="forms.advanced.$submitted && (forms.advanced.outboundproxy.$invalid)" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END OUTBOUNDPROXY -->\n\n                                                  <!-- START USEREQPHONE -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_USEREQPHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select data-ng-model="trunk.usereqphone" name="usereqphone" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_USEREQPHONE\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USEREQPHONE -->\n\n                                                    <!-- START TRUSTRPID -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_TRUSTRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                            <ui-select data-ng-model="trunk.trustrpid" name="trustrpid" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_TRUSTRPID\' | translate }}\n                                                             </span>\n                                                               <span data-ng-show="(forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$error.required" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TRUSTRPID -->\n\n                                                      <!-- START SENDRPID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_SENDRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <ui-select data-ng-model="trunk.sendrpid" name="sendrpid" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_SENDRPID\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="(forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SENDRPID -->\n\n                                                       <!-- START ENCRYPTION -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_ENCRYPTION\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                           <ui-select data-ng-model="trunk.encryption" name="encryption" theme="bootstrap" required>\n                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_ENCRYPTION\' | translate }}\n                                                            </span>\n                                                               <span data-ng-show="(forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END ENCRYPTION -->\n\n                                                     <!-- START PORT -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PORT\' | translate}}</label>\n                                                             <input type="number" min="0" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="trunk.port"/>\n                                                         <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_PORT\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="(forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PORT -->\n\n                                                   <!-- START TRANSPORT -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_TRANSPORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                            <ui-select multiple data-ng-model="trunk.transport" name="transport" theme="bootstrap" ui-required="true">\n                                                                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'udp\',\'wss\',\'ws\',\'tcp\',\'tls\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_TRANSPORT\' | translate }}\n                                                             </span>\n                                                               <span data-ng-show="(forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$error.required" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TRANSPORT -->\n\n                                              </div>\n                                        </div>\n\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n                                     <!-- START OTHER FIELDS TAB -->\n                                       <div class="tab-pane" id="tab_1_3">\n                                           <div class="row">\n                                                     <div class="col-md-6">\n                                                                <!-- START OTHER FIELDS-->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_OTHER_FIELDS\' | translate}}</label>\n                                                                     <textarea name="otherFields" placeholder="{{\'APPLICATION_OTHER_FIELDS\' | translate}}" class="form-control otherfields-col" data-ng-model="trunk.otherFields"></textarea>\n                                                                    <span class="help-block">\n                                                                             {{ \'DESCRIPTION_TRUNK_OTHER_FIELDS\' | translate }}\n                                                                  </span>\n                                                               </div>\n                                                                <!-- END OTHER FIELDS -->\n                                                     </div>\n                                                        <div class="col-md-6">\n                                                                <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_EXAMPLE\' | translate}}</label>\n                                                                  <div class="well">\n                                                                            <div>host=dynamicp</div>\n                                                                              <div>secret=********</div>\n                                                                            <div>regcontext=tammari-internal</div>\n                                                                                <div>regexten=1005</div>\n                                                                              <div>dtmfmode=rfc2833</div>\n                                                                           <div>insecure=invite,port</div>\n                                                                               <div>canreinvite=yes</div>\n                                                                            <div>nat=yes</div>\n                                                                            <div>qualify=yes</div>\n                                                                                <div>context=merus-sipphone</div>\n                                                                             <div>pickupgroup=1</div>\n                                                                              <div>callgroup=1</div>\n                                                                                <div>mailbox=1000@default</div>\n                                                                       </div>\n                                                                </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END OTHER FIELDS TAB -->\n                         </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/trunk/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard()">\n    <!-- BEGIN PAGE HEADER-->\n     <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-wrench"></i>\n                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                               <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-link"></i>\n                             <a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n                             <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                      </li>\n         </ul>\n </div>\n        <!-- END PAGE HEADER-->\n\n     <!-- BEGIN PORTLET-->\n <div class="portlet light bordered">\n          <div class="portlet-title">\n                   <div class="caption font-green-sharp">\n                                <i class="icon-link font-green-sharp"></i>\n                            <span class="caption-subject">{{ \'APPLICATION_TRUNK\' | translate }} WIZARD</a> </span>\n                      </div>\n                </div>\n                <div class="portlet-body">\n                    <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n                                      <form name="forms.general" novalidate>\n\n                                              <!-- START NAME -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.name.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                   <span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END NAME -->\n\n                                           <!-- START HOST -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.host.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.host" required/>\n                                                   <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="forms.general.$submitted && forms.general.host.$invalid" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END HOST -->\n\n                                           <!-- START PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.password.$invalid}">\n                                                 <label class="control-label">{{\'APPLICATION_SECRET\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                       <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.secret" required/>\n                                                     <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n                                                        </span>\n                                                       <span data-ng-show="forms.general.$submitted && forms.general.password.$invalid" class="help-block help-block-error">\n                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END PASSWORD -->\n\n                                               <!-- START DEFAULT USER -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n                                                      <label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT\' | translate}} {{\'APPLICATION_USER\' | translate}}" class="form-control" data-ng-model="item.defaultuser" required/>\n                                                     <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END DEFAULT USER -->\n\n                                           <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                                            <button class="btn green-haze" type="submit" ng-click="next(true)">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                        </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_ADVANCED\' | translate}}" canexit="exitValidation(forms.advanced.$valid)">\n                                    <form name="forms.advanced" novalidate>\n\n                                             <!-- START REGISTRY -->\n                                               <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n                                                 <input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="item.registry"/>\n                                                        <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n                                                      </span>\n                                               </div>\n                                                <!-- END REGISTRY -->\n                                         <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                    </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n                    </wizard>\n             </div>\n        </div>\n        <!-- END PORTLET-->\n</div>\n'),
-a.put("app/tools/variable/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_VARIABLE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/variable/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="#">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VARIABLES\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_VARIABLE\' | translate }}\n                                              </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getVariable()">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="/tools/variables/list">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n                                       <i data-ng-show="variable" class="fa fa-angle-right"></i>\n                             </li>\n                         <li data-ng-show="variable">\n                                  <a href="#">{{variable.name}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/variable.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{variable.name}}\n                                     </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.variables.view.settings\')}">\n                                                      <a data-ng-href="/tools/variables/view/{{variable.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_VARIABLE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateVariable()" novalidate>\n\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="variable.name" required/>\n                                                               <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="variable.description"></textarea>\n                                                      </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/yourdashboard/list/clone.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_CLONE_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-screen-desktop"></i>\n                                   <a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_DASHBOARD\' | translate }}\n                                             </button>\n                                     </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/show/show.html",'<div class="row" style="min-height: 466px;">\n  <div class="col-md-12" ng-init="getDashboard()">\n    <adf-dashboard\n    data-ng-if="dashboard"\n    name="{{dashboard.name}}"\n    collapsible="{{dashboard.collapsible}}"\n    maximizable="{{dashboard.maximizable}}"\n    enableconfirmdelete="{{dashboard.enableconfirmdelete}}"\n    structure="{{dashboard.structure}}"\n    editable="{{dashboard.editable}}"\n    adf-model="dashboard.model"/>\n  </div>\n</div>\n'),a.put("app/tools/yourdashboard/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getDashboard()">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-screen-desktop"></i>\n                                   <a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n                                    <i data-ng-show="dashboard" class="fa fa-angle-right"></i>\n                            </li>\n                         <li data-ng-show="dashboard">\n                                 <a href="#">{{dashboard.name}}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/dashboard.png" class="img-responsive">\n                          </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{dashboard.name}}\n                                    </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.yourdashboards.view.settings\')}">\n                                                 <a data-ng-href="/tools/yourdashboards/view/{{dashboard.id}}/settings">\n                                                       <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_DASHBOARD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                           </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateDashboard()" novalidate>\n\n                                                   <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="dashboard.name" required/>\n                                                              <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START VISIBLE TO ADMIN -->\n                                                       <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_VISIBLE_TO_ADMIN\' | translate}}</label><br>\n                                                             <input\n                                                                        bs-switch\n                                                                     ng-model="dashboard.admin"\n                                                                    type="checkbox"\n                                                                       switch-active="{{ radioSwitch.isActive }}"\n                                                                    switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                        switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                        switch-on-color="{{ radioSwitch.onColor }}"\n                                                                   switch-off-color="{{ radioSwitch.offColor }}"\n                                                                 switch-animate="{{ radioSwitch.animate }}"\n                                                                    switch-size="{{ radioSwitch.size }}"\n                                                                  switch-label="{{ radioSwitch.label }}"\n                                                                        switch-icon="{{ radioSwitch.icon }}"\n                                                                  switch-radio-off="{{ radioSwitch.radioOff }}"\n                                                                 switch-label-width="{{ radioSwitch.labelWidth }}"\n                                                                     switch-handle-width="{{ radioSwitch.handleWidth }}">\n                                                  </div>\n                                                        <!-- END VISIBLE TO ADMIN -->\n\n                                                       <!-- START VISIBLE TO USER -->\n                                                        <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_VISIBLE_TO_USER\' | translate}}</label><br>\n                                                              <input\n                                                                        bs-switch\n                                                                     ng-model="dashboard.user"\n                                                                     type="checkbox"\n                                                                       switch-active="{{ radioSwitch.isActive }}"\n                                                                    switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                        switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                        switch-on-color="{{ radioSwitch.onColor }}"\n                                                                   switch-off-color="{{ radioSwitch.offColor }}"\n                                                                 switch-animate="{{ radioSwitch.animate }}"\n                                                                    switch-size="{{ radioSwitch.size }}"\n                                                                  switch-label="{{ radioSwitch.label }}"\n                                                                        switch-icon="{{ radioSwitch.icon }}"\n                                                                  switch-radio-off="{{ radioSwitch.radioOff }}"\n                                                                 switch-label-width="{{ radioSwitch.labelWidth }}"\n                                                                     switch-handle-width="{{ radioSwitch.handleWidth }}">\n                                                  </div>\n                                                        <!-- END VISIBLE TO USER -->\n\n                                                        <!-- START VISIBLE TO AGENT -->\n                                                       <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_VISIBLE_TO_AGENT\' | translate}}</label><br>\n                                                             <input\n                                                                        bs-switch\n                                                                     ng-model="dashboard.agent"\n                                                                    type="checkbox"\n                                                                       switch-active="{{ radioSwitch.isActive }}"\n                                                                    switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                        switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                        switch-on-color="{{ radioSwitch.onColor }}"\n                                                                   switch-off-color="{{ radioSwitch.offColor }}"\n                                                                 switch-animate="{{ radioSwitch.animate }}"\n                                                                    switch-size="{{ radioSwitch.size }}"\n                                                                  switch-label="{{ radioSwitch.label }}"\n                                                                        switch-icon="{{ radioSwitch.icon }}"\n                                                                  switch-radio-off="{{ radioSwitch.radioOff }}"\n                                                                 switch-label-width="{{ radioSwitch.labelWidth }}"\n                                                                     switch-handle-width="{{ radioSwitch.handleWidth }}">\n                                                  </div>\n                                                        <!-- END VISIBLE TO AGENT -->\n\n                                                       <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="dashboard.description"></textarea>\n                                                     </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/zendesk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_ZENDESK\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/zendesk/wizard" data-toggle="dropdown">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/view/configuration/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.name.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.name.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/zendesk/view/configuration/list/list.html",'<div ui-view class="profile-content">\n    <div class="row">\n             <div class="col-md-12">\n                       <div class="portlet light" data-ng-init="initView()">\n                         <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group" data-ng-show="id.length">\n                                                      <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                            <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                                   </a>\n                                          </div>\n                                                <div class="btn-group">\n                                                       <a class="btn green-jungle" href="#" data-ng-click="createItem()">\n                                                            <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                          <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                                      </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/zendesk/view/configuration/view/view.html",'<div class="row" data-ng-init="initView();getConfiguration();getCustomVariables();getFields();getTags();">\n  <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_TAGS\' | translate}}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'subject\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                              <!-- <div id="subject-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n                 <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n                            <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                    <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.variableName" data-ng-change="updateField(subjectItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n                            <div ng-bind-html="variable.title | highlight: $select.search"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'customVariable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n                        <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'description\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                                <!-- <div id="description-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n                                                 <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                     <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.type as item in descFieldType | filter: $select.search">\n                        <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n                                                                        <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n                                                                        <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n                            <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'string\'">\n                                                                 <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'variable\'">\n                       <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.variableName" data-ng-change="updateField(descriptionItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n                            <div ng-bind-html="variable.title | highlight: $select.search"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'customVariable\'">\n                   <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n                        <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'field\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                         <!-- <div id="field-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n                   <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n                          <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                             <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n                                    <div ng-bind-html="item.title | highlight: $select.search | ucfirst"></div>\n                                 </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.variableName" data-ng-change="updateField(fieldItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n                            <div ng-bind-html="variable.title | highlight: $select.search"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'customVariable\'">\n                        <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n                        <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                                       <!-- TAG TAB -->\n                                      <div class="tab-pane ui-padding" id="tab_1_4">\n                                                <div class="row">\n              <div class="col-md-12">\n                <span class="caption-subject">Select tags that you want add in the ticket:</span>\n              </div>\n            </div>\n            <hr>\n                                               <form name="forms.tags" data-ng-submit="updateTags()" novalidate>\n                                                     <!-- TAG -->\n                                                  <div class="form-group">\n                                                              <ui-select multiple data-ng-model="selectedTags.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                                                                   <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item.name}}</ui-select-match>\n                                                                        <ui-select-choices repeat="tag.id as tag in tags | filter: $select.search">\n                                                                           {{tag.name}}\n                                                                  </ui-select-choices>\n                                                          </ui-select>\n                                                  </div>\n                                                        <!-- END TAG -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END TAG TAB -->\n                          </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
-a.put("app/zendesk/view/view.account.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                                <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START AUTH TYPE -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n                                                              <ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                        <ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n                                                                               <div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'password\'" lazy-render duration="1">\n                                                               <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                            <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'token\'" lazy-render duration="1">\n                                                             <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n                                                              <span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN -->\n\n                                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/zendesk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n                                 <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/zendesk.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.zendesk.view.account\')}">\n                                                       <a ng-href="/zendesk/view/{{account.id}}/account">\n                                                    <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.zendesk.view.configurations\') || $state.is(\'main.zendesk.view.configuration\')}">\n                                                        <a ng-href="/zendesk/view/{{account.id}}/configurations/list">\n                                                        <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n     <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/zendesk/accounts/validate/username"/>\n                                                              <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/zendesk/accounts/validate/remoteUri"/>\n                                                          <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n                                 </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START AUTH TYPE -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n                                                              <ui-select data-ng-model="item.authType" name="authType" theme="bootstrap" required>\n                                                                  <ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                        <ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n                                                                               <div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="item.authType == \'password\'" lazy-render duration="1">\n                                                          <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                               <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="item.authType == \'token\'" lazy-render duration="1">\n                                                                <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.token" required/>\n                                                         <span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN -->\n\n                                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("components/footer/footer.html",'<!-- BEGIN FOOTER -->\n<div class="page-footer" data-ng-init="initFooter()">\n  <div class="page-footer-inner">\n     xCALLY Motion v. {{info.version}} | {{year}} - {{year + 1}} &copy; Powered by Xenialab\n  </div>\n  <div class="scroll-to-top">\n    <i class="icon-arrow-up"></i>\n  </div>\n</div>\n<!-- END FOOTER -->\n'),a.put("components/header/header.html",'<!-- BEGIN HEADER INNER -->\n<div class="page-header-inner" data-ng-init="initHeader()">\n  <!-- BEGIN LOGO -->\n  <div class="page-logo">\n    <a href="/">\n      <img src="assets/images/logo.png" alt="logo" class="logo-default"/>\n    </a>\n    <div class="menu-toggler sidebar-toggler" data-ng-click="toogleSidebar()">\n      <!-- DOC: Remove the above "hide" to enable the sidebar toggler button on header -->\n    </div>\n  </div>\n  <!-- END LOGO -->\n  <!-- BEGIN HEADER SEARCH BOX -->\n  <!-- DOC: Apply "search-form-expanded" right after the "search-form" class to have half expanded search box -->\n  <form class="search-form hide" action="extra_search.html" method="GET">\n    <div class="input-group">\n      <input type="text" class="form-control" placeholder="Search..." name="query">\n      <span class="input-group-btn">\n        <a href="javascript:;" class="btn submit"><i class="icon-magnifier"></i></a>\n      </span>\n    </div>\n  </form>\n  <!-- END HEADER SEARCH BOX -->\n  <!-- BEGIN RESPONSIVE MENU TOGGLER -->\n  <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse">\n  </a>\n  <!-- END RESPONSIVE MENU TOGGLER -->\n  <!-- BEGIN TOP NAVIGATION MENU -->\n  <div class="top-menu">\n    <ul class="nav navbar-nav pull-right">\n      <!-- BEGIN LANGUAGE BAR -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-language">\n        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n          <img ng-src="assets/images/flags/{{ language }}.png">\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default">\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ar\')">\n              <img alt="" src="assets/images/flags/ar.png"> {{\'APPLICATION_ARABIC\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'de\')">\n              <img alt="" src="assets/images/flags/de.png"> {{\'APPLICATION_GERMAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'en_EN\')">\n              <img alt="" src="assets/images/flags/en_EN.png"> {{\'APPLICATION_ENGLISH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'es\')">\n              <img alt="" src="assets/images/flags/es.png"> {{\'APPLICATION_SPANISH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'fr\')">\n              <img alt="" src="assets/images/flags/fr.png"> {{\'APPLICATION_FRENCH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'it\')">\n              <img alt="" src="assets/images/flags/it.png"> {{\'APPLICATION_ITALIAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ja\')">\n              <img alt="" src="assets/images/flags/ja.png"> {{\'APPLICATION_JAPANASE\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ko\')">\n              <img alt="" src="assets/images/flags/ko.png"> {{\'APPLICATION_KOREAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'pt\')">\n              <img alt="" src="assets/images/flags/pt.png"> {{\'APPLICATION_PORTUGUESE\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ru\')">\n              <img alt="" src="assets/images/flags/ru.png"> {{\'APPLICATION_RUSSIAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'sv\')">\n              <img alt="" src="assets/images/flags/sv.png"> {{\'APPLICATION_SWEDISH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'zh-CN\')">\n              <img alt="" src="assets/images/flags/zh-CN.png"> {{\'APPLICATION_CHINESE_SIMPLIFIED\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'zh-TW\')">\n              <img alt="" src="assets/images/flags/zh-TW.png"> {{\'APPLICATION_CHINESE_TRADITIONAL\' | translate}}\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END LANGUAGE BAR -->\n      <!-- BEGIN USER LOGIN DROPDOWN -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-user">\n        <a href="#" class="dropdown-toggle" dropdown-menu-hover data-toggle="dropdown" data-close-others="true">\n          <img class="img-circle" data-ng-src="api/users/avatar/{{getCurrentUser().userpic || \'unknown_avatar\'}}" alt="...">\n          <span class="username username-hide-on-mobile">\n            {{ getCurrentUser().fullname }}\n          </span>\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default">\n          <li>\n            <a ng-href=" {{isAdmin() ? \'/staff/users/view/\'+getCurrentUser().id+\'/account\' : \'/staff/agents/view/\'+getCurrentUser().id+\'/account\'}}">\n              <i class="icon-key"></i>{{\'APPLICATION_CHANGE_PASSWORD\' | translate}}\n            </a>\n          </li>\n          <li data-ng-click="logout()">\n            <a href="#">\n              <i class="icon-logout"></i> Log Out\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END USER LOGIN DROPDOWN -->\n      <!-- BEGIN QUICK SIDEBAR TOGGLER -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-quick-sidebar-toggler" data-ng-click="toggleQuickSidebar()">\n        <a href="#" class="dropdown-toggle">\n          <i class="icon-logout"></i>\n        </a>\n      </li>\n      <!-- END QUICK SIDEBAR TOGGLER -->\n    </ul>\n  </div>\n  <!-- END TOP NAVIGATION MENU -->\n</div>\n<!-- END HEADER INNER -->\n'),a.put("components/modal/delete.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text" ng-bind="modal.text"></p>\n  <div ng-if="modal.html" ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("components/quickSidebar/modal/add.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n\n<div class="modal-body">\n  <div class="portlet box blue">\n          <div class="portlet-title">\n                   <div class="caption">\n                         <i class="icon-people"></i>{{\'APPLICATION_SELECTED_AGENTS\' | translate}}\n                    </div>\n                </div>\n                <div class="portlet-body">\n                    <ul>\n                          <li data-ng-repeat="item in items">\n                                    {{item.fullname}}\n                            </li>\n\n        <li data-ng-repeat="item in selected.items">\n                                  {{item.fullname}}\n                            </li>\n                 </ul>\n         </div>\n        </div>\n\n  <ui-select multiple name="items" ng-model="selected.items" theme="bootstrap">\n    <ui-select-match placeholder="{{\'APPLICATION_SELECTED_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n    <ui-select-choices repeat="{id: agent.id, fullname: agent.fullname} as agent in agents.rows | filter: $select.search">\n      {{agent.fullname}}\n    </ui-select-choices>\n  </ui-select>\n</div>\n\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="selected.items.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("components/quickSidebar/modal/close.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text" ng-bind="modal.text | translate"></p>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),a.put("components/quickSidebar/quickSidebar.html",'<div class="page-quick-sidebar">\n  <div class="nav-justified">\n    <ul class="nav nav-tabs nav-justified">\n      <li data-ng-class="{active:currentTab==0}" data-ng-click="goToTab(0)">\n        <a href="#">\n          <i class="icon-people"></i>\n        </a>\n      </li>\n      <li data-ng-class="{active:currentTab==1}" data-ng-click="goToTab(1)">\n        <a href="#">\n        <i class="icon-eye"></i>\n        </a>\n      </li>\n      <li data-ng-class="{active:currentTab==2}" data-ng-click="goToTab(2)">\n        <a href="#">\n        <i class="icon-globe"></i>\n        </a>\n      </li>\n      <li data-ng-class="{active:currentTab==3}" data-ng-click="goToTab(3)">\n        <a href="#">\n        <i class="icon-bubbles"></i>\n        </a>\n      </li>\n    </ul>\n    <div class="tab-content">\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==0 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list" >\n          <div class="quicksidebar-search">\n            <div class="input-group">\n                                                       <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_AGENT\' | translate}}..." ng-model="searchAgent">\n                                                       <span class="input-group-btn">\n                                                        <i class="icon-magnifier"></i>\n                                                        </span>\n                                               </div>\n          </div>\n          <ul class="media-list list-items" data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="agent in agents.rows | orderBy:\'-online\' | filter:searchAgent as resultsAgent" data-ng-if="agent.id !== currentUser.id">\n              <img class="media-object" data-ng-src="api/users/avatar/{{agent.userpic ? agent.userpic : \'unknown_avatar\'}}" alt="{{agent.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(agent.id)">\n                <h4 class="media-heading"><span class="item-status">{{agent.fullname | characters:15 :true}} {{agent.internal}}</h4>\n                <div class="media-heading-small">\n                   <span class="badge badge-empty" data-ng-class="agent.online ? \'badge-success\' : \'badge-danger\'"></span></span> {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{agent.updatedAt}}">April 1, 2014</time>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="agents.rows.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_AGENTS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="resultsAgent.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_AGENTS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==1 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list">\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_USER\' | translate}}..." ng-model="searchUser">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n          <ul class="media-list list-items"  data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="user in users.rows | orderBy:\'-online\' | filter:searchUser as resultsUser" data-ng-if="user.id !== currentUser.id">\n              <img class="media-object" data-ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" alt="{{user.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(user.id)">\n                <h4 class="media-heading">{{user.fullname | characters:15 :true}} {{user.internal}}</h4>\n                <div class="media-heading-small">\n                   <span class="badge badge-empty" data-ng-class="user.online ? \'badge-success\' : \'badge-danger\'"></span> {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{user.updatedAt}}">April 1, 2014</time>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="users.rows.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_USERS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="resultsUser.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_USERS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==2 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list">\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_CHAT\' | translate}}..." data-ng-model="searchChatRoomsExternals">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n          <ul class="media-list list-items"  data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="chatRoom in chatRooms | QuickSidebarFilterUsersLowerThan:2 | filter:{type:\'external\'} | filter:searchChatRoomsExternals as resultsChatRoomsExternals">\n              <div class="media-status">\n                <i class="icon icon-close" data-ng-show="chatRoom.status === \'CLOSED\'"></i>\n              </div>\n              <img class="media-object" data-ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" alt="{{user.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(null, chatRoom.id)">\n                <h4 class="media-heading">{{chatRoom.ChatVisitor.fullname}}</h4>\n                <div class="media-heading-small">\n                   {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{chatRoom.createdAt}}">April 1, 2014</time>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" data-ng-if="resultsChatRoomsExternals.length === 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_CHATS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==3 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list">\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_GROUP\' | translate}}..." data-ng-model="searchChatRoomsGroups">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n          <ul class="media-list list-items"  data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="chatRoom in chatRooms | QuickSidebarFilterUsersGreaterThan:2 | filter:searchChatRoomsGroups as resultsChatRoomsGroups">\n              <img class="media-object" data-ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" alt="{{user.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(null, chatRoom.id)">\n                <h4 class="media-heading">{{chatRoom.ChatVisitor.fullname}}</h4>\n                <div class="media-heading-small">\n                   {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{chatRoom.updatedAt}}">April 1, 2014</time>\n                </div>\n                <div class="media-heading-small">\n                  <div data-ng-repeat="user in chatRoom.Users | map: \'fullname\'" class="inline">\n                    {{ $last ? user : user + \', \'}}\n                  </div>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" data-ng-if="resultsChatRoomsGroups.length === 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_CHATS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat page-quick-sidebar-content-item-shown" ng-class="{active:messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list" >\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_CHAT\' | translate}}..." ng-model="searchMessage">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n        </div>\n        <div class="page-quick-sidebar-item">\n          <div class="page-quick-sidebar-chat-user" data-wrapper-class="page-quick-sidebar-list">\n            <div class="page-quick-sidebar-nav">\n                <a href="#" class="page-quick-sidebar-back-to-list" data-ng-click="goBack()"><i class="icon-arrow-left"></i>Back</a>\n            </div>\n            <div id="page-quick-sidebar-chat-user-messages" class="page-quick-sidebar-chat-user-messages" data-ng-style="style2" ng-scrollbars>\n              <div class="post animate-repeat" data-ng-repeat="chatMessage in chatRoom.ChatMessages | filter:searchMessage as resultsMessage" data-ng-class="chatMessage.UserId === currentUser.id ? \'in\' : \'out\'">\n                <img class="avatar" alt="" ng-src="api/users/avatar/unknown_avatar"/>\n                <div class="message">\n                  <span class="arrow"></span>\n                  <a href="#" class="name">{{chatMessage.User.fullname || chatMessage.ChatVisitor .fullname}}</a> -\n                  <span class="datetime">\n                    <time is="relative-time" datetime="{{chatMessage.createdAt}}">\n                      April 1, 2014\n                    </time>\n                  </span>\n                  <ng-emoticons class="body" emoticons-data="chatMessage.body" emoticons-options="options"/>\n                </div>\n              </div>\n\n              <div class="media-body" style="text-align: center;" data-ng-if="resultsMessage.length == 0">\n                <h5 class="media-heading"><i>{{\'MESSAGE_NO_MESSAGES_FOUND\' | translate | lowercase}}</i></h5>\n              </div>\n\n              <div class="media-body" style="text-align: center;" data-ng-if="chatRoom.status === \'CLOSED\'">\n                <h5 class="media-heading"><i>{{\'MESSAGE_CHAT_CLOSED\' | translate | lowercase}}</i></h5>\n              </div>\n\n            </div>\n            <div class="page-quick-sidebar-chat-user-form">\n              <textarea rows="3" class="form-control" style="border:none;resize: none;" placeholder="Type a message here..." ng-enter="sendMessage()" data-ng-model="message.body" data-ng-disabled="chatRoom.status === \'CLOSED\'"></textarea>\n              <div class="btn-group" style="width:100%;background-color:white">\n                <button type="button" class="btn btn-default" style="border:none" data-ng-disabled="chatRoom.status === \'CLOSED\'" data-ng-click="addAgent(chatRoom.id)"><i class="icon-plus font-blue"></i></button>\n                <button type="button" class="btn btn-default pull-right" style="border:none" data-ng-disabled="chatRoom.status === \'CLOSED\'" data-ng-click="closeChatRoom(chatRoom.id)" data-ng-show="chatRoom.type === \'external\'"><i class="icon-close font-red"></i></button>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n'),
-a.put("components/sidebar/sidebar.html",'<div id="page-sidebar" class="page-sidebar navbar-collapse collapse">\n  <!-- BEGIN SIDEBAR MENU -->\n  <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) -->\n  <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode -->\n  <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode -->\n  <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->\n  <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded -->\n  <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed -->\n  <ul data-ng-click="mainTab.active=true" class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" data-ng-class="{\'page-sidebar-menu-closed\': settings.layout.pageSidebarClosed}" data-ng-init="getSidebarIntegrations()">\n    <!-- DOC: To remove the search box from the sidebar you just need to completely remove the below "sidebar-search-wrapper" LI element -->\n    <li class="sidebar-search-wrapper">\n      <!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->\n      <!-- DOC: Apply "sidebar-search-bordered" class the below search form to have bordered search box -->\n      <!-- DOC: Apply "sidebar-search-bordered sidebar-search-solid" class the below search form to have bordered & solid search box -->\n      <form class="sidebar-search sidebar-search-bordered" action="extra_search.html" method="POST">\n        <a href="javascript:;" class="remove">\n          <i class="icon-close"></i>\n        </a>\n      </form>\n      <!-- END RESPONSIVE QUICK SEARCH FORM -->\n    </li>\n\n    <!-- START DASHBOARD CASE -->\n    <li class="start" data-ng-class="{active: $state.includes(\'main.dashboard\')}">\n      <a href="/dashboard/channels/voice">\n        <i class="icon-rocket"></i>\n        <span class="title">{{\'APPLICATION_DASHBOARD\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.dashboard\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END DASHBOARD CASE -->\n\n    <!-- START YOURDASHBOARD LIST CASE -->\n    <li data-ng-class="{active: $state.is(\'main.tools.yourdashboards.show\')}" data-ng-show="Auth.isAdmin()">\n      <a href="javascript:;">\n        <i class="icon-screen-desktop"></i>\n        <span class="title" >{{\'APPLICATION_YOUR_DASHBOARDS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools.yourdashboards.show\') }"></span>\n      </a>\n      <ul class="sub-menu" data-ng-init="getSidebarDashboards()">\n        <li data-ng-class="{active: $stateParams.id == dashboard.id && $state.includes(\'main.tools.yourdashboards.show\')}" data-ng-repeat="dashboard in dashboards" data-ng-show="dashboard[Auth.getRole()] && dashboard.visible">\n          <a href="/tools/yourdashboards/show/{{dashboard.id}}" >\n            <i class="icon-screen-tablet"></i>\n            <span class="title" >{{dashboard.name}}  </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END YOURDASHBOARD LIST CASE -->\n\n    <!-- START STAFF LIST CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.staff\')}" data-ng-show="Auth.isAdmin()">\n      <a href="javascript:;">\n        <i class="icon-puzzle"></i>\n        <span class="title" >{{\'APPLICATION_STAFF\' | translate}}</span>\n        <span class="arrow" data-ng-class="{open: $state.includes(\'main.staff\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <!-- START USERS CASE -->\n        <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.staff.users\')}">\n          <a href="/staff/users/list">\n            <i class="icon-eye"></i>\n            <span class="title" >{{\'APPLICATION_USERS\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.users\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END USERS CASE -->\n\n        <!-- START AGENTS CASE -->\n        <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.staff.agents\')}">\n          <a href="/staff/agents/list">\n            <i class="icon-people"></i>\n            <span class="title" >{{\'APPLICATION_AGENTS\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.agents\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END AGENTS CASE -->\n\n        <!-- START AGENTS CASE -->\n        <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.staff.telephones\')}">\n          <a href="/staff/telephones/list">\n            <i class="icon-phone"></i>\n            <span class="title" >{{\'APPLICATION_TELEPHONES\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.telephones\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END AGENTS CASE -->\n\n        <!-- START TEAMS CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.staff.teams\')}">\n          <a href="/staff/teams/list">\n            <i class="icon-shield"></i>\n            <span class="title" >{{\'APPLICATION_TEAMS\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.teams\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END TEAMS CASE -->\n      </ul>\n    </li>\n    <!-- END STAFF LIST CASE -->\n\n    <!-- START CONTACT MANAGER LIST CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.contactmanager.contacts\')\n    || $state.includes(\'main.contactmanager.companies\')\n    || $state.includes(\'main.contactmanager.services\')}" data-ng-show="Auth.isAdmin()">\n    <a href="javascript:;">\n      <i class="icon-notebook"></i>\n      <span class="title" >{{\'APPLICATION_CONTACT_MANAGER\' | translate}}</span>\n      <span class="arrow" data-ng-class="{ open: $state.includes(\'main.contactmanager.contacts\')\n      || $state.includes(\'main.contactmanager.companies\')\n      || $state.includes(\'main.contactmanager.services\') }"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START CONTACTS CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.contactmanager.contacts\')}">\n        <a href="/contactmanager/contacts/list">\n          <i class=" fa fa-users"></i>\n          <span class="title" >{{\'APPLICATION_CONTACTS\' | translate}}</span>\n          <span data-ng-show="$state.includes(\'main.contactmanager.contacts\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END CONTACTS CASE -->\n      <!-- START COMPANIES CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.contactmanager.companies\')}">\n        <a href="/contactmanager/companies/list">\n          <i class="icon-briefcase"></i>\n          <span class="title" >{{\'APPLICATION_COMPANIES\' | translate}}</span>\n          <span data-ng-show="$state.includes(\'main.contactmanager.companies\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END COMPANIES CASE -->\n      <!-- START SERVICES CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.contactmanager.services\')}">\n        <a href="/contactmanager/services/list">\n          <i class="fa fa-tty"></i>\n          <span class="title" >{{\'APPLICATION_SERVICES\' | translate}}</span>\n          <span data-ng-show="$state.includes(\'main.contactmanager.services\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END SERVICES CASE -->\n    </ul>\n  </li>\n  <!-- END CONTACT MANAGER LIST CASE -->\n\n  <!-- START CHANNEL LIST CASE -->\n  <li data-ng-class="{active: $state.includes(\'main.channels\')}">\n    <a href="javascript:;">\n      <i class="icon-directions"></i>\n      <span class="title" >{{\'APPLICATION_CHANNELS\' | translate}}</span>\n      <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels\')}"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START VOICE CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{ active: $state.includes(\'main.channels.voice\') }">\n        <a href="javascript:;">\n          <i class="icon-earphones-alt"></i>\n          <span class="title">{{ \'APPLICATION_VOICE\' | translate}}</span>\n          <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice\') }"></span>\n        </a>\n\n        <ul class="sub-menu">\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.queues\')}">\n            <a href="/channels/voice/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title">{{\'APPLICATION_QUEUES\' | translate}}</span>\n            </a>\n          </li>\n          <li>\n            <a href="javascript:;">\n              <i class="icon-directions"></i>\n              <span class="title"> {{ \'APPLICATION_ROUTES\' | translate}} </span>\n              <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice.routes\') }"></span>\n              <ul class="sub-menu">\n                <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.inbound\')}">\n                  <a href="/channels/voice/routes/inbound/list">\n                    <i class="icon-call-in"></i>\n                    <span class="title"> {{\'APPLICATION_INBOUND\' | translate}} </span>\n                  </a>\n                </li>\n                <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.outbound\')}">\n                  <a href="/channels/voice/routes/outbound/list">\n                    <i class="icon-call-out"></i>\n                    <span class="title"> {{\'APPLICATION_OUTBOUND\' | translate}} </span>\n                  </a>\n                </li>\n                <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.internal\')}">\n                  <a href="/channels/voice/routes/internal/list">\n                    <i class="icon-reload"></i>\n                    <span class="title"> {{\'APPLICATION_INTERNALS\' | translate}} </span>\n                  </a>\n                </li>\n              </ul>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.contexts\')}">\n            <a href="/channels/voice/contexts/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{\'APPLICATION_CONTEXTS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.voicemails\')}">\n            <a href="/channels/voice/voicemails/list">\n              <i class="icon-envelope-letter"></i>\n              <span class="title"> {{\'APPLICATION_VOICEMAILS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.mohs\')}">\n            <a href="/channels/voice/mohs/list">\n              <i class="icon-music-tone"></i>\n              <span class="title"> {{\'APPLICATION_MOH\' | translate}} </span>\n            </a>\n          </li>\n          <!-- START RECORDING CASE -->\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.recordings\')}">\n            <a href="/channels/voice/recordings/list">\n              <i class="icon-control-play"></i>\n              <span class="title">{{\'APPLICATION_RECORDINGS\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END RECORDING CASE -->\n          <!-- START REALTIME CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.voice.realtime\')}">\n            <a href="/channels/voice/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END REALTIME CASE -->\n          <!-- START CHANSPY CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.voice.chanspy\')}">\n            <a href="/channels/voice/chanspy/list">\n              <i class="icon-magnifier"></i>\n              <span class="title" >{{\'APPLICATION_CHANSPY\' | translate}}</span>\n              <!-- <span data-ng-show="$state.includes(\'main.chanspy\')" class="selected"></span> -->\n            </a>\n          </li>\n          <!-- END CHANSPY CASE -->\n        </ul>\n      </li>\n      <!-- END VOICE CASE -->\n\n      <!-- START CHAT CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.channels.chat\')}" data-ng-if="license.chat && Auth.isAdmin()">\n        <a href="javascript:;">\n          <i class="icon-bubble"></i>\n          <span class="title">{{\'APPLICATION_CHAT\' | translate}}</span>\n          <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels.chat\')}"></span>\n        </a>\n        <ul class="sub-menu">\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.websites\')}">\n            <a href="/channels/chat/websites/list">\n              <i class="icon-globe"></i>\n              <span class="title"> {{\'APPLICATION_WEB_SITES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.queues\')}">\n            <a href="/channels/chat/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.online\')}">\n            <a href="/channels/chat/online/list">\n              <i class="icon-login"></i>\n              <span class="title"> {{\'APPLICATION_ONLINE_MESSAGES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.offline\')}">\n            <a href="/channels/chat/offline/list">\n              <i class="icon-logout"></i>\n              <span class="title"> {{\'APPLICATION_OFFLINE_MESSAGES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.chat.realtime\')}">\n            <a href="/channels/chat/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END CHAT CASE -->\n\n      <!-- START MAIL CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.channels.mail\')}" data-ng-if="license.mail">\n        <a href="javascript:;">\n          <i class="icon-envelope"></i>\n          <span class="title">{{\'APPLICATION_MAIL\' | translate}}</span>\n          <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.mail\') }"></span>\n        </a>\n\n        <ul class="sub-menu">\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.mail.accounts\') || $state.includes(\'main.channels.mail.account\')}">\n            <a href="/channels/mail/accounts/list">\n              <i class="icon-notebook"></i>\n              <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.mail.queues\') || $state.includes(\'main.channels.mail.queue\')}">\n            <a href="/channels/mail/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.mail.inbox\')}">\n            <a href="/channels/mail/inbox/list">\n              <i class="icon-note"></i>\n              <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n            </a>\n          </li>\n          <!-- START REALTIME CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.mail.realtime\')}">\n            <a href="/channels/mail/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END REALTIME CASE -->\n        </ul>\n      </li>\n      <!-- END MAIL CASE -->\n\n      <!-- START FAX CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.channels.fax\')}" data-ng-if="license.fax">\n        <a href="javascript:;">\n          <i class="icon-paper-plane"></i>\n          <span class="title"> {{ \'APPLICATION_FAX\' | translate}}</span>\n          <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.fax\') }"></span>\n        </a>\n        <ul class="sub-menu">\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.fax.accounts\')}">\n            <a href="/channels/fax/accounts/list">\n              <i class="icon-notebook"></i>\n              <span class="title"> {{ \'APPLICATION_ACCOUNTS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.fax.queues\')}">\n            <a href="/channels/fax/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{ \'APPLICATION_QUEUES\' | translate }} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.fax.inbox\')}">\n            <a href="/channels/fax/inbox/incoming">\n              <i class="icon-note"></i>\n              <span class="title"> {{ \'APPLICATION_INBOX\' | translate }} </span>\n            </a>\n          </li>\n          <!-- START REALTIME CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.fax.realtime\')}">\n            <a href="/channels/fax/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END REALTIME CASE -->\n        </ul>\n      </li>\n      <!-- END FAX CASE -->\n    </ul>\n  </li>\n  <!-- END CHANNEL LIST CASE -->\n\n  <!-- START CALLYSQUARE CASE -->\n  <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.square\')}">\n    <a href="javascript:;">\n      <i class="fa fa-superscript"></i>\n      <span class="title" >{{\'APPLICATION_CALLYSQUARE\' | translate}}</span>\n      <span class="arrow"></span>\n    </a>\n    <ul class="sub-menu">\n      <li data-ng-class="{active: $state.includes(\'main.square.projects\')}">\n        <a href="/square/projects/list">\n          <i class="fa fa-slack"></i>\n          <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}}  </span>\n        </a>\n      </li>\n      <li data-ng-class="{active: $state.includes(\'main.square.odbc\')}">\n        <a href="/square/odbc/list">\n          <i class="fa fa-database"></i>\n          <span class="title" >{{\'APPLICATION_ODBC\' | translate}}  </span>\n        </a>\n      </li>\n    </ul>\n  </li>\n  <!-- END CALLYSQUARE CASE -->\n\n  <!-- START ANALYTIC LIST CASE -->\n  <li data-ng-class="{active: $state.includes(\'main.analytics.reports\')\n  || $state.includes(\'main.analytics.extracted\')\n  || $state.includes(\'main.analytics.metrics\')}" data-ng-show="Auth.isAdmin()">\n  <a href="javascript:;">\n    <i class="icon-calculator"></i>\n    <span class="title" >{{\'APPLICATION_ANALYTICS\' | translate}}</span>\n    <span class="arrow" data-ng-class="{ open: $state.includes(\'main.analytics.reports\')\n    || $state.includes(\'main.analytics.extracted\')\n    || $state.includes(\'main.analytics.metrics\') }"></span>\n  </a>\n  <ul class="sub-menu">\n    <!-- START REPORT CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.analytics.reports\')}">\n      <a href="/analytics/reports/list">\n        <i class="icon-book-open"></i>\n        <span class="title" >{{\'APPLICATION_REPORTS\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.analytics.reports\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END REPORT CASE -->\n    <!-- START EXTRA REPORT CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.analytics.extracted\')}">\n      <a href="/analytics/extracted/list">\n        <i class="fa fa-file-pdf-o"></i>\n        <span class="title" >{{\'APPLICATION_EXTRACTED_REPORTS\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.analytics.extracted\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END EXTRA REPORT CASE -->\n    <!-- START METRICS CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.analytics.metrics\')}">\n      <a href="/analytics/metrics/list">\n        <i class="icon-calculator"></i>\n        <span class="title" >{{\'APPLICATION_METRICS\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.metrics.reports\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END METRICS CASE -->\n  </ul>\n</li>\n<!-- END ANALYTIC LIST CASE -->\n\n<!-- START TOOLS LIST CASE -->\n<li data-ng-class="{active: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}" data-ng-show="Auth.isAdmin()">\n  <a href="javascript:;">\n    <i class="icon-wrench"></i>\n    <span class="title" >{{\'APPLICATION_TOOLS\' | translate}}</span>\n    <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}"></span>\n  </a>\n  <ul class="sub-menu">\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.triggers\')}">\n      <a href="/tools/triggers/list">\n        <i class="icon-bulb"></i>\n        <span class="title"> {{\'APPLICATION_TRIGGERS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.automations\')}">\n      <a href="/tools/automations/list">\n        <i class="icon-settings"></i>\n        <span class="title"> {{\'APPLICATION_AUTOMATIONS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.trunks\')}">\n      <a href="/tools/trunks/list">\n        <i class="icon-link"></i>\n        <span class="title"> {{\'APPLICATION_TRUNKS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.intervals\')}">\n      <a href="/tools/intervals/list">\n        <i class="icon-clock"></i>\n        <span class="title"> {{\'APPLICATION_INTERVALS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.variables\')}">\n      <a href="/tools/variables/list">\n        <i class="fa fa-eye"></i>\n        <span class="title" >{{\'APPLICATION_VARIABLES\' | translate}}  </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.tags\')}">\n      <a href="/tools/tags/list">\n        <i class="icon-tag"></i>\n        <span class="title" >{{\'APPLICATION_TAGS\' | translate}}  </span>\n      </a>\n    </li>\n    <!-- START TEMPLATE CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.templates\')}">\n      <a href="/tools/templates/list">\n        <i class="icon-docs"></i>\n        <span class="title"> {{\'APPLICATION_TEMPLATES\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END TEMPLATE CASE -->\n\n    <!-- START PAUSE CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.pauses\')}">\n      <a href="/tools/pauses/list">\n        <i class="icon-control-pause"></i>\n        <span class="title"> {{\'APPLICATION_PAUSES\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END PAUSE CASE -->\n    <!-- START ANSWER CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.answers\')}">\n      <a href="/tools/answers/list">\n        <i class="icon-magic-wand"></i>\n        <span class="title"> {{\'APPLICATION_CANNED_ANSWERS\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END ANSWER CASE -->\n    <!-- START DASHBOARD MANAGER CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.yourdashboards\') && !$state.is(\'main.tools.yourdashboards.show\')}">\n      <a href="/tools/yourdashboards/list">\n        <i class="icon-grid"></i>\n        <span class="title"> {{\'APPLICATION_DASHBOARDS_MANAGER\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END DASHBOARD MANAGER CASE -->\n    <!-- START SOUND CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.sounds\')}">\n      <a href="/tools/sounds/list">\n        <i class="icon-music-tone-alt"></i>\n        <span class="title" >{{\'APPLICATION_SOUNDS\' | translate}}</span>\n        <!-- <span data-ng-show="$state.includes(\'main.sounds\')" class="selected"></span> -->\n      </a>\n    </li>\n    <!-- END SOUND CASE -->\n  </ul>\n</li>\n<!-- END TOOLS LIST CASE -->\n\n<!-- START JSCRIPTY LIST -->\n<li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.jscripty\')}">\n  <a href="javascript:;">\n    <i class="icon-note"></i>\n    <span class="title" >{{\'APPLICATION_JSCRIPTY\' | translate}} <span class="badge">Beta</span></span>\n    <span class="arrow"></span>\n  </a>\n  <ul class="sub-menu">\n    <!-- START PROJECTS CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.jscripty.projects\')}">\n      <a href="/jscripty/projects/list">\n        <i class="fa fa-slack"></i>\n        <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END PROJECTS CASE -->\n  </ul>\n</li>\n<!-- END JSCRIPTY LIST -->\n\n<!-- START SETTINGS LIST -->\n<li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting\')}">\n  <a href="javascript:;">\n    <i class="icon-settings"></i>\n    <span class="title" >{{\'APPLICATION_SETTINGS\' | translate}}</span>\n    <span class="arrow"></span>\n  </a>\n  <ul class="sub-menu">\n    <!-- START UPDATES CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting.updates\')}">\n      <a href="/setting/updates/list">\n        <i class="icon-cloud-download"></i>\n        <span class="title" >{{\'APPLICATION_UPDATES\' | translate}}</span>\n        <!-- <span data-ng-show="$state.includes(\'main.updates\')" class="selected"></span> -->\n      </a>\n    </li>\n    <!-- END UPDATES CASE -->\n\n    <!-- START SMTP CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting.smtp\')}">\n      <a href="/setting/smtp/view">\n        <i class="icon-envelope"></i>\n        <span class="title">SMTP</span>\n        <!-- <span data-ng-show="$state.includes(\'main.smtp\')" class="selected"></span> -->\n      </a>\n    </li>\n    <!-- END SMTP CASE -->\n\n    <!-- START LICENSE CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting.license\')}">\n      <a href="/setting/license/view">\n        <i class="icon-info"></i>\n        <span class="title"> {{\'APPLICATION_LICENSE\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END LICENSE CASE -->\n  </ul>\n</li>\n<!-- END SETTINGS LIST -->\n\n<!-- START INTEGRATION CASE -->\n<li data-ng-repeat="integration in integrations" data-ng-if="integration.active" data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.{{integration.state}}\')}">\n  <a href="/{{integration.state}}/list">\n    <i class="icon-handbag"></i>\n    <span class="title" >{{integration.name}}</span>\n    <span data-ng-show="$state.includes(\'main.{{integration.state}}\')" class="selected"></span>\n  </a>\n</li>\n\n<li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.is(\'main.market\')}">\n  <a href="/market">\n    <i class="icon-handbag"></i>\n    <span class="title" translate>Market Place</span>\n    <span data-ng-show="$state.includes(\'main.market\')" class="selected"></span>\n  </a>\n</li>\n<!-- END INTEGRATIONS CASE -->\n\n</ul>\n<!-- END SIDEBAR MENU -->\n</div>\n')}]);
\ No newline at end of file
+a.put("app/jscripty/project/report/report.sessions.html",'<!-- <div ui-view class="profile-content"> -->\n\n   <div class="row" data-ng-init="getProjectSessions()">\n         <div class="col-md-12">\n                       <!-- <div class="tab-pane active" id="tab_1_1" > -->\n                          <div class="portlet box blue">\n                                                        <div class="portlet-title">\n                                                           <div class="caption">\n                                                                 <i class="icon-settings"></i>Project Sessions\n                                                         </div>\n                                                                <div class="tools">\n                                                                   <a href="" class="fullscreen" data-original-title="" title="">\n                                                                        </a>\n                                                          </div>\n                                                        </div>\n                                                        <div class="portlet-body" style="height: auto;">\n                                                              <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n\n                                                          </div>\n                                                        </div>\n                                </div>\n                        <!-- </div> -->\n                       </div>\n        </div>\n<!-- </div> -->\n'),a.put("app/jscripty/project/report/report.summary.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="tab-pane" id="tab_1_2" data-ng-init="getQuestionSummary()" >\n                      <div class="portlet box blue">\n                                                                        <div class="portlet-title">\n                                                                           <div class="caption">\n                                                                                 <i class="fa fa-bar-chart"></i>Questions Summary\n\n                                                                            </div>\n                                                                                <div class="tools">\n                                                                                   <a href="" class="fullscreen" data-original-title="" title="">\n                                                                                        </a>\n                                                                          </div>\n                                                                        </div>\n                                                                        <div class="portlet-body" style="height: auto;">\n                                                                              <div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                                                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n\n                                                                          </div>\n\n                                                                      </div>\n\n                              </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/jscripty/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-edit"></i>\n                                            <a href="/jscripty/projects/list">{{ \'APPLICATION_JSCRIPTY\' | translate }}</a>\n                                              <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-slack"></i>\n                                           <a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n                                       </li>\n          <li>\n                                         <a ng-href="/jscripty/projects/view/{{jscriptyProject.id}}">{{jscriptyProject.name}}</a>\n          </li>\n                             </ul>\n                 </div>\n                </div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n              <div id="geEditor" class="geEditor"></div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n<script>\n\n\n</script>\n'),a.put("app/login/login.html",'<!-- BEGIN LOGO -->\n<div class="logo">\n     <a href="index.html">\n <img src="assets/images/logo-big.png" alt=""/>\n        </a>\n</div>\n<!-- END LOGO -->\n<!-- BEGIN LOGIN -->\n<div class="content">\n  <!-- BEGIN LOGIN FORM -->\n     <form class="login-form" name="loginForm" data-ng-show="!flagLogin1" data-ng-submit="login(loginForm)" novalidate>\n            <h3 class="form-title">Sign In</h3>\n           <div class="alert alert-danger" data-ng-class="{\'display-hide\': !loginSubmitted || !errorLogin}">\n                   <button class="close" data-close="alert"></button>\n                    <span>{{ errorLog ? errorLog : \'Enter any username and password.\'}}</span>\n          </div>\n                <div class="form-group" data-ng-class="{\'has-error\': loginSubmitted && loginForm.name.$invalid}">\n                   <label class="control-label">Username</label>\n      <div class="input-icon">\n        <i class="fa fa-user"></i>\n        <input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="Username" name="name" ng-model="userLogin.name" required/>\n      </div>\n      <span data-ng-show="loginSubmitted && loginForm.name.$invalid" class="help-block">Username is required.</span>\n           </div>\n                <div class="form-group" data-ng-class="{\'has-error\': loginSubmitted && loginForm.password.$invalid}">\n                       <label class="control-label">Password</label>\n      <div class="input-icon">\n        <i class="fa fa-lock"></i>\n        <input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="Password" name="password" ng-model="userLogin.password" required/>\n      </div>\n      <span data-ng-show="loginSubmitted && loginForm.password.$invalid" class="help-block">Password is required.</span>\n           </div>\n                <div class="form-actions">\n                    <button type="submit" class="btn btn-success uppercase">Login</button>\n      <label class="rememberme check">\n        <input type="checkbox"> Remember me\n      </label>\n                   <!-- <label class="rememberme check">\n                 <input type="checkbox" name="remember" value="1"/>Remember </label> -->\n                       <!-- <a href="javascript:;" id="forget-password" class="forget-password">Forgot Password?</a> -->\n             </div>\n                <div class="login-options">\n                   <h4>Follow Us on</h4>\n                 <ul class="social-icons">\n                             <li>\n                                  <a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xenialab"></a>\n                            </li>\n                         <li>\n                                  <a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xenialab"></a>\n                           </li>\n                         <li>\n                                  <a class="social-icon-color googleplus" data-original-title="Goole Plus" href="#"></a>\n                                </li>\n                         <li>\n                                  <a class="social-icon-color linkedin" data-original-title="Linkedin" href="#"></a>\n                            </li>\n                 </ul>\n         </div>\n        </form>\n</div>\n<div class="copyright">\n       xCALLY Motion | {{year}} - {{year + 1}} &copy; Powered by Xenialab\n</div>\n<!-- END LOGIN -->\n'),a.put("app/main/chooseContact.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_CHOOSE_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <table st-table="rowCollection" class="table table-striped">\n     <tbody>\n       <tr ng-repeat="contact in contacts">\n                  <td>{{contact.fullname}}</td>\n                 <td>{{contact.Service.name}}</td>\n             <td>\n        <button class="btn default btn-xs green-stripe" data-ng-click="open(contact)">\n          {{ \'APPLICATION_OPEN\' | translate}}\n        </button>\n      </td>\n         </tr>\n    <tr data-ng-hide="contacts.length">\n      <td colspan="3" style="text-align:center;">\n        <i>{{ \'MESSAGE_NO_CONTACTS_AVAILABLE\' | translate }}</i>\n      </td>\n    </tr>\n         </tbody>\n  </table>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="open()"><i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/closeEditedTab.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_CLOSE_EDITED_TAB\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/main.html",'<!-- BEGIN HEADER -->\n<div data-ng-include="\'components/header/header.html\'" data-ng-controller="HeaderController" class="page-header navbar navbar-fixed-top">\n</div>\n<!-- END HEADER -->\n\n<div class="clearfix">\n</div>\n<!-- BEGIN CONTAINER -->\n<div class="page-container" data-ng-init="initMain()">\n\n  <!-- BEGIN SIDEBAR -->\n  <div data-ng-include="\'components/sidebar/sidebar.html\'" data-ng-controller="SidebarController" class="page-sidebar-wrapper">\n  </div>\n  <!-- END SIDEBAR -->\n\n  <!-- BEGIN CONTENT -->\n  <div class="page-content-wrapper">\n    <div class="page-content" data-ng-class="{\'demo\': !license.expiration}">\n\n      <!-- BEGIN PAGE CONTENT -->\n      <uib-tabset>\n        <uib-tab select="addWorkspace()" active="mainTab.active">\n          <uib-tab-heading>\n            Motion <i class="icon-rocket"></i>\n          </uib-tab-heading>\n          <div ui-view class=""></div>\n        </uib-tab>\n        <uib-tab data-ng-repeat="workspace in workspaces" active="workspace.active" data-ng-switch="workspace.type">\n          <uib-tab-heading>\n            {{workspace.name}} <i class="icon-close pointer-cursor" data-ng-click="closeTab($index)"></i>\n          </uib-tab-heading>\n          <div class="" data-ng-switch="workspace.type">\n            <new-contact data-ng-switch-when="newContact" workspace="workspace" index="$index" on-submit="createContact(index,item)"></new-contact>\n            <contact data-ng-switch-when="contact" workspace="workspace" index="$index" on-submit="updateContact(index,item)"></contact>\n            <jscripty data-ng-switch-when="jscripty" workspace="workspace" index="$index" on-submit="closeTab(index)"></jscripty>\n          </div>\n        </uib-tab>\n      </uib-tabset>\n      <!-- END PAGE CONTENT  -->\n\n    </div>\n  </div>\n  <!-- END CONTENT -->\n\n  <!-- BEGIN QUICK SIDEBAR -->\n  <a href="javascript:;" class="page-quick-sidebar-toggler"><i class="icon-close"></i></a>\n  <div data-ng-include="\'components/quickSidebar/quickSidebar.html\'" data-ng-controller="QuickSidebarController" class="page-quick-sidebar-wrapper">\n  </div>\n  <!-- END QUICK SIDEBAR -->\n\n</div>\n<!-- END CONTAINER -->\n\n<!-- BEGIN FOOTER -->\n<div data-ng-include="\'components/footer/footer.html\'" data-ng-controller="FooterController" class="page-footer">\n</div>\n<!-- END FOOTER -->\n\n<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->\n<!-- BEGIN CORE PLUGINS -->\n<!--[if lt IE 9]>\n<script src="../../assets/global/plugins/respond.min.js"></script>\n<script src="../../assets/global/plugins/excanvas.min.js"></script>\n<![endif]-->\n\n<!-- END JAVASCRIPTS -->\n'),a.put("app/main/template/actionBuilder/template.actionBuilderIntegration.html",'<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" data-ng-change="changeIntegration()" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="integration.state as integration in integrations | filter: $select.search">\n      <div ng-bind-html="integration.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-2" data-ng-if="element.data1 && accounts && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" data-ng-change="changeAccount();" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-2" data-ng-if="element.data2 && configurations && randomName" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data3" name="data3{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="config.id as config in configurations | filter: $select.search">\n      <div ng-bind-html="config.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderStatus.html",'<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="status.value as status in states | filter: $select.search">\n      <div ng-bind-html="status.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderTemplate.html",'<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName" class="form-group col-md-2" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-2">\n  <input type="text" ng-model="element.data3" class="form-control"/>\n</div>\n'),a.put("app/main/template/template.conditionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-3" data-ng-class="{\'has-error\': (form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.field" name="field{{randomName}}" theme="bootstrap" data-ng-change="checkCondition(element.field)" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="condition.value as condition in service.services[serviceindex].conditions | filter: $select.search">\n      <div ng-bind-html="condition.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.field" class="form-group col-md-3" data-ng-class="{\'has-error\': (form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.operator" name="operator{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="operator.value as operator in _.find(service.services[serviceindex].conditions,{value:element.field}).operators | filter: $select.search">\n      <div ng-bind-html="operator.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-3" data-ng-if="elementType === \'input\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <input type="text" ng-model="element.value" class="form-control" name="value{{randomName}}" required/>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n</div>\n<div class="form-group col-md-3" data-ng-if="elementType === \'select\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.value" name="value{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="value.value as value in values| filter: $select.search">\n      <div ng-bind-html="value.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/template.contactTab.html",'<div class="row margin-top-20 contact-tab-container">\n  <div class="col-md-12 contact-tab">\n    <form name="forms.general" data-ng-submit="submit({index:index,item:contact})" novalidate>\n    <!-- BEGIN PROFILE CONTENT -->\n    <div class="profile-content">\n      <ul class="nav nav-tabs">\n  <li class="active">\n    <a href="#tab_1_1{{contact.id || \'\'}}" data-toggle="tab">{{\'APPLICATION_DETAIL\' | translate}}</a>\n  </li>\n  <li data-ng-if="contact.id">\n    <a href="#tab_1_2{{contact.id || \'\'}}" data-toggle="tab">{{\'APPLICATION_LOG\' | translate}}</a>\n  </li>\n</ul>\n<div class="tab-content">\n  <div class="tab-pane fade active in" id="tab_1_1{{contact.id || \'\'}}">\n    <!--end add-portfolio-->\n    <div class="row portfolio-block" data-ng-if="workspace.data">\n      <div class="col-md-6">\n        <div class="portfolio-text">\n          <img src="assets/images/media/CmCall.png" alt=""/>\n          <div class="portfolio-text-info">\n            <h4>{{\'MESSAGE_INBOUND_CALL_FROM\' | translate}} - {{data.calleridnum}}</h4>\n            <p>\n              {{\'MESSAGE_CALL_UNIQUEID\' | translate}} : {{data.uniqueid}}\n            </p>\n          </div>\n        </div>\n      </div>\n      <div class="col-md-2 portfolio-stat">\n        <div class="portfolio-info">\n          {{\'APPLICATION_QUEUE\' | translate}} <span>\n            {{workspace.data.queue}} </span>\n          </div>\n        </div>\n        <div class="col-md-2 portfolio-stat">\n          <div class="portfolio-info">\n            {{\'APPLICATION_AGENT\' | translate}} <span>\n              {{workspace.data.membername}} </span>\n            </div>\n          </div>\n          <div class="col-md-2 portfolio-stat">\n            <div class="portfolio-info">\n              {{\'APPLICATION_DATE\' | translate}} <span>\n                {{workspace.data.agentcalledAt}} </span>\n              </div>\n            </div>\n          </div>\n            <!--end row-->\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light ">\n            <div class="portlet-title">\n              <div class="caption caption-md">\n                <i class="icon-bar-chart theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n              </div>\n              <div class="actions">\n                <div class="btn-group btn-group-devided" data-toggle="buttons">\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="detail.tab=\'main\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_MAIN\' | translate}}</label>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="detail.tab=\'other\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_OTHER\' | translate}}</label>\n                </div>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <div data-ng-class="{\'hidden\':detail.tab != \'main\'}" class="portlet-body contact-portlet row">\n                <div class="col-md-4">\n              <!-- START FIRSTNAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$invalid}">\n                <label class="control-label">{{\'APPLICATION_FIRSTNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="firstName" placeholder="{{\'APPLICATION_FIRSTNAME\' | translate}}" class="form-control" data-ng-model="contact.firstName" required/>\n                <span data-ng-show="(forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END FIRSTNAME -->\n\n              <!-- START LASTNAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$invalid}">\n                <label class="control-label">{{\'APPLICATION_LASTNAME\' | translate}}</label>\n                <input type="text" name="lastName" placeholder="{{\'APPLICATION_LASTNAME\' | translate}}" class="form-control" data-ng-model="contact.lastName"/>\n                <span data-ng-show="(forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END LASTNAME -->\n\n              <!-- START COMPANY -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n                <ui-select data-ng-model="contact.CompanyId" theme="bootstrap" name="CompanyId" ng-disabled="!companies.length">\n                  <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                  <ui-select-choices repeat="company.id as company in companies | filter: $select.search">\n                    <div ng-bind-html="company.name | highlight: $select.search"></div>\n                  </ui-select-choices>\n                </ui-select>\n                <div class="note note-warning" data-ng-hide="companies.length">\n                  <h4 class="block">Warning!</h4>\n                  <p>\n                    {{ \'MESSAGE_NO_COMPANIES_AVAILABLE\' | translate }}\n                  </p>\n                  <p>\n                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/contactmanager/companies/list">{{\'APPLICATION_COMPANIES\' | translate}}</a>\n                  </p>\n                </div>\n                <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COMPANY -->\n            </div>\n            <div class="col-md-4">\n              <!-- START PHONE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$invalid}">\n                <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n                <input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="contact.phone"/>\n                <span data-ng-show="(forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END PHONE -->\n              <!-- START MOBILE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$invalid}">\n                <label class="control-label">{{\'APPLICATION_MOBILE\' | translate}}</label>\n                <input type="text" name="mobile" placeholder="{{\'APPLICATION_MOBILE\' | translate}}" class="form-control" data-ng-model="contact.mobile"/>\n                <span data-ng-show="(forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END MOBILE -->\n              <!-- START EMAIL -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$invalid}">\n                <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n                <input type="text" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="contact.email"/>\n                <span data-ng-show="(forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END EMAIL -->\n            </div>\n            <div class="col-md-4">\n              <!-- START FAX -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$invalid}">\n                <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n                <input type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="contact.fax"/>\n                <span data-ng-show="(forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END FAX -->\n              <!-- START TAGS -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.tags.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n                <ui-select tagging tagging-label="" multiple=\'true\' data-ng-model="contact.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                  <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n                  <ui-select-choices repeat="tag in tags | filter: $select.search">\n                    {{tag}}\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="forms.general.tags.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END TAGS -->\n              <!-- START SERVICE -->\n              <div class="form-group" data-ng-if="contact.id">\n                <label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label>\n                <input type="text" name="service" placeholder="{{\'APPLICATION_SERVICE\' | translate}}" class="form-control" data-ng data-ng-model="contact.Service.name" disabled/>\n              </div>\n              <!-- END SERVICE -->\n              <!-- START SERVICE -->\n              <div data-ng-if="!contact.id" class="form-group" data-ng-class="{\'has-error\': forms.general.ServiceId.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label>\n                <ui-select data-ng-model="contact.ServiceId" theme="bootstrap" name="ServiceId" data-ng-change="getCustomFields()">\n                  <ui-select-match placeholder="{{ \'APPLICATION_SERVICE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                  <ui-select-choices repeat="service.id as service in services | filter: $select.search">\n                    <div ng-bind-html="service.name | highlight: $select.search"></div>\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="forms.general.ServiceId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END SERVICE -->\n            </div>\n            </div>\n            <div data-ng-class="{\'hidden\':detail.tab != \'other\'}" class="portlet-body contact-portlet row">\n              <div class="col-md-4">\n              <!-- START STREET -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n                <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                <input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="contact.street"/>\n                <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END STREET -->\n\n              <!-- START POSTALCODE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n                <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                <input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="contact.postalCode"/>\n                <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END POSTALCODE -->\n\n              <!-- START CITY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n                <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                <input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="contact.city"/>\n                <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END CITY -->\n            </div>\n            <div class="col-md-4">\n              <!-- START COUNTRY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n                <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                <input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="contact.country"/>\n                <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COUNTRY -->\n\n              <!-- START DATEOFBIRTH -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$invalid}">\n                <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n                <input name="dateOfBirth" type="date" placeholder="{{\'APPLICATION_DATEOFBIRTH\' | translate}}" class="form-control date-picker" data-ng-model="contact.dateOfBirth"/>\n                <span data-ng-show="(forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END DATEOFBIRTH -->\n\n              <!-- START DESCRIPTION -->\n              <div class="form-group">\n                <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                <textarea style="resize: vertical;" type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="contact.description"></textarea>\n              </div>\n              <!-- END DESCRIPTION -->\n            </div>\n            <div class="col-md-4">\n              <!-- START CREATED_BY -->\n              <div class="form-group" data-ng-if="contact.id">\n                <label class="control-label">{{\'APPLICATION_CREATED_BY\' | translate}}</label>\n                <input type="text" name="createdBy" placeholder="{{\'APPLICATION_CREATED_BY\' | translate}}" class="form-control" data-ng-model="contact.User.name" disabled/>\n              </div>\n              <!-- END CREATED_BY -->\n            </div>\n            </div>\n            </div>\n            <button type="submit" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!contact.firstName">{{submitButtonLabel}}</button>\n          </div>\n          <!-- END PORTLET -->\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light" data-ng-if="customFields.length">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <div data-ng-repeat="customField in customFields">\n                <div data-ng-if="customField.type==\'text\'" class="form-group" data-ng-class="{\'has-error\': (forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$invalid}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <input type="text" name="{{customField.name}}" placeholder="{{customField.alias}}" class="form-control" data-ng-model="contact[customField.name]"/>\n                  <span data-ng-show="(forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <div data-ng-if="customField.type==\'select\'" class="form-group" data-ng-class="{\'has-error\': forms.general[customField.name].$invalid && forms.general.$submitted}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <ui-select data-ng-model="contact[customField.name]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n                    <ui-select-match allow-clear placeholder="{{customField.alias}}">{{$select.selected.value}}</ui-select-match>\n                    <ui-select-choices repeat="choice.value as choice in customField.values | filter: $select.search">\n                      <div ng-bind-html="choice.value | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="forms.general[customField.name].$invalid && forms.general.$submitted" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n              </div>\n              <button type="submit" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!contact.firstName">{{submitButtonLabel}}</button>\n            </div>\n        </div>\n        <!-- END PORTLET -->\n      </div>\n      <div class="tab-pane fade" id="tab_1_2{{contact.id || \'\'}}">\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_LOG\' | translate}}</span>\n              </div>\n              <ul class="nav nav-tabs">\n                <li class="active">\n                  <a href="#" data-target="#tab_2_1" data-toggle="tab">{{ \'APPLICATION_JOURNAL\' | translate}}</a>\n                </li>\n                <li>\n                  <a href="#" data-target="#tab_2_2" data-toggle="tab">{{ \'APPLICATION_HISTORY\' | translate}}</a>\n                </li>\n              </ul>\n            </div>\n            <div class="portlet-body">\n              <!--BEGIN TABS-->\n              <div class="tab-content">\n                <div class="tab-pane active" id="tab_2_1">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.journal.show === \'phone\'}" data-ng-click="updateLog(\'journal\',\'phone\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_PHONES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.journal.show === \'email\'}" data-ng-click="updateLog(\'journal\',\'email\',\'general\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_EMAILS\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.journal.type === \'inbound\'}" data-ng-click="updateLog(\'journal\',false,false,\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_INBOUND\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.journal.type === \'outbound\'}" data-ng-click="updateLog(\'journal\',false,\'general\',\'outbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_OUTBOUND\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.journal.show==\'phone\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.journal.detail === \'general\'}" data-ng-click="updateLog(\'journal\',false,\'general\',false)">\n                        <input type="radio" class="toggle">{{\'APPLICATION_GENERAL\' | translate}}</label>\n                        <label data-ng-if="log.journal.type===\'inbound\'" class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.journal.detail === \'queue\'}" data-ng-click="updateLog(\'journal\',false,\'queue\',\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_QUEUES\' | translate}}</label>\n                      </div>\n                    </div>\n                    <div data-ng-if="gridOptionsjournal"  ui-grid="gridOptionsjournal"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                      <div class="watermark" ng-show="!gridOptionsjournal.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                    </div>\n                  </div>\n              </div>\n                <div class="tab-pane" id="tab_2_2">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.history.show === \'phone\'}" data-ng-click="updateLog(\'history\',\'phone\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_PHONES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.history.show === \'email\'}" data-ng-click="updateLog(\'history\',\'email\',\'general\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_EMAILS\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.history.type === \'inbound\'}" data-ng-click="updateLog(\'history\',false,false,\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_INBOUND\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.history.type === \'outbound\'}" data-ng-click="updateLog(\'history\',false,\'general\',\'outbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_OUTBOUND\' | translate}}</label>\n                      </div> |\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.history.show==\'phone\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.history.detail === \'general\'}" data-ng-click="updateLog(\'history\',false,\'general\',false)">\n                        <input type="radio" class="toggle">{{\'APPLICATION_GENERAL\' | translate}}</label>\n                        <label data-ng-if="log.history.type===\'inbound\'" class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.history.detail === \'queue\'}" data-ng-click="updateLog(\'history\',false,\'queue\',\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_QUEUES\' | translate}}</label>\n                      </div>\n                    </div>\n                    <div data-ng-if="gridOptionshistory"  ui-grid="gridOptionshistory"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                      <div class="watermark" ng-show="!gridOptionshistory.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n              <!--END TABS-->\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </div>\n    <!-- END PROFILE CONTENT -->\n  </form>\n</div>\n  </div>\n</div>\n'),
+a.put("app/main/template/template.jscriptyTab.html",'<div class="portlet light bordered">\n\n    <!-- BEGIN PORTLET BODY -->\n    <div class="portlet-body">\n          <div class="row">\n              <!-- BEGIN SIDEBAR -->\n                <div  class="profile-sidebar" style="width: 250px;">\n                  <!-- PORTLET MAIN -->\n                                       <!-- SIDEBAR MENU -->\n                                         <div class="profile-usermenu">\n                                                <ul class="nav">\n                                                              <li  ng-repeat= \'question in questions track by $index\' ng-class="{active: $index == count}">\n\n                                                                     <a  ng-click="setCurrentQuestion($index)" >\n                                                                                                                                   <i class="fa fa-check"></i> <label ng-if="attribute.nodeName == \'label\'" ng-repeat=\'attribute in question.value.attributes track by $index\'>{{attribute.value}}</label>\n\n                            </a>\n                                                       </li>\n                                                 </ul>\n                                         </div>\n                                        <!-- END SIDEBAR MENU -->\n                    <!-- END PORTLET MAIN -->\n                </div>\n                  <!-- END SIDEBAR -->\n                  <div   class="profile-content">\n                        <div class="portlet box blue-hoki">\n                                                                                                      <div class="portlet-title">\n\n                                                                                                         <div class="caption" >\n                                                                                                                        <i class="fa fa-edit"></i>\n                                 <span ng-if="attribute.nodeName ==\'label\'" ng-repeat=\'attribute in currentQuestion.value.attributes\' class="caption-subject">{{attribute.value}} </span>\n\n                                                                                                           </div>\n\n\n                                                                                                    </div>\n                                <div class="portlet-body form ">\n                                  <div class="row">\n                                                                                                                                         <div class="col-md-11 col-md-offset-1 ">\n                                        <form >\n                                          <div class="form-body" style="height: 400px; overflow-y: auto;overflow-x:hidden">\n\n                                             <!-- Question  -->\n                                             <div class="form-group" style="word-wrap: break-word;" >\n                                                <h3 ng-if="attribute.nodeName ==\'question\'" ng-repeat=\'attribute in currentQuestion.value.attributes\'>{{attribute.value}}</h3>\n                                              </div>\n                                              <!-- Buttons  -->\n\n                                                <div class="row">\n                                                  <div class="col-md-6">\n                                                    <ul class="nav nav-pills nav-stacked" >\n                                                      <li  ng-repeat=\'edge in currentQuestion.edges track by $index\'  style="background-color: #E8F7FC" ng-show="(edge.source.id == currentQuestion.id) && edge.value" ng-class="{active: (edge.value) == currentQuestion.answer}">\n                                                        <a  ng-click="next(edge.target, edge.value)" >\n                                                                <span style=" display:block;word-break:break-all;">{{edge.value}}</span>\n                                                            </a>\n                                                      </li>\n                                                    </ul>\n                                                  </div>\n                                                </div>\n\n\n                                               <!-- Question Other Option  -->\n\n                                               <div class="form-group" ng-if= "attribute.nodeName ==\'other\' && attribute.value " ng-repeat=\'attribute in currentQuestion.value.attributes track by $index\'>\n                                                 <div class="col-md-4">\n                                                   <label class="control-label">{{attribute.value}}</label>\n                                                 </div>\n                                                    <div class="col-md-8">\n                                                      <textarea  style="overflow:auto" ng-model="currentQuestion.otheranswer" placeholder="Enter text" rows="8" cols="40" ></textarea>\n                                                    </div>\n\n                                                                                                                          </div>\n                                              <!--  Inputs -->\n\n                                                  <div class="row margin-top-10"  ng-repeat=\'question in currentQuestion.children track by $index\'>\n                                                              <div class="col-md-10 col-md-offset-1">\n                                                                <div  ng-repeat=\'attribute in question.value.attributes track by $index\'>\n                                                                      <div  ng-switch="attribute.nodeName">\n                                                                          <div ng-class="col-md-2" ng-switch-when="label">\n                                                                            <label class="control-label" style=" display:block;word-break:break-all;" >{{attribute.value}}</label>\n\n                                                                          </div>\n\n                                                                          <div ng-class="attribute.value != \'checkbox\' ? \'col-md-10 pull-right\': \'col-md-2\'" ng-switch-when="type" ng-switch="attribute.value">\n                                                                              <input class="form-control" ng-switch-when="text" type="text" ng-model="question.answer" />\n                                                                              <input  class="form-control" ng-switch-when="number" type="number" ng-model="question.answer" />\n                                                                              <input  class=" pull-right"  ng-switch-when="checkbox" type="checkbox" ng-model="question.answer" ng-true-value="\'Selected\'" ng-false-value="\'Not Selected\'"/>\n                                                                              <textarea  class="form-control" ng-switch-when="textarea" ng-model="question.answer" rows="8" cols="40"></textarea>\n\n                                                                          </div>\n\n                                                                      </div>\n                                                                </div>\n                                                              </div>\n\n                                                  </div>\n\n                                          </div>\n                                          <!-- actions -->\n                                          <div class="form-actions">\n                                            <div class="btn-set pull-left">\n                                              <button class="btn red-haze "   ng-click="end()"><span class="fa fa-times" > End</span></button>\n\n                                            </div>\n                                            <div class="btn-set pull-right">\n                                               <button class="btn blue-haze"  ng-show="count" ng-click="back()"><span class="glyphicon glyphicon-chevron-left"></span>Back</button>\n                                                <button ng-repeat=\'edge in currentQuestion.edges track by $index\' ng-show="(edge.source.id == currentQuestion.id) && !edge.value" class="btn blue-hoki"   ng-click="next(edge.target)">Next<span class="glyphicon glyphicon-chevron-right" ></span></button>\n\n                                            </div>\n                                          </div>\n                                          </form>\n                                  </div>\n                                </div>\n                            </div>\n                        </div>\n                 </div>\n          </div>\n  </div>\n  <!-- END PORTLET BODY -->\n</div>\n'),a.put("app/main/template/template.reportBuilderView.html",'<div class="alert alert-warning alert-group">\n        <div class="form-inline" data-ng-class="{\'has-error\': forms.report.$submitted && !group.rules.length}">\n            <select ng-options="o.name as o.name for o in operators" ng-model="group.operator" class="form-control input-sm"></select>\n            <button style="margin-left: 5px" type="button" ng-click="addCondition()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_CONDITION\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="addGroup()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_GROUP\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="removeGroup()" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-minus-sign"></span> {{\'APPLICATION_REMOVE_GROUP\' | translate}}</button>\n        </div>\n        <div class="group-conditions">\n            <div ng-repeat="rule in group.rules | orderBy:\'index\'" class="condition">\n                <div ng-switch="rule.hasOwnProperty(\'group\')">\n                    <div ng-switch-when="true">\n                        <report-builder group="rule.group" fields="fields" forms="forms"></report-builder>\n                    </div>\n                    <div ng-switch-default="ng-switch-default">\n                        <div class="row">\n                          <div class="col-md-2" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.field}">\n                          <ui-select data-ng-model="rule.field" theme="bootstrap" dynamic-name="randomName()" required>\n                            <ui-select-match placeholder="">{{$select.selected.field | translate}}</ui-select-match>\n                            <ui-select-choices repeat="field.field as field in fields | filter: $select.search">\n                              <div ng-bind-html="field.field | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                          <span data-ng-show="forms.report.$submitted && !rule.field" class="help-block help-block-error">\n                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                          </span>\n                        </div>\n                          <ui-select data-ng-model="rule.condition" theme="bootstrap" class="col-md-1" dynamic-name="randomName()">\n                            <ui-select-match placeholder="">{{$select.selected.name}}</ui-select-match>\n                            <ui-select-choices repeat="condition.name as condition in conditions | filter: $select.search">\n                              <div ng-bind-html="condition.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                          <div class="col-md-2 left-margin" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.value}">\n                            <input type="text" ng-model="rule.value" class="form-control" dynamic-name="randomName()" required/>\n                            <span data-ng-show="forms.report.$submitted && !rule.value" class="help-block help-block-error">\n                                                                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                                                         </span>\n                          </div>\n                            <button style="margin-left: 5px" ng-click="removeCondition($index)" class="btn btn-sm btn-danger" type="button"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n'),a.put("app/market/market.html",'<div class="row">\n        <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/market">Market Place</a>\n          </li>\n        </ul>\n                    </div>\n                </div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <!-- Our Integration -->\n    <div class="headline">\n      <h3>Our Integrations</h3>\n    </div>\n    <div class="row thumbnails" data-ng-repeat="group in groupedIntegration">\n      <div class="col-md-3" data-ng-repeat="integration in group">\n        <div class="our-integrations">\n          <h3> {{integration.name}} <small> {{integration.author}}</small></h3>\n          <img data-ng-src="{{integration.logo}}" alt="{{integration.name}}" class="img-responsive"/>\n          <div class="integration-info" data-ng-if="!integration.downloading">\n            <p>\n              {{integration.description}}\n            </p>\n            <div class="pull-right">\n                  <a data-ng-disabled="isProgressing" data-ng-if="!integration.active" data-ng-click="installIntegration(integration)" href="#" class="btn btn-xs green-meadow">Install <i class="fa fa-download"></i></a>\n                                                  <a data-ng-disabled="isProgressing" data-ng-if="integration.active" data-ng-click="uninstallIntegration(integration)" href="#" class="btn btn-xs red-sunglo">Uninstall <i class="fa fa-trash"></i></a>\n                    <a href="https://wiki.xcallymotion.com/" class="btn btn-xs grey-cascade" target="_blank">More <i class="fa fa-link"></i></a>\n            </div>\n          </div>\n                                        <div class="integration-info" data-ng-if="integration.downloading">\n                                           <div>\n                                                 <uib-progressbar class="progress-striped active" value="percentage" type="success"><i style="color:black;">{{status}}</i></uib-progressbar>\n                                           </div>\n          </div>\n        </div>\n      </div>\n                </div>\n    <!--/thumbnails-->\n    <!-- //End Meer Our Team -->\n  </div>\n</div>\n'),a.put("app/motionbar/motionbar.chat.html",'<div data-ng-include="\'components/quickSidebar/quickSidebar.html\'" data-ng-controller="QuickSidebarController" class="page-quick-sidebar-wrapper" style="margin-top: -92px;"></div>\n'),a.put("app/salesforce/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_SALESFORCE\' | translate }}</a> </span>\n                                </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="accounts.checked.length">\n                                                <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/salesforce/wizard">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                        <a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'password\',\'clientId\',\'clientSecret\',\'securityToken\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Password\', \'Client Id\', \'Client Secret\', \'Security token\']" field-separator=";" filename="salesforce_accounts.csv">\n                                      <i class="icon-cloud-download"></i></a>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <table st-table="displayedSalesforceAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n                                      <div class="table-responsive">\n                                          <thead>\n                                                     <tr>\n                                                          <th colspan="7">\n                                                                      <div class="row">\n                                                                             <div class="col-md-6">\n                                                                                        <ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n                                                                                              <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                                             <ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n                                                                                                 <div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n                                                                                             </ui-select-choices>\n                                                                                  </ui-select>\n                                                                          </div>\n                                                                                <div class="col-md-6">\n                                                                                        <div class="input-group input-medium pull-right">\n                                                                                             <input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n                                                                                         <span class="input-group-addon">\n                                                                                                      <i class="fa fa-search"></i>\n                                                                                          </span>\n                                                                                       </div>\n                                                                                </div>\n                                                                        </div>\n                                                                </th>\n                                                 </tr>\n                                           <tr>\n                                                                <th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n                                                  <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n                                                <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n                                                               <th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n                                                         <th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n                                                                <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                              </tr>\n                                         </thead>\n                                      <tbody>\n                                         <tr data-ng-repeat="account in displayedSalesforceAccounts" class="animate-repeat">\n                                                               <td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n                                         <td>{{account.name}}</td>\n                                             <td>{{account.username}}</td>\n                                                           <td>{{account.remoteUri}}</td>\n                                                                <td>{{account.description}}</td>\n                                            <td>\n                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/salesforce/view/{{account.id}}/account">\n                                                                             {{ \'APPLICATION_EDIT\' | translate }}\n                                                </a>\n                                                                  <a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n                                                                          {{ \'APPLICATION_CHECK_CONNECTION\' | translate }}\n                                            </a>\n                                          <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n                                                                         {{ \'APPLICATION_DELETE\' | translate }}\n                                              </a>\n                                        </td>\n                                       </tr>\n                                                     <tr data-ng-hide="displayedSalesforceAccounts.length">\n                                                                <td colspan="7" style="text-align:center;">\n                                                                   <i>No account available</i>\n                                                           </td>\n                                                 </tr>\n                                   </tbody>\n                                      <tfoot>\n                                                     <tr>\n                                                          <td/>\n                                             <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                        </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                      </div>\n                                                    </td>\n                                                 <td>\n                                                                      <div class="input-icon right">\n                                                                                <i class="fa fa-search"></i>\n                                                                          <input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n                                                                 </div>\n                                                    </td>\n                                                 <td/>\n                                                             <td/>\n                                           </tr>\n                                           <tr>\n                                            <td colspan="7" class="text-center">\n                                                                    <div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n                                            </td>\n                                       </tr>\n                                       </tfoot>\n                                    </div>\n                                </table>\n                              <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/view/view.account.html",'<div class="row">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                            <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START PASSWORD -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                                <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                           <input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="account.clientId" required/>\n                                                           <span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="account.clientSecret" required/>\n                                                               <span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="account.securityToken" required/>\n                                                            <span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SECURITY TOKEN -->\n\n                                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/salesforce/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n  <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n                              </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createConfiguration()">\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n                                                   <form name="formsConfiguration.info" novalidate>\n                                                              <!-- START NAME -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n                                                                  <span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END NAME -->\n                                                             <!-- START DESCRIPTION -->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n                                                              </div>\n                                                                <!-- END DESCRIPTION -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                       </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                          <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                      <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                            <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                                                    <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                                                               <!-- <pre>\n                                                                    {{descriptionItem|json}}\n                                                              </pre> -->\n                  <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                        <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n                     <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n                                                                        <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                      <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                             <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                    <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n                        <div ng-bind-html="item.label | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                            <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                    <div ng-bind-html="item.value | highlight: $select.search"></div>\n                           </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                                <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                                 <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                               </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                               </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
+a.put("app/salesforce/view/view.configurations.html",'<div ui-view class="profile-content">\n  <div class="row" data-ng-init="getConfigurations()">\n          <div class="col-md-12">\n                       <div class="portlet light">\n                           <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group">\n                                                       <a class="btn green-jungle " href="/salesforce/view/{{account.id}}/configuration" data-toggle="dropdown">\n                                                             <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <table class="table table-striped table-bordered table-hover">\n                                                  <thead>\n                                                       <tr>\n                                                            <th>{{\'APPLICATION_NAME\' | translate}}</th>\n                                                                     <th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n                                                                  <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                      </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="configuration in configurations">\n                                                                     <td>{{configuration.name}}</td>\n                                                                       <td>{{configuration.description}}</td>\n                                                      <td>\n                                                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/salesforce/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n                                                                                        {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                                  <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n                                                                                    {{ \'APPLICATION_DELETE\' | translate }}\n                                                      </a>\n                                                </td>\n                                               </tr>\n                                                             <tr data-ng-hide="configurations.length">\n                                                                     <td colspan="5" style="text-align:center;">\n                                                                           <i>No configuration available</i>\n                                                                     </td>\n                                                         </tr>\n                                           </tbody>\n                                    </table>\n                                      <!-- END TABLE -->\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/salesforce/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/salesforce.png" class="img-responsive">\n                         </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.salesforce.view.account\')}">\n                                                    <a ng-href="/salesforce/view/{{account.id}}/account">\n                                                 <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.salesforce.view.configurations\') || $state.is(\'main.salesforce.view.configuration\')}">\n                                                  <a ng-href="/salesforce/view/{{account.id}}/configurations">\n                                                  <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n  <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n                                   </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/salesforce/accounts/validate/username"/>\n                                                               <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required/>\n                                                                <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                           <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                           <input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="item.clientId" required/>\n                                                              <span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="item.clientSecret" required/>\n                                                          <span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="item.securityToken" required/>\n                                                               <span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SECURITY TOKEN -->\n\n                                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/license/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div\n class="row" data-ng-init="initView()">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n                               </li>\n        <li>\n          <i class="icon-info"></i>\n          <a href="#">{{ \'APPLICATION_LICENSE\' | translate }}</a>\n        </li>\n                  </ul>\n         </div>\n\n              <!-- BEGIN PROFILE CONTENT -->\n                <div class="profile-content">\n                 <div class="row">\n                             <div class="col-md-6">\n                                        <div class="pricing hover-effect">\n                                            <div class="pricing-head" data-ng-switch="license.months">\n                                                    <h3 ng-switch-when="1">{{\'APPLICATION_MONTH_TO_MONTH\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                      <h3 ng-switch-when="12">{{\'APPLICATION_YEARLY\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                     <h3 ng-switch-when="36">{{\'APPLICATION_PERPETUAL\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                  <h3 ng-switch-default>{{\'APPLICATION_UNKNOWN\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n                                                      <h4><i>{{license.expiration ? (license.expiration | date:\'medium\') : \'DEMO\'}}</i>\n                                                 <span data-ng-show="license.expiration">Expiration Date </span>\n                                                       </h4>\n                                         </div>\n                                                <ul class="pricing-content list-unstyled">\n                                                    <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-eye"></i> {{\'APPLICATION_USERS\' | translate}}:\n                                                               </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    {{(license.users || license.users >= 0) ? license.users : \'unknown\'}}\n                                                               </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-people"></i> {{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}}):\n                                                             </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    {{(license.agents || license.agents >= 0)  ? license.agents : \'unknown\'}}\n                                                           </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-phone"></i> {{\'APPLICATION_TELEPHONES\' | translate}}:\n                                                                </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    {{(license.telephones || license.telephones >= 0) ? license.telephones : \'unknown\'}}\n                                                                </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-bubble"></i> {{\'APPLICATION_CHAT\' | translate}}:\n                                                             </div>\n                                                                <div class="col-md-3 text-center">\n                                                                    <span class="label label-sm" data-ng-class="license.chat ? \'label-success\' : \'label-danger\'">{{license.chat ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                                                             </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-envelope"></i> {{\'APPLICATION_MAIL\' | translate}}:\n                                                           </div>\n                                                                <div class="col-md-3 text-center">\n                                                             <span class="label label-sm" data-ng-class="license.mail ? \'label-success\' : \'label-danger\'">{{license.mail ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                                                            </div>\n                                                        </li>\n                                                 <li class="row">\n                                                              <div class="col-md-9">\n                                                                        <i class="icon-paper-plane"></i> {{\'APPLICATION_FAX\' | translate}}:\n                                                         </div>\n                                                                <div class="col-md-3 text-center">\n                                                                     <span class="label label-sm" data-ng-class="license.fax ? \'label-success\' : \'label-danger\'">{{license.fax ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                                                              </div>\n                                                        </li>\n                                         </ul>\n                                         <div class="pricing-footer">\n                                                  <p>\n                                                            {{license.description}}\n                                                      </p>\n                                                  <a href="#" class="btn yellow-crusta">\n                                                        {{\'APPLICATION_PRICES\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n                                                  </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="col-md-6">\n                                        <div class="portlet light bordered">\n                                          <div class="portlet-title">\n                                                   <div class="caption font-green-sharp">\n                                                                <i class="icon-info font-green-sharp"></i>\n                                                            <span class="caption-subject">FORM {{ \'APPLICATION_LICENSE\' | translate }}</a> </span>\n                                                      </div>\n                                                </div>\n                                                <div class="portlet-body">\n                                                    <form name="form" novalidate data-ng-submit="submitRequest()">\n\n                                                              <!-- START USERS -->\n                                                          <div class="form-group" data-ng-class="{\'has-error\': (form.users.$touched || form.$submitted) && form.users.$invalid}">\n                                                                     <label class="control-label">{{\'APPLICATION_USERS\' | translate}}</label>\n                                                                    <div class="input-icon">\n                                                                              <i class="icon-eye"></i>\n                                                                              <input type="number" name="users" placeholder="{{\'APPLICATION_USERS\' | translate}}" class="form-control" data-ng-model="item.users" min="0" required>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END USERS -->\n\n                                                          <!-- START AGENTS -->\n                                                         <div class="form-group" data-ng-class="{\'has-error\': (form.agents.$touched || form.$submitted) && form.agents.$invalid}">\n                                                                   <label class="control-label">{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})</label>\n                                                                     <div class="input-icon">\n                                                                              <i class="icon-people"></i>\n                                                                           <input type="number" name="agents" placeholder="{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})" class="form-control" data-ng-model="item.agents" min="0" required>\n                                                                      </div>\n                                                                        <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END AGENTS -->\n\n                                                         <!-- START TELEPHONES -->\n                                                             <div class="form-group" data-ng-class="{\'has-error\': (form.telephones.$touched || form.$submitted) && form.telephones.$invalid}">\n                                                                   <label class="control-label">{{\'APPLICATION_TELEPHONES\' | translate}}</label>\n                                                                       <div class="input-icon">\n                                                                              <i class="icon-phone"></i>\n                                                                            <input type="number" name="telephones" placeholder="{{\'APPLICATION_TELEPHONES\' | translate}}" class="form-control" data-ng-model="item.telephones" min="0" required>\n                                                                        </div>\n                                                                        <span data-ng-show="(form.telephones.$touched || forms.$submitted) && form.telephones.$error.required" class="help-block help-block-error">\n                                                                           <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END TELEPHONES -->\n\n                                                             <!-- START CHAT -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': (form.chat.$touched || form.$submitted) && form.chat.$invalid}">\n                                                                       <label class="control-label">{{\'APPLICATION_CHAT\' | translate}}</label>\n                                                                     <div class="input-group input-icon">\n                                                                          <i class="icon-bubble"></i>\n                                                                           <input type="text" placeholder="{{\'APPLICATION_CHAT\' | translate}}" class="form-control" readonly>\n                                                                          <span class="input-group-addon">\n                                                                                      <input type="checkbox" name="chat" data-ng-model="item.chat" required>\n                                                                                </span>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.chat.$touched || forms.$submitted) && form.chat.$error.required" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END CHAT -->\n\n                                                           <!-- START MAIL -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': (form.mail.$touched || form.$submitted) && form.mail.$invalid}">\n                                                                       <label class="control-label">{{\'APPLICATION_MAIL\' | translate}}</label>\n                                                                     <div class="input-group input-icon">\n                                                                          <i class="icon-envelope"></i>\n                                                                         <input type="text" placeholder="{{\'APPLICATION_MAIL\' | translate}}" class="form-control" readonly>\n                                                                          <span class="input-group-addon">\n                                                                                      <input type="checkbox" name="mail" data-ng-model="item.mail" required>\n                                                                                </span>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.mail.$touched || forms.$submitted) && form.mail.$error.required" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END MAIL -->\n\n                                                           <!-- START FAX -->\n                                                            <div class="form-group" data-ng-class="{\'has-error\': (form.fax.$touched || form.$submitted) && form.fax.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n                                                                      <div class="input-group input-icon">\n                                                                          <i class="icon-paper-plane"></i>\n                                                                              <input type="text" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" readonly>\n                                                                           <span class="input-group-addon">\n                                                                                      <input type="checkbox" name="fax" data-ng-model="item.fax" required>\n                                                                          </span>\n                                                                       </div>\n                                                                        <span data-ng-show="(form.fax.$touched || forms.$submitted) && form.fax.$error.required" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END FAX -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_SUBMIT\' | translate}} {{\'APPLICATION_REQUEST\' | translate}}"/>\n                                                  </form>\n                                               </div>\n                                        </div>\n                                </div>\n                        </div>\n                </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/smtp/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-envelope"></i>\n                                 <a href="#">SMTP</a>\n                          </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE CONTENT -->\n                <div class="profile-content">\n                 <!-- START SMTP TAB -->\n                       <form name="form" data-ng-submit="form.$valid && updateItem()" novalidate>\n\n                          <!-- START HOST -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (form.host.$touched || form.$submitted) && form.host.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_OUTGOING_MAIL_SERVER\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                        <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.host" required/>\n                                   <span data-ng-show="(form.host.$touched || form.$submitted) && form.host.$invalid && form.host.$error.required" class="help-block help-block-error">\n                                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                               </div>\n                                <!-- END HOST -->\n\n                           <!-- START USERNAME -->\n                               <div class="form-group" data-ng-class="{\'has-error\': (form.username.$touched || form.$submitted) && form.username.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required/>\n                                       <span data-ng-show="(form.username.$touched || form.$submitted) && form.username.$invalid && form.username.$error.required" class="help-block help-block-error">\n                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                               </div>\n                                <!-- END USERNAME -->\n\n                               <!-- START PASSWORD -->\n                               <div class="form-group" data-ng-class="{\'has-error\': (form.password.$touched || form.$submitted) && form.password.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                   <span data-ng-show="(form.password.$touched || form.$submitted) && form.password.$invalid && form.password.$error.required" class="help-block help-block-error">\n                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                               </div>\n                                <!-- END PASSWORD -->\n\n                               <!-- START PORT -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (form.port.$touched || form.$submitted) && form.port.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                 <input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.port" required/>\n                                 <span data-ng-show="(form.form.$touched || form.$submitted) && form.port.$invalid && form.port.$error.required" class="help-block help-block-error">\n                                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                 </span>\n                                       <span data-ng-show="(form.form.$touched || form.$submitted) && form.port.$invalid && form.port.$error.number" class="help-block help-block-error">\n                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n                                  </span>\n                               </div>\n                                <!-- END PORT -->\n\n                           <!-- START SSL -->\n                            <div class="form-group row">\n                                  <label class="col-md-3">\n                                              SSL\n                                   </label>\n                                      <label class="col-md-9">\n                                                      <input type="checkbox" data-ng-model="item.ssl">\n                                      </label>\n                              </div>\n                                <!-- END SSL -->\n                              <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          <input class="btn blue-madison" type="button" value="Test" data-ng-click="test()"/>\n                   </form>\n                       <!-- END SMTP TAB -->\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/landing.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-cloud-download"></i>\n          <a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n    <!-- BEGIN PAGE CONTENT-->\n    <div class="row" data-ng-init="initCounter()">\n      <div class="col-md-12 page-500">\n        <div class="number">\n          <timer interval="1000" countdown="180">{{countdown}}</timer>\n        </div>\n        <div class="details">\n          <h3>Wait! We need to restart xCALLY Motion server.</h3>\n          <p>\n            We are updatig it!<br/>\n            xCALLY Motion Team<br/><br/>\n          </p>\n        </div>\n      </div>\n    </div>\n    <!-- END PAGE CONTENT-->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n                                    <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-cloud-download"></i>\n                                   <a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-cloud-download font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_UPDATES\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <a class="btn btn-default" href="#" data-ng-click="pull()">\n                                           <i class="icon-cloud-download"></i> {{ \'APPLICATION_UPDATE\' | translate }}\n                                  </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body" data-ng-init="initView()">\n                          <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                        <!-- END Portlet PORTLET-->\n           </div>\n        </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/list.pull.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text" data-ng-bind="modal.text"></p>\n  <div data-ng-if="modal.html" data-ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button data-ng-repeat="button in modal.buttons" data-ng-class="button.classes" data-ng-click="button.click($event)" data-ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("app/square/odbc/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DSN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.dsn.$touched || form.$submitted) && form.dsn.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="dsn" placeholder="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion" class="form-control" data-ng-model="item.dsn" required/>\n      <p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n      <span data-ng-show="(form.dsn.$touched || form.$submitted) && form.dsn.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DSN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
+a.put("app/square/odbc/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-superscript"></i>\n                                     <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                  <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="#">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_ODBCS\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ODBC\' | translate }}\n                                          </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getOdbc()">\n   <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-superscript"></i>\n                                     <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                  <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="/square/odbc/list">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n                                       <i data-ng-show="odbc" class="fa fa-angle-right"></i>\n                         </li>\n                         <li data-ng-show="odbc">\n                                      <a href="#">{{odbc.name}}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/odbc.png" class="img-responsive">\n                               </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{odbc.name}}\n                                 </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.square.odbc.view.settings\')}">\n                                                  <a data-ng-href="/square/odbc/view/{{odbc.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ODBC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateOdbc()" novalidate>\n\n                                                        <!-- START NAME -->\n                                 <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                 <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="odbc.name" required/>\n                                                           <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                       </span>\n                                     </div>\n                                <!-- END NAME -->\n\n                                                     <!-- START DSN -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="dsn" placeholder="{{\'APPLICATION_DSN\' | translate}}" class="form-control" data-ng-model="odbc.dsn" required/>\n                                                              <p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n                                          <span data-ng-show="(forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DSN -->\n\n                                                    <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="odbc.description"></textarea>\n                                                  </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/square/project/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/square/project/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="fa fa-superscript"></i>\n                                     <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                  <i class="fa fa-angle-right"></i>\n                             </li>\n        <li>\n          <i class="fa fa-slack"></i>\n          <a href="#">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n        </li>\n                       </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_PROJECTS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }}\n                                               </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-superscript"></i>\n                                             <a>{{ \'APPLICATION_CALLYSQUARE\' | translate }}</a>\n                                          <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="fa fa-slack"></i>\n                                           <a href="/square/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n                                 </li>\n          <li>\n                                         <a ng-href="/square/projects/view/{{squareProject.id}}">{{squareProject.name}}</a>\n          </li>\n                           </ul>\n                 </div>\n                </div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n              <div id="geEditor" class="geEditor"></div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n<script>\n\n\n</script>\n'),a.put("app/staff/agent/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-people"></i>\n                                   <a href="#">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-people font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_AGENTS\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/staff/agents/wizard">\n                                                      <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AGENT\' | translate }}\n                                         </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.account.html",'<div class="row" data-ng-init="initView()">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\n                                               <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n                                       </li>\n                                 <li data-ng-show="Auth.isAdmin()">\n                                            <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n                                       </li>\n                                 <li data-ng-show="Auth.isAdmin() || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}">\n                                            <a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\n                                                <form name="forms.info" data-ng-submit="updateItem()" novalidate>\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="agent.fullname" required/>\n                                                          <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START USERNAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="agent.name" required/>\n                                                              <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START EMAIL -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="agent.email" required/>\n                                                              <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                                                           </span>\n                                                       </div>\n                                                        <!-- END EMAIL -->\n\n                                                  <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="agent.description"></textarea>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <!-- START INTERNAL -->\n                                                       <!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <input type="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\n                                                              <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div> -->\n                                                    <!-- END INTERNAL -->\n\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END PERSONAL INFO TAB -->\n                                        <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_2">\n                                             <form action="#" role="form">\n                                                 <div class="form-group">\n                                                              <div class="fileinput fileinput-new" data-provides="fileinput">\n                                                                       <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n                                                                            <img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" alt=""/>\n                                                                   </div>\n                                                                        <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n                                                                       </div>\n                                                                        <div>\n                                                                         <span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n                                                                                 <span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n                                                                                 <input type="file" nv-file-select="" uploader="uploader" /><br/>\n                                                                              </span>\n                                                                               <button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n                                                                                    {{ \'APPLICATION_REMOVE\' | translate }}\n                                                                              </button>\n                                                                             <button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n                                                                                     {{ \'APPLICATION_CONFIRM\' | translate }}\n                                                                             </button>\n                                                                     </div>\n                                                                        <p>\n                                                                           </br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n                                                                  </p>\n                                                          </div>\n                                                        </div>\n                                                </form>\n                                               <div class="row">\n                                                     <div class="col-md-2">\n                                                                <table class="table" border="0">\n                                                                      <tbody>\n                                                                       <tr data-ng-repeat="item in uploader.queue">\n                                                                                  <td style="border-top-style:none">\n                                                                                            <strong>\n                                                                                                      {{ item.file.name }}\n                                                                                          </strong>\n                                                                                     </td>\n                                                                                 <td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n                                                                                             {{ item.file.size/1024/1024|number:2 }} MB\n                                                                                    </td>\n                                                                                 <td nowrap style="border-top-style:none">\n                                                                                             <button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n                                                                                                            <span class="glyphicon glyphicon-trash"></span> Remove\n                                                                                                </button>\n                                                                                     </td>\n                                                                         </tr>\n                                                                 </tbody>\n                                                              </table>\n                                                      </div>\n                                                </div>\n                                        </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n                                        <!-- CHANGE PASSWORD TAB -->\n                                  <div class="tab-pane" data-ng-show="Auth.isAdmin() || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}" id="tab_1_3">\n                                             <form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n                                                  <!-- START CURRENT PWD -->\n                                                    <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.currentPwd" required/>\n                                                             <span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CURRENT PWD -->\n                                                      <!-- START NEW PWD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.newPwd" required/>\n                                                         <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NEW PWD -->\n                                                  <!-- START RE-NEW PWD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.reNewPwd" nx-equal="agent.newPwd" required/>\n                                                            <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END RE-NEW PWD -->\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE PASSWORD TAB -->\n                              </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/agent/view/view.chat.html",'<div class="row" data-ng-init="initView()">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_CHAT\' | translate}}</span>\n                          </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- START CHAT TAB -->\n                               <form name="form" data-ng-submit="patchItem()" novalidate>\n                                    <!-- START CAPACITY -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n                                           <label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                             <input type="number" name="chatCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.chatCapacity" min="0" required/>\n                                            <span class="help-block">\n                                                     {{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n                                              </span>\n                                               <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END CAPACITY -->\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                               <!-- END CHAT TAB -->\n                 </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.fax.html",'<div class="row" data-ng-init="initView()">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_FAX\' | translate}}</span>\n                           </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- START CHAT TAB -->\n                               <form name="form" data-ng-submit="patchItem()" novalidate>\n                                    <!-- START CAPACITY -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n                                           <label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                             <input type="number" name="faxCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.faxCapacity" min="0" required/>\n                                              <span class="help-block">\n                                                     {{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n                                              </span>\n                                               <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END CAPACITY -->\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                               <!-- END CHAT TAB -->\n                 </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-puzzle"></i>\n                                   <a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-people"></i>\n                                   <a href="/staff/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n                                     <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{agent.fullname}}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-userpic">\n                                 <img ng-src="api/users/avatar/{{agent.userpic ? agent.userpic : \'unknown_avatar\'}}" class="img-responsive">\n                         </div>\n                                <!-- END SIDEBAR USERPIC -->\n\n                                <!-- START SIDEBAR USER TITLE -->\n                             <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{agent.fullname}}\n                                    </div>\n                                        <div class="profile-usertitle-job">\n                                           {{agent.role}}\n                                        </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.agents.view.account\')}">\n                                                  <a data-ng-href="/staff/agents/view/{{agent.id}}/account">\n                                                    <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n                                         </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.voice\')}" data-ng-show="Auth.isAdmin()">\n                                                      <a data-ng-href="/staff/agents/view/{{agent.id}}/voice">\n                                                      <i class="icon-earphones-alt"></i>\n                                                    {{ \'APPLICATION_VOICE\' | translate}} </a>\n                                           </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.chat\')}" data-ng-show="Auth.isAdmin()">\n                                                       <a data-ng-href="/staff/agents/view/{{agent.id}}/chat">\n                                                       <i class="icon-bubble"></i>\n                                                   {{ \'APPLICATION_CHAT\' | translate}} </a>\n                                            </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.mail\')}" data-ng-show="Auth.isAdmin()">\n                                                       <a data-ng-href="/staff/agents/view/{{agent.id}}/mail">\n                                                       <i class="icon-envelope"></i>\n                                                 {{ \'APPLICATION_MAIL\' | translate}} </a>\n                                            </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.fax\')}" data-ng-show="Auth.isAdmin()">\n                                                        <a data-ng-href="/staff/agents/view/{{agent.id}}/fax">\n                                                        <i class="icon-paper-plane"></i>\n                                                      {{ \'APPLICATION_FAX\' | translate}} </a>\n                                             </li>\n\n                                               <li data-ng-class="{active: $state.is(\'main.staff.agents.view.phonebar\')}" data-ng-show="Auth.isAdmin()">\n                                                   <a data-ng-href="/staff/agents/view/{{agent.id}}/phonebar">\n                                                   <i class="icon-screen-desktop"></i>\n                                                   {{ \'APPLICATION_PHONE_BAR\' | translate}} </a>\n                                               </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n\n          <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.mail.html",'<div class="row" data-ng-init="initView()">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_MAIL\' | translate}}</span>\n                          </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- START CHAT TAB -->\n                               <form name="form" data-ng-submit="patchItem()" novalidate>\n                                    <!-- START CAPACITY -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n                                           <label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                             <input type="number" name="mailCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.mailCapacity" min="0" required/>\n                                            <span class="help-block">\n                                                     {{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n                                              </span>\n                                               <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END CAPACITY -->\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                               <!-- END CHAT TAB -->\n                 </div>\n                </div>\n        </div>\n</div>\n</div>\n'),
+a.put("app/staff/agent/view/view.phonebar.html",'<div class="row" data-ng-init="initView()">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_PHONE_BAR\' | translate}}</span>\n                             </div>\n                                <ul class="nav nav-tabs">\n                                     <li data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\n                                               <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                                 <li data-ng-show="Auth.isAdmin()">\n                                            <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CALL_FORWARDING\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\n                                                <form name="forms.general" data-ng-submit="updateItem()" novalidate>\n\n                                                        <!-- START DELETE -->\n                                                 <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_AUTO_ANSWER\' | translate}}\n                                                           </label>\n                                                              <label class="col-md-9">\n                                                                      <input type="checkbox" data-ng-model="agent.phoneBarAutoAnswer">\n                                                              </label>\n                                                      </div>\n                                                        <!-- END DELETE -->\n\n                                                 <!-- START DELETE -->\n                                                 <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_ENABLE_SETTINGS\' | translate}}\n                                                               </label>\n                                                              <label class="col-md-9">\n                                                                      <input type="checkbox" data-ng-model="agent.phoneBarEnableSettings">\n                                                          </label>\n                                                      </div>\n                                                        <!-- END DELETE -->\n\n                                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END PERSONAL INFO TAB -->\n                                        <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_2">\n                                             <form name="forms.callForwarding" data-ng-submit="updateItem()" novalidate>\n                                                   <!-- START UNCONDITIONAL -->\n                                                  <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_UNCONDITIONAL\' | translate}}\n                                                         </label>\n                                                              <label class="col-md-9">\n                                                                      <input name="phoneBarUnconditional" type="checkbox" data-ng-model="agent.phoneBarUnconditional">\n                                                              </label>\n                                                      </div>\n                                                        <!-- END UNCONDITIONAL -->\n\n                                                  <!-- START UNCONDITIONAL NUMBER -->\n                                                   <div class="form-group" data-ng-if="agent.phoneBarUnconditional" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$invalid}">\n                                                                <input type="text" name="phoneBarUnconditionalNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarUnconditionalNumber" required/>\n                                                          <span class="help-block">\n                                                                     <!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n                                                         </span>\n                                                               <span data-ng-show="(forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END UNCONDITIONAL NUMBER -->\n\n                                                   <!-- START NO REPLY -->\n                                                       <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_NO_REPLY\' | translate}}\n                                                              </label>\n                                                              <label class="col-md-9">\n                                                                      <input name="phoneBarNoReply" type="checkbox" data-ng-model="agent.phoneBarNoReply">\n                                                          </label>\n                                                      </div>\n                                                        <!-- END NO REPLY -->\n\n                                                       <!-- START NO REPLY -->\n                                                       <div class="form-group" data-ng-if="agent.phoneBarNoReply" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$invalid}">\n                                                          <input type="text" name="phoneBarNoReplyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarNoReplyNumber" required/>\n                                                              <span class="help-block">\n                                                                     <!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n                                                         </span>\n                                                               <span data-ng-show="(forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END REPLY -->\n\n                                                  <!-- START BUSY -->\n                                                   <div class="form-group row">\n                                                          <label class="col-md-3">\n                                                                      {{\'APPLICATION_BUSY\' | translate}}\n                                                          </label>\n                                                              <label class="col-md-9">\n                                                                      <input name="phoneBarBusy" type="checkbox" data-ng-model="agent.phoneBarBusy">\n                                                                </label>\n                                                      </div>\n                                                        <!-- END BUSY -->\n\n                                                   <!-- START BUSY NUMBER -->\n                                                    <div class="form-group" data-ng-if="agent.phoneBarBusy" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$invalid}">\n                                                           <input type="text" name="phoneBarBusyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarBusyNumber" required/>\n                                                            <span class="help-block">\n                                                                     <!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n                                                         </span>\n                                                               <span data-ng-show="(forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END BUSY NUMBER -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/agent/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n                         </div>\n                        </div>\n                        <div class="portlet-body">\n                            <form name="forms.voice" data-ng-submit="updateItem()" novalidate>\n\n                                  <!-- START INTERNAL -->\n                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$invalid}">\n                                          <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                              <input type="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\n                                              <span data-ng-show="(forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$error.required" class="help-block help-block-error">\n                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END INTERNAL -->\n\n                                       <!-- START TRANSPORT -->\n                                      <div class="form-group">\n                                              <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                               <ui-select multiple name="transport" ng-model="agent.transport" theme="bootstrap">\n                                                    <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                        <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                                {{transport}}\n                                                 </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                             </span>\n                                       </div>\n                                        <!-- END TRANSPORT -->\n\n                                      <!-- START HOST -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$invalid}">\n                                          <label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                         <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="agent.host" required/>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n                                          </span>\n                                               <span data-ng-show="(forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$error.required" class="help-block help-block-error">\n                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END HOST -->\n\n                                   <!-- START NAT -->\n                                    <div class="form-group">\n                                              <label class="control-label">{{ \'APPLICATION_NAT\' | translate}}</label>\n                                             <ui-select multiple data-ng-model="agent.nat" name="nat" theme="bootstrap">\n                                                   <ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$item}}</ui-select-match>\n                                                    <ui-select-choices repeat="nat in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n                                                            {{nat}}\n                                                       </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_NAT\' | translate }}\n                                           </span>\n                                       </div>\n                                        <!-- END NAT -->\n\n                                    <!-- START TYPE -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$invalid}">\n                                          <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                         <ui-select data-ng-model="agent.type" name="type" theme="bootstrap" required>\n                                                 <ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$select.selected}}</ui-select-match>\n                                                 <ui-select-choices repeat="type in [\'friend\', \'user\', \'peer\'] | filter: $select.search">\n                                                                <div ng-bind-html="type | highlight: $select.search"></div>\n                                                   </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_TYPE\' | translate }}\n                                          </span>\n                                               <span data-ng-show="(forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$error.required" class="help-block help-block-error">\n                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                         </span>\n                                       </div>\n                                        <!-- END TYPE -->\n\n                                   <!-- START CODEC -->\n                                  <div class="form-group">\n                                              <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                          <ui-select multiple ng-model="agent.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                     <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                    <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                              {{allow}}\n                                                     </ui-select-choices>\n                                          </ui-select>\n                                          <span class="help-block">\n                                                     {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                         </span>\n                                       </div>\n                                        <!-- END CODEC -->\n\n                                  <!-- START STATUS -->\n                                 <div class="form-group">\n                                              <label class="control-label">{{\'APPLICATION_CHANSPY\' | translate}}</label></br>\n                                             <input\n                                                bs-switch\n                                             class="form-control"\n                                          ng-model="agent.chanspy"\n                                              type="checkbox"\n                                               name="auth"\n                                           switch-active="{{ recordSwitch.isActive }}"\n                                           switch-on-text="{{ recordSwitch.onText }}"\n                                            switch-off-text="{{ recordSwitch.offText }}"\n                                          switch-on-color="{{ recordSwitch.onColor }}"\n                                          switch-off-color="{{ recordSwitch.offColor }}"\n                                                switch-animate="{{ recordSwitch.animate }}"\n                                           switch-size="{{ recordSwitch.size }}"\n                                         switch-label="{{ recordSwitch.label }}"\n                                               switch-icon="{{ recordSwitch.icon }}"\n                                         switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                            switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                 </div>\n                                        <!-- END STATUS -->\n\n                                 <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/agent/wizard/wizard.html",'<div class="col-md-12">\n        <!-- BEGIN PAGE HEADER-->\n     <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-people"></i>\n                           <a href="/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/agents/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                 </li>\n         </ul>\n </div>\n        <!-- END PAGE HEADER-->\n\n     <!-- BEGIN PORTLET-->\n <div class="portlet light bordered" data-ng-init="getFirstFreeInternal();">\n           <div class="portlet-title">\n                   <div class="caption font-green-sharp">\n                                <i class="icon-user font-green-sharp"></i>\n                            <span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }} WIZARD</a> </span>\n                      </div>\n                </div>\n                <div class="portlet-body">\n                    <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                                 <form name="forms.info" novalidate>\n\n                                         <!-- START NAME -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                   <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END NAME -->\n\n                                           <!-- START USERNAME -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required>\n                                                 <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n                                                   </span>\n                                               </div>\n                                                <!-- END USERNAME -->\n\n                                               <!-- START EMAIL -->\n                                          <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                                                   <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                        <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required>\n                                                        <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                                                   </span>\n                                               </div>\n                                                <!-- END EMAIL -->\n\n                                          <!-- START PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                   <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END PASSWORD -->\n\n                                               <!-- START RE PASSWORD -->\n                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n                                                   <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                     <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n                                                        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END RE PASSWORD -->\n\n                                            <!-- START INTERNAL -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                      <div class="input-group">\n                                                             <input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n                                                              <span class="input-group-addon">\n                                                                      <input type="checkbox" data-ng-model="item.internalEnabled">\n                                                          </span>\n                                                       </div>\n                                                        <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END INTERNAL -->\n\n                                               <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                      </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n                                  <form name="forms.voice" novalidate>\n\n                                                <!-- START TRANSPORT -->\n                                              <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                                       <ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n                                                              <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                                <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                                        {{transport}}\n                                                         </ui-select-choices>\n                                                  </ui-select>\n                                                  <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                                     </span>\n                                               </div>\n                                                <!-- END TRANSPORT -->\n\n                                              <!-- START CODEC -->\n                                          <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                                  <ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                              <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                            <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                                      {{allow}}\n                                                             </ui-select-choices>\n                                                  </ui-select>\n                                                  <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                                 </span>\n                                               </div>\n                                                <!-- END CODEC -->\n\n                                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              <input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n                                   </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n                    </wizard>\n             </div>\n        </div>\n        <!-- END PORTLET-->\n</div>\n'),a.put("app/staff/team/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TEAM\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/staff/team/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-shield"></i>\n                                   <a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-shield font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_TEAMS\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="#" data-ng-click="createItem()">\n                                            <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEAM\' | translate }}\n                                  </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.agents.html",'<div class="row" data-ng-init="initAgents()">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                    <!-- GENERAL TAB -->\n                          <!-- BEGIN PORTLET-->\n                                 <!-- BEGIN FORM-->\n                                    <form action="index.html" class="form-horizontal form-row-seperated">\n                                         <div class="form-body">\n                                                       <div class="form-group last">\n                                                         <div class="col-md-12" id="multi-select-team">\n                                                                </div>\n                                                        </div>\n                                                </div>\n                                        </form>\n                                       <!-- END FORM-->\n                              <!-- END PORTLET-->\n                   <!-- END GENERAL TAB -->\n                      </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/team/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-shield"></i>\n                                   <a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{team.name}}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img ng-src="assets/images/media/team.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{team.name}}\n                                 </div>\n\n                              </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.teams.view.settings\')}">\n                                                  <a data-ng-href="/staff/teams/view/{{team.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.is(\'main.staff.teams.view.agents\')}">\n                                                    <a data-ng-href="/staff/teams/view/{{team.id}}/agents">\n                                                       <i class="icon-people"></i>\n                                                   {{ \'APPLICATION_AGENTS\' | translate}} </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content"></div>\n           <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.settings.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n                               </div>\n                        </div>\n\n                      <div class="portlet-body">\n                            <!-- PERSONAL INFO TAB -->\n                            <div>\n\n                                       <form name="forms.info" data-ng-submit="updateItem()" novalidate>\n                                             <!-- START NAME -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="team.name" required/>\n                                                   <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END NAME -->\n\n                                           <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="team.description"/>\n                                               </div>\n                                                <!-- END DESCRIPTION -->\n\n                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </form>\n                               </div>\n                                <!-- END PERSONAL INFO TAB -->\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/telephone/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-phone"></i>\n                                    <a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-phone font-green-sharp"></i>\n                                   <span class="caption-subject">{{ \'APPLICATION_TELEPHONES\' | translate }}</a> </span>\n                                </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="/staff/telephones/wizard" data-toggle="dropdown">\n                                           <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TELEPHONE\' | translate }}\n                                     </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/staff/telephone/view/view.account.html",'<div class="row">\n        <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}}</span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_ACCOUNT\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_VOICE\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.info" data-ng-submit="updateItem() && forms.info.$valid" novalidate>\n\n                                    <!-- START NAME -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                           <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                       </span>\n                                     </div>\n                                <!-- END NAME -->\n\n                                   <!-- START USERNAME -->\n                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                       <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                     <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" required ng-remote-validate="/api/agents/validate/name"/>\n                                                                <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                       </span>\n                                                               <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.ngRemoteValidate" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                     </div>\n                                <!-- END USERNAME -->\n\n                                                 <!-- START INTERNAL -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" required ng-remote-validate="/api/agents/validate/internal"/>\n                                                           <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END INTERNAL -->\n\n                                                       <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                                  </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                    </form>\n                                   </div>\n                                        <!-- END PERSONAL INFO TAB -->\n\n                                      <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" id="tab_1_2">\n                                           <form name="forms.voice" data-ng-submit="updateItem() && forms.voice.$valid" novalidate>\n\n                                                    <!-- START TRANSPORT -->\n                                                      <div class="form-group">\n                                                              <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                                               <ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n                                                          <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                        <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                            {{transport}}\n                                                     </ui-select-choices>\n                                                        </ui-select>\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                                             </span>\n                                                       </div>\n                                                        <!-- END TRANSPORT -->\n\n                                                      <!-- START CODEC -->\n                                                  <div class="form-group">\n                                                              <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                                          <ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                          <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                            <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                          {{allow}}\n                                                         </ui-select-choices>\n                                                        </ui-select>\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CODEC -->\n\n                                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n                                                </form>\n                                       </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n\n                                      <!-- CHANGE PASSWORD TAB -->\n                                  <div class="tab-pane" id="tab_1_3" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id">\n                                             <form name="forms.changePwd" data-ng-submit="updateItem() && forms.changePwd.$valid" novalidate>\n                                                      <!-- START CURRENT PWD -->\n                                                    <!-- <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.currentPwd" required/>\n                                                              <span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div> -->\n                                                    <!-- END CURRENT PWD -->\n                                                      <!-- START NEW PWD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                                <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NEW PWD -->\n                                                  <!-- START RE-NEW PWD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.reNewPwd" nx-equal="item.password" required/>\n                                                            <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END RE-NEW PWD -->\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE PASSWORD TAB -->\n                              </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/staff/telephone/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-phone"></i>\n                                    <a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n                                     <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{item.fullname}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR TELEPHONEPIC -->\n                         <div class="profile-userpic">\n                                 <!-- <img ng-src="api/telephones/avatar/{{item.userpic ? item.userpic : \'unknown_avatar\'}}" class="img-responsive"> -->\n                             </div>\n                                <!-- END SIDEBAR TELEPHONEPIC -->\n                             <!-- SIDEBAR TELEPHONE TITLE -->\n                              <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{item.fullname}}\n                                     </div>\n                                        <div class="profile-usertitle-job">\n                                           {{item.role}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR TELEPHONE TITLE -->\n\n                                <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.telephones.view.account\')}">\n                                                      <a data-ng-href="/telephones/view/{{item.id}}/account">\n                                                       <i class="icon-item"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/telephone/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n     <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-phone"></i>\n                            <a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n                             <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/staff/telephones/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                       </li>\n         </ul>\n </div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="initWizard()">\n      <div class="portlet-title">\n           <div class="caption font-green-sharp">\n                        <i class="icon-phone font-green-sharp"></i>\n                   <span class="caption-subject">{{ \'APPLICATION_TELEPHONE\' | translate }} WIZARD</a> </span>\n                  </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                     <form name="forms.info" novalidate>\n\n                           <!-- START NAME -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                   <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END NAME -->\n\n                           <!-- START USERNAME -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" ata-ng-pattern="settings.patternName"  required />\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.ngRemoteValidate" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                               </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n                                                   </span>\n                             </div>\n                        <!-- END USERNAME -->\n\n                       <!-- START PASSWORD -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                           <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END PASSWORD -->\n\n                       <!-- START RE PASSWORD -->\n                            <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n                             <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n                                <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                               <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END RE PASSWORD -->\n\n                                              <!-- START INTERNAL -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                      <div class="input-group">\n                                                     <input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled" ng-remote-validate="/api/agents/validate/internal"/>\n                                                   <span class="input-group-addon">\n                                                              <input type="checkbox" data-ng-model="item.internalEnabled">\n                                                  </span>\n                                                       </div>\n                                                        <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                                       <span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n                                                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END INTERNAL -->\n\n                                               <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                            </form>\n                     </wz-step>\n\n                                <wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n                                  <form name="forms.voice" novalidate>\n\n                                                <!-- START TRANSPORT -->\n                                              <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n                                                       <ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n                                                  <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n                                                <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n                                                    {{transport}}\n                                             </ui-select-choices>\n                                                </ui-select>\n                                                        <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n                                                     </span>\n                                               </div>\n                                                <!-- END TRANSPORT -->\n\n                                              <!-- START CODEC -->\n                                          <div class="form-group">\n                                                      <label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n                                                  <ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n                                                  <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n                                                    <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n                                                  {{allow}}\n                                                 </ui-select-choices>\n                                                </ui-select>\n                                                        <span class="help-block">\n                                                             {{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n                                                 </span>\n                                               </div>\n                                                <!-- END CODEC -->\n\n                                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              <input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n                                   </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n            </wizard>\n     </div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/staff/user/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="#">{{ \'APPLICATION_USERS\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-eye font-green-sharp"></i>\n                                     <span class="caption-subject">{{ \'APPLICATION_USERS\' | translate }}</a> </span>\n                             </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="/staff/users/wizard" data-toggle="dropdown">\n                                                <i class="icon-plus"></i> {{ \'APPLICATION_NEW_USER\' | translate }}\n                                  </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.account.html",'<div class="row">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n                                    </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- PERSONAL INFO TAB -->\n                                    <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.info" data-ng-submit="updateItem()" novalidate>\n                                                     <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="user.fullname" required/>\n                                                           <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START USERNAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="user.name" required/>\n                                                               <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START EMAIL -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="user.email" required/>\n                                                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                                                           </span>\n                                                       </div>\n                                                        <!-- END EMAIL -->\n\n                                                  <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="user.description"></textarea>\n                                                  </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END PERSONAL INFO TAB -->\n                                        <!-- CHANGE AVATAR TAB -->\n                                    <div class="tab-pane" id="tab_1_2">\n                                           <form action="#" role="form">\n                                                 <div class="form-group">\n                                                              <div class="fileinput fileinput-new" data-provides="fileinput">\n                                                                       <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n                                                                            <img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" alt=""/>\n                                                                   </div>\n                                                                        <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n                                                                       </div>\n                                                                        <div>\n                                                                         <span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n                                                                                 <span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n                                                                                 <input type="file" nv-file-select="" uploader="uploader" /><br/>\n                                                                              </span>\n                                                                               <button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n                                                                                    <span> {{ \'APPLICATION_REMOVE\' | translate }} </span>\n                                                                               </button>\n                                                                             <button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n                                                                                     <span> {{ \'APPLICATION_CONFIRM\' | translate }} </span>\n                                                                              </button>\n                                                                     </div>\n                                                                        <p>\n                                                                           </br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n                                                                  </p>\n                                                          </div>\n                                                        </div>\n                                                </form>\n                                               <div class="row">\n                                                     <div class="col-md-2">\n                                                                <table class="table" border="0">\n                                                                      <tbody>\n                                                                       <tr data-ng-repeat="item in uploader.queue">\n                                                                                  <td style="border-top-style:none">\n                                                                                            <strong>\n                                                                                                      {{ item.file.name }}\n                                                                                          </strong>\n                                                                                     </td>\n                                                                                 <td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n                                                                                             {{ item.file.size/1024/1024|number:2 }} MB\n                                                                                    </td>\n                                                                                 <td nowrap style="border-top-style:none">\n                                                                                             <button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n                                                                                                            <span class="glyphicon glyphicon-trash"></span> Remove\n                                                                                                </button>\n                                                                                     </td>\n                                                                         </tr>\n                                                                 </tbody>\n                                                              </table>\n                                                      </div>\n                                                </div>\n                                        </div>\n                                        <!-- END CHANGE AVATAR TAB -->\n                                        <!-- CHANGE PASSWORD TAB -->\n                                  <div class="tab-pane" id="tab_1_3" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id">\n                                          <form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n                                                  <!-- START CURRENT PWD -->\n                                                    <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.currentPwd" required/>\n                                                              <span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CURRENT PWD -->\n                                                      <!-- START NEW PWD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.newPwd" required/>\n                                                          <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NEW PWD -->\n                                                  <!-- START RE-NEW PWD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.reNewPwd" nx-equal="user.newPwd" required/>\n                                                              <span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END RE-NEW PWD -->\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END CHANGE PASSWORD TAB -->\n                              </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
+a.put("app/staff/user/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="/staff/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{user.fullname}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-userpic">\n                                 <img ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{user.fullname}}\n                                     </div>\n                                        <div class="profile-usertitle-job">\n                                           {{user.role}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.staff.users.view.account\')}">\n                                                   <a data-ng-href="/staff/users/view/{{user.id}}/account">\n                                                      <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n  <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-eye"></i>\n                              <a href="/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n                             <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="/staff/users/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                    </li>\n         </ul>\n </div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered">\n          <div class="portlet-title">\n           <div class="caption font-green-sharp">\n                        <i class="icon-user font-green-sharp"></i>\n                    <span class="caption-subject">{{ \'APPLICATION_USER\' | translate }} WIZARD</a> </span>\n               </div>\n        </div>\n        <div class="portlet-body">\n            <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n                     <form name="forms.info" novalidate>\n\n                           <!-- START NAME -->\n                           <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n                                                   <span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END NAME -->\n\n                           <!-- START USERNAME -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                                                       <span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n                                                   </span>\n                             </div>\n                        <!-- END USERNAME -->\n\n                       <!-- START EMAIL -->\n                          <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n                             <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required />\n                              <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                               <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n                         </span>\n                             </div>\n                        <!-- END EMAIL -->\n\n                          <!-- START PASSWORD -->\n                       <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                               <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                           <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END PASSWORD -->\n\n                       <!-- START RE PASSWORD -->\n                            <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n                             <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                             <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n                                <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n                              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                               </span>\n                               <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                               </span>\n                             </div>\n                        <!-- END RE PASSWORD -->\n\n                                              <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                          <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                            </form>\n                     </wz-step>\n\n                                <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n            </wizard>\n     </div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/sugarcrm/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_SUGARCRM\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/sugarcrm/wizard" data-toggle="dropdown">\n                                                   <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid">\n                                 <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.account.html",'<div class="row">\n   <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                            <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START PASSWORD -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                                <span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END API KEY -->\n\n                                                        <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/sugarcrm/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n    <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n                              </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createConfiguration()">\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n                                                   <form name="formsConfiguration.info" novalidate>\n                                                              <!-- START NAME -->\n                                                           <div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n                                                                 <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n                                                                  <span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n                                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                                <!-- END NAME -->\n                                                             <!-- START DESCRIPTION -->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                                      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n                                                              </div>\n                                                                <!-- END DESCRIPTION -->\n\n                                                            <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                                                       </form>\n                                               </wz-step>\n\n                                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                          <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                      <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                            <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                                                    <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                                                               <!-- <pre>\n                                                                    {{descriptionItem|json}}\n                                                              </pre> -->\n                  <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                        <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n                     <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n                                                                       <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                     <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                         <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                    </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n                                                                        <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                      <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                             <!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n                <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n                    <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n                        <div ng-bind-html="item.label | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                             <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n                                <ui-select-choices repeat="item in fieldType | filter: $select.search">\n                                 <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n                               </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n                              <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                               </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/sugarcrm/view/view.configurations.html",'<div ui-view class="profile-content">\n  <div class="row" data-ng-init="getConfigurations()">\n          <div class="col-md-12">\n                       <div class="portlet light">\n                           <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group">\n                                                       <a class="btn green-jungle " href="/sugarcrm/view/{{account.id}}/configuration" data-toggle="dropdown">\n                                                               <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <table class="table table-striped table-bordered table-hover">\n                                                  <thead>\n                                                       <tr>\n                                                            <th>{{\'APPLICATION_NAME\' | translate}}</th>\n                                                                     <th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n                                                                  <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n                                                      </tr>\n                                                 </thead>\n                                                    <tbody>\n                                                   <tr data-ng-repeat="configuration in configurations">\n                                                                     <td>{{configuration.name}}</td>\n                                                                       <td>{{configuration.description}}</td>\n                                                      <td>\n                                                                            <a class="btn default btn-xs blue-stripe" data-ng-href="/sugarcrm/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n                                                                                  {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                                  <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n                                                                                    {{ \'APPLICATION_DELETE\' | translate }}\n                                                      </a>\n                                                </td>\n                                               </tr>\n                                                             <tr data-ng-hide="configurations.length">\n                                                                     <td colspan="5" style="text-align:center;">\n                                                                           <i>No configuration available</i>\n                                                                     </td>\n                                                         </tr>\n                                           </tbody>\n                                    </table>\n                                      <!-- END TABLE -->\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/sugarcrm/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/sugarcrm.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.sugarcrm.view.account\')}">\n                                                      <a ng-href="/sugarcrm/view/{{account.id}}/account">\n                                                   <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.sugarcrm.view.configurations\') || $state.is(\'main.sugarcrm.view.configuration\')}">\n                                                      <a ng-href="/sugarcrm/view/{{account.id}}/configurations">\n                                                    <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/sugarcrm/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n        <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n                                       </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required/>\n                                                               <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/sugarcrm/accounts/validate/remoteUri"/>\n                                                         <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n                                 </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                           <span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n                                                       <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.key.$touched || form.$submitted) && form.key.$invalid}">\n      <label class="control-label">{{\'APPLICATION_KEY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="item.key" required/>\n      <span data-ng-show="(form.key.$touched || form.$submitted) && form.key.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START VALUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.value.$touched || form.$submitted) && form.value.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label></label>\n      <textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="item.value" required></textarea>\n      <span data-ng-show="(form.value.$touched || form.$submitted) && form.value.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VALUE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/answer/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-magic-wand"></i>\n                                       <a href="#">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-magic-wand font-green-sharp"></i>\n                                      <span class="caption-subject">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n                                             <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}\n                                 </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                          <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getAnswer()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-magic-wand"></i>\n                                       <a href="/tools/answers/list">{{ \'APPLICATION_CANNED_ANSWER\' | translate }}</a>\n                                     <i data-ng-show="answer" class="fa fa-angle-right"></i>\n                               </li>\n                         <li data-ng-show="answer">\n                                    <a href="#">{{answer.key}}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/answer.png" class="img-responsive">\n                             </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{answer.name}}\n                                       </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.answers.view.settings\')}">\n                                                        <a data-ng-href="/tools/answers/view/{{answer.id}}/settings">\n                                                         <i class="icon-settings"></i>\n                                                         {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.settings.html",'<div class="row">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CANNED_ANSWER\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateAnswer()" novalidate>\n\n                                                      <!-- START KEY -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="answer.key" required/>\n                                                            <span data-ng-show="(forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END KEY -->\n\n                                                    <!-- START VALUE -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                                <textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="answer.value" required></textarea>\n                                                         <span data-ng-show="(forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$error.required" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END VALUE -->\n\n                                                  <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="answer.description"></textarea>\n                                                        </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/automation/list/list.html",'<div class="row">\n     <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-wrench"></i>\n                                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                               <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bulb"></i>\n                                             <a href="#">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a> </span>\n                               </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle " href="/tools/automations/wizard">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_AUTOMATION\' | translate }}\n                                            </a>\n                                  </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n                                   <i class="fa fa-angle-right" data-ng-show="automation"></i>\n                           </li>\n                         <li data-ng-show="automation">\n                                        <a href="#">{{ automation.description || automation.name }}</a>\n                               </li>\n                 </ul>\n         </div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n               <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/automation.png" class="img-responsive">\n                         </div>\n                                <!-- END SIDEBAR USERPIC -->\n\n                                <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{ automation.name }}\n                                 </div>\n                                        <div class="profile-usertitle-job">\n                                           {{ automation.description }}\n                                  </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.automations.view.settings\')}">\n                                                    <a href="/tools/automations/view/{{automation.id}}/settings">\n                                                 <i class="icon-bulb"></i>\n                                                     {{ \'APPLICATION_SETTINGS\' | translate }} </a>\n                                               </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.settings.html",'<div class="row">\n  <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <!-- <pre>\n                                    {{conditionsData.query | json}}\n                               </pre>\n                                <pre>\n                                 {{actionsData.query | json}}\n                          </pre> -->\n                            <form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateAutomation()" novalidate>\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="automation.name" required/>\n                                                             <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START TIMEOUT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.general.timeout.$touched && forms.general.timeout.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n                                                          <input type="number" name="timeout" min="1" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="automation.timeout" data-ng-init="item.timeout = 10" required/>\n                                                         <span data-ng-show="forms.general.timeout.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TIMEOUT -->\n\n                                                        <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                      <input\n                                                                    bs-switch\n                                                                         class="form-control"\n                                                              ng-model="automation.status"\n                                                                  type="checkbox"\n                                                                           name="status"\n                                                             switch-active="{{ recordSwitch.isActive }}"\n                                                                   switch-on-text="{{ recordSwitch.onText }}"\n                                                                    switch-off-text="{{ recordSwitch.offText }}"\n                                                                  switch-on-color="{{ recordSwitch.onColor }}"\n                                                                  switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                                   switch-size="{{ recordSwitch.size }}"\n                                                                 switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                                 switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                                    switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                     </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="automation.description"/>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                        <!-- END GENERAL TAB -->\n                                      <div class="tab-pane" id="tab_1_2">\n                                           <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in automation.All">\n                                                                    <condition-builder element="all" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in automation.Any">\n                                                                    <condition-builder element="any" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in automation.Actions">\n                                                                     <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n                                                                               <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $automations.services[automation.channel].actions | filter: $select.search">\n                                                                                           <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n                                                                           <action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n                                                                          <action-builder-status ng-switch-when="status" element="action" form="forms.general"></action-builder-status>\n                                                                 </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !automation.All.length && !automation.Any.length">\n                                                   <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !automation.Actions.length">\n                                                 <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                </div>\n                                </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/automation/wizard/wizard.html",'<div class="row">\n <div class="col-md-12">\n               <!-- BEGIN PAGE HEADER-->\n             <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-settings"></i>\n                                 <a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n                <!-- END PAGE HEADER-->\n\n             <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }} WIZARD</a> </span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n                                     <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n                                              <form name="forms.general" data-ng-submit="submit()" novalidate>\n                                                      <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.general.name.$touched && forms.general.name.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.general.name.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START TIMEOUT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': forms.general.timeout.$touched && forms.general.timeout.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n                                                          <input type="number" name="timeout" min="1" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.timeout" data-ng-init="item.timeout = 10" required/>\n                                                               <span data-ng-show="forms.general.timeout.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TIMEOUT -->\n\n                                                        <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                      <input\n                                                                    bs-switch\n                                                                         class="form-control"\n                                                              ng-model="item.status"\n                                                                type="checkbox"\n                                                                           name="status"\n                                                                         data-ng-init="item.status = 0"\n                                                                    switch-active="{{ recordSwitch.isActive }}"\n                                                                   switch-on-text="{{ recordSwitch.onText }}"\n                                                                    switch-off-text="{{ recordSwitch.offText }}"\n                                                                  switch-on-color="{{ recordSwitch.onColor }}"\n                                                                  switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                                   switch-size="{{ recordSwitch.size }}"\n                                                                 switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                                 switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                                    switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                     </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n                                            <form name="forms.settings" novalidate>\n                                               <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n                                                                   <label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                    <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n                                                                            <ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                          <ui-select-choices repeat="channel in $automations.channels | filter: $select.search">\n                                                                                        <div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n                                                                           </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in item.All">\n                                                                  <condition-builder element="all" serviceindex="item.channel" service="$automations" form="forms.settings"></condition-builder>\n                                                                        <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in item.Any">\n                                                                  <condition-builder element="any" serviceindex="item.channel" service="$automations" form="forms.settings"></condition-builder>\n                                                                        <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in item.Actions">\n                                                                   <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$invalid}">\n                                                                            <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $automations.services[item.channel].actions | filter: $select.search">\n                                                                                         <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.settings"></action-builder-template>\n                                                                          <action-builder-integration ng-switch-when="integration" element="action" form="forms.settings"></action-builder-integration>\n                                                                         <action-builder-status ng-switch-when="status" element="action" form="forms.settings"></action-builder-status>\n                                                                        </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                      </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/tools/interval/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_INTERVAL\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/interval/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-clock"></i>\n                                    <a href="#">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_INTERVALS\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }}\n                                              </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getInterval()">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-clock"></i>\n                                    <a href="/tools/intervals/list">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n                                       <i data-ng-show="interval" class="fa fa-angle-right"></i>\n                             </li>\n                         <li data-ng-show="interval">\n                                  <a href="#">{{interval.name}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/interval.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{interval.name}}\n                                     </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.intervals.view.settings\')}">\n                                                      <a data-ng-click="deselectAndRedirect(\'/tools/intervals/view/\'+interval.id+\'/settings\')">\n                                                 <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n'+"                                              <li data-ng-class=\"{active: $state.is('main.tools.intervals.view.subintervals') || $state.is('main.tools.intervals.view.subinterval') || $state.is('main.tools.intervals.view.subintervals.settings')}\">\n                                                    <a data-ng-click=\"deselectAndRedirect('/tools/intervals/view/'+interval.id+'/subintervals')\">\n                                                       <i class=\"icon-list\"></i>\n                                                   {{ 'APPLICATION_SUBINTERVALS' | translate}} </a>\n                                              </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class=\"profile-content\">\n               </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/tools/interval/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INTERVAL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateInterval()" novalidate>\n\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.name" required/>\n                                                               <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="interval.description"></textarea>\n                                                      </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/interval/view/view.subinterval.html",'\n<div class="row" data-ng-init="initSubInterval(true)">\n    <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="addSubInterval()">\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="subinterval.name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n                                                   <!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n                                                                       <fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                        <fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                       <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="splittedInterval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n              <!-- START MONTHDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTHDAY -->\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n                                                       <button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n                                             <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.subintervalSettings.html",'\n<div class="row" data-ng-init="initSubInterval();getSubInterval();">\n    <div class="col-md-12">\n               <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_SUBINTERVAL_SETTINGS\' | translate }} WIZARD</a> </span>\n                               </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="updateInterval(\'subintervals\')">\n                                 <div class="profile-usertitle-name">\n                                          {{subinterval.name}}\n                                  </div>\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.SubIntervals[selectedSubInterval].name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n              <!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n                                                                    <fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n                                                                        <fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                                                                       <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="splittedInterval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{$translate.instant(weekDay.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n              <!-- START MONTHDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n                    <ui-select-match>{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n                      {{monthDay}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTHDAY -->\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$translate.instant($select.selected.name)}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{$translate.instant(month.name)}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n                                                       <button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n                                             <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                         </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.subintervals.html",'<div ui-view class="profile-content">\n<div class="row">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title  tabbable-line">\n                            <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SUBINTERVALS\' | translate}}</span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group">\n                                               <a class="btn green-jungle " href="/tools/intervals/view/{{interval.id}}/subinterval" data-toggle="dropdown">\n                                                 <i class="icon-plus"></i> {{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }}\n                                           </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div data-ng-if="selectedSubInterval === undefined" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-draggable-rows>\n                                        <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n        </div>\n</div>\n</div>\n'),a.put("app/tools/pause/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PAUSE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/pause/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-control-pause"></i>\n                                    <a href="#">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-control-pause font-green-sharp"></i>\n                                   <span class="caption-subject">{{ \'APPLICATION_PAUSES\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n                                             <i class="icon-plus"></i> {{ \'APPLICATION_NEW_PAUSE\' | translate }}\n                                 </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                          <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getPause()">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-pause"></i>\n                                    <a href="/tools/pauses/list">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n                                     <i data-ng-show="pause" class="fa fa-angle-right"></i>\n                                </li>\n                         <li data-ng-show="pause">\n                                     <a href="#">{{pause.name}}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/pause.png" class="img-responsive">\n                              </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{pause.name}}\n                                        </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.pauses.view.settings\')}">\n                                                 <a data-ng-href="/tools/pauses/view/{{pause.id}}/settings">\n                                                           <i class="icon-settings"></i>\n                                                         {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PAUSE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updatePause()" novalidate>\n\n                                                       <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="pause.name" required/>\n                                                          <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="pause.description"></textarea>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/sound/list/list.html",'<div class="page-bar">\n  <ul class="page-breadcrumb">\n    <li>\n      <i class="icon-rocket"></i>\n      <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n      <i class="fa fa-angle-right"></i>\n    </li>\n    <li>\n      <i class="icon-music-tone-alt"></i>\n      <a href="#">{{ \'APPLICATION_SOUNDS\' | translate }}</a>\n    </li>\n  </ul>\n  <div class="page-toolbar">\n  </div>\n</div>\n<!-- END PAGE HEADER-->\n<!-- BEGIN PAGE CONTENT-->\n<!-- Audio Portlets -->\n<div class="headline">\n  <h3><i class="icon-music-tone-alt sounds-title-icon"></i> {{ \'APPLICATION_SOUNDS\' | translate }}</h3>\n</div>\n<div class="portlet light bg-inverse">\n  <div class="portlet-title collapsible" ng-click="isCollapsed = !isCollapsed">\n    <div class="caption">\n      <i class="icon-puzzle font-red-flamingo"></i>\n      <span class="caption-subject bold font-red-flamingo uppercase">\n      {{\'APPLICATION_FILE_UPLOAD\' | translate}} </span>\n    </div>\n    <div class="tools">\n      <a href="" ng-class="{\'collapse\': !isCollapsed, \'expand\' : isCollapsed}">\n      </a>\n    </div>\n  </div>\n  <div class="portlet-body" ng-slide-down="!isCollapsed">\n    <div class="row" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">\n       <div class="col-md-4">\n                <div class="portlet light bordered">\n                          <div class="portlet-title">\n                                   <div class="caption font-green-sharp">\n                                        <i class="icon-settings font-green-sharp"></i>\n                                        <span class="caption-subject bold uppercase">{{\'APPLICATION_SELECT_FILES\' | translate}}</span>\n                                      <span class="caption-helper hide"></span>\n                             </div>\n                                <div class="actions">\n                                 </div>\n                        </div>\n                        <div class="portlet-body">\n                                    <div ng-show="uploader.isHTML5">\n                                      <div class="file-drop-zone margin-bottom-20" nv-file-over="" uploader="uploader" over-class="file-drop-zone-over">\n                                                    Base drop zone\n                                        </div>\n                                </div>\n                                <span class="btn default btn-file">\n                                   <span class="fileinput-new">\n                                  {{\'APPLICATION_FILE_UPLOAD\' | translate}}</span>\n                                    <input type="file" nv-file-select="" uploader="uploader" />\n                                   </span>\n                               <span class="btn default btn-file">\n                                   <span class="fileinput-new">\n                                  {{\'APPLICATION_MULTI_FILE_UPLOAD\' | translate}}</span>\n                              <input type="file" nv-file-select="" uploader="uploader" multiple  /><br/>\n          </span>\n          <p>\n            </br>\n            {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>wav, mp3, gsm, ogg</b>.\n          </p>\n          <p>\n            {{ \'MESSAGE_MAXIMUM_SOUND_UPLOAD_SIZE\' | translate }} <b>15 Mb</b>.\n          </p>\n                     </div>\n                </div>\n        </div>\n        <div class="col-md-8">\n                <div class="portlet light bordered">\n                          <div class="portlet-title">\n                                   <div class="caption font-green-sharp">\n                                        <i class="icon-settings font-green-sharp"></i>\n                                        <span class="caption-subject bold uppercase">{{\'APPLICATION_UPLOAD_QUEUE\' | translate}}</span>\n                                      <span class="caption-helper">{{\'APPLICATION_QUEUE_LENGTH\' | translate}}: {{ uploader.queue.length }}</span>\n                                 </div>\n                                <div class="actions">\n                                 </div>\n                        </div>\n                        <div class="portlet-body">\n                                    <div class="table-scrollable table-scrollable-borderless">\n                                            <table class="table table-hover table-light">\n                                                 <thead>\n                                                       <tr class="uppercase">\n                                                                <th width="50%">{{\'APPLICATION_NAME\' | translate}}</th>\n                                                             <th ng-show="uploader.isHTML5">{{\'APPLICATION_SIZE\' | translate}}</th>\n                                                              <th ng-show="uploader.isHTML5">{{\'APPLICATION_PROGRESS\' | translate}}</th>\n                                                                  <th>{{\'APPLICATION_STATUS\' | translate}}</th>\n                                                               <th>{{\'APPLICATION_MESSAGE\' | translate}}</th>\n                                                              <th>{{\'APPLICATION_ACTIONS\' | translate}}</th>\n                                                      </tr>\n                                                 </thead>\n                                              <tbody>\n                                                       <tr ng-repeat="item in uploader.queue">\n                                                               <td><strong>{{ item.file.name }}</strong></td>\n                                                                <td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n                                                                 <td ng-show="uploader.isHTML5">\n                                                                       <div class="progress progress-sm" style="margin-bottom: 0;">\n                                                                                  <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n                                                                         </div>\n                                                                </td>\n                                                                 <td class="text-center">\n                                                                      <span ng-show="item.isSuccess" class="text-success"><i class="glyphicon glyphicon-ok"></i></span>\n                                                                     <span ng-show="item.isCancel" class="text-info"><i class="glyphicon glyphicon-ban-circle"></i></span>\n                                                                         <span ng-show="item.isError" class="text-danger"><i class="glyphicon glyphicon-remove"></i></span>\n                                                                            <span ng-show="item.isUploading" class="text-info"><i class="glyphicon glyphicon-upload"></i></span>\n                                                                  </td>\n                                                                 <td class="text-center">\n                                                                      <span ng-show="item.responseMessage" class="text-danger">{{item.responseMessage}}</span>\n                                                              </td>\n                                                                 <td nowrap>\n                                                                           <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">\n                                                                       <span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD\' | translate}}\n                                                                       </button>\n                                                                     <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">\n                                                                        <span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL\' | translate}}\n                                                                           </button>\n                                                                     <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">\n                                                                         <span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n                                                                        </button>\n                                                             </td>\n                                                         </tr>\n                                                 </tbody>\n                                      </table>\n                              </div>\n                                <div>\n                                         <p>{{\'APPLICATION_UPLOAD_QUEUE_PROGRESS\' | translate}}:</p>\n                                         <div class="progress progress-sm" style="">\n                                                   <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': uploader.progress + \'%\' }"></div>\n                                     </div>\n                                </div>\n                                <button type="button" class="btn btn-success btn-s" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">\n                             <span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD_ALL\' | translate}}\n                                   </button>\n                             <button type="button" class="btn btn-warning btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">\n                              <span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL_ALL\' | translate}}\n                               </button>\n                             <button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">\n                             <span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE_ALL\' | translate}}\n                                    </button>\n                     </div>\n                </div>\n        </div>\n    </div>\n  </div>\n</div>\n<div class="row thumbnails" data-ng-init="initList()">\n  <div class="row" ng-show="sounds.length == 0">\n    <div class="col-md-12 page-404">\n      <div class="details">\n        <h3>{{ \'MESSAGE_NO_SOUNDS\' | translate }}</h3>\n        <p>\n          <a href="/">\n          {{ \'MESSAGE_RETURN_HOME\' | translate }} </a>\n          {{ \'MESSAGE_OR_UPLOAD_SOUND_FILE\' | translate }}\n        </p>\n      </div>\n    </div>\n  </div>\n  <div class="audio-portlet-wrapper animate-repeat" ng-repeat="sound in sounds">\n    <div class="audio-portlet">\n      <div class="audio-portlet-title"><a href="#" editable-text="sound.display_name" onbeforesave="updateAudio(sound.id,{display_name : $data})">{{ sound.display_name || "Empty" }}</a></div>\n      <img src="../assets/images/note_placeholder.png" alt="" class="img-responsive"/>\n      <div class="file-info">\n        <div class="audio-tag-wrapper">\n          <audio-file-download params="{id:sound.id,controller:\'stream\'}" resource="Sound"></audio-file-download>\n        </div>\n        <p id="description_div">\n          <a href="#" editable-text="sound.description" onbeforesave="updateAudio(sound.id,{description : $data})">{{ sound.description || "Empty" }}</a>\n        </p>\n        <p class="float-right">\n            <button class="btn btn-xs green-meadow" uib-tooltip-template="\'audioInfoTemplate.html\'"><i class="icon-list"></i></button>\n            <motion-file-download  params="{id:sound.id,controller:\'download\'}" resource="Sound" mimetype="\'audio/\'+sound.original_format" tooltiptext="Download" filename="sound.name+\'.\'+sound.original_format" btnclass="{{downloadButtonClass}}" btncontent=\'{{downloadButtonContent}}\'></motion-file-download>\n            <button uib-tooltip="Delete" class="btn btn-xs red-sunglo" ng-click="delete(sound.display_name, sound.id)" tooltip="Delete"><i class="icon-close" ></i></button>\n        </p>\n      </div>\n    </div>\n  </div>\n  <script type="text/ng-template" id="audioInfoTemplate.html">\n    <div>\n      <ul class="list-unstyled">\n        <li><b>Format : </b>{{sound.original_format}}</li>\n        <li><b>Duration : </b>{{sound.original_duration | date: \'mm:ss\'}}</li>\n        <li><b>Channels : </b>{{sound.original_channelCount}}</li>\n        <li><b>Bitrate : </b>{{sound.original_bitRate/1024}} kbs</li>\n        <li><b>Sample Rate : </b>{{sound.original_sampleRate/1000}} KHz</li>\n      </ul>\n    </div>\n  </script>\n</div>\n<!-- End Audio Portlets -->\n'),
+a.put("app/tools/tag/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TAG\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/tag/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-tag"></i>\n                                      <a href="#">{{ \'APPLICATION_TAGS\' | translate }}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TAGS\' | translate }}</a> </span>\n                              </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TAG\' | translate }}\n                                           </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTag()">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-tag"></i>\n                                      <a href="/tools/tags/list">{{ \'APPLICATION_TAGS\' | translate }}</a>\n                                 <i data-ng-show="tag" class="fa fa-angle-right"></i>\n                          </li>\n                         <li data-ng-show="tag">\n                                       <a href="#">{{tag.name}}</a>\n                          </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/tag.png" class="img-responsive">\n                                </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{tag.name}}\n                                  </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.tags.view.settings\')}">\n                                                   <a data-ng-href="/tools/tags/view/{{tag.id}}/settings">\n                                                       <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.settings.html",'<div class="row">\n <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAG\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateTag()" novalidate>\n\n                                                 <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="tag.name" required/>\n                                                            <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="tag.description"></textarea>\n                                                   </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/template/list/list.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="#">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n        </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-wrench font-green-sharp"></i>\n                                  <span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }}</span>\n                              </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/tools/templates/wizard">\n                                                   <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEMPLATE\' | translate }}\n                                              </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initItem()">\n       <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-docs"></i>\n                                     <a href="/mail/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n                                        <i data-ng-show="item" class="fa fa-angle-right"></i>\n                         </li>\n                         <li data-ng-show="item">\n                                      <a href="#">{{item.name}}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n\n                       <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/template.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{item.name}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.templates.view.settings\')}">\n                                                      <a data-ng-href="/tools/templates/view/{{item.id}}/settings">\n                                                         <i class="icon-settings"></i>\n                                                         {{ \'APPLICATION_SETTINGS\' | translate}}\n                                                     </a>\n                                          </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n\n                          <form name="form" data-ng-submit="form.$valid && updateItem()" class="form-horizontal" novalidate>\n                                    <!-- START NAME -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n                                               <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n                                                                </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n                                                                  <span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <!-- START DESCRIPTION -->\n                                    <div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n                                                <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n                                                             </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n                                                                     <span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <hr>\n\n                                        <!-- START SUBJECT -->\n                                        <div class="form-group row" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n                                                <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-4">\n                                                                        <label class="control-label pull-right">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n                                                              </div>\n                                                                <div class="col-md-8">\n                                                                        <input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n                                                                 <span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END SUJBECT -->\n\n                                        <!-- START HTML -->\n                                   <div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n\n                                         <div class="col-md-4">\n                                                        <div class="portlet light bordered">\n                                                          <div class="portlet-title">\n                                                                   <div class="caption font-green-sharp">\n                                                                                <i class="icon-pencil"></i>{{\'APPLICATION_VARIABLES\' | translate}}\n                                                                  </div>\n                                                                </div>\n                                                                <div class="portlet-body">\n                                                                    <uib-accordion>\n                                                                   <uib-accordion-group heading="{{group.title | translate}}" data-ng-repeat="group in groups">\n                                                                    {{group.content | translate}}\n                                                                                   <ol>\n                                                                                          <li data-ng-repeat="variable in group.variables">\n                                                                                                      {{variable}}\n                                                                                         </li>\n                                                                                 </ol>\n                                                             </uib-accordion-group>\n                                                              </uib-accordion>\n                                                            </div>\n                                                        </div>\n                                                </div>\n                                                <div class="col-md-8">\n                                                        <div class="inbox-editor inbox-wysihtml5" text-angular data-ng-model="item.html" name="html"></div>\n                                                           <span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                               </div>\n                                        </div>\n                                        <!-- END HTML -->\n\n                                   <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                          </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/template/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n        <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-wrench"></i>\n                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                               <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-docs"></i>\n                             <a href="/tools/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n                       </li>\n         </ul>\n </div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="initWizard()">\n      <div class="portlet-title">\n           <div class="caption font-green-sharp">\n                        <i class="icon-docs font-green-sharp"></i>\n                    <span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }} FORM</a> </span>\n            </div>\n        </div>\n        <div class="portlet-body">\n                    <form name="form" data-ng-submit="form.$valid && createItem()" class="form-horizontal" novalidate>\n                            <!-- START HEAD -->\n                           <div class="form">\n                                    <!-- START NAME -->\n                                   <div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n                                               <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n                                                                </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n                                                                  <span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <!-- START DESCRIPTION -->\n                                    <div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n                                                <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n                                                             </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n                                                                     <span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END NAME -->\n\n                                   <!-- START SUBJECT -->\n                                        <div class="form-group" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n                                            <div class="col-md-12">\n                                                       <div class="row">\n                                                             <div class="col-md-1">\n                                                                        <label class="control-label">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n                                                         </div>\n                                                                <div class="col-md-11">\n                                                                       <input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n                                                                 <span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END SUJBECT -->\n\n                                        <!-- START HTML -->\n                                   <div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n                                           <div class="col-md-4">\n                                                        <div class="portlet light bordered">\n                                                          <div class="portlet-title">\n                                                                   <div class="caption font-green-sharp">\n                                                                                <i class="icon-pencil"></i>{{\'APPLICATION_VARIABLES\' | translate}}\n                                                                  </div>\n                                                                </div>\n                                                                <div class="portlet-body">\n                                                                    <uib-accordion>\n                                                                   <uib-accordion-group heading="{{group.title | translate}}" data-ng-repeat="group in groups">\n                                                                    {{group.content | translate}}\n                                                                                   <ol>\n                                                                                          <li data-ng-repeat="variable in group.variables">\n                                                                                                      {{variable}}\n                                                                                         </li>\n                                                                                 </ol>\n                                                             </uib-accordion-group>\n                                                              </uib-accordion>\n                                                            </div>\n                                                        </div>\n                                                </div>\n                                                <div class="col-md-8">\n                                                        <div class="inbox-editor inbox-wysihtml5" text-angular data-ng-model="item.html" name="html"></div>\n                                                           <span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                               </div>\n                                        </div>\n                                        <!-- END HTML -->\n\n                           </div>\n                                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n                       </form>\n       </div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/tools/trigger/list/list.html",'<div class="row">\n       <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-wrench"></i>\n                                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                               <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-bulb"></i>\n                                             <a href="#">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n                                    </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n       <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }}</a> </span>\n                          </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle " href="/tools/triggers/wizard">\n                                                   <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRIGGER\' | translate }}\n                                               </a>\n                                  </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView();">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bulb"></i>\n                                     <a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n                                 <i class="fa fa-angle-right" data-ng-show="trigger"></i>\n                              </li>\n                         <li data-ng-show="trigger">\n                                   <a href="#">{{ trigger.description || trigger.name }}</a>\n                             </li>\n                 </ul>\n         </div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n               <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/trigger.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n\n                                <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{ trigger.name }}\n                                    </div>\n                                        <div class="profile-usertitle-job">\n                                           {{ trigger.description }}\n                                     </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.triggers.view.settings\')}">\n                                                       <a href="/tools/triggers/view/{{trigger.id}}/settings">\n                                                       <i class="icon-bulb"></i>\n                                                     {{ \'APPLICATION_SETTINGS\' | translate }} </a>\n                                               </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.settings.html",'<div class="row">\n     <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n                                </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <!-- <pre>\n                                    {{conditionsData.query | json}}\n                               </pre>\n                                <pre>\n                                 {{actionsData.query | json}}\n                          </pre> -->\n                            <form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateTrigger()" novalidate>\n                               <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trigger.name" required/>\n                                                                <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                              <input\n                                                                bs-switch\n                                                             class="form-control"\n                                                          ng-model="trigger.status"\n                                                             type="checkbox"\n                                                               name="status"\n                                                         switch-active="{{ recordSwitch.isActive }}"\n                                                           switch-on-text="{{ recordSwitch.onText }}"\n                                                            switch-off-text="{{ recordSwitch.offText }}"\n                                                          switch-on-color="{{ recordSwitch.onColor }}"\n                                                          switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                           switch-size="{{ recordSwitch.size }}"\n                                                         switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                         switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                            switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                 </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trigger.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                        <!-- END GENERAL TAB -->\n                                      <div class="tab-pane" id="tab_1_2">\n                                           <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in trigger.All">\n                                                                       <condition-builder element="all" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n                                                                 <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in trigger.Any">\n                                                                       <condition-builder element="any" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n                                                                 <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in trigger.Actions">\n                                                                        <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n                                                                               <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $triggers.services[trigger.channel].actions | filter: $select.search">\n                                                                                         <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n                                                                           <action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n                                                                  </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !trigger.All.length && !trigger.Any.length">\n                                                 <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.general.$submitted && !trigger.Actions.length">\n                                                    <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                  </div>\n                                </div>\n                                </form>\n                       </div>\n                </div>\n        </div>\n</div>\n'),
+a.put("app/tools/trigger/wizard/wizard.html",'<div class="row">\n      <div class="col-md-12">\n               <!-- BEGIN PAGE HEADER-->\n             <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-bulb"></i>\n                                     <a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n                         </li>\n                 </ul>\n         </div>\n                <!-- END PAGE HEADER-->\n\n             <!-- BEGIN  PORTLET-->\n                <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-bulb font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }} WIZARD</span>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n                                     <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n                                              <form name="forms.general" novalidate>\n                                                        <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START STATUS -->\n                                                 <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n                                                      <input\n                                                                    bs-switch\n                                                                         class="form-control"\n                                                              ng-model="item.status"\n                                                                type="checkbox"\n                                                                           name="status"\n                                                                         data-ng-init="item.status = 0"\n                                                                    switch-active="{{ recordSwitch.isActive }}"\n                                                                   switch-on-text="{{ recordSwitch.onText }}"\n                                                                    switch-off-text="{{ recordSwitch.offText }}"\n                                                                  switch-on-color="{{ recordSwitch.onColor }}"\n                                                                  switch-off-color="{{ recordSwitch.offColor }}"\n                                                                switch-animate="{{ recordSwitch.animate }}"\n                                                                   switch-size="{{ recordSwitch.size }}"\n                                                                 switch-label="{{ recordSwitch.label }}"\n                                                               switch-icon="{{ recordSwitch.icon }}"\n                                                                 switch-radio-off="{{ recordSwitch.radioOff }}"\n                                                                switch-label-width="{{ recordSwitch.labelWidth }}"\n                                                                    switch-handle-width="{{ recordSwitch.handleWidth }}">\n                                                     </div>\n                                                        <!-- END STATUS -->\n\n                                                 <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                              </form>\n                                       </wz-step>\n            <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n                                            <form name="forms.settings" novalidate>\n                                               <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n                                                                </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n                                                                   <label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n                                                                    <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n                                                                            <ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                          <ui-select-choices repeat="channel in $triggers.channels | filter: $select.search">\n                                                                                   <div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n                                                                           </ui-select-choices>\n                                                                  </ui-select>\n                                                                  <span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n                                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                 </span>\n                                                               </div>\n                                                        </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="all in item.All">\n                                                                  <condition-builder element="all" serviceindex="item.channel" service="$triggers" form="forms.settings"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'All\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n                                                         </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="any in item.Any">\n                                                                  <condition-builder element="any" serviceindex="item.channel" service="$triggers" form="forms.settings"></condition-builder>\n                                                                   <button type="button" ng-click="removeCondition(\'Any\',$index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                           </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n                                                                  <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n                                                              </button>\n                                                     </div>\n                                                </div>\n                                                <div class="portlet light bordered">\n                                                  <div class="portlet-title">\n                                                           <div class="caption font-blue-hoki">\n                                                                  <i class="icon-tag font-blue-hoki"></i>\n                                                                       <span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n                                                               </div>\n                                                        </div>\n                                                        <div class="portlet-body">\n                                                            <div class="padding-bottom row" ng-repeat="action in item.Actions">\n                                                                   <div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$invalid}">\n                                                                            <ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n                                                                                 <ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n                                                                                       <ui-select-choices repeat="tAction.value as tAction in $triggers.services[item.channel].actions | filter: $select.search">\n                                                                                            <div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n                                                                                       </ui-select-choices>\n                                                                          </ui-select>\n                                                                          <span data-ng-show="(forms.settings[\'action\'+$index].$touched || forms.settings.$submitted) && forms.settings[\'action\'+$index].$error.required" class="help-block help-block-error">\n                                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                                         </span>\n                                                                       </div>\n                                                                        <div ng-switch="action.action">\n                                                                               <action-builder-template ng-switch-when="template" element="action" form="forms.settings"></action-builder-template>\n                                                                          <action-builder-integration ng-switch-when="integration" element="action" form="forms.settings"></action-builder-integration>\n                                                                 </div>\n                                                                        <button type="button" ng-click="removeAction($index)" class="btn btn-danger remove-condition col-md-1 left-margin"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                                                              </div>\n                                                                <button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n                                                                    <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n                                                         </button>\n                                                     </div>\n                                                </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n                                                  </span>\n                                               </div>\n                                                <div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n                                                      <span class="help-block help-block-error form-control">\n                                                               <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n                                                     </span>\n                                               </div>\n                                                <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n                                      </form>\n                                       </wz-step>\n                                    <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n                            </wizard>\n                     </div>\n                </div>\n                <!-- END PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-link"></i>\n                                     <a href="#">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-link font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_TRUNKS\' | translate }}</a> </span>\n                            </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <a class="btn green-jungle" href="/tools/trunks/wizard" data-toggle="dropdown">\n                                               <i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRUNK\' | translate }}\n                                 </a>\n                          </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-link"></i>\n                                     <a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n                                     <i data-ng-show="trunk" class="fa fa-angle-right"></i>\n                                </li>\n                         <li data-ng-show="trunk">\n                                     <a href="#">{{trunk.name}}</a>\n                                </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/trunk.png" class="img-responsive">\n                              </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{trunk.name}}\n                                        </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.trunks.view.settings\')}">\n                                                 <a data-ng-href="/tools/trunks/view/{{trunk.name}}/settings"><i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                             </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TRUNK\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                               </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n                                    </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_OTHER_FIELDS\' | translate}}</a>\n                                        </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body" data-ng-init="getContexts();">\n                              <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateTrunk()" novalidate>\n                                                 <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trunk.name" required readonly/>\n                                                         <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <div class="row">\n                                                             <div class="col-md-6">\n\n                                                      <!-- START HOST -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="trunk.host" required/>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="(forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END HOST -->\n\n                                                   <!-- START SECRET -->\n                                                 <div class="form-group" data-ng-class="{\'has-error\': (forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_SECRET\' | translate}}</label>\n                                                           <input type="password" name="secret" placeholder="{{\'APPLICATION_SECRET\' | translate}}" class="form-control" data-ng-model="trunk.secret">\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n                                                                </span>\n                                                               <span data-ng-show="(forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SECRET -->\n\n                                                 <!-- START CONTEXT -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <ui-select data-ng-model="trunk.context" name="context" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                                                                      <ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n                                                                                <div ng-bind-html="context.name | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_VOICE_CONTEXT\' | translate }}\n                                                         </span>\n                                                               <span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CONTEXT -->\n\n                                                        <!-- START CALLERID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_CALLERID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <input type="text" name="callerid" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder="{{\'APPLICATION_CALLERID\' | translate}}" class="form-control" data-ng-model="trunk.callerid"/>\n                                                              <span class="help-block">\n                                                                             {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" &lt;number&gt;\n                                                                     </span>\n                                                               <span data-ng-show="(forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CALLERID -->\n\n                                                       <!-- START TYPE -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <ui-select data-ng-model="trunk.type" name="type" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'user\',\'peer\',\'friend\'] | filter: $select.search">\n                                                                          <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_TYPE\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="(forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TYPE -->\n\n                                                   <!-- START DTMFMODE -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_DTMFMODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <ui-select data-ng-model="trunk.dtmfmode" name="dtmfmode" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n                                                                   <ui-select-choices repeat="item in [\'rfc2833\', \'info\', \'shortinfo\', \'inband\',\'auto\'] | filter: $select.search">\n                                                                             <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_DTMFMODE\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="(forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DTMFMODE -->\n\n                                               </div>\n                                                <div class="col-md-6">\n\n                                                      <!-- START DEFAULT USER -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT_USER\' | translate}}" class="form-control" data-ng-model="trunk.defaultuser" required/>\n                                                            <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DEFAULT USER -->\n\n                                                   <!-- START NAT -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_NAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select multiple data-ng-model="trunk.nat" name="nat" theme="bootstrap" ui-required="true">\n                                                                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n                                                                           <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_NAT\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAT -->\n\n                                                    <!-- START QUALIFY -->\n                                                        <div class="form-group" data-ng-class="{\'has-error\': (forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$invalid}">\n                                                              <label class="control-label">{{\'APPLICATION_QUALIFY\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                              <ui-select data-ng-model="trunk.qualify" name="qualify" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_QUALIFY\' | translate }}\n                                                               </span>\n                                                               <span data-ng-show="(forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$error.required" class="help-block help-block-error">\n                                                                       <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END QUALIFY -->\n\n                                                        <!-- START ALLOW -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_ALLOW_CODEC\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select multiple data-ng-model="trunk.allow" name="allow" theme="bootstrap" ui-required="true">\n                                                                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'g723\',\'gsm\',\'ulaw\',\'alaw\',\'g726\',\'g722\',\'g729\',\'ilbc\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_ALLOW_CODEC\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$error.required" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END ALLOW -->\n\n                                                  <!-- START INSECURE -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_INSECURE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <ui-select multiple data-ng-model="trunk.insecure" name="insecure" theme="bootstrap" ui-required="true">\n                                                                      <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'port\',\'invite\',\'very\'] | filter: $select.search">\n                                                                          <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_INSECURE\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="(forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END INSECURE -->\n\n                                                       <!-- START CALLLIMIT -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.call_limit.$touched || forms.general.$submitted) && forms.general.call_limit.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_CALLLIMIT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                            <input type="number" min="0" name="call-limit" placeholder="{{\'APPLICATION_CALLLIMIT\' | translate}}" class="form-control" data-ng-model="trunk.call_limit"/>\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_CALLLIMIT\' | translate }}\n                                                             </span>\n                                                               <span data-ng-show="(forms.general.call_limit.$touched || forms.general.$submitted) && forms.general.call_limit.$error.required" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CALLLIMIT -->\n\n                                              </div>\n                                        </div>\n\n                                                      <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trunk.description"></textarea>\n                                                 </div>\n                                                        <!-- END DESCRIPTION -->\n\n                                                    <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n                                      <!-- ADVANCED TAB -->\n                                 <div class="tab-pane" id="tab_1_2">\n                                           <form name="forms.advanced" data-ng-submit="forms.advanced.$valid && updateTrunk()" novalidate>\n                                                       <div class="row">\n                                                             <div class="col-md-6">\n\n                                                      <!-- START REGISTRY -->\n                                                       <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n                                                         <input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="trunk.registry"/>\n                                                               <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n                                                              </span>\n                                                       </div>\n                                                        <!-- END REGISTRY -->\n\n                                                       <!-- START DIRECTMEDIA -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_DIRECTMEDIA\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select data-ng-model="trunk.directmedia" name="directmedia" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\', \'no\', \'nonat\', \'update\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_DIRECTMEDIA\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END DIRECTMEDIA -->\n\n                                                    <!-- START CALLCOUNTER -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_CALLCOUNTER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select data-ng-model="trunk.callcounter" name="callcounter" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_CALLCOUNTER\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END CALLCOUNTER -->\n\n                                                    <!-- START FROMDOMAIN -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromdomain.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_FROMDOMAIN\' | translate}}</label>\n                                                               <input type="text" name="fromdomain" placeholder="{{\'APPLICATION_FROMDOMAIN\' | translate}}" class="form-control" data-ng-model="trunk.fromdomain" />\n                                                                <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_FROMDOMAIN\' | translate }}\n                                                            </span>\n                                                               <span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromdomain.$invalid)" class="help-block help-block-error">\n                                                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END FROMDOMAIN -->\n\n                                                     <!-- START FROMUSER -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromuser.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_FROMUSER\' | translate}}</label>\n                                                         <input type="text" name="fromuser" placeholder="{{\'APPLICATION_FROMUSER\' | translate}}" class="form-control" data-ng-model="trunk.fromuser" />\n                                                              <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_FROMUSER\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromuser.$invalid)" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END FROMUSER -->\n\n                                               </div>\n                                                <div class="col-md-6">\n\n                                                      <!-- START OUTBOUNDPROXY -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.outboundproxy.$invalid}">\n                                                          <label class="control-label">{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}</label>\n                                                            <input type="text" name="outboundproxy" placeholder="{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}" class="form-control" data-ng-model="trunk.outboundproxy" />\n                                                               <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_OUTBOUNDPROXY\' | translate }}\n                                                         </span>\n                                                               <span data-ng-show="forms.advanced.$submitted && (forms.advanced.outboundproxy.$invalid)" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END OUTBOUNDPROXY -->\n\n                                                  <!-- START USEREQPHONE -->\n                                                    <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$invalid}">\n                                                           <label class="control-label">{{\'APPLICATION_USEREQPHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                          <ui-select data-ng-model="trunk.usereqphone" name="usereqphone" theme="bootstrap" required>\n                                                                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_USEREQPHONE\' | translate }}\n                                                           </span>\n                                                               <span data-ng-show="(forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$error.required" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USEREQPHONE -->\n\n                                                    <!-- START TRUSTRPID -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_TRUSTRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                            <ui-select data-ng-model="trunk.trustrpid" name="trustrpid" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_TRUSTRPID\' | translate }}\n                                                             </span>\n                                                               <span data-ng-show="(forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$error.required" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TRUSTRPID -->\n\n                                                      <!-- START SENDRPID -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_SENDRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                             <ui-select data-ng-model="trunk.sendrpid" name="sendrpid" theme="bootstrap" required>\n                                                                 <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_SENDRPID\' | translate }}\n                                                              </span>\n                                                               <span data-ng-show="(forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END SENDRPID -->\n\n                                                       <!-- START ENCRYPTION -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_ENCRYPTION\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                           <ui-select data-ng-model="trunk.encryption" name="encryption" theme="bootstrap" required>\n                                                                     <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_ENCRYPTION\' | translate }}\n                                                            </span>\n                                                               <span data-ng-show="(forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$error.required" class="help-block help-block-error">\n                                                                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END ENCRYPTION -->\n\n                                                     <!-- START PORT -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_PORT\' | translate}}</label>\n                                                             <input type="number" min="0" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="trunk.port"/>\n                                                         <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_PORT\' | translate }}\n                                                          </span>\n                                                               <span data-ng-show="(forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$error.required" class="help-block help-block-error">\n                                                                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PORT -->\n\n                                                   <!-- START TRANSPORT -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$invalid}">\n                                                               <label class="control-label">{{\'APPLICATION_TRANSPORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                            <ui-select multiple data-ng-model="trunk.transport" name="transport" theme="bootstrap" ui-required="true">\n                                                                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n                                                                      <ui-select-choices repeat="item in [\'udp\',\'wss\',\'ws\',\'tcp\',\'tls\'] | filter: $select.search">\n                                                                                <div ng-bind-html="item | highlight: $select.search"></div>\n                                                                   </ui-select-choices>\n                                                          </ui-select>\n                                                          <span class="help-block">\n                                                                     {{ \'DESCRIPTION_TRUNK_TRANSPORT\' | translate }}\n                                                             </span>\n                                                               <span data-ng-show="(forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$error.required" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TRANSPORT -->\n\n                                              </div>\n                                        </div>\n\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n                                     <!-- START OTHER FIELDS TAB -->\n                                       <div class="tab-pane" id="tab_1_3">\n                                           <div class="row">\n                                                     <div class="col-md-6">\n                                                                <!-- START OTHER FIELDS-->\n                                                            <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_OTHER_FIELDS\' | translate}}</label>\n                                                                     <textarea name="otherFields" placeholder="{{\'APPLICATION_OTHER_FIELDS\' | translate}}" class="form-control otherfields-col" data-ng-model="trunk.otherFields"></textarea>\n                                                                    <span class="help-block">\n                                                                             {{ \'DESCRIPTION_TRUNK_OTHER_FIELDS\' | translate }}\n                                                                  </span>\n                                                               </div>\n                                                                <!-- END OTHER FIELDS -->\n                                                     </div>\n                                                        <div class="col-md-6">\n                                                                <div class="form-group">\n                                                                      <label class="control-label">{{\'APPLICATION_EXAMPLE\' | translate}}</label>\n                                                                  <div class="well">\n                                                                            <div>host=dynamicp</div>\n                                                                              <div>secret=********</div>\n                                                                            <div>regcontext=tammari-internal</div>\n                                                                                <div>regexten=1005</div>\n                                                                              <div>dtmfmode=rfc2833</div>\n                                                                           <div>insecure=invite,port</div>\n                                                                               <div>canreinvite=yes</div>\n                                                                            <div>nat=yes</div>\n                                                                            <div>qualify=yes</div>\n                                                                                <div>context=merus-sipphone</div>\n                                                                             <div>pickupgroup=1</div>\n                                                                              <div>callgroup=1</div>\n                                                                                <div>mailbox=1000@default</div>\n                                                                       </div>\n                                                                </div>\n                                                        </div>\n                                                </div>\n                                        </div>\n                                        <!-- END OTHER FIELDS TAB -->\n                         </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
+a.put("app/tools/trunk/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard()">\n      <!-- BEGIN PAGE HEADER-->\n     <div class="page-bar">\n                <ul class="page-breadcrumb">\n                  <li>\n                          <i class="icon-rocket"></i>\n                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                           <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-wrench"></i>\n                           <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                               <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-link"></i>\n                             <a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n                             <i class="fa fa-angle-right"></i>\n                     </li>\n                 <li>\n                          <i class="icon-options"></i>\n                          <a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n                      </li>\n         </ul>\n </div>\n        <!-- END PAGE HEADER-->\n\n     <!-- BEGIN PORTLET-->\n <div class="portlet light bordered">\n          <div class="portlet-title">\n                   <div class="caption font-green-sharp">\n                                <i class="icon-link font-green-sharp"></i>\n                            <span class="caption-subject">{{ \'APPLICATION_TRUNK\' | translate }} WIZARD</a> </span>\n                      </div>\n                </div>\n                <div class="portlet-body">\n                    <wizard on-finish="createItem()">\n                             <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n                                      <form name="forms.general" novalidate>\n\n                                              <!-- START NAME -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.name.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                   <span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END NAME -->\n\n                                           <!-- START HOST -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.host.$invalid}">\n                                                     <label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.host" required/>\n                                                   <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="forms.general.$submitted && forms.general.host.$invalid" class="help-block help-block-error">\n                                                             <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END HOST -->\n\n                                           <!-- START PASSWORD -->\n                                               <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.password.$invalid}">\n                                                 <label class="control-label">{{\'APPLICATION_SECRET\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                       <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.secret" required/>\n                                                     <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n                                                        </span>\n                                                       <span data-ng-show="forms.general.$submitted && forms.general.password.$invalid" class="help-block help-block-error">\n                                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END PASSWORD -->\n\n                                               <!-- START DEFAULT USER -->\n                                           <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n                                                      <label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                 <input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT\' | translate}} {{\'APPLICATION_USER\' | translate}}" class="form-control" data-ng-model="item.defaultuser" required/>\n                                                     <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n                                                  </span>\n                                                       <span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n                                                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n                                                 </span>\n                                               </div>\n                                                <!-- END DEFAULT USER -->\n\n                                           <!-- START DESCRIPTION -->\n                                            <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n                                          </div>\n                                                <!-- END DESCRIPTION -->\n\n                                            <button class="btn green-haze" type="submit" ng-click="next(true)">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                        </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_ADVANCED\' | translate}}" canexit="exitValidation(forms.advanced.$valid)">\n                                    <form name="forms.advanced" novalidate>\n\n                                             <!-- START REGISTRY -->\n                                               <div class="form-group">\n                                                      <label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n                                                 <input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="item.registry"/>\n                                                        <span class="help-block">\n                                                             {{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n                                                      </span>\n                                               </div>\n                                                <!-- END REGISTRY -->\n                                         <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                             <button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n                                    </form>\n                               </wz-step>\n\n                          <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                     <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                    <button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n                                     <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                         </wz-step>\n                    </wizard>\n             </div>\n        </div>\n        <!-- END PORTLET-->\n</div>\n'),a.put("app/tools/variable/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_VARIABLE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/variable/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="#">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n                           </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_VARIABLES\' | translate }}</a> </span>\n                         </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="createItem()">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_VARIABLE\' | translate }}\n                                              </button>\n                                     </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n                            </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getVariable()">\n    <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-wrench"></i>\n                                   <a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n                                       <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-eye"></i>\n                                      <a href="/tools/variables/list">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n                                       <i data-ng-show="variable" class="fa fa-angle-right"></i>\n                             </li>\n                         <li data-ng-show="variable">\n                                  <a href="#">{{variable.name}}</a>\n                             </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/variable.png" class="img-responsive">\n                           </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{variable.name}}\n                                     </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.variables.view.settings\')}">\n                                                      <a data-ng-href="/tools/variables/view/{{variable.id}}/settings">\n                                                     <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.settings.html",'<div class="row">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_VARIABLE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateVariable()" novalidate>\n\n                                                    <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="variable.name" required/>\n                                                               <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="variable.description"></textarea>\n                                                      </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/tools/yourdashboard/list/clone.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_CLONE_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n     <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-screen-desktop"></i>\n                                   <a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-docs font-green-sharp"></i>\n                                    <span class="caption-subject">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <button class="btn green-jungle " ng-click="create()">\n                                                        <i class="icon-plus"></i> {{ \'APPLICATION_NEW_DASHBOARD\' | translate }}\n                                             </button>\n                                     </div>\n                                        <!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/show/show.html",'<div class="row" style="min-height: 466px;">\n  <div class="col-md-12" ng-init="getDashboard()">\n    <adf-dashboard\n    data-ng-if="dashboard"\n    name="{{dashboard.name}}"\n    collapsible="{{dashboard.collapsible}}"\n    maximizable="{{dashboard.maximizable}}"\n    enableconfirmdelete="{{dashboard.enableconfirmdelete}}"\n    structure="{{dashboard.structure}}"\n    editable="{{dashboard.editable}}"\n    adf-model="dashboard.model"/>\n  </div>\n</div>\n'),a.put("app/tools/yourdashboard/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getDashboard()">\n      <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-screen-desktop"></i>\n                                   <a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n                                    <i data-ng-show="dashboard" class="fa fa-angle-right"></i>\n                            </li>\n                         <li data-ng-show="dashboard">\n                                 <a href="#">{{dashboard.name}}</a>\n                            </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img data-ng-src="assets/images/media/dashboard.png" class="img-responsive">\n                          </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{dashboard.name}}\n                                    </div>\n                                        <!-- <div class="profile-usertitle-job">\n                                              {{user.role}}\n                                 </div> -->\n                            </div>\n                                <!-- END SIDEBAR USER TITLE -->\n\n                             <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.tools.yourdashboards.view.settings\')}">\n                                                 <a data-ng-href="/tools/yourdashboards/view/{{dashboard.id}}/settings">\n                                                       <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n                                                </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/view/view.settings.html",'<div class="row">\n       <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_DASHBOARD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n                           </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n\n                      <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.general" data-ng-submit="forms.general.$valid && updateDashboard()" novalidate>\n\n                                                   <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n                                                            <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                                                         <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="dashboard.name" required/>\n                                                              <span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START VISIBLE TO ADMIN -->\n                                                       <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_VISIBLE_TO_ADMIN\' | translate}}</label><br>\n                                                             <input\n                                                                        bs-switch\n                                                                     ng-model="dashboard.admin"\n                                                                    type="checkbox"\n                                                                       switch-active="{{ radioSwitch.isActive }}"\n                                                                    switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                        switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                        switch-on-color="{{ radioSwitch.onColor }}"\n                                                                   switch-off-color="{{ radioSwitch.offColor }}"\n                                                                 switch-animate="{{ radioSwitch.animate }}"\n                                                                    switch-size="{{ radioSwitch.size }}"\n                                                                  switch-label="{{ radioSwitch.label }}"\n                                                                        switch-icon="{{ radioSwitch.icon }}"\n                                                                  switch-radio-off="{{ radioSwitch.radioOff }}"\n                                                                 switch-label-width="{{ radioSwitch.labelWidth }}"\n                                                                     switch-handle-width="{{ radioSwitch.handleWidth }}">\n                                                  </div>\n                                                        <!-- END VISIBLE TO ADMIN -->\n\n                                                       <!-- START VISIBLE TO USER -->\n                                                        <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_VISIBLE_TO_USER\' | translate}}</label><br>\n                                                              <input\n                                                                        bs-switch\n                                                                     ng-model="dashboard.user"\n                                                                     type="checkbox"\n                                                                       switch-active="{{ radioSwitch.isActive }}"\n                                                                    switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                        switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                        switch-on-color="{{ radioSwitch.onColor }}"\n                                                                   switch-off-color="{{ radioSwitch.offColor }}"\n                                                                 switch-animate="{{ radioSwitch.animate }}"\n                                                                    switch-size="{{ radioSwitch.size }}"\n                                                                  switch-label="{{ radioSwitch.label }}"\n                                                                        switch-icon="{{ radioSwitch.icon }}"\n                                                                  switch-radio-off="{{ radioSwitch.radioOff }}"\n                                                                 switch-label-width="{{ radioSwitch.labelWidth }}"\n                                                                     switch-handle-width="{{ radioSwitch.handleWidth }}">\n                                                  </div>\n                                                        <!-- END VISIBLE TO USER -->\n\n                                                        <!-- START VISIBLE TO AGENT -->\n                                                       <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_VISIBLE_TO_AGENT\' | translate}}</label><br>\n                                                             <input\n                                                                        bs-switch\n                                                                     ng-model="dashboard.agent"\n                                                                    type="checkbox"\n                                                                       switch-active="{{ radioSwitch.isActive }}"\n                                                                    switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n                                                                        switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n                                                                        switch-on-color="{{ radioSwitch.onColor }}"\n                                                                   switch-off-color="{{ radioSwitch.offColor }}"\n                                                                 switch-animate="{{ radioSwitch.animate }}"\n                                                                    switch-size="{{ radioSwitch.size }}"\n                                                                  switch-label="{{ radioSwitch.label }}"\n                                                                        switch-icon="{{ radioSwitch.icon }}"\n                                                                  switch-radio-off="{{ radioSwitch.radioOff }}"\n                                                                 switch-label-width="{{ radioSwitch.labelWidth }}"\n                                                                     switch-handle-width="{{ radioSwitch.handleWidth }}">\n                                                  </div>\n                                                        <!-- END VISIBLE TO AGENT -->\n\n                                                       <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="dashboard.description"></textarea>\n                                                     </div>\n                                                        <!-- END DESCRIPTION -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END ADVANCED TAB -->\n\n                           </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/zendesk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <i class="icon-handbag"></i>\n                                  <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n                         </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered" data-ng-init="initView()">\n                        <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-handbag font-green-sharp"></i>\n                                 <span class="caption-subject">{{ \'APPLICATION_ZENDESK\' | translate }}</a> </span>\n                           </div>\n                                <div class="actions">\n                                 <div class="btn-group" data-ng-show="id.length">\n                                              <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                    <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                           </a>\n                                  </div>\n                                        <div class="btn-group">\n                                               <a class="btn green-jungle" href="/zendesk/wizard" data-toggle="dropdown">\n                                                    <i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n                                               </a>\n                                  </div>\n                                </div>\n                        </div>\n                        <div class="portlet-body">\n                            <!-- START TABLE -->\n                          <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                              </div>\n                                <!-- END TABLE -->\n                    </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/view/configuration/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.name.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.name.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/zendesk/view/configuration/list/list.html",'<div ui-view class="profile-content">\n    <div class="row">\n             <div class="col-md-12">\n                       <div class="portlet light" data-ng-init="initView()">\n                         <div class="portlet-title  tabbable-line">\n                                    <div class="caption caption-md">\n                                              <i class="icon-globe theme-font hide"></i>\n                                            <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n                                  </div>\n                                        <div class="actions">\n                                         <div class="btn-group" data-ng-show="id.length">\n                                                      <a class="btn red" href="#" data-ng-click="deleteItems()">\n                                                            <i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n                                                   </a>\n                                          </div>\n                                                <div class="btn-group">\n                                                       <a class="btn green-jungle" href="#" data-ng-click="createItem()">\n                                                            <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n                                                 </a>\n                                          </div>\n                                        </div>\n                                </div>\n                                <div class="portlet-body">\n                                    <!-- START TABLE -->\n                                  <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                                          <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                                      </div>\n                                </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),
+a.put("app/zendesk/view/configuration/view/view.html",'<div class="row" data-ng-init="initView();getConfiguration();getCustomVariables();getFields();getTags();">\n    <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n                            </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n                                      </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n                                  </li>\n          <li>\n                                         <a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n                                       </li>\n                                 <li>\n                                          <a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_TAGS\' | translate}}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- SUBJECT TAB -->\n                                  <div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'subject\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                              <!-- <div id="subject-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n                 <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n                 <div class="col-md-3">\n                  <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n                            <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n                        <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n                    <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.variableName" data-ng-change="updateField(subjectItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n                            <div ng-bind-html="variable.title | highlight: $select.search"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-8" data-ng-if="subjectItem.type==\'customVariable\'">\n                        <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n                        <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n                  </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n                                  <div class="tab-pane ui-padding" id="tab_1_2">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'description\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                                <!-- <div id="description-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n                                                 <div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n                     <div class="col-md-2">\n                  <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.type as item in descFieldType | filter: $select.search">\n                        <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n                    <div class="form-group">\n                        <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n                      </div>\n                      </div>\n                                                          <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n                                                                        <input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n                                                                        <ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n                        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n                            <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                                                          </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'string\'">\n                                                                 <input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n                                                         </div>\n                                                                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'variable\'">\n                       <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.variableName" data-ng-change="updateField(descriptionItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n                            <div ng-bind-html="variable.title | highlight: $select.search"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'customVariable\'">\n                   <div class="form-group">\n                        <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n                        <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n                      </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n                                   <div class="tab-pane ui-padding" id="tab_1_3">\n                                                <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'field\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n                                         <!-- <div id="field-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n                   <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n                     <div class="col-md-3">\n                  <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n                   <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                    <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n                          <div ng-bind-html="item.title | highlight: $select.search"></div>\n                   </ui-select-choices>\n                        </ui-select>\n                </div>\n                <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n                    <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n                               <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                             <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n                                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                                </ui-select>\n                  </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n                                                                 <div class="form-group">\n                                                                              <ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n                           <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n                                    <div ng-bind-html="item.title | highlight: $select.search | ucfirst"></div>\n                                 </ui-select-choices>\n                                </ui-select>\n                                                                  </div>\n                                                                </div>\n                                                                <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n                        <div class="form-group">\n                                                                              <input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n                    </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n                      <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.variableName" data-ng-change="updateField(fieldItem)">\n                       <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n                            <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n                            <div ng-bind-html="variable.title | highlight: $select.search"></div>\n                       </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                                                          <div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'customVariable\'">\n                        <div class="form-group">\n                                                                              <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n                         <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n                     <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n                        <div ng-bind-html="variable.name | highlight: $select.search"></div>\n                        </ui-select-choices>\n                        </ui-select>\n                        </div>\n                      </div>\n                <div class="col-md-1">\n                  <div class="form-group">\n                        <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n                    </div>\n                      </div>\n              </div>\n                                            <!-- </div> -->\n                                       </div>\n                                        <!-- END FIELDS TAB -->\n                                       <!-- TAG TAB -->\n                                      <div class="tab-pane ui-padding" id="tab_1_4">\n                                                <div class="row">\n              <div class="col-md-12">\n                <span class="caption-subject">Select tags that you want add in the ticket:</span>\n              </div>\n            </div>\n            <hr>\n                                               <form name="forms.tags" data-ng-submit="updateTags()" novalidate>\n                                                     <!-- TAG -->\n                                                  <div class="form-group">\n                                                              <ui-select multiple data-ng-model="selectedTags.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                                                                   <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item.name}}</ui-select-match>\n                                                                        <ui-select-choices repeat="tag.id as tag in tags | filter: $select.search">\n                                                                           {{tag.name}}\n                                                                  </ui-select-choices>\n                                                          </ui-select>\n                                                  </div>\n                                                        <!-- END TAG -->\n                                                      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END TAG TAB -->\n                          </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/zendesk/view/view.account.html",'<div class="row">\n      <div class="col-md-12">\n               <div class="portlet light">\n                   <div class="portlet-title tabbable-line">\n                             <div class="caption caption-md">\n                                      <i class="icon-globe theme-font hide"></i>\n                                    <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n                         </div>\n                                <ul class="nav nav-tabs">\n                                     <li class="active">\n                                           <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n                                     </li>\n                         </ul>\n                 </div>\n                        <div class="portlet-body">\n                            <div class="tab-content">\n                                     <!-- GENERAL TAB -->\n                                  <div class="tab-pane active" id="tab_1_1">\n                                            <form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n                                                       <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n                                                                <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n                                                     <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n                                                    </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n                                                                <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n                                                            <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START AUTH TYPE -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n                                                              <ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n                                                                       <ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                        <ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n                                                                               <div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'password\'" lazy-render duration="1">\n                                                               <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n                                                            <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'token\'" lazy-render duration="1">\n                                                             <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n                                                              <span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN -->\n\n                                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n                                          </form>\n                                       </div>\n                                        <!-- END GENERAL TAB -->\n\n                            </div>\n                        </div>\n                </div>\n        </div>\n</div>\n'),a.put("app/zendesk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n        <div class="col-md-12">\n               <div class="page-bar">\n                        <ul class="page-breadcrumb">\n                          <li>\n                                  <i class="icon-rocket"></i>\n                                   <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                   <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n          <i class="icon-handbag"></i>\n          <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n                                 <i class="fa fa-angle-right"></i>\n                             </li>\n                         <li>\n                                  <a href="#">{{account.name}}</a>\n                              </li>\n                 </ul>\n         </div>\n\n              <!-- BEGIN PROFILE SIDEBAR -->\n                <div class="profile-sidebar">\n                 <!-- PORTLET MAIN -->\n                 <div class="portlet light profile-sidebar-portlet">\n                           <!-- SIDEBAR USERPIC -->\n                              <div class="profile-image">\n                                   <img src="assets/images/media/zendesk.png" class="img-responsive">\n                            </div>\n                                <!-- END SIDEBAR USERPIC -->\n                          <!-- SIDEBAR USER TITLE -->\n                           <div class="profile-usertitle">\n                                       <div class="profile-usertitle-name">\n                                          {{account.name}}\n                                      </div>\n                                        <div class="profile-usertitle-job">\n                                           {{account.remoteUri}}\n                                 </div>\n                                </div>\n                                <!-- END SIDEBAR USER TITLE -->\n                               <!-- SIDEBAR MENU -->\n                         <div class="profile-usermenu">\n                                        <ul class="nav">\n                                              <li data-ng-class="{active: $state.is(\'main.zendesk.view.account\')}">\n                                                       <a ng-href="/zendesk/view/{{account.id}}/account">\n                                                    <i class="icon-user"></i>\n                                                     {{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n                                                </li>\n                                         <li data-ng-class="{active: $state.includes(\'main.zendesk.view.configurations\') || $state.is(\'main.zendesk.view.configuration\')}">\n                                                        <a ng-href="/zendesk/view/{{account.id}}/configurations/list">\n                                                        <i class="icon-settings"></i>\n                                                 {{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n                                         </li>\n                                 </ul>\n                         </div>\n                                <!-- END MENU -->\n                     </div>\n                        <!-- END PORTLET MAIN -->\n             </div>\n                <!-- END BEGIN PROFILE SIDEBAR -->\n            <!-- BEGIN PROFILE CONTENT -->\n                <div ui-view class="profile-content">\n         </div>\n                <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n     <div class="col-md-12">\n                       <div class="page-bar">\n                                <ul class="page-breadcrumb">\n                                  <li>\n                                          <i class="icon-rocket"></i>\n                                           <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n                                           <i class="fa fa-angle-right"></i>\n                                     </li>\n                                 <li>\n                                          <i class="icon-handbag"></i>\n                                          <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n                                 </li>\n                         </ul>\n                 </div>\n                </div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n  <div class="col-md-12">\n               <!-- BEGIN Portlet PORTLET-->\n         <div class="portlet light bordered">\n                  <div class="portlet-title">\n                           <div class="caption font-green-sharp">\n                                        <i class="icon-notebook font-green-sharp"></i>\n                                        <span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n                            </div>\n                        </div>\n                        <div class="portlet-body">\n                            <wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n                                                <form name="forms.formSetting" novalidate>\n\n                                                  <!-- START NAME -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n                                                             <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n                                                           <span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                     <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END NAME -->\n\n                                                   <!-- START DESCRIPTION -->\n                                                    <div class="form-group">\n                                                              <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                                                              <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n                                                       </div>\n                                                        <!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/zendesk/accounts/validate/username"/>\n                                                              <span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n                                   <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n                                       </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n                                                  <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n                                                                <label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                              <input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/zendesk/accounts/validate/remoteUri"/>\n                                                          <span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                               <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n                                         <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n                                 </span>\n                                                       </div>\n                                                        <!-- END USERNAME -->\n\n                                                       <!-- START AUTH TYPE -->\n                                                      <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n                                                         <label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n                                                              <ui-select data-ng-model="item.authType" name="authType" theme="bootstrap" required>\n                                                                  <ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n                                                                        <ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n                                                                               <div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n                                                                      </ui-select-choices>\n                                                          </ui-select>\n                                                          <span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n                                                     <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="item.authType == \'password\'" lazy-render duration="1">\n                                                          <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                            <input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                                                               <span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                 <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n                                                   <div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="item.authType == \'token\'" lazy-render duration="1">\n                                                                <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n                                                               <input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.token" required/>\n                                                         <span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n                                                                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                                                         </span>\n                                                       </div>\n                                                        <!-- END TOKEN -->\n\n                                                  <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n                                               </form>\n                                       </wz-step>\n\n                                  <wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n                                             <p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n                                            <input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n                                 </wz-step>\n\n                          </wizard>\n\n                   </div>\n                </div>\n                <!-- END Portlet PORTLET-->\n   </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("components/footer/footer.html",'<!-- BEGIN FOOTER -->\n<div class="page-footer" data-ng-init="initFooter()">\n  <div class="page-footer-inner">\n     xCALLY Motion v. {{info.version}} | {{year}} - {{year + 1}} &copy; Powered by Xenialab\n  </div>\n  <div class="scroll-to-top">\n    <i class="icon-arrow-up"></i>\n  </div>\n</div>\n<!-- END FOOTER -->\n'),a.put("components/header/header.html",'<!-- BEGIN HEADER INNER -->\n<div class="page-header-inner" data-ng-init="initHeader()">\n  <!-- BEGIN LOGO -->\n  <div class="page-logo">\n    <a href="/">\n      <img src="assets/images/logo.png" alt="logo" class="logo-default"/>\n    </a>\n    <div class="menu-toggler sidebar-toggler" data-ng-click="toogleSidebar()">\n      <!-- DOC: Remove the above "hide" to enable the sidebar toggler button on header -->\n    </div>\n  </div>\n  <!-- END LOGO -->\n  <!-- BEGIN HEADER SEARCH BOX -->\n  <!-- DOC: Apply "search-form-expanded" right after the "search-form" class to have half expanded search box -->\n  <form class="search-form hide" action="extra_search.html" method="GET">\n    <div class="input-group">\n      <input type="text" class="form-control" placeholder="Search..." name="query">\n      <span class="input-group-btn">\n        <a href="javascript:;" class="btn submit"><i class="icon-magnifier"></i></a>\n      </span>\n    </div>\n  </form>\n  <!-- END HEADER SEARCH BOX -->\n  <!-- BEGIN RESPONSIVE MENU TOGGLER -->\n  <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse">\n  </a>\n  <!-- END RESPONSIVE MENU TOGGLER -->\n  <!-- BEGIN TOP NAVIGATION MENU -->\n  <div class="top-menu">\n    <ul class="nav navbar-nav pull-right">\n      <!-- BEGIN LANGUAGE BAR -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-language">\n        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n          <img ng-src="assets/images/flags/{{ language }}.png">\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default">\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ar\')">\n              <img alt="" src="assets/images/flags/ar.png"> {{\'APPLICATION_ARABIC\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'de\')">\n              <img alt="" src="assets/images/flags/de.png"> {{\'APPLICATION_GERMAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'en_EN\')">\n              <img alt="" src="assets/images/flags/en_EN.png"> {{\'APPLICATION_ENGLISH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'es\')">\n              <img alt="" src="assets/images/flags/es.png"> {{\'APPLICATION_SPANISH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'fr\')">\n              <img alt="" src="assets/images/flags/fr.png"> {{\'APPLICATION_FRENCH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'it\')">\n              <img alt="" src="assets/images/flags/it.png"> {{\'APPLICATION_ITALIAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ja\')">\n              <img alt="" src="assets/images/flags/ja.png"> {{\'APPLICATION_JAPANASE\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ko\')">\n              <img alt="" src="assets/images/flags/ko.png"> {{\'APPLICATION_KOREAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'pt\')">\n              <img alt="" src="assets/images/flags/pt.png"> {{\'APPLICATION_PORTUGUESE\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'ru\')">\n              <img alt="" src="assets/images/flags/ru.png"> {{\'APPLICATION_RUSSIAN\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'sv\')">\n              <img alt="" src="assets/images/flags/sv.png"> {{\'APPLICATION_SWEDISH\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'zh-CN\')">\n              <img alt="" src="assets/images/flags/zh-CN.png"> {{\'APPLICATION_CHINESE_SIMPLIFIED\' | translate}}\n            </a>\n          </li>\n          <li>\n            <a href="#" ng-click="changeLanguage(\'zh-TW\')">\n              <img alt="" src="assets/images/flags/zh-TW.png"> {{\'APPLICATION_CHINESE_TRADITIONAL\' | translate}}\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END LANGUAGE BAR -->\n      <!-- BEGIN USER LOGIN DROPDOWN -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-user">\n        <a href="#" class="dropdown-toggle" dropdown-menu-hover data-toggle="dropdown" data-close-others="true">\n          <img class="img-circle" data-ng-src="api/users/avatar/{{getCurrentUser().userpic || \'unknown_avatar\'}}" alt="...">\n          <span class="username username-hide-on-mobile">\n            {{ getCurrentUser().fullname }}\n          </span>\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default">\n          <li>\n            <a ng-href=" {{isAdmin() ? \'/staff/users/view/\'+getCurrentUser().id+\'/account\' : \'/staff/agents/view/\'+getCurrentUser().id+\'/account\'}}">\n              <i class="icon-key"></i>{{\'APPLICATION_CHANGE_PASSWORD\' | translate}}\n            </a>\n          </li>\n          <li data-ng-click="logout()">\n            <a href="#">\n              <i class="icon-logout"></i> Log Out\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END USER LOGIN DROPDOWN -->\n      <!-- BEGIN QUICK SIDEBAR TOGGLER -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-quick-sidebar-toggler" data-ng-click="toggleQuickSidebar()">\n        <a href="#" class="dropdown-toggle">\n          <i class="icon-logout"></i>\n        </a>\n      </li>\n      <!-- END QUICK SIDEBAR TOGGLER -->\n    </ul>\n  </div>\n  <!-- END TOP NAVIGATION MENU -->\n</div>\n<!-- END HEADER INNER -->\n'),a.put("components/modal/delete.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text" ng-bind="modal.text"></p>\n  <div ng-if="modal.html" ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("components/quickSidebar/modal/add.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n\n<div class="modal-body">\n  <div class="portlet box blue">\n              <div class="portlet-title">\n                   <div class="caption">\n                         <i class="icon-people"></i>{{\'APPLICATION_SELECTED_AGENTS\' | translate}}\n                    </div>\n                </div>\n                <div class="portlet-body">\n                    <ul>\n                          <li data-ng-repeat="item in items">\n                                    {{item.fullname}}\n                            </li>\n\n        <li data-ng-repeat="item in selected.items">\n                                  {{item.fullname}}\n                            </li>\n                 </ul>\n         </div>\n        </div>\n\n  <ui-select multiple name="items" ng-model="selected.items" theme="bootstrap">\n    <ui-select-match placeholder="{{\'APPLICATION_SELECTED_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n    <ui-select-choices repeat="{id: agent.id, fullname: agent.fullname} as agent in agents.rows | filter: $select.search">\n      {{agent.fullname}}\n    </ui-select-choices>\n  </ui-select>\n</div>\n\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="selected.items.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("components/quickSidebar/modal/close.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text" ng-bind="modal.text | translate"></p>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),a.put("components/quickSidebar/quickSidebar.html",'<div class="page-quick-sidebar">\n  <div class="nav-justified">\n    <ul class="nav nav-tabs nav-justified">\n      <li data-ng-class="{active:currentTab==0}" data-ng-click="goToTab(0)">\n        <a href="#">\n          <i class="icon-people"></i>\n        </a>\n      </li>\n      <li data-ng-class="{active:currentTab==1}" data-ng-click="goToTab(1)">\n        <a href="#">\n        <i class="icon-eye"></i>\n        </a>\n      </li>\n      <li data-ng-class="{active:currentTab==2}" data-ng-click="goToTab(2)">\n        <a href="#">\n        <i class="icon-globe"></i>\n        </a>\n      </li>\n      <li data-ng-class="{active:currentTab==3}" data-ng-click="goToTab(3)">\n        <a href="#">\n        <i class="icon-bubbles"></i>\n        </a>\n      </li>\n    </ul>\n    <div class="tab-content">\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==0 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list" >\n          <div class="quicksidebar-search">\n            <div class="input-group">\n                                                       <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_AGENT\' | translate}}..." ng-model="searchAgent">\n                                                       <span class="input-group-btn">\n                                                        <i class="icon-magnifier"></i>\n                                                        </span>\n                                               </div>\n          </div>\n          <ul class="media-list list-items" data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="agent in agents.rows | orderBy:\'-online\' | filter:searchAgent as resultsAgent" data-ng-if="agent.id !== currentUser.id">\n              <img class="media-object" data-ng-src="api/users/avatar/{{agent.userpic ? agent.userpic : \'unknown_avatar\'}}" alt="{{agent.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(agent.id)">\n                <h4 class="media-heading"><span class="item-status">{{agent.fullname | characters:15 :true}} {{agent.internal}}</h4>\n                <div class="media-heading-small">\n                   <span class="badge badge-empty" data-ng-class="agent.online ? \'badge-success\' : \'badge-danger\'"></span></span> {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{agent.updatedAt}}">April 1, 2014</time>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="agents.rows.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_AGENTS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="resultsAgent.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_AGENTS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==1 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list">\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_USER\' | translate}}..." ng-model="searchUser">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n          <ul class="media-list list-items"  data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="user in users.rows | orderBy:\'-online\' | filter:searchUser as resultsUser" data-ng-if="user.id !== currentUser.id">\n              <img class="media-object" data-ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" alt="{{user.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(user.id)">\n                <h4 class="media-heading">{{user.fullname | characters:15 :true}} {{user.internal}}</h4>\n                <div class="media-heading-small">\n                   <span class="badge badge-empty" data-ng-class="user.online ? \'badge-success\' : \'badge-danger\'"></span> {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{user.updatedAt}}">April 1, 2014</time>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="users.rows.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_USERS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n            <li class="media animate-repeat" ng-if="resultsUser.length == 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_USERS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==2 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list">\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_CHAT\' | translate}}..." data-ng-model="searchChatRoomsExternals">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n          <ul class="media-list list-items"  data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="chatRoom in chatRooms | QuickSidebarFilterUsersLowerThan:2 | filter:{type:\'external\'} | filter:searchChatRoomsExternals as resultsChatRoomsExternals">\n              <div class="media-status">\n                <i class="icon icon-close" data-ng-show="chatRoom.status === \'CLOSED\'"></i>\n              </div>\n              <img class="media-object" data-ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" alt="{{user.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(null, chatRoom.id)">\n                <h4 class="media-heading">{{chatRoom.ChatVisitor.fullname}}</h4>\n                <div class="media-heading-small">\n                   {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{chatRoom.createdAt}}">April 1, 2014</time>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" data-ng-if="resultsChatRoomsExternals.length === 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_CHATS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat" ng-class="{active:currentTab==3 && !messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list">\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_GROUP\' | translate}}..." data-ng-model="searchChatRoomsGroups">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n          <ul class="media-list list-items"  data-ng-style="style" ng-scrollbars>\n            <li class="media animate-repeat" data-ng-repeat="chatRoom in chatRooms | QuickSidebarFilterUsersGreaterThan:2 | filter:searchChatRoomsGroups as resultsChatRoomsGroups">\n              <img class="media-object" data-ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" alt="{{user.fullname}}">\n              <div class="media-body" data-ng-click="goToMessage(null, chatRoom.id)">\n                <h4 class="media-heading">{{chatRoom.ChatVisitor.fullname}}</h4>\n                <div class="media-heading-small">\n                   {{\'APPLICATION_LAST_SEEN\' | translate | lowercase}} <time is="relative-time" datetime="{{chatRoom.updatedAt}}">April 1, 2014</time>\n                </div>\n                <div class="media-heading-small">\n                  <div data-ng-repeat="user in chatRoom.Users | map: \'fullname\'" class="inline">\n                    {{ $last ? user : user + \', \'}}\n                  </div>\n                </div>\n              </div>\n            </li>\n            <li class="media animate-repeat" data-ng-if="resultsChatRoomsGroups.length === 0">\n              <div class="media-body" style="text-align: center;">\n                <h4 class="media-heading"><i>{{\'MESSAGE_NO_CHATS_FOUND\' | translate | lowercase}}</i></h4>\n              </div>\n            </li>\n          </ul>\n        </div>\n      </div>\n      <div class="tab-pane page-quick-sidebar-chat page-quick-sidebar-content-item-shown" ng-class="{active:messagesTab}">\n        <div class="page-quick-sidebar-chat-users" data-rail-color="#ddd" data-wrapper-class="page-quick-sidebar-list" >\n          <div class="quicksidebar-search">\n            <div class="input-group">\n              <input type="search" class="form-control" placeholder="{{\'APPLICATION_SEARCH\' | translate}} {{\'APPLICATION_CHAT\' | translate}}..." ng-model="searchMessage">\n              <span class="input-group-btn">\n              <i class="icon-magnifier"></i>\n              </span>\n            </div>\n          </div>\n        </div>\n        <div class="page-quick-sidebar-item">\n          <div class="page-quick-sidebar-chat-user" data-wrapper-class="page-quick-sidebar-list">\n            <div class="page-quick-sidebar-nav">\n                <a href="#" class="page-quick-sidebar-back-to-list" data-ng-click="goBack()"><i class="icon-arrow-left"></i>Back</a>\n            </div>\n            <div id="page-quick-sidebar-chat-user-messages" class="page-quick-sidebar-chat-user-messages" data-ng-style="style2" ng-scrollbars>\n              <div class="post animate-repeat" data-ng-repeat="chatMessage in chatRoom.ChatMessages | filter:searchMessage as resultsMessage" data-ng-class="chatMessage.UserId === currentUser.id ? \'in\' : \'out\'">\n                <img class="avatar" alt="" ng-src="api/users/avatar/unknown_avatar"/>\n                <div class="message">\n                  <span class="arrow"></span>\n                  <a href="#" class="name">{{chatMessage.User.fullname || chatMessage.ChatVisitor .fullname}}</a> -\n                  <span class="datetime">\n                    <time is="relative-time" datetime="{{chatMessage.createdAt}}">\n                      April 1, 2014\n                    </time>\n                  </span>\n                  <ng-emoticons class="body" emoticons-data="chatMessage.body" emoticons-options="options"/>\n                </div>\n              </div>\n\n              <div class="media-body" style="text-align: center;" data-ng-if="resultsMessage.length == 0">\n                <h5 class="media-heading"><i>{{\'MESSAGE_NO_MESSAGES_FOUND\' | translate | lowercase}}</i></h5>\n              </div>\n\n              <div class="media-body" style="text-align: center;" data-ng-if="chatRoom.status === \'CLOSED\'">\n                <h5 class="media-heading"><i>{{\'MESSAGE_CHAT_CLOSED\' | translate | lowercase}}</i></h5>\n              </div>\n\n            </div>\n            <div class="page-quick-sidebar-chat-user-form">\n              <textarea rows="3" class="form-control" style="border:none;resize: none;" placeholder="Type a message here..." ng-enter="sendMessage()" data-ng-model="message.body" data-ng-disabled="chatRoom.status === \'CLOSED\'"></textarea>\n              <div class="btn-group" style="width:100%;background-color:white">\n                <button type="button" class="btn btn-default" style="border:none" data-ng-disabled="chatRoom.status === \'CLOSED\'" data-ng-click="addAgent(chatRoom.id)"><i class="icon-plus font-blue"></i></button>\n                <button type="button" class="btn btn-default pull-right" style="border:none" data-ng-disabled="chatRoom.status === \'CLOSED\'" data-ng-click="closeChatRoom(chatRoom.id)" data-ng-show="chatRoom.type === \'external\'"><i class="icon-close font-red"></i></button>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n'),a.put("components/sidebar/sidebar.html",'<div id="page-sidebar" class="page-sidebar navbar-collapse collapse">\n  <!-- BEGIN SIDEBAR MENU -->\n  <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) -->\n  <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode -->\n  <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode -->\n  <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->\n  <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded -->\n  <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed -->\n  <ul data-ng-click="mainTab.active=true" class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" data-ng-class="{\'page-sidebar-menu-closed\': settings.layout.pageSidebarClosed}" data-ng-init="getSidebarIntegrations()">\n    <!-- DOC: To remove the search box from the sidebar you just need to completely remove the below "sidebar-search-wrapper" LI element -->\n    <li class="sidebar-search-wrapper">\n      <!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->\n      <!-- DOC: Apply "sidebar-search-bordered" class the below search form to have bordered search box -->\n      <!-- DOC: Apply "sidebar-search-bordered sidebar-search-solid" class the below search form to have bordered & solid search box -->\n      <form class="sidebar-search sidebar-search-bordered" action="extra_search.html" method="POST">\n        <a href="javascript:;" class="remove">\n          <i class="icon-close"></i>\n        </a>\n      </form>\n      <!-- END RESPONSIVE QUICK SEARCH FORM -->\n    </li>\n\n    <!-- START DASHBOARD CASE -->\n    <li class="start" data-ng-class="{active: $state.includes(\'main.dashboard\')}">\n      <a href="/dashboard/channels/voice">\n        <i class="icon-rocket"></i>\n        <span class="title">{{\'APPLICATION_DASHBOARD\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.dashboard\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END DASHBOARD CASE -->\n\n    <!-- START YOURDASHBOARD LIST CASE -->\n    <li data-ng-class="{active: $state.is(\'main.tools.yourdashboards.show\')}" data-ng-show="Auth.isAdmin()">\n      <a href="javascript:;">\n        <i class="icon-screen-desktop"></i>\n        <span class="title" >{{\'APPLICATION_YOUR_DASHBOARDS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools.yourdashboards.show\') }"></span>\n      </a>\n      <ul class="sub-menu" data-ng-init="getSidebarDashboards()">\n        <li data-ng-class="{active: $stateParams.id == dashboard.id && $state.includes(\'main.tools.yourdashboards.show\')}" data-ng-repeat="dashboard in dashboards" data-ng-show="dashboard[Auth.getRole()] && dashboard.visible">\n          <a href="/tools/yourdashboards/show/{{dashboard.id}}" >\n            <i class="icon-screen-tablet"></i>\n            <span class="title" >{{dashboard.name}}  </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END YOURDASHBOARD LIST CASE -->\n\n    <!-- START STAFF LIST CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.staff\')}" data-ng-show="Auth.isAdmin()">\n      <a href="javascript:;">\n        <i class="icon-puzzle"></i>\n        <span class="title" >{{\'APPLICATION_STAFF\' | translate}}</span>\n        <span class="arrow" data-ng-class="{open: $state.includes(\'main.staff\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <!-- START USERS CASE -->\n        <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.staff.users\')}">\n          <a href="/staff/users/list">\n            <i class="icon-eye"></i>\n            <span class="title" >{{\'APPLICATION_USERS\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.users\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END USERS CASE -->\n\n        <!-- START AGENTS CASE -->\n        <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.staff.agents\')}">\n          <a href="/staff/agents/list">\n            <i class="icon-people"></i>\n            <span class="title" >{{\'APPLICATION_AGENTS\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.agents\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END AGENTS CASE -->\n\n        <!-- START AGENTS CASE -->\n        <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.staff.telephones\')}">\n          <a href="/staff/telephones/list">\n            <i class="icon-phone"></i>\n            <span class="title" >{{\'APPLICATION_TELEPHONES\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.telephones\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END AGENTS CASE -->\n\n        <!-- START TEAMS CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.staff.teams\')}">\n          <a href="/staff/teams/list">\n            <i class="icon-shield"></i>\n            <span class="title" >{{\'APPLICATION_TEAMS\' | translate}}</span>\n            <span data-ng-show="$state.includes(\'main.staff.teams\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END TEAMS CASE -->\n      </ul>\n    </li>\n    <!-- END STAFF LIST CASE -->\n\n    <!-- START CONTACT MANAGER LIST CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.contactmanager.contacts\')\n    || $state.includes(\'main.contactmanager.companies\')\n    || $state.includes(\'main.contactmanager.services\')}" data-ng-show="Auth.isAdmin()">\n    <a href="javascript:;">\n      <i class="icon-notebook"></i>\n      <span class="title" >{{\'APPLICATION_CONTACT_MANAGER\' | translate}}</span>\n      <span class="arrow" data-ng-class="{ open: $state.includes(\'main.contactmanager.contacts\')\n      || $state.includes(\'main.contactmanager.companies\')\n      || $state.includes(\'main.contactmanager.services\') }"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START CONTACTS CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.contactmanager.contacts\')}">\n        <a href="/contactmanager/contacts/list">\n          <i class=" fa fa-users"></i>\n          <span class="title" >{{\'APPLICATION_CONTACTS\' | translate}}</span>\n          <span data-ng-show="$state.includes(\'main.contactmanager.contacts\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END CONTACTS CASE -->\n      <!-- START COMPANIES CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.contactmanager.companies\')}">\n        <a href="/contactmanager/companies/list">\n          <i class="icon-briefcase"></i>\n          <span class="title" >{{\'APPLICATION_COMPANIES\' | translate}}</span>\n          <span data-ng-show="$state.includes(\'main.contactmanager.companies\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END COMPANIES CASE -->\n      <!-- START SERVICES CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.contactmanager.services\')}">\n        <a href="/contactmanager/services/list">\n          <i class="fa fa-tty"></i>\n          <span class="title" >{{\'APPLICATION_SERVICES\' | translate}}</span>\n          <span data-ng-show="$state.includes(\'main.contactmanager.services\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END SERVICES CASE -->\n    </ul>\n  </li>\n  <!-- END CONTACT MANAGER LIST CASE -->\n\n  <!-- START CHANNEL LIST CASE -->\n  <li data-ng-class="{active: $state.includes(\'main.channels\')}">\n    <a href="javascript:;">\n      <i class="icon-directions"></i>\n      <span class="title" >{{\'APPLICATION_CHANNELS\' | translate}}</span>\n      <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels\')}"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START VOICE CASE -->\n      <li data-ng-show="Auth.isAdmin()" data-ng-class="{ active: $state.includes(\'main.channels.voice\') }">\n        <a href="javascript:;">\n          <i class="icon-earphones-alt"></i>\n          <span class="title">{{ \'APPLICATION_VOICE\' | translate}}</span>\n          <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice\') }"></span>\n        </a>\n\n        <ul class="sub-menu">\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.queues\')}">\n            <a href="/channels/voice/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title">{{\'APPLICATION_QUEUES\' | translate}}</span>\n            </a>\n          </li>\n          <li>\n            <a href="javascript:;">\n              <i class="icon-directions"></i>\n              <span class="title"> {{ \'APPLICATION_ROUTES\' | translate}} </span>\n              <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice.routes\') }"></span>\n              <ul class="sub-menu">\n                <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.inbound\')}">\n                  <a href="/channels/voice/routes/inbound/list">\n                    <i class="icon-call-in"></i>\n                    <span class="title"> {{\'APPLICATION_INBOUND\' | translate}} </span>\n                  </a>\n                </li>\n                <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.outbound\')}">\n                  <a href="/channels/voice/routes/outbound/list">\n                    <i class="icon-call-out"></i>\n                    <span class="title"> {{\'APPLICATION_OUTBOUND\' | translate}} </span>\n                  </a>\n                </li>\n                <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.internal\')}">\n                  <a href="/channels/voice/routes/internal/list">\n                    <i class="icon-reload"></i>\n                    <span class="title"> {{\'APPLICATION_INTERNALS\' | translate}} </span>\n                  </a>\n                </li>\n              </ul>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.contexts\')}">\n            <a href="/channels/voice/contexts/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{\'APPLICATION_CONTEXTS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.voicemails\')}">\n            <a href="/channels/voice/voicemails/list">\n              <i class="icon-envelope-letter"></i>\n              <span class="title"> {{\'APPLICATION_VOICEMAILS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.mohs\')}">\n            <a href="/channels/voice/mohs/list">\n              <i class="icon-music-tone"></i>\n              <span class="title"> {{\'APPLICATION_MOH\' | translate}} </span>\n            </a>\n          </li>\n          <!-- START RECORDING CASE -->\n          <li data-ng-class="{active: $state.includes(\'main.channels.voice.recordings\')}">\n            <a href="/channels/voice/recordings/list">\n              <i class="icon-control-play"></i>\n              <span class="title">{{\'APPLICATION_RECORDINGS\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END RECORDING CASE -->\n          <!-- START REALTIME CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.voice.realtime\')}">\n            <a href="/channels/voice/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END REALTIME CASE -->\n          <!-- START CHANSPY CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.voice.chanspy\')}">\n            <a href="/channels/voice/chanspy/list">\n              <i class="icon-magnifier"></i>\n              <span class="title" >{{\'APPLICATION_CHANSPY\' | translate}}</span>\n              <!-- <span data-ng-show="$state.includes(\'main.chanspy\')" class="selected"></span> -->\n            </a>\n          </li>\n          <!-- END CHANSPY CASE -->\n        </ul>\n      </li>\n      <!-- END VOICE CASE -->\n\n      <!-- START CHAT CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.channels.chat\')}" data-ng-if="license.chat && Auth.isAdmin()">\n        <a href="javascript:;">\n          <i class="icon-bubble"></i>\n          <span class="title">{{\'APPLICATION_CHAT\' | translate}}</span>\n          <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels.chat\')}"></span>\n        </a>\n        <ul class="sub-menu">\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.websites\')}">\n            <a href="/channels/chat/websites/list">\n              <i class="icon-globe"></i>\n              <span class="title"> {{\'APPLICATION_WEB_SITES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.queues\')}">\n            <a href="/channels/chat/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.online\')}">\n            <a href="/channels/chat/online/list">\n              <i class="icon-login"></i>\n              <span class="title"> {{\'APPLICATION_ONLINE_MESSAGES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.offline\')}">\n            <a href="/channels/chat/offline/list">\n              <i class="icon-logout"></i>\n              <span class="title"> {{\'APPLICATION_OFFLINE_MESSAGES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.chat.realtime\')}">\n            <a href="/channels/chat/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END CHAT CASE -->\n\n      <!-- START MAIL CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.channels.mail\')}" data-ng-if="license.mail">\n        <a href="javascript:;">\n          <i class="icon-envelope"></i>\n          <span class="title">{{\'APPLICATION_MAIL\' | translate}}</span>\n          <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.mail\') }"></span>\n        </a>\n\n        <ul class="sub-menu">\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.mail.accounts\') || $state.includes(\'main.channels.mail.account\')}">\n            <a href="/channels/mail/accounts/list">\n              <i class="icon-notebook"></i>\n              <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.mail.queues\') || $state.includes(\'main.channels.mail.queue\')}">\n            <a href="/channels/mail/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.mail.inbox\')}">\n            <a href="/channels/mail/inbox/list">\n              <i class="icon-note"></i>\n              <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n            </a>\n          </li>\n          <!-- START REALTIME CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.mail.realtime\')}">\n            <a href="/channels/mail/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END REALTIME CASE -->\n        </ul>\n      </li>\n      <!-- END MAIL CASE -->\n\n      <!-- START FAX CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.channels.fax\')}" data-ng-if="license.fax">\n        <a href="javascript:;">\n          <i class="icon-paper-plane"></i>\n          <span class="title"> {{ \'APPLICATION_FAX\' | translate}}</span>\n          <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.fax\') }"></span>\n        </a>\n        <ul class="sub-menu">\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.fax.accounts\')}">\n            <a href="/channels/fax/accounts/list">\n              <i class="icon-notebook"></i>\n              <span class="title"> {{ \'APPLICATION_ACCOUNTS\' | translate}} </span>\n            </a>\n          </li>\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.fax.queues\')}">\n            <a href="/channels/fax/queues/list">\n              <i class="icon-docs"></i>\n              <span class="title"> {{ \'APPLICATION_QUEUES\' | translate }} </span>\n            </a>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.fax.inbox\')}">\n            <a href="/channels/fax/inbox/incoming">\n              <i class="icon-note"></i>\n              <span class="title"> {{ \'APPLICATION_INBOX\' | translate }} </span>\n            </a>\n          </li>\n          <!-- START REALTIME CASE -->\n          <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.channels.fax.realtime\')}">\n            <a href="/channels/fax/realtime/view/agents">\n              <i class="icon-energy"></i>\n              <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n            </a>\n          </li>\n          <!-- END REALTIME CASE -->\n        </ul>\n      </li>\n      <!-- END FAX CASE -->\n    </ul>\n  </li>\n  <!-- END CHANNEL LIST CASE -->\n\n  <!-- START CALLYSQUARE CASE -->\n  <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.square\')}">\n    <a href="javascript:;">\n      <i class="fa fa-superscript"></i>\n      <span class="title" >{{\'APPLICATION_CALLYSQUARE\' | translate}}</span>\n      <span class="arrow"></span>\n    </a>\n    <ul class="sub-menu">\n      <li data-ng-class="{active: $state.includes(\'main.square.projects\')}">\n        <a href="/square/projects/list">\n          <i class="fa fa-slack"></i>\n          <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}}  </span>\n        </a>\n      </li>\n      <li data-ng-class="{active: $state.includes(\'main.square.odbc\')}">\n        <a href="/square/odbc/list">\n          <i class="fa fa-database"></i>\n          <span class="title" >{{\'APPLICATION_ODBC\' | translate}}  </span>\n        </a>\n      </li>\n    </ul>\n  </li>\n  <!-- END CALLYSQUARE CASE -->\n\n  <!-- START ANALYTIC LIST CASE -->\n  <li data-ng-class="{active: $state.includes(\'main.analytics.reports\')\n  || $state.includes(\'main.analytics.extracted\')\n  || $state.includes(\'main.analytics.metrics\')}" data-ng-show="Auth.isAdmin()">\n  <a href="javascript:;">\n    <i class="icon-calculator"></i>\n    <span class="title" >{{\'APPLICATION_ANALYTICS\' | translate}}</span>\n    <span class="arrow" data-ng-class="{ open: $state.includes(\'main.analytics.reports\')\n    || $state.includes(\'main.analytics.extracted\')\n    || $state.includes(\'main.analytics.metrics\') }"></span>\n  </a>\n  <ul class="sub-menu">\n    <!-- START REPORT CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.analytics.reports\')}">\n      <a href="/analytics/reports/list">\n        <i class="icon-book-open"></i>\n        <span class="title" >{{\'APPLICATION_REPORTS\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.analytics.reports\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END REPORT CASE -->\n    <!-- START EXTRA REPORT CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.analytics.extracted\')}">\n      <a href="/analytics/extracted/list">\n        <i class="fa fa-file-pdf-o"></i>\n        <span class="title" >{{\'APPLICATION_EXTRACTED_REPORTS\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.analytics.extracted\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END EXTRA REPORT CASE -->\n    <!-- START METRICS CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.analytics.metrics\')}">\n      <a href="/analytics/metrics/list">\n        <i class="icon-calculator"></i>\n        <span class="title" >{{\'APPLICATION_METRICS\' | translate}}</span>\n        <span data-ng-show="$state.includes(\'main.metrics.reports\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END METRICS CASE -->\n  </ul>\n</li>\n<!-- END ANALYTIC LIST CASE -->\n\n<!-- START TOOLS LIST CASE -->\n<li data-ng-class="{active: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}" data-ng-show="Auth.isAdmin()">\n  <a href="javascript:;">\n    <i class="icon-wrench"></i>\n    <span class="title" >{{\'APPLICATION_TOOLS\' | translate}}</span>\n    <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}"></span>\n  </a>\n  <ul class="sub-menu">\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.triggers\')}">\n      <a href="/tools/triggers/list">\n        <i class="icon-bulb"></i>\n        <span class="title"> {{\'APPLICATION_TRIGGERS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.automations\')}">\n      <a href="/tools/automations/list">\n        <i class="icon-settings"></i>\n        <span class="title"> {{\'APPLICATION_AUTOMATIONS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.trunks\')}">\n      <a href="/tools/trunks/list">\n        <i class="icon-link"></i>\n        <span class="title"> {{\'APPLICATION_TRUNKS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.intervals\')}">\n      <a href="/tools/intervals/list">\n        <i class="icon-clock"></i>\n        <span class="title"> {{\'APPLICATION_INTERVALS\' | translate}} </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.variables\')}">\n      <a href="/tools/variables/list">\n        <i class="fa fa-eye"></i>\n        <span class="title" >{{\'APPLICATION_VARIABLES\' | translate}}  </span>\n      </a>\n    </li>\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.tags\')}">\n      <a href="/tools/tags/list">\n        <i class="icon-tag"></i>\n        <span class="title" >{{\'APPLICATION_TAGS\' | translate}}  </span>\n      </a>\n    </li>\n    <!-- START TEMPLATE CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.templates\')}">\n      <a href="/tools/templates/list">\n        <i class="icon-docs"></i>\n        <span class="title"> {{\'APPLICATION_TEMPLATES\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END TEMPLATE CASE -->\n\n    <!-- START PAUSE CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.pauses\')}">\n      <a href="/tools/pauses/list">\n        <i class="icon-control-pause"></i>\n        <span class="title"> {{\'APPLICATION_PAUSES\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END PAUSE CASE -->\n    <!-- START ANSWER CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.answers\')}">\n      <a href="/tools/answers/list">\n        <i class="icon-magic-wand"></i>\n        <span class="title"> {{\'APPLICATION_CANNED_ANSWERS\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END ANSWER CASE -->\n    <!-- START DASHBOARD MANAGER CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.yourdashboards\') && !$state.is(\'main.tools.yourdashboards.show\')}">\n      <a href="/tools/yourdashboards/list">\n        <i class="icon-grid"></i>\n        <span class="title"> {{\'APPLICATION_DASHBOARDS_MANAGER\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END DASHBOARD MANAGER CASE -->\n    <!-- START SOUND CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.tools.sounds\')}">\n      <a href="/tools/sounds/list">\n        <i class="icon-music-tone-alt"></i>\n        <span class="title" >{{\'APPLICATION_SOUNDS\' | translate}}</span>\n        <!-- <span data-ng-show="$state.includes(\'main.sounds\')" class="selected"></span> -->\n      </a>\n    </li>\n    <!-- END SOUND CASE -->\n  </ul>\n</li>\n<!-- END TOOLS LIST CASE -->\n\n<!-- START JSCRIPTY LIST -->\n<li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.jscripty\')}">\n  <a href="javascript:;">\n    <i class="icon-note"></i>\n    <span class="title" >{{\'APPLICATION_JSCRIPTY\' | translate}} <span class="badge">Beta</span></span>\n    <span class="arrow"></span>\n  </a>\n  <ul class="sub-menu">\n    <!-- START PROJECTS CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.jscripty.projects\')}">\n      <a href="/jscripty/projects/list">\n        <i class="fa fa-slack"></i>\n        <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END PROJECTS CASE -->\n  </ul>\n</li>\n<!-- END JSCRIPTY LIST -->\n\n<!-- START SETTINGS LIST -->\n<li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting\')}">\n  <a href="javascript:;">\n    <i class="icon-settings"></i>\n    <span class="title" >{{\'APPLICATION_SETTINGS\' | translate}}</span>\n    <span class="arrow"></span>\n  </a>\n  <ul class="sub-menu">\n    <!-- START UPDATES CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting.updates\')}">\n      <a href="/setting/updates/list">\n        <i class="icon-cloud-download"></i>\n        <span class="title" >{{\'APPLICATION_UPDATES\' | translate}}</span>\n        <!-- <span data-ng-show="$state.includes(\'main.updates\')" class="selected"></span> -->\n      </a>\n    </li>\n    <!-- END UPDATES CASE -->\n\n    <!-- START SMTP CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting.smtp\')}">\n      <a href="/setting/smtp/view">\n        <i class="icon-envelope"></i>\n        <span class="title">SMTP</span>\n        <!-- <span data-ng-show="$state.includes(\'main.smtp\')" class="selected"></span> -->\n      </a>\n    </li>\n    <!-- END SMTP CASE -->\n\n    <!-- START LICENSE CASE -->\n    <li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.setting.license\')}">\n      <a href="/setting/license/view">\n        <i class="icon-info"></i>\n        <span class="title"> {{\'APPLICATION_LICENSE\' | translate}} </span>\n      </a>\n    </li>\n    <!-- END LICENSE CASE -->\n  </ul>\n</li>\n<!-- END SETTINGS LIST -->\n\n<!-- START INTEGRATION CASE -->\n<li data-ng-repeat="integration in integrations" data-ng-if="integration.active" data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.includes(\'main.{{integration.state}}\')}">\n  <a href="/{{integration.state}}/list">\n    <i class="icon-handbag"></i>\n    <span class="title" >{{integration.name}}</span>\n    <span data-ng-show="$state.includes(\'main.{{integration.state}}\')" class="selected"></span>\n  </a>\n</li>\n\n<li data-ng-show="Auth.isAdmin()" data-ng-class="{active: $state.is(\'main.market\')}">\n  <a href="/market">\n    <i class="icon-handbag"></i>\n    <span class="title" translate>Market Place</span>\n    <span data-ng-show="$state.includes(\'main.market\')" class="selected"></span>\n  </a>\n</li>\n<!-- END INTEGRATIONS CASE -->\n\n</ul>\n<!-- END SIDEBAR MENU -->\n</div>\n');
+}]);
\ No newline at end of file
similarity index 60%
rename from public/app/e9688178.app.css
rename to public/app/e59e4d75.app.css
index a8de13f..cf69c9c 100644 (file)
@@ -1 +1 @@
-.audio-portlet .audio-portlet-title,.audio-portlet .audio-portlet-title a{white-space:nowrap;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis}.audio-portlet .audio-portlet-title,h1,h2,h3,h4,h5,h6{font-family:"Open Sans",sans-serif;font-weight:300}.badge,.btn-arrow-link,.btn-lg{vertical-align:middle}.chart-tooltip,.chart-tooltip .label,.chat-form,.dashboard-stat .more,.dashboard-stat2 .display:after,.dashboard-stat2 .progress-info,.dashboard-stat2 .progress-info .progress,.dashboard-stat:after,.dropdown-menu li>a,.feeds li .col1,.feeds li:after,.form .form-actions:after,.general-item-list>.item>.item-head:after,.portlet>.portlet-title:after,.social-icons:after,.tabbable:after,.table-toolbar:after,.tiles .tile .tile-object:after,.tiles:after{clear:both}.inactive-link,a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,fieldset[disabled] a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{pointer-events:none}#faxMessages::-webkit-scrollbar-track{background-color:#fff!important}#faxMessages::-webkit-scrollbar{width:5px}.our-integrations h3{margin-bottom:0;padding:10px;background:#f9f9f9}.our-integrations small{display:block;font-size:12px;color:#999;margin-top:5px}.our-integrations .integration-info{padding:10px;overflow:hidden;background:#f5f5f5}.interval-to{min-height:34px;padding:9px 12px}.audio-portlet .audio-portlet-title{margin-bottom:0;padding:10px;background:#f9f9f9;font-size:17px;margin-top:20px;line-height:1.1;color:inherit}.audio-portlet .audio-portlet-title a{display:block}.audio-portlet .file-info{padding:10px;overflow:hidden;background:#f5f5f5;height:105px}.audio-portlet-wrapper{float:left;margin:0 0 0 20px;-webkit-animation:fadeInUpm .5s;animation:fadeInUpm .5s;-moz-transition:all .5s linear;-webkit-transition:all .5s linear;transition:all .5s linear}.animate-repeat{list-style:none;box-sizing:border-box}.animate-repeat.ng-enter,.animate-repeat.ng-leave,.animate-repeat.ng-move{-webkit-transition:all linear .5s;transition:all linear .5s}.animate-repeat.ng-enter,.animate-repeat.ng-leave.ng-leave-active,.animate-repeat.ng-move{opacity:0;max-height:0}.animate-repeat.ng-enter.ng-enter-active,.animate-repeat.ng-leave,.animate-repeat.ng-move.ng-move-active{opacity:1;max-height:600px}audio{-moz-transition:all .5s linear;-webkit-transition:all .5s linear;transition:all .5s linear;border-radius:0}@media (min-width:502px){.audio-portlet-wrapper{width:240px}.editable-error,audio{width:220px}}@media (max-width:501px){.audio-portlet-wrapper{width:320px}.editable-error,audio{width:300px}}.editable-error{white-space:pre-line}#description_div,.dropdown-menu li>a,.table-scrollable>.table>tbody>tr>th,.table-scrollable>.table>tfoot>tr>td,.table-scrollable>.table>tfoot>tr>th,.table-scrollable>.table>thead>tr>th{white-space:nowrap}#description_div{text-overflow:ellipsis;overflow:hidden;word-wrap:break-word}.portlet-title.collapsible{cursor:pointer}.ui-padding{padding-bottom:200px}div[contenteditable]{max-height:100px;overflow:auto;display:block;width:100%;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}a,button,code,div,img,input,label,li,p,pre,select,span,table,td,textarea,th,ul{-webkit-border-radius:0!important;-moz-border-radius:0!important;border-radius:0!important}.img-circle{border-radius:50%!important}.img-rounded{border-radius:6px!important}body{color:#333;font-family:"Open Sans",sans-serif;padding:0!important;margin:0!important;font-size:13px;direction:ltr}@-ms-viewport{width:device-width}@-o-viewport{width:device-width}@viewport{width:device-width}@-ms-viewport{width:auto!important}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background-color:#eaeaea;border-radius:0;box-shadow:none;border:0}::-webkit-scrollbar-thumb{background-color:#cecece;border-radius:0;box-shadow:none;border:0}::-webkit-scrollbar-thumb:hover{background-color:#aaa}.bars,.chart,.pie,.primary-font{font-family:"Open Sans",sans-serif!important}h1{font-size:33px}h2{font-size:27px}h3{font-size:23px}h4{font-size:17px}h5{font-size:13px}h6{font-size:12px}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#444}h1.block,h2.block,h3.block,h4.block,h5.block,h6.block{padding-top:10px;padding-bottom:10px}a{text-shadow:none;color:#5b9bd1}a:active,a:focus,a:hover{outline:0}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:0}.list-unstyled li>.list-unstyled{margin-left:25px}code{border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.1);-moz-box-shadow:0 1px 4px rgba(0,0,0,.1);box-shadow:0 1px 4px rgba(0,0,0,.1)}.disabled-link .disable-target{opacity:.5!important;filter:alpha(opacity=50)!important}.disabled-link .disable-target:hover,.disabled-link:hover{cursor:not-allowed!important}a:hover{color:#3175af;cursor:pointer}.primary-link{color:#65A0D0;font-weight:600}.primary-link:hover{color:#5194ca}.rounded-2{border-radius:2px!important}.rounded-3{border-radius:3px!important}.rounded-4{border-radius:4px!important}.circle{border-radius:25px!important}.circle-right{border-radius:0 25px 25px 0!important}.circle-left{border-radius:25px 0 0 25px!important}.circle-bottom{border-radius:0 0 25px 25px!important}.circle-top{border-radius:25px 25px 0 0!important}.display-hide,.display-none{display:none}.hidden{display:none!important}.bold{font-weight:700!important}.thin{font-weight:300!important}.uppercase{text-transform:uppercase!important}.fix-margin{margin-left:0!important}.border{border:1px solid red}.font-hg{font-size:23px}.font-lg{font-size:18px}.font-md{font-size:14px}.font-sm{font-size:13px}.font-xs{font-size:11px}.inline{display:inline}.inline-block{display:inline-block}.text-align-reverse{text-align:right}.top-news a,.top-news span{text-align:left;display:block}.no-space{margin:0!important;padding:0!important}.no-margin{margin:0}.margin-bottom-5{margin-bottom:5px}.margin-bottom-10{margin-bottom:10px!important}.margin-top-10{margin-top:10px!important}.margin-top-15{margin-top:15px!important}.margin-bottom-15{margin-bottom:15px!important}.margin-bottom-20{margin-bottom:20px!important}.margin-top-20{margin-top:20px!important}.margin-bottom-25{margin-bottom:25px!important}.margin-bottom-30{margin-bottom:30px!important}.margin-right-10{margin-right:10px!important}.visible-ie8{display:none}.ie8 .visible-ie8{display:inherit!important}.visible-ie9{display:none}.ie9 .visible-ie9{display:inherit!important}.hidden-ie8{display:inherit}.ie8 .hidden-ie8{display:none!important}.hidden-ie9{display:inherit}.ie9 .hidden-ie9{display:none!important}@media (max-width:1024px){.hidden-1024{display:none}}@media (max-width:480px){.hidden-480{display:none}}@media (max-width:320px){.hidden-320{display:none}}.scrollspy-example{position:relative;height:200px;margin-top:10px;overflow:auto}.util-btn-group-margin-bottom-5 .btn-group,.util-btn-margin-bottom-5 .btn{margin-bottom:5px!important}.user-info{margin-bottom:10px!important}.user-info img{float:left;margin-right:5px}.number-stats .stat-left,.number-stats .stat-left .stat-chart{float:right}.user-info .details{display:inline-block}.user-info .label{font-weight:300;font-size:11px}.top-news{color:#fff;margin:8px 0}.top-news em{font-size:13px;margin-bottom:0;font-style:normal;display:block}.top-news em i{font-size:14px}.top-news span{font-size:18px;margin-bottom:5px}.top-news a{padding:10px;position:relative;margin-bottom:10px}.top-news a .top-news-icon{right:8px;bottom:15px;opacity:.3;font-size:35px;position:absolute;filter:alpha(opacity=30)}.blog-images{margin-bottom:0}.blog-images li{padding:0;margin:0;display:inline}.blog-images li a:hover{text-decoration:none}.blog-images li img{width:50px;height:50px;opacity:.6;margin:0 2px 8px}.blog-images li img:hover{opacity:1;box-shadow:0 0 0 4px #72c02c;transition:all .4s ease-in-out 0s;-moz-transition:all .4s ease-in-out 0s;-webkit-transition:all .4s ease-in-out 0s}.sidebar-tags li{padding:0}.sidebar-tags li a{color:#555;font-size:12px;padding:3px 5px;background:#f7f7f7;margin:0 2px 5px 0;display:inline-block}.sidebar-tags li a:hover,.sidebar-tags li a:hover i{background:#EEE;text-decoration:none;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.sidebar-tags li a i{color:#777}.ver-inline-menu{padding:0;margin:0;list-style:none}.ver-inline-menu li{position:relative;margin-bottom:1px}.ver-inline-menu li i{width:37px;height:37px;display:inline-block;color:#b9cbd5;font-size:15px;padding:12px 10px 10px 8px;margin:0 8px 0 0;text-align:center;background:#e0eaf0!important}.ver-inline-menu li a{font-size:14px;font-weight:300;color:#557386;display:block;background:#f0f6fa;border-left:solid 2px #c4d5df}.ver-inline-menu li:hover a{background:#e0eaf0;text-decoration:none}.ver-inline-menu li:hover i{color:#fff;background:#c4d5df!important}.ver-inline-menu li.active a{border-left:solid 2px #0c91e5}.ver-inline-menu li.active i{background:#0c91e5!important}.ver-inline-menu li.active a,.ver-inline-menu li.active i{color:#fff;background:#169ef4;text-decoration:none}.ver-inline-menu li.active a,.ver-inline-menu li:hover a{font-size:14px}.ver-inline-menu li.active:after{content:'';display:inline-block;border-bottom:6px solid transparent;border-top:6px solid transparent;border-left:6px solid #169ef4;position:absolute;top:12px;right:-5px}.list-separated{margin-top:10px;margin-bottom:15px}.list-separated>div{border-right1:1px solid #f5f5f5}.list-separated>div:last-child{border-right:0}@media (max-width:767px){.ver-inline-menu>li.active:after{display:none}.list-separated>div{margin-bottom:20px}}.number-stats{margin:10px 0}.number-stats .stat-number{display:inline-block;margin:0 5px}.number-stats .stat-number .title{font-size:13px;margin-bottom:3px;color:#B8C3C7}.number-stats .stat-number .number{font-size:27px;line-height:27px;color:#7D8C9D}.number-stats>div{border-right:1px solid #f5f5f5}.number-stats>div:last-child{border-right:0}.number-stats .stat-left .stat-number{float:right;text-align:right}.number-stats .stat-right{float:left!important}.number-stats .stat-right .stat-number{float:left;text-align:left}.number-stats .stat-right .stat-chart{float:left}.number-stats .stat-number{float:left;text-align:left}.number-stats .stat-chart{display:inline-block;margin:0 5px;float:left}.general-item-list>.item{padding:10px 0;border-bottom:1px solid #F1F4F7}.general-item-list>.item:last-child{border-bottom:0}.general-item-list>.item>.item-head{margin-bottom:5px}.general-item-list>.item>.item-head:after,.general-item-list>.item>.item-head:before{content:" ";display:table}.general-item-list>.item>.item-head>.item-details{display:inline-block;float:left}.general-item-list>.item>.item-head>.item-details>.item-pic{height:35px;margin-right:10px;-webkit-border-radius:100%;-moz-border-radius:100%;-ms-border-radius:100%;-o-border-radius:100%;border-radius:100%}.general-item-list>.item>.item-head>.item-details>.item-name{display:inline-block;margin-right:10px}.general-item-list>.item>.item-head>.item-details>.item-label{color:#C0C9CC}.general-item-list>.item>.item-head>.item-status{color:#C0C9CC;top:10px;position:relative;display:inline-block;float:right}.general-item-list>.item>.item-head>.item-status>.badge{margin-top:-2px}.general-item-list>.item>.item-body{color:#96a5aa}.file-drop-zone{border:2px dashed #ddd;padding:30px;text-align:center}.file-drop-zone.file-drop-zone-over{border-color:#aaa}[class*=" fa-"],[class*=" glyphicon-"],[class*=" icon-"],[class^=fa-],[class^=glyphicon-],[class^=icon-]{display:inline-block;margin-top:1px;font-size:14px;line-height:14px;-webkit-font-smoothing:antialiased}li [class*=" fa-"],li [class*=" glyphicon-"],li [class*=" icon-"],li [class^=fa-],li [class^=glyphicon-],li [class^=icon-]{display:inline-block;width:1.25em;text-align:center}li [class*=" glyphicon-"],li [class^=glyphicon-]{top:2px}li [class*=" icon-"],li [class^=icon-]{top:1px;position:relative}li [class*=" fa-"].icon-large,li [class*=" glyphicon-"].icon-large,li [class*=" icon-"].icon-large,li [class^=fa-].icon-large,li [class^=glyphicon-].icon-large,li [class^=icon-].icon-large{width:1.5625em}.fa-sm,.icon-sm{font-size:12px}.fa-lg,.icon-lg{font-size:16px!important}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.icon-state-default{color:#c6c6c6}.icon-state-success{color:#45B6AF}.icon-state-info{color:#89C4F4}.icon-state-warning{color:#dfba49}.icon-state-danger{color:#F3565D}.fa-item{font-size:14px;padding:10px 10px 10px 20px}.fa-item i{font-size:16px;display:inline-block;width:20px;color:#333}.fa-item:hover{cursor:pointer;background:#eee}.badge-danger,.badge-default,.badge-info,.badge-primary,.badge-success,.badge-warning{background-image:none}.simplelineicons-demo .item-box{display:inline-block;font-size:16px;margin:0 -.22em 1em 0;padding-left:1em;width:100%}.simplelineicons-demo .item-box .item{background-color:#fff;color:#33383e;border-radius:8px;display:inline-block;padding:10px;width:100%}.bs-glyphicons,.glyphicons-demo ul{padding-left:0;padding-bottom:1px;margin-bottom:20px;overflow:hidden;list-style:none}.simplelineicons-demo .item-box .item span{font-size:22px}@media only screen and (min-width:768px){.simplelineicons-demo .item-box{width:33.333%}}.bs-glyphicon-class{text-align:center}.glyphicons-demo ul li{float:left;width:25%;height:115px;padding:10px;margin:0 -1px -1px 0;font-size:14px;line-height:1.4;text-align:center;border:1px solid #ddd}.glyphicons-demo .glyphicon{display:block;margin:5px auto 10px;font-size:24px;color:#444}.glyphicons-demo ul li:hover{background-color:rgba(86,61,124,.1)}.badge-default,.label-default{background-color:#c6c6c6}@media (min-width:768px){.glyphicons-demo ul li{width:12.5%}}.alert.alert-borderless{border:0}.badge{font-size:11px!important;font-weight:300;height:18px;padding:3px 6px;-webkit-border-radius:12px!important;-moz-border-radius:12px!important;border-radius:12px!important;text-shadow:none!important;text-align:center}.badge.badge-roundless{-webkit-border-radius:0!important;-moz-border-radius:0!important;border-radius:0!important}.badge.badge-empty{display:inline-block;padding:0;min-width:8px;height:8px;width:8px}.badge-primary{background-color:#428bca}.badge-info{background-color:#89C4F4}.badge-success{background-color:#45B6AF}.badge-danger{background-color:#F3565D}.badge-warning{background-color:#dfba49}.nav.nav-pills>li>a>.badge,.nav.nav-stacked>li>a>.badge{margin-top:-2px}.dropdown-menu>li>a>.badge{position:absolute;margin-top:1px;right:3px;display:inline;font-size:11px;font-weight:300;text-shadow:none;height:18px;padding:3px 6px;text-align:center;vertical-align:middle;-webkit-border-radius:12px!important;-moz-border-radius:12px!important;border-radius:12px!important}.btn,.btn>i{font-size:14px}.dropdown-menu.badge-roundless{-webkit-border-radius:0!important;-moz-border-radius:0!important;border-radius:0!important}.btn{border-width:0;padding:7px 14px;outline:0!important;background-image:none!important;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;text-shadow:none}.btn-group .btn.dropdown-toggle,.btn.active,.btn.dropdown-toggle,.btn:active,.btn:disabled,.btn:focus,.btn:hover,.btn[disabled]{outline:0!important;background-image:none!important;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;text-shadow:none}.btn-default{border-width:1px;padding:6px 13px;color:#333;background-color:#fff;border-color:#ccc}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open .btn-default.dropdown-toggle{color:#333;background-color:#ededed;border-color:#b3b3b3}.btn-default.active,.btn-default:active{background-image:none;background-color:#e0e0e0}.btn-default.active:hover,.btn-default:active:hover{background-color:#e6e6e6}.open .btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.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:active,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-default>i{color:#aaa}.btn-default>i[class*=icon-],.btn-default>i[class^=icon-]{color:#8c8c8c}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open .btn-primary.dropdown-toggle{color:#fff;background-color:#3379b5;border-color:#2a6496}.btn-primary.active,.btn-primary:active{background-image:none;background-color:#2d6ca2}.btn-primary.active:hover,.btn-primary:active:hover{background-color:#3071a9}.open .btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.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:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#45B6AF;border-color:#3ea49d}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open .btn-success.dropdown-toggle{color:#fff;background-color:#3b9c96;border-color:#307f7a}.btn-success.active,.btn-success:active{background-image:none;background-color:#348a84}.btn-success.active:hover,.btn-success:active:hover{background-color:#37918b}.open .btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.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:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#45B6AF;border-color:#3ea49d}.btn-success .badge{color:#45B6AF;background-color:#fff}.btn-info{color:#fff;background-color:#89C4F4;border-color:#72b8f2}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open .btn-info.dropdown-toggle{color:#fff;background-color:#68b4f1;border-color:#43a1ed}.btn-info.active,.btn-info:active{background-image:none;background-color:#51a8ef}.btn-info.active:hover,.btn-info:active:hover{background-color:#5aadf0}.open .btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.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:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#89C4F4;border-color:#72b8f2}.btn-info .badge{color:#89C4F4;background-color:#fff}.btn-warning{color:#fff;background-color:#dfba49;border-color:#dbb233}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open .btn-warning.dropdown-toggle{color:#fff;background-color:#daae2b;border-color:#bb9521}.btn-warning.active,.btn-warning:active{background-image:none;background-color:#c89f23}.btn-warning.active:hover,.btn-warning:active:hover{background-color:#d0a625}.open .btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.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:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#dfba49;border-color:#dbb233}.btn-warning .badge{color:#dfba49;background-color:#fff}.btn-danger{color:#fff;background-color:#F3565D;border-color:#f13e46}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open .btn-danger.dropdown-toggle{color:#fff;background-color:#f1353d;border-color:#ec111b}.btn-danger.active,.btn-danger:active{background-image:none;background-color:#ef1d26}.btn-danger.active:hover,.btn-danger:active:hover{background-color:#f0262f}.open .btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.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:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#F3565D;border-color:#f13e46}.btn-danger .badge{color:#F3565D;background-color:#fff}.btn-lg,.btn-lg>i{font-size:18px}.btn-lg{padding:10px 16px;line-height:1.33}.btn-sm,.btn-xs{padding:4px 10px 5px;font-size:13px;line-height:1.5}.btn-sm>i,.btn-xs>i{font-size:13px}.btn-xs{padding:1px 5px}.btn-group .input-sm .btn-default{padding-top:3px;padding-bottom:3px}.btn-arrow-link{display:inline-block;font-size:13px}.btn-arrow-link>i{font-size:14px;line-height:14px;vertical-align:top;margin:2px 3px;color:#999}.btn-arrow-link.btn-arrow-link-lg{font-size:14px}.btn-arrow-link.btn-arrow-link-lg>i{font-size:16px;line-height:16px;margin:2px 3px 1px}.btn-circle{border-radius:25px!important}.btn-circle-right{border-radius:0 25px 25px 0!important}.btn-circle-left{border-radius:25px 0 0 25px!important}.btn-circle-bottom{border-radius:0 0 25px 25px!important}.btn-circle-top{border-radius:25px 25px 0 0!important}.btn-icon-only{height:34px;width:34px;text-align:center;padding-left:0;padding-right:0}.btn-icon-only>[class^=icon-],.btn-icon-only>i{text-align:center;margin-top:2px}.btn-sm>[class*=" glyphicon-"],.btn-sm>[class^=glyphicon-],.btn-sm>i{font-size:13px}.btn-xs>[class*=" glyphicon-"],.btn-xs>[class^=glyphicon-],.btn-xs>i{font-size:11px}.btn-group.btn-group-circle>.btn:first-child{border-radius:25px 0 0 25px!important}.btn-group.btn-group-circle>.btn:last-child{border-radius:0 25px 25px 0!important}.btn-group.btn-group-devided>.btn{margin-right:5px}.btn-group.btn-group-devided>.btn:last-child{margin-right:0}.btn-group-vertical.btn-group-vertical-circle>.btn:first-child{border-radius:25px 25px 0 0!important}.btn-group-vertical.btn-group-vertical-circle>.btn:last-child{border-radius:0 0 25px 25px!important}.carousel.image-carousel .carousel-inner{padding-top:0;padding-bottom:0}.carousel.image-carousel .carousel-control i{position:absolute;top:40%}.carousel.image-carousel.image-carousel-hoverable .carousel-control i{display:none}.carousel.image-carousel.image-carousel-hoverable:hover .carousel-control i{display:inline-block}.carousel.image-carousel .carousel-control.left i{left:10px}.carousel.image-carousel .carousel-control.right i{right:10px}.carousel.image-carousel .carousel-indicators{margin-top:10px;bottom:-7px}.carousel.image-carousel .carousel-indicators li,.carousel.image-carousel .carousel-indicators li.active{background-color:#666}.carousel.image-carousel .carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px 15px 25px;background:#333;background:rgba(0,0,0,.75)}.carousel.image-carousel .carousel-caption h2,.carousel.image-carousel .carousel-caption h3,.carousel.image-carousel .carousel-caption h4,.carousel.image-carousel .carousel-caption p{text-align:left;line-height:20px;color:#fff}.carousel.image-carousel .carousel-caption h2,.carousel.image-carousel .carousel-caption h3,.carousel.image-carousel .carousel-caption h4{margin:0 0 5px}.carousel.image-carousel .carousel-caption h2 a,.carousel.image-carousel .carousel-caption h3 a,.carousel.image-carousel .carousel-caption h4 a{color:#aaa}.carousel.image-carousel .carousel-caption p{margin-bottom:0}.carousel.image-carousel .carousel-caption .item{margin:0}.bars,.chart,.pie{overflow:hidden;height:300px;width:100%;font-size:14px}.item-list.table .percent{width:30px;float:right;margin-right:10px;margin-top:3px}.chart-tooltip{z-index:100;background-color:#736e6e!important;padding:5px!important;color:#fff}.chart-tooltip .label{display:block;margin-bottom:2px}.bar-chart,.line-chart{display:none}.chats{margin:-15px 0 0;padding:0}.chats li{list-style:none;padding:5px 0;margin:10px auto;font-size:12px}.chats li .body{display:block}.chats li .avatar{height:45px;width:45px;-webkit-border-radius:50%!important;-moz-border-radius:50%!important;border-radius:50%!important}.chats li.in .avatar{float:left;margin-right:10px}.chats li.out .avatar{float:right;margin-left:10px}.chats li .name{color:#3590c1;font-size:13px;font-weight:400}.chats li .datetime{color:#333;font-size:13px;font-weight:400}.chats li .message{border-radius:5px!important;-webkit-border-readius:5px!important;-moz-border-radius:5px!important;display:block;padding:5px 20px;position:relative}.chats li.in .message{text-align:left;border:2px solid #E9E9E9;margin-left:65px;box-shadow:0 5px 10px #777}.chats li.in .message .arrow{display:block;position:absolute;top:15px;left:-8px;width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;border-right:8px solid #e9e9e9}.chats li.out .message{border:2px solid #DFEECF;margin-right:65px;margin-left:5px;box-shadow:0 5px 10px #777}.chats li.out .message .arrow{display:block;position:absolute;top:15px;right:-8px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid #DFEECF}.chats li.out .datetime,.chats li.out .name{text-align:right}.chats li .note{color:#000;-moz-box-shadow:5px 5px 7px rgba(33,33,33,1);-webkit-box-shadow:5px 5px 7px rgba(33,33,33,.7);box-shadow:5px 5px 7px rgba(33,33,33,.7);-moz-transition:-moz-transform .15s linear;-o-transition:-o-transform .15s linear;-webkit-transition:-webkit-transform .15s linear;-webkit-transform:rotate(-1deg);-o-transform:rotate(-1deg);-moz-transform:rotate(-1deg);font-family:"Reenie Beanie",arial,sans-serif;font-size:200%;background:#ffc}.chats li.out .note{border:2px solid #DFEECF;margin-right:65px;margin-left:5px;box-shadow:0 5px 10px #777}.chats li.out .note .arrow{display:block;position:absolute;top:15px;right:-8px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid #DFEECF}.chat-form{margin-top:15px;padding:10px;background-color:#e9eff3;overflow:hidden}.chat-form .input-cont{margin-right:40px}.chat-form .input-cont .form-control{border:1px solid #ddd;width:100%!important;margin-top:0;background-color:#fff!important}.chat-form .input-cont .form-control:focus{border:1px solid #4b8df9!important}.chat-form .btn-cont{margin-top:-42px;position:relative;float:right;width:44px}.chat-form .btn-cont .arrow{position:absolute;top:17px;right:43px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-right:8px solid #4d90fe;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chat-form .btn-cont .btn{margin-top:8px}.chat-form .btn-cont:hover .arrow{border-right-color:#0362fd}.chat-form .btn-cont:hover .btn{background-color:#0362fd}.close{display:inline-block;margin-top:0;margin-right:0;width:9px;height:9px;background-repeat:no-repeat!important;text-indent:-10000px;outline:0;background-image:url(../../assets/images/remove-icon-small.png)!important}.dropdown.open>.dropdown-toggle,.dropup.open>.dropdown-toggle{border-color:#ddd}.dropdown-menu{min-width:175px;position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;list-style:none;text-shadow:none;padding:0;margin:10px 0 0;background-color:#fffff;box-shadow:5px 5px rgba(102,102,102,.1);border:1px solid #eee;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.dropdown-menu li.divider{background:#f1f3f6}.dropdown-menu li>a{padding:8px 14px;color:#555;text-decoration:none;display:block;font-weight:300;line-height:18px}.dropdown-menu li>a>[class*=" fa-"],.dropdown-menu li>a>[class^=fa-]{color:#888}.dropdown-menu li>a>[class*=" icon-"],.dropdown-menu li>a>[class^=icon-]{color:#666}.dropdown-menu li>a>[class*=" glyphicon-"],.dropdown-menu li>a>[class^=glyphicon-]{color:#888}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:hover{text-decoration:none;background-image:none;background-color:#f6f6f6;color:#555;filter:none}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px}.btn-group>.dropdown-menu,.dropdown-toggle>.dropdown-menu,.dropdown>.dropdown-menu{margin-top:10px}.btn-group>.dropdown-menu:before,.dropdown-toggle>.dropdown-menu:before,.dropdown>.dropdown-menu:before{position:absolute;top:-8px;left:9px;right:auto;display:inline-block!important;border-right:8px solid transparent;border-bottom:8px solid #e0e0e0;border-left:8px solid transparent;content:''}.btn-group>.dropdown-menu:after,.dropdown-toggle>.dropdown-menu:after,.dropdown>.dropdown-menu:after{position:absolute;top:-7px;left:10px;right:auto;display:inline-block!important;border-right:7px solid transparent;border-bottom:7px solid #fff;border-left:7px solid transparent;content:''}.btn-group>.dropdown-menu.pull-left:before,.dropdown-toggle>.dropdown-menu.pull-left:before,.dropdown>.dropdown-menu.pull-left:before{left:auto;right:9px}.btn-group>.dropdown-menu.pull-left:after,.dropdown-toggle>.dropdown-menu.pull-left:after,.dropdown>.dropdown-menu.pull-left:after{left:auto;right:10px}.btn-group>.dropdown-menu.pull-right:before,.dropdown-toggle>.dropdown-menu.pull-right:before,.dropdown>.dropdown-menu.pull-right:before{left:auto;right:9px}.btn-group>.dropdown-menu.pull-right:after,.dropdown-toggle>.dropdown-menu.pull-right:after,.dropdown>.dropdown-menu.pull-right:after{left:auto;right:10px}.btn-group.dropup>.dropdown-menu,.dropdown-toggle.dropup>.dropdown-menu,.dropdown.dropup>.dropdown-menu{margin-top:0;margin-bottom:10px}.btn-group.dropup>.dropdown-menu:after,.btn-group.dropup>.dropdown-menu:before,.dropdown-toggle.dropup>.dropdown-menu:after,.dropdown-toggle.dropup>.dropdown-menu:before,.dropdown.dropup>.dropdown-menu:after,.dropdown.dropup>.dropdown-menu:before{display:none!important}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:5px;left:100%;margin-top:-6px;margin-left:-1px}.dropdown-submenu>a:after{position:absolute;display:inline-block;font-size:14px;right:7px;top:7px;font-family:FontAwesome;height:auto;content:"\f105";font-weight:300}.label,.table.table-light>thead>tr>th{font-family:"Open Sans",sans-serif}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px}.nav.pull-right>li>.dropdown-menu,.nav>li>.dropdown-menu.pull-right{right:0;left:auto}.nav.pull-right>li>.dropdown-menu:before,.nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.nav.pull-right>li>.dropdown-menu:after,.nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.nav.pull-right>li>.dropdown-menu .dropdown-menu,.nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:absolute;float:left;width:auto;margin-top:0;background-color:#fff;border:1px solid #efefef;box-shadow:5px 5px rgba(102,102,102,.1)}.navbar-nav .open .dropdown-menu>li>a{padding:6px 0 6px 13px;color:#333}.navbar-nav .open .dropdown-menu>li>a:active,.navbar-nav .open .dropdown-menu>li>a:hover{ackground-color:#eee}}.feeds li .col1,.feeds li .col1>.cont>.cont-col2{width:100%;float:left}.dropdown-checkboxes,.dropdown-content,.dropdown-radiobuttons{padding:5px}.dropdown-content form{margin:0}.dropdown.inline .dropdown-menu{display:inline-block;position:relative}.dropdown-checkboxes label,.dropdown-radiobuttons label{display:block;font-weight:300;color:#333;margin-bottom:4px;margin-top:4px}.dropdown-checkboxes label .radio,.dropdown-radiobuttons label .radio{margin-right:3px}.feeds{margin:0;padding:0;list-style:none}.feeds li{background-color:#fafafa;color:#82949a;margin-bottom:7px}.feeds li:after,.feeds li:before{display:table;line-height:0;content:""}.feeds li:last-child{margin-bottom:0}.feeds li .col1>.cont{float:left;margin-right:75px;overflow:hidden}.feeds li .col1>.cont>.cont-col1{float:left;margin-right:-100%}.feeds li .col1>.cont>.cont-col1>.label{display:inline-block;padding:5px 4px 6px 5px;vertical-align:middle;text-align:center}.feeds li .col1>.cont>.cont-col1>.label>i{text-align:center;font-size:14px}.feeds li .col1>.cont>.cont-col2>.desc{margin-left:35px;padding-top:4px;padding-bottom:5px;overflow:hidden}.modal,.modal-open{overflow-y:auto!important}.feeds li .col2{float:left;width:75px;margin-left:-75px}.feeds li .col2>.date{padding:4px 9px 5px 4px;text-align:right;font-style:italic;color:#c1cbd0}.static-info{margin-bottom:10px}.static-info .name{font-size:14px}.static-info .value{font-size:14px;font-weight:600}.static-info.align-reverse .name,.static-info.align-reverse .value{text-align:right}.help-block{margin-top:5px;margin-bottom:5px}.help-inline{font-size:13px;color:#737373;display:inline-block;padding:5px}.form-inline input{margin-bottom:0!important}.control-label{margin-top:1px}.control-label .required{color:#e02222;font-size:12px;padding-left:2px}.form{padding:0!important}.form .form-body{padding:10px}.portlet.light .form .form-body{padding-left:0;padding-right:0}.form .form-actions{padding:20px 10px;margin:0;background-color:#f5f5f5;border-top:1px solid #e5e5e5}.portlet.light .form .form-actions{background:0 0;padding-left:0;padding-right:0}.portlet .form .form-actions{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.form .form-actions:after,.form .form-actions:before{content:" ";display:table}.form .form-actions.right{padding-left:0;padding-right:10px;text-align:right}.portlet.light .form .form-actions.right{padding-right:0}.form .form-actions.left{padding-left:10px;padding-right:0;text-align:left}.checkbox-list>label.checkbox-inline:first-child,.checkbox>label,.form-horizontal .checkbox>label,.portlet.light .form .form-actions.left,.radio-list>label.radio-inline:first-child{padding-left:0}.form .form-actions.nobg{background-color:transparent}.form .form-actions.top{margin-top:0;margin-bottom:20px;border-top:0;border-bottom:1px solid #e5e5e5}.portlet.light .form .form-actions.top{background:0 0}.form .form-actions .btn-set{display:inline-block}@media (max-width:767px){.form .form-actions .btn-set{margin-bottom:3px;margin-top:3px;float:left!important}}.form .form-section{margin:30px 0 25px;padding-bottom:5px;border-bottom:1px solid #eee}.form .form-bordered .form-group .help-block,.form .form-row-seperated .form-group .help-block,.form-horizontal .radio-list>label{margin-bottom:0}.form .form-section:first-child{margin-top:5px}.checkbox,.form-horizontal .checkbox{padding:0}.checkbox-list>label{display:block}.checkbox-list>label.checkbox-inline{display:inline-block}.input-icon>i,.radio-list>label{display:block}.form-control-static,.icon-btn,.input-inline,.radio-list>label.radio-inline{display:inline-block}.form-horizontal .radio-list .radio{padding-top:1px}.form-horizontal .radio>span{margin-top:2px}.form .form-row-seperated .portlet-body{padding:0}.form .form-row-seperated .form-group{margin:0;border-bottom:1px solid #efefef;padding:15px 0}.form .form-row-seperated .form-group.last{border-bottom:0;margin-bottom:0;padding-bottom:13px}.form .form-row-seperated .form-body{padding:0}.form .form-row-seperated .form-actions{padding-left:15px!important;padding-right:15px!important}.form .form-bordered .form-group{margin:0;border-bottom:1px solid #efefef}.form .form-bordered .form-group>div{padding:15px;border-left:1px solid #efefef}.form .form-bordered .form-group.last{border-bottom:0}.form .form-bordered .form-group .control-label{padding-top:20px}@media (max-width:991px){.form .form-bordered .form-group>div{border-left:0}.form .form-bordered .form-group .control-label{padding-top:10px}}.form .form-bordered .form-group .form-control{margin:0}.form .form-bordered .form-body{margin:0;padding:0}.form .form-bordered .form-actions{margin-top:0;padding-left:16px!important;padding-right:16px!important}@media (max-width:991px){.form .form-bordered .form-actions{padding-left:15px!important;padding-right:15px!important}}.form .form-horizontal.form-bordered.form-row-stripped .form-group:nth-child(even){background-color:#fcfcfc}.form .form-horizontal.form-bordered.form-row-stripped .form-control{background:#fff!important}.form .form-horizontal.form-bordered.form-label-stripped .form-group:nth-child(even)>div{background-color:#fff}.form .form-horizontal.form-bordered.form-label-stripped .form-group:nth-child(even){background-color:#fcfcfc}.form-control::-moz-placeholder{color:#b3b3b3;opacity:1}.form-control:-ms-input-placeholder{color:#b3b3b3}.form-control::-webkit-input-placeholder{color:#b3b3b3}.form-control{font-size:14px;font-weight:400;color:#333;background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:none;box-shadow:none;-webkit-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:#999;outline:0;-webkit-box-shadow:none;box-shadow:none}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}.form-control.height-auto{height:auto}.form-control.form-control-solid{background-color:#F1F3F8;border-color:#F1F3F8;color:#A6B2BA}.note .highlight,.note code,.uneditable-input{background-color:#fff}.form-control.form-control-solid:focus{border-color:#e3e7f1}.form-control.form-control-solid::-moz-placeholder{color:#acb7be;opacity:1}.form-control.form-control-solid:-ms-input-placeholder{color:#acb7be}.form-control.form-control-solid::-webkit-input-placeholder{color:#acb7be}.uneditable-input{padding:6px 12px;min-width:206px;font-size:14px;font-weight:400;height:34px;color:#333;border:1px solid #e5e5e5;-webkit-box-shadow:none;box-shadow:none;-webkit-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}.icon-btn,.icon-btn:hover{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease}.input-mini{width:45px!important}.input-xsmall{width:80px!important}.input-small{width:145px!important}.input-medium{width:240px!important}.input-large{width:320px!important}.input-xlarge{width:420px!important}.input-inline{width:auto;vertical-align:middle}.form-group .input-inline{margin-right:5px}.input-sm{height:28px;padding:5px 10px;font-size:13px}select.input-sm{height:28px;line-height:28px;padding:2px 10px}@media (max-width:768px){.input-large{width:250px!important}.input-xlarge{width:300px!important}}.input-group .btn-default{border-color:#e5e5e5}.input-group .input-group-addon{border-color:#e5e5e5;background:#e5e5e5;min-width:39px}.input-group .input-group-addon>i{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .help-inline,.has-success .radio,.has-success .radio-inline{color:#3c763d}input[type=text].spinner,input[type=password].spinner,input[type=datetime].spinner,input[type=datetime-local].spinner,input[type=date].spinner,input[type=month].spinner,input[type=time].spinner,input[type=week].spinner,input[type=number].spinner,input[type=email].spinner,input[type=url].spinner,input[type=search].spinner,input[type=tel].spinner,input[type=color].spinner{background-image:url(../../assets/images/input-spinner.gif)!important;background-repeat:no-repeat;background-position:right 8px}label{font-weight:400;font-size:14px}.form-control-static{margin:2px 0}.has-success .form-control{border-color:#d6e9c6;-webkit-box-shadow:none;box-shadow:none}.has-success .form-control:focus{border-color:#bbdba1;-webkit-box-shadow:none;box-shadow:none}.has-success .input-group-addon{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .help-inline,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#faebcc;-webkit-box-shadow:none;box-shadow:none}.has-warning .form-control:focus{border-color:#f5d89e;-webkit-box-shadow:none;box-shadow:none}.has-warning .input-group-addon{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .help-inline,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#ebccd1;-webkit-box-shadow:none;box-shadow:none}.has-error .form-control:focus{border-color:#dca7b0;-webkit-box-shadow:none;box-shadow:none}.has-error .input-group-addon{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.input-circle{border-radius:25px!important}.input-circle-right{border-radius:0 25px 25px 0!important}.input-circle-left{border-radius:25px 0 0 25px!important}.input-circle-bottom{border-radius:0 0 25px 25px!important}.input-circle-top{border-radius:25px 25px 0 0!important}.icon-btn{height:60px;min-width:80px;margin:5px 5px 0 0;border:1px solid #ddd;padding:12px 0 0;background-color:#fafafa;background-image:none;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:#646464;text-shadow:none;text-align:center;cursor:pointer;position:relative;transition:all .3s ease}.loading-message,.page-loading{min-width:125px;vertical-align:middle}[class^=m-icon-],[class^=m-icon-big-]{background-image:url(../../assets/images/syncfusion-icons.png);background-position:0 0;background-repeat:no-repeat}.icon-btn:hover,.icon-btn:hover>.badge{-webkit-box-shadow:none;-moz-box-shadow:none}.icon-btn:hover{text-decoration:none;border-color:#999;color:#444;text-shadow:0 1px 0 #fff;transition:all .3s ease;box-shadow:none}.icon-btn:hover>.badge{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;box-shadow:none}.icon-btn>div{margin-top:5px;margin-bottom:20px;color:#000;font-size:12px;font-weight:300}.icon-btn>.badge{position:absolute;font-size:11px;font-weight:300;top:-5px;right:-5px;padding:3px 6px;color:#fff;text-shadow:none;border-width:0;border-style:solid;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.input-group .input-icon>.form-control,.tabs-left.nav-tabs>li>a:focus,.tabs-left.nav-tabs>li>a:hover{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-ms-border-radius:4px 0 0 4px;-o-border-radius:4px 0 0 4px}.icon-btn>i{font-size:18px}.ie8 .icon-btn:hover{filter:none}.input-icon{position:relative}.input-icon>.form-control{padding-left:33px}.input-group .input-icon>.form-control{border-radius:4px 0 0 4px}.input-icon>i{color:#ccc;position:absolute;margin:11px 2px 4px 10px;z-index:3;width:16px;height:16px;font-size:16px;text-align:center}.modal .input-icon>i{z-index:10055}.has-success .input-icon>i{color:#45B6AF}.has-warning .input-icon>i{color:#dfba49}.has-info .input-icon>i{color:#89C4F4}.has-error .input-icon>i{color:#F3565D}.input-icon.right>.form-control{padding-right:33px;padding-left:12px}.input-group .input-icon.right>.form-control{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-icon.right>i{right:8px;float:right}.input-icon.input-icon-lg>i{margin-top:16px}.input-icon.input-icon-sm>i{margin-top:8px;font-size:13px}.label{text-shadow:none!important;font-size:13px;font-weight:300;padding:3px 6px;color:#fff}.label.label-sm{font-size:12px;padding:0 4px 1px}h1 .label,h2 .label,h3 .label,h4 .label,h5 .label,h6 .label{font-size:75%}.label-default[href]:focus,.label-default[href]:hover{background-color:#adadad}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#45B6AF}.label-success[href]:focus,.label-success[href]:hover{background-color:#37918b}.label-info{background-color:#89C4F4}.label-info[href]:focus,.label-info[href]:hover{background-color:#5aadf0}.label-warning{background-color:#dfba49}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#d0a625}.label-danger{background-color:#F3565D}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#f0262f}.label.label-icon{padding:4px 0 4px 4px;margin-right:2px;text-align:center!important}.label.label-icon>i{font-size:12px;text-align:center!important}.note p,.page-loading,.panel .panel-body{font-size:13px}.ie8 .label.label-icon,.ie9 .label.label-icon{padding:3px 0 3px 3px}.text-default{color:#c6c6c6}.text-primary{color:#428bca}.text-success{color:#45B6AF}.text-info{color:#89C4F4}.text-warning{color:#dfba49}.text-danger{color:#F3565D}.list-group .list-group-item-success{color:#3c763d;background-color:#dff0d8}.list-group a.list-group-item-success{color:#3c763d}.list-group a.list-group-item-success .list-group-item-heading{color:inherit}.list-group a.list-group-item-success:focus,.list-group a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}.list-group a.list-group-item-success.active,.list-group a.list-group-item-success.active:focus,.list-group a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group .list-group-item-info{color:#31708f;background-color:#d9edf7}.list-group a.list-group-item-info{color:#31708f}.list-group a.list-group-item-info .list-group-item-heading{color:inherit}.list-group a.list-group-item-info:focus,.list-group a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}.list-group a.list-group-item-info.active,.list-group a.list-group-item-info.active:focus,.list-group a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group .list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}.list-group a.list-group-item-warning{color:#8a6d3b}.list-group a.list-group-item-warning .list-group-item-heading{color:inherit}.list-group a.list-group-item-warning:focus,.list-group a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}.list-group a.list-group-item-warning.active,.list-group a.list-group-item-warning.active:focus,.list-group a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group .list-group-item-danger{color:#a94442;background-color:#f2dede}.list-group a.list-group-item-danger{color:#a94442}.list-group a.list-group-item-danger .list-group-item-heading{color:inherit}.list-group a.list-group-item-danger:focus,.list-group a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}.list-group a.list-group-item-danger.active,.list-group a.list-group-item-danger.active:focus,.list-group a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.loading-message{display:inline-block;padding:10px;margin:0 auto;color:#000!important;font-size:13px;font-weight:400;text-align:center}.loading-message.loading-message-boxed{border:1px solid #ddd;background-color:#eee;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 8px rgba(0,0,0,.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,.1);box-shadow:0 1px 8px rgba(0,0,0,.1)}.loading-message>span{line-height:20px;vertical-align:middle}.page-loading{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;position:fixed;top:50%;left:50%;margin-left:-60px;margin-top:-30px;padding:7px;text-align:center;color:#333;border:1px solid #ddd;background-color:#eee;-webkit-box-shadow:0 1px 8px rgba(0,0,0,.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,.1);box-shadow:0 1px 8px rgba(0,0,0,.1)}.block-spinner-bar>div,.page-spinner-bar>div{border-radius:100%!important;display:inline-block}.panel,.well{-webkit-box-shadow:none!important;-moz-box-shadow:none!important}.page-loading>span{line-height:20px;vertical-align:middle}.page-spinner-bar{position:fixed;z-index:10051;width:100px;top:40%;left:50%;margin-left:-55px;text-align:center}.page-spinner-bar>div{margin:0 5px;width:18px;height:18px;-webkit-animation:bounceDelay 1.4s infinite ease-in-out;animation:bounceDelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.page-spinner-bar .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.page-spinner-bar .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}.block-spinner-bar{display:inline-block;width:80px;text-align:center}.block-spinner-bar>div{margin:0 2px;width:15px;height:15px;-webkit-animation:bounceDelay 1.4s infinite ease-in-out;animation:bounceDelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.note,.tabs-right.nav-tabs>li>a:focus,.tabs-right.nav-tabs>li>a:hover{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0}.block-spinner-bar .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.block-spinner-bar .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}[class^=m-icon-]{display:inline-block;width:14px;height:14px;margin-top:3px;line-height:14px;vertical-align:top}[class^=m-icon-big-]{display:inline-block;width:30px;height:30px;margin:6px;vertical-align:middle}.btn.m-icon-big{padding:9px 16px 8px}.btn.m-icon-big.m-icon-only{padding:9px 8px 8px 0}.btn.m-icon-big [class^=m-icon-big-]{margin:0 0 0 10px}.btn.m-icon-ony>i{margin-left:0}.btn.m-icon{padding:7px 14px}.btn.m-icon [class^=m-icon-]{margin:4px 0 0 5px}.btn.m-icon.m-icon-only{padding:7px 10px 7px 6px}.m-icon-white{background-image:url(../../assets/images/syncfusion-icons-white.png)}.m-icon-swapright{background-position:-27px -10px}.m-icon-swapdown{background-position:-68px -10px}.m-icon-swapleft{background-position:-8px -10px}.m-icon-swapup{background-position:-46px -10px}.m-icon-big-swapright{background-position:-42px -28px}.m-icon-big-swapdown{background-position:-115px -28px}.m-icon-big-swapleft{background-position:-6px -28px}.m-icon-big-swapup{background-position:-78px -28px}.modal{z-index:10050;outline:0}.modal .modal-header{border-bottom:1px solid #EFEFEF}.modal .modal-header h3{font-weight:300}.modal .modal-header .close{margin-top:0!important}.modal .modal-dialog{z-index:10051}.modal>.loading{position:absolute;top:50%;left:50%;margin-top:-22px;margin-left:-22px}.modal.in .page-loading{display:none}.modal-open-noscroll{overflow-y:hidden!important}.modal-full.modal-dialog{width:99%}@media (max-width:768px){.modal-full.modal-dialog{width:auto}}.note{margin:0 0 20px;padding:15px 30px 15px 15px;border-left:5px solid #eee;border-radius:0 4px 4px 0}.note h1,.note h2,.note h3,.note h4,.note h5,.note h6{margin-top:0}.note h1 .close,.note h2 .close,.note h3 .close,.note h4 .close,.note h5 .close,.note h6 .close{margin-right:-10px}.note p:last-child{margin-bottom:0}.note.note-default{background-color:#d3d3d3;border-color:#a0a0a0;color:#333,80%}.note.note-default.note-bordered{background-color:#c9c9c9;border-color:#a5a5a5}.note.note-primary{background-color:#5697d0;border-color:#2a7696;color:#D8E3F2,80%}.note.note-primary.note-bordered{background-color:#468dcb;border-color:#2c7c9e}.note.note-success{background-color:#eef7ea;border-color:#bbdba1;color:#3c763d,80%}.note.note-success.note-bordered{background-color:#e2f1dc;border-color:#c1dea8}.note.note-info{background-color:#eef7fb;border-color:#91d9e8;color:#31708f,80%}.note.note-info.note-bordered{background-color:#ddeff8;border-color:#9adcea}.note.note-warning{background-color:#fcf8e3;border-color:#f2cf87;color:#8a6d3b,80%}.note.note-warning.note-bordered{background-color:#faf3d1;border-color:#f3d390}.note.note-danger{background-color:#f9f0f0;border-color:#dca7b0;color:#a94442,80%}.note.note-danger.note-bordered{background-color:#f3e2e2;border-color:#dfaeb7}.pagination{margin:10px 0}.pagination.pagination-circle>li:first-child>a{border-radius:25px 0 0 25px!important}.pagination.pagination-circle>li:last-child>a{border-radius:0 25px 25px 0!important}.dashboard-stat,.portlet{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.pagination .active>a,.pagination .active>a:hover{background:#eee;border-color:#ddd;color:#333}.panel{box-shadow:none!important}.panel-group .panel{overflow:visible}.panel .panel-title>a:hover{text-decoration:none}.accordion .panel .panel-heading,.accordion .panel .panel-title{padding:0}.accordion .panel .panel-title .accordion-toggle{display:block;padding:10px 15px}.accordion .panel .panel-title .accordion-toggle.accordion-toggle-styled{background:url(../../assets/images/accordion-plusminus.png) right -19px no-repeat;margin-right:15px}.accordion .panel .panel-title .accordion-toggle.accordion-toggle-styled.collapsed{background-position:right 12px}.panel-default{border-color:#e0e0e0}.panel-default>.panel-heading{color:#333;background-color:#f9f9f9;border-color:#e0e0e0}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#e0e0e0}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#e0e0e0}.panel-primary{border-color:#3595bd}.panel-primary>.panel-heading{color:#D8E3F2;background-color:#428bca;border-color:#3595bd}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#3595bd}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#3595bd}.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-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-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-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-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.accordion-heading{background:#eee}.accordion-heading a,.accordion-heading a:hover{text-decoration:none}.popover{box-shadow:5px 5px rgba(102,102,102,.1);padding:0}.portlet.calendar .fc-button,.progress{-webkit-box-shadow:none;-moz-box-shadow:none}.popover .popover-title{margin:0!important}.popover.name .popover-content,.popover.name .popover-title,name .popover .popover-content{color:#F3565D}.popovers.yellow+.popover,.popovers.yellow+.popover .popover-content,.popovers.yellow+.popover .popover-title{background:#ff0}.page-portlet-fullscreen{overflow:hidden}.portlet{margin-top:0;margin-bottom:25px;padding:0;border-radius:4px}.portlet.portlet-fullscreen{z-index:10060;margin:0;position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;background:#fff}.portlet.portlet-fullscreen>.portlet-body{overflow-y:auto;overflow-x:hidden;padding:0 10px}.portlet.portlet-fullscreen>.portlet-title{padding:0 10px}.portlet>.portlet-title{border-bottom:1px solid #eee;padding:0;margin-bottom:10px;min-height:41px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.portlet>.portlet-title:after,.portlet>.portlet-title:before{content:" ";display:table}.portlet>.portlet-title>.caption{float:left;display:inline-block;font-size:18px;line-height:18px;font-weight:300;padding:10px 0}.portlet>.portlet-title>.caption.bold{font-weight:400}.portlet>.portlet-title>.caption>i{float:left;margin-top:4px;display:inline-block;font-size:13px;margin-right:5px;color:#666}.portlet>.portlet-title>.caption>i.glyphicon{margin-top:2px}.portlet>.portlet-title>.caption>.caption-helper{padding:0;margin:0;line-height:13px;color:#9eacb4;font-size:13px;font-weight:400}.portlet>.portlet-title>.actions{float:right;display:inline-block;padding:6px 0}.portlet>.portlet-title>.actions>.dropdown-menu i{color:#555}.portlet>.portlet-title>.actions>.btn,.portlet>.portlet-title>.actions>.btn-group>.btn,.portlet>.portlet-title>.actions>.btn-group>.btn.btn-sm,.portlet>.portlet-title>.actions>.btn.btn-sm{padding:4px 10px;font-size:13px;line-height:1.5}.portlet>.portlet-title>.actions>.btn-group>.btn.btn-default,.portlet>.portlet-title>.actions>.btn-group>.btn.btn-sm.btn-default,.portlet>.portlet-title>.actions>.btn.btn-default,.portlet>.portlet-title>.actions>.btn.btn-sm.btn-default{padding:3px 9px}.portlet>.portlet-title>.actions>.btn-group>.btn.btn-sm>i,.portlet>.portlet-title>.actions>.btn-group>.btn>i,.portlet>.portlet-title>.actions>.btn.btn-sm>i,.portlet>.portlet-title>.actions>.btn>i{font-size:13px}.portlet>.portlet-title>.actions .btn-icon-only{padding:5px 7px 3px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default{padding:4px 6px 2px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default>i{font-size:14px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen{font-family:FontAwesome;color:#a0a0a0;padding-top:3px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen.btn-sm{padding:3px!important;height:27px;width:27px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen:before{content:"\f065"}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen.on:before{content:"\f066"}.portlet>.portlet-title>.tools{float:right;display:inline-block;padding:12px 0 8px}.portlet>.portlet-title>.tools>a{display:inline-block;height:16px;margin-left:5px;opacity:1;filter:alpha(opacity=100)}.portlet>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon.png);background-repeat:no-repeat;width:11px}.portlet>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon.png);background-repeat:no-repeat;width:12px}.portlet>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon.png);width:13px}.portlet>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon.png);width:14px;visibility:visible}.portlet>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon.png);width:14px;visibility:visible}.portlet>.portlet-title>.tools>a.fullscreen{display:inline-block;top:-3px;position:relative;font-size:13px;font-family:FontAwesome;color:#ACACAC}.portlet>.portlet-title>.tools>a.fullscreen:before{content:"\f065"}.portlet>.portlet-title>.tools>a.fullscreen.on:before{content:"\f066"}.portlet>.portlet-title>.tools>a:hover{text-decoration:none;-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-ms-transition:all .1s ease-in-out;transition:all .1s ease-in-out;opacity:.8;filter:alpha(opacity=80)}.portlet>.portlet-title>.pagination{float:right;display:inline-block;margin:2px 0 0;border:0;padding:4px 0}.portlet>.portlet-title>.nav-tabs{background:0 0;margin:0;float:right;display:inline-block;border:0}.portlet>.portlet-title>.nav-tabs>li{background:0 0;margin:0;border:0}.portlet>.portlet-title>.nav-tabs>li>a{background:0 0;margin:5px 0 0 1px;border:0;padding:8px 10px;color:#fff}.portlet>.portlet-title>.nav-tabs>li.active>a,.portlet>.portlet-title>.nav-tabs>li:hover>a{color:#333;background:#fff;border:0}.portlet>.portlet-body{clear:both;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.portlet>.portlet-empty{min-height:125px}.portlet.full-height-content{margin-bottom:0}.portlet.bordered{border-left:2px solid #e6e9ec!important}.portlet.bordered>.portlet-title{border-bottom:0}.portlet.solid{padding:0 10px 10px;border:0}.portlet.solid>.portlet-title{border-bottom:0;margin-bottom:10px}.portlet.solid>.portlet-title>.caption{padding:16px 0 2px}.portlet.solid>.portlet-title>.actions{padding:12px 0 6px}.portlet.solid>.portlet-title>.tools{padding:14px 0 6px}.portlet.solid.bordered>.portlet-title{margin-bottom:10px}.portlet.box{padding:0!important}.portlet.box>.portlet-title{border-bottom:0;padding:0 10px;margin-bottom:0;color:#fff}.portlet.box>.portlet-title>.caption{padding:11px 0 9px}.portlet.box>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.box>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.box>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.box>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.box>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.box>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box>.portlet-title>.actions{padding:7px 0 5px}.portlet.box>.portlet-body{background-color:#fff;padding:10px}.portlet.box.portlet-fullscreen>.portlet-body{padding:10px}.portlet.light{padding:12px 20px 15px;background-color:#fff}.portlet.light.bordered{border:1px solid #e1e1e1!important}.portlet.light.bordered>.portlet-title{border-bottom:1px solid #eee}.portlet.light.bg-inverse{background:#F7F7F7}.portlet.light>.portlet-title{padding:0;min-height:48px}.portlet.light>.portlet-title>.caption{color:#666;padding:10px 0}.portlet.light>.portlet-title>.caption>.caption-subject{font-size:16px}.portlet.light>.portlet-title>.caption>i{color:#777;font-size:15px;font-weight:300;margin-top:3px}.portlet.light>.portlet-title>.caption.caption-md>.caption-subject{font-size:15px}.portlet.light>.portlet-title>.caption.caption-md>i{font-size:14px}.portlet.light>.portlet-title>.actions{padding:6px 0 14px}.portlet.light>.portlet-title>.actions .btn-default{color:#666}.portlet.light>.portlet-title>.actions .btn-icon-only{height:27px;width:27px}.portlet.light>.portlet-title>.actions .dropdown-menu li>a{color:#555}.portlet.light>.portlet-title>.inputs{float:right;display:inline-block;padding:4px 0}.portlet.light>.portlet-title>.inputs>.portlet-input .input-icon>i{font-size:14px;margin-top:9px}.portlet.light>.portlet-title>.inputs>.portlet-input .input-icon>.form-control{height:30px;padding:2px 26px 3px 10px;font-size:13px}.portlet.light>.portlet-title>.inputs>.portlet-input>.form-control{height:30px;padding:3px 10px;font-size:13px}.portlet.light>.portlet-title>.pagination{padding:2px 0 13px}.portlet.light>.portlet-title>.tools{padding:10px 0 13px;margin-top:2px}.portlet.light>.portlet-title>.nav-tabs>li{margin:0;padding:0}.portlet.light>.portlet-title>.nav-tabs>li>a{margin:0;padding:12px 13px 13px;font-size:13px;color:#666}.portlet.light>.portlet-title>.nav-tabs>li.active>a,.portlet.light>.portlet-title>.nav-tabs>li:hover>a{margin:0;background:0 0;color:#333}.blue.btn.active,.blue.btn:active,.btn.default.active,.btn.default:active,.open .blue.btn.dropdown-toggle,.open .btn.default.dropdown-toggle,.progress,.progress-striped .progress>.progress-bar-default,.progress-striped .progress>.progress-bar-info,.progress-striped .progress>.progress-bar-success,.progress-striped .progress>.progress-bar-warning{background-image:none}.portlet.light.form-fit{padding:0}.portlet.light.form-fit>.portlet-title{padding:17px 20px 10px;margin-bottom:0}.portlet.light .portlet-body{padding-top:8px}.portlet.light.portlet-fullscreen>.portlet-body{padding:8px 0}.tab-pane>p:last-child{margin-bottom:0}.tabs-reversed>li{float:right;margin-right:0}.tabs-reversed>li>a{margin-right:0}.portlet-sortable:not(.portlet-fullscreen)>.portlet-title{cursor:move}.portlet-sortable-placeholder{border:2px dashed #eee;margin-bottom:25px}.portlet-sortable-empty{height:45px}.progress{border:0;filter:none;box-shadow:none}.progress.progress-sm{height:12px}.progress>.progress-bar-default{background-color:#c6c6c6}.progress>.progress-bar-success{background-color:#45B6AF}.progress>.progress-bar-info{background-color:#89C4F4}.progress>.progress-bar-danger{background-color:#F3565D}.progress-striped .progress>.progress-bar-danger{background-image:none}.progress>.progress-bar-warning{background-color:#dfba49}.dashboard-stat{display:block;margin-bottom:25px;overflow:hidden;border-radius:4px}.dashboard-stat:after,.dashboard-stat:before{content:" ";display:table}.portlet .dashboard-stat:last-child{margin-bottom:0}.dashboard-stat .visual{width:80px;height:80px;display:block;float:left;padding-top:10px;padding-left:15px;margin-bottom:15px;font-size:35px;line-height:35px}.dashboard-stat .visual>i{margin-left:-35px;font-size:110px;line-height:110px}.dashboard-stat .details{position:absolute;right:15px;padding-right:15px}.dashboard-stat .details .number{padding-top:25px;text-align:right;font-size:34px;line-height:36px;letter-spacing:-1px;margin-bottom:0;font-weight:300}.dashboard-stat .details .desc{text-align:right;font-size:16px;letter-spacing:0;font-weight:300}.dashboard-stat .more{display:block;padding:6px 10px;position:relative;text-transform:uppercase;font-weight:300;font-size:11px;opacity:.7;filter:alpha(opacity=70)}.dashboard-stat .more:hover{text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.dashboard-stat .more>i{display:inline-block;margin-top:1px;float:right}.dashboard-stat-light{padding-bottom:20px;margin-bottom:20px}.dashboard-stat-light .details{margin-bottom:5px}.dashboard-stat-light .details .number{font-weight:300;margin-bottom:0}.dashboard-stat2,.dashboard-stat2 .display{margin-bottom:20px}.dashboard-stat2{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;background:#fff;padding:15px 15px 30px}.dashboard-stat2 .display:after,.dashboard-stat2 .display:before{content:" ";display:table}.dashboard-stat2 .display .number{float:left;display:inline-block}.dashboard-stat2 .display .number h3{margin:0 0 2px;padding:0;font-size:30px;font-weight:400}.dashboard-stat2 .display .number h3>small{font-size:23px}.dashboard-stat2 .display .number small{font-size:14px;color:#AAB5BC;font-weight:600;text-transform:uppercase}.dashboard-stat2 .display .icon{display:inline-block;float:right;padding:7px 0 0}.dashboard-stat2 .display .icon>i{color:#cbd4e0;font-size:26px}.dashboard-stat2 .progress-info .progress{margin:0;height:4px;display:block}.dashboard-stat2 .progress-info .status{margin-top:5px;font-size:11px;color:#AAB5BC;font-weight:600;text-transform:uppercase}.dashboard-stat2 .progress-info .status .status-title{float:left;display:inline-block}.dashboard-stat2 .progress-info .status .status-number{float:right;display:inline-block}.text-stat h3{margin-top:5px;margin-bottom:0;font-size:18px}.text-stat span{font-size:13px!important}@media (max-width:767px){.text-stat{margin-top:20px}}.social-icons{padding:0;margin:0}.social-icons:after,.social-icons:before{content:" ";display:table}.social-icons li{float:left;display:inline;list-style:none;margin-right:5px;margin-bottom:5px;text-indent:-9999px}.social-icons li>a{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;width:28px;height:28px;display:block;background-position:0 0;background-repeat:no-repeat;transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out}.social-icons li:hover>a{background-position:0 -38px}.social-icons li .amazon{background:url(../../assets/images/social/amazon.png) no-repeat}.social-icons li .behance{background:url(../../assets/images/social/behance.png) no-repeat}.social-icons li .blogger{background:url(../../assets/images/social/blogger.png) no-repeat}.social-icons li .deviantart{background:url(../../assets/images/social/deviantart.png) no-repeat}.social-icons li .dribbble{background:url(../../assets/images/social/dribbble.png) no-repeat}.social-icons li .dropbox{background:url(../../assets/images/social/dropbox.png) no-repeat}.social-icons li .evernote{background:url(../../assets/images/social/evernote.png) no-repeat}.social-icons li .facebook{background:url(../../assets/images/social/facebook.png) no-repeat}.social-icons li .forrst{background:url(../../assets/images/social/forrst.png) no-repeat}.social-icons li .github{background:url(../../assets/images/social/github.png) no-repeat}.social-icons li .googleplus{background:url(../../assets/images/social/googleplus.png) no-repeat}.social-icons li .jolicloud{background:url(../../assets/images/social/jolicloud.png) no-repeat}.social-icons li .last-fm{background:url(../../assets/images/social/last-fm.png) no-repeat}.social-icons li .linkedin{background:url(../../assets/images/social/linkedin.png) no-repeat}.social-icons li .picasa{background:url(../../assets/images/social/picasa.png) no-repeat}.social-icons li .pintrest{background:url(../../assets/images/social/pintrest.png) no-repeat}.social-icons li .rss{background:url(../../assets/images/social/rss.png) no-repeat}.social-icons li .skype{background:url(../../assets/images/social/skype.png) no-repeat}.social-icons li .spotify{background:url(../../assets/images/social/spotify.png) no-repeat}.social-icons li .stumbleupon{background:url(../../assets/images/social/stumbleupon.png) no-repeat}.social-icons li .tumblr{background:url(../../assets/images/social/tumblr.png) no-repeat}.social-icons li .twitter{background:url(../../assets/images/social/twitter.png) no-repeat}.social-icons li .vimeo{background:url(../../assets/images/social/vimeo.png) no-repeat}.social-icons li .wordpress{background:url(../../assets/images/social/wordpress.png) no-repeat}.social-icons li .xing{background:url(../../assets/images/social/xing.png) no-repeat}.social-icons li .yahoo{background:url(../../assets/images/social/yahoo.png) no-repeat}.social-icons li .youtube{background:url(../../assets/images/social/youtube.png) no-repeat}.social-icons li .vk{background:url(../../assets/images/social/vk.png) no-repeat}.social-icons li .instagram{background:url(../../assets/images/social/instagram.png) no-repeat}.social-icons li .reddit{background:url(../../assets/images/social/reddit.png) no-repeat}.social-icons li .aboutme{background:url(../../assets/images/social/aboutme.png) no-repeat}.social-icons li .flickr{background:url(../../assets/images/social/flickr.png) no-repeat}.social-icons li .foursquare{background:url(../../assets/images/social/foursquare.png) no-repeat}.social-icons li .gravatar{background:url(../../assets/images/social/gravatar.png) no-repeat}.social-icons li .klout{background:url(../../assets/images/social/klout.png) no-repeat}.social-icons li .myspace{background:url(../../assets/images/social/myspace.png) no-repeat}.social-icons li .quora{background:url(../../assets/images/social/quora.png) no-repeat}.social-icons.social-icons-color>li>a{opacity:.7;background-position:0 -38px!important}.social-icons.social-icons-color>li>a:hover{opacity:1}.social-icons.social-icons-circle>li>a{border-radius:25px!important}.social-icon{display:inline-block!important;width:28px;height:28px;background-position:0 0;background-repeat:no-repeat;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out}.social-icon.social-icon-circle{border-radius:25px!important}.social-icon.amazon{background:url(../../assets/images/social/amazon.png) no-repeat}.social-icon.behance{background:url(../../assets/images/social/behance.png) no-repeat}.social-icon.blogger{background:url(../../assets/images/social/blogger.png) no-repeat}.social-icon.deviantart{background:url(../../assets/images/social/deviantart.png) no-repeat}.social-icon.dribbble{background:url(../../assets/images/social/dribbble.png) no-repeat}.social-icon.dropbox{background:url(../../assets/images/social/dropbox.png) no-repeat}.social-icon.evernote{background:url(../../assets/images/social/evernote.png) no-repeat}.social-icon.facebook{background:url(../../assets/images/social/facebook.png) no-repeat}.social-icon.forrst{background:url(../../assets/images/social/forrst.png) no-repeat}.social-icon.github{background:url(../../assets/images/social/github.png) no-repeat}.social-icon.googleplus{background:url(../../assets/images/social/googleplus.png) no-repeat}.social-icon.jolicloud{background:url(../../assets/images/social/jolicloud.png) no-repeat}.social-icon.last-fm{background:url(../../assets/images/social/last-fm.png) no-repeat}.social-icon.linkedin{background:url(../../assets/images/social/linkedin.png) no-repeat}.social-icon.picasa{background:url(../../assets/images/social/picasa.png) no-repeat}.social-icon.pintrest{background:url(../../assets/images/social/pintrest.png) no-repeat}.social-icon.rss{background:url(../../assets/images/social/rss.png) no-repeat}.social-icon.skype{background:url(../../assets/images/social/skype.png) no-repeat}.social-icon.spotify{background:url(../../assets/images/social/spotify.png) no-repeat}.social-icon.stumbleupon{background:url(../../assets/images/social/stumbleupon.png) no-repeat}.social-icon.tumblr{background:url(../../assets/images/social/tumblr.png) no-repeat}.social-icon.twitter{background:url(../../assets/images/social/twitter.png) no-repeat}.social-icon.vimeo{background:url(../../assets/images/social/vimeo.png) no-repeat}.social-icon.wordpress{background:url(../../assets/images/social/wordpress.png) no-repeat}.social-icon.xing{background:url(../../assets/images/social/xing.png) no-repeat}.social-icon.yahoo{background:url(../../assets/images/social/yahoo.png) no-repeat}.social-icon.youtube{background:url(../../assets/images/social/youtube.png) no-repeat}.social-icon.vk{background:url(../../assets/images/social/vk.png) no-repeat}.social-icon.instagram{background:url(../../assets/images/social/instagram.png) no-repeat}.social-icon.reddit{background:url(../../assets/images/social/reddit.png) no-repeat}.social-icon.aboutme{background:url(../../assets/images/social/aboutme.png) no-repeat}.social-icon.flickr{background:url(../../assets/images/social/flickr.png) no-repeat}.social-icon.foursquare{background:url(../../assets/images/social/foursquare.png) no-repeat}.social-icon.gravatar{background:url(../../assets/images/social/gravatar.png) no-repeat}.social-icon.klout{background:url(../../assets/images/social/klout.png) no-repeat}.social-icon.myspace{background:url(../../assets/images/social/myspace.png) no-repeat}.social-icon.quora{background:url(../../assets/images/social/quora.png) no-repeat}.social-icon:hover{background-position:0 -38px}.social-icon-color{opacity:.7;background-position:0 -38px!important}.social-icon-color:hover{opacity:1}.table.table-bordered thead>tr>th{border-bottom:0}.table tr.heading>th{background-color:#eee!important}.table td .img-responsive{width:100%}.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:#a6c8e6;color:#132339}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background:#92bce0}.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:#dff0d8;color:#3c763d}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background:#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:#d9edf7;color:#31708f}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background:#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:#fcf8e3;color:#8a6d3b}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background:#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:#f2dede;color:#a94442}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background:#ebcccc}.table-scrollable{width:100%;overflow-x:auto;overflow-y:hidden;border:1px solid #ddd;margin:10px 0!important}.table-scrollable.table-scrollable-borderless,.table-scrollable>.table-bordered{border:0}.table-scrollable>.table{width:100%!important;margin:0!important;background-color:#fff}.table-scrollable>.table-bordered>tbody>tr>td:first-child,.table-scrollable>.table-bordered>tbody>tr>th:first-child,.table-scrollable>.table-bordered>tfoot>tr>td:first-child,.table-scrollable>.table-bordered>tfoot>tr>th:first-child,.table-scrollable>.table-bordered>thead>tr>td:first-child,.table-scrollable>.table-bordered>thead>tr>th:first-child{border-left:0}.table-scrollable>.table-bordered>tbody>tr>td:last-child,.table-scrollable>.table-bordered>tbody>tr>th:last-child,.table-scrollable>.table-bordered>tfoot>tr>td:last-child,.table-scrollable>.table-bordered>tfoot>tr>th:last-child,.table-scrollable>.table-bordered>thead>tr>td:last-child,.table-scrollable>.table-bordered>thead>tr>th:last-child{border-right:0}.table-scrollable>.table-bordered>tbody>tr:last-child>td,.table-scrollable>.table-bordered>tbody>tr:last-child>th,.table-scrollable>.table-bordered>tfoot>tr:last-child>td,.table-scrollable>.table-bordered>tfoot>tr:last-child>th,.table-scrollable>.table-bordered>thead>tr:last-child>td,.table-scrollable>.table-bordered>thead>tr:last-child>th{border-bottom:0}.flip-scroll table{width:100%}@media only screen and (max-width:768px){.flip-scroll .flip-content:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.flip-scroll * html .flip-content{zoom:1}.flip-scroll td,.flip-scroll th{margin:0;vertical-align:top}.flip-scroll th{border:0!important;border-bottom:1px solid #ddd!important;border-right:1px solid #ddd!important;font-size:13px!important;padding:5px;width:auto!important;display:block;text-align:right}.flip-scroll table{border-collapse:collapse;border-spacing:0;display:block;position:relative;width:100%}.flip-scroll thead{display:block;float:left}.flip-scroll tbody{display:block;width:auto;position:relative;overflow-x:auto;white-space:nowrap}.flip-scroll thead tr{display:block}.flip-scroll tbody tr{display:inline-block;vertical-align:top;margin-left:-5px}.flip-scroll td{display:block;min-height:1.25em;text-align:left;border-top:0!important;border-left:0!important;border-right:0!important;border-bottom:0}.flip-scroll th{border-left:0}.flip-scroll tbody tr{border-left:1px solid #ddd}.flip-scroll td:last-child,.flip-scroll th:last-child{border-bottom:1px solid #ddd}}.centered-td,.page-404,.tiles .tile .tile-body>i,.ui-grid-vcenter div{text-align:center}.table-toolbar{margin-bottom:15px}.table-toolbar:after,.table-toolbar:before{content:" ";display:table}.table.table-full-width{width:100%!important}.table .btn{margin-top:0;margin-left:0;margin-right:5px}.table thead tr th{font-size:14px;font-weight:600}.table-advance{margin-bottom:10px!important}.table-advance thead{color:#999}.table-advance thead tr th{background-color:#DDD;font-size:14px;font-weight:400;color:#666}.table-advance div.danger,.table-advance div.important,.table-advance div.info,.table-advance div.success,.table-advance div.warning{position:absolute;margin-top:-5px;float:left;width:2px;height:30px;margin-right:20px!important}.table-advance tr td{border-left-width:0}.table-advance tr td:first-child{border-left-width:1px!important}.table-advance tr td.highlight:first-child a{margin-left:15px}.table-advance td.highlight div.primary{border-left:2px solid #428bca}.table-advance td.highlight div.success{border-left:2px solid #45B6AF}.table-advance td.highlight div.info{border-left:2px solid #89C4F4}.table-advance td.highlight div.warning{border-left:2px solid #dfba49}.table-advance td.highlight div.danger{border-left:2px solid #F3565D}@media (max-width:767px){.table-advance tr>td.highlight:first-child a{margin-left:8px}}.table.table-light{border:0!important}.table.table-light>thead>tr:hover>th{background:0 0}.table.table-light>thead>tr.uppercase{text-transform:uppercase}.table.table-light>thead>tr>th{font-weight:600;font-size:13px;color:#a7b3b9;border:0;border-bottom:1px solid #F2F5F8}.table.table-light>tbody>tr:last-child>td{border:0}.table.table-light>tbody>tr>td{border:0;border-bottom:1px solid #F2F5F8;color:#9ca8b0;vertical-align:middle}.table.table-light>tbody>tr>td.fit{width:1px;padding-right:3px}.table.table-light>tbody>tr>td .user-pic{display:inline-block;vertical-align:middle;height:30px;-webkit-border-radius:100%;-moz-border-radius:100%;-ms-border-radius:100%;-o-border-radius:100%;border-radius:100%}.table.table-light.table-hover>tbody>tr:hover>td,.table.table-light.table-hover>tbody>tr:hover>th,.table.table-light.table-hover>tbody>tr>td:hover,.table.table-light.table-hover>tbody>tr>th:hover{background:#f9fafb}.nav-pills,.nav-tabs{margin-bottom:10px}.nav-pills>li>a,.nav-tabs>li>a{font-size:14px}.nav-pills>li>a>.badge,.nav-tabs>li>a>.badge{margin-top:-3px}.nav-pills>li .dropdown-menu:after,.nav-pills>li .dropdown-menu:before,.nav-tabs>li .dropdown-menu:after,.nav-tabs>li .dropdown-menu:before{display:none}.nav-pills.nav-pills-sm>li>a,.nav-pills.nav-tabs-sm>li>a,.nav-tabs.nav-pills-sm>li>a,.nav-tabs.nav-tabs-sm>li>a{font-size:13px}.nav-pills .dropdown.open>.dropdown-toggle,.nav-tabs .dropdown.open>.dropdown-toggle{background:#eee;color:#0d638f;border-color:transparent}.tabs-left.nav-tabs,.tabs-right.nav-tabs{border-bottom:0}.tabs-left.nav-tabs>li,.tabs-right.nav-tabs>li{float:none}.tabs-left.nav-tabs>li>a,.tabs-right.nav-tabs>li>a{margin-right:0;margin-bottom:3px}.tabs-left.nav-tabs{border-right:1px solid #ddd}.tabs-left.nav-tabs>li>a{display:block;margin-right:-1px}.tabs-left.nav-tabs>li>a:focus,.tabs-left.nav-tabs>li>a:hover{border-radius:4px 0 0 4px;border-color:#eee #ddd #eee #eee}.tabs-left.nav-tabs>li.active>a,.tabs-left.nav-tabs>li.active>a:hover>li.active>a:focus{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-ms-border-radius:4px 0 0 4px;-o-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;border-color:#ddd transparent #ddd #ddd}.tabs-right.nav-tabs{border-left:1px solid #ddd}.tabs-right.nav-tabs>li>a{display:block;margin-left:-1px}.tabbable:after,.tabbable:before,.tiles:after,.tiles:before{display:table;content:" "}.tabs-right.nav-tabs>li>a:focus,.tabs-right.nav-tabs>li>a:hover{border-radius:0 4px 4px 0;border-color:#eee #eee #eee #ddd}.tabs-right.nav-tabs>li.active>a,.tabs-right.nav-tabs>li.active>a:hover>li.active>a:focus{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;border-color:#ddd #ddd #ddd transparent}.tabs-below>.nav-pills,.tabs-below>.nav-tabs{border-bottom:0;margin-bottom:0;margin-top:10px}.tabs-below>.nav-tabs{border-top:1px solid #ddd;margin-bottom:0;margin-top:10px}.tabs-below>.nav-tabs>li>a{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a:focus,.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>li>a .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.tabs-below>.nav-tabs .active a,.tabs-below>.nav-tabs .active a:hover .active a:focus{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;border-color:transparent #ddd #ddd}.tabbable-custom{margin-bottom:15px;padding:0;overflow:hidden}.tabbable-custom>.nav-tabs{border:none;margin:0}.tabbable-custom>.nav-tabs>li.active>a,.tabbable-custom>.nav-tabs>li>a{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0}.tabbable-custom>.nav-tabs>li{margin-right:2px;border-top:2px solid transparent}.tabbable-custom>.nav-tabs>li>a{margin-right:0;border-radius:0}.tabbable-custom>.nav-tabs>li>a:hover{background:0 0;border-color:transparent}.tabbable-custom>.nav-tabs>li.active{border-top:3px solid #F3565D;margin-top:0;position:relative}.tabbable-custom>.nav-tabs>li.active>a{border-top:none;font-weight:400;border-radius:0}.tabbable-custom>.nav-tabs>li.active>a:hover{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border-top:none;background:#fff;border-color:#d4d4d4 #d4d4d4 transparent}.tabbable-custom>.tab-content{background-color:#fff;border:1px solid #ddd;padding:10px;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabbable-custom.nav-justified>.tab-content{margin-top:-1px}.tabbable-custom.boxless>.tab-content{padding:15px 0;border-left:none;border-right:none;border-bottom:none}.tabbable-custom.tabs-below.nav-justified .tab-content{margin-top:0;margin-bottom:-2px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.tabbable-custom.tabbable-full-width>.nav-tabs>li>a{color:#424242;font-size:15px;padding:9px 15px}.tabbable-custom.tabbable-full-width>.tab-content{padding:15px 0;border-left:none;border-right:none;border-bottom:none}.tabbable-custom.tabs-below .nav-tabs>li>a{border-top:none;border-bottom:2px solid transparent;margin-top:-1px}.tabbable-custom.tabs-below .nav-tabs>li.active{border-top:none;border-bottom:3px solid #d12610;margin-bottom:0;position:relative}.tabbable-custom.tabs-below .nav-tabs>li.active>a{border-bottom:none}.tabbable-custom.tabs-below .nav-tabs>li.active>a:hover{background:#fff;border-color:#d4d4d4 #d4d4d4 transparent}.tabbable-custom.tabbable-noborder .tab-content,.tabbable-custom.tabbable-noborder>.nav-tabs>li>a{border:0}.tabbable-line>.nav-tabs{border:none;margin:0}.tabbable-line>.nav-tabs>li{margin-right:2px}.tabbable-line>.nav-tabs>li>a{border:0;margin-right:0;color:#737373}.tabbable-line>.nav-tabs>li>a>i{color:#a6a6a6}.tabbable-line>.nav-tabs>li.open,.tabbable-line>.nav-tabs>li:hover{border-bottom:4px solid #fbcdcf}.tabbable-line>.nav-tabs>li.open>a,.tabbable-line>.nav-tabs>li:hover>a{border:0;background:0 0!important;color:#333}.tabbable-line>.nav-tabs>li.open>a>i,.tabbable-line>.nav-tabs>li:hover>a>i{color:#a6a6a6}.tabbable-line>.nav-tabs>li.open .dropdown-menu,.tabbable-line>.nav-tabs>li:hover .dropdown-menu{margin-top:0}.tabbable-line>.nav-tabs>li.active{border-bottom:4px solid #F3565D;position:relative}.tabbable-line>.nav-tabs>li.active>a{border:0;color:#333}.tabbable-line>.nav-tabs>li.active>a>i{color:#404040}.tabbable-line>.tab-content{margin-top:-3px;background-color:#fff;border:0;border-top:1px solid #eee;padding:15px 0}.portlet .tabbable-line>.tab-content{padding-bottom:0}.tabbable-line.tabs-below>.nav-tabs>li{border-top:4px solid transparent}.tabbable-line.tabs-below>.nav-tabs>li>a{margin-top:0}.tabbable-line.tabs-below>.nav-tabs>li:hover{border-bottom:0;border-top:4px solid #fbcdcf}.tabbable-line.tabs-below>.nav-tabs>li.active{margin-bottom:-2px;border-bottom:0;border-top:4px solid #F3565D}.tabbable-line.tabs-below>.tab-content{margin-top:-10px;border-top:0;border-bottom:1px solid #eee;padding-bottom:15px}.tiles{margin-right:-10px}.tiles .tile{display:block;float:left;height:135px;width:135px!important;cursor:pointer;text-decoration:none;color:#fff;position:relative;font-weight:300;font-size:12px;letter-spacing:.02em;line-height:20px;overflow:hidden;border:4px solid transparent;margin:0 10px 10px 0}.tiles .tile .tile-body>.content,.tiles .tile.image .tile-body h3,.tiles .tile.selected .check:after{display:inline-block}.tiles .tile:after,.tiles .tile:before{content:"";float:left}.tiles .tile.double{width:280px!important}.tiles .tile.double-down{height:280px!important}.tiles .tile.double-down i{margin-top:95px}.tiles .tile:hover{border-color:#aaa!important}.tiles .tile.selected,.tiles .tile:active{border-color:#ccc!important}.tiles .tile.selected .corner:after{content:"";display:inline-block;border-left:40px solid transparent;border-bottom:40px solid transparent;border-right:40px solid #ccc;position:absolute;top:-3px;right:-3px}.tiles .tile.selected .check:after{font-family:FontAwesome;font-size:13px;content:"\f00c";position:absolute;top:2px;right:2px}.tiles .tile.icon{padding:0}.tiles .tile.image .tile-body{padding:0!important}.tiles .tile.image .tile-body>img{width:100%;height:auto;min-height:100%;max-width:100%}.tiles .tile .tile-body{height:100%;vertical-align:top;padding:10px;overflow:hidden;position:relative;font-weight:400;font-size:12px;color:#fff;margin-bottom:10px}.tiles .tile .tile-body p{font-weight:400;font-size:13px;color:#fff;overflow:hidden}.tiles .tile .tile-body p:active{color:rgba(0,0,0,.4)}.tiles .tile .tile-body p:hover{color:#fff}.tiles .tile .tile-body img{float:left;margin-right:10px}.tiles .tile .tile-body img.pull-right{float:right!important;margin-left:10px;margin-right:0}.tiles .tile .tile-body>i{margin-top:17px;display:block;font-size:56px;line-height:56px}.tiles .tile .tile-body h1,.tiles .tile .tile-body h2,.tiles .tile .tile-body h3,.tiles .tile .tile-body h4,.tiles .tile .tile-body h5,.tiles .tile .tile-body h6,.tiles .tile .tile-body p{padding:0;margin:0;line-height:14px}.tiles .tile .tile-body h1:hover,.tiles .tile .tile-body h2:hover,.tiles .tile .tile-body h3:hover,.tiles .tile .tile-body h4:hover,.tiles .tile .tile-body h5:hover,.tiles .tile .tile-body h6:hover,.tiles .tile .tile-body p:hover{color:#fff}.tiles .tile .tile-body h3,.tiles .tile .tile-body h4{margin-bottom:5px}.tiles .tile .tile-object{position:absolute;bottom:0;left:0;right:0;min-height:30px;background-color:transparent}.tiles .tile .tile-object:after,.tiles .tile .tile-object:before{display:table;content:""}.tiles .tile .tile-object>.name{position:absolute;bottom:0;left:0;margin-bottom:5px;margin-left:10px;margin-right:15px;font-weight:400;font-size:13px;color:#fff}.tiles .tile .tile-object>.name>i{vertical-align:middle;display:block;font-size:24px;height:18px;width:24px}.tiles .tile .tile-object>.number{position:absolute;bottom:0;right:0;color:#fff;text-align:center;font-weight:600;font-size:14px;letter-spacing:.01em;line-height:14px;margin-bottom:8px;margin-right:10px}.well{background-color:#eee;border:0;box-shadow:none!important}.blue.btn,.btn.default{border-color:""}@-webkit-keyframes fadeInUpm{0%{opacity:0;-webkit-transform:translateY(15px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUpm{0%{opacity:0;-moz-transform:translateY(15px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUpm{0%{opacity:0;-o-transform:translateY(15px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInUpm{0%{opacity:0;transform:translateY(15px)}100%{opacity:1;transform:translateY(0)}}.fade-in-up{-webkit-animation:fadeInUpm .5s;animation:fadeInUpm .5s}@-webkit-keyframes bounceDelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bounceDelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.btn.default{color:#333;background-color:#E5E5E5}.btn.default.active,.btn.default:active,.btn.default:focus,.btn.default:hover,.open .btn.default.dropdown-toggle{color:#333;background-color:#d3d3d3}.btn.default.active,.btn.default:active{background-color:#c6c6c6}.btn.default.active:hover,.btn.default:active:hover{background-color:#ccc}.btn.default.disabled,.btn.default.disabled.active,.btn.default.disabled:active,.btn.default.disabled:focus,.btn.default.disabled:hover,.btn.default[disabled],.btn.default[disabled].active,.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:active,fieldset[disabled] .btn.default:focus,fieldset[disabled] .btn.default:hover{background-color:#E5E5E5}.btn.default .badge{color:#E5E5E5;background-color:#333}.blue.btn{color:#FFF;background-color:#4B8DF8}.blue.btn.active,.blue.btn:active,.blue.btn:focus,.blue.btn:hover,.open .blue.btn.dropdown-toggle{color:#FFF;background-color:#2977f7}.blue.btn.active,.blue.btn:active{background-color:#1068f6}.blue.btn.active:hover,.blue.btn:active:hover{background-color:#1a6ef6}.blue.btn.disabled,.blue.btn.disabled.active,.blue.btn.disabled:active,.blue.btn.disabled:focus,.blue.btn.disabled:hover,.blue.btn[disabled],.blue.btn[disabled].active,.blue.btn[disabled]:active,.blue.btn[disabled]:focus,.blue.btn[disabled]:hover,fieldset[disabled] .blue.btn,fieldset[disabled] .blue.btn.active,fieldset[disabled] .blue.btn:active,fieldset[disabled] .blue.btn:focus,fieldset[disabled] .blue.btn:hover{background-color:#4B8DF8}.blue.btn .badge{color:#4B8DF8;background-color:#FFF}.portlet.blue,.portlet.box.blue>.portlet-title,.portlet>.portlet-body.blue{background-color:#4B8DF8}.btn.blue-stripe{border-left:3px solid #4B8DF8}.portlet.solid.blue>.portlet-body,.portlet.solid.blue>.portlet-title{border:0;color:#FFF}.portlet.solid.blue>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue{border:1px solid #7cacfa;border-top:0}.portlet.box.blue>.portlet-title>.caption,.portlet.box.blue>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #b7d1fc;color:#d0e1fd}.portlet.box.blue>.portlet-title>.actions .btn-default>i{color:#deeafe}.portlet.box.blue>.portlet-title>.actions .btn-default.active,.portlet.box.blue>.portlet-title>.actions .btn-default:active,.portlet.box.blue>.portlet-title>.actions .btn-default:focus,.portlet.box.blue>.portlet-title>.actions .btn-default:hover{border:1px solid #e8f0fe;color:#fff}.dashboard-stat.blue{background-color:#4B8DF8}.dashboard-stat.blue.dashboard-stat-light:hover{background-color:#3781f7}.dashboard-stat.blue .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue .details .number{color:#FFF}.dashboard-stat.blue .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue .more{color:#FFF;background-color:#3781f7}.bg-blue{border-color:#4B8DF8!important;background-image:none!important;background-color:#4B8DF8!important;color:#FFF!important}.font-blue{color:#4B8DF8!important}.progress-bar.blue{background:#4B8DF8!important;color:#FFF!important}.blue-madison.btn{color:#FFF;background-color:#578ebe;border-color:""}.blue-madison.btn.active,.blue-madison.btn:active,.blue-madison.btn:focus,.blue-madison.btn:hover,.open .blue-madison.btn.dropdown-toggle{color:#FFF;background-color:#437cae}.blue-madison.btn.active,.blue-madison.btn:active{background-image:none;background-color:#3c6f9c}.blue-madison.btn.active:hover,.blue-madison.btn:active:hover{background-color:#3f74a3}.open .blue-madison.btn.dropdown-toggle{background-image:none}.blue-madison.btn.disabled,.blue-madison.btn.disabled.active,.blue-madison.btn.disabled:active,.blue-madison.btn.disabled:focus,.blue-madison.btn.disabled:hover,.blue-madison.btn[disabled],.blue-madison.btn[disabled].active,.blue-madison.btn[disabled]:active,.blue-madison.btn[disabled]:focus,.blue-madison.btn[disabled]:hover,fieldset[disabled] .blue-madison.btn,fieldset[disabled] .blue-madison.btn.active,fieldset[disabled] .blue-madison.btn:active,fieldset[disabled] .blue-madison.btn:focus,fieldset[disabled] .blue-madison.btn:hover{background-color:#578ebe}.blue-madison.btn .badge{color:#578ebe;background-color:#FFF}.portlet.blue-madison,.portlet.box.blue-madison>.portlet-title,.portlet>.portlet-body.blue-madison{background-color:#578ebe}.btn.blue-madison-stripe{border-left:3px solid #578ebe}.portlet.solid.blue-madison>.portlet-body,.portlet.solid.blue-madison>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-madison>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-madison>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-madison{border:1px solid #7ca7cc;border-top:0}.portlet.box.blue-madison>.portlet-title>.caption,.portlet.box.blue-madison>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-madison>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #a8c4dd;color:#bad1e4}.portlet.box.blue-madison>.portlet-title>.actions .btn-default>i{color:#c5d8e9}.portlet.box.blue-madison>.portlet-title>.actions .btn-default.active,.portlet.box.blue-madison>.portlet-title>.actions .btn-default:active,.portlet.box.blue-madison>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-madison>.portlet-title>.actions .btn-default:hover{border:1px solid #cdddec;color:#dfeaf3}.dashboard-stat.blue-madison{background-color:#578ebe}.dashboard-stat.blue-madison.dashboard-stat-light:hover{background-color:#4884b8}.dashboard-stat.blue-madison .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-madison .details .number{color:#FFF}.dashboard-stat.blue-madison .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-madison .more{color:#FFF;background-color:#4884b8}.bg-blue-madison{border-color:#578ebe!important;background-image:none!important;background-color:#578ebe!important;color:#FFF!important}.font-blue-madison{color:#578ebe!important}.progress-bar.blue-madison{background:#578ebe!important;color:#FFF!important}.blue-chambray.btn{color:#FFF;background-color:#2C3E50;border-color:""}.blue-chambray.btn.active,.blue-chambray.btn:active,.blue-chambray.btn:focus,.blue-chambray.btn:hover,.open .blue-chambray.btn.dropdown-toggle{color:#FFF;background-color:#1f2c39}.blue-chambray.btn.active,.blue-chambray.btn:active{background-image:none;background-color:#161f29}.blue-chambray.btn.active:hover,.blue-chambray.btn:active:hover{background-color:#1a242f}.open .blue-chambray.btn.dropdown-toggle{background-image:none}.blue-chambray.btn.disabled,.blue-chambray.btn.disabled.active,.blue-chambray.btn.disabled:active,.blue-chambray.btn.disabled:focus,.blue-chambray.btn.disabled:hover,.blue-chambray.btn[disabled],.blue-chambray.btn[disabled].active,.blue-chambray.btn[disabled]:active,.blue-chambray.btn[disabled]:focus,.blue-chambray.btn[disabled]:hover,fieldset[disabled] .blue-chambray.btn,fieldset[disabled] .blue-chambray.btn.active,fieldset[disabled] .blue-chambray.btn:active,fieldset[disabled] .blue-chambray.btn:focus,fieldset[disabled] .blue-chambray.btn:hover{background-color:#2C3E50}.blue-chambray.btn .badge{color:#2C3E50;background-color:#FFF}.portlet.blue-chambray,.portlet.box.blue-chambray>.portlet-title,.portlet>.portlet-body.blue-chambray{background-color:#2C3E50}.btn.blue-chambray-stripe{border-left:3px solid #2C3E50}.portlet.solid.blue-chambray>.portlet-body,.portlet.solid.blue-chambray>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-chambray>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-chambray>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-chambray{border:1px solid #3e5771;border-top:0}.portlet.box.blue-chambray>.portlet-title>.caption,.portlet.box.blue-chambray>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-chambray>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #547698;color:#5f83a7}.portlet.box.blue-chambray>.portlet-title>.actions .btn-default>i{color:#698aac}.portlet.box.blue-chambray>.portlet-title>.actions .btn-default.active,.portlet.box.blue-chambray>.portlet-title>.actions .btn-default:active,.portlet.box.blue-chambray>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-chambray>.portlet-title>.actions .btn-default:hover{border:1px solid #6f90b0;color:#809cb9}.dashboard-stat.blue-chambray{background-color:#2C3E50}.dashboard-stat.blue-chambray.dashboard-stat-light:hover{background-color:#253443}.dashboard-stat.blue-chambray .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-chambray .details .number{color:#FFF}.dashboard-stat.blue-chambray .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-chambray .more{color:#FFF;background-color:#253443}.bg-blue-chambray{border-color:#2C3E50!important;background-image:none!important;background-color:#2C3E50!important;color:#FFF!important}.font-blue-chambray{color:#2C3E50!important}.progress-bar.blue-chambray{background:#2C3E50!important;color:#FFF!important}.blue-ebonyclay.btn{color:#FFF;background-color:#22313F;border-color:""}.blue-ebonyclay.btn.active,.blue-ebonyclay.btn:active,.blue-ebonyclay.btn:focus,.blue-ebonyclay.btn:hover,.open .blue-ebonyclay.btn.dropdown-toggle{color:#FFF;background-color:#151f28}.blue-ebonyclay.btn.active,.blue-ebonyclay.btn:active{background-image:none;background-color:#0d1217}.blue-ebonyclay.btn.active:hover,.blue-ebonyclay.btn:active:hover{background-color:#10171e}.open .blue-ebonyclay.btn.dropdown-toggle{background-image:none}.blue-ebonyclay.btn.disabled,.blue-ebonyclay.btn.disabled.active,.blue-ebonyclay.btn.disabled:active,.blue-ebonyclay.btn.disabled:focus,.blue-ebonyclay.btn.disabled:hover,.blue-ebonyclay.btn[disabled],.blue-ebonyclay.btn[disabled].active,.blue-ebonyclay.btn[disabled]:active,.blue-ebonyclay.btn[disabled]:focus,.blue-ebonyclay.btn[disabled]:hover,fieldset[disabled] .blue-ebonyclay.btn,fieldset[disabled] .blue-ebonyclay.btn.active,fieldset[disabled] .blue-ebonyclay.btn:active,fieldset[disabled] .blue-ebonyclay.btn:focus,fieldset[disabled] .blue-ebonyclay.btn:hover{background-color:#22313F}.blue-ebonyclay.btn .badge{color:#22313F;background-color:#FFF}.portlet.blue-ebonyclay,.portlet.box.blue-ebonyclay>.portlet-title,.portlet>.portlet-body.blue-ebonyclay{background-color:#22313F}.btn.blue-ebonyclay-stripe{border-left:3px solid #22313F}.portlet.solid.blue-ebonyclay>.portlet-body,.portlet.solid.blue-ebonyclay>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-ebonyclay>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-ebonyclay{border:1px solid #344b60;border-top:0}.portlet.box.blue-ebonyclay>.portlet-title>.caption,.portlet.box.blue-ebonyclay>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #496a88;color:#527798}.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default>i{color:#587ea2}.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default.active,.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default:active,.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default:hover{border:1px solid #5d83a7;color:#6d90b0}.dashboard-stat.blue-ebonyclay{background-color:#22313F}.dashboard-stat.blue-ebonyclay.dashboard-stat-light:hover{background-color:#1b2732}.dashboard-stat.blue-ebonyclay .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-ebonyclay .details .number{color:#FFF}.dashboard-stat.blue-ebonyclay .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-ebonyclay .more{color:#FFF;background-color:#1b2732}.bg-blue-ebonyclay{border-color:#22313F!important;background-image:none!important;background-color:#22313F!important;color:#FFF!important}.font-blue-ebonyclay{color:#22313F!important}.progress-bar.blue-ebonyclay{background:#22313F!important;color:#FFF!important}.blue-hoki.btn{color:#FFF;background-color:#67809F;border-color:""}.blue-hoki.btn.active,.blue-hoki.btn:active,.blue-hoki.btn:focus,.blue-hoki.btn:hover,.open .blue-hoki.btn.dropdown-toggle{color:#FFF;background-color:#586e8b}.blue-hoki.btn.active,.blue-hoki.btn:active{background-image:none;background-color:#4e627b}.blue-hoki.btn.active:hover,.blue-hoki.btn:active:hover{background-color:#526781}.open .blue-hoki.btn.dropdown-toggle{background-image:none}.blue-hoki.btn.disabled,.blue-hoki.btn.disabled.active,.blue-hoki.btn.disabled:active,.blue-hoki.btn.disabled:focus,.blue-hoki.btn.disabled:hover,.blue-hoki.btn[disabled],.blue-hoki.btn[disabled].active,.blue-hoki.btn[disabled]:active,.blue-hoki.btn[disabled]:focus,.blue-hoki.btn[disabled]:hover,fieldset[disabled] .blue-hoki.btn,fieldset[disabled] .blue-hoki.btn.active,fieldset[disabled] .blue-hoki.btn:active,fieldset[disabled] .blue-hoki.btn:focus,fieldset[disabled] .blue-hoki.btn:hover{background-color:#67809F}.blue-hoki.btn .badge{color:#67809F;background-color:#FFF}.portlet.blue-hoki,.portlet.box.blue-hoki>.portlet-title,.portlet>.portlet-body.blue-hoki{background-color:#67809F}.btn.blue-hoki-stripe{border-left:3px solid #67809F}.portlet.solid.blue-hoki>.portlet-body,.portlet.solid.blue-hoki>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-hoki>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-hoki>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-hoki{border:1px solid #869ab3;border-top:0}.portlet.box.blue-hoki>.portlet-title>.caption,.portlet.box.blue-hoki>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-hoki>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #acb9ca;color:#bbc7d4}.portlet.box.blue-hoki>.portlet-title>.actions .btn-default>i{color:#c5ceda}.portlet.box.blue-hoki>.portlet-title>.actions .btn-default.active,.portlet.box.blue-hoki>.portlet-title>.actions .btn-default:active,.portlet.box.blue-hoki>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-hoki>.portlet-title>.actions .btn-default:hover{border:1px solid #cbd4de;color:#dbe1e8}.dashboard-stat.blue-hoki{background-color:#67809F}.dashboard-stat.blue-hoki.dashboard-stat-light:hover{background-color:#5e7694}.dashboard-stat.blue-hoki .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-hoki .details .number{color:#FFF}.dashboard-stat.blue-hoki .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-hoki .more{color:#FFF;background-color:#5e7694}.bg-blue-hoki{border-color:#67809F!important;background-image:none!important;background-color:#67809F!important;color:#FFF!important}.font-blue-hoki{color:#67809F!important}.progress-bar.blue-hoki{background:#67809F!important;color:#FFF!important}.blue-steel.btn{color:#FFF;background-color:#4B77BE;border-color:""}.blue-steel.btn.active,.blue-steel.btn:active,.blue-steel.btn:focus,.blue-steel.btn:hover,.open .blue-steel.btn.dropdown-toggle{color:#FFF;background-color:#3d66a8}.blue-steel.btn.active,.blue-steel.btn:active{background-image:none;background-color:#365b96}.blue-steel.btn.active:hover,.blue-steel.btn:active:hover{background-color:#395f9d}.open .blue-steel.btn.dropdown-toggle{background-image:none}.blue-steel.btn.disabled,.blue-steel.btn.disabled.active,.blue-steel.btn.disabled:active,.blue-steel.btn.disabled:focus,.blue-steel.btn.disabled:hover,.blue-steel.btn[disabled],.blue-steel.btn[disabled].active,.blue-steel.btn[disabled]:active,.blue-steel.btn[disabled]:focus,.blue-steel.btn[disabled]:hover,fieldset[disabled] .blue-steel.btn,fieldset[disabled] .blue-steel.btn.active,fieldset[disabled] .blue-steel.btn:active,fieldset[disabled] .blue-steel.btn:focus,fieldset[disabled] .blue-steel.btn:hover{background-color:#4B77BE}.blue-steel.btn .badge{color:#4B77BE;background-color:#FFF}.portlet.blue-steel,.portlet.box.blue-steel>.portlet-title,.portlet>.portlet-body.blue-steel{background-color:#4B77BE}.btn.blue-steel-stripe{border-left:3px solid #4B77BE}.portlet.solid.blue-steel>.portlet-body,.portlet.solid.blue-steel>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-steel>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-steel>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.collapse{background-image:url(../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-steel{border:1px solid #7093cc;border-top:0}.portlet.box.blue-steel>.portlet-title>.caption,.portlet.box.blue-steel>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-steel>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9db5dc;color:#b0c3e3}.portlet.box.blue-steel>.portlet-title>.actions .btn-default>i{color:#bbcce7}.portlet.box.blue-steel>.portlet-title>.actions .btn-default.active,.portlet.box.blue-steel>.portlet-title>.actions .btn-default:active,.portlet.box.blue-steel>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-steel>.portlet-title>.actions .btn-default:hover{border:1px solid #c3d2e9;color:#d6e0f0}.dashboard-stat.blue-steel{background-color:#4B77BE}.dashboard-stat.blue-steel.dashboard-stat-light:hover{background-color:#416db4}.dashboard-stat.blue-steel .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-steel .details .number{color:#FFF}.dashboard-stat.blue-steel .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-steel .more{color:#FFF;background-color:#416db4}.bg-blue-steel{border-color:#4B77BE!important;background-image:none!important;background-color:#4B77BE!important;color:#FFF!important}.font-blue-steel{color:#4B77BE!important}.progress-bar.blue-steel{background:#4B77BE!important;color:#FFF!important}.blue-soft.btn{color:#FFF;background-color:#4c87b9;border-color:""}.blue-soft.btn.active,.blue-soft.btn:active,.blue-soft.btn:focus,.blue-soft.btn:hover,.open .blue-soft.btn.dropdown-toggle{color:#FFF;background-color:#3f75a2}.blue-soft.btn.active,.blue-soft.btn:active{background-image:none;background-color:#386890}.blue-soft.btn.active:hover,.blue-soft.btn:active:hover{background-color:#3b6d97}.open .blue-soft.btn.dropdown-toggle{background-image:none}.blue-soft.btn.disabled,.blue-soft.btn.disabled.active,.blue-soft.btn.disabled:active,.blue-soft.btn.disabled:focus,.blue-soft.btn.disabled:hover,.blue-soft.btn[disabled],.blue-soft.btn[disabled].active,.blue-soft.btn[disabled]:active,.blue-soft.btn[disabled]:focus,.blue-soft.btn[disabled]:hover,fieldset[disabled] .blue-soft.btn,fieldset[disabled] .blue-soft.btn.active,fieldset[disabled] .blue-soft.btn:active,fieldset[disabled] .blue-soft.btn:focus,fieldset[disabled] .blue-soft.btn:hover{background-color:#4c87b9}.blue-soft.btn .badge{color:#4c87b9;background-color:#FFF}.portlet.blue-soft,.portlet.box.blue-soft>.portlet-title,.portlet>.portlet-body.blue-soft{background-color:#4c87b9}.btn.blue-soft-stripe{border-left:3px solid #4c87b9}.portlet.solid.blue-soft>.portlet-body,.portlet.solid.blue-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-soft{border:1px solid #71a0c7;border-top:0}.portlet.box.blue-soft>.portlet-title>.caption,.portlet.box.blue-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9dbdd9;color:#afc9e0}.portlet.box.blue-soft>.portlet-title>.actions .btn-default>i{color:#bad1e4}.portlet.box.blue-soft>.portlet-title>.actions .btn-default.active,.portlet.box.blue-soft>.portlet-title>.actions .btn-default:active,.portlet.box.blue-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #c1d6e7;color:#d4e2ee}.dashboard-stat.blue-soft{background-color:#4c87b9}.dashboard-stat.blue-soft.dashboard-stat-light:hover{background-color:#447dad}.dashboard-stat.blue-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-soft .details .number{color:#FFF}.dashboard-stat.blue-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-soft .more{color:#FFF;background-color:#447dad}.bg-blue-soft{border-color:#4c87b9!important;background-image:none!important;background-color:#4c87b9!important;color:#FFF!important}.font-blue-soft{color:#4c87b9!important}.progress-bar.blue-soft{background:#4c87b9!important;color:#FFF!important}.blue-dark.btn{color:#FFF;background-color:#5e738b;border-color:""}.blue-dark.btn.active,.blue-dark.btn:active,.blue-dark.btn:focus,.blue-dark.btn:hover,.open .blue-dark.btn.dropdown-toggle{color:#FFF;background-color:#506176}.blue-dark.btn.active,.blue-dark.btn:active{background-image:none;background-color:#455566}.blue-dark.btn.active:hover,.blue-dark.btn:active:hover{background-color:#495a6d}.open .blue-dark.btn.dropdown-toggle{background-image:none}.blue-dark.btn.disabled,.blue-dark.btn.disabled.active,.blue-dark.btn.disabled:active,.blue-dark.btn.disabled:focus,.blue-dark.btn.disabled:hover,.blue-dark.btn[disabled],.blue-dark.btn[disabled].active,.blue-dark.btn[disabled]:active,.blue-dark.btn[disabled]:focus,.blue-dark.btn[disabled]:hover,fieldset[disabled] .blue-dark.btn,fieldset[disabled] .blue-dark.btn.active,fieldset[disabled] .blue-dark.btn:active,fieldset[disabled] .blue-dark.btn:focus,fieldset[disabled] .blue-dark.btn:hover{background-color:#5e738b}.blue-dark.btn .badge{color:#5e738b;background-color:#FFF}.portlet.blue-dark,.portlet.box.blue-dark>.portlet-title,.portlet>.portlet-body.blue-dark{background-color:#5e738b}.btn.blue-dark-stripe{border-left:3px solid #5e738b}.portlet.solid.blue-dark>.portlet-body,.portlet.solid.blue-dark>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-dark>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-dark>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-dark{border:1px solid #788da4;border-top:0}.portlet.box.blue-dark>.portlet-title>.caption,.portlet.box.blue-dark>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-dark>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9dacbd;color:#acb8c7}.portlet.box.blue-dark>.portlet-title>.actions .btn-default>i{color:#b5c0cd}.portlet.box.blue-dark>.portlet-title>.actions .btn-default.active,.portlet.box.blue-dark>.portlet-title>.actions .btn-default:active,.portlet.box.blue-dark>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-dark>.portlet-title>.actions .btn-default:hover{border:1px solid #bbc5d1;color:#cad2db}.dashboard-stat.blue-dark{background-color:#5e738b}.dashboard-stat.blue-dark.dashboard-stat-light:hover{background-color:#56697f}.dashboard-stat.blue-dark .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-dark .details .number{color:#FFF}.dashboard-stat.blue-dark .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-dark .more{color:#FFF;background-color:#56697f}.bg-blue-dark{border-color:#5e738b!important;background-image:none!important;background-color:#5e738b!important;color:#FFF!important}.font-blue-dark{color:#5e738b!important}.progress-bar.blue-dark{background:#5e738b!important;color:#FFF!important}.blue-sharp.btn{color:#FFF;background-color:#5C9BD1;border-color:""}.blue-sharp.btn.active,.blue-sharp.btn:active,.blue-sharp.btn:focus,.blue-sharp.btn:hover,.open .blue-sharp.btn.dropdown-toggle{color:#FFF;background-color:#408ac9}.blue-sharp.btn.active,.blue-sharp.btn:active{background-image:none;background-color:#357dbb}.blue-sharp.btn.active:hover,.blue-sharp.btn:active:hover{background-color:#3782c3}.open .blue-sharp.btn.dropdown-toggle{background-image:none}.blue-sharp.btn.disabled,.blue-sharp.btn.disabled.active,.blue-sharp.btn.disabled:active,.blue-sharp.btn.disabled:focus,.blue-sharp.btn.disabled:hover,.blue-sharp.btn[disabled],.blue-sharp.btn[disabled].active,.blue-sharp.btn[disabled]:active,.blue-sharp.btn[disabled]:focus,.blue-sharp.btn[disabled]:hover,fieldset[disabled] .blue-sharp.btn,fieldset[disabled] .blue-sharp.btn.active,fieldset[disabled] .blue-sharp.btn:active,fieldset[disabled] .blue-sharp.btn:focus,fieldset[disabled] .blue-sharp.btn:hover{background-color:#5C9BD1}.blue-sharp.btn .badge{color:#5C9BD1;background-color:#FFF}.portlet.blue-sharp,.portlet.box.blue-sharp>.portlet-title,.portlet>.portlet-body.blue-sharp{background-color:#5C9BD1}.btn.blue-sharp-stripe{border-left:3px solid #5C9BD1}.portlet.solid.blue-sharp>.portlet-body,.portlet.solid.blue-sharp>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-sharp>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-sharp{border:1px solid #84b3dc;border-top:0}.portlet.box.blue-sharp>.portlet-title>.caption,.portlet.box.blue-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-sharp>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #b4d1ea;color:#c7ddef}.portlet.box.blue-sharp>.portlet-title>.actions .btn-default>i{color:#d3e4f3}.portlet.box.blue-sharp>.portlet-title>.actions .btn-default.active,.portlet.box.blue-sharp>.portlet-title>.actions .btn-default:active,.portlet.box.blue-sharp>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-sharp>.portlet-title>.actions .btn-default:hover{border:1px solid #dbe9f5;color:#eff5fb}.dashboard-stat.blue-sharp{background-color:#5C9BD1}.dashboard-stat.blue-sharp.dashboard-stat-light:hover{background-color:#4c91cd}.dashboard-stat.blue-sharp .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-sharp .details .number{color:#FFF}.dashboard-stat.blue-sharp .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-sharp .more{color:#FFF;background-color:#4c91cd}.bg-blue-sharp{border-color:#5C9BD1!important;background-image:none!important;background-color:#5C9BD1!important;color:#FFF!important}.font-blue-sharp{color:#5C9BD1!important}.progress-bar.blue-sharp{background:#5C9BD1!important;color:#FFF!important}.green.btn{color:#FFF;background-color:#35aa47;border-color:""}.green.btn.active,.green.btn:active,.green.btn:focus,.green.btn:hover,.open .green.btn.dropdown-toggle{color:#FFF;background-color:#2d8f3c}.green.btn.active,.green.btn:active{background-image:none;background-color:#267b34}.green.btn.active:hover,.green.btn:active:hover{background-color:#298337}.open .green.btn.dropdown-toggle{background-image:none}.green.btn.disabled,.green.btn.disabled.active,.green.btn.disabled:active,.green.btn.disabled:focus,.green.btn.disabled:hover,.green.btn[disabled],.green.btn[disabled].active,.green.btn[disabled]:active,.green.btn[disabled]:focus,.green.btn[disabled]:hover,fieldset[disabled] .green.btn,fieldset[disabled] .green.btn.active,fieldset[disabled] .green.btn:active,fieldset[disabled] .green.btn:focus,fieldset[disabled] .green.btn:hover{background-color:#35aa47}.green.btn .badge{color:#35aa47;background-color:#FFF}.portlet.box.green>.portlet-title,.portlet.green,.portlet>.portlet-body.green{background-color:#35aa47}.btn.green-stripe{border-left:3px solid #35aa47}.portlet.solid.green>.portlet-body,.portlet.solid.green>.portlet-title{border:0;color:#FFF}.portlet.solid.green>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green{border:1px solid #4bc75e;border-top:0}.portlet.box.green>.portlet-title>.caption,.portlet.box.green>.portlet-title>.caption>i{color:#FFF}.portlet.box.green>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #7ad588;color:#8ddc99}.portlet.box.green>.portlet-title>.actions .btn-default>i{color:#99dfa4}.portlet.box.green>.portlet-title>.actions .btn-default.active,.portlet.box.green>.portlet-title>.actions .btn-default:active,.portlet.box.green>.portlet-title>.actions .btn-default:focus,.portlet.box.green>.portlet-title>.actions .btn-default:hover{border:1px solid #a1e2ab;color:#b4e8bc}.dashboard-stat.green{background-color:#35aa47}.dashboard-stat.green.dashboard-stat-light:hover{background-color:#309a41}.dashboard-stat.green .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green .details .number{color:#FFF}.dashboard-stat.green .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green .more{color:#FFF;background-color:#309a41}.bg-green{border-color:#35aa47!important;background-image:none!important;background-color:#35aa47!important;color:#FFF!important}.font-green{color:#35aa47!important}.progress-bar.green{background:#35aa47!important;color:#FFF!important}.green-meadow.btn{color:#FFF;background-color:#1BBC9B;border-color:""}.green-meadow.btn.active,.green-meadow.btn:active,.green-meadow.btn:focus,.green-meadow.btn:hover,.open .green-meadow.btn.dropdown-toggle{color:#FFF;background-color:#179d81}.green-meadow.btn.active,.green-meadow.btn:active{background-image:none;background-color:#13866f}.green-meadow.btn.active:hover,.green-meadow.btn:active:hover{background-color:#158f76}.open .green-meadow.btn.dropdown-toggle{background-image:none}.green-meadow.btn.disabled,.green-meadow.btn.disabled.active,.green-meadow.btn.disabled:active,.green-meadow.btn.disabled:focus,.green-meadow.btn.disabled:hover,.green-meadow.btn[disabled],.green-meadow.btn[disabled].active,.green-meadow.btn[disabled]:active,.green-meadow.btn[disabled]:focus,.green-meadow.btn[disabled]:hover,fieldset[disabled] .green-meadow.btn,fieldset[disabled] .green-meadow.btn.active,fieldset[disabled] .green-meadow.btn:active,fieldset[disabled] .green-meadow.btn:focus,fieldset[disabled] .green-meadow.btn:hover{background-color:#1BBC9B}.green-meadow.btn .badge{color:#1BBC9B;background-color:#FFF}.portlet.box.green-meadow>.portlet-title,.portlet.green-meadow,.portlet>.portlet-body.green-meadow{background-color:#1BBC9B}.btn.green-meadow-stripe{border-left:3px solid #1BBC9B}.portlet.solid.green-meadow>.portlet-body,.portlet.solid.green-meadow>.portlet-title{border:0;color:#FFF}.portlet.solid.green-meadow>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-meadow>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-meadow{border:1px solid #2ae0bb;border-top:0}.portlet.box.green-meadow>.portlet-title>.caption,.portlet.box.green-meadow>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-meadow>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #5fe8cc;color:#75ebd3}.portlet.box.green-meadow>.portlet-title>.actions .btn-default>i{color:#83edd7}.portlet.box.green-meadow>.portlet-title>.actions .btn-default.active,.portlet.box.green-meadow>.portlet-title>.actions .btn-default:active,.portlet.box.green-meadow>.portlet-title>.actions .btn-default:focus,.portlet.box.green-meadow>.portlet-title>.actions .btn-default:hover{border:1px solid #8ceeda;color:#a2f2e1}.dashboard-stat.green-meadow{background-color:#1BBC9B}.dashboard-stat.green-meadow.dashboard-stat-light:hover{background-color:#18aa8c}.dashboard-stat.green-meadow .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-meadow .details .number{color:#FFF}.dashboard-stat.green-meadow .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-meadow .more{color:#FFF;background-color:#18aa8c}.bg-green-meadow{border-color:#1BBC9B!important;background-image:none!important;background-color:#1BBC9B!important;color:#FFF!important}.font-green-meadow{color:#1BBC9B!important}.progress-bar.green-meadow{background:#1BBC9B!important;color:#FFF!important}.green-seagreen.btn{color:#FFF;background-color:#1BA39C;border-color:""}.green-seagreen.btn.active,.green-seagreen.btn:active,.green-seagreen.btn:focus,.green-seagreen.btn:hover,.open .green-seagreen.btn.dropdown-toggle{color:#FFF;background-color:#16847f}.green-seagreen.btn.active,.green-seagreen.btn:active{background-image:none;background-color:#126e6a}.green-seagreen.btn.active:hover,.green-seagreen.btn:active:hover{background-color:#147772}.open .green-seagreen.btn.dropdown-toggle{background-image:none}.green-seagreen.btn.disabled,.green-seagreen.btn.disabled.active,.green-seagreen.btn.disabled:active,.green-seagreen.btn.disabled:focus,.green-seagreen.btn.disabled:hover,.green-seagreen.btn[disabled],.green-seagreen.btn[disabled].active,.green-seagreen.btn[disabled]:active,.green-seagreen.btn[disabled]:focus,.green-seagreen.btn[disabled]:hover,fieldset[disabled] .green-seagreen.btn,fieldset[disabled] .green-seagreen.btn.active,fieldset[disabled] .green-seagreen.btn:active,fieldset[disabled] .green-seagreen.btn:focus,fieldset[disabled] .green-seagreen.btn:hover{background-color:#1BA39C}.green-seagreen.btn .badge{color:#1BA39C;background-color:#FFF}.portlet.box.green-seagreen>.portlet-title,.portlet.green-seagreen,.portlet>.portlet-body.green-seagreen{background-color:#1BA39C}.btn.green-seagreen-stripe{border-left:3px solid #1BA39C}.portlet.solid.green-seagreen>.portlet-body,.portlet.solid.green-seagreen>.portlet-title{border:0;color:#FFF}.portlet.solid.green-seagreen>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-seagreen>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-seagreen{border:1px solid #22cfc6;border-top:0}.portlet.box.green-seagreen>.portlet-title>.caption,.portlet.box.green-seagreen>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-seagreen>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #4de1da;color:#63e5de}.portlet.box.green-seagreen>.portlet-title>.actions .btn-default>i{color:#70e7e1}.portlet.box.green-seagreen>.portlet-title>.actions .btn-default.active,.portlet.box.green-seagreen>.portlet-title>.actions .btn-default:active,.portlet.box.green-seagreen>.portlet-title>.actions .btn-default:focus,.portlet.box.green-seagreen>.portlet-title>.actions .btn-default:hover{border:1px solid #78e9e3;color:#8eece8}.dashboard-stat.green-seagreen{background-color:#1BA39C}.dashboard-stat.green-seagreen.dashboard-stat-light:hover{background-color:#18918b}.dashboard-stat.green-seagreen .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-seagreen .details .number{color:#FFF}.dashboard-stat.green-seagreen .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-seagreen .more{color:#FFF;background-color:#18918b}.bg-green-seagreen{border-color:#1BA39C!important;background-image:none!important;background-color:#1BA39C!important;color:#FFF!important}.font-green-seagreen{color:#1BA39C!important}.progress-bar.green-seagreen{background:#1BA39C!important;color:#FFF!important}.green-turquoise.btn{color:#FFF;background-color:#36D7B7;border-color:""}.green-turquoise.btn.active,.green-turquoise.btn:active,.green-turquoise.btn:focus,.green-turquoise.btn:hover,.open .green-turquoise.btn.dropdown-toggle{color:#FFF;background-color:#27c3a4}.green-turquoise.btn.active,.green-turquoise.btn:active{background-image:none;background-color:#22ad92}.green-turquoise.btn.active:hover,.green-turquoise.btn:active:hover{background-color:#24b699}.open .green-turquoise.btn.dropdown-toggle{background-image:none}.green-turquoise.btn.disabled,.green-turquoise.btn.disabled.active,.green-turquoise.btn.disabled:active,.green-turquoise.btn.disabled:focus,.green-turquoise.btn.disabled:hover,.green-turquoise.btn[disabled],.green-turquoise.btn[disabled].active,.green-turquoise.btn[disabled]:active,.green-turquoise.btn[disabled]:focus,.green-turquoise.btn[disabled]:hover,fieldset[disabled] .green-turquoise.btn,fieldset[disabled] .green-turquoise.btn.active,fieldset[disabled] .green-turquoise.btn:active,fieldset[disabled] .green-turquoise.btn:focus,fieldset[disabled] .green-turquoise.btn:hover{background-color:#36D7B7}.green-turquoise.btn .badge{color:#36D7B7;background-color:#FFF}.portlet.box.green-turquoise>.portlet-title,.portlet.green-turquoise,.portlet>.portlet-body.green-turquoise{background-color:#36D7B7}.btn.green-turquoise-stripe{border-left:3px solid #36D7B7}.portlet.solid.green-turquoise>.portlet-body,.portlet.solid.green-turquoise>.portlet-title{border:0;color:#FFF}.portlet.solid.green-turquoise>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-turquoise>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-turquoise{border:1px solid #61dfc6;border-top:0}.portlet.box.green-turquoise>.portlet-title>.caption,.portlet.box.green-turquoise>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-turquoise>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #94ead9;color:#a9eee0}.portlet.box.green-turquoise>.portlet-title>.actions .btn-default>i{color:#b6f0e5}.portlet.box.green-turquoise>.portlet-title>.actions .btn-default.active,.portlet.box.green-turquoise>.portlet-title>.actions .btn-default:active,.portlet.box.green-turquoise>.portlet-title>.actions .btn-default:focus,.portlet.box.green-turquoise>.portlet-title>.actions .btn-default:hover{border:1px solid #bef2e8;color:#d3f6ef}.dashboard-stat.green-turquoise{background-color:#36D7B7}.dashboard-stat.green-turquoise.dashboard-stat-light:hover{background-color:#29cfae}.dashboard-stat.green-turquoise .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-turquoise .details .number{color:#FFF}.dashboard-stat.green-turquoise .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-turquoise .more{color:#FFF;background-color:#29cfae}.bg-green-turquoise{border-color:#36D7B7!important;background-image:none!important;background-color:#36D7B7!important;color:#FFF!important}.font-green-turquoise{color:#36D7B7!important}.progress-bar.green-turquoise{background:#36D7B7!important;color:#FFF!important}.green-haze.btn{color:#FFF;background-color:#44b6ae;border-color:""}.green-haze.btn.active,.green-haze.btn:active,.green-haze.btn:focus,.green-haze.btn:hover,.open .green-haze.btn.dropdown-toggle{color:#FFF;background-color:#3a9c95}.green-haze.btn.active,.green-haze.btn:active{background-image:none;background-color:#338983}.green-haze.btn.active:hover,.green-haze.btn:active:hover{background-color:#36918b}.open .green-haze.btn.dropdown-toggle{background-image:none}.green-haze.btn.disabled,.green-haze.btn.disabled.active,.green-haze.btn.disabled:active,.green-haze.btn.disabled:focus,.green-haze.btn.disabled:hover,.green-haze.btn[disabled],.green-haze.btn[disabled].active,.green-haze.btn[disabled]:active,.green-haze.btn[disabled]:focus,.green-haze.btn[disabled]:hover,fieldset[disabled] .green-haze.btn,fieldset[disabled] .green-haze.btn.active,fieldset[disabled] .green-haze.btn:active,fieldset[disabled] .green-haze.btn:focus,fieldset[disabled] .green-haze.btn:hover{background-color:#44b6ae}.green-haze.btn .badge{color:#44b6ae;background-color:#FFF}.portlet.box.green-haze>.portlet-title,.portlet.green-haze,.portlet>.portlet-body.green-haze{background-color:#44b6ae}.btn.green-haze-stripe{border-left:3px solid #44b6ae}.portlet.solid.green-haze>.portlet-body,.portlet.solid.green-haze>.portlet-title{border:0;color:#FFF}.portlet.solid.green-haze>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-haze>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-haze{border:1px solid #67c6bf;border-top:0}.portlet.box.green-haze>.portlet-title>.caption,.portlet.box.green-haze>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-haze>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #93d7d2;color:#a6deda}.portlet.box.green-haze>.portlet-title>.actions .btn-default>i{color:#b1e2de}.portlet.box.green-haze>.portlet-title>.actions .btn-default.active,.portlet.box.green-haze>.portlet-title>.actions .btn-default:active,.portlet.box.green-haze>.portlet-title>.actions .btn-default:focus,.portlet.box.green-haze>.portlet-title>.actions .btn-default:hover{border:1px solid #b9e5e2;color:#cbece9}.dashboard-stat.green-haze{background-color:#44b6ae}.dashboard-stat.green-haze.dashboard-stat-light:hover{background-color:#3ea7a0}.dashboard-stat.green-haze .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-haze .details .number{color:#FFF}.dashboard-stat.green-haze .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-haze .more{color:#FFF;background-color:#3ea7a0}.bg-green-haze{border-color:#44b6ae!important;background-image:none!important;background-color:#44b6ae!important;color:#FFF!important}.font-green-haze{color:#44b6ae!important}.progress-bar.green-haze{background:#44b6ae!important;color:#FFF!important}.green-jungle.btn{color:#FFF;background-color:#26C281;border-color:""}.green-jungle.btn.active,.green-jungle.btn:active,.green-jungle.btn:focus,.green-jungle.btn:hover,.open .green-jungle.btn.dropdown-toggle{color:#FFF;background-color:#20a46d}.green-jungle.btn.active,.green-jungle.btn:active{background-image:none;background-color:#1c8f5f}.green-jungle.btn.active:hover,.green-jungle.btn:active:hover{background-color:#1e9765}.open .green-jungle.btn.dropdown-toggle{background-image:none}.green-jungle.btn.disabled,.green-jungle.btn.disabled.active,.green-jungle.btn.disabled:active,.green-jungle.btn.disabled:focus,.green-jungle.btn.disabled:hover,.green-jungle.btn[disabled],.green-jungle.btn[disabled].active,.green-jungle.btn[disabled]:active,.green-jungle.btn[disabled]:focus,.green-jungle.btn[disabled]:hover,fieldset[disabled] .green-jungle.btn,fieldset[disabled] .green-jungle.btn.active,fieldset[disabled] .green-jungle.btn:active,fieldset[disabled] .green-jungle.btn:focus,fieldset[disabled] .green-jungle.btn:hover{background-color:#26C281}.green-jungle.btn .badge{color:#26C281;background-color:#FFF}.portlet.box.green-jungle>.portlet-title,.portlet.green-jungle,.portlet>.portlet-body.green-jungle{background-color:#26C281}.btn.green-jungle-stripe{border-left:3px solid #26C281}.portlet.solid.green-jungle>.portlet-body,.portlet.solid.green-jungle>.portlet-title{border:0;color:#FFF}.portlet.solid.green-jungle>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-jungle>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-jungle{border:1px solid #41da9a;border-top:0}.portlet.box.green-jungle>.portlet-title>.caption,.portlet.box.green-jungle>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-jungle>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #74e4b5;color:#8ae8c1}.portlet.box.green-jungle>.portlet-title>.actions .btn-default>i{color:#96ebc8}.portlet.box.green-jungle>.portlet-title>.actions .btn-default.active,.portlet.box.green-jungle>.portlet-title>.actions .btn-default:active,.portlet.box.green-jungle>.portlet-title>.actions .btn-default:focus,.portlet.box.green-jungle>.portlet-title>.actions .btn-default:hover{border:1px solid #9feccc;color:#b4f0d7}.dashboard-stat.green-jungle{background-color:#26C281}.dashboard-stat.green-jungle.dashboard-stat-light:hover{background-color:#23b176}.dashboard-stat.green-jungle .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-jungle .details .number{color:#FFF}.dashboard-stat.green-jungle .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-jungle .more{color:#FFF;background-color:#23b176}.bg-green-jungle{border-color:#26C281!important;background-image:none!important;background-color:#26C281!important;color:#FFF!important}.font-green-jungle{color:#26C281!important}.progress-bar.green-jungle{background:#26C281!important;color:#FFF!important}.green-sharp.btn{color:#FFF;background-color:#4DB3A2;border-color:""}.green-sharp.btn.active,.green-sharp.btn:active,.green-sharp.btn:focus,.green-sharp.btn:hover,.open .green-sharp.btn.dropdown-toggle{color:#FFF;background-color:#429a8c}.green-sharp.btn.active,.green-sharp.btn:active{background-image:none;background-color:#3a897b}.green-sharp.btn.active:hover,.green-sharp.btn:active:hover{background-color:#3d9082}.open .green-sharp.btn.dropdown-toggle{background-image:none}.green-sharp.btn.disabled,.green-sharp.btn.disabled.active,.green-sharp.btn.disabled:active,.green-sharp.btn.disabled:focus,.green-sharp.btn.disabled:hover,.green-sharp.btn[disabled],.green-sharp.btn[disabled].active,.green-sharp.btn[disabled]:active,.green-sharp.btn[disabled]:focus,.green-sharp.btn[disabled]:hover,fieldset[disabled] .green-sharp.btn,fieldset[disabled] .green-sharp.btn.active,fieldset[disabled] .green-sharp.btn:active,fieldset[disabled] .green-sharp.btn:focus,fieldset[disabled] .green-sharp.btn:hover{background-color:#4DB3A2}.green-sharp.btn .badge{color:#4DB3A2;background-color:#FFF}.portlet.box.green-sharp>.portlet-title,.portlet.green-sharp,.portlet>.portlet-body.green-sharp{background-color:#4DB3A2}.btn.green-sharp-stripe{border-left:3px solid #4DB3A2}.portlet.solid.green-sharp>.portlet-body,.portlet.solid.green-sharp>.portlet-title{border:0;color:#FFF}.portlet.solid.green-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-sharp>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-sharp{border:1px solid #71c2b5;border-top:0}.portlet.box.green-sharp>.portlet-title>.caption,.portlet.box.green-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-sharp>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9cd5cb;color:#addcd4}.portlet.box.green-sharp>.portlet-title>.actions .btn-default>i{color:#b8e1da}.portlet.box.green-sharp>.portlet-title>.actions .btn-default.active,.portlet.box.green-sharp>.portlet-title>.actions .btn-default:active,.portlet.box.green-sharp>.portlet-title>.actions .btn-default:focus,.portlet.box.green-sharp>.portlet-title>.actions .btn-default:hover{border:1px solid #bfe4de;color:#d1ebe7}.dashboard-stat.green-sharp{background-color:#4DB3A2}.dashboard-stat.green-sharp.dashboard-stat-light:hover{background-color:#46a595}.dashboard-stat.green-sharp .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-sharp .details .number{color:#FFF}.dashboard-stat.green-sharp .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-sharp .more{color:#FFF;background-color:#46a595}.bg-green-sharp{border-color:#4DB3A2!important;background-image:none!important;background-color:#4DB3A2!important;color:#FFF!important}.font-green-sharp{color:#4DB3A2!important}.progress-bar.green-sharp{background:#4DB3A2!important;color:#FFF!important}.green-soft.btn{color:#FFF;background-color:#3faba4;border-color:""}.green-soft.btn.active,.green-soft.btn:active,.green-soft.btn:focus,.green-soft.btn:hover,.open .green-soft.btn.dropdown-toggle{color:#FFF;background-color:#35918b}.green-soft.btn.active,.green-soft.btn:active{background-image:none;background-color:#2f7e79}.green-soft.btn.active:hover,.green-soft.btn:active:hover{background-color:#318680}.open .green-soft.btn.dropdown-toggle{background-image:none}.green-soft.btn.disabled,.green-soft.btn.disabled.active,.green-soft.btn.disabled:active,.green-soft.btn.disabled:focus,.green-soft.btn.disabled:hover,.green-soft.btn[disabled],.green-soft.btn[disabled].active,.green-soft.btn[disabled]:active,.green-soft.btn[disabled]:focus,.green-soft.btn[disabled]:hover,fieldset[disabled] .green-soft.btn,fieldset[disabled] .green-soft.btn.active,fieldset[disabled] .green-soft.btn:active,fieldset[disabled] .green-soft.btn:focus,fieldset[disabled] .green-soft.btn:hover{background-color:#3faba4}.green-soft.btn .badge{color:#3faba4;background-color:#FFF}.portlet.box.green-soft>.portlet-title,.portlet.green-soft,.portlet>.portlet-body.green-soft{background-color:#3faba4}.btn.green-soft-stripe{border-left:3px solid #3faba4}.portlet.solid.green-soft>.portlet-body,.portlet.solid.green-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.green-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-soft{border:1px solid #5bc2bc;border-top:0}.portlet.box.green-soft>.portlet-title>.caption,.portlet.box.green-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #87d3ce;color:#9adad6}.portlet.box.green-soft>.portlet-title>.actions .btn-default>i{color:#a5deda}.portlet.box.green-soft>.portlet-title>.actions .btn-default.active,.portlet.box.green-soft>.portlet-title>.actions .btn-default:active,.portlet.box.green-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.green-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #ade1dd;color:#bfe7e5}.dashboard-stat.green-soft{background-color:#3faba4}.dashboard-stat.green-soft.dashboard-stat-light:hover{background-color:#3a9c96}.dashboard-stat.green-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-soft .details .number{color:#FFF}.dashboard-stat.green-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-soft .more{color:#FFF;background-color:#3a9c96}.bg-green-soft{border-color:#3faba4!important;background-image:none!important;background-color:#3faba4!important;color:#FFF!important}.font-green-soft{color:#3faba4!important}.progress-bar.green-soft{background:#3faba4!important;color:#FFF!important}.grey.btn{color:#333;background-color:#E5E5E5;border-color:""}.grey.btn.active,.grey.btn:active,.grey.btn:focus,.grey.btn:hover,.open .grey.btn.dropdown-toggle{color:#333;background-color:#d3d3d3}.grey.btn.active,.grey.btn:active{background-image:none;background-color:#c6c6c6}.grey.btn.active:hover,.grey.btn:active:hover{background-color:#ccc}.open .grey.btn.dropdown-toggle{background-image:none}.grey.btn.disabled,.grey.btn.disabled.active,.grey.btn.disabled:active,.grey.btn.disabled:focus,.grey.btn.disabled:hover,.grey.btn[disabled],.grey.btn[disabled].active,.grey.btn[disabled]:active,.grey.btn[disabled]:focus,.grey.btn[disabled]:hover,fieldset[disabled] .grey.btn,fieldset[disabled] .grey.btn.active,fieldset[disabled] .grey.btn:active,fieldset[disabled] .grey.btn:focus,fieldset[disabled] .grey.btn:hover{background-color:#E5E5E5}.grey.btn .badge{color:#E5E5E5;background-color:#333}.portlet.box.grey>.portlet-title,.portlet.grey,.portlet>.portlet-body.grey{background-color:#E5E5E5}.btn.grey-stripe{border-left:3px solid #E5E5E5}.portlet.solid.grey>.portlet-body,.portlet.solid.grey>.portlet-title{border:0;color:#333}.portlet.solid.grey>.portlet-title>.caption>i{color:#333}.portlet.solid.grey>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey{border:1px solid #fff;border-top:0}.portlet.box.grey>.portlet-title>.caption,.portlet.box.grey>.portlet-title>.caption>i{color:#333}.portlet.box.grey>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey>.portlet-title>.actions .btn-default.active,.portlet.box.grey>.portlet-title>.actions .btn-default:active,.portlet.box.grey>.portlet-title>.actions .btn-default:focus,.portlet.box.grey>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey{background-color:#E5E5E5}.dashboard-stat.grey.dashboard-stat-light:hover{background-color:#dbdbdb}.dashboard-stat.grey .visual>i{color:#333;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey .details .number{color:#333}.dashboard-stat.grey .details .desc{color:#333;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey .more{color:#333;background-color:#dbdbdb}.bg-grey{border-color:#E5E5E5!important;background-image:none!important;background-color:#E5E5E5!important;color:#333!important}.font-grey{color:#E5E5E5!important}.progress-bar.grey{background:#E5E5E5!important;color:#333!important}.grey-steel.btn{color:#80898e;background-color:#e9edef;border-color:""}.grey-steel.btn.active,.grey-steel.btn:active,.grey-steel.btn:focus,.grey-steel.btn:hover,.open .grey-steel.btn.dropdown-toggle{color:#80898e;background-color:#d4dce0}.grey-steel.btn.active,.grey-steel.btn:active{background-image:none;background-color:#c6d0d5}.grey-steel.btn.active:hover,.grey-steel.btn:active:hover{background-color:#cbd5da}.open .grey-steel.btn.dropdown-toggle{background-image:none}.grey-steel.btn.disabled,.grey-steel.btn.disabled.active,.grey-steel.btn.disabled:active,.grey-steel.btn.disabled:focus,.grey-steel.btn.disabled:hover,.grey-steel.btn[disabled],.grey-steel.btn[disabled].active,.grey-steel.btn[disabled]:active,.grey-steel.btn[disabled]:focus,.grey-steel.btn[disabled]:hover,fieldset[disabled] .grey-steel.btn,fieldset[disabled] .grey-steel.btn.active,fieldset[disabled] .grey-steel.btn:active,fieldset[disabled] .grey-steel.btn:focus,fieldset[disabled] .grey-steel.btn:hover{background-color:#e9edef}.grey-steel.btn .badge{color:#e9edef;background-color:#80898e}.portlet.box.grey-steel>.portlet-title,.portlet.grey-steel,.portlet>.portlet-body.grey-steel{background-color:#e9edef}.btn.grey-steel-stripe{border-left:3px solid #e9edef}.portlet.solid.grey-steel>.portlet-body,.portlet.solid.grey-steel>.portlet-title{border:0;color:#80898e}.portlet.solid.grey-steel>.portlet-title>.caption>i{color:#80898e}.portlet.solid.grey-steel>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-steel{border:1px solid #fff;border-top:0}.portlet.box.grey-steel>.portlet-title>.caption,.portlet.box.grey-steel>.portlet-title>.caption>i{color:#80898e}.portlet.box.grey-steel>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey-steel>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-steel>.portlet-title>.actions .btn-default.active,.portlet.box.grey-steel>.portlet-title>.actions .btn-default:active,.portlet.box.grey-steel>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-steel>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-steel{background-color:#e9edef}.dashboard-stat.grey-steel.dashboard-stat-light:hover{background-color:#dde3e6}.dashboard-stat.grey-steel .visual>i{color:#80898e;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-steel .details .number{color:#80898e}.dashboard-stat.grey-steel .details .desc{color:#80898e;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-steel .more{color:#80898e;background-color:#dde3e6}.bg-grey-steel{border-color:#e9edef!important;background-image:none!important;background-color:#e9edef!important;color:#80898e!important}.font-grey-steel{color:#e9edef!important}.progress-bar.grey-steel{background:#e9edef!important;color:#80898e!important}.grey-cararra.btn{color:#333;background-color:#fafafa;border-color:""}.grey-cararra.btn.active,.grey-cararra.btn:active,.grey-cararra.btn:focus,.grey-cararra.btn:hover,.open .grey-cararra.btn.dropdown-toggle{color:#333;background-color:#e8e8e8}.grey-cararra.btn.active,.grey-cararra.btn:active{background-image:none;background-color:#dbdbdb}.grey-cararra.btn.active:hover,.grey-cararra.btn:active:hover{background-color:#e1e1e1}.open .grey-cararra.btn.dropdown-toggle{background-image:none}.grey-cararra.btn.disabled,.grey-cararra.btn.disabled.active,.grey-cararra.btn.disabled:active,.grey-cararra.btn.disabled:focus,.grey-cararra.btn.disabled:hover,.grey-cararra.btn[disabled],.grey-cararra.btn[disabled].active,.grey-cararra.btn[disabled]:active,.grey-cararra.btn[disabled]:focus,.grey-cararra.btn[disabled]:hover,fieldset[disabled] .grey-cararra.btn,fieldset[disabled] .grey-cararra.btn.active,fieldset[disabled] .grey-cararra.btn:active,fieldset[disabled] .grey-cararra.btn:focus,fieldset[disabled] .grey-cararra.btn:hover{background-color:#fafafa}.grey-cararra.btn .badge{color:#fafafa;background-color:#333}.portlet.box.grey-cararra>.portlet-title,.portlet.grey-cararra,.portlet>.portlet-body.grey-cararra{background-color:#fafafa}.btn.grey-cararra-stripe{border-left:3px solid #fafafa}.portlet.solid.grey-cararra>.portlet-body,.portlet.solid.grey-cararra>.portlet-title{border:0;color:#333}.portlet.solid.grey-cararra>.portlet-title>.caption>i{color:#333}.portlet.solid.grey-cararra>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-cararra{border:1px solid #fff;border-top:0}.portlet.box.grey-cararra>.portlet-title>.caption,.portlet.box.grey-cararra>.portlet-title>.caption>i{color:#333}.portlet.box.grey-cararra>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey-cararra>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-cararra>.portlet-title>.actions .btn-default.active,.portlet.box.grey-cararra>.portlet-title>.actions .btn-default:active,.portlet.box.grey-cararra>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-cararra>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-cararra{background-color:#fafafa}.dashboard-stat.grey-cararra.dashboard-stat-light:hover{background-color:#f0f0f0}.dashboard-stat.grey-cararra .visual>i{color:#333;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-cararra .details .number{color:#333}.dashboard-stat.grey-cararra .details .desc{color:#333;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-cararra .more{color:#333;background-color:#f0f0f0}.bg-grey-cararra{border-color:#fafafa!important;background-image:none!important;background-color:#fafafa!important;color:#333!important}.font-grey-cararra{color:#fafafa!important}.progress-bar.grey-cararra{background:#fafafa!important;color:#333!important}.grey-gallery.btn{color:#fff;background-color:#555;border-color:""}.grey-gallery.btn.active,.grey-gallery.btn:active,.grey-gallery.btn:focus,.grey-gallery.btn:hover,.open .grey-gallery.btn.dropdown-toggle{color:#fff;background-color:#434343}.grey-gallery.btn.active,.grey-gallery.btn:active{background-image:none;background-color:#363636}.grey-gallery.btn.active:hover,.grey-gallery.btn:active:hover{background-color:#3b3b3b}.open .grey-gallery.btn.dropdown-toggle{background-image:none}.grey-gallery.btn.disabled,.grey-gallery.btn.disabled.active,.grey-gallery.btn.disabled:active,.grey-gallery.btn.disabled:focus,.grey-gallery.btn.disabled:hover,.grey-gallery.btn[disabled],.grey-gallery.btn[disabled].active,.grey-gallery.btn[disabled]:active,.grey-gallery.btn[disabled]:focus,.grey-gallery.btn[disabled]:hover,fieldset[disabled] .grey-gallery.btn,fieldset[disabled] .grey-gallery.btn.active,fieldset[disabled] .grey-gallery.btn:active,fieldset[disabled] .grey-gallery.btn:focus,fieldset[disabled] .grey-gallery.btn:hover{background-color:#555}.grey-gallery.btn .badge{color:#555;background-color:#fff}.portlet.box.grey-gallery>.portlet-title,.portlet.grey-gallery,.portlet>.portlet-body.grey-gallery{background-color:#555}.btn.grey-gallery-stripe{border-left:3px solid #555}.portlet.solid.grey-gallery>.portlet-body,.portlet.solid.grey-gallery>.portlet-title{border:0;color:#fff}.portlet.solid.grey-gallery>.portlet-title>.caption>i{color:#fff}.portlet.solid.grey-gallery>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-gallery{border:1px solid #6e6e6e;border-top:0}.portlet.box.grey-gallery>.portlet-title>.caption,.portlet.box.grey-gallery>.portlet-title>.caption>i{color:#fff}.portlet.box.grey-gallery>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #8d8d8d;color:#9a9a9a}.portlet.box.grey-gallery>.portlet-title>.actions .btn-default>i{color:#a2a2a2}.portlet.box.grey-gallery>.portlet-title>.actions .btn-default.active,.portlet.box.grey-gallery>.portlet-title>.actions .btn-default:active,.portlet.box.grey-gallery>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-gallery>.portlet-title>.actions .btn-default:hover{border:1px solid #a7a7a7;color:#b3b3b3}.dashboard-stat.grey-gallery{background-color:#555}.dashboard-stat.grey-gallery.dashboard-stat-light:hover{background-color:#4b4b4b}.dashboard-stat.grey-gallery .visual>i{color:#fff;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-gallery .details .number{color:#fff}.dashboard-stat.grey-gallery .details .desc{color:#fff;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-gallery .more{color:#fff;background-color:#4b4b4b}.bg-grey-gallery{border-color:#555!important;background-image:none!important;background-color:#555!important;color:#fff!important}.font-grey-gallery{color:#555!important}.progress-bar.grey-gallery{background:#555!important;color:#fff!important}.grey-cascade.btn{color:#FFF;background-color:#95A5A6;border-color:""}.grey-cascade.btn.active,.grey-cascade.btn:active,.grey-cascade.btn:focus,.grey-cascade.btn:hover,.open .grey-cascade.btn.dropdown-toggle{color:#FFF;background-color:#829596}.grey-cascade.btn.active,.grey-cascade.btn:active{background-image:none;background-color:#74898a}.grey-cascade.btn.active:hover,.grey-cascade.btn:active:hover{background-color:#798d8f}.open .grey-cascade.btn.dropdown-toggle{background-image:none}.grey-cascade.btn.disabled,.grey-cascade.btn.disabled.active,.grey-cascade.btn.disabled:active,.grey-cascade.btn.disabled:focus,.grey-cascade.btn.disabled:hover,.grey-cascade.btn[disabled],.grey-cascade.btn[disabled].active,.grey-cascade.btn[disabled]:active,.grey-cascade.btn[disabled]:focus,.grey-cascade.btn[disabled]:hover,fieldset[disabled] .grey-cascade.btn,fieldset[disabled] .grey-cascade.btn.active,fieldset[disabled] .grey-cascade.btn:active,fieldset[disabled] .grey-cascade.btn:focus,fieldset[disabled] .grey-cascade.btn:hover{background-color:#95A5A6}.grey-cascade.btn .badge{color:#95A5A6;background-color:#FFF}.portlet.box.grey-cascade>.portlet-title,.portlet.grey-cascade,.portlet>.portlet-body.grey-cascade{background-color:#95A5A6}.btn.grey-cascade-stripe{border-left:3px solid #95A5A6}.portlet.solid.grey-cascade>.portlet-body,.portlet.solid.grey-cascade>.portlet-title{border:0;color:#FFF}.portlet.solid.grey-cascade>.portlet-title>.caption>i{color:#FFF}.portlet.solid.grey-cascade>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-cascade{border:1px solid #b1bdbd;border-top:0}.portlet.box.grey-cascade>.portlet-title>.caption,.portlet.box.grey-cascade>.portlet-title>.caption>i{color:#FFF}.portlet.box.grey-cascade>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #d2d9d9;color:#e0e5e5}.portlet.box.grey-cascade>.portlet-title>.actions .btn-default>i{color:#e8ecec}.portlet.box.grey-cascade>.portlet-title>.actions .btn-default.active,.portlet.box.grey-cascade>.portlet-title>.actions .btn-default:active,.portlet.box.grey-cascade>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-cascade>.portlet-title>.actions .btn-default:hover{border:1px solid #eef0f0;color:#fcfcfc}.dashboard-stat.grey-cascade{background-color:#95A5A6}.dashboard-stat.grey-cascade.dashboard-stat-light:hover{background-color:#8a9c9d}.dashboard-stat.grey-cascade .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-cascade .details .number{color:#FFF}.dashboard-stat.grey-cascade .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-cascade .more{color:#FFF;background-color:#8a9c9d}.bg-grey-cascade{border-color:#95A5A6!important;background-image:none!important;background-color:#95A5A6!important;color:#FFF!important}.font-grey-cascade{color:#95A5A6!important}.progress-bar.grey-cascade{background:#95A5A6!important;color:#FFF!important}.grey-silver.btn{color:#FAFCFB;background-color:#BFBFBF;border-color:""}.grey-silver.btn.active,.grey-silver.btn:active,.grey-silver.btn:focus,.grey-silver.btn:hover,.open .grey-silver.btn.dropdown-toggle{color:#FAFCFB;background-color:#adadad}.grey-silver.btn.active,.grey-silver.btn:active{background-image:none;background-color:#a0a0a0}.grey-silver.btn.active:hover,.grey-silver.btn:active:hover{background-color:#a6a6a6}.open .grey-silver.btn.dropdown-toggle{background-image:none}.grey-silver.btn.disabled,.grey-silver.btn.disabled.active,.grey-silver.btn.disabled:active,.grey-silver.btn.disabled:focus,.grey-silver.btn.disabled:hover,.grey-silver.btn[disabled],.grey-silver.btn[disabled].active,.grey-silver.btn[disabled]:active,.grey-silver.btn[disabled]:focus,.grey-silver.btn[disabled]:hover,fieldset[disabled] .grey-silver.btn,fieldset[disabled] .grey-silver.btn.active,fieldset[disabled] .grey-silver.btn:active,fieldset[disabled] .grey-silver.btn:focus,fieldset[disabled] .grey-silver.btn:hover{background-color:#BFBFBF}.grey-silver.btn .badge{color:#BFBFBF;background-color:#FAFCFB}.portlet.box.grey-silver>.portlet-title,.portlet.grey-silver,.portlet>.portlet-body.grey-silver{background-color:#BFBFBF}.btn.grey-silver-stripe{border-left:3px solid #BFBFBF}.portlet.solid.grey-silver>.portlet-body,.portlet.solid.grey-silver>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-silver>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-silver>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-silver{border:1px solid #d9d9d9;border-top:0}.portlet.box.grey-silver>.portlet-title>.caption,.portlet.box.grey-silver>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-silver>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f7f7f7;color:#fff}.portlet.box.grey-silver>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-silver>.portlet-title>.actions .btn-default.active,.portlet.box.grey-silver>.portlet-title>.actions .btn-default:active,.portlet.box.grey-silver>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-silver>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-silver{background-color:#BFBFBF}.dashboard-stat.grey-silver.dashboard-stat-light:hover{background-color:#b5b5b5}.dashboard-stat.grey-silver .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-silver .details .number{color:#FAFCFB}.dashboard-stat.grey-silver .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-silver .more{color:#FAFCFB;background-color:#b5b5b5}.bg-grey-silver{border-color:#BFBFBF!important;background-image:none!important;background-color:#BFBFBF!important;color:#FAFCFB!important}.font-grey-silver{color:#BFBFBF!important}.progress-bar.grey-silver{background:#BFBFBF!important;color:#FAFCFB!important}.grey-salsa.btn{color:#FAFCFB;background-color:#ACB5C3;border-color:""}.grey-salsa.btn.active,.grey-salsa.btn:active,.grey-salsa.btn:focus,.grey-salsa.btn:hover,.open .grey-salsa.btn.dropdown-toggle{color:#FAFCFB;background-color:#97a3b4}.grey-salsa.btn.active,.grey-salsa.btn:active{background-image:none;background-color:#8895a9}.grey-salsa.btn.active:hover,.grey-salsa.btn:active:hover{background-color:#8e9bae}.open .grey-salsa.btn.dropdown-toggle{background-image:none}.grey-salsa.btn.disabled,.grey-salsa.btn.disabled.active,.grey-salsa.btn.disabled:active,.grey-salsa.btn.disabled:focus,.grey-salsa.btn.disabled:hover,.grey-salsa.btn[disabled],.grey-salsa.btn[disabled].active,.grey-salsa.btn[disabled]:active,.grey-salsa.btn[disabled]:focus,.grey-salsa.btn[disabled]:hover,fieldset[disabled] .grey-salsa.btn,fieldset[disabled] .grey-salsa.btn.active,fieldset[disabled] .grey-salsa.btn:active,fieldset[disabled] .grey-salsa.btn:focus,fieldset[disabled] .grey-salsa.btn:hover{background-color:#ACB5C3}.grey-salsa.btn .badge{color:#ACB5C3;background-color:#FAFCFB}.portlet.box.grey-salsa>.portlet-title,.portlet.grey-salsa,.portlet>.portlet-body.grey-salsa{background-color:#ACB5C3}.btn.grey-salsa-stripe{border-left:3px solid #ACB5C3}.portlet.solid.grey-salsa>.portlet-body,.portlet.solid.grey-salsa>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-salsa>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-salsa>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-salsa{border:1px solid #cacfd8;border-top:0}.portlet.box.grey-salsa>.portlet-title>.caption,.portlet.box.grey-salsa>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-salsa>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #edeff2;color:#fcfcfd}.portlet.box.grey-salsa>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-salsa>.portlet-title>.actions .btn-default.active,.portlet.box.grey-salsa>.portlet-title>.actions .btn-default:active,.portlet.box.grey-salsa>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-salsa>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-salsa{background-color:#ACB5C3}.dashboard-stat.grey-salsa.dashboard-stat-light:hover{background-color:#a0aaba}.dashboard-stat.grey-salsa .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-salsa .details .number{color:#FAFCFB}.dashboard-stat.grey-salsa .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-salsa .more{color:#FAFCFB;background-color:#a0aaba}.bg-grey-salsa{border-color:#ACB5C3!important;background-image:none!important;background-color:#ACB5C3!important;color:#FAFCFB!important}.font-grey-salsa{color:#ACB5C3!important}.progress-bar.grey-salsa{background:#ACB5C3!important;color:#FAFCFB!important}.grey-salt.btn{color:#FAFCFB;background-color:#bfcad1;border-color:""}.grey-salt.btn.active,.grey-salt.btn:active,.grey-salt.btn:focus,.grey-salt.btn:hover,.open .grey-salt.btn.dropdown-toggle{color:#FAFCFB;background-color:#aab9c2}.grey-salt.btn.active,.grey-salt.btn:active{background-image:none;background-color:#9badb7}.grey-salt.btn.active:hover,.grey-salt.btn:active:hover{background-color:#a1b1bc}.open .grey-salt.btn.dropdown-toggle{background-image:none}.grey-salt.btn.disabled,.grey-salt.btn.disabled.active,.grey-salt.btn.disabled:active,.grey-salt.btn.disabled:focus,.grey-salt.btn.disabled:hover,.grey-salt.btn[disabled],.grey-salt.btn[disabled].active,.grey-salt.btn[disabled]:active,.grey-salt.btn[disabled]:focus,.grey-salt.btn[disabled]:hover,fieldset[disabled] .grey-salt.btn,fieldset[disabled] .grey-salt.btn.active,fieldset[disabled] .grey-salt.btn:active,fieldset[disabled] .grey-salt.btn:focus,fieldset[disabled] .grey-salt.btn:hover{background-color:#bfcad1}.grey-salt.btn .badge{color:#bfcad1;background-color:#FAFCFB}.portlet.box.grey-salt>.portlet-title,.portlet.grey-salt,.portlet>.portlet-body.grey-salt{background-color:#bfcad1}.btn.grey-salt-stripe{border-left:3px solid #bfcad1}.portlet.solid.grey-salt>.portlet-body,.portlet.solid.grey-salt>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-salt>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-salt>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-salt{border:1px solid #dde3e6;border-top:0}.portlet.box.grey-salt>.portlet-title>.caption,.portlet.box.grey-salt>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-salt>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey-salt>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-salt>.portlet-title>.actions .btn-default.active,.portlet.box.grey-salt>.portlet-title>.actions .btn-default:active,.portlet.box.grey-salt>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-salt>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-salt{background-color:#bfcad1}.dashboard-stat.grey-salt.dashboard-stat-light:hover{background-color:#b3c0c8}.dashboard-stat.grey-salt .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-salt .details .number{color:#FAFCFB}.dashboard-stat.grey-salt .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-salt .more{color:#FAFCFB;background-color:#b3c0c8}.bg-grey-salt{border-color:#bfcad1!important;background-image:none!important;background-color:#bfcad1!important;color:#FAFCFB!important}.font-grey-salt{color:#bfcad1!important}.progress-bar.grey-salt{background:#bfcad1!important;color:#FAFCFB!important}.grey-mint.btn{color:#FAFCFB;background-color:#9eacb4;border-color:""}.grey-mint.btn.active,.grey-mint.btn:active,.grey-mint.btn:focus,.grey-mint.btn:hover,.open .grey-mint.btn.dropdown-toggle{color:#FAFCFB;background-color:#8a9ba4}.grey-mint.btn.active,.grey-mint.btn:active{background-image:none;background-color:#7b8e99}.grey-mint.btn.active:hover,.grey-mint.btn:active:hover{background-color:#81939e}.open .grey-mint.btn.dropdown-toggle{background-image:none}.grey-mint.btn.disabled,.grey-mint.btn.disabled.active,.grey-mint.btn.disabled:active,.grey-mint.btn.disabled:focus,.grey-mint.btn.disabled:hover,.grey-mint.btn[disabled],.grey-mint.btn[disabled].active,.grey-mint.btn[disabled]:active,.grey-mint.btn[disabled]:focus,.grey-mint.btn[disabled]:hover,fieldset[disabled] .grey-mint.btn,fieldset[disabled] .grey-mint.btn.active,fieldset[disabled] .grey-mint.btn:active,fieldset[disabled] .grey-mint.btn:focus,fieldset[disabled] .grey-mint.btn:hover{background-color:#9eacb4}.grey-mint.btn .badge{color:#9eacb4;background-color:#FAFCFB}.portlet.box.grey-mint>.portlet-title,.portlet.grey-mint,.portlet>.portlet-body.grey-mint{background-color:#9eacb4}.btn.grey-mint-stripe{border-left:3px solid #9eacb4}.portlet.solid.grey-mint>.portlet-body,.portlet.solid.grey-mint>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-mint>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-mint>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-mint{border:1px solid #bbc5ca;border-top:0}.portlet.box.grey-mint>.portlet-title>.caption,.portlet.box.grey-mint>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-mint>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #dde2e5;color:#eceef0}.portlet.box.grey-mint>.portlet-title>.actions .btn-default>i{color:#f4f6f7}.portlet.box.grey-mint>.portlet-title>.actions .btn-default.active,.portlet.box.grey-mint>.portlet-title>.actions .btn-default:active,.portlet.box.grey-mint>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-mint>.portlet-title>.actions .btn-default:hover{border:1px solid #fafbfb;color:#fff}.dashboard-stat.grey-mint{background-color:#9eacb4}.dashboard-stat.grey-mint.dashboard-stat-light:hover{background-color:#92a2ab}.dashboard-stat.grey-mint .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-mint .details .number{color:#FAFCFB}.dashboard-stat.grey-mint .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-mint .more{color:#FAFCFB;background-color:#92a2ab}.bg-grey-mint{border-color:#9eacb4!important;background-image:none!important;background-color:#9eacb4!important;color:#FAFCFB!important}.font-grey-mint{color:#9eacb4!important}.progress-bar.grey-mint{background:#9eacb4!important;color:#FAFCFB!important}.red.btn{color:#FFF;background-color:#d84a38;border-color:""}.open .red.btn.dropdown-toggle,.red.btn.active,.red.btn:active,.red.btn:focus,.red.btn:hover{color:#FFF;background-color:#c63927}.red.btn.active,.red.btn:active{background-image:none;background-color:#b03223}.red.btn.active:hover,.red.btn:active:hover{background-color:#b93524}.open .red.btn.dropdown-toggle{background-image:none}.red.btn.disabled,.red.btn.disabled.active,.red.btn.disabled:active,.red.btn.disabled:focus,.red.btn.disabled:hover,.red.btn[disabled],.red.btn[disabled].active,.red.btn[disabled]:active,.red.btn[disabled]:focus,.red.btn[disabled]:hover,fieldset[disabled] .red.btn,fieldset[disabled] .red.btn.active,fieldset[disabled] .red.btn:active,fieldset[disabled] .red.btn:focus,fieldset[disabled] .red.btn:hover{background-color:#d84a38}.red.btn .badge{color:#d84a38;background-color:#FFF}.portlet.box.red>.portlet-title,.portlet.red,.portlet>.portlet-body.red{background-color:#d84a38}.btn.red-stripe{border-left:3px solid #d84a38}.portlet.solid.red>.portlet-body,.portlet.solid.red>.portlet-title{border:0;color:#FFF}.portlet.solid.red>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red{border:1px solid #e07163;border-top:0}.portlet.box.red>.portlet-title>.caption,.portlet.box.red>.portlet-title>.caption>i{color:#FFF}.portlet.box.red>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ea9f96;color:#efb3ab}.portlet.box.red>.portlet-title>.actions .btn-default>i{color:#f1beb8}.portlet.box.red>.portlet-title>.actions .btn-default.active,.portlet.box.red>.portlet-title>.actions .btn-default:active,.portlet.box.red>.portlet-title>.actions .btn-default:focus,.portlet.box.red>.portlet-title>.actions .btn-default:hover{border:1px solid #f3c6c0;color:#f7dad6}.dashboard-stat.red{background-color:#d84a38}.dashboard-stat.red.dashboard-stat-light:hover{background-color:#d23c29}.dashboard-stat.red .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red .details .number{color:#FFF}.dashboard-stat.red .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red .more{color:#FFF;background-color:#d23c29}.bg-red{border-color:#d84a38!important;background-image:none!important;background-color:#d84a38!important;color:#FFF!important}.font-red{color:#d84a38!important}.progress-bar.red{background:#d84a38!important;color:#FFF!important}.red-pink.btn{color:#FFF;background-color:#E08283;border-color:""}.open .red-pink.btn.dropdown-toggle,.red-pink.btn.active,.red-pink.btn:active,.red-pink.btn:focus,.red-pink.btn:hover{color:#FFF;background-color:#d96567}.red-pink.btn.active,.red-pink.btn:active{background-image:none;background-color:#d45152}.red-pink.btn.active:hover,.red-pink.btn:active:hover{background-color:#d6595a}.open .red-pink.btn.dropdown-toggle{background-image:none}.red-pink.btn.disabled,.red-pink.btn.disabled.active,.red-pink.btn.disabled:active,.red-pink.btn.disabled:focus,.red-pink.btn.disabled:hover,.red-pink.btn[disabled],.red-pink.btn[disabled].active,.red-pink.btn[disabled]:active,.red-pink.btn[disabled]:focus,.red-pink.btn[disabled]:hover,fieldset[disabled] .red-pink.btn,fieldset[disabled] .red-pink.btn.active,fieldset[disabled] .red-pink.btn:active,fieldset[disabled] .red-pink.btn:focus,fieldset[disabled] .red-pink.btn:hover{background-color:#E08283}.red-pink.btn .badge{color:#E08283;background-color:#FFF}.portlet.box.red-pink>.portlet-title,.portlet.red-pink,.portlet>.portlet-body.red-pink{background-color:#E08283}.btn.red-pink-stripe{border-left:3px solid #E08283}.portlet.solid.red-pink>.portlet-body,.portlet.solid.red-pink>.portlet-title{border:0;color:#FFF}.portlet.solid.red-pink>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-pink>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-pink{border:1px solid #eaabac;border-top:0}.portlet.box.red-pink>.portlet-title>.caption,.portlet.box.red-pink>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-pink>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f6dcdc;color:#fbf0f0}.portlet.box.red-pink>.portlet-title>.actions .btn-default>i{color:#fefdfd}.portlet.box.red-pink>.portlet-title>.actions .btn-default.active,.portlet.box.red-pink>.portlet-title>.actions .btn-default:active,.portlet.box.red-pink>.portlet-title>.actions .btn-default:focus,.portlet.box.red-pink>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.red-pink{background-color:#E08283}.dashboard-stat.red-pink.dashboard-stat-light:hover{background-color:#dc7273}.dashboard-stat.red-pink .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-pink .details .number{color:#FFF}.dashboard-stat.red-pink .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-pink .more{color:#FFF;background-color:#dc7273}.bg-red-pink{border-color:#E08283!important;background-image:none!important;background-color:#E08283!important;color:#FFF!important}.font-red-pink{color:#E08283!important}.progress-bar.red-pink{background:#E08283!important;color:#FFF!important}.red-sunglo.btn{color:#FFF;background-color:#E26A6A;border-color:""}.open .red-sunglo.btn.dropdown-toggle,.red-sunglo.btn.active,.red-sunglo.btn:active,.red-sunglo.btn:focus,.red-sunglo.btn:hover{color:#FFF;background-color:#dc4c4c}.red-sunglo.btn.active,.red-sunglo.btn:active{background-image:none;background-color:#d83737}.red-sunglo.btn.active:hover,.red-sunglo.btn:active:hover{background-color:#da3f3f}.open .red-sunglo.btn.dropdown-toggle{background-image:none}.red-sunglo.btn.disabled,.red-sunglo.btn.disabled.active,.red-sunglo.btn.disabled:active,.red-sunglo.btn.disabled:focus,.red-sunglo.btn.disabled:hover,.red-sunglo.btn[disabled],.red-sunglo.btn[disabled].active,.red-sunglo.btn[disabled]:active,.red-sunglo.btn[disabled]:focus,.red-sunglo.btn[disabled]:hover,fieldset[disabled] .red-sunglo.btn,fieldset[disabled] .red-sunglo.btn.active,fieldset[disabled] .red-sunglo.btn:active,fieldset[disabled] .red-sunglo.btn:focus,fieldset[disabled] .red-sunglo.btn:hover{background-color:#E26A6A}.red-sunglo.btn .badge{color:#E26A6A;background-color:#FFF}.portlet.box.red-sunglo>.portlet-title,.portlet.red-sunglo,.portlet>.portlet-body.red-sunglo{background-color:#E26A6A}.btn.red-sunglo-stripe{border-left:3px solid #E26A6A}.portlet.solid.red-sunglo>.portlet-body,.portlet.solid.red-sunglo>.portlet-title{border:0;color:#FFF}.portlet.solid.red-sunglo>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-sunglo>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-sunglo{border:1px solid #ea9595;border-top:0}.portlet.box.red-sunglo>.portlet-title>.caption,.portlet.box.red-sunglo>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-sunglo>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f4c8c8;color:#f8dddd}.portlet.box.red-sunglo>.portlet-title>.actions .btn-default>i{color:#fbeaea}.portlet.box.red-sunglo>.portlet-title>.actions .btn-default.active,.portlet.box.red-sunglo>.portlet-title>.actions .btn-default:active,.portlet.box.red-sunglo>.portlet-title>.actions .btn-default:focus,.portlet.box.red-sunglo>.portlet-title>.actions .btn-default:hover{border:1px solid #fdf3f3;color:#fff}.dashboard-stat.red-sunglo{background-color:#E26A6A}.dashboard-stat.red-sunglo.dashboard-stat-light:hover{background-color:#df5959}.dashboard-stat.red-sunglo .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-sunglo .details .number{color:#FFF}.dashboard-stat.red-sunglo .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-sunglo .more{color:#FFF;background-color:#df5959}.bg-red-sunglo{border-color:#E26A6A!important;background-image:none!important;background-color:#E26A6A!important;color:#FFF!important}.font-red-sunglo{color:#E26A6A!important}.progress-bar.red-sunglo{background:#E26A6A!important;color:#FFF!important}.red-intense.btn{color:#FFF;background-color:#e35b5a;border-color:""}.open .red-intense.btn.dropdown-toggle,.red-intense.btn.active,.red-intense.btn:active,.red-intense.btn:focus,.red-intense.btn:hover{color:#FFF;background-color:#de3d3b}.red-intense.btn.active,.red-intense.btn:active{background-image:none;background-color:#da2726}.red-intense.btn.active:hover,.red-intense.btn:active:hover{background-color:#dc302e}.open .red-intense.btn.dropdown-toggle{background-image:none}.red-intense.btn.disabled,.red-intense.btn.disabled.active,.red-intense.btn.disabled:active,.red-intense.btn.disabled:focus,.red-intense.btn.disabled:hover,.red-intense.btn[disabled],.red-intense.btn[disabled].active,.red-intense.btn[disabled]:active,.red-intense.btn[disabled]:focus,.red-intense.btn[disabled]:hover,fieldset[disabled] .red-intense.btn,fieldset[disabled] .red-intense.btn.active,fieldset[disabled] .red-intense.btn:active,fieldset[disabled] .red-intense.btn:focus,fieldset[disabled] .red-intense.btn:hover{background-color:#e35b5a}.red-intense.btn .badge{color:#e35b5a;background-color:#FFF}.portlet.box.red-intense>.portlet-title,.portlet.red-intense,.portlet>.portlet-body.red-intense{background-color:#e35b5a}.btn.red-intense-stripe{border-left:3px solid #e35b5a}.portlet.solid.red-intense>.portlet-body,.portlet.solid.red-intense>.portlet-title{border:0;color:#FFF}.portlet.solid.red-intense>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-intense>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-intense{border:1px solid #ea8686;border-top:0}.portlet.box.red-intense>.portlet-title>.caption,.portlet.box.red-intense>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-intense>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f3baba;color:#f7d0d0}.portlet.box.red-intense>.portlet-title>.actions .btn-default>i{color:#f9dddd}.portlet.box.red-intense>.portlet-title>.actions .btn-default.active,.portlet.box.red-intense>.portlet-title>.actions .btn-default:active,.portlet.box.red-intense>.portlet-title>.actions .btn-default:focus,.portlet.box.red-intense>.portlet-title>.actions .btn-default:hover{border:1px solid #fbe6e6;color:#fefbfb}.dashboard-stat.red-intense{background-color:#e35b5a}.dashboard-stat.red-intense.dashboard-stat-light:hover{background-color:#e04a49}.dashboard-stat.red-intense .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-intense .details .number{color:#FFF}.dashboard-stat.red-intense .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-intense .more{color:#FFF;background-color:#e04a49}.bg-red-intense{border-color:#e35b5a!important;background-image:none!important;background-color:#e35b5a!important;color:#FFF!important}.font-red-intense{color:#e35b5a!important}.progress-bar.red-intense{background:#e35b5a!important;color:#FFF!important}.red-thunderbird.btn{color:#FFF;background-color:#D91E18;border-color:""}.open .red-thunderbird.btn.dropdown-toggle,.red-thunderbird.btn.active,.red-thunderbird.btn:active,.red-thunderbird.btn:focus,.red-thunderbird.btn:hover{color:#FFF;background-color:#b91a14}.red-thunderbird.btn.active,.red-thunderbird.btn:active{background-image:none;background-color:#a21612}.red-thunderbird.btn.active:hover,.red-thunderbird.btn:active:hover{background-color:#ab1813}.open .red-thunderbird.btn.dropdown-toggle{background-image:none}.red-thunderbird.btn.disabled,.red-thunderbird.btn.disabled.active,.red-thunderbird.btn.disabled:active,.red-thunderbird.btn.disabled:focus,.red-thunderbird.btn.disabled:hover,.red-thunderbird.btn[disabled],.red-thunderbird.btn[disabled].active,.red-thunderbird.btn[disabled]:active,.red-thunderbird.btn[disabled]:focus,.red-thunderbird.btn[disabled]:hover,fieldset[disabled] .red-thunderbird.btn,fieldset[disabled] .red-thunderbird.btn.active,fieldset[disabled] .red-thunderbird.btn:active,fieldset[disabled] .red-thunderbird.btn:focus,fieldset[disabled] .red-thunderbird.btn:hover{background-color:#D91E18}.red-thunderbird.btn .badge{color:#D91E18;background-color:#FFF}.portlet.box.red-thunderbird>.portlet-title,.portlet.red-thunderbird,.portlet>.portlet-body.red-thunderbird{background-color:#D91E18}.btn.red-thunderbird-stripe{border-left:3px solid #D91E18}.portlet.solid.red-thunderbird>.portlet-body,.portlet.solid.red-thunderbird>.portlet-title{border:0;color:#FFF}.portlet.solid.red-thunderbird>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-thunderbird{border:1px solid #e9403b;border-top:0}.portlet.box.red-thunderbird>.portlet-title>.caption,.portlet.box.red-thunderbird>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ef7672;color:#f28c89}.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default>i{color:#f39997}.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default.active,.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default:active,.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default:focus,.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default:hover{border:1px solid #f4a2a0;color:#f7b9b7}.dashboard-stat.red-thunderbird{background-color:#D91E18}.dashboard-stat.red-thunderbird.dashboard-stat-light:hover{background-color:#c71b16}.dashboard-stat.red-thunderbird .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-thunderbird .details .number{color:#FFF}.dashboard-stat.red-thunderbird .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-thunderbird .more{color:#FFF;background-color:#c71b16}.bg-red-thunderbird{border-color:#D91E18!important;background-image:none!important;background-color:#D91E18!important;color:#FFF!important}.font-red-thunderbird{color:#D91E18!important}.progress-bar.red-thunderbird{background:#D91E18!important;color:#FFF!important}.red-flamingo.btn{color:#FFF;background-color:#EF4836;border-color:""}.open .red-flamingo.btn.dropdown-toggle,.red-flamingo.btn.active,.red-flamingo.btn:active,.red-flamingo.btn:focus,.red-flamingo.btn:hover{color:#FFF;background-color:#ec2a15}.red-flamingo.btn.active,.red-flamingo.btn:active{background-image:none;background-color:#d72411}.red-flamingo.btn.active:hover,.red-flamingo.btn:active:hover{background-color:#e02612}.open .red-flamingo.btn.dropdown-toggle{background-image:none}.red-flamingo.btn.disabled,.red-flamingo.btn.disabled.active,.red-flamingo.btn.disabled:active,.red-flamingo.btn.disabled:focus,.red-flamingo.btn.disabled:hover,.red-flamingo.btn[disabled],.red-flamingo.btn[disabled].active,.red-flamingo.btn[disabled]:active,.red-flamingo.btn[disabled]:focus,.red-flamingo.btn[disabled]:hover,fieldset[disabled] .red-flamingo.btn,fieldset[disabled] .red-flamingo.btn.active,fieldset[disabled] .red-flamingo.btn:active,fieldset[disabled] .red-flamingo.btn:focus,fieldset[disabled] .red-flamingo.btn:hover{background-color:#EF4836}.red-flamingo.btn .badge{color:#EF4836;background-color:#FFF}.portlet.box.red-flamingo>.portlet-title,.portlet.red-flamingo,.portlet>.portlet-body.red-flamingo{background-color:#EF4836}.btn.red-flamingo-stripe{border-left:3px solid #EF4836}.portlet.solid.red-flamingo>.portlet-body,.portlet.solid.red-flamingo>.portlet-title{border:0;color:#FFF}.portlet.solid.red-flamingo>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-flamingo>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-flamingo{border:1px solid #f37365;border-top:0}.portlet.box.red-flamingo>.portlet-title>.caption,.portlet.box.red-flamingo>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-flamingo>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f7a79e;color:#f9bcb6}.portlet.box.red-flamingo>.portlet-title>.actions .btn-default>i{color:#fac9c4}.portlet.box.red-flamingo>.portlet-title>.actions .btn-default.active,.portlet.box.red-flamingo>.portlet-title>.actions .btn-default:active,.portlet.box.red-flamingo>.portlet-title>.actions .btn-default:focus,.portlet.box.red-flamingo>.portlet-title>.actions .btn-default:hover{border:1px solid #fbd2cd;color:#fde7e5}.dashboard-stat.red-flamingo{background-color:#EF4836}.dashboard-stat.red-flamingo.dashboard-stat-light:hover{background-color:#ed3723}.dashboard-stat.red-flamingo .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-flamingo .details .number{color:#FFF}.dashboard-stat.red-flamingo .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-flamingo .more{color:#FFF;background-color:#ed3723}.bg-red-flamingo{border-color:#EF4836!important;background-image:none!important;background-color:#EF4836!important;color:#FFF!important}.font-red-flamingo{color:#EF4836!important}.progress-bar.red-flamingo{background:#EF4836!important;color:#FFF!important}.red-soft.btn{color:#FFF;background-color:#d05454;border-color:""}.open .red-soft.btn.dropdown-toggle,.red-soft.btn.active,.red-soft.btn:active,.red-soft.btn:focus,.red-soft.btn:hover{color:#FFF;background-color:#c83838}.red-soft.btn.active,.red-soft.btn:active{background-image:none;background-color:#b53232}.red-soft.btn.active:hover,.red-soft.btn:active:hover{background-color:#bd3434}.open .red-soft.btn.dropdown-toggle{background-image:none}.red-soft.btn.disabled,.red-soft.btn.disabled.active,.red-soft.btn.disabled:active,.red-soft.btn.disabled:focus,.red-soft.btn.disabled:hover,.red-soft.btn[disabled],.red-soft.btn[disabled].active,.red-soft.btn[disabled]:active,.red-soft.btn[disabled]:focus,.red-soft.btn[disabled]:hover,fieldset[disabled] .red-soft.btn,fieldset[disabled] .red-soft.btn.active,fieldset[disabled] .red-soft.btn:active,fieldset[disabled] .red-soft.btn:focus,fieldset[disabled] .red-soft.btn:hover{background-color:#d05454}.red-soft.btn .badge{color:#d05454;background-color:#FFF}.portlet.box.red-soft>.portlet-title,.portlet.red-soft,.portlet>.portlet-body.red-soft{background-color:#d05454}.btn.red-soft-stripe{border-left:3px solid #d05454}.portlet.solid.red-soft>.portlet-body,.portlet.solid.red-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.red-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-soft{border:1px solid #db7c7c;border-top:0}.portlet.box.red-soft>.portlet-title>.caption,.portlet.box.red-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #e8acac;color:#eec0c0}.portlet.box.red-soft>.portlet-title>.actions .btn-default>i{color:#f1cccc}.portlet.box.red-soft>.portlet-title>.actions .btn-default.active,.portlet.box.red-soft>.portlet-title>.actions .btn-default:active,.portlet.box.red-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.red-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #f3d4d4;color:#f9e8e8}.dashboard-stat.red-soft{background-color:#d05454}.dashboard-stat.red-soft.dashboard-stat-light:hover{background-color:#c44}.dashboard-stat.red-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-soft .details .number{color:#FFF}.dashboard-stat.red-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-soft .more{color:#FFF;background-color:#c44}.bg-red-soft{border-color:#d05454!important;background-image:none!important;background-color:#d05454!important;color:#FFF!important}.font-red-soft{color:#d05454!important}.progress-bar.red-soft{background:#d05454!important;color:#FFF!important}.red-haze.btn{color:#FFF;background-color:#f36a5a;border-color:""}.open .red-haze.btn.dropdown-toggle,.red-haze.btn.active,.red-haze.btn:active,.red-haze.btn:focus,.red-haze.btn:hover{color:#FFF;background-color:#f14c39}.red-haze.btn.active,.red-haze.btn:active{background-image:none;background-color:#ef3621}.red-haze.btn.active:hover,.red-haze.btn:active:hover{background-color:#f03f2a}.open .red-haze.btn.dropdown-toggle{background-image:none}.red-haze.btn.disabled,.red-haze.btn.disabled.active,.red-haze.btn.disabled:active,.red-haze.btn.disabled:focus,.red-haze.btn.disabled:hover,.red-haze.btn[disabled],.red-haze.btn[disabled].active,.red-haze.btn[disabled]:active,.red-haze.btn[disabled]:focus,.red-haze.btn[disabled]:hover,fieldset[disabled] .red-haze.btn,fieldset[disabled] .red-haze.btn.active,fieldset[disabled] .red-haze.btn:active,fieldset[disabled] .red-haze.btn:focus,fieldset[disabled] .red-haze.btn:hover{background-color:#f36a5a}.red-haze.btn .badge{color:#f36a5a;background-color:#FFF}.portlet.box.red-haze>.portlet-title,.portlet.red-haze,.portlet>.portlet-body.red-haze{background-color:#f36a5a}.btn.red-haze-stripe{border-left:3px solid #f36a5a}.portlet.solid.red-haze>.portlet-body,.portlet.solid.red-haze>.portlet-title{border:0;color:#FFF}.portlet.solid.red-haze>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-haze>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-haze{border:1px solid #f6958a;border-top:0}.portlet.box.red-haze>.portlet-title>.caption,.portlet.box.red-haze>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-haze>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fbc8c3;color:#fcdeda}.portlet.box.red-haze>.portlet-title>.actions .btn-default>i{color:#fdebe9}.portlet.box.red-haze>.portlet-title>.actions .btn-default.active,.portlet.box.red-haze>.portlet-title>.actions .btn-default:active,.portlet.box.red-haze>.portlet-title>.actions .btn-default:focus,.portlet.box.red-haze>.portlet-title>.actions .btn-default:hover{border:1px solid #fef3f2;color:#fff}.dashboard-stat.red-haze{background-color:#f36a5a}.dashboard-stat.red-haze.dashboard-stat-light:hover{background-color:#f25947}.dashboard-stat.red-haze .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-haze .details .number{color:#FFF}.dashboard-stat.red-haze .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-haze .more{color:#FFF;background-color:#f25947}.bg-red-haze{border-color:#f36a5a!important;background-image:none!important;background-color:#f36a5a!important;color:#FFF!important}.font-red-haze{color:#f36a5a!important}.progress-bar.red-haze{background:#f36a5a!important;color:#FFF!important}.yellow.btn{color:#FFF;background-color:#FFB848;border-color:""}.open .yellow.btn.dropdown-toggle,.yellow.btn.active,.yellow.btn:active,.yellow.btn:focus,.yellow.btn:hover{color:#FFF;background-color:#ffaa24}.yellow.btn.active,.yellow.btn:active{background-image:none;background-color:#ffa00b}.yellow.btn.active:hover,.yellow.btn:active:hover{background-color:#ffa415}.open .yellow.btn.dropdown-toggle{background-image:none}.yellow.btn.disabled,.yellow.btn.disabled.active,.yellow.btn.disabled:active,.yellow.btn.disabled:focus,.yellow.btn.disabled:hover,.yellow.btn[disabled],.yellow.btn[disabled].active,.yellow.btn[disabled]:active,.yellow.btn[disabled]:focus,.yellow.btn[disabled]:hover,fieldset[disabled] .yellow.btn,fieldset[disabled] .yellow.btn.active,fieldset[disabled] .yellow.btn:active,fieldset[disabled] .yellow.btn:focus,fieldset[disabled] .yellow.btn:hover{background-color:#FFB848}.yellow.btn .badge{color:#FFB848;background-color:#FFF}.portlet.box.yellow>.portlet-title,.portlet.yellow,.portlet>.portlet-body.yellow{background-color:#FFB848}.btn.yellow-stripe{border-left:3px solid #FFB848}.portlet.solid.yellow>.portlet-body,.portlet.solid.yellow>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow{border:1px solid #ffcc7b;border-top:0}.portlet.box.yellow>.portlet-title>.caption,.portlet.box.yellow>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ffe4b8;color:#ffedd2}.portlet.box.yellow>.portlet-title>.actions .btn-default>i{color:#fff3e1}.portlet.box.yellow>.portlet-title>.actions .btn-default.active,.portlet.box.yellow>.portlet-title>.actions .btn-default:active,.portlet.box.yellow>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow>.portlet-title>.actions .btn-default:hover{border:1px solid #fff7eb;color:#fff}.dashboard-stat.yellow{background-color:#FFB848}.dashboard-stat.yellow.dashboard-stat-light:hover{background-color:#ffb034}.dashboard-stat.yellow .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow .details .number{color:#FFF}.dashboard-stat.yellow .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow .more{color:#FFF;background-color:#ffb034}.bg-yellow{border-color:#FFB848!important;background-image:none!important;background-color:#FFB848!important;color:#FFF!important}.font-yellow{color:#FFB848!important}.progress-bar.yellow{background:#FFB848!important;color:#FFF!important}.yellow-gold.btn{color:#FFF;background-color:#E87E04;border-color:""}.open .yellow-gold.btn.dropdown-toggle,.yellow-gold.btn.active,.yellow-gold.btn:active,.yellow-gold.btn:focus,.yellow-gold.btn:hover{color:#FFF;background-color:#c56b03}.yellow-gold.btn.active,.yellow-gold.btn:active{background-image:none;background-color:#ac5d03}.yellow-gold.btn.active:hover,.yellow-gold.btn:active:hover{background-color:#b66303}.open .yellow-gold.btn.dropdown-toggle{background-image:none}.yellow-gold.btn.disabled,.yellow-gold.btn.disabled.active,.yellow-gold.btn.disabled:active,.yellow-gold.btn.disabled:focus,.yellow-gold.btn.disabled:hover,.yellow-gold.btn[disabled],.yellow-gold.btn[disabled].active,.yellow-gold.btn[disabled]:active,.yellow-gold.btn[disabled]:focus,.yellow-gold.btn[disabled]:hover,fieldset[disabled] .yellow-gold.btn,fieldset[disabled] .yellow-gold.btn.active,fieldset[disabled] .yellow-gold.btn:active,fieldset[disabled] .yellow-gold.btn:focus,fieldset[disabled] .yellow-gold.btn:hover{background-color:#E87E04}.yellow-gold.btn .badge{color:#E87E04;background-color:#FFF}.portlet.box.yellow-gold>.portlet-title,.portlet.yellow-gold,.portlet>.portlet-body.yellow-gold{background-color:#E87E04}.btn.yellow-gold-stripe{border-left:3px solid #E87E04}.portlet.solid.yellow-gold>.portlet-body,.portlet.solid.yellow-gold>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-gold>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-gold>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-gold{border:1px solid #fb9724;border-top:0}.portlet.box.yellow-gold>.portlet-title>.caption,.portlet.box.yellow-gold>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-gold>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fcb460;color:#fdbf79}.portlet.box.yellow-gold>.portlet-title>.actions .btn-default>i{color:#fdc788}.portlet.box.yellow-gold>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-gold>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-gold>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-gold>.portlet-title>.actions .btn-default:hover{border:1px solid #fdcb92;color:#fed7ab}.dashboard-stat.yellow-gold{background-color:#E87E04}.dashboard-stat.yellow-gold.dashboard-stat-light:hover{background-color:#d47304}.dashboard-stat.yellow-gold .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-gold .details .number{color:#FFF}.dashboard-stat.yellow-gold .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-gold .more{color:#FFF;background-color:#d47304}.bg-yellow-gold{border-color:#E87E04!important;background-image:none!important;background-color:#E87E04!important;color:#FFF!important}.font-yellow-gold{color:#E87E04!important}.progress-bar.yellow-gold{background:#E87E04!important;color:#FFF!important}.yellow-casablanca.btn{color:#FFF;background-color:#f2784b;border-color:""}.open .yellow-casablanca.btn.dropdown-toggle,.yellow-casablanca.btn.active,.yellow-casablanca.btn:active,.yellow-casablanca.btn:focus,.yellow-casablanca.btn:hover{color:#FFF;background-color:#f05f2a}.yellow-casablanca.btn.active,.yellow-casablanca.btn:active{background-image:none;background-color:#ee4d12}.yellow-casablanca.btn.active:hover,.yellow-casablanca.btn:active:hover{background-color:#ef541b}.open .yellow-casablanca.btn.dropdown-toggle{background-image:none}.yellow-casablanca.btn.disabled,.yellow-casablanca.btn.disabled.active,.yellow-casablanca.btn.disabled:active,.yellow-casablanca.btn.disabled:focus,.yellow-casablanca.btn.disabled:hover,.yellow-casablanca.btn[disabled],.yellow-casablanca.btn[disabled].active,.yellow-casablanca.btn[disabled]:active,.yellow-casablanca.btn[disabled]:focus,.yellow-casablanca.btn[disabled]:hover,fieldset[disabled] .yellow-casablanca.btn,fieldset[disabled] .yellow-casablanca.btn.active,fieldset[disabled] .yellow-casablanca.btn:active,fieldset[disabled] .yellow-casablanca.btn:focus,fieldset[disabled] .yellow-casablanca.btn:hover{background-color:#f2784b}.yellow-casablanca.btn .badge{color:#f2784b;background-color:#FFF}.portlet.box.yellow-casablanca>.portlet-title,.portlet.yellow-casablanca,.portlet>.portlet-body.yellow-casablanca{background-color:#f2784b}.btn.yellow-casablanca-stripe{border-left:3px solid #f2784b}.portlet.solid.yellow-casablanca>.portlet-body,.portlet.solid.yellow-casablanca>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-casablanca>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-casablanca{border:1px solid #f59c7b;border-top:0}.portlet.box.yellow-casablanca>.portlet-title>.caption,.portlet.box.yellow-casablanca>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fac6b4;color:#fbd8cb}.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default>i{color:#fce3da}.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default:hover{border:1px solid #fdeae3;color:#fffcfb}.dashboard-stat.yellow-casablanca{background-color:#f2784b}.dashboard-stat.yellow-casablanca.dashboard-stat-light:hover{background-color:#f16a38}.dashboard-stat.yellow-casablanca .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-casablanca .details .number{color:#FFF}.dashboard-stat.yellow-casablanca .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-casablanca .more{color:#FFF;background-color:#f16a38}.bg-yellow-casablanca{border-color:#f2784b!important;background-image:none!important;background-color:#f2784b!important;color:#FFF!important}.font-yellow-casablanca{color:#f2784b!important}.progress-bar.yellow-casablanca{background:#f2784b!important;color:#FFF!important}.yellow-crusta.btn{color:#FFF;background-color:#f3c200;border-color:""}.open .yellow-crusta.btn.dropdown-toggle,.yellow-crusta.btn.active,.yellow-crusta.btn:active,.yellow-crusta.btn:focus,.yellow-crusta.btn:hover{color:#FFF;background-color:#cfa500}.yellow-crusta.btn.active,.yellow-crusta.btn:active{background-image:none;background-color:#b69100}.yellow-crusta.btn.active:hover,.yellow-crusta.btn:active:hover{background-color:#c09900}.open .yellow-crusta.btn.dropdown-toggle{background-image:none}.yellow-crusta.btn.disabled,.yellow-crusta.btn.disabled.active,.yellow-crusta.btn.disabled:active,.yellow-crusta.btn.disabled:focus,.yellow-crusta.btn.disabled:hover,.yellow-crusta.btn[disabled],.yellow-crusta.btn[disabled].active,.yellow-crusta.btn[disabled]:active,.yellow-crusta.btn[disabled]:focus,.yellow-crusta.btn[disabled]:hover,fieldset[disabled] .yellow-crusta.btn,fieldset[disabled] .yellow-crusta.btn.active,fieldset[disabled] .yellow-crusta.btn:active,fieldset[disabled] .yellow-crusta.btn:focus,fieldset[disabled] .yellow-crusta.btn:hover{background-color:#f3c200}.yellow-crusta.btn .badge{color:#f3c200;background-color:#FFF}.portlet.box.yellow-crusta>.portlet-title,.portlet.yellow-crusta,.portlet>.portlet-body.yellow-crusta{background-color:#f3c200}.btn.yellow-crusta-stripe{border-left:3px solid #f3c200}.portlet.solid.yellow-crusta>.portlet-body,.portlet.solid.yellow-crusta>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-crusta>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-crusta{border:1px solid #ffd327;border-top:0}.portlet.box.yellow-crusta>.portlet-title>.caption,.portlet.box.yellow-crusta>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ffe064;color:#ffe57e}.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default>i{color:#ffe88d}.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default:hover{border:1px solid #ffea97;color:#ffefb1}.dashboard-stat.yellow-crusta{background-color:#f3c200}.dashboard-stat.yellow-crusta.dashboard-stat-light:hover{background-color:#dfb200}.dashboard-stat.yellow-crusta .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-crusta .details .number{color:#FFF}.dashboard-stat.yellow-crusta .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-crusta .more{color:#FFF;background-color:#dfb200}.bg-yellow-crusta{border-color:#f3c200!important;background-image:none!important;background-color:#f3c200!important;color:#FFF!important}.font-yellow-crusta{color:#f3c200!important}.progress-bar.yellow-crusta{background:#f3c200!important;color:#FFF!important}.yellow-lemon.btn{color:#FFF;background-color:#F7CA18;border-color:""}.open .yellow-lemon.btn.dropdown-toggle,.yellow-lemon.btn.active,.yellow-lemon.btn:active,.yellow-lemon.btn:focus,.yellow-lemon.btn:hover{color:#FFF;background-color:#e3b708}.yellow-lemon.btn.active,.yellow-lemon.btn:active{background-image:none;background-color:#cba307}.yellow-lemon.btn.active:hover,.yellow-lemon.btn:active:hover{background-color:#d5ab07}.open .yellow-lemon.btn.dropdown-toggle{background-image:none}.yellow-lemon.btn.disabled,.yellow-lemon.btn.disabled.active,.yellow-lemon.btn.disabled:active,.yellow-lemon.btn.disabled:focus,.yellow-lemon.btn.disabled:hover,.yellow-lemon.btn[disabled],.yellow-lemon.btn[disabled].active,.yellow-lemon.btn[disabled]:active,.yellow-lemon.btn[disabled]:focus,.yellow-lemon.btn[disabled]:hover,fieldset[disabled] .yellow-lemon.btn,fieldset[disabled] .yellow-lemon.btn.active,fieldset[disabled] .yellow-lemon.btn:active,fieldset[disabled] .yellow-lemon.btn:focus,fieldset[disabled] .yellow-lemon.btn:hover{background-color:#F7CA18}.yellow-lemon.btn .badge{color:#F7CA18;background-color:#FFF}.portlet.box.yellow-lemon>.portlet-title,.portlet.yellow-lemon,.portlet>.portlet-body.yellow-lemon{background-color:#F7CA18}.btn.yellow-lemon-stripe{border-left:3px solid #F7CA18}.portlet.solid.yellow-lemon>.portlet-body,.portlet.solid.yellow-lemon>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-lemon>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-lemon{border:1px solid #f9d549;border-top:0}.portlet.box.yellow-lemon>.portlet-title>.caption,.portlet.box.yellow-lemon>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fbe384;color:#fce99d}.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default>i{color:#fcecac}.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default:hover{border:1px solid #fceeb6;color:#fdf4ce}.dashboard-stat.yellow-lemon{background-color:#F7CA18}.dashboard-stat.yellow-lemon.dashboard-stat-light:hover{background-color:#f2c308}.dashboard-stat.yellow-lemon .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-lemon .details .number{color:#FFF}.dashboard-stat.yellow-lemon .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-lemon .more{color:#FFF;background-color:#f2c308}.bg-yellow-lemon{border-color:#F7CA18!important;background-image:none!important;background-color:#F7CA18!important;color:#FFF!important}.font-yellow-lemon{color:#F7CA18!important}.progress-bar.yellow-lemon{background:#F7CA18!important;color:#FFF!important}.yellow-saffron.btn{color:#FFF;background-color:#F4D03F;border-color:""}.open .yellow-saffron.btn.dropdown-toggle,.yellow-saffron.btn.active,.yellow-saffron.btn:active,.yellow-saffron.btn:focus,.yellow-saffron.btn:hover{color:#FFF;background-color:#f2c81d}.yellow-saffron.btn.active,.yellow-saffron.btn:active{background-image:none;background-color:#e8bd0d}.yellow-saffron.btn.active:hover,.yellow-saffron.btn:active:hover{background-color:#f1c40f}.open .yellow-saffron.btn.dropdown-toggle{background-image:none}.yellow-saffron.btn.disabled,.yellow-saffron.btn.disabled.active,.yellow-saffron.btn.disabled:active,.yellow-saffron.btn.disabled:focus,.yellow-saffron.btn.disabled:hover,.yellow-saffron.btn[disabled],.yellow-saffron.btn[disabled].active,.yellow-saffron.btn[disabled]:active,.yellow-saffron.btn[disabled]:focus,.yellow-saffron.btn[disabled]:hover,fieldset[disabled] .yellow-saffron.btn,fieldset[disabled] .yellow-saffron.btn.active,fieldset[disabled] .yellow-saffron.btn:active,fieldset[disabled] .yellow-saffron.btn:focus,fieldset[disabled] .yellow-saffron.btn:hover{background-color:#F4D03F}.yellow-saffron.btn .badge{color:#F4D03F;background-color:#FFF}.portlet.box.yellow-saffron>.portlet-title,.portlet.yellow-saffron,.portlet>.portlet-body.yellow-saffron{background-color:#F4D03F}.btn.yellow-saffron-stripe{border-left:3px solid #F4D03F}.portlet.solid.yellow-saffron>.portlet-body,.portlet.solid.yellow-saffron>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-saffron>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-saffron{border:1px solid #f7dc6f;border-top:0}.portlet.box.yellow-saffron>.portlet-title>.caption,.portlet.box.yellow-saffron>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #faeaa9;color:#fbf0c1}.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default>i{color:#fcf3d0}.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default:hover{border:1px solid #fdf6d9;color:#fefcf1}.dashboard-stat.yellow-saffron{background-color:#F4D03F}.dashboard-stat.yellow-saffron.dashboard-stat-light:hover{background-color:#f3cb2c}.dashboard-stat.yellow-saffron .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-saffron .details .number{color:#FFF}.dashboard-stat.yellow-saffron .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-saffron .more{color:#FFF;background-color:#f3cb2c}.bg-yellow-saffron{border-color:#F4D03F!important;background-image:none!important;background-color:#F4D03F!important;color:#FFF!important}.font-yellow-saffron{color:#F4D03F!important}.progress-bar.yellow-saffron{background:#F4D03F!important;color:#FFF!important}.purple.btn{color:#FFF;background-color:#8E44AD;border-color:""}.open .purple.btn.dropdown-toggle,.purple.btn.active,.purple.btn:active,.purple.btn:focus,.purple.btn:hover{color:#FFF;background-color:#793a93}.purple.btn.active,.purple.btn:active{background-image:none;background-color:#6a3381}.purple.btn.active:hover,.purple.btn:active:hover{background-color:#703688}.open .purple.btn.dropdown-toggle{background-image:none}.purple.btn.disabled,.purple.btn.disabled.active,.purple.btn.disabled:active,.purple.btn.disabled:focus,.purple.btn.disabled:hover,.purple.btn[disabled],.purple.btn[disabled].active,.purple.btn[disabled]:active,.purple.btn[disabled]:focus,.purple.btn[disabled]:hover,fieldset[disabled] .purple.btn,fieldset[disabled] .purple.btn.active,fieldset[disabled] .purple.btn:active,fieldset[disabled] .purple.btn:focus,fieldset[disabled] .purple.btn:hover{background-color:#8E44AD}.purple.btn .badge{color:#8E44AD;background-color:#FFF}.portlet.box.purple>.portlet-title,.portlet.purple,.portlet>.portlet-body.purple{background-color:#8E44AD}.btn.purple-stripe{border-left:3px solid #8E44AD}.portlet.solid.purple>.portlet-body,.portlet.solid.purple>.portlet-title{border:0;color:#FFF}.portlet.solid.purple>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple{border:1px solid #a563c1;border-top:0}.portlet.box.purple>.portlet-title>.caption,.portlet.box.purple>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #bf8ed3;color:#c9a1da}.portlet.box.purple>.portlet-title>.actions .btn-default>i{color:#cfacde}.portlet.box.purple>.portlet-title>.actions .btn-default.active,.portlet.box.purple>.portlet-title>.actions .btn-default:active,.portlet.box.purple>.portlet-title>.actions .btn-default:focus,.portlet.box.purple>.portlet-title>.actions .btn-default:hover{border:1px solid #d4b3e1;color:#dec5e8}.dashboard-stat.purple{background-color:#8E44AD}.dashboard-stat.purple.dashboard-stat-light:hover{background-color:#823e9e}.dashboard-stat.purple .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple .details .number{color:#FFF}.dashboard-stat.purple .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple .more{color:#FFF;background-color:#823e9e}.bg-purple{border-color:#8E44AD!important;background-image:none!important;background-color:#8E44AD!important;color:#FFF!important}.font-purple{color:#8E44AD!important}.progress-bar.purple{background:#8E44AD!important;color:#FFF!important}.purple-plum.btn{color:#FFF;background-color:#8775a7;border-color:""}.open .purple-plum.btn.dropdown-toggle,.purple-plum.btn.active,.purple-plum.btn:active,.purple-plum.btn:focus,.purple-plum.btn:hover{color:#FFF;background-color:#746198}.purple-plum.btn.active,.purple-plum.btn:active{background-image:none;background-color:#685788}.purple-plum.btn.active:hover,.purple-plum.btn:active:hover{background-color:#6d5b8e}.open .purple-plum.btn.dropdown-toggle{background-image:none}.purple-plum.btn.disabled,.purple-plum.btn.disabled.active,.purple-plum.btn.disabled:active,.purple-plum.btn.disabled:focus,.purple-plum.btn.disabled:hover,.purple-plum.btn[disabled],.purple-plum.btn[disabled].active,.purple-plum.btn[disabled]:active,.purple-plum.btn[disabled]:focus,.purple-plum.btn[disabled]:hover,fieldset[disabled] .purple-plum.btn,fieldset[disabled] .purple-plum.btn.active,fieldset[disabled] .purple-plum.btn:active,fieldset[disabled] .purple-plum.btn:focus,fieldset[disabled] .purple-plum.btn:hover{background-color:#8775a7}.purple-plum.btn .badge{color:#8775a7;background-color:#FFF}.portlet.box.purple-plum>.portlet-title,.portlet.purple-plum,.portlet>.portlet-body.purple-plum{background-color:#8775a7}.btn.purple-plum-stripe{border-left:3px solid #8775a7}.portlet.solid.purple-plum>.portlet-body,.portlet.solid.purple-plum>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-plum>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-plum>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-plum{border:1px solid #a294bb;border-top:0}.portlet.box.purple-plum>.portlet-title>.caption,.portlet.box.purple-plum>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-plum>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #c3bad3;color:#d0c9dd}.portlet.box.purple-plum>.portlet-title>.actions .btn-default>i{color:#d8d2e3}.portlet.box.purple-plum>.portlet-title>.actions .btn-default.active,.portlet.box.purple-plum>.portlet-title>.actions .btn-default:active,.portlet.box.purple-plum>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-plum>.portlet-title>.actions .btn-default:hover{border:1px solid #ded9e7;color:#ebe8f0}.dashboard-stat.purple-plum{background-color:#8775a7}.dashboard-stat.purple-plum.dashboard-stat-light:hover{background-color:#7c699f}.dashboard-stat.purple-plum .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-plum .details .number{color:#FFF}.dashboard-stat.purple-plum .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-plum .more{color:#FFF;background-color:#7c699f}.bg-purple-plum{border-color:#8775a7!important;background-image:none!important;background-color:#8775a7!important;color:#FFF!important}.font-purple-plum{color:#8775a7!important}.progress-bar.purple-plum{background:#8775a7!important;color:#FFF!important}.purple-medium.btn{color:#FFF;background-color:#BF55EC;border-color:""}.open .purple-medium.btn.dropdown-toggle,.purple-medium.btn.active,.purple-medium.btn:active,.purple-medium.btn:focus,.purple-medium.btn:hover{color:#FFF;background-color:#b335e8}.purple-medium.btn.active,.purple-medium.btn:active{background-image:none;background-color:#aa1ee6}.purple-medium.btn.active:hover,.purple-medium.btn:active:hover{background-color:#ae27e7}.open .purple-medium.btn.dropdown-toggle{background-image:none}.purple-medium.btn.disabled,.purple-medium.btn.disabled.active,.purple-medium.btn.disabled:active,.purple-medium.btn.disabled:focus,.purple-medium.btn.disabled:hover,.purple-medium.btn[disabled],.purple-medium.btn[disabled].active,.purple-medium.btn[disabled]:active,.purple-medium.btn[disabled]:focus,.purple-medium.btn[disabled]:hover,fieldset[disabled] .purple-medium.btn,fieldset[disabled] .purple-medium.btn.active,fieldset[disabled] .purple-medium.btn:active,fieldset[disabled] .purple-medium.btn:focus,fieldset[disabled] .purple-medium.btn:hover{background-color:#BF55EC}.purple-medium.btn .badge{color:#BF55EC;background-color:#FFF}.portlet.box.purple-medium>.portlet-title,.portlet.purple-medium,.portlet>.portlet-body.purple-medium{background-color:#BF55EC}.btn.purple-medium-stripe{border-left:3px solid #BF55EC}.portlet.solid.purple-medium>.portlet-body,.portlet.solid.purple-medium>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-medium>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-medium>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-medium{border:1px solid #d083f1;border-top:0}.portlet.box.purple-medium>.portlet-title>.caption,.portlet.box.purple-medium>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-medium>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #e5baf7;color:#eed1fa}.portlet.box.purple-medium>.portlet-title>.actions .btn-default>i{color:#f3dffb}.portlet.box.purple-medium>.portlet-title>.actions .btn-default.active,.portlet.box.purple-medium>.portlet-title>.actions .btn-default:active,.portlet.box.purple-medium>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-medium>.portlet-title>.actions .btn-default:hover{border:1px solid #f6e8fc;color:#fff}.dashboard-stat.purple-medium{background-color:#BF55EC}.dashboard-stat.purple-medium.dashboard-stat-light:hover{background-color:#b843ea}.dashboard-stat.purple-medium .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-medium .details .number{color:#FFF}.dashboard-stat.purple-medium .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-medium .more{color:#FFF;background-color:#b843ea}.bg-purple-medium{border-color:#BF55EC!important;background-image:none!important;background-color:#BF55EC!important;color:#FFF!important}.font-purple-medium{color:#BF55EC!important}.progress-bar.purple-medium{background:#BF55EC!important;color:#FFF!important}.purple-studio.btn{color:#FFF;background-color:#8E44AD;border-color:""}.open .purple-studio.btn.dropdown-toggle,.purple-studio.btn.active,.purple-studio.btn:active,.purple-studio.btn:focus,.purple-studio.btn:hover{color:#FFF;background-color:#793a93}.purple-studio.btn.active,.purple-studio.btn:active{background-image:none;background-color:#6a3381}.purple-studio.btn.active:hover,.purple-studio.btn:active:hover{background-color:#703688}.open .purple-studio.btn.dropdown-toggle{background-image:none}.purple-studio.btn.disabled,.purple-studio.btn.disabled.active,.purple-studio.btn.disabled:active,.purple-studio.btn.disabled:focus,.purple-studio.btn.disabled:hover,.purple-studio.btn[disabled],.purple-studio.btn[disabled].active,.purple-studio.btn[disabled]:active,.purple-studio.btn[disabled]:focus,.purple-studio.btn[disabled]:hover,fieldset[disabled] .purple-studio.btn,fieldset[disabled] .purple-studio.btn.active,fieldset[disabled] .purple-studio.btn:active,fieldset[disabled] .purple-studio.btn:focus,fieldset[disabled] .purple-studio.btn:hover{background-color:#8E44AD}.purple-studio.btn .badge{color:#8E44AD;background-color:#FFF}.portlet.box.purple-studio>.portlet-title,.portlet.purple-studio,.portlet>.portlet-body.purple-studio{background-color:#8E44AD}.btn.purple-studio-stripe{border-left:3px solid #8E44AD}.portlet.solid.purple-studio>.portlet-body,.portlet.solid.purple-studio>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-studio>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-studio>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-studio{border:1px solid #a563c1;border-top:0}.portlet.box.purple-studio>.portlet-title>.caption,.portlet.box.purple-studio>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-studio>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #bf8ed3;color:#c9a1da}.portlet.box.purple-studio>.portlet-title>.actions .btn-default>i{color:#cfacde}.portlet.box.purple-studio>.portlet-title>.actions .btn-default.active,.portlet.box.purple-studio>.portlet-title>.actions .btn-default:active,.portlet.box.purple-studio>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-studio>.portlet-title>.actions .btn-default:hover{border:1px solid #d4b3e1;color:#dec5e8}.dashboard-stat.purple-studio{background-color:#8E44AD}.dashboard-stat.purple-studio.dashboard-stat-light:hover{background-color:#823e9e}.dashboard-stat.purple-studio .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-studio .details .number{color:#FFF}.dashboard-stat.purple-studio .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-studio .more{color:#FFF;background-color:#823e9e}.bg-purple-studio{border-color:#8E44AD!important;background-image:none!important;background-color:#8E44AD!important;color:#FFF!important}.font-purple-studio{color:#8E44AD!important}.progress-bar.purple-studio{background:#8E44AD!important;color:#FFF!important}.purple-wisteria.btn{color:#FFF;background-color:#9B59B6;border-color:""}.open .purple-wisteria.btn.dropdown-toggle,.purple-wisteria.btn.active,.purple-wisteria.btn:active,.purple-wisteria.btn:focus,.purple-wisteria.btn:hover{color:#FFF;background-color:#8948a3}.purple-wisteria.btn.active,.purple-wisteria.btn:active{background-image:none;background-color:#7a4092}.purple-wisteria.btn.active:hover,.purple-wisteria.btn:active:hover{background-color:#804399}.open .purple-wisteria.btn.dropdown-toggle{background-image:none}.purple-wisteria.btn.disabled,.purple-wisteria.btn.disabled.active,.purple-wisteria.btn.disabled:active,.purple-wisteria.btn.disabled:focus,.purple-wisteria.btn.disabled:hover,.purple-wisteria.btn[disabled],.purple-wisteria.btn[disabled].active,.purple-wisteria.btn[disabled]:active,.purple-wisteria.btn[disabled]:focus,.purple-wisteria.btn[disabled]:hover,fieldset[disabled] .purple-wisteria.btn,fieldset[disabled] .purple-wisteria.btn.active,fieldset[disabled] .purple-wisteria.btn:active,fieldset[disabled] .purple-wisteria.btn:focus,fieldset[disabled] .purple-wisteria.btn:hover{background-color:#9B59B6}.purple-wisteria.btn .badge{color:#9B59B6;background-color:#FFF}.portlet.box.purple-wisteria>.portlet-title,.portlet.purple-wisteria,.portlet>.portlet-body.purple-wisteria{background-color:#9B59B6}.btn.purple-wisteria-stripe{border-left:3px solid #9B59B6}.portlet.solid.purple-wisteria>.portlet-body,.portlet.solid.purple-wisteria>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-wisteria>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-wisteria{border:1px solid #b07cc6;border-top:0}.portlet.box.purple-wisteria>.portlet-title>.caption,.portlet.box.purple-wisteria>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #caa7d8;color:#d5b9e0}.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default>i{color:#dbc3e5}.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default.active,.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default:active,.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default:hover{border:1px solid #dfcae8;color:#eadcf0}.dashboard-stat.purple-wisteria{background-color:#9B59B6}.dashboard-stat.purple-wisteria.dashboard-stat-light:hover{background-color:#924dae}.dashboard-stat.purple-wisteria .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-wisteria .details .number{color:#FFF}.dashboard-stat.purple-wisteria .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-wisteria .more{color:#FFF;background-color:#924dae}.bg-purple-wisteria{border-color:#9B59B6!important;background-image:none!important;background-color:#9B59B6!important;color:#FFF!important}.font-purple-wisteria{color:#9B59B6!important}.progress-bar.purple-wisteria{background:#9B59B6!important;color:#FFF!important}.purple-seance.btn{color:#FFF;background-color:#9A12B3;border-color:""}.open .purple-seance.btn.dropdown-toggle,.purple-seance.btn.active,.purple-seance.btn:active,.purple-seance.btn:focus,.purple-seance.btn:hover{color:#FFF;background-color:#7e0f93}.purple-seance.btn.active,.purple-seance.btn:active{background-image:none;background-color:#6a0c7b}.purple-seance.btn.active:hover,.purple-seance.btn:active:hover{background-color:#720d85}.open .purple-seance.btn.dropdown-toggle{background-image:none}.purple-seance.btn.disabled,.purple-seance.btn.disabled.active,.purple-seance.btn.disabled:active,.purple-seance.btn.disabled:focus,.purple-seance.btn.disabled:hover,.purple-seance.btn[disabled],.purple-seance.btn[disabled].active,.purple-seance.btn[disabled]:active,.purple-seance.btn[disabled]:focus,.purple-seance.btn[disabled]:hover,fieldset[disabled] .purple-seance.btn,fieldset[disabled] .purple-seance.btn.active,fieldset[disabled] .purple-seance.btn:active,fieldset[disabled] .purple-seance.btn:focus,fieldset[disabled] .purple-seance.btn:hover{background-color:#9A12B3}.purple-seance.btn .badge{color:#9A12B3;background-color:#FFF}.portlet.box.purple-seance>.portlet-title,.portlet.purple-seance,.portlet>.portlet-body.purple-seance{background-color:#9A12B3}.btn.purple-seance-stripe{border-left:3px solid #9A12B3}.portlet.solid.purple-seance>.portlet-body,.portlet.solid.purple-seance>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-seance>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-seance>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-seance{border:1px solid #c217e1;border-top:0}.portlet.box.purple-seance>.portlet-title>.caption,.portlet.box.purple-seance>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-seance>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #d349ed;color:#d960ef}.portlet.box.purple-seance>.portlet-title>.actions .btn-default>i{color:#dc6ef0}.portlet.box.purple-seance>.portlet-title>.actions .btn-default.active,.portlet.box.purple-seance>.portlet-title>.actions .btn-default:active,.portlet.box.purple-seance>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-seance>.portlet-title>.actions .btn-default:hover{border:1px solid #de77f1;color:#e48ef4}.dashboard-stat.purple-seance{background-color:#9A12B3}.dashboard-stat.purple-seance.dashboard-stat-light:hover{background-color:#8a10a0}.dashboard-stat.purple-seance .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-seance .details .number{color:#FFF}.dashboard-stat.purple-seance .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-seance .more{color:#FFF;background-color:#8a10a0}.bg-purple-seance{border-color:#9A12B3!important;background-image:none!important;background-color:#9A12B3!important;color:#FFF!important}.font-purple-seance{color:#9A12B3!important}.progress-bar.purple-seance{background:#9A12B3!important;color:#FFF!important}.purple-intense.btn{color:#FFF;background-color:#8775a7;border-color:""}.open .purple-intense.btn.dropdown-toggle,.purple-intense.btn.active,.purple-intense.btn:active,.purple-intense.btn:focus,.purple-intense.btn:hover{color:#FFF;background-color:#746198}.purple-intense.btn.active,.purple-intense.btn:active{background-image:none;background-color:#685788}.purple-intense.btn.active:hover,.purple-intense.btn:active:hover{background-color:#6d5b8e}.open .purple-intense.btn.dropdown-toggle{background-image:none}.purple-intense.btn.disabled,.purple-intense.btn.disabled.active,.purple-intense.btn.disabled:active,.purple-intense.btn.disabled:focus,.purple-intense.btn.disabled:hover,.purple-intense.btn[disabled],.purple-intense.btn[disabled].active,.purple-intense.btn[disabled]:active,.purple-intense.btn[disabled]:focus,.purple-intense.btn[disabled]:hover,fieldset[disabled] .purple-intense.btn,fieldset[disabled] .purple-intense.btn.active,fieldset[disabled] .purple-intense.btn:active,fieldset[disabled] .purple-intense.btn:focus,fieldset[disabled] .purple-intense.btn:hover{background-color:#8775a7}.purple-intense.btn .badge{color:#8775a7;background-color:#FFF}.portlet.box.purple-intense>.portlet-title,.portlet.purple-intense,.portlet>.portlet-body.purple-intense{background-color:#8775a7}.btn.purple-intense-stripe{border-left:3px solid #8775a7}.portlet.solid.purple-intense>.portlet-body,.portlet.solid.purple-intense>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-intense>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-intense>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-intense{border:1px solid #a294bb;border-top:0}.portlet.box.purple-intense>.portlet-title>.caption,.portlet.box.purple-intense>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-intense>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #c3bad3;color:#d0c9dd}.portlet.box.purple-intense>.portlet-title>.actions .btn-default>i{color:#d8d2e3}.portlet.box.purple-intense>.portlet-title>.actions .btn-default.active,.portlet.box.purple-intense>.portlet-title>.actions .btn-default:active,.portlet.box.purple-intense>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-intense>.portlet-title>.actions .btn-default:hover{border:1px solid #ded9e7;color:#ebe8f0}.dashboard-stat.purple-intense{background-color:#8775a7}.dashboard-stat.purple-intense.dashboard-stat-light:hover{background-color:#7c699f}.dashboard-stat.purple-intense .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-intense .details .number{color:#FFF}.dashboard-stat.purple-intense .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-intense .more{color:#FFF;background-color:#7c699f}.bg-purple-intense{border-color:#8775a7!important;background-image:none!important;background-color:#8775a7!important;color:#FFF!important}.font-purple-intense{color:#8775a7!important}.progress-bar.purple-intense{background:#8775a7!important;color:#FFF!important}.purple-sharp.btn{color:#FFF;background-color:#796799;border-color:""}.open .purple-sharp.btn.dropdown-toggle,.purple-sharp.btn.active,.purple-sharp.btn:active,.purple-sharp.btn:focus,.purple-sharp.btn:hover{color:#FFF;background-color:#685884}.purple-sharp.btn.active,.purple-sharp.btn:active{background-image:none;background-color:#5c4e75}.purple-sharp.btn.active:hover,.purple-sharp.btn:active:hover{background-color:#61527b}.open .purple-sharp.btn.dropdown-toggle{background-image:none}.purple-sharp.btn.disabled,.purple-sharp.btn.disabled.active,.purple-sharp.btn.disabled:active,.purple-sharp.btn.disabled:focus,.purple-sharp.btn.disabled:hover,.purple-sharp.btn[disabled],.purple-sharp.btn[disabled].active,.purple-sharp.btn[disabled]:active,.purple-sharp.btn[disabled]:focus,.purple-sharp.btn[disabled]:hover,fieldset[disabled] .purple-sharp.btn,fieldset[disabled] .purple-sharp.btn.active,fieldset[disabled] .purple-sharp.btn:active,fieldset[disabled] .purple-sharp.btn:focus,fieldset[disabled] .purple-sharp.btn:hover{background-color:#796799}.purple-sharp.btn .badge{color:#796799;background-color:#FFF}.portlet.box.purple-sharp>.portlet-title,.portlet.purple-sharp,.portlet>.portlet-body.purple-sharp{background-color:#796799}.btn.purple-sharp-stripe{border-left:3px solid #796799}.portlet.solid.purple-sharp>.portlet-body,.portlet.solid.purple-sharp>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-sharp>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-sharp{border:1px solid #9486ad;border-top:0}.portlet.box.purple-sharp>.portlet-title>.caption,.portlet.box.purple-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-sharp>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #b4aac6;color:#c2b9d0}.portlet.box.purple-sharp>.portlet-title>.actions .btn-default>i{color:#cac3d6}.portlet.box.purple-sharp>.portlet-title>.actions .btn-default.active,.portlet.box.purple-sharp>.portlet-title>.actions .btn-default:active,.portlet.box.purple-sharp>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-sharp>.portlet-title>.actions .btn-default:hover{border:1px solid #cfc9db;color:#ddd8e5}.dashboard-stat.purple-sharp{background-color:#796799}.dashboard-stat.purple-sharp.dashboard-stat-light:hover{background-color:#6f5f8d}.dashboard-stat.purple-sharp .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-sharp .details .number{color:#FFF}.dashboard-stat.purple-sharp .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-sharp .more{color:#FFF;background-color:#6f5f8d}.bg-purple-sharp{border-color:#796799!important;background-image:none!important;background-color:#796799!important;color:#FFF!important}.font-purple-sharp{color:#796799!important}.progress-bar.purple-sharp{background:#796799!important;color:#FFF!important}.purple-soft.btn{color:#FFF;background-color:#8877a9;border-color:""}.open .purple-soft.btn.dropdown-toggle,.purple-soft.btn.active,.purple-soft.btn:active,.purple-soft.btn:focus,.purple-soft.btn:hover{color:#FFF;background-color:#75629b}.purple-soft.btn.active,.purple-soft.btn:active{background-image:none;background-color:#69588b}.purple-soft.btn.active:hover,.purple-soft.btn:active:hover{background-color:#6e5c91}.open .purple-soft.btn.dropdown-toggle{background-image:none}.purple-soft.btn.disabled,.purple-soft.btn.disabled.active,.purple-soft.btn.disabled:active,.purple-soft.btn.disabled:focus,.purple-soft.btn.disabled:hover,.purple-soft.btn[disabled],.purple-soft.btn[disabled].active,.purple-soft.btn[disabled]:active,.purple-soft.btn[disabled]:focus,.purple-soft.btn[disabled]:hover,fieldset[disabled] .purple-soft.btn,fieldset[disabled] .purple-soft.btn.active,fieldset[disabled] .purple-soft.btn:active,fieldset[disabled] .purple-soft.btn:focus,fieldset[disabled] .purple-soft.btn:hover{background-color:#8877a9}.purple-soft.btn .badge{color:#8877a9;background-color:#FFF}.portlet.box.purple-soft>.portlet-title,.portlet.purple-soft,.portlet>.portlet-body.purple-soft{background-color:#8877a9}.btn.purple-soft-stripe{border-left:3px solid #8877a9}.portlet.solid.purple-soft>.portlet-body,.portlet.solid.purple-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-soft{border:1px solid #a396bd;border-top:0}.portlet.box.purple-soft>.portlet-title>.caption,.portlet.box.purple-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #c4bcd4;color:#d2cbde}.portlet.box.purple-soft>.portlet-title>.actions .btn-default>i{color:#dad5e4}.portlet.box.purple-soft>.portlet-title>.actions .btn-default.active,.portlet.box.purple-soft>.portlet-title>.actions .btn-default:active,.portlet.box.purple-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #dfdbe8;color:#edebf2}.dashboard-stat.purple-soft{background-color:#8877a9}.dashboard-stat.purple-soft.dashboard-stat-light:hover{background-color:#7d6ba1}.dashboard-stat.purple-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-soft .details .number{color:#FFF}.dashboard-stat.purple-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-soft .more{color:#FFF;background-color:#7d6ba1}.bg-purple-soft{border-color:#8877a9!important;background-image:none!important;background-color:#8877a9!important;color:#FFF!important}.font-purple-soft{color:#8877a9!important}.progress-bar.purple-soft{background:#8877a9!important;color:#FFF!important}.btn-transparent.btn{background:0 0;color:#888}@-moz-keyframes whirly-loader{0%{-moz-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes whirly-loader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes whirly-loader{0%{-moz-transform:rotate(0);-ms-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.whirly-loader:not(:required){overflow:hidden;position:relative;text-indent:-9999px;display:inline-block;width:8px;height:8px;background:0 0;-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%;-moz-box-shadow:#FA4C61 0 26px 0 6px,#FA4C61 .91px 26.05px 0 5.93px,#FA4C61 1.82px 26.07px 0 5.87px,#FA4C61 2.74px 26.06px 0 5.8px,#FA4C61 3.66px 26.01px 0 5.73px,#FA4C61 4.57px 25.93px 0 5.67px,#FA4C61 5.49px 25.82px 0 5.6px,#FA4C61 6.4px 25.68px 0 5.53px,#FA4C61 7.31px 25.51px 0 5.47px,#FA4C61 8.22px 25.3px 0 5.4px,#FA4C61 9.12px 25.06px 0 5.33px,#FA4C61 10.01px 24.79px 0 5.27px,#FA4C61 10.9px 24.48px 0 5.2px,#FA4C61 11.78px 24.15px 0 5.13px,#FA4C61 12.64px 23.78px 0 5.07px,#FA4C61 13.5px 23.38px 0 5px,#FA4C61 14.34px 22.95px 0 4.93px,#FA4C61 15.17px 22.49px 0 4.87px,#FA4C61 15.99px 22.01px 0 4.8px,#FA4C61 16.79px 21.49px 0 4.73px,#FA4C61 17.57px 20.94px 0 4.67px,#FA4C61 18.33px 20.36px 0 4.6px,#FA4C61 19.08px 19.76px 0 4.53px,#FA4C61 19.81px 19.13px 0 4.47px,#FA4C61 20.51px 18.47px 0 4.4px,#FA4C61 21.19px 17.78px 0 4.33px,#FA4C61 21.85px 17.07px 0 4.27px,#FA4C61 22.49px 16.34px 0 4.2px,#FA4C61 23.1px 15.58px 0 4.13px,#FA4C61 23.69px 14.8px 0 4.07px,#FA4C61 24.25px 14px 0 4px,#FA4C61 24.78px 13.18px 0 3.93px,#FA4C61 25.29px 12.33px 0 3.87px,#FA4C61 25.76px 11.47px 0 3.8px,#FA4C61 26.21px 10.59px 0 3.73px,#FA4C61 26.62px 9.69px 0 3.67px,#FA4C61 27.01px 8.78px 0 3.6px,#FA4C61 27.36px 7.85px 0 3.53px,#FA4C61 27.69px 6.9px 0 3.47px,#FA4C61 27.98px 5.95px 0 3.4px,#FA4C61 28.23px 4.98px 0 3.33px,#FA4C61 28.45px 4px 0 3.27px,#FA4C61 28.64px 3.01px 0 3.2px,#FA4C61 28.8px 2.01px 0 3.13px,#FA4C61 28.92px 1.01px 0 3.07px,#FA4C61 29px 0 0 3px,#FA4C61 29.05px -1.01px 0 2.93px,#FA4C61 29.06px -2.03px 0 2.87px,#FA4C61 29.04px -3.05px 0 2.8px,#FA4C61 28.98px -4.07px 0 2.73px,#FA4C61 28.89px -5.09px 0 2.67px,#FA4C61 28.76px -6.11px 0 2.6px,#FA4C61 28.59px -7.13px 0 2.53px,#FA4C61 28.39px -8.14px 0 2.47px,#FA4C61 28.15px -9.15px 0 2.4px,#FA4C61 27.88px -10.15px 0 2.33px,#FA4C61 27.57px -11.14px 0 2.27px,#FA4C61 27.22px -12.12px 0 2.2px,#FA4C61 26.84px -13.09px 0 2.13px,#FA4C61 26.43px -14.05px 0 2.07px,#FA4C61 25.98px -15px 0 2px,#FA4C61 25.5px -15.93px 0 1.93px,#FA4C61 24.98px -16.85px 0 1.87px,#FA4C61 24.43px -17.75px 0 1.8px,#FA4C61 23.85px -18.63px 0 1.73px,#FA4C61 23.24px -19.5px 0 1.67px,#FA4C61 22.59px -20.34px 0 1.6px,#FA4C61 21.92px -21.16px 0 1.53px,#FA4C61 21.21px -21.96px 0 1.47px,#FA4C61 20.48px -22.74px 0 1.4px,#FA4C61 19.71px -23.49px 0 1.33px,#FA4C61 18.92px -24.22px 0 1.27px,#FA4C61 18.1px -24.92px 0 1.2px,#FA4C61 17.26px -25.59px 0 1.13px,#FA4C61 16.39px -26.23px 0 1.07px,#FA4C61 15.5px -26.85px 0 1px,#FA4C61 14.58px -27.43px 0 .93px,#FA4C61 13.65px -27.98px 0 .87px,#FA4C61 12.69px -28.5px 0 .8px,#FA4C61 11.71px -28.99px 0 .73px,#FA4C61 10.72px -29.44px 0 .67px,#FA4C61 9.7px -29.86px 0 .6px,#FA4C61 8.67px -30.25px 0 .53px,#FA4C61 7.63px -30.6px 0 .47px,#FA4C61 6.57px -30.91px 0 .4px,#FA4C61 5.5px -31.19px 0 .33px,#FA4C61 4.42px -31.42px 0 .27px,#FA4C61 3.32px -31.63px 0 .2px,#FA4C61 2.22px -31.79px 0 .13px,#FA4C61 1.11px -31.91px 0 .07px,#FA4C61 0 -32px 0 0,#FA4C61 -1.12px -32.05px 0 -.07px,#FA4C61 -2.24px -32.06px 0 -.13px,#FA4C61 -3.37px -32.02px 0 -.2px,#FA4C61 -4.49px -31.95px 0 -.27px,#FA4C61 -5.61px -31.84px 0 -.33px,#FA4C61 -6.74px -31.69px 0 -.4px,#FA4C61 -7.85px -31.5px 0 -.47px,#FA4C61 -8.97px -31.27px 0 -.53px,#FA4C61 -10.07px -31px 0 -.6px,#FA4C61 -11.17px -30.7px 0 -.67px,#FA4C61 -12.26px -30.35px 0 -.73px,#FA4C61 -13.34px -29.96px 0 -.8px,#FA4C61 -14.41px -29.54px 0 -.87px,#FA4C61 -15.46px -29.08px 0 -.93px,#FA4C61 -16.5px -28.58px 0 -1px,#FA4C61 -17.52px -28.04px 0 -1.07px,#FA4C61 -18.53px -27.47px 0 -1.13px,#FA4C61 -19.51px -26.86px 0 -1.2px,#FA4C61 -20.48px -26.21px 0 -1.27px,#FA4C61 -21.43px -25.53px 0 -1.33px,#FA4C61 -22.35px -24.82px 0 -1.4px,#FA4C61 -23.25px -24.07px 0 -1.47px,#FA4C61 -24.12px -23.29px 0 -1.53px,#FA4C61 -24.97px -22.48px 0 -1.6px,#FA4C61 -25.79px -21.64px 0 -1.67px,#FA4C61 -26.58px -20.77px 0 -1.73px,#FA4C61 -27.34px -19.87px 0 -1.8px,#FA4C61 -28.08px -18.94px 0 -1.87px,#FA4C61 -28.78px -17.98px 0 -1.93px,#FA4C61 -29.44px -17px 0 -2px,#FA4C61 -30.08px -15.99px 0 -2.07px,#FA4C61 -30.68px -14.96px 0 -2.13px,#FA4C61 -31.24px -13.91px 0 -2.2px,#FA4C61 -31.77px -12.84px 0 -2.27px,#FA4C61 -32.26px -11.74px 0 -2.33px,#FA4C61 -32.72px -10.63px 0 -2.4px,#FA4C61 -33.13px -9.5px 0 -2.47px,#FA4C61 -33.51px -8.35px 0 -2.53px,#FA4C61 -33.84px -7.19px 0 -2.6px,#FA4C61 -34.14px -6.02px 0 -2.67px,#FA4C61 -34.4px -4.83px 0 -2.73px,#FA4C61 -34.61px -3.64px 0 -2.8px,#FA4C61 -34.78px -2.43px 0 -2.87px,#FA4C61 -34.91px -1.22px 0 -2.93px,#FA4C61 -35px 0 0 -3px,#FA4C61 -35.05px 1.22px 0 -3.07px,#FA4C61 -35.05px 2.45px 0 -3.13px,#FA4C61 -35.01px 3.68px 0 -3.2px,#FA4C61 -34.92px 4.91px 0 -3.27px,#FA4C61 -34.8px 6.14px 0 -3.33px,#FA4C61 -34.63px 7.36px 0 -3.4px,#FA4C61 -34.41px 8.58px 0 -3.47px,#FA4C61 -34.16px 9.79px 0 -3.53px,#FA4C61 -33.86px 11px 0 -3.6px,#FA4C61 -33.52px 12.2px 0 -3.67px,#FA4C61 -33.13px 13.39px 0 -3.73px,#FA4C61 -32.7px 14.56px 0 -3.8px,#FA4C61 -32.24px 15.72px 0 -3.87px,#FA4C61 -31.73px 16.87px 0 -3.93px,#FA4C61 -31.18px 18px 0 -4px,#FA4C61 -30.59px 19.11px 0 -4.07px,#FA4C61 -29.96px 20.21px 0 -4.13px,#FA4C61 -29.29px 21.28px 0 -4.2px,#FA4C61 -28.58px 22.33px 0 -4.27px,#FA4C61 -27.83px 23.35px 0 -4.33px,#FA4C61 -27.05px 24.36px 0 -4.4px,#FA4C61 -26.23px 25.33px 0 -4.47px,#FA4C61 -25.38px 26.28px 0 -4.53px,#FA4C61 -24.49px 27.2px 0 -4.6px,#FA4C61 -23.57px 28.09px 0 -4.67px,#FA4C61 -22.62px 28.95px 0 -4.73px,#FA4C61 -21.63px 29.77px 0 -4.8px,#FA4C61 -20.62px 30.56px 0 -4.87px,#FA4C61 -19.57px 31.32px 0 -4.93px,#FA4C61 -18.5px 32.04px 0 -5px,#FA4C61 -17.4px 32.73px 0 -5.07px,#FA4C61 -16.28px 33.38px 0 -5.13px,#FA4C61 -15.13px 33.98px 0 -5.2px,#FA4C61 -13.96px 34.55px 0 -5.27px,#FA4C61 -12.77px 35.08px 0 -5.33px,#FA4C61 -11.56px 35.57px 0 -5.4px,#FA4C61 -10.33px 36.02px 0 -5.47px,#FA4C61 -9.08px 36.42px 0 -5.53px,#FA4C61 -7.82px 36.78px 0 -5.6px,#FA4C61 -6.54px 37.09px 0 -5.67px,#FA4C61 -5.25px 37.37px 0 -5.73px,#FA4C61 -3.95px 37.59px 0 -5.8px,#FA4C61 -2.64px 37.77px 0 -5.87px,#FA4C61 -1.32px 37.91px 0 -5.93px;-webkit-box-shadow:#FA4C61 0 26px 0 6px,#FA4C61 .91px 26.05px 0 5.93px,#FA4C61 1.82px 26.07px 0 5.87px,#FA4C61 2.74px 26.06px 0 5.8px,#FA4C61 3.66px 26.01px 0 5.73px,#FA4C61 4.57px 25.93px 0 5.67px,#FA4C61 5.49px 25.82px 0 5.6px,#FA4C61 6.4px 25.68px 0 5.53px,#FA4C61 7.31px 25.51px 0 5.47px,#FA4C61 8.22px 25.3px 0 5.4px,#FA4C61 9.12px 25.06px 0 5.33px,#FA4C61 10.01px 24.79px 0 5.27px,#FA4C61 10.9px 24.48px 0 5.2px,#FA4C61 11.78px 24.15px 0 5.13px,#FA4C61 12.64px 23.78px 0 5.07px,#FA4C61 13.5px 23.38px 0 5px,#FA4C61 14.34px 22.95px 0 4.93px,#FA4C61 15.17px 22.49px 0 4.87px,#FA4C61 15.99px 22.01px 0 4.8px,#FA4C61 16.79px 21.49px 0 4.73px,#FA4C61 17.57px 20.94px 0 4.67px,#FA4C61 18.33px 20.36px 0 4.6px,#FA4C61 19.08px 19.76px 0 4.53px,#FA4C61 19.81px 19.13px 0 4.47px,#FA4C61 20.51px 18.47px 0 4.4px,#FA4C61 21.19px 17.78px 0 4.33px,#FA4C61 21.85px 17.07px 0 4.27px,#FA4C61 22.49px 16.34px 0 4.2px,#FA4C61 23.1px 15.58px 0 4.13px,#FA4C61 23.69px 14.8px 0 4.07px,#FA4C61 24.25px 14px 0 4px,#FA4C61 24.78px 13.18px 0 3.93px,#FA4C61 25.29px 12.33px 0 3.87px,#FA4C61 25.76px 11.47px 0 3.8px,#FA4C61 26.21px 10.59px 0 3.73px,#FA4C61 26.62px 9.69px 0 3.67px,#FA4C61 27.01px 8.78px 0 3.6px,#FA4C61 27.36px 7.85px 0 3.53px,#FA4C61 27.69px 6.9px 0 3.47px,#FA4C61 27.98px 5.95px 0 3.4px,#FA4C61 28.23px 4.98px 0 3.33px,#FA4C61 28.45px 4px 0 3.27px,#FA4C61 28.64px 3.01px 0 3.2px,#FA4C61 28.8px 2.01px 0 3.13px,#FA4C61 28.92px 1.01px 0 3.07px,#FA4C61 29px 0 0 3px,#FA4C61 29.05px -1.01px 0 2.93px,#FA4C61 29.06px -2.03px 0 2.87px,#FA4C61 29.04px -3.05px 0 2.8px,#FA4C61 28.98px -4.07px 0 2.73px,#FA4C61 28.89px -5.09px 0 2.67px,#FA4C61 28.76px -6.11px 0 2.6px,#FA4C61 28.59px -7.13px 0 2.53px,#FA4C61 28.39px -8.14px 0 2.47px,#FA4C61 28.15px -9.15px 0 2.4px,#FA4C61 27.88px -10.15px 0 2.33px,#FA4C61 27.57px -11.14px 0 2.27px,#FA4C61 27.22px -12.12px 0 2.2px,#FA4C61 26.84px -13.09px 0 2.13px,#FA4C61 26.43px -14.05px 0 2.07px,#FA4C61 25.98px -15px 0 2px,#FA4C61 25.5px -15.93px 0 1.93px,#FA4C61 24.98px -16.85px 0 1.87px,#FA4C61 24.43px -17.75px 0 1.8px,#FA4C61 23.85px -18.63px 0 1.73px,#FA4C61 23.24px -19.5px 0 1.67px,#FA4C61 22.59px -20.34px 0 1.6px,#FA4C61 21.92px -21.16px 0 1.53px,#FA4C61 21.21px -21.96px 0 1.47px,#FA4C61 20.48px -22.74px 0 1.4px,#FA4C61 19.71px -23.49px 0 1.33px,#FA4C61 18.92px -24.22px 0 1.27px,#FA4C61 18.1px -24.92px 0 1.2px,#FA4C61 17.26px -25.59px 0 1.13px,#FA4C61 16.39px -26.23px 0 1.07px,#FA4C61 15.5px -26.85px 0 1px,#FA4C61 14.58px -27.43px 0 .93px,#FA4C61 13.65px -27.98px 0 .87px,#FA4C61 12.69px -28.5px 0 .8px,#FA4C61 11.71px -28.99px 0 .73px,#FA4C61 10.72px -29.44px 0 .67px,#FA4C61 9.7px -29.86px 0 .6px,#FA4C61 8.67px -30.25px 0 .53px,#FA4C61 7.63px -30.6px 0 .47px,#FA4C61 6.57px -30.91px 0 .4px,#FA4C61 5.5px -31.19px 0 .33px,#FA4C61 4.42px -31.42px 0 .27px,#FA4C61 3.32px -31.63px 0 .2px,#FA4C61 2.22px -31.79px 0 .13px,#FA4C61 1.11px -31.91px 0 .07px,#FA4C61 0 -32px 0 0,#FA4C61 -1.12px -32.05px 0 -.07px,#FA4C61 -2.24px -32.06px 0 -.13px,#FA4C61 -3.37px -32.02px 0 -.2px,#FA4C61 -4.49px -31.95px 0 -.27px,#FA4C61 -5.61px -31.84px 0 -.33px,#FA4C61 -6.74px -31.69px 0 -.4px,#FA4C61 -7.85px -31.5px 0 -.47px,#FA4C61 -8.97px -31.27px 0 -.53px,#FA4C61 -10.07px -31px 0 -.6px,#FA4C61 -11.17px -30.7px 0 -.67px,#FA4C61 -12.26px -30.35px 0 -.73px,#FA4C61 -13.34px -29.96px 0 -.8px,#FA4C61 -14.41px -29.54px 0 -.87px,#FA4C61 -15.46px -29.08px 0 -.93px,#FA4C61 -16.5px -28.58px 0 -1px,#FA4C61 -17.52px -28.04px 0 -1.07px,#FA4C61 -18.53px -27.47px 0 -1.13px,#FA4C61 -19.51px -26.86px 0 -1.2px,#FA4C61 -20.48px -26.21px 0 -1.27px,#FA4C61 -21.43px -25.53px 0 -1.33px,#FA4C61 -22.35px -24.82px 0 -1.4px,#FA4C61 -23.25px -24.07px 0 -1.47px,#FA4C61 -24.12px -23.29px 0 -1.53px,#FA4C61 -24.97px -22.48px 0 -1.6px,#FA4C61 -25.79px -21.64px 0 -1.67px,#FA4C61 -26.58px -20.77px 0 -1.73px,#FA4C61 -27.34px -19.87px 0 -1.8px,#FA4C61 -28.08px -18.94px 0 -1.87px,#FA4C61 -28.78px -17.98px 0 -1.93px,#FA4C61 -29.44px -17px 0 -2px,#FA4C61 -30.08px -15.99px 0 -2.07px,#FA4C61 -30.68px -14.96px 0 -2.13px,#FA4C61 -31.24px -13.91px 0 -2.2px,#FA4C61 -31.77px -12.84px 0 -2.27px,#FA4C61 -32.26px -11.74px 0 -2.33px,#FA4C61 -32.72px -10.63px 0 -2.4px,#FA4C61 -33.13px -9.5px 0 -2.47px,#FA4C61 -33.51px -8.35px 0 -2.53px,#FA4C61 -33.84px -7.19px 0 -2.6px,#FA4C61 -34.14px -6.02px 0 -2.67px,#FA4C61 -34.4px -4.83px 0 -2.73px,#FA4C61 -34.61px -3.64px 0 -2.8px,#FA4C61 -34.78px -2.43px 0 -2.87px,#FA4C61 -34.91px -1.22px 0 -2.93px,#FA4C61 -35px 0 0 -3px,#FA4C61 -35.05px 1.22px 0 -3.07px,#FA4C61 -35.05px 2.45px 0 -3.13px,#FA4C61 -35.01px 3.68px 0 -3.2px,#FA4C61 -34.92px 4.91px 0 -3.27px,#FA4C61 -34.8px 6.14px 0 -3.33px,#FA4C61 -34.63px 7.36px 0 -3.4px,#FA4C61 -34.41px 8.58px 0 -3.47px,#FA4C61 -34.16px 9.79px 0 -3.53px,#FA4C61 -33.86px 11px 0 -3.6px,#FA4C61 -33.52px 12.2px 0 -3.67px,#FA4C61 -33.13px 13.39px 0 -3.73px,#FA4C61 -32.7px 14.56px 0 -3.8px,#FA4C61 -32.24px 15.72px 0 -3.87px,#FA4C61 -31.73px 16.87px 0 -3.93px,#FA4C61 -31.18px 18px 0 -4px,#FA4C61 -30.59px 19.11px 0 -4.07px,#FA4C61 -29.96px 20.21px 0 -4.13px,#FA4C61 -29.29px 21.28px 0 -4.2px,#FA4C61 -28.58px 22.33px 0 -4.27px,#FA4C61 -27.83px 23.35px 0 -4.33px,#FA4C61 -27.05px 24.36px 0 -4.4px,#FA4C61 -26.23px 25.33px 0 -4.47px,#FA4C61 -25.38px 26.28px 0 -4.53px,#FA4C61 -24.49px 27.2px 0 -4.6px,#FA4C61 -23.57px 28.09px 0 -4.67px,#FA4C61 -22.62px 28.95px 0 -4.73px,#FA4C61 -21.63px 29.77px 0 -4.8px,#FA4C61 -20.62px 30.56px 0 -4.87px,#FA4C61 -19.57px 31.32px 0 -4.93px,#FA4C61 -18.5px 32.04px 0 -5px,#FA4C61 -17.4px 32.73px 0 -5.07px,#FA4C61 -16.28px 33.38px 0 -5.13px,#FA4C61 -15.13px 33.98px 0 -5.2px,#FA4C61 -13.96px 34.55px 0 -5.27px,#FA4C61 -12.77px 35.08px 0 -5.33px,#FA4C61 -11.56px 35.57px 0 -5.4px,#FA4C61 -10.33px 36.02px 0 -5.47px,#FA4C61 -9.08px 36.42px 0 -5.53px,#FA4C61 -7.82px 36.78px 0 -5.6px,#FA4C61 -6.54px 37.09px 0 -5.67px,#FA4C61 -5.25px 37.37px 0 -5.73px,#FA4C61 -3.95px 37.59px 0 -5.8px,#FA4C61 -2.64px 37.77px 0 -5.87px,#FA4C61 -1.32px 37.91px 0 -5.93px;box-shadow:#FA4C61 0 26px 0 6px,#FA4C61 .91px 26.05px 0 5.93px,#FA4C61 1.82px 26.07px 0 5.87px,#FA4C61 2.74px 26.06px 0 5.8px,#FA4C61 3.66px 26.01px 0 5.73px,#FA4C61 4.57px 25.93px 0 5.67px,#FA4C61 5.49px 25.82px 0 5.6px,#FA4C61 6.4px 25.68px 0 5.53px,#FA4C61 7.31px 25.51px 0 5.47px,#FA4C61 8.22px 25.3px 0 5.4px,#FA4C61 9.12px 25.06px 0 5.33px,#FA4C61 10.01px 24.79px 0 5.27px,#FA4C61 10.9px 24.48px 0 5.2px,#FA4C61 11.78px 24.15px 0 5.13px,#FA4C61 12.64px 23.78px 0 5.07px,#FA4C61 13.5px 23.38px 0 5px,#FA4C61 14.34px 22.95px 0 4.93px,#FA4C61 15.17px 22.49px 0 4.87px,#FA4C61 15.99px 22.01px 0 4.8px,#FA4C61 16.79px 21.49px 0 4.73px,#FA4C61 17.57px 20.94px 0 4.67px,#FA4C61 18.33px 20.36px 0 4.6px,#FA4C61 19.08px 19.76px 0 4.53px,#FA4C61 19.81px 19.13px 0 4.47px,#FA4C61 20.51px 18.47px 0 4.4px,#FA4C61 21.19px 17.78px 0 4.33px,#FA4C61 21.85px 17.07px 0 4.27px,#FA4C61 22.49px 16.34px 0 4.2px,#FA4C61 23.1px 15.58px 0 4.13px,#FA4C61 23.69px 14.8px 0 4.07px,#FA4C61 24.25px 14px 0 4px,#FA4C61 24.78px 13.18px 0 3.93px,#FA4C61 25.29px 12.33px 0 3.87px,#FA4C61 25.76px 11.47px 0 3.8px,#FA4C61 26.21px 10.59px 0 3.73px,#FA4C61 26.62px 9.69px 0 3.67px,#FA4C61 27.01px 8.78px 0 3.6px,#FA4C61 27.36px 7.85px 0 3.53px,#FA4C61 27.69px 6.9px 0 3.47px,#FA4C61 27.98px 5.95px 0 3.4px,#FA4C61 28.23px 4.98px 0 3.33px,#FA4C61 28.45px 4px 0 3.27px,#FA4C61 28.64px 3.01px 0 3.2px,#FA4C61 28.8px 2.01px 0 3.13px,#FA4C61 28.92px 1.01px 0 3.07px,#FA4C61 29px 0 0 3px,#FA4C61 29.05px -1.01px 0 2.93px,#FA4C61 29.06px -2.03px 0 2.87px,#FA4C61 29.04px -3.05px 0 2.8px,#FA4C61 28.98px -4.07px 0 2.73px,#FA4C61 28.89px -5.09px 0 2.67px,#FA4C61 28.76px -6.11px 0 2.6px,#FA4C61 28.59px -7.13px 0 2.53px,#FA4C61 28.39px -8.14px 0 2.47px,#FA4C61 28.15px -9.15px 0 2.4px,#FA4C61 27.88px -10.15px 0 2.33px,#FA4C61 27.57px -11.14px 0 2.27px,#FA4C61 27.22px -12.12px 0 2.2px,#FA4C61 26.84px -13.09px 0 2.13px,#FA4C61 26.43px -14.05px 0 2.07px,#FA4C61 25.98px -15px 0 2px,#FA4C61 25.5px -15.93px 0 1.93px,#FA4C61 24.98px -16.85px 0 1.87px,#FA4C61 24.43px -17.75px 0 1.8px,#FA4C61 23.85px -18.63px 0 1.73px,#FA4C61 23.24px -19.5px 0 1.67px,#FA4C61 22.59px -20.34px 0 1.6px,#FA4C61 21.92px -21.16px 0 1.53px,#FA4C61 21.21px -21.96px 0 1.47px,#FA4C61 20.48px -22.74px 0 1.4px,#FA4C61 19.71px -23.49px 0 1.33px,#FA4C61 18.92px -24.22px 0 1.27px,#FA4C61 18.1px -24.92px 0 1.2px,#FA4C61 17.26px -25.59px 0 1.13px,#FA4C61 16.39px -26.23px 0 1.07px,#FA4C61 15.5px -26.85px 0 1px,#FA4C61 14.58px -27.43px 0 .93px,#FA4C61 13.65px -27.98px 0 .87px,#FA4C61 12.69px -28.5px 0 .8px,#FA4C61 11.71px -28.99px 0 .73px,#FA4C61 10.72px -29.44px 0 .67px,#FA4C61 9.7px -29.86px 0 .6px,#FA4C61 8.67px -30.25px 0 .53px,#FA4C61 7.63px -30.6px 0 .47px,#FA4C61 6.57px -30.91px 0 .4px,#FA4C61 5.5px -31.19px 0 .33px,#FA4C61 4.42px -31.42px 0 .27px,#FA4C61 3.32px -31.63px 0 .2px,#FA4C61 2.22px -31.79px 0 .13px,#FA4C61 1.11px -31.91px 0 .07px,#FA4C61 0 -32px 0 0,#FA4C61 -1.12px -32.05px 0 -.07px,#FA4C61 -2.24px -32.06px 0 -.13px,#FA4C61 -3.37px -32.02px 0 -.2px,#FA4C61 -4.49px -31.95px 0 -.27px,#FA4C61 -5.61px -31.84px 0 -.33px,#FA4C61 -6.74px -31.69px 0 -.4px,#FA4C61 -7.85px -31.5px 0 -.47px,#FA4C61 -8.97px -31.27px 0 -.53px,#FA4C61 -10.07px -31px 0 -.6px,#FA4C61 -11.17px -30.7px 0 -.67px,#FA4C61 -12.26px -30.35px 0 -.73px,#FA4C61 -13.34px -29.96px 0 -.8px,#FA4C61 -14.41px -29.54px 0 -.87px,#FA4C61 -15.46px -29.08px 0 -.93px,#FA4C61 -16.5px -28.58px 0 -1px,#FA4C61 -17.52px -28.04px 0 -1.07px,#FA4C61 -18.53px -27.47px 0 -1.13px,#FA4C61 -19.51px -26.86px 0 -1.2px,#FA4C61 -20.48px -26.21px 0 -1.27px,#FA4C61 -21.43px -25.53px 0 -1.33px,#FA4C61 -22.35px -24.82px 0 -1.4px,#FA4C61 -23.25px -24.07px 0 -1.47px,#FA4C61 -24.12px -23.29px 0 -1.53px,#FA4C61 -24.97px -22.48px 0 -1.6px,#FA4C61 -25.79px -21.64px 0 -1.67px,#FA4C61 -26.58px -20.77px 0 -1.73px,#FA4C61 -27.34px -19.87px 0 -1.8px,#FA4C61 -28.08px -18.94px 0 -1.87px,#FA4C61 -28.78px -17.98px 0 -1.93px,#FA4C61 -29.44px -17px 0 -2px,#FA4C61 -30.08px -15.99px 0 -2.07px,#FA4C61 -30.68px -14.96px 0 -2.13px,#FA4C61 -31.24px -13.91px 0 -2.2px,#FA4C61 -31.77px -12.84px 0 -2.27px,#FA4C61 -32.26px -11.74px 0 -2.33px,#FA4C61 -32.72px -10.63px 0 -2.4px,#FA4C61 -33.13px -9.5px 0 -2.47px,#FA4C61 -33.51px -8.35px 0 -2.53px,#FA4C61 -33.84px -7.19px 0 -2.6px,#FA4C61 -34.14px -6.02px 0 -2.67px,#FA4C61 -34.4px -4.83px 0 -2.73px,#FA4C61 -34.61px -3.64px 0 -2.8px,#FA4C61 -34.78px -2.43px 0 -2.87px,#FA4C61 -34.91px -1.22px 0 -2.93px,#FA4C61 -35px 0 0 -3px,#FA4C61 -35.05px 1.22px 0 -3.07px,#FA4C61 -35.05px 2.45px 0 -3.13px,#FA4C61 -35.01px 3.68px 0 -3.2px,#FA4C61 -34.92px 4.91px 0 -3.27px,#FA4C61 -34.8px 6.14px 0 -3.33px,#FA4C61 -34.63px 7.36px 0 -3.4px,#FA4C61 -34.41px 8.58px 0 -3.47px,#FA4C61 -34.16px 9.79px 0 -3.53px,#FA4C61 -33.86px 11px 0 -3.6px,#FA4C61 -33.52px 12.2px 0 -3.67px,#FA4C61 -33.13px 13.39px 0 -3.73px,#FA4C61 -32.7px 14.56px 0 -3.8px,#FA4C61 -32.24px 15.72px 0 -3.87px,#FA4C61 -31.73px 16.87px 0 -3.93px,#FA4C61 -31.18px 18px 0 -4px,#FA4C61 -30.59px 19.11px 0 -4.07px,#FA4C61 -29.96px 20.21px 0 -4.13px,#FA4C61 -29.29px 21.28px 0 -4.2px,#FA4C61 -28.58px 22.33px 0 -4.27px,#FA4C61 -27.83px 23.35px 0 -4.33px,#FA4C61 -27.05px 24.36px 0 -4.4px,#FA4C61 -26.23px 25.33px 0 -4.47px,#FA4C61 -25.38px 26.28px 0 -4.53px,#FA4C61 -24.49px 27.2px 0 -4.6px,#FA4C61 -23.57px 28.09px 0 -4.67px,#FA4C61 -22.62px 28.95px 0 -4.73px,#FA4C61 -21.63px 29.77px 0 -4.8px,#FA4C61 -20.62px 30.56px 0 -4.87px,#FA4C61 -19.57px 31.32px 0 -4.93px,#FA4C61 -18.5px 32.04px 0 -5px,#FA4C61 -17.4px 32.73px 0 -5.07px,#FA4C61 -16.28px 33.38px 0 -5.13px,#FA4C61 -15.13px 33.98px 0 -5.2px,#FA4C61 -13.96px 34.55px 0 -5.27px,#FA4C61 -12.77px 35.08px 0 -5.33px,#FA4C61 -11.56px 35.57px 0 -5.4px,#FA4C61 -10.33px 36.02px 0 -5.47px,#FA4C61 -9.08px 36.42px 0 -5.53px,#FA4C61 -7.82px 36.78px 0 -5.6px,#FA4C61 -6.54px 37.09px 0 -5.67px,#FA4C61 -5.25px 37.37px 0 -5.73px,#FA4C61 -3.95px 37.59px 0 -5.8px,#FA4C61 -2.64px 37.77px 0 -5.87px,#FA4C61 -1.32px 37.91px 0 -5.93px;-moz-animation:whirly-loader 1.25s infinite linear;-webkit-animation:whirly-loader 1.25s infinite linear;animation:whirly-loader 1.25s infinite linear;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.inactive-link{cursor:default}.ui-grid-vcenter div{position:relative;top:50%;vertical-align:middle;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);white-space:nowrap;text-overflow:ellipsis;overflow:hidden!important}.demo{background-image:url(../../assets/images/demo.png)}.float-right{float:right}.float-left{float:left}.checker{width:19px;height:19px}.collapse.am-collapse{animation-duration:.3s;animation-timing-function:ease;animation-fill-mode:backwards;overflow:hidden}.message-info{float:right;color:#d3d3d3;margin-right:5px}[ui-view].ng-enter{-webkit-animation:fadeInUpm .5s;animation:fadeInUpm .5s}.steps,.steps-indicator{padding-bottom:20px!important}.ui-sortable,.ui-sortable-handle{cursor:move}.step .btn:not(.ui-select-toggle,.remove-condition){margin-bottom:10px}.mbottom20{margin-bottom:20px}.pbottom20{padding-bottom:20px}.break-overflow{overflow-wrap:break-word}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.alert{padding:15px!important;margin-bottom:20px!important;border:1px solid transparent!important;border-radius:4px!important}.alert h4{margin-top:0!important;color:inherit!important}.alert .alert-link{font-weight:700!important}.alert>p,.alert>ul{margin-bottom:0!important}.alert>p+p{margin-top:5px!important}.alert-dismissable,.alert-dismissible{padding-right:35px!important}.alert-dismissable .close,.alert-dismissible .close{position:relative!important;top:-2px!important;right:-21px!important;color:inherit!important}.alert-success{background-color:#dff0d8!important;border-color:#d6e9c6!important;color:#3c763d!important}.alert-success hr{border-top-color:#c9e2b3!important}.alert-success .alert-link{color:#2b542c!important}.alert-info{background-color:#d9edf7!important;border-color:#bce8f1!important;color:#31708f!important}.alert-info hr{border-top-color:#a6e1ec!important}.alert-info .alert-link{color:#245269!important}.alert-warning{background-color:#fcf8e3!important;border-color:#faebcc!important;color:#8a6d3b!important}.alert-warning hr{border-top-color:#f7e1b5!important}.alert-warning .alert-link{color:#66512c!important}.alert-danger{background-color:#f2dede!important;border-color:#ebccd1!important;color:#a94442!important}.alert-danger hr{border-top-color:#e4b9c0!important}.alert-danger .alert-link{color:#843534!important}.alert .close{text-indent:inherit!important;background-image:none!important;width:auto!important}.page-404 .number{position:relative;top:35px;display:inline-block;letter-spacing:-10px;margin-top:0;margin-bottom:10px;line-height:128px;font-size:128px;font-weight:300;color:#7bbbd6;text-align:right}.page-404 .details{margin-left:40px;display:inline-block;padding-top:0;text-align:left}.sounds-title-icon{font-size:17px}.ui-select-multiple input.ui-select-search{width:100%!important}.modal.fade,.over-topbar{z-index:9996!important}.list-group-item-custom{border:none}.pointer-cursor{cursor:pointer!important}.select-group-father{font-weight:700!important}.select-group-son{font-style:italic!important}@media (max-height:908px){.modal-body-scroll{max-height:325px;overflow-y:scroll}}.widget .dashboard-stat{margin-bottom:0!important}.widget .panel-body{padding:0}.left-margin{margin-left:20px}.contact-portlet{overflow-x:hidden;overflow-y:auto;height:337px}.contact-tab{background:#F1F3FA;padding-top:20px}.contact-tab-container{padding-left:20px;padding-right:20px}.col-fixed,.tree-row{float:left}.col-fixed{width:277px;margin-right:15px}.tree-row{width:calc(100% - 277px + 15px)}.tree-search{float:left;display:inline-block;line-height:18px;font-weight:300;padding:10px 0}.report-field-handle{width:66px;height:66px;background-image:url(../../assets/images/move.png);background-repeat:no-repeat;background-size:66px 66px}.ui-sortable-helper{display:table}.report-field-remove{width:66px;height:66px;text-align:center}.portlet.light .portlet-title{padding:0;min-height:48px}.portlet .portlet-title{border-bottom:1px solid #eee;padding:0;margin-bottom:10px;min-height:41px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.ui-select-match-text{width:100%;overflow:hidden;text-overflow:ellipsis;padding-right:20px}.ui-select-choices-row-inner div{width:100%;overflow:hidden;text-overflow:ellipsis}.ui-select-toggle>.btn.btn-link{margin-right:10px;top:6px;position:absolute;right:10px}.extract-grid{min-height:600px}body>[uib-modal-window]:not([modal-render]){display:none}.watermark{position:absolute;top:50%;transform:translateY(-50%);opacity:.7;width:100%;text-align:center;z-index:1000;font-size:25px}.centered-uigrid-td{text-align:center;margin:4px}.condition{margin-top:8px;margin-bottom:8px}.ms-container .ms-list{height:430px!important}.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{padding:7px 12px!important}.ms-container{width:100%!important}.ms-optgroup-label{text-align:center;font-weight:700;background-color:#F0F0F0}.pause-select{width:20px;color:#A29999;border:none}@keyframes blink{0%{border-color:transparent}25%{border-color:#EACD9E}50%{border-color:#ECC077}75%{border-color:#ECB861}100%{border-color:#FFB848}}.paused-agent{border:2px solid transparent;animation:blink .5s step-end infinite alternate}.otherfields-col{min-height:400px!important;max-width:100%}.profile-content{min-height:800px}.page-header.navbar{background-color:#2b3643}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle>i{color:#79869a}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle .badge.badge-default{background-color:#EA4C61;color:#fff}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle:hover,.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle{background-color:#3f4f62}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle:hover>i,.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle>i{color:#a4aebb}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu{border-color:#e7eaf0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu:after{border-bottom-color:#eaedf2}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external{background:#eaedf2}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>h3{color:#62878f}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>a{color:#5b9bd1}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>a:hover{color:#3175af;text-decoration:underline}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a{border-bottom:1px solid #EFF2F6!important;color:#888}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a:hover{background:#f8f9fa}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li>a .time{background:#f1f1f1}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li>a:hover .time{background:#e4e4e4}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-toggle>.circle{background-color:#EA4C61;color:#fff}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-toggle>.corner{border-color:transparent transparent transparent #EA4C61}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu .dropdown-menu-list .subject .from{color:#5b9bd1}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle>.langname,.page-header.navbar .top-menu .navbar-nav>li.dropdown-user>.dropdown-toggle>.username,.page-header.navbar .top-menu .navbar-nav>li.dropdown-user>.dropdown-toggle>i{color:#c6cfda}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list .progress{background-color:#dfe2e9}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user>.dropdown-menu{width:195px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu{background:#3f4f62;border:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu:after{border-bottom-color:#3f4f62}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu>li.external{background:#2f3b49}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu>li.external>h3{color:#adbaca}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu>li.external>a:hover{color:#87b6dd}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu .dropdown-menu-list>li a,.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a{color:#bcc7d4;border-bottom:1px solid #4b5e75!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu .dropdown-menu-list>li a>i,.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a>i{color:#9dadc0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu .dropdown-menu-list>li a:hover,.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a:hover{background:#47596e}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a{border-bottom:0!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li.divider{background:#4b5e75}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification.dropdown-dark .dropdown-menu .dropdown-menu-list>li>a .time{background:#354353}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification.dropdown-dark .dropdown-menu .dropdown-menu-list>li>a:hover .time{background:#2b3643}.page-header.navbar .search-form{background:#232c37}.page-header.navbar .search-form.open,.page-header.navbar .search-form:hover{background:#3f4f62}.page-header.navbar .search-form .input-group .form-control{color:#959fad}.page-header.navbar .search-form .input-group .form-control::-moz-placeholder{color:#929cab;opacity:1}.page-header.navbar .search-form .input-group .form-control:-ms-input-placeholder{color:#929cab}.page-header.navbar .search-form .input-group .form-control::-webkit-input-placeholder{color:#929cab}.page-header.navbar .search-form .input-group .input-group-btn .btn.submit>i{color:#959fad}.page-header.navbar .menu-toggler{background-image:url(../../assets/images/sidebar_toggler_icon_darkblue.png)}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu{box-shadow:5px 5px rgba(63,79,98,.2)}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>h3,.page-header.navbar .hor-menu .navbar-nav>li>a{color:#c6cfda}.page-header.navbar .hor-menu .navbar-nav>li>a>i{color:#788ea8}.page-header.navbar .hor-menu .navbar-nav>li.open>a,.page-header.navbar .hor-menu .navbar-nav>li>a:hover{color:#d5dce4;background:#3f4f62!important}.page-header.navbar .hor-menu .navbar-nav>li.open>a>i,.page-header.navbar .hor-menu .navbar-nav>li>a:hover>i{color:#889bb2}.page-header.navbar .hor-menu .navbar-nav>li.active>a,.page-header.navbar .hor-menu .navbar-nav>li.current>a{color:#fff;background:#EA4C61!important}.page-header.navbar .hor-menu .navbar-nav>li.active>a>i,.page-header.navbar .hor-menu .navbar-nav>li.current>a>i{color:#788ea8}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu{box-shadow:5px 5px rgba(63,79,98,.2);background:#3f4f62}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a>i{color:#c6cfda}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li:hover>a{color:#f1f3f6;background:#47596e}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li:hover>a>i{color:#f1f3f6}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a:hover,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a:hover{color:#f1f3f6;background:#47596e}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a:hover>i,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a>i,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a:hover>i,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a>i{color:#f1f3f6}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.divider{background-color:#495c72}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-submenu>a:after{color:#c6cfda}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.mega-menu-dropdown>.dropdown-menu{box-shadow:5px 5px rgba(102,102,102,.1)}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>h3{color:#666}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a{color:#c6cfda}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a>i{color:#788ea8}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a:hover{color:#d5dce4;background:#3f4f62}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a:hover>i{color:#889bb2}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.open>a{color:#333!important;background:#fff!important}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.open>a>i{color:#333!important}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a:hover,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a:hover{color:#fff;background:#EA4C61}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a>i{color:#788ea8}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu{box-shadow:5px 5px rgba(102,102,102,.1);background:#fff;border:1px solid #efeff5}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li>a{color:#000}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li>a>i{color:#888}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li:hover>a{color:#000;background:#f2f2f7}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li:hover>a>i{color:#666}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a:hover,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a:hover{color:#000;background:#f2f2f7}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a>i{color:#666}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.divider{background-color:#f2f2f7}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>.dropdown-menu{border-top:0}.page-sidebar,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover{background-color:#364150}.page-sidebar .page-sidebar-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{color:#b4bcc8}.page-sidebar .page-sidebar-menu>li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i{color:#606C7D}.page-sidebar .page-sidebar-menu>li>a>i[class*=icon-],.page-sidebar .page-sidebar-menu>li>a>i[class^=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i[class*=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i[class^=icon-]{color:#6b788b}.page-sidebar .page-sidebar-menu>li>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu>li.heading>h3,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading>h3{color:#708096}.page-sidebar .page-sidebar-menu>li.open>a,.page-sidebar .page-sidebar-menu>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a{background:#2C3542;color:#b4bcc8}.page-sidebar .page-sidebar-menu>li.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li.open>a>.arrow:before,.page-sidebar .page-sidebar-menu>li.open>a>i,.page-sidebar .page-sidebar-menu>li:hover>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li:hover>a>.arrow:before,.page-sidebar .page-sidebar-menu>li:hover>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a>i{color:#606C7D}.page-sidebar .page-sidebar-menu>li.active.open>a,.page-sidebar .page-sidebar-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a{background:#EA4C61;border-top-color:transparent;color:#fff}.page-sidebar .page-sidebar-menu>li.active.open>a:hover,.page-sidebar .page-sidebar-menu>li.active>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a:hover{background:#EA4C61}.page-sidebar .page-sidebar-menu>li.active.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li.active.open>a>.arrow:before,.page-sidebar .page-sidebar-menu>li.active.open>a>i,.page-sidebar .page-sidebar-menu>li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li.active>a>.arrow:before,.page-sidebar .page-sidebar-menu>li.active>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>i{color:#fff}.page-sidebar .page-sidebar-menu>li.active+li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active+li>a{border-top-color:transparent}.page-sidebar .page-sidebar-menu>li.active.open+li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open+li>a{border-top-color:#3d4957}.page-sidebar .page-sidebar-menu>li:last-child>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:last-child>a{border-bottom:1px solid transparent!important}.page-sidebar .page-sidebar-menu li:hover>a>.arrow.open:before,.page-sidebar .page-sidebar-menu li:hover>a>.arrow:before,.page-sidebar .page-sidebar-menu li>a>.arrow.open:before,.page-sidebar .page-sidebar-menu li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li:hover>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li:hover>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li.active>a>.arrow:before{color:#fff}.page-sidebar-closed .page-sidebar .page-sidebar-menu:hover .sub-menu,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu:hover .sub-menu{background-color:#364150}.page-sidebar .page-sidebar-menu .sub-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a{color:#b4bcc8}.page-sidebar .page-sidebar-menu .sub-menu>li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>i{color:#606C7D}.page-sidebar .page-sidebar-menu .sub-menu>li>a>i[class*=icon-],.page-sidebar .page-sidebar-menu .sub-menu>li>a>i[class^=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>i[class*=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>i[class^=icon-]{color:#6b788b}.page-sidebar .page-sidebar-menu .sub-menu>li>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu .sub-menu>li.active>a,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a{background:#3e4b5c!important}.page-sidebar .page-sidebar-menu .sub-menu>li.active>a>i,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a>i,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a>i{color:#959fae}.page-sidebar .page-sidebar-menu .sub-menu>li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li.active>a>.arrow:before,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a>.arrow:before,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li:hover>a{background:#3a4656}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a{background:#3e4b5c;border-left:4px solid #EA4C61;color:#f1f1f1}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover{border-left:4px solid #EA4C61;background:#3a4656}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>i,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a>i{color:#eee}.page-sidebar .sidebar-search .input-group .input-group-btn .btn>i,.page-sidebar-closed .page-sidebar .sidebar-search.open .remove>i,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.open .remove>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .input-group-btn .btn>i{color:#4e5c6f}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu{background:#3a4656}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.active>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li:hover>a{background:#3e4b5c!important}.page-sidebar .sidebar-toggler,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-toggler{background:url(../assets/images/sidebar_inline_toggler_icon_darkblue.jpg)}.page-sidebar .sidebar-search .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group{border-bottom:1px solid #435060}.page-sidebar .sidebar-search .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control{background-color:#364150;color:#4e5c6f}.page-sidebar .sidebar-search .input-group .form-control::-moz-placeholder,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control::-moz-placeholder{color:#4e5c6f;opacity:1}.page-sidebar .sidebar-search .input-group .form-control:-ms-input-placeholder,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control:-ms-input-placeholder{color:#4e5c6f}.page-sidebar .sidebar-search .input-group .form-control::-webkit-input-placeholder,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control::-webkit-input-placeholder{color:#4e5c6f}.page-sidebar .sidebar-search.sidebar-search-bordered .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered .input-group{border:1px solid #435060}.page-sidebar-closed .page-sidebar .sidebar-search.open .input-group,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.open .input-group{background-color:#364150}.page-sidebar-closed .page-sidebar .sidebar-search.sidebar-search-solid .input-group,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid .input-group{background:0 0}.page-sidebar .sidebar-search.sidebar-search-solid .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid .input-group{border:1px solid #2c3541;background:#2c3541}.page-sidebar .sidebar-search.sidebar-search-solid .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid .input-group .form-control{background:#2c3541}.page-sidebar .sidebar-search.sidebar-search-solid.open .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid.open .input-group{border:1px solid #364150;background:#364150}.page-sidebar .sidebar-search.sidebar-search-solid.open .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid.open .input-group .form-control{background:#364150}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active>a,.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover{border-left:0;border-right:4px solid #EA4C61}.page-quick-sidebar-wrapper,.page-quick-sidebar-wrapper .page-quick-sidebar{background:#435468}.page-quick-sidebar-toggler{background:#576d87}.page-quick-sidebar-toggler:hover{background:#51667e}.page-quick-sidebar-toggler>i,.page-quick-sidebar-wrapper{color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a{color:#c9ced7;background:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a:hover{background:#4d6178}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li.open>a{color:#c9ced7;background:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li.active>a{border:0;background:#435468}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu{border:0;background:#576d87;box-shadow:5px 5px rgba(142,160,182,.1)}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:after,.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:before{border-bottom:7px solid #576d87}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a{color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a>i{color:#ccd1d9}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a:hover{background:#5d7591;color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a:hover>i{color:#d4d9e0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li.active>a{background:#59708a;color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li.divider{background-color:#5d7591}.page-quick-sidebar-wrapper .page-quick-sidebar .list-heading{color:#a5afbd}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li{border-bottom-color:#495c72}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li:hover{background:#495c72}.page-quick-sidebar-wrapper .page-quick-sidebar-item .page-quick-sidebar-nav .page-quick-sidebar-back-to-list{color:#c9ced7}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group{border-bottom:1px solid #435060}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group .form-control{background-color:#435468;color:#c9ced7}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-sub{color:#9ca7b7}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-small{color:#919cae}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .datetime,.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .name{color:#bdc4ce}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .message{color:#c9ced7;background:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .message .arrow{border-right-color:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .message .arrow{border-left-color:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li a{color:#b7bfca}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li a .desc{text-decoration:underline}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .desc{color:#b1b9c6}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .date{color:#919cae}.page-footer .page-footer-inner{color:#98a6ba}.page-footer-fixed .page-footer{background-color:#28303b}@media (min-width:992px){.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{box-shadow:5px 5px rgba(44,53,66,.2)}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu.sidebar-search-wrapper,.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu.sidebar-toggler-wrapper{box-shadow:none}.page-sidebar-menu.page-sidebar-menu-closed>li:hover{box-shadow:5px 5px rgba(44,53,66,.2)}.page-sidebar-menu.page-sidebar-menu-closed>li:hover.sidebar-search-wrapper,.page-sidebar-menu.page-sidebar-menu-closed>li:hover.sidebar-toggler-wrapper{box-shadow:none}.page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu{box-shadow:5px 5px rgba(44,53,66,.2)}.page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu.sidebar-search-wrapper,.page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu.sidebar-toggler-wrapper{box-shadow:none}.page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-closed>li.heading{padding:0;margin-top:15px;margin-bottom:15px;border-top:1px solid #3d4957!important}.page-sidebar-fixed:not(.page-footer-fixed) .page-content{border-bottom:0}.page-sidebar-fixed:not(.page-footer-fixed) .page-footer{background-color:#fff}.page-sidebar-fixed:not(.page-footer-fixed) .page-footer .page-footer-inner{color:#333}.page-boxed{background-color:#303a47!important}.page-boxed .page-container{background-color:#364150;border-left:1px solid #3d4957;border-bottom:1px solid #3d4957}.page-boxed.page-sidebar-reversed .page-container{border-left:0;border-right:1px solid #3d4957}.page-boxed.page-sidebar-fixed .page-container{border-left:0;border-bottom:0}.page-boxed.page-sidebar-reversed.page-sidebar-fixed .page-container{border-left:0;border-right:0;border-bottom:0}.page-boxed.page-sidebar-fixed .page-sidebar{border-left:1px solid #3d4957}.page-boxed.page-sidebar-reversed.page-sidebar-fixed .page-sidebar{border-right:1px solid #3d4957;border-left:0}.page-boxed.page-sidebar-fixed.page-footer-fixed .page-footer{background-color:#303a47!important}.page-boxed.page-sidebar-fixed.page-footer-fixed .page-footer .page-footer-inner{color:#98a6ba}.page-sidebar-menu-hover-submenu li:hover a>.arrow{border-right:8px solid #323c4b}.page-sidebar-reversed .page-sidebar-menu-hover-submenu li:hover a>.arrow{border-left:8px solid #323c4b}.page-sidebar-menu-hover-submenu li:hover>.sub-menu{background:#323c4b!important}}.pace .pace-progress-inner,.page-header.navbar,.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .progress .progress-bar{box-shadow:none}@media (max-width:991px){.page-sidebar{background-color:#28303b}.page-sidebar .page-sidebar-menu>li>a{border-top:1px solid #364150}.page-sidebar .page-sidebar-menu>li.open>a,.page-sidebar .page-sidebar-menu>li:hover>a{background:#2e3744}.page-sidebar .page-sidebar-menu>li:last-child>a{border-bottom:0!important}.page-sidebar .page-sidebar-menu .sidebar-search input,.page-sidebar .page-sidebar-menu>li .sub-menu{background-color:#28303b!important}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li:hover>a{background:#2e3744}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu{background:#28303b!important}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.active>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li:hover>a{background:#2e3744!important}}@media (max-width:480px){.page-header.navbar .top-menu{background-color:#364150}.page-header-fixed-mobile .page-header.navbar .top-menu{background-color:#2b3643}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{background-color:#415265}.page-header-fixed-mobile .page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{background:0 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle:hover{background-color:#3f4f62}}body{background-color:#364150}.block-spinner-bar>div,.page-spinner-bar>div{background:#20c5ad}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTQzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTQ7aC6SjiAOpAWOKfJDfVRY.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRdwxCXfZpKo5kWAx_74bHs.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTSGUML8f7tzeB6gGvgki0bE.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTZ6vnaPZw6nYDxM4SVEMFKg.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTfy1_HTwRwgtl1cPga3Fy3Y.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTfgrLsWo7Jk1KvZser0olKY.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTYjoYw3YTyktCCer_ilOlhE.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/TCmDhmS1RRL7aqhqZW19hwLUuEpTyoUstqEm5AMlJo4.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01m4X0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5UYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/ttwNtsRpgsxVmgGGmiUOEoX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAoX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEEYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSgzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSg7aC6SjiAOpAWOKfJDfVRY.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShdwxCXfZpKo5kWAx_74bHs.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSiGUML8f7tzeB6gGvgki0bE.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSp6vnaPZw6nYDxM4SVEMFKg.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSvy1_HTwRwgtl1cPga3Fy3Y.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSvgrLsWo7Jk1KvZser0olKY.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSojoYw3YTyktCCer_ilOlhE.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShampu5_7CjHW5spxoeN3Vs.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzAzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzA7aC6SjiAOpAWOKfJDfVRY.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBdwxCXfZpKo5kWAx_74bHs.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzCGUML8f7tzeB6gGvgki0bE.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzJ6vnaPZw6nYDxM4SVEMFKg.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzPy1_HTwRwgtl1cPga3Fy3Y.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzPgrLsWo7Jk1KvZser0olKY.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzIjoYw3YTyktCCer_ilOlhE.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBampu5_7CjHW5spxoeN3Vs.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@media print{body{background-color:#fff!important}.hidden-print,.page-bar,.page-footer,.page-quick-sidebar-wrapper,.page-sidebar-wrapper,.theme-panel{display:none}.no-page-break{page-break-after:avoid}.page-container{margin:0!important;padding:0!important}.page-content{min-height:300px!important;padding:0 20px 20px!important;margin:0!important}}.page-header.navbar{width:100%;margin:0;border:0;padding:0;height:46px;min-height:46px;filter:none;background-image:none}.page-header.navbar.navbar-fixed-top,.page-header.navbar.navbar-static-top{z-index:9995}.page-header.navbar .page-logo{float:left;display:block;width:235px;height:46px;padding-left:20px;padding-right:20px}.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .page-logo{padding:0}.page-header.navbar .page-logo>.logo-image,.page-header.navbar .page-logo>a{display:inline-block;float:left}.page-header.navbar .page-logo .logo-default{margin:16px 0 0}.page-header.navbar .page-logo .logo-mini{display:none;margin-left:5px}.page-header.navbar .page-logo .text-logo{padding-left:20px;padding-top:12px}.page-header.navbar .search-form{display:inline-block;width:46px;position:relative;float:left;transition:all .6s}.page-header.navbar .search-form .input-group .form-control{height:46px;border:0;background:0 0!important;font-size:13px;padding-left:0;margin-left:12px;text-indent:-150000px}.page-header.navbar .search-form .input-group .form-control:hover{cursor:pointer}.page-header.navbar .search-form .input-group .input-group-btn{height:46px}.page-header.navbar .search-form .input-group .input-group-btn .btn.submit{margin-left:-24px;padding:0;width:46px;background:0 0;margin-top:4px;display:block}.page-header.navbar .search-form .input-group .input-group-btn .btn.submit>i{font-size:15px}.page-header.navbar .search-form.open{transition:all .6s;width:300px!important}.page-header.navbar .search-form.open .input-group .form-control{text-indent:0}.page-header.navbar .search-form.open .input-group .form-control:hover{cursor:text}.page-header.navbar .search-form.open .input-group .input-group-btn .btn.submit{margin-left:0}.page-header.navbar .menu-toggler{display:block;cursor:pointer;opacity:.7;filter:alpha(opacity=70);width:24px;height:24px;background-repeat:no-repeat;background-position:center center}.page-header.navbar .menu-toggler:hover,.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a:hover{opacity:1;filter:alpha(opacity=100)}.page-header.navbar .menu-toggler.sidebar-toggler{float:right;margin:11px 0 0}.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .menu-toggler.sidebar-toggler{margin-right:10.5px}.page-header.navbar .menu-toggler.responsive-toggler{display:none;float:right;margin:11px 6px 0}.page-header.navbar .top-menu{margin:0;padding:0;float:right}.page-header.navbar .top-menu .navbar-nav{padding:0;margin-right:20px;display:block}.page-header.navbar .top-menu .navbar-nav>li.dropdown{margin:0;padding:0 4px;height:46px;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown:last-child{padding-right:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle{margin:0;padding:17px 10px 9px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle:last-child{padding-right:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle>i{font-size:17px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle>i.glyphicon{font-size:16px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle>.badge{font-family:"Open Sans",sans-serif;position:absolute;top:10px;right:20px;font-weight:300px;padding:3px 6px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle:focus{background:0 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu{margin-top:3px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu:before{position:absolute;top:-7px;right:9px;display:inline-block!important;border-right:7px solid transparent;border-bottom:7px solid #eee;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu:after{position:absolute;top:-6px;right:10px;display:inline-block!important;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu>li>a{color:#555}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu{min-width:160px;max-width:275px;width:275px;z-index:9995}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external{display:block;overflow:hidden;padding:15px;letter-spacing:.5px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>h3{margin:0;padding:0;float:left;font-size:13px;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>a{display:inline-block;padding:0;background:0 0;clear:inherit;font-size:13px;font-weight:300;position:absolute;right:10px;border:0;margin-top:-1px}.page-bar:after,.page-container:after,.page-footer:after,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object:after,.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper:after{clear:both}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list{padding-right:0!important;padding-left:0;list-style:none}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a{display:block;clear:both;font-weight:300;line-height:20px;white-space:normal;font-size:13px;padding:16px 15px 18px;text-shadow:none}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li:first-child a{border-top:none}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details{overflow:hidden}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details .label-icon{margin-right:10px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details .label-icon i{margin-right:2px;margin-left:1px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details .label-icon .badge{right:15px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .time{float:right;max-width:75px;font-size:11px;font-weight:400;opacity:.7;filter:alpha(opacity=70);text-align:right;padding:1px 5px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .photo{float:left;margin:0 6px 6px 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .photo img{height:40px;width:40px;-webkit-border-radius:50%!important;-moz-border-radius:50%!important;-ms-border-radius:50%!important;-o-border-radius:50%!important;border-radius:50%!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .subject{display:block;margin-left:46px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .subject .from{font-size:13px;font-weight:600}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .subject .time{font-size:12px;font-weight:400;opacity:.5;filter:alpha(opacity=50);float:right}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .message{display:block!important;font-size:12px;line-height:1.3;margin-left:46px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .task{margin-bottom:5px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .task .desc{font-size:13px;font-weight:300}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .task .percent{float:right;font-weight:600;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .progress{display:block;height:8px;margin:8px 0 2px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{padding:14px 6px 12px 8px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle>.username{display:inline-block;font-size:13px;font-weight:300}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle>img{float:left;margin-top:-5px;margin-right:5px;height:29px;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle>i{display:inline-block;margin:0;font-size:13px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu{width:175px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu>li>a{font-size:14px;font-weight:300}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu>li>a i{width:15px;display:inline-block;margin-right:9px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu>li>a .badge{margin-right:10px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language{padding-left:0;padding-right:0;margin:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle{padding:14px 3px 12px 7px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle>img{margin-bottom:2px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle>i{font-size:14px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-menu>li>a{font-size:13px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-menu>li>a>img{margin-bottom:2px;margin-right:5px}.page-header.navbar .top-menu .navbar-nav li.dropdown-dark .dropdown-menu:before{border-left:none;border-right:none}.page-header.navbar .top-menu .navbar-nav li.dropdown-dark .dropdown-menu .dropdown-menu-list>li.external a{background:0 0!important;border:none!important}@media (min-width:768px){.page-header.navbar .search-form.search-form-expanded{width:200px}.page-header.navbar .search-form.search-form-expanded .input-group .form-control{text-indent:0}.page-header.navbar .search-form.search-form-expanded .input-group .form-control:hover{cursor:text}.page-header.navbar .search-form.search-form-expanded .input-group .input-group-btn .btn.submit{margin-left:0}}.page-header.navbar .container{position:relative}.page-header.navbar .hor-menu .navbar-nav,.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown{position:static}.page-header.navbar .hor-menu{margin:0;float:left}.page-header.navbar .hor-menu .navbar-nav.navbar-right .dropdown-menu{left:auto;right:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu{left:auto;width:auto}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content{font-family:"Open Sans",sans-serif;padding:15px;margin:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content.mega-menu-responsive-content{padding:10px 18px 10px 45px}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu{padding:0;margin:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu:last-child{border-right:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li{padding:1px!important;margin:0!important;list-style:none}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>h3{margin-top:5px;padding-left:6px;font-size:15px;font-weight:400}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a{white-space:normal;font-family:"Open Sans",sans-serif;padding:7px;margin:0;font-size:14px;font-weight:300}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a.iconify{padding:7px 7px 7px 30px}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a.iconify>i{position:absolute;top:auto!important;margin-left:-24px;font-size:15px;margin-top:3px!important}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a .badge,.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a .label{margin-left:5px}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown.mega-menu-full .dropdown-menu{left:20px;right:20px}.page-header.navbar .hor-menu .navbar-nav>li.menu-dropdown .dropdown-menu:after,.page-header.navbar .hor-menu .navbar-nav>li.menu-dropdown .dropdown-menu:before{display:none!important}.page-header.navbar .hor-menu .navbar-nav>li>a{font-size:14px;font-weight:400;padding:13px}.page-header.navbar .hor-menu .navbar-nav>li>a:focus{background:0 0!important}.page-header.navbar .hor-menu .navbar-nav>li.active .selected,.page-header.navbar .hor-menu .navbar-nav>li.current .selected{left:50%;bottom:0;position:absolute;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid transparent;display:inline-block;margin:0 0 -6px -7px;width:0;height:0}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu{margin-top:0;border:none}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a{font-family:"Open Sans",sans-serif;font-size:14px;font-weight:300;padding:9px 10px;white-space:normal}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a .badge,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a .label{font-weight:300}.page-header.navbar .hor-menu .navbar-nav>li.classic-menu-dropdown .dropdown-menu{min-width:195px;max-width:235px}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-submenu>.dropdown-menu{top:0}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-submenu>a:after{top:9px;right:10px}@media (min-width:992px) and (max-width:1200px){.page-boxed .page-header.navbar .top-menu .navbar-nav>li.dropdown-language .dropdown-toggle .langname,.page-boxed .page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle .username.username-hide-on-mobile{display:none}}@media (min-width:992px){.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .page-logo{padding:0;width:45px}.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .page-logo .logo-default{display:none}.page-boxed .page-header.navbar .page-logo{width:236px}.page-boxed .page-header.navbar .top-menu .navbar-nav{margin-right:0}.page-sidebar-closed.page-sidebar-closed-hide-logo.page-boxed .page-header.navbar .page-logo{width:46px}.page-boxed.page-sidebar-fixed .page-header.navbar .page-logo{width:235px}}@media (max-width:991px){.page-header.navbar{padding:0 20px;position:relative;clear:both}.page-header.navbar .page-logo{width:auto;padding:0;margin-right:10px;margin-left:0!important;padding-left:0!important}.page-header.navbar .page-logo img{margin-left:4px!important}.page-header.navbar .menu-toggler.sidebar-toggler{display:none!important}.page-header.navbar .menu-toggler.responsive-toggler{display:inline-block}.page-header.navbar .top-menu .navbar-nav{display:inline-block;margin:0 10px 0 0}.page-header.navbar .top-menu .navbar-nav>li{float:left}.page-header.navbar .top-menu .navbar-nav .nav li.dropdown i{display:inline-block;position:relative;top:1px;right:0}.page-header.navbar .top-menu .navbar-nav .open .dropdown-menu{position:absolute}.page-header-fixed.page-header-fixed-mobile .navbar-fixed-top{position:fixed}.page-boxed .page-header.navbar>.container{max-width:none!important;margin:0!important;padding:0!important}}@media (min-width:768px) and (max-width:991px){.page-boxed .page-header.navbar{margin:auto!important;padding:0}.page-boxed .page-header.navbar>.container{margin:auto!important}}@media (max-width:767px){.page-header.navbar{padding:0 10px}.page-header.navbar .page-logo{width:auto}.page-header.navbar .search-form.open{z-index:3;left:10px;right:10px;position:absolute;width:auto!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended>.dropdown-menu{max-width:255px;width:255px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu{margin-right:-190px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu:after,.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu:before{margin-right:190px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu{margin-right:-150px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu:after,.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu:before{margin-right:150px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu{margin-right:-110px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu:after,.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu:before{margin-right:110px}}@media (max-width:580px){.page-header.navbar .top-menu .navbar-nav>li.dropdown-language .dropdown-toggle .langname,.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle .username.username-hide-on-mobile{display:none}}@media (max-width:480px){.page-header-fixed.page-header-fixed-mobile .page-header.navbar{height:92px}.page-header.navbar .top-menu{display:block;clear:both}.page-header.navbar .top-menu .navbar-nav{margin-right:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle{padding:17px 6px 9px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language .dropdown-toggle{padding:14px 4px 12px 2px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{padding:14px 0 12px 2px}}.pace .pace-progress{z-index:10000;top:44px;height:2px}.pace .pace-activity{top:48px;right:22px;border-radius:10px!important}.page-container{margin:0;padding:0;position:relative}.page-container:after,.page-container:before{content:" ";display:table}.page-header-fixed .page-container{margin-top:46px}.page-footer-fixed.page-footer-fixed-mobile .page-container{margin-bottom:20px!important}@media (min-width:992px){.page-footer-fixed .page-container{margin-bottom:20px!important}}@media (max-width:991px){.page-container{margin:0!important;padding:0!important}.page-header-fixed.page-header-fixed-mobile .page-container{margin-top:46px!important}}@media (max-width:480px){.page-header-fixed .pace .pace-progress{top:92px}.page-header-fixed .pace .pace-activity{top:188px;right:15px}.page-header-fixed.page-header-fixed-mobile .page-container{margin-top:92px!important}}.ie8 .page-sidebar{width:235px;float:left;position:relative;margin-right:-100%}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover.navbar-collapse,.page-sidebar.navbar-collapse{padding:0;box-shadow:none}.page-sidebar .page-sidebar-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu{list-style:none;margin:0;padding:0}.page-sidebar .page-sidebar-menu>li,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li{display:block;margin:0;padding:0;border:0}.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper{border:0!important}.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper:before,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper:after,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper:before{content:" ";display:table}.page-sidebar .page-sidebar-menu>li.start>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.start>a{border-top-color:transparent!important}.page-sidebar .page-sidebar-menu>li.last>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.last>a{border-bottom-color:transparent!important}.page-sidebar .page-sidebar-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{display:block;position:relative;margin:0;border:0;padding:10px 15px;text-decoration:none;font-size:14px;font-weight:300}.page-sidebar .page-sidebar-menu>li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i{font-size:16px;margin-right:5px;text-shadow:none}.page-sidebar .page-sidebar-menu>li>a>i.glyphicon,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i.glyphicon{top:3px;margin-left:1px;margin-right:4px}.page-sidebar .page-sidebar-menu>li>a>[class^=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>[class^=icon-]{top:2px;margin-left:1px;margin-right:4px}.page-sidebar-fixed .page-sidebar .page-sidebar-menu>li>a,.page-sidebar-fixed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{transition:all .2s ease}.page-sidebar-reversed.page-sidebar-fixed .page-sidebar .page-sidebar-menu>li>a,.page-sidebar-reversed.page-sidebar-fixed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{transition:none}.page-sidebar .page-sidebar-menu>li.heading,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading{padding:15px}.page-sidebar .page-sidebar-menu>li.heading>h3,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading>h3{margin:0;padding:0;font-size:14px;font-weight:300}.page-sidebar .page-sidebar-menu>li.heading+li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading+li>a{border-top:0}.page-sidebar .page-sidebar-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a{font-size:14px}.page-sidebar .page-sidebar-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a{border:none;text-shadow:none;font-size:14px}.page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{display:block;float:right;position:absolute;right:0;top:8px;background:0 0;width:0;height:0;border-top:12px solid transparent;border-bottom:12px solid transparent;border-right:12px solid #fff}.page-sidebar-reversed .page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-sidebar-reversed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{right:auto;left:0;border-right:0;border-left:8px solid #fff}.page-container-bg-solid .page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-container-bg-solid .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{border-color:transparent #F1F3FA transparent transparent}.page-container-bg-solid.page-sidebar-reversed .page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-container-bg-solid.page-sidebar-reversed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{border-color:transparent transparent transparent #F1F3FA}.page-sidebar .page-sidebar-menu li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow:before{float:right;width:10px;text-align:center;margin-top:-1px;margin-right:5px;margin-left:5px;display:inline;font-size:16px;font-family:FontAwesome;height:auto;content:"\f104";font-weight:300;text-shadow:none}.page-sidebar .page-sidebar-menu li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow.open:before{content:"\f107"}.page-sidebar .page-sidebar-menu li>a>.badge,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.badge{float:right;margin-top:1px;margin-right:0}.page-sidebar .page-sidebar-menu .sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu{list-style:none;display:none;padding:0;margin:8px 0}.page-sidebar .page-sidebar-menu .sub-menu li,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li{background:0 0;margin:0;padding:0;margin-top:1px!important}.page-sidebar .page-sidebar-menu .sub-menu li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>a{display:block;margin:0;padding:6px 15px 6px 43px;text-decoration:none;font-size:14px;font-weight:300;background:0 0}.page-sidebar .page-sidebar-menu .sub-menu li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>a>i{font-size:14px}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu{margin:0}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu>li>a{padding-left:60px}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu{margin:0}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu>li>a{padding-left:80px}.page-sidebar .page-sidebar-menu li.active>.sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li.active>.sub-menu{display:block}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li>a{border:0;margin:0;padding-left:11px;border-left:4px solid transparent}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu{margin:0;padding:1px 0}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li>a{padding-top:8px;padding-bottom:8px}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li:first-child,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li:first-child{margin-top:0!important}.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li>a,.page-sidebar-reversed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li>a{padding-left:15px;padding-right:11px;border-left:0;border-right:4px solid transparent}.page-sidebar .sidebar-toggler,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-toggler{display:block;cursor:pointer;opacity:.7;filter:alpha(opacity=70);width:30px;height:27px;margin-top:15px;margin-right:19px;float:right;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar .sidebar-toggler:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-toggler:hover{filter:alpha(opacity=100);opacity:1}.page-sidebar .sidebar-search,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search{padding:0;margin:22px 18px}.page-sidebar .sidebar-search .remove,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .remove{display:none}.page-sidebar .sidebar-search .remove>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .remove>i{font-size:16px}.page-sidebar .sidebar-search .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar .sidebar-search .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control{border:0;font-size:14px;padding:0;height:auto;line-height:auto;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar .sidebar-search .input-group .input-group-btn .btn,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .input-group-btn .btn{padding:2px 0 0;background-color:transparent;background-repeat:no-repeat;background-position:100% 3px}.page-sidebar .sidebar-search .input-group .input-group-btn .btn>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .input-group-btn .btn>i{font-size:15px}.page-sidebar .sidebar-search.sidebar-search-bordered,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered{margin:25px 18px}.page-sidebar .sidebar-search.sidebar-search-bordered .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered .input-group .form-control{font-size:13px;padding:6px 8px}.page-sidebar .sidebar-search.sidebar-search-bordered .input-group .input-group-btn .btn,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered .input-group .input-group-btn .btn{margin-right:6px}@media (min-width:992px){.page-full-width .page-sidebar,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.open>.sub-menu,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>.sub-menu{display:none!important}.page-sidebar{width:235px;float:left;position:relative;margin-right:-100%}.page-sidebar.navbar-collapse{max-height:none!important}.page-sidebar-reversed .page-sidebar{float:right;margin-right:0;margin-left:-100%}.page-sidebar-reversed.page-sidebar-fixed .page-sidebar{margin-left:-235px}.page-sidebar-reversed.page-sidebar-fixed .page-sidebar-wrapper{position:relative;float:right}.page-sidebar-fixed .page-sidebar{position:fixed!important;margin-left:0;top:46px}.page-sidebar-fixed .page-sidebar-menu>li.last{margin-bottom:15px!important}.page-sidebar-closed .page-sidebar,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed{width:45px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover{width:256px!important;position:relative!important;z-index:10000;display:block!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;-ms-border-radius:0 4px 0 0;-o-border-radius:0 4px 0 0;border-radius:0 4px 0 0}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>i{margin-right:10px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.title{display:inline!important;padding-left:15px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.badge{display:block!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.selected{display:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover.heading{width:45px!important;box-shadow:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu{width:210px;position:absolute;z-index:2000;left:46px;margin-top:0;top:100%;display:block!important;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu>li>a{padding-left:15px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu>li>.sub-menu>li>a{padding-left:30px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu>li>.sub-menu>li>.sub-menu>li>a{padding-left:45px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.heading>h3{display:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-toggler-wrapper .sidebar-toggler{margin-right:8px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-search-wrapper:hover,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-toggler-wrapper:hover{width:45px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a{padding-left:11px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a .selected{right:-3px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a>.arrow,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a>.badge,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a>.title{display:none!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-toggler{margin-left:3px;margin-right:3px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search .input-group{border-color:transparent;margin-left:-4px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search .input-group .form-control{display:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search .input-group .input-group-btn .btn{display:block}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.sidebar-search-bordered .input-group{padding:5px 0 3px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open{height:39px;margin-top:14px;margin-bottom:14px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group{width:210px;position:relative;z-index:1;margin-left:24px;padding:0}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group .form-control{background:0 0;border:0;display:block;padding:8px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group .input-group-btn .btn{display:block;margin-right:8px;margin-top:1px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .remove{background-repeat:no-repeat;width:11px;height:11px;margin:9px -5px 9px -7px;display:block;float:left}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open.sidebar-search-bordered{height:36px;margin-top:23px;margin-bottom:23px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open.sidebar-search-bordered .input-group{padding:0}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-closed>li>a{padding-right:11px;padding-left:7px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar{margin-left:-45px;width:45px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>.sub-menu{left:auto;right:46px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover{margin-left:-211px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a{-webkit-border-radius:4px 0 0;-moz-border-radius:4px 0 0;-ms-border-radius:4px 0 0 0;-o-border-radius:4px 0 0;border-radius:4px 0 0}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.title{padding-left:0;padding-right:15px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>i{margin-right:0;margin-left:2px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-search-wrapper:hover,.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-toggler-wrapper:hover{margin-left:0}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group{margin-left:-227px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group .input-group-btn .btn{margin-right:10px!important}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .remove{margin:9px 4px 12px -16px!important;float:right!important}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-closed>li>a{padding-right:7px;padding-left:11px}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover{width:235px!important;display:absolute;z-index:10000}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu{width:235px!important}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .selected{display:none!important}.page-sidebar-closed.page-sidebar-fixed.page-sidebar-reversed .page-sidebar:hover{width:235px!important;display:absolute;z-index:10000;margin-left:-235px!important}.page-sidebar-closed.page-sidebar-fixed.page-sidebar-reversed .page-sidebar:hover .page-sidebar-menu{width:235px!important}.page-sidebar-closed.page-sidebar-hide .page-sidebar{display:none!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu li .sub-menu{display:none;width:210px;z-index:2000;position:absolute;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar-menu.page-sidebar-menu-hover-submenu li .sub-menu>li>a{margin:3px}.page-sidebar-menu.page-sidebar-menu-hover-submenu li.active .sub-menu,.page-sidebar-menu.page-sidebar-menu-hover-submenu li.open .sub-menu{display:none!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu li a>.arrow{display:none}.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow{display:block;float:right;position:absolute;right:0;margin-top:-20px;background:0 0;width:0;height:0;border-style:solid;border-top:12px double transparent;border-bottom:12px double transparent;border-left:0}.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow:after,.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow:before{display:none}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow{right:auto;left:0;border-right:0}.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>.sub-menu{display:inline-block!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>a>.arrow{z-index:1;right:0;margin-top:-23px}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>a>.selected{display:none}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{margin-left:235px;margin-top:-40px}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{margin-left:-210px!important}.page-sidebar-closed .page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{margin-left:0}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li>a{padding-left:15px}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li .sub-menu{margin-left:210px;margin-top:-38px!important}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li .sub-menu{margin-left:-210px!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li .sub-menu>li>a{padding-left:10px;padding-right:10px}.page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-hover-submenu li:hover>.sub-menu,.page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-hover-submenu li:hover>.sub-menu>li>.sub-menu{margin-top:-41px}}@media (max-width:991px){.page-sidebar,.page-sidebar.navbar-collapse.in{border-top:0!important;margin:20px}.page-sidebar .sidebar-toggler{display:none}.page-sidebar .selected,.page-sidebar.navbar-collapse.collapse{display:none!important}.page-sidebar.navbar-collapse{max-height:none}.page-sidebar.navbar-collapse.in{position:relative;overflow:hidden!important;overflow-y:auto!important;display:block!important}.page-sidebar.navbar-collapse.navbar-no-scroll{max-height:none!important}.page-sidebar .mega-menu-responsive-content{padding:10px 18px 10px 45px}.page-full-width .page-sidebar-menu{display:block}}@media (min-width:768px) and (max-width:991px){.page-sidebar .btn-navbar.collapsed .arrow{display:none}.page-sidebar .btn-navbar .arrow{position:absolute;right:25px;width:0;height:0;top:50px;border-bottom:15px solid #5f646b;border-left:15px solid transparent;border-right:15px solid transparent}}.page-header .top-menu .dropdown-quick-sidebar-toggler>.dropdown-toggle{padding:17px 10px 9px!important}.page-header .top-menu .dropdown-quick-sidebar-toggler>.dropdown-toggle i{top:0}.page-quick-sidebar-open .page-header .top-menu .dropdown-quick-sidebar-toggler>.dropdown-toggle i:before{content:"\e066"}.page-quick-sidebar-wrapper{transition:right .3s;z-index:9994;position:fixed;top:46px;bottom:0;right:-270px;width:270px;overflow:hidden}.page-quick-sidebar-wrapper.phonebar{top:0}.page-footer-fixed .page-quick-sidebar-wrapper{bottom:33px}.page-quick-sidebar-full-height .page-quick-sidebar-wrapper{top:0;bottom:0}.page-quick-sidebar-open .page-quick-sidebar-wrapper{transition:right .3s;right:0}.page-quick-sidebar-toggler{overflow:hidden;z-index:9994;display:none;width:28px;height:27px;position:fixed;top:19px;right:15px;text-align:center;padding-top:6px}.page-quick-sidebar-open .page-quick-sidebar-toggler{display:inline-block}.page-quick-sidebar-toggler>i{font-size:17px}@media (max-width:480px){.page-sidebar,.page-sidebar.in{margin:0 10px 10px!important}.page-header-fixed.page-header-fixed-mobile .page-sidebar,.page-header-fixed.page-header-fixed-mobile .page-sidebar.in{margin-top:10px!important}.page-quick-sidebar-wrapper{top:92px}.page-quick-sidebar-toggler{top:65px}}.page-content-wrapper,.page-footer,.page-header,.page-sidebar-wrapper{transition:margin .3s}.page-quick-sidebar-open.page-quick-sidebar-push-content .page-content-wrapper,.page-quick-sidebar-open.page-quick-sidebar-push-content .page-sidebar-wrapper{transition:margin-left .3s;margin-left:-270px}.page-quick-sidebar-open.page-quick-sidebar-push-content .page-footer{transition:margin-right .3s;margin-right:270px;margin-left:-270px}.page-sidebar-reversed.page-quick-sidebar-open.page-quick-sidebar-push-content .page-sidebar-wrapper{transition:margin-right .3s;margin-right:270px}.page-quick-sidebar-open.page-quick-sidebar-push-content.page-quick-sidebar-full-height .page-header{transition:margin-left .3s;margin-left:-270px}.page-quick-sidebar-open.page-quick-sidebar-push-content.page-footer-fixed:not(.page-quick-sidebar-full-height) .page-footer{margin-left:0;margin-right:0}.page-quick-sidebar-open.page-quick-sidebar-over-content-transparent .page-quick-sidebar-wrapper{opacity:.9;filter:alpha(opacity=90)}@media (max-width:991px){.page-quick-sidebar-open.page-quick-sidebar-push-content .page-sidebar-wrapper{display:none}}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified{margin:0;padding:0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li{display:table-cell!important;width:1%!important}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a{padding:15px;border:0;height:46px;font-size:13px;text-transform:uppercase;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a>.badge{position:absolute;top:12px;right:3px}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a:hover{border:0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu{margin-top:8px;margin-right:20px}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:before{position:absolute;top:-7px;right:19px;display:inline-block!important;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:after{position:absolute;top:-6px;right:20px;display:inline-block!important;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>.tab-content{margin:0;padding:0}.page-quick-sidebar-wrapper .page-quick-sidebar .list-heading{font-size:16px;margin:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items{margin:0;padding:0;list-style:none}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li{margin:0;padding:10px;background:0 0;border-bottom-width:1px;border-bottom-style:solid}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li:last-child{border-bottom:0}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items.borderless li{border:0}.page-quick-sidebar-wrapper .page-quick-sidebar .inner-content{margin:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-list{position:absolute!important;width:270px!important;transition:margin .3s}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item{position:absolute!important;width:270px!important;transition:margin .3s;margin-left:270px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item .page-quick-sidebar-nav{padding:0 10px 5px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item .page-quick-sidebar-nav .page-quick-sidebar-back-to-list{vertical-align:middle;display:inline-block;font-size:14px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item .page-quick-sidebar-nav .page-quick-sidebar-back-to-list>i{font-size:17px;line-height:17px;vertical-align:top;margin-right:3px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-list{transition:margin .3s;margin-left:-270px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-list .slimScrollBar,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-list .slimScrollRail{display:none!important}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-item{transition:margin .3s;margin-left:0}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users{padding:10px 0;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media{padding:12px 10px 11px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object{border-radius:50%!important;width:38.57px;opacity:.8;filter:alpha(opacity=80);float:left;margin-right:10px}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search{padding:0;margin:10px 22px}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group .form-control{border:0;font-size:14px;padding:0;height:auto}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group .input-group-btn .btn{padding:2px 0 0;background-color:transparent;background-repeat:no-repeat;background-position:100% 3px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object:after,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object:before{content:" ";display:table}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media:hover{cursor:pointer}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media:hover .media-object{opacity:1;filter:alpha(opacity=100)}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading{margin:5px 0 0;font-size:14px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-sub{font-size:11px;text-transform:uppercase}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-small{font-size:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-status{margin-top:10px;right:10px;position:absolute;display:inline-block}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages{padding:0 10px;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post{transition:display .3s;padding:5px 0;margin:10px auto;font-size:12px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .body{display:block;word-wrap:break-word}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .avatar{width:38.57px;border-radius:50%!important}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .avatar{float:left;margin-right:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .avatar{float:right;margin-left:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .name{font-size:12px;font-weight:300}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .datetime{font-size:12px;font-weight:300;text-style:italic}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .message{display:block;padding:5px;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .message{text-align:left;margin-left:55px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .message .arrow{display:block;position:absolute;top:9px;left:-6px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right-width:6px;border-right-style:solid}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .message{margin-right:55px;text-align:right}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .message .arrow{display:block;position:absolute;top:9px;right:-6px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left-width:6px;border-left-style:solid}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .datetime,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .name{text-align:right}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-form{padding:20px 10px 15px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-form .input-group .form-control{font-size:13px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list{padding:10px 0;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .label{margin-top:5px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .desc{padding:0}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list{padding:10px 0;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list .list-items li .bootstrap-switch{margin-top:-3px;float:right;border:0;min-width:59px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list .list-items li .form-control{width:75px!important;padding:4px!important;float:right;border:0;margin-top:-4px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list .list-items li select.form-control{padding:4px 0!important}.page-title{padding:0;font-size:28px;letter-spacing:-1px;display:block;color:#666;margin:0 0 15px;font-weight:300;font-family:"Open Sans",sans-serif}.page-title small{font-size:14px;letter-spacing:0;font-weight:300;color:#888}.page-container-bg-solid .page-title{color:#666;margin-bottom:20px;margin-top:20px}.page-container-bg-solid .page-title small{color:#666}.page-bar{padding:0;background-color:#f7f7f7;margin-bottom:25px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-bar:after,.page-bar:before{content:" ";display:table}.page-bar .page-breadcrumb{display:inline-block;float:left;padding:8px;margin:0;list-style:none}.page-bar .page-breadcrumb>li{display:inline-block}.ie8 .page-bar .page-breadcrumb>li{margin-right:1px}.page-bar .page-breadcrumb>li>a,.page-bar .page-breadcrumb>li>span{color:#888;font-size:14px;text-shadow:none}.page-bar .page-breadcrumb>li>i{color:#aaa;font-size:14px;text-shadow:none}.page-bar .page-breadcrumb>li>i[class*=icon-],.page-bar .page-breadcrumb>li>i[class^=icon-]{color:gray}.page-bar .page-toolbar{display:inline-block;float:right;padding:0}.page-bar .page-toolbar .btn-fit-height{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;padding-top:8px;padding-bottom:8px}.page-container-bg-solid .page-bar{position:relative;padding:0 20px;background-color:#fff;margin:-25px -20px 0}.page-container-bg-solid .page-bar .page-breadcrumb{padding:11px 0}.page-container-bg-solid .page-bar .page-breadcrumb>li>a,.page-container-bg-solid .page-bar .page-breadcrumb>li>span{color:#888}.page-container-bg-solid .page-bar .page-breadcrumb>li>i{color:#aaa}.page-container-bg-solid .page-bar .page-breadcrumb>li>i[class*=icon-],.page-container-bg-solid .page-bar .page-breadcrumb>li>i[class^=icon-]{color:#8c8c8c}.page-container-bg-solid .page-bar .page-toolbar{padding:6px 0}.page-container-bg-solid .page-bar .page-toolbar .btn{margin-top:-2px}.page-container-bg-solid .page-bar .page-toolbar .btn.btn-sm{margin-top:0}.page-content{margin-top:0;padding:0;background-color:#fff}.page-container-bg-solid .page-content{background:#F1F3FA}.page-full-width .page-content{margin-left:0!important}@media (min-width:992px){.page-content-wrapper{float:left;width:100%}.page-content-wrapper .page-content{margin-left:235px;margin-top:0;min-height:600px;padding:25px 20px 10px}.page-content-wrapper .page-content.no-min-height{min-height:auto}.page-sidebar-fixed.page-sidebar-hover-on .page-content-wrapper .page-content{margin-left:45px}.page-sidebar-reversed .page-content-wrapper .page-content{margin-left:0!important;margin-right:235px!important}.page-sidebar-reversed.page-sidebar-fixed.page-sidebar-hover-on .page-content-wrapper .page-content{margin-left:0;margin-right:45px}.page-sidebar-reversed.page-sidebar-closed .page-content-wrapper .page-content{margin-left:0!important;margin-right:45px!important}.page-sidebar-closed .page-content-wrapper .page-content{margin-left:45px!important}.page-full-width .page-content-wrapper .page-content,.page-sidebar-closed.page-sidebar-hide .page-content-wrapper .page-content{margin-left:0!important}.page-sidebar-closed.page-sidebar-reversed.page-sidebar-hide .page-content-wrapper .page-content{margin-right:0!important}}@media (max-width:991px){.page-container-bg-solid .page-bar{margin-top:-20px}.page-boxed>.container{max-width:none!important;margin:0!important;padding:0!important}.page-content-wrapper .page-content{margin:0!important;padding:20px!important;min-height:280px}}@media (min-width:768px) and (max-width:991px){.page-boxed>.container{margin:auto!important}}@media (max-width:767px){.page-content-wrapper .page-content{padding:20px 10px 10px!important;overflow:hidden}.page-content-wrapper .page-content .page-title{margin-bottom:20px;font-size:18px}.page-content-wrapper .page-content .page-title small{font-size:13px;padding-top:3px}}@media (max-width:480px){.page-content-wrapper .page-content .page-title small{display:block;clear:both}}.page-footer{padding:8px 20px 5px;font-size:12px;height:33px}.page-footer:after,.page-footer:before{content:" ";display:table}.page-footer .page-footer-inner{float:left;display:inline-block}.page-footer-fixed.page-footer-fixed-mobile .page-footer{position:fixed;left:0;right:0;z-index:10000;bottom:0}.page-footer-fixed.page-footer-fixed-mobile.page-sidebar-fixed .page-footer{margin-left:0!important}@media (min-width:992px){.page-footer{clear:left}.page-footer-fixed .page-footer{position:fixed;left:0;right:0;z-index:10000;bottom:0}.page-sidebar-fixed.page-sidebar-closed .page-footer{margin-left:45px}.page-sidebar-fixed.page-footer-fixed .page-footer{margin-left:0!important}.page-sidebar-fixed .page-footer{margin-left:235px;padding:8px 20px 5px}.page-boxed .page-footer{padding:8px 0 5px}.page-boxed.page-sidebar-fixed .page-footer{padding-right:20px;padding-left:20px}.page-sidebar-reversed.page-sidebar-fixed .page-footer{margin-left:0;margin-right:235px;padding:8px 20px 5px}.page-sidebar-reversed.page-sidebar-fixed.page-footer-fixed .page-footer{margin-left:0;margin-right:0}.page-sidebar-reversed.page-sidebar-fixed.page-sidebar-closed .page-footer{margin-right:45px}}#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,.aside .aside-dialog .aside-footer:after,.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.container-fluid:after,.container:after,.dataTable,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after,.scroller-footer:after,.ui-grid-clearfix:after,.ui-grid-footer-canvas:after,.ui-grid-header-canvas:after{clear:both}@media (max-width:991px){.page-boxed .page-footer{padding-left:0;padding-right:0}}@media (max-width:767px){.page-boxed .page-footer,.page-footer{padding-left:10px;padding-right:10px}.page-footer-fixed .page-footer .container{padding-left:0;padding-right:0}}.scroll-to-top{padding:1px;text-align:center;position:fixed;bottom:10px;z-index:10001;display:none;right:10px}.theme-panel>.toggler,.theme-panel>.toggler-close{padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;top:4px;cursor:pointer}.scroll-to-top>i{display:inline-block;color:#687991;font-size:30px;opacity:.6;filter:alpha(opacity=60)}.scroll-to-top:hover{cursor:pointer}.scroll-to-top:hover>i{opacity:1;filter:alpha(opacity=100)}@media (min-width:992px){.scroll-to-top{right:20px}}@media (max-width:991px){.scroll-to-top{bottom:10px;right:10px}.scroll-to-top>i{font-size:28px}}.theme-panel{width:420px;margin-top:-13px;margin-right:0;z-index:100;float:right;position:relative}.theme-panel>.toggler{right:0;position:absolute;background:url(../img/icon-color.png) center no-repeat #d5dade;border-radius:4px}.theme-panel>.toggler:hover{background-color:#3d3d3d!important}.theme-panel>.toggler-close{display:none;right:0;z-index:101;position:absolute;background:url(../img/icon-color-close.png) center no-repeat #3d3d3d!important;border-radius:4px}.theme-panel>.toggler-close:hover{background-color:#222!important}.theme-panel>.theme-options{top:4px;right:0;display:none;position:absolute;z-index:100;background:#3d3d3d;box-shadow:5px 5px rgba(61,61,61,.1);-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.modal-open .colorpicker,.modal-open .datepicker,.modal-open .daterangepicker,.modal-open .datetimepicker{z-index:10055!important}.theme-panel>.theme-options>.theme-option{color:#cfcfcf;padding:10px;border-top:1px solid #444;margin-top:0;margin-bottom:0}.theme-panel>.theme-options>.theme-option>span{text-transform:uppercase;display:inline-block;width:145px;font-size:13px;font-weight:300}.theme-panel>.theme-options>.theme-option>select.form-control{display:inline;width:135px;padding:2px;text-transform:lowercase}.theme-panel>.theme-options>.theme-option.theme-colors{border-top:0}.theme-panel>.theme-options>.theme-option.theme-colors>span{display:block;width:auto}.theme-panel>.theme-options>.theme-option.theme-colors>ul{list-style:none;padding:0;display:block;margin-bottom:10px!important;margin-top:15px}.colorpicker.dropdown-menu,.daterangepicker.dropdown-menu,.datetimepicker.dropdown-menu{padding:5px}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li{width:40px;height:40px;margin:0 4px;cursor:pointer;list-style:none;float:left;border:1px solid #707070}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li:first-child{margin-left:0}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.current,.theme-panel>.theme-options>.theme-option.theme-colors>ul>li:hover{border:2px solid #d64635}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-default{background:#333438}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-darkblue{background:#2b3643}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-blue{background:#2D5F8B}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-grey{background:#697380}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-light{background:#F9FAFD}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-light2{background:#F1F1F1}.page-container-bg-solid .theme-panel{position:absolute;margin-top:30px;margin-right:20px;right:0}.page-container-bg-solid .theme-panel>.toggler{background:url(../img/icon-color.png) center no-repeat #BFCAD1}.page-container-bg-solid.page-sidebar-reversed .theme-panel{margin-right:255px}.page-on-load{background:#fefefe}.datepicker .active,.datepicker .active:hover,.datepicker .selected,.datepicker .today{background-image:none!important;filter:none!important}.page-on-load .page-container,.page-on-load .page-footer,.page-on-load .page-header,.page-on-load>.clearfix{display:none;transition:all 2s}.input-group.color .input-group-btn i{position:absolute;display:block;cursor:pointer;width:20px;height:20px;right:6px}.datepaginator a{font-family:'Open Sans';font-size:13px;font-weight:300}.datepicker table td,.datepicker table th,.datetimepicker table td,.datetimepicker table th{font-family:'Open Sans'!important}#dp-calendar{right:4px!important}.datepaginator .fa-angle-right:before{content:"\f105"}.datepaginator .fa-angle-left:before{content:"\f104"}.datepicker.dropdown-menu{padding:5px;box-shadow:5px 5px rgba(102,102,102,.1);border:1px solid #efefef}.datepicker .selected{background-color:#909090!important}.datepicker .active{background-color:#4b8df8!important}.datepicker .active:hover{background-color:#2678FC!important}.datepicker .input-daterange input{text-align:left}.datepicker table td{color:#000;font-weight:300!important}.datepicker table th{color:#333;font-weight:400!important}.daterangepicker{margin-top:4px}.daterangepicker td{text-shadow:none}.daterangepicker td.active{background-color:#4b8df8;background-image:none;filter:none}.datetimepicker .active,.datetimepicker .active:hover{filter:none!important;background-image:none!important}.daterangepicker th{font-weight:400;font-size:14px}.daterangepicker .ranges input[type=text]{width:70px!important;font-size:11px;vertical-align:middle}.daterangepicker .ranges label{font-weight:300;display:block}.daterangepicker .ranges .btn{margin-top:10px}.daterangepicker .ranges li{color:#333}.daterangepicker .ranges li.active,.daterangepicker .ranges li:hover{background:#4b8df8!important;border:1px solid #4b8df8!important;color:#fff}.daterangepicker .range_inputs input{margin-bottom:0!important}.daterangepicker .fa-angle-right:before{content:"\f105"}.daterangepicker .fa-angle-left:before,.datetimepicker .fa-angle-left:before{content:"\f104"}.datetimepicker table td{color:#000;font-weight:300!important}.datetimepicker table th{font-weight:400!important}.datetimepicker .active{background-color:#4b8df8!important}.datetimepicker .active:hover{background-color:#2678FC!important}.datetimepicker .fa-angle-right:before{content:"\f105"}.editable-input table,.editable-input table td,.editable-input table th,.editable-input table tr{border:0!important}.editable-input .combodate select{margin-bottom:5px}.fileinput{margin-bottom:0}.fileinput .close{float:none}.fileinput .input-group{white-space:nowrap;overflow:hidden}.md-input{padding:5px!important;border-bottom:0!important;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.md-editor{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.md-editor .btn-toolbar{margin-left:0;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.md-editor .btn-toolbar .btn-group .btn-sm.btn{padding-bottom:3px}.md-editor .btn-toolbar .btn-group .btn-primary{padding-top:5px;padding-bottom:7px}.md-editor.active{border:1px solid #999;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important}.has-error .md-editor{border:1px solid #ebccd1!important}.has-success .md-editor{border:1px solid #d6e9c6!important}.has-warning .md-editor{border:1px solid #faebcc!important}.modal-open.page-overflow .modal-scrollable,.modal-open.page-overflow .page-container,.modal-open.page-overflow .page-container .navbar-fixed-bottom,.modal-open.page-overflow .page-container .navbar-fixed-top{overflow-y:auto!important}.modal-scrollable{overflow:hidden!important}.modal-backdrop{position:fixed}.bootstrap-select .btn{border-color:#e5e5e5}.has-error .bootstrap-select .btn{border-color:#ebccd1}.has-success .bootstrap-select .btn{border-color:#d6e9c6}.has-warning .bootstrap-select .btn{border-color:#faebcc}.bootstrap-select.open .btn,.bootstrap-select.open.dropup .btn{border-color:#999}.bootstrap-select .btn:focus{outline:0!important;outline-offset:0}.bootstrap-select.btn-group .dropdown-menu{margin-top:1px}.bootstrap-select.btn-group .dropdown-menu>li>dt>.text{font-weight:600;font-family:'Open Sans';font-size:14px}.bootstrap-select.btn-group .dropdown-menu .text-muted{color:#999!important}.bootstrap-select .caret{border:0;width:auto;height:auto;margin-top:-10px!important}.bootstrap-select .caret:before{content:"\f107";display:inline-block;border:0;font-family:FontAwesome;font-style:normal;font-weight:400}.form-wizard .steps>li>a.step>.desc,.form-wizard .steps>li>a.step>.number{display:inline-block;font-size:16px;font-weight:300}.bootstrap-select .selected i{color:#aaa}.bootstrap-select .dropdown-menu{z-index:9999!important}.bootstrap-switch{border-color:#e5e5e5}.bootstrap-switch.bootstrap-switch-focused{box-shadow:none;border-color:#e5e5e5}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary{color:#fff;background:#428bca}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info{color:#fff;background:#89C4F4}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success{color:#fff;background:#45B6AF}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning{color:#fff;background:#dfba49}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger{color:#fff;background:#F3565D}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default{color:#444;background:#ececec}.portlet>.portlet-title>.actions>.bootstrap-switch{border-color:transparent;margin-top:0}.bootstrap-timepicker-widget table td a{padding:4px 0}.bootstrap-timepicker-widget input,.bootstrap-timepicker-widget input:focus{outline:0!important;border:0}.modal-open .bootstrap-timepicker-widget{z-index:10055!important}.bootstrap-timepicker-widget.timepicker-orient-bottom:after,.bootstrap-timepicker-widget.timepicker-orient-bottom:before{top:auto}.toast{-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast .toast-close-button{display:inline-block;margin-top:0;margin-right:0;text-indent:-100000px;width:11px;height:16px;background-repeat:no-repeat!important;background-image:url(../../assets/images/portlet-remove-icon-white.png)!important}.form-wizard .steps,.form-wizard .steps>li>a.step{background-color:#fff;background-image:none;border:0;box-shadow:none;filter:none}.toast-top-center{top:12px;margin:0 auto 0 -150px;left:50%}.toast-bottom-center{bottom:12px;margin:0 auto 0 -150px;left:50%}.form-wizard .progress{margin-bottom:30px}.form-wizard .steps{padding:10px 0;margin-bottom:15px}.form-wizard .steps>li>a.step:hover{background:0 0}.form-wizard .steps>li>a.step>.number{background-color:#eee;text-align:center!important;padding:11px 15px 13px;margin-right:10px;height:45px;width:45px;-webkit-border-radius:50%!important;-moz-border-radius:50%!important;border-radius:50%!important}.form-wizard .steps>li>a.step>.desc>i{display:none}.form-wizard .steps>li.active>a.step .number{background-color:#45B6AF;color:#fff}.form-wizard .steps>li.active>a.step .desc{color:#333}.form-wizard .steps>li.done>a.step .number{background-color:#dfba49;color:#fff}.form-wizard .steps>li.done>a.step .desc{color:#333}.form-wizard .steps>li.done>a.step .desc i{font-size:12px;font-weight:400;color:#999;display:inline-block}@media (min-width:768px) and (max-width:1200px){.form-wizard .step .desc{margin-top:10px;display:block}}.wysihtml5-sandbox{width:100%!important}.wysihtml5-toolbar li{margin:0;height:29px}.wysihtml5-toolbar li .dropdown-menu{margin-top:5px}.has-error .wysihtml5-sandbox{border:1px solid #ebccd1!important}.has-success .wysihtml5-sandbox{border:1px solid #d6e9c6!important}.has-warning .wysihtml5-sandbox{border:1px solid #faebcc!important}.note-editor{border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.note-editor .note-toolbar{border-bottom:1px solid #e5e5e5;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.note-editor .note-statusbar{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.note-editor .note-statusbar .note-resizebar{border-top:1px solid #e5e5e5}.note-editor.fullscreen{z-index:11000;width:100%!important}.note-editor .dropdown-menu:before{left:9px;right:auto}.note-editor .dropdown-menu:after{left:10px;right:auto}.note-link-dialog .checkbox{margin-left:20px}.has-error .note-editor{border:1px solid #ebccd1!important}.has-success .note-editor{border:1px solid #d6e9c6!important}.has-warning .note-editor{border:1px solid #faebcc!important}.bootbox .bootbox-close-button{margin-top:0!important}.cke{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.cke .cke-top{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.cke .cke-bottom{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.cke_bottom,.cke_dialog,.cke_dialog_footer,.cke_dialog_title,.cke_inner,.cke_reset,.cke_top{background-image:none!important;filter:none;border-top:0;border-bottom:0;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;text-shadow:none}.cke_dialog_tab,.cke_dialog_ui_button,.cke_dialog_ui_input_text{filter:none;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;background-image:none!important}.cke_dialog_tab,.cke_dialog_ui_button{box-shadow:none!important;text-shadow:none!important}.cke_dialog_tab:hover,.cke_dialog_ui_button:hover{text-decoration:none;text-shadow:none}.cke_dialog_ui_input_text{box-shadow:none!important}.cke_button,.cke_combo_button,.cke_toolbar,.cke_toolgroup{background-image:none!important;filter:none!important;border:0;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important}.cke_button,.cke_combo_button,.cke_hc.cke_panel_listItem a,.cke_panel_grouptitle{background-image:none!important;filter:none;text-shadow:none}.cke_button:hover,.cke_combo_button:hover{background-color:#ddd}.cke_toolbar_break{background-image:none!important;filter:none!important;border:0;box-shadow:none!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;-ms-box-shadow:none!important;-o-box-shadow:none!important}.has-error .cke{border:1px solid #ebccd1!important}.has-success .cke{border:1px solid #d6e9c6!important}.has-warning .cke{border:1px solid #faebcc!important}.modal-open .clockface{z-index:10055!important}.clockface .cell .inner.active,.clockface .cell .outer.active{background-color:#4b8df8!important;background-image:none;filter:none}.dataTable{width:100%;margin-top:5px}.dataTables_filter .form-control{margin-left:4px}.dataTables_filter label{line-height:32px}.dataTable .row-details{margin-top:3px;display:inline-block;cursor:pointer;width:14px;height:14px}.dataTable .row-details.row-details-close{background:url(../img/datatable-row-openclose.png) no-repeat}.dataTable .row-details.row-details-open{background:url(../img/datatable-row-openclose.png) 0 -23px no-repeat}.dataTable .details{background-color:#eee}.dataTable .details td,.dataTable .details th{padding:4px;background:0 0;border:0}.dataTable .details tr:hover td,.dataTable .details tr:hover th{background:0 0}.dataTable .details tr:nth-child(even) td,.dataTable .details tr:nth-child(even) th,.dataTable .details tr:nth-child(odd) td,.dataTable .details tr:nth-child(odd) th{background-color:#eee}.dataTable>thead>tr>th.sorting,.dataTable>thead>tr>th.sorting_asc,.dataTable>thead>tr>th.sorting_desc{padding-right:18px}.dataTable .table-checkbox{width:8px!important}@media (max-width:768px){.form-wizard .steps>li>a{text-align:left}.dataTables_wrapper .dataTables_filter .form-control,.dataTables_wrapper .dataTables_length .form-control{display:inline-block}.dataTables_wrapper .dataTables_info{top:17px}.dataTables_wrapper .dataTables_paginate{margin-top:-15px}}@media (max-width:480px){.dataTables_wrapper .dataTables_filter .form-control{width:175px!important}.dataTables_wrapper .dataTables_paginate{float:left;margin-top:20px}}.dataTables_processing{position:fixed;top:50%;left:50%;min-width:125px;margin-left:0;padding:7px;text-align:center;color:#333;font-size:13px;border:1px solid #ddd;background-color:#eee;vertical-align:middle;-webkit-box-shadow:0 1px 8px rgba(0,0,0,.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,.1);box-shadow:0 1px 8px rgba(0,0,0,.1)}.dataTables_processing span{line-height:15px;vertical-align:middle}.dataTables_empty{text-align:center}.tabletools-btn-group{margin:0 0 10px}.tabletools-btn-group>.btn{margin-right:5px}.tabletools-btn-group>.btn:last-child{margin-right:0}.tabletools-dropdown-on-portlet{margin-top:-55px;float:right}.tabletools-dropdown-on-portlet>.btn{margin-right:5px}.tabletools-dropdown-on-portlet>.btn:last-child{margin-right:0}.DTTT_Print{background-color:#fff}.DTTT_Print .DTTT_PrintMessage{display:none}@media print{.DTTT_Print .DTTT_PrintMessage{display:inline-block}}.DTTT_Print .DTTT_Print_Info{display:block;position:fixed;top:35px;font-size:18px;width:700px;left:50%;margin-left:-350px;text-align:center}.DTTT_Print .page-footer,.DTTT_Print .page-header,.DTTT_Print .page-sidebar{display:none}.DTTT_Print .page-content-wrapper{float:none}.DTTT_Print .row,.DTTT_Print [class*=col-]{padding:0;margin:0}.DTTT_Print .page-content{margin:50px auto!important;border:0!important;width:800px!important;padding:0!important}.DTTT_Print .page-content .portlet{border:0;padding:0}.DTTT_Print .page-content .portlet .portlet-body{padding:0}.DTTT_Print .page-content .dataTables_wrapper{padding:0;margin:0;box-shadow:5px 5px rgba(102,102,102,.1)}@media print{.DTTT_Print .page-content .dataTables_wrapper{box-shadow:none}}.paging_bootstrap_extended{margin:0!important;padding:0!important;float:none!important;font-size:13px}.dataTables_extended_wrapper .seperator{padding:0 2px}.dataTables_extended_wrapper div.dataTables_info,.dataTables_extended_wrapper div.dataTables_length,.dataTables_extended_wrapper div.dataTables_paginate{display:inline-block;float:none!important;padding:0!important;margin:0!important;position:static!important}@media (max-width:480px){.dataTables_extended_wrapper div.dataTables_info,.dataTables_extended_wrapper div.dataTables_length,.dataTables_extended_wrapper div.dataTables_paginate{display:block;margin-bottom:10px!important}.dataTables_extended_wrapper .seperator{display:none!important}}.dataTables_extended_wrapper div.dataTables_length label{margin:0!important;padding:0!important;font-size:13px;float:none!important;display:inline-block!important}.table-container .table-actions-wrapper{display:none}.dataTables_scroll{margin-bottom:10px}.dataTables_scrollHead{border-bottom:2px solid #ddd!important}.dataTables_scrollHead thead th{border-bottom:0!important}.dataTables_scrollBody{border-bottom:1px solid #ddd!important}.dropzone{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.fancybox-overlay{z-index:100000}.fancybox-opened{z-index:100001}.spinner-buttons.btn-group-vertical .btn{text-align:center;margin:0;height:17px;width:22px;padding-left:6px;padding-right:6px;padding-top:0}.page-style-rounded .spinner-buttons.btn-group-vertical .btn.spinner-up{border-radius:0;border-top-right-radius:4px!important}.page-style-rounded .spinner-buttons.btn-group-vertical .btn.spinner-down{border-radius:0 0 4px}.external-event{display:inline-block;cursor:move;margin-bottom:5px;margin-left:5px}.fc-scroller{overflow-y:auto;overflow-x:hidden}.fc-month-view .fc-scroller{height:auto!important}.portlet .event-form-title{font-size:14px;margin-top:4px;font-weight:400;margin-bottom:10px}.portlet.calendar .fc-button{box-shadow:none;text-shadow:none;border:0 #ddd;height:35px;padding:6px 8px 7px;margin-left:2px;background:0 0;color:#fff;top:-45px;outline:0!important;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;border-style:none solid}.portlet.calendar .fc-toolbar{margin-bottom:0}.portlet.calendar .fc-toolbar h2{margin-top:3px;font-size:17px}.portlet.calendar .fc-button .fc-icon-left-single-arrow,.portlet.calendar .fc-button .fc-icon-right-single-arrow{font-family:FontAwesome;font-size:16px}.portlet.calendar .fc-header{margin-bottom:-21px}.portlet.calendar .fc-button-prev{padding-right:10px;padding-left:8px}.portlet.calendar .fc-button-next{padding-right:8px;padding-left:10px}.portlet.calendar .fc-button.fc-state-active,.portlet.calendar .fc-button.fc-state-hover{color:#666;background-color:#fff}.portlet.calendar .fc-button.fc-state-disabled{color:#ddd}.portlet.calendar .fc-button .fc-icon-left-single-arrow:after{content:""}.portlet.calendar .fc-button .fc-icon-left-single-arrow:before{content:"\f104"}.portlet.calendar .fc-button .fc-icon-right-single-arrow:after{content:""}.portlet.calendar .fc-button .fc-icon-right-single-arrow:before{content:"\f105"}.portlet.calendar .fc-text-arrow{font-size:22px;font-family:"Courier New",Courier,monospace;vertical-align:baseline}.portlet.calendar .fc-event .fc-time,.portlet.calendar .fc-event .fc-title{text-align:left;color:#fff;font-size:13px;font-weight:300;float:left}.portlet.calendar .fc-event{border:0;background-color:#69a4e0;color:#fff}.portlet.calendar .fc-event .fc-content{border:0}.portlet.calendar .fc-header-title h2{font-size:14px;line-height:20px;font-weight:400;color:#111}.portlet.calendar .fc-widget-header{background-image:none;filter:none;background-color:#eee;text-transform:uppercase;font-weight:300}.portlet.calendar.light .fc-button{top:-60px;color:#666;text-transform:uppercase;font-size:12px;padding-bottom:35px}.portlet.calendar.light .fc-button .fc-text-arrow{margin-top:-6px;display:inline-block}.portlet.calendar.light .fc-button.fc-state-active,.portlet.calendar.light .fc-button.fc-state-hover{color:#333;border-bottom:2px solid #45B6AF}.portlet.calendar.light .fc-button.fc-state-disabled{color:#aaa}.portlet.calendar .mobile .fc-button{padding:0 6px 20px;margin-left:2px;border:0;background-color:#ddd;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;color:#000;text-shadow:none;text-align:center}.portlet.calendar .mobile .fc-button.fc-state-active,.portlet.calendar .mobile .fc-button.fc-state-hover{background-color:#eee}.portlet.calendar .mobile .fc-button.fc-state-disabled{color:#bbb}.portlet.calendar .mobile .fc-button-prev{margin-right:5px;margin-top:-2px}.portlet.calendar .mobile .fc-button-next{margin-right:0;margin-top:-2px}.portlet.calendar .mobile .fc-header-space{margin:0;padding:0;width:0}.portlet.calendar .mobile .fc-header-left{position:absolute;z-index:10}.portlet.calendar .mobile .fc-header-left .fc-button{top:-2px}.portlet.calendar .mobile .fc-header-right{position:relative;right:0}.portlet.calendar .mobile .fc-header-right .fc-button{top:35px}.portlet.calendar .mobile .fc-content{margin-top:53px}.gmaps{height:300px;width:100%}.gmaps img{max-width:none}#gmap_static div{background-repeat:no-repeat;background-position:50% 50%;display:block;height:300px}#gmap_routes_instructions{margin-top:10px;margin-bottom:0}#gritter-notice-wrapper{right:1px!important}.gritter-close{left:auto!important;right:3px!important}.gritter-title{font-family:"Open Sans";font-size:18px;font-weight:300}.easy-pie-chart .number{font-size:14px!important;position:relative;text-align:center;height:75px;line-height:75px}.easy-pie-chart .number canvas{position:absolute;top:0;left:0}.bs-example,.sparkline-chart,.vmaps{position:relative}.blueimp-gallery .close{background-image:url(../../assets/images/portlet-remove-icon-white.png)!important;margin-top:-2px}.blueimp-gallery .next,.blueimp-gallery .prev{border-radius:23px!important}.ms-container .ms-list{border:1px solid #e5e5e5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ms-container .ms-optgroup-label{font-size:14px}.jquery-notific8-message,.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{font-size:13px}.ms-container .ms-list.ms-focus{border-color:#999;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ms-container .ms-selectable li.ms-hover,.ms-container .ms-selection li.ms-hover{color:#333;background-color:#eee}.ms-container .form-control{margin-bottom:5px}[class*=jquery-notific8],[class*=jquery-notific8]:after,[class*=jquery-notific8]:before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.left .jquery-notific8-close-sticky span,.right .jquery-notific8-close-sticky span{font-size:10px}.jquery-notific8-heading{font-weight:300;font-size:16px}.password-strength .password-verdict{display:inline-block;margin-top:6px;margin-left:5px}.password-strength .progress{margin-top:5px;margin-bottom:0}.password-strength .progress-bar{padding:2px}.scroller{padding:0 12px 0 0;margin:0;overflow:hidden}.scroller-footer{margin-top:10px}.scroller-footer:after,.scroller-footer:before{content:" ";display:table}.portlet-body .slimScrollBar{margin-right:0}.jqstooltip{width:auto!important;height:auto!important}.easy-pie-chart,.sparkline-chart{text-align:center}.sparkline-chart{margin-top:15px}.easy-pie-chart .number{font-weight:300;width:85px;margin:0 auto}.sparkline-chart .number{width:100px;margin:0 auto 10px}.easy-pie-chart .title,.sparkline-chart .title{display:block;text-align:center;color:#333;font-weight:300;font-size:16px;margin-top:5px;margin-bottom:10px}.easy-pie-chart .title:hover,.sparkline-chart .title:hover{color:#666;text-decoration:none}.easy-pie-chart .title>i,.sparkline-chart .title>i{margin-top:5px}div.tagsinput{min-height:35px;height:auto!important;margin:0;padding:5px 5px 0;overflow:auto}div.tagsinput span.tag{background:#aaa;color:#fff;border:0;padding:3px 6px;margin-top:0;margin-bottom:5px}div.tagsinput input{padding:3px 6px;width:75px!important}div.tagsinput span.tag a{color:#fff}div.tagsinput .not_valid{color:#fff;padding:3px 6px;background-color:#e02222}.slider{border:0;padding:0;display:block;margin:12px 5px;min-height:11px}.vakata-context li a .vakata-contextmenu-sep,.vakata-context li a i,iframe[src="about:blank"]{display:none}.ui-slider-vertical{width:11px}.ui-slider-horizontal .ui-slider-handle{top:-3px}.ui-slider-vertical .ui-slider-handle{left:-3px}.bs-example+.highlight:after,.bs-example:after{left:15px;text-transform:uppercase;letter-spacing:1px}.ui-slider-handle,.ui-slider-vertical{filter:none!important;background-image:none!important}.jqvmap-zoomin,.jqvmap-zoomout{height:16px;width:16px;background-color:#666}.vmaps{overflow:hidden;height:300px}.jstree-default .jstree-clicked{border:0;background-color:#e1e1e1;box-shadow:none}.jstree-default .jstree-hovered{border:0;background-color:#eee;box-shadow:none}.jstree-default .jstree-wholerow-clicked,.jstree-wholerow .jstree-wholerow-clicked{background:#e1e1e1;border:0;box-shadow:none}.jstree-default .jstree-wholerow-hovered,.jstree-wholerow .jstree-wholerow-hovered{border:0;background-color:#eee;box-shadow:none}.jstree-icon.icon-lg{margin-top:1px}.jstree-open>.jstree-anchor>.fa-folder:before{margin-left:2px;content:"\f07c"}.jstree-default.jstree-rtl .jstree-last{background:no-repeat}.vakata-context,.vakata-context ul{padding:0;min-width:125px;background-color:#fff;font-size:14px;font-family:"Segoe UI",Helvetica,Arial,sans-serif;box-shadow:5px 5px rgba(102,102,102,.1);border:1px solid #efefef}.vakata-context li{border:0}.vakata-context li a{padding:0 10px;border:0}.vakata-context .vakata-context-hover>a,.vakata-context li a:hover{background-color:#eee;color:#333;box-shadow:none;margin:0}.vakata-context .vakata-context-hover>a .ins,.vakata-context .vakata-context-hover>a .span,.vakata-context li a:hover .ins,.vakata-context li a:hover .span{border:0!important}.vakata-context li a ins,.vakata-context li a span{display:none;border:0!important}.vakata-context .vakata-context-separator a,.vakata-context-rtl .vakata-context-separator a{margin:0;border:0}.jstree-rename-input{background-color:#fff!important;border:1px solid #e5e5e5!important;outline:0!important;padding:2px 6px!important;margin-right:-4px!important}.noUi-control{margin:9px 0}.noUi-primary .noUi-connect,.noUi-primary.noUi-connect{background:#428bca}.noUi-info .noUi-connect,.noUi-info.noUi-connect{background:#89C4F4}.noUi-success .noUi-connect,.noUi-success.noUi-connect{background:#45B6AF}.noUi-warning .noUi-connect,.noUi-warning.noUi-connect{background:#dfba49}.noUi-danger .noUi-connect,.noUi-danger.noUi-connect{background:#F3565D}.noUi-default .noUi-connect,.noUi-default.noUi-connect{background:#c6c6c6}.form-recaptcha-img{margin-bottom:10px;clear:both;border:1px solid #e5e5e5;padding:5px}.form-control .select2-choice{border:1px solid #e5e5e5;background-color:#fff;background-image:none;filter:none;height:34px;padding:3px 0 0 12px}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#e5e5e5;background-color:#fff;background-image:none;filter:none}.select2-drop{border:1px solid #e5e5e5;background-color:#fff;background-image:none;-webkit-box-shadow:none;box-shadow:none;filter:none;border-top:0}.select2-drop-auto-width{border-top:1px solid #e5e5e5}.select2-drop.select2-drop-above{border-top:1px solid #e5e5e5;-webkit-box-shadow:none;box-shadow:none}.select2-drop-active{border:1px solid #999;border-top:0}.select2-container .select2-choice .select2-arrow{background-image:none;background-color:#fff;filter:none;border-left:1px solid #e5e5e5}.select2-container.select2-container-active .select2-arrow,.select2-container.select2-dropdown-open .select2-arrow{border-left:0!important}.select2-container .select2-choice .select2-arrow b{background-position:0 1px}.select2-search input{background-color:#fff!important;filter:none;margin:5px 0 0;border:1px solid #e5e5e5;webkit-appearance:none!important;color:#333;outline:0;height:auto!important;min-height:26px;padding:6px!important;line-height:20px;font-size:14px;font-weight:400;vertical-align:top;-webkit-box-shadow:none;box-shadow:none}.form-control.select2-container{border:0;height:auto!important;padding:0}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #999!important;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-dropdown-open .select2-choice{border-bottom:0!important;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #999!important;border-top:0!important;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-drop.select2-drop-above.select2-drop-active{border:1px solid #999!important;border-bottom:0!important}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}.select2-results{margin:5px 0}.select2-results .select2-highlighted{background:#eee;color:#333}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{padding:3px 7px 4px;background:#f4f4f4;display:list-item}.select2-container-multi,.select2-container-multi .select2-choices{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.select2-container-multi.select2-dropdown-open,.select2-container-multi.select2-dropdown-open .select2-choices{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.select2-container-multi.select2-dropdown-open.select2-drop-above,.select2-container-multi.select2-dropdown-open.select2-drop-above .select2-choices{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.select2-container-multi .select2-choices{padding-left:6px;min-height:34px;border:1px solid #e5e5e5;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #999!important;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:5px 0 3px 5px;border:1px solid #e5e5e5;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.has-warning .select2-container .select2-choice,.has-warning .select2-container .select2-choices,.has-warning .select2-container.select2-dropdown-open .select2-choice,.has-warning .select2-container.select2-dropdown-open .select2-choices{border-color:#faebcc}.has-warning .select2-container.select2-dropdown-open .select2-choice>span{color:#faebcc}.has-error .select2-container .select2-choice,.has-error .select2-container .select2-choices,.has-error .select2-container.select2-dropdown-open .select2-choice,.has-error .select2-container.select2-dropdown-open .select2-choices{border-color:#ebccd1}.has-error .select2-container.select2-dropdown-open .select2-choice>span{color:#ebccd1}.has-success .select2-container .select2-choice,.has-success .select2-container .select2-choices,.has-success .select2-container.select2-dropdown-open .select2-choice,.has-success .select2-container.select2-dropdown-open .select2-choices{border-color:#d6e9c6}.has-success .select2-container.select2-dropdown-open .select2-choice>span{color:#d6e9c6}.modal-open .select2-drop-mask{z-index:10051}.modal-open .select2-drop{z-index:10052}.modal-open .select2-search{z-index:10053}.form-control.input-lg .select2-choice{height:46px;padding:10px 16px}.select2-container.input-lg .select2-choice .select2-arrow b{background-position:0 7px}.form-control.input-sm .select2-choice{height:30px;padding:1px 10px 5px}.select2-container.input-sm .select2-choice .select2-arrow b{background-position:0 0}.checker{margin-top:-2px!important;margin-right:2px!important}.checker input,.radio input{outline:0!important}.alert,.aside:focus,.btn[bs-select],.timepicker.dropdown-menu button,.ui-grid-render-container:focus,[tabindex="-1"]{outline:0}div.checker.disabled span,div.checker.disabled.active span{background-position:-152px -260px}div.checker.disabled:hover,div.radio.disabled:hover{cursor:not-allowed}.edit-plunkr,.panel-heading[role=tab] .panel-title a,.ui-grid-header-cell .sortable,a[ng-click],input[type=checkbox]{cursor:pointer}div.checker,div.radio{margin-right:0;margin-left:3px}.portlet-body-morris-fit{margin-right:-20px;margin-left:-20px;margin-bottom:-15px}.portlet-body-morris-fit>svg{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.morris-hover.morris-default-style .morris-hover-row-label{text-align:left;font-weight:400;font-size:15px;color:#7D8C9D;font-family:"Open Sans",sans-serif}.morris-hover.morris-default-style .morris-hover-point{text-align:left;font-size:14px;font-weight:400;font-family:"Open Sans",sans-serif}.icheck-list>label{display:block;margin-bottom:8px}.icheck-list>label:last-child{margin-bottom:0}.form-horizontal .icheck-inline{margin-top:8px}.icheck-inline>label{display:inline-block;margin-left:15px}.icheck-inline>label:first-child{margin-left:0}div[class*=icheckbox_],div[class*=iradio_]{margin-right:5px;top:-1px!important}.icheck-colors{padding:0;margin:0;list-style:none}.icheck-colors>li{padding:0;margin:4px;float:left;display:inline-block;height:20px;width:20px;background:#000;opacity:.6;filter:alpha(opacity=60)}.icheck-colors>li:first-child{margin-left:0}.icheck-colors>li:hover{opacity:1;filter:alpha(opacity=100);cursor:pointer}.icheck-colors>li.active{height:26px;margin-top:0;opacity:.6;filter:alpha(opacity=60)}.icheck-colors>li.red{background:#d54e21}.icheck-colors>li.green{background:#78a300}.icheck-colors>li.blue{background:#0e76a8}.icheck-colors>li.aero{background:#9cc2cb}.icheck-colors>li.grey{background:#73716e}.icheck-colors>li.orange{background:#f70}.icheck-colors>li.yellow{background:#fc0}.icheck-colors>li.pink{background:#ff66b5}.icheck-colors>li.purple{background:#6a5a8c}.ui-select-match-close{margin-top:5px!important;margin-left:5px!important}.modal.disabled{-webkit-animation:noop!important;animation:noop!important}.modal.disabled.am-fade-and-slide-top .modal-dialog{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards;-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop}.modal.disabled.am-fade-and-scale .modal-dialog,.tab-pane.am-fade{-webkit-animation-duration:.3s;-webkit-animation-fill-mode:backwards}.modal.disabled.am-fade-and-slide-top.ng-enter .modal-dialog{visibility:hidden;-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop}.modal.disabled.am-fade-and-slide-top.ng-enter-active .modal-dialog,.modal.disabled.am-fade-and-slide-top.ng-leave-active .modal-dialog{visibility:visible}.modal.disabled.am-fade-and-slide-top.ng-leave .modal-dialog{-webkit-animation-name:fadeAndSlideToTop;animation-name:fadeAndSlideToTop}.modal.disabled.am-fade-and-scale .modal-dialog{animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;animation-fill-mode:backwards;-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn}.modal.disabled.am-fade-and-scale.ng-enter .modal-dialog{visibility:hidden;-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn}.modal.disabled.am-fade-and-scale.ng-enter-active .modal-dialog,.modal.disabled.am-fade-and-scale.ng-leave-active .modal-dialog{visibility:visible}.modal.disabled.am-fade-and-scale.ng-leave .modal-dialog{-webkit-animation-name:fadeAndScaleOut;animation-name:fadeAndScaleOut}@-webkit-keyframes noop{from,to{opacity:1}}@keyframes noop{from,to{opacity:1}}.bs-example{padding:45px 15px 15px;margin:0 -15px 15px;background-color:#fafafa;box-shadow:inset 0 3px 6px rgba(0,0,0,.05);border-color:#e5e5e5 #eee #eee;border-style:solid;border-width:1px 0}.bs-example:after{content:"Example";position:absolute;top:15px;font-size:12px;font-weight:700;color:#bbb}.bs-example+.highlight{margin:-15px -15px 15px;border-radius:0;border-width:0 0 1px}@media (min-width:768px){.bs-example,.bs-example+.highlight{margin-left:0;margin-right:0;border-width:1px}.bs-example{background-color:#fff;border-color:#ddd;border-radius:4px 4px 0 0;box-shadow:none}.bs-example+.highlight{margin-top:-16px;border-bottom-left-radius:4px;border-bottom-right-radius:4px}}.bs-example .container{width:auto}.bs-example>.alert:last-child,.bs-example>.form-control:last-child,.bs-example>.jumbotron:last-child,.bs-example>.list-group:last-child,.bs-example>.navbar:last-child,.bs-example>.panel:last-child,.bs-example>.progress:last-child,.bs-example>.table-responsive:last-child>.table,.bs-example>.table:last-child,.bs-example>.well:last-child,.bs-example>blockquote:last-child,.bs-example>ol:last-child,.bs-example>p:last-child,.bs-example>ul:last-child{margin-bottom:0}.bs-example>p>.close{float:none}.bs-example .nav-tabs{margin-bottom:15px}.bs-footer{padding-top:40px;padding-bottom:30px;margin-top:100px;color:#787878;text-align:center;border-top:1px solid #e6e6e6}.bs-docs-nav .navbar-brand,.bs-masthead-links a{color:#fff}.bs-docs-nav,.bs-docs-nav .navbar-collapse{border-color:#a33f3e}.footer-links{margin:10px 0;padding-left:0}.footer-links li{display:inline;padding:0 2px}.footer-links li:first-child{padding-left:0}@media (min-width:768px){.bs-footer{text-align:left}.bs-footer p{margin-bottom:0}}.bs-masthead{position:relative;padding:30px 15px;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.15)}.bs-masthead h1{font-size:50px;line-height:1;color:#fff}.bs-masthead .btn-outline-inverse{margin:10px}.bs-masthead-links{margin-top:20px;margin-bottom:40px;padding:0 15px;list-style:none;text-align:center}.bs-masthead-links li{display:inline}.bs-masthead-links li+li{margin-left:20px}@media (min-width:768px){.bs-masthead{text-align:left;padding-top:140px;padding-bottom:140px}.bs-masthead h1{font-size:100px}.bs-masthead .lead{margin-right:25%;font-size:30px}.bs-masthead .btn-outline-inverse{width:auto;margin:20px 5px 20px 0;padding:18px 24px;font-size:21px}.bs-masthead-links{padding:0;text-align:left}}.bs-docs-nav{background-color:#b94846;box-shadow:0 1px 0 rgba(255,255,255,.1);text-shadow:0 -1px 0 rgba(0,0,0,.15)}.bs-docs-nav .navbar-nav>li>a{-webkit-transition:color .15s linear;transition:color .15s linear;color:#f9f1f1}.bs-docs-nav .navbar-nav>li>a:hover{color:#fff}.bs-docs-nav .navbar-nav>.active>a,.bs-docs-nav .navbar-nav>.active>a:hover{background-color:#a33f3e;color:#fff}.bs-docs-nav .navbar-toggle{border-color:#b94846}.bs-docs-nav .navbar-toggle:hover{border-color:#a33f3e;background-color:#a33f3e}.bs-old-docs{padding:15px 20px;color:#787878;background-color:#fafafa;border-top:1px solid #fff;border-bottom:1px solid #e6e6e6}.bs-old-docs strong{color:#545454}@media (max-width:991px){.navbar-toggle{margin-left:15px;display:block!important;float:left}.bs-sidebar.affix{position:static!important}}.bs-header .container,.select.dropdown-menu.select-multiple li{position:relative}.bs-sidenav{margin-top:40px;margin-bottom:20px;width:124px}.bs-sidebar .nav>li>a{display:block;font-size:13px;font-weight:500;color:#999;padding:4px 15px;text-align:right}.bs-sidebar .nav>li>a:focus,.bs-sidebar .nav>li>a:hover{padding-right:14px;color:#b94846;text-decoration:none;background-color:transparent;border-right:1px solid #b94846}.bs-sidebar .nav>.active:focus>a,.bs-sidebar .nav>.active:hover>a,.bs-sidebar .nav>.active>a{padding-right:13px;font-weight:700;color:#b94846;background-color:transparent;border-right:2px solid #b94846}.bs-sidebar .nav .nav{display:none;padding-bottom:10px}.bs-sidebar .nav .nav>li>a{padding-top:2px;padding-bottom:2px;padding-right:30px;font-size:12px;font-weight:400}.bs-sidebar .nav .nav>li>a:focus,.bs-sidebar .nav .nav>li>a:hover{padding-right:29px}.bs-sidebar .nav .nav>.active:focus>a,.bs-sidebar .nav .nav>.active:hover>a,.bs-sidebar .nav .nav>.active>a{font-weight:500;padding-right:28px}@media (min-width:992px){.bs-sidebar .nav>.active>ul{display:block}.bs-sidebar.affix .bs-sidenav,.bs-sidebar.affix-bottom .bs-sidenav{margin-top:0;margin-bottom:0}}h1[id],h2[id]{margin-top:-45px}@media (min-width:1200px){.bs-sidebar{margin-right:30px}}.am-fade.aside-backdrop,.am-fade.modal-backdrop{background-color:rgba(0,0,0,.5)}.bs-docs-aside{min-width:200px}h1[id]{padding-top:80px}h2[id]{padding-top:60px}.bs-header{padding:30px 15px 40px;font-size:16px;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.15)}.bs-header h1{color:#fff}.bs-header p{font-weight:300;line-height:1.5}@media (min-width:768px){.bs-header{font-size:21px;text-align:left}.bs-header h1{font-size:60px;line-height:1}}@media (min-width:992px){.bs-header h1,.bs-header p{margin-right:300px}}.highlight{display:none;padding:9px 14px;margin-bottom:14px;background-color:#f6f6f8;border:1px solid #e2e2e9;border-radius:4px}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0;white-space:nowrap}.highlight pre code{font-size:inherit;color:#333}.highlight pre .lineno{display:inline-block;width:22px;padding-right:5px;margin-right:10px;text-align:right;color:#bebec5}@media (min-width:481px){.highlight{display:block}}input.ng-dirty.ng-invalid,select.ng-dirty.ng-invalid,textarea.ng-dirty.ng-invalid{color:#b94a48;border-color:#ee5f5b}input.ng-dirty.ng-invalid:focus,select.ng-dirty.ng-invalid:focus,textarea.ng-dirty.ng-invalid:focus{border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}input:focus.ng-pristine.ng-invalid,select:focus.ng-pristine.ng-invalid,textarea:focus.ng-pristine.ng-invalid{color:#555;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}input:focus.ng-pristine.ng-invalid:focus,select:focus.ng-pristine.ng-invalid:focus,textarea:focus.ng-pristine.ng-invalid:focus{border-color:rgba(82,168,236,.8);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}body .modal{overflow-y:hidden}body.modal-open{overflow-y:visible!important}.lt-ie9 .bs-sidebar{display:none!important}.modal-backdrop{z-index:1040;bottom:0}.select.dropdown-menu.select-multiple li>i{color:#fff;display:none;position:absolute;top:5px;right:10px}.bs-example+.highlight,body{position:relative}.alert.bottom-right,.alert.top,.alert.top-right{right:0}.select.dropdown-menu.select-multiple li.active>i{display:block}body{padding-top:50px}.bs-example-scope{font-size:85%}.bs-example-scope+.bs-example{margin:-15px -15px 15px}.bs-example-scope+.bs-example+.highlight>pre{border-radius:0 0 4px 4px}.aside.bs-docs-aside .aside-header{background:#b94846}.aside.bs-docs-aside .nav{margin:0}.bs-docs-social{max-height:200px}.bs-docs-social ul{list-style:none;padding:1em 0 0}.bs-docs-social ul li{height:30px}@media (max-width:991px){.bs-docs-social ul li{display:inline-block}}.bs-docs-home,.bs-header{color:#fff;background:url(../assets/images/triangular-red.png) #b94846;padding-bottom:20px}pre>code{background:0 0}.bs-example+.highlight code{padding:2.5em .5em 1em}.alert.bottom-right .close,.alert.top-right .close{padding-left:10px}.alert.bottom-left .close,.alert.top-left .close{padding-right:10px}.bs-example+.highlight:after{content:"Source";position:absolute;top:15px;font-size:12px;font-weight:700;color:#bbb}.twitter-follow-button{position:relative;top:5px;margin-left:10px}.tab-pane.am-fade{animation-duration:.3s;-webkit-animation-timing-function:ease;animation-timing-function:ease;animation-fill-mode:backwards;opacity:1}.am-collapse,.panel-collapse.am-collapse{-webkit-animation-duration:.3s;-webkit-animation-fill-mode:backwards;overflow:hidden}.panel-collapse.am-collapse{animation-duration:.3s;-webkit-animation-timing-function:ease;animation-timing-function:ease;animation-fill-mode:backwards}.am-collapse,.am-flip-x{-webkit-animation-timing-function:ease}.panel-collapse.am-collapse2{-webkit-transition:.3s ease max-height;transition:.3s ease max-height;max-height:100px;overflow:hidden}.panel-collapse.am-collapse2.in-remove{max-height:100px;display:block}.panel-collapse.am-collapse2.in-add{max-height:0}@-webkit-keyframes expand{from{max-height:0}to{max-height:100px}}@keyframes expand{from{max-height:0}to{max-height:100px}}@-webkit-keyframes collapse{from{max-height:100px}to{max-height:0}}@keyframes collapse{from{max-height:100px}to{max-height:0}}.am-collapse{animation-duration:.3s;animation-timing-function:ease;animation-fill-mode:backwards;opacity:1}.am-fade,.am-flip-x{-webkit-animation-fill-mode:backwards}.am-collapse.am-collapse-add,.am-collapse.ng-hide-remove,.am-collapse.ng-move{-webkit-animation-name:expand;animation-name:expand}.am-collapse.am-collapse-remove,.am-collapse.ng-hide{-webkit-animation-name:collapse;animation-name:collapse}.am-collapse.ng-enter{visibility:hidden;-webkit-animation-name:expand;animation-name:expand;-webkit-animation-play-state:paused;animation-play-state:paused}.am-collapse.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-collapse.ng-leave{-webkit-animation-name:collapse;animation-name:collapse;-webkit-animation-play-state:paused;animation-play-state:paused}.am-collapse.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes expand{from{max-height:0}to{max-height:500px}}@keyframes expand{from{max-height:0}to{max-height:500px}}@-webkit-keyframes collapse{from{max-height:500px}to{max-height:0}}@keyframes collapse{from{max-height:500px}to{max-height:0}}.panel-collapse.am-collapse.in-remove{-webkit-animation-name:collapse;animation-name:collapse;display:block}.panel-collapse.am-collapse.in-add{-webkit-animation-name:expand;animation-name:expand}.am-fade{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;animation-fill-mode:backwards;opacity:1}.am-fade.am-fade-add,.am-fade.ng-hide-remove,.am-fade.ng-move{-webkit-animation-name:fadeIn;animation-name:fadeIn}.am-fade.am-fade-remove,.am-fade.ng-hide{-webkit-animation-name:fadeOut;animation-name:fadeOut}.am-fade.ng-enter{visibility:hidden;-webkit-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade.ng-leave{-webkit-animation-name:fadeOut;animation-name:fadeOut;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.tab-pane.am-fade.active-remove{display:none!important}.tab-pane.am-fade.active-add{-webkit-animation-name:fadeIn;animation-name:fadeIn}.aside-backdrop.am-fade,.modal-backdrop.am-fade{background:rgba(0,0,0,.5);-webkit-animation-duration:.15s;animation-duration:.15s}.aside-backdrop.am-fade.ng-leave,.modal-backdrop.am-fade.ng-leave{-webkit-animation-delay:.3s;animation-delay:.3s}.am-flip-x{-webkit-animation-duration:.4s;animation-duration:.4s;animation-timing-function:ease;animation-fill-mode:backwards}.am-flip-x-linear,.am-slide-top{-webkit-animation-fill-mode:backwards}.am-flip-x.am-flip-x-add,.am-flip-x.ng-hide-remove,.am-flip-x.ng-move{-webkit-animation-name:flipInXBounce;animation-name:flipInXBounce}.am-flip-x.am-flip-x-remove,.am-flip-x.ng-hide{-webkit-animation-name:flipOutX;animation-name:flipOutX}.am-flip-x.ng-enter{visibility:hidden;-webkit-animation-name:flipInXBounce;animation-name:flipInXBounce;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-flip-x.ng-leave{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-flip-x-linear{-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:ease;animation-timing-function:ease;animation-fill-mode:backwards}.am-slide-right,.am-slide-top{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-flip-x-linear.am-flip-x-add,.am-flip-x-linear.ng-hide-remove,.am-flip-x-linear.ng-move{-webkit-animation-name:flipInX;animation-name:flipInX}.am-flip-x-linear.am-flip-x-remove,.am-flip-x-linear.ng-hide{-webkit-animation-name:flipOutX;animation-name:flipOutX}.am-flip-x-linear.ng-enter{visibility:hidden;-webkit-animation-name:flipInX;animation-name:flipInX;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x-linear.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-flip-x-linear.ng-leave{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x-linear.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes flipInX{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@keyframes flipInX{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@-webkit-keyframes flipInXBounce{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-transform:perspective(400px) rotateX(-10deg);transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@keyframes flipInXBounce{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-transform:perspective(400px) rotateX(-10deg);transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@-webkit-keyframes flipOutX{from{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}@keyframes flipOutX{from{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}.am-slide-top{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-slide-bottom,.am-slide-right{-webkit-animation-fill-mode:backwards}.am-slide-top.am-slide-top-add,.am-slide-top.ng-hide-remove,.am-slide-top.ng-move{-webkit-animation-name:slideFromTop;animation-name:slideFromTop}.am-slide-top.am-slide-top-remove,.am-slide-top.ng-hide{-webkit-animation-name:slideToTop;animation-name:slideToTop}.am-slide-top.ng-enter{visibility:hidden;-webkit-animation-name:slideFromTop;animation-name:slideFromTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-top.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-top.ng-leave{-webkit-animation-name:slideToTop;animation-name:slideToTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-top.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-slide-right{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-slide-bottom,.am-slide-left{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-slide-right.am-slide-right-add,.am-slide-right.ng-hide-remove,.am-slide-right.ng-move{-webkit-animation-name:slideFromRight;animation-name:slideFromRight}.am-slide-right.am-slide-right-remove,.am-slide-right.ng-hide{-webkit-animation-name:slideToRight;animation-name:slideToRight}.am-slide-right.ng-enter{visibility:hidden;-webkit-animation-name:slideFromRight;animation-name:slideFromRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-right.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-right.ng-leave{-webkit-animation-name:slideToRight;animation-name:slideToRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-right.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-slide-bottom{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-fade-and-slide-top,.am-slide-left{-webkit-animation-fill-mode:backwards}.am-slide-bottom.am-slide-bottom-add,.am-slide-bottom.ng-hide-remove,.am-slide-bottom.ng-move{-webkit-animation-name:slideFromBottom;animation-name:slideFromBottom}.am-slide-bottom.am-slide-bottom-remove,.am-slide-bottom.ng-hide{-webkit-animation-name:slideToBottom;animation-name:slideToBottom}.am-slide-bottom.ng-enter{visibility:hidden;-webkit-animation-name:slideFromBottom;animation-name:slideFromBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-bottom.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-bottom.ng-leave{-webkit-animation-name:slideToBottom;animation-name:slideToBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-bottom.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-slide-left{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-fade-and-slide-right,.am-fade-and-slide-top{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-slide-left.am-slide-left-add,.am-slide-left.ng-hide-remove,.am-slide-left.ng-move{-webkit-animation-name:slideFromLeft;animation-name:slideFromLeft}.am-slide-left.am-slide-left-remove,.am-slide-left.ng-hide{-webkit-animation-name:slideToLeft;animation-name:slideToLeft}.am-slide-left.ng-enter{visibility:hidden;-webkit-animation-name:slideFromLeft;animation-name:slideFromLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-left.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-left.ng-leave{-webkit-animation-name:slideToLeft;animation-name:slideToLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-left.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes slideFromTop{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes slideFromTop{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@-webkit-keyframes slideToTop{to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes slideToTop{to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@-webkit-keyframes slideFromRight{from{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slideFromRight{from{-webkit-transform:translateX(100%);transform:translateX(100%)}}@-webkit-keyframes slideToRight{to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slideToRight{to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@-webkit-keyframes slideFromBottom{from{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes slideFromBottom{from{-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes slideToBottom{to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes slideToBottom{to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes slideFromLeft{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slideFromLeft{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@-webkit-keyframes slideToLeft{to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slideToLeft{to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.am-fade-and-slide-top{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-fade-and-slide-top.am-fade-and-slide-top-add,.am-fade-and-slide-top.ng-hide-remove,.am-fade-and-slide-top.ng-move{-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop}.am-fade-and-slide-top.am-fade-and-slide-top-remove,.am-fade-and-slide-top.ng-hide{-webkit-animation-name:fadeAndSlideToTop;animation-name:fadeAndSlideToTop}.am-fade-and-slide-top.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-top.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-top.ng-leave{-webkit-animation-name:fadeAndSlideToTop;animation-name:fadeAndSlideToTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-top.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-right{animation-duration:.3s;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-slide-bottom,.am-fade-and-slide-left{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-fade-and-slide-right.am-fade-and-slide-right-add,.am-fade-and-slide-right.ng-hide-remove,.am-fade-and-slide-right.ng-move{-webkit-animation-name:fadeAndSlideFromRight;animation-name:fadeAndSlideFromRight}.am-fade-and-slide-right.am-fade-and-slide-right-remove,.am-fade-and-slide-right.ng-hide{-webkit-animation-name:fadeAndSlideToRight;animation-name:fadeAndSlideToRight}.am-fade-and-slide-right.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromRight;animation-name:fadeAndSlideFromRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-right.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-right.ng-leave{-webkit-animation-name:fadeAndSlideToRight;animation-name:fadeAndSlideToRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-right.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-bottom{animation-duration:.3s;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-slide-bottom.am-fade-and-slide-bottom-add,.am-fade-and-slide-bottom.ng-hide-remove,.am-fade-and-slide-bottom.ng-move{-webkit-animation-name:fadeAndSlideFromBottom;animation-name:fadeAndSlideFromBottom}.am-fade-and-slide-bottom.am-fade-and-slide-bottom-remove,.am-fade-and-slide-bottom.ng-hide{-webkit-animation-name:fadeAndSlideToBottom;animation-name:fadeAndSlideToBottom}.am-fade-and-slide-bottom.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromBottom;animation-name:fadeAndSlideFromBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-bottom.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-bottom.ng-leave{-webkit-animation-name:fadeAndSlideToBottom;animation-name:fadeAndSlideToBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-bottom.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-left{animation-duration:.3s;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-slide-left.am-fade-and-slide-left-add,.am-fade-and-slide-left.ng-hide-remove,.am-fade-and-slide-left.ng-move{-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards;-webkit-animation-name:fadeAndSlideFromLeft;animation-name:fadeAndSlideFromLeft}.am-fade-and-slide-left.am-fade-and-slide-left-remove,.am-fade-and-slide-left.ng-hide{-webkit-animation-name:fadeAndSlideToLeft;animation-name:fadeAndSlideToLeft}.am-fade-and-slide-left.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromLeft;animation-name:fadeAndSlideFromLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-left.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-left.ng-leave{-webkit-animation-name:fadeAndSlideToLeft;animation-name:fadeAndSlideToLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-left.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes fadeAndSlideFromTop{from{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}to{opacity:1}}@keyframes fadeAndSlideFromTop{from{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToTop{from{opacity:1}to{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}}@keyframes fadeAndSlideToTop{from{opacity:1}to{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}}@-webkit-keyframes fadeAndSlideFromRight{from{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}to{opacity:1}}@keyframes fadeAndSlideFromRight{from{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToRight{from{opacity:1}to{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}}@keyframes fadeAndSlideToRight{from{opacity:1}to{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}}@-webkit-keyframes fadeAndSlideFromBottom{from{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}to{opacity:1}}@keyframes fadeAndSlideFromBottom{from{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToBottom{from{opacity:1}to{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}}@keyframes fadeAndSlideToBottom{from{opacity:1}to{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}}@-webkit-keyframes fadeAndSlideFromLeft{from{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}to{opacity:1}}@keyframes fadeAndSlideFromLeft{from{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToLeft{from{opacity:1}to{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}}@keyframes fadeAndSlideToLeft{from{opacity:1}to{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}}.am-fade-and-scale{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-scale.am-fade-and-scale-add,.am-fade-and-scale.ng-enter,.am-fade-and-scale.ng-hide-remove,.am-fade-and-scale.ng-move{-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn}.am-fade-and-scale.am-fade-and-scale-remove,.am-fade-and-scale.ng-hide,.am-fade-and-scale.ng-leave{-webkit-animation-name:fadeAndScaleOut;animation-name:fadeAndScaleOut}.am-fade-and-scale.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-scale.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-scale.ng-leave{-webkit-animation-name:fadeAndScaleOut;animation-name:fadeAndScaleOut;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-scale.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes fadeAndScaleIn{from{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}to{opacity:1}}@keyframes fadeAndScaleIn{from{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}to{opacity:1}}@-webkit-keyframes fadeAndScaleOut{from{opacity:1}to{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}}@keyframes fadeAndScaleOut{from{opacity:1}to{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}}.alert.bottom,.alert.bottom-left,.alert.bottom-right,.alert.top,.alert.top-left,.alert.top-right{position:fixed;z-index:1050;margin:20px}.alert.top,.alert.top-left,.alert.top-right{top:50px}.alert.top{left:0}.alert.top-left{left:0}.alert.bottom,.alert.bottom-left,.alert.bottom-right{bottom:0}.alert.bottom{right:0;left:0}.alert.bottom-left{left:0}.aside .aside-dialog .aside-footer:after,.aside .aside-dialog .aside-footer:before,.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar: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,.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{content:" ";display:table}.aside{position:fixed;top:0;bottom:0;z-index:1049;overflow:auto;min-width:320px;background:#fff}@media (max-width:991px){.aside{min-width:240px}}.aside.left{right:auto;left:0}.aside.right{right:0;left:auto}.aside .aside-dialog .aside-header{border-bottom:1px solid #e5e5e5;min-height:16.43px;padding:6px 15px;background:#337ab7;color:#fff}.aside .aside-dialog .aside-header .close{margin-right:-8px;padding:4px 8px;color:#fff;font-size:25px;opacity:.8}.aside .aside-dialog .aside-body{position:relative;padding:15px}.aside .aside-dialog .aside-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.aside .aside-dialog .aside-footer .btn+.btn{margin-left:5px;margin-bottom:0}.aside .aside-dialog .aside-footer .btn-group .btn+.btn{margin-left:-1px}.aside .aside-dialog .aside-footer .btn-block+.btn-block{margin-left:0}.aside-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.aside-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.aside-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.ui-grid-top-panel,.ui-grid-top-panel-background{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='white', GradientType=0)}.datepicker.dropdown-menu{width:250px;height:270px}.datepicker.dropdown-menu button{outline:0;border:0}.datepicker.dropdown-menu tbody{height:180px}.datepicker.dropdown-menu tbody button{padding:6px}.datepicker.dropdown-menu.datepicker-mode-1 tbody button,.datepicker.dropdown-menu.datepicker-mode-2 tbody button{height:65px}.callout{margin:20px 0;padding:20px;border-left:3px solid #eee}.callout h4{margin-top:0;margin-bottom:5px}.popover.top-left,.popover.top-right{margin-top:-10px}.callout p:last-child{margin-bottom:0}.callout-danger{border-color:#eed3d7;background-color:#fdf7f7}.callout-danger h4{color:#b94a48}.callout-warning{border-color:#faebcc;background-color:#faf8f0}.callout-warning h4{color:#8a6d3b}.callout-info{border-color:#bce8f1;background-color:#f4f8fa}.callout-info h4{color:#34789a}.modal.center .modal-dialog{position:fixed;top:40%;left:50%;min-width:320px;max-width:630px;width:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.popover.top-left .arrow{margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px;left:10%}.popover.top-left .arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.bottom-left,.popover.bottom-right{margin-top:10px}.popover.top-right .arrow{margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px;left:90%}.popover.top-right .arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.bottom-left .arrow{margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px;left:10%}.popover.bottom-left .arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.bottom-right .arrow{margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px;left:90%}.popover.bottom-right .arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.timepicker.dropdown-menu{padding:0 4px}.timepicker.dropdown-menu button{border:0}.timepicker.dropdown-menu tbody button{padding:6px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-group-xs>.btn{font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px}.btn-group-xs>.btn{padding:1px 5px}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar: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,.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{content:" ";display:table}.tooltip.tooltip-info.top .tooltip-arrow,.tooltip.tooltip-info.top-left .tooltip-arrow,.tooltip.tooltip-info.top-right .tooltip-arrow{border-top-color:#d9edf7}.tooltip.tooltip-info.right .tooltip-arrow{border-right-color:#d9edf7}.tooltip.tooltip-info.bottom .tooltip-arrow,.tooltip.tooltip-info.bottom-left .tooltip-arrow,.tooltip.tooltip-info.bottom-right .tooltip-arrow{border-bottom-color:#d9edf7}.tooltip.tooltip-info.left .tooltip-arrow{border-left-color:#d9edf7}.tooltip.tooltip-info .tooltip-inner{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.tooltip.tooltip-info .tooltip-inner hr{border-top-color:#a6e1ec}.tooltip.tooltip-info .tooltip-inner .alert-link{color:#245269}.tooltip.tooltip-success.top .tooltip-arrow,.tooltip.tooltip-success.top-left .tooltip-arrow,.tooltip.tooltip-success.top-right .tooltip-arrow{border-top-color:#dff0d8}.tooltip.tooltip-success.right .tooltip-arrow{border-right-color:#dff0d8}.tooltip.tooltip-success.bottom .tooltip-arrow,.tooltip.tooltip-success.bottom-left .tooltip-arrow,.tooltip.tooltip-success.bottom-right .tooltip-arrow{border-bottom-color:#dff0d8}.tooltip.tooltip-success.left .tooltip-arrow{border-left-color:#dff0d8}.tooltip.tooltip-success .tooltip-inner{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.tooltip.tooltip-success .tooltip-inner hr{border-top-color:#c9e2b3}.tooltip.tooltip-success .tooltip-inner .alert-link{color:#2b542c}.tooltip.tooltip-danger.top .tooltip-arrow,.tooltip.tooltip-danger.top-left .tooltip-arrow,.tooltip.tooltip-danger.top-right .tooltip-arrow{border-top-color:#f2dede}.tooltip.tooltip-danger.right .tooltip-arrow{border-right-color:#f2dede}.tooltip.tooltip-danger.bottom .tooltip-arrow,.tooltip.tooltip-danger.bottom-left .tooltip-arrow,.tooltip.tooltip-danger.bottom-right .tooltip-arrow{border-bottom-color:#f2dede}.tooltip.tooltip-danger.left .tooltip-arrow{border-left-color:#f2dede}.tooltip.tooltip-danger .tooltip-inner{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.tooltip.tooltip-danger .tooltip-inner hr{border-top-color:#e4b9c0}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{border-width:5px 5px 0;border-top-color:#000;margin-left:-5px;bottom:0}.tooltip.tooltip-danger .tooltip-inner .alert-link{color:#843534}.tooltip.top-left{margin-top:-3px;padding:5px 0}.tooltip.top-left .tooltip-arrow{left:10%}.tooltip.top-right{margin-top:-3px;padding:5px 0}.tooltip.bottom-left,.tooltip.bottom-right{margin-top:3px;padding:5px 0}.tooltip.top-right .tooltip-arrow{left:90%}.tooltip.bottom-left .tooltip-arrow{top:0;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000;left:10%}.tooltip.bottom-right .tooltip-arrow{top:0;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000;left:90%}#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:before,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before{content:" ";display:table}.ui-grid{border:1px solid #ddd;box-sizing:content-box;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}.ui-grid-vertical-bar{position:absolute;right:0;width:0}.ui-grid-scrollbar-placeholder{background-color:transparent}.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{width:1px;background-color:#ddd}.ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#ddd}.ui-grid-clearfix:after,.ui-grid-clearfix:before{content:"";display:table}.ui-grid-invisible{visibility:hidden}.ui-grid-contents-wrapper{position:relative;height:100%;width:100%}.ui-grid-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.ui-grid-top-panel-background{background:#fff;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff)}.ui-grid-header{border-bottom:1px solid #ddd;box-sizing:border-box}.ui-grid-top-panel{position:relative;overflow:hidden;font-weight:700;background:#fff;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff);-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:-1px -1px 0 0;border-radius:-1px -1px 0 0}.ui-grid-header-viewport{overflow:hidden}.ui-grid-header-canvas:after,.ui-grid-header-canvas:before{content:"";display:table;line-height:0}.ui-grid-header-cell-wrapper{position:relative;display:table;box-sizing:border-box;height:100%}.ui-grid-header-cell-row{display:table-row;position:relative}.ui-grid-header-cell{position:relative;box-sizing:border-box;background-color:inherit;border-right:1px solid;border-color:#ddd;display:table-cell;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0}.ui-grid-header-cell:last-child{border-right:0}.ui-grid-header-cell .ui-grid-sort-priority-number{margin-left:-8px}.ui-grid-header .ui-grid-vertical-bar{top:0;bottom:0}.ui-grid-column-menu-button{position:absolute;right:1px;top:0}.ui-grid-column-menu-button .ui-grid-icon-angle-down{vertical-align:sub}.ui-grid-column-menu-button-last-col{margin-right:25px}.ui-grid-column-menu{position:absolute}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all 50ms linear;-moz-transition:all 50ms linear;-o-transition:all 50ms linear;transition:all 50ms linear;display:block!important}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all 50ms linear;-moz-transition:all 50ms linear;-o-transition:all 50ms linear;transition:all 50ms linear;display:block!important}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-filter-container{padding:4px 10px;position:relative}.ui-grid-filter-container .ui-grid-filter-button{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button [class^=ui-grid-icon]{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:10px;opacity:.66}.ui-grid-filter-container .ui-grid-filter-button [class^=ui-grid-icon]:hover{opacity:1}.ui-grid-filter-container .ui-grid-filter-button-select{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button-select [class^=ui-grid-icon]{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:0;opacity:.66}.ui-grid-filter-container .ui-grid-filter-button-select [class^=ui-grid-icon]:hover{opacity:1}select.ui-grid-filter-select{padding:0;margin:0;width:90%;border:1px solid #ddd;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:0;border-radius:0}select.ui-grid-filter-select:hover{border:1px solid #ddd}.ui-grid-no-row-overlay,.ui-grid-render-container{-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0}.ui-grid-filter-cancel-button-hidden select.ui-grid-filter-select{width:100%}.ui-grid-render-container{position:inherit;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:0;border-radius:0}.ui-grid-viewport{min-height:20px;position:relative;overflow-y:scroll;-webkit-overflow-scrolling:touch}.ui-grid-viewport:focus{outline:0!important}.ui-grid-canvas{position:relative;padding-top:1px}.ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fff}.ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f8f8f8}.ui-grid-footer-panel-background,.ui-grid-no-row-overlay{background:#fff;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='white', GradientType=0)}.ui-grid-row:last-child .ui-grid-cell{border-bottom-color:#ddd;border-bottom-style:solid}.ui-grid-no-row-overlay{position:absolute;top:0;bottom:0;left:0;right:0;margin:10%;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff);-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ddd;font-size:2em;text-align:center;-webkit-border-radius:0;border-radius:0}.ui-grid-no-row-overlay>*{position:absolute;display:table;margin:auto 0;width:100%;top:0;bottom:0;left:0;right:0;opacity:.66}.ui-grid-cell{overflow:hidden;float:left;background-color:inherit;border-right:1px solid;border-color:#ddd;box-sizing:border-box}.ui-grid-cell:last-child{border-right:0}.ui-grid-cell-contents{padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;height:100%}.ui-grid-cell-contents-hidden{visibility:hidden;width:0;height:0;display:none}.ui-grid-row .ui-grid-cell.ui-grid-row-header-cell{border-bottom:solid 1px #ddd}.ui-grid-footer-panel-background{background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff)}.ui-grid-footer-panel{position:relative;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden;font-weight:700;background:#fff;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='white', GradientType=0);-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:-1px -1px 0 0;border-radius:-1px -1px 0 0}.ui-grid-grid-footer{float:left;width:100%;padding:10px;border-top:1px solid #ddd;box-sizing:border-box}.ui-grid-footer-viewport{overflow:hidden}.ui-grid-footer-canvas{position:relative}.ui-grid-footer-canvas:after,.ui-grid-footer-canvas:before{content:"";display:table;line-height:0}.ui-grid-footer-cell-wrapper{position:relative;display:table;box-sizing:border-box;height:100%}.ui-grid-menu,.ui-grid-menu-button{position:absolute;cursor:pointer;z-index:2}.ui-grid-footer-cell-row{display:table-row}.ui-grid-footer-cell{overflow:hidden;background-color:inherit;border-right:1px solid;border-color:#ddd;box-sizing:border-box;display:table-cell}.ui-grid-footer-cell:last-child{border-right:0}input[type=text].ui-grid-filter-input{padding:0;margin:0;width:100%;border:1px solid #ddd;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:0;border-radius:0}input[type=text].ui-grid-filter-input:hover{border:1px solid #ddd}.ui-grid-menu-button{right:0;top:0;background:#fff;border:none;height:31px;font-weight:400}.ui-grid-menu-button .ui-grid-icon-container{margin-top:3px}.ui-grid-menu-button .ui-grid-menu{right:0}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid{overflow:hidden;border:1px solid #ddd}.ui-grid-menu{padding:0 10px 20px;box-sizing:border-box}.ui-grid-menu .ui-grid-menu-inner{background:#fff;border:1px solid #ddd;position:relative;white-space:nowrap;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.2),inset 0 12px 12px -14px rgba(0,0,0,.2);-moz-box-shadow:0 10px 20px rgba(0,0,0,.2),inset 0 12px 12px -14px rgba(0,0,0,.2);box-shadow:0 10px 20px rgba(0,0,0,.2),inset 0 12px 12px -14px rgba(0,0,0,.2)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{position:absolute;right:0;top:0;display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:1px;font-size:10px;line-height:1;border-radius:2px;color:transparent;background-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover{text-decoration:none}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active{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)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled],fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover{color:transparent;background-color:rgba(0,0,0,0);border-color:transparent}.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active{background-image:none}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:hover,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover{background-color:transparent;border-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button .badge{color:transparent;background-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button>i{opacity:.75;color:#000}.ui-grid-menu .ui-grid-menu-inner ul{margin:0;padding:0;list-style-type:none}.ui-grid-menu .ui-grid-menu-inner ul li{padding:0}.ui-grid-menu .ui-grid-menu-inner ul li button{min-width:100%;padding:8px;text-align:left;background:0 0;border:none}.ui-grid-menu .ui-grid-menu-inner ul li button:focus,.ui-grid-menu .ui-grid-menu-inner ul li button:hover{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,.2);box-shadow:inset 0 0 14px rgba(0,0,0,.2)}.ui-grid-menu .ui-grid-menu-inner ul li button.ui-grid-menu-item-active{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,.2);box-shadow:inset 0 0 14px rgba(0,0,0,.2);background-color:#cecece}.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child)>button{border-bottom:1px solid #ddd}.ui-grid-sortarrow{right:5px;position:absolute;width:20px;top:0;bottom:0;background-position:center}.ui-grid-sortarrow.down{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}@font-face{font-family:ui-grid;src:url(ui-grid.eot);src:url(ui-grid.eot#iefix) format('embedded-opentype'),url(../../assets/css/global/ui-grid.woff) format('woff'),url(../../assets/css/global/ui-grid.ttf) format('truetype'),url(ui-grid.svg?#ui-grid) format('svg');font-weight:400;font-style:normal}[class*=" ui-grid-icon"]:before,[class^=ui-grid-icon]:before{font-family:ui-grid;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.ui-grid-icon-blank::before{width:1em;content:' '}.ui-grid[dir=rtl] .ui-grid-cell,.ui-grid[dir=rtl] .ui-grid-footer-cell,.ui-grid[dir=rtl] .ui-grid-header-cell{float:right!important}.ui-grid[dir=rtl] .ui-grid-column-menu-button{position:absolute;left:1px;top:0;right:inherit}.ui-grid[dir=rtl] .ui-grid-cell:first-child,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child,.ui-grid[dir=rtl] .ui-grid-header-cell:first-child{border-right:0}.ui-grid[dir=rtl] .ui-grid-cell:last-child,.ui-grid[dir=rtl] .ui-grid-header-cell:last-child{border-right:1px solid #ddd;border-left:0}.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar{width:0}.ui-grid[dir=rtl] .ui-grid-menu-button{z-index:2;position:absolute;left:0;right:auto;background:#fff;border:1px solid #ddd;cursor:pointer;min-height:27px;font-weight:400}.ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu{left:0;right:auto}.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button{right:initial;left:0}.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button [class^=ui-grid-icon]{right:initial;left:10px}.ui-grid-animate-spin{-moz-animation:ui-grid-spin 2s infinite linear;-o-animation:ui-grid-spin 2s infinite linear;-webkit-animation:ui-grid-spin 2s infinite linear;animation:ui-grid-spin 2s infinite linear;display:inline-block}@-moz-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.ui-grid-draggable-row{height:30px}.ui-grid-draggable-row-over{position:relative;color:#AAA}.ui-grid-draggable-row-over:before{content:"";display:block;position:absolute;left:0;width:100%;border-bottom:1px dashed #AAA}.ui-grid-draggable-row-over--above:before{top:0}.ui-grid-draggable-row-over--below:before{bottom:0}
\ No newline at end of file
+.audio-portlet .audio-portlet-title,.audio-portlet .audio-portlet-title a{white-space:nowrap;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis}.audio-portlet .audio-portlet-title,h1,h2,h3,h4,h5,h6{font-family:"Open Sans",sans-serif;font-weight:300}.badge,.btn-arrow-link,.btn-lg{vertical-align:middle}.chart-tooltip,.chart-tooltip .label,.chat-form,.dashboard-stat .more,.dashboard-stat2 .display:after,.dashboard-stat2 .progress-info,.dashboard-stat2 .progress-info .progress,.dashboard-stat:after,.dropdown-menu li>a,.feeds li .col1,.feeds li:after,.form .form-actions:after,.general-item-list>.item>.item-head:after,.portlet>.portlet-title:after,.social-icons:after,.tabbable:after,.table-toolbar:after,.tiles .tile .tile-object:after,.tiles:after{clear:both}.inactive-link,a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,fieldset[disabled] a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{pointer-events:none}#faxMessages::-webkit-scrollbar-track{background-color:#fff!important}#faxMessages::-webkit-scrollbar{width:5px}.our-integrations h3{margin-bottom:0;padding:10px;background:#f9f9f9}.our-integrations small{display:block;font-size:12px;color:#999;margin-top:5px}.our-integrations .integration-info{padding:10px;overflow:hidden;background:#f5f5f5}.interval-to{min-height:34px;padding:9px 12px}.audio-portlet .audio-portlet-title{margin-bottom:0;padding:10px;background:#f9f9f9;font-size:17px;margin-top:20px;line-height:1.1;color:inherit}.audio-portlet .audio-portlet-title a{display:block}.audio-portlet .file-info{padding:10px;overflow:hidden;background:#f5f5f5;height:105px}.audio-portlet-wrapper{float:left;margin:0 0 0 20px;-webkit-animation:fadeInUpm .5s;animation:fadeInUpm .5s;-moz-transition:all .5s linear;-webkit-transition:all .5s linear;transition:all .5s linear}.animate-repeat{list-style:none;box-sizing:border-box}.animate-repeat.ng-enter,.animate-repeat.ng-leave,.animate-repeat.ng-move{-webkit-transition:all linear .5s;transition:all linear .5s}.animate-repeat.ng-enter,.animate-repeat.ng-leave.ng-leave-active,.animate-repeat.ng-move{opacity:0;max-height:0}.animate-repeat.ng-enter.ng-enter-active,.animate-repeat.ng-leave,.animate-repeat.ng-move.ng-move-active{opacity:1;max-height:600px}audio{-moz-transition:all .5s linear;-webkit-transition:all .5s linear;transition:all .5s linear;border-radius:0}@media (min-width:502px){.audio-portlet-wrapper{width:240px}.editable-error,audio{width:220px}}@media (max-width:501px){.audio-portlet-wrapper{width:320px}.editable-error,audio{width:300px}}.editable-error{white-space:pre-line}#description_div,.dropdown-menu li>a,.table-scrollable>.table>tbody>tr>th,.table-scrollable>.table>tfoot>tr>td,.table-scrollable>.table>tfoot>tr>th,.table-scrollable>.table>thead>tr>th{white-space:nowrap}#description_div{text-overflow:ellipsis;overflow:hidden;word-wrap:break-word}.portlet-title.collapsible{cursor:pointer}.ui-padding{padding-bottom:200px}div[contenteditable]{max-height:100px;overflow:auto;display:block;width:100%;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}a,button,code,div,img,input,label,li,p,pre,select,span,table,td,textarea,th,ul{-webkit-border-radius:0!important;-moz-border-radius:0!important;border-radius:0!important}.img-circle{border-radius:50%!important}.img-rounded{border-radius:6px!important}body{color:#333;font-family:"Open Sans",sans-serif;padding:0!important;margin:0!important;font-size:13px;direction:ltr}@-ms-viewport{width:device-width}@-o-viewport{width:device-width}@viewport{width:device-width}@-ms-viewport{width:auto!important}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background-color:#eaeaea;border-radius:0;box-shadow:none;border:0}::-webkit-scrollbar-thumb{background-color:#cecece;border-radius:0;box-shadow:none;border:0}::-webkit-scrollbar-thumb:hover{background-color:#aaa}.bars,.chart,.pie,.primary-font{font-family:"Open Sans",sans-serif!important}h1{font-size:33px}h2{font-size:27px}h3{font-size:23px}h4{font-size:17px}h5{font-size:13px}h6{font-size:12px}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#444}h1.block,h2.block,h3.block,h4.block,h5.block,h6.block{padding-top:10px;padding-bottom:10px}a{text-shadow:none;color:#5b9bd1}a:active,a:focus,a:hover{outline:0}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:0}.list-unstyled li>.list-unstyled{margin-left:25px}code{border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.1);-moz-box-shadow:0 1px 4px rgba(0,0,0,.1);box-shadow:0 1px 4px rgba(0,0,0,.1)}.disabled-link .disable-target{opacity:.5!important;filter:alpha(opacity=50)!important}.disabled-link .disable-target:hover,.disabled-link:hover{cursor:not-allowed!important}a:hover{color:#3175af;cursor:pointer}.primary-link{color:#65A0D0;font-weight:600}.primary-link:hover{color:#5194ca}.rounded-2{border-radius:2px!important}.rounded-3{border-radius:3px!important}.rounded-4{border-radius:4px!important}.circle{border-radius:25px!important}.circle-right{border-radius:0 25px 25px 0!important}.circle-left{border-radius:25px 0 0 25px!important}.circle-bottom{border-radius:0 0 25px 25px!important}.circle-top{border-radius:25px 25px 0 0!important}.display-hide,.display-none{display:none}.hidden{display:none!important}.bold{font-weight:700!important}.thin{font-weight:300!important}.uppercase{text-transform:uppercase!important}.fix-margin{margin-left:0!important}.border{border:1px solid red}.font-hg{font-size:23px}.font-lg{font-size:18px}.font-md{font-size:14px}.font-sm{font-size:13px}.font-xs{font-size:11px}.inline{display:inline}.inline-block{display:inline-block}.text-align-reverse{text-align:right}.top-news a,.top-news span{text-align:left;display:block}.no-space{margin:0!important;padding:0!important}.no-margin{margin:0}.margin-bottom-5{margin-bottom:5px}.margin-bottom-10{margin-bottom:10px!important}.margin-top-10{margin-top:10px!important}.margin-top-15{margin-top:15px!important}.margin-bottom-15{margin-bottom:15px!important}.margin-bottom-20{margin-bottom:20px!important}.margin-top-20{margin-top:20px!important}.margin-bottom-25{margin-bottom:25px!important}.margin-bottom-30{margin-bottom:30px!important}.margin-right-10{margin-right:10px!important}.visible-ie8{display:none}.ie8 .visible-ie8{display:inherit!important}.visible-ie9{display:none}.ie9 .visible-ie9{display:inherit!important}.hidden-ie8{display:inherit}.ie8 .hidden-ie8{display:none!important}.hidden-ie9{display:inherit}.ie9 .hidden-ie9{display:none!important}@media (max-width:1024px){.hidden-1024{display:none}}@media (max-width:480px){.hidden-480{display:none}}@media (max-width:320px){.hidden-320{display:none}}.scrollspy-example{position:relative;height:200px;margin-top:10px;overflow:auto}.util-btn-group-margin-bottom-5 .btn-group,.util-btn-margin-bottom-5 .btn{margin-bottom:5px!important}.user-info{margin-bottom:10px!important}.user-info img{float:left;margin-right:5px}.number-stats .stat-left,.number-stats .stat-left .stat-chart{float:right}.user-info .details{display:inline-block}.user-info .label{font-weight:300;font-size:11px}.top-news{color:#fff;margin:8px 0}.top-news em{font-size:13px;margin-bottom:0;font-style:normal;display:block}.top-news em i{font-size:14px}.top-news span{font-size:18px;margin-bottom:5px}.top-news a{padding:10px;position:relative;margin-bottom:10px}.top-news a .top-news-icon{right:8px;bottom:15px;opacity:.3;font-size:35px;position:absolute;filter:alpha(opacity=30)}.blog-images{margin-bottom:0}.blog-images li{padding:0;margin:0;display:inline}.blog-images li a:hover{text-decoration:none}.blog-images li img{width:50px;height:50px;opacity:.6;margin:0 2px 8px}.blog-images li img:hover{opacity:1;box-shadow:0 0 0 4px #72c02c;transition:all .4s ease-in-out 0s;-moz-transition:all .4s ease-in-out 0s;-webkit-transition:all .4s ease-in-out 0s}.sidebar-tags li{padding:0}.sidebar-tags li a{color:#555;font-size:12px;padding:3px 5px;background:#f7f7f7;margin:0 2px 5px 0;display:inline-block}.sidebar-tags li a:hover,.sidebar-tags li a:hover i{background:#EEE;text-decoration:none;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.sidebar-tags li a i{color:#777}.ver-inline-menu{padding:0;margin:0;list-style:none}.ver-inline-menu li{position:relative;margin-bottom:1px}.ver-inline-menu li i{width:37px;height:37px;display:inline-block;color:#b9cbd5;font-size:15px;padding:12px 10px 10px 8px;margin:0 8px 0 0;text-align:center;background:#e0eaf0!important}.ver-inline-menu li a{font-size:14px;font-weight:300;color:#557386;display:block;background:#f0f6fa;border-left:solid 2px #c4d5df}.ver-inline-menu li:hover a{background:#e0eaf0;text-decoration:none}.ver-inline-menu li:hover i{color:#fff;background:#c4d5df!important}.ver-inline-menu li.active a{border-left:solid 2px #0c91e5}.ver-inline-menu li.active i{background:#0c91e5!important}.ver-inline-menu li.active a,.ver-inline-menu li.active i{color:#fff;background:#169ef4;text-decoration:none}.ver-inline-menu li.active a,.ver-inline-menu li:hover a{font-size:14px}.ver-inline-menu li.active:after{content:'';display:inline-block;border-bottom:6px solid transparent;border-top:6px solid transparent;border-left:6px solid #169ef4;position:absolute;top:12px;right:-5px}.list-separated{margin-top:10px;margin-bottom:15px}.list-separated>div{border-right1:1px solid #f5f5f5}.list-separated>div:last-child{border-right:0}@media (max-width:767px){.ver-inline-menu>li.active:after{display:none}.list-separated>div{margin-bottom:20px}}.number-stats{margin:10px 0}.number-stats .stat-number{display:inline-block;margin:0 5px}.number-stats .stat-number .title{font-size:13px;margin-bottom:3px;color:#B8C3C7}.number-stats .stat-number .number{font-size:27px;line-height:27px;color:#7D8C9D}.number-stats>div{border-right:1px solid #f5f5f5}.number-stats>div:last-child{border-right:0}.number-stats .stat-left .stat-number{float:right;text-align:right}.number-stats .stat-right{float:left!important}.number-stats .stat-right .stat-number{float:left;text-align:left}.number-stats .stat-right .stat-chart{float:left}.number-stats .stat-number{float:left;text-align:left}.number-stats .stat-chart{display:inline-block;margin:0 5px;float:left}.general-item-list>.item{padding:10px 0;border-bottom:1px solid #F1F4F7}.general-item-list>.item:last-child{border-bottom:0}.general-item-list>.item>.item-head{margin-bottom:5px}.general-item-list>.item>.item-head:after,.general-item-list>.item>.item-head:before{content:" ";display:table}.general-item-list>.item>.item-head>.item-details{display:inline-block;float:left}.general-item-list>.item>.item-head>.item-details>.item-pic{height:35px;margin-right:10px;-webkit-border-radius:100%;-moz-border-radius:100%;-ms-border-radius:100%;-o-border-radius:100%;border-radius:100%}.general-item-list>.item>.item-head>.item-details>.item-name{display:inline-block;margin-right:10px}.general-item-list>.item>.item-head>.item-details>.item-label{color:#C0C9CC}.general-item-list>.item>.item-head>.item-status{color:#C0C9CC;top:10px;position:relative;display:inline-block;float:right}.general-item-list>.item>.item-head>.item-status>.badge{margin-top:-2px}.general-item-list>.item>.item-body{color:#96a5aa}.file-drop-zone{border:2px dashed #ddd;padding:30px;text-align:center}.file-drop-zone.file-drop-zone-over{border-color:#aaa}[class*=" fa-"],[class*=" glyphicon-"],[class*=" icon-"],[class^=fa-],[class^=glyphicon-],[class^=icon-]{display:inline-block;margin-top:1px;font-size:14px;line-height:14px;-webkit-font-smoothing:antialiased}li [class*=" fa-"],li [class*=" glyphicon-"],li [class*=" icon-"],li [class^=fa-],li [class^=glyphicon-],li [class^=icon-]{display:inline-block;width:1.25em;text-align:center}li [class*=" glyphicon-"],li [class^=glyphicon-]{top:2px}li [class*=" icon-"],li [class^=icon-]{top:1px;position:relative}li [class*=" fa-"].icon-large,li [class*=" glyphicon-"].icon-large,li [class*=" icon-"].icon-large,li [class^=fa-].icon-large,li [class^=glyphicon-].icon-large,li [class^=icon-].icon-large{width:1.5625em}.fa-sm,.icon-sm{font-size:12px}.fa-lg,.icon-lg{font-size:16px!important}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.icon-state-default{color:#c6c6c6}.icon-state-success{color:#45B6AF}.icon-state-info{color:#89C4F4}.icon-state-warning{color:#dfba49}.icon-state-danger{color:#F3565D}.fa-item{font-size:14px;padding:10px 10px 10px 20px}.fa-item i{font-size:16px;display:inline-block;width:20px;color:#333}.fa-item:hover{cursor:pointer;background:#eee}.badge-danger,.badge-default,.badge-info,.badge-primary,.badge-success,.badge-warning{background-image:none}.simplelineicons-demo .item-box{display:inline-block;font-size:16px;margin:0 -.22em 1em 0;padding-left:1em;width:100%}.simplelineicons-demo .item-box .item{background-color:#fff;color:#33383e;border-radius:8px;display:inline-block;padding:10px;width:100%}.bs-glyphicons,.glyphicons-demo ul{padding-left:0;padding-bottom:1px;margin-bottom:20px;overflow:hidden;list-style:none}.simplelineicons-demo .item-box .item span{font-size:22px}@media only screen and (min-width:768px){.simplelineicons-demo .item-box{width:33.333%}}.bs-glyphicon-class{text-align:center}.glyphicons-demo ul li{float:left;width:25%;height:115px;padding:10px;margin:0 -1px -1px 0;font-size:14px;line-height:1.4;text-align:center;border:1px solid #ddd}.glyphicons-demo .glyphicon{display:block;margin:5px auto 10px;font-size:24px;color:#444}.glyphicons-demo ul li:hover{background-color:rgba(86,61,124,.1)}.badge-default,.label-default{background-color:#c6c6c6}@media (min-width:768px){.glyphicons-demo ul li{width:12.5%}}.alert.alert-borderless{border:0}.badge{font-size:11px!important;font-weight:300;height:18px;padding:3px 6px;-webkit-border-radius:12px!important;-moz-border-radius:12px!important;border-radius:12px!important;text-shadow:none!important;text-align:center}.badge.badge-roundless{-webkit-border-radius:0!important;-moz-border-radius:0!important;border-radius:0!important}.badge.badge-empty{display:inline-block;padding:0;min-width:8px;height:8px;width:8px}.badge-primary{background-color:#428bca}.badge-info{background-color:#89C4F4}.badge-success{background-color:#45B6AF}.badge-danger{background-color:#F3565D}.badge-warning{background-color:#dfba49}.nav.nav-pills>li>a>.badge,.nav.nav-stacked>li>a>.badge{margin-top:-2px}.dropdown-menu>li>a>.badge{position:absolute;margin-top:1px;right:3px;display:inline;font-size:11px;font-weight:300;text-shadow:none;height:18px;padding:3px 6px;text-align:center;vertical-align:middle;-webkit-border-radius:12px!important;-moz-border-radius:12px!important;border-radius:12px!important}.btn,.btn>i{font-size:14px}.dropdown-menu.badge-roundless{-webkit-border-radius:0!important;-moz-border-radius:0!important;border-radius:0!important}.btn{border-width:0;padding:7px 14px;outline:0!important;background-image:none!important;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;text-shadow:none}.btn-group .btn.dropdown-toggle,.btn.active,.btn.dropdown-toggle,.btn:active,.btn:disabled,.btn:focus,.btn:hover,.btn[disabled]{outline:0!important;background-image:none!important;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;text-shadow:none}.btn-default{border-width:1px;padding:6px 13px;color:#333;background-color:#fff;border-color:#ccc}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open .btn-default.dropdown-toggle{color:#333;background-color:#ededed;border-color:#b3b3b3}.btn-default.active,.btn-default:active{background-image:none;background-color:#e0e0e0}.btn-default.active:hover,.btn-default:active:hover{background-color:#e6e6e6}.open .btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.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:active,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-default>i{color:#aaa}.btn-default>i[class*=icon-],.btn-default>i[class^=icon-]{color:#8c8c8c}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open .btn-primary.dropdown-toggle{color:#fff;background-color:#3379b5;border-color:#2a6496}.btn-primary.active,.btn-primary:active{background-image:none;background-color:#2d6ca2}.btn-primary.active:hover,.btn-primary:active:hover{background-color:#3071a9}.open .btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.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:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#45B6AF;border-color:#3ea49d}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open .btn-success.dropdown-toggle{color:#fff;background-color:#3b9c96;border-color:#307f7a}.btn-success.active,.btn-success:active{background-image:none;background-color:#348a84}.btn-success.active:hover,.btn-success:active:hover{background-color:#37918b}.open .btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.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:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#45B6AF;border-color:#3ea49d}.btn-success .badge{color:#45B6AF;background-color:#fff}.btn-info{color:#fff;background-color:#89C4F4;border-color:#72b8f2}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open .btn-info.dropdown-toggle{color:#fff;background-color:#68b4f1;border-color:#43a1ed}.btn-info.active,.btn-info:active{background-image:none;background-color:#51a8ef}.btn-info.active:hover,.btn-info:active:hover{background-color:#5aadf0}.open .btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.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:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#89C4F4;border-color:#72b8f2}.btn-info .badge{color:#89C4F4;background-color:#fff}.btn-warning{color:#fff;background-color:#dfba49;border-color:#dbb233}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open .btn-warning.dropdown-toggle{color:#fff;background-color:#daae2b;border-color:#bb9521}.btn-warning.active,.btn-warning:active{background-image:none;background-color:#c89f23}.btn-warning.active:hover,.btn-warning:active:hover{background-color:#d0a625}.open .btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.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:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#dfba49;border-color:#dbb233}.btn-warning .badge{color:#dfba49;background-color:#fff}.btn-danger{color:#fff;background-color:#F3565D;border-color:#f13e46}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open .btn-danger.dropdown-toggle{color:#fff;background-color:#f1353d;border-color:#ec111b}.btn-danger.active,.btn-danger:active{background-image:none;background-color:#ef1d26}.btn-danger.active:hover,.btn-danger:active:hover{background-color:#f0262f}.open .btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.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:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#F3565D;border-color:#f13e46}.btn-danger .badge{color:#F3565D;background-color:#fff}.btn-lg,.btn-lg>i{font-size:18px}.btn-lg{padding:10px 16px;line-height:1.33}.btn-sm,.btn-xs{padding:4px 10px 5px;font-size:13px;line-height:1.5}.btn-sm>i,.btn-xs>i{font-size:13px}.btn-xs{padding:1px 5px}.btn-group .input-sm .btn-default{padding-top:3px;padding-bottom:3px}.btn-arrow-link{display:inline-block;font-size:13px}.btn-arrow-link>i{font-size:14px;line-height:14px;vertical-align:top;margin:2px 3px;color:#999}.btn-arrow-link.btn-arrow-link-lg{font-size:14px}.btn-arrow-link.btn-arrow-link-lg>i{font-size:16px;line-height:16px;margin:2px 3px 1px}.btn-circle{border-radius:25px!important}.btn-circle-right{border-radius:0 25px 25px 0!important}.btn-circle-left{border-radius:25px 0 0 25px!important}.btn-circle-bottom{border-radius:0 0 25px 25px!important}.btn-circle-top{border-radius:25px 25px 0 0!important}.btn-icon-only{height:34px;width:34px;text-align:center;padding-left:0;padding-right:0}.btn-icon-only>[class^=icon-],.btn-icon-only>i{text-align:center;margin-top:2px}.btn-sm>[class*=" glyphicon-"],.btn-sm>[class^=glyphicon-],.btn-sm>i{font-size:13px}.btn-xs>[class*=" glyphicon-"],.btn-xs>[class^=glyphicon-],.btn-xs>i{font-size:11px}.btn-group.btn-group-circle>.btn:first-child{border-radius:25px 0 0 25px!important}.btn-group.btn-group-circle>.btn:last-child{border-radius:0 25px 25px 0!important}.btn-group.btn-group-devided>.btn{margin-right:5px}.btn-group.btn-group-devided>.btn:last-child{margin-right:0}.btn-group-vertical.btn-group-vertical-circle>.btn:first-child{border-radius:25px 25px 0 0!important}.btn-group-vertical.btn-group-vertical-circle>.btn:last-child{border-radius:0 0 25px 25px!important}.carousel.image-carousel .carousel-inner{padding-top:0;padding-bottom:0}.carousel.image-carousel .carousel-control i{position:absolute;top:40%}.carousel.image-carousel.image-carousel-hoverable .carousel-control i{display:none}.carousel.image-carousel.image-carousel-hoverable:hover .carousel-control i{display:inline-block}.carousel.image-carousel .carousel-control.left i{left:10px}.carousel.image-carousel .carousel-control.right i{right:10px}.carousel.image-carousel .carousel-indicators{margin-top:10px;bottom:-7px}.carousel.image-carousel .carousel-indicators li,.carousel.image-carousel .carousel-indicators li.active{background-color:#666}.carousel.image-carousel .carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px 15px 25px;background:#333;background:rgba(0,0,0,.75)}.carousel.image-carousel .carousel-caption h2,.carousel.image-carousel .carousel-caption h3,.carousel.image-carousel .carousel-caption h4,.carousel.image-carousel .carousel-caption p{text-align:left;line-height:20px;color:#fff}.carousel.image-carousel .carousel-caption h2,.carousel.image-carousel .carousel-caption h3,.carousel.image-carousel .carousel-caption h4{margin:0 0 5px}.carousel.image-carousel .carousel-caption h2 a,.carousel.image-carousel .carousel-caption h3 a,.carousel.image-carousel .carousel-caption h4 a{color:#aaa}.carousel.image-carousel .carousel-caption p{margin-bottom:0}.carousel.image-carousel .carousel-caption .item{margin:0}.bars,.chart,.pie{overflow:hidden;height:300px;width:100%;font-size:14px}.item-list.table .percent{width:30px;float:right;margin-right:10px;margin-top:3px}.chart-tooltip{z-index:100;background-color:#736e6e!important;padding:5px!important;color:#fff}.chart-tooltip .label{display:block;margin-bottom:2px}.bar-chart,.line-chart{display:none}.chats{margin:-15px 0 0;padding:0}.chats li{list-style:none;padding:5px 0;margin:10px auto;font-size:12px}.chats li .body{display:block}.chats li .avatar{height:45px;width:45px;-webkit-border-radius:50%!important;-moz-border-radius:50%!important;border-radius:50%!important}.chats li.in .avatar{float:left;margin-right:10px}.chats li.out .avatar{float:right;margin-left:10px}.chats li .name{color:#3590c1;font-size:13px;font-weight:400}.chats li .datetime{color:#333;font-size:13px;font-weight:400}.chats li .message{border-radius:5px!important;-webkit-border-readius:5px!important;-moz-border-radius:5px!important;display:block;padding:5px 20px;position:relative}.chats li.in .message{text-align:left;border:2px solid #E9E9E9;margin-left:65px;box-shadow:0 5px 10px #777}.chats li.in .message .arrow{display:block;position:absolute;top:15px;left:-8px;width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;border-right:8px solid #e9e9e9}.chats li.out .message{border:2px solid #DFEECF;margin-right:65px;margin-left:5px;box-shadow:0 5px 10px #777}.chats li.out .message .arrow{display:block;position:absolute;top:15px;right:-8px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid #DFEECF}.chats li.out .datetime,.chats li.out .name{text-align:right}.chats li .note{color:#000;-moz-box-shadow:5px 5px 7px rgba(33,33,33,1);-webkit-box-shadow:5px 5px 7px rgba(33,33,33,.7);box-shadow:5px 5px 7px rgba(33,33,33,.7);-moz-transition:-moz-transform .15s linear;-o-transition:-o-transform .15s linear;-webkit-transition:-webkit-transform .15s linear;-webkit-transform:rotate(-1deg);-o-transform:rotate(-1deg);-moz-transform:rotate(-1deg);font-family:"Reenie Beanie",arial,sans-serif;font-size:200%;background:#ffc}.chats li.out .note{border:2px solid #DFEECF;margin-right:65px;margin-left:5px;box-shadow:0 5px 10px #777}.chats li.out .note .arrow{display:block;position:absolute;top:15px;right:-8px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid #DFEECF}.chat-form{margin-top:15px;padding:10px;background-color:#e9eff3;overflow:hidden}.chat-form .input-cont{margin-right:40px}.chat-form .input-cont .form-control{border:1px solid #ddd;width:100%!important;margin-top:0;background-color:#fff!important}.chat-form .input-cont .form-control:focus{border:1px solid #4b8df9!important}.chat-form .btn-cont{margin-top:-42px;position:relative;float:right;width:44px}.chat-form .btn-cont .arrow{position:absolute;top:17px;right:43px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-right:8px solid #4d90fe;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chat-form .btn-cont .btn{margin-top:8px}.chat-form .btn-cont:hover .arrow{border-right-color:#0362fd}.chat-form .btn-cont:hover .btn{background-color:#0362fd}.close{display:inline-block;margin-top:0;margin-right:0;width:9px;height:9px;background-repeat:no-repeat!important;text-indent:-10000px;outline:0;background-image:url(../../assets/images/remove-icon-small.png)!important}.dropdown.open>.dropdown-toggle,.dropup.open>.dropdown-toggle{border-color:#ddd}.dropdown-menu{min-width:175px;position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;list-style:none;text-shadow:none;padding:0;margin:10px 0 0;background-color:#fffff;box-shadow:5px 5px rgba(102,102,102,.1);border:1px solid #eee;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.dropdown-menu li.divider{background:#f1f3f6}.dropdown-menu li>a{padding:8px 14px;color:#555;text-decoration:none;display:block;font-weight:300;line-height:18px}.dropdown-menu li>a>[class*=" fa-"],.dropdown-menu li>a>[class^=fa-]{color:#888}.dropdown-menu li>a>[class*=" icon-"],.dropdown-menu li>a>[class^=icon-]{color:#666}.dropdown-menu li>a>[class*=" glyphicon-"],.dropdown-menu li>a>[class^=glyphicon-]{color:#888}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:hover{text-decoration:none;background-image:none;background-color:#f6f6f6;color:#555;filter:none}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px}.btn-group>.dropdown-menu,.dropdown-toggle>.dropdown-menu,.dropdown>.dropdown-menu{margin-top:10px}.btn-group>.dropdown-menu:before,.dropdown-toggle>.dropdown-menu:before,.dropdown>.dropdown-menu:before{position:absolute;top:-8px;left:9px;right:auto;display:inline-block!important;border-right:8px solid transparent;border-bottom:8px solid #e0e0e0;border-left:8px solid transparent;content:''}.btn-group>.dropdown-menu:after,.dropdown-toggle>.dropdown-menu:after,.dropdown>.dropdown-menu:after{position:absolute;top:-7px;left:10px;right:auto;display:inline-block!important;border-right:7px solid transparent;border-bottom:7px solid #fff;border-left:7px solid transparent;content:''}.btn-group>.dropdown-menu.pull-left:before,.dropdown-toggle>.dropdown-menu.pull-left:before,.dropdown>.dropdown-menu.pull-left:before{left:auto;right:9px}.btn-group>.dropdown-menu.pull-left:after,.dropdown-toggle>.dropdown-menu.pull-left:after,.dropdown>.dropdown-menu.pull-left:after{left:auto;right:10px}.btn-group>.dropdown-menu.pull-right:before,.dropdown-toggle>.dropdown-menu.pull-right:before,.dropdown>.dropdown-menu.pull-right:before{left:auto;right:9px}.btn-group>.dropdown-menu.pull-right:after,.dropdown-toggle>.dropdown-menu.pull-right:after,.dropdown>.dropdown-menu.pull-right:after{left:auto;right:10px}.btn-group.dropup>.dropdown-menu,.dropdown-toggle.dropup>.dropdown-menu,.dropdown.dropup>.dropdown-menu{margin-top:0;margin-bottom:10px}.btn-group.dropup>.dropdown-menu:after,.btn-group.dropup>.dropdown-menu:before,.dropdown-toggle.dropup>.dropdown-menu:after,.dropdown-toggle.dropup>.dropdown-menu:before,.dropdown.dropup>.dropdown-menu:after,.dropdown.dropup>.dropdown-menu:before{display:none!important}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:5px;left:100%;margin-top:-6px;margin-left:-1px}.dropdown-submenu>a:after{position:absolute;display:inline-block;font-size:14px;right:7px;top:7px;font-family:FontAwesome;height:auto;content:"\f105";font-weight:300}.label,.table.table-light>thead>tr>th{font-family:"Open Sans",sans-serif}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px}.nav.pull-right>li>.dropdown-menu,.nav>li>.dropdown-menu.pull-right{right:0;left:auto}.nav.pull-right>li>.dropdown-menu:before,.nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.nav.pull-right>li>.dropdown-menu:after,.nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.nav.pull-right>li>.dropdown-menu .dropdown-menu,.nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:absolute;float:left;width:auto;margin-top:0;background-color:#fff;border:1px solid #efefef;box-shadow:5px 5px rgba(102,102,102,.1)}.navbar-nav .open .dropdown-menu>li>a{padding:6px 0 6px 13px;color:#333}.navbar-nav .open .dropdown-menu>li>a:active,.navbar-nav .open .dropdown-menu>li>a:hover{ackground-color:#eee}}.feeds li .col1,.feeds li .col1>.cont>.cont-col2{width:100%;float:left}.dropdown-checkboxes,.dropdown-content,.dropdown-radiobuttons{padding:5px}.dropdown-content form{margin:0}.dropdown.inline .dropdown-menu{display:inline-block;position:relative}.dropdown-checkboxes label,.dropdown-radiobuttons label{display:block;font-weight:300;color:#333;margin-bottom:4px;margin-top:4px}.dropdown-checkboxes label .radio,.dropdown-radiobuttons label .radio{margin-right:3px}.feeds{margin:0;padding:0;list-style:none}.feeds li{background-color:#fafafa;color:#82949a;margin-bottom:7px}.feeds li:after,.feeds li:before{display:table;line-height:0;content:""}.feeds li:last-child{margin-bottom:0}.feeds li .col1>.cont{float:left;margin-right:75px;overflow:hidden}.feeds li .col1>.cont>.cont-col1{float:left;margin-right:-100%}.feeds li .col1>.cont>.cont-col1>.label{display:inline-block;padding:5px 4px 6px 5px;vertical-align:middle;text-align:center}.feeds li .col1>.cont>.cont-col1>.label>i{text-align:center;font-size:14px}.feeds li .col1>.cont>.cont-col2>.desc{margin-left:35px;padding-top:4px;padding-bottom:5px;overflow:hidden}.modal,.modal-open{overflow-y:auto!important}.feeds li .col2{float:left;width:75px;margin-left:-75px}.feeds li .col2>.date{padding:4px 9px 5px 4px;text-align:right;font-style:italic;color:#c1cbd0}.static-info{margin-bottom:10px}.static-info .name{font-size:14px}.static-info .value{font-size:14px;font-weight:600}.static-info.align-reverse .name,.static-info.align-reverse .value{text-align:right}.help-block{margin-top:5px;margin-bottom:5px}.help-inline{font-size:13px;color:#737373;display:inline-block;padding:5px}.form-inline input{margin-bottom:0!important}.control-label{margin-top:1px}.control-label .required{color:#e02222;font-size:12px;padding-left:2px}.form{padding:0!important}.form .form-body{padding:10px}.portlet.light .form .form-body{padding-left:0;padding-right:0}.form .form-actions{padding:20px 10px;margin:0;background-color:#f5f5f5;border-top:1px solid #e5e5e5}.portlet.light .form .form-actions{background:0 0;padding-left:0;padding-right:0}.portlet .form .form-actions{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.form .form-actions:after,.form .form-actions:before{content:" ";display:table}.form .form-actions.right{padding-left:0;padding-right:10px;text-align:right}.portlet.light .form .form-actions.right{padding-right:0}.form .form-actions.left{padding-left:10px;padding-right:0;text-align:left}.checkbox-list>label.checkbox-inline:first-child,.checkbox>label,.form-horizontal .checkbox>label,.portlet.light .form .form-actions.left,.radio-list>label.radio-inline:first-child{padding-left:0}.form .form-actions.nobg{background-color:transparent}.form .form-actions.top{margin-top:0;margin-bottom:20px;border-top:0;border-bottom:1px solid #e5e5e5}.portlet.light .form .form-actions.top{background:0 0}.form .form-actions .btn-set{display:inline-block}@media (max-width:767px){.form .form-actions .btn-set{margin-bottom:3px;margin-top:3px;float:left!important}}.form .form-section{margin:30px 0 25px;padding-bottom:5px;border-bottom:1px solid #eee}.form .form-bordered .form-group .help-block,.form .form-row-seperated .form-group .help-block,.form-horizontal .radio-list>label{margin-bottom:0}.form .form-section:first-child{margin-top:5px}.checkbox,.form-horizontal .checkbox{padding:0}.checkbox-list>label{display:block}.checkbox-list>label.checkbox-inline{display:inline-block}.input-icon>i,.radio-list>label{display:block}.form-control-static,.icon-btn,.input-inline,.radio-list>label.radio-inline{display:inline-block}.form-horizontal .radio-list .radio{padding-top:1px}.form-horizontal .radio>span{margin-top:2px}.form .form-row-seperated .portlet-body{padding:0}.form .form-row-seperated .form-group{margin:0;border-bottom:1px solid #efefef;padding:15px 0}.form .form-row-seperated .form-group.last{border-bottom:0;margin-bottom:0;padding-bottom:13px}.form .form-row-seperated .form-body{padding:0}.form .form-row-seperated .form-actions{padding-left:15px!important;padding-right:15px!important}.form .form-bordered .form-group{margin:0;border-bottom:1px solid #efefef}.form .form-bordered .form-group>div{padding:15px;border-left:1px solid #efefef}.form .form-bordered .form-group.last{border-bottom:0}.form .form-bordered .form-group .control-label{padding-top:20px}@media (max-width:991px){.form .form-bordered .form-group>div{border-left:0}.form .form-bordered .form-group .control-label{padding-top:10px}}.form .form-bordered .form-group .form-control{margin:0}.form .form-bordered .form-body{margin:0;padding:0}.form .form-bordered .form-actions{margin-top:0;padding-left:16px!important;padding-right:16px!important}@media (max-width:991px){.form .form-bordered .form-actions{padding-left:15px!important;padding-right:15px!important}}.form .form-horizontal.form-bordered.form-row-stripped .form-group:nth-child(even){background-color:#fcfcfc}.form .form-horizontal.form-bordered.form-row-stripped .form-control{background:#fff!important}.form .form-horizontal.form-bordered.form-label-stripped .form-group:nth-child(even)>div{background-color:#fff}.form .form-horizontal.form-bordered.form-label-stripped .form-group:nth-child(even){background-color:#fcfcfc}.form-control::-moz-placeholder{color:#b3b3b3;opacity:1}.form-control:-ms-input-placeholder{color:#b3b3b3}.form-control::-webkit-input-placeholder{color:#b3b3b3}.form-control{font-size:14px;font-weight:400;color:#333;background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:none;box-shadow:none;-webkit-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:#999;outline:0;-webkit-box-shadow:none;box-shadow:none}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}.form-control.height-auto{height:auto}.form-control.form-control-solid{background-color:#F1F3F8;border-color:#F1F3F8;color:#A6B2BA}.note .highlight,.note code,.uneditable-input{background-color:#fff}.form-control.form-control-solid:focus{border-color:#e3e7f1}.form-control.form-control-solid::-moz-placeholder{color:#acb7be;opacity:1}.form-control.form-control-solid:-ms-input-placeholder{color:#acb7be}.form-control.form-control-solid::-webkit-input-placeholder{color:#acb7be}.uneditable-input{padding:6px 12px;min-width:206px;font-size:14px;font-weight:400;height:34px;color:#333;border:1px solid #e5e5e5;-webkit-box-shadow:none;box-shadow:none;-webkit-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}.icon-btn,.icon-btn:hover{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease}.input-mini{width:45px!important}.input-xsmall{width:80px!important}.input-small{width:145px!important}.input-medium{width:240px!important}.input-large{width:320px!important}.input-xlarge{width:420px!important}.input-inline{width:auto;vertical-align:middle}.form-group .input-inline{margin-right:5px}.input-sm{height:28px;padding:5px 10px;font-size:13px}select.input-sm{height:28px;line-height:28px;padding:2px 10px}@media (max-width:768px){.input-large{width:250px!important}.input-xlarge{width:300px!important}}.input-group .btn-default{border-color:#e5e5e5}.input-group .input-group-addon{border-color:#e5e5e5;background:#e5e5e5;min-width:39px}.input-group .input-group-addon>i{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .help-inline,.has-success .radio,.has-success .radio-inline{color:#3c763d}input[type=text].spinner,input[type=password].spinner,input[type=datetime].spinner,input[type=datetime-local].spinner,input[type=date].spinner,input[type=month].spinner,input[type=time].spinner,input[type=week].spinner,input[type=number].spinner,input[type=email].spinner,input[type=url].spinner,input[type=search].spinner,input[type=tel].spinner,input[type=color].spinner{background-image:url(../../assets/images/input-spinner.gif)!important;background-repeat:no-repeat;background-position:right 8px}label{font-weight:400;font-size:14px}.form-control-static{margin:2px 0}.has-success .form-control{border-color:#d6e9c6;-webkit-box-shadow:none;box-shadow:none}.has-success .form-control:focus{border-color:#bbdba1;-webkit-box-shadow:none;box-shadow:none}.has-success .input-group-addon{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .help-inline,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#faebcc;-webkit-box-shadow:none;box-shadow:none}.has-warning .form-control:focus{border-color:#f5d89e;-webkit-box-shadow:none;box-shadow:none}.has-warning .input-group-addon{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .help-inline,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#ebccd1;-webkit-box-shadow:none;box-shadow:none}.has-error .form-control:focus{border-color:#dca7b0;-webkit-box-shadow:none;box-shadow:none}.has-error .input-group-addon{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.input-circle{border-radius:25px!important}.input-circle-right{border-radius:0 25px 25px 0!important}.input-circle-left{border-radius:25px 0 0 25px!important}.input-circle-bottom{border-radius:0 0 25px 25px!important}.input-circle-top{border-radius:25px 25px 0 0!important}.icon-btn{height:60px;min-width:80px;margin:5px 5px 0 0;border:1px solid #ddd;padding:12px 0 0;background-color:#fafafa;background-image:none;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:#646464;text-shadow:none;text-align:center;cursor:pointer;position:relative;transition:all .3s ease}.loading-message,.page-loading{min-width:125px;vertical-align:middle}[class^=m-icon-],[class^=m-icon-big-]{background-image:url(../../assets/images/syncfusion-icons.png);background-position:0 0;background-repeat:no-repeat}.icon-btn:hover,.icon-btn:hover>.badge{-webkit-box-shadow:none;-moz-box-shadow:none}.icon-btn:hover{text-decoration:none;border-color:#999;color:#444;text-shadow:0 1px 0 #fff;transition:all .3s ease;box-shadow:none}.icon-btn:hover>.badge{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;box-shadow:none}.icon-btn>div{margin-top:5px;margin-bottom:20px;color:#000;font-size:12px;font-weight:300}.icon-btn>.badge{position:absolute;font-size:11px;font-weight:300;top:-5px;right:-5px;padding:3px 6px;color:#fff;text-shadow:none;border-width:0;border-style:solid;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.input-group .input-icon>.form-control,.tabs-left.nav-tabs>li>a:focus,.tabs-left.nav-tabs>li>a:hover{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-ms-border-radius:4px 0 0 4px;-o-border-radius:4px 0 0 4px}.icon-btn>i{font-size:18px}.ie8 .icon-btn:hover{filter:none}.input-icon{position:relative}.input-icon>.form-control{padding-left:33px}.input-group .input-icon>.form-control{border-radius:4px 0 0 4px}.input-icon>i{color:#ccc;position:absolute;margin:11px 2px 4px 10px;z-index:3;width:16px;height:16px;font-size:16px;text-align:center}.modal .input-icon>i{z-index:10055}.has-success .input-icon>i{color:#45B6AF}.has-warning .input-icon>i{color:#dfba49}.has-info .input-icon>i{color:#89C4F4}.has-error .input-icon>i{color:#F3565D}.input-icon.right>.form-control{padding-right:33px;padding-left:12px}.input-group .input-icon.right>.form-control{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-icon.right>i{right:8px;float:right}.input-icon.input-icon-lg>i{margin-top:16px}.input-icon.input-icon-sm>i{margin-top:8px;font-size:13px}.label{text-shadow:none!important;font-size:13px;font-weight:300;padding:3px 6px;color:#fff}.label.label-sm{font-size:12px;padding:0 4px 1px}h1 .label,h2 .label,h3 .label,h4 .label,h5 .label,h6 .label{font-size:75%}.label-default[href]:focus,.label-default[href]:hover{background-color:#adadad}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#45B6AF}.label-success[href]:focus,.label-success[href]:hover{background-color:#37918b}.label-info{background-color:#89C4F4}.label-info[href]:focus,.label-info[href]:hover{background-color:#5aadf0}.label-warning{background-color:#dfba49}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#d0a625}.label-danger{background-color:#F3565D}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#f0262f}.label.label-icon{padding:4px 0 4px 4px;margin-right:2px;text-align:center!important}.label.label-icon>i{font-size:12px;text-align:center!important}.note p,.page-loading,.panel .panel-body{font-size:13px}.ie8 .label.label-icon,.ie9 .label.label-icon{padding:3px 0 3px 3px}.text-default{color:#c6c6c6}.text-primary{color:#428bca}.text-success{color:#45B6AF}.text-info{color:#89C4F4}.text-warning{color:#dfba49}.text-danger{color:#F3565D}.list-group .list-group-item-success{color:#3c763d;background-color:#dff0d8}.list-group a.list-group-item-success{color:#3c763d}.list-group a.list-group-item-success .list-group-item-heading{color:inherit}.list-group a.list-group-item-success:focus,.list-group a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}.list-group a.list-group-item-success.active,.list-group a.list-group-item-success.active:focus,.list-group a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group .list-group-item-info{color:#31708f;background-color:#d9edf7}.list-group a.list-group-item-info{color:#31708f}.list-group a.list-group-item-info .list-group-item-heading{color:inherit}.list-group a.list-group-item-info:focus,.list-group a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}.list-group a.list-group-item-info.active,.list-group a.list-group-item-info.active:focus,.list-group a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group .list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}.list-group a.list-group-item-warning{color:#8a6d3b}.list-group a.list-group-item-warning .list-group-item-heading{color:inherit}.list-group a.list-group-item-warning:focus,.list-group a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}.list-group a.list-group-item-warning.active,.list-group a.list-group-item-warning.active:focus,.list-group a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group .list-group-item-danger{color:#a94442;background-color:#f2dede}.list-group a.list-group-item-danger{color:#a94442}.list-group a.list-group-item-danger .list-group-item-heading{color:inherit}.list-group a.list-group-item-danger:focus,.list-group a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}.list-group a.list-group-item-danger.active,.list-group a.list-group-item-danger.active:focus,.list-group a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.loading-message{display:inline-block;padding:10px;margin:0 auto;color:#000!important;font-size:13px;font-weight:400;text-align:center}.loading-message.loading-message-boxed{border:1px solid #ddd;background-color:#eee;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 8px rgba(0,0,0,.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,.1);box-shadow:0 1px 8px rgba(0,0,0,.1)}.loading-message>span{line-height:20px;vertical-align:middle}.page-loading{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;position:fixed;top:50%;left:50%;margin-left:-60px;margin-top:-30px;padding:7px;text-align:center;color:#333;border:1px solid #ddd;background-color:#eee;-webkit-box-shadow:0 1px 8px rgba(0,0,0,.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,.1);box-shadow:0 1px 8px rgba(0,0,0,.1)}.block-spinner-bar>div,.page-spinner-bar>div{border-radius:100%!important;display:inline-block}.panel,.well{-webkit-box-shadow:none!important;-moz-box-shadow:none!important}.page-loading>span{line-height:20px;vertical-align:middle}.page-spinner-bar{position:fixed;z-index:10051;width:100px;top:40%;left:50%;margin-left:-55px;text-align:center}.page-spinner-bar>div{margin:0 5px;width:18px;height:18px;-webkit-animation:bounceDelay 1.4s infinite ease-in-out;animation:bounceDelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.page-spinner-bar .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.page-spinner-bar .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}.block-spinner-bar{display:inline-block;width:80px;text-align:center}.block-spinner-bar>div{margin:0 2px;width:15px;height:15px;-webkit-animation:bounceDelay 1.4s infinite ease-in-out;animation:bounceDelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.note,.tabs-right.nav-tabs>li>a:focus,.tabs-right.nav-tabs>li>a:hover{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0}.block-spinner-bar .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.block-spinner-bar .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}[class^=m-icon-]{display:inline-block;width:14px;height:14px;margin-top:3px;line-height:14px;vertical-align:top}[class^=m-icon-big-]{display:inline-block;width:30px;height:30px;margin:6px;vertical-align:middle}.btn.m-icon-big{padding:9px 16px 8px}.btn.m-icon-big.m-icon-only{padding:9px 8px 8px 0}.btn.m-icon-big [class^=m-icon-big-]{margin:0 0 0 10px}.btn.m-icon-ony>i{margin-left:0}.btn.m-icon{padding:7px 14px}.btn.m-icon [class^=m-icon-]{margin:4px 0 0 5px}.btn.m-icon.m-icon-only{padding:7px 10px 7px 6px}.m-icon-white{background-image:url(../../assets/images/syncfusion-icons-white.png)}.m-icon-swapright{background-position:-27px -10px}.m-icon-swapdown{background-position:-68px -10px}.m-icon-swapleft{background-position:-8px -10px}.m-icon-swapup{background-position:-46px -10px}.m-icon-big-swapright{background-position:-42px -28px}.m-icon-big-swapdown{background-position:-115px -28px}.m-icon-big-swapleft{background-position:-6px -28px}.m-icon-big-swapup{background-position:-78px -28px}.modal{z-index:10050;outline:0}.modal .modal-header{border-bottom:1px solid #EFEFEF}.modal .modal-header h3{font-weight:300}.modal .modal-header .close{margin-top:0!important}.modal .modal-dialog{z-index:10051}.modal>.loading{position:absolute;top:50%;left:50%;margin-top:-22px;margin-left:-22px}.modal.in .page-loading{display:none}.modal-open-noscroll{overflow-y:hidden!important}.modal-full.modal-dialog{width:99%}@media (max-width:768px){.modal-full.modal-dialog{width:auto}}.note{margin:0 0 20px;padding:15px 30px 15px 15px;border-left:5px solid #eee;border-radius:0 4px 4px 0}.note h1,.note h2,.note h3,.note h4,.note h5,.note h6{margin-top:0}.note h1 .close,.note h2 .close,.note h3 .close,.note h4 .close,.note h5 .close,.note h6 .close{margin-right:-10px}.note p:last-child{margin-bottom:0}.note.note-default{background-color:#d3d3d3;border-color:#a0a0a0;color:#333,80%}.note.note-default.note-bordered{background-color:#c9c9c9;border-color:#a5a5a5}.note.note-primary{background-color:#5697d0;border-color:#2a7696;color:#D8E3F2,80%}.note.note-primary.note-bordered{background-color:#468dcb;border-color:#2c7c9e}.note.note-success{background-color:#eef7ea;border-color:#bbdba1;color:#3c763d,80%}.note.note-success.note-bordered{background-color:#e2f1dc;border-color:#c1dea8}.note.note-info{background-color:#eef7fb;border-color:#91d9e8;color:#31708f,80%}.note.note-info.note-bordered{background-color:#ddeff8;border-color:#9adcea}.note.note-warning{background-color:#fcf8e3;border-color:#f2cf87;color:#8a6d3b,80%}.note.note-warning.note-bordered{background-color:#faf3d1;border-color:#f3d390}.note.note-danger{background-color:#f9f0f0;border-color:#dca7b0;color:#a94442,80%}.note.note-danger.note-bordered{background-color:#f3e2e2;border-color:#dfaeb7}.pagination{margin:10px 0}.pagination.pagination-circle>li:first-child>a{border-radius:25px 0 0 25px!important}.pagination.pagination-circle>li:last-child>a{border-radius:0 25px 25px 0!important}.dashboard-stat,.portlet{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.pagination .active>a,.pagination .active>a:hover{background:#eee;border-color:#ddd;color:#333}.panel{box-shadow:none!important}.panel-group .panel{overflow:visible}.panel .panel-title>a:hover{text-decoration:none}.accordion .panel .panel-heading,.accordion .panel .panel-title{padding:0}.accordion .panel .panel-title .accordion-toggle{display:block;padding:10px 15px}.accordion .panel .panel-title .accordion-toggle.accordion-toggle-styled{background:url(../../assets/images/accordion-plusminus.png) right -19px no-repeat;margin-right:15px}.accordion .panel .panel-title .accordion-toggle.accordion-toggle-styled.collapsed{background-position:right 12px}.panel-default{border-color:#e0e0e0}.panel-default>.panel-heading{color:#333;background-color:#f9f9f9;border-color:#e0e0e0}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#e0e0e0}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#e0e0e0}.panel-primary{border-color:#3595bd}.panel-primary>.panel-heading{color:#D8E3F2;background-color:#428bca;border-color:#3595bd}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#3595bd}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#3595bd}.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-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-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-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-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.accordion-heading{background:#eee}.accordion-heading a,.accordion-heading a:hover{text-decoration:none}.popover{box-shadow:5px 5px rgba(102,102,102,.1);padding:0}.portlet.calendar .fc-button,.progress{-webkit-box-shadow:none;-moz-box-shadow:none}.popover .popover-title{margin:0!important}.popover.name .popover-content,.popover.name .popover-title,name .popover .popover-content{color:#F3565D}.popovers.yellow+.popover,.popovers.yellow+.popover .popover-content,.popovers.yellow+.popover .popover-title{background:#ff0}.page-portlet-fullscreen{overflow:hidden}.portlet{margin-top:0;margin-bottom:25px;padding:0;border-radius:4px}.portlet.portlet-fullscreen{z-index:10060;margin:0;position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;background:#fff}.portlet.portlet-fullscreen>.portlet-body{overflow-y:auto;overflow-x:hidden;padding:0 10px}.portlet.portlet-fullscreen>.portlet-title{padding:0 10px}.portlet>.portlet-title{border-bottom:1px solid #eee;padding:0;margin-bottom:10px;min-height:41px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.portlet>.portlet-title:after,.portlet>.portlet-title:before{content:" ";display:table}.portlet>.portlet-title>.caption{float:left;display:inline-block;font-size:18px;line-height:18px;font-weight:300;padding:10px 0}.portlet>.portlet-title>.caption.bold{font-weight:400}.portlet>.portlet-title>.caption>i{float:left;margin-top:4px;display:inline-block;font-size:13px;margin-right:5px;color:#666}.portlet>.portlet-title>.caption>i.glyphicon{margin-top:2px}.portlet>.portlet-title>.caption>.caption-helper{padding:0;margin:0;line-height:13px;color:#9eacb4;font-size:13px;font-weight:400}.portlet>.portlet-title>.actions{float:right;display:inline-block;padding:6px 0}.portlet>.portlet-title>.actions>.dropdown-menu i{color:#555}.portlet>.portlet-title>.actions>.btn,.portlet>.portlet-title>.actions>.btn-group>.btn,.portlet>.portlet-title>.actions>.btn-group>.btn.btn-sm,.portlet>.portlet-title>.actions>.btn.btn-sm{padding:4px 10px;font-size:13px;line-height:1.5}.portlet>.portlet-title>.actions>.btn-group>.btn.btn-default,.portlet>.portlet-title>.actions>.btn-group>.btn.btn-sm.btn-default,.portlet>.portlet-title>.actions>.btn.btn-default,.portlet>.portlet-title>.actions>.btn.btn-sm.btn-default{padding:3px 9px}.portlet>.portlet-title>.actions>.btn-group>.btn.btn-sm>i,.portlet>.portlet-title>.actions>.btn-group>.btn>i,.portlet>.portlet-title>.actions>.btn.btn-sm>i,.portlet>.portlet-title>.actions>.btn>i{font-size:13px}.portlet>.portlet-title>.actions .btn-icon-only{padding:5px 7px 3px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default{padding:4px 6px 2px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default>i{font-size:14px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen{font-family:FontAwesome;color:#a0a0a0;padding-top:3px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen.btn-sm{padding:3px!important;height:27px;width:27px}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen:before{content:"\f065"}.portlet>.portlet-title>.actions .btn-icon-only.btn-default.fullscreen.on:before{content:"\f066"}.portlet>.portlet-title>.tools{float:right;display:inline-block;padding:12px 0 8px}.portlet>.portlet-title>.tools>a{display:inline-block;height:16px;margin-left:5px;opacity:1;filter:alpha(opacity=100)}.portlet>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon.png);background-repeat:no-repeat;width:11px}.portlet>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon.png);background-repeat:no-repeat;width:12px}.portlet>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon.png);width:13px}.portlet>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon.png);width:14px;visibility:visible}.portlet>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon.png);width:14px;visibility:visible}.portlet>.portlet-title>.tools>a.fullscreen{display:inline-block;top:-3px;position:relative;font-size:13px;font-family:FontAwesome;color:#ACACAC}.portlet>.portlet-title>.tools>a.fullscreen:before{content:"\f065"}.portlet>.portlet-title>.tools>a.fullscreen.on:before{content:"\f066"}.portlet>.portlet-title>.tools>a:hover{text-decoration:none;-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-ms-transition:all .1s ease-in-out;transition:all .1s ease-in-out;opacity:.8;filter:alpha(opacity=80)}.portlet>.portlet-title>.pagination{float:right;display:inline-block;margin:2px 0 0;border:0;padding:4px 0}.portlet>.portlet-title>.nav-tabs{background:0 0;margin:0;float:right;display:inline-block;border:0}.portlet>.portlet-title>.nav-tabs>li{background:0 0;margin:0;border:0}.portlet>.portlet-title>.nav-tabs>li>a{background:0 0;margin:5px 0 0 1px;border:0;padding:8px 10px;color:#fff}.portlet>.portlet-title>.nav-tabs>li.active>a,.portlet>.portlet-title>.nav-tabs>li:hover>a{color:#333;background:#fff;border:0}.portlet>.portlet-body{clear:both;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.portlet>.portlet-empty{min-height:125px}.portlet.full-height-content{margin-bottom:0}.portlet.bordered{border-left:2px solid #e6e9ec!important}.portlet.bordered>.portlet-title{border-bottom:0}.portlet.solid{padding:0 10px 10px;border:0}.portlet.solid>.portlet-title{border-bottom:0;margin-bottom:10px}.portlet.solid>.portlet-title>.caption{padding:16px 0 2px}.portlet.solid>.portlet-title>.actions{padding:12px 0 6px}.portlet.solid>.portlet-title>.tools{padding:14px 0 6px}.portlet.solid.bordered>.portlet-title{margin-bottom:10px}.portlet.box{padding:0!important}.portlet.box>.portlet-title{border-bottom:0;padding:0 10px;margin-bottom:0;color:#fff}.portlet.box>.portlet-title>.caption{padding:11px 0 9px}.portlet.box>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.box>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.box>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.box>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.box>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.box>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box>.portlet-title>.actions{padding:7px 0 5px}.portlet.box>.portlet-body{background-color:#fff;padding:10px}.portlet.box.portlet-fullscreen>.portlet-body{padding:10px}.portlet.light{padding:12px 20px 15px;background-color:#fff}.portlet.light.bordered{border:1px solid #e1e1e1!important}.portlet.light.bordered>.portlet-title{border-bottom:1px solid #eee}.portlet.light.bg-inverse{background:#F7F7F7}.portlet.light>.portlet-title{padding:0;min-height:48px}.portlet.light>.portlet-title>.caption{color:#666;padding:10px 0}.portlet.light>.portlet-title>.caption>.caption-subject{font-size:16px}.portlet.light>.portlet-title>.caption>i{color:#777;font-size:15px;font-weight:300;margin-top:3px}.portlet.light>.portlet-title>.caption.caption-md>.caption-subject{font-size:15px}.portlet.light>.portlet-title>.caption.caption-md>i{font-size:14px}.portlet.light>.portlet-title>.actions{padding:6px 0 14px}.portlet.light>.portlet-title>.actions .btn-default{color:#666}.portlet.light>.portlet-title>.actions .btn-icon-only{height:27px;width:27px}.portlet.light>.portlet-title>.actions .dropdown-menu li>a{color:#555}.portlet.light>.portlet-title>.inputs{float:right;display:inline-block;padding:4px 0}.portlet.light>.portlet-title>.inputs>.portlet-input .input-icon>i{font-size:14px;margin-top:9px}.portlet.light>.portlet-title>.inputs>.portlet-input .input-icon>.form-control{height:30px;padding:2px 26px 3px 10px;font-size:13px}.portlet.light>.portlet-title>.inputs>.portlet-input>.form-control{height:30px;padding:3px 10px;font-size:13px}.portlet.light>.portlet-title>.pagination{padding:2px 0 13px}.portlet.light>.portlet-title>.tools{padding:10px 0 13px;margin-top:2px}.portlet.light>.portlet-title>.nav-tabs>li{margin:0;padding:0}.portlet.light>.portlet-title>.nav-tabs>li>a{margin:0;padding:12px 13px 13px;font-size:13px;color:#666}.portlet.light>.portlet-title>.nav-tabs>li.active>a,.portlet.light>.portlet-title>.nav-tabs>li:hover>a{margin:0;background:0 0;color:#333}.blue.btn.active,.blue.btn:active,.btn.default.active,.btn.default:active,.open .blue.btn.dropdown-toggle,.open .btn.default.dropdown-toggle,.progress,.progress-striped .progress>.progress-bar-default,.progress-striped .progress>.progress-bar-info,.progress-striped .progress>.progress-bar-success,.progress-striped .progress>.progress-bar-warning{background-image:none}.portlet.light.form-fit{padding:0}.portlet.light.form-fit>.portlet-title{padding:17px 20px 10px;margin-bottom:0}.portlet.light .portlet-body{padding-top:8px}.portlet.light.portlet-fullscreen>.portlet-body{padding:8px 0}.tab-pane>p:last-child{margin-bottom:0}.tabs-reversed>li{float:right;margin-right:0}.tabs-reversed>li>a{margin-right:0}.portlet-sortable:not(.portlet-fullscreen)>.portlet-title{cursor:move}.portlet-sortable-placeholder{border:2px dashed #eee;margin-bottom:25px}.portlet-sortable-empty{height:45px}.progress{border:0;filter:none;box-shadow:none}.progress.progress-sm{height:12px}.progress>.progress-bar-default{background-color:#c6c6c6}.progress>.progress-bar-success{background-color:#45B6AF}.progress>.progress-bar-info{background-color:#89C4F4}.progress>.progress-bar-danger{background-color:#F3565D}.progress-striped .progress>.progress-bar-danger{background-image:none}.progress>.progress-bar-warning{background-color:#dfba49}.dashboard-stat{display:block;margin-bottom:25px;overflow:hidden;border-radius:4px}.dashboard-stat:after,.dashboard-stat:before{content:" ";display:table}.portlet .dashboard-stat:last-child{margin-bottom:0}.dashboard-stat .visual{width:80px;height:80px;display:block;float:left;padding-top:10px;padding-left:15px;margin-bottom:15px;font-size:35px;line-height:35px}.dashboard-stat .visual>i{margin-left:-35px;font-size:110px;line-height:110px}.dashboard-stat .details{position:absolute;right:15px;padding-right:15px}.dashboard-stat .details .number{padding-top:25px;text-align:right;font-size:34px;line-height:36px;letter-spacing:-1px;margin-bottom:0;font-weight:300}.dashboard-stat .details .desc{text-align:right;font-size:16px;letter-spacing:0;font-weight:300}.dashboard-stat .more{display:block;padding:6px 10px;position:relative;text-transform:uppercase;font-weight:300;font-size:11px;opacity:.7;filter:alpha(opacity=70)}.dashboard-stat .more:hover{text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.dashboard-stat .more>i{display:inline-block;margin-top:1px;float:right}.dashboard-stat-light{padding-bottom:20px;margin-bottom:20px}.dashboard-stat-light .details{margin-bottom:5px}.dashboard-stat-light .details .number{font-weight:300;margin-bottom:0}.dashboard-stat2,.dashboard-stat2 .display{margin-bottom:20px}.dashboard-stat2{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;background:#fff;padding:15px 15px 30px}.dashboard-stat2 .display:after,.dashboard-stat2 .display:before{content:" ";display:table}.dashboard-stat2 .display .number{float:left;display:inline-block}.dashboard-stat2 .display .number h3{margin:0 0 2px;padding:0;font-size:30px;font-weight:400}.dashboard-stat2 .display .number h3>small{font-size:23px}.dashboard-stat2 .display .number small{font-size:14px;color:#AAB5BC;font-weight:600;text-transform:uppercase}.dashboard-stat2 .display .icon{display:inline-block;float:right;padding:7px 0 0}.dashboard-stat2 .display .icon>i{color:#cbd4e0;font-size:26px}.dashboard-stat2 .progress-info .progress{margin:0;height:4px;display:block}.dashboard-stat2 .progress-info .status{margin-top:5px;font-size:11px;color:#AAB5BC;font-weight:600;text-transform:uppercase}.dashboard-stat2 .progress-info .status .status-title{float:left;display:inline-block}.dashboard-stat2 .progress-info .status .status-number{float:right;display:inline-block}.text-stat h3{margin-top:5px;margin-bottom:0;font-size:18px}.text-stat span{font-size:13px!important}@media (max-width:767px){.text-stat{margin-top:20px}}.social-icons{padding:0;margin:0}.social-icons:after,.social-icons:before{content:" ";display:table}.social-icons li{float:left;display:inline;list-style:none;margin-right:5px;margin-bottom:5px;text-indent:-9999px}.social-icons li>a{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;width:28px;height:28px;display:block;background-position:0 0;background-repeat:no-repeat;transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out}.social-icons li:hover>a{background-position:0 -38px}.social-icons li .amazon{background:url(../../assets/images/social/amazon.png) no-repeat}.social-icons li .behance{background:url(../../assets/images/social/behance.png) no-repeat}.social-icons li .blogger{background:url(../../assets/images/social/blogger.png) no-repeat}.social-icons li .deviantart{background:url(../../assets/images/social/deviantart.png) no-repeat}.social-icons li .dribbble{background:url(../../assets/images/social/dribbble.png) no-repeat}.social-icons li .dropbox{background:url(../../assets/images/social/dropbox.png) no-repeat}.social-icons li .evernote{background:url(../../assets/images/social/evernote.png) no-repeat}.social-icons li .facebook{background:url(../../assets/images/social/facebook.png) no-repeat}.social-icons li .forrst{background:url(../../assets/images/social/forrst.png) no-repeat}.social-icons li .github{background:url(../../assets/images/social/github.png) no-repeat}.social-icons li .googleplus{background:url(../../assets/images/social/googleplus.png) no-repeat}.social-icons li .jolicloud{background:url(../../assets/images/social/jolicloud.png) no-repeat}.social-icons li .last-fm{background:url(../../assets/images/social/last-fm.png) no-repeat}.social-icons li .linkedin{background:url(../../assets/images/social/linkedin.png) no-repeat}.social-icons li .picasa{background:url(../../assets/images/social/picasa.png) no-repeat}.social-icons li .pintrest{background:url(../../assets/images/social/pintrest.png) no-repeat}.social-icons li .rss{background:url(../../assets/images/social/rss.png) no-repeat}.social-icons li .skype{background:url(../../assets/images/social/skype.png) no-repeat}.social-icons li .spotify{background:url(../../assets/images/social/spotify.png) no-repeat}.social-icons li .stumbleupon{background:url(../../assets/images/social/stumbleupon.png) no-repeat}.social-icons li .tumblr{background:url(../../assets/images/social/tumblr.png) no-repeat}.social-icons li .twitter{background:url(../../assets/images/social/twitter.png) no-repeat}.social-icons li .vimeo{background:url(../../assets/images/social/vimeo.png) no-repeat}.social-icons li .wordpress{background:url(../../assets/images/social/wordpress.png) no-repeat}.social-icons li .xing{background:url(../../assets/images/social/xing.png) no-repeat}.social-icons li .yahoo{background:url(../../assets/images/social/yahoo.png) no-repeat}.social-icons li .youtube{background:url(../../assets/images/social/youtube.png) no-repeat}.social-icons li .vk{background:url(../../assets/images/social/vk.png) no-repeat}.social-icons li .instagram{background:url(../../assets/images/social/instagram.png) no-repeat}.social-icons li .reddit{background:url(../../assets/images/social/reddit.png) no-repeat}.social-icons li .aboutme{background:url(../../assets/images/social/aboutme.png) no-repeat}.social-icons li .flickr{background:url(../../assets/images/social/flickr.png) no-repeat}.social-icons li .foursquare{background:url(../../assets/images/social/foursquare.png) no-repeat}.social-icons li .gravatar{background:url(../../assets/images/social/gravatar.png) no-repeat}.social-icons li .klout{background:url(../../assets/images/social/klout.png) no-repeat}.social-icons li .myspace{background:url(../../assets/images/social/myspace.png) no-repeat}.social-icons li .quora{background:url(../../assets/images/social/quora.png) no-repeat}.social-icons.social-icons-color>li>a{opacity:.7;background-position:0 -38px!important}.social-icons.social-icons-color>li>a:hover{opacity:1}.social-icons.social-icons-circle>li>a{border-radius:25px!important}.social-icon{display:inline-block!important;width:28px;height:28px;background-position:0 0;background-repeat:no-repeat;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out}.social-icon.social-icon-circle{border-radius:25px!important}.social-icon.amazon{background:url(../../assets/images/social/amazon.png) no-repeat}.social-icon.behance{background:url(../../assets/images/social/behance.png) no-repeat}.social-icon.blogger{background:url(../../assets/images/social/blogger.png) no-repeat}.social-icon.deviantart{background:url(../../assets/images/social/deviantart.png) no-repeat}.social-icon.dribbble{background:url(../../assets/images/social/dribbble.png) no-repeat}.social-icon.dropbox{background:url(../../assets/images/social/dropbox.png) no-repeat}.social-icon.evernote{background:url(../../assets/images/social/evernote.png) no-repeat}.social-icon.facebook{background:url(../../assets/images/social/facebook.png) no-repeat}.social-icon.forrst{background:url(../../assets/images/social/forrst.png) no-repeat}.social-icon.github{background:url(../../assets/images/social/github.png) no-repeat}.social-icon.googleplus{background:url(../../assets/images/social/googleplus.png) no-repeat}.social-icon.jolicloud{background:url(../../assets/images/social/jolicloud.png) no-repeat}.social-icon.last-fm{background:url(../../assets/images/social/last-fm.png) no-repeat}.social-icon.linkedin{background:url(../../assets/images/social/linkedin.png) no-repeat}.social-icon.picasa{background:url(../../assets/images/social/picasa.png) no-repeat}.social-icon.pintrest{background:url(../../assets/images/social/pintrest.png) no-repeat}.social-icon.rss{background:url(../../assets/images/social/rss.png) no-repeat}.social-icon.skype{background:url(../../assets/images/social/skype.png) no-repeat}.social-icon.spotify{background:url(../../assets/images/social/spotify.png) no-repeat}.social-icon.stumbleupon{background:url(../../assets/images/social/stumbleupon.png) no-repeat}.social-icon.tumblr{background:url(../../assets/images/social/tumblr.png) no-repeat}.social-icon.twitter{background:url(../../assets/images/social/twitter.png) no-repeat}.social-icon.vimeo{background:url(../../assets/images/social/vimeo.png) no-repeat}.social-icon.wordpress{background:url(../../assets/images/social/wordpress.png) no-repeat}.social-icon.xing{background:url(../../assets/images/social/xing.png) no-repeat}.social-icon.yahoo{background:url(../../assets/images/social/yahoo.png) no-repeat}.social-icon.youtube{background:url(../../assets/images/social/youtube.png) no-repeat}.social-icon.vk{background:url(../../assets/images/social/vk.png) no-repeat}.social-icon.instagram{background:url(../../assets/images/social/instagram.png) no-repeat}.social-icon.reddit{background:url(../../assets/images/social/reddit.png) no-repeat}.social-icon.aboutme{background:url(../../assets/images/social/aboutme.png) no-repeat}.social-icon.flickr{background:url(../../assets/images/social/flickr.png) no-repeat}.social-icon.foursquare{background:url(../../assets/images/social/foursquare.png) no-repeat}.social-icon.gravatar{background:url(../../assets/images/social/gravatar.png) no-repeat}.social-icon.klout{background:url(../../assets/images/social/klout.png) no-repeat}.social-icon.myspace{background:url(../../assets/images/social/myspace.png) no-repeat}.social-icon.quora{background:url(../../assets/images/social/quora.png) no-repeat}.social-icon:hover{background-position:0 -38px}.social-icon-color{opacity:.7;background-position:0 -38px!important}.social-icon-color:hover{opacity:1}.table.table-bordered thead>tr>th{border-bottom:0}.table tr.heading>th{background-color:#eee!important}.table td .img-responsive{width:100%}.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:#a6c8e6;color:#132339}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background:#92bce0}.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:#dff0d8;color:#3c763d}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background:#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:#d9edf7;color:#31708f}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background:#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:#fcf8e3;color:#8a6d3b}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background:#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:#f2dede;color:#a94442}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background:#ebcccc}.table-scrollable{width:100%;overflow-x:auto;overflow-y:hidden;border:1px solid #ddd;margin:10px 0!important}.table-scrollable.table-scrollable-borderless,.table-scrollable>.table-bordered{border:0}.table-scrollable>.table{width:100%!important;margin:0!important;background-color:#fff}.table-scrollable>.table-bordered>tbody>tr>td:first-child,.table-scrollable>.table-bordered>tbody>tr>th:first-child,.table-scrollable>.table-bordered>tfoot>tr>td:first-child,.table-scrollable>.table-bordered>tfoot>tr>th:first-child,.table-scrollable>.table-bordered>thead>tr>td:first-child,.table-scrollable>.table-bordered>thead>tr>th:first-child{border-left:0}.table-scrollable>.table-bordered>tbody>tr>td:last-child,.table-scrollable>.table-bordered>tbody>tr>th:last-child,.table-scrollable>.table-bordered>tfoot>tr>td:last-child,.table-scrollable>.table-bordered>tfoot>tr>th:last-child,.table-scrollable>.table-bordered>thead>tr>td:last-child,.table-scrollable>.table-bordered>thead>tr>th:last-child{border-right:0}.table-scrollable>.table-bordered>tbody>tr:last-child>td,.table-scrollable>.table-bordered>tbody>tr:last-child>th,.table-scrollable>.table-bordered>tfoot>tr:last-child>td,.table-scrollable>.table-bordered>tfoot>tr:last-child>th,.table-scrollable>.table-bordered>thead>tr:last-child>td,.table-scrollable>.table-bordered>thead>tr:last-child>th{border-bottom:0}.flip-scroll table{width:100%}@media only screen and (max-width:768px){.flip-scroll .flip-content:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.flip-scroll * html .flip-content{zoom:1}.flip-scroll td,.flip-scroll th{margin:0;vertical-align:top}.flip-scroll th{border:0!important;border-bottom:1px solid #ddd!important;border-right:1px solid #ddd!important;font-size:13px!important;padding:5px;width:auto!important;display:block;text-align:right}.flip-scroll table{border-collapse:collapse;border-spacing:0;display:block;position:relative;width:100%}.flip-scroll thead{display:block;float:left}.flip-scroll tbody{display:block;width:auto;position:relative;overflow-x:auto;white-space:nowrap}.flip-scroll thead tr{display:block}.flip-scroll tbody tr{display:inline-block;vertical-align:top;margin-left:-5px}.flip-scroll td{display:block;min-height:1.25em;text-align:left;border-top:0!important;border-left:0!important;border-right:0!important;border-bottom:0}.flip-scroll th{border-left:0}.flip-scroll tbody tr{border-left:1px solid #ddd}.flip-scroll td:last-child,.flip-scroll th:last-child{border-bottom:1px solid #ddd}}.centered-td,.page-404,.tiles .tile .tile-body>i,.ui-grid-vcenter div{text-align:center}.table-toolbar{margin-bottom:15px}.table-toolbar:after,.table-toolbar:before{content:" ";display:table}.table.table-full-width{width:100%!important}.table .btn{margin-top:0;margin-left:0;margin-right:5px}.table thead tr th{font-size:14px;font-weight:600}.table-advance{margin-bottom:10px!important}.table-advance thead{color:#999}.table-advance thead tr th{background-color:#DDD;font-size:14px;font-weight:400;color:#666}.table-advance div.danger,.table-advance div.important,.table-advance div.info,.table-advance div.success,.table-advance div.warning{position:absolute;margin-top:-5px;float:left;width:2px;height:30px;margin-right:20px!important}.table-advance tr td{border-left-width:0}.table-advance tr td:first-child{border-left-width:1px!important}.table-advance tr td.highlight:first-child a{margin-left:15px}.table-advance td.highlight div.primary{border-left:2px solid #428bca}.table-advance td.highlight div.success{border-left:2px solid #45B6AF}.table-advance td.highlight div.info{border-left:2px solid #89C4F4}.table-advance td.highlight div.warning{border-left:2px solid #dfba49}.table-advance td.highlight div.danger{border-left:2px solid #F3565D}@media (max-width:767px){.table-advance tr>td.highlight:first-child a{margin-left:8px}}.table.table-light{border:0!important}.table.table-light>thead>tr:hover>th{background:0 0}.table.table-light>thead>tr.uppercase{text-transform:uppercase}.table.table-light>thead>tr>th{font-weight:600;font-size:13px;color:#a7b3b9;border:0;border-bottom:1px solid #F2F5F8}.table.table-light>tbody>tr:last-child>td{border:0}.table.table-light>tbody>tr>td{border:0;border-bottom:1px solid #F2F5F8;color:#9ca8b0;vertical-align:middle}.table.table-light>tbody>tr>td.fit{width:1px;padding-right:3px}.table.table-light>tbody>tr>td .user-pic{display:inline-block;vertical-align:middle;height:30px;-webkit-border-radius:100%;-moz-border-radius:100%;-ms-border-radius:100%;-o-border-radius:100%;border-radius:100%}.table.table-light.table-hover>tbody>tr:hover>td,.table.table-light.table-hover>tbody>tr:hover>th,.table.table-light.table-hover>tbody>tr>td:hover,.table.table-light.table-hover>tbody>tr>th:hover{background:#f9fafb}.nav-pills,.nav-tabs{margin-bottom:10px}.nav-pills>li>a,.nav-tabs>li>a{font-size:14px}.nav-pills>li>a>.badge,.nav-tabs>li>a>.badge{margin-top:-3px}.nav-pills>li .dropdown-menu:after,.nav-pills>li .dropdown-menu:before,.nav-tabs>li .dropdown-menu:after,.nav-tabs>li .dropdown-menu:before{display:none}.nav-pills.nav-pills-sm>li>a,.nav-pills.nav-tabs-sm>li>a,.nav-tabs.nav-pills-sm>li>a,.nav-tabs.nav-tabs-sm>li>a{font-size:13px}.nav-pills .dropdown.open>.dropdown-toggle,.nav-tabs .dropdown.open>.dropdown-toggle{background:#eee;color:#0d638f;border-color:transparent}.tabs-left.nav-tabs,.tabs-right.nav-tabs{border-bottom:0}.tabs-left.nav-tabs>li,.tabs-right.nav-tabs>li{float:none}.tabs-left.nav-tabs>li>a,.tabs-right.nav-tabs>li>a{margin-right:0;margin-bottom:3px}.tabs-left.nav-tabs{border-right:1px solid #ddd}.tabs-left.nav-tabs>li>a{display:block;margin-right:-1px}.tabs-left.nav-tabs>li>a:focus,.tabs-left.nav-tabs>li>a:hover{border-radius:4px 0 0 4px;border-color:#eee #ddd #eee #eee}.tabs-left.nav-tabs>li.active>a,.tabs-left.nav-tabs>li.active>a:hover>li.active>a:focus{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-ms-border-radius:4px 0 0 4px;-o-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;border-color:#ddd transparent #ddd #ddd}.tabs-right.nav-tabs{border-left:1px solid #ddd}.tabs-right.nav-tabs>li>a{display:block;margin-left:-1px}.tabbable:after,.tabbable:before,.tiles:after,.tiles:before{display:table;content:" "}.tabs-right.nav-tabs>li>a:focus,.tabs-right.nav-tabs>li>a:hover{border-radius:0 4px 4px 0;border-color:#eee #eee #eee #ddd}.tabs-right.nav-tabs>li.active>a,.tabs-right.nav-tabs>li.active>a:hover>li.active>a:focus{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;border-color:#ddd #ddd #ddd transparent}.tabs-below>.nav-pills,.tabs-below>.nav-tabs{border-bottom:0;margin-bottom:0;margin-top:10px}.tabs-below>.nav-tabs{border-top:1px solid #ddd;margin-bottom:0;margin-top:10px}.tabs-below>.nav-tabs>li>a{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a:focus,.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>li>a .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.tabs-below>.nav-tabs .active a,.tabs-below>.nav-tabs .active a:hover .active a:focus{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;border-color:transparent #ddd #ddd}.tabbable-custom{margin-bottom:15px;padding:0;overflow:hidden}.tabbable-custom>.nav-tabs{border:none;margin:0}.tabbable-custom>.nav-tabs>li.active>a,.tabbable-custom>.nav-tabs>li>a{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0}.tabbable-custom>.nav-tabs>li{margin-right:2px;border-top:2px solid transparent}.tabbable-custom>.nav-tabs>li>a{margin-right:0;border-radius:0}.tabbable-custom>.nav-tabs>li>a:hover{background:0 0;border-color:transparent}.tabbable-custom>.nav-tabs>li.active{border-top:3px solid #F3565D;margin-top:0;position:relative}.tabbable-custom>.nav-tabs>li.active>a{border-top:none;font-weight:400;border-radius:0}.tabbable-custom>.nav-tabs>li.active>a:hover{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border-top:none;background:#fff;border-color:#d4d4d4 #d4d4d4 transparent}.tabbable-custom>.tab-content{background-color:#fff;border:1px solid #ddd;padding:10px;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabbable-custom.nav-justified>.tab-content{margin-top:-1px}.tabbable-custom.boxless>.tab-content{padding:15px 0;border-left:none;border-right:none;border-bottom:none}.tabbable-custom.tabs-below.nav-justified .tab-content{margin-top:0;margin-bottom:-2px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.tabbable-custom.tabbable-full-width>.nav-tabs>li>a{color:#424242;font-size:15px;padding:9px 15px}.tabbable-custom.tabbable-full-width>.tab-content{padding:15px 0;border-left:none;border-right:none;border-bottom:none}.tabbable-custom.tabs-below .nav-tabs>li>a{border-top:none;border-bottom:2px solid transparent;margin-top:-1px}.tabbable-custom.tabs-below .nav-tabs>li.active{border-top:none;border-bottom:3px solid #d12610;margin-bottom:0;position:relative}.tabbable-custom.tabs-below .nav-tabs>li.active>a{border-bottom:none}.tabbable-custom.tabs-below .nav-tabs>li.active>a:hover{background:#fff;border-color:#d4d4d4 #d4d4d4 transparent}.tabbable-custom.tabbable-noborder .tab-content,.tabbable-custom.tabbable-noborder>.nav-tabs>li>a{border:0}.tabbable-line>.nav-tabs{border:none;margin:0}.tabbable-line>.nav-tabs>li{margin-right:2px}.tabbable-line>.nav-tabs>li>a{border:0;margin-right:0;color:#737373}.tabbable-line>.nav-tabs>li>a>i{color:#a6a6a6}.tabbable-line>.nav-tabs>li.open,.tabbable-line>.nav-tabs>li:hover{border-bottom:4px solid #fbcdcf}.tabbable-line>.nav-tabs>li.open>a,.tabbable-line>.nav-tabs>li:hover>a{border:0;background:0 0!important;color:#333}.tabbable-line>.nav-tabs>li.open>a>i,.tabbable-line>.nav-tabs>li:hover>a>i{color:#a6a6a6}.tabbable-line>.nav-tabs>li.open .dropdown-menu,.tabbable-line>.nav-tabs>li:hover .dropdown-menu{margin-top:0}.tabbable-line>.nav-tabs>li.active{border-bottom:4px solid #F3565D;position:relative}.tabbable-line>.nav-tabs>li.active>a{border:0;color:#333}.tabbable-line>.nav-tabs>li.active>a>i{color:#404040}.tabbable-line>.tab-content{margin-top:-3px;background-color:#fff;border:0;border-top:1px solid #eee;padding:15px 0}.portlet .tabbable-line>.tab-content{padding-bottom:0}.tabbable-line.tabs-below>.nav-tabs>li{border-top:4px solid transparent}.tabbable-line.tabs-below>.nav-tabs>li>a{margin-top:0}.tabbable-line.tabs-below>.nav-tabs>li:hover{border-bottom:0;border-top:4px solid #fbcdcf}.tabbable-line.tabs-below>.nav-tabs>li.active{margin-bottom:-2px;border-bottom:0;border-top:4px solid #F3565D}.tabbable-line.tabs-below>.tab-content{margin-top:-10px;border-top:0;border-bottom:1px solid #eee;padding-bottom:15px}.tiles{margin-right:-10px}.tiles .tile{display:block;float:left;height:135px;width:135px!important;cursor:pointer;text-decoration:none;color:#fff;position:relative;font-weight:300;font-size:12px;letter-spacing:.02em;line-height:20px;overflow:hidden;border:4px solid transparent;margin:0 10px 10px 0}.tiles .tile .tile-body>.content,.tiles .tile.image .tile-body h3,.tiles .tile.selected .check:after{display:inline-block}.tiles .tile:after,.tiles .tile:before{content:"";float:left}.tiles .tile.double{width:280px!important}.tiles .tile.double-down{height:280px!important}.tiles .tile.double-down i{margin-top:95px}.tiles .tile:hover{border-color:#aaa!important}.tiles .tile.selected,.tiles .tile:active{border-color:#ccc!important}.tiles .tile.selected .corner:after{content:"";display:inline-block;border-left:40px solid transparent;border-bottom:40px solid transparent;border-right:40px solid #ccc;position:absolute;top:-3px;right:-3px}.tiles .tile.selected .check:after{font-family:FontAwesome;font-size:13px;content:"\f00c";position:absolute;top:2px;right:2px}.tiles .tile.icon{padding:0}.tiles .tile.image .tile-body{padding:0!important}.tiles .tile.image .tile-body>img{width:100%;height:auto;min-height:100%;max-width:100%}.tiles .tile .tile-body{height:100%;vertical-align:top;padding:10px;overflow:hidden;position:relative;font-weight:400;font-size:12px;color:#fff;margin-bottom:10px}.tiles .tile .tile-body p{font-weight:400;font-size:13px;color:#fff;overflow:hidden}.tiles .tile .tile-body p:active{color:rgba(0,0,0,.4)}.tiles .tile .tile-body p:hover{color:#fff}.tiles .tile .tile-body img{float:left;margin-right:10px}.tiles .tile .tile-body img.pull-right{float:right!important;margin-left:10px;margin-right:0}.tiles .tile .tile-body>i{margin-top:17px;display:block;font-size:56px;line-height:56px}.tiles .tile .tile-body h1,.tiles .tile .tile-body h2,.tiles .tile .tile-body h3,.tiles .tile .tile-body h4,.tiles .tile .tile-body h5,.tiles .tile .tile-body h6,.tiles .tile .tile-body p{padding:0;margin:0;line-height:14px}.tiles .tile .tile-body h1:hover,.tiles .tile .tile-body h2:hover,.tiles .tile .tile-body h3:hover,.tiles .tile .tile-body h4:hover,.tiles .tile .tile-body h5:hover,.tiles .tile .tile-body h6:hover,.tiles .tile .tile-body p:hover{color:#fff}.tiles .tile .tile-body h3,.tiles .tile .tile-body h4{margin-bottom:5px}.tiles .tile .tile-object{position:absolute;bottom:0;left:0;right:0;min-height:30px;background-color:transparent}.tiles .tile .tile-object:after,.tiles .tile .tile-object:before{display:table;content:""}.tiles .tile .tile-object>.name{position:absolute;bottom:0;left:0;margin-bottom:5px;margin-left:10px;margin-right:15px;font-weight:400;font-size:13px;color:#fff}.tiles .tile .tile-object>.name>i{vertical-align:middle;display:block;font-size:24px;height:18px;width:24px}.tiles .tile .tile-object>.number{position:absolute;bottom:0;right:0;color:#fff;text-align:center;font-weight:600;font-size:14px;letter-spacing:.01em;line-height:14px;margin-bottom:8px;margin-right:10px}.well{background-color:#eee;border:0;box-shadow:none!important}.blue.btn,.btn.default{border-color:""}@-webkit-keyframes fadeInUpm{0%{opacity:0;-webkit-transform:translateY(15px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUpm{0%{opacity:0;-moz-transform:translateY(15px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUpm{0%{opacity:0;-o-transform:translateY(15px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInUpm{0%{opacity:0;transform:translateY(15px)}100%{opacity:1;transform:translateY(0)}}.fade-in-up{-webkit-animation:fadeInUpm .5s;animation:fadeInUpm .5s}@-webkit-keyframes bounceDelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bounceDelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.btn.default{color:#333;background-color:#E5E5E5}.btn.default.active,.btn.default:active,.btn.default:focus,.btn.default:hover,.open .btn.default.dropdown-toggle{color:#333;background-color:#d3d3d3}.btn.default.active,.btn.default:active{background-color:#c6c6c6}.btn.default.active:hover,.btn.default:active:hover{background-color:#ccc}.btn.default.disabled,.btn.default.disabled.active,.btn.default.disabled:active,.btn.default.disabled:focus,.btn.default.disabled:hover,.btn.default[disabled],.btn.default[disabled].active,.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:active,fieldset[disabled] .btn.default:focus,fieldset[disabled] .btn.default:hover{background-color:#E5E5E5}.btn.default .badge{color:#E5E5E5;background-color:#333}.blue.btn{color:#FFF;background-color:#4B8DF8}.blue.btn.active,.blue.btn:active,.blue.btn:focus,.blue.btn:hover,.open .blue.btn.dropdown-toggle{color:#FFF;background-color:#2977f7}.blue.btn.active,.blue.btn:active{background-color:#1068f6}.blue.btn.active:hover,.blue.btn:active:hover{background-color:#1a6ef6}.blue.btn.disabled,.blue.btn.disabled.active,.blue.btn.disabled:active,.blue.btn.disabled:focus,.blue.btn.disabled:hover,.blue.btn[disabled],.blue.btn[disabled].active,.blue.btn[disabled]:active,.blue.btn[disabled]:focus,.blue.btn[disabled]:hover,fieldset[disabled] .blue.btn,fieldset[disabled] .blue.btn.active,fieldset[disabled] .blue.btn:active,fieldset[disabled] .blue.btn:focus,fieldset[disabled] .blue.btn:hover{background-color:#4B8DF8}.blue.btn .badge{color:#4B8DF8;background-color:#FFF}.portlet.blue,.portlet.box.blue>.portlet-title,.portlet>.portlet-body.blue{background-color:#4B8DF8}.btn.blue-stripe{border-left:3px solid #4B8DF8}.portlet.solid.blue>.portlet-body,.portlet.solid.blue>.portlet-title{border:0;color:#FFF}.portlet.solid.blue>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue{border:1px solid #7cacfa;border-top:0}.portlet.box.blue>.portlet-title>.caption,.portlet.box.blue>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #b7d1fc;color:#d0e1fd}.portlet.box.blue>.portlet-title>.actions .btn-default>i{color:#deeafe}.portlet.box.blue>.portlet-title>.actions .btn-default.active,.portlet.box.blue>.portlet-title>.actions .btn-default:active,.portlet.box.blue>.portlet-title>.actions .btn-default:focus,.portlet.box.blue>.portlet-title>.actions .btn-default:hover{border:1px solid #e8f0fe;color:#fff}.dashboard-stat.blue{background-color:#4B8DF8}.dashboard-stat.blue.dashboard-stat-light:hover{background-color:#3781f7}.dashboard-stat.blue .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue .details .number{color:#FFF}.dashboard-stat.blue .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue .more{color:#FFF;background-color:#3781f7}.bg-blue{border-color:#4B8DF8!important;background-image:none!important;background-color:#4B8DF8!important;color:#FFF!important}.font-blue{color:#4B8DF8!important}.progress-bar.blue{background:#4B8DF8!important;color:#FFF!important}.blue-madison.btn{color:#FFF;background-color:#578ebe;border-color:""}.blue-madison.btn.active,.blue-madison.btn:active,.blue-madison.btn:focus,.blue-madison.btn:hover,.open .blue-madison.btn.dropdown-toggle{color:#FFF;background-color:#437cae}.blue-madison.btn.active,.blue-madison.btn:active{background-image:none;background-color:#3c6f9c}.blue-madison.btn.active:hover,.blue-madison.btn:active:hover{background-color:#3f74a3}.open .blue-madison.btn.dropdown-toggle{background-image:none}.blue-madison.btn.disabled,.blue-madison.btn.disabled.active,.blue-madison.btn.disabled:active,.blue-madison.btn.disabled:focus,.blue-madison.btn.disabled:hover,.blue-madison.btn[disabled],.blue-madison.btn[disabled].active,.blue-madison.btn[disabled]:active,.blue-madison.btn[disabled]:focus,.blue-madison.btn[disabled]:hover,fieldset[disabled] .blue-madison.btn,fieldset[disabled] .blue-madison.btn.active,fieldset[disabled] .blue-madison.btn:active,fieldset[disabled] .blue-madison.btn:focus,fieldset[disabled] .blue-madison.btn:hover{background-color:#578ebe}.blue-madison.btn .badge{color:#578ebe;background-color:#FFF}.portlet.blue-madison,.portlet.box.blue-madison>.portlet-title,.portlet>.portlet-body.blue-madison{background-color:#578ebe}.btn.blue-madison-stripe{border-left:3px solid #578ebe}.portlet.solid.blue-madison>.portlet-body,.portlet.solid.blue-madison>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-madison>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-madison>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-madison>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-madison{border:1px solid #7ca7cc;border-top:0}.portlet.box.blue-madison>.portlet-title>.caption,.portlet.box.blue-madison>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-madison>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #a8c4dd;color:#bad1e4}.portlet.box.blue-madison>.portlet-title>.actions .btn-default>i{color:#c5d8e9}.portlet.box.blue-madison>.portlet-title>.actions .btn-default.active,.portlet.box.blue-madison>.portlet-title>.actions .btn-default:active,.portlet.box.blue-madison>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-madison>.portlet-title>.actions .btn-default:hover{border:1px solid #cdddec;color:#dfeaf3}.dashboard-stat.blue-madison{background-color:#578ebe}.dashboard-stat.blue-madison.dashboard-stat-light:hover{background-color:#4884b8}.dashboard-stat.blue-madison .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-madison .details .number{color:#FFF}.dashboard-stat.blue-madison .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-madison .more{color:#FFF;background-color:#4884b8}.bg-blue-madison{border-color:#578ebe!important;background-image:none!important;background-color:#578ebe!important;color:#FFF!important}.font-blue-madison{color:#578ebe!important}.progress-bar.blue-madison{background:#578ebe!important;color:#FFF!important}.blue-chambray.btn{color:#FFF;background-color:#2C3E50;border-color:""}.blue-chambray.btn.active,.blue-chambray.btn:active,.blue-chambray.btn:focus,.blue-chambray.btn:hover,.open .blue-chambray.btn.dropdown-toggle{color:#FFF;background-color:#1f2c39}.blue-chambray.btn.active,.blue-chambray.btn:active{background-image:none;background-color:#161f29}.blue-chambray.btn.active:hover,.blue-chambray.btn:active:hover{background-color:#1a242f}.open .blue-chambray.btn.dropdown-toggle{background-image:none}.blue-chambray.btn.disabled,.blue-chambray.btn.disabled.active,.blue-chambray.btn.disabled:active,.blue-chambray.btn.disabled:focus,.blue-chambray.btn.disabled:hover,.blue-chambray.btn[disabled],.blue-chambray.btn[disabled].active,.blue-chambray.btn[disabled]:active,.blue-chambray.btn[disabled]:focus,.blue-chambray.btn[disabled]:hover,fieldset[disabled] .blue-chambray.btn,fieldset[disabled] .blue-chambray.btn.active,fieldset[disabled] .blue-chambray.btn:active,fieldset[disabled] .blue-chambray.btn:focus,fieldset[disabled] .blue-chambray.btn:hover{background-color:#2C3E50}.blue-chambray.btn .badge{color:#2C3E50;background-color:#FFF}.portlet.blue-chambray,.portlet.box.blue-chambray>.portlet-title,.portlet>.portlet-body.blue-chambray{background-color:#2C3E50}.btn.blue-chambray-stripe{border-left:3px solid #2C3E50}.portlet.solid.blue-chambray>.portlet-body,.portlet.solid.blue-chambray>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-chambray>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-chambray>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-chambray>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-chambray{border:1px solid #3e5771;border-top:0}.portlet.box.blue-chambray>.portlet-title>.caption,.portlet.box.blue-chambray>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-chambray>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #547698;color:#5f83a7}.portlet.box.blue-chambray>.portlet-title>.actions .btn-default>i{color:#698aac}.portlet.box.blue-chambray>.portlet-title>.actions .btn-default.active,.portlet.box.blue-chambray>.portlet-title>.actions .btn-default:active,.portlet.box.blue-chambray>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-chambray>.portlet-title>.actions .btn-default:hover{border:1px solid #6f90b0;color:#809cb9}.dashboard-stat.blue-chambray{background-color:#2C3E50}.dashboard-stat.blue-chambray.dashboard-stat-light:hover{background-color:#253443}.dashboard-stat.blue-chambray .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-chambray .details .number{color:#FFF}.dashboard-stat.blue-chambray .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-chambray .more{color:#FFF;background-color:#253443}.bg-blue-chambray{border-color:#2C3E50!important;background-image:none!important;background-color:#2C3E50!important;color:#FFF!important}.font-blue-chambray{color:#2C3E50!important}.progress-bar.blue-chambray{background:#2C3E50!important;color:#FFF!important}.blue-ebonyclay.btn{color:#FFF;background-color:#22313F;border-color:""}.blue-ebonyclay.btn.active,.blue-ebonyclay.btn:active,.blue-ebonyclay.btn:focus,.blue-ebonyclay.btn:hover,.open .blue-ebonyclay.btn.dropdown-toggle{color:#FFF;background-color:#151f28}.blue-ebonyclay.btn.active,.blue-ebonyclay.btn:active{background-image:none;background-color:#0d1217}.blue-ebonyclay.btn.active:hover,.blue-ebonyclay.btn:active:hover{background-color:#10171e}.open .blue-ebonyclay.btn.dropdown-toggle{background-image:none}.blue-ebonyclay.btn.disabled,.blue-ebonyclay.btn.disabled.active,.blue-ebonyclay.btn.disabled:active,.blue-ebonyclay.btn.disabled:focus,.blue-ebonyclay.btn.disabled:hover,.blue-ebonyclay.btn[disabled],.blue-ebonyclay.btn[disabled].active,.blue-ebonyclay.btn[disabled]:active,.blue-ebonyclay.btn[disabled]:focus,.blue-ebonyclay.btn[disabled]:hover,fieldset[disabled] .blue-ebonyclay.btn,fieldset[disabled] .blue-ebonyclay.btn.active,fieldset[disabled] .blue-ebonyclay.btn:active,fieldset[disabled] .blue-ebonyclay.btn:focus,fieldset[disabled] .blue-ebonyclay.btn:hover{background-color:#22313F}.blue-ebonyclay.btn .badge{color:#22313F;background-color:#FFF}.portlet.blue-ebonyclay,.portlet.box.blue-ebonyclay>.portlet-title,.portlet>.portlet-body.blue-ebonyclay{background-color:#22313F}.btn.blue-ebonyclay-stripe{border-left:3px solid #22313F}.portlet.solid.blue-ebonyclay>.portlet-body,.portlet.solid.blue-ebonyclay>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-ebonyclay>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-ebonyclay>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-ebonyclay{border:1px solid #344b60;border-top:0}.portlet.box.blue-ebonyclay>.portlet-title>.caption,.portlet.box.blue-ebonyclay>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #496a88;color:#527798}.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default>i{color:#587ea2}.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default.active,.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default:active,.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-ebonyclay>.portlet-title>.actions .btn-default:hover{border:1px solid #5d83a7;color:#6d90b0}.dashboard-stat.blue-ebonyclay{background-color:#22313F}.dashboard-stat.blue-ebonyclay.dashboard-stat-light:hover{background-color:#1b2732}.dashboard-stat.blue-ebonyclay .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-ebonyclay .details .number{color:#FFF}.dashboard-stat.blue-ebonyclay .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-ebonyclay .more{color:#FFF;background-color:#1b2732}.bg-blue-ebonyclay{border-color:#22313F!important;background-image:none!important;background-color:#22313F!important;color:#FFF!important}.font-blue-ebonyclay{color:#22313F!important}.progress-bar.blue-ebonyclay{background:#22313F!important;color:#FFF!important}.blue-hoki.btn{color:#FFF;background-color:#67809F;border-color:""}.blue-hoki.btn.active,.blue-hoki.btn:active,.blue-hoki.btn:focus,.blue-hoki.btn:hover,.open .blue-hoki.btn.dropdown-toggle{color:#FFF;background-color:#586e8b}.blue-hoki.btn.active,.blue-hoki.btn:active{background-image:none;background-color:#4e627b}.blue-hoki.btn.active:hover,.blue-hoki.btn:active:hover{background-color:#526781}.open .blue-hoki.btn.dropdown-toggle{background-image:none}.blue-hoki.btn.disabled,.blue-hoki.btn.disabled.active,.blue-hoki.btn.disabled:active,.blue-hoki.btn.disabled:focus,.blue-hoki.btn.disabled:hover,.blue-hoki.btn[disabled],.blue-hoki.btn[disabled].active,.blue-hoki.btn[disabled]:active,.blue-hoki.btn[disabled]:focus,.blue-hoki.btn[disabled]:hover,fieldset[disabled] .blue-hoki.btn,fieldset[disabled] .blue-hoki.btn.active,fieldset[disabled] .blue-hoki.btn:active,fieldset[disabled] .blue-hoki.btn:focus,fieldset[disabled] .blue-hoki.btn:hover{background-color:#67809F}.blue-hoki.btn .badge{color:#67809F;background-color:#FFF}.portlet.blue-hoki,.portlet.box.blue-hoki>.portlet-title,.portlet>.portlet-body.blue-hoki{background-color:#67809F}.btn.blue-hoki-stripe{border-left:3px solid #67809F}.portlet.solid.blue-hoki>.portlet-body,.portlet.solid.blue-hoki>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-hoki>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-hoki>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-hoki>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-hoki{border:1px solid #869ab3;border-top:0}.portlet.box.blue-hoki>.portlet-title>.caption,.portlet.box.blue-hoki>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-hoki>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #acb9ca;color:#bbc7d4}.portlet.box.blue-hoki>.portlet-title>.actions .btn-default>i{color:#c5ceda}.portlet.box.blue-hoki>.portlet-title>.actions .btn-default.active,.portlet.box.blue-hoki>.portlet-title>.actions .btn-default:active,.portlet.box.blue-hoki>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-hoki>.portlet-title>.actions .btn-default:hover{border:1px solid #cbd4de;color:#dbe1e8}.dashboard-stat.blue-hoki{background-color:#67809F}.dashboard-stat.blue-hoki.dashboard-stat-light:hover{background-color:#5e7694}.dashboard-stat.blue-hoki .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-hoki .details .number{color:#FFF}.dashboard-stat.blue-hoki .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-hoki .more{color:#FFF;background-color:#5e7694}.bg-blue-hoki{border-color:#67809F!important;background-image:none!important;background-color:#67809F!important;color:#FFF!important}.font-blue-hoki{color:#67809F!important}.progress-bar.blue-hoki{background:#67809F!important;color:#FFF!important}.blue-steel.btn{color:#FFF;background-color:#4B77BE;border-color:""}.blue-steel.btn.active,.blue-steel.btn:active,.blue-steel.btn:focus,.blue-steel.btn:hover,.open .blue-steel.btn.dropdown-toggle{color:#FFF;background-color:#3d66a8}.blue-steel.btn.active,.blue-steel.btn:active{background-image:none;background-color:#365b96}.blue-steel.btn.active:hover,.blue-steel.btn:active:hover{background-color:#395f9d}.open .blue-steel.btn.dropdown-toggle{background-image:none}.blue-steel.btn.disabled,.blue-steel.btn.disabled.active,.blue-steel.btn.disabled:active,.blue-steel.btn.disabled:focus,.blue-steel.btn.disabled:hover,.blue-steel.btn[disabled],.blue-steel.btn[disabled].active,.blue-steel.btn[disabled]:active,.blue-steel.btn[disabled]:focus,.blue-steel.btn[disabled]:hover,fieldset[disabled] .blue-steel.btn,fieldset[disabled] .blue-steel.btn.active,fieldset[disabled] .blue-steel.btn:active,fieldset[disabled] .blue-steel.btn:focus,fieldset[disabled] .blue-steel.btn:hover{background-color:#4B77BE}.blue-steel.btn .badge{color:#4B77BE;background-color:#FFF}.portlet.blue-steel,.portlet.box.blue-steel>.portlet-title,.portlet>.portlet-body.blue-steel{background-color:#4B77BE}.btn.blue-steel-stripe{border-left:3px solid #4B77BE}.portlet.solid.blue-steel>.portlet-body,.portlet.solid.blue-steel>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-steel>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-steel>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.collapse{background-image:url(../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-steel>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-steel{border:1px solid #7093cc;border-top:0}.portlet.box.blue-steel>.portlet-title>.caption,.portlet.box.blue-steel>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-steel>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9db5dc;color:#b0c3e3}.portlet.box.blue-steel>.portlet-title>.actions .btn-default>i{color:#bbcce7}.portlet.box.blue-steel>.portlet-title>.actions .btn-default.active,.portlet.box.blue-steel>.portlet-title>.actions .btn-default:active,.portlet.box.blue-steel>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-steel>.portlet-title>.actions .btn-default:hover{border:1px solid #c3d2e9;color:#d6e0f0}.dashboard-stat.blue-steel{background-color:#4B77BE}.dashboard-stat.blue-steel.dashboard-stat-light:hover{background-color:#416db4}.dashboard-stat.blue-steel .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-steel .details .number{color:#FFF}.dashboard-stat.blue-steel .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-steel .more{color:#FFF;background-color:#416db4}.bg-blue-steel{border-color:#4B77BE!important;background-image:none!important;background-color:#4B77BE!important;color:#FFF!important}.font-blue-steel{color:#4B77BE!important}.progress-bar.blue-steel{background:#4B77BE!important;color:#FFF!important}.blue-soft.btn{color:#FFF;background-color:#4c87b9;border-color:""}.blue-soft.btn.active,.blue-soft.btn:active,.blue-soft.btn:focus,.blue-soft.btn:hover,.open .blue-soft.btn.dropdown-toggle{color:#FFF;background-color:#3f75a2}.blue-soft.btn.active,.blue-soft.btn:active{background-image:none;background-color:#386890}.blue-soft.btn.active:hover,.blue-soft.btn:active:hover{background-color:#3b6d97}.open .blue-soft.btn.dropdown-toggle{background-image:none}.blue-soft.btn.disabled,.blue-soft.btn.disabled.active,.blue-soft.btn.disabled:active,.blue-soft.btn.disabled:focus,.blue-soft.btn.disabled:hover,.blue-soft.btn[disabled],.blue-soft.btn[disabled].active,.blue-soft.btn[disabled]:active,.blue-soft.btn[disabled]:focus,.blue-soft.btn[disabled]:hover,fieldset[disabled] .blue-soft.btn,fieldset[disabled] .blue-soft.btn.active,fieldset[disabled] .blue-soft.btn:active,fieldset[disabled] .blue-soft.btn:focus,fieldset[disabled] .blue-soft.btn:hover{background-color:#4c87b9}.blue-soft.btn .badge{color:#4c87b9;background-color:#FFF}.portlet.blue-soft,.portlet.box.blue-soft>.portlet-title,.portlet>.portlet-body.blue-soft{background-color:#4c87b9}.btn.blue-soft-stripe{border-left:3px solid #4c87b9}.portlet.solid.blue-soft>.portlet-body,.portlet.solid.blue-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-soft{border:1px solid #71a0c7;border-top:0}.portlet.box.blue-soft>.portlet-title>.caption,.portlet.box.blue-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9dbdd9;color:#afc9e0}.portlet.box.blue-soft>.portlet-title>.actions .btn-default>i{color:#bad1e4}.portlet.box.blue-soft>.portlet-title>.actions .btn-default.active,.portlet.box.blue-soft>.portlet-title>.actions .btn-default:active,.portlet.box.blue-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #c1d6e7;color:#d4e2ee}.dashboard-stat.blue-soft{background-color:#4c87b9}.dashboard-stat.blue-soft.dashboard-stat-light:hover{background-color:#447dad}.dashboard-stat.blue-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-soft .details .number{color:#FFF}.dashboard-stat.blue-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-soft .more{color:#FFF;background-color:#447dad}.bg-blue-soft{border-color:#4c87b9!important;background-image:none!important;background-color:#4c87b9!important;color:#FFF!important}.font-blue-soft{color:#4c87b9!important}.progress-bar.blue-soft{background:#4c87b9!important;color:#FFF!important}.blue-dark.btn{color:#FFF;background-color:#5e738b;border-color:""}.blue-dark.btn.active,.blue-dark.btn:active,.blue-dark.btn:focus,.blue-dark.btn:hover,.open .blue-dark.btn.dropdown-toggle{color:#FFF;background-color:#506176}.blue-dark.btn.active,.blue-dark.btn:active{background-image:none;background-color:#455566}.blue-dark.btn.active:hover,.blue-dark.btn:active:hover{background-color:#495a6d}.open .blue-dark.btn.dropdown-toggle{background-image:none}.blue-dark.btn.disabled,.blue-dark.btn.disabled.active,.blue-dark.btn.disabled:active,.blue-dark.btn.disabled:focus,.blue-dark.btn.disabled:hover,.blue-dark.btn[disabled],.blue-dark.btn[disabled].active,.blue-dark.btn[disabled]:active,.blue-dark.btn[disabled]:focus,.blue-dark.btn[disabled]:hover,fieldset[disabled] .blue-dark.btn,fieldset[disabled] .blue-dark.btn.active,fieldset[disabled] .blue-dark.btn:active,fieldset[disabled] .blue-dark.btn:focus,fieldset[disabled] .blue-dark.btn:hover{background-color:#5e738b}.blue-dark.btn .badge{color:#5e738b;background-color:#FFF}.portlet.blue-dark,.portlet.box.blue-dark>.portlet-title,.portlet>.portlet-body.blue-dark{background-color:#5e738b}.btn.blue-dark-stripe{border-left:3px solid #5e738b}.portlet.solid.blue-dark>.portlet-body,.portlet.solid.blue-dark>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-dark>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-dark>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-dark>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-dark{border:1px solid #788da4;border-top:0}.portlet.box.blue-dark>.portlet-title>.caption,.portlet.box.blue-dark>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-dark>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9dacbd;color:#acb8c7}.portlet.box.blue-dark>.portlet-title>.actions .btn-default>i{color:#b5c0cd}.portlet.box.blue-dark>.portlet-title>.actions .btn-default.active,.portlet.box.blue-dark>.portlet-title>.actions .btn-default:active,.portlet.box.blue-dark>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-dark>.portlet-title>.actions .btn-default:hover{border:1px solid #bbc5d1;color:#cad2db}.dashboard-stat.blue-dark{background-color:#5e738b}.dashboard-stat.blue-dark.dashboard-stat-light:hover{background-color:#56697f}.dashboard-stat.blue-dark .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-dark .details .number{color:#FFF}.dashboard-stat.blue-dark .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-dark .more{color:#FFF;background-color:#56697f}.bg-blue-dark{border-color:#5e738b!important;background-image:none!important;background-color:#5e738b!important;color:#FFF!important}.font-blue-dark{color:#5e738b!important}.progress-bar.blue-dark{background:#5e738b!important;color:#FFF!important}.blue-sharp.btn{color:#FFF;background-color:#5C9BD1;border-color:""}.blue-sharp.btn.active,.blue-sharp.btn:active,.blue-sharp.btn:focus,.blue-sharp.btn:hover,.open .blue-sharp.btn.dropdown-toggle{color:#FFF;background-color:#408ac9}.blue-sharp.btn.active,.blue-sharp.btn:active{background-image:none;background-color:#357dbb}.blue-sharp.btn.active:hover,.blue-sharp.btn:active:hover{background-color:#3782c3}.open .blue-sharp.btn.dropdown-toggle{background-image:none}.blue-sharp.btn.disabled,.blue-sharp.btn.disabled.active,.blue-sharp.btn.disabled:active,.blue-sharp.btn.disabled:focus,.blue-sharp.btn.disabled:hover,.blue-sharp.btn[disabled],.blue-sharp.btn[disabled].active,.blue-sharp.btn[disabled]:active,.blue-sharp.btn[disabled]:focus,.blue-sharp.btn[disabled]:hover,fieldset[disabled] .blue-sharp.btn,fieldset[disabled] .blue-sharp.btn.active,fieldset[disabled] .blue-sharp.btn:active,fieldset[disabled] .blue-sharp.btn:focus,fieldset[disabled] .blue-sharp.btn:hover{background-color:#5C9BD1}.blue-sharp.btn .badge{color:#5C9BD1;background-color:#FFF}.portlet.blue-sharp,.portlet.box.blue-sharp>.portlet-title,.portlet>.portlet-body.blue-sharp{background-color:#5C9BD1}.btn.blue-sharp-stripe{border-left:3px solid #5C9BD1}.portlet.solid.blue-sharp>.portlet-body,.portlet.solid.blue-sharp>.portlet-title{border:0;color:#FFF}.portlet.solid.blue-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.solid.blue-sharp>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.blue-sharp>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.blue-sharp{border:1px solid #84b3dc;border-top:0}.portlet.box.blue-sharp>.portlet-title>.caption,.portlet.box.blue-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.box.blue-sharp>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #b4d1ea;color:#c7ddef}.portlet.box.blue-sharp>.portlet-title>.actions .btn-default>i{color:#d3e4f3}.portlet.box.blue-sharp>.portlet-title>.actions .btn-default.active,.portlet.box.blue-sharp>.portlet-title>.actions .btn-default:active,.portlet.box.blue-sharp>.portlet-title>.actions .btn-default:focus,.portlet.box.blue-sharp>.portlet-title>.actions .btn-default:hover{border:1px solid #dbe9f5;color:#eff5fb}.dashboard-stat.blue-sharp{background-color:#5C9BD1}.dashboard-stat.blue-sharp.dashboard-stat-light:hover{background-color:#4c91cd}.dashboard-stat.blue-sharp .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.blue-sharp .details .number{color:#FFF}.dashboard-stat.blue-sharp .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.blue-sharp .more{color:#FFF;background-color:#4c91cd}.bg-blue-sharp{border-color:#5C9BD1!important;background-image:none!important;background-color:#5C9BD1!important;color:#FFF!important}.font-blue-sharp{color:#5C9BD1!important}.progress-bar.blue-sharp{background:#5C9BD1!important;color:#FFF!important}.green.btn{color:#FFF;background-color:#35aa47;border-color:""}.green.btn.active,.green.btn:active,.green.btn:focus,.green.btn:hover,.open .green.btn.dropdown-toggle{color:#FFF;background-color:#2d8f3c}.green.btn.active,.green.btn:active{background-image:none;background-color:#267b34}.green.btn.active:hover,.green.btn:active:hover{background-color:#298337}.open .green.btn.dropdown-toggle{background-image:none}.green.btn.disabled,.green.btn.disabled.active,.green.btn.disabled:active,.green.btn.disabled:focus,.green.btn.disabled:hover,.green.btn[disabled],.green.btn[disabled].active,.green.btn[disabled]:active,.green.btn[disabled]:focus,.green.btn[disabled]:hover,fieldset[disabled] .green.btn,fieldset[disabled] .green.btn.active,fieldset[disabled] .green.btn:active,fieldset[disabled] .green.btn:focus,fieldset[disabled] .green.btn:hover{background-color:#35aa47}.green.btn .badge{color:#35aa47;background-color:#FFF}.portlet.box.green>.portlet-title,.portlet.green,.portlet>.portlet-body.green{background-color:#35aa47}.btn.green-stripe{border-left:3px solid #35aa47}.portlet.solid.green>.portlet-body,.portlet.solid.green>.portlet-title{border:0;color:#FFF}.portlet.solid.green>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green{border:1px solid #4bc75e;border-top:0}.portlet.box.green>.portlet-title>.caption,.portlet.box.green>.portlet-title>.caption>i{color:#FFF}.portlet.box.green>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #7ad588;color:#8ddc99}.portlet.box.green>.portlet-title>.actions .btn-default>i{color:#99dfa4}.portlet.box.green>.portlet-title>.actions .btn-default.active,.portlet.box.green>.portlet-title>.actions .btn-default:active,.portlet.box.green>.portlet-title>.actions .btn-default:focus,.portlet.box.green>.portlet-title>.actions .btn-default:hover{border:1px solid #a1e2ab;color:#b4e8bc}.dashboard-stat.green{background-color:#35aa47}.dashboard-stat.green.dashboard-stat-light:hover{background-color:#309a41}.dashboard-stat.green .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green .details .number{color:#FFF}.dashboard-stat.green .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green .more{color:#FFF;background-color:#309a41}.bg-green{border-color:#35aa47!important;background-image:none!important;background-color:#35aa47!important;color:#FFF!important}.font-green{color:#35aa47!important}.progress-bar.green{background:#35aa47!important;color:#FFF!important}.green-meadow.btn{color:#FFF;background-color:#1BBC9B;border-color:""}.green-meadow.btn.active,.green-meadow.btn:active,.green-meadow.btn:focus,.green-meadow.btn:hover,.open .green-meadow.btn.dropdown-toggle{color:#FFF;background-color:#179d81}.green-meadow.btn.active,.green-meadow.btn:active{background-image:none;background-color:#13866f}.green-meadow.btn.active:hover,.green-meadow.btn:active:hover{background-color:#158f76}.open .green-meadow.btn.dropdown-toggle{background-image:none}.green-meadow.btn.disabled,.green-meadow.btn.disabled.active,.green-meadow.btn.disabled:active,.green-meadow.btn.disabled:focus,.green-meadow.btn.disabled:hover,.green-meadow.btn[disabled],.green-meadow.btn[disabled].active,.green-meadow.btn[disabled]:active,.green-meadow.btn[disabled]:focus,.green-meadow.btn[disabled]:hover,fieldset[disabled] .green-meadow.btn,fieldset[disabled] .green-meadow.btn.active,fieldset[disabled] .green-meadow.btn:active,fieldset[disabled] .green-meadow.btn:focus,fieldset[disabled] .green-meadow.btn:hover{background-color:#1BBC9B}.green-meadow.btn .badge{color:#1BBC9B;background-color:#FFF}.portlet.box.green-meadow>.portlet-title,.portlet.green-meadow,.portlet>.portlet-body.green-meadow{background-color:#1BBC9B}.btn.green-meadow-stripe{border-left:3px solid #1BBC9B}.portlet.solid.green-meadow>.portlet-body,.portlet.solid.green-meadow>.portlet-title{border:0;color:#FFF}.portlet.solid.green-meadow>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-meadow>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-meadow>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-meadow{border:1px solid #2ae0bb;border-top:0}.portlet.box.green-meadow>.portlet-title>.caption,.portlet.box.green-meadow>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-meadow>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #5fe8cc;color:#75ebd3}.portlet.box.green-meadow>.portlet-title>.actions .btn-default>i{color:#83edd7}.portlet.box.green-meadow>.portlet-title>.actions .btn-default.active,.portlet.box.green-meadow>.portlet-title>.actions .btn-default:active,.portlet.box.green-meadow>.portlet-title>.actions .btn-default:focus,.portlet.box.green-meadow>.portlet-title>.actions .btn-default:hover{border:1px solid #8ceeda;color:#a2f2e1}.dashboard-stat.green-meadow{background-color:#1BBC9B}.dashboard-stat.green-meadow.dashboard-stat-light:hover{background-color:#18aa8c}.dashboard-stat.green-meadow .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-meadow .details .number{color:#FFF}.dashboard-stat.green-meadow .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-meadow .more{color:#FFF;background-color:#18aa8c}.bg-green-meadow{border-color:#1BBC9B!important;background-image:none!important;background-color:#1BBC9B!important;color:#FFF!important}.font-green-meadow{color:#1BBC9B!important}.progress-bar.green-meadow{background:#1BBC9B!important;color:#FFF!important}.green-seagreen.btn{color:#FFF;background-color:#1BA39C;border-color:""}.green-seagreen.btn.active,.green-seagreen.btn:active,.green-seagreen.btn:focus,.green-seagreen.btn:hover,.open .green-seagreen.btn.dropdown-toggle{color:#FFF;background-color:#16847f}.green-seagreen.btn.active,.green-seagreen.btn:active{background-image:none;background-color:#126e6a}.green-seagreen.btn.active:hover,.green-seagreen.btn:active:hover{background-color:#147772}.open .green-seagreen.btn.dropdown-toggle{background-image:none}.green-seagreen.btn.disabled,.green-seagreen.btn.disabled.active,.green-seagreen.btn.disabled:active,.green-seagreen.btn.disabled:focus,.green-seagreen.btn.disabled:hover,.green-seagreen.btn[disabled],.green-seagreen.btn[disabled].active,.green-seagreen.btn[disabled]:active,.green-seagreen.btn[disabled]:focus,.green-seagreen.btn[disabled]:hover,fieldset[disabled] .green-seagreen.btn,fieldset[disabled] .green-seagreen.btn.active,fieldset[disabled] .green-seagreen.btn:active,fieldset[disabled] .green-seagreen.btn:focus,fieldset[disabled] .green-seagreen.btn:hover{background-color:#1BA39C}.green-seagreen.btn .badge{color:#1BA39C;background-color:#FFF}.portlet.box.green-seagreen>.portlet-title,.portlet.green-seagreen,.portlet>.portlet-body.green-seagreen{background-color:#1BA39C}.btn.green-seagreen-stripe{border-left:3px solid #1BA39C}.portlet.solid.green-seagreen>.portlet-body,.portlet.solid.green-seagreen>.portlet-title{border:0;color:#FFF}.portlet.solid.green-seagreen>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-seagreen>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-seagreen>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-seagreen{border:1px solid #22cfc6;border-top:0}.portlet.box.green-seagreen>.portlet-title>.caption,.portlet.box.green-seagreen>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-seagreen>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #4de1da;color:#63e5de}.portlet.box.green-seagreen>.portlet-title>.actions .btn-default>i{color:#70e7e1}.portlet.box.green-seagreen>.portlet-title>.actions .btn-default.active,.portlet.box.green-seagreen>.portlet-title>.actions .btn-default:active,.portlet.box.green-seagreen>.portlet-title>.actions .btn-default:focus,.portlet.box.green-seagreen>.portlet-title>.actions .btn-default:hover{border:1px solid #78e9e3;color:#8eece8}.dashboard-stat.green-seagreen{background-color:#1BA39C}.dashboard-stat.green-seagreen.dashboard-stat-light:hover{background-color:#18918b}.dashboard-stat.green-seagreen .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-seagreen .details .number{color:#FFF}.dashboard-stat.green-seagreen .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-seagreen .more{color:#FFF;background-color:#18918b}.bg-green-seagreen{border-color:#1BA39C!important;background-image:none!important;background-color:#1BA39C!important;color:#FFF!important}.font-green-seagreen{color:#1BA39C!important}.progress-bar.green-seagreen{background:#1BA39C!important;color:#FFF!important}.green-turquoise.btn{color:#FFF;background-color:#36D7B7;border-color:""}.green-turquoise.btn.active,.green-turquoise.btn:active,.green-turquoise.btn:focus,.green-turquoise.btn:hover,.open .green-turquoise.btn.dropdown-toggle{color:#FFF;background-color:#27c3a4}.green-turquoise.btn.active,.green-turquoise.btn:active{background-image:none;background-color:#22ad92}.green-turquoise.btn.active:hover,.green-turquoise.btn:active:hover{background-color:#24b699}.open .green-turquoise.btn.dropdown-toggle{background-image:none}.green-turquoise.btn.disabled,.green-turquoise.btn.disabled.active,.green-turquoise.btn.disabled:active,.green-turquoise.btn.disabled:focus,.green-turquoise.btn.disabled:hover,.green-turquoise.btn[disabled],.green-turquoise.btn[disabled].active,.green-turquoise.btn[disabled]:active,.green-turquoise.btn[disabled]:focus,.green-turquoise.btn[disabled]:hover,fieldset[disabled] .green-turquoise.btn,fieldset[disabled] .green-turquoise.btn.active,fieldset[disabled] .green-turquoise.btn:active,fieldset[disabled] .green-turquoise.btn:focus,fieldset[disabled] .green-turquoise.btn:hover{background-color:#36D7B7}.green-turquoise.btn .badge{color:#36D7B7;background-color:#FFF}.portlet.box.green-turquoise>.portlet-title,.portlet.green-turquoise,.portlet>.portlet-body.green-turquoise{background-color:#36D7B7}.btn.green-turquoise-stripe{border-left:3px solid #36D7B7}.portlet.solid.green-turquoise>.portlet-body,.portlet.solid.green-turquoise>.portlet-title{border:0;color:#FFF}.portlet.solid.green-turquoise>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-turquoise>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-turquoise>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-turquoise{border:1px solid #61dfc6;border-top:0}.portlet.box.green-turquoise>.portlet-title>.caption,.portlet.box.green-turquoise>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-turquoise>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #94ead9;color:#a9eee0}.portlet.box.green-turquoise>.portlet-title>.actions .btn-default>i{color:#b6f0e5}.portlet.box.green-turquoise>.portlet-title>.actions .btn-default.active,.portlet.box.green-turquoise>.portlet-title>.actions .btn-default:active,.portlet.box.green-turquoise>.portlet-title>.actions .btn-default:focus,.portlet.box.green-turquoise>.portlet-title>.actions .btn-default:hover{border:1px solid #bef2e8;color:#d3f6ef}.dashboard-stat.green-turquoise{background-color:#36D7B7}.dashboard-stat.green-turquoise.dashboard-stat-light:hover{background-color:#29cfae}.dashboard-stat.green-turquoise .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-turquoise .details .number{color:#FFF}.dashboard-stat.green-turquoise .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-turquoise .more{color:#FFF;background-color:#29cfae}.bg-green-turquoise{border-color:#36D7B7!important;background-image:none!important;background-color:#36D7B7!important;color:#FFF!important}.font-green-turquoise{color:#36D7B7!important}.progress-bar.green-turquoise{background:#36D7B7!important;color:#FFF!important}.green-haze.btn{color:#FFF;background-color:#44b6ae;border-color:""}.green-haze.btn.active,.green-haze.btn:active,.green-haze.btn:focus,.green-haze.btn:hover,.open .green-haze.btn.dropdown-toggle{color:#FFF;background-color:#3a9c95}.green-haze.btn.active,.green-haze.btn:active{background-image:none;background-color:#338983}.green-haze.btn.active:hover,.green-haze.btn:active:hover{background-color:#36918b}.open .green-haze.btn.dropdown-toggle{background-image:none}.green-haze.btn.disabled,.green-haze.btn.disabled.active,.green-haze.btn.disabled:active,.green-haze.btn.disabled:focus,.green-haze.btn.disabled:hover,.green-haze.btn[disabled],.green-haze.btn[disabled].active,.green-haze.btn[disabled]:active,.green-haze.btn[disabled]:focus,.green-haze.btn[disabled]:hover,fieldset[disabled] .green-haze.btn,fieldset[disabled] .green-haze.btn.active,fieldset[disabled] .green-haze.btn:active,fieldset[disabled] .green-haze.btn:focus,fieldset[disabled] .green-haze.btn:hover{background-color:#44b6ae}.green-haze.btn .badge{color:#44b6ae;background-color:#FFF}.portlet.box.green-haze>.portlet-title,.portlet.green-haze,.portlet>.portlet-body.green-haze{background-color:#44b6ae}.btn.green-haze-stripe{border-left:3px solid #44b6ae}.portlet.solid.green-haze>.portlet-body,.portlet.solid.green-haze>.portlet-title{border:0;color:#FFF}.portlet.solid.green-haze>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-haze>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-haze>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-haze{border:1px solid #67c6bf;border-top:0}.portlet.box.green-haze>.portlet-title>.caption,.portlet.box.green-haze>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-haze>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #93d7d2;color:#a6deda}.portlet.box.green-haze>.portlet-title>.actions .btn-default>i{color:#b1e2de}.portlet.box.green-haze>.portlet-title>.actions .btn-default.active,.portlet.box.green-haze>.portlet-title>.actions .btn-default:active,.portlet.box.green-haze>.portlet-title>.actions .btn-default:focus,.portlet.box.green-haze>.portlet-title>.actions .btn-default:hover{border:1px solid #b9e5e2;color:#cbece9}.dashboard-stat.green-haze{background-color:#44b6ae}.dashboard-stat.green-haze.dashboard-stat-light:hover{background-color:#3ea7a0}.dashboard-stat.green-haze .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-haze .details .number{color:#FFF}.dashboard-stat.green-haze .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-haze .more{color:#FFF;background-color:#3ea7a0}.bg-green-haze{border-color:#44b6ae!important;background-image:none!important;background-color:#44b6ae!important;color:#FFF!important}.font-green-haze{color:#44b6ae!important}.progress-bar.green-haze{background:#44b6ae!important;color:#FFF!important}.green-jungle.btn{color:#FFF;background-color:#26C281;border-color:""}.green-jungle.btn.active,.green-jungle.btn:active,.green-jungle.btn:focus,.green-jungle.btn:hover,.open .green-jungle.btn.dropdown-toggle{color:#FFF;background-color:#20a46d}.green-jungle.btn.active,.green-jungle.btn:active{background-image:none;background-color:#1c8f5f}.green-jungle.btn.active:hover,.green-jungle.btn:active:hover{background-color:#1e9765}.open .green-jungle.btn.dropdown-toggle{background-image:none}.green-jungle.btn.disabled,.green-jungle.btn.disabled.active,.green-jungle.btn.disabled:active,.green-jungle.btn.disabled:focus,.green-jungle.btn.disabled:hover,.green-jungle.btn[disabled],.green-jungle.btn[disabled].active,.green-jungle.btn[disabled]:active,.green-jungle.btn[disabled]:focus,.green-jungle.btn[disabled]:hover,fieldset[disabled] .green-jungle.btn,fieldset[disabled] .green-jungle.btn.active,fieldset[disabled] .green-jungle.btn:active,fieldset[disabled] .green-jungle.btn:focus,fieldset[disabled] .green-jungle.btn:hover{background-color:#26C281}.green-jungle.btn .badge{color:#26C281;background-color:#FFF}.portlet.box.green-jungle>.portlet-title,.portlet.green-jungle,.portlet>.portlet-body.green-jungle{background-color:#26C281}.btn.green-jungle-stripe{border-left:3px solid #26C281}.portlet.solid.green-jungle>.portlet-body,.portlet.solid.green-jungle>.portlet-title{border:0;color:#FFF}.portlet.solid.green-jungle>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-jungle>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-jungle>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-jungle{border:1px solid #41da9a;border-top:0}.portlet.box.green-jungle>.portlet-title>.caption,.portlet.box.green-jungle>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-jungle>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #74e4b5;color:#8ae8c1}.portlet.box.green-jungle>.portlet-title>.actions .btn-default>i{color:#96ebc8}.portlet.box.green-jungle>.portlet-title>.actions .btn-default.active,.portlet.box.green-jungle>.portlet-title>.actions .btn-default:active,.portlet.box.green-jungle>.portlet-title>.actions .btn-default:focus,.portlet.box.green-jungle>.portlet-title>.actions .btn-default:hover{border:1px solid #9feccc;color:#b4f0d7}.dashboard-stat.green-jungle{background-color:#26C281}.dashboard-stat.green-jungle.dashboard-stat-light:hover{background-color:#23b176}.dashboard-stat.green-jungle .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-jungle .details .number{color:#FFF}.dashboard-stat.green-jungle .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-jungle .more{color:#FFF;background-color:#23b176}.bg-green-jungle{border-color:#26C281!important;background-image:none!important;background-color:#26C281!important;color:#FFF!important}.font-green-jungle{color:#26C281!important}.progress-bar.green-jungle{background:#26C281!important;color:#FFF!important}.green-sharp.btn{color:#FFF;background-color:#4DB3A2;border-color:""}.green-sharp.btn.active,.green-sharp.btn:active,.green-sharp.btn:focus,.green-sharp.btn:hover,.open .green-sharp.btn.dropdown-toggle{color:#FFF;background-color:#429a8c}.green-sharp.btn.active,.green-sharp.btn:active{background-image:none;background-color:#3a897b}.green-sharp.btn.active:hover,.green-sharp.btn:active:hover{background-color:#3d9082}.open .green-sharp.btn.dropdown-toggle{background-image:none}.green-sharp.btn.disabled,.green-sharp.btn.disabled.active,.green-sharp.btn.disabled:active,.green-sharp.btn.disabled:focus,.green-sharp.btn.disabled:hover,.green-sharp.btn[disabled],.green-sharp.btn[disabled].active,.green-sharp.btn[disabled]:active,.green-sharp.btn[disabled]:focus,.green-sharp.btn[disabled]:hover,fieldset[disabled] .green-sharp.btn,fieldset[disabled] .green-sharp.btn.active,fieldset[disabled] .green-sharp.btn:active,fieldset[disabled] .green-sharp.btn:focus,fieldset[disabled] .green-sharp.btn:hover{background-color:#4DB3A2}.green-sharp.btn .badge{color:#4DB3A2;background-color:#FFF}.portlet.box.green-sharp>.portlet-title,.portlet.green-sharp,.portlet>.portlet-body.green-sharp{background-color:#4DB3A2}.btn.green-sharp-stripe{border-left:3px solid #4DB3A2}.portlet.solid.green-sharp>.portlet-body,.portlet.solid.green-sharp>.portlet-title{border:0;color:#FFF}.portlet.solid.green-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-sharp>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-sharp>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-sharp{border:1px solid #71c2b5;border-top:0}.portlet.box.green-sharp>.portlet-title>.caption,.portlet.box.green-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-sharp>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #9cd5cb;color:#addcd4}.portlet.box.green-sharp>.portlet-title>.actions .btn-default>i{color:#b8e1da}.portlet.box.green-sharp>.portlet-title>.actions .btn-default.active,.portlet.box.green-sharp>.portlet-title>.actions .btn-default:active,.portlet.box.green-sharp>.portlet-title>.actions .btn-default:focus,.portlet.box.green-sharp>.portlet-title>.actions .btn-default:hover{border:1px solid #bfe4de;color:#d1ebe7}.dashboard-stat.green-sharp{background-color:#4DB3A2}.dashboard-stat.green-sharp.dashboard-stat-light:hover{background-color:#46a595}.dashboard-stat.green-sharp .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-sharp .details .number{color:#FFF}.dashboard-stat.green-sharp .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-sharp .more{color:#FFF;background-color:#46a595}.bg-green-sharp{border-color:#4DB3A2!important;background-image:none!important;background-color:#4DB3A2!important;color:#FFF!important}.font-green-sharp{color:#4DB3A2!important}.progress-bar.green-sharp{background:#4DB3A2!important;color:#FFF!important}.green-soft.btn{color:#FFF;background-color:#3faba4;border-color:""}.green-soft.btn.active,.green-soft.btn:active,.green-soft.btn:focus,.green-soft.btn:hover,.open .green-soft.btn.dropdown-toggle{color:#FFF;background-color:#35918b}.green-soft.btn.active,.green-soft.btn:active{background-image:none;background-color:#2f7e79}.green-soft.btn.active:hover,.green-soft.btn:active:hover{background-color:#318680}.open .green-soft.btn.dropdown-toggle{background-image:none}.green-soft.btn.disabled,.green-soft.btn.disabled.active,.green-soft.btn.disabled:active,.green-soft.btn.disabled:focus,.green-soft.btn.disabled:hover,.green-soft.btn[disabled],.green-soft.btn[disabled].active,.green-soft.btn[disabled]:active,.green-soft.btn[disabled]:focus,.green-soft.btn[disabled]:hover,fieldset[disabled] .green-soft.btn,fieldset[disabled] .green-soft.btn.active,fieldset[disabled] .green-soft.btn:active,fieldset[disabled] .green-soft.btn:focus,fieldset[disabled] .green-soft.btn:hover{background-color:#3faba4}.green-soft.btn .badge{color:#3faba4;background-color:#FFF}.portlet.box.green-soft>.portlet-title,.portlet.green-soft,.portlet>.portlet-body.green-soft{background-color:#3faba4}.btn.green-soft-stripe{border-left:3px solid #3faba4}.portlet.solid.green-soft>.portlet-body,.portlet.solid.green-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.green-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.green-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.green-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.green-soft{border:1px solid #5bc2bc;border-top:0}.portlet.box.green-soft>.portlet-title>.caption,.portlet.box.green-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.green-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #87d3ce;color:#9adad6}.portlet.box.green-soft>.portlet-title>.actions .btn-default>i{color:#a5deda}.portlet.box.green-soft>.portlet-title>.actions .btn-default.active,.portlet.box.green-soft>.portlet-title>.actions .btn-default:active,.portlet.box.green-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.green-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #ade1dd;color:#bfe7e5}.dashboard-stat.green-soft{background-color:#3faba4}.dashboard-stat.green-soft.dashboard-stat-light:hover{background-color:#3a9c96}.dashboard-stat.green-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.green-soft .details .number{color:#FFF}.dashboard-stat.green-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.green-soft .more{color:#FFF;background-color:#3a9c96}.bg-green-soft{border-color:#3faba4!important;background-image:none!important;background-color:#3faba4!important;color:#FFF!important}.font-green-soft{color:#3faba4!important}.progress-bar.green-soft{background:#3faba4!important;color:#FFF!important}.grey.btn{color:#333;background-color:#E5E5E5;border-color:""}.grey.btn.active,.grey.btn:active,.grey.btn:focus,.grey.btn:hover,.open .grey.btn.dropdown-toggle{color:#333;background-color:#d3d3d3}.grey.btn.active,.grey.btn:active{background-image:none;background-color:#c6c6c6}.grey.btn.active:hover,.grey.btn:active:hover{background-color:#ccc}.open .grey.btn.dropdown-toggle{background-image:none}.grey.btn.disabled,.grey.btn.disabled.active,.grey.btn.disabled:active,.grey.btn.disabled:focus,.grey.btn.disabled:hover,.grey.btn[disabled],.grey.btn[disabled].active,.grey.btn[disabled]:active,.grey.btn[disabled]:focus,.grey.btn[disabled]:hover,fieldset[disabled] .grey.btn,fieldset[disabled] .grey.btn.active,fieldset[disabled] .grey.btn:active,fieldset[disabled] .grey.btn:focus,fieldset[disabled] .grey.btn:hover{background-color:#E5E5E5}.grey.btn .badge{color:#E5E5E5;background-color:#333}.portlet.box.grey>.portlet-title,.portlet.grey,.portlet>.portlet-body.grey{background-color:#E5E5E5}.btn.grey-stripe{border-left:3px solid #E5E5E5}.portlet.solid.grey>.portlet-body,.portlet.solid.grey>.portlet-title{border:0;color:#333}.portlet.solid.grey>.portlet-title>.caption>i{color:#333}.portlet.solid.grey>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey{border:1px solid #fff;border-top:0}.portlet.box.grey>.portlet-title>.caption,.portlet.box.grey>.portlet-title>.caption>i{color:#333}.portlet.box.grey>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey>.portlet-title>.actions .btn-default.active,.portlet.box.grey>.portlet-title>.actions .btn-default:active,.portlet.box.grey>.portlet-title>.actions .btn-default:focus,.portlet.box.grey>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey{background-color:#E5E5E5}.dashboard-stat.grey.dashboard-stat-light:hover{background-color:#dbdbdb}.dashboard-stat.grey .visual>i{color:#333;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey .details .number{color:#333}.dashboard-stat.grey .details .desc{color:#333;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey .more{color:#333;background-color:#dbdbdb}.bg-grey{border-color:#E5E5E5!important;background-image:none!important;background-color:#E5E5E5!important;color:#333!important}.font-grey{color:#E5E5E5!important}.progress-bar.grey{background:#E5E5E5!important;color:#333!important}.grey-steel.btn{color:#80898e;background-color:#e9edef;border-color:""}.grey-steel.btn.active,.grey-steel.btn:active,.grey-steel.btn:focus,.grey-steel.btn:hover,.open .grey-steel.btn.dropdown-toggle{color:#80898e;background-color:#d4dce0}.grey-steel.btn.active,.grey-steel.btn:active{background-image:none;background-color:#c6d0d5}.grey-steel.btn.active:hover,.grey-steel.btn:active:hover{background-color:#cbd5da}.open .grey-steel.btn.dropdown-toggle{background-image:none}.grey-steel.btn.disabled,.grey-steel.btn.disabled.active,.grey-steel.btn.disabled:active,.grey-steel.btn.disabled:focus,.grey-steel.btn.disabled:hover,.grey-steel.btn[disabled],.grey-steel.btn[disabled].active,.grey-steel.btn[disabled]:active,.grey-steel.btn[disabled]:focus,.grey-steel.btn[disabled]:hover,fieldset[disabled] .grey-steel.btn,fieldset[disabled] .grey-steel.btn.active,fieldset[disabled] .grey-steel.btn:active,fieldset[disabled] .grey-steel.btn:focus,fieldset[disabled] .grey-steel.btn:hover{background-color:#e9edef}.grey-steel.btn .badge{color:#e9edef;background-color:#80898e}.portlet.box.grey-steel>.portlet-title,.portlet.grey-steel,.portlet>.portlet-body.grey-steel{background-color:#e9edef}.btn.grey-steel-stripe{border-left:3px solid #e9edef}.portlet.solid.grey-steel>.portlet-body,.portlet.solid.grey-steel>.portlet-title{border:0;color:#80898e}.portlet.solid.grey-steel>.portlet-title>.caption>i{color:#80898e}.portlet.solid.grey-steel>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-steel>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-steel{border:1px solid #fff;border-top:0}.portlet.box.grey-steel>.portlet-title>.caption,.portlet.box.grey-steel>.portlet-title>.caption>i{color:#80898e}.portlet.box.grey-steel>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey-steel>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-steel>.portlet-title>.actions .btn-default.active,.portlet.box.grey-steel>.portlet-title>.actions .btn-default:active,.portlet.box.grey-steel>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-steel>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-steel{background-color:#e9edef}.dashboard-stat.grey-steel.dashboard-stat-light:hover{background-color:#dde3e6}.dashboard-stat.grey-steel .visual>i{color:#80898e;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-steel .details .number{color:#80898e}.dashboard-stat.grey-steel .details .desc{color:#80898e;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-steel .more{color:#80898e;background-color:#dde3e6}.bg-grey-steel{border-color:#e9edef!important;background-image:none!important;background-color:#e9edef!important;color:#80898e!important}.font-grey-steel{color:#e9edef!important}.progress-bar.grey-steel{background:#e9edef!important;color:#80898e!important}.grey-cararra.btn{color:#333;background-color:#fafafa;border-color:""}.grey-cararra.btn.active,.grey-cararra.btn:active,.grey-cararra.btn:focus,.grey-cararra.btn:hover,.open .grey-cararra.btn.dropdown-toggle{color:#333;background-color:#e8e8e8}.grey-cararra.btn.active,.grey-cararra.btn:active{background-image:none;background-color:#dbdbdb}.grey-cararra.btn.active:hover,.grey-cararra.btn:active:hover{background-color:#e1e1e1}.open .grey-cararra.btn.dropdown-toggle{background-image:none}.grey-cararra.btn.disabled,.grey-cararra.btn.disabled.active,.grey-cararra.btn.disabled:active,.grey-cararra.btn.disabled:focus,.grey-cararra.btn.disabled:hover,.grey-cararra.btn[disabled],.grey-cararra.btn[disabled].active,.grey-cararra.btn[disabled]:active,.grey-cararra.btn[disabled]:focus,.grey-cararra.btn[disabled]:hover,fieldset[disabled] .grey-cararra.btn,fieldset[disabled] .grey-cararra.btn.active,fieldset[disabled] .grey-cararra.btn:active,fieldset[disabled] .grey-cararra.btn:focus,fieldset[disabled] .grey-cararra.btn:hover{background-color:#fafafa}.grey-cararra.btn .badge{color:#fafafa;background-color:#333}.portlet.box.grey-cararra>.portlet-title,.portlet.grey-cararra,.portlet>.portlet-body.grey-cararra{background-color:#fafafa}.btn.grey-cararra-stripe{border-left:3px solid #fafafa}.portlet.solid.grey-cararra>.portlet-body,.portlet.solid.grey-cararra>.portlet-title{border:0;color:#333}.portlet.solid.grey-cararra>.portlet-title>.caption>i{color:#333}.portlet.solid.grey-cararra>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-cararra>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-cararra{border:1px solid #fff;border-top:0}.portlet.box.grey-cararra>.portlet-title>.caption,.portlet.box.grey-cararra>.portlet-title>.caption>i{color:#333}.portlet.box.grey-cararra>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey-cararra>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-cararra>.portlet-title>.actions .btn-default.active,.portlet.box.grey-cararra>.portlet-title>.actions .btn-default:active,.portlet.box.grey-cararra>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-cararra>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-cararra{background-color:#fafafa}.dashboard-stat.grey-cararra.dashboard-stat-light:hover{background-color:#f0f0f0}.dashboard-stat.grey-cararra .visual>i{color:#333;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-cararra .details .number{color:#333}.dashboard-stat.grey-cararra .details .desc{color:#333;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-cararra .more{color:#333;background-color:#f0f0f0}.bg-grey-cararra{border-color:#fafafa!important;background-image:none!important;background-color:#fafafa!important;color:#333!important}.font-grey-cararra{color:#fafafa!important}.progress-bar.grey-cararra{background:#fafafa!important;color:#333!important}.grey-gallery.btn{color:#fff;background-color:#555;border-color:""}.grey-gallery.btn.active,.grey-gallery.btn:active,.grey-gallery.btn:focus,.grey-gallery.btn:hover,.open .grey-gallery.btn.dropdown-toggle{color:#fff;background-color:#434343}.grey-gallery.btn.active,.grey-gallery.btn:active{background-image:none;background-color:#363636}.grey-gallery.btn.active:hover,.grey-gallery.btn:active:hover{background-color:#3b3b3b}.open .grey-gallery.btn.dropdown-toggle{background-image:none}.grey-gallery.btn.disabled,.grey-gallery.btn.disabled.active,.grey-gallery.btn.disabled:active,.grey-gallery.btn.disabled:focus,.grey-gallery.btn.disabled:hover,.grey-gallery.btn[disabled],.grey-gallery.btn[disabled].active,.grey-gallery.btn[disabled]:active,.grey-gallery.btn[disabled]:focus,.grey-gallery.btn[disabled]:hover,fieldset[disabled] .grey-gallery.btn,fieldset[disabled] .grey-gallery.btn.active,fieldset[disabled] .grey-gallery.btn:active,fieldset[disabled] .grey-gallery.btn:focus,fieldset[disabled] .grey-gallery.btn:hover{background-color:#555}.grey-gallery.btn .badge{color:#555;background-color:#fff}.portlet.box.grey-gallery>.portlet-title,.portlet.grey-gallery,.portlet>.portlet-body.grey-gallery{background-color:#555}.btn.grey-gallery-stripe{border-left:3px solid #555}.portlet.solid.grey-gallery>.portlet-body,.portlet.solid.grey-gallery>.portlet-title{border:0;color:#fff}.portlet.solid.grey-gallery>.portlet-title>.caption>i{color:#fff}.portlet.solid.grey-gallery>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-gallery>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-gallery{border:1px solid #6e6e6e;border-top:0}.portlet.box.grey-gallery>.portlet-title>.caption,.portlet.box.grey-gallery>.portlet-title>.caption>i{color:#fff}.portlet.box.grey-gallery>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #8d8d8d;color:#9a9a9a}.portlet.box.grey-gallery>.portlet-title>.actions .btn-default>i{color:#a2a2a2}.portlet.box.grey-gallery>.portlet-title>.actions .btn-default.active,.portlet.box.grey-gallery>.portlet-title>.actions .btn-default:active,.portlet.box.grey-gallery>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-gallery>.portlet-title>.actions .btn-default:hover{border:1px solid #a7a7a7;color:#b3b3b3}.dashboard-stat.grey-gallery{background-color:#555}.dashboard-stat.grey-gallery.dashboard-stat-light:hover{background-color:#4b4b4b}.dashboard-stat.grey-gallery .visual>i{color:#fff;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-gallery .details .number{color:#fff}.dashboard-stat.grey-gallery .details .desc{color:#fff;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-gallery .more{color:#fff;background-color:#4b4b4b}.bg-grey-gallery{border-color:#555!important;background-image:none!important;background-color:#555!important;color:#fff!important}.font-grey-gallery{color:#555!important}.progress-bar.grey-gallery{background:#555!important;color:#fff!important}.grey-cascade.btn{color:#FFF;background-color:#95A5A6;border-color:""}.grey-cascade.btn.active,.grey-cascade.btn:active,.grey-cascade.btn:focus,.grey-cascade.btn:hover,.open .grey-cascade.btn.dropdown-toggle{color:#FFF;background-color:#829596}.grey-cascade.btn.active,.grey-cascade.btn:active{background-image:none;background-color:#74898a}.grey-cascade.btn.active:hover,.grey-cascade.btn:active:hover{background-color:#798d8f}.open .grey-cascade.btn.dropdown-toggle{background-image:none}.grey-cascade.btn.disabled,.grey-cascade.btn.disabled.active,.grey-cascade.btn.disabled:active,.grey-cascade.btn.disabled:focus,.grey-cascade.btn.disabled:hover,.grey-cascade.btn[disabled],.grey-cascade.btn[disabled].active,.grey-cascade.btn[disabled]:active,.grey-cascade.btn[disabled]:focus,.grey-cascade.btn[disabled]:hover,fieldset[disabled] .grey-cascade.btn,fieldset[disabled] .grey-cascade.btn.active,fieldset[disabled] .grey-cascade.btn:active,fieldset[disabled] .grey-cascade.btn:focus,fieldset[disabled] .grey-cascade.btn:hover{background-color:#95A5A6}.grey-cascade.btn .badge{color:#95A5A6;background-color:#FFF}.portlet.box.grey-cascade>.portlet-title,.portlet.grey-cascade,.portlet>.portlet-body.grey-cascade{background-color:#95A5A6}.btn.grey-cascade-stripe{border-left:3px solid #95A5A6}.portlet.solid.grey-cascade>.portlet-body,.portlet.solid.grey-cascade>.portlet-title{border:0;color:#FFF}.portlet.solid.grey-cascade>.portlet-title>.caption>i{color:#FFF}.portlet.solid.grey-cascade>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-cascade>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-cascade{border:1px solid #b1bdbd;border-top:0}.portlet.box.grey-cascade>.portlet-title>.caption,.portlet.box.grey-cascade>.portlet-title>.caption>i{color:#FFF}.portlet.box.grey-cascade>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #d2d9d9;color:#e0e5e5}.portlet.box.grey-cascade>.portlet-title>.actions .btn-default>i{color:#e8ecec}.portlet.box.grey-cascade>.portlet-title>.actions .btn-default.active,.portlet.box.grey-cascade>.portlet-title>.actions .btn-default:active,.portlet.box.grey-cascade>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-cascade>.portlet-title>.actions .btn-default:hover{border:1px solid #eef0f0;color:#fcfcfc}.dashboard-stat.grey-cascade{background-color:#95A5A6}.dashboard-stat.grey-cascade.dashboard-stat-light:hover{background-color:#8a9c9d}.dashboard-stat.grey-cascade .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-cascade .details .number{color:#FFF}.dashboard-stat.grey-cascade .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-cascade .more{color:#FFF;background-color:#8a9c9d}.bg-grey-cascade{border-color:#95A5A6!important;background-image:none!important;background-color:#95A5A6!important;color:#FFF!important}.font-grey-cascade{color:#95A5A6!important}.progress-bar.grey-cascade{background:#95A5A6!important;color:#FFF!important}.grey-silver.btn{color:#FAFCFB;background-color:#BFBFBF;border-color:""}.grey-silver.btn.active,.grey-silver.btn:active,.grey-silver.btn:focus,.grey-silver.btn:hover,.open .grey-silver.btn.dropdown-toggle{color:#FAFCFB;background-color:#adadad}.grey-silver.btn.active,.grey-silver.btn:active{background-image:none;background-color:#a0a0a0}.grey-silver.btn.active:hover,.grey-silver.btn:active:hover{background-color:#a6a6a6}.open .grey-silver.btn.dropdown-toggle{background-image:none}.grey-silver.btn.disabled,.grey-silver.btn.disabled.active,.grey-silver.btn.disabled:active,.grey-silver.btn.disabled:focus,.grey-silver.btn.disabled:hover,.grey-silver.btn[disabled],.grey-silver.btn[disabled].active,.grey-silver.btn[disabled]:active,.grey-silver.btn[disabled]:focus,.grey-silver.btn[disabled]:hover,fieldset[disabled] .grey-silver.btn,fieldset[disabled] .grey-silver.btn.active,fieldset[disabled] .grey-silver.btn:active,fieldset[disabled] .grey-silver.btn:focus,fieldset[disabled] .grey-silver.btn:hover{background-color:#BFBFBF}.grey-silver.btn .badge{color:#BFBFBF;background-color:#FAFCFB}.portlet.box.grey-silver>.portlet-title,.portlet.grey-silver,.portlet>.portlet-body.grey-silver{background-color:#BFBFBF}.btn.grey-silver-stripe{border-left:3px solid #BFBFBF}.portlet.solid.grey-silver>.portlet-body,.portlet.solid.grey-silver>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-silver>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-silver>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-silver>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-silver{border:1px solid #d9d9d9;border-top:0}.portlet.box.grey-silver>.portlet-title>.caption,.portlet.box.grey-silver>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-silver>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f7f7f7;color:#fff}.portlet.box.grey-silver>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-silver>.portlet-title>.actions .btn-default.active,.portlet.box.grey-silver>.portlet-title>.actions .btn-default:active,.portlet.box.grey-silver>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-silver>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-silver{background-color:#BFBFBF}.dashboard-stat.grey-silver.dashboard-stat-light:hover{background-color:#b5b5b5}.dashboard-stat.grey-silver .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-silver .details .number{color:#FAFCFB}.dashboard-stat.grey-silver .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-silver .more{color:#FAFCFB;background-color:#b5b5b5}.bg-grey-silver{border-color:#BFBFBF!important;background-image:none!important;background-color:#BFBFBF!important;color:#FAFCFB!important}.font-grey-silver{color:#BFBFBF!important}.progress-bar.grey-silver{background:#BFBFBF!important;color:#FAFCFB!important}.grey-salsa.btn{color:#FAFCFB;background-color:#ACB5C3;border-color:""}.grey-salsa.btn.active,.grey-salsa.btn:active,.grey-salsa.btn:focus,.grey-salsa.btn:hover,.open .grey-salsa.btn.dropdown-toggle{color:#FAFCFB;background-color:#97a3b4}.grey-salsa.btn.active,.grey-salsa.btn:active{background-image:none;background-color:#8895a9}.grey-salsa.btn.active:hover,.grey-salsa.btn:active:hover{background-color:#8e9bae}.open .grey-salsa.btn.dropdown-toggle{background-image:none}.grey-salsa.btn.disabled,.grey-salsa.btn.disabled.active,.grey-salsa.btn.disabled:active,.grey-salsa.btn.disabled:focus,.grey-salsa.btn.disabled:hover,.grey-salsa.btn[disabled],.grey-salsa.btn[disabled].active,.grey-salsa.btn[disabled]:active,.grey-salsa.btn[disabled]:focus,.grey-salsa.btn[disabled]:hover,fieldset[disabled] .grey-salsa.btn,fieldset[disabled] .grey-salsa.btn.active,fieldset[disabled] .grey-salsa.btn:active,fieldset[disabled] .grey-salsa.btn:focus,fieldset[disabled] .grey-salsa.btn:hover{background-color:#ACB5C3}.grey-salsa.btn .badge{color:#ACB5C3;background-color:#FAFCFB}.portlet.box.grey-salsa>.portlet-title,.portlet.grey-salsa,.portlet>.portlet-body.grey-salsa{background-color:#ACB5C3}.btn.grey-salsa-stripe{border-left:3px solid #ACB5C3}.portlet.solid.grey-salsa>.portlet-body,.portlet.solid.grey-salsa>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-salsa>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-salsa>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-salsa>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-salsa{border:1px solid #cacfd8;border-top:0}.portlet.box.grey-salsa>.portlet-title>.caption,.portlet.box.grey-salsa>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-salsa>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #edeff2;color:#fcfcfd}.portlet.box.grey-salsa>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-salsa>.portlet-title>.actions .btn-default.active,.portlet.box.grey-salsa>.portlet-title>.actions .btn-default:active,.portlet.box.grey-salsa>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-salsa>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-salsa{background-color:#ACB5C3}.dashboard-stat.grey-salsa.dashboard-stat-light:hover{background-color:#a0aaba}.dashboard-stat.grey-salsa .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-salsa .details .number{color:#FAFCFB}.dashboard-stat.grey-salsa .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-salsa .more{color:#FAFCFB;background-color:#a0aaba}.bg-grey-salsa{border-color:#ACB5C3!important;background-image:none!important;background-color:#ACB5C3!important;color:#FAFCFB!important}.font-grey-salsa{color:#ACB5C3!important}.progress-bar.grey-salsa{background:#ACB5C3!important;color:#FAFCFB!important}.grey-salt.btn{color:#FAFCFB;background-color:#bfcad1;border-color:""}.grey-salt.btn.active,.grey-salt.btn:active,.grey-salt.btn:focus,.grey-salt.btn:hover,.open .grey-salt.btn.dropdown-toggle{color:#FAFCFB;background-color:#aab9c2}.grey-salt.btn.active,.grey-salt.btn:active{background-image:none;background-color:#9badb7}.grey-salt.btn.active:hover,.grey-salt.btn:active:hover{background-color:#a1b1bc}.open .grey-salt.btn.dropdown-toggle{background-image:none}.grey-salt.btn.disabled,.grey-salt.btn.disabled.active,.grey-salt.btn.disabled:active,.grey-salt.btn.disabled:focus,.grey-salt.btn.disabled:hover,.grey-salt.btn[disabled],.grey-salt.btn[disabled].active,.grey-salt.btn[disabled]:active,.grey-salt.btn[disabled]:focus,.grey-salt.btn[disabled]:hover,fieldset[disabled] .grey-salt.btn,fieldset[disabled] .grey-salt.btn.active,fieldset[disabled] .grey-salt.btn:active,fieldset[disabled] .grey-salt.btn:focus,fieldset[disabled] .grey-salt.btn:hover{background-color:#bfcad1}.grey-salt.btn .badge{color:#bfcad1;background-color:#FAFCFB}.portlet.box.grey-salt>.portlet-title,.portlet.grey-salt,.portlet>.portlet-body.grey-salt{background-color:#bfcad1}.btn.grey-salt-stripe{border-left:3px solid #bfcad1}.portlet.solid.grey-salt>.portlet-body,.portlet.solid.grey-salt>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-salt>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-salt>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-salt>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-salt{border:1px solid #dde3e6;border-top:0}.portlet.box.grey-salt>.portlet-title>.caption,.portlet.box.grey-salt>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-salt>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fff;color:#fff}.portlet.box.grey-salt>.portlet-title>.actions .btn-default>i{color:#fff}.portlet.box.grey-salt>.portlet-title>.actions .btn-default.active,.portlet.box.grey-salt>.portlet-title>.actions .btn-default:active,.portlet.box.grey-salt>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-salt>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.grey-salt{background-color:#bfcad1}.dashboard-stat.grey-salt.dashboard-stat-light:hover{background-color:#b3c0c8}.dashboard-stat.grey-salt .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-salt .details .number{color:#FAFCFB}.dashboard-stat.grey-salt .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-salt .more{color:#FAFCFB;background-color:#b3c0c8}.bg-grey-salt{border-color:#bfcad1!important;background-image:none!important;background-color:#bfcad1!important;color:#FAFCFB!important}.font-grey-salt{color:#bfcad1!important}.progress-bar.grey-salt{background:#bfcad1!important;color:#FAFCFB!important}.grey-mint.btn{color:#FAFCFB;background-color:#9eacb4;border-color:""}.grey-mint.btn.active,.grey-mint.btn:active,.grey-mint.btn:focus,.grey-mint.btn:hover,.open .grey-mint.btn.dropdown-toggle{color:#FAFCFB;background-color:#8a9ba4}.grey-mint.btn.active,.grey-mint.btn:active{background-image:none;background-color:#7b8e99}.grey-mint.btn.active:hover,.grey-mint.btn:active:hover{background-color:#81939e}.open .grey-mint.btn.dropdown-toggle{background-image:none}.grey-mint.btn.disabled,.grey-mint.btn.disabled.active,.grey-mint.btn.disabled:active,.grey-mint.btn.disabled:focus,.grey-mint.btn.disabled:hover,.grey-mint.btn[disabled],.grey-mint.btn[disabled].active,.grey-mint.btn[disabled]:active,.grey-mint.btn[disabled]:focus,.grey-mint.btn[disabled]:hover,fieldset[disabled] .grey-mint.btn,fieldset[disabled] .grey-mint.btn.active,fieldset[disabled] .grey-mint.btn:active,fieldset[disabled] .grey-mint.btn:focus,fieldset[disabled] .grey-mint.btn:hover{background-color:#9eacb4}.grey-mint.btn .badge{color:#9eacb4;background-color:#FAFCFB}.portlet.box.grey-mint>.portlet-title,.portlet.grey-mint,.portlet>.portlet-body.grey-mint{background-color:#9eacb4}.btn.grey-mint-stripe{border-left:3px solid #9eacb4}.portlet.solid.grey-mint>.portlet-body,.portlet.solid.grey-mint>.portlet-title{border:0;color:#FAFCFB}.portlet.solid.grey-mint>.portlet-title>.caption>i{color:#FAFCFB}.portlet.solid.grey-mint>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.grey-mint>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.grey-mint{border:1px solid #bbc5ca;border-top:0}.portlet.box.grey-mint>.portlet-title>.caption,.portlet.box.grey-mint>.portlet-title>.caption>i{color:#FAFCFB}.portlet.box.grey-mint>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #dde2e5;color:#eceef0}.portlet.box.grey-mint>.portlet-title>.actions .btn-default>i{color:#f4f6f7}.portlet.box.grey-mint>.portlet-title>.actions .btn-default.active,.portlet.box.grey-mint>.portlet-title>.actions .btn-default:active,.portlet.box.grey-mint>.portlet-title>.actions .btn-default:focus,.portlet.box.grey-mint>.portlet-title>.actions .btn-default:hover{border:1px solid #fafbfb;color:#fff}.dashboard-stat.grey-mint{background-color:#9eacb4}.dashboard-stat.grey-mint.dashboard-stat-light:hover{background-color:#92a2ab}.dashboard-stat.grey-mint .visual>i{color:#FAFCFB;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.grey-mint .details .number{color:#FAFCFB}.dashboard-stat.grey-mint .details .desc{color:#FAFCFB;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.grey-mint .more{color:#FAFCFB;background-color:#92a2ab}.bg-grey-mint{border-color:#9eacb4!important;background-image:none!important;background-color:#9eacb4!important;color:#FAFCFB!important}.font-grey-mint{color:#9eacb4!important}.progress-bar.grey-mint{background:#9eacb4!important;color:#FAFCFB!important}.red.btn{color:#FFF;background-color:#d84a38;border-color:""}.open .red.btn.dropdown-toggle,.red.btn.active,.red.btn:active,.red.btn:focus,.red.btn:hover{color:#FFF;background-color:#c63927}.red.btn.active,.red.btn:active{background-image:none;background-color:#b03223}.red.btn.active:hover,.red.btn:active:hover{background-color:#b93524}.open .red.btn.dropdown-toggle{background-image:none}.red.btn.disabled,.red.btn.disabled.active,.red.btn.disabled:active,.red.btn.disabled:focus,.red.btn.disabled:hover,.red.btn[disabled],.red.btn[disabled].active,.red.btn[disabled]:active,.red.btn[disabled]:focus,.red.btn[disabled]:hover,fieldset[disabled] .red.btn,fieldset[disabled] .red.btn.active,fieldset[disabled] .red.btn:active,fieldset[disabled] .red.btn:focus,fieldset[disabled] .red.btn:hover{background-color:#d84a38}.red.btn .badge{color:#d84a38;background-color:#FFF}.portlet.box.red>.portlet-title,.portlet.red,.portlet>.portlet-body.red{background-color:#d84a38}.btn.red-stripe{border-left:3px solid #d84a38}.portlet.solid.red>.portlet-body,.portlet.solid.red>.portlet-title{border:0;color:#FFF}.portlet.solid.red>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red{border:1px solid #e07163;border-top:0}.portlet.box.red>.portlet-title>.caption,.portlet.box.red>.portlet-title>.caption>i{color:#FFF}.portlet.box.red>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ea9f96;color:#efb3ab}.portlet.box.red>.portlet-title>.actions .btn-default>i{color:#f1beb8}.portlet.box.red>.portlet-title>.actions .btn-default.active,.portlet.box.red>.portlet-title>.actions .btn-default:active,.portlet.box.red>.portlet-title>.actions .btn-default:focus,.portlet.box.red>.portlet-title>.actions .btn-default:hover{border:1px solid #f3c6c0;color:#f7dad6}.dashboard-stat.red{background-color:#d84a38}.dashboard-stat.red.dashboard-stat-light:hover{background-color:#d23c29}.dashboard-stat.red .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red .details .number{color:#FFF}.dashboard-stat.red .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red .more{color:#FFF;background-color:#d23c29}.bg-red{border-color:#d84a38!important;background-image:none!important;background-color:#d84a38!important;color:#FFF!important}.font-red{color:#d84a38!important}.progress-bar.red{background:#d84a38!important;color:#FFF!important}.red-pink.btn{color:#FFF;background-color:#E08283;border-color:""}.open .red-pink.btn.dropdown-toggle,.red-pink.btn.active,.red-pink.btn:active,.red-pink.btn:focus,.red-pink.btn:hover{color:#FFF;background-color:#d96567}.red-pink.btn.active,.red-pink.btn:active{background-image:none;background-color:#d45152}.red-pink.btn.active:hover,.red-pink.btn:active:hover{background-color:#d6595a}.open .red-pink.btn.dropdown-toggle{background-image:none}.red-pink.btn.disabled,.red-pink.btn.disabled.active,.red-pink.btn.disabled:active,.red-pink.btn.disabled:focus,.red-pink.btn.disabled:hover,.red-pink.btn[disabled],.red-pink.btn[disabled].active,.red-pink.btn[disabled]:active,.red-pink.btn[disabled]:focus,.red-pink.btn[disabled]:hover,fieldset[disabled] .red-pink.btn,fieldset[disabled] .red-pink.btn.active,fieldset[disabled] .red-pink.btn:active,fieldset[disabled] .red-pink.btn:focus,fieldset[disabled] .red-pink.btn:hover{background-color:#E08283}.red-pink.btn .badge{color:#E08283;background-color:#FFF}.portlet.box.red-pink>.portlet-title,.portlet.red-pink,.portlet>.portlet-body.red-pink{background-color:#E08283}.btn.red-pink-stripe{border-left:3px solid #E08283}.portlet.solid.red-pink>.portlet-body,.portlet.solid.red-pink>.portlet-title{border:0;color:#FFF}.portlet.solid.red-pink>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-pink>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-pink>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-pink{border:1px solid #eaabac;border-top:0}.portlet.box.red-pink>.portlet-title>.caption,.portlet.box.red-pink>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-pink>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f6dcdc;color:#fbf0f0}.portlet.box.red-pink>.portlet-title>.actions .btn-default>i{color:#fefdfd}.portlet.box.red-pink>.portlet-title>.actions .btn-default.active,.portlet.box.red-pink>.portlet-title>.actions .btn-default:active,.portlet.box.red-pink>.portlet-title>.actions .btn-default:focus,.portlet.box.red-pink>.portlet-title>.actions .btn-default:hover{border:1px solid #fff;color:#fff}.dashboard-stat.red-pink{background-color:#E08283}.dashboard-stat.red-pink.dashboard-stat-light:hover{background-color:#dc7273}.dashboard-stat.red-pink .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-pink .details .number{color:#FFF}.dashboard-stat.red-pink .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-pink .more{color:#FFF;background-color:#dc7273}.bg-red-pink{border-color:#E08283!important;background-image:none!important;background-color:#E08283!important;color:#FFF!important}.font-red-pink{color:#E08283!important}.progress-bar.red-pink{background:#E08283!important;color:#FFF!important}.red-sunglo.btn{color:#FFF;background-color:#E26A6A;border-color:""}.open .red-sunglo.btn.dropdown-toggle,.red-sunglo.btn.active,.red-sunglo.btn:active,.red-sunglo.btn:focus,.red-sunglo.btn:hover{color:#FFF;background-color:#dc4c4c}.red-sunglo.btn.active,.red-sunglo.btn:active{background-image:none;background-color:#d83737}.red-sunglo.btn.active:hover,.red-sunglo.btn:active:hover{background-color:#da3f3f}.open .red-sunglo.btn.dropdown-toggle{background-image:none}.red-sunglo.btn.disabled,.red-sunglo.btn.disabled.active,.red-sunglo.btn.disabled:active,.red-sunglo.btn.disabled:focus,.red-sunglo.btn.disabled:hover,.red-sunglo.btn[disabled],.red-sunglo.btn[disabled].active,.red-sunglo.btn[disabled]:active,.red-sunglo.btn[disabled]:focus,.red-sunglo.btn[disabled]:hover,fieldset[disabled] .red-sunglo.btn,fieldset[disabled] .red-sunglo.btn.active,fieldset[disabled] .red-sunglo.btn:active,fieldset[disabled] .red-sunglo.btn:focus,fieldset[disabled] .red-sunglo.btn:hover{background-color:#E26A6A}.red-sunglo.btn .badge{color:#E26A6A;background-color:#FFF}.portlet.box.red-sunglo>.portlet-title,.portlet.red-sunglo,.portlet>.portlet-body.red-sunglo{background-color:#E26A6A}.btn.red-sunglo-stripe{border-left:3px solid #E26A6A}.portlet.solid.red-sunglo>.portlet-body,.portlet.solid.red-sunglo>.portlet-title{border:0;color:#FFF}.portlet.solid.red-sunglo>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-sunglo>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-sunglo>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-sunglo{border:1px solid #ea9595;border-top:0}.portlet.box.red-sunglo>.portlet-title>.caption,.portlet.box.red-sunglo>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-sunglo>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f4c8c8;color:#f8dddd}.portlet.box.red-sunglo>.portlet-title>.actions .btn-default>i{color:#fbeaea}.portlet.box.red-sunglo>.portlet-title>.actions .btn-default.active,.portlet.box.red-sunglo>.portlet-title>.actions .btn-default:active,.portlet.box.red-sunglo>.portlet-title>.actions .btn-default:focus,.portlet.box.red-sunglo>.portlet-title>.actions .btn-default:hover{border:1px solid #fdf3f3;color:#fff}.dashboard-stat.red-sunglo{background-color:#E26A6A}.dashboard-stat.red-sunglo.dashboard-stat-light:hover{background-color:#df5959}.dashboard-stat.red-sunglo .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-sunglo .details .number{color:#FFF}.dashboard-stat.red-sunglo .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-sunglo .more{color:#FFF;background-color:#df5959}.bg-red-sunglo{border-color:#E26A6A!important;background-image:none!important;background-color:#E26A6A!important;color:#FFF!important}.font-red-sunglo{color:#E26A6A!important}.progress-bar.red-sunglo{background:#E26A6A!important;color:#FFF!important}.red-intense.btn{color:#FFF;background-color:#e35b5a;border-color:""}.open .red-intense.btn.dropdown-toggle,.red-intense.btn.active,.red-intense.btn:active,.red-intense.btn:focus,.red-intense.btn:hover{color:#FFF;background-color:#de3d3b}.red-intense.btn.active,.red-intense.btn:active{background-image:none;background-color:#da2726}.red-intense.btn.active:hover,.red-intense.btn:active:hover{background-color:#dc302e}.open .red-intense.btn.dropdown-toggle{background-image:none}.red-intense.btn.disabled,.red-intense.btn.disabled.active,.red-intense.btn.disabled:active,.red-intense.btn.disabled:focus,.red-intense.btn.disabled:hover,.red-intense.btn[disabled],.red-intense.btn[disabled].active,.red-intense.btn[disabled]:active,.red-intense.btn[disabled]:focus,.red-intense.btn[disabled]:hover,fieldset[disabled] .red-intense.btn,fieldset[disabled] .red-intense.btn.active,fieldset[disabled] .red-intense.btn:active,fieldset[disabled] .red-intense.btn:focus,fieldset[disabled] .red-intense.btn:hover{background-color:#e35b5a}.red-intense.btn .badge{color:#e35b5a;background-color:#FFF}.portlet.box.red-intense>.portlet-title,.portlet.red-intense,.portlet>.portlet-body.red-intense{background-color:#e35b5a}.btn.red-intense-stripe{border-left:3px solid #e35b5a}.portlet.solid.red-intense>.portlet-body,.portlet.solid.red-intense>.portlet-title{border:0;color:#FFF}.portlet.solid.red-intense>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-intense>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-intense>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-intense{border:1px solid #ea8686;border-top:0}.portlet.box.red-intense>.portlet-title>.caption,.portlet.box.red-intense>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-intense>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f3baba;color:#f7d0d0}.portlet.box.red-intense>.portlet-title>.actions .btn-default>i{color:#f9dddd}.portlet.box.red-intense>.portlet-title>.actions .btn-default.active,.portlet.box.red-intense>.portlet-title>.actions .btn-default:active,.portlet.box.red-intense>.portlet-title>.actions .btn-default:focus,.portlet.box.red-intense>.portlet-title>.actions .btn-default:hover{border:1px solid #fbe6e6;color:#fefbfb}.dashboard-stat.red-intense{background-color:#e35b5a}.dashboard-stat.red-intense.dashboard-stat-light:hover{background-color:#e04a49}.dashboard-stat.red-intense .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-intense .details .number{color:#FFF}.dashboard-stat.red-intense .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-intense .more{color:#FFF;background-color:#e04a49}.bg-red-intense{border-color:#e35b5a!important;background-image:none!important;background-color:#e35b5a!important;color:#FFF!important}.font-red-intense{color:#e35b5a!important}.progress-bar.red-intense{background:#e35b5a!important;color:#FFF!important}.red-thunderbird.btn{color:#FFF;background-color:#D91E18;border-color:""}.open .red-thunderbird.btn.dropdown-toggle,.red-thunderbird.btn.active,.red-thunderbird.btn:active,.red-thunderbird.btn:focus,.red-thunderbird.btn:hover{color:#FFF;background-color:#b91a14}.red-thunderbird.btn.active,.red-thunderbird.btn:active{background-image:none;background-color:#a21612}.red-thunderbird.btn.active:hover,.red-thunderbird.btn:active:hover{background-color:#ab1813}.open .red-thunderbird.btn.dropdown-toggle{background-image:none}.red-thunderbird.btn.disabled,.red-thunderbird.btn.disabled.active,.red-thunderbird.btn.disabled:active,.red-thunderbird.btn.disabled:focus,.red-thunderbird.btn.disabled:hover,.red-thunderbird.btn[disabled],.red-thunderbird.btn[disabled].active,.red-thunderbird.btn[disabled]:active,.red-thunderbird.btn[disabled]:focus,.red-thunderbird.btn[disabled]:hover,fieldset[disabled] .red-thunderbird.btn,fieldset[disabled] .red-thunderbird.btn.active,fieldset[disabled] .red-thunderbird.btn:active,fieldset[disabled] .red-thunderbird.btn:focus,fieldset[disabled] .red-thunderbird.btn:hover{background-color:#D91E18}.red-thunderbird.btn .badge{color:#D91E18;background-color:#FFF}.portlet.box.red-thunderbird>.portlet-title,.portlet.red-thunderbird,.portlet>.portlet-body.red-thunderbird{background-color:#D91E18}.btn.red-thunderbird-stripe{border-left:3px solid #D91E18}.portlet.solid.red-thunderbird>.portlet-body,.portlet.solid.red-thunderbird>.portlet-title{border:0;color:#FFF}.portlet.solid.red-thunderbird>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-thunderbird>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-thunderbird{border:1px solid #e9403b;border-top:0}.portlet.box.red-thunderbird>.portlet-title>.caption,.portlet.box.red-thunderbird>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ef7672;color:#f28c89}.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default>i{color:#f39997}.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default.active,.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default:active,.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default:focus,.portlet.box.red-thunderbird>.portlet-title>.actions .btn-default:hover{border:1px solid #f4a2a0;color:#f7b9b7}.dashboard-stat.red-thunderbird{background-color:#D91E18}.dashboard-stat.red-thunderbird.dashboard-stat-light:hover{background-color:#c71b16}.dashboard-stat.red-thunderbird .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-thunderbird .details .number{color:#FFF}.dashboard-stat.red-thunderbird .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-thunderbird .more{color:#FFF;background-color:#c71b16}.bg-red-thunderbird{border-color:#D91E18!important;background-image:none!important;background-color:#D91E18!important;color:#FFF!important}.font-red-thunderbird{color:#D91E18!important}.progress-bar.red-thunderbird{background:#D91E18!important;color:#FFF!important}.red-flamingo.btn{color:#FFF;background-color:#EF4836;border-color:""}.open .red-flamingo.btn.dropdown-toggle,.red-flamingo.btn.active,.red-flamingo.btn:active,.red-flamingo.btn:focus,.red-flamingo.btn:hover{color:#FFF;background-color:#ec2a15}.red-flamingo.btn.active,.red-flamingo.btn:active{background-image:none;background-color:#d72411}.red-flamingo.btn.active:hover,.red-flamingo.btn:active:hover{background-color:#e02612}.open .red-flamingo.btn.dropdown-toggle{background-image:none}.red-flamingo.btn.disabled,.red-flamingo.btn.disabled.active,.red-flamingo.btn.disabled:active,.red-flamingo.btn.disabled:focus,.red-flamingo.btn.disabled:hover,.red-flamingo.btn[disabled],.red-flamingo.btn[disabled].active,.red-flamingo.btn[disabled]:active,.red-flamingo.btn[disabled]:focus,.red-flamingo.btn[disabled]:hover,fieldset[disabled] .red-flamingo.btn,fieldset[disabled] .red-flamingo.btn.active,fieldset[disabled] .red-flamingo.btn:active,fieldset[disabled] .red-flamingo.btn:focus,fieldset[disabled] .red-flamingo.btn:hover{background-color:#EF4836}.red-flamingo.btn .badge{color:#EF4836;background-color:#FFF}.portlet.box.red-flamingo>.portlet-title,.portlet.red-flamingo,.portlet>.portlet-body.red-flamingo{background-color:#EF4836}.btn.red-flamingo-stripe{border-left:3px solid #EF4836}.portlet.solid.red-flamingo>.portlet-body,.portlet.solid.red-flamingo>.portlet-title{border:0;color:#FFF}.portlet.solid.red-flamingo>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-flamingo>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-flamingo>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-flamingo{border:1px solid #f37365;border-top:0}.portlet.box.red-flamingo>.portlet-title>.caption,.portlet.box.red-flamingo>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-flamingo>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #f7a79e;color:#f9bcb6}.portlet.box.red-flamingo>.portlet-title>.actions .btn-default>i{color:#fac9c4}.portlet.box.red-flamingo>.portlet-title>.actions .btn-default.active,.portlet.box.red-flamingo>.portlet-title>.actions .btn-default:active,.portlet.box.red-flamingo>.portlet-title>.actions .btn-default:focus,.portlet.box.red-flamingo>.portlet-title>.actions .btn-default:hover{border:1px solid #fbd2cd;color:#fde7e5}.dashboard-stat.red-flamingo{background-color:#EF4836}.dashboard-stat.red-flamingo.dashboard-stat-light:hover{background-color:#ed3723}.dashboard-stat.red-flamingo .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-flamingo .details .number{color:#FFF}.dashboard-stat.red-flamingo .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-flamingo .more{color:#FFF;background-color:#ed3723}.bg-red-flamingo{border-color:#EF4836!important;background-image:none!important;background-color:#EF4836!important;color:#FFF!important}.font-red-flamingo{color:#EF4836!important}.progress-bar.red-flamingo{background:#EF4836!important;color:#FFF!important}.red-soft.btn{color:#FFF;background-color:#d05454;border-color:""}.open .red-soft.btn.dropdown-toggle,.red-soft.btn.active,.red-soft.btn:active,.red-soft.btn:focus,.red-soft.btn:hover{color:#FFF;background-color:#c83838}.red-soft.btn.active,.red-soft.btn:active{background-image:none;background-color:#b53232}.red-soft.btn.active:hover,.red-soft.btn:active:hover{background-color:#bd3434}.open .red-soft.btn.dropdown-toggle{background-image:none}.red-soft.btn.disabled,.red-soft.btn.disabled.active,.red-soft.btn.disabled:active,.red-soft.btn.disabled:focus,.red-soft.btn.disabled:hover,.red-soft.btn[disabled],.red-soft.btn[disabled].active,.red-soft.btn[disabled]:active,.red-soft.btn[disabled]:focus,.red-soft.btn[disabled]:hover,fieldset[disabled] .red-soft.btn,fieldset[disabled] .red-soft.btn.active,fieldset[disabled] .red-soft.btn:active,fieldset[disabled] .red-soft.btn:focus,fieldset[disabled] .red-soft.btn:hover{background-color:#d05454}.red-soft.btn .badge{color:#d05454;background-color:#FFF}.portlet.box.red-soft>.portlet-title,.portlet.red-soft,.portlet>.portlet-body.red-soft{background-color:#d05454}.btn.red-soft-stripe{border-left:3px solid #d05454}.portlet.solid.red-soft>.portlet-body,.portlet.solid.red-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.red-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-soft{border:1px solid #db7c7c;border-top:0}.portlet.box.red-soft>.portlet-title>.caption,.portlet.box.red-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #e8acac;color:#eec0c0}.portlet.box.red-soft>.portlet-title>.actions .btn-default>i{color:#f1cccc}.portlet.box.red-soft>.portlet-title>.actions .btn-default.active,.portlet.box.red-soft>.portlet-title>.actions .btn-default:active,.portlet.box.red-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.red-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #f3d4d4;color:#f9e8e8}.dashboard-stat.red-soft{background-color:#d05454}.dashboard-stat.red-soft.dashboard-stat-light:hover{background-color:#c44}.dashboard-stat.red-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-soft .details .number{color:#FFF}.dashboard-stat.red-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-soft .more{color:#FFF;background-color:#c44}.bg-red-soft{border-color:#d05454!important;background-image:none!important;background-color:#d05454!important;color:#FFF!important}.font-red-soft{color:#d05454!important}.progress-bar.red-soft{background:#d05454!important;color:#FFF!important}.red-haze.btn{color:#FFF;background-color:#f36a5a;border-color:""}.open .red-haze.btn.dropdown-toggle,.red-haze.btn.active,.red-haze.btn:active,.red-haze.btn:focus,.red-haze.btn:hover{color:#FFF;background-color:#f14c39}.red-haze.btn.active,.red-haze.btn:active{background-image:none;background-color:#ef3621}.red-haze.btn.active:hover,.red-haze.btn:active:hover{background-color:#f03f2a}.open .red-haze.btn.dropdown-toggle{background-image:none}.red-haze.btn.disabled,.red-haze.btn.disabled.active,.red-haze.btn.disabled:active,.red-haze.btn.disabled:focus,.red-haze.btn.disabled:hover,.red-haze.btn[disabled],.red-haze.btn[disabled].active,.red-haze.btn[disabled]:active,.red-haze.btn[disabled]:focus,.red-haze.btn[disabled]:hover,fieldset[disabled] .red-haze.btn,fieldset[disabled] .red-haze.btn.active,fieldset[disabled] .red-haze.btn:active,fieldset[disabled] .red-haze.btn:focus,fieldset[disabled] .red-haze.btn:hover{background-color:#f36a5a}.red-haze.btn .badge{color:#f36a5a;background-color:#FFF}.portlet.box.red-haze>.portlet-title,.portlet.red-haze,.portlet>.portlet-body.red-haze{background-color:#f36a5a}.btn.red-haze-stripe{border-left:3px solid #f36a5a}.portlet.solid.red-haze>.portlet-body,.portlet.solid.red-haze>.portlet-title{border:0;color:#FFF}.portlet.solid.red-haze>.portlet-title>.caption>i{color:#FFF}.portlet.solid.red-haze>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.red-haze>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.red-haze{border:1px solid #f6958a;border-top:0}.portlet.box.red-haze>.portlet-title>.caption,.portlet.box.red-haze>.portlet-title>.caption>i{color:#FFF}.portlet.box.red-haze>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fbc8c3;color:#fcdeda}.portlet.box.red-haze>.portlet-title>.actions .btn-default>i{color:#fdebe9}.portlet.box.red-haze>.portlet-title>.actions .btn-default.active,.portlet.box.red-haze>.portlet-title>.actions .btn-default:active,.portlet.box.red-haze>.portlet-title>.actions .btn-default:focus,.portlet.box.red-haze>.portlet-title>.actions .btn-default:hover{border:1px solid #fef3f2;color:#fff}.dashboard-stat.red-haze{background-color:#f36a5a}.dashboard-stat.red-haze.dashboard-stat-light:hover{background-color:#f25947}.dashboard-stat.red-haze .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.red-haze .details .number{color:#FFF}.dashboard-stat.red-haze .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.red-haze .more{color:#FFF;background-color:#f25947}.bg-red-haze{border-color:#f36a5a!important;background-image:none!important;background-color:#f36a5a!important;color:#FFF!important}.font-red-haze{color:#f36a5a!important}.progress-bar.red-haze{background:#f36a5a!important;color:#FFF!important}.yellow.btn{color:#FFF;background-color:#FFB848;border-color:""}.open .yellow.btn.dropdown-toggle,.yellow.btn.active,.yellow.btn:active,.yellow.btn:focus,.yellow.btn:hover{color:#FFF;background-color:#ffaa24}.yellow.btn.active,.yellow.btn:active{background-image:none;background-color:#ffa00b}.yellow.btn.active:hover,.yellow.btn:active:hover{background-color:#ffa415}.open .yellow.btn.dropdown-toggle{background-image:none}.yellow.btn.disabled,.yellow.btn.disabled.active,.yellow.btn.disabled:active,.yellow.btn.disabled:focus,.yellow.btn.disabled:hover,.yellow.btn[disabled],.yellow.btn[disabled].active,.yellow.btn[disabled]:active,.yellow.btn[disabled]:focus,.yellow.btn[disabled]:hover,fieldset[disabled] .yellow.btn,fieldset[disabled] .yellow.btn.active,fieldset[disabled] .yellow.btn:active,fieldset[disabled] .yellow.btn:focus,fieldset[disabled] .yellow.btn:hover{background-color:#FFB848}.yellow.btn .badge{color:#FFB848;background-color:#FFF}.portlet.box.yellow>.portlet-title,.portlet.yellow,.portlet>.portlet-body.yellow{background-color:#FFB848}.btn.yellow-stripe{border-left:3px solid #FFB848}.portlet.solid.yellow>.portlet-body,.portlet.solid.yellow>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow{border:1px solid #ffcc7b;border-top:0}.portlet.box.yellow>.portlet-title>.caption,.portlet.box.yellow>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ffe4b8;color:#ffedd2}.portlet.box.yellow>.portlet-title>.actions .btn-default>i{color:#fff3e1}.portlet.box.yellow>.portlet-title>.actions .btn-default.active,.portlet.box.yellow>.portlet-title>.actions .btn-default:active,.portlet.box.yellow>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow>.portlet-title>.actions .btn-default:hover{border:1px solid #fff7eb;color:#fff}.dashboard-stat.yellow{background-color:#FFB848}.dashboard-stat.yellow.dashboard-stat-light:hover{background-color:#ffb034}.dashboard-stat.yellow .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow .details .number{color:#FFF}.dashboard-stat.yellow .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow .more{color:#FFF;background-color:#ffb034}.bg-yellow{border-color:#FFB848!important;background-image:none!important;background-color:#FFB848!important;color:#FFF!important}.font-yellow{color:#FFB848!important}.progress-bar.yellow{background:#FFB848!important;color:#FFF!important}.yellow-gold.btn{color:#FFF;background-color:#E87E04;border-color:""}.open .yellow-gold.btn.dropdown-toggle,.yellow-gold.btn.active,.yellow-gold.btn:active,.yellow-gold.btn:focus,.yellow-gold.btn:hover{color:#FFF;background-color:#c56b03}.yellow-gold.btn.active,.yellow-gold.btn:active{background-image:none;background-color:#ac5d03}.yellow-gold.btn.active:hover,.yellow-gold.btn:active:hover{background-color:#b66303}.open .yellow-gold.btn.dropdown-toggle{background-image:none}.yellow-gold.btn.disabled,.yellow-gold.btn.disabled.active,.yellow-gold.btn.disabled:active,.yellow-gold.btn.disabled:focus,.yellow-gold.btn.disabled:hover,.yellow-gold.btn[disabled],.yellow-gold.btn[disabled].active,.yellow-gold.btn[disabled]:active,.yellow-gold.btn[disabled]:focus,.yellow-gold.btn[disabled]:hover,fieldset[disabled] .yellow-gold.btn,fieldset[disabled] .yellow-gold.btn.active,fieldset[disabled] .yellow-gold.btn:active,fieldset[disabled] .yellow-gold.btn:focus,fieldset[disabled] .yellow-gold.btn:hover{background-color:#E87E04}.yellow-gold.btn .badge{color:#E87E04;background-color:#FFF}.portlet.box.yellow-gold>.portlet-title,.portlet.yellow-gold,.portlet>.portlet-body.yellow-gold{background-color:#E87E04}.btn.yellow-gold-stripe{border-left:3px solid #E87E04}.portlet.solid.yellow-gold>.portlet-body,.portlet.solid.yellow-gold>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-gold>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-gold>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-gold>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-gold{border:1px solid #fb9724;border-top:0}.portlet.box.yellow-gold>.portlet-title>.caption,.portlet.box.yellow-gold>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-gold>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fcb460;color:#fdbf79}.portlet.box.yellow-gold>.portlet-title>.actions .btn-default>i{color:#fdc788}.portlet.box.yellow-gold>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-gold>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-gold>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-gold>.portlet-title>.actions .btn-default:hover{border:1px solid #fdcb92;color:#fed7ab}.dashboard-stat.yellow-gold{background-color:#E87E04}.dashboard-stat.yellow-gold.dashboard-stat-light:hover{background-color:#d47304}.dashboard-stat.yellow-gold .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-gold .details .number{color:#FFF}.dashboard-stat.yellow-gold .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-gold .more{color:#FFF;background-color:#d47304}.bg-yellow-gold{border-color:#E87E04!important;background-image:none!important;background-color:#E87E04!important;color:#FFF!important}.font-yellow-gold{color:#E87E04!important}.progress-bar.yellow-gold{background:#E87E04!important;color:#FFF!important}.yellow-casablanca.btn{color:#FFF;background-color:#f2784b;border-color:""}.open .yellow-casablanca.btn.dropdown-toggle,.yellow-casablanca.btn.active,.yellow-casablanca.btn:active,.yellow-casablanca.btn:focus,.yellow-casablanca.btn:hover{color:#FFF;background-color:#f05f2a}.yellow-casablanca.btn.active,.yellow-casablanca.btn:active{background-image:none;background-color:#ee4d12}.yellow-casablanca.btn.active:hover,.yellow-casablanca.btn:active:hover{background-color:#ef541b}.open .yellow-casablanca.btn.dropdown-toggle{background-image:none}.yellow-casablanca.btn.disabled,.yellow-casablanca.btn.disabled.active,.yellow-casablanca.btn.disabled:active,.yellow-casablanca.btn.disabled:focus,.yellow-casablanca.btn.disabled:hover,.yellow-casablanca.btn[disabled],.yellow-casablanca.btn[disabled].active,.yellow-casablanca.btn[disabled]:active,.yellow-casablanca.btn[disabled]:focus,.yellow-casablanca.btn[disabled]:hover,fieldset[disabled] .yellow-casablanca.btn,fieldset[disabled] .yellow-casablanca.btn.active,fieldset[disabled] .yellow-casablanca.btn:active,fieldset[disabled] .yellow-casablanca.btn:focus,fieldset[disabled] .yellow-casablanca.btn:hover{background-color:#f2784b}.yellow-casablanca.btn .badge{color:#f2784b;background-color:#FFF}.portlet.box.yellow-casablanca>.portlet-title,.portlet.yellow-casablanca,.portlet>.portlet-body.yellow-casablanca{background-color:#f2784b}.btn.yellow-casablanca-stripe{border-left:3px solid #f2784b}.portlet.solid.yellow-casablanca>.portlet-body,.portlet.solid.yellow-casablanca>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-casablanca>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-casablanca>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-casablanca{border:1px solid #f59c7b;border-top:0}.portlet.box.yellow-casablanca>.portlet-title>.caption,.portlet.box.yellow-casablanca>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fac6b4;color:#fbd8cb}.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default>i{color:#fce3da}.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-casablanca>.portlet-title>.actions .btn-default:hover{border:1px solid #fdeae3;color:#fffcfb}.dashboard-stat.yellow-casablanca{background-color:#f2784b}.dashboard-stat.yellow-casablanca.dashboard-stat-light:hover{background-color:#f16a38}.dashboard-stat.yellow-casablanca .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-casablanca .details .number{color:#FFF}.dashboard-stat.yellow-casablanca .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-casablanca .more{color:#FFF;background-color:#f16a38}.bg-yellow-casablanca{border-color:#f2784b!important;background-image:none!important;background-color:#f2784b!important;color:#FFF!important}.font-yellow-casablanca{color:#f2784b!important}.progress-bar.yellow-casablanca{background:#f2784b!important;color:#FFF!important}.yellow-crusta.btn{color:#FFF;background-color:#f3c200;border-color:""}.open .yellow-crusta.btn.dropdown-toggle,.yellow-crusta.btn.active,.yellow-crusta.btn:active,.yellow-crusta.btn:focus,.yellow-crusta.btn:hover{color:#FFF;background-color:#cfa500}.yellow-crusta.btn.active,.yellow-crusta.btn:active{background-image:none;background-color:#b69100}.yellow-crusta.btn.active:hover,.yellow-crusta.btn:active:hover{background-color:#c09900}.open .yellow-crusta.btn.dropdown-toggle{background-image:none}.yellow-crusta.btn.disabled,.yellow-crusta.btn.disabled.active,.yellow-crusta.btn.disabled:active,.yellow-crusta.btn.disabled:focus,.yellow-crusta.btn.disabled:hover,.yellow-crusta.btn[disabled],.yellow-crusta.btn[disabled].active,.yellow-crusta.btn[disabled]:active,.yellow-crusta.btn[disabled]:focus,.yellow-crusta.btn[disabled]:hover,fieldset[disabled] .yellow-crusta.btn,fieldset[disabled] .yellow-crusta.btn.active,fieldset[disabled] .yellow-crusta.btn:active,fieldset[disabled] .yellow-crusta.btn:focus,fieldset[disabled] .yellow-crusta.btn:hover{background-color:#f3c200}.yellow-crusta.btn .badge{color:#f3c200;background-color:#FFF}.portlet.box.yellow-crusta>.portlet-title,.portlet.yellow-crusta,.portlet>.portlet-body.yellow-crusta{background-color:#f3c200}.btn.yellow-crusta-stripe{border-left:3px solid #f3c200}.portlet.solid.yellow-crusta>.portlet-body,.portlet.solid.yellow-crusta>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-crusta>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-crusta>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-crusta{border:1px solid #ffd327;border-top:0}.portlet.box.yellow-crusta>.portlet-title>.caption,.portlet.box.yellow-crusta>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #ffe064;color:#ffe57e}.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default>i{color:#ffe88d}.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-crusta>.portlet-title>.actions .btn-default:hover{border:1px solid #ffea97;color:#ffefb1}.dashboard-stat.yellow-crusta{background-color:#f3c200}.dashboard-stat.yellow-crusta.dashboard-stat-light:hover{background-color:#dfb200}.dashboard-stat.yellow-crusta .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-crusta .details .number{color:#FFF}.dashboard-stat.yellow-crusta .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-crusta .more{color:#FFF;background-color:#dfb200}.bg-yellow-crusta{border-color:#f3c200!important;background-image:none!important;background-color:#f3c200!important;color:#FFF!important}.font-yellow-crusta{color:#f3c200!important}.progress-bar.yellow-crusta{background:#f3c200!important;color:#FFF!important}.yellow-lemon.btn{color:#FFF;background-color:#F7CA18;border-color:""}.open .yellow-lemon.btn.dropdown-toggle,.yellow-lemon.btn.active,.yellow-lemon.btn:active,.yellow-lemon.btn:focus,.yellow-lemon.btn:hover{color:#FFF;background-color:#e3b708}.yellow-lemon.btn.active,.yellow-lemon.btn:active{background-image:none;background-color:#cba307}.yellow-lemon.btn.active:hover,.yellow-lemon.btn:active:hover{background-color:#d5ab07}.open .yellow-lemon.btn.dropdown-toggle{background-image:none}.yellow-lemon.btn.disabled,.yellow-lemon.btn.disabled.active,.yellow-lemon.btn.disabled:active,.yellow-lemon.btn.disabled:focus,.yellow-lemon.btn.disabled:hover,.yellow-lemon.btn[disabled],.yellow-lemon.btn[disabled].active,.yellow-lemon.btn[disabled]:active,.yellow-lemon.btn[disabled]:focus,.yellow-lemon.btn[disabled]:hover,fieldset[disabled] .yellow-lemon.btn,fieldset[disabled] .yellow-lemon.btn.active,fieldset[disabled] .yellow-lemon.btn:active,fieldset[disabled] .yellow-lemon.btn:focus,fieldset[disabled] .yellow-lemon.btn:hover{background-color:#F7CA18}.yellow-lemon.btn .badge{color:#F7CA18;background-color:#FFF}.portlet.box.yellow-lemon>.portlet-title,.portlet.yellow-lemon,.portlet>.portlet-body.yellow-lemon{background-color:#F7CA18}.btn.yellow-lemon-stripe{border-left:3px solid #F7CA18}.portlet.solid.yellow-lemon>.portlet-body,.portlet.solid.yellow-lemon>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-lemon>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-lemon>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-lemon{border:1px solid #f9d549;border-top:0}.portlet.box.yellow-lemon>.portlet-title>.caption,.portlet.box.yellow-lemon>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #fbe384;color:#fce99d}.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default>i{color:#fcecac}.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-lemon>.portlet-title>.actions .btn-default:hover{border:1px solid #fceeb6;color:#fdf4ce}.dashboard-stat.yellow-lemon{background-color:#F7CA18}.dashboard-stat.yellow-lemon.dashboard-stat-light:hover{background-color:#f2c308}.dashboard-stat.yellow-lemon .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-lemon .details .number{color:#FFF}.dashboard-stat.yellow-lemon .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-lemon .more{color:#FFF;background-color:#f2c308}.bg-yellow-lemon{border-color:#F7CA18!important;background-image:none!important;background-color:#F7CA18!important;color:#FFF!important}.font-yellow-lemon{color:#F7CA18!important}.progress-bar.yellow-lemon{background:#F7CA18!important;color:#FFF!important}.yellow-saffron.btn{color:#FFF;background-color:#F4D03F;border-color:""}.open .yellow-saffron.btn.dropdown-toggle,.yellow-saffron.btn.active,.yellow-saffron.btn:active,.yellow-saffron.btn:focus,.yellow-saffron.btn:hover{color:#FFF;background-color:#f2c81d}.yellow-saffron.btn.active,.yellow-saffron.btn:active{background-image:none;background-color:#e8bd0d}.yellow-saffron.btn.active:hover,.yellow-saffron.btn:active:hover{background-color:#f1c40f}.open .yellow-saffron.btn.dropdown-toggle{background-image:none}.yellow-saffron.btn.disabled,.yellow-saffron.btn.disabled.active,.yellow-saffron.btn.disabled:active,.yellow-saffron.btn.disabled:focus,.yellow-saffron.btn.disabled:hover,.yellow-saffron.btn[disabled],.yellow-saffron.btn[disabled].active,.yellow-saffron.btn[disabled]:active,.yellow-saffron.btn[disabled]:focus,.yellow-saffron.btn[disabled]:hover,fieldset[disabled] .yellow-saffron.btn,fieldset[disabled] .yellow-saffron.btn.active,fieldset[disabled] .yellow-saffron.btn:active,fieldset[disabled] .yellow-saffron.btn:focus,fieldset[disabled] .yellow-saffron.btn:hover{background-color:#F4D03F}.yellow-saffron.btn .badge{color:#F4D03F;background-color:#FFF}.portlet.box.yellow-saffron>.portlet-title,.portlet.yellow-saffron,.portlet>.portlet-body.yellow-saffron{background-color:#F4D03F}.btn.yellow-saffron-stripe{border-left:3px solid #F4D03F}.portlet.solid.yellow-saffron>.portlet-body,.portlet.solid.yellow-saffron>.portlet-title{border:0;color:#FFF}.portlet.solid.yellow-saffron>.portlet-title>.caption>i{color:#FFF}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.yellow-saffron>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.yellow-saffron{border:1px solid #f7dc6f;border-top:0}.portlet.box.yellow-saffron>.portlet-title>.caption,.portlet.box.yellow-saffron>.portlet-title>.caption>i{color:#FFF}.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #faeaa9;color:#fbf0c1}.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default>i{color:#fcf3d0}.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default.active,.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default:active,.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default:focus,.portlet.box.yellow-saffron>.portlet-title>.actions .btn-default:hover{border:1px solid #fdf6d9;color:#fefcf1}.dashboard-stat.yellow-saffron{background-color:#F4D03F}.dashboard-stat.yellow-saffron.dashboard-stat-light:hover{background-color:#f3cb2c}.dashboard-stat.yellow-saffron .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.yellow-saffron .details .number{color:#FFF}.dashboard-stat.yellow-saffron .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.yellow-saffron .more{color:#FFF;background-color:#f3cb2c}.bg-yellow-saffron{border-color:#F4D03F!important;background-image:none!important;background-color:#F4D03F!important;color:#FFF!important}.font-yellow-saffron{color:#F4D03F!important}.progress-bar.yellow-saffron{background:#F4D03F!important;color:#FFF!important}.purple.btn{color:#FFF;background-color:#8E44AD;border-color:""}.open .purple.btn.dropdown-toggle,.purple.btn.active,.purple.btn:active,.purple.btn:focus,.purple.btn:hover{color:#FFF;background-color:#793a93}.purple.btn.active,.purple.btn:active{background-image:none;background-color:#6a3381}.purple.btn.active:hover,.purple.btn:active:hover{background-color:#703688}.open .purple.btn.dropdown-toggle{background-image:none}.purple.btn.disabled,.purple.btn.disabled.active,.purple.btn.disabled:active,.purple.btn.disabled:focus,.purple.btn.disabled:hover,.purple.btn[disabled],.purple.btn[disabled].active,.purple.btn[disabled]:active,.purple.btn[disabled]:focus,.purple.btn[disabled]:hover,fieldset[disabled] .purple.btn,fieldset[disabled] .purple.btn.active,fieldset[disabled] .purple.btn:active,fieldset[disabled] .purple.btn:focus,fieldset[disabled] .purple.btn:hover{background-color:#8E44AD}.purple.btn .badge{color:#8E44AD;background-color:#FFF}.portlet.box.purple>.portlet-title,.portlet.purple,.portlet>.portlet-body.purple{background-color:#8E44AD}.btn.purple-stripe{border-left:3px solid #8E44AD}.portlet.solid.purple>.portlet-body,.portlet.solid.purple>.portlet-title{border:0;color:#FFF}.portlet.solid.purple>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple{border:1px solid #a563c1;border-top:0}.portlet.box.purple>.portlet-title>.caption,.portlet.box.purple>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #bf8ed3;color:#c9a1da}.portlet.box.purple>.portlet-title>.actions .btn-default>i{color:#cfacde}.portlet.box.purple>.portlet-title>.actions .btn-default.active,.portlet.box.purple>.portlet-title>.actions .btn-default:active,.portlet.box.purple>.portlet-title>.actions .btn-default:focus,.portlet.box.purple>.portlet-title>.actions .btn-default:hover{border:1px solid #d4b3e1;color:#dec5e8}.dashboard-stat.purple{background-color:#8E44AD}.dashboard-stat.purple.dashboard-stat-light:hover{background-color:#823e9e}.dashboard-stat.purple .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple .details .number{color:#FFF}.dashboard-stat.purple .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple .more{color:#FFF;background-color:#823e9e}.bg-purple{border-color:#8E44AD!important;background-image:none!important;background-color:#8E44AD!important;color:#FFF!important}.font-purple{color:#8E44AD!important}.progress-bar.purple{background:#8E44AD!important;color:#FFF!important}.purple-plum.btn{color:#FFF;background-color:#8775a7;border-color:""}.open .purple-plum.btn.dropdown-toggle,.purple-plum.btn.active,.purple-plum.btn:active,.purple-plum.btn:focus,.purple-plum.btn:hover{color:#FFF;background-color:#746198}.purple-plum.btn.active,.purple-plum.btn:active{background-image:none;background-color:#685788}.purple-plum.btn.active:hover,.purple-plum.btn:active:hover{background-color:#6d5b8e}.open .purple-plum.btn.dropdown-toggle{background-image:none}.purple-plum.btn.disabled,.purple-plum.btn.disabled.active,.purple-plum.btn.disabled:active,.purple-plum.btn.disabled:focus,.purple-plum.btn.disabled:hover,.purple-plum.btn[disabled],.purple-plum.btn[disabled].active,.purple-plum.btn[disabled]:active,.purple-plum.btn[disabled]:focus,.purple-plum.btn[disabled]:hover,fieldset[disabled] .purple-plum.btn,fieldset[disabled] .purple-plum.btn.active,fieldset[disabled] .purple-plum.btn:active,fieldset[disabled] .purple-plum.btn:focus,fieldset[disabled] .purple-plum.btn:hover{background-color:#8775a7}.purple-plum.btn .badge{color:#8775a7;background-color:#FFF}.portlet.box.purple-plum>.portlet-title,.portlet.purple-plum,.portlet>.portlet-body.purple-plum{background-color:#8775a7}.btn.purple-plum-stripe{border-left:3px solid #8775a7}.portlet.solid.purple-plum>.portlet-body,.portlet.solid.purple-plum>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-plum>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-plum>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-plum>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-plum{border:1px solid #a294bb;border-top:0}.portlet.box.purple-plum>.portlet-title>.caption,.portlet.box.purple-plum>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-plum>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #c3bad3;color:#d0c9dd}.portlet.box.purple-plum>.portlet-title>.actions .btn-default>i{color:#d8d2e3}.portlet.box.purple-plum>.portlet-title>.actions .btn-default.active,.portlet.box.purple-plum>.portlet-title>.actions .btn-default:active,.portlet.box.purple-plum>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-plum>.portlet-title>.actions .btn-default:hover{border:1px solid #ded9e7;color:#ebe8f0}.dashboard-stat.purple-plum{background-color:#8775a7}.dashboard-stat.purple-plum.dashboard-stat-light:hover{background-color:#7c699f}.dashboard-stat.purple-plum .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-plum .details .number{color:#FFF}.dashboard-stat.purple-plum .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-plum .more{color:#FFF;background-color:#7c699f}.bg-purple-plum{border-color:#8775a7!important;background-image:none!important;background-color:#8775a7!important;color:#FFF!important}.font-purple-plum{color:#8775a7!important}.progress-bar.purple-plum{background:#8775a7!important;color:#FFF!important}.purple-medium.btn{color:#FFF;background-color:#BF55EC;border-color:""}.open .purple-medium.btn.dropdown-toggle,.purple-medium.btn.active,.purple-medium.btn:active,.purple-medium.btn:focus,.purple-medium.btn:hover{color:#FFF;background-color:#b335e8}.purple-medium.btn.active,.purple-medium.btn:active{background-image:none;background-color:#aa1ee6}.purple-medium.btn.active:hover,.purple-medium.btn:active:hover{background-color:#ae27e7}.open .purple-medium.btn.dropdown-toggle{background-image:none}.purple-medium.btn.disabled,.purple-medium.btn.disabled.active,.purple-medium.btn.disabled:active,.purple-medium.btn.disabled:focus,.purple-medium.btn.disabled:hover,.purple-medium.btn[disabled],.purple-medium.btn[disabled].active,.purple-medium.btn[disabled]:active,.purple-medium.btn[disabled]:focus,.purple-medium.btn[disabled]:hover,fieldset[disabled] .purple-medium.btn,fieldset[disabled] .purple-medium.btn.active,fieldset[disabled] .purple-medium.btn:active,fieldset[disabled] .purple-medium.btn:focus,fieldset[disabled] .purple-medium.btn:hover{background-color:#BF55EC}.purple-medium.btn .badge{color:#BF55EC;background-color:#FFF}.portlet.box.purple-medium>.portlet-title,.portlet.purple-medium,.portlet>.portlet-body.purple-medium{background-color:#BF55EC}.btn.purple-medium-stripe{border-left:3px solid #BF55EC}.portlet.solid.purple-medium>.portlet-body,.portlet.solid.purple-medium>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-medium>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-medium>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-medium>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-medium{border:1px solid #d083f1;border-top:0}.portlet.box.purple-medium>.portlet-title>.caption,.portlet.box.purple-medium>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-medium>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #e5baf7;color:#eed1fa}.portlet.box.purple-medium>.portlet-title>.actions .btn-default>i{color:#f3dffb}.portlet.box.purple-medium>.portlet-title>.actions .btn-default.active,.portlet.box.purple-medium>.portlet-title>.actions .btn-default:active,.portlet.box.purple-medium>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-medium>.portlet-title>.actions .btn-default:hover{border:1px solid #f6e8fc;color:#fff}.dashboard-stat.purple-medium{background-color:#BF55EC}.dashboard-stat.purple-medium.dashboard-stat-light:hover{background-color:#b843ea}.dashboard-stat.purple-medium .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-medium .details .number{color:#FFF}.dashboard-stat.purple-medium .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-medium .more{color:#FFF;background-color:#b843ea}.bg-purple-medium{border-color:#BF55EC!important;background-image:none!important;background-color:#BF55EC!important;color:#FFF!important}.font-purple-medium{color:#BF55EC!important}.progress-bar.purple-medium{background:#BF55EC!important;color:#FFF!important}.purple-studio.btn{color:#FFF;background-color:#8E44AD;border-color:""}.open .purple-studio.btn.dropdown-toggle,.purple-studio.btn.active,.purple-studio.btn:active,.purple-studio.btn:focus,.purple-studio.btn:hover{color:#FFF;background-color:#793a93}.purple-studio.btn.active,.purple-studio.btn:active{background-image:none;background-color:#6a3381}.purple-studio.btn.active:hover,.purple-studio.btn:active:hover{background-color:#703688}.open .purple-studio.btn.dropdown-toggle{background-image:none}.purple-studio.btn.disabled,.purple-studio.btn.disabled.active,.purple-studio.btn.disabled:active,.purple-studio.btn.disabled:focus,.purple-studio.btn.disabled:hover,.purple-studio.btn[disabled],.purple-studio.btn[disabled].active,.purple-studio.btn[disabled]:active,.purple-studio.btn[disabled]:focus,.purple-studio.btn[disabled]:hover,fieldset[disabled] .purple-studio.btn,fieldset[disabled] .purple-studio.btn.active,fieldset[disabled] .purple-studio.btn:active,fieldset[disabled] .purple-studio.btn:focus,fieldset[disabled] .purple-studio.btn:hover{background-color:#8E44AD}.purple-studio.btn .badge{color:#8E44AD;background-color:#FFF}.portlet.box.purple-studio>.portlet-title,.portlet.purple-studio,.portlet>.portlet-body.purple-studio{background-color:#8E44AD}.btn.purple-studio-stripe{border-left:3px solid #8E44AD}.portlet.solid.purple-studio>.portlet-body,.portlet.solid.purple-studio>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-studio>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-studio>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-studio>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-studio{border:1px solid #a563c1;border-top:0}.portlet.box.purple-studio>.portlet-title>.caption,.portlet.box.purple-studio>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-studio>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #bf8ed3;color:#c9a1da}.portlet.box.purple-studio>.portlet-title>.actions .btn-default>i{color:#cfacde}.portlet.box.purple-studio>.portlet-title>.actions .btn-default.active,.portlet.box.purple-studio>.portlet-title>.actions .btn-default:active,.portlet.box.purple-studio>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-studio>.portlet-title>.actions .btn-default:hover{border:1px solid #d4b3e1;color:#dec5e8}.dashboard-stat.purple-studio{background-color:#8E44AD}.dashboard-stat.purple-studio.dashboard-stat-light:hover{background-color:#823e9e}.dashboard-stat.purple-studio .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-studio .details .number{color:#FFF}.dashboard-stat.purple-studio .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-studio .more{color:#FFF;background-color:#823e9e}.bg-purple-studio{border-color:#8E44AD!important;background-image:none!important;background-color:#8E44AD!important;color:#FFF!important}.font-purple-studio{color:#8E44AD!important}.progress-bar.purple-studio{background:#8E44AD!important;color:#FFF!important}.purple-wisteria.btn{color:#FFF;background-color:#9B59B6;border-color:""}.open .purple-wisteria.btn.dropdown-toggle,.purple-wisteria.btn.active,.purple-wisteria.btn:active,.purple-wisteria.btn:focus,.purple-wisteria.btn:hover{color:#FFF;background-color:#8948a3}.purple-wisteria.btn.active,.purple-wisteria.btn:active{background-image:none;background-color:#7a4092}.purple-wisteria.btn.active:hover,.purple-wisteria.btn:active:hover{background-color:#804399}.open .purple-wisteria.btn.dropdown-toggle{background-image:none}.purple-wisteria.btn.disabled,.purple-wisteria.btn.disabled.active,.purple-wisteria.btn.disabled:active,.purple-wisteria.btn.disabled:focus,.purple-wisteria.btn.disabled:hover,.purple-wisteria.btn[disabled],.purple-wisteria.btn[disabled].active,.purple-wisteria.btn[disabled]:active,.purple-wisteria.btn[disabled]:focus,.purple-wisteria.btn[disabled]:hover,fieldset[disabled] .purple-wisteria.btn,fieldset[disabled] .purple-wisteria.btn.active,fieldset[disabled] .purple-wisteria.btn:active,fieldset[disabled] .purple-wisteria.btn:focus,fieldset[disabled] .purple-wisteria.btn:hover{background-color:#9B59B6}.purple-wisteria.btn .badge{color:#9B59B6;background-color:#FFF}.portlet.box.purple-wisteria>.portlet-title,.portlet.purple-wisteria,.portlet>.portlet-body.purple-wisteria{background-color:#9B59B6}.btn.purple-wisteria-stripe{border-left:3px solid #9B59B6}.portlet.solid.purple-wisteria>.portlet-body,.portlet.solid.purple-wisteria>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-wisteria>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-wisteria>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-wisteria{border:1px solid #b07cc6;border-top:0}.portlet.box.purple-wisteria>.portlet-title>.caption,.portlet.box.purple-wisteria>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #caa7d8;color:#d5b9e0}.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default>i{color:#dbc3e5}.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default.active,.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default:active,.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-wisteria>.portlet-title>.actions .btn-default:hover{border:1px solid #dfcae8;color:#eadcf0}.dashboard-stat.purple-wisteria{background-color:#9B59B6}.dashboard-stat.purple-wisteria.dashboard-stat-light:hover{background-color:#924dae}.dashboard-stat.purple-wisteria .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-wisteria .details .number{color:#FFF}.dashboard-stat.purple-wisteria .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-wisteria .more{color:#FFF;background-color:#924dae}.bg-purple-wisteria{border-color:#9B59B6!important;background-image:none!important;background-color:#9B59B6!important;color:#FFF!important}.font-purple-wisteria{color:#9B59B6!important}.progress-bar.purple-wisteria{background:#9B59B6!important;color:#FFF!important}.purple-seance.btn{color:#FFF;background-color:#9A12B3;border-color:""}.open .purple-seance.btn.dropdown-toggle,.purple-seance.btn.active,.purple-seance.btn:active,.purple-seance.btn:focus,.purple-seance.btn:hover{color:#FFF;background-color:#7e0f93}.purple-seance.btn.active,.purple-seance.btn:active{background-image:none;background-color:#6a0c7b}.purple-seance.btn.active:hover,.purple-seance.btn:active:hover{background-color:#720d85}.open .purple-seance.btn.dropdown-toggle{background-image:none}.purple-seance.btn.disabled,.purple-seance.btn.disabled.active,.purple-seance.btn.disabled:active,.purple-seance.btn.disabled:focus,.purple-seance.btn.disabled:hover,.purple-seance.btn[disabled],.purple-seance.btn[disabled].active,.purple-seance.btn[disabled]:active,.purple-seance.btn[disabled]:focus,.purple-seance.btn[disabled]:hover,fieldset[disabled] .purple-seance.btn,fieldset[disabled] .purple-seance.btn.active,fieldset[disabled] .purple-seance.btn:active,fieldset[disabled] .purple-seance.btn:focus,fieldset[disabled] .purple-seance.btn:hover{background-color:#9A12B3}.purple-seance.btn .badge{color:#9A12B3;background-color:#FFF}.portlet.box.purple-seance>.portlet-title,.portlet.purple-seance,.portlet>.portlet-body.purple-seance{background-color:#9A12B3}.btn.purple-seance-stripe{border-left:3px solid #9A12B3}.portlet.solid.purple-seance>.portlet-body,.portlet.solid.purple-seance>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-seance>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-seance>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-seance>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-seance{border:1px solid #c217e1;border-top:0}.portlet.box.purple-seance>.portlet-title>.caption,.portlet.box.purple-seance>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-seance>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #d349ed;color:#d960ef}.portlet.box.purple-seance>.portlet-title>.actions .btn-default>i{color:#dc6ef0}.portlet.box.purple-seance>.portlet-title>.actions .btn-default.active,.portlet.box.purple-seance>.portlet-title>.actions .btn-default:active,.portlet.box.purple-seance>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-seance>.portlet-title>.actions .btn-default:hover{border:1px solid #de77f1;color:#e48ef4}.dashboard-stat.purple-seance{background-color:#9A12B3}.dashboard-stat.purple-seance.dashboard-stat-light:hover{background-color:#8a10a0}.dashboard-stat.purple-seance .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-seance .details .number{color:#FFF}.dashboard-stat.purple-seance .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-seance .more{color:#FFF;background-color:#8a10a0}.bg-purple-seance{border-color:#9A12B3!important;background-image:none!important;background-color:#9A12B3!important;color:#FFF!important}.font-purple-seance{color:#9A12B3!important}.progress-bar.purple-seance{background:#9A12B3!important;color:#FFF!important}.purple-intense.btn{color:#FFF;background-color:#8775a7;border-color:""}.open .purple-intense.btn.dropdown-toggle,.purple-intense.btn.active,.purple-intense.btn:active,.purple-intense.btn:focus,.purple-intense.btn:hover{color:#FFF;background-color:#746198}.purple-intense.btn.active,.purple-intense.btn:active{background-image:none;background-color:#685788}.purple-intense.btn.active:hover,.purple-intense.btn:active:hover{background-color:#6d5b8e}.open .purple-intense.btn.dropdown-toggle{background-image:none}.purple-intense.btn.disabled,.purple-intense.btn.disabled.active,.purple-intense.btn.disabled:active,.purple-intense.btn.disabled:focus,.purple-intense.btn.disabled:hover,.purple-intense.btn[disabled],.purple-intense.btn[disabled].active,.purple-intense.btn[disabled]:active,.purple-intense.btn[disabled]:focus,.purple-intense.btn[disabled]:hover,fieldset[disabled] .purple-intense.btn,fieldset[disabled] .purple-intense.btn.active,fieldset[disabled] .purple-intense.btn:active,fieldset[disabled] .purple-intense.btn:focus,fieldset[disabled] .purple-intense.btn:hover{background-color:#8775a7}.purple-intense.btn .badge{color:#8775a7;background-color:#FFF}.portlet.box.purple-intense>.portlet-title,.portlet.purple-intense,.portlet>.portlet-body.purple-intense{background-color:#8775a7}.btn.purple-intense-stripe{border-left:3px solid #8775a7}.portlet.solid.purple-intense>.portlet-body,.portlet.solid.purple-intense>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-intense>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-intense>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-intense>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-intense{border:1px solid #a294bb;border-top:0}.portlet.box.purple-intense>.portlet-title>.caption,.portlet.box.purple-intense>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-intense>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #c3bad3;color:#d0c9dd}.portlet.box.purple-intense>.portlet-title>.actions .btn-default>i{color:#d8d2e3}.portlet.box.purple-intense>.portlet-title>.actions .btn-default.active,.portlet.box.purple-intense>.portlet-title>.actions .btn-default:active,.portlet.box.purple-intense>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-intense>.portlet-title>.actions .btn-default:hover{border:1px solid #ded9e7;color:#ebe8f0}.dashboard-stat.purple-intense{background-color:#8775a7}.dashboard-stat.purple-intense.dashboard-stat-light:hover{background-color:#7c699f}.dashboard-stat.purple-intense .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-intense .details .number{color:#FFF}.dashboard-stat.purple-intense .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-intense .more{color:#FFF;background-color:#7c699f}.bg-purple-intense{border-color:#8775a7!important;background-image:none!important;background-color:#8775a7!important;color:#FFF!important}.font-purple-intense{color:#8775a7!important}.progress-bar.purple-intense{background:#8775a7!important;color:#FFF!important}.purple-sharp.btn{color:#FFF;background-color:#796799;border-color:""}.open .purple-sharp.btn.dropdown-toggle,.purple-sharp.btn.active,.purple-sharp.btn:active,.purple-sharp.btn:focus,.purple-sharp.btn:hover{color:#FFF;background-color:#685884}.purple-sharp.btn.active,.purple-sharp.btn:active{background-image:none;background-color:#5c4e75}.purple-sharp.btn.active:hover,.purple-sharp.btn:active:hover{background-color:#61527b}.open .purple-sharp.btn.dropdown-toggle{background-image:none}.purple-sharp.btn.disabled,.purple-sharp.btn.disabled.active,.purple-sharp.btn.disabled:active,.purple-sharp.btn.disabled:focus,.purple-sharp.btn.disabled:hover,.purple-sharp.btn[disabled],.purple-sharp.btn[disabled].active,.purple-sharp.btn[disabled]:active,.purple-sharp.btn[disabled]:focus,.purple-sharp.btn[disabled]:hover,fieldset[disabled] .purple-sharp.btn,fieldset[disabled] .purple-sharp.btn.active,fieldset[disabled] .purple-sharp.btn:active,fieldset[disabled] .purple-sharp.btn:focus,fieldset[disabled] .purple-sharp.btn:hover{background-color:#796799}.purple-sharp.btn .badge{color:#796799;background-color:#FFF}.portlet.box.purple-sharp>.portlet-title,.portlet.purple-sharp,.portlet>.portlet-body.purple-sharp{background-color:#796799}.btn.purple-sharp-stripe{border-left:3px solid #796799}.portlet.solid.purple-sharp>.portlet-body,.portlet.solid.purple-sharp>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-sharp>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-sharp>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-sharp{border:1px solid #9486ad;border-top:0}.portlet.box.purple-sharp>.portlet-title>.caption,.portlet.box.purple-sharp>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-sharp>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #b4aac6;color:#c2b9d0}.portlet.box.purple-sharp>.portlet-title>.actions .btn-default>i{color:#cac3d6}.portlet.box.purple-sharp>.portlet-title>.actions .btn-default.active,.portlet.box.purple-sharp>.portlet-title>.actions .btn-default:active,.portlet.box.purple-sharp>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-sharp>.portlet-title>.actions .btn-default:hover{border:1px solid #cfc9db;color:#ddd8e5}.dashboard-stat.purple-sharp{background-color:#796799}.dashboard-stat.purple-sharp.dashboard-stat-light:hover{background-color:#6f5f8d}.dashboard-stat.purple-sharp .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-sharp .details .number{color:#FFF}.dashboard-stat.purple-sharp .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-sharp .more{color:#FFF;background-color:#6f5f8d}.bg-purple-sharp{border-color:#796799!important;background-image:none!important;background-color:#796799!important;color:#FFF!important}.font-purple-sharp{color:#796799!important}.progress-bar.purple-sharp{background:#796799!important;color:#FFF!important}.purple-soft.btn{color:#FFF;background-color:#8877a9;border-color:""}.open .purple-soft.btn.dropdown-toggle,.purple-soft.btn.active,.purple-soft.btn:active,.purple-soft.btn:focus,.purple-soft.btn:hover{color:#FFF;background-color:#75629b}.purple-soft.btn.active,.purple-soft.btn:active{background-image:none;background-color:#69588b}.purple-soft.btn.active:hover,.purple-soft.btn:active:hover{background-color:#6e5c91}.open .purple-soft.btn.dropdown-toggle{background-image:none}.purple-soft.btn.disabled,.purple-soft.btn.disabled.active,.purple-soft.btn.disabled:active,.purple-soft.btn.disabled:focus,.purple-soft.btn.disabled:hover,.purple-soft.btn[disabled],.purple-soft.btn[disabled].active,.purple-soft.btn[disabled]:active,.purple-soft.btn[disabled]:focus,.purple-soft.btn[disabled]:hover,fieldset[disabled] .purple-soft.btn,fieldset[disabled] .purple-soft.btn.active,fieldset[disabled] .purple-soft.btn:active,fieldset[disabled] .purple-soft.btn:focus,fieldset[disabled] .purple-soft.btn:hover{background-color:#8877a9}.purple-soft.btn .badge{color:#8877a9;background-color:#FFF}.portlet.box.purple-soft>.portlet-title,.portlet.purple-soft,.portlet>.portlet-body.purple-soft{background-color:#8877a9}.btn.purple-soft-stripe{border-left:3px solid #8877a9}.portlet.solid.purple-soft>.portlet-body,.portlet.solid.purple-soft>.portlet-title{border:0;color:#FFF}.portlet.solid.purple-soft>.portlet-title>.caption>i{color:#FFF}.portlet.solid.purple-soft>.portlet-title>.tools>a.remove{background-image:url(../../assets/images/portlet-remove-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.config{background-image:url(../../assets/images/portlet-config-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.reload{background-image:url(../../assets/images/portlet-reload-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.expand{background-image:url(../../assets/images/portlet-expand-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.collapse{background-image:url(../../assets/images/portlet-collapse-icon-white.png)}.portlet.solid.purple-soft>.portlet-title>.tools>a.fullscreen{color:#fdfdfd}.portlet.box.purple-soft{border:1px solid #a396bd;border-top:0}.portlet.box.purple-soft>.portlet-title>.caption,.portlet.box.purple-soft>.portlet-title>.caption>i{color:#FFF}.portlet.box.purple-soft>.portlet-title>.actions .btn-default{background:0 0!important;border:1px solid #c4bcd4;color:#d2cbde}.portlet.box.purple-soft>.portlet-title>.actions .btn-default>i{color:#dad5e4}.portlet.box.purple-soft>.portlet-title>.actions .btn-default.active,.portlet.box.purple-soft>.portlet-title>.actions .btn-default:active,.portlet.box.purple-soft>.portlet-title>.actions .btn-default:focus,.portlet.box.purple-soft>.portlet-title>.actions .btn-default:hover{border:1px solid #dfdbe8;color:#edebf2}.dashboard-stat.purple-soft{background-color:#8877a9}.dashboard-stat.purple-soft.dashboard-stat-light:hover{background-color:#7d6ba1}.dashboard-stat.purple-soft .visual>i{color:#FFF;opacity:.1;filter:alpha(opacity=10)}.dashboard-stat.purple-soft .details .number{color:#FFF}.dashboard-stat.purple-soft .details .desc{color:#FFF;opacity:1;filter:alpha(opacity=100)}.dashboard-stat.purple-soft .more{color:#FFF;background-color:#7d6ba1}.bg-purple-soft{border-color:#8877a9!important;background-image:none!important;background-color:#8877a9!important;color:#FFF!important}.font-purple-soft{color:#8877a9!important}.progress-bar.purple-soft{background:#8877a9!important;color:#FFF!important}.btn-transparent.btn{background:0 0;color:#888}@-moz-keyframes whirly-loader{0%{-moz-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes whirly-loader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes whirly-loader{0%{-moz-transform:rotate(0);-ms-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.whirly-loader:not(:required){overflow:hidden;position:relative;text-indent:-9999px;display:inline-block;width:8px;height:8px;background:0 0;-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%;-moz-box-shadow:#FA4C61 0 26px 0 6px,#FA4C61 .91px 26.05px 0 5.93px,#FA4C61 1.82px 26.07px 0 5.87px,#FA4C61 2.74px 26.06px 0 5.8px,#FA4C61 3.66px 26.01px 0 5.73px,#FA4C61 4.57px 25.93px 0 5.67px,#FA4C61 5.49px 25.82px 0 5.6px,#FA4C61 6.4px 25.68px 0 5.53px,#FA4C61 7.31px 25.51px 0 5.47px,#FA4C61 8.22px 25.3px 0 5.4px,#FA4C61 9.12px 25.06px 0 5.33px,#FA4C61 10.01px 24.79px 0 5.27px,#FA4C61 10.9px 24.48px 0 5.2px,#FA4C61 11.78px 24.15px 0 5.13px,#FA4C61 12.64px 23.78px 0 5.07px,#FA4C61 13.5px 23.38px 0 5px,#FA4C61 14.34px 22.95px 0 4.93px,#FA4C61 15.17px 22.49px 0 4.87px,#FA4C61 15.99px 22.01px 0 4.8px,#FA4C61 16.79px 21.49px 0 4.73px,#FA4C61 17.57px 20.94px 0 4.67px,#FA4C61 18.33px 20.36px 0 4.6px,#FA4C61 19.08px 19.76px 0 4.53px,#FA4C61 19.81px 19.13px 0 4.47px,#FA4C61 20.51px 18.47px 0 4.4px,#FA4C61 21.19px 17.78px 0 4.33px,#FA4C61 21.85px 17.07px 0 4.27px,#FA4C61 22.49px 16.34px 0 4.2px,#FA4C61 23.1px 15.58px 0 4.13px,#FA4C61 23.69px 14.8px 0 4.07px,#FA4C61 24.25px 14px 0 4px,#FA4C61 24.78px 13.18px 0 3.93px,#FA4C61 25.29px 12.33px 0 3.87px,#FA4C61 25.76px 11.47px 0 3.8px,#FA4C61 26.21px 10.59px 0 3.73px,#FA4C61 26.62px 9.69px 0 3.67px,#FA4C61 27.01px 8.78px 0 3.6px,#FA4C61 27.36px 7.85px 0 3.53px,#FA4C61 27.69px 6.9px 0 3.47px,#FA4C61 27.98px 5.95px 0 3.4px,#FA4C61 28.23px 4.98px 0 3.33px,#FA4C61 28.45px 4px 0 3.27px,#FA4C61 28.64px 3.01px 0 3.2px,#FA4C61 28.8px 2.01px 0 3.13px,#FA4C61 28.92px 1.01px 0 3.07px,#FA4C61 29px 0 0 3px,#FA4C61 29.05px -1.01px 0 2.93px,#FA4C61 29.06px -2.03px 0 2.87px,#FA4C61 29.04px -3.05px 0 2.8px,#FA4C61 28.98px -4.07px 0 2.73px,#FA4C61 28.89px -5.09px 0 2.67px,#FA4C61 28.76px -6.11px 0 2.6px,#FA4C61 28.59px -7.13px 0 2.53px,#FA4C61 28.39px -8.14px 0 2.47px,#FA4C61 28.15px -9.15px 0 2.4px,#FA4C61 27.88px -10.15px 0 2.33px,#FA4C61 27.57px -11.14px 0 2.27px,#FA4C61 27.22px -12.12px 0 2.2px,#FA4C61 26.84px -13.09px 0 2.13px,#FA4C61 26.43px -14.05px 0 2.07px,#FA4C61 25.98px -15px 0 2px,#FA4C61 25.5px -15.93px 0 1.93px,#FA4C61 24.98px -16.85px 0 1.87px,#FA4C61 24.43px -17.75px 0 1.8px,#FA4C61 23.85px -18.63px 0 1.73px,#FA4C61 23.24px -19.5px 0 1.67px,#FA4C61 22.59px -20.34px 0 1.6px,#FA4C61 21.92px -21.16px 0 1.53px,#FA4C61 21.21px -21.96px 0 1.47px,#FA4C61 20.48px -22.74px 0 1.4px,#FA4C61 19.71px -23.49px 0 1.33px,#FA4C61 18.92px -24.22px 0 1.27px,#FA4C61 18.1px -24.92px 0 1.2px,#FA4C61 17.26px -25.59px 0 1.13px,#FA4C61 16.39px -26.23px 0 1.07px,#FA4C61 15.5px -26.85px 0 1px,#FA4C61 14.58px -27.43px 0 .93px,#FA4C61 13.65px -27.98px 0 .87px,#FA4C61 12.69px -28.5px 0 .8px,#FA4C61 11.71px -28.99px 0 .73px,#FA4C61 10.72px -29.44px 0 .67px,#FA4C61 9.7px -29.86px 0 .6px,#FA4C61 8.67px -30.25px 0 .53px,#FA4C61 7.63px -30.6px 0 .47px,#FA4C61 6.57px -30.91px 0 .4px,#FA4C61 5.5px -31.19px 0 .33px,#FA4C61 4.42px -31.42px 0 .27px,#FA4C61 3.32px -31.63px 0 .2px,#FA4C61 2.22px -31.79px 0 .13px,#FA4C61 1.11px -31.91px 0 .07px,#FA4C61 0 -32px 0 0,#FA4C61 -1.12px -32.05px 0 -.07px,#FA4C61 -2.24px -32.06px 0 -.13px,#FA4C61 -3.37px -32.02px 0 -.2px,#FA4C61 -4.49px -31.95px 0 -.27px,#FA4C61 -5.61px -31.84px 0 -.33px,#FA4C61 -6.74px -31.69px 0 -.4px,#FA4C61 -7.85px -31.5px 0 -.47px,#FA4C61 -8.97px -31.27px 0 -.53px,#FA4C61 -10.07px -31px 0 -.6px,#FA4C61 -11.17px -30.7px 0 -.67px,#FA4C61 -12.26px -30.35px 0 -.73px,#FA4C61 -13.34px -29.96px 0 -.8px,#FA4C61 -14.41px -29.54px 0 -.87px,#FA4C61 -15.46px -29.08px 0 -.93px,#FA4C61 -16.5px -28.58px 0 -1px,#FA4C61 -17.52px -28.04px 0 -1.07px,#FA4C61 -18.53px -27.47px 0 -1.13px,#FA4C61 -19.51px -26.86px 0 -1.2px,#FA4C61 -20.48px -26.21px 0 -1.27px,#FA4C61 -21.43px -25.53px 0 -1.33px,#FA4C61 -22.35px -24.82px 0 -1.4px,#FA4C61 -23.25px -24.07px 0 -1.47px,#FA4C61 -24.12px -23.29px 0 -1.53px,#FA4C61 -24.97px -22.48px 0 -1.6px,#FA4C61 -25.79px -21.64px 0 -1.67px,#FA4C61 -26.58px -20.77px 0 -1.73px,#FA4C61 -27.34px -19.87px 0 -1.8px,#FA4C61 -28.08px -18.94px 0 -1.87px,#FA4C61 -28.78px -17.98px 0 -1.93px,#FA4C61 -29.44px -17px 0 -2px,#FA4C61 -30.08px -15.99px 0 -2.07px,#FA4C61 -30.68px -14.96px 0 -2.13px,#FA4C61 -31.24px -13.91px 0 -2.2px,#FA4C61 -31.77px -12.84px 0 -2.27px,#FA4C61 -32.26px -11.74px 0 -2.33px,#FA4C61 -32.72px -10.63px 0 -2.4px,#FA4C61 -33.13px -9.5px 0 -2.47px,#FA4C61 -33.51px -8.35px 0 -2.53px,#FA4C61 -33.84px -7.19px 0 -2.6px,#FA4C61 -34.14px -6.02px 0 -2.67px,#FA4C61 -34.4px -4.83px 0 -2.73px,#FA4C61 -34.61px -3.64px 0 -2.8px,#FA4C61 -34.78px -2.43px 0 -2.87px,#FA4C61 -34.91px -1.22px 0 -2.93px,#FA4C61 -35px 0 0 -3px,#FA4C61 -35.05px 1.22px 0 -3.07px,#FA4C61 -35.05px 2.45px 0 -3.13px,#FA4C61 -35.01px 3.68px 0 -3.2px,#FA4C61 -34.92px 4.91px 0 -3.27px,#FA4C61 -34.8px 6.14px 0 -3.33px,#FA4C61 -34.63px 7.36px 0 -3.4px,#FA4C61 -34.41px 8.58px 0 -3.47px,#FA4C61 -34.16px 9.79px 0 -3.53px,#FA4C61 -33.86px 11px 0 -3.6px,#FA4C61 -33.52px 12.2px 0 -3.67px,#FA4C61 -33.13px 13.39px 0 -3.73px,#FA4C61 -32.7px 14.56px 0 -3.8px,#FA4C61 -32.24px 15.72px 0 -3.87px,#FA4C61 -31.73px 16.87px 0 -3.93px,#FA4C61 -31.18px 18px 0 -4px,#FA4C61 -30.59px 19.11px 0 -4.07px,#FA4C61 -29.96px 20.21px 0 -4.13px,#FA4C61 -29.29px 21.28px 0 -4.2px,#FA4C61 -28.58px 22.33px 0 -4.27px,#FA4C61 -27.83px 23.35px 0 -4.33px,#FA4C61 -27.05px 24.36px 0 -4.4px,#FA4C61 -26.23px 25.33px 0 -4.47px,#FA4C61 -25.38px 26.28px 0 -4.53px,#FA4C61 -24.49px 27.2px 0 -4.6px,#FA4C61 -23.57px 28.09px 0 -4.67px,#FA4C61 -22.62px 28.95px 0 -4.73px,#FA4C61 -21.63px 29.77px 0 -4.8px,#FA4C61 -20.62px 30.56px 0 -4.87px,#FA4C61 -19.57px 31.32px 0 -4.93px,#FA4C61 -18.5px 32.04px 0 -5px,#FA4C61 -17.4px 32.73px 0 -5.07px,#FA4C61 -16.28px 33.38px 0 -5.13px,#FA4C61 -15.13px 33.98px 0 -5.2px,#FA4C61 -13.96px 34.55px 0 -5.27px,#FA4C61 -12.77px 35.08px 0 -5.33px,#FA4C61 -11.56px 35.57px 0 -5.4px,#FA4C61 -10.33px 36.02px 0 -5.47px,#FA4C61 -9.08px 36.42px 0 -5.53px,#FA4C61 -7.82px 36.78px 0 -5.6px,#FA4C61 -6.54px 37.09px 0 -5.67px,#FA4C61 -5.25px 37.37px 0 -5.73px,#FA4C61 -3.95px 37.59px 0 -5.8px,#FA4C61 -2.64px 37.77px 0 -5.87px,#FA4C61 -1.32px 37.91px 0 -5.93px;-webkit-box-shadow:#FA4C61 0 26px 0 6px,#FA4C61 .91px 26.05px 0 5.93px,#FA4C61 1.82px 26.07px 0 5.87px,#FA4C61 2.74px 26.06px 0 5.8px,#FA4C61 3.66px 26.01px 0 5.73px,#FA4C61 4.57px 25.93px 0 5.67px,#FA4C61 5.49px 25.82px 0 5.6px,#FA4C61 6.4px 25.68px 0 5.53px,#FA4C61 7.31px 25.51px 0 5.47px,#FA4C61 8.22px 25.3px 0 5.4px,#FA4C61 9.12px 25.06px 0 5.33px,#FA4C61 10.01px 24.79px 0 5.27px,#FA4C61 10.9px 24.48px 0 5.2px,#FA4C61 11.78px 24.15px 0 5.13px,#FA4C61 12.64px 23.78px 0 5.07px,#FA4C61 13.5px 23.38px 0 5px,#FA4C61 14.34px 22.95px 0 4.93px,#FA4C61 15.17px 22.49px 0 4.87px,#FA4C61 15.99px 22.01px 0 4.8px,#FA4C61 16.79px 21.49px 0 4.73px,#FA4C61 17.57px 20.94px 0 4.67px,#FA4C61 18.33px 20.36px 0 4.6px,#FA4C61 19.08px 19.76px 0 4.53px,#FA4C61 19.81px 19.13px 0 4.47px,#FA4C61 20.51px 18.47px 0 4.4px,#FA4C61 21.19px 17.78px 0 4.33px,#FA4C61 21.85px 17.07px 0 4.27px,#FA4C61 22.49px 16.34px 0 4.2px,#FA4C61 23.1px 15.58px 0 4.13px,#FA4C61 23.69px 14.8px 0 4.07px,#FA4C61 24.25px 14px 0 4px,#FA4C61 24.78px 13.18px 0 3.93px,#FA4C61 25.29px 12.33px 0 3.87px,#FA4C61 25.76px 11.47px 0 3.8px,#FA4C61 26.21px 10.59px 0 3.73px,#FA4C61 26.62px 9.69px 0 3.67px,#FA4C61 27.01px 8.78px 0 3.6px,#FA4C61 27.36px 7.85px 0 3.53px,#FA4C61 27.69px 6.9px 0 3.47px,#FA4C61 27.98px 5.95px 0 3.4px,#FA4C61 28.23px 4.98px 0 3.33px,#FA4C61 28.45px 4px 0 3.27px,#FA4C61 28.64px 3.01px 0 3.2px,#FA4C61 28.8px 2.01px 0 3.13px,#FA4C61 28.92px 1.01px 0 3.07px,#FA4C61 29px 0 0 3px,#FA4C61 29.05px -1.01px 0 2.93px,#FA4C61 29.06px -2.03px 0 2.87px,#FA4C61 29.04px -3.05px 0 2.8px,#FA4C61 28.98px -4.07px 0 2.73px,#FA4C61 28.89px -5.09px 0 2.67px,#FA4C61 28.76px -6.11px 0 2.6px,#FA4C61 28.59px -7.13px 0 2.53px,#FA4C61 28.39px -8.14px 0 2.47px,#FA4C61 28.15px -9.15px 0 2.4px,#FA4C61 27.88px -10.15px 0 2.33px,#FA4C61 27.57px -11.14px 0 2.27px,#FA4C61 27.22px -12.12px 0 2.2px,#FA4C61 26.84px -13.09px 0 2.13px,#FA4C61 26.43px -14.05px 0 2.07px,#FA4C61 25.98px -15px 0 2px,#FA4C61 25.5px -15.93px 0 1.93px,#FA4C61 24.98px -16.85px 0 1.87px,#FA4C61 24.43px -17.75px 0 1.8px,#FA4C61 23.85px -18.63px 0 1.73px,#FA4C61 23.24px -19.5px 0 1.67px,#FA4C61 22.59px -20.34px 0 1.6px,#FA4C61 21.92px -21.16px 0 1.53px,#FA4C61 21.21px -21.96px 0 1.47px,#FA4C61 20.48px -22.74px 0 1.4px,#FA4C61 19.71px -23.49px 0 1.33px,#FA4C61 18.92px -24.22px 0 1.27px,#FA4C61 18.1px -24.92px 0 1.2px,#FA4C61 17.26px -25.59px 0 1.13px,#FA4C61 16.39px -26.23px 0 1.07px,#FA4C61 15.5px -26.85px 0 1px,#FA4C61 14.58px -27.43px 0 .93px,#FA4C61 13.65px -27.98px 0 .87px,#FA4C61 12.69px -28.5px 0 .8px,#FA4C61 11.71px -28.99px 0 .73px,#FA4C61 10.72px -29.44px 0 .67px,#FA4C61 9.7px -29.86px 0 .6px,#FA4C61 8.67px -30.25px 0 .53px,#FA4C61 7.63px -30.6px 0 .47px,#FA4C61 6.57px -30.91px 0 .4px,#FA4C61 5.5px -31.19px 0 .33px,#FA4C61 4.42px -31.42px 0 .27px,#FA4C61 3.32px -31.63px 0 .2px,#FA4C61 2.22px -31.79px 0 .13px,#FA4C61 1.11px -31.91px 0 .07px,#FA4C61 0 -32px 0 0,#FA4C61 -1.12px -32.05px 0 -.07px,#FA4C61 -2.24px -32.06px 0 -.13px,#FA4C61 -3.37px -32.02px 0 -.2px,#FA4C61 -4.49px -31.95px 0 -.27px,#FA4C61 -5.61px -31.84px 0 -.33px,#FA4C61 -6.74px -31.69px 0 -.4px,#FA4C61 -7.85px -31.5px 0 -.47px,#FA4C61 -8.97px -31.27px 0 -.53px,#FA4C61 -10.07px -31px 0 -.6px,#FA4C61 -11.17px -30.7px 0 -.67px,#FA4C61 -12.26px -30.35px 0 -.73px,#FA4C61 -13.34px -29.96px 0 -.8px,#FA4C61 -14.41px -29.54px 0 -.87px,#FA4C61 -15.46px -29.08px 0 -.93px,#FA4C61 -16.5px -28.58px 0 -1px,#FA4C61 -17.52px -28.04px 0 -1.07px,#FA4C61 -18.53px -27.47px 0 -1.13px,#FA4C61 -19.51px -26.86px 0 -1.2px,#FA4C61 -20.48px -26.21px 0 -1.27px,#FA4C61 -21.43px -25.53px 0 -1.33px,#FA4C61 -22.35px -24.82px 0 -1.4px,#FA4C61 -23.25px -24.07px 0 -1.47px,#FA4C61 -24.12px -23.29px 0 -1.53px,#FA4C61 -24.97px -22.48px 0 -1.6px,#FA4C61 -25.79px -21.64px 0 -1.67px,#FA4C61 -26.58px -20.77px 0 -1.73px,#FA4C61 -27.34px -19.87px 0 -1.8px,#FA4C61 -28.08px -18.94px 0 -1.87px,#FA4C61 -28.78px -17.98px 0 -1.93px,#FA4C61 -29.44px -17px 0 -2px,#FA4C61 -30.08px -15.99px 0 -2.07px,#FA4C61 -30.68px -14.96px 0 -2.13px,#FA4C61 -31.24px -13.91px 0 -2.2px,#FA4C61 -31.77px -12.84px 0 -2.27px,#FA4C61 -32.26px -11.74px 0 -2.33px,#FA4C61 -32.72px -10.63px 0 -2.4px,#FA4C61 -33.13px -9.5px 0 -2.47px,#FA4C61 -33.51px -8.35px 0 -2.53px,#FA4C61 -33.84px -7.19px 0 -2.6px,#FA4C61 -34.14px -6.02px 0 -2.67px,#FA4C61 -34.4px -4.83px 0 -2.73px,#FA4C61 -34.61px -3.64px 0 -2.8px,#FA4C61 -34.78px -2.43px 0 -2.87px,#FA4C61 -34.91px -1.22px 0 -2.93px,#FA4C61 -35px 0 0 -3px,#FA4C61 -35.05px 1.22px 0 -3.07px,#FA4C61 -35.05px 2.45px 0 -3.13px,#FA4C61 -35.01px 3.68px 0 -3.2px,#FA4C61 -34.92px 4.91px 0 -3.27px,#FA4C61 -34.8px 6.14px 0 -3.33px,#FA4C61 -34.63px 7.36px 0 -3.4px,#FA4C61 -34.41px 8.58px 0 -3.47px,#FA4C61 -34.16px 9.79px 0 -3.53px,#FA4C61 -33.86px 11px 0 -3.6px,#FA4C61 -33.52px 12.2px 0 -3.67px,#FA4C61 -33.13px 13.39px 0 -3.73px,#FA4C61 -32.7px 14.56px 0 -3.8px,#FA4C61 -32.24px 15.72px 0 -3.87px,#FA4C61 -31.73px 16.87px 0 -3.93px,#FA4C61 -31.18px 18px 0 -4px,#FA4C61 -30.59px 19.11px 0 -4.07px,#FA4C61 -29.96px 20.21px 0 -4.13px,#FA4C61 -29.29px 21.28px 0 -4.2px,#FA4C61 -28.58px 22.33px 0 -4.27px,#FA4C61 -27.83px 23.35px 0 -4.33px,#FA4C61 -27.05px 24.36px 0 -4.4px,#FA4C61 -26.23px 25.33px 0 -4.47px,#FA4C61 -25.38px 26.28px 0 -4.53px,#FA4C61 -24.49px 27.2px 0 -4.6px,#FA4C61 -23.57px 28.09px 0 -4.67px,#FA4C61 -22.62px 28.95px 0 -4.73px,#FA4C61 -21.63px 29.77px 0 -4.8px,#FA4C61 -20.62px 30.56px 0 -4.87px,#FA4C61 -19.57px 31.32px 0 -4.93px,#FA4C61 -18.5px 32.04px 0 -5px,#FA4C61 -17.4px 32.73px 0 -5.07px,#FA4C61 -16.28px 33.38px 0 -5.13px,#FA4C61 -15.13px 33.98px 0 -5.2px,#FA4C61 -13.96px 34.55px 0 -5.27px,#FA4C61 -12.77px 35.08px 0 -5.33px,#FA4C61 -11.56px 35.57px 0 -5.4px,#FA4C61 -10.33px 36.02px 0 -5.47px,#FA4C61 -9.08px 36.42px 0 -5.53px,#FA4C61 -7.82px 36.78px 0 -5.6px,#FA4C61 -6.54px 37.09px 0 -5.67px,#FA4C61 -5.25px 37.37px 0 -5.73px,#FA4C61 -3.95px 37.59px 0 -5.8px,#FA4C61 -2.64px 37.77px 0 -5.87px,#FA4C61 -1.32px 37.91px 0 -5.93px;box-shadow:#FA4C61 0 26px 0 6px,#FA4C61 .91px 26.05px 0 5.93px,#FA4C61 1.82px 26.07px 0 5.87px,#FA4C61 2.74px 26.06px 0 5.8px,#FA4C61 3.66px 26.01px 0 5.73px,#FA4C61 4.57px 25.93px 0 5.67px,#FA4C61 5.49px 25.82px 0 5.6px,#FA4C61 6.4px 25.68px 0 5.53px,#FA4C61 7.31px 25.51px 0 5.47px,#FA4C61 8.22px 25.3px 0 5.4px,#FA4C61 9.12px 25.06px 0 5.33px,#FA4C61 10.01px 24.79px 0 5.27px,#FA4C61 10.9px 24.48px 0 5.2px,#FA4C61 11.78px 24.15px 0 5.13px,#FA4C61 12.64px 23.78px 0 5.07px,#FA4C61 13.5px 23.38px 0 5px,#FA4C61 14.34px 22.95px 0 4.93px,#FA4C61 15.17px 22.49px 0 4.87px,#FA4C61 15.99px 22.01px 0 4.8px,#FA4C61 16.79px 21.49px 0 4.73px,#FA4C61 17.57px 20.94px 0 4.67px,#FA4C61 18.33px 20.36px 0 4.6px,#FA4C61 19.08px 19.76px 0 4.53px,#FA4C61 19.81px 19.13px 0 4.47px,#FA4C61 20.51px 18.47px 0 4.4px,#FA4C61 21.19px 17.78px 0 4.33px,#FA4C61 21.85px 17.07px 0 4.27px,#FA4C61 22.49px 16.34px 0 4.2px,#FA4C61 23.1px 15.58px 0 4.13px,#FA4C61 23.69px 14.8px 0 4.07px,#FA4C61 24.25px 14px 0 4px,#FA4C61 24.78px 13.18px 0 3.93px,#FA4C61 25.29px 12.33px 0 3.87px,#FA4C61 25.76px 11.47px 0 3.8px,#FA4C61 26.21px 10.59px 0 3.73px,#FA4C61 26.62px 9.69px 0 3.67px,#FA4C61 27.01px 8.78px 0 3.6px,#FA4C61 27.36px 7.85px 0 3.53px,#FA4C61 27.69px 6.9px 0 3.47px,#FA4C61 27.98px 5.95px 0 3.4px,#FA4C61 28.23px 4.98px 0 3.33px,#FA4C61 28.45px 4px 0 3.27px,#FA4C61 28.64px 3.01px 0 3.2px,#FA4C61 28.8px 2.01px 0 3.13px,#FA4C61 28.92px 1.01px 0 3.07px,#FA4C61 29px 0 0 3px,#FA4C61 29.05px -1.01px 0 2.93px,#FA4C61 29.06px -2.03px 0 2.87px,#FA4C61 29.04px -3.05px 0 2.8px,#FA4C61 28.98px -4.07px 0 2.73px,#FA4C61 28.89px -5.09px 0 2.67px,#FA4C61 28.76px -6.11px 0 2.6px,#FA4C61 28.59px -7.13px 0 2.53px,#FA4C61 28.39px -8.14px 0 2.47px,#FA4C61 28.15px -9.15px 0 2.4px,#FA4C61 27.88px -10.15px 0 2.33px,#FA4C61 27.57px -11.14px 0 2.27px,#FA4C61 27.22px -12.12px 0 2.2px,#FA4C61 26.84px -13.09px 0 2.13px,#FA4C61 26.43px -14.05px 0 2.07px,#FA4C61 25.98px -15px 0 2px,#FA4C61 25.5px -15.93px 0 1.93px,#FA4C61 24.98px -16.85px 0 1.87px,#FA4C61 24.43px -17.75px 0 1.8px,#FA4C61 23.85px -18.63px 0 1.73px,#FA4C61 23.24px -19.5px 0 1.67px,#FA4C61 22.59px -20.34px 0 1.6px,#FA4C61 21.92px -21.16px 0 1.53px,#FA4C61 21.21px -21.96px 0 1.47px,#FA4C61 20.48px -22.74px 0 1.4px,#FA4C61 19.71px -23.49px 0 1.33px,#FA4C61 18.92px -24.22px 0 1.27px,#FA4C61 18.1px -24.92px 0 1.2px,#FA4C61 17.26px -25.59px 0 1.13px,#FA4C61 16.39px -26.23px 0 1.07px,#FA4C61 15.5px -26.85px 0 1px,#FA4C61 14.58px -27.43px 0 .93px,#FA4C61 13.65px -27.98px 0 .87px,#FA4C61 12.69px -28.5px 0 .8px,#FA4C61 11.71px -28.99px 0 .73px,#FA4C61 10.72px -29.44px 0 .67px,#FA4C61 9.7px -29.86px 0 .6px,#FA4C61 8.67px -30.25px 0 .53px,#FA4C61 7.63px -30.6px 0 .47px,#FA4C61 6.57px -30.91px 0 .4px,#FA4C61 5.5px -31.19px 0 .33px,#FA4C61 4.42px -31.42px 0 .27px,#FA4C61 3.32px -31.63px 0 .2px,#FA4C61 2.22px -31.79px 0 .13px,#FA4C61 1.11px -31.91px 0 .07px,#FA4C61 0 -32px 0 0,#FA4C61 -1.12px -32.05px 0 -.07px,#FA4C61 -2.24px -32.06px 0 -.13px,#FA4C61 -3.37px -32.02px 0 -.2px,#FA4C61 -4.49px -31.95px 0 -.27px,#FA4C61 -5.61px -31.84px 0 -.33px,#FA4C61 -6.74px -31.69px 0 -.4px,#FA4C61 -7.85px -31.5px 0 -.47px,#FA4C61 -8.97px -31.27px 0 -.53px,#FA4C61 -10.07px -31px 0 -.6px,#FA4C61 -11.17px -30.7px 0 -.67px,#FA4C61 -12.26px -30.35px 0 -.73px,#FA4C61 -13.34px -29.96px 0 -.8px,#FA4C61 -14.41px -29.54px 0 -.87px,#FA4C61 -15.46px -29.08px 0 -.93px,#FA4C61 -16.5px -28.58px 0 -1px,#FA4C61 -17.52px -28.04px 0 -1.07px,#FA4C61 -18.53px -27.47px 0 -1.13px,#FA4C61 -19.51px -26.86px 0 -1.2px,#FA4C61 -20.48px -26.21px 0 -1.27px,#FA4C61 -21.43px -25.53px 0 -1.33px,#FA4C61 -22.35px -24.82px 0 -1.4px,#FA4C61 -23.25px -24.07px 0 -1.47px,#FA4C61 -24.12px -23.29px 0 -1.53px,#FA4C61 -24.97px -22.48px 0 -1.6px,#FA4C61 -25.79px -21.64px 0 -1.67px,#FA4C61 -26.58px -20.77px 0 -1.73px,#FA4C61 -27.34px -19.87px 0 -1.8px,#FA4C61 -28.08px -18.94px 0 -1.87px,#FA4C61 -28.78px -17.98px 0 -1.93px,#FA4C61 -29.44px -17px 0 -2px,#FA4C61 -30.08px -15.99px 0 -2.07px,#FA4C61 -30.68px -14.96px 0 -2.13px,#FA4C61 -31.24px -13.91px 0 -2.2px,#FA4C61 -31.77px -12.84px 0 -2.27px,#FA4C61 -32.26px -11.74px 0 -2.33px,#FA4C61 -32.72px -10.63px 0 -2.4px,#FA4C61 -33.13px -9.5px 0 -2.47px,#FA4C61 -33.51px -8.35px 0 -2.53px,#FA4C61 -33.84px -7.19px 0 -2.6px,#FA4C61 -34.14px -6.02px 0 -2.67px,#FA4C61 -34.4px -4.83px 0 -2.73px,#FA4C61 -34.61px -3.64px 0 -2.8px,#FA4C61 -34.78px -2.43px 0 -2.87px,#FA4C61 -34.91px -1.22px 0 -2.93px,#FA4C61 -35px 0 0 -3px,#FA4C61 -35.05px 1.22px 0 -3.07px,#FA4C61 -35.05px 2.45px 0 -3.13px,#FA4C61 -35.01px 3.68px 0 -3.2px,#FA4C61 -34.92px 4.91px 0 -3.27px,#FA4C61 -34.8px 6.14px 0 -3.33px,#FA4C61 -34.63px 7.36px 0 -3.4px,#FA4C61 -34.41px 8.58px 0 -3.47px,#FA4C61 -34.16px 9.79px 0 -3.53px,#FA4C61 -33.86px 11px 0 -3.6px,#FA4C61 -33.52px 12.2px 0 -3.67px,#FA4C61 -33.13px 13.39px 0 -3.73px,#FA4C61 -32.7px 14.56px 0 -3.8px,#FA4C61 -32.24px 15.72px 0 -3.87px,#FA4C61 -31.73px 16.87px 0 -3.93px,#FA4C61 -31.18px 18px 0 -4px,#FA4C61 -30.59px 19.11px 0 -4.07px,#FA4C61 -29.96px 20.21px 0 -4.13px,#FA4C61 -29.29px 21.28px 0 -4.2px,#FA4C61 -28.58px 22.33px 0 -4.27px,#FA4C61 -27.83px 23.35px 0 -4.33px,#FA4C61 -27.05px 24.36px 0 -4.4px,#FA4C61 -26.23px 25.33px 0 -4.47px,#FA4C61 -25.38px 26.28px 0 -4.53px,#FA4C61 -24.49px 27.2px 0 -4.6px,#FA4C61 -23.57px 28.09px 0 -4.67px,#FA4C61 -22.62px 28.95px 0 -4.73px,#FA4C61 -21.63px 29.77px 0 -4.8px,#FA4C61 -20.62px 30.56px 0 -4.87px,#FA4C61 -19.57px 31.32px 0 -4.93px,#FA4C61 -18.5px 32.04px 0 -5px,#FA4C61 -17.4px 32.73px 0 -5.07px,#FA4C61 -16.28px 33.38px 0 -5.13px,#FA4C61 -15.13px 33.98px 0 -5.2px,#FA4C61 -13.96px 34.55px 0 -5.27px,#FA4C61 -12.77px 35.08px 0 -5.33px,#FA4C61 -11.56px 35.57px 0 -5.4px,#FA4C61 -10.33px 36.02px 0 -5.47px,#FA4C61 -9.08px 36.42px 0 -5.53px,#FA4C61 -7.82px 36.78px 0 -5.6px,#FA4C61 -6.54px 37.09px 0 -5.67px,#FA4C61 -5.25px 37.37px 0 -5.73px,#FA4C61 -3.95px 37.59px 0 -5.8px,#FA4C61 -2.64px 37.77px 0 -5.87px,#FA4C61 -1.32px 37.91px 0 -5.93px;-moz-animation:whirly-loader 1.25s infinite linear;-webkit-animation:whirly-loader 1.25s infinite linear;animation:whirly-loader 1.25s infinite linear;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.inactive-link{cursor:default}.ui-grid-vcenter div{position:relative;top:50%;vertical-align:middle;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);white-space:nowrap;text-overflow:ellipsis;overflow:hidden!important}.demo{background-image:url(../../assets/images/demo.png)}.float-right{float:right}.float-left{float:left}.checker{width:19px;height:19px}.collapse.am-collapse{animation-duration:.3s;animation-timing-function:ease;animation-fill-mode:backwards;overflow:hidden}.message-info{float:right;color:#d3d3d3;margin-right:5px}[ui-view].ng-enter{-webkit-animation:fadeInUpm .5s;animation:fadeInUpm .5s}.steps,.steps-indicator{padding-bottom:20px!important}.ui-sortable,.ui-sortable-handle{cursor:move}.step .btn:not(.ui-select-toggle,.remove-condition){margin-bottom:10px}.mbottom20{margin-bottom:20px}.pbottom20{padding-bottom:20px}.break-overflow{overflow-wrap:break-word}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.alert{padding:15px!important;margin-bottom:20px!important;border:1px solid transparent!important;border-radius:4px!important}.alert h4{margin-top:0!important;color:inherit!important}.alert .alert-link{font-weight:700!important}.alert>p,.alert>ul{margin-bottom:0!important}.alert>p+p{margin-top:5px!important}.alert-dismissable,.alert-dismissible{padding-right:35px!important}.alert-dismissable .close,.alert-dismissible .close{position:relative!important;top:-2px!important;right:-21px!important;color:inherit!important}.alert-success{background-color:#dff0d8!important;border-color:#d6e9c6!important;color:#3c763d!important}.alert-success hr{border-top-color:#c9e2b3!important}.alert-success .alert-link{color:#2b542c!important}.alert-info{background-color:#d9edf7!important;border-color:#bce8f1!important;color:#31708f!important}.alert-info hr{border-top-color:#a6e1ec!important}.alert-info .alert-link{color:#245269!important}.alert-warning{background-color:#fcf8e3!important;border-color:#faebcc!important;color:#8a6d3b!important}.alert-warning hr{border-top-color:#f7e1b5!important}.alert-warning .alert-link{color:#66512c!important}.alert-danger{background-color:#f2dede!important;border-color:#ebccd1!important;color:#a94442!important}.alert-danger hr{border-top-color:#e4b9c0!important}.alert-danger .alert-link{color:#843534!important}.alert .close{text-indent:inherit!important;background-image:none!important;width:auto!important}.page-404 .number{position:relative;top:35px;display:inline-block;letter-spacing:-10px;margin-top:0;margin-bottom:10px;line-height:128px;font-size:128px;font-weight:300;color:#7bbbd6;text-align:right}.page-404 .details{margin-left:40px;display:inline-block;padding-top:0;text-align:left}.sounds-title-icon{font-size:17px}.ui-select-multiple input.ui-select-search{width:100%!important}.modal.fade,.over-topbar{z-index:9996!important}.list-group-item-custom{border:none}.pointer-cursor{cursor:pointer!important}.select-group-father{font-weight:700!important}.select-group-son{font-style:italic!important}@media (max-height:908px){.modal-body-scroll{max-height:325px;overflow-y:scroll}}.widget .dashboard-stat{margin-bottom:0!important}.widget .panel-body{padding:0}.left-margin{margin-left:20px}.contact-portlet{overflow-x:hidden;overflow-y:auto}.contact-tab{background:#F1F3FA;padding-top:20px}.contact-tab-container{padding-left:20px;padding-right:20px}.col-fixed,.tree-row{float:left}.col-fixed{width:277px;margin-right:15px}.tree-row{width:calc(100% - 277px + 15px)}.tree-search{float:left;display:inline-block;line-height:18px;font-weight:300;padding:10px 0}.report-field-handle{width:66px;height:66px;background-image:url(../../assets/images/move.png);background-repeat:no-repeat;background-size:66px 66px}.ui-sortable-helper{display:table}.report-field-remove{width:66px;height:66px;text-align:center}.portlet.light .portlet-title{padding:0;min-height:48px}.portlet .portlet-title{border-bottom:1px solid #eee;padding:0;margin-bottom:10px;min-height:41px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.ui-select-match-text{width:100%;overflow:hidden;text-overflow:ellipsis;padding-right:20px}.ui-select-choices-row-inner div{width:100%;overflow:hidden;text-overflow:ellipsis}.ui-select-toggle>.btn.btn-link{margin-right:10px;top:6px;position:absolute;right:10px}.extract-grid{min-height:600px}body>[uib-modal-window]:not([modal-render]){display:none}.watermark{position:absolute;top:50%;transform:translateY(-50%);opacity:.7;width:100%;text-align:center;z-index:1000;font-size:25px}.centered-uigrid-td{text-align:center;margin:4px}.condition{margin-top:8px;margin-bottom:8px}.ms-container .ms-list{height:430px!important}.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{padding:7px 12px!important}.ms-container{width:100%!important}.ms-optgroup-label{text-align:center;font-weight:700;background-color:#F0F0F0}.pause-select{width:20px;color:#A29999;border:none}@keyframes blink{0%{border-color:transparent}25%{border-color:#EACD9E}50%{border-color:#ECC077}75%{border-color:#ECB861}100%{border-color:#FFB848}}.paused-agent{border:2px solid transparent;animation:blink .5s step-end infinite alternate}.otherfields-col{min-height:400px!important;max-width:100%}.profile-content{min-height:800px}.page-header.navbar{background-color:#2b3643}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle>i{color:#79869a}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle .badge.badge-default{background-color:#EA4C61;color:#fff}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle:hover,.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle{background-color:#3f4f62}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle:hover>i,.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle>i{color:#a4aebb}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu{border-color:#e7eaf0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu:after{border-bottom-color:#eaedf2}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external{background:#eaedf2}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>h3{color:#62878f}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>a{color:#5b9bd1}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>a:hover{color:#3175af;text-decoration:underline}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a{border-bottom:1px solid #EFF2F6!important;color:#888}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a:hover{background:#f8f9fa}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li>a .time{background:#f1f1f1}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li>a:hover .time{background:#e4e4e4}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-toggle>.circle{background-color:#EA4C61;color:#fff}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-toggle>.corner{border-color:transparent transparent transparent #EA4C61}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu .dropdown-menu-list .subject .from{color:#5b9bd1}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle>.langname,.page-header.navbar .top-menu .navbar-nav>li.dropdown-user>.dropdown-toggle>.username,.page-header.navbar .top-menu .navbar-nav>li.dropdown-user>.dropdown-toggle>i{color:#c6cfda}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list .progress{background-color:#dfe2e9}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user>.dropdown-menu{width:195px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu{background:#3f4f62;border:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu:after{border-bottom-color:#3f4f62}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu>li.external{background:#2f3b49}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu>li.external>h3{color:#adbaca}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu>li.external>a:hover{color:#87b6dd}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu .dropdown-menu-list>li a,.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a{color:#bcc7d4;border-bottom:1px solid #4b5e75!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu .dropdown-menu-list>li a>i,.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a>i{color:#9dadc0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu .dropdown-menu-list>li a:hover,.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a:hover{background:#47596e}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li a{border-bottom:0!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-dark .dropdown-menu.dropdown-menu-default>li.divider{background:#4b5e75}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification.dropdown-dark .dropdown-menu .dropdown-menu-list>li>a .time{background:#354353}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification.dropdown-dark .dropdown-menu .dropdown-menu-list>li>a:hover .time{background:#2b3643}.page-header.navbar .search-form{background:#232c37}.page-header.navbar .search-form.open,.page-header.navbar .search-form:hover{background:#3f4f62}.page-header.navbar .search-form .input-group .form-control{color:#959fad}.page-header.navbar .search-form .input-group .form-control::-moz-placeholder{color:#929cab;opacity:1}.page-header.navbar .search-form .input-group .form-control:-ms-input-placeholder{color:#929cab}.page-header.navbar .search-form .input-group .form-control::-webkit-input-placeholder{color:#929cab}.page-header.navbar .search-form .input-group .input-group-btn .btn.submit>i{color:#959fad}.page-header.navbar .menu-toggler{background-image:url(../../assets/images/sidebar_toggler_icon_darkblue.png)}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu{box-shadow:5px 5px rgba(63,79,98,.2)}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>h3,.page-header.navbar .hor-menu .navbar-nav>li>a{color:#c6cfda}.page-header.navbar .hor-menu .navbar-nav>li>a>i{color:#788ea8}.page-header.navbar .hor-menu .navbar-nav>li.open>a,.page-header.navbar .hor-menu .navbar-nav>li>a:hover{color:#d5dce4;background:#3f4f62!important}.page-header.navbar .hor-menu .navbar-nav>li.open>a>i,.page-header.navbar .hor-menu .navbar-nav>li>a:hover>i{color:#889bb2}.page-header.navbar .hor-menu .navbar-nav>li.active>a,.page-header.navbar .hor-menu .navbar-nav>li.current>a{color:#fff;background:#EA4C61!important}.page-header.navbar .hor-menu .navbar-nav>li.active>a>i,.page-header.navbar .hor-menu .navbar-nav>li.current>a>i{color:#788ea8}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu{box-shadow:5px 5px rgba(63,79,98,.2);background:#3f4f62}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a>i{color:#c6cfda}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li:hover>a{color:#f1f3f6;background:#47596e}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li:hover>a>i{color:#f1f3f6}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a:hover,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a:hover{color:#f1f3f6;background:#47596e}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a:hover>i,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.active>a>i,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a:hover>i,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.current>a>i{color:#f1f3f6}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li.divider{background-color:#495c72}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-submenu>a:after{color:#c6cfda}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.mega-menu-dropdown>.dropdown-menu{box-shadow:5px 5px rgba(102,102,102,.1)}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>h3{color:#666}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a{color:#c6cfda}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a>i{color:#788ea8}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a:hover{color:#d5dce4;background:#3f4f62}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>a:hover>i{color:#889bb2}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.open>a{color:#333!important;background:#fff!important}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.open>a>i{color:#333!important}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a:hover,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a:hover{color:#fff;background:#EA4C61}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.active>a>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li.current>a>i{color:#788ea8}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu{box-shadow:5px 5px rgba(102,102,102,.1);background:#fff;border:1px solid #efeff5}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li>a{color:#000}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li>a>i{color:#888}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li:hover>a{color:#000;background:#f2f2f7}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li:hover>a>i{color:#666}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a:hover,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a:hover{color:#000;background:#f2f2f7}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.active>a>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a:hover>i,.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.current>a>i{color:#666}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li .dropdown-menu li.divider{background-color:#f2f2f7}.page-header.navbar .hor-menu.hor-menu-light .navbar-nav>li>.dropdown-menu{border-top:0}.page-sidebar,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover{background-color:#364150}.page-sidebar .page-sidebar-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{color:#b4bcc8}.page-sidebar .page-sidebar-menu>li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i{color:#606C7D}.page-sidebar .page-sidebar-menu>li>a>i[class*=icon-],.page-sidebar .page-sidebar-menu>li>a>i[class^=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i[class*=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i[class^=icon-]{color:#6b788b}.page-sidebar .page-sidebar-menu>li>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu>li.heading>h3,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading>h3{color:#708096}.page-sidebar .page-sidebar-menu>li.open>a,.page-sidebar .page-sidebar-menu>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a{background:#2C3542;color:#b4bcc8}.page-sidebar .page-sidebar-menu>li.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li.open>a>.arrow:before,.page-sidebar .page-sidebar-menu>li.open>a>i,.page-sidebar .page-sidebar-menu>li:hover>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li:hover>a>.arrow:before,.page-sidebar .page-sidebar-menu>li:hover>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:hover>a>i{color:#606C7D}.page-sidebar .page-sidebar-menu>li.active.open>a,.page-sidebar .page-sidebar-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a{background:#EA4C61;border-top-color:transparent;color:#fff}.page-sidebar .page-sidebar-menu>li.active.open>a:hover,.page-sidebar .page-sidebar-menu>li.active>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a:hover{background:#EA4C61}.page-sidebar .page-sidebar-menu>li.active.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li.active.open>a>.arrow:before,.page-sidebar .page-sidebar-menu>li.active.open>a>i,.page-sidebar .page-sidebar-menu>li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu>li.active>a>.arrow:before,.page-sidebar .page-sidebar-menu>li.active>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>i{color:#fff}.page-sidebar .page-sidebar-menu>li.active+li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active+li>a{border-top-color:transparent}.page-sidebar .page-sidebar-menu>li.active.open+li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active.open+li>a{border-top-color:#3d4957}.page-sidebar .page-sidebar-menu>li:last-child>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li:last-child>a{border-bottom:1px solid transparent!important}.page-sidebar .page-sidebar-menu li:hover>a>.arrow.open:before,.page-sidebar .page-sidebar-menu li:hover>a>.arrow:before,.page-sidebar .page-sidebar-menu li>a>.arrow.open:before,.page-sidebar .page-sidebar-menu li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li:hover>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li:hover>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li.active>a>.arrow:before{color:#fff}.page-sidebar-closed .page-sidebar .page-sidebar-menu:hover .sub-menu,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu:hover .sub-menu{background-color:#364150}.page-sidebar .page-sidebar-menu .sub-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a{color:#b4bcc8}.page-sidebar .page-sidebar-menu .sub-menu>li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>i{color:#606C7D}.page-sidebar .page-sidebar-menu .sub-menu>li>a>i[class*=icon-],.page-sidebar .page-sidebar-menu .sub-menu>li>a>i[class^=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>i[class*=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>i[class^=icon-]{color:#6b788b}.page-sidebar .page-sidebar-menu .sub-menu>li>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu .sub-menu>li.active>a,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a{background:#3e4b5c!important}.page-sidebar .page-sidebar-menu .sub-menu>li.active>a>i,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a>i,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a>i{color:#959fae}.page-sidebar .page-sidebar-menu .sub-menu>li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li.active>a>.arrow:before,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li.open>a>.arrow:before,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a>.arrow.open:before,.page-sidebar .page-sidebar-menu .sub-menu>li:hover>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu>li:hover>a>.arrow:before{color:#606C7D}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li:hover>a{background:#3a4656}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a{background:#3e4b5c;border-left:4px solid #EA4C61;color:#f1f1f1}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover{border-left:4px solid #EA4C61;background:#3a4656}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow.open:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>i,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow.open:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow:before,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li.active>a>i{color:#eee}.page-sidebar .sidebar-search .input-group .input-group-btn .btn>i,.page-sidebar-closed .page-sidebar .sidebar-search.open .remove>i,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.open .remove>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .input-group-btn .btn>i{color:#4e5c6f}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu{background:#3a4656}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.active>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li:hover>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li:hover>a{background:#3e4b5c!important}.page-sidebar .sidebar-toggler,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-toggler{background:url(../assets/images/sidebar_inline_toggler_icon_darkblue.jpg)}.page-sidebar .sidebar-search .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group{border-bottom:1px solid #435060}.page-sidebar .sidebar-search .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control{background-color:#364150;color:#4e5c6f}.page-sidebar .sidebar-search .input-group .form-control::-moz-placeholder,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control::-moz-placeholder{color:#4e5c6f;opacity:1}.page-sidebar .sidebar-search .input-group .form-control:-ms-input-placeholder,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control:-ms-input-placeholder{color:#4e5c6f}.page-sidebar .sidebar-search .input-group .form-control::-webkit-input-placeholder,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control::-webkit-input-placeholder{color:#4e5c6f}.page-sidebar .sidebar-search.sidebar-search-bordered .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered .input-group{border:1px solid #435060}.page-sidebar-closed .page-sidebar .sidebar-search.open .input-group,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.open .input-group{background-color:#364150}.page-sidebar-closed .page-sidebar .sidebar-search.sidebar-search-solid .input-group,.page-sidebar-closed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid .input-group{background:0 0}.page-sidebar .sidebar-search.sidebar-search-solid .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid .input-group{border:1px solid #2c3541;background:#2c3541}.page-sidebar .sidebar-search.sidebar-search-solid .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid .input-group .form-control{background:#2c3541}.page-sidebar .sidebar-search.sidebar-search-solid.open .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid.open .input-group{border:1px solid #364150;background:#364150}.page-sidebar .sidebar-search.sidebar-search-solid.open .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-solid.open .input-group .form-control{background:#364150}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active>a,.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover{border-left:0;border-right:4px solid #EA4C61}.page-quick-sidebar-wrapper,.page-quick-sidebar-wrapper .page-quick-sidebar{background:#435468}.page-quick-sidebar-toggler{background:#576d87}.page-quick-sidebar-toggler:hover{background:#51667e}.page-quick-sidebar-toggler>i,.page-quick-sidebar-wrapper{color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a{color:#c9ced7;background:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a:hover{background:#4d6178}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li.open>a{color:#c9ced7;background:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li.active>a{border:0;background:#435468}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu{border:0;background:#576d87;box-shadow:5px 5px rgba(142,160,182,.1)}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:after,.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:before{border-bottom:7px solid #576d87}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a{color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a>i{color:#ccd1d9}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a:hover{background:#5d7591;color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li>a:hover>i{color:#d4d9e0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li.active>a{background:#59708a;color:#d1d6de}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu>li.divider{background-color:#5d7591}.page-quick-sidebar-wrapper .page-quick-sidebar .list-heading{color:#a5afbd}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li{border-bottom-color:#495c72}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li:hover{background:#495c72}.page-quick-sidebar-wrapper .page-quick-sidebar-item .page-quick-sidebar-nav .page-quick-sidebar-back-to-list{color:#c9ced7}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group{border-bottom:1px solid #435060}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group .form-control{background-color:#435468;color:#c9ced7}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-sub{color:#9ca7b7}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-small{color:#919cae}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .datetime,.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .name{color:#bdc4ce}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .message{color:#c9ced7;background:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .message .arrow{border-right-color:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .message .arrow{border-left-color:#576d87}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li a{color:#b7bfca}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li a .desc{text-decoration:underline}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .desc{color:#b1b9c6}.page-quick-sidebar-wrapper .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .date{color:#919cae}.page-footer .page-footer-inner{color:#98a6ba}.page-footer-fixed .page-footer{background-color:#28303b}@media (min-width:992px){.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{box-shadow:5px 5px rgba(44,53,66,.2)}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu.sidebar-search-wrapper,.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu.sidebar-toggler-wrapper{box-shadow:none}.page-sidebar-menu.page-sidebar-menu-closed>li:hover{box-shadow:5px 5px rgba(44,53,66,.2)}.page-sidebar-menu.page-sidebar-menu-closed>li:hover.sidebar-search-wrapper,.page-sidebar-menu.page-sidebar-menu-closed>li:hover.sidebar-toggler-wrapper{box-shadow:none}.page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu{box-shadow:5px 5px rgba(44,53,66,.2)}.page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu.sidebar-search-wrapper,.page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu.sidebar-toggler-wrapper{box-shadow:none}.page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-closed>li.heading{padding:0;margin-top:15px;margin-bottom:15px;border-top:1px solid #3d4957!important}.page-sidebar-fixed:not(.page-footer-fixed) .page-content{border-bottom:0}.page-sidebar-fixed:not(.page-footer-fixed) .page-footer{background-color:#fff}.page-sidebar-fixed:not(.page-footer-fixed) .page-footer .page-footer-inner{color:#333}.page-boxed{background-color:#303a47!important}.page-boxed .page-container{background-color:#364150;border-left:1px solid #3d4957;border-bottom:1px solid #3d4957}.page-boxed.page-sidebar-reversed .page-container{border-left:0;border-right:1px solid #3d4957}.page-boxed.page-sidebar-fixed .page-container{border-left:0;border-bottom:0}.page-boxed.page-sidebar-reversed.page-sidebar-fixed .page-container{border-left:0;border-right:0;border-bottom:0}.page-boxed.page-sidebar-fixed .page-sidebar{border-left:1px solid #3d4957}.page-boxed.page-sidebar-reversed.page-sidebar-fixed .page-sidebar{border-right:1px solid #3d4957;border-left:0}.page-boxed.page-sidebar-fixed.page-footer-fixed .page-footer{background-color:#303a47!important}.page-boxed.page-sidebar-fixed.page-footer-fixed .page-footer .page-footer-inner{color:#98a6ba}.page-sidebar-menu-hover-submenu li:hover a>.arrow{border-right:8px solid #323c4b}.page-sidebar-reversed .page-sidebar-menu-hover-submenu li:hover a>.arrow{border-left:8px solid #323c4b}.page-sidebar-menu-hover-submenu li:hover>.sub-menu{background:#323c4b!important}}.pace .pace-progress-inner,.page-header.navbar,.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .progress .progress-bar{box-shadow:none}@media (max-width:991px){.page-sidebar{background-color:#28303b}.page-sidebar .page-sidebar-menu>li>a{border-top:1px solid #364150}.page-sidebar .page-sidebar-menu>li.open>a,.page-sidebar .page-sidebar-menu>li:hover>a{background:#2e3744}.page-sidebar .page-sidebar-menu>li:last-child>a{border-bottom:0!important}.page-sidebar .page-sidebar-menu .sidebar-search input,.page-sidebar .page-sidebar-menu>li .sub-menu{background-color:#28303b!important}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active.open>a:hover,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.active>a:hover,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li:hover>a{background:#2e3744}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu{background:#28303b!important}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.active>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li.open>a,.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu>li:hover>a{background:#2e3744!important}}@media (max-width:480px){.page-header.navbar .top-menu{background-color:#364150}.page-header-fixed-mobile .page-header.navbar .top-menu{background-color:#2b3643}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{background-color:#415265}.page-header-fixed-mobile .page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{background:0 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle:hover{background-color:#3f4f62}}body{background-color:#364150}.block-spinner-bar>div,.page-spinner-bar>div{background:#20c5ad}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTQzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTQ7aC6SjiAOpAWOKfJDfVRY.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRdwxCXfZpKo5kWAx_74bHs.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTSGUML8f7tzeB6gGvgki0bE.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTZ6vnaPZw6nYDxM4SVEMFKg.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTfy1_HTwRwgtl1cPga3Fy3Y.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTfgrLsWo7Jk1KvZser0olKY.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTYjoYw3YTyktCCer_ilOlhE.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/TCmDhmS1RRL7aqhqZW19hwLUuEpTyoUstqEm5AMlJo4.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01m4X0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5UYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/ttwNtsRpgsxVmgGGmiUOEoX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAoX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEEYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(https://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSgzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSg7aC6SjiAOpAWOKfJDfVRY.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShdwxCXfZpKo5kWAx_74bHs.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSiGUML8f7tzeB6gGvgki0bE.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSp6vnaPZw6nYDxM4SVEMFKg.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSvy1_HTwRwgtl1cPga3Fy3Y.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSvgrLsWo7Jk1KvZser0olKY.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSojoYw3YTyktCCer_ilOlhE.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShampu5_7CjHW5spxoeN3Vs.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzAzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzA7aC6SjiAOpAWOKfJDfVRY.woff2) format('woff2');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBdwxCXfZpKo5kWAx_74bHs.woff2) format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzCGUML8f7tzeB6gGvgki0bE.woff2) format('woff2');unicode-range:U+02BC,U+0900-097F,U+1CD0-1CF6,U+1CF8-1CF9,U+200B-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzJ6vnaPZw6nYDxM4SVEMFKg.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzPy1_HTwRwgtl1cPga3Fy3Y.woff2) format('woff2');unicode-range:U+0370-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzPgrLsWo7Jk1KvZser0olKY.woff2) format('woff2');unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzIjoYw3YTyktCCer_ilOlhE.woff2) format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBampu5_7CjHW5spxoeN3Vs.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@media print{body{background-color:#fff!important}.hidden-print,.page-bar,.page-footer,.page-quick-sidebar-wrapper,.page-sidebar-wrapper,.theme-panel{display:none}.no-page-break{page-break-after:avoid}.page-container{margin:0!important;padding:0!important}.page-content{min-height:300px!important;padding:0 20px 20px!important;margin:0!important}}.page-header.navbar{width:100%;margin:0;border:0;padding:0;height:46px;min-height:46px;filter:none;background-image:none}.page-header.navbar.navbar-fixed-top,.page-header.navbar.navbar-static-top{z-index:9995}.page-header.navbar .page-logo{float:left;display:block;width:235px;height:46px;padding-left:20px;padding-right:20px}.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .page-logo{padding:0}.page-header.navbar .page-logo>.logo-image,.page-header.navbar .page-logo>a{display:inline-block;float:left}.page-header.navbar .page-logo .logo-default{margin:16px 0 0}.page-header.navbar .page-logo .logo-mini{display:none;margin-left:5px}.page-header.navbar .page-logo .text-logo{padding-left:20px;padding-top:12px}.page-header.navbar .search-form{display:inline-block;width:46px;position:relative;float:left;transition:all .6s}.page-header.navbar .search-form .input-group .form-control{height:46px;border:0;background:0 0!important;font-size:13px;padding-left:0;margin-left:12px;text-indent:-150000px}.page-header.navbar .search-form .input-group .form-control:hover{cursor:pointer}.page-header.navbar .search-form .input-group .input-group-btn{height:46px}.page-header.navbar .search-form .input-group .input-group-btn .btn.submit{margin-left:-24px;padding:0;width:46px;background:0 0;margin-top:4px;display:block}.page-header.navbar .search-form .input-group .input-group-btn .btn.submit>i{font-size:15px}.page-header.navbar .search-form.open{transition:all .6s;width:300px!important}.page-header.navbar .search-form.open .input-group .form-control{text-indent:0}.page-header.navbar .search-form.open .input-group .form-control:hover{cursor:text}.page-header.navbar .search-form.open .input-group .input-group-btn .btn.submit{margin-left:0}.page-header.navbar .menu-toggler{display:block;cursor:pointer;opacity:.7;filter:alpha(opacity=70);width:24px;height:24px;background-repeat:no-repeat;background-position:center center}.page-header.navbar .menu-toggler:hover,.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a:hover{opacity:1;filter:alpha(opacity=100)}.page-header.navbar .menu-toggler.sidebar-toggler{float:right;margin:11px 0 0}.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .menu-toggler.sidebar-toggler{margin-right:10.5px}.page-header.navbar .menu-toggler.responsive-toggler{display:none;float:right;margin:11px 6px 0}.page-header.navbar .top-menu{margin:0;padding:0;float:right}.page-header.navbar .top-menu .navbar-nav{padding:0;margin-right:20px;display:block}.page-header.navbar .top-menu .navbar-nav>li.dropdown{margin:0;padding:0 4px;height:46px;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown:last-child{padding-right:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle{margin:0;padding:17px 10px 9px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle:last-child{padding-right:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle>i{font-size:17px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle>i.glyphicon{font-size:16px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle>.badge{font-family:"Open Sans",sans-serif;position:absolute;top:10px;right:20px;font-weight:300px;padding:3px 6px}.page-header.navbar .top-menu .navbar-nav>li.dropdown>.dropdown-toggle:focus{background:0 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu{margin-top:3px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu:before{position:absolute;top:-7px;right:9px;display:inline-block!important;border-right:7px solid transparent;border-bottom:7px solid #eee;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu:after{position:absolute;top:-6px;right:10px;display:inline-block!important;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-menu>li>a{color:#555}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu{min-width:160px;max-width:275px;width:275px;z-index:9995}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external{display:block;overflow:hidden;padding:15px;letter-spacing:.5px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>h3{margin:0;padding:0;float:left;font-size:13px;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu>li.external>a{display:inline-block;padding:0;background:0 0;clear:inherit;font-size:13px;font-weight:300;position:absolute;right:10px;border:0;margin-top:-1px}.page-bar:after,.page-container:after,.page-footer:after,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object:after,.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper:after{clear:both}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list{padding-right:0!important;padding-left:0;list-style:none}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li>a{display:block;clear:both;font-weight:300;line-height:20px;white-space:normal;font-size:13px;padding:16px 15px 18px;text-shadow:none}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended .dropdown-menu .dropdown-menu-list>li:first-child a{border-top:none}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details{overflow:hidden}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details .label-icon{margin-right:10px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details .label-icon i{margin-right:2px;margin-left:1px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .details .label-icon .badge{right:15px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu .dropdown-menu-list>li a .time{float:right;max-width:75px;font-size:11px;font-weight:400;opacity:.7;filter:alpha(opacity=70);text-align:right;padding:1px 5px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .photo{float:left;margin:0 6px 6px 0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .photo img{height:40px;width:40px;-webkit-border-radius:50%!important;-moz-border-radius:50%!important;-ms-border-radius:50%!important;-o-border-radius:50%!important;border-radius:50%!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .subject{display:block;margin-left:46px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .subject .from{font-size:13px;font-weight:600}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .subject .time{font-size:12px;font-weight:400;opacity:.5;filter:alpha(opacity=50);float:right}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox>.dropdown-menu .dropdown-menu-list>li .message{display:block!important;font-size:12px;line-height:1.3;margin-left:46px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .task{margin-bottom:5px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .task .desc{font-size:13px;font-weight:300}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .task .percent{float:right;font-weight:600;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu .dropdown-menu-list>li .progress{display:block;height:8px;margin:8px 0 2px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{padding:14px 6px 12px 8px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle>.username{display:inline-block;font-size:13px;font-weight:300}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle>img{float:left;margin-top:-5px;margin-right:5px;height:29px;display:inline-block}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle>i{display:inline-block;margin:0;font-size:13px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu{width:175px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu>li>a{font-size:14px;font-weight:300}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu>li>a i{width:15px;display:inline-block;margin-right:9px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-menu>li>a .badge{margin-right:10px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language{padding-left:0;padding-right:0;margin:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle{padding:14px 3px 12px 7px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle>img{margin-bottom:2px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-toggle>i{font-size:14px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-menu>li>a{font-size:13px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language>.dropdown-menu>li>a>img{margin-bottom:2px;margin-right:5px}.page-header.navbar .top-menu .navbar-nav li.dropdown-dark .dropdown-menu:before{border-left:none;border-right:none}.page-header.navbar .top-menu .navbar-nav li.dropdown-dark .dropdown-menu .dropdown-menu-list>li.external a{background:0 0!important;border:none!important}@media (min-width:768px){.page-header.navbar .search-form.search-form-expanded{width:200px}.page-header.navbar .search-form.search-form-expanded .input-group .form-control{text-indent:0}.page-header.navbar .search-form.search-form-expanded .input-group .form-control:hover{cursor:text}.page-header.navbar .search-form.search-form-expanded .input-group .input-group-btn .btn.submit{margin-left:0}}.page-header.navbar .container{position:relative}.page-header.navbar .hor-menu .navbar-nav,.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown{position:static}.page-header.navbar .hor-menu{margin:0;float:left}.page-header.navbar .hor-menu .navbar-nav.navbar-right .dropdown-menu{left:auto;right:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu{left:auto;width:auto}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content{font-family:"Open Sans",sans-serif;padding:15px;margin:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content.mega-menu-responsive-content{padding:10px 18px 10px 45px}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu{padding:0;margin:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu:last-child{border-right:0}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li{padding:1px!important;margin:0!important;list-style:none}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>h3{margin-top:5px;padding-left:6px;font-size:15px;font-weight:400}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a{white-space:normal;font-family:"Open Sans",sans-serif;padding:7px;margin:0;font-size:14px;font-weight:300}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a.iconify{padding:7px 7px 7px 30px}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a.iconify>i{position:absolute;top:auto!important;margin-left:-24px;font-size:15px;margin-top:3px!important}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a .badge,.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown>.dropdown-menu .mega-menu-content .mega-menu-submenu li>a .label{margin-left:5px}.page-header.navbar .hor-menu .navbar-nav>li.mega-menu-dropdown.mega-menu-full .dropdown-menu{left:20px;right:20px}.page-header.navbar .hor-menu .navbar-nav>li.menu-dropdown .dropdown-menu:after,.page-header.navbar .hor-menu .navbar-nav>li.menu-dropdown .dropdown-menu:before{display:none!important}.page-header.navbar .hor-menu .navbar-nav>li>a{font-size:14px;font-weight:400;padding:13px}.page-header.navbar .hor-menu .navbar-nav>li>a:focus{background:0 0!important}.page-header.navbar .hor-menu .navbar-nav>li.active .selected,.page-header.navbar .hor-menu .navbar-nav>li.current .selected{left:50%;bottom:0;position:absolute;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid transparent;display:inline-block;margin:0 0 -6px -7px;width:0;height:0}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu{margin-top:0;border:none}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a{font-family:"Open Sans",sans-serif;font-size:14px;font-weight:300;padding:9px 10px;white-space:normal}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a .badge,.page-header.navbar .hor-menu .navbar-nav>li .dropdown-menu li>a .label{font-weight:300}.page-header.navbar .hor-menu .navbar-nav>li.classic-menu-dropdown .dropdown-menu{min-width:195px;max-width:235px}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-submenu>.dropdown-menu{top:0}.page-header.navbar .hor-menu .navbar-nav>li .dropdown-submenu>a:after{top:9px;right:10px}@media (min-width:992px) and (max-width:1200px){.page-boxed .page-header.navbar .top-menu .navbar-nav>li.dropdown-language .dropdown-toggle .langname,.page-boxed .page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle .username.username-hide-on-mobile{display:none}}@media (min-width:992px){.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .page-logo{padding:0;width:45px}.page-sidebar-closed.page-sidebar-closed-hide-logo .page-header.navbar .page-logo .logo-default{display:none}.page-boxed .page-header.navbar .page-logo{width:236px}.page-boxed .page-header.navbar .top-menu .navbar-nav{margin-right:0}.page-sidebar-closed.page-sidebar-closed-hide-logo.page-boxed .page-header.navbar .page-logo{width:46px}.page-boxed.page-sidebar-fixed .page-header.navbar .page-logo{width:235px}}@media (max-width:991px){.page-header.navbar{padding:0 20px;position:relative;clear:both}.page-header.navbar .page-logo{width:auto;padding:0;margin-right:10px;margin-left:0!important;padding-left:0!important}.page-header.navbar .page-logo img{margin-left:4px!important}.page-header.navbar .menu-toggler.sidebar-toggler{display:none!important}.page-header.navbar .menu-toggler.responsive-toggler{display:inline-block}.page-header.navbar .top-menu .navbar-nav{display:inline-block;margin:0 10px 0 0}.page-header.navbar .top-menu .navbar-nav>li{float:left}.page-header.navbar .top-menu .navbar-nav .nav li.dropdown i{display:inline-block;position:relative;top:1px;right:0}.page-header.navbar .top-menu .navbar-nav .open .dropdown-menu{position:absolute}.page-header-fixed.page-header-fixed-mobile .navbar-fixed-top{position:fixed}.page-boxed .page-header.navbar>.container{max-width:none!important;margin:0!important;padding:0!important}}@media (min-width:768px) and (max-width:991px){.page-boxed .page-header.navbar{margin:auto!important;padding:0}.page-boxed .page-header.navbar>.container{margin:auto!important}}@media (max-width:767px){.page-header.navbar{padding:0 10px}.page-header.navbar .page-logo{width:auto}.page-header.navbar .search-form.open{z-index:3;left:10px;right:10px;position:absolute;width:auto!important}.page-header.navbar .top-menu .navbar-nav>li.dropdown-extended>.dropdown-menu{max-width:255px;width:255px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu{margin-right:-190px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu:after,.page-header.navbar .top-menu .navbar-nav>li.dropdown-notification .dropdown-menu:before{margin-right:190px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu{margin-right:-150px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu:after,.page-header.navbar .top-menu .navbar-nav>li.dropdown-inbox .dropdown-menu:before{margin-right:150px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu{margin-right:-110px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu:after,.page-header.navbar .top-menu .navbar-nav>li.dropdown-tasks .dropdown-menu:before{margin-right:110px}}@media (max-width:580px){.page-header.navbar .top-menu .navbar-nav>li.dropdown-language .dropdown-toggle .langname,.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle .username.username-hide-on-mobile{display:none}}@media (max-width:480px){.page-header-fixed.page-header-fixed-mobile .page-header.navbar{height:92px}.page-header.navbar .top-menu{display:block;clear:both}.page-header.navbar .top-menu .navbar-nav{margin-right:0}.page-header.navbar .top-menu .navbar-nav>li.dropdown .dropdown-toggle{padding:17px 6px 9px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-language .dropdown-toggle{padding:14px 4px 12px 2px}.page-header.navbar .top-menu .navbar-nav>li.dropdown-user .dropdown-toggle{padding:14px 0 12px 2px}}.pace .pace-progress{z-index:10000;top:44px;height:2px}.pace .pace-activity{top:48px;right:22px;border-radius:10px!important}.page-container{margin:0;padding:0;position:relative}.page-container:after,.page-container:before{content:" ";display:table}.page-header-fixed .page-container{margin-top:46px}.page-footer-fixed.page-footer-fixed-mobile .page-container{margin-bottom:20px!important}@media (min-width:992px){.page-footer-fixed .page-container{margin-bottom:20px!important}}@media (max-width:991px){.page-container{margin:0!important;padding:0!important}.page-header-fixed.page-header-fixed-mobile .page-container{margin-top:46px!important}}@media (max-width:480px){.page-header-fixed .pace .pace-progress{top:92px}.page-header-fixed .pace .pace-activity{top:188px;right:15px}.page-header-fixed.page-header-fixed-mobile .page-container{margin-top:92px!important}}.ie8 .page-sidebar{width:235px;float:left;position:relative;margin-right:-100%}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover.navbar-collapse,.page-sidebar.navbar-collapse{padding:0;box-shadow:none}.page-sidebar .page-sidebar-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu{list-style:none;margin:0;padding:0}.page-sidebar .page-sidebar-menu>li,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li{display:block;margin:0;padding:0;border:0}.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper{border:0!important}.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar .page-sidebar-menu>li.sidebar-search-wrapper:before,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper:after,.page-sidebar .page-sidebar-menu>li.sidebar-toggler-wrapper:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-search-wrapper:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper:after,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.sidebar-toggler-wrapper:before{content:" ";display:table}.page-sidebar .page-sidebar-menu>li.start>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.start>a{border-top-color:transparent!important}.page-sidebar .page-sidebar-menu>li.last>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.last>a{border-bottom-color:transparent!important}.page-sidebar .page-sidebar-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{display:block;position:relative;margin:0;border:0;padding:10px 15px;text-decoration:none;font-size:14px;font-weight:300}.page-sidebar .page-sidebar-menu>li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i{font-size:16px;margin-right:5px;text-shadow:none}.page-sidebar .page-sidebar-menu>li>a>i.glyphicon,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>i.glyphicon{top:3px;margin-left:1px;margin-right:4px}.page-sidebar .page-sidebar-menu>li>a>[class^=icon-],.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a>[class^=icon-]{top:2px;margin-left:1px;margin-right:4px}.page-sidebar-fixed .page-sidebar .page-sidebar-menu>li>a,.page-sidebar-fixed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{transition:all .2s ease}.page-sidebar-reversed.page-sidebar-fixed .page-sidebar .page-sidebar-menu>li>a,.page-sidebar-reversed.page-sidebar-fixed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li>a{transition:none}.page-sidebar .page-sidebar-menu>li.heading,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading{padding:15px}.page-sidebar .page-sidebar-menu>li.heading>h3,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading>h3{margin:0;padding:0;font-size:14px;font-weight:300}.page-sidebar .page-sidebar-menu>li.heading+li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.heading+li>a{border-top:0}.page-sidebar .page-sidebar-menu>li.open>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.open>a{font-size:14px}.page-sidebar .page-sidebar-menu>li.active>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a{border:none;text-shadow:none;font-size:14px}.page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{display:block;float:right;position:absolute;right:0;top:8px;background:0 0;width:0;height:0;border-top:12px solid transparent;border-bottom:12px solid transparent;border-right:12px solid #fff}.page-sidebar-reversed .page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-sidebar-reversed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{right:auto;left:0;border-right:0;border-left:8px solid #fff}.page-container-bg-solid .page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-container-bg-solid .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{border-color:transparent #F1F3FA transparent transparent}.page-container-bg-solid.page-sidebar-reversed .page-sidebar .page-sidebar-menu>li.active>a>.selected,.page-container-bg-solid.page-sidebar-reversed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu>li.active>a>.selected{border-color:transparent transparent transparent #F1F3FA}.page-sidebar .page-sidebar-menu li>a>.arrow:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow:before{float:right;width:10px;text-align:center;margin-top:-1px;margin-right:5px;margin-left:5px;display:inline;font-size:16px;font-family:FontAwesome;height:auto;content:"\f104";font-weight:300;text-shadow:none}.page-sidebar .page-sidebar-menu li>a>.arrow.open:before,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.arrow.open:before{content:"\f107"}.page-sidebar .page-sidebar-menu li>a>.badge,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li>a>.badge{float:right;margin-top:1px;margin-right:0}.page-sidebar .page-sidebar-menu .sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu{list-style:none;display:none;padding:0;margin:8px 0}.page-sidebar .page-sidebar-menu .sub-menu li,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li{background:0 0;margin:0;padding:0;margin-top:1px!important}.page-sidebar .page-sidebar-menu .sub-menu li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>a{display:block;margin:0;padding:6px 15px 6px 43px;text-decoration:none;font-size:14px;font-weight:300;background:0 0}.page-sidebar .page-sidebar-menu .sub-menu li>a>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>a>i{font-size:14px}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu{margin:0}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu>li>a{padding-left:60px}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu{margin:0}.page-sidebar .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .sub-menu li>.sub-menu>li>.sub-menu>li>a{padding-left:80px}.page-sidebar .page-sidebar-menu li.active>.sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu li.active>.sub-menu{display:block}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li>a{border:0;margin:0;padding-left:11px;border-left:4px solid transparent}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu{margin:0;padding:1px 0}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li>a,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li>a{padding-top:8px;padding-bottom:8px}.page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li:first-child,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li .sub-menu li:first-child{margin-top:0!important}.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-light>li>a,.page-sidebar-reversed .page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu.page-sidebar-menu-light>li>a{padding-left:15px;padding-right:11px;border-left:0;border-right:4px solid transparent}.page-sidebar .sidebar-toggler,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-toggler{display:block;cursor:pointer;opacity:.7;filter:alpha(opacity=70);width:30px;height:27px;margin-top:15px;margin-right:19px;float:right;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar .sidebar-toggler:hover,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-toggler:hover{filter:alpha(opacity=100);opacity:1}.page-sidebar .sidebar-search,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search{padding:0;margin:22px 18px}.page-sidebar .sidebar-search .remove,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .remove{display:none}.page-sidebar .sidebar-search .remove>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .remove>i{font-size:16px}.page-sidebar .sidebar-search .input-group,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar .sidebar-search .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .form-control{border:0;font-size:14px;padding:0;height:auto;line-height:auto;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar .sidebar-search .input-group .input-group-btn .btn,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .input-group-btn .btn{padding:2px 0 0;background-color:transparent;background-repeat:no-repeat;background-position:100% 3px}.page-sidebar .sidebar-search .input-group .input-group-btn .btn>i,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search .input-group .input-group-btn .btn>i{font-size:15px}.page-sidebar .sidebar-search.sidebar-search-bordered,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered{margin:25px 18px}.page-sidebar .sidebar-search.sidebar-search-bordered .input-group .form-control,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered .input-group .form-control{font-size:13px;padding:6px 8px}.page-sidebar .sidebar-search.sidebar-search-bordered .input-group .input-group-btn .btn,.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .sidebar-search.sidebar-search-bordered .input-group .input-group-btn .btn{margin-right:6px}@media (min-width:992px){.page-full-width .page-sidebar,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.open>.sub-menu,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>.sub-menu{display:none!important}.page-sidebar{width:235px;float:left;position:relative;margin-right:-100%}.page-sidebar.navbar-collapse{max-height:none!important}.page-sidebar-reversed .page-sidebar{float:right;margin-right:0;margin-left:-100%}.page-sidebar-reversed.page-sidebar-fixed .page-sidebar{margin-left:-235px}.page-sidebar-reversed.page-sidebar-fixed .page-sidebar-wrapper{position:relative;float:right}.page-sidebar-fixed .page-sidebar{position:fixed!important;margin-left:0;top:46px}.page-sidebar-fixed .page-sidebar-menu>li.last{margin-bottom:15px!important}.page-sidebar-closed .page-sidebar,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed{width:45px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover{width:256px!important;position:relative!important;z-index:10000;display:block!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;-ms-border-radius:0 4px 0 0;-o-border-radius:0 4px 0 0;border-radius:0 4px 0 0}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>i{margin-right:10px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.title{display:inline!important;padding-left:15px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.badge{display:block!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.selected{display:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover.heading{width:45px!important;box-shadow:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu{width:210px;position:absolute;z-index:2000;left:46px;margin-top:0;top:100%;display:block!important;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu>li>a{padding-left:15px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu>li>.sub-menu>li>a{padding-left:30px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>.sub-menu>li>.sub-menu>li>.sub-menu>li>a{padding-left:45px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.heading>h3{display:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-toggler-wrapper .sidebar-toggler{margin-right:8px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-search-wrapper:hover,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-toggler-wrapper:hover{width:45px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a{padding-left:11px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a .selected{right:-3px!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a>.arrow,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a>.badge,.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>a>.title{display:none!important}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-toggler{margin-left:3px;margin-right:3px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search .input-group{border-color:transparent;margin-left:-4px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search .input-group .form-control{display:none}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search .input-group .input-group-btn .btn{display:block}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.sidebar-search-bordered .input-group{padding:5px 0 3px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open{height:39px;margin-top:14px;margin-bottom:14px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group{width:210px;position:relative;z-index:1;margin-left:24px;padding:0}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group .form-control{background:0 0;border:0;display:block;padding:8px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group .input-group-btn .btn{display:block;margin-right:8px;margin-top:1px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .remove{background-repeat:no-repeat;width:11px;height:11px;margin:9px -5px 9px -7px;display:block;float:left}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open.sidebar-search-bordered{height:36px;margin-top:23px;margin-bottom:23px}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open.sidebar-search-bordered .input-group{padding:0}.page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-closed>li>a{padding-right:11px;padding-left:7px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar{margin-left:-45px;width:45px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li>.sub-menu{left:auto;right:46px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover{margin-left:-211px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a{-webkit-border-radius:4px 0 0;-moz-border-radius:4px 0 0;-ms-border-radius:4px 0 0 0;-o-border-radius:4px 0 0;border-radius:4px 0 0}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>.title{padding-left:0;padding-right:15px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li:hover>a>i{margin-right:0;margin-left:2px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-search-wrapper:hover,.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed>li.sidebar-toggler-wrapper:hover{margin-left:0}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group{margin-left:-227px}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .input-group .input-group-btn .btn{margin-right:10px!important}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed .sidebar-search.open .remove{margin:9px 4px 12px -16px!important;float:right!important}.page-sidebar-closed.page-sidebar-reversed .page-sidebar .page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-closed>li>a{padding-right:7px;padding-left:11px}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover{width:235px!important;display:absolute;z-index:10000}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu{width:235px!important}.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover .page-sidebar-menu .selected{display:none!important}.page-sidebar-closed.page-sidebar-fixed.page-sidebar-reversed .page-sidebar:hover{width:235px!important;display:absolute;z-index:10000;margin-left:-235px!important}.page-sidebar-closed.page-sidebar-fixed.page-sidebar-reversed .page-sidebar:hover .page-sidebar-menu{width:235px!important}.page-sidebar-closed.page-sidebar-hide .page-sidebar{display:none!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu li .sub-menu{display:none;width:210px;z-index:2000;position:absolute;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-sidebar-menu.page-sidebar-menu-hover-submenu li .sub-menu>li>a{margin:3px}.page-sidebar-menu.page-sidebar-menu-hover-submenu li.active .sub-menu,.page-sidebar-menu.page-sidebar-menu-hover-submenu li.open .sub-menu{display:none!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu li a>.arrow{display:none}.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow{display:block;float:right;position:absolute;right:0;margin-top:-20px;background:0 0;width:0;height:0;border-style:solid;border-top:12px double transparent;border-bottom:12px double transparent;border-left:0}.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow:after,.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow:before{display:none}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>a>.arrow{right:auto;left:0;border-right:0}.page-sidebar-menu.page-sidebar-menu-hover-submenu li:hover>.sub-menu{display:inline-block!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>a>.arrow{z-index:1;right:0;margin-top:-23px}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>a>.selected{display:none}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{margin-left:235px;margin-top:-40px}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{margin-left:-210px!important}.page-sidebar-closed .page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu{margin-left:0}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li>a{padding-left:15px}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li .sub-menu{margin-left:210px;margin-top:-38px!important}.page-sidebar-reversed .page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li .sub-menu{margin-left:-210px!important}.page-sidebar-menu.page-sidebar-menu-hover-submenu>li:hover>.sub-menu>li .sub-menu>li>a{padding-left:10px;padding-right:10px}.page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-hover-submenu li:hover>.sub-menu,.page-sidebar-menu.page-sidebar-menu-light.page-sidebar-menu-hover-submenu li:hover>.sub-menu>li>.sub-menu{margin-top:-41px}}@media (max-width:991px){.page-sidebar,.page-sidebar.navbar-collapse.in{border-top:0!important;margin:20px}.page-sidebar .sidebar-toggler{display:none}.page-sidebar .selected,.page-sidebar.navbar-collapse.collapse{display:none!important}.page-sidebar.navbar-collapse{max-height:none}.page-sidebar.navbar-collapse.in{position:relative;overflow:hidden!important;overflow-y:auto!important;display:block!important}.page-sidebar.navbar-collapse.navbar-no-scroll{max-height:none!important}.page-sidebar .mega-menu-responsive-content{padding:10px 18px 10px 45px}.page-full-width .page-sidebar-menu{display:block}}@media (min-width:768px) and (max-width:991px){.page-sidebar .btn-navbar.collapsed .arrow{display:none}.page-sidebar .btn-navbar .arrow{position:absolute;right:25px;width:0;height:0;top:50px;border-bottom:15px solid #5f646b;border-left:15px solid transparent;border-right:15px solid transparent}}.page-header .top-menu .dropdown-quick-sidebar-toggler>.dropdown-toggle{padding:17px 10px 9px!important}.page-header .top-menu .dropdown-quick-sidebar-toggler>.dropdown-toggle i{top:0}.page-quick-sidebar-open .page-header .top-menu .dropdown-quick-sidebar-toggler>.dropdown-toggle i:before{content:"\e066"}.page-quick-sidebar-wrapper{transition:right .3s;z-index:9994;position:fixed;top:46px;bottom:0;right:-270px;width:270px;overflow:hidden}.page-quick-sidebar-wrapper.phonebar{top:0}.page-footer-fixed .page-quick-sidebar-wrapper{bottom:33px}.page-quick-sidebar-full-height .page-quick-sidebar-wrapper{top:0;bottom:0}.page-quick-sidebar-open .page-quick-sidebar-wrapper{transition:right .3s;right:0}.page-quick-sidebar-toggler{overflow:hidden;z-index:9994;display:none;width:28px;height:27px;position:fixed;top:19px;right:15px;text-align:center;padding-top:6px}.page-quick-sidebar-open .page-quick-sidebar-toggler{display:inline-block}.page-quick-sidebar-toggler>i{font-size:17px}@media (max-width:480px){.page-sidebar,.page-sidebar.in{margin:0 10px 10px!important}.page-header-fixed.page-header-fixed-mobile .page-sidebar,.page-header-fixed.page-header-fixed-mobile .page-sidebar.in{margin-top:10px!important}.page-quick-sidebar-wrapper{top:92px}.page-quick-sidebar-toggler{top:65px}}.page-content-wrapper,.page-footer,.page-header,.page-sidebar-wrapper{transition:margin .3s}.page-quick-sidebar-open.page-quick-sidebar-push-content .page-content-wrapper,.page-quick-sidebar-open.page-quick-sidebar-push-content .page-sidebar-wrapper{transition:margin-left .3s;margin-left:-270px}.page-quick-sidebar-open.page-quick-sidebar-push-content .page-footer{transition:margin-right .3s;margin-right:270px;margin-left:-270px}.page-sidebar-reversed.page-quick-sidebar-open.page-quick-sidebar-push-content .page-sidebar-wrapper{transition:margin-right .3s;margin-right:270px}.page-quick-sidebar-open.page-quick-sidebar-push-content.page-quick-sidebar-full-height .page-header{transition:margin-left .3s;margin-left:-270px}.page-quick-sidebar-open.page-quick-sidebar-push-content.page-footer-fixed:not(.page-quick-sidebar-full-height) .page-footer{margin-left:0;margin-right:0}.page-quick-sidebar-open.page-quick-sidebar-over-content-transparent .page-quick-sidebar-wrapper{opacity:.9;filter:alpha(opacity=90)}@media (max-width:991px){.page-quick-sidebar-open.page-quick-sidebar-push-content .page-sidebar-wrapper{display:none}}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified{margin:0;padding:0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li{display:table-cell!important;width:1%!important}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a{padding:15px;border:0;height:46px;font-size:13px;text-transform:uppercase;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a>.badge{position:absolute;top:12px;right:3px}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li>a:hover{border:0}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu{margin-top:8px;margin-right:20px}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:before{position:absolute;top:-7px;right:19px;display:inline-block!important;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>li .dropdown-menu:after{position:absolute;top:-6px;right:20px;display:inline-block!important;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.page-quick-sidebar-wrapper .page-quick-sidebar .nav-justified>.tab-content{margin:0;padding:0}.page-quick-sidebar-wrapper .page-quick-sidebar .list-heading{font-size:16px;margin:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items{margin:0;padding:0;list-style:none}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li{margin:0;padding:10px;background:0 0;border-bottom-width:1px;border-bottom-style:solid}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items>li:last-child{border-bottom:0}.page-quick-sidebar-wrapper .page-quick-sidebar .list-items.borderless li{border:0}.page-quick-sidebar-wrapper .page-quick-sidebar .inner-content{margin:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-list{position:absolute!important;width:270px!important;transition:margin .3s}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item{position:absolute!important;width:270px!important;transition:margin .3s;margin-left:270px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item .page-quick-sidebar-nav{padding:0 10px 5px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item .page-quick-sidebar-nav .page-quick-sidebar-back-to-list{vertical-align:middle;display:inline-block;font-size:14px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-item .page-quick-sidebar-nav .page-quick-sidebar-back-to-list>i{font-size:17px;line-height:17px;vertical-align:top;margin-right:3px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-list{transition:margin .3s;margin-left:-270px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-list .slimScrollBar,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-list .slimScrollRail{display:none!important}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-content-item-shown .page-quick-sidebar-item{transition:margin .3s;margin-left:0}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users{padding:10px 0;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media{padding:12px 10px 11px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object{border-radius:50%!important;width:38.57px;opacity:.8;filter:alpha(opacity=80);float:left;margin-right:10px}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search{padding:0;margin:10px 22px}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group .form-control{border:0;font-size:14px;padding:0;height:auto}.page-quick-sidebar-wrapper .page-quick-sidebar-chat .page-quick-sidebar-chat-users .quicksidebar-search .input-group .input-group-btn .btn{padding:2px 0 0;background-color:transparent;background-repeat:no-repeat;background-position:100% 3px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object:after,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-object:before{content:" ";display:table}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media:hover{cursor:pointer}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media:hover .media-object{opacity:1;filter:alpha(opacity=100)}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading{margin:5px 0 0;font-size:14px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-sub{font-size:11px;text-transform:uppercase}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-body .media-heading-small{font-size:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-users .media-list .media .media-status{margin-top:10px;right:10px;position:absolute;display:inline-block}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages{padding:0 10px;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post{transition:display .3s;padding:5px 0;margin:10px auto;font-size:12px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .body{display:block;word-wrap:break-word}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .avatar{width:38.57px;border-radius:50%!important}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .avatar{float:left;margin-right:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .avatar{float:right;margin-left:10px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .name{font-size:12px;font-weight:300}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .datetime{font-size:12px;font-weight:300;text-style:italic}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post .message{display:block;padding:5px;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .message{text-align:left;margin-left:55px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.in .message .arrow{display:block;position:absolute;top:9px;left:-6px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right-width:6px;border-right-style:solid}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .message{margin-right:55px;text-align:right}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .message .arrow{display:block;position:absolute;top:9px;right:-6px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left-width:6px;border-left-style:solid}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .datetime,.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-messages .post.out .name{text-align:right}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-form{padding:20px 10px 15px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-chat .page-quick-sidebar-chat-user .page-quick-sidebar-chat-user-form .input-group .form-control{font-size:13px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list{padding:10px 0;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .label{margin-top:5px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-alerts .page-quick-sidebar-alerts-list .feeds li .desc{padding:0}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list{padding:10px 0;position:relative}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list .list-items li .bootstrap-switch{margin-top:-3px;float:right;border:0;min-width:59px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list .list-items li .form-control{width:75px!important;padding:4px!important;float:right;border:0;margin-top:-4px}.page-quick-sidebar-wrapper .page-quick-sidebar .page-quick-sidebar-settings .page-quick-sidebar-settings-list .list-items li select.form-control{padding:4px 0!important}.page-title{padding:0;font-size:28px;letter-spacing:-1px;display:block;color:#666;margin:0 0 15px;font-weight:300;font-family:"Open Sans",sans-serif}.page-title small{font-size:14px;letter-spacing:0;font-weight:300;color:#888}.page-container-bg-solid .page-title{color:#666;margin-bottom:20px;margin-top:20px}.page-container-bg-solid .page-title small{color:#666}.page-bar{padding:0;background-color:#f7f7f7;margin-bottom:25px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.page-bar:after,.page-bar:before{content:" ";display:table}.page-bar .page-breadcrumb{display:inline-block;float:left;padding:8px;margin:0;list-style:none}.page-bar .page-breadcrumb>li{display:inline-block}.ie8 .page-bar .page-breadcrumb>li{margin-right:1px}.page-bar .page-breadcrumb>li>a,.page-bar .page-breadcrumb>li>span{color:#888;font-size:14px;text-shadow:none}.page-bar .page-breadcrumb>li>i{color:#aaa;font-size:14px;text-shadow:none}.page-bar .page-breadcrumb>li>i[class*=icon-],.page-bar .page-breadcrumb>li>i[class^=icon-]{color:gray}.page-bar .page-toolbar{display:inline-block;float:right;padding:0}.page-bar .page-toolbar .btn-fit-height{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;padding-top:8px;padding-bottom:8px}.page-container-bg-solid .page-bar{position:relative;padding:0 20px;background-color:#fff;margin:-25px -20px 0}.page-container-bg-solid .page-bar .page-breadcrumb{padding:11px 0}.page-container-bg-solid .page-bar .page-breadcrumb>li>a,.page-container-bg-solid .page-bar .page-breadcrumb>li>span{color:#888}.page-container-bg-solid .page-bar .page-breadcrumb>li>i{color:#aaa}.page-container-bg-solid .page-bar .page-breadcrumb>li>i[class*=icon-],.page-container-bg-solid .page-bar .page-breadcrumb>li>i[class^=icon-]{color:#8c8c8c}.page-container-bg-solid .page-bar .page-toolbar{padding:6px 0}.page-container-bg-solid .page-bar .page-toolbar .btn{margin-top:-2px}.page-container-bg-solid .page-bar .page-toolbar .btn.btn-sm{margin-top:0}.page-content{margin-top:0;padding:0;background-color:#fff}.page-container-bg-solid .page-content{background:#F1F3FA}.page-full-width .page-content{margin-left:0!important}@media (min-width:992px){.page-content-wrapper{float:left;width:100%}.page-content-wrapper .page-content{margin-left:235px;margin-top:0;min-height:600px;padding:25px 20px 10px}.page-content-wrapper .page-content.no-min-height{min-height:auto}.page-sidebar-fixed.page-sidebar-hover-on .page-content-wrapper .page-content{margin-left:45px}.page-sidebar-reversed .page-content-wrapper .page-content{margin-left:0!important;margin-right:235px!important}.page-sidebar-reversed.page-sidebar-fixed.page-sidebar-hover-on .page-content-wrapper .page-content{margin-left:0;margin-right:45px}.page-sidebar-reversed.page-sidebar-closed .page-content-wrapper .page-content{margin-left:0!important;margin-right:45px!important}.page-sidebar-closed .page-content-wrapper .page-content{margin-left:45px!important}.page-full-width .page-content-wrapper .page-content,.page-sidebar-closed.page-sidebar-hide .page-content-wrapper .page-content{margin-left:0!important}.page-sidebar-closed.page-sidebar-reversed.page-sidebar-hide .page-content-wrapper .page-content{margin-right:0!important}}@media (max-width:991px){.page-container-bg-solid .page-bar{margin-top:-20px}.page-boxed>.container{max-width:none!important;margin:0!important;padding:0!important}.page-content-wrapper .page-content{margin:0!important;padding:20px!important;min-height:280px}}@media (min-width:768px) and (max-width:991px){.page-boxed>.container{margin:auto!important}}@media (max-width:767px){.page-content-wrapper .page-content{padding:20px 10px 10px!important;overflow:hidden}.page-content-wrapper .page-content .page-title{margin-bottom:20px;font-size:18px}.page-content-wrapper .page-content .page-title small{font-size:13px;padding-top:3px}}@media (max-width:480px){.page-content-wrapper .page-content .page-title small{display:block;clear:both}}.page-footer{padding:8px 20px 5px;font-size:12px;height:33px}.page-footer:after,.page-footer:before{content:" ";display:table}.page-footer .page-footer-inner{float:left;display:inline-block}.page-footer-fixed.page-footer-fixed-mobile .page-footer{position:fixed;left:0;right:0;z-index:10000;bottom:0}.page-footer-fixed.page-footer-fixed-mobile.page-sidebar-fixed .page-footer{margin-left:0!important}@media (min-width:992px){.page-footer{clear:left}.page-footer-fixed .page-footer{position:fixed;left:0;right:0;z-index:10000;bottom:0}.page-sidebar-fixed.page-sidebar-closed .page-footer{margin-left:45px}.page-sidebar-fixed.page-footer-fixed .page-footer{margin-left:0!important}.page-sidebar-fixed .page-footer{margin-left:235px;padding:8px 20px 5px}.page-boxed .page-footer{padding:8px 0 5px}.page-boxed.page-sidebar-fixed .page-footer{padding-right:20px;padding-left:20px}.page-sidebar-reversed.page-sidebar-fixed .page-footer{margin-left:0;margin-right:235px;padding:8px 20px 5px}.page-sidebar-reversed.page-sidebar-fixed.page-footer-fixed .page-footer{margin-left:0;margin-right:0}.page-sidebar-reversed.page-sidebar-fixed.page-sidebar-closed .page-footer{margin-right:45px}}#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,.aside .aside-dialog .aside-footer:after,.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.container-fluid:after,.container:after,.dataTable,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after,.scroller-footer:after,.ui-grid-clearfix:after,.ui-grid-footer-canvas:after,.ui-grid-header-canvas:after{clear:both}@media (max-width:991px){.page-boxed .page-footer{padding-left:0;padding-right:0}}@media (max-width:767px){.page-boxed .page-footer,.page-footer{padding-left:10px;padding-right:10px}.page-footer-fixed .page-footer .container{padding-left:0;padding-right:0}}.scroll-to-top{padding:1px;text-align:center;position:fixed;bottom:10px;z-index:10001;display:none;right:10px}.theme-panel>.toggler,.theme-panel>.toggler-close{padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;top:4px;cursor:pointer}.scroll-to-top>i{display:inline-block;color:#687991;font-size:30px;opacity:.6;filter:alpha(opacity=60)}.scroll-to-top:hover{cursor:pointer}.scroll-to-top:hover>i{opacity:1;filter:alpha(opacity=100)}@media (min-width:992px){.scroll-to-top{right:20px}}@media (max-width:991px){.scroll-to-top{bottom:10px;right:10px}.scroll-to-top>i{font-size:28px}}.theme-panel{width:420px;margin-top:-13px;margin-right:0;z-index:100;float:right;position:relative}.theme-panel>.toggler{right:0;position:absolute;background:url(../img/icon-color.png) center no-repeat #d5dade;border-radius:4px}.theme-panel>.toggler:hover{background-color:#3d3d3d!important}.theme-panel>.toggler-close{display:none;right:0;z-index:101;position:absolute;background:url(../img/icon-color-close.png) center no-repeat #3d3d3d!important;border-radius:4px}.theme-panel>.toggler-close:hover{background-color:#222!important}.theme-panel>.theme-options{top:4px;right:0;display:none;position:absolute;z-index:100;background:#3d3d3d;box-shadow:5px 5px rgba(61,61,61,.1);-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.modal-open .colorpicker,.modal-open .datepicker,.modal-open .daterangepicker,.modal-open .datetimepicker{z-index:10055!important}.theme-panel>.theme-options>.theme-option{color:#cfcfcf;padding:10px;border-top:1px solid #444;margin-top:0;margin-bottom:0}.theme-panel>.theme-options>.theme-option>span{text-transform:uppercase;display:inline-block;width:145px;font-size:13px;font-weight:300}.theme-panel>.theme-options>.theme-option>select.form-control{display:inline;width:135px;padding:2px;text-transform:lowercase}.theme-panel>.theme-options>.theme-option.theme-colors{border-top:0}.theme-panel>.theme-options>.theme-option.theme-colors>span{display:block;width:auto}.theme-panel>.theme-options>.theme-option.theme-colors>ul{list-style:none;padding:0;display:block;margin-bottom:10px!important;margin-top:15px}.colorpicker.dropdown-menu,.daterangepicker.dropdown-menu,.datetimepicker.dropdown-menu{padding:5px}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li{width:40px;height:40px;margin:0 4px;cursor:pointer;list-style:none;float:left;border:1px solid #707070}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li:first-child{margin-left:0}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.current,.theme-panel>.theme-options>.theme-option.theme-colors>ul>li:hover{border:2px solid #d64635}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-default{background:#333438}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-darkblue{background:#2b3643}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-blue{background:#2D5F8B}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-grey{background:#697380}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-light{background:#F9FAFD}.theme-panel>.theme-options>.theme-option.theme-colors>ul>li.color-light2{background:#F1F1F1}.page-container-bg-solid .theme-panel{position:absolute;margin-top:30px;margin-right:20px;right:0}.page-container-bg-solid .theme-panel>.toggler{background:url(../img/icon-color.png) center no-repeat #BFCAD1}.page-container-bg-solid.page-sidebar-reversed .theme-panel{margin-right:255px}.page-on-load{background:#fefefe}.datepicker .active,.datepicker .active:hover,.datepicker .selected,.datepicker .today{background-image:none!important;filter:none!important}.page-on-load .page-container,.page-on-load .page-footer,.page-on-load .page-header,.page-on-load>.clearfix{display:none;transition:all 2s}.input-group.color .input-group-btn i{position:absolute;display:block;cursor:pointer;width:20px;height:20px;right:6px}.datepaginator a{font-family:'Open Sans';font-size:13px;font-weight:300}.datepicker table td,.datepicker table th,.datetimepicker table td,.datetimepicker table th{font-family:'Open Sans'!important}#dp-calendar{right:4px!important}.datepaginator .fa-angle-right:before{content:"\f105"}.datepaginator .fa-angle-left:before{content:"\f104"}.datepicker.dropdown-menu{padding:5px;box-shadow:5px 5px rgba(102,102,102,.1);border:1px solid #efefef}.datepicker .selected{background-color:#909090!important}.datepicker .active{background-color:#4b8df8!important}.datepicker .active:hover{background-color:#2678FC!important}.datepicker .input-daterange input{text-align:left}.datepicker table td{color:#000;font-weight:300!important}.datepicker table th{color:#333;font-weight:400!important}.daterangepicker{margin-top:4px}.daterangepicker td{text-shadow:none}.daterangepicker td.active{background-color:#4b8df8;background-image:none;filter:none}.datetimepicker .active,.datetimepicker .active:hover{filter:none!important;background-image:none!important}.daterangepicker th{font-weight:400;font-size:14px}.daterangepicker .ranges input[type=text]{width:70px!important;font-size:11px;vertical-align:middle}.daterangepicker .ranges label{font-weight:300;display:block}.daterangepicker .ranges .btn{margin-top:10px}.daterangepicker .ranges li{color:#333}.daterangepicker .ranges li.active,.daterangepicker .ranges li:hover{background:#4b8df8!important;border:1px solid #4b8df8!important;color:#fff}.daterangepicker .range_inputs input{margin-bottom:0!important}.daterangepicker .fa-angle-right:before{content:"\f105"}.daterangepicker .fa-angle-left:before,.datetimepicker .fa-angle-left:before{content:"\f104"}.datetimepicker table td{color:#000;font-weight:300!important}.datetimepicker table th{font-weight:400!important}.datetimepicker .active{background-color:#4b8df8!important}.datetimepicker .active:hover{background-color:#2678FC!important}.datetimepicker .fa-angle-right:before{content:"\f105"}.editable-input table,.editable-input table td,.editable-input table th,.editable-input table tr{border:0!important}.editable-input .combodate select{margin-bottom:5px}.fileinput{margin-bottom:0}.fileinput .close{float:none}.fileinput .input-group{white-space:nowrap;overflow:hidden}.md-input{padding:5px!important;border-bottom:0!important;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.md-editor{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.md-editor .btn-toolbar{margin-left:0;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.md-editor .btn-toolbar .btn-group .btn-sm.btn{padding-bottom:3px}.md-editor .btn-toolbar .btn-group .btn-primary{padding-top:5px;padding-bottom:7px}.md-editor.active{border:1px solid #999;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important}.has-error .md-editor{border:1px solid #ebccd1!important}.has-success .md-editor{border:1px solid #d6e9c6!important}.has-warning .md-editor{border:1px solid #faebcc!important}.modal-open.page-overflow .modal-scrollable,.modal-open.page-overflow .page-container,.modal-open.page-overflow .page-container .navbar-fixed-bottom,.modal-open.page-overflow .page-container .navbar-fixed-top{overflow-y:auto!important}.modal-scrollable{overflow:hidden!important}.modal-backdrop{position:fixed}.bootstrap-select .btn{border-color:#e5e5e5}.has-error .bootstrap-select .btn{border-color:#ebccd1}.has-success .bootstrap-select .btn{border-color:#d6e9c6}.has-warning .bootstrap-select .btn{border-color:#faebcc}.bootstrap-select.open .btn,.bootstrap-select.open.dropup .btn{border-color:#999}.bootstrap-select .btn:focus{outline:0!important;outline-offset:0}.bootstrap-select.btn-group .dropdown-menu{margin-top:1px}.bootstrap-select.btn-group .dropdown-menu>li>dt>.text{font-weight:600;font-family:'Open Sans';font-size:14px}.bootstrap-select.btn-group .dropdown-menu .text-muted{color:#999!important}.bootstrap-select .caret{border:0;width:auto;height:auto;margin-top:-10px!important}.bootstrap-select .caret:before{content:"\f107";display:inline-block;border:0;font-family:FontAwesome;font-style:normal;font-weight:400}.form-wizard .steps>li>a.step>.desc,.form-wizard .steps>li>a.step>.number{display:inline-block;font-size:16px;font-weight:300}.bootstrap-select .selected i{color:#aaa}.bootstrap-select .dropdown-menu{z-index:9999!important}.bootstrap-switch{border-color:#e5e5e5}.bootstrap-switch.bootstrap-switch-focused{box-shadow:none;border-color:#e5e5e5}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary{color:#fff;background:#428bca}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info{color:#fff;background:#89C4F4}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success{color:#fff;background:#45B6AF}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning{color:#fff;background:#dfba49}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger{color:#fff;background:#F3565D}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default{color:#444;background:#ececec}.portlet>.portlet-title>.actions>.bootstrap-switch{border-color:transparent;margin-top:0}.bootstrap-timepicker-widget table td a{padding:4px 0}.bootstrap-timepicker-widget input,.bootstrap-timepicker-widget input:focus{outline:0!important;border:0}.modal-open .bootstrap-timepicker-widget{z-index:10055!important}.bootstrap-timepicker-widget.timepicker-orient-bottom:after,.bootstrap-timepicker-widget.timepicker-orient-bottom:before{top:auto}.toast{-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast .toast-close-button{display:inline-block;margin-top:0;margin-right:0;text-indent:-100000px;width:11px;height:16px;background-repeat:no-repeat!important;background-image:url(../../assets/images/portlet-remove-icon-white.png)!important}.form-wizard .steps,.form-wizard .steps>li>a.step{background-color:#fff;background-image:none;border:0;box-shadow:none;filter:none}.toast-top-center{top:12px;margin:0 auto 0 -150px;left:50%}.toast-bottom-center{bottom:12px;margin:0 auto 0 -150px;left:50%}.form-wizard .progress{margin-bottom:30px}.form-wizard .steps{padding:10px 0;margin-bottom:15px}.form-wizard .steps>li>a.step:hover{background:0 0}.form-wizard .steps>li>a.step>.number{background-color:#eee;text-align:center!important;padding:11px 15px 13px;margin-right:10px;height:45px;width:45px;-webkit-border-radius:50%!important;-moz-border-radius:50%!important;border-radius:50%!important}.form-wizard .steps>li>a.step>.desc>i{display:none}.form-wizard .steps>li.active>a.step .number{background-color:#45B6AF;color:#fff}.form-wizard .steps>li.active>a.step .desc{color:#333}.form-wizard .steps>li.done>a.step .number{background-color:#dfba49;color:#fff}.form-wizard .steps>li.done>a.step .desc{color:#333}.form-wizard .steps>li.done>a.step .desc i{font-size:12px;font-weight:400;color:#999;display:inline-block}@media (min-width:768px) and (max-width:1200px){.form-wizard .step .desc{margin-top:10px;display:block}}.wysihtml5-sandbox{width:100%!important}.wysihtml5-toolbar li{margin:0;height:29px}.wysihtml5-toolbar li .dropdown-menu{margin-top:5px}.has-error .wysihtml5-sandbox{border:1px solid #ebccd1!important}.has-success .wysihtml5-sandbox{border:1px solid #d6e9c6!important}.has-warning .wysihtml5-sandbox{border:1px solid #faebcc!important}.note-editor{border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.note-editor .note-toolbar{border-bottom:1px solid #e5e5e5;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.note-editor .note-statusbar{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.note-editor .note-statusbar .note-resizebar{border-top:1px solid #e5e5e5}.note-editor.fullscreen{z-index:11000;width:100%!important}.note-editor .dropdown-menu:before{left:9px;right:auto}.note-editor .dropdown-menu:after{left:10px;right:auto}.note-link-dialog .checkbox{margin-left:20px}.has-error .note-editor{border:1px solid #ebccd1!important}.has-success .note-editor{border:1px solid #d6e9c6!important}.has-warning .note-editor{border:1px solid #faebcc!important}.bootbox .bootbox-close-button{margin-top:0!important}.cke{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.cke .cke-top{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.cke .cke-bottom{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.cke_bottom,.cke_dialog,.cke_dialog_footer,.cke_dialog_title,.cke_inner,.cke_reset,.cke_top{background-image:none!important;filter:none;border-top:0;border-bottom:0;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;text-shadow:none}.cke_dialog_tab,.cke_dialog_ui_button,.cke_dialog_ui_input_text{filter:none;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;background-image:none!important}.cke_dialog_tab,.cke_dialog_ui_button{box-shadow:none!important;text-shadow:none!important}.cke_dialog_tab:hover,.cke_dialog_ui_button:hover{text-decoration:none;text-shadow:none}.cke_dialog_ui_input_text{box-shadow:none!important}.cke_button,.cke_combo_button,.cke_toolbar,.cke_toolgroup{background-image:none!important;filter:none!important;border:0;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important}.cke_button,.cke_combo_button,.cke_hc.cke_panel_listItem a,.cke_panel_grouptitle{background-image:none!important;filter:none;text-shadow:none}.cke_button:hover,.cke_combo_button:hover{background-color:#ddd}.cke_toolbar_break{background-image:none!important;filter:none!important;border:0;box-shadow:none!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;-ms-box-shadow:none!important;-o-box-shadow:none!important}.has-error .cke{border:1px solid #ebccd1!important}.has-success .cke{border:1px solid #d6e9c6!important}.has-warning .cke{border:1px solid #faebcc!important}.modal-open .clockface{z-index:10055!important}.clockface .cell .inner.active,.clockface .cell .outer.active{background-color:#4b8df8!important;background-image:none;filter:none}.dataTable{width:100%;margin-top:5px}.dataTables_filter .form-control{margin-left:4px}.dataTables_filter label{line-height:32px}.dataTable .row-details{margin-top:3px;display:inline-block;cursor:pointer;width:14px;height:14px}.dataTable .row-details.row-details-close{background:url(../img/datatable-row-openclose.png) no-repeat}.dataTable .row-details.row-details-open{background:url(../img/datatable-row-openclose.png) 0 -23px no-repeat}.dataTable .details{background-color:#eee}.dataTable .details td,.dataTable .details th{padding:4px;background:0 0;border:0}.dataTable .details tr:hover td,.dataTable .details tr:hover th{background:0 0}.dataTable .details tr:nth-child(even) td,.dataTable .details tr:nth-child(even) th,.dataTable .details tr:nth-child(odd) td,.dataTable .details tr:nth-child(odd) th{background-color:#eee}.dataTable>thead>tr>th.sorting,.dataTable>thead>tr>th.sorting_asc,.dataTable>thead>tr>th.sorting_desc{padding-right:18px}.dataTable .table-checkbox{width:8px!important}@media (max-width:768px){.form-wizard .steps>li>a{text-align:left}.dataTables_wrapper .dataTables_filter .form-control,.dataTables_wrapper .dataTables_length .form-control{display:inline-block}.dataTables_wrapper .dataTables_info{top:17px}.dataTables_wrapper .dataTables_paginate{margin-top:-15px}}@media (max-width:480px){.dataTables_wrapper .dataTables_filter .form-control{width:175px!important}.dataTables_wrapper .dataTables_paginate{float:left;margin-top:20px}}.dataTables_processing{position:fixed;top:50%;left:50%;min-width:125px;margin-left:0;padding:7px;text-align:center;color:#333;font-size:13px;border:1px solid #ddd;background-color:#eee;vertical-align:middle;-webkit-box-shadow:0 1px 8px rgba(0,0,0,.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,.1);box-shadow:0 1px 8px rgba(0,0,0,.1)}.dataTables_processing span{line-height:15px;vertical-align:middle}.dataTables_empty{text-align:center}.tabletools-btn-group{margin:0 0 10px}.tabletools-btn-group>.btn{margin-right:5px}.tabletools-btn-group>.btn:last-child{margin-right:0}.tabletools-dropdown-on-portlet{margin-top:-55px;float:right}.tabletools-dropdown-on-portlet>.btn{margin-right:5px}.tabletools-dropdown-on-portlet>.btn:last-child{margin-right:0}.DTTT_Print{background-color:#fff}.DTTT_Print .DTTT_PrintMessage{display:none}@media print{.DTTT_Print .DTTT_PrintMessage{display:inline-block}}.DTTT_Print .DTTT_Print_Info{display:block;position:fixed;top:35px;font-size:18px;width:700px;left:50%;margin-left:-350px;text-align:center}.DTTT_Print .page-footer,.DTTT_Print .page-header,.DTTT_Print .page-sidebar{display:none}.DTTT_Print .page-content-wrapper{float:none}.DTTT_Print .row,.DTTT_Print [class*=col-]{padding:0;margin:0}.DTTT_Print .page-content{margin:50px auto!important;border:0!important;width:800px!important;padding:0!important}.DTTT_Print .page-content .portlet{border:0;padding:0}.DTTT_Print .page-content .portlet .portlet-body{padding:0}.DTTT_Print .page-content .dataTables_wrapper{padding:0;margin:0;box-shadow:5px 5px rgba(102,102,102,.1)}@media print{.DTTT_Print .page-content .dataTables_wrapper{box-shadow:none}}.paging_bootstrap_extended{margin:0!important;padding:0!important;float:none!important;font-size:13px}.dataTables_extended_wrapper .seperator{padding:0 2px}.dataTables_extended_wrapper div.dataTables_info,.dataTables_extended_wrapper div.dataTables_length,.dataTables_extended_wrapper div.dataTables_paginate{display:inline-block;float:none!important;padding:0!important;margin:0!important;position:static!important}@media (max-width:480px){.dataTables_extended_wrapper div.dataTables_info,.dataTables_extended_wrapper div.dataTables_length,.dataTables_extended_wrapper div.dataTables_paginate{display:block;margin-bottom:10px!important}.dataTables_extended_wrapper .seperator{display:none!important}}.dataTables_extended_wrapper div.dataTables_length label{margin:0!important;padding:0!important;font-size:13px;float:none!important;display:inline-block!important}.table-container .table-actions-wrapper{display:none}.dataTables_scroll{margin-bottom:10px}.dataTables_scrollHead{border-bottom:2px solid #ddd!important}.dataTables_scrollHead thead th{border-bottom:0!important}.dataTables_scrollBody{border-bottom:1px solid #ddd!important}.dropzone{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.fancybox-overlay{z-index:100000}.fancybox-opened{z-index:100001}.spinner-buttons.btn-group-vertical .btn{text-align:center;margin:0;height:17px;width:22px;padding-left:6px;padding-right:6px;padding-top:0}.page-style-rounded .spinner-buttons.btn-group-vertical .btn.spinner-up{border-radius:0;border-top-right-radius:4px!important}.page-style-rounded .spinner-buttons.btn-group-vertical .btn.spinner-down{border-radius:0 0 4px}.external-event{display:inline-block;cursor:move;margin-bottom:5px;margin-left:5px}.fc-scroller{overflow-y:auto;overflow-x:hidden}.fc-month-view .fc-scroller{height:auto!important}.portlet .event-form-title{font-size:14px;margin-top:4px;font-weight:400;margin-bottom:10px}.portlet.calendar .fc-button{box-shadow:none;text-shadow:none;border:0 #ddd;height:35px;padding:6px 8px 7px;margin-left:2px;background:0 0;color:#fff;top:-45px;outline:0!important;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;border-style:none solid}.portlet.calendar .fc-toolbar{margin-bottom:0}.portlet.calendar .fc-toolbar h2{margin-top:3px;font-size:17px}.portlet.calendar .fc-button .fc-icon-left-single-arrow,.portlet.calendar .fc-button .fc-icon-right-single-arrow{font-family:FontAwesome;font-size:16px}.portlet.calendar .fc-header{margin-bottom:-21px}.portlet.calendar .fc-button-prev{padding-right:10px;padding-left:8px}.portlet.calendar .fc-button-next{padding-right:8px;padding-left:10px}.portlet.calendar .fc-button.fc-state-active,.portlet.calendar .fc-button.fc-state-hover{color:#666;background-color:#fff}.portlet.calendar .fc-button.fc-state-disabled{color:#ddd}.portlet.calendar .fc-button .fc-icon-left-single-arrow:after{content:""}.portlet.calendar .fc-button .fc-icon-left-single-arrow:before{content:"\f104"}.portlet.calendar .fc-button .fc-icon-right-single-arrow:after{content:""}.portlet.calendar .fc-button .fc-icon-right-single-arrow:before{content:"\f105"}.portlet.calendar .fc-text-arrow{font-size:22px;font-family:"Courier New",Courier,monospace;vertical-align:baseline}.portlet.calendar .fc-event .fc-time,.portlet.calendar .fc-event .fc-title{text-align:left;color:#fff;font-size:13px;font-weight:300;float:left}.portlet.calendar .fc-event{border:0;background-color:#69a4e0;color:#fff}.portlet.calendar .fc-event .fc-content{border:0}.portlet.calendar .fc-header-title h2{font-size:14px;line-height:20px;font-weight:400;color:#111}.portlet.calendar .fc-widget-header{background-image:none;filter:none;background-color:#eee;text-transform:uppercase;font-weight:300}.portlet.calendar.light .fc-button{top:-60px;color:#666;text-transform:uppercase;font-size:12px;padding-bottom:35px}.portlet.calendar.light .fc-button .fc-text-arrow{margin-top:-6px;display:inline-block}.portlet.calendar.light .fc-button.fc-state-active,.portlet.calendar.light .fc-button.fc-state-hover{color:#333;border-bottom:2px solid #45B6AF}.portlet.calendar.light .fc-button.fc-state-disabled{color:#aaa}.portlet.calendar .mobile .fc-button{padding:0 6px 20px;margin-left:2px;border:0;background-color:#ddd;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;color:#000;text-shadow:none;text-align:center}.portlet.calendar .mobile .fc-button.fc-state-active,.portlet.calendar .mobile .fc-button.fc-state-hover{background-color:#eee}.portlet.calendar .mobile .fc-button.fc-state-disabled{color:#bbb}.portlet.calendar .mobile .fc-button-prev{margin-right:5px;margin-top:-2px}.portlet.calendar .mobile .fc-button-next{margin-right:0;margin-top:-2px}.portlet.calendar .mobile .fc-header-space{margin:0;padding:0;width:0}.portlet.calendar .mobile .fc-header-left{position:absolute;z-index:10}.portlet.calendar .mobile .fc-header-left .fc-button{top:-2px}.portlet.calendar .mobile .fc-header-right{position:relative;right:0}.portlet.calendar .mobile .fc-header-right .fc-button{top:35px}.portlet.calendar .mobile .fc-content{margin-top:53px}.gmaps{height:300px;width:100%}.gmaps img{max-width:none}#gmap_static div{background-repeat:no-repeat;background-position:50% 50%;display:block;height:300px}#gmap_routes_instructions{margin-top:10px;margin-bottom:0}#gritter-notice-wrapper{right:1px!important}.gritter-close{left:auto!important;right:3px!important}.gritter-title{font-family:"Open Sans";font-size:18px;font-weight:300}.easy-pie-chart .number{font-size:14px!important;position:relative;text-align:center;height:75px;line-height:75px}.easy-pie-chart .number canvas{position:absolute;top:0;left:0}.profile,.profile-classic .profile-image,.sparkline-chart,.vmaps{position:relative}.blueimp-gallery .close{background-image:url(../../assets/images/portlet-remove-icon-white.png)!important;margin-top:-2px}.blueimp-gallery .next,.blueimp-gallery .prev{border-radius:23px!important}.ms-container .ms-list{border:1px solid #e5e5e5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ms-container .ms-optgroup-label{font-size:14px}.jquery-notific8-message,.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{font-size:13px}.ms-container .ms-list.ms-focus{border-color:#999;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ms-container .ms-selectable li.ms-hover,.ms-container .ms-selection li.ms-hover{color:#333;background-color:#eee}.ms-container .form-control{margin-bottom:5px}[class*=jquery-notific8],[class*=jquery-notific8]:after,[class*=jquery-notific8]:before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.left .jquery-notific8-close-sticky span,.right .jquery-notific8-close-sticky span{font-size:10px}.jquery-notific8-heading{font-weight:300;font-size:16px}.password-strength .password-verdict{display:inline-block;margin-top:6px;margin-left:5px}.password-strength .progress{margin-top:5px;margin-bottom:0}.password-strength .progress-bar{padding:2px}.scroller{padding:0 12px 0 0;margin:0;overflow:hidden}.scroller-footer{margin-top:10px}.scroller-footer:after,.scroller-footer:before{content:" ";display:table}.portlet-body .slimScrollBar{margin-right:0}.jqstooltip{width:auto!important;height:auto!important}.easy-pie-chart,.sparkline-chart{text-align:center}.sparkline-chart{margin-top:15px}.easy-pie-chart .number{font-weight:300;width:85px;margin:0 auto}.sparkline-chart .number{width:100px;margin:0 auto 10px}.easy-pie-chart .title,.sparkline-chart .title{display:block;text-align:center;color:#333;font-weight:300;font-size:16px;margin-top:5px;margin-bottom:10px}.easy-pie-chart .title:hover,.sparkline-chart .title:hover{color:#666;text-decoration:none}.easy-pie-chart .title>i,.sparkline-chart .title>i{margin-top:5px}div.tagsinput{min-height:35px;height:auto!important;margin:0;padding:5px 5px 0;overflow:auto}.add-portfolio,.portfolio-block,.portfolio-stat,.portfolio-text,.portfolio-text .portfolio-text-info,.vmaps{overflow:hidden}div.tagsinput span.tag{background:#aaa;color:#fff;border:0;padding:3px 6px;margin-top:0;margin-bottom:5px}div.tagsinput input{padding:3px 6px;width:75px!important}div.tagsinput span.tag a{color:#fff}div.tagsinput .not_valid{color:#fff;padding:3px 6px;background-color:#e02222}.slider{border:0;padding:0;display:block;margin:12px 5px;min-height:11px}.vakata-context li a .vakata-contextmenu-sep,.vakata-context li a i,iframe[src="about:blank"]{display:none}.ui-slider-vertical{width:11px}.ui-slider-horizontal .ui-slider-handle{top:-3px}.ui-slider-vertical .ui-slider-handle{left:-3px}.bs-example+.highlight:after,.bs-example:after{left:15px;text-transform:uppercase;letter-spacing:1px}.ui-slider-handle,.ui-slider-vertical{filter:none!important;background-image:none!important}.jqvmap-zoomin,.jqvmap-zoomout{height:16px;width:16px;background-color:#666}.vmaps{height:300px}.jstree-default .jstree-clicked{border:0;background-color:#e1e1e1;box-shadow:none}.jstree-default .jstree-hovered{border:0;background-color:#eee;box-shadow:none}.jstree-default .jstree-wholerow-clicked,.jstree-wholerow .jstree-wholerow-clicked{background:#e1e1e1;border:0;box-shadow:none}.jstree-default .jstree-wholerow-hovered,.jstree-wholerow .jstree-wholerow-hovered{border:0;background-color:#eee;box-shadow:none}.jstree-icon.icon-lg{margin-top:1px}.jstree-open>.jstree-anchor>.fa-folder:before{margin-left:2px;content:"\f07c"}.jstree-default.jstree-rtl .jstree-last{background:no-repeat}.vakata-context,.vakata-context ul{padding:0;min-width:125px;background-color:#fff;font-size:14px;font-family:"Segoe UI",Helvetica,Arial,sans-serif;box-shadow:5px 5px rgba(102,102,102,.1);border:1px solid #efefef}.vakata-context li{border:0}.vakata-context li a{padding:0 10px;border:0}.vakata-context .vakata-context-hover>a,.vakata-context li a:hover{background-color:#eee;color:#333;box-shadow:none;margin:0}.vakata-context .vakata-context-hover>a .ins,.vakata-context .vakata-context-hover>a .span,.vakata-context li a:hover .ins,.vakata-context li a:hover .span{border:0!important}.vakata-context li a ins,.vakata-context li a span{display:none;border:0!important}.vakata-context .vakata-context-separator a,.vakata-context-rtl .vakata-context-separator a{margin:0;border:0}.jstree-rename-input{background-color:#fff!important;border:1px solid #e5e5e5!important;outline:0!important;padding:2px 6px!important;margin-right:-4px!important}.noUi-control{margin:9px 0}.noUi-primary .noUi-connect,.noUi-primary.noUi-connect{background:#428bca}.noUi-info .noUi-connect,.noUi-info.noUi-connect{background:#89C4F4}.noUi-success .noUi-connect,.noUi-success.noUi-connect{background:#45B6AF}.noUi-warning .noUi-connect,.noUi-warning.noUi-connect{background:#dfba49}.noUi-danger .noUi-connect,.noUi-danger.noUi-connect{background:#F3565D}.noUi-default .noUi-connect,.noUi-default.noUi-connect{background:#c6c6c6}.form-recaptcha-img{margin-bottom:10px;clear:both;border:1px solid #e5e5e5;padding:5px}.form-control .select2-choice{border:1px solid #e5e5e5;background-color:#fff;background-image:none;filter:none;height:34px;padding:3px 0 0 12px}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#e5e5e5;background-color:#fff;background-image:none;filter:none}.select2-drop{border:1px solid #e5e5e5;background-color:#fff;background-image:none;-webkit-box-shadow:none;box-shadow:none;filter:none;border-top:0}.select2-drop-auto-width{border-top:1px solid #e5e5e5}.select2-drop.select2-drop-above{border-top:1px solid #e5e5e5;-webkit-box-shadow:none;box-shadow:none}.select2-drop-active{border:1px solid #999;border-top:0}.select2-container .select2-choice .select2-arrow{background-image:none;background-color:#fff;filter:none;border-left:1px solid #e5e5e5}.select2-container.select2-container-active .select2-arrow,.select2-container.select2-dropdown-open .select2-arrow{border-left:0!important}.select2-container .select2-choice .select2-arrow b{background-position:0 1px}.select2-search input{background-color:#fff!important;filter:none;margin:5px 0 0;border:1px solid #e5e5e5;webkit-appearance:none!important;color:#333;outline:0;height:auto!important;min-height:26px;padding:6px!important;line-height:20px;font-size:14px;font-weight:400;vertical-align:top;-webkit-box-shadow:none;box-shadow:none}.form-control.select2-container{border:0;height:auto!important;padding:0}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #999!important;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-dropdown-open .select2-choice{border-bottom:0!important;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #999!important;border-top:0!important;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-drop.select2-drop-above.select2-drop-active{border:1px solid #999!important;border-bottom:0!important}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}.select2-results{margin:5px 0}.select2-results .select2-highlighted{background:#eee;color:#333}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{padding:3px 7px 4px;background:#f4f4f4;display:list-item}.select2-container-multi,.select2-container-multi .select2-choices{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.select2-container-multi.select2-dropdown-open,.select2-container-multi.select2-dropdown-open .select2-choices{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.select2-container-multi.select2-dropdown-open.select2-drop-above,.select2-container-multi.select2-dropdown-open.select2-drop-above .select2-choices{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.select2-container-multi .select2-choices{padding-left:6px;min-height:34px;border:1px solid #e5e5e5;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #999!important;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:5px 0 3px 5px;border:1px solid #e5e5e5;background-image:none;background-color:#fff;filter:none;-webkit-box-shadow:none!important;box-shadow:none!important}.has-warning .select2-container .select2-choice,.has-warning .select2-container .select2-choices,.has-warning .select2-container.select2-dropdown-open .select2-choice,.has-warning .select2-container.select2-dropdown-open .select2-choices{border-color:#faebcc}.has-warning .select2-container.select2-dropdown-open .select2-choice>span{color:#faebcc}.has-error .select2-container .select2-choice,.has-error .select2-container .select2-choices,.has-error .select2-container.select2-dropdown-open .select2-choice,.has-error .select2-container.select2-dropdown-open .select2-choices{border-color:#ebccd1}.has-error .select2-container.select2-dropdown-open .select2-choice>span{color:#ebccd1}.has-success .select2-container .select2-choice,.has-success .select2-container .select2-choices,.has-success .select2-container.select2-dropdown-open .select2-choice,.has-success .select2-container.select2-dropdown-open .select2-choices{border-color:#d6e9c6}.has-success .select2-container.select2-dropdown-open .select2-choice>span{color:#d6e9c6}.modal-open .select2-drop-mask{z-index:10051}.modal-open .select2-drop{z-index:10052}.modal-open .select2-search{z-index:10053}.form-control.input-lg .select2-choice{height:46px;padding:10px 16px}.select2-container.input-lg .select2-choice .select2-arrow b{background-position:0 7px}.form-control.input-sm .select2-choice{height:30px;padding:1px 10px 5px}.select2-container.input-sm .select2-choice .select2-arrow b{background-position:0 0}.checker{margin-top:-2px!important;margin-right:2px!important}.checker input,.radio input{outline:0!important}.alert,.aside:focus,.btn[bs-select],.timepicker.dropdown-menu button,.ui-grid-render-container:focus,[tabindex="-1"]{outline:0}div.checker.disabled span,div.checker.disabled.active span{background-position:-152px -260px}div.checker.disabled:hover,div.radio.disabled:hover{cursor:not-allowed}.edit-plunkr,.panel-heading[role=tab] .panel-title a,.ui-grid-header-cell .sortable,a[ng-click],input[type=checkbox]{cursor:pointer}div.checker,div.radio{margin-right:0;margin-left:3px}.portlet-body-morris-fit{margin-right:-20px;margin-left:-20px;margin-bottom:-15px}.portlet-body-morris-fit>svg{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.morris-hover.morris-default-style .morris-hover-row-label{text-align:left;font-weight:400;font-size:15px;color:#7D8C9D;font-family:"Open Sans",sans-serif}.morris-hover.morris-default-style .morris-hover-point{text-align:left;font-size:14px;font-weight:400;font-family:"Open Sans",sans-serif}.icheck-list>label{display:block;margin-bottom:8px}.icheck-list>label:last-child{margin-bottom:0}.form-horizontal .icheck-inline{margin-top:8px}.icheck-inline>label{display:inline-block;margin-left:15px}.icheck-inline>label:first-child{margin-left:0}div[class*=icheckbox_],div[class*=iradio_]{margin-right:5px;top:-1px!important}.icheck-colors{padding:0;margin:0;list-style:none}.icheck-colors>li{padding:0;margin:4px;float:left;display:inline-block;height:20px;width:20px;background:#000;opacity:.6;filter:alpha(opacity=60)}.icheck-colors>li:first-child{margin-left:0}.icheck-colors>li:hover{opacity:1;filter:alpha(opacity=100);cursor:pointer}.icheck-colors>li.active{height:26px;margin-top:0;opacity:.6;filter:alpha(opacity=60)}.icheck-colors>li.red{background:#d54e21}.icheck-colors>li.green{background:#78a300}.icheck-colors>li.blue{background:#0e76a8}.icheck-colors>li.aero{background:#9cc2cb}.icheck-colors>li.grey{background:#73716e}.icheck-colors>li.orange{background:#f70}.icheck-colors>li.yellow{background:#fc0}.icheck-colors>li.pink{background:#ff66b5}.icheck-colors>li.purple{background:#6a5a8c}.ui-select-match-close{margin-top:5px!important;margin-left:5px!important}.profile p{color:#636363;font-size:13px}.profile p a{color:#169ef4}.profile label{margin-top:10px}.profile label:first-child{margin-top:0}.profile-classic .profile-edit{top:0;right:0;margin:0;color:#fff;opacity:.6;padding:0 9px;font-size:11px;background:#000;position:absolute;filter:alpha(opacity=60)}.profile-classic .profile-image img{margin-bottom:15px}.profile-classic li{padding:8px 0;font-size:13px;border-top:solid 1px #f5f5f5}.profile-classic li:first-child{border-top:none}.profile-classic li span{color:#666;font-size:13px;margin-right:7px}.profile .tabbable-custom-profile .nav-tabs>li>a{padding:6px 12px}.profile ul.profile-nav{margin-bottom:30px}.profile ul.profile-nav li{position:relative}.profile ul.profile-nav li a{color:#557386;display:block;font-size:14px;padding:8px 10px;margin-bottom:1px;background:#f0f6fa;border-left:solid 2px #c4d5df}.profile ul.profile-nav li a:hover{color:#169ef4;background:#ecf5fb;text-decoration:none;border-left:solid 2px #169ef4}.profile ul.profile-nav li a.profile-edit{top:0;right:0;margin:0;color:#fff;opacity:.6;border:none;padding:3px 9px;font-size:12px;background:#000;position:absolute;filter:alpha(opacity=60)}.profile ul.profile-nav li a.profile-edit:hover{text-decoration:underline}.profile ul.profile-nav a span{top:0;right:0;color:#fff;font-size:16px;padding:7px 13px;position:absolute;background:#169ef4}.profile ul.profile-nav a:hover span{background:#0b94ea}.profile-info h1{color:#383839;font-size:24px;font-weight:400;margin:0 0 10px}.profile-info ul{margin-bottom:15px}.profile-info li{color:#6b6b6b;font-size:13px;margin-right:15px;margin-bottom:5px;padding:0!important}.profile-info li i{color:#b5c1c9;font-size:15px}.profile-info li:hover i{color:#169ef4}.sale-summary ul{margin-top:-10px}.sale-summary li{padding:10px 0;overflow:hidden;border-top:solid 1px #eee}.sale-summary li:first-child{border-top:none}.sale-summary li .sale-info{margin-top:4px;float:left;color:#646464;font-size:14px;text-transform:uppercase}.sale-summary li .sale-num{float:right;color:#169ef4;font-size:20px;font-weight:300}.sale-summary li span i{top:1px;width:13px;height:14px;margin-left:3px;position:relative;display:inline-block}.sale-summary li i.icon-img-up{background:url(../../img/icon-img-up.png) no-repeat!important}.sale-summary li i.icon-img-down{background:url(../../img/icon-img-down.png) no-repeat!important}.sale-summary .caption h4{color:#383839;font-size:18px}.sale-summary .caption{border-color:#c9c9c9}.profile .table-advance thead tr th{background:#f0f6fa}.profile .table-bordered,.profile .table-bordered td,.profile .table-bordered th{border-color:#e5eff6}.profile .table-striped tbody>tr:nth-child(2n+1)>td,.profile .table-striped tbody>tr:nth-child(2n+1)>th{background:#fcfcfc}.profile .table-hover tbody tr:hover td,.profile .table-hover tbody tr:hover th{background:#f5fafd}.add-portfolio{margin-bottom:30px;background:#f0f6fa;padding:12px 14px}.add-portfolio span{float:left;display:inline-block;font-weight:300;font-size:22px;margin-top:0}.add-portfolio .btn{margin-left:20px}.portfolio-block{background:#fff;margin-bottom:15px}.portfolio-text img{float:left;margin-right:15px}.portfolio-btn a{display:block;padding:25px 0;background:#ddd!important}.portfolio-btn a:hover{background:#1d943b!important}.portfolio-btn span{color:#fff;font-size:22px;font-weight:200}.portfolio-info{float:left;color:#616161;font-size:12px;padding:10px 25px;margin-bottom:5px;text-transform:uppercase}.portfolio-info span{color:#16a1f2;display:block;font-size:28px;line-height:28px;margin-top:0;font-weight:200;text-transform:uppercase}.profile-settings{background:#fafafa;padding:15px 8px 0;margin-bottom:5px}.profile-settings p{padding-left:5px;margin-bottom:3px}.profile-settings .controls>.checkbox,.profile-settings .controls>.radio{font-size:12px;margin-top:2px!important}.modal.disabled{-webkit-animation:noop!important;animation:noop!important}.modal.disabled.am-fade-and-slide-top .modal-dialog{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards;-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop}.modal.disabled.am-fade-and-scale .modal-dialog,.tab-pane.am-fade{-webkit-animation-duration:.3s;-webkit-animation-fill-mode:backwards}.modal.disabled.am-fade-and-slide-top.ng-enter .modal-dialog{visibility:hidden;-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop}.modal.disabled.am-fade-and-slide-top.ng-enter-active .modal-dialog,.modal.disabled.am-fade-and-slide-top.ng-leave-active .modal-dialog{visibility:visible}.modal.disabled.am-fade-and-slide-top.ng-leave .modal-dialog{-webkit-animation-name:fadeAndSlideToTop;animation-name:fadeAndSlideToTop}.modal.disabled.am-fade-and-scale .modal-dialog{animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;animation-fill-mode:backwards;-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn}.modal.disabled.am-fade-and-scale.ng-enter .modal-dialog{visibility:hidden;-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn}.modal.disabled.am-fade-and-scale.ng-enter-active .modal-dialog,.modal.disabled.am-fade-and-scale.ng-leave-active .modal-dialog{visibility:visible}.modal.disabled.am-fade-and-scale.ng-leave .modal-dialog{-webkit-animation-name:fadeAndScaleOut;animation-name:fadeAndScaleOut}@-webkit-keyframes noop{from,to{opacity:1}}@keyframes noop{from,to{opacity:1}}.bs-example{position:relative;padding:45px 15px 15px;margin:0 -15px 15px;background-color:#fafafa;box-shadow:inset 0 3px 6px rgba(0,0,0,.05);border-color:#e5e5e5 #eee #eee;border-style:solid;border-width:1px 0}.bs-example:after{content:"Example";position:absolute;top:15px;font-size:12px;font-weight:700;color:#bbb}.bs-example+.highlight{margin:-15px -15px 15px;border-radius:0;border-width:0 0 1px}@media (min-width:768px){.bs-example,.bs-example+.highlight{margin-left:0;margin-right:0;border-width:1px}.bs-example{background-color:#fff;border-color:#ddd;border-radius:4px 4px 0 0;box-shadow:none}.bs-example+.highlight{margin-top:-16px;border-bottom-left-radius:4px;border-bottom-right-radius:4px}}.bs-example .container{width:auto}.bs-example>.alert:last-child,.bs-example>.form-control:last-child,.bs-example>.jumbotron:last-child,.bs-example>.list-group:last-child,.bs-example>.navbar:last-child,.bs-example>.panel:last-child,.bs-example>.progress:last-child,.bs-example>.table-responsive:last-child>.table,.bs-example>.table:last-child,.bs-example>.well:last-child,.bs-example>blockquote:last-child,.bs-example>ol:last-child,.bs-example>p:last-child,.bs-example>ul:last-child{margin-bottom:0}.bs-example>p>.close{float:none}.bs-example .nav-tabs{margin-bottom:15px}.bs-footer{padding-top:40px;padding-bottom:30px;margin-top:100px;color:#787878;text-align:center;border-top:1px solid #e6e6e6}.bs-docs-nav .navbar-brand,.bs-masthead-links a{color:#fff}.bs-docs-nav,.bs-docs-nav .navbar-collapse{border-color:#a33f3e}.footer-links{margin:10px 0;padding-left:0}.footer-links li{display:inline;padding:0 2px}.footer-links li:first-child{padding-left:0}@media (min-width:768px){.bs-footer{text-align:left}.bs-footer p{margin-bottom:0}}.bs-masthead{position:relative;padding:30px 15px;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.15)}.bs-masthead h1{font-size:50px;line-height:1;color:#fff}.bs-masthead .btn-outline-inverse{margin:10px}.bs-masthead-links{margin-top:20px;margin-bottom:40px;padding:0 15px;list-style:none;text-align:center}.bs-masthead-links li{display:inline}.bs-masthead-links li+li{margin-left:20px}@media (min-width:768px){.bs-masthead{text-align:left;padding-top:140px;padding-bottom:140px}.bs-masthead h1{font-size:100px}.bs-masthead .lead{margin-right:25%;font-size:30px}.bs-masthead .btn-outline-inverse{width:auto;margin:20px 5px 20px 0;padding:18px 24px;font-size:21px}.bs-masthead-links{padding:0;text-align:left}}.bs-docs-nav{background-color:#b94846;box-shadow:0 1px 0 rgba(255,255,255,.1);text-shadow:0 -1px 0 rgba(0,0,0,.15)}.bs-docs-nav .navbar-nav>li>a{-webkit-transition:color .15s linear;transition:color .15s linear;color:#f9f1f1}.bs-docs-nav .navbar-nav>li>a:hover{color:#fff}.bs-docs-nav .navbar-nav>.active>a,.bs-docs-nav .navbar-nav>.active>a:hover{background-color:#a33f3e;color:#fff}.bs-docs-nav .navbar-toggle{border-color:#b94846}.bs-docs-nav .navbar-toggle:hover{border-color:#a33f3e;background-color:#a33f3e}.bs-old-docs{padding:15px 20px;color:#787878;background-color:#fafafa;border-top:1px solid #fff;border-bottom:1px solid #e6e6e6}.bs-old-docs strong{color:#545454}@media (max-width:991px){.navbar-toggle{margin-left:15px;display:block!important;float:left}.bs-sidebar.affix{position:static!important}}.bs-header .container,.select.dropdown-menu.select-multiple li{position:relative}.bs-sidenav{margin-top:40px;margin-bottom:20px;width:124px}.bs-sidebar .nav>li>a{display:block;font-size:13px;font-weight:500;color:#999;padding:4px 15px;text-align:right}.bs-sidebar .nav>li>a:focus,.bs-sidebar .nav>li>a:hover{padding-right:14px;color:#b94846;text-decoration:none;background-color:transparent;border-right:1px solid #b94846}.bs-sidebar .nav>.active:focus>a,.bs-sidebar .nav>.active:hover>a,.bs-sidebar .nav>.active>a{padding-right:13px;font-weight:700;color:#b94846;background-color:transparent;border-right:2px solid #b94846}.bs-sidebar .nav .nav{display:none;padding-bottom:10px}.bs-sidebar .nav .nav>li>a{padding-top:2px;padding-bottom:2px;padding-right:30px;font-size:12px;font-weight:400}.bs-sidebar .nav .nav>li>a:focus,.bs-sidebar .nav .nav>li>a:hover{padding-right:29px}.bs-sidebar .nav .nav>.active:focus>a,.bs-sidebar .nav .nav>.active:hover>a,.bs-sidebar .nav .nav>.active>a{font-weight:500;padding-right:28px}@media (min-width:992px){.bs-sidebar .nav>.active>ul{display:block}.bs-sidebar.affix .bs-sidenav,.bs-sidebar.affix-bottom .bs-sidenav{margin-top:0;margin-bottom:0}}h1[id],h2[id]{margin-top:-45px}@media (min-width:1200px){.bs-sidebar{margin-right:30px}}.am-fade.aside-backdrop,.am-fade.modal-backdrop{background-color:rgba(0,0,0,.5)}.bs-docs-aside{min-width:200px}h1[id]{padding-top:80px}h2[id]{padding-top:60px}.bs-header{padding:30px 15px 40px;font-size:16px;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.15)}.bs-header h1{color:#fff}.bs-header p{font-weight:300;line-height:1.5}@media (min-width:768px){.bs-header{font-size:21px;text-align:left}.bs-header h1{font-size:60px;line-height:1}}@media (min-width:992px){.bs-header h1,.bs-header p{margin-right:300px}}.highlight{display:none;padding:9px 14px;margin-bottom:14px;background-color:#f6f6f8;border:1px solid #e2e2e9;border-radius:4px}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0;white-space:nowrap}.highlight pre code{font-size:inherit;color:#333}.highlight pre .lineno{display:inline-block;width:22px;padding-right:5px;margin-right:10px;text-align:right;color:#bebec5}@media (min-width:481px){.highlight{display:block}}input.ng-dirty.ng-invalid,select.ng-dirty.ng-invalid,textarea.ng-dirty.ng-invalid{color:#b94a48;border-color:#ee5f5b}input.ng-dirty.ng-invalid:focus,select.ng-dirty.ng-invalid:focus,textarea.ng-dirty.ng-invalid:focus{border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}input:focus.ng-pristine.ng-invalid,select:focus.ng-pristine.ng-invalid,textarea:focus.ng-pristine.ng-invalid{color:#555;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}input:focus.ng-pristine.ng-invalid:focus,select:focus.ng-pristine.ng-invalid:focus,textarea:focus.ng-pristine.ng-invalid:focus{border-color:rgba(82,168,236,.8);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}body .modal{overflow-y:hidden}body.modal-open{overflow-y:visible!important}.lt-ie9 .bs-sidebar{display:none!important}.modal-backdrop{z-index:1040;bottom:0}.select.dropdown-menu.select-multiple li>i{color:#fff;display:none;position:absolute;top:5px;right:10px}.bs-example+.highlight,body{position:relative}.alert.bottom-right,.alert.top,.alert.top-right{right:0}.select.dropdown-menu.select-multiple li.active>i{display:block}body{padding-top:50px}.bs-example-scope{font-size:85%}.bs-example-scope+.bs-example{margin:-15px -15px 15px}.bs-example-scope+.bs-example+.highlight>pre{border-radius:0 0 4px 4px}.aside.bs-docs-aside .aside-header{background:#b94846}.aside.bs-docs-aside .nav{margin:0}.bs-docs-social{max-height:200px}.bs-docs-social ul{list-style:none;padding:1em 0 0}.bs-docs-social ul li{height:30px}@media (max-width:991px){.bs-docs-social ul li{display:inline-block}}.bs-docs-home,.bs-header{color:#fff;background:url(../assets/images/triangular-red.png) #b94846;padding-bottom:20px}pre>code{background:0 0}.bs-example+.highlight code{padding:2.5em .5em 1em}.alert.bottom-right .close,.alert.top-right .close{padding-left:10px}.alert.bottom-left .close,.alert.top-left .close{padding-right:10px}.bs-example+.highlight:after{content:"Source";position:absolute;top:15px;font-size:12px;font-weight:700;color:#bbb}.twitter-follow-button{position:relative;top:5px;margin-left:10px}.tab-pane.am-fade{animation-duration:.3s;-webkit-animation-timing-function:ease;animation-timing-function:ease;animation-fill-mode:backwards;opacity:1}.am-collapse,.panel-collapse.am-collapse{-webkit-animation-duration:.3s;-webkit-animation-fill-mode:backwards;overflow:hidden}.panel-collapse.am-collapse{animation-duration:.3s;-webkit-animation-timing-function:ease;animation-timing-function:ease;animation-fill-mode:backwards}.am-collapse,.am-flip-x{-webkit-animation-timing-function:ease}.panel-collapse.am-collapse2{-webkit-transition:.3s ease max-height;transition:.3s ease max-height;max-height:100px;overflow:hidden}.panel-collapse.am-collapse2.in-remove{max-height:100px;display:block}.panel-collapse.am-collapse2.in-add{max-height:0}@-webkit-keyframes expand{from{max-height:0}to{max-height:100px}}@keyframes expand{from{max-height:0}to{max-height:100px}}@-webkit-keyframes collapse{from{max-height:100px}to{max-height:0}}@keyframes collapse{from{max-height:100px}to{max-height:0}}.am-collapse{animation-duration:.3s;animation-timing-function:ease;animation-fill-mode:backwards;opacity:1}.am-fade,.am-flip-x{-webkit-animation-fill-mode:backwards}.am-collapse.am-collapse-add,.am-collapse.ng-hide-remove,.am-collapse.ng-move{-webkit-animation-name:expand;animation-name:expand}.am-collapse.am-collapse-remove,.am-collapse.ng-hide{-webkit-animation-name:collapse;animation-name:collapse}.am-collapse.ng-enter{visibility:hidden;-webkit-animation-name:expand;animation-name:expand;-webkit-animation-play-state:paused;animation-play-state:paused}.am-collapse.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-collapse.ng-leave{-webkit-animation-name:collapse;animation-name:collapse;-webkit-animation-play-state:paused;animation-play-state:paused}.am-collapse.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes expand{from{max-height:0}to{max-height:500px}}@keyframes expand{from{max-height:0}to{max-height:500px}}@-webkit-keyframes collapse{from{max-height:500px}to{max-height:0}}@keyframes collapse{from{max-height:500px}to{max-height:0}}.panel-collapse.am-collapse.in-remove{-webkit-animation-name:collapse;animation-name:collapse;display:block}.panel-collapse.am-collapse.in-add{-webkit-animation-name:expand;animation-name:expand}.am-fade{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;animation-fill-mode:backwards;opacity:1}.am-fade.am-fade-add,.am-fade.ng-hide-remove,.am-fade.ng-move{-webkit-animation-name:fadeIn;animation-name:fadeIn}.am-fade.am-fade-remove,.am-fade.ng-hide{-webkit-animation-name:fadeOut;animation-name:fadeOut}.am-fade.ng-enter{visibility:hidden;-webkit-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade.ng-leave{-webkit-animation-name:fadeOut;animation-name:fadeOut;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.tab-pane.am-fade.active-remove{display:none!important}.tab-pane.am-fade.active-add{-webkit-animation-name:fadeIn;animation-name:fadeIn}.aside-backdrop.am-fade,.modal-backdrop.am-fade{background:rgba(0,0,0,.5);-webkit-animation-duration:.15s;animation-duration:.15s}.aside-backdrop.am-fade.ng-leave,.modal-backdrop.am-fade.ng-leave{-webkit-animation-delay:.3s;animation-delay:.3s}.am-flip-x{-webkit-animation-duration:.4s;animation-duration:.4s;animation-timing-function:ease;animation-fill-mode:backwards}.am-flip-x-linear,.am-slide-top{-webkit-animation-fill-mode:backwards}.am-flip-x.am-flip-x-add,.am-flip-x.ng-hide-remove,.am-flip-x.ng-move{-webkit-animation-name:flipInXBounce;animation-name:flipInXBounce}.am-flip-x.am-flip-x-remove,.am-flip-x.ng-hide{-webkit-animation-name:flipOutX;animation-name:flipOutX}.am-flip-x.ng-enter{visibility:hidden;-webkit-animation-name:flipInXBounce;animation-name:flipInXBounce;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-flip-x.ng-leave{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-flip-x-linear{-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:ease;animation-timing-function:ease;animation-fill-mode:backwards}.am-slide-right,.am-slide-top{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-flip-x-linear.am-flip-x-add,.am-flip-x-linear.ng-hide-remove,.am-flip-x-linear.ng-move{-webkit-animation-name:flipInX;animation-name:flipInX}.am-flip-x-linear.am-flip-x-remove,.am-flip-x-linear.ng-hide{-webkit-animation-name:flipOutX;animation-name:flipOutX}.am-flip-x-linear.ng-enter{visibility:hidden;-webkit-animation-name:flipInX;animation-name:flipInX;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x-linear.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-flip-x-linear.ng-leave{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-animation-play-state:paused;animation-play-state:paused}.am-flip-x-linear.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes flipInX{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@keyframes flipInX{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@-webkit-keyframes flipInXBounce{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-transform:perspective(400px) rotateX(-10deg);transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@keyframes flipInXBounce{from{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-transform:perspective(400px) rotateX(-10deg);transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}to{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}}@-webkit-keyframes flipOutX{from{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}@keyframes flipOutX{from{opacity:1;-webkit-transform:perspective(400px) rotateX(0);transform:perspective(400px) rotateX(0)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}.am-slide-top{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-slide-bottom,.am-slide-right{-webkit-animation-fill-mode:backwards}.am-slide-top.am-slide-top-add,.am-slide-top.ng-hide-remove,.am-slide-top.ng-move{-webkit-animation-name:slideFromTop;animation-name:slideFromTop}.am-slide-top.am-slide-top-remove,.am-slide-top.ng-hide{-webkit-animation-name:slideToTop;animation-name:slideToTop}.am-slide-top.ng-enter{visibility:hidden;-webkit-animation-name:slideFromTop;animation-name:slideFromTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-top.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-top.ng-leave{-webkit-animation-name:slideToTop;animation-name:slideToTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-top.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-slide-right{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-slide-bottom,.am-slide-left{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-slide-right.am-slide-right-add,.am-slide-right.ng-hide-remove,.am-slide-right.ng-move{-webkit-animation-name:slideFromRight;animation-name:slideFromRight}.am-slide-right.am-slide-right-remove,.am-slide-right.ng-hide{-webkit-animation-name:slideToRight;animation-name:slideToRight}.am-slide-right.ng-enter{visibility:hidden;-webkit-animation-name:slideFromRight;animation-name:slideFromRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-right.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-right.ng-leave{-webkit-animation-name:slideToRight;animation-name:slideToRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-right.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-slide-bottom{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-fade-and-slide-top,.am-slide-left{-webkit-animation-fill-mode:backwards}.am-slide-bottom.am-slide-bottom-add,.am-slide-bottom.ng-hide-remove,.am-slide-bottom.ng-move{-webkit-animation-name:slideFromBottom;animation-name:slideFromBottom}.am-slide-bottom.am-slide-bottom-remove,.am-slide-bottom.ng-hide{-webkit-animation-name:slideToBottom;animation-name:slideToBottom}.am-slide-bottom.ng-enter{visibility:hidden;-webkit-animation-name:slideFromBottom;animation-name:slideFromBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-bottom.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-bottom.ng-leave{-webkit-animation-name:slideToBottom;animation-name:slideToBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-bottom.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-slide-left{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-fade-and-slide-right,.am-fade-and-slide-top{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-slide-left.am-slide-left-add,.am-slide-left.ng-hide-remove,.am-slide-left.ng-move{-webkit-animation-name:slideFromLeft;animation-name:slideFromLeft}.am-slide-left.am-slide-left-remove,.am-slide-left.ng-hide{-webkit-animation-name:slideToLeft;animation-name:slideToLeft}.am-slide-left.ng-enter{visibility:hidden;-webkit-animation-name:slideFromLeft;animation-name:slideFromLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-left.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-slide-left.ng-leave{-webkit-animation-name:slideToLeft;animation-name:slideToLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-slide-left.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes slideFromTop{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes slideFromTop{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@-webkit-keyframes slideToTop{to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes slideToTop{to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@-webkit-keyframes slideFromRight{from{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slideFromRight{from{-webkit-transform:translateX(100%);transform:translateX(100%)}}@-webkit-keyframes slideToRight{to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slideToRight{to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@-webkit-keyframes slideFromBottom{from{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes slideFromBottom{from{-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes slideToBottom{to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes slideToBottom{to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes slideFromLeft{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slideFromLeft{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@-webkit-keyframes slideToLeft{to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slideToLeft{to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.am-fade-and-slide-top{animation-duration:.3s;animation-timing-function:ease-in-out;animation-fill-mode:backwards}.am-fade-and-slide-top.am-fade-and-slide-top-add,.am-fade-and-slide-top.ng-hide-remove,.am-fade-and-slide-top.ng-move{-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop}.am-fade-and-slide-top.am-fade-and-slide-top-remove,.am-fade-and-slide-top.ng-hide{-webkit-animation-name:fadeAndSlideToTop;animation-name:fadeAndSlideToTop}.am-fade-and-slide-top.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromTop;animation-name:fadeAndSlideFromTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-top.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-top.ng-leave{-webkit-animation-name:fadeAndSlideToTop;animation-name:fadeAndSlideToTop;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-top.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-right{animation-duration:.3s;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-slide-bottom,.am-fade-and-slide-left{-webkit-animation-duration:.3s;-webkit-animation-timing-function:ease-in-out}.am-fade-and-slide-right.am-fade-and-slide-right-add,.am-fade-and-slide-right.ng-hide-remove,.am-fade-and-slide-right.ng-move{-webkit-animation-name:fadeAndSlideFromRight;animation-name:fadeAndSlideFromRight}.am-fade-and-slide-right.am-fade-and-slide-right-remove,.am-fade-and-slide-right.ng-hide{-webkit-animation-name:fadeAndSlideToRight;animation-name:fadeAndSlideToRight}.am-fade-and-slide-right.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromRight;animation-name:fadeAndSlideFromRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-right.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-right.ng-leave{-webkit-animation-name:fadeAndSlideToRight;animation-name:fadeAndSlideToRight;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-right.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-bottom{animation-duration:.3s;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-slide-bottom.am-fade-and-slide-bottom-add,.am-fade-and-slide-bottom.ng-hide-remove,.am-fade-and-slide-bottom.ng-move{-webkit-animation-name:fadeAndSlideFromBottom;animation-name:fadeAndSlideFromBottom}.am-fade-and-slide-bottom.am-fade-and-slide-bottom-remove,.am-fade-and-slide-bottom.ng-hide{-webkit-animation-name:fadeAndSlideToBottom;animation-name:fadeAndSlideToBottom}.am-fade-and-slide-bottom.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromBottom;animation-name:fadeAndSlideFromBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-bottom.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-bottom.ng-leave{-webkit-animation-name:fadeAndSlideToBottom;animation-name:fadeAndSlideToBottom;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-bottom.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-left{animation-duration:.3s;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-slide-left.am-fade-and-slide-left-add,.am-fade-and-slide-left.ng-hide-remove,.am-fade-and-slide-left.ng-move{-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards;-webkit-animation-name:fadeAndSlideFromLeft;animation-name:fadeAndSlideFromLeft}.am-fade-and-slide-left.am-fade-and-slide-left-remove,.am-fade-and-slide-left.ng-hide{-webkit-animation-name:fadeAndSlideToLeft;animation-name:fadeAndSlideToLeft}.am-fade-and-slide-left.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndSlideFromLeft;animation-name:fadeAndSlideFromLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-left.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-slide-left.ng-leave{-webkit-animation-name:fadeAndSlideToLeft;animation-name:fadeAndSlideToLeft;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-slide-left.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes fadeAndSlideFromTop{from{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}to{opacity:1}}@keyframes fadeAndSlideFromTop{from{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToTop{from{opacity:1}to{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}}@keyframes fadeAndSlideToTop{from{opacity:1}to{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}}@-webkit-keyframes fadeAndSlideFromRight{from{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}to{opacity:1}}@keyframes fadeAndSlideFromRight{from{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToRight{from{opacity:1}to{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}}@keyframes fadeAndSlideToRight{from{opacity:1}to{opacity:0;-webkit-transform:translateX(20%);transform:translateX(20%)}}@-webkit-keyframes fadeAndSlideFromBottom{from{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}to{opacity:1}}@keyframes fadeAndSlideFromBottom{from{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToBottom{from{opacity:1}to{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}}@keyframes fadeAndSlideToBottom{from{opacity:1}to{opacity:0;-webkit-transform:translateY(20%);transform:translateY(20%)}}@-webkit-keyframes fadeAndSlideFromLeft{from{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}to{opacity:1}}@keyframes fadeAndSlideFromLeft{from{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}to{opacity:1}}@-webkit-keyframes fadeAndSlideToLeft{from{opacity:1}to{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}}@keyframes fadeAndSlideToLeft{from{opacity:1}to{opacity:0;-webkit-transform:translateX(-20%);transform:translateX(-20%)}}.am-fade-and-scale{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards}.am-fade-and-scale.am-fade-and-scale-add,.am-fade-and-scale.ng-enter,.am-fade-and-scale.ng-hide-remove,.am-fade-and-scale.ng-move{-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn}.am-fade-and-scale.am-fade-and-scale-remove,.am-fade-and-scale.ng-hide,.am-fade-and-scale.ng-leave{-webkit-animation-name:fadeAndScaleOut;animation-name:fadeAndScaleOut}.am-fade-and-scale.ng-enter{visibility:hidden;-webkit-animation-name:fadeAndScaleIn;animation-name:fadeAndScaleIn;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-scale.ng-enter.ng-enter-active{visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.am-fade-and-scale.ng-leave{-webkit-animation-name:fadeAndScaleOut;animation-name:fadeAndScaleOut;-webkit-animation-play-state:paused;animation-play-state:paused}.am-fade-and-scale.ng-leave.ng-leave-active{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes fadeAndScaleIn{from{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}to{opacity:1}}@keyframes fadeAndScaleIn{from{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}to{opacity:1}}@-webkit-keyframes fadeAndScaleOut{from{opacity:1}to{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}}@keyframes fadeAndScaleOut{from{opacity:1}to{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}}.alert.bottom,.alert.bottom-left,.alert.bottom-right,.alert.top,.alert.top-left,.alert.top-right{position:fixed;z-index:1050;margin:20px}.alert.top,.alert.top-left,.alert.top-right{top:50px}.alert.top{left:0}.alert.top-left{left:0}.alert.bottom,.alert.bottom-left,.alert.bottom-right{bottom:0}.alert.bottom{right:0;left:0}.alert.bottom-left{left:0}.aside .aside-dialog .aside-footer:after,.aside .aside-dialog .aside-footer:before,.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar: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,.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{content:" ";display:table}.aside{position:fixed;top:0;bottom:0;z-index:1049;overflow:auto;min-width:320px;background:#fff}@media (max-width:991px){.aside{min-width:240px}}.aside.left{right:auto;left:0}.aside.right{right:0;left:auto}.aside .aside-dialog .aside-header{border-bottom:1px solid #e5e5e5;min-height:16.43px;padding:6px 15px;background:#337ab7;color:#fff}.aside .aside-dialog .aside-header .close{margin-right:-8px;padding:4px 8px;color:#fff;font-size:25px;opacity:.8}.aside .aside-dialog .aside-body{position:relative;padding:15px}.aside .aside-dialog .aside-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.aside .aside-dialog .aside-footer .btn+.btn{margin-left:5px;margin-bottom:0}.aside .aside-dialog .aside-footer .btn-group .btn+.btn{margin-left:-1px}.aside .aside-dialog .aside-footer .btn-block+.btn-block{margin-left:0}.aside-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.aside-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.aside-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.ui-grid-top-panel,.ui-grid-top-panel-background{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='white', GradientType=0)}.datepicker.dropdown-menu{width:250px;height:270px}.datepicker.dropdown-menu button{outline:0;border:0}.datepicker.dropdown-menu tbody{height:180px}.datepicker.dropdown-menu tbody button{padding:6px}.datepicker.dropdown-menu.datepicker-mode-1 tbody button,.datepicker.dropdown-menu.datepicker-mode-2 tbody button{height:65px}.callout{margin:20px 0;padding:20px;border-left:3px solid #eee}.callout h4{margin-top:0;margin-bottom:5px}.popover.top-left,.popover.top-right{margin-top:-10px}.callout p:last-child{margin-bottom:0}.callout-danger{border-color:#eed3d7;background-color:#fdf7f7}.callout-danger h4{color:#b94a48}.callout-warning{border-color:#faebcc;background-color:#faf8f0}.callout-warning h4{color:#8a6d3b}.callout-info{border-color:#bce8f1;background-color:#f4f8fa}.callout-info h4{color:#34789a}.modal.center .modal-dialog{position:fixed;top:40%;left:50%;min-width:320px;max-width:630px;width:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.popover.top-left .arrow{margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px;left:10%}.popover.top-left .arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.bottom-left,.popover.bottom-right{margin-top:10px}.popover.top-right .arrow{margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px;left:90%}.popover.top-right .arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.bottom-left .arrow{margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px;left:10%}.popover.bottom-left .arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.bottom-right .arrow{margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px;left:90%}.popover.bottom-right .arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.timepicker.dropdown-menu{padding:0 4px}.timepicker.dropdown-menu button{border:0}.timepicker.dropdown-menu tbody button{padding:6px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-group-xs>.btn{font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px}.btn-group-xs>.btn{padding:1px 5px}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar: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,.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{content:" ";display:table}.tooltip.tooltip-info.top .tooltip-arrow,.tooltip.tooltip-info.top-left .tooltip-arrow,.tooltip.tooltip-info.top-right .tooltip-arrow{border-top-color:#d9edf7}.tooltip.tooltip-info.right .tooltip-arrow{border-right-color:#d9edf7}.tooltip.tooltip-info.bottom .tooltip-arrow,.tooltip.tooltip-info.bottom-left .tooltip-arrow,.tooltip.tooltip-info.bottom-right .tooltip-arrow{border-bottom-color:#d9edf7}.tooltip.tooltip-info.left .tooltip-arrow{border-left-color:#d9edf7}.tooltip.tooltip-info .tooltip-inner{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.tooltip.tooltip-info .tooltip-inner hr{border-top-color:#a6e1ec}.tooltip.tooltip-info .tooltip-inner .alert-link{color:#245269}.tooltip.tooltip-success.top .tooltip-arrow,.tooltip.tooltip-success.top-left .tooltip-arrow,.tooltip.tooltip-success.top-right .tooltip-arrow{border-top-color:#dff0d8}.tooltip.tooltip-success.right .tooltip-arrow{border-right-color:#dff0d8}.tooltip.tooltip-success.bottom .tooltip-arrow,.tooltip.tooltip-success.bottom-left .tooltip-arrow,.tooltip.tooltip-success.bottom-right .tooltip-arrow{border-bottom-color:#dff0d8}.tooltip.tooltip-success.left .tooltip-arrow{border-left-color:#dff0d8}.tooltip.tooltip-success .tooltip-inner{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.tooltip.tooltip-success .tooltip-inner hr{border-top-color:#c9e2b3}.tooltip.tooltip-success .tooltip-inner .alert-link{color:#2b542c}.tooltip.tooltip-danger.top .tooltip-arrow,.tooltip.tooltip-danger.top-left .tooltip-arrow,.tooltip.tooltip-danger.top-right .tooltip-arrow{border-top-color:#f2dede}.tooltip.tooltip-danger.right .tooltip-arrow{border-right-color:#f2dede}.tooltip.tooltip-danger.bottom .tooltip-arrow,.tooltip.tooltip-danger.bottom-left .tooltip-arrow,.tooltip.tooltip-danger.bottom-right .tooltip-arrow{border-bottom-color:#f2dede}.tooltip.tooltip-danger.left .tooltip-arrow{border-left-color:#f2dede}.tooltip.tooltip-danger .tooltip-inner{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.tooltip.tooltip-danger .tooltip-inner hr{border-top-color:#e4b9c0}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{border-width:5px 5px 0;border-top-color:#000;margin-left:-5px;bottom:0}.tooltip.tooltip-danger .tooltip-inner .alert-link{color:#843534}.tooltip.top-left{margin-top:-3px;padding:5px 0}.tooltip.top-left .tooltip-arrow{left:10%}.tooltip.top-right{margin-top:-3px;padding:5px 0}.tooltip.bottom-left,.tooltip.bottom-right{margin-top:3px;padding:5px 0}.tooltip.top-right .tooltip-arrow{left:90%}.tooltip.bottom-left .tooltip-arrow{top:0;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000;left:10%}.tooltip.bottom-right .tooltip-arrow{top:0;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000;left:90%}#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:before,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before{content:" ";display:table}.ui-grid{border:1px solid #ddd;box-sizing:content-box;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}.ui-grid-vertical-bar{position:absolute;right:0;width:0}.ui-grid-scrollbar-placeholder{background-color:transparent}.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{width:1px;background-color:#ddd}.ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#ddd}.ui-grid-clearfix:after,.ui-grid-clearfix:before{content:"";display:table}.ui-grid-invisible{visibility:hidden}.ui-grid-contents-wrapper{position:relative;height:100%;width:100%}.ui-grid-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.ui-grid-top-panel-background{background:#fff;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff)}.ui-grid-header{border-bottom:1px solid #ddd;box-sizing:border-box}.ui-grid-top-panel{position:relative;overflow:hidden;font-weight:700;background:#fff;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff);-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:-1px -1px 0 0;border-radius:-1px -1px 0 0}.ui-grid-header-viewport{overflow:hidden}.ui-grid-header-canvas:after,.ui-grid-header-canvas:before{content:"";display:table;line-height:0}.ui-grid-header-cell-wrapper{position:relative;display:table;box-sizing:border-box;height:100%}.ui-grid-header-cell-row{display:table-row;position:relative}.ui-grid-header-cell{position:relative;box-sizing:border-box;background-color:inherit;border-right:1px solid;border-color:#ddd;display:table-cell;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0}.ui-grid-header-cell:last-child{border-right:0}.ui-grid-header-cell .ui-grid-sort-priority-number{margin-left:-8px}.ui-grid-header .ui-grid-vertical-bar{top:0;bottom:0}.ui-grid-column-menu-button{position:absolute;right:1px;top:0}.ui-grid-column-menu-button .ui-grid-icon-angle-down{vertical-align:sub}.ui-grid-column-menu-button-last-col{margin-right:25px}.ui-grid-column-menu{position:absolute}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all 50ms linear;-moz-transition:all 50ms linear;-o-transition:all 50ms linear;transition:all 50ms linear;display:block!important}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all 50ms linear;-moz-transition:all 50ms linear;-o-transition:all 50ms linear;transition:all 50ms linear;display:block!important}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-filter-container{padding:4px 10px;position:relative}.ui-grid-filter-container .ui-grid-filter-button{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button [class^=ui-grid-icon]{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:10px;opacity:.66}.ui-grid-filter-container .ui-grid-filter-button [class^=ui-grid-icon]:hover{opacity:1}.ui-grid-filter-container .ui-grid-filter-button-select{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button-select [class^=ui-grid-icon]{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:0;opacity:.66}.ui-grid-filter-container .ui-grid-filter-button-select [class^=ui-grid-icon]:hover{opacity:1}select.ui-grid-filter-select{padding:0;margin:0;width:90%;border:1px solid #ddd;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:0;border-radius:0}select.ui-grid-filter-select:hover{border:1px solid #ddd}.ui-grid-no-row-overlay,.ui-grid-render-container{-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0}.ui-grid-filter-cancel-button-hidden select.ui-grid-filter-select{width:100%}.ui-grid-render-container{position:inherit;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:0;border-radius:0}.ui-grid-viewport{min-height:20px;position:relative;overflow-y:scroll;-webkit-overflow-scrolling:touch}.ui-grid-viewport:focus{outline:0!important}.ui-grid-canvas{position:relative;padding-top:1px}.ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fff}.ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f8f8f8}.ui-grid-footer-panel-background,.ui-grid-no-row-overlay{background:#fff;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='white', GradientType=0)}.ui-grid-row:last-child .ui-grid-cell{border-bottom-color:#ddd;border-bottom-style:solid}.ui-grid-no-row-overlay{position:absolute;top:0;bottom:0;left:0;right:0;margin:10%;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff);-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ddd;font-size:2em;text-align:center;-webkit-border-radius:0;border-radius:0}.ui-grid-no-row-overlay>*{position:absolute;display:table;margin:auto 0;width:100%;top:0;bottom:0;left:0;right:0;opacity:.66}.ui-grid-cell{overflow:hidden;float:left;background-color:inherit;border-right:1px solid;border-color:#ddd;box-sizing:border-box}.ui-grid-cell:last-child{border-right:0}.ui-grid-cell-contents{padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;height:100%}.ui-grid-cell-contents-hidden{visibility:hidden;width:0;height:0;display:none}.ui-grid-row .ui-grid-cell.ui-grid-row-header-cell{border-bottom:solid 1px #ddd}.ui-grid-footer-panel-background{background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff)}.ui-grid-footer-panel{position:relative;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden;font-weight:700;background:#fff;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(1,#fff));background:-ms-linear-gradient(bottom,#fff,#fff);background:-moz-linear-gradient(center bottom,#fff 0,#fff 100%);background:-o-linear-gradient(white,#fff);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='white', endColorstr='white', GradientType=0);-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:-1px -1px 0 0;border-radius:-1px -1px 0 0}.ui-grid-grid-footer{float:left;width:100%;padding:10px;border-top:1px solid #ddd;box-sizing:border-box}.ui-grid-footer-viewport{overflow:hidden}.ui-grid-footer-canvas{position:relative}.ui-grid-footer-canvas:after,.ui-grid-footer-canvas:before{content:"";display:table;line-height:0}.ui-grid-footer-cell-wrapper{position:relative;display:table;box-sizing:border-box;height:100%}.ui-grid-menu,.ui-grid-menu-button{position:absolute;cursor:pointer;z-index:2}.ui-grid-footer-cell-row{display:table-row}.ui-grid-footer-cell{overflow:hidden;background-color:inherit;border-right:1px solid;border-color:#ddd;box-sizing:border-box;display:table-cell}.ui-grid-footer-cell:last-child{border-right:0}input[type=text].ui-grid-filter-input{padding:0;margin:0;width:100%;border:1px solid #ddd;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:0;border-radius:0}input[type=text].ui-grid-filter-input:hover{border:1px solid #ddd}.ui-grid-menu-button{right:0;top:0;background:#fff;border:none;height:31px;font-weight:400}.ui-grid-menu-button .ui-grid-icon-container{margin-top:3px}.ui-grid-menu-button .ui-grid-menu{right:0}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid{overflow:hidden;border:1px solid #ddd}.ui-grid-menu{padding:0 10px 20px;box-sizing:border-box}.ui-grid-menu .ui-grid-menu-inner{background:#fff;border:1px solid #ddd;position:relative;white-space:nowrap;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.2),inset 0 12px 12px -14px rgba(0,0,0,.2);-moz-box-shadow:0 10px 20px rgba(0,0,0,.2),inset 0 12px 12px -14px rgba(0,0,0,.2);box-shadow:0 10px 20px rgba(0,0,0,.2),inset 0 12px 12px -14px rgba(0,0,0,.2)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{position:absolute;right:0;top:0;display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:1px;font-size:10px;line-height:1;border-radius:2px;color:transparent;background-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover{text-decoration:none}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active{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)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled],fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover{color:transparent;background-color:rgba(0,0,0,0);border-color:transparent}.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active{background-image:none}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:hover,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover{background-color:transparent;border-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button .badge{color:transparent;background-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button>i{opacity:.75;color:#000}.ui-grid-menu .ui-grid-menu-inner ul{margin:0;padding:0;list-style-type:none}.ui-grid-menu .ui-grid-menu-inner ul li{padding:0}.ui-grid-menu .ui-grid-menu-inner ul li button{min-width:100%;padding:8px;text-align:left;background:0 0;border:none}.ui-grid-menu .ui-grid-menu-inner ul li button:focus,.ui-grid-menu .ui-grid-menu-inner ul li button:hover{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,.2);box-shadow:inset 0 0 14px rgba(0,0,0,.2)}.ui-grid-menu .ui-grid-menu-inner ul li button.ui-grid-menu-item-active{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,.2);box-shadow:inset 0 0 14px rgba(0,0,0,.2);background-color:#cecece}.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child)>button{border-bottom:1px solid #ddd}.ui-grid-sortarrow{right:5px;position:absolute;width:20px;top:0;bottom:0;background-position:center}.ui-grid-sortarrow.down{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}@font-face{font-family:ui-grid;src:url(ui-grid.eot);src:url(ui-grid.eot#iefix) format('embedded-opentype'),url(../../assets/css/global/ui-grid.woff) format('woff'),url(../../assets/css/global/ui-grid.ttf) format('truetype'),url(ui-grid.svg?#ui-grid) format('svg');font-weight:400;font-style:normal}[class*=" ui-grid-icon"]:before,[class^=ui-grid-icon]:before{font-family:ui-grid;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.ui-grid-icon-blank::before{width:1em;content:' '}.ui-grid[dir=rtl] .ui-grid-cell,.ui-grid[dir=rtl] .ui-grid-footer-cell,.ui-grid[dir=rtl] .ui-grid-header-cell{float:right!important}.ui-grid[dir=rtl] .ui-grid-column-menu-button{position:absolute;left:1px;top:0;right:inherit}.ui-grid[dir=rtl] .ui-grid-cell:first-child,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child,.ui-grid[dir=rtl] .ui-grid-header-cell:first-child{border-right:0}.ui-grid[dir=rtl] .ui-grid-cell:last-child,.ui-grid[dir=rtl] .ui-grid-header-cell:last-child{border-right:1px solid #ddd;border-left:0}.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar{width:0}.ui-grid[dir=rtl] .ui-grid-menu-button{z-index:2;position:absolute;left:0;right:auto;background:#fff;border:1px solid #ddd;cursor:pointer;min-height:27px;font-weight:400}.ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu{left:0;right:auto}.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button{right:initial;left:0}.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button [class^=ui-grid-icon]{right:initial;left:10px}.ui-grid-animate-spin{-moz-animation:ui-grid-spin 2s infinite linear;-o-animation:ui-grid-spin 2s infinite linear;-webkit-animation:ui-grid-spin 2s infinite linear;animation:ui-grid-spin 2s infinite linear;display:inline-block}@-moz-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes ui-grid-spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.ui-grid-draggable-row{height:30px}.ui-grid-draggable-row-over{position:relative;color:#AAA}.ui-grid-draggable-row-over:before{content:"";display:block;position:absolute;left:0;width:100%;border-bottom:1px dashed #AAA}.ui-grid-draggable-row-over--above:before{top:0}.ui-grid-draggable-row-over--below:before{bottom:0}
\ No newline at end of file
index e77a6f6..05333a6 100644 (file)
@@ -334,7 +334,7 @@ width: auto !important;
 .contact-portlet{
   overflow-x:hidden;
   overflow-y:auto;
-  height: 337px;
+  /*height: 337px;*/
 }
 
 .contact-tab{
similarity index 99%
rename from public/assets/css/profile-old.css
rename to public/assets/css/global/profile-old.css
index 3c70cef..2cea46a 100644 (file)
@@ -253,7 +253,7 @@ Profile Page
 
 /*portfolio block*/
 .portfolio-block {
-  background: #f7f7f7;
+  background: white;
   margin-bottom: 15px;
   overflow: hidden;
 }
diff --git a/public/assets/images/media/CmCall.png b/public/assets/images/media/CmCall.png
new file mode 100644 (file)
index 0000000..977c07b
Binary files /dev/null and b/public/assets/images/media/CmCall.png differ
index 3fd5493..af97650 100644 (file)
   "APPLICATION_PAUSED": "Paused",
   "APPLICATION_CALLED": "Ringing",
   "APPLICATION_CONNECT": "Talking",
-  "APPLICATION_COMPLETE": "Ready"
+  "APPLICATION_COMPLETE": "Ready",
+  "MESSAGE_EXIST_SERVICE": "The service name already exists",
+  "APPLICATION_MOBILE": "Mobile",
+  "APPLICATION_LASTNAME": "Last Name",
+  "APPLICATION_FIRSTNAME": "First Name",
+  "MESSAGE_INBOUND_CALL_FROM": "Inbound Call from",
+  "MESSAGE_CALL_UNIQUEID": "Call uniqueid"
 }
index ac831b9..2bb1e95 100644 (file)
   "APPLICATION_PAUSED": "In Pausa",
   "APPLICATION_CALLED": "Squilla",
   "APPLICATION_CONNECT": "In chiamata",
-  "APPLICATION_COMPLETE": "Pronto"
+  "APPLICATION_COMPLETE": "Pronto",
+  "MESSAGE_EXIST_SERVICE": "Il servizio esiste già",
+  "APPLICATION_MOBILE": "Mobile",
+  "APPLICATION_MOBILE": "Cognome",
+  "APPLICATION_FIRSTNAME": "Nome",
+  "MESSAGE_INBOUND_CALL_FROM": "Chiamata entrante da",
+  "MESSAGE_CALL_UNIQUEID": "Uniqueid chiamata"
 }
index 058483f..aeaa420 100644 (file)
@@ -1 +1,634 @@
-var _0xacc5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x61\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x64\x69\x74\x6F\x72","\x67\x72\x61\x70\x68","\x6E\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53","\x73\x61\x76\x65\x41\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2D\x53","\x70\x75\x62\x6C\x69\x73\x68","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x50","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x43\x74\x72\x6C\x2B\x45","\x65\x64\x69\x74\x46\x69\x6C\x65","\x65\x64\x69\x74","\x67\x65\x74","\x62\x69\x6E\x64","\x70\x75\x74","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x70\x72\x69\x6E\x74\x53\x63\x72\x65\x65\x6E","\x73\x70\x72\x69\x74\x65\x2D\x70\x72\x69\x6E\x74","\x43\x74\x72\x6C\x2B\x50","\x70\x72\x65\x76\x69\x65\x77","\x73\x68\x6F\x77","\x75\x6E\x64\x6F","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x70\x72\x69\x74\x65\x2D\x75\x6E\x64\x6F","\x43\x74\x72\x6C\x2B\x5A","\x72\x65\x64\x6F","\x73\x70\x72\x69\x74\x65\x2D\x72\x65\x64\x6F","\x43\x74\x72\x6C\x2B\x59","\x63\x75\x74","\x73\x70\x72\x69\x74\x65\x2D\x63\x75\x74","\x43\x74\x72\x6C\x2B\x58","\x63\x6F\x70\x79","\x73\x70\x72\x69\x74\x65\x2D\x63\x6F\x70\x79","\x43\x74\x72\x6C\x2B\x43","\x70\x61\x73\x74\x65","\x73\x70\x72\x69\x74\x65\x2D\x70\x61\x73\x74\x65","\x43\x74\x72\x6C\x2B\x56","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x44\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x44","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x56","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x45","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x43\x74\x72\x6C\x2B\x41","\x68\x6F\x6D\x65","\x48\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x55\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x44\x6F\x77\x6E","\x65\x78\x70\x61\x6E\x64","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x45\x6E\x74\x65\x72","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x42\x61\x63\x6B\x73\x70\x61\x63\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x46","\x74\x6F\x42\x61\x63\x6B","\x43\x74\x72\x6C\x2B\x42","\x67\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x43\x74\x72\x6C\x2B\x47","\x75\x6E\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x55","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x70\x72\x6F\x6D\x70\x74","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x77\x72\x61\x70","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x73\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x30","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x20\x28","\x20\x30\x2D\x33\x36\x30\x29","\x74\x69\x6C\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65","\x78","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x79","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x76\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x65\x61\x73\x74","\x73\x6F\x75\x74\x68","\x77\x65\x73\x74","\x6E\x6F\x72\x74\x68","\x43\x74\x72\x6C\x2B\x52","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x41\x64\x64","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x53\x75\x62\x74\x72\x61\x63\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x66\x69\x74\x50\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x66\x75\x6E\x63\x74","\x70\x61\x67\x65\x56\x69\x65\x77","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x6D\x61\x78","\x72\x6F\x75\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x63\x75\x73\x74\x6F\x6D","\x20\x28\x25\x29","\x67\x65\x74\x53\x63\x61\x6C\x65","\x67\x72\x69\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x47","\x73\x65\x74\x54\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x75\x69\x64\x65\x73","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x73\x63\x61\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x43\x74\x72\x6C\x2B\x51","\x63\x6F\x70\x79\x43\x6F\x6E\x6E\x65\x63\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x68\x65\x6C\x70","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x5F","\x2F\x68\x65\x6C\x70","\x2E\x68\x74\x6D\x6C","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x46\x31","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x73\x68\x61\x64\x6F\x77","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x29","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x73\x74\x61\x74\x65","\x74\x72\x69\x67\x67\x65\x72\x58","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x59","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x6D\x61\x67\x65","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x75\x72\x6C","\x6F\x6E\x6C\x6F\x61\x64","\x6F\x6E\x65\x72\x72\x6F\x72","\x66\x69\x6C\x65\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x61\x6C\x65\x72\x74","\x73\x72\x63","\x63\x61\x6C\x6C","\x6C\x61\x62\x65\x6C","\x65\x6E\x61\x62\x6C\x65\x64","\x69\x63\x6F\x6E\x43\x6C\x73","\x73\x68\x6F\x72\x74\x63\x75\x74","\x65\x78\x74\x65\x6E\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64"];_0xacc5[0];function Actions(_0x1485x2){this[_0xacc5[1]]=_0x1485x2;this[_0xacc5[2]]= new Object();this[_0xacc5[3]]()}Actions[_0xacc5[4]][_0xacc5[3]]=function(){var _0x1485x3=this[_0xacc5[1]];var _0x1485x4=_0x1485x3[_0xacc5[5]];var _0x1485x5=_0x1485x4[_0xacc5[6]];this[_0xacc5[10]](_0xacc5[7],function(){_0x1485x3[_0xacc5[9]]( new NewDialog(_0x1485x3)[_0xacc5[8]],300,180,true,true)});this[_0xacc5[10]](_0xacc5[11],function(){_0x1485x3[_0xacc5[9]]( new OpenDialog(_0x1485x3)[_0xacc5[8]],300,180,true,true)});this[_0xacc5[10]](_0xacc5[12],function(){_0x1485x3[_0xacc5[13]](false)},null,null,_0xacc5[14]);this[_0xacc5[10]](_0xacc5[15],function(){_0x1485x3[_0xacc5[13]](true)},null,null,_0xacc5[16]);this[_0xacc5[10]](_0xacc5[17],function(){_0x1485x3[_0xacc5[18]](false)},null,null,_0xacc5[19]);this[_0xacc5[10]](_0xacc5[20],function(){_0x1485x3[_0xacc5[9]]( new VariableDialog(_0x1485x3)[_0xacc5[8]],300,180,true,true)});this[_0xacc5[10]](_0xacc5[21],function(){_0x1485x3[_0xacc5[9]]( new ImportDialog(_0x1485x3)[_0xacc5[8]],300,200,true,true)});this[_0xacc5[10]](_0xacc5[22],function(){_0x1485x3[_0xacc5[9]]( new ExportDialog(_0x1485x3)[_0xacc5[8]],300,200,true,true)},null,null,_0xacc5[23]);this[_0xacc5[28]](_0xacc5[24], new Action(mxResources[_0xacc5[26]](_0xacc5[25]),mxUtils[_0xacc5[27]](this,function(){this[_0xacc5[1]][_0xacc5[9]]( new EditFileDialog(_0x1485x3)[_0xacc5[8]],620,420,true,true)})));this[_0xacc5[10]](_0xacc5[29],function(){_0x1485x3[_0xacc5[9]]( new RenameDialog(_0x1485x3)[_0xacc5[8]],300,180,true,true)});this[_0xacc5[10]](_0xacc5[30],function(){mxUtils[_0xacc5[31]](_0x1485x5)},null,_0xacc5[32],_0xacc5[33]);this[_0xacc5[10]](_0xacc5[34],function(){mxUtils[_0xacc5[35]](_0x1485x5,null,10,10)});this[_0xacc5[10]](_0xacc5[36],function(){_0x1485x4[_0xacc5[37]][_0xacc5[36]]()},null,_0xacc5[38],_0xacc5[39]);this[_0xacc5[10]](_0xacc5[40],function(){_0x1485x4[_0xacc5[37]][_0xacc5[40]]()},null,_0xacc5[41],_0xacc5[42]);this[_0xacc5[10]](_0xacc5[43],function(){mxClipboard[_0xacc5[43]](_0x1485x5)},null,_0xacc5[44],_0xacc5[45]);this[_0xacc5[10]](_0xacc5[46],function(){mxClipboard[_0xacc5[46]](_0x1485x5)},null,_0xacc5[47],_0xacc5[48]);this[_0xacc5[10]](_0xacc5[49],function(){mxClipboard[_0xacc5[49]](_0x1485x5)},false,_0xacc5[50],_0xacc5[51]);this[_0xacc5[10]](_0xacc5[52],function(){_0x1485x5[_0xacc5[53]]()},null,null,_0xacc5[54]);this[_0xacc5[10]](_0xacc5[55],function(){var _0x1485x6=_0x1485x5[_0xacc5[56]];_0x1485x5[_0xacc5[59]](_0x1485x5[_0xacc5[58]](_0x1485x5[_0xacc5[57]](),_0x1485x6,_0x1485x6,true))},null,null,_0xacc5[60]);this[_0xacc5[10]](_0xacc5[61],function(){_0x1485x5[_0xacc5[61]]()},null,null,_0xacc5[62]);this[_0xacc5[10]](_0xacc5[63],function(){_0x1485x5[_0xacc5[63]]()},null,null,_0xacc5[64]);this[_0xacc5[10]](_0xacc5[65],function(){_0x1485x5[_0xacc5[65]]()},null,null,_0xacc5[66]);this[_0xacc5[10]](_0xacc5[67],function(){_0x1485x5[_0xacc5[67]]()},null,null,_0xacc5[68]);this[_0xacc5[10]](_0xacc5[69],function(){_0x1485x5[_0xacc5[69]]()},null,null,_0xacc5[70]);this[_0xacc5[10]](_0xacc5[71],function(){_0x1485x5[_0xacc5[71]]()},null,null,_0xacc5[72]);this[_0xacc5[10]](_0xacc5[73],function(){_0x1485x5[_0xacc5[74]](false)},null,null,_0xacc5[75]);this[_0xacc5[10]](_0xacc5[76],function(){_0x1485x5[_0xacc5[74]](true)},null,null,_0xacc5[77]);this[_0xacc5[10]](_0xacc5[78],function(){_0x1485x5[_0xacc5[79]](false)},null,null,_0xacc5[80]);this[_0xacc5[10]](_0xacc5[81],function(){_0x1485x5[_0xacc5[79]](true)},null,null,_0xacc5[82]);this[_0xacc5[10]](_0xacc5[83],function(){_0x1485x5[_0xacc5[85]](_0x1485x5[_0xacc5[84]](null,0))},null,null,_0xacc5[86]);this[_0xacc5[10]](_0xacc5[87],function(){_0x1485x5[_0xacc5[59]](_0x1485x5[_0xacc5[88]]())},null,null,_0xacc5[89]);this[_0xacc5[10]](_0xacc5[90],function(){_0x1485x5[_0xacc5[91]]()});this[_0xacc5[10]](_0xacc5[92],function(){var _0x1485x7=_0x1485x5[_0xacc5[93]]();var _0x1485x8=_0x1485x5[_0xacc5[94]](_0x1485x7);if(_0x1485x8==null){_0x1485x8=_0xacc5[95]};_0x1485x8=mxUtils[_0xacc5[97]](mxResources[_0xacc5[26]](_0xacc5[96]),_0x1485x8);if(_0x1485x8!=null){_0x1485x5[_0xacc5[98]](_0x1485x7,_0x1485x8)}});this[_0xacc5[10]](_0xacc5[99],function(){var _0x1485x7=_0x1485x5[_0xacc5[93]]();var _0x1485x8=_0x1485x5[_0xacc5[94]](_0x1485x7);if(_0x1485x8!=null){window[_0xacc5[11]](_0x1485x8)}});this[_0xacc5[10]](_0xacc5[100],function(){var _0x1485x9=_0x1485x5[_0xacc5[57]]();if(_0x1485x9!=null){_0x1485x5[_0xacc5[102]]()[_0xacc5[101]]();try{for(var _0x1485xa=0;_0x1485xa<_0x1485x9[_0xacc5[103]];_0x1485xa++){var _0x1485x7=_0x1485x9[_0x1485xa];if(_0x1485x5[_0xacc5[102]]()[_0xacc5[104]](_0x1485x7)){_0x1485x5[_0xacc5[105]]([_0x1485x7],20)}else {_0x1485x5[_0xacc5[106]](_0x1485x7)}}}finally{_0x1485x5[_0xacc5[102]]()[_0xacc5[107]]()}}});this[_0xacc5[10]](_0xacc5[108],function(){var _0x1485xb=_0x1485x5[_0xacc5[110]]()[_0xacc5[109]](_0x1485x5[_0xacc5[93]]());var _0x1485xc=_0xacc5[111];if(_0x1485xb!=null&&_0x1485xb[_0xacc5[113]][mxConstants[_0xacc5[112]]]==_0xacc5[111]){_0x1485xc=null};_0x1485x5[_0xacc5[114]](mxConstants.STYLE_WHITE_SPACE,_0x1485xc)});this[_0xacc5[10]](_0xacc5[115],function(){var _0x1485xc=_0xacc5[116];var _0x1485xb=_0x1485x5[_0xacc5[110]]()[_0xacc5[109]](_0x1485x5[_0xacc5[93]]());if(_0x1485xb!=null){_0x1485xc=_0x1485xb[_0xacc5[113]][mxConstants[_0xacc5[117]]]||_0x1485xc};_0x1485xc=mxUtils[_0xacc5[97]](mxResources[_0xacc5[26]](_0xacc5[96])+_0xacc5[118]+mxResources[_0xacc5[26]](_0xacc5[115])+_0xacc5[119],_0x1485xc);if(_0x1485xc!=null){_0x1485x5[_0xacc5[114]](mxConstants.STYLE_ROTATION,_0x1485xc)}});this[_0xacc5[10]](_0xacc5[120],function(){var _0x1485x9=_0x1485x5[_0xacc5[57]]();if(_0x1485x9!=null){_0x1485x5[_0xacc5[102]]()[_0xacc5[101]]();try{for(var _0x1485xa=0;_0x1485xa<_0x1485x9[_0xacc5[103]];_0x1485xa++){var _0x1485x7=_0x1485x9[_0x1485xa];if(_0x1485x5[_0xacc5[102]]()[_0xacc5[121]](_0x1485x7)&&_0x1485x5[_0xacc5[102]]()[_0xacc5[104]](_0x1485x7)==0){var _0x1485xd=_0x1485x5[_0xacc5[122]](_0x1485x7);if(_0x1485xd!=null){_0x1485xd=_0x1485xd[_0xacc5[123]]();_0x1485xd[_0xacc5[124]]+=_0x1485xd[_0xacc5[125]]/2-_0x1485xd[_0xacc5[126]]/2;_0x1485xd[_0xacc5[127]]+=_0x1485xd[_0xacc5[126]]/2-_0x1485xd[_0xacc5[125]]/2;var _0x1485xe=_0x1485xd[_0xacc5[125]];_0x1485xd[_0xacc5[125]]=_0x1485xd[_0xacc5[126]];_0x1485xd[_0xacc5[126]]=_0x1485xe;_0x1485x5[_0xacc5[102]]()[_0xacc5[128]](_0x1485x7,_0x1485xd);var _0x1485xb=_0x1485x5[_0xacc5[129]][_0xacc5[109]](_0x1485x7);if(_0x1485xb!=null){var _0x1485xf=_0x1485xb[_0xacc5[113]][mxConstants[_0xacc5[130]]]||_0xacc5[131];if(_0x1485xf==_0xacc5[131]){_0x1485xf=_0xacc5[132]}else {if(_0x1485xf==_0xacc5[132]){_0x1485xf=_0xacc5[133]}else {if(_0x1485xf==_0xacc5[133]){_0x1485xf=_0xacc5[134]}else {if(_0x1485xf==_0xacc5[134]){_0x1485xf=_0xacc5[131]}}}};_0x1485x5[_0xacc5[114]](mxConstants.STYLE_DIRECTION,_0x1485xf,[_0x1485x7])}}}}}finally{_0x1485x5[_0xacc5[102]]()[_0xacc5[107]]()}}},null,null,_0xacc5[135]);this[_0xacc5[10]](_0xacc5[136],function(){_0x1485x5[_0xacc5[137]](1)});this[_0xacc5[10]](_0xacc5[138],function(){_0x1485x5[_0xacc5[138]]()},null,null,_0xacc5[139]);this[_0xacc5[10]](_0xacc5[140],function(){_0x1485x5[_0xacc5[140]]()},null,null,_0xacc5[141]);this[_0xacc5[10]](_0xacc5[142],function(){_0x1485x5[_0xacc5[143]]()});this[_0xacc5[10]](_0xacc5[144],mxUtils[_0xacc5[27]](this,function(){if(!_0x1485x5[_0xacc5[145]]){this[_0xacc5[26]](_0xacc5[147])[_0xacc5[146]]()};var _0x1485x10=_0x1485x5[_0xacc5[148]];var _0x1485x11=_0x1485x5[_0xacc5[149]];var _0x1485x12=_0x1485x5[_0xacc5[8]][_0xacc5[150]]-20;var _0x1485x13=_0x1485x5[_0xacc5[8]][_0xacc5[151]]-20;var _0x1485x14=Math[_0xacc5[153]](100*Math[_0xacc5[152]](_0x1485x12/_0x1485x10[_0xacc5[125]]/_0x1485x11,_0x1485x13/_0x1485x10[_0xacc5[126]]/_0x1485x11))/100;_0x1485x5[_0xacc5[137]](_0x1485x14);_0x1485x5[_0xacc5[8]][_0xacc5[154]]=Math[_0xacc5[157]](_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[124]]*_0x1485x14-Math[_0xacc5[156]](10,(_0x1485x5[_0xacc5[8]][_0xacc5[150]]-_0x1485x10[_0xacc5[125]]*_0x1485x11*_0x1485x14)/2));_0x1485x5[_0xacc5[8]][_0xacc5[158]]=Math[_0xacc5[157]](_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[127]]*_0x1485x14-Math[_0xacc5[156]](10,(_0x1485x5[_0xacc5[8]][_0xacc5[151]]-_0x1485x10[_0xacc5[126]]*_0x1485x11*_0x1485x14)/2))}));this[_0xacc5[10]](_0xacc5[159],mxUtils[_0xacc5[27]](this,function(){if(!_0x1485x5[_0xacc5[145]]){this[_0xacc5[26]](_0xacc5[147])[_0xacc5[146]]()};var _0x1485x10=_0x1485x5[_0xacc5[148]];var _0x1485x11=_0x1485x5[_0xacc5[149]];var _0x1485x12=_0x1485x5[_0xacc5[8]][_0xacc5[150]]-20;var _0x1485x14=Math[_0xacc5[153]](100*_0x1485x12/_0x1485x10[_0xacc5[125]]/_0x1485x11)/100;_0x1485x5[_0xacc5[137]](_0x1485x14);_0x1485x5[_0xacc5[8]][_0xacc5[154]]=Math[_0xacc5[157]](_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[124]]*_0x1485x14-Math[_0xacc5[156]](10,(_0x1485x5[_0xacc5[8]][_0xacc5[150]]-_0x1485x10[_0xacc5[125]]*_0x1485x11*_0x1485x14)/2));_0x1485x5[_0xacc5[8]][_0xacc5[158]]=Math[_0xacc5[157]](_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[127]]*_0x1485x14-Math[_0xacc5[156]](10,(_0x1485x5[_0xacc5[8]][_0xacc5[151]]-_0x1485x10[_0xacc5[126]]*_0x1485x11*_0x1485x14)/2))}));this[_0xacc5[28]](_0xacc5[160], new Action(mxResources[_0xacc5[26]](_0xacc5[161]),function(){var _0x1485xc=mxUtils[_0xacc5[97]](mxResources[_0xacc5[26]](_0xacc5[96])+_0xacc5[162],parseInt(_0x1485x5[_0xacc5[110]]()[_0xacc5[163]]()*100));if(_0x1485xc!=null&&_0x1485xc[_0xacc5[103]]>0&&!isNaN(parseInt(_0x1485xc))){_0x1485x5[_0xacc5[137]](parseInt(_0x1485xc)/100)}}));var _0x1485x15=null;_0x1485x15=this[_0xacc5[10]](_0xacc5[164],function(){_0x1485x5[_0xacc5[166]](!_0x1485x5[_0xacc5[165]]());_0x1485x4[_0xacc5[167]]()},null,null,_0xacc5[168]);_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[165]]()});_0x1485x15=this[_0xacc5[10]](_0xacc5[171],function(){_0x1485x5[_0xacc5[173]][_0xacc5[172]]=!_0x1485x5[_0xacc5[173]][_0xacc5[172]]});_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[173]][_0xacc5[172]]});_0x1485x15=this[_0xacc5[10]](_0xacc5[174],function(){_0x1485x5[_0xacc5[176]][_0xacc5[177]](!_0x1485x5[_0xacc5[176]][_0xacc5[175]]())});_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[176]][_0xacc5[175]]()});_0x1485x15=this[_0xacc5[10]](_0xacc5[178],function(){_0x1485x5[_0xacc5[179]]=!_0x1485x5[_0xacc5[179]];_0x1485x5[_0xacc5[129]][_0xacc5[180]]()});_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[179]]});_0x1485x15=this[_0xacc5[10]](_0xacc5[181],function(){_0x1485x5[_0xacc5[181]]=!_0x1485x5[_0xacc5[181]];_0x1485x4[_0xacc5[167]]();if(!_0x1485x5[_0xacc5[181]]){var _0x1485x16=_0x1485x5[_0xacc5[129]][_0xacc5[155]];_0x1485x5[_0xacc5[129]][_0xacc5[183]](_0x1485x16[_0xacc5[124]]-_0x1485x5[_0xacc5[8]][_0xacc5[154]]/_0x1485x5[_0xacc5[129]][_0xacc5[182]],_0x1485x16[_0xacc5[127]]-_0x1485x5[_0xacc5[8]][_0xacc5[158]]/_0x1485x5[_0xacc5[129]][_0xacc5[182]]);_0x1485x5[_0xacc5[8]][_0xacc5[154]]=0;_0x1485x5[_0xacc5[8]][_0xacc5[158]]=0;_0x1485x5[_0xacc5[184]]()}else {var _0x1485x17=_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[124]];var _0x1485x18=_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[127]];_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[124]]=0;_0x1485x5[_0xacc5[129]][_0xacc5[155]][_0xacc5[127]]=0;_0x1485x5[_0xacc5[184]]();_0x1485x5[_0xacc5[8]][_0xacc5[154]]-=Math[_0xacc5[157]](_0x1485x17*_0x1485x5[_0xacc5[129]][_0xacc5[182]]);_0x1485x5[_0xacc5[8]][_0xacc5[158]]-=Math[_0xacc5[157]](_0x1485x18*_0x1485x5[_0xacc5[129]][_0xacc5[182]])}},!mxClient.IS_TOUCH);_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[8]][_0xacc5[113]][_0xacc5[185]]==_0xacc5[186]});_0x1485x15=this[_0xacc5[10]](_0xacc5[147],mxUtils[_0xacc5[27]](this,function(){_0x1485x5[_0xacc5[145]]=!_0x1485x5[_0xacc5[145]];_0x1485x5[_0xacc5[187]]=_0x1485x5[_0xacc5[145]];_0x1485x5[_0xacc5[188]]=_0x1485x5[_0xacc5[187]];_0x1485x5[_0xacc5[129]][_0xacc5[189]]();_0x1485x5[_0xacc5[184]]();_0x1485x4[_0xacc5[167]]();_0x1485x4[_0xacc5[191]][_0xacc5[190]]();if(mxUtils[_0xacc5[192]](_0x1485x5[_0xacc5[8]])){if(_0x1485x5[_0xacc5[145]]){_0x1485x5[_0xacc5[8]][_0xacc5[154]]-=20;_0x1485x5[_0xacc5[8]][_0xacc5[158]]-=20}else {_0x1485x5[_0xacc5[8]][_0xacc5[154]]+=20;_0x1485x5[_0xacc5[8]][_0xacc5[158]]+=20}}}));_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[145]]});_0x1485x15=this[_0xacc5[10]](_0xacc5[193],function(){_0x1485x5[_0xacc5[195]](!_0x1485x5[_0xacc5[194]][_0xacc5[175]]())},null,null,_0xacc5[196]);_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[194]][_0xacc5[175]]()});_0x1485x15=this[_0xacc5[10]](_0xacc5[197],function(){_0x1485x5[_0xacc5[194]][_0xacc5[199]](!_0x1485x5[_0xacc5[194]][_0xacc5[198]]())});_0x1485x15[_0xacc5[169]](true);_0x1485x15[_0xacc5[170]](function(){return _0x1485x5[_0xacc5[194]][_0xacc5[198]]()});this[_0xacc5[10]](_0xacc5[200],function(){var _0x1485x19=_0xacc5[95];if(mxResources[_0xacc5[202]](mxClient[_0xacc5[201]])){_0x1485x19=_0xacc5[203]+mxClient[_0xacc5[201]]};window[_0xacc5[11]](RESOURCES_PATH+_0xacc5[204]+_0x1485x19+_0xacc5[205])});this[_0xacc5[28]](_0xacc5[206], new Action(mxResources[_0xacc5[26]](_0xacc5[206])+_0xacc5[207],function(){_0x1485x3[_0xacc5[9]]( new AboutDialog(_0x1485x3)[_0xacc5[8]],320,280,true,true)},null,null,_0xacc5[208]));var _0x1485x1a=mxUtils[_0xacc5[27]](this,function(_0x1485x1b,_0x1485x1c){this[_0xacc5[10]](_0x1485x1b,function(){_0x1485x5[_0xacc5[209]](mxConstants.STYLE_FONTSTYLE,_0x1485x1c)})});_0x1485x1a(_0xacc5[210],mxConstants.FONT_BOLD);_0x1485x1a(_0xacc5[211],mxConstants.FONT_ITALIC);_0x1485x1a(_0xacc5[212],mxConstants.FONT_UNDERLINE);this[_0xacc5[10]](_0xacc5[213],function(){_0x1485x5[_0xacc5[214]](mxConstants.STYLE_SHADOW)});this[_0xacc5[10]](_0xacc5[215],function(){_0x1485x5[_0xacc5[214]](mxConstants.STYLE_DASHED)});this[_0xacc5[10]](_0xacc5[216],function(){_0x1485x5[_0xacc5[214]](mxConstants.STYLE_ROUNDED)});this[_0xacc5[10]](_0xacc5[217],function(){_0x1485x5[_0xacc5[214]](mxConstants.STYLE_CURVED)});this[_0xacc5[10]](_0xacc5[113],function(){var _0x1485x9=_0x1485x5[_0xacc5[57]]();if(_0x1485x9!=null&&_0x1485x9[_0xacc5[103]]>0){var _0x1485x1d=_0x1485x5[_0xacc5[102]]();var _0x1485x1c=mxUtils[_0xacc5[97]](mxResources[_0xacc5[26]](_0xacc5[96])+_0xacc5[118]+mxResources[_0xacc5[26]](_0xacc5[113])+_0xacc5[218],_0x1485x1d[_0xacc5[219]](_0x1485x9[0])||_0xacc5[95]);if(_0x1485x1c!=null){_0x1485x5[_0xacc5[220]](_0x1485x1c,_0x1485x9)}}});this[_0xacc5[10]](_0xacc5[221],function(){_0x1485x5[_0xacc5[222]](_0x1485x5[_0xacc5[93]]())});this[_0xacc5[10]](_0xacc5[223],function(){var _0x1485x7=_0x1485x5[_0xacc5[93]]();if(_0x1485x7!=null&&_0x1485x5[_0xacc5[102]]()[_0xacc5[224]](_0x1485x7)){var _0x1485x1e=_0x1485x4[_0xacc5[6]][_0xacc5[226]][_0xacc5[225]](_0x1485x7);if(_0x1485x1e instanceof mxEdgeHandler){var _0x1485x16=_0x1485x5[_0xacc5[129]][_0xacc5[155]];var _0x1485x6=_0x1485x5[_0xacc5[129]][_0xacc5[182]];var _0x1485x17=_0x1485x16[_0xacc5[124]];var _0x1485x18=_0x1485x16[_0xacc5[127]];var _0x1485x1f=_0x1485x5[_0xacc5[102]]()[_0xacc5[227]](_0x1485x7);var _0x1485x20=_0x1485x5[_0xacc5[122]](_0x1485x1f);if(_0x1485x5[_0xacc5[102]]()[_0xacc5[121]](_0x1485x1f)&&_0x1485x20!=null){_0x1485x17+=_0x1485x20[_0xacc5[124]];_0x1485x18+=_0x1485x20[_0xacc5[127]]};_0x1485x1e[_0xacc5[232]](_0x1485x1e[_0xacc5[228]],_0x1485x5[_0xacc5[230]][_0xacc5[229]]/_0x1485x6-_0x1485x17,_0x1485x5[_0xacc5[230]][_0xacc5[231]]/_0x1485x6-_0x1485x18)}}});this[_0xacc5[10]](_0xacc5[233],function(){var _0x1485x21=_0x1485x3[_0xacc5[2]][_0xacc5[26]](_0xacc5[233]);if(_0x1485x21[_0xacc5[234]]!=null){_0x1485x21[_0xacc5[234]][_0xacc5[236]](_0x1485x21[_0xacc5[234]][_0xacc5[228]],_0x1485x21[_0xacc5[235]])}});this[_0xacc5[10]](_0xacc5[237],function(){function _0x1485x22(_0x1485xc,_0x1485x23,_0x1485x24){var _0x1485x25=null;var _0x1485x9=_0x1485x5[_0xacc5[57]]();_0x1485x5[_0xacc5[102]]()[_0xacc5[101]]();try{if(_0x1485x9[_0xacc5[103]]==0){var _0x1485x26=_0x1485x5[_0xacc5[238]]();_0x1485x9=[_0x1485x5[_0xacc5[240]](_0x1485x5[_0xacc5[239]](),null,_0xacc5[95],_0x1485x26,_0x1485x26,_0x1485x23,_0x1485x24)];_0x1485x25=_0x1485x9};_0x1485x5[_0xacc5[114]](mxConstants.STYLE_IMAGE,_0x1485xc,_0x1485x9);_0x1485x5[_0xacc5[114]](mxConstants.STYLE_SHAPE,_0xacc5[237],_0x1485x9);if(_0x1485x5[_0xacc5[241]]()==1){if(_0x1485x23!=null&&_0x1485x24!=null){var _0x1485x7=_0x1485x9[0];var _0x1485xd=_0x1485x5[_0xacc5[102]]()[_0xacc5[242]](_0x1485x7);if(_0x1485xd!=null){_0x1485xd=_0x1485xd[_0xacc5[123]]();_0x1485xd[_0xacc5[125]]=_0x1485x23;_0x1485xd[_0xacc5[126]]=_0x1485x24;_0x1485x5[_0xacc5[102]]()[_0xacc5[128]](_0x1485x7,_0x1485xd)}}}}finally{_0x1485x5[_0xacc5[102]]()[_0xacc5[107]]()};if(_0x1485x25!=null){_0x1485x5[_0xacc5[59]](_0x1485x25);_0x1485x5[_0xacc5[243]](_0x1485x25[0])}}var _0x1485xc=_0xacc5[95];var _0x1485xb=_0x1485x5[_0xacc5[110]]()[_0xacc5[109]](_0x1485x5[_0xacc5[93]]());if(_0x1485xb!=null){_0x1485xc=_0x1485xb[_0xacc5[113]][mxConstants[_0xacc5[244]]]||_0x1485xc};_0x1485xc=mxUtils[_0xacc5[97]](mxResources[_0xacc5[26]](_0xacc5[96])+_0xacc5[118]+mxResources[_0xacc5[26]](_0xacc5[245])+_0xacc5[218],_0x1485xc);if(_0x1485xc!=null){if(_0x1485xc[_0xacc5[103]]>0){var _0x1485x27= new Image();_0x1485x27[_0xacc5[246]]=function(){_0x1485x22(_0x1485xc,_0x1485x27[_0xacc5[125]],_0x1485x27[_0xacc5[126]])};_0x1485x27[_0xacc5[247]]=function(){mxUtils[_0xacc5[249]](mxResources[_0xacc5[26]](_0xacc5[248]))};_0x1485x27[_0xacc5[250]]=_0x1485xc}}})};Actions[_0xacc5[4]][_0xacc5[10]]=function(_0x1485x1b,_0x1485x28,_0x1485x29,_0x1485x2a,_0x1485x2b){return this[_0xacc5[28]](_0x1485x1b, new Action(mxResources[_0xacc5[26]](_0x1485x1b),_0x1485x28,_0x1485x29,_0x1485x2a,_0x1485x2b))};Actions[_0xacc5[4]][_0xacc5[28]]=function(_0x1485x2c,_0x1485x15){this[_0xacc5[2]][_0x1485x2c]=_0x1485x15;return _0x1485x15};Actions[_0xacc5[4]][_0xacc5[26]]=function(_0x1485x2c){return this[_0xacc5[2]][_0x1485x2c]};function Action(_0x1485x2e,_0x1485x28,_0x1485x29,_0x1485x2a,_0x1485x2b){mxEventSource[_0xacc5[251]](this);this[_0xacc5[252]]=_0x1485x2e;this[_0xacc5[146]]=_0x1485x28;this[_0xacc5[253]]=(_0x1485x29!=null)?_0x1485x29:true;this[_0xacc5[254]]=_0x1485x2a;this[_0xacc5[255]]=_0x1485x2b}mxUtils[_0xacc5[256]](Action,mxEventSource);Action[_0xacc5[4]][_0xacc5[177]]=function(_0x1485xc){if(this[_0xacc5[253]]!=_0x1485xc){this[_0xacc5[253]]=_0x1485xc;this[_0xacc5[258]]( new mxEventObject(_0xacc5[257]))}};Action[_0xacc5[4]][_0xacc5[169]]=function(_0x1485xc){this[_0xacc5[259]]=_0x1485xc};Action[_0xacc5[4]][_0xacc5[170]]=function(_0x1485x28){this[_0xacc5[260]]=_0x1485x28};Action[_0xacc5[4]][_0xacc5[261]]=function(){return this[_0xacc5[260]]()}
\ No newline at end of file
+'use strict';
+/**
+ * $Id: Actions.js,v 1.7 2013-02-14 07:48:01 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs the actions object for the given UI.
+ */
+function Actions(editorUi) {
+       this.editorUi = editorUi;
+       this.actions = new Object();
+       this.init();
+};
+
+/**
+ * Adds the default actions.
+ */
+Actions.prototype.init = function() {
+       var ui = this.editorUi;
+       var editor = ui.editor;
+       var graph = editor.graph;
+
+       // File actions
+       this.addAction('new', function() {
+               ui.showDialog(new NewDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('open', function() {
+               ui.showDialog(new OpenDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('save', function() {
+               ui.saveFile(false);
+       }, null, null, 'Ctrl+S');
+       this.addAction('saveAs', function() {
+               ui.saveFile(true);
+       }, null, null, 'Ctrl+Shift-S');
+       this.addAction('publish', function() {
+               ui.publishFile(false);
+       }, null, null, 'Ctrl+Shift+P');
+       this.addAction('variable', function() {
+               ui.showDialog(new VariableDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('import', function() {
+               ui.showDialog(new ImportDialog(ui).container, 300, 200, true, true);
+       });
+       this.addAction('export', function() {
+               ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true);
+       }, null, null, 'Ctrl+E');
+       this.put('editFile', new Action(mxResources.get('edit'), mxUtils.bind(this,
+               function() {
+                       this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420,
+                               true, true);
+               })));
+       this.addAction('rename', function() {
+               ui.showDialog(new RenameDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('print', function() {
+               mxUtils.printScreen(graph);
+       }, null, 'sprite-print', 'Ctrl+P');
+       this.addAction('preview', function() {
+               mxUtils.show(graph, null, 10, 10);
+       });
+
+       // Edit actions
+       this.addAction('undo', function() {
+               editor.undoManager.undo();
+       }, null, 'sprite-undo', 'Ctrl+Z');
+       this.addAction('redo', function() {
+               editor.undoManager.redo();
+       }, null, 'sprite-redo', 'Ctrl+Y');
+       this.addAction('cut', function() {
+               mxClipboard.cut(graph);
+       }, null, 'sprite-cut', 'Ctrl+X');
+       this.addAction('copy', function() {
+               mxClipboard.copy(graph);
+       }, null, 'sprite-copy', 'Ctrl+C');
+       this.addAction('paste', function() {
+               mxClipboard.paste(graph);
+       }, false, 'sprite-paste', 'Ctrl+V');
+       this.addAction('delete', function() {
+               graph.removeCells();
+       }, null, null, 'Delete');
+       this.addAction('duplicate', function() {
+               var s = graph.gridSize;
+               graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s,
+                       true));
+       }, null, null, 'Ctrl+D');
+       this.addAction('selectVertices', function() {
+               graph.selectVertices();
+       }, null, null, 'Ctrl+Shift+V');
+       this.addAction('selectEdges', function() {
+               graph.selectEdges();
+       }, null, null, 'Ctrl+Shift+E');
+       this.addAction('selectAll', function() {
+               graph.selectAll();
+       }, null, null, 'Ctrl+A');
+
+       // Navigation actions
+       this.addAction('home', function() {
+               graph.home();
+       }, null, null, 'Home');
+       this.addAction('exitGroup', function() {
+               graph.exitGroup();
+       }, null, null, 'Page Up');
+       this.addAction('enterGroup', function() {
+               graph.enterGroup();
+       }, null, null, 'Page Down');
+       this.addAction('expand', function() {
+               graph.foldCells(false);
+       }, null, null, 'Enter');
+       this.addAction('collapse', function() {
+               graph.foldCells(true);
+       }, null, null, 'Backspace');
+
+       // Arrange actions
+       this.addAction('toFront', function() {
+               graph.orderCells(false);
+       }, null, null, 'Ctrl+F');
+       this.addAction('toBack', function() {
+               graph.orderCells(true);
+       }, null, null, 'Ctrl+B');
+       this.addAction('group', function() {
+               graph.setSelectionCell(graph.groupCells(null, 0));
+       }, null, null, 'Ctrl+G');
+       this.addAction('ungroup', function() {
+               graph.setSelectionCells(graph.ungroupCells());
+       }, null, null, 'Ctrl+U');
+       this.addAction('removeFromGroup', function() {
+               graph.removeCellsFromParent();
+       });
+       this.addAction('editLink', function() {
+               var cell = graph.getSelectionCell();
+               var link = graph.getLinkForCell(cell);
+
+               if (link == null) {
+                       link = '';
+               }
+
+               link = mxUtils.prompt(mxResources.get('enterValue'), link);
+
+               if (link != null) {
+                       graph.setLinkForCell(cell, link);
+               }
+       });
+       this.addAction('openLink', function() {
+               var cell = graph.getSelectionCell();
+               var link = graph.getLinkForCell(cell);
+
+               if (link != null) {
+                       window.open(link);
+               }
+       });
+       this.addAction('autosize', function() {
+               var cells = graph.getSelectionCells();
+
+               if (cells != null) {
+                       graph.getModel().beginUpdate();
+                       try {
+                               for (var i = 0; i < cells.length; i++) {
+                                       var cell = cells[i];
+
+                                       if (graph.getModel().getChildCount(cell)) {
+                                               graph.updateGroupBounds([cell], 20);
+                                       } else {
+                                               graph.updateCellSize(cell);
+                                       }
+                               }
+                       } finally {
+                               graph.getModel().endUpdate();
+                       }
+               }
+       });
+       this.addAction('wordWrap', function() {
+               var state = graph.getView().getState(graph.getSelectionCell());
+               var value = 'wrap';
+
+               if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap') {
+                       value = null;
+               }
+
+               graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
+       });
+       this.addAction('rotation', function() {
+               var value = '0';
+               var state = graph.getView().getState(graph.getSelectionCell());
+
+               if (state != null) {
+                       value = state.style[mxConstants.STYLE_ROTATION] || value;
+               }
+
+               value = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
+                       mxResources.get('rotation') + ' 0-360)', value);
+
+               if (value != null) {
+                       graph.setCellStyles(mxConstants.STYLE_ROTATION, value);
+               }
+       });
+       this.addAction('tilt', function() {
+               var cells = graph.getSelectionCells();
+
+               if (cells != null) {
+                       graph.getModel().beginUpdate();
+                       try {
+                               for (var i = 0; i < cells.length; i++) {
+                                       var cell = cells[i];
+
+                                       if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(
+                                                       cell) == 0) {
+                                               var geo = graph.getCellGeometry(cell);
+
+                                               if (geo != null) {
+                                                       // Rotates the size and position in the geometry
+                                                       geo = geo.clone();
+                                                       geo.x += geo.width / 2 - geo.height / 2;
+                                                       geo.y += geo.height / 2 - geo.width / 2;
+                                                       var tmp = geo.width;
+                                                       geo.width = geo.height;
+                                                       geo.height = tmp;
+                                                       graph.getModel().setGeometry(cell, geo);
+
+                                                       // Reads the current direction and advances by 90 degrees
+                                                       var state = graph.view.getState(cell);
+
+                                                       if (state != null) {
+                                                               var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east' /*default*/ ;
+
+                                                               if (dir == 'east') {
+                                                                       dir = 'south';
+                                                               } else if (dir == 'south') {
+                                                                       dir = 'west';
+                                                               } else if (dir == 'west') {
+                                                                       dir = 'north';
+                                                               } else if (dir == 'north') {
+                                                                       dir = 'east';
+                                                               }
+
+                                                               graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
+                                                       }
+                                               }
+                                       }
+                               }
+                       } finally {
+                               graph.getModel().endUpdate();
+                       }
+               }
+       }, null, null, 'Ctrl+R');
+
+       // View actions
+       this.addAction('actualSize', function() {
+               graph.zoomTo(1);
+       });
+       this.addAction('zoomIn', function() {
+               graph.zoomIn();
+       }, null, null, 'Add');
+       this.addAction('zoomOut', function() {
+               graph.zoomOut();
+       }, null, null, 'Subtract');
+       this.addAction('fitWindow', function() {
+               graph.fit();
+       });
+
+       this.addAction('fitPage', mxUtils.bind(this, function() {
+               if (!graph.pageVisible) {
+                       this.get('pageView').funct();
+               }
+
+               var fmt = graph.pageFormat;
+               var ps = graph.pageScale;
+               var cw = graph.container.clientWidth - 20;
+               var ch = graph.container.clientHeight - 20;
+
+               var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height /
+                       ps)) / 100;
+               graph.zoomTo(scale);
+
+               graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
+                       Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
+               );
+               graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
+                       Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
+                               2));
+       }));
+       this.addAction('fitPageWidth', mxUtils.bind(this, function() {
+               if (!graph.pageVisible) {
+                       this.get('pageView').funct();
+               }
+
+               var fmt = graph.pageFormat;
+               var ps = graph.pageScale;
+               var cw = graph.container.clientWidth - 20;
+
+               var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
+               graph.zoomTo(scale);
+
+               graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
+                       Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
+               );
+               graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
+                       Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
+                               2));
+       }));
+       this.put('customZoom', new Action(mxResources.get('custom'), function() {
+               var value = mxUtils.prompt(mxResources.get('enterValue') + ' (%)',
+                       parseInt(graph.getView().getScale() * 100));
+
+               if (value != null && value.length > 0 && !isNaN(parseInt(value))) {
+                       graph.zoomTo(parseInt(value) / 100);
+               }
+       }));
+
+       // Option actions
+       var action = null;
+       action = this.addAction('grid', function() {
+               graph.setGridEnabled(!graph.isGridEnabled());
+               editor.updateGraphComponents();
+       }, null, null, 'Ctrl+Shift+G');
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.isGridEnabled();
+       });
+       action = this.addAction('guides', function() {
+               graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled;
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.graphHandler.guidesEnabled;
+       });
+       action = this.addAction('tooltips', function() {
+               graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.tooltipHandler.isEnabled();
+       });
+       action = this.addAction('navigation', function() {
+               graph.foldingEnabled = !graph.foldingEnabled;
+               graph.view.revalidate();
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.foldingEnabled;
+       });
+       action = this.addAction('scrollbars', function() {
+               graph.scrollbars = !graph.scrollbars;
+               editor.updateGraphComponents();
+
+               if (!graph.scrollbars) {
+                       var t = graph.view.translate;
+                       graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale,
+                               t.y - graph.container.scrollTop / graph.view.scale);
+                       graph.container.scrollLeft = 0;
+                       graph.container.scrollTop = 0;
+                       graph.sizeDidChange();
+               } else {
+                       var dx = graph.view.translate.x;
+                       var dy = graph.view.translate.y;
+
+                       graph.view.translate.x = 0;
+                       graph.view.translate.y = 0;
+                       graph.sizeDidChange();
+                       graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
+                       graph.container.scrollTop -= Math.round(dy * graph.view.scale);
+               }
+       }, !mxClient.IS_TOUCH);
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.container.style.overflow == 'auto';
+       });
+       action = this.addAction('pageView', mxUtils.bind(this, function() {
+               graph.pageVisible = !graph.pageVisible;
+               graph.pageBreaksVisible = graph.pageVisible;
+               graph.preferPageSize = graph.pageBreaksVisible;
+               graph.view.validate();
+               graph.sizeDidChange();
+
+               editor.updateGraphComponents();
+               editor.outline.update();
+
+               if (mxUtils.hasScrollbars(graph.container)) {
+                       if (graph.pageVisible) {
+                               graph.container.scrollLeft -= 20;
+                               graph.container.scrollTop -= 20;
+                       } else {
+                               graph.container.scrollLeft += 20;
+                               graph.container.scrollTop += 20;
+                       }
+               }
+       }));
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.pageVisible;
+       });
+       action = this.addAction('connect', function() {
+               graph.setConnectable(!graph.connectionHandler.isEnabled());
+       }, null, null, 'Ctrl+Q');
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.connectionHandler.isEnabled();
+       });
+       action = this.addAction('copyConnect', function() {
+               graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.connectionHandler.isCreateTarget();
+       });
+
+       // Help actions
+       this.addAction('help', function() {
+               var ext = '';
+
+               if (mxResources.isLanguageSupported(mxClient.language)) {
+                       ext = '_' + mxClient.language;
+               }
+
+               window.open(RESOURCES_PATH + '/help' + ext + '.html');
+       });
+       this.put('about', new Action(mxResources.get('about') + ' Cally Square',
+               function() {
+                       ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
+               }, null, null, 'F1'));
+
+       // Font style actions
+       var toggleFontStyle = mxUtils.bind(this, function(key, style) {
+               this.addAction(key, function() {
+                       graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
+               });
+       });
+
+       toggleFontStyle('bold', mxConstants.FONT_BOLD);
+       toggleFontStyle('italic', mxConstants.FONT_ITALIC);
+       toggleFontStyle('underline', mxConstants.FONT_UNDERLINE);
+
+       // Format actions
+       this.addAction('shadow', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
+       });
+       this.addAction('dashed', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_DASHED);
+       });
+       this.addAction('rounded', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
+       });
+       this.addAction('curved', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_CURVED);
+       });
+       this.addAction('style', function() {
+               var cells = graph.getSelectionCells();
+
+               if (cells != null && cells.length > 0) {
+                       var model = graph.getModel();
+                       var style = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
+                               mxResources.get('style') + ')',
+                               model.getStyle(cells[0]) || '');
+
+                       if (style != null) {
+                               graph.setCellStyle(style, cells);
+                       }
+               }
+       });
+       this.addAction('setAsDefaultEdge', function() {
+               graph.setDefaultEdge(graph.getSelectionCell());
+       });
+       this.addAction('addWaypoint', function() {
+               var cell = graph.getSelectionCell();
+
+               if (cell != null && graph.getModel().isEdge(cell)) {
+                       var handler = editor.graph.selectionCellsHandler.getHandler(cell);
+
+                       if (handler instanceof mxEdgeHandler) {
+                               var t = graph.view.translate;
+                               var s = graph.view.scale;
+                               var dx = t.x;
+                               var dy = t.y;
+
+                               var parent = graph.getModel().getParent(cell);
+                               var pgeo = graph.getCellGeometry(parent);
+
+                               if (graph.getModel().isVertex(parent) && pgeo != null) {
+                                       dx += pgeo.x;
+                                       dy += pgeo.y;
+                               }
+
+                               handler.addPointAt(handler.state, graph.panningHandler.triggerX / s - dx,
+                                       graph.panningHandler.triggerY / s - dy);
+                       }
+               }
+       });
+       this.addAction('removeWaypoint', function() {
+               // TODO: Action should run with "this" set to action
+               var rmWaypointAction = ui.actions.get('removeWaypoint');
+
+               if (rmWaypointAction.handler != null) {
+                       // NOTE: Popupevent handled and action updated in Menus.createPopupMenu
+                       rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state,
+                               rmWaypointAction.index);
+               }
+       });
+       this.addAction('image', function() {
+               function updateImage(value, w, h) {
+                       var select = null;
+                       var cells = graph.getSelectionCells();
+
+                       graph.getModel().beginUpdate();
+                       try {
+                               // Inserts new cell if no cell is selected
+                               if (cells.length == 0) {
+                                       var gs = graph.getGridSize();
+                                       cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs,
+                                               w, h)];
+                                       select = cells;
+                               }
+
+                               graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
+                               graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
+
+                               if (graph.getSelectionCount() == 1) {
+                                       if (w != null && h != null) {
+                                               var cell = cells[0];
+                                               var geo = graph.getModel().getGeometry(cell);
+
+                                               if (geo != null) {
+                                                       geo = geo.clone();
+                                                       geo.width = w;
+                                                       geo.height = h;
+                                                       graph.getModel().setGeometry(cell, geo);
+                                               }
+                                       }
+                               }
+                       } finally {
+                               graph.getModel().endUpdate();
+                       }
+
+                       if (select != null) {
+                               graph.setSelectionCells(select);
+                               graph.scrollCellToVisible(select[0]);
+                       }
+               };
+
+               var value = '';
+               var state = graph.getView().getState(graph.getSelectionCell());
+
+               if (state != null) {
+                       value = state.style[mxConstants.STYLE_IMAGE] || value;
+               }
+
+               value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get(
+                       'url') + ')', value);
+
+               if (value != null) {
+                       if (value.length > 0) {
+                               var img = new Image();
+
+                               img.onload = function() {
+                                       updateImage(value, img.width, img.height);
+                               };
+                               img.onerror = function() {
+                                       mxUtils.alert(mxResources.get('fileNotFound'));
+                               };
+
+                               img.src = value;
+                       }
+               }
+       });
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut) {
+       return this.put(key, new Action(mxResources.get(key), funct, enabled, iconCls,
+               shortcut));
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.put = function(name, action) {
+       this.actions[name] = action;
+
+       return action;
+};
+
+/**
+ * Returns the action for the given name or null if no such action exists.
+ */
+Actions.prototype.get = function(name) {
+       return this.actions[name];
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Action(label, funct, enabled, iconCls, shortcut) {
+       mxEventSource.call(this);
+       this.label = label;
+       this.funct = funct;
+       this.enabled = (enabled != null) ? enabled : true;
+       this.iconCls = iconCls;
+       this.shortcut = shortcut;
+};
+
+// Action inherits from mxEventSource
+mxUtils.extend(Action, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setEnabled = function(value) {
+       if (this.enabled != value) {
+               this.enabled = value;
+               this.fireEvent(new mxEventObject('stateChanged'));
+       }
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setToggleAction = function(value) {
+       this.toggleAction = value;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setSelectedCallback = function(funct) {
+       this.selectedCallback = funct;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isSelected = function() {
+       return this.selectedCallback();
+};
index eabd38f..11d6772 100644 (file)
@@ -1 +1,1152 @@
-var _0xd2d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x6E\x70\x75\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x65\x63\x6B\x65\x64","\x47\x45\x54","\x6F\x70\x65\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x64\x61\x74\x61","\x65\x64\x69\x74\x6F\x72","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x73\x65\x6C\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x2D\x2D\x20\x4E\x6F\x6E\x65\x20\x2D\x2D","\x76\x61\x6C\x75\x65","\x30","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x72\x6F\x77\x73","\x73\x65\x6C\x65\x63\x74\x65\x64","\x66\x6F\x72\x45\x61\x63\x68","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x73\x65\x6C\x65\x63\x74\x32","\x66\x69\x6C\x74\x65\x72","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x66\x61\x74\x68\x65\x72","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6F\x6E","\x2D","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x62\x6F\x64\x79","\x72\x6F\x75\x6E\x64","\x6D\x61\x78","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x44\x69\x61\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x20\x63\x65\x6E\x74\x65\x72","\x64\x69\x73\x70\x6C\x61\x79","\x73\x74\x79\x6C\x65","\x62\x6C\x6F\x63\x6B","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x31\x32\x70\x78","\x67\x65\x4D\x6F\x64\x61\x6C\x44\x69\x61\x6C\x6F\x67","\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x62\x67","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x6E\x44\x69\x61\x6C\x6F\x67\x43\x6C\x6F\x73\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x6C\x6F\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74","\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79","\x6D\x6F\x64\x61\x6C\x2D\x66\x6F\x6F\x74\x65\x72","\x68\x34","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x69\x6D\x70\x6F\x72\x74","\x67\x65\x74","\x20\x58\x4D\x4C","\x77\x72\x69\x74\x65","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x62\x75\x74\x74\x6F\x6E","\x72\x6F\x77","\x63\x6F\x6C\x2D\x6D\x64\x2D\x31\x32","\x74\x65\x78\x74\x61\x72\x65\x61","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x33\x37\x34\x70\x78","\x66\x69\x6C\x65","\x61\x63\x63\x65\x70\x74","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x63\x68\x61\x6E\x67\x65","\x66\x69\x6C\x65\x73","\x74\x61\x72\x67\x65\x74","\x6C\x6F\x67","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x73\x75\x6C\x74","\x72\x65\x61\x64\x41\x73\x54\x65\x78\x74","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x6F\x72\x6D\x61\x74\x20\x66\x69\x6C\x65","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x62\x69\x6E\x64","\x62\x74\x6E\x20\x62\x6C\x75\x65","\x63\x61\x6E\x63\x65\x6C","\x62\x74\x6E\x20\x64\x65\x66\x61\x75\x6C\x74","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30\x70\x78","\x31\x37\x36","\x31\x35\x31","\x73\x72\x63","\x2F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x62\x72","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x6C\x61\x62\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x61","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D\x2F","\x5F\x62\x6C\x61\x6E\x6B","\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D","\x73\x61\x76\x65\x41\x73","\x6E\x61\x6D\x65","\x5F","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x6C\x61\x62\x65\x6C","\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C\x20\x70\x75\x6C\x6C\x2D\x72\x69\x67\x68\x74","\x5F\x63\x6F\x70\x79","\x69\x64","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C","\x73\x61\x76\x65","\x6E\x65\x77","\x5F\x6E\x65\x77","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x72\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x50\x55\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6E\x61\x6D\x65\x3D","\x50\x72\x6F\x6A\x65\x63\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6E\x61\x6D\x65\x64","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x6C\x65\x72\x74","\x65\x64\x69\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x64\x61\x74\x61\x54\x72\x61\x6E\x73\x66\x65\x72","\x64\x72\x61\x67\x6F\x76\x65\x72","\x64\x72\x6F\x70","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D","\x65\x78\x70\x6F\x72\x74","\x66\x6F\x72\x6D\x2D\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x20\x66\x6F\x72\x6D\x2D\x72\x6F\x77\x2D\x73\x65\x70\x65\x72\x61\x74\x65\x64","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70\x20\x6C\x61\x73\x74","\x63\x6F\x6C\x2D\x73\x6D\x2D\x34\x20\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C","\x63\x6F\x6C\x2D\x73\x6D\x2D\x38","\x67\x65\x74\x58\x6D\x6C","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x67\x72\x61\x70\x68","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x20\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x2D\x73\x63\x72\x6F\x6C\x6C","\x20","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x69\x6E\x70\x75\x74\x47\x72\x6F\x75\x70","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x54\x65\x78\x74","\x42\x6F\x64\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x49\x6E\x73\x65\x72\x74\x20\x6C\x61\x62\x65\x6C\x20\x66\x6F\x72\x20\x22\x4F\x74\x68\x65\x72\x22\x20\x61\x6E\x73\x77\x65\x72\x20\x6F\x70\x74\x69\x6F\x6E","\x6F\x74\x68\x65\x72","\x2B","\x62\x74\x6E\x20\x67\x72\x65\x65\x6E","\x61\x64\x64","\x68\x65\x6C\x70\x5F","\x70","\x68\x65\x6C\x70\x2D\x62\x6C\x6F\x63\x6B","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x6D\x6F\x64\x65\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x72\x65\x66\x72\x65\x73\x68","\x63\x6F\x6C\x2D\x6D\x64\x2D\x35","\x63\x6F\x6C\x2D\x6D\x64\x2D\x32","\x49\x6E\x73\x65\x72\x74\x20\x6C\x61\x62\x65\x6C","\x6E\x75\x6D\x62\x65\x72","\x78","\x70\x61\x72\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x62\x74\x6E\x20\x72\x65\x64"];_0xd2d8[0];function createCheckbox(_0xaf81x2){var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x3[_0xd2d8[5]](_0xd2d8[3],_0xd2d8[4]);if(_0xaf81x2){_0xaf81x3[_0xd2d8[5]](_0xd2d8[6],true)};return _0xaf81x3}function createDropdownFromApi(_0xaf81x5,_0xaf81x2,_0xaf81x6,_0xaf81x7,_0xaf81x8,_0xaf81x9){var _0xaf81xa= new XMLHttpRequest();_0xaf81xa[_0xd2d8[8]](_0xd2d8[7],_0xaf81x5,false);_0xaf81xa[_0xd2d8[14]](_0xd2d8[9],_0xd2d8[10]+_0xaf81x8[_0xd2d8[13]][_0xd2d8[12]][_0xd2d8[11]]);_0xaf81xa[_0xd2d8[15]](null);var _0xaf81xb=[];if(_0xaf81xa[_0xd2d8[16]]===200){_0xaf81xb=JSON[_0xd2d8[18]](_0xaf81xa[_0xd2d8[17]])};var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[19]);var _0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[21]]=_0xd2d8[22];_0xaf81xc[_0xd2d8[23]]=_0xd2d8[24];_0xaf81x3[_0xd2d8[25]](_0xaf81xc);var _0xaf81xd=_0xaf81x9?_0xaf81xb[_0xd2d8[26]]:_0xaf81xb;_0xaf81xd[_0xd2d8[28]](function(_0xaf81xe){_0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[21]]=_0xaf81xe[_0xaf81x6];_0xaf81xc[_0xd2d8[23]]=_0xaf81xe[_0xaf81x7];_0xaf81xc[_0xd2d8[27]]=(_0xaf81xe[_0xaf81x7]==_0xaf81x2);_0xaf81x3[_0xd2d8[25]](_0xaf81xc)});_0xaf81x3[_0xd2d8[29]]=_0xd2d8[30];return _0xaf81x3}function createGroupedDropdownFromApi(_0xaf81x5,_0xaf81x2,_0xaf81x6,_0xaf81x7,_0xaf81x8,_0xaf81x9,_0xaf81x10){var _0xaf81xa= new XMLHttpRequest();_0xaf81xa[_0xd2d8[8]](_0xd2d8[7],_0xaf81x5,false);_0xaf81xa[_0xd2d8[14]](_0xd2d8[9],_0xd2d8[10]+_0xaf81x8[_0xd2d8[13]][_0xd2d8[12]][_0xd2d8[11]]);_0xaf81xa[_0xd2d8[15]](null);var _0xaf81xb=[];if(_0xaf81xa[_0xd2d8[16]]===200){_0xaf81xb=JSON[_0xd2d8[18]](_0xaf81xa[_0xd2d8[17]])};var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[19]);var _0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[21]]=_0xd2d8[22];_0xaf81xc[_0xd2d8[23]]=_0xd2d8[24];_0xaf81x3[_0xd2d8[25]](_0xaf81xc);var _0xaf81xd=_0xaf81x9?_0xaf81xb[_0xd2d8[26]]:_0xaf81xb;var _0xaf81x11={};var _0xaf81x12={};_0xaf81x11[_0xaf81x10]=null;var _0xaf81x13=_[_0xd2d8[31]](_0xaf81xd,_0xaf81x11);var _0xaf81x14={};_0xaf81x13[_0xd2d8[28]](function(_0xaf81xe){_0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[29]]=_0xd2d8[32];_0xaf81xc[_0xd2d8[21]]=_0xaf81xe[_0xaf81x6][_0xd2d8[33]]();_0xaf81xc[_0xd2d8[23]]=_0xaf81xe[_0xaf81x7];_0xaf81xc[_0xd2d8[27]]=(_0xaf81xe[_0xaf81x7]==_0xaf81x2);_0xaf81x3[_0xd2d8[25]](_0xaf81xc);_0xaf81x12[_0xaf81x10]=_0xaf81xe[_0xaf81x7];_0xaf81x14=_[_0xd2d8[31]](_0xaf81xd,_0xaf81x12);_0xaf81x14[_0xd2d8[28]](function(_0xaf81xe){_0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[29]]=_0xd2d8[34];_0xaf81xc[_0xd2d8[21]]=_0xd2d8[35]+_[_0xd2d8[36]](_0xaf81xe[_0xaf81x6]);_0xaf81xc[_0xd2d8[23]]=_0xaf81xe[_0xaf81x7];_0xaf81xc[_0xd2d8[27]]=(_0xaf81xe[_0xaf81x7]==_0xaf81x2);_0xaf81x3[_0xd2d8[25]](_0xaf81xc)})});_0xaf81x3[_0xd2d8[29]]=_0xd2d8[30];return _0xaf81x3}function createDropdownFromArray(_0xaf81x16,_0xaf81x2){var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[19]);for(var _0xaf81x17 in _0xaf81x16){var _0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[21]]=_0xaf81x16[_0xaf81x17];_0xaf81xc[_0xd2d8[23]]=_0xaf81x17;if(_0xaf81x2>0||_0xaf81x2!=_0xd2d8[37]){_0xaf81xc[_0xd2d8[27]]=(_0xaf81x2===_0xaf81x17)?true:false};_0xaf81x3[_0xd2d8[25]](_0xaf81xc)};_0xaf81x3[_0xd2d8[29]]=_0xd2d8[30];return _0xaf81x3}function Dialog(_0xaf81x8,_0xaf81x19,_0xaf81x1a,_0xaf81x1b,_0xaf81x1c,_0xaf81x1d,_0xaf81x1e){var _0xaf81x1f=0;if(mxClient[_0xd2d8[38]]&&document[_0xd2d8[39]]!=9){_0xaf81x1f=60};_0xaf81x1a+=_0xaf81x1f;_0xaf81x1b+=_0xaf81x1f;var _0xaf81x20=Math[_0xd2d8[43]](0,Math[_0xd2d8[42]]((document[_0xd2d8[41]][_0xd2d8[40]]-_0xaf81x1a)/2));var _0xaf81x21=Math[_0xd2d8[43]](0,Math[_0xd2d8[42]]((Math[_0xd2d8[43]](document[_0xd2d8[41]][_0xd2d8[44]],document[_0xd2d8[45]][_0xd2d8[44]])-_0xaf81x1b)/3));var _0xaf81x22=_0xaf81x8[_0xd2d8[47]](_0xd2d8[46]);_0xaf81x22[_0xd2d8[29]]=_0xd2d8[48];_0xaf81x22[_0xd2d8[50]][_0xd2d8[49]]=_0xd2d8[51];_0xaf81x22[_0xd2d8[50]][_0xd2d8[52]]=_0xd2d8[53];var _0xaf81x23=_0xaf81x8[_0xd2d8[47]](_0xd2d8[54]);_0xaf81x23[_0xd2d8[29]]=_0xd2d8[55];_0xaf81x23[_0xd2d8[25]](_0xaf81x19);_0xaf81x22[_0xd2d8[25]](_0xaf81x23);if(this[_0xd2d8[56]]==null){this[_0xd2d8[56]]=_0xaf81x8[_0xd2d8[47]](_0xd2d8[57]);this[_0xd2d8[56]][_0xd2d8[29]]=_0xd2d8[58];if(mxClient[_0xd2d8[59]]){ new mxDivResizer(this[_0xd2d8[56]])}};if(_0xaf81x1c){document[_0xd2d8[41]][_0xd2d8[25]](this[_0xd2d8[56]])};document[_0xd2d8[41]][_0xd2d8[25]](_0xaf81x22);this[_0xd2d8[60]]=_0xaf81x1e;this[_0xd2d8[61]]=_0xaf81x22}Dialog[_0xd2d8[63]][_0xd2d8[62]]=function(){if(this[_0xd2d8[60]]!=null){this[_0xd2d8[60]]();this[_0xd2d8[60]]=null};this[_0xd2d8[61]][_0xd2d8[65]][_0xd2d8[64]](this[_0xd2d8[61]]);this[_0xd2d8[56]][_0xd2d8[65]][_0xd2d8[64]](this[_0xd2d8[56]])};function ImportDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[72])+_0xd2d8[74]);var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x2b=_0xaf81x8[_0xd2d8[47]](_0xd2d8[78]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[79]);var _0xaf81x2d=document[_0xd2d8[2]](_0xd2d8[80]);_0xaf81x2d[_0xd2d8[50]][_0xd2d8[81]]=_0xd2d8[82];_0xaf81x2d[_0xd2d8[50]][_0xd2d8[83]]=_0xd2d8[84];var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x3[_0xd2d8[3]]=_0xd2d8[85];_0xaf81x3[_0xd2d8[5]](_0xd2d8[86],_0xd2d8[87]);_0xaf81x3[_0xd2d8[97]](_0xd2d8[88],function _0xaf81x2e(_0xaf81x2f){var _0xaf81x30=_0xaf81x2f[_0xd2d8[90]][_0xd2d8[89]][0];console[_0xd2d8[91]](_0xaf81x30);if(_0xaf81x30){if(_0xaf81x30[_0xd2d8[3]]===_0xd2d8[87]){var _0xaf81x31= new FileReader();_0xaf81x31[_0xd2d8[92]]=function(_0xaf81x32){var _0xaf81x33=_0xaf81x32[_0xd2d8[90]][_0xd2d8[93]];mxUtils[_0xd2d8[75]](_0xaf81x2d,_0xaf81x33)};_0xaf81x31[_0xd2d8[94]](_0xaf81x30)}else {alert(_0xd2d8[95])}}else {alert(_0xd2d8[96])}},false);_0xaf81x2c[_0xd2d8[25]](_0xaf81x3);_0xaf81x2c[_0xd2d8[25]](_0xaf81x2d);_0xaf81x2b[_0xd2d8[25]](_0xaf81x2c);_0xaf81x27[_0xd2d8[25]](_0xaf81x2b);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[72]),mxUtils[_0xd2d8[100]](this,function(_0xaf81x35){var _0xaf81x36=mxUtils[_0xd2d8[98]](_0xaf81x2d[_0xd2d8[23]]);_0xaf81x8[_0xd2d8[13]][_0xd2d8[99]](_0xaf81x36[_0xd2d8[45]]);_0xaf81x8[_0xd2d8[76]]()}));_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function AboutDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[104])+_0xd2d8[105]);var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x39=document[_0xd2d8[2]](_0xd2d8[106]);_0xaf81x39[_0xd2d8[50]][_0xd2d8[107]]=_0xd2d8[108];_0xaf81x39[_0xd2d8[5]](_0xd2d8[81],_0xd2d8[109]);_0xaf81x39[_0xd2d8[5]](_0xd2d8[81],_0xd2d8[110]);_0xaf81x39[_0xd2d8[5]](_0xd2d8[111],IMAGE_PATH+_0xd2d8[112]);_0xaf81x27[_0xd2d8[25]](_0xaf81x39);mxUtils[_0xd2d8[113]](_0xaf81x27);mxUtils[_0xd2d8[75]](_0xaf81x27,_0xd2d8[114]+mxClient[_0xd2d8[115]]);mxUtils[_0xd2d8[113]](_0xaf81x27);var _0xaf81x3a=document[_0xd2d8[2]](_0xd2d8[116]);_0xaf81x3a[_0xd2d8[5]](_0xd2d8[117],_0xd2d8[118]);_0xaf81x3a[_0xd2d8[5]](_0xd2d8[90],_0xd2d8[119]);mxUtils[_0xd2d8[75]](_0xaf81x3a,_0xd2d8[120]);_0xaf81x27[_0xd2d8[25]](_0xaf81x3a);mxUtils[_0xd2d8[113]](_0xaf81x27);mxUtils[_0xd2d8[113]](_0xaf81x27);var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[62]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function SaveDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[121]));var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x3c=_0xd2d8[122];var _0xaf81x3d=_0xd2d8[123]+_0xaf81x3c;var _0xaf81x2=_0xaf81x8[_0xd2d8[13]][_0xd2d8[124]]();var _0xaf81x2b=_0xaf81x8[_0xd2d8[47]](_0xd2d8[78]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[125]);var _0xaf81x3e=_0xaf81x8[_0xd2d8[47]](_0xd2d8[126]);var _0xaf81x3f=document[_0xd2d8[2]](_0xd2d8[127]);_0xaf81x3f[_0xd2d8[29]]=_0xd2d8[128];mxUtils[_0xd2d8[75]](_0xaf81x3f,mxResources[_0xd2d8[73]](_0xaf81x3c));_0xaf81x2c[_0xd2d8[25]](_0xaf81x3f);var _0xaf81x40=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x40[_0xd2d8[5]](_0xd2d8[23],_0xaf81x2+_0xd2d8[129]);_0xaf81x40[_0xd2d8[5]](_0xd2d8[130],_0xaf81x3d);_0xaf81x40[_0xd2d8[29]]=_0xd2d8[131];_0xaf81x3e[_0xd2d8[25]](_0xaf81x40);_0xaf81x2b[_0xd2d8[25]](_0xaf81x2c);_0xaf81x2b[_0xd2d8[25]](_0xaf81x3e);_0xaf81x27[_0xd2d8[25]](_0xaf81x2b);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[132]),function(){_0xaf81x8[_0xd2d8[121]](_0xaf81x40[_0xd2d8[23]]);_0xaf81x8[_0xd2d8[76]]()});_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function NewDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[133]));var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x3c=_0xd2d8[122];var _0xaf81x3d=_0xd2d8[123]+_0xaf81x3c;var _0xaf81x2=_0xaf81x8[_0xd2d8[13]][_0xd2d8[124]]();var _0xaf81x2b=_0xaf81x8[_0xd2d8[47]](_0xd2d8[78]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[125]);var _0xaf81x3e=_0xaf81x8[_0xd2d8[47]](_0xd2d8[126]);var _0xaf81x3f=document[_0xd2d8[2]](_0xd2d8[127]);_0xaf81x3f[_0xd2d8[29]]=_0xd2d8[128];mxUtils[_0xd2d8[75]](_0xaf81x3f,mxResources[_0xd2d8[73]](_0xaf81x3c));_0xaf81x2c[_0xd2d8[25]](_0xaf81x3f);var _0xaf81x40=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x40[_0xd2d8[5]](_0xd2d8[23],_0xaf81x2+_0xd2d8[134]);_0xaf81x40[_0xd2d8[5]](_0xd2d8[130],_0xaf81x3d);_0xaf81x40[_0xd2d8[29]]=_0xd2d8[131];_0xaf81x3e[_0xd2d8[25]](_0xaf81x40);_0xaf81x2b[_0xd2d8[25]](_0xaf81x2c);_0xaf81x2b[_0xd2d8[25]](_0xaf81x3e);_0xaf81x27[_0xd2d8[25]](_0xaf81x2b);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[133]),function(){_0xaf81x8[_0xd2d8[133]](_0xaf81x40[_0xd2d8[23]]);_0xaf81x8[_0xd2d8[76]]()});_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function VariableDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[135]));var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x3c=_0xd2d8[122];var _0xaf81x3d=_0xd2d8[123]+_0xaf81x3c;var _0xaf81x2=_0xaf81x8[_0xd2d8[13]][_0xd2d8[124]]();var _0xaf81x2b=_0xaf81x8[_0xd2d8[47]](_0xd2d8[78]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[125]);var _0xaf81x3e=_0xaf81x8[_0xd2d8[47]](_0xd2d8[126]);var _0xaf81x3f=document[_0xd2d8[2]](_0xd2d8[127]);_0xaf81x3f[_0xd2d8[29]]=_0xd2d8[128];mxUtils[_0xd2d8[75]](_0xaf81x3f,mxResources[_0xd2d8[73]](_0xaf81x3c));_0xaf81x2c[_0xd2d8[25]](_0xaf81x3f);var _0xaf81x40=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x40[_0xd2d8[5]](_0xd2d8[23],_0xd2d8[136]);_0xaf81x40[_0xd2d8[5]](_0xd2d8[130],_0xaf81x3d);_0xaf81x40[_0xd2d8[29]]=_0xd2d8[131];_0xaf81x3e[_0xd2d8[25]](_0xaf81x40);_0xaf81x2b[_0xd2d8[25]](_0xaf81x2c);_0xaf81x2b[_0xd2d8[25]](_0xaf81x3e);_0xaf81x27[_0xd2d8[25]](_0xaf81x2b);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[133]),function(){_0xaf81x8[_0xd2d8[135]](_0xaf81x40[_0xd2d8[23]]);_0xaf81x8[_0xd2d8[76]]()});_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function OpenDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[8]));var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x2b=_0xaf81x8[_0xd2d8[47]](_0xd2d8[78]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[125]);var _0xaf81x3e=_0xaf81x8[_0xd2d8[47]](_0xd2d8[126]);var _0xaf81x3f=document[_0xd2d8[2]](_0xd2d8[127]);_0xaf81x3f[_0xd2d8[29]]=_0xd2d8[128];mxUtils[_0xd2d8[75]](_0xaf81x3f,mxResources[_0xd2d8[73]](_0xd2d8[122]));_0xaf81x2c[_0xd2d8[25]](_0xaf81x3f);var _0xaf81xa= new XMLHttpRequest();_0xaf81xa[_0xd2d8[8]](_0xd2d8[7],_0xd2d8[137],false);_0xaf81xa[_0xd2d8[14]](_0xd2d8[9],_0xd2d8[10]+_0xaf81x8[_0xd2d8[13]][_0xd2d8[12]][_0xd2d8[11]]);_0xaf81xa[_0xd2d8[15]](null);var _0xaf81xb=[];if(_0xaf81xa[_0xd2d8[16]]===200){_0xaf81xb=JSON[_0xd2d8[18]](_0xaf81xa[_0xd2d8[17]])};var _0xaf81x40=document[_0xd2d8[2]](_0xd2d8[19]);for(var _0xaf81x44=0;_0xaf81x44<_0xaf81xb[_0xd2d8[138]];_0xaf81x44++){var _0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[21]]=_0xaf81xb[_0xaf81x44][_0xd2d8[122]];_0xaf81xc[_0xd2d8[23]]=_0xaf81xb[_0xaf81x44][_0xd2d8[130]];_0xaf81x40[_0xd2d8[25]](_0xaf81xc)};_0xaf81x40[_0xd2d8[29]]=_0xd2d8[131];_0xaf81x3e[_0xd2d8[25]](_0xaf81x40);_0xaf81x2b[_0xd2d8[25]](_0xaf81x2c);_0xaf81x2b[_0xd2d8[25]](_0xaf81x3e);_0xaf81x27[_0xd2d8[25]](_0xaf81x2b);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[8]),function(){console[_0xd2d8[91]](_0xaf81x40);console[_0xd2d8[91]](_0xaf81x40[_0xd2d8[23]]);window[_0xd2d8[8]](_0xd2d8[139]+_0xaf81x40[_0xd2d8[23]],_0xd2d8[119]);_0xaf81x8[_0xd2d8[76]]()});_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function RenameDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[140]));var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x2b=_0xaf81x8[_0xd2d8[47]](_0xd2d8[78]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[125]);var _0xaf81x3e=_0xaf81x8[_0xd2d8[47]](_0xd2d8[126]);var _0xaf81x3f=document[_0xd2d8[2]](_0xd2d8[127]);_0xaf81x3f[_0xd2d8[29]]=_0xd2d8[128];mxUtils[_0xd2d8[75]](_0xaf81x3f,mxResources[_0xd2d8[73]](_0xd2d8[122]));_0xaf81x2c[_0xd2d8[25]](_0xaf81x3f);var _0xaf81x3c=_0xaf81x8[_0xd2d8[13]][_0xd2d8[141]];var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x3[_0xd2d8[5]](_0xd2d8[23],_0xaf81x3c);_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];_0xaf81x3e[_0xd2d8[25]](_0xaf81x3);_0xaf81x2b[_0xd2d8[25]](_0xaf81x2c);_0xaf81x2b[_0xd2d8[25]](_0xaf81x3e);_0xaf81x27[_0xd2d8[25]](_0xaf81x2b);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[132]),function(){var _0xaf81xa= new XMLHttpRequest();_0xaf81xa[_0xd2d8[8]](_0xd2d8[142],SAVE_URL+_0xaf81x8[_0xd2d8[13]][_0xd2d8[12]][_0xd2d8[130]],true);_0xaf81xa[_0xd2d8[14]](_0xd2d8[143],_0xd2d8[144]);_0xaf81xa[_0xd2d8[14]](_0xd2d8[9],_0xd2d8[10]+_0xaf81x8[_0xd2d8[13]][_0xd2d8[12]][_0xd2d8[11]]);_0xaf81xa[_0xd2d8[15]](_0xd2d8[145]+_0xaf81x3[_0xd2d8[23]]);_0xaf81xa[_0xd2d8[92]]=function(_0xaf81x32){if(_0xaf81xa[_0xd2d8[16]]===200){_0xaf81x8[_0xd2d8[13]][_0xd2d8[147]](_0xd2d8[146]);_0xaf81x8[_0xd2d8[13]][_0xd2d8[141]]=_0xaf81x3[_0xd2d8[23]]}else {_0xaf81x8[_0xd2d8[13]][_0xd2d8[147]](JSON[_0xd2d8[18]](_0xaf81xa[_0xd2d8[17]])[_0xd2d8[149]][0][_0xd2d8[148]])}};_0xaf81xa[_0xd2d8[150]]=function(_0xaf81x32){mxUtils[_0xd2d8[152]](_0xaf81xa[_0xd2d8[151]])};_0xaf81x8[_0xd2d8[76]]()});_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function EditFileDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[68]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[153]));var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x2b=_0xaf81x8[_0xd2d8[47]](_0xd2d8[78]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[79]);var _0xaf81x2d=document[_0xd2d8[2]](_0xd2d8[80]);_0xaf81x2d[_0xd2d8[50]][_0xd2d8[81]]=_0xd2d8[82];_0xaf81x2d[_0xd2d8[50]][_0xd2d8[83]]=_0xd2d8[84];_0xaf81x2d[_0xd2d8[23]]=mxUtils[_0xd2d8[155]](_0xaf81x8[_0xd2d8[13]][_0xd2d8[154]]());if(fileSupport){function _0xaf81x47(_0xaf81x2f){_0xaf81x2f[_0xd2d8[156]]();_0xaf81x2f[_0xd2d8[157]]();if(_0xaf81x2f[_0xd2d8[158]][_0xd2d8[89]][_0xd2d8[138]]>0){var _0xaf81x48=_0xaf81x2f[_0xd2d8[158]][_0xd2d8[89]][0];var _0xaf81x49= new FileReader();_0xaf81x49[_0xd2d8[92]]=function(_0xaf81x32){_0xaf81x2d[_0xd2d8[23]]=_0xaf81x32[_0xd2d8[90]][_0xd2d8[93]]};_0xaf81x49[_0xd2d8[94]](_0xaf81x48)}}function _0xaf81x4a(_0xaf81x2f){_0xaf81x2f[_0xd2d8[156]]();_0xaf81x2f[_0xd2d8[157]]()}_0xaf81x2d[_0xd2d8[97]](_0xd2d8[159],_0xaf81x4a,false);_0xaf81x2d[_0xd2d8[97]](_0xd2d8[160],_0xaf81x47,false)};_0xaf81x2c[_0xd2d8[25]](_0xaf81x2d);_0xaf81x2b[_0xd2d8[25]](_0xaf81x2c);_0xaf81x27[_0xd2d8[25]](_0xaf81x2b);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[132]),function(){var _0xaf81x36=mxUtils[_0xd2d8[98]](_0xaf81x2d[_0xd2d8[23]]);_0xaf81x8[_0xd2d8[13]][_0xd2d8[99]](_0xaf81x36[_0xd2d8[45]]);_0xaf81x8[_0xd2d8[76]]()});_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function ExportDialog(_0xaf81x8){var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[161]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[162])+_0xd2d8[74]);var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x4c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[163]);var _0xaf81x4d=_0xaf81x8[_0xd2d8[47]](_0xd2d8[164]);var _0xaf81x3f=document[_0xd2d8[2]](_0xd2d8[127]);_0xaf81x3f[_0xd2d8[29]]=_0xd2d8[165];mxUtils[_0xd2d8[75]](_0xaf81x3f,mxResources[_0xd2d8[73]](_0xd2d8[141]));var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x3[_0xd2d8[5]](_0xd2d8[23],_0xaf81x8[_0xd2d8[13]][_0xd2d8[124]]());_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];var _0xaf81x22=_0xaf81x8[_0xd2d8[47]](_0xd2d8[166]);_0xaf81x22[_0xd2d8[25]](_0xaf81x3);_0xaf81x4d[_0xd2d8[25]](_0xaf81x3f);_0xaf81x4d[_0xd2d8[25]](_0xaf81x22);_0xaf81x4c[_0xd2d8[25]](_0xaf81x4d);_0xaf81x27[_0xd2d8[25]](_0xaf81x4c);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[162]),mxUtils[_0xd2d8[100]](this,function(_0xaf81x35){_0xaf81x8[_0xd2d8[132]](false);var _0xaf81x4e=encodeURIComponent(mxUtils[_0xd2d8[167]](_0xaf81x8[_0xd2d8[13]][_0xd2d8[154]]())); new mxXmlRequest(SAVE_URL+_0xaf81x8[_0xd2d8[13]][_0xd2d8[12]][_0xd2d8[130]]+_0xd2d8[169],_0xd2d8[170]+_0xaf81x3[_0xd2d8[23]],_0xd2d8[7])[_0xd2d8[168]](document,_0xd2d8[119]);_0xaf81x8[_0xd2d8[76]]()}));_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function GeneralDialog(_0xaf81x8,_0xaf81x50){var _0xaf81x51=_0xaf81x8[_0xd2d8[13]][_0xd2d8[171]];var _0xaf81x25=_0xaf81x8[_0xd2d8[47]](_0xd2d8[66]);var _0xaf81x26=_0xaf81x8[_0xd2d8[47]](_0xd2d8[67]);var _0xaf81x27=_0xaf81x8[_0xd2d8[47]](_0xd2d8[172]);var _0xaf81x28=_0xaf81x8[_0xd2d8[47]](_0xd2d8[69]);var _0xaf81x29=_0xaf81x8[_0xd2d8[71]](_0xd2d8[70]);mxUtils[_0xd2d8[75]](_0xaf81x29,mxResources[_0xd2d8[73]](_0xd2d8[153])+_0xd2d8[173]+mxResources[_0xd2d8[73]](_0xaf81x50[_0xd2d8[23]][_0xd2d8[174]]));var _0xaf81x2a=mxUtils[_0xd2d8[77]](_0xd2d8[37],function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x2a[_0xd2d8[29]]=_0xd2d8[62];_0xaf81x26[_0xd2d8[25]](_0xaf81x2a);_0xaf81x26[_0xd2d8[25]](_0xaf81x29);var _0xaf81x52=_0xaf81x8[_0xd2d8[47]](_0xd2d8[163]);_0xaf81x52[_0xd2d8[5]](_0xd2d8[130],_0xd2d8[175]);var _0xaf81x53=_0xaf81x50[_0xd2d8[23]][_0xd2d8[176]][_0xd2d8[138]];var _0xaf81x4c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[163]);for(var _0xaf81x54=0;_0xaf81x54<_0xaf81x53;_0xaf81x54++){var _0xaf81x3c=_0xaf81x50[_0xd2d8[23]][_0xd2d8[176]][_0xaf81x54][_0xd2d8[122]];var _0xaf81x3d=_0xd2d8[123]+_0xaf81x3c;var _0xaf81x2=_0xaf81x50[_0xd2d8[23]][_0xd2d8[176]][_0xaf81x54][_0xd2d8[23]];var _0xaf81x4d=_0xaf81x8[_0xd2d8[47]]((_0xaf81x54==_0xaf81x53-1)?_0xd2d8[164]:_0xd2d8[177]);var _0xaf81x3f=document[_0xd2d8[2]](_0xd2d8[127]);_0xaf81x3f[_0xd2d8[29]]=_0xd2d8[165];mxUtils[_0xd2d8[75]](_0xaf81x3f,mxResources[_0xd2d8[73]](_0xaf81x3c));_0xaf81x4d[_0xd2d8[25]](_0xaf81x3f);var _0xaf81x3;switch(_0xaf81x3c){case _0xd2d8[179]:_0xaf81x3=document[_0xd2d8[2]](_0xd2d8[80]);_0xaf81x3[_0xd2d8[178]]=_0xaf81x2;_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];break;case _0xd2d8[180]:_0xaf81x3=document[_0xd2d8[2]](_0xd2d8[80]);_0xaf81x3[_0xd2d8[178]]=_0xaf81x2;_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];break;case _0xd2d8[181]:_0xaf81x3=document[_0xd2d8[2]](_0xd2d8[80]);_0xaf81x3[_0xd2d8[178]]=_0xaf81x2;_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];break;case _0xd2d8[184]:_0xaf81x3=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x3[_0xd2d8[5]](_0xd2d8[23],_0xaf81x2);_0xaf81x3[_0xd2d8[5]](_0xd2d8[182],_0xd2d8[183]);_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];break;case _0xd2d8[187]:var _0xaf81x3=mxUtils[_0xd2d8[77]](_0xd2d8[185],function(){var _0xaf81x55=createDynamicInput(null,null,_0xaf81x8);_0xaf81x52[_0xd2d8[25]](_0xaf81x55);_0xaf81x27[_0xd2d8[25]](_0xaf81x52)});_0xaf81x3[_0xd2d8[29]]=_0xd2d8[186];break;default:_0xaf81x3=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x3[_0xd2d8[5]](_0xd2d8[23],_0xaf81x2);_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];break};_0xaf81x3[_0xd2d8[5]](_0xd2d8[130],_0xaf81x3d);var _0xaf81x22=_0xaf81x8[_0xd2d8[47]](_0xd2d8[166]);_0xaf81x22[_0xd2d8[25]](_0xaf81x3);if(mxResources[_0xd2d8[73]](_0xd2d8[188]+_0xaf81x3c)){var _0xaf81x56=_0xaf81x8[_0xd2d8[47]](_0xd2d8[189]);_0xaf81x56[_0xd2d8[29]]=_0xd2d8[190];mxUtils[_0xd2d8[75]](_0xaf81x56,mxResources[_0xd2d8[73]](_0xd2d8[188]+_0xaf81x3c));_0xaf81x22[_0xd2d8[25]](_0xaf81x56)};_0xaf81x4d[_0xd2d8[25]](_0xaf81x22);_0xaf81x4c[_0xd2d8[25]](_0xaf81x4d)};_0xaf81x27[_0xd2d8[25]](_0xaf81x4c);if(_0xaf81x50[_0xd2d8[23]][_0xd2d8[174]]==_0xd2d8[1]){if(_0xaf81x50[_0xd2d8[191]]){for(var _0xaf81x44=0;_0xaf81x44<_0xaf81x50[_0xd2d8[191]][_0xd2d8[138]];_0xaf81x44++){var _0xaf81x57=_0xd2d8[37];var _0xaf81x58=_0xd2d8[37];_[_0xd2d8[28]](_0xaf81x50[_0xd2d8[191]][_0xaf81x44][_0xd2d8[23]][_0xd2d8[176]],function(_0xaf81x59){if(_0xaf81x59[_0xd2d8[122]]==_0xd2d8[3]){_0xaf81x57=_0xaf81x59[_0xd2d8[23]]}else {if(_0xaf81x59[_0xd2d8[122]]==_0xd2d8[127]){_0xaf81x58=_0xaf81x59[_0xd2d8[23]]}}});var _0xaf81x55=createDynamicInput(_0xaf81x57,_0xaf81x58,_0xaf81x8);_0xaf81x52[_0xd2d8[25]](_0xaf81x55)}}};_0xaf81x27[_0xd2d8[25]](_0xaf81x52);var _0xaf81x34=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[132]),mxUtils[_0xd2d8[100]](this,function(_0xaf81x35){for(var _0xaf81x54=0;_0xaf81x54<_0xaf81x50[_0xd2d8[23]][_0xd2d8[176]][_0xd2d8[138]];_0xaf81x54++){var _0xaf81x3d=_0xd2d8[123]+_0xaf81x50[_0xd2d8[23]][_0xd2d8[176]][_0xaf81x54][_0xd2d8[122]];var _0xaf81x3c=_0xaf81x50[_0xd2d8[23]][_0xd2d8[176]][_0xaf81x54][_0xd2d8[122]];console[_0xd2d8[91]](_0xaf81x3c);_0xaf81x50[_0xd2d8[5]](_0xaf81x3c,document[_0xd2d8[192]](_0xaf81x3d)[_0xd2d8[23]]);console[_0xd2d8[91]](document[_0xd2d8[192]](_0xaf81x3d)[_0xd2d8[23]])};if(_0xaf81x50[_0xd2d8[23]][_0xd2d8[174]]==_0xd2d8[1]){if(_0xaf81x51[_0xd2d8[194]][_0xd2d8[193]](_0xaf81x50)){_0xaf81x50[_0xd2d8[191]]=[]};if(document[_0xd2d8[192]](_0xd2d8[175])){var _0xaf81x52=document[_0xd2d8[192]](_0xd2d8[175])[_0xd2d8[191]];for(var _0xaf81x44=0;_0xaf81x44<_0xaf81x52[_0xd2d8[138]];_0xaf81x44++){var _0xaf81x5a=_0xaf81x52[_0xaf81x44][_0xd2d8[191]][1];var _0xaf81x5b=_0xaf81x52[_0xaf81x44][_0xd2d8[191]][0];var _0xaf81x36=mxUtils[_0xd2d8[195]]();var _0xaf81x5c=_0xaf81x36[_0xd2d8[2]](_0xd2d8[175]);_0xaf81x5c[_0xd2d8[5]](_0xd2d8[3],_0xaf81x52[_0xaf81x44][_0xd2d8[196]](_0xd2d8[19])[0][_0xd2d8[23]]);_0xaf81x5c[_0xd2d8[5]](_0xd2d8[127],_0xaf81x52[_0xaf81x44][_0xd2d8[196]](_0xd2d8[1])[0][_0xd2d8[23]]);var _0xaf81x5d= new mxCell(_0xaf81x5c);_0xaf81x51[_0xd2d8[194]][_0xd2d8[187]](_0xaf81x50,_0xaf81x5d)}}};_0xaf81x51[_0xd2d8[197]](_0xaf81x50);_0xaf81x8[_0xd2d8[76]]()}));_0xaf81x34[_0xd2d8[29]]=_0xd2d8[101];var _0xaf81x37=mxUtils[_0xd2d8[77]](mxResources[_0xd2d8[73]](_0xd2d8[102]),function(){_0xaf81x8[_0xd2d8[76]]()});_0xaf81x37[_0xd2d8[29]]=_0xd2d8[103];_0xaf81x28[_0xd2d8[25]](_0xaf81x34);_0xaf81x28[_0xd2d8[25]](_0xaf81x37);_0xaf81x25[_0xd2d8[25]](_0xaf81x26);_0xaf81x25[_0xd2d8[25]](_0xaf81x27);_0xaf81x25[_0xd2d8[25]](_0xaf81x28);this[_0xd2d8[61]]=_0xaf81x25}function createDynamicInput(_0xaf81x57,_0xaf81x58,_0xaf81x8){var _0xaf81x55=_0xaf81x8[_0xd2d8[47]](_0xd2d8[177]);var _0xaf81x2c=_0xaf81x8[_0xd2d8[47]](_0xd2d8[198]);var _0xaf81x3e=_0xaf81x8[_0xd2d8[47]](_0xd2d8[198]);var _0xaf81x5f=_0xaf81x8[_0xd2d8[47]](_0xd2d8[199]);var _0xaf81x3=document[_0xd2d8[2]](_0xd2d8[1]);_0xaf81x3[_0xd2d8[5]](_0xd2d8[182],_0xd2d8[200]);_0xaf81x3[_0xd2d8[23]]=_0xaf81x58;_0xaf81x3[_0xd2d8[29]]=_0xd2d8[131];_0xaf81x2c[_0xd2d8[25]](_0xaf81x3);var _0xaf81x40=document[_0xd2d8[2]](_0xd2d8[19]);var _0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[21]]=_0xd2d8[22];_0xaf81xc[_0xd2d8[23]]=_0xd2d8[37];_0xaf81x40[_0xd2d8[25]](_0xaf81xc);var _0xaf81xd=[_0xd2d8[21],_0xd2d8[201],_0xd2d8[80],_0xd2d8[4]];_0xaf81xd[_0xd2d8[28]](function(_0xaf81xe){_0xaf81xc=document[_0xd2d8[2]](_0xd2d8[20]);_0xaf81xc[_0xd2d8[21]]=_0xaf81xe;_0xaf81xc[_0xd2d8[23]]=_0xaf81xe;_0xaf81xc[_0xd2d8[27]]=(_0xaf81xe==_0xaf81x57);_0xaf81x40[_0xd2d8[25]](_0xaf81xc)});_0xaf81x40[_0xd2d8[29]]=_0xd2d8[131];_0xaf81x3e[_0xd2d8[25]](_0xaf81x40);var _0xaf81x60=mxUtils[_0xd2d8[77]](_0xd2d8[202],function(){var _0xaf81x61=_0xaf81x60[_0xd2d8[203]];var _0xaf81x62=_0xaf81x61[_0xd2d8[203]];document[_0xd2d8[192]](_0xd2d8[175])[_0xd2d8[64]](_0xaf81x62)});_0xaf81x60[_0xd2d8[29]]=_0xd2d8[204];_0xaf81x5f[_0xd2d8[25]](_0xaf81x60);_0xaf81x55[_0xd2d8[25]](_0xaf81x2c);_0xaf81x55[_0xd2d8[25]](_0xaf81x3e);_0xaf81x55[_0xd2d8[25]](_0xaf81x5f);return _0xaf81x55}
\ No newline at end of file
+'use strict';
+/**
+ * $Id: Dialogs.js,v 1.5 2013-01-29 17:23:31 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new dialog.
+ */
+
+function createCheckbox(value) {
+       var input = document.createElement('input');
+       input.setAttribute('type', 'checkbox');
+       if (value) {
+               input.setAttribute('checked', true);
+       }
+       return input;
+}
+
+function createDropdownFromApi(path, value, option_name, option_value, editorUi, paginated) {
+       var req = new XMLHttpRequest();
+       req.open('GET', path, false); // `false` makes the request synchronous
+       req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+       req.send(null);
+       var res = [];
+       if (req.status === 200) {
+               res = JSON.parse(req.response);
+       }
+       var input = document.createElement('select');
+       var option = document.createElement('option');
+       option.text = '-- None --';
+       option.value = '0';
+       input.appendChild(option);
+       var selectValues = paginated ? res.rows : res;
+       selectValues.forEach(function(elem) {
+               option = document.createElement('option');
+               option.text = elem[option_name];
+               option.value = elem[option_value];
+               option.selected = (elem[option_value] == value);
+               input.appendChild(option);
+       });
+       input.className = 'form-control select2';
+
+       return input;
+}
+
+function createGroupedDropdownFromApi(path, value, option_name, option_value, editorUi, paginated, associationField) {
+       var req = new XMLHttpRequest();
+       req.open('GET', path, false); // `false` makes the request synchronous
+       req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+       req.send(null);
+       var res = [];
+       if (req.status === 200) {
+               res = JSON.parse(req.response);
+       }
+       var input = document.createElement('select');
+       var option = document.createElement('option');
+       option.text = '-- None --';
+       option.value = '0';
+       input.appendChild(option);
+       var selectValues = paginated ? res.rows : res;
+       var mainFilter = {};
+       var groupFilter = {};
+       mainFilter[associationField] = null;
+       var mainValues = _.filter(selectValues, mainFilter);
+       var groupValues = {};
+       mainValues.forEach(function(elem) {
+               option = document.createElement('option');
+               option.className = 'select-group-father';
+               option.text = elem[option_name].toUpperCase();
+               option.value = elem[option_value];
+               option.selected = (elem[option_value] == value);
+               input.appendChild(option);
+               groupFilter[associationField] = elem[option_value];
+               groupValues = _.filter(selectValues, groupFilter);
+               groupValues.forEach(function(elem) {
+                       option = document.createElement('option');
+                       option.className = 'select-group-son';
+                       option.text = '-' + _.capitalize(elem[option_name]);
+                       option.value = elem[option_value];
+                       option.selected = (elem[option_value] == value);
+                       input.appendChild(option);
+               });
+       })
+       input.className = 'form-control select2';
+
+       return input;
+}
+
+function createDropdownFromArray(array, value) {
+       var input = document.createElement('select');
+
+       for (var item in array) {
+               var option = document.createElement('option');
+               option.text = array[item];
+               option.value = item;
+               if (value > 0 || value != '')
+                       option.selected = (value === item) ? true : false;
+
+               input.appendChild(option);
+       }
+
+       input.className = 'form-control select2';
+
+       return input;
+}
+
+function Dialog(editorUi, elt, w, h, modal, closable, onClose) {
+       var dx = 0;
+
+       if (mxClient.IS_IE && document.documentMode != 9) {
+               dx = 60;
+       }
+
+       w += dx;
+       h += dx;
+
+       var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
+       var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight,
+               document.documentElement.scrollHeight) - h) / 3));
+
+       var div = editorUi.createDiv('geDialog');
+       div.className = 'modal fade in center';
+       div.style.display = 'block';
+       div.style.paddingRight = '12px';
+       // div.style.width = w + 'px';
+       // div.style.height = h + 'px';
+       // div.style.left = left + 'px';
+       // div.style.top = top + 'px';
+
+       var divModalDialog = editorUi.createDiv('geModalDialog');
+       divModalDialog.className = 'modal-dialog';
+       divModalDialog.appendChild(elt);
+       div.appendChild(divModalDialog);
+
+       if (this.bg == null) {
+               this.bg = editorUi.createDiv('background');
+               this.bg.className = 'modal-backdrop fade in';
+
+               if (mxClient.IS_QUIRKS) {
+                       new mxDivResizer(this.bg);
+               }
+       }
+
+       if (modal) {
+               document.body.appendChild(this.bg);
+       }
+
+       document.body.appendChild(div);
+
+       this.onDialogClose = onClose;
+       this.container = div;
+};
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function() {
+       if (this.onDialogClose != null) {
+               this.onDialogClose();
+               this.onDialogClose = null;
+       }
+
+       this.container.parentNode.removeChild(this.container);
+       this.bg.parentNode.removeChild(this.bg);
+};
+
+/**
+ * Constructs a new open dialog.
+ */
+function ImportDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('import') + ' XML');
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-12');
+
+       var textarea = document.createElement('textarea');
+       textarea.style.width = '100%';
+       textarea.style.height = '374px';
+
+       var input = document.createElement('input');
+       input.type = 'file';
+       input.setAttribute('accept', 'text/xml');
+
+       input.addEventListener('change', function readSingleFile(evt) {
+               //Retrieve the first (and only!) File from the FileList object
+               var f = evt.target.files[0];
+               console.log(f);
+               if (f) {
+                       if (f.type === 'text/xml') {
+                               var r = new FileReader();
+                               r.onload = function(e) {
+                                       var contents = e.target.result;
+                                       mxUtils.write(textarea, contents);
+                               };
+                               r.readAsText(f);
+                       } else {
+                               alert('Failed to load format file');
+                       }
+               } else {
+                       alert('Failed to load file');
+               }
+       }, false);
+
+       col1.appendChild(input);
+       col1.appendChild(textarea);
+
+       row.appendChild(col1);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('import'), mxUtils.bind(this,
+               function(data) {
+                       var doc = mxUtils.parseXml(textarea.value);
+                       editorUi.editor.setGraphXml(doc.documentElement);
+                       editorUi.hideDialog();
+               }));
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+
+};
+
+/**
+ * Constructs a new about dialog.
+ */
+function AboutDialog(editorUi) {
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('about') + ' Cally Square');
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var img = document.createElement('img');
+       img.style.border = '0px';
+       img.setAttribute('width', '176');
+       img.setAttribute('width', '151');
+       img.setAttribute('src', IMAGE_PATH + '/logo.png');
+       body.appendChild(img);
+       mxUtils.br(body);
+       mxUtils.write(body, 'Powered by Xenialab ' + mxClient.VERSION);
+       mxUtils.br(body);
+       var link = document.createElement('a');
+       link.setAttribute('href', 'http://www.callysquare.com/');
+       link.setAttribute('target', '_blank');
+       mxUtils.write(link, 'www.callysquare.com');
+       body.appendChild(link);
+       mxUtils.br(body);
+       mxUtils.br(body);
+       //--- END BODY
+
+       var close = mxUtils.button(mxResources.get('close'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function SaveDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('saveAs'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var name = 'name';
+       var id = '_' + name;
+       var value = editorUi.editor.getOrCreateFilename();
+
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get(name));
+       col1.appendChild(label);
+
+       var select = document.createElement('input');
+       select.setAttribute('value', value + '_copy');
+       select.setAttribute('id', id)
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), function() {
+               editorUi.saveAs(select.value);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function NewDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('new'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var name = 'name';
+       var id = '_' + name;
+       var value = editorUi.editor.getOrCreateFilename();
+
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get(name));
+       col1.appendChild(label);
+
+       var select = document.createElement('input');
+       select.setAttribute('value', value + '_new');
+       select.setAttribute('id', id)
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('new'), function() {
+               editorUi.new(select.value);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function VariableDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('variable'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var name = 'name';
+       var id = '_' + name;
+       var value = editorUi.editor.getOrCreateFilename();
+
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get(name));
+       col1.appendChild(label);
+
+       var select = document.createElement('input');
+       select.setAttribute('value', 'variable name');
+       select.setAttribute('id', id)
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('new'), function() {
+               editorUi.variable(select.value);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function OpenDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('open'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get('name'));
+       col1.appendChild(label);
+
+       var req = new XMLHttpRequest();
+       req.open('GET', '/api/jscripty/projects', false); // `false` makes the request synchronous
+       req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+       req.send(null);
+       var res = [];
+       if (req.status === 200) {
+               res = JSON.parse(req.response);
+       }
+
+       var select = document.createElement('select');
+
+       for (var j = 0; j < res.length; j++) {
+               var option = document.createElement('option');
+               option.text = res[j].name;
+               option.value = res[j].id;
+               select.appendChild(option);
+       }
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('open'), function() {
+               console.log(select);
+               console.log(select.value);
+               window.open('jscripty/project/' + select.value, '_blank');
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new rename dialog.
+ */
+function RenameDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('rename'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get('name'));
+       col1.appendChild(label);
+       var name = editorUi.editor.filename;
+       var input = document.createElement('input');
+       input.setAttribute('value', name);
+       input.className = 'form-control';
+
+       col2.appendChild(input);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), function() {
+               var req = new XMLHttpRequest();
+
+               req.open("PUT", SAVE_URL + editorUi.editor.data.id, true);
+               req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+               req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+               req.send('name=' + input.value);
+
+               req.onload = function(e) {
+                       if (req.status === 200) {
+                               editorUi.editor.setStatus('Project successfully renamed');
+                               editorUi.editor.filename = input.value;
+
+                       } else {
+                               editorUi.editor.setStatus(JSON.parse(req.response).errors[0].message)
+                       }
+               }
+               req.onerror = function(e) {
+                       mxUtils.alert(req.statusText);
+               };
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+/**
+ * Constructs a new edit file dialog.
+ */
+function EditFileDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('edit'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-12');
+
+       var textarea = document.createElement('textarea');
+       textarea.style.width = '100%';
+       textarea.style.height = '374px';
+       textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
+
+       // Enables dropping files
+       if (fileSupport) {
+               function handleDrop(evt) {
+                       evt.stopPropagation();
+                       evt.preventDefault();
+
+                       if (evt.dataTransfer.files.length > 0) {
+                               var file = evt.dataTransfer.files[0];
+
+                               var reader = new FileReader();
+                               reader.onload = function(e) {
+                                       textarea.value = e.target.result;
+                               };
+                               reader.readAsText(file);
+                       }
+               };
+
+               function handleDragOver(evt) {
+                       evt.stopPropagation();
+                       evt.preventDefault();
+               };
+
+               // Setup the dnd listeners.
+               textarea.addEventListener('dragover', handleDragOver, false);
+               textarea.addEventListener('drop', handleDrop, false);
+       }
+       col1.appendChild(textarea);
+
+       row.appendChild(col1);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), function() {
+               var doc = mxUtils.parseXml(textarea.value);
+               editorUi.editor.setGraphXml(doc.documentElement);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
+
+/**
+ * Constructs a new export dialog.
+ */
+function ExportDialog(editorUi) {
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body form');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('export') + ' XML');
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var form = editorUi.createDiv('form-horizontal form-row-seperated');
+       var group = editorUi.createDiv('form-group last');
+
+       var label = document.createElement('label');
+       label.className = 'col-sm-4 control-label';
+       mxUtils.write(label, mxResources.get('filename'));
+
+       var input = document.createElement('input');
+       input.setAttribute('value', editorUi.editor.getOrCreateFilename());
+       input.className = 'form-control';
+
+       var div = editorUi.createDiv('col-sm-8');
+       div.appendChild(input);
+
+       group.appendChild(label);
+       group.appendChild(div);
+       form.appendChild(group);
+
+       body.appendChild(form);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('export'), mxUtils.bind(this,
+               function(data) {
+                       editorUi.save(false);
+
+                       var xml = encodeURIComponent(mxUtils.getXml(editorUi.editor.getGraphXml()));
+                       new mxXmlRequest(SAVE_URL + editorUi.editor.data.id + '/download',
+                               'filename=' + input.value, 'GET').simulate(document, "_blank");
+                       editorUi.hideDialog();
+               }));
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
+
+/**
+ * Giuseppe Careri
+ * Constructs a new general dialog.
+ */
+
+function GeneralDialog(editorUi, cell) {
+       var graph = editorUi.editor.graph;
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body form modal-body-scroll');
+       var footer = editorUi.createDiv('modal-footer');
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('edit') + ' ' + mxResources.get(cell.value
+               .nodeName));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var inputGroup = editorUi.createDiv('form-horizontal form-row-seperated');
+       inputGroup.setAttribute('id', 'inputGroup');
+       var length = cell.value.attributes.length;
+       var form = editorUi.createDiv('form-horizontal form-row-seperated');
+
+       for (var i = 0; i < length; i++) {
+               var name = cell.value.attributes[i].name;
+               var id = '_' + name;
+               var value = cell.value.attributes[i].value;
+
+               var group = editorUi.createDiv((i == length - 1) ? 'form-group last' :
+                       'form-group');
+
+               var label = document.createElement('label');
+               label.className = 'col-sm-4 control-label';
+               mxUtils.write(label, mxResources.get(name));
+               group.appendChild(label);
+
+               var input;
+
+               switch (name) {
+
+                       case 'Text':
+                               input = document.createElement('textarea');
+                               input.innerHTML = value;
+                               input.className = 'form-control';
+                               break;
+                       case 'Body':
+                               input = document.createElement('textarea');
+                               input.innerHTML = value;
+                               input.className = 'form-control';
+                               break;
+                       case 'question':
+                               input = document.createElement('textarea');
+                               input.innerHTML = value;
+                               input.className = 'form-control';
+
+                               break;
+                       case 'other':
+                               input = document.createElement('input');
+                               input.setAttribute('value', value);
+                               input.setAttribute('placeholder', 'Insert label for "Other" answer option');
+                               input.className = 'form-control';
+                               break;
+                               // case 'addtext':
+                               //      var input = document.createElement('input');
+                               //      input.setAttribute('type', 'checkbox');
+                               //      console.log('value', value);
+                               //      if (value == 'true') {
+                               //              input.setAttribute('checked', true);
+                               //
+                               //      } else {
+                               //              input.removeAttribute("checked");
+                               //
+                               //      }
+                               //      // input.value = input.checked;
+                               //
+                               //      input.onclick = function() {
+                               //              this.value = this.checked;
+                               //
+                               //              console.log(input);
+                               //              if (this.checked) {
+                               //                      console.log(this.checked);
+                               //                      var rowdiv = editorUi.createDiv('form-group');
+                               //                      rowdiv.setAttribute('id', 'rowdiv');
+                               //                      var col1 = editorUi.createDiv('col-md-4');
+                               //                      var col2 = editorUi.createDiv('col-md-8');
+                               //                      var label = document.createElement('label');
+                               //                      // input.setAttribute('placeholder', 'Insert label');
+                               //                      label.className = 'pull-right control-label';
+                               //                      mxUtils.write(label, 'Texarea Label');
+                               //                      col1.appendChild(label);
+                               //                      var input = document.createElement('input');
+                               //                      // input.setAttribute('placeholder', 'Insert label');
+                               //                      // input.value = inputValue;
+                               //                      input.className = 'form-control';
+                               //                      col2.appendChild(input);
+                               //                      rowdiv.appendChild(col1);
+                               //                      rowdiv.appendChild(col2);
+                               //                      inputGroup.appendChild(rowdiv);
+                               //                      body.appendChild(inputGroup);
+                               //              } else {
+                               //                      console.log(this.checked);
+                               //                      document.getElementById('inputGroup').removeChild(document.getElementById('rowdiv'));
+                               //              }
+                               //      };
+                               //
+                               //
+                               //      input.className = 'btn green';
+                               //      break;
+                       case 'add':
+                               var input = mxUtils.button('+', function() {
+                                       var rowdiv = createDynamicInput(null, null, editorUi);
+                                       inputGroup.appendChild(rowdiv);
+                                       body.appendChild(inputGroup);
+                               })
+
+                               input.className = 'btn green';
+                               break;
+                       default:
+                               input = document.createElement('input');
+                               input.setAttribute('value', value);
+                               input.className = 'form-control';
+                               break;
+               }
+
+               input.setAttribute('id', id)
+               var div = editorUi.createDiv('col-sm-8');
+               div.appendChild(input);
+               // Help
+               if (mxResources.get('help_' + name)) {
+                       var help = editorUi.createDiv('p');
+                       help.className = 'help-block';
+                       mxUtils.write(help, mxResources.get('help_' + name));
+                       div.appendChild(help);
+               }
+
+               group.appendChild(div);
+               form.appendChild(group);
+       }
+       body.appendChild(form);
+       // console.log(cell);
+       if (cell.value.nodeName == 'input') {
+
+               if (cell.children) {
+                       for (var j = 0; j < cell.children.length; j++) {
+                               var selectValue = '';
+                               var inputValue = '';
+                               _.forEach(cell.children[j].value.attributes, function(element) {
+                                       // console.log(element);
+                                       if (element.name == 'type') {
+                                               selectValue = element.value;
+
+                                       } else if (element.name == 'label') {
+                                               inputValue = element.value;
+
+                                       }
+                               })
+                               var rowdiv = createDynamicInput(selectValue, inputValue, editorUi);
+                               inputGroup.appendChild(rowdiv);
+
+                       }
+               }
+
+       }
+       body.appendChild(inputGroup);
+
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), mxUtils.bind(this,
+               function(data) {
+                       for (var i = 0; i < cell.value.attributes.length; i++) {
+                               var id = '_' + cell.value.attributes[i].name;
+                               var name = cell.value.attributes[i].name;
+                               console.log(name);
+
+                               cell.setAttribute(name, document.getElementById(id).value);
+                               console.log(document.getElementById(id).value);
+
+
+                       };
+
+                       if (cell.value.nodeName == 'input') {
+                               if (graph.model.getChildCount(cell)) {
+                                       cell.children = [];
+                               }
+                               if (document.getElementById('inputGroup')) {
+                                       var inputGroup = document.getElementById('inputGroup').children;
+                                       for (var j = 0; j < inputGroup.length; j++) {
+
+                                               var divSelect = inputGroup[j].children[1];
+                                               var divInput = inputGroup[j].children[0];
+                                               var doc = mxUtils.createXmlDocument();
+                                               var node = doc.createElement('inputGroup');
+                                               node.setAttribute('type', inputGroup[j].getElementsByTagName('select')[0].value);
+                                               node.setAttribute('label', inputGroup[j].getElementsByTagName('input')[0].value);
+                                               var cells = new mxCell(node);
+                                               graph.model.add(cell, cells);
+                                       }
+                               }
+                       }
+
+                       graph.refresh(cell);
+                       editorUi.hideDialog();
+               }));
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
+
+
+
+function createDynamicInput(selectValue, inputValue, editorUi) {
+
+       var rowdiv = editorUi.createDiv('form-group');
+       var col1 = editorUi.createDiv('col-md-5');
+       var col2 = editorUi.createDiv('col-md-5');
+       var col3 = editorUi.createDiv('col-md-2');
+
+       var input = document.createElement('input');
+       input.setAttribute('placeholder', 'Insert label');
+       input.value = inputValue;
+       input.className = 'form-control';
+       col1.appendChild(input);
+
+       var select = document.createElement('select');
+       var option = document.createElement('option');
+       option.text = '-- None --';
+       option.value = '';
+       select.appendChild(option);
+
+       var selectValues = ['text', 'number', 'textarea', 'checkbox'];
+       selectValues.forEach(function(elem) {
+               option = document.createElement('option');
+               option.text = elem;
+               option.value = elem;
+               option.selected = (elem == selectValue);
+               select.appendChild(option);
+       })
+       select.className = 'form-control';
+       col2.appendChild(select);
+       var button = mxUtils.button('x', function() {
+               var buttonParent = button.parentElement;
+               var divParent = buttonParent.parentElement;
+               document.getElementById('inputGroup').removeChild(divParent);
+       })
+
+       button.className = 'btn red';
+       col3.appendChild(button);
+       rowdiv.appendChild(col1);
+       rowdiv.appendChild(col2);
+       rowdiv.appendChild(col3);
+       return rowdiv;
+
+
+}
index 23229ed..9858989 100644 (file)
@@ -1 +1,888 @@
-var _0x99ed=["\x49\x53\x5F\x54\x4F\x55\x43\x48","\x73\x74\x6F\x72\x61\x67\x65","\x6C\x6F\x63\x61\x6C","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x46\x69\x6C\x65","\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72","\x46\x69\x6C\x65\x4C\x69\x73\x74","\x74\x6F\x75\x63\x68","\x31","\x6F\x70\x65\x6E\x65\x72","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x61\x6C\x6C","\x69\x6E\x69\x74","\x69\x6E\x69\x74\x53\x74\x65\x6E\x63\x69\x6C\x52\x65\x67\x69\x73\x74\x72\x79","\x67\x72\x61\x70\x68","\x6F\x75\x74\x6C\x69\x6E\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x74\x61\x74\x75\x73","","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x64\x72\x61\x77\x69\x6E\x67","\x67\x65\x74","\x2E\x78\x6D\x6C","\x67\x65\x74\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x67\x72\x61\x70\x68\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x70\x70\x6C\x79","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x73\x4C\x6F\x73\x74","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E\x64","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x2F\x67\x72\x69\x64\x2E\x67\x69\x66","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x73\x63\x61\x6C\x65","\x76\x69\x65\x77","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x30","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x67\x75\x69\x64\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x66\x6F\x6C\x64","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x78","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x64\x78","\x79","\x64\x79","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x63\x6F\x64\x65","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x65\x6E\x63\x6F\x64\x65","\x72\x6F\x75\x6E\x64","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x6E\x6F\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x66\x69\x6C\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x23\x65\x62\x65\x62\x65\x62","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x73\x6F\x6C\x69\x64","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x23\x65\x35\x65\x35\x65\x35","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x31\x70\x78","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x30\x70\x78","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x61\x75\x74\x6F","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x6E\x6F\x64\x65","\x49\x53\x5F\x49\x45\x36","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x67\x72\x61\x70\x68\x65\x64\x69\x74\x6F\x72\x2D\x69\x65\x36\x2E\x63\x73\x73","\x6C\x69\x6E\x6B","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x61\x64\x64","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x23\x64\x30\x64\x30\x64\x30","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x39\x39\x63\x63\x66\x66","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x38\x38\x63\x66","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x61\x38\x66\x66","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x63\x65\x65\x37\x66\x66","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x47\x55\x49\x44\x45\x5F\x43\x4F\x4C\x4F\x52","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x23\x63\x30\x63\x30\x63\x30","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x77\x68\x69\x74\x65","\x23\x63\x61\x63\x61\x63\x61","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x6D\x61\x78","\x63\x65\x69\x6C","\x70\x61\x6E\x47\x72\x61\x70\x68","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65","\x73\x72\x63","\x64\x65\x73\x74\x72\x6F\x79","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x72\x65\x64\x72\x61\x77","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x68\x69\x64\x65","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x62\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x69\x6E\x74\x73","\x69\x73\x44\x61\x73\x68\x65\x64","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x61\x64\x64\x50\x69\x70\x65","\x73\x70\x6C\x69\x63\x65","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x72\x65\x6C\x61\x74\x69\x76\x65","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6F\x6E\x73\x75\x6D\x65","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C","\x67\x65\x74\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x65\x64\x69\x74","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x67\x65\x74\x56\x69\x65\x77","\x63\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x74\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x6C\x69\x62\x72\x61\x72\x69\x65\x73","\x70\x61\x63\x6B\x61\x67\x65\x73","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x67\x65\x74\x42\x61\x73\x65\x6E\x61\x6D\x65\x46\x6F\x72\x53\x74\x65\x6E\x63\x69\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x2E\x6A\x73","\x6C\x6F\x61\x64","\x67\x65\x74\x54\x65\x78\x74","\x2F","\x2E","\x73\x70\x6C\x69\x74","\x6D\x78\x67\x72\x61\x70\x68","\x67\x65\x74\x58\x6D\x6C","\x70\x61\x72\x73\x65\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6E\x61\x6D\x65","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x5F","\x72\x65\x70\x6C\x61\x63\x65","\x61\x64\x64\x53\x74\x65\x6E\x63\x69\x6C","\x77","\x68","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x70\x72\x6F\x64\x75\x63\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x72","\x64\x6F\x6E\x65","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x65\x78\x65\x63\x75\x74\x65","\x73\x65\x74\x44\x61\x74\x61","\x64\x61\x74\x61","\x65\x72\x72\x6F\x72","\x63\x61\x6E\x63\x65\x6C","\x61\x6C\x65\x72\x74"];var useLocalStorage=(mxClient[_0x99ed[0]]||urlParams[_0x99ed[1]]==_0x99ed[2])&& typeof (localStorage)!=_0x99ed[3];var fileSupport=window[_0x99ed[4]]!=null&&window[_0x99ed[5]]!=null&&window[_0x99ed[6]]!=null;var touchStyle=mxClient[_0x99ed[0]]||urlParams[_0x99ed[7]]==_0x99ed[8];var counter=0;try{var op=window;while(op[_0x99ed[9]]!=null&&!isNaN(op[_0x99ed[9]][_0x99ed[10]])){op=op[_0x99ed[9]]};if(op!=null){op[_0x99ed[10]]++;counter=op[_0x99ed[10]]}}catch(e){};Editor=function(){mxEventSource[_0x99ed[11]](this);this[_0x99ed[12]]();this[_0x99ed[13]]();this[_0x99ed[14]]= new Graph();this[_0x99ed[15]]= new mxOutline(this[_0x99ed[14]]);this[_0x99ed[15]][_0x99ed[16]]=true;this[_0x99ed[17]]=this[_0x99ed[18]]();this[_0x99ed[19]]=_0x99ed[20];this[_0x99ed[21]]=null;this[_0x99ed[22]]=function(){return this[_0x99ed[21]]||mxResources[_0x99ed[24]](_0x99ed[23],[counter])+_0x99ed[25]};this[_0x99ed[26]]=function(){return this[_0x99ed[21]]};this[_0x99ed[27]]=function(_0x504fx6){this[_0x99ed[19]]=_0x504fx6;this[_0x99ed[29]]( new mxEventObject(_0x99ed[28]))};this[_0x99ed[30]]=function(){return this[_0x99ed[19]]};this[_0x99ed[31]]=false;this[_0x99ed[32]]=function(){this[_0x99ed[31]]=true};this[_0x99ed[14]][_0x99ed[36]]()[_0x99ed[35]](mxEvent.CHANGE,mxUtils[_0x99ed[34]](this,function(){this[_0x99ed[32]][_0x99ed[33]](this,arguments)}));window[_0x99ed[37]]=mxUtils[_0x99ed[34]](this,function(){if(this[_0x99ed[31]]){return mxResources[_0x99ed[24]](_0x99ed[38])}});this[_0x99ed[14]][_0x99ed[39]]=false;this[_0x99ed[14]][_0x99ed[40]]=true;this[_0x99ed[14]][_0x99ed[41]]=null};mxUtils[_0x99ed[42]](Editor,mxEventSource);Editor[_0x99ed[44]][_0x99ed[43]]=IMAGE_PATH+_0x99ed[45];Editor[_0x99ed[44]][_0x99ed[46]]=IMAGE_PATH+_0x99ed[47];Editor[_0x99ed[44]][_0x99ed[48]]=function(_0x504fx7){var _0x504fx8= new mxCodec(_0x504fx7[_0x99ed[49]]);if(_0x504fx7[_0x99ed[50]]==_0x99ed[51]){this[_0x99ed[14]][_0x99ed[53]][_0x99ed[52]]=1;this[_0x99ed[14]][_0x99ed[54]]=_0x504fx7[_0x99ed[56]](_0x99ed[55])!=_0x99ed[57];this[_0x99ed[14]][_0x99ed[59]][_0x99ed[58]]=_0x504fx7[_0x99ed[56]](_0x99ed[60])!=_0x99ed[57];this[_0x99ed[14]][_0x99ed[62]](_0x504fx7[_0x99ed[56]](_0x99ed[61])!=_0x99ed[57]);this[_0x99ed[14]][_0x99ed[64]](_0x504fx7[_0x99ed[56]](_0x99ed[63])!=_0x99ed[57]);this[_0x99ed[14]][_0x99ed[65]]=_0x504fx7[_0x99ed[56]](_0x99ed[66])!=_0x99ed[57];this[_0x99ed[14]][_0x99ed[40]]=_0x504fx7[_0x99ed[56]](_0x99ed[40])!=_0x99ed[57];if(!this[_0x99ed[14]][_0x99ed[40]]){this[_0x99ed[14]][_0x99ed[68]][_0x99ed[67]]=0;this[_0x99ed[14]][_0x99ed[68]][_0x99ed[69]]=0;this[_0x99ed[14]][_0x99ed[53]][_0x99ed[71]][_0x99ed[70]]=Number(_0x504fx7[_0x99ed[56]](_0x99ed[72])||0);this[_0x99ed[14]][_0x99ed[53]][_0x99ed[71]][_0x99ed[73]]=Number(_0x504fx7[_0x99ed[56]](_0x99ed[74])||0)};this[_0x99ed[14]][_0x99ed[75]]=_0x504fx7[_0x99ed[56]](_0x99ed[76])==_0x99ed[8];this[_0x99ed[14]][_0x99ed[77]]=this[_0x99ed[14]][_0x99ed[75]];this[_0x99ed[14]][_0x99ed[78]]=this[_0x99ed[14]][_0x99ed[77]];var _0x504fx9=_0x504fx7[_0x99ed[56]](_0x99ed[79]);if(_0x504fx9!=null){this[_0x99ed[14]][_0x99ed[79]]=_0x504fx9}else {this[_0x99ed[14]][_0x99ed[79]]=1.5};var _0x504fxa=_0x504fx7[_0x99ed[56]](_0x99ed[80]);var _0x504fxb=_0x504fx7[_0x99ed[56]](_0x99ed[81]);if(_0x504fxa!=null&&_0x504fxb!=null){this[_0x99ed[14]][_0x99ed[82]]= new mxRectangle(0,0,parseFloat(_0x504fxa),parseFloat(_0x504fxb));this[_0x99ed[15]][_0x99ed[15]][_0x99ed[82]]=this[_0x99ed[14]][_0x99ed[82]]};var _0x504fxc=_0x504fx7[_0x99ed[56]](_0x99ed[41]);if(_0x504fxc!=null&&_0x504fxc[_0x99ed[83]]>0){this[_0x99ed[14]][_0x99ed[41]]=_0x504fxc};_0x504fx8[_0x99ed[84]](_0x504fx7,this[_0x99ed[14]][_0x99ed[36]]());this[_0x99ed[85]]()}};Editor[_0x99ed[44]][_0x99ed[86]]=function(){var _0x504fxd= new mxCodec(mxUtils[_0x99ed[87]]());var _0x504fx7=_0x504fxd[_0x99ed[88]](this[_0x99ed[14]][_0x99ed[36]]());if(this[_0x99ed[14]][_0x99ed[53]][_0x99ed[71]][_0x99ed[70]]!=0||this[_0x99ed[14]][_0x99ed[53]][_0x99ed[71]][_0x99ed[73]]!=0){_0x504fx7[_0x99ed[90]](_0x99ed[72],Math[_0x99ed[89]](this[_0x99ed[14]][_0x99ed[53]][_0x99ed[71]][_0x99ed[70]]*100)/100);_0x504fx7[_0x99ed[90]](_0x99ed[74],Math[_0x99ed[89]](this[_0x99ed[14]][_0x99ed[53]][_0x99ed[71]][_0x99ed[73]]*100)/100)};_0x504fx7[_0x99ed[90]](_0x99ed[55],(this[_0x99ed[14]][_0x99ed[91]]())?_0x99ed[8]:_0x99ed[57]);_0x504fx7[_0x99ed[90]](_0x99ed[60],(this[_0x99ed[14]][_0x99ed[59]][_0x99ed[58]])?_0x99ed[8]:_0x99ed[57]);_0x504fx7[_0x99ed[90]](_0x99ed[60],(this[_0x99ed[14]][_0x99ed[59]][_0x99ed[58]])?_0x99ed[8]:_0x99ed[57]);_0x504fx7[_0x99ed[90]](_0x99ed[61],(this[_0x99ed[14]][_0x99ed[93]][_0x99ed[92]]())?_0x99ed[8]:_0x99ed[57]);_0x504fx7[_0x99ed[90]](_0x99ed[63],(this[_0x99ed[14]][_0x99ed[94]][_0x99ed[92]]())?_0x99ed[8]:_0x99ed[57]);_0x504fx7[_0x99ed[90]](_0x99ed[66],(this[_0x99ed[14]][_0x99ed[65]])?_0x99ed[8]:_0x99ed[57]);_0x504fx7[_0x99ed[90]](_0x99ed[76],(this[_0x99ed[14]][_0x99ed[75]])?_0x99ed[8]:_0x99ed[57]);_0x504fx7[_0x99ed[90]](_0x99ed[79],this[_0x99ed[14]][_0x99ed[79]]);_0x504fx7[_0x99ed[90]](_0x99ed[80],this[_0x99ed[14]][_0x99ed[82]][_0x99ed[95]]);_0x504fx7[_0x99ed[90]](_0x99ed[81],this[_0x99ed[14]][_0x99ed[82]][_0x99ed[96]]);if(!this[_0x99ed[14]][_0x99ed[40]]){_0x504fx7[_0x99ed[90]](_0x99ed[40],_0x99ed[57])};if(this[_0x99ed[14]][_0x99ed[41]]!=null){_0x504fx7[_0x99ed[90]](_0x99ed[41],this[_0x99ed[14]][_0x99ed[41]])};return _0x504fx7};Editor[_0x99ed[44]][_0x99ed[85]]=function(){var _0x504fxe=this[_0x99ed[14]];var _0x504fxf=this[_0x99ed[15]];if(_0x504fxe[_0x99ed[68]]!=null&&_0x504fxf[_0x99ed[15]][_0x99ed[68]]!=null){if(_0x504fxe[_0x99ed[41]]!=null){if(_0x504fxe[_0x99ed[41]]==_0x99ed[97]){_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[98]]=_0x99ed[100]}else {if(_0x504fxe[_0x99ed[53]][_0x99ed[101]]!=null){_0x504fxe[_0x99ed[53]][_0x99ed[101]][_0x99ed[102]]=_0x504fxe[_0x99ed[41]];_0x504fxe[_0x99ed[53]][_0x99ed[101]][_0x99ed[103]]()};_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[98]]=_0x504fxe[_0x99ed[41]]}}else {_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[98]]=_0x99ed[20]};if(_0x504fxe[_0x99ed[75]]){_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[98]]=_0x99ed[104];_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[105]]=_0x99ed[106];_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[107]]=_0x99ed[108];_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[109]]=_0x99ed[110];_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[111]]=_0x99ed[110];_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[112]]=_0x99ed[113];_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[114]]=_0x99ed[113]}else {_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[115]]=_0x99ed[20]};_0x504fxf[_0x99ed[15]][_0x99ed[68]][_0x99ed[99]][_0x99ed[98]]=_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[98]];if(_0x504fxf[_0x99ed[15]][_0x99ed[75]]!=_0x504fxe[_0x99ed[75]]||_0x504fxf[_0x99ed[15]][_0x99ed[79]]!=_0x504fxe[_0x99ed[79]]){_0x504fxf[_0x99ed[15]][_0x99ed[79]]=_0x504fxe[_0x99ed[79]];_0x504fxf[_0x99ed[15]][_0x99ed[75]]=_0x504fxe[_0x99ed[75]];_0x504fxf[_0x99ed[15]][_0x99ed[53]][_0x99ed[116]]()};if(_0x504fxe[_0x99ed[40]]&&_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[117]]==_0x99ed[118]&& !touchStyle){_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[117]]=_0x99ed[119]}else {if(!_0x504fxe[_0x99ed[40]]||touchStyle){_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[117]]=_0x99ed[118]}};var _0x504fx10=(mxClient[_0x99ed[120]]&&document[_0x99ed[121]]>=9)?_0x99ed[122]+this[_0x99ed[46]]+_0x99ed[123]:_0x99ed[97];_0x504fxe[_0x99ed[68]][_0x99ed[99]][_0x99ed[124]]=(!_0x504fxe[_0x99ed[75]]&&_0x504fxe[_0x99ed[91]]())?_0x99ed[122]+this[_0x99ed[43]]+_0x99ed[123]:_0x504fx10;if(_0x504fxe[_0x99ed[53]][_0x99ed[101]]!=null){_0x504fxe[_0x99ed[53]][_0x99ed[101]][_0x99ed[125]][_0x99ed[99]][_0x99ed[124]]=(this[_0x99ed[14]][_0x99ed[91]]())?_0x99ed[122]+this[_0x99ed[43]]+_0x99ed[123]:_0x99ed[97]}}};Editor[_0x99ed[44]][_0x99ed[12]]=function(){if(mxClient[_0x99ed[126]]){mxClient[_0x99ed[129]](_0x99ed[127],CSS_PATH+_0x99ed[128])};mxResources[_0x99ed[130]]=false;mxResources[_0x99ed[131]](RESOURCE_BASE);mxConstants[_0x99ed[132]]=0.3;var _0x504fx11=mxConnectionHandler[_0x99ed[44]][_0x99ed[133]];mxConnectionHandler[_0x99ed[44]][_0x99ed[133]]=function(){var _0x504fx12=_0x504fx11[_0x99ed[33]](this,arguments);_0x504fx12[_0x99ed[134]]=mxUtils[_0x99ed[34]](this,function(_0x504fx13,_0x504fx14){if(this[_0x99ed[135]]()){return true};return mxCellMarker[_0x99ed[44]][_0x99ed[134]][_0x99ed[33]](_0x504fx12,arguments)});return _0x504fx12};mxConstants[_0x99ed[136]]=_0x99ed[137];mxConstants[_0x99ed[138]]=_0x99ed[139];mxConstants[_0x99ed[140]]=_0x99ed[141];mxConstants[_0x99ed[142]]=_0x99ed[143];mxConstants[_0x99ed[144]]=_0x99ed[143];mxConstants[_0x99ed[145]]=_0x99ed[139];mxConstants[_0x99ed[146]]=_0x99ed[143];mxConstants[_0x99ed[147]]=_0x99ed[148];mxConstants[_0x99ed[149]]=_0x99ed[143];mxConstants[_0x99ed[150]]=_0x99ed[143];mxConstants[_0x99ed[151]]=_0x99ed[148];mxConstants[_0x99ed[152]]=_0x99ed[141];mxGraph[_0x99ed[44]][_0x99ed[153]]=_0x99ed[154];mxGraph[_0x99ed[44]][_0x99ed[79]]=1;mxRubberband[_0x99ed[44]][_0x99ed[155]]=30;mxGraphView[_0x99ed[44]][_0x99ed[156]]=function(_0x504fx15){return  new mxRectangleShape(_0x504fx15,this[_0x99ed[14]][_0x99ed[41]]||_0x99ed[157],_0x99ed[158])};mxGraphView[_0x99ed[44]][_0x99ed[159]]=function(){var _0x504fx16=this[_0x99ed[160]]();var _0x504fx17=(_0x504fx16[_0x99ed[95]]>0)?_0x504fx16[_0x99ed[70]]/this[_0x99ed[52]]-this[_0x99ed[71]][_0x99ed[70]]:0;var _0x504fx18=(_0x504fx16[_0x99ed[96]]>0)?_0x504fx16[_0x99ed[73]]/this[_0x99ed[52]]-this[_0x99ed[71]][_0x99ed[73]]:0;var _0x504fx19=_0x504fx16[_0x99ed[95]]/this[_0x99ed[52]];var _0x504fx1a=_0x504fx16[_0x99ed[96]]/this[_0x99ed[52]];var _0x504fx1b=this[_0x99ed[14]][_0x99ed[82]];var _0x504fx9=this[_0x99ed[14]][_0x99ed[79]];var _0x504fxa=_0x504fx1b[_0x99ed[95]]*_0x504fx9;var _0x504fxb=_0x504fx1b[_0x99ed[96]]*_0x504fx9;var _0x504fx1c=Math[_0x99ed[162]](Math[_0x99ed[161]](0,_0x504fx17)/_0x504fxa);var _0x504fx1d=Math[_0x99ed[162]](Math[_0x99ed[161]](0,_0x504fx18)/_0x504fxb);var _0x504fx1e=Math[_0x99ed[164]](Math[_0x99ed[163]](1,_0x504fx17+_0x504fx19)/_0x504fxa);var _0x504fx1f=Math[_0x99ed[164]](Math[_0x99ed[163]](1,_0x504fx18+_0x504fx1a)/_0x504fxb);var _0x504fx20=_0x504fx1e-_0x504fx1c;var _0x504fx21=_0x504fx1f-_0x504fx1d;var _0x504fx15= new mxRectangle(this[_0x99ed[52]]*(this[_0x99ed[71]][_0x99ed[70]]+_0x504fx1c*_0x504fxa),this[_0x99ed[52]]*(this[_0x99ed[71]][_0x99ed[73]]+_0x504fx1d*_0x504fxb),this[_0x99ed[52]]*_0x504fx20*_0x504fxa,this[_0x99ed[52]]*_0x504fx21*_0x504fxb);return _0x504fx15};var _0x504fx22=mxGraph[_0x99ed[44]][_0x99ed[165]];mxGraph[_0x99ed[44]][_0x99ed[165]]=function(_0x504fx23,_0x504fx24){_0x504fx22[_0x99ed[33]](this,arguments);if((this[_0x99ed[166]]!=mxConstants[_0x99ed[167]]&&this[_0x99ed[53]][_0x99ed[101]]!=null)&&(!this[_0x99ed[168]]||!mxUtils[_0x99ed[169]](this[_0x99ed[68]]))){this[_0x99ed[53]][_0x99ed[101]][_0x99ed[125]][_0x99ed[99]][_0x99ed[170]]=_0x504fx23+_0x99ed[171];this[_0x99ed[53]][_0x99ed[101]][_0x99ed[125]][_0x99ed[99]][_0x99ed[172]]=_0x504fx24+_0x99ed[171]}};var _0x504fx25=this;mxGraphView[_0x99ed[44]][_0x99ed[173]]=function(){var _0x504fxc=this[_0x99ed[14]][_0x99ed[174]]();if(_0x504fxc!=null){if(this[_0x99ed[124]]==null||this[_0x99ed[124]][_0x99ed[175]]!=_0x504fxc[_0x99ed[176]]){if(this[_0x99ed[124]]!=null){this[_0x99ed[124]][_0x99ed[177]]()};var _0x504fx15= new mxRectangle(0,0,1,1);this[_0x99ed[124]]= new mxImageShape(_0x504fx15,_0x504fxc[_0x99ed[176]]);this[_0x99ed[124]][_0x99ed[166]]=this[_0x99ed[14]][_0x99ed[166]];this[_0x99ed[124]][_0x99ed[12]](this[_0x99ed[178]]);this[_0x99ed[124]][_0x99ed[179]]()};this[_0x99ed[180]](this[_0x99ed[124]],_0x504fxc)}else {if(this[_0x99ed[124]]!=null){this[_0x99ed[124]][_0x99ed[177]]();this[_0x99ed[124]]=null}};if(this[_0x99ed[14]][_0x99ed[75]]){var _0x504fx15=this[_0x99ed[159]]();if(this[_0x99ed[101]]==null){this[_0x99ed[101]]=this[_0x99ed[156]](_0x504fx15);this[_0x99ed[101]][_0x99ed[52]]=1;this[_0x99ed[101]][_0x99ed[181]]=true;this[_0x99ed[101]][_0x99ed[166]]=mxConstants[_0x99ed[182]];this[_0x99ed[101]][_0x99ed[12]](this[_0x99ed[14]][_0x99ed[68]]);this[_0x99ed[14]][_0x99ed[68]][_0x99ed[184]][_0x99ed[99]][_0x99ed[183]]=_0x99ed[185];this[_0x99ed[14]][_0x99ed[68]][_0x99ed[186]](this[_0x99ed[101]][_0x99ed[125]],this[_0x99ed[14]][_0x99ed[68]][_0x99ed[184]]);this[_0x99ed[101]][_0x99ed[179]]();this[_0x99ed[101]][_0x99ed[125]][_0x99ed[187]]=_0x99ed[188];this[_0x99ed[101]][_0x99ed[125]][_0x99ed[99]][_0x99ed[189]]=_0x99ed[190];mxEvent[_0x99ed[35]](this[_0x99ed[101]][_0x99ed[125]],_0x99ed[191],mxUtils[_0x99ed[34]](this,function(_0x504fx14){this[_0x99ed[14]][_0x99ed[192]](_0x504fx14)}));mxEvent[_0x99ed[198]](this[_0x99ed[101]][_0x99ed[125]],mxUtils[_0x99ed[34]](this,function(_0x504fx14){this[_0x99ed[14]][_0x99ed[193]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x504fx14))}),mxUtils[_0x99ed[34]](this,function(_0x504fx14){if(this[_0x99ed[14]][_0x99ed[93]]!=null&&this[_0x99ed[14]][_0x99ed[93]][_0x99ed[194]]()){this[_0x99ed[14]][_0x99ed[93]][_0x99ed[195]]()};if(this[_0x99ed[14]][_0x99ed[196]]&&!mxEvent[_0x99ed[197]](_0x504fx14)){this[_0x99ed[14]][_0x99ed[193]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x504fx14))}}),mxUtils[_0x99ed[34]](this,function(_0x504fx14){this[_0x99ed[14]][_0x99ed[193]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x504fx14))}))}else {this[_0x99ed[101]][_0x99ed[52]]=1;this[_0x99ed[101]][_0x99ed[199]]=_0x504fx15;this[_0x99ed[101]][_0x99ed[179]]()};this[_0x99ed[101]][_0x99ed[125]][_0x99ed[99]][_0x99ed[124]]=(this[_0x99ed[14]][_0x99ed[91]]())?_0x99ed[122]+_0x504fx25[_0x99ed[43]]+_0x99ed[123]:_0x99ed[97]}else {if(this[_0x99ed[101]]!=null){this[_0x99ed[101]][_0x99ed[177]]();this[_0x99ed[101]]=null}}};mxGraph[_0x99ed[44]][_0x99ed[200]]=function(_0x504fx26,_0x504fx27,_0x504fx28){var _0x504fx29=this[_0x99ed[53]][_0x99ed[52]];var _0x504fx2a=this[_0x99ed[53]][_0x99ed[71]];var _0x504fx1b=this[_0x99ed[82]];var _0x504fx9=_0x504fx29*this[_0x99ed[79]];var _0x504fx2b=this[_0x99ed[53]][_0x99ed[159]]();_0x504fx27=_0x504fx2b[_0x99ed[95]];_0x504fx28=_0x504fx2b[_0x99ed[96]];var _0x504fx15= new mxRectangle(_0x504fx29*_0x504fx2a[_0x99ed[70]],_0x504fx29*_0x504fx2a[_0x99ed[73]],_0x504fx1b[_0x99ed[95]]*_0x504fx9,_0x504fx1b[_0x99ed[96]]*_0x504fx9);_0x504fx26=_0x504fx26&&Math[_0x99ed[161]](_0x504fx15[_0x99ed[95]],_0x504fx15[_0x99ed[96]])>this[_0x99ed[201]];var _0x504fx2c=(_0x504fx26)?Math[_0x99ed[164]](_0x504fx27/_0x504fx15[_0x99ed[95]])-1:0;var _0x504fx2d=(_0x504fx26)?Math[_0x99ed[164]](_0x504fx28/_0x504fx15[_0x99ed[96]])-1:0;var _0x504fx2e=_0x504fx2b[_0x99ed[70]]+_0x504fx27;var _0x504fx2f=_0x504fx2b[_0x99ed[73]]+_0x504fx28;if(this[_0x99ed[202]]==null&&_0x504fx2c>0){this[_0x99ed[202]]=[]};if(this[_0x99ed[202]]!=null){for(var _0x504fx30=0;_0x504fx30<=_0x504fx2c;_0x504fx30++){var _0x504fx31=[ new mxPoint(_0x504fx2b[_0x99ed[70]]+(_0x504fx30+1)*_0x504fx15[_0x99ed[95]],_0x504fx2b[_0x99ed[73]]), new mxPoint(_0x504fx2b[_0x99ed[70]]+(_0x504fx30+1)*_0x504fx15[_0x99ed[95]],_0x504fx2f)];if(this[_0x99ed[202]][_0x504fx30]!=null){this[_0x99ed[202]][_0x504fx30][_0x99ed[52]]=1;this[_0x99ed[202]][_0x504fx30][_0x99ed[203]]=_0x504fx31;this[_0x99ed[202]][_0x504fx30][_0x99ed[179]]()}else {var _0x504fx32= new mxPolyline(_0x504fx31,this[_0x99ed[153]],this[_0x99ed[52]]);_0x504fx32[_0x99ed[166]]=this[_0x99ed[166]];_0x504fx32[_0x99ed[204]]=this[_0x99ed[205]];_0x504fx32[_0x99ed[206]]=false;_0x504fx32[_0x99ed[52]]=_0x504fx29;_0x504fx32[_0x99ed[12]](this[_0x99ed[53]][_0x99ed[178]]);_0x504fx32[_0x99ed[179]]();this[_0x99ed[202]][_0x504fx30]=_0x504fx32}};for(var _0x504fx30=_0x504fx2c;_0x504fx30<this[_0x99ed[202]][_0x99ed[83]];_0x504fx30++){this[_0x99ed[202]][_0x504fx30][_0x99ed[177]]()};this[_0x99ed[202]][_0x99ed[207]](_0x504fx2c,this[_0x99ed[202]][_0x99ed[83]]-_0x504fx2c)};if(this[_0x99ed[208]]==null&&_0x504fx2d>0){this[_0x99ed[208]]=[]};if(this[_0x99ed[208]]!=null){for(var _0x504fx30=0;_0x504fx30<=_0x504fx2d;_0x504fx30++){var _0x504fx31=[ new mxPoint(_0x504fx2b[_0x99ed[70]],_0x504fx2b[_0x99ed[73]]+(_0x504fx30+1)*_0x504fx15[_0x99ed[96]]), new mxPoint(_0x504fx2e,_0x504fx2b[_0x99ed[73]]+(_0x504fx30+1)*_0x504fx15[_0x99ed[96]])];if(this[_0x99ed[208]][_0x504fx30]!=null){this[_0x99ed[208]][_0x504fx30][_0x99ed[52]]=1;this[_0x99ed[208]][_0x504fx30][_0x99ed[203]]=_0x504fx31;this[_0x99ed[208]][_0x504fx30][_0x99ed[179]]()}else {var _0x504fx32= new mxPolyline(_0x504fx31,this[_0x99ed[153]],_0x504fx29);_0x504fx32[_0x99ed[166]]=this[_0x99ed[166]];_0x504fx32[_0x99ed[204]]=this[_0x99ed[205]];_0x504fx32[_0x99ed[206]]=false;_0x504fx32[_0x99ed[52]]=_0x504fx29;_0x504fx32[_0x99ed[12]](this[_0x99ed[53]][_0x99ed[178]]);_0x504fx32[_0x99ed[179]]();this[_0x99ed[208]][_0x504fx30]=_0x504fx32}};for(var _0x504fx30=_0x504fx2d;_0x504fx30<this[_0x99ed[208]][_0x99ed[83]];_0x504fx30++){this[_0x99ed[208]][_0x504fx30][_0x99ed[177]]()};this[_0x99ed[208]][_0x99ed[207]](_0x504fx2d,this[_0x99ed[208]][_0x99ed[83]]-_0x504fx2d)}};mxEdgeHandler[_0x99ed[44]][_0x99ed[209]]=true;mxGraphHandler[_0x99ed[44]][_0x99ed[58]]=true;var _0x504fx33=mxGraphHandler[_0x99ed[44]][_0x99ed[210]];mxGraphHandler[_0x99ed[44]][_0x99ed[210]]=function(_0x504fx34,_0x504fx35,_0x504fx14){for(var _0x504fx30=0;_0x504fx30<_0x504fx35[_0x99ed[83]];_0x504fx30++){if(this[_0x99ed[14]][_0x99ed[36]]()[_0x99ed[211]](_0x504fx35[_0x504fx30])){var _0x504fx36=this[_0x99ed[14]][_0x99ed[212]](_0x504fx35[_0x504fx30]);if(_0x504fx36!=null&&_0x504fx36[_0x99ed[213]]){return false}}};return _0x504fx33[_0x99ed[33]](this,arguments)};mxGuide[_0x99ed[44]][_0x99ed[214]]=function(_0x504fx14){return !mxEvent[_0x99ed[215]](_0x504fx14)};mxPopupMenuAddItem=mxPopupMenu[_0x99ed[44]][_0x99ed[216]];mxPopupMenu[_0x99ed[44]][_0x99ed[216]]=function(_0x504fx37,_0x504fx38,_0x504fx39,_0x504fx34,_0x504fx3a,_0x504fx3b){var _0x504fx3c=mxPopupMenuAddItem[_0x99ed[33]](this,arguments);if(_0x504fx3b!=null&& !_0x504fx3b){mxEvent[_0x99ed[35]](_0x504fx3c,_0x99ed[217],function(_0x504fx14){mxEvent[_0x99ed[218]](_0x504fx14)})};return _0x504fx3c};var _0x504fx3d=mxGraphHandler[_0x99ed[44]][_0x99ed[219]];mxGraphHandler[_0x99ed[44]][_0x99ed[219]]=function(_0x504fx3e){var _0x504fx3f=this[_0x99ed[14]][_0x99ed[36]]();var _0x504fx40=_0x504fx3f[_0x99ed[221]](this[_0x99ed[14]][_0x99ed[220]]());var _0x504fx41=_0x504fx3d[_0x99ed[33]](this,arguments);var _0x504fx34=_0x504fx3f[_0x99ed[221]](_0x504fx41);if(_0x504fx40==null||(_0x504fx40!=_0x504fx41&&_0x504fx40!=_0x504fx34)){while(!this[_0x99ed[14]][_0x99ed[222]](_0x504fx41)&&!this[_0x99ed[14]][_0x99ed[222]](_0x504fx34)&&_0x504fx3f[_0x99ed[211]](_0x504fx34)&&!this[_0x99ed[14]][_0x99ed[223]](_0x504fx34)){_0x504fx41=_0x504fx34;_0x504fx34=this[_0x99ed[14]][_0x99ed[36]]()[_0x99ed[221]](_0x504fx41)}};return _0x504fx41};var _0x504fx42=mxGraphHandler[_0x99ed[44]][_0x99ed[224]];mxGraphHandler[_0x99ed[44]][_0x99ed[224]]=function(_0x504fx41){var _0x504fx3c=_0x504fx42[_0x99ed[33]](this,arguments);var _0x504fx3f=this[_0x99ed[14]][_0x99ed[36]]();var _0x504fx40=_0x504fx3f[_0x99ed[221]](this[_0x99ed[14]][_0x99ed[220]]());var _0x504fx34=_0x504fx3f[_0x99ed[221]](_0x504fx41);if(_0x504fx40==null||(_0x504fx40!=_0x504fx41&&_0x504fx40!=_0x504fx34)){if(!this[_0x99ed[14]][_0x99ed[222]](_0x504fx41)&&_0x504fx3f[_0x99ed[211]](_0x504fx34)&&!this[_0x99ed[14]][_0x99ed[223]](_0x504fx34)){_0x504fx3c=true}};return _0x504fx3c};mxGraphHandler[_0x99ed[44]][_0x99ed[225]]=function(_0x504fx3e){var _0x504fx41=_0x504fx3e[_0x99ed[226]]();if(_0x504fx41==null){_0x504fx41=this[_0x99ed[227]]};var _0x504fx3f=this[_0x99ed[14]][_0x99ed[36]]();var _0x504fx34=_0x504fx3f[_0x99ed[221]](_0x504fx41);while(this[_0x99ed[14]][_0x99ed[222]](_0x504fx41)&&_0x504fx3f[_0x99ed[211]](_0x504fx34)&&!this[_0x99ed[14]][_0x99ed[223]](_0x504fx34)){_0x504fx41=_0x504fx34;_0x504fx34=_0x504fx3f[_0x99ed[221]](_0x504fx41)};this[_0x99ed[14]][_0x99ed[229]](_0x504fx41,_0x504fx3e[_0x99ed[228]]())};mxPanningHandler[_0x99ed[44]][_0x99ed[230]]=function(_0x504fx3e){var _0x504fx41=_0x504fx3e[_0x99ed[226]]();var _0x504fx3f=this[_0x99ed[14]][_0x99ed[36]]();var _0x504fx34=_0x504fx3f[_0x99ed[221]](_0x504fx41);while(_0x504fx3f[_0x99ed[211]](_0x504fx34)&&!this[_0x99ed[14]][_0x99ed[223]](_0x504fx34)){if(this[_0x99ed[14]][_0x99ed[222]](_0x504fx34)){_0x504fx41=_0x504fx34};_0x504fx34=_0x504fx3f[_0x99ed[221]](_0x504fx34)};return _0x504fx41}};Editor[_0x99ed[44]][_0x99ed[18]]=function(){var _0x504fxe=this[_0x99ed[14]];var _0x504fx43= new mxUndoManager();var _0x504fx44=function(_0x504fx45,_0x504fx14){_0x504fx43[_0x99ed[233]](_0x504fx14[_0x99ed[232]](_0x99ed[231]))};_0x504fxe[_0x99ed[36]]()[_0x99ed[35]](mxEvent.UNDO,_0x504fx44);_0x504fxe[_0x99ed[234]]()[_0x99ed[35]](mxEvent.UNDO,_0x504fx44);var _0x504fx46=function(_0x504fx45,_0x504fx14){var _0x504fx47=_0x504fxe[_0x99ed[236]](_0x504fx14[_0x99ed[232]](_0x99ed[231])[_0x99ed[235]]);var _0x504fx35=[];for(var _0x504fx30=1;_0x504fx30<_0x504fx47[_0x99ed[83]];_0x504fx30++){if(_0x504fxe[_0x99ed[53]][_0x99ed[237]](_0x504fx47[_0x504fx30])!=null){_0x504fx35[_0x99ed[238]](_0x504fx47[_0x504fx30])}};_0x504fxe[_0x99ed[239]](_0x504fx35)};_0x504fx43[_0x99ed[35]](mxEvent.UNDO,_0x504fx46);_0x504fx43[_0x99ed[35]](mxEvent.REDO,_0x504fx46);return _0x504fx43};Editor[_0x99ed[44]][_0x99ed[13]]=function(){mxStencilRegistry[_0x99ed[241]](STENCIL_PATH+_0x99ed[240])};(function(){mxStencilRegistry[_0x99ed[242]]={};mxStencilRegistry[_0x99ed[243]]=[];mxStencilRegistry[_0x99ed[244]]=function(_0x504fx48){var _0x504fx3c=mxStencilRegistry[_0x99ed[245]][_0x504fx48];if(_0x504fx3c==null){var _0x504fx49=mxStencilRegistry[_0x99ed[246]](_0x504fx48);if(_0x504fx49!=null){var _0x504fx4a=mxStencilRegistry[_0x99ed[242]][_0x504fx49];if(_0x504fx4a!=null){if(mxStencilRegistry[_0x99ed[243]][_0x504fx49]==null){mxStencilRegistry[_0x99ed[243]][_0x504fx49]=1;for(var _0x504fx30=0;_0x504fx30<_0x504fx4a[_0x99ed[83]];_0x504fx30++){var _0x504fx4b=_0x504fx4a[_0x504fx30];if(_0x504fx4b[_0x99ed[248]]()[_0x99ed[247]](_0x504fx4b[_0x99ed[83]]-4,_0x504fx4b[_0x99ed[83]])==_0x99ed[25]){mxStencilRegistry[_0x99ed[241]](_0x504fx4b,null)}else {if(_0x504fx4b[_0x99ed[248]]()[_0x99ed[247]](_0x504fx4b[_0x99ed[83]]-3,_0x504fx4b[_0x99ed[83]])==_0x99ed[249]){var _0x504fx4c=mxUtils[_0x99ed[250]](_0x504fx4b);if(_0x504fx4c!=null){eval[_0x99ed[11]](window,_0x504fx4c[_0x99ed[251]]())}}else {}}}}}else {mxStencilRegistry[_0x99ed[241]](STENCIL_PATH+_0x99ed[252]+_0x504fx49+_0x99ed[25],null)};_0x504fx3c=mxStencilRegistry[_0x99ed[245]][_0x504fx48]}};return _0x504fx3c};mxStencilRegistry[_0x99ed[246]]=function(_0x504fx48){var _0x504fx4d=_0x504fx48[_0x99ed[254]](_0x99ed[253]);var _0x504fx4e=null;if(_0x504fx4d[_0x99ed[83]]>0&&_0x504fx4d[0]==_0x99ed[255]){_0x504fx4e=_0x504fx4d[1];for(var _0x504fx30=2;_0x504fx30<_0x504fx4d[_0x99ed[83]]-1;_0x504fx30++){_0x504fx4e+=_0x99ed[252]+_0x504fx4d[_0x504fx30]}};return _0x504fx4e};mxStencilRegistry[_0x99ed[241]]=function(_0x504fx4f,_0x504fx50,_0x504fx51){_0x504fx51=(_0x504fx51!=null)?_0x504fx51:false;var _0x504fx52=mxStencilRegistry[_0x99ed[243]][_0x504fx4f];if(_0x504fx51||_0x504fx52==null){var _0x504fx53=false;if(_0x504fx52==null){var _0x504fx4c=mxUtils[_0x99ed[250]](_0x504fx4f);_0x504fx52=_0x504fx4c[_0x99ed[256]]();mxStencilRegistry[_0x99ed[243]][_0x504fx4f]=_0x504fx52;_0x504fx53=true};mxStencilRegistry[_0x99ed[257]](_0x504fx52,_0x504fx50,_0x504fx53)}};mxStencilRegistry[_0x99ed[257]]=function(_0x504fx54,_0x504fx50,_0x504fx53){_0x504fx53=(_0x504fx53!=null)?_0x504fx53:true;var _0x504fx55=_0x504fx54[_0x99ed[258]];var _0x504fx56=_0x504fx55[_0x99ed[184]];var _0x504fx57=_0x99ed[20];var _0x504fx48=_0x504fx55[_0x99ed[56]](_0x99ed[259]);if(_0x504fx48!=null){_0x504fx57=_0x504fx48+_0x99ed[253]};while(_0x504fx56!=null){if(_0x504fx56[_0x99ed[260]]==mxConstants[_0x99ed[261]]){_0x504fx48=_0x504fx56[_0x99ed[56]](_0x99ed[259]);if(_0x504fx48!=null){_0x504fx57=_0x504fx57[_0x99ed[248]]();var _0x504fx58=_0x504fx48[_0x99ed[263]](/ /g,_0x99ed[262]);if(_0x504fx53){mxStencilRegistry[_0x99ed[264]](_0x504fx57+_0x504fx58[_0x99ed[248]](), new mxStencil(_0x504fx56))};if(_0x504fx50!=null){var _0x504fx19=_0x504fx56[_0x99ed[56]](_0x99ed[265]);var _0x504fx1a=_0x504fx56[_0x99ed[56]](_0x99ed[266]);_0x504fx19=(_0x504fx19==null)?80:parseInt(_0x504fx19,10);_0x504fx1a=(_0x504fx1a==null)?80:parseInt(_0x504fx1a,10);_0x504fx50(_0x504fx57,_0x504fx58,_0x504fx48,_0x504fx19,_0x504fx1a)}}};_0x504fx56=_0x504fx56[_0x99ed[267]]}}})();OpenFile=function(_0x504fx59){this[_0x99ed[268]]=null;this[_0x99ed[269]]=null;this[_0x99ed[270]]=_0x504fx59};OpenFile[_0x99ed[44]][_0x99ed[271]]=function(_0x504fx6){this[_0x99ed[269]]=_0x504fx6;this[_0x99ed[272]]()};OpenFile[_0x99ed[44]][_0x99ed[273]]=function(_0x504fx6,_0x504fx5a){this[_0x99ed[274]]=_0x504fx6;this[_0x99ed[21]]=_0x504fx5a;this[_0x99ed[272]]()};OpenFile[_0x99ed[44]][_0x99ed[275]]=function(_0x504fx5b){this[_0x99ed[276]]();mxUtils[_0x99ed[277]](_0x504fx5b)};OpenFile[_0x99ed[44]][_0x99ed[272]]=function(){if(this[_0x99ed[269]]!=null&&this[_0x99ed[274]]!=null){this[_0x99ed[269]](this[_0x99ed[274]],this[_0x99ed[21]]);this[_0x99ed[276]]()}};OpenFile[_0x99ed[44]][_0x99ed[276]]=function(){if(this[_0x99ed[270]]!=null){this[_0x99ed[270]]()}}
\ No newline at end of file
+/**
+ * $Id: Editor.js,v 1.14 2013/03/06 17:57:10 boris Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+var useLocalStorage = (mxClient.IS_TOUCH || urlParams['storage'] == 'local') && typeof(localStorage) != 'undefined';
+var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
+
+// Specifies if connector should be shown on selected cells
+var touchStyle = mxClient.IS_TOUCH || urlParams['touch'] == '1';
+
+// Counts open editor tabs (must be global for cross-window access)
+var counter = 0;
+
+// Cross-domain window access is not allowed in FF, so if we
+// were opened from another domain then this will fail.
+try {
+       var op = window;
+
+       while (op.opener != null && !isNaN(op.opener.counter)) {
+               op = op.opener;
+       }
+
+       // Increments the counter in the first opener in the chain
+       if (op != null) {
+               op.counter++;
+               counter = op.counter;
+       }
+} catch (e) {
+       // ignore
+}
+
+/**
+ * Editor constructor executed on page load.
+ */
+Editor = function() {
+       mxEventSource.call(this);
+       this.init();
+       this.initStencilRegistry();
+       this.graph = new Graph();
+       this.outline = new mxOutline(this.graph);
+       this.outline.updateOnPan = true;
+       this.undoManager = this.createUndoManager();
+       this.status = '';
+
+       // Contains the name which was used for the last save. Default value is null.
+       this.filename = null;
+
+       this.getOrCreateFilename = function() {
+               return this.filename || mxResources.get('drawing', [counter]) + '.xml';
+       };
+
+       this.getFilename = function() {
+               return this.filename;
+       };
+
+       // Sets the status and fires a statusChanged event
+       this.setStatus = function(value) {
+               this.status = value;
+               this.fireEvent(new mxEventObject('statusChanged'));
+       };
+
+       // Returns the current status
+       this.getStatus = function() {
+               return this.status;
+       };
+
+       // Contains the current modified state of the diagram. This is false for
+       // new diagrams and after the diagram was saved.
+       this.modified = false;
+
+       // Updates modified state if graph changes
+       this.graphChangeListener = function() {
+               this.modified = true;
+       };
+       this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function() {
+               this.graphChangeListener.apply(this, arguments);
+       }));
+
+       // Installs dialog if browser window is closed without saving
+       // This must be disabled during save and image export
+       window.onbeforeunload = mxUtils.bind(this, function() {
+               if (this.modified) {
+                       return mxResources.get('allChangesLost');
+               }
+       });
+
+       // Sets persistent graph state defaults
+       this.graph.resetViewOnRootChange = false;
+       this.graph.scrollbars = true;
+       this.graph.background = null;
+};
+
+// Editor inherits from mxEventSource
+mxUtils.extend(Editor, mxEventSource);
+
+/**
+ * Specifies the image URL to be used for the grid.
+ */
+Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
+Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.setGraphXml = function(node) {
+       var dec = new mxCodec(node.ownerDocument);
+
+       if (node.nodeName == 'mxGraphModel') {
+               this.graph.view.scale = 1;
+               this.graph.gridEnabled = node.getAttribute('grid') != '0';
+               this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
+               this.graph.setTooltips(node.getAttribute('tooltips') != '0');
+               this.graph.setConnectable(node.getAttribute('connect') != '0');
+               this.graph.foldingEnabled = node.getAttribute('fold') != '0';
+               this.graph.scrollbars = node.getAttribute('scrollbars') != '0';
+
+               if (!this.graph.scrollbars) {
+                       this.graph.container.scrollLeft = 0;
+                       this.graph.container.scrollTop = 0;
+                       this.graph.view.translate.x = Number(node.getAttribute('dx') || 0);
+                       this.graph.view.translate.y = Number(node.getAttribute('dy') || 0);
+               }
+
+               this.graph.pageVisible = node.getAttribute('page') == '1';
+               this.graph.pageBreaksVisible = this.graph.pageVisible;
+               this.graph.preferPageSize = this.graph.pageBreaksVisible;
+
+               // Loads the persistent state settings
+               var ps = node.getAttribute('pageScale');
+
+               if (ps != null) {
+                       this.graph.pageScale = ps;
+               } else {
+                       this.graph.pageScale = 1.5;
+               }
+
+               var pw = node.getAttribute('pageWidth');
+               var ph = node.getAttribute('pageHeight');
+
+               if (pw != null && ph != null) {
+                       this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
+                       this.outline.outline.pageFormat = this.graph.pageFormat;
+               }
+
+               // Loads the persistent state settings
+               var bg = node.getAttribute('background');
+
+               if (bg != null && bg.length > 0) {
+                       this.graph.background = bg;
+               }
+
+               dec.decode(node, this.graph.getModel());
+               this.updateGraphComponents();
+       }
+};
+
+/**
+ * Returns the XML node that represents the current diagram.
+ */
+Editor.prototype.getGraphXml = function() {
+       var enc = new mxCodec(mxUtils.createXmlDocument());
+       var node = enc.encode(this.graph.getModel());
+
+       if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0) {
+               node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
+               node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
+       }
+
+       node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
+       node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+       node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+       node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
+       node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');
+       node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
+       node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
+       node.setAttribute('pageScale', this.graph.pageScale);
+       node.setAttribute('pageWidth', this.graph.pageFormat.width);
+       node.setAttribute('pageHeight', this.graph.pageFormat.height);
+
+       if (!this.graph.scrollbars) {
+               node.setAttribute('scrollbars', '0');
+       }
+
+       if (this.graph.background != null) {
+               node.setAttribute('background', this.graph.background);
+       }
+
+       return node;
+};
+
+/**
+ * Keeps the graph container in sync with the persistent graph state
+ */
+Editor.prototype.updateGraphComponents = function() {
+       var graph = this.graph;
+       var outline = this.outline;
+
+       if (graph.container != null && outline.outline.container != null) {
+               if (graph.background != null) {
+                       if (graph.background == 'none') {
+                               graph.container.style.backgroundColor = 'transparent';
+                       } else {
+                               if (graph.view.backgroundPageShape != null) {
+                                       graph.view.backgroundPageShape.fill = graph.background;
+                                       graph.view.backgroundPageShape.reconfigure();
+                               }
+
+                               graph.container.style.backgroundColor = graph.background;
+                       }
+               } else {
+                       graph.container.style.backgroundColor = '';
+               }
+
+               if (graph.pageVisible) {
+                       graph.container.style.backgroundColor = '#ebebeb';
+                       graph.container.style.borderStyle = 'solid';
+                       graph.container.style.borderColor = '#e5e5e5';
+                       graph.container.style.borderTopWidth = '1px';
+                       graph.container.style.borderLeftWidth = '1px';
+                       graph.container.style.borderRightWidth = '0px';
+                       graph.container.style.borderBottomWidth = '0px';
+               } else {
+                       graph.container.style.border = '';
+               }
+
+               outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
+
+               if (outline.outline.pageVisible != graph.pageVisible ||
+                       outline.outline.pageScale != graph.pageScale) {
+                       outline.outline.pageScale = graph.pageScale;
+                       outline.outline.pageVisible = graph.pageVisible;
+                       outline.outline.view.validate();
+               }
+
+               if (graph.scrollbars && graph.container.style.overflow == 'hidden' && !touchStyle) {
+                       graph.container.style.overflow = 'auto';
+               } else if (!graph.scrollbars || touchStyle) {
+                       graph.container.style.overflow = 'hidden';
+               }
+
+               // Transparent.gif is a workaround for focus repaint problems in IE
+               var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
+               graph.container.style.backgroundImage = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
+
+               if (graph.view.backgroundPageShape != null) {
+                       graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
+               }
+       }
+};
+
+/**
+ * Initializes the environment.
+ */
+Editor.prototype.init = function() {
+       // Adds stylesheet for IE6
+       if (mxClient.IS_IE6) {
+               mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
+       }
+
+       // Adds required resources (disables loading of fallback properties, this can only
+       // be used if we know that all keys are defined in the language specific file)
+       mxResources.loadDefaultBundle = false;
+       mxResources.add(RESOURCE_BASE);
+
+       // Makes the connection hotspot smaller
+       mxConstants.DEFAULT_HOTSPOT = 0.3;
+
+       var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
+       mxConnectionHandler.prototype.createMarker = function() {
+               var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
+
+               // Overrides to ignore hotspot only for target terminal
+               marker.intersects = mxUtils.bind(this, function(state, evt) {
+                       if (this.isConnecting()) {
+                               return true;
+                       }
+
+                       return mxCellMarker.prototype.intersects.apply(marker, arguments);
+               });
+
+               return marker;
+       };
+
+       // Makes the shadow brighter
+       mxConstants.SHADOWCOLOR = '#d0d0d0';
+
+       // Changes some default colors
+       mxConstants.HANDLE_FILLCOLOR = '#99ccff';
+       mxConstants.HANDLE_STROKECOLOR = '#0088cf';
+       mxConstants.VERTEX_SELECTION_COLOR = '#00a8ff';
+       mxConstants.OUTLINE_COLOR = '#00a8ff';
+       mxConstants.OUTLINE_HANDLE_FILLCOLOR = '#99ccff';
+       mxConstants.OUTLINE_HANDLE_STROKECOLOR = '#00a8ff';
+       mxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff';
+       mxConstants.EDGE_SELECTION_COLOR = '#00a8ff';
+       mxConstants.DEFAULT_VALID_COLOR = '#00a8ff';
+       mxConstants.LABEL_HANDLE_FILLCOLOR = '#cee7ff';
+       mxConstants.GUIDE_COLOR = '#0088cf';
+
+       mxGraph.prototype.pageBreakColor = '#c0c0c0';
+       mxGraph.prototype.pageScale = 1;
+
+       // Increases default rubberband opacity (default is 20)
+       mxRubberband.prototype.defaultOpacity = 30;
+
+       // Changes border color of background page shape
+       mxGraphView.prototype.createBackgroundPageShape = function(bounds) {
+               return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
+       };
+
+       // Fits the number of background pages to the graph
+       mxGraphView.prototype.getBackgroundPageBounds = function() {
+               var gb = this.getGraphBounds();
+
+               // Computes unscaled, untranslated graph bounds
+               var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
+               var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
+               var w = gb.width / this.scale;
+               var h = gb.height / this.scale;
+
+               var fmt = this.graph.pageFormat;
+               var ps = this.graph.pageScale;
+
+               var pw = fmt.width * ps;
+               var ph = fmt.height * ps;
+
+               var x0 = Math.floor(Math.min(0, x) / pw);
+               var y0 = Math.floor(Math.min(0, y) / ph);
+               var xe = Math.ceil(Math.max(1, x + w) / pw);
+               var ye = Math.ceil(Math.max(1, y + h) / ph);
+
+               var rows = xe - x0;
+               var cols = ye - y0;
+
+               var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
+                       (this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
+
+               return bounds;
+       };
+
+       // Add panning for background page in VML
+       var graphPanGraph = mxGraph.prototype.panGraph;
+       mxGraph.prototype.panGraph = function(dx, dy) {
+               graphPanGraph.apply(this, arguments);
+
+               if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
+                       (!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container))) {
+                       this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
+                       this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
+               }
+       };
+
+       var editor = this;
+
+       // Uses HTML for background pages (to support grid background image)
+       mxGraphView.prototype.validateBackground = function() {
+               var bg = this.graph.getBackgroundImage();
+
+               if (bg != null) {
+                       if (this.backgroundImage == null || this.backgroundImage.image != bg.src) {
+                               if (this.backgroundImage != null) {
+                                       this.backgroundImage.destroy();
+                               }
+
+                               var bounds = new mxRectangle(0, 0, 1, 1);
+
+                               this.backgroundImage = new mxImageShape(bounds, bg.src);
+                               this.backgroundImage.dialect = this.graph.dialect;
+                               this.backgroundImage.init(this.backgroundPane);
+                               this.backgroundImage.redraw();
+                       }
+
+                       this.redrawBackgroundImage(this.backgroundImage, bg);
+               } else if (this.backgroundImage != null) {
+                       this.backgroundImage.destroy();
+                       this.backgroundImage = null;
+               }
+
+               if (this.graph.pageVisible) {
+                       var bounds = this.getBackgroundPageBounds();
+
+                       if (this.backgroundPageShape == null) {
+                               this.backgroundPageShape = this.createBackgroundPageShape(bounds);
+                               this.backgroundPageShape.scale = 1;
+                               this.backgroundPageShape.isShadow = true;
+                               this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
+                               this.backgroundPageShape.init(this.graph.container);
+                               // Required for the browser to render the background page in correct order
+                               this.graph.container.firstChild.style.position = 'absolute';
+                               this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
+                               this.backgroundPageShape.redraw();
+
+                               this.backgroundPageShape.node.className = 'geBackgroundPage';
+                               this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
+
+                               // Adds listener for double click handling on background
+                               mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
+                                       mxUtils.bind(this, function(evt) {
+                                               this.graph.dblClick(evt);
+                                       })
+                               );
+
+                               // Adds basic listeners for graph event dispatching outside of the
+                               // container and finishing the handling of a single gesture
+                               mxEvent.addGestureListeners(this.backgroundPageShape.node,
+                                       mxUtils.bind(this, function(evt) {
+                                               this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
+                                       }),
+                                       mxUtils.bind(this, function(evt) {
+                                               // Hides the tooltip if mouse is outside container
+                                               if (this.graph.tooltipHandler != null &&
+                                                       this.graph.tooltipHandler.isHideOnHover()) {
+                                                       this.graph.tooltipHandler.hide();
+                                               }
+
+                                               if (this.graph.isMouseDown &&
+                                                       !mxEvent.isConsumed(evt)) {
+                                                       this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,
+                                                               new mxMouseEvent(evt));
+                                               }
+                                       }),
+                                       mxUtils.bind(this, function(evt) {
+                                               this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+                                                       new mxMouseEvent(evt));
+                                       }));
+                       } else {
+                               this.backgroundPageShape.scale = 1;
+                               this.backgroundPageShape.bounds = bounds;
+                               this.backgroundPageShape.redraw();
+                       }
+
+                       this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
+                               'url(' + editor.gridImage + ')' : 'none';
+               } else if (this.backgroundPageShape != null) {
+                       this.backgroundPageShape.destroy();
+                       this.backgroundPageShape = null;
+               }
+       };
+
+       // Draws page breaks only within the page
+       mxGraph.prototype.updatePageBreaks = function(visible, width, height) {
+               var scale = this.view.scale;
+               var tr = this.view.translate;
+               var fmt = this.pageFormat;
+               var ps = scale * this.pageScale;
+
+               var bounds2 = this.view.getBackgroundPageBounds();
+
+               width = bounds2.width;
+               height = bounds2.height;
+               var bounds = new mxRectangle(scale * tr.x, scale * tr.y,
+                       fmt.width * ps, fmt.height * ps);
+
+               // Does not show page breaks if the scale is too small
+               visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
+
+               var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
+               var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
+               var right = bounds2.x + width;
+               var bottom = bounds2.y + height;
+
+               if (this.horizontalPageBreaks == null && horizontalCount > 0) {
+                       this.horizontalPageBreaks = [];
+               }
+
+               if (this.horizontalPageBreaks != null) {
+                       for (var i = 0; i <= horizontalCount; i++) {
+                               var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
+                                       new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)
+                               ];
+
+                               if (this.horizontalPageBreaks[i] != null) {
+                                       this.horizontalPageBreaks[i].scale = 1;
+                                       this.horizontalPageBreaks[i].points = pts;
+                                       this.horizontalPageBreaks[i].redraw();
+                               } else {
+                                       var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
+                                       pageBreak.dialect = this.dialect;
+                                       pageBreak.isDashed = this.pageBreakDashed;
+                                       pageBreak.addPipe = false;
+                                       pageBreak.scale = scale;
+                                       pageBreak.init(this.view.backgroundPane);
+                                       pageBreak.redraw();
+
+                                       this.horizontalPageBreaks[i] = pageBreak;
+                               }
+                       }
+
+                       for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++) {
+                               this.horizontalPageBreaks[i].destroy();
+                       }
+
+                       this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
+               }
+
+               if (this.verticalPageBreaks == null && verticalCount > 0) {
+                       this.verticalPageBreaks = [];
+               }
+
+               if (this.verticalPageBreaks != null) {
+                       for (var i = 0; i <= verticalCount; i++) {
+                               var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
+                                       new mxPoint(right, bounds2.y + (i + 1) * bounds.height)
+                               ];
+
+                               if (this.verticalPageBreaks[i] != null) {
+                                       this.verticalPageBreaks[i].scale = 1; //scale;
+                                       this.verticalPageBreaks[i].points = pts;
+                                       this.verticalPageBreaks[i].redraw();
+                               } else {
+                                       var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
+                                       pageBreak.dialect = this.dialect;
+                                       pageBreak.isDashed = this.pageBreakDashed;
+                                       pageBreak.addPipe = false;
+                                       pageBreak.scale = scale;
+                                       pageBreak.init(this.view.backgroundPane);
+                                       pageBreak.redraw();
+
+                                       this.verticalPageBreaks[i] = pageBreak;
+                               }
+                       }
+
+                       for (var i = verticalCount; i < this.verticalPageBreaks.length; i++) {
+                               this.verticalPageBreaks[i].destroy();
+                       }
+
+                       this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
+               }
+       };
+
+       // Enables snapping to off-grid terminals for edge waypoints
+       mxEdgeHandler.prototype.snapToTerminals = true;
+
+       // Enables guides
+       mxGraphHandler.prototype.guidesEnabled = true;
+
+       // Disables removing relative children from parents
+       var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+       mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt) {
+               for (var i = 0; i < cells.length; i++) {
+                       if (this.graph.getModel().isVertex(cells[i])) {
+                               var geo = this.graph.getCellGeometry(cells[i]);
+
+                               if (geo != null && geo.relative) {
+                                       return false;
+                               }
+                       }
+               }
+
+               return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
+       };
+
+       // Alt-move disables guides
+       mxGuide.prototype.isEnabledForEvent = function(evt) {
+               return !mxEvent.isAltDown(evt);
+       };
+
+       // Consumes click events for disabled menu items
+       mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
+       mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled) {
+               var result = mxPopupMenuAddItem.apply(this, arguments);
+
+               if (enabled != null && !enabled) {
+                       mxEvent.addListener(result, 'mousedown', function(evt) {
+                               mxEvent.consume(evt);
+                       });
+               }
+
+               return result;
+       };
+
+       // Selects descendants before children selection mode
+       var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
+       mxGraphHandler.prototype.getInitialCellForEvent = function(me) {
+               var model = this.graph.getModel();
+               var psel = model.getParent(this.graph.getSelectionCell());
+               var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
+               var parent = model.getParent(cell);
+
+               if (psel == null || (psel != cell && psel != parent)) {
+                       while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
+                               model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                               cell = parent;
+                               parent = this.graph.getModel().getParent(cell);
+                       }
+               }
+
+               return cell;
+       };
+
+       // Selection is delayed to mouseup if child selected
+       var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
+       mxGraphHandler.prototype.isDelayedSelection = function(cell) {
+               var result = graphHandlerIsDelayedSelection.apply(this, arguments);
+               var model = this.graph.getModel();
+               var psel = model.getParent(this.graph.getSelectionCell());
+               var parent = model.getParent(cell);
+
+               if (psel == null || (psel != cell && psel != parent)) {
+                       if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                               result = true;
+                       }
+               }
+
+               return result;
+       };
+
+       // Delayed selection of parent group
+       mxGraphHandler.prototype.selectDelayed = function(me) {
+               var cell = me.getCell();
+
+               if (cell == null) {
+                       cell = this.cell;
+               }
+
+               var model = this.graph.getModel();
+               var parent = model.getParent(cell);
+
+               while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                       cell = parent;
+                       parent = model.getParent(cell);
+               }
+
+               this.graph.selectCellForEvent(cell, me.getEvent());
+       };
+
+       // Returns last selected ancestor
+       mxPanningHandler.prototype.getCellForPopupEvent = function(me) {
+               var cell = me.getCell();
+               var model = this.graph.getModel();
+               var parent = model.getParent(cell);
+
+               while (model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                       if (this.graph.isCellSelected(parent)) {
+                               cell = parent;
+                       }
+
+                       parent = model.getParent(parent);
+               }
+
+               return cell;
+       };
+};
+
+/**
+ * Creates and returns a new undo manager.
+ */
+Editor.prototype.createUndoManager = function() {
+       var graph = this.graph;
+       var undoMgr = new mxUndoManager();
+
+       // Installs the command history
+       var listener = function(sender, evt) {
+               undoMgr.undoableEditHappened(evt.getProperty('edit'));
+       };
+
+       graph.getModel().addListener(mxEvent.UNDO, listener);
+       graph.getView().addListener(mxEvent.UNDO, listener);
+
+       // Keeps the selection in sync with the history
+       var undoHandler = function(sender, evt) {
+               var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
+               var cells = [];
+
+               for (var i = 1; i < cand.length; i++) {
+                       if (graph.view.getState(cand[i]) != null) {
+                               cells.push(cand[i]);
+                       }
+               }
+
+               graph.setSelectionCells(cells);
+       };
+
+       undoMgr.addListener(mxEvent.UNDO, undoHandler);
+       undoMgr.addListener(mxEvent.REDO, undoHandler);
+
+       return undoMgr;
+};
+
+/**
+ * Adds basic stencil set (no namespace).
+ */
+Editor.prototype.initStencilRegistry = function() {
+       // Loads default stencils
+       mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
+};
+
+/**
+ * Overrides stencil registry for dynamic loading of stencils.
+ */
+(function() {
+       /**
+        * Maps from library names to an array of Javascript filenames,
+        * which are synchronously loaded. Currently only stencil files
+        * (.xml) and JS files (.js) are supported.
+        * IMPORTANT: For embedded diagrams to work entries must also
+        * be added in EmbedServlet.java.
+        */
+       mxStencilRegistry.libraries = {};
+
+       /**
+        * Stores all package names that have been dynamically loaded.
+        * Each package is only loaded once.
+        */
+       mxStencilRegistry.packages = [];
+
+       // Extends the default stencil registry to add dynamic loading
+       mxStencilRegistry.getStencil = function(name) {
+               var result = mxStencilRegistry.stencils[name];
+
+               if (result == null) {
+                       var basename = mxStencilRegistry.getBasenameForStencil(name);
+
+                       // Loads stencil files and tries again
+                       if (basename != null) {
+                               var libs = mxStencilRegistry.libraries[basename];
+
+                               if (libs != null) {
+                                       if (mxStencilRegistry.packages[basename] == null) {
+                                               mxStencilRegistry.packages[basename] = 1;
+
+                                               for (var i = 0; i < libs.length; i++) {
+                                                       var fname = libs[i];
+
+                                                       if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml') {
+                                                               mxStencilRegistry.loadStencilSet(fname, null);
+                                                       } else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js') {
+                                                               var req = mxUtils.load(fname);
+
+                                                               if (req != null) {
+                                                                       eval.call(window, req.getText());
+                                                               }
+                                                       } else {
+                                                               // FIXME: This does not yet work as the loading is triggered after
+                                                               // the shape was used in the graph, at which point the keys have
+                                                               // typically been translated in the calling method.
+                                                               //mxResources.add(fname);
+                                                       }
+                                               }
+                                       }
+                               } else {
+                                       mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
+                               }
+
+                               result = mxStencilRegistry.stencils[name];
+                       }
+               }
+
+               return result;
+       };
+
+       // Returns the basename for the given stencil or null if no file must be
+       // loaded to render the given stencil.
+       mxStencilRegistry.getBasenameForStencil = function(name) {
+               var parts = name.split('.');
+               var tmp = null;
+
+               if (parts.length > 0 && parts[0] == 'mxgraph') {
+                       tmp = parts[1];
+
+                       for (var i = 2; i < parts.length - 1; i++) {
+                               tmp += '/' + parts[i];
+                       }
+               }
+
+               return tmp;
+       };
+
+       // Loads the given stencil set
+       mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force) {
+               force = (force != null) ? force : false;
+
+               // Uses additional cache for detecting previous load attempts
+               var xmlDoc = mxStencilRegistry.packages[stencilFile];
+
+               if (force || xmlDoc == null) {
+                       var install = false;
+
+                       if (xmlDoc == null) {
+                               var req = mxUtils.load(stencilFile);
+                               xmlDoc = req.getXml();
+                               mxStencilRegistry.packages[stencilFile] = xmlDoc;
+                               install = true;
+                       }
+
+                       mxStencilRegistry.parseStencilSet(xmlDoc, postStencilLoad, install);
+               }
+       };
+
+       // Parses the given stencil set
+       mxStencilRegistry.parseStencilSet = function(xmlDocument, postStencilLoad, install) {
+               install = (install != null) ? install : true;
+               var root = xmlDocument.documentElement;
+               var shape = root.firstChild;
+               var packageName = '';
+               var name = root.getAttribute('name');
+
+               if (name != null) {
+                       packageName = name + '.';
+               }
+
+               while (shape != null) {
+                       if (shape.nodeType == mxConstants.NODETYPE_ELEMENT) {
+                               name = shape.getAttribute('name');
+
+                               if (name != null) {
+                                       packageName = packageName.toLowerCase();
+                                       var stencilName = name.replace(/ /g, "_");
+
+                                       if (install) {
+                                               mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
+                                       }
+
+                                       if (postStencilLoad != null) {
+                                               var w = shape.getAttribute('w');
+                                               var h = shape.getAttribute('h');
+
+                                               w = (w == null) ? 80 : parseInt(w, 10);
+                                               h = (h == null) ? 80 : parseInt(h, 10);
+
+                                               postStencilLoad(packageName, stencilName, name, w, h);
+                                       }
+                               }
+                       }
+
+                       shape = shape.nextSibling;
+               }
+       };
+})();
+
+/**
+ * Class for asynchronously opening a new window and loading a file at the same
+ * time. This acts as a bridge between the open dialog and the new editor.
+ */
+OpenFile = function(done) {
+       this.producer = null;
+       this.consumer = null;
+       this.done = done;
+};
+
+/**
+ * Registers the editor from the new window.
+ */
+OpenFile.prototype.setConsumer = function(value) {
+       this.consumer = value;
+       this.execute();
+};
+
+/**
+ * Sets the data from the loaded file.
+ */
+OpenFile.prototype.setData = function(value, filename) {
+       this.data = value;
+       this.filename = filename;
+       this.execute();
+};
+
+/**
+ * Displays an error message.
+ */
+OpenFile.prototype.error = function(msg) {
+       this.cancel();
+       mxUtils.alert(msg);
+};
+
+/**
+ * Consumes the data.
+ */
+OpenFile.prototype.execute = function() {
+       if (this.consumer != null && this.data != null) {
+               this.consumer(this.data, this.filename);
+               this.cancel();
+       }
+};
+
+/**
+ * Cancels the operation.
+ */
+OpenFile.prototype.cancel = function() {
+       if (this.done != null) {
+               this.done();
+       }
+};
index bca10c1..b81caf5 100644 (file)
@@ -1 +1,1325 @@
-var _0x5364=["\x65\x64\x69\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x45\x64\x69\x74\x6F\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x72\x61\x70\x68","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x73\x72\x63","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x65\x6E\x75\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x76\x73","\x72\x65\x66\x72\x65\x73\x68","\x63\x72\x65\x61\x74\x65\x55\x69","\x65\x76\x65\x6E\x74","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x41\x6C\x6C\x6F\x77\x65\x64","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x62\x69\x6E\x64","\x62\x6F\x64\x79","\x6F\x6E\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x6D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x6E\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x64\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x69\x6E\x69\x74","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x75\x72\x73\x6F\x72","\x64\x65\x66\x61\x75\x6C\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x66\x6F\x63\x75\x73","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x61\x70\x70\x6C\x79","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x73\x74\x61\x72\x74","\x65\x6E\x64","\x69\x6E\x70\x75\x74","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x65\x6D\x61\x69\x6C","\x6E","\x63\x72\x65\x61\x74\x65\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x65\x6C\x6C","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x74\x61\x67\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x73\x6F\x75\x72\x63\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x69\x73\x56\x65\x72\x74\x65\x78","\x6C\x6F\x67","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x63\x6F\x6E\x73\x75\x6D\x65","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x6F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x67\x65\x73\x74\x75\x72\x65\x63\x68\x61\x6E\x67\x65","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x63\x61\x6C\x65\x28","\x73\x63\x61\x6C\x65","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x76\x69\x65\x77","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x7A\x6F\x6F\x6D\x54\x6F\x43\x65\x6E\x74\x65\x72","\x7A\x6F\x6F\x6D","\x76\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x73\x69\x7A\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6D\x65\x6E\x75\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x74\x6F\x6F\x6C\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x66\x6F\x6F\x74\x65\x72\x48\x65\x69\x67\x68\x74","\x68\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x55\x6E\x64\x6F\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x73\x74\x65","\x67\x65\x74","\x69\x73\x45\x6D\x70\x74\x79","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x74","\x63\x6F\x70\x79","\x6F\x70\x65\x6E\x65\x72","\x6F\x70\x65\x6E\x46\x69\x6C\x65","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x63\x6C\x65\x61\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x4D\x69\x73\x73\x69\x6E\x67\x46\x69\x6C\x65","\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x61\x6C\x65\x72\x74","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x6F\x70\x65\x6E\x53\x74\x72\x69\x6E\x67","\x64\x61\x74\x61","\x6E\x65\x77","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x67\x65\x74\x49\x74\x65\x6D","\x72\x65\x70\x6C\x61\x63\x65","\x63\x6F\x6E\x66\x69\x72\x6D","\x73\x65\x74\x49\x74\x65\x6D","\x73\x61\x76\x65\x64","\x20","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x50\x4F\x53\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x50\x72\x6F\x6A\x65\x63\x74\x20","\x6E\x61\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x20\x69\x73\x20\x6F\x70\x65\x6E\x69\x6E\x67\x20\x69\x6E\x20\x6E\x65\x77\x20\x77\x69\x6E\x64\x6F\x77\x21","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x69\x64","\x5F\x62\x6C\x61\x6E\x6B","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x65\x77\x26\x6E\x61\x6D\x65\x3D","\x73\x65\x6E\x64","\x64\x72\x61\x77\x69\x6E\x67\x54\x6F\x6F\x4C\x61\x72\x67\x65","\x70\x6F\x70\x75\x70","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x73\x61\x76\x65","\x50\x55\x54","\x55\x70\x64\x61\x74\x65\x64\x20\x61\x74\x20","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x20\x28","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x64\x72\x61\x66\x74\x3D","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x66\x69\x6C\x65","\x73\x61\x76\x65\x41\x73","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x63\x6C\x6F\x6E\x65\x64\x26\x6E\x61\x6D\x65\x3D","\x26\x64\x72\x61\x66\x74\x3D","\x26\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x76\x61\x6C\x69\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x74","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x3C\x62\x72\x3E","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x51\x75\x65\x73\x74\x69\x6F\x6E\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x0A","\x6C\x61\x62\x65\x6C","\x4C\x61\x62\x65\x6C\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6C\x6F\x63\x6B","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x53\x74\x61\x72\x74\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x67\x65\x74\x49\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6E\x75\x6C\x6C","\x56\x61\x6C\x75\x65\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x2C","\x73\x70\x6C\x69\x74","\x74\x72\x69\x6D","\x56\x61\x6C\x75\x65","\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x70\x75\x62\x6C\x69\x73\x68","\x50\x75\x62\x6C\x69\x73\x68\x65\x64\x20\x61\x74\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x66\x69\x6C\x65","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x74\x20","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x6E\x61\x6D\x65\x3D","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x67\x65\x74\x55\x72\x6C","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x26","\x3D","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x68\x61\x64\x6F\x77","\x74\x69\x6C\x74","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x63\x75\x72\x76\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x72\x6F\x75\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x72\x61\x6E\x67\x65","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x73\x70\x61\x63\x69\x6E\x67","\x6C\x69\x6E\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x6C\x69\x67\x6E","\x67\x65\x74\x53\x74\x61\x74\x65","\x69\x73\x4C\x6F\x6F\x70","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x6D\x61\x78","\x68\x65\x69\x67\x68\x74","\x70\x78","\x74\x6F\x70","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x77\x69\x64\x74\x68","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x68\x73\x70\x6C\x69\x74","\x76\x73\x70\x6C\x69\x74","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x4F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x44\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x46\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x48\x73\x70\x6C\x69\x74","\x67\x65\x56\x73\x70\x6C\x69\x74","\x30\x70\x78","\x72\x69\x67\x68\x74","\x6D\x65\x6E\x75\x62\x61\x72","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x74\x6F\x6F\x6C\x62\x61\x72","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x73\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x6F\x74\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x64\x64\x53\x70\x6C\x69\x74\x48\x61\x6E\x64\x6C\x65\x72","\x61","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D\x20\x67\x65\x53\x74\x61\x74\x75\x73","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x67\x65\x46\x6F\x6F\x74\x65\x72","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x72\x6D","\x66\x6F\x72\x6D","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x78","\x79","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x64\x69\x61\x6C\x6F\x67","\x49\x53\x5F\x56\x4D\x4C","\x63\x6C\x6F\x73\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x65\x78\x65\x63\x75\x74\x65","\x43\x61\x6D\x69\x6E\x6F","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x49\x53\x5F\x4D\x41\x43","\x6D\x65\x74\x61\x4B\x65\x79","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x65\x6E\x61\x62\x6C\x65\x64","\x66\x75\x6E\x63\x74","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x4B\x65\x79","\x65\x73\x63\x61\x70\x65","\x65\x6E\x74\x65\x72","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x67\x72\x69\x64","\x61\x62\x6F\x75\x74","\x20\x6D\x75\x73\x74\x20\x68\x61\x76\x65\x20","\x20\x6F\x75\x74\x67\x6F\x69\x6E\x67\x20\x65\x64\x67\x65\x2E","\x70\x75\x73\x68","\x20\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x20\x65\x64\x67\x65\x2E"];EditorUi=function(_0x2ce5x1,_0x2ce5x2){this[_0x5364[0]]=_0x2ce5x1|| new Editor();this[_0x5364[1]]=_0x2ce5x2||document[_0x5364[3]](_0x5364[2]);var _0x2ce5x3=_0x2ce5x1[_0x5364[4]];var _0x2ce5x4=this;this[_0x5364[1]][_0x5364[6]][_0x5364[5]]=_0x5364[7]; new Image()[_0x5364[8]]=mxPopupMenu[_0x5364[10]][_0x5364[9]];if(mxConnectionHandler[_0x5364[10]][_0x5364[11]]!=null){ new Image()[_0x5364[8]]=mxConnectionHandler[_0x5364[10]][_0x5364[11]][_0x5364[8]]};this[_0x5364[12]]= new Actions(this);this[_0x5364[13]]= new Menus(this);this[_0x5364[14]]();this[_0x5364[15]]();this[_0x5364[16]]();var _0x2ce5x5=mxUtils[_0x5364[20]](this,function(_0x2ce5x6){if(_0x2ce5x6==null){_0x2ce5x6=window[_0x5364[17]]};if(this[_0x5364[18]](_0x2ce5x6)){return true};return _0x2ce5x3[_0x5364[19]]()});if(this[_0x5364[1]]==document[_0x5364[21]]){this[_0x5364[23]][_0x5364[22]]=_0x2ce5x5;this[_0x5364[23]][_0x5364[24]]=_0x2ce5x5;this[_0x5364[25]][_0x5364[22]]=_0x2ce5x5;this[_0x5364[25]][_0x5364[24]]=_0x2ce5x5;this[_0x5364[26]][_0x5364[22]]=_0x2ce5x5;this[_0x5364[26]][_0x5364[24]]=_0x2ce5x5;this[_0x5364[27]][_0x5364[22]]=_0x2ce5x5;this[_0x5364[27]][_0x5364[24]]=_0x2ce5x5;this[_0x5364[28]][_0x5364[22]]=_0x2ce5x5;this[_0x5364[28]][_0x5364[24]]=_0x2ce5x5};if(mxClient[_0x5364[29]]&&( typeof (document[_0x5364[30]])===_0x5364[31]||document[_0x5364[30]]<9)){mxEvent[_0x5364[33]](this[_0x5364[26]],_0x5364[32],_0x2ce5x5);mxEvent[_0x5364[33]](this[_0x5364[27]],_0x5364[32],_0x2ce5x5)}else {this[_0x5364[26]][_0x5364[34]]=_0x2ce5x5;this[_0x5364[27]][_0x5364[34]]=_0x2ce5x5};_0x2ce5x3[_0x5364[35]](this[_0x5364[26]]);_0x2ce5x3[_0x5364[15]]();_0x2ce5x3[_0x5364[1]][_0x5364[38]](_0x5364[36],_0x5364[37]);_0x2ce5x3[_0x5364[1]][_0x5364[6]][_0x5364[39]]=_0x5364[40];_0x2ce5x3[_0x5364[1]][_0x5364[6]][_0x5364[41]]=_0x5364[42]+_0x2ce5x1[_0x5364[43]]+_0x5364[44];_0x2ce5x3[_0x5364[1]][_0x5364[6]][_0x5364[45]]=_0x5364[46];_0x2ce5x3[_0x5364[1]][_0x5364[47]]();var _0x2ce5x7=_0x2ce5x3[_0x5364[48]];_0x2ce5x3[_0x5364[48]]=function(_0x2ce5x8,_0x2ce5x9,_0x2ce5xa){if(_0x2ce5x8==mxEvent[_0x5364[49]]){this[_0x5364[1]][_0x5364[47]]()};_0x2ce5x7[_0x5364[50]](this,arguments)};this[_0x5364[58]](_0x2ce5x3[_0x5364[51]],[_0x5364[52],_0x5364[53],_0x5364[54],_0x5364[55],_0x5364[56]],[[1,1],[0,0],[1,1],[1,_0x5364[57]],[1,_0x5364[57]]],[[0,0],[1,_0x5364[57]],[1,_0x5364[57]],[1,_0x5364[57]],[1,_0x5364[57]]]);_0x2ce5x3[_0x5364[59]]=function(_0x2ce5x6,_0x2ce5xb){var _0x2ce5xc=[_0x5364[55]];var _0x2ce5xd= new mxEventObject(mxEvent.DOUBLE_CLICK,_0x5364[17],_0x2ce5x6,_0x5364[60],_0x2ce5xb);this[_0x5364[61]](_0x2ce5xd);if(this[_0x5364[62]]()&&!mxEvent[_0x5364[63]](_0x2ce5x6)&&!_0x2ce5xd[_0x5364[63]]()){if(this[_0x5364[65]]()[_0x5364[64]](_0x2ce5xb)){if(_0x2ce5xc[_0x5364[69]](_0x2ce5xb[_0x5364[68]][_0x5364[67]][_0x5364[66]])>=0){this[_0x5364[70]](_0x2ce5xb)}}else {if(this[_0x5364[65]]()[_0x5364[71]](_0x2ce5xb)){console[_0x5364[72]](_0x2ce5x4);console[_0x5364[72]](_0x2ce5xb);_0x2ce5x4[_0x5364[73]]( new GeneralDialog(_0x2ce5x4,_0x2ce5xb)[_0x5364[1]],320,280,true,true)}};_0x2ce5xd[_0x5364[74]]()}};_0x2ce5x3[_0x5364[76]][_0x5364[75]]=true;_0x2ce5x3[_0x5364[76]][_0x5364[77]]=mxUtils[_0x5364[20]](this,function(_0x2ce5xe,_0x2ce5xb,_0x2ce5x6){this[_0x5364[13]][_0x5364[78]](_0x2ce5xe,_0x2ce5xb,_0x2ce5x6)});_0x2ce5x1[_0x5364[80]][_0x5364[35]](this[_0x5364[79]]);mxEvent[_0x5364[82]](document,mxUtils[_0x5364[20]](this,function(_0x2ce5x6){_0x2ce5x3[_0x5364[76]][_0x5364[81]]()}));if(mxClient[_0x5364[83]]){mxEvent[_0x5364[33]](_0x2ce5x3[_0x5364[1]],_0x5364[84],mxUtils[_0x5364[20]](this,function(_0x2ce5x6){_0x2ce5x3[_0x5364[89]][_0x5364[88]]()[_0x5364[38]](_0x5364[85],_0x5364[86]+_0x2ce5x6[_0x5364[87]]+_0x5364[44]);_0x2ce5x3[_0x5364[89]][_0x5364[91]]()[_0x5364[6]][_0x5364[90]]=_0x5364[7]}));mxEvent[_0x5364[33]](_0x2ce5x3[_0x5364[1]],_0x5364[92],mxUtils[_0x5364[20]](this,function(_0x2ce5x6){_0x2ce5x3[_0x5364[89]][_0x5364[88]]()[_0x5364[93]](_0x5364[85]);_0x2ce5x3[_0x5364[94]]=true;_0x2ce5x3[_0x5364[95]](_0x2ce5x6[_0x5364[87]]);_0x2ce5x3[_0x5364[89]][_0x5364[91]]()[_0x5364[6]][_0x5364[90]]=_0x5364[96]}))};var _0x2ce5xf=this[_0x5364[97]](_0x2ce5x1);this[_0x5364[98]]=function(){return _0x2ce5xf};mxEvent[_0x5364[33]](window,_0x5364[99],mxUtils[_0x5364[20]](this,function(){this[_0x5364[15]]();_0x2ce5x3[_0x5364[100]]();this[_0x5364[0]][_0x5364[80]][_0x5364[101]](false);this[_0x5364[0]][_0x5364[80]][_0x5364[80]][_0x5364[100]]()}));this[_0x5364[35]]();this[_0x5364[102]]()};EditorUi[_0x5364[10]][_0x5364[103]]=(mxClient[_0x5364[83]])?16:8;EditorUi[_0x5364[10]][_0x5364[104]]=33;EditorUi[_0x5364[10]][_0x5364[105]]=36;EditorUi[_0x5364[10]][_0x5364[106]]=28;EditorUi[_0x5364[10]][_0x5364[107]]=204;EditorUi[_0x5364[10]][_0x5364[108]]=190;EditorUi[_0x5364[10]][_0x5364[35]]=function(){this[_0x5364[109]]();this[_0x5364[110]]();var _0x2ce5x10=this[_0x5364[12]][_0x5364[112]](_0x5364[111]);var _0x2ce5x11=function(){_0x2ce5x10[_0x5364[114]](!mxClipboard[_0x5364[113]]())};var _0x2ce5x12=mxClipboard[_0x5364[115]];mxClipboard[_0x5364[115]]=function(){_0x2ce5x12[_0x5364[50]](this,arguments);_0x2ce5x11()};var _0x2ce5x13=mxClipboard[_0x5364[116]];mxClipboard[_0x5364[116]]=function(){_0x2ce5x13[_0x5364[50]](this,arguments);_0x2ce5x11()}};EditorUi[_0x5364[10]][_0x5364[18]]=function(_0x2ce5x6){return false};EditorUi[_0x5364[10]][_0x5364[102]]=function(){try{if(window[_0x5364[117]]!=null&&window[_0x5364[117]][_0x5364[118]]!=null){window[_0x5364[117]][_0x5364[118]][_0x5364[130]](mxUtils[_0x5364[20]](this,function(_0x2ce5x14,_0x2ce5x15){try{var _0x2ce5x16=mxUtils[_0x5364[119]](_0x2ce5x14);this[_0x5364[0]][_0x5364[121]](_0x2ce5x16[_0x5364[120]]);this[_0x5364[0]][_0x5364[122]]=false;this[_0x5364[0]][_0x5364[124]][_0x5364[123]]();if(_0x2ce5x15!=null){this[_0x5364[0]][_0x5364[125]]=_0x2ce5x15}}catch(e){mxUtils[_0x5364[129]](mxResources[_0x5364[112]](_0x5364[126])+_0x5364[127]+e[_0x5364[128]])}}))}}catch(e){}};EditorUi[_0x5364[10]][_0x5364[131]]=function(_0x2ce5x14,_0x2ce5x15,_0x2ce5x17){try{var _0x2ce5x16=mxUtils[_0x5364[119]](_0x2ce5x14);this[_0x5364[0]][_0x5364[121]](_0x2ce5x16[_0x5364[120]]);this[_0x5364[0]][_0x5364[122]]=false;this[_0x5364[0]][_0x5364[124]][_0x5364[123]]();if(_0x2ce5x15!=null){this[_0x5364[0]][_0x5364[125]]=_0x2ce5x15};if(_0x2ce5x17!=null){this[_0x5364[0]][_0x5364[132]]=_0x2ce5x17}}catch(e){mxUtils[_0x5364[129]](mxResources[_0x5364[112]](_0x5364[126])+_0x5364[127]+e[_0x5364[128]])}};EditorUi[_0x5364[10]][_0x5364[133]]=function(_0x2ce5x18){var _0x2ce5x1=this[_0x5364[0]];if(_0x2ce5x18!=null){var _0x2ce5x14=mxUtils[_0x5364[135]](this[_0x5364[0]][_0x5364[134]]());try{if(useLocalStorage){if(localStorage[_0x5364[136]](_0x2ce5x18)!=null&&!mxUtils[_0x5364[138]](mxResources[_0x5364[112]](_0x5364[137],[_0x2ce5x18]))){return};localStorage[_0x5364[139]](_0x2ce5x18,_0x2ce5x14);this[_0x5364[0]][_0x5364[142]](mxResources[_0x5364[112]](_0x5364[140])+_0x5364[141]+ new Date())}else {console[_0x5364[72]](_0x2ce5x14[_0x5364[143]]);console[_0x5364[72]](MAX_REQUEST_SIZE);if(_0x2ce5x14[_0x5364[143]]<MAX_REQUEST_SIZE){_0x2ce5x14=encodeURIComponent(_0x2ce5x14);_0x2ce5x18=encodeURIComponent(_0x2ce5x18);var _0x2ce5x19= new XMLHttpRequest();_0x2ce5x19[_0x5364[102]](_0x5364[144],SAVE_URL,true);_0x2ce5x19[_0x5364[147]](_0x5364[145],_0x5364[146]);_0x2ce5x19[_0x5364[147]](_0x5364[148],_0x5364[149]+_0x2ce5x1[_0x5364[132]][_0x5364[150]]);_0x2ce5x19[_0x5364[151]]=function(_0x2ce5x1a){if(_0x2ce5x19[_0x5364[152]]===4){if(_0x2ce5x19[_0x5364[153]]===201){_0x2ce5x1[_0x5364[142]](_0x5364[154]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[155]]+_0x5364[158]);setTimeout(function(){window[_0x5364[102]](_0x5364[159]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[160]],_0x5364[161])},1500)}else {_0x2ce5x1[_0x5364[142]](_0x5364[162]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[163]][0][_0x5364[128]])}}};_0x2ce5x19[_0x5364[164]]=function(_0x2ce5x1a){mxUtils[_0x5364[129]](_0x2ce5x19[_0x5364[165]])};_0x2ce5x19[_0x5364[167]](_0x5364[166]+_0x2ce5x18)}else {mxUtils[_0x5364[129]](mxResources[_0x5364[112]](_0x5364[168]));mxUtils[_0x5364[169]](_0x2ce5x14);return}};this[_0x5364[0]][_0x5364[125]]=_0x2ce5x18;this[_0x5364[0]][_0x5364[122]]=false}catch(e){this[_0x5364[0]][_0x5364[142]](_0x5364[170])}}else {this[_0x5364[0]][_0x5364[142]](_0x5364[170])}};EditorUi[_0x5364[10]][_0x5364[171]]=function(_0x2ce5x18){var _0x2ce5x1=this[_0x5364[0]];if(_0x2ce5x18!=null){var _0x2ce5x14=mxUtils[_0x5364[135]](this[_0x5364[0]][_0x5364[134]]());try{if(useLocalStorage){if(localStorage[_0x5364[136]](_0x2ce5x18)!=null&&!mxUtils[_0x5364[138]](mxResources[_0x5364[112]](_0x5364[137],[_0x2ce5x18]))){return};localStorage[_0x5364[139]](_0x2ce5x18,_0x2ce5x14);this[_0x5364[0]][_0x5364[142]](mxResources[_0x5364[112]](_0x5364[140])+_0x5364[141]+ new Date())}else {console[_0x5364[72]](_0x2ce5x14[_0x5364[143]]);console[_0x5364[72]](MAX_REQUEST_SIZE);if(_0x2ce5x14[_0x5364[143]]<MAX_REQUEST_SIZE){_0x2ce5x14=encodeURIComponent(_0x2ce5x14);var _0x2ce5x19= new XMLHttpRequest();_0x2ce5x19[_0x5364[102]](_0x5364[172],SAVE_URL+this[_0x5364[0]][_0x5364[132]][_0x5364[160]],true);_0x2ce5x19[_0x5364[147]](_0x5364[145],_0x5364[146]);_0x2ce5x19[_0x5364[147]](_0x5364[148],_0x5364[149]+_0x2ce5x1[_0x5364[132]][_0x5364[150]]);_0x2ce5x19[_0x5364[151]]=function(_0x2ce5x1a){if(_0x2ce5x19[_0x5364[152]]===4){if(_0x2ce5x19[_0x5364[153]]===200){_0x2ce5x1[_0x5364[142]](_0x5364[173]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[174]]+_0x5364[175]+_0x2ce5x19[_0x5364[153]]+_0x5364[141]+_0x2ce5x19[_0x5364[165]]+_0x5364[44])}else {_0x2ce5x1[_0x5364[142]](_0x5364[176]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[163]][0][_0x5364[128]])}}};_0x2ce5x19[_0x5364[164]]=function(_0x2ce5x1a){mxUtils[_0x5364[129]](_0x2ce5x19[_0x5364[165]])};_0x2ce5x19[_0x5364[167]](_0x5364[177]+_0x2ce5x14)}else {mxUtils[_0x5364[129]](mxResources[_0x5364[112]](_0x5364[168]));mxUtils[_0x5364[169]](_0x2ce5x14);return}};this[_0x5364[0]][_0x5364[125]]=_0x2ce5x18;this[_0x5364[0]][_0x5364[122]]=false}catch(e){this[_0x5364[0]][_0x5364[142]](_0x5364[178])}}else {this[_0x5364[0]][_0x5364[142]](_0x5364[178])}};EditorUi[_0x5364[10]][_0x5364[179]]=function(_0x2ce5x18){var _0x2ce5x1=this[_0x5364[0]];console[_0x5364[72]](_0x2ce5x18);if(_0x2ce5x18!=null){var _0x2ce5x14=mxUtils[_0x5364[135]](this[_0x5364[0]][_0x5364[134]]());try{if(useLocalStorage){if(localStorage[_0x5364[136]](_0x2ce5x18)!=null&&!mxUtils[_0x5364[138]](mxResources[_0x5364[112]](_0x5364[137],[_0x2ce5x18]))){return};localStorage[_0x5364[139]](_0x2ce5x18,_0x2ce5x14);this[_0x5364[0]][_0x5364[142]](mxResources[_0x5364[112]](_0x5364[140])+_0x5364[141]+ new Date())}else {console[_0x5364[72]](_0x2ce5x14[_0x5364[143]]);console[_0x5364[72]](MAX_REQUEST_SIZE);if(_0x2ce5x14[_0x5364[143]]<MAX_REQUEST_SIZE){_0x2ce5x14=encodeURIComponent(_0x2ce5x14);_0x2ce5x18=encodeURIComponent(_0x2ce5x18);var _0x2ce5x19= new XMLHttpRequest();_0x2ce5x19[_0x5364[102]](_0x5364[144],SAVE_URL,true);_0x2ce5x19[_0x5364[147]](_0x5364[145],_0x5364[146]);_0x2ce5x19[_0x5364[147]](_0x5364[148],_0x5364[149]+_0x2ce5x1[_0x5364[132]][_0x5364[150]]);_0x2ce5x19[_0x5364[151]]=function(_0x2ce5x1a){if(_0x2ce5x19[_0x5364[152]]===4){if(_0x2ce5x19[_0x5364[153]]===201){_0x2ce5x1[_0x5364[142]](_0x5364[154]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[155]]+_0x5364[158]);setTimeout(function(){window[_0x5364[102]](_0x5364[159]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[160]],_0x5364[161])},1500)}else {_0x2ce5x1[_0x5364[142]](_0x5364[180]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[163]][0][_0x5364[128]])}}};_0x2ce5x19[_0x5364[164]]=function(_0x2ce5x1a){mxUtils[_0x5364[129]](_0x2ce5x19[_0x5364[165]])};_0x2ce5x19[_0x5364[167]](_0x5364[181]+_0x2ce5x18+_0x5364[182]+_0x2ce5x14+_0x5364[183]+_0x2ce5x14)}else {mxUtils[_0x5364[129]](mxResources[_0x5364[112]](_0x5364[168]));mxUtils[_0x5364[169]](_0x2ce5x14);return}};this[_0x5364[0]][_0x5364[125]]=_0x2ce5x18;this[_0x5364[0]][_0x5364[122]]=false}catch(e){this[_0x5364[0]][_0x5364[142]](_0x5364[178])}}else {this[_0x5364[0]][_0x5364[142]](_0x5364[178])}};EditorUi[_0x5364[10]][_0x5364[184]]=function(_0x2ce5x1b,_0x2ce5x1c){var _0x2ce5x3=this[_0x5364[0]][_0x5364[4]];_0x2ce5x1b=null!=_0x2ce5x1b?_0x2ce5x1b:_0x2ce5x3[_0x5364[186]][_0x5364[185]]();_0x2ce5x1c=null!=_0x2ce5x1c?_0x2ce5x1c:{};for(var _0x2ce5x1d=!0,_0x2ce5x1e=_0x2ce5x3[_0x5364[186]][_0x5364[187]](_0x2ce5x1b),_0x2ce5x1a=0;_0x2ce5x1a<_0x2ce5x1e;_0x2ce5x1a++){var _0x2ce5x1f=_0x2ce5x3[_0x5364[186]][_0x5364[188]](_0x2ce5x1b,_0x2ce5x1a),_0x2ce5x20=_0x2ce5x1c;_0x2ce5x3[_0x5364[189]](_0x2ce5x1f)&&(_0x2ce5x20={});_0x2ce5x20=this[_0x5364[184]](_0x2ce5x1f,_0x2ce5x20);null!=_0x2ce5x20?_0x2ce5x3[_0x5364[191]](_0x2ce5x1f,_0x2ce5x20[_0x5364[137]](/\n/g,_0x5364[190])):_0x2ce5x3[_0x5364[191]](_0x2ce5x1f,null);_0x2ce5x1d=_0x2ce5x1d&&null==_0x2ce5x20};_0x2ce5x1e=_0x5364[192];if(_0x2ce5x3[_0x5364[186]][_0x5364[71]](_0x2ce5x1b)){switch(_0x2ce5x1b[_0x5364[67]][_0x5364[200]]){case _0x5364[55]:_0x2ce5x1e=(_0x2ce5x1b[_0x5364[67]][_0x5364[193]](_0x5364[55])!==_0x5364[192])?_0x5364[192]:_0x5364[194]+_0x5364[195];_0x2ce5x1e+=(_0x2ce5x1b[_0x5364[67]][_0x5364[193]](_0x5364[196])!==_0x5364[192])?_0x5364[192]:_0x5364[197]+_0x5364[195];break;case _0x5364[54]:_0x2ce5x1e=(_0x2ce5x1b[_0x5364[67]][_0x5364[193]](_0x5364[55])!==_0x5364[192])?_0x5364[192]:_0x5364[194]+_0x5364[195];_0x2ce5x1e+=(_0x2ce5x1b[_0x5364[67]][_0x5364[193]](_0x5364[196])!==_0x5364[192])?_0x5364[192]:_0x5364[197]+_0x5364[195];break;case _0x5364[52]:_0x2ce5x1e=this[_0x5364[198]](_0x5364[52])?_0x5364[192]:_0x5364[199]+_0x5364[195];_0x2ce5x1e+=(_0x2ce5x1b[_0x5364[67]][_0x5364[193]](_0x5364[196])!==_0x5364[192])?_0x5364[192]:_0x5364[197]+_0x5364[195];break}};if(_0x2ce5x3[_0x5364[186]][_0x5364[64]](_0x2ce5x1b)){var _0x2ce5x21=_0x2ce5x3[_0x5364[186]][_0x5364[202]](_0x2ce5x1b[_0x5364[68]][_0x5364[201]]());switch(_0x2ce5x21[_0x5364[67]][_0x5364[200]]){case _0x5364[55]:var _0x2ce5x22=String(_0x2ce5x1b[_0x5364[203]]());console[_0x5364[72]](_0x2ce5x22);if(_0x2ce5x22===_0x5364[204]||_0x2ce5x22===_0x5364[31]){_0x2ce5x1e=_0x5364[205]+_0x5364[195]}else {var _0x2ce5x23=_0x2ce5x22[_0x5364[207]](_0x5364[206]);_0x2ce5x23[_0x5364[211]](function(_0x2ce5x24,_0x2ce5x25){_0x2ce5x1e=_0x2ce5x1e+((_0x2ce5x24[_0x5364[208]]()!==_0x5364[192])?_0x5364[192]:_0x5364[209]+(_0x2ce5x25+1)+_0x5364[210]+_0x5364[195])})};break}};_0x2ce5x3[_0x5364[212]](_0x2ce5x1b)&&!_0x2ce5x1d&&(_0x2ce5x1e+=(mxResources[_0x5364[112]](_0x2ce5x3[_0x5364[213]])||_0x2ce5x3[_0x5364[213]])+_0x5364[195]);_0x2ce5x1e=_0x2ce5x3[_0x5364[186]][_0x5364[64]](_0x2ce5x1b)?_0x2ce5x1e+(_0x2ce5x3[_0x5364[215]](_0x2ce5x1b,_0x2ce5x3[_0x5364[186]][_0x5364[214]](_0x2ce5x1b,!0),_0x2ce5x3[_0x5364[186]][_0x5364[214]](_0x2ce5x1b,!1))||_0x5364[192]):_0x2ce5x1e+(_0x2ce5x3[_0x5364[216]](_0x2ce5x1b)||_0x5364[192]);_0x2ce5x1a=_0x2ce5x3[_0x5364[217]](_0x2ce5x1b,_0x2ce5x1c);null!=_0x2ce5x1a&&(_0x2ce5x1e+=_0x2ce5x1a);null==_0x2ce5x3[_0x5364[186]][_0x5364[218]](_0x2ce5x1b)&&_0x2ce5x3[_0x5364[89]][_0x5364[184]]();return 0<_0x2ce5x1e[_0x5364[143]]||!_0x2ce5x1d?_0x2ce5x1e:null};EditorUi[_0x5364[10]][_0x5364[198]]=function(_0x2ce5x26){var _0x2ce5x3=this[_0x5364[0]][_0x5364[4]];var _0x2ce5x27=_0x2ce5x3[_0x5364[219]]();var _0x2ce5x28=0;_0x2ce5x27[_0x5364[220]][_0x5364[211]](function(_0x2ce5x29){if(_0x2ce5x3[_0x5364[186]][_0x5364[71]](_0x2ce5x29)&&_0x2ce5x29[_0x5364[67]][_0x5364[200]]==_0x2ce5x26){_0x2ce5x28++}});return _0x2ce5x28>1?false:true};EditorUi[_0x5364[10]][_0x5364[221]]=function(_0x2ce5x18){var _0x2ce5x1=this[_0x5364[0]];if(_0x2ce5x18!=null){var _0x2ce5x2a=this[_0x5364[184]]();if(_0x2ce5x2a===null){var _0x2ce5x14=mxUtils[_0x5364[135]](this[_0x5364[0]][_0x5364[134]]());try{if(useLocalStorage){if(localStorage[_0x5364[136]](_0x2ce5x18)!=null&&!mxUtils[_0x5364[138]](mxResources[_0x5364[112]](_0x5364[137],[_0x2ce5x18]))){return};localStorage[_0x5364[139]](_0x2ce5x18,_0x2ce5x14);this[_0x5364[0]][_0x5364[142]](mxResources[_0x5364[112]](_0x5364[140])+_0x5364[141]+ new Date())}else {console[_0x5364[72]](_0x2ce5x14[_0x5364[143]]);console[_0x5364[72]](MAX_REQUEST_SIZE);if(_0x2ce5x14[_0x5364[143]]<MAX_REQUEST_SIZE){_0x2ce5x14=encodeURIComponent(_0x2ce5x14);var _0x2ce5x19= new XMLHttpRequest();_0x2ce5x19[_0x5364[102]](_0x5364[172],SAVE_URL+this[_0x5364[0]][_0x5364[132]][_0x5364[160]],true);_0x2ce5x19[_0x5364[147]](_0x5364[145],_0x5364[146]);_0x2ce5x19[_0x5364[147]](_0x5364[148],_0x5364[149]+_0x2ce5x1[_0x5364[132]][_0x5364[150]]);_0x2ce5x19[_0x5364[151]]=function(_0x2ce5x1a){if(_0x2ce5x19[_0x5364[152]]===4){if(_0x2ce5x19[_0x5364[153]]===200){_0x2ce5x1[_0x5364[142]](_0x5364[222]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[174]]+_0x5364[175]+_0x2ce5x19[_0x5364[153]]+_0x5364[141]+_0x2ce5x19[_0x5364[165]]+_0x5364[44])}else {_0x2ce5x1[_0x5364[142]](_0x5364[176]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[163]][0][_0x5364[128]])}}};_0x2ce5x19[_0x5364[164]]=function(_0x2ce5x1a){mxUtils[_0x5364[129]](_0x2ce5x19[_0x5364[165]])};_0x2ce5x19[_0x5364[167]](_0x5364[177]+_0x2ce5x14+_0x5364[183]+_0x2ce5x14)}else {mxUtils[_0x5364[129]](mxResources[_0x5364[112]](_0x5364[168]));mxUtils[_0x5364[169]](_0x2ce5x14);return}};this[_0x5364[0]][_0x5364[125]]=_0x2ce5x18;this[_0x5364[0]][_0x5364[122]]=false}catch(e){this[_0x5364[0]][_0x5364[142]](_0x5364[223])}}else {_0x2ce5x1[_0x5364[142]](_0x5364[224])}}else {this[_0x5364[0]][_0x5364[142]](_0x5364[223])}};EditorUi[_0x5364[10]][_0x5364[225]]=function(_0x2ce5x18){var _0x2ce5x1=this[_0x5364[0]];if(_0x2ce5x18!=null){try{var _0x2ce5x19= new XMLHttpRequest();_0x2ce5x19[_0x5364[102]](_0x5364[144],VARIABLE_URL,true);_0x2ce5x19[_0x5364[147]](_0x5364[145],_0x5364[146]);_0x2ce5x19[_0x5364[147]](_0x5364[148],_0x5364[149]+_0x2ce5x1[_0x5364[132]][_0x5364[150]]);_0x2ce5x19[_0x5364[151]]=function(_0x2ce5x1a){if(_0x2ce5x19[_0x5364[152]]===4){if(_0x2ce5x19[_0x5364[153]]===201){_0x2ce5x1[_0x5364[142]](_0x5364[226]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[227]]+_0x5364[175]+_0x2ce5x19[_0x5364[153]]+_0x5364[141]+_0x2ce5x19[_0x5364[165]]+_0x5364[44])}else {_0x2ce5x1[_0x5364[142]](_0x5364[180]+JSON[_0x5364[157]](_0x2ce5x19[_0x5364[156]])[_0x5364[163]][0][_0x5364[128]])}}};_0x2ce5x19[_0x5364[164]]=function(_0x2ce5x1a){mxUtils[_0x5364[129]](_0x2ce5x19[_0x5364[165]])};_0x2ce5x19[_0x5364[167]](_0x5364[228]+_0x2ce5x18)}catch(e){this[_0x5364[0]][_0x5364[142]](_0x5364[229])}}else {this[_0x5364[0]][_0x5364[142]](_0x5364[229])}};EditorUi[_0x5364[10]][_0x5364[230]]=function(_0x2ce5x2b){var _0x2ce5x2c=(_0x2ce5x2b!=null)?_0x2ce5x2b:window[_0x5364[232]][_0x5364[231]];var _0x2ce5x2d=(_0x2ce5x2c[_0x5364[69]](_0x5364[233])>0)?1:0;for(var _0x2ce5x25 in urlParams){if(_0x2ce5x2d==0){_0x2ce5x2c+=_0x5364[233]}else {_0x2ce5x2c+=_0x5364[234]};_0x2ce5x2c+=_0x2ce5x25+_0x5364[235]+urlParams[_0x2ce5x25];_0x2ce5x2d++};return _0x2ce5x2c};EditorUi[_0x5364[10]][_0x5364[109]]=function(){var _0x2ce5x2e=this[_0x5364[12]][_0x5364[112]](_0x5364[236]);var _0x2ce5x2f=this[_0x5364[12]][_0x5364[112]](_0x5364[237]);var _0x2ce5x30=this[_0x5364[0]][_0x5364[124]];var _0x2ce5x31=function(){_0x2ce5x2e[_0x5364[114]](_0x2ce5x30[_0x5364[238]]());_0x2ce5x2f[_0x5364[114]](_0x2ce5x30[_0x5364[239]]())};_0x2ce5x30[_0x5364[33]](mxEvent.ADD,_0x2ce5x31);_0x2ce5x30[_0x5364[33]](mxEvent.UNDO,_0x2ce5x31);_0x2ce5x30[_0x5364[33]](mxEvent.REDO,_0x2ce5x31);_0x2ce5x30[_0x5364[33]](mxEvent.CLEAR,_0x2ce5x31);_0x2ce5x31()};EditorUi[_0x5364[10]][_0x5364[110]]=function(){var _0x2ce5x32=mxUtils[_0x5364[20]](this,function(){var _0x2ce5x3=this[_0x5364[0]][_0x5364[4]];var _0x2ce5x33=!_0x2ce5x3[_0x5364[240]]();var _0x2ce5x34=false;var _0x2ce5x35=false;var _0x2ce5x36=_0x2ce5x3[_0x5364[241]]();if(_0x2ce5x36!=null){for(var _0x2ce5x37=0;_0x2ce5x37<_0x2ce5x36[_0x5364[143]];_0x2ce5x37++){var _0x2ce5xb=_0x2ce5x36[_0x2ce5x37];if(_0x2ce5x3[_0x5364[65]]()[_0x5364[64]](_0x2ce5xb)){_0x2ce5x35=true};if(_0x2ce5x3[_0x5364[65]]()[_0x5364[71]](_0x2ce5xb)){_0x2ce5x34=true};if(_0x2ce5x35&&_0x2ce5x34){break}}};var _0x2ce5x38=[_0x5364[115],_0x5364[116],_0x5364[242],_0x5364[243],_0x5364[244],_0x5364[245],_0x5364[6],_0x5364[246],_0x5364[247],_0x5364[248],_0x5364[249],_0x5364[250],_0x5364[251],_0x5364[252],_0x5364[253]];for(var _0x2ce5x37=0;_0x2ce5x37<_0x2ce5x38[_0x5364[143]];_0x2ce5x37++){this[_0x5364[12]][_0x5364[112]](_0x2ce5x38[_0x2ce5x37])[_0x5364[114]](_0x2ce5x33)};this[_0x5364[12]][_0x5364[112]](_0x5364[254])[_0x5364[114]](_0x2ce5x35);this[_0x5364[12]][_0x5364[112]](_0x5364[255])[_0x5364[114]](_0x2ce5x34);this[_0x5364[12]][_0x5364[112]](_0x5364[256])[_0x5364[114]](_0x2ce5x34);this[_0x5364[12]][_0x5364[112]](_0x5364[258])[_0x5364[114]](_0x2ce5x3[_0x5364[257]]()>1);this[_0x5364[12]][_0x5364[112]](_0x5364[260])[_0x5364[114]](_0x2ce5x3[_0x5364[257]]()==1&&_0x2ce5x3[_0x5364[65]]()[_0x5364[187]](_0x2ce5x3[_0x5364[259]]())>0);var _0x2ce5x39=_0x2ce5x34&&_0x2ce5x3[_0x5364[257]]()==1;this[_0x5364[12]][_0x5364[112]](_0x5364[261])[_0x5364[114]](_0x2ce5x39&&_0x2ce5x3[_0x5364[65]]()[_0x5364[71]](_0x2ce5x3[_0x5364[65]]()[_0x5364[218]](_0x2ce5x3[_0x5364[259]]())));var _0x2ce5x3a=[_0x5364[262],_0x5364[263],_0x5364[264],_0x5364[265],_0x5364[266],_0x5364[267],_0x5364[268],_0x5364[269],_0x5364[270]];for(var _0x2ce5x37=0;_0x2ce5x37<_0x2ce5x3a[_0x5364[143]];_0x2ce5x37++){this[_0x5364[13]][_0x5364[112]](_0x2ce5x3a[_0x2ce5x37])[_0x5364[114]](_0x2ce5x33)};_0x2ce5x3a=[_0x5364[271],_0x5364[272],_0x5364[273]];for(var _0x2ce5x37=0;_0x2ce5x37<_0x2ce5x3a[_0x5364[143]];_0x2ce5x37++){this[_0x5364[13]][_0x5364[112]](_0x2ce5x3a[_0x2ce5x37])[_0x5364[114]](_0x2ce5x35)};this[_0x5364[12]][_0x5364[112]](_0x5364[274])[_0x5364[114]](_0x2ce5x35);this[_0x5364[13]][_0x5364[112]](_0x5364[275])[_0x5364[114]](_0x2ce5x3[_0x5364[257]]()>1);this[_0x5364[13]][_0x5364[112]](_0x5364[278])[_0x5364[114]](_0x2ce5x34||(_0x2ce5x35&&_0x2ce5x3[_0x5364[277]](_0x2ce5x3[_0x5364[89]][_0x5364[276]](_0x2ce5x3[_0x5364[259]]()))));this[_0x5364[13]][_0x5364[112]](_0x5364[281])[_0x5364[114]](_0x2ce5x3[_0x5364[279]]&&((_0x2ce5x3[_0x5364[89]][_0x5364[280]]!=null)||(_0x2ce5x3[_0x5364[257]]()==1&&_0x2ce5x3[_0x5364[189]](_0x2ce5x3[_0x5364[259]]()))));this[_0x5364[12]][_0x5364[112]](_0x5364[282])[_0x5364[114]](_0x2ce5x3[_0x5364[89]][_0x5364[280]]!=null);this[_0x5364[12]][_0x5364[112]](_0x5364[283])[_0x5364[114]](_0x2ce5x3[_0x5364[89]][_0x5364[280]]!=null);var _0x2ce5x3b=_0x2ce5x3[_0x5364[257]]()==1&&_0x2ce5x3[_0x5364[189]](_0x2ce5x3[_0x5364[259]]());this[_0x5364[12]][_0x5364[112]](_0x5364[284])[_0x5364[114]](_0x2ce5x3b);this[_0x5364[12]][_0x5364[112]](_0x5364[285])[_0x5364[114]](_0x2ce5x3b);this[_0x5364[12]][_0x5364[112]](_0x5364[286])[_0x5364[114]](_0x2ce5x3b);this[_0x5364[12]][_0x5364[112]](_0x5364[287])[_0x5364[114]](_0x2ce5x3[_0x5364[257]]()==1);this[_0x5364[12]][_0x5364[112]](_0x5364[289])[_0x5364[114]](_0x2ce5x3[_0x5364[257]]()==1&&_0x2ce5x3[_0x5364[288]](_0x2ce5x3[_0x5364[259]]())!=null)});this[_0x5364[0]][_0x5364[4]][_0x5364[290]]()[_0x5364[33]](mxEvent.CHANGE,_0x2ce5x32);_0x2ce5x32()};EditorUi[_0x5364[10]][_0x5364[15]]=function(){var _0x2ce5x3c=mxClient[_0x5364[29]]&&(document[_0x5364[30]]==null||document[_0x5364[30]]==5);var _0x2ce5x3d=this[_0x5364[1]][_0x5364[291]];var _0x2ce5x3e=this[_0x5364[1]][_0x5364[292]];if(this[_0x5364[1]]==document[_0x5364[21]]){_0x2ce5x3d=document[_0x5364[21]][_0x5364[291]]||document[_0x5364[120]][_0x5364[291]];_0x2ce5x3e=(_0x2ce5x3c)?document[_0x5364[21]][_0x5364[292]]||document[_0x5364[120]][_0x5364[292]]:document[_0x5364[120]][_0x5364[292]]};var _0x2ce5x3f=Math[_0x5364[294]](0,Math[_0x5364[293]](this[_0x5364[107]],_0x2ce5x3d-this[_0x5364[103]]-20));var _0x2ce5x40=Math[_0x5364[294]](0,Math[_0x5364[293]](this[_0x5364[108]],_0x2ce5x3e-this[_0x5364[104]]-this[_0x5364[105]]-this[_0x5364[106]]-this[_0x5364[103]]-1));this[_0x5364[23]][_0x5364[6]][_0x5364[295]]=this[_0x5364[104]]+_0x5364[296];this[_0x5364[25]][_0x5364[6]][_0x5364[297]]=this[_0x5364[104]]+_0x5364[296];this[_0x5364[25]][_0x5364[6]][_0x5364[295]]=this[_0x5364[105]]+_0x5364[296];var _0x2ce5x41=this[_0x5364[104]]+this[_0x5364[105]];if(!mxClient[_0x5364[298]]){_0x2ce5x41+=1};this[_0x5364[27]][_0x5364[6]][_0x5364[297]]=_0x2ce5x41+_0x5364[296];this[_0x5364[27]][_0x5364[6]][_0x5364[299]]=_0x2ce5x3f+_0x5364[296];this[_0x5364[79]][_0x5364[6]][_0x5364[299]]=_0x2ce5x3f+_0x5364[296];this[_0x5364[79]][_0x5364[6]][_0x5364[295]]=_0x2ce5x40+_0x5364[296];this[_0x5364[79]][_0x5364[6]][_0x5364[300]]=this[_0x5364[106]]+_0x5364[296];this[_0x5364[26]][_0x5364[6]][_0x5364[301]]=(_0x2ce5x3f+this[_0x5364[103]])+_0x5364[296];this[_0x5364[26]][_0x5364[6]][_0x5364[297]]=this[_0x5364[27]][_0x5364[6]][_0x5364[297]];this[_0x5364[28]][_0x5364[6]][_0x5364[295]]=this[_0x5364[106]]+_0x5364[296];this[_0x5364[28]][_0x5364[6]][_0x5364[302]]=_0x5364[303];this[_0x5364[304]][_0x5364[6]][_0x5364[297]]=this[_0x5364[27]][_0x5364[6]][_0x5364[297]];this[_0x5364[304]][_0x5364[6]][_0x5364[300]]=this[_0x5364[79]][_0x5364[6]][_0x5364[300]];this[_0x5364[304]][_0x5364[6]][_0x5364[301]]=_0x2ce5x3f+_0x5364[296];this[_0x5364[305]][_0x5364[6]][_0x5364[299]]=this[_0x5364[27]][_0x5364[6]][_0x5364[299]];this[_0x5364[305]][_0x5364[6]][_0x5364[300]]=(_0x2ce5x40+this[_0x5364[106]])+_0x5364[296];if(_0x2ce5x3c){this[_0x5364[23]][_0x5364[6]][_0x5364[299]]=_0x2ce5x3d+_0x5364[296];this[_0x5364[25]][_0x5364[6]][_0x5364[299]]=this[_0x5364[23]][_0x5364[6]][_0x5364[299]];var _0x2ce5x42=(_0x2ce5x3e-_0x2ce5x40-this[_0x5364[103]]-this[_0x5364[106]]-this[_0x5364[104]]-this[_0x5364[105]]);this[_0x5364[27]][_0x5364[6]][_0x5364[295]]=_0x2ce5x42+_0x5364[296];this[_0x5364[26]][_0x5364[6]][_0x5364[299]]=(_0x2ce5x3d-_0x2ce5x3f-this[_0x5364[103]])+_0x5364[296];var _0x2ce5x43=(_0x2ce5x3e-this[_0x5364[106]]-this[_0x5364[104]]-this[_0x5364[105]]);this[_0x5364[26]][_0x5364[6]][_0x5364[295]]=_0x2ce5x43+_0x5364[296];this[_0x5364[28]][_0x5364[6]][_0x5364[299]]=this[_0x5364[23]][_0x5364[6]][_0x5364[299]];this[_0x5364[304]][_0x5364[6]][_0x5364[295]]=_0x2ce5x43+_0x5364[296]}else {this[_0x5364[27]][_0x5364[6]][_0x5364[300]]=(_0x2ce5x40+this[_0x5364[103]]+this[_0x5364[106]])+_0x5364[296];this[_0x5364[26]][_0x5364[6]][_0x5364[300]]=this[_0x5364[79]][_0x5364[6]][_0x5364[300]]}};EditorUi[_0x5364[10]][_0x5364[14]]=function(){this[_0x5364[23]]=this[_0x5364[307]](_0x5364[306]);this[_0x5364[25]]=this[_0x5364[307]](_0x5364[308]);this[_0x5364[27]]=this[_0x5364[307]](_0x5364[309]);this[_0x5364[79]]=this[_0x5364[307]](_0x5364[310]);this[_0x5364[26]]=this[_0x5364[307]](_0x5364[311]);this[_0x5364[28]]=this[_0x5364[307]](_0x5364[312]);this[_0x5364[304]]=this[_0x5364[307]](_0x5364[313]);this[_0x5364[305]]=this[_0x5364[307]](_0x5364[314]);this[_0x5364[23]][_0x5364[6]][_0x5364[297]]=_0x5364[315];this[_0x5364[23]][_0x5364[6]][_0x5364[301]]=_0x5364[315];this[_0x5364[23]][_0x5364[6]][_0x5364[316]]=_0x5364[315];this[_0x5364[25]][_0x5364[6]][_0x5364[301]]=_0x5364[315];this[_0x5364[25]][_0x5364[6]][_0x5364[316]]=_0x5364[315];this[_0x5364[27]][_0x5364[6]][_0x5364[301]]=_0x5364[315];this[_0x5364[79]][_0x5364[6]][_0x5364[301]]=_0x5364[315];this[_0x5364[26]][_0x5364[6]][_0x5364[316]]=_0x5364[315];this[_0x5364[28]][_0x5364[6]][_0x5364[301]]=_0x5364[315];this[_0x5364[28]][_0x5364[6]][_0x5364[316]]=_0x5364[315];this[_0x5364[28]][_0x5364[6]][_0x5364[300]]=_0x5364[315];this[_0x5364[305]][_0x5364[6]][_0x5364[301]]=_0x5364[315];this[_0x5364[305]][_0x5364[6]][_0x5364[295]]=this[_0x5364[103]]+_0x5364[296];this[_0x5364[304]][_0x5364[6]][_0x5364[299]]=this[_0x5364[103]]+_0x5364[296]};EditorUi[_0x5364[10]][_0x5364[16]]=function(){this[_0x5364[317]]=this[_0x5364[13]][_0x5364[319]](this[_0x5364[307]](_0x5364[318]));this[_0x5364[23]][_0x5364[320]](this[_0x5364[317]][_0x5364[1]]);this[_0x5364[321]]=this[_0x5364[323]](this[_0x5364[307]](_0x5364[322]));this[_0x5364[25]][_0x5364[320]](this[_0x5364[321]][_0x5364[1]]);this[_0x5364[324]]=this[_0x5364[325]](this[_0x5364[27]]);this[_0x5364[28]][_0x5364[320]](this[_0x5364[326]]());this[_0x5364[327]]=this[_0x5364[328]]();this[_0x5364[0]][_0x5364[33]](_0x5364[329],mxUtils[_0x5364[20]](this,function(){this[_0x5364[331]](this[_0x5364[0]][_0x5364[330]]())}));this[_0x5364[331]](this[_0x5364[0]][_0x5364[330]]());this[_0x5364[317]][_0x5364[1]][_0x5364[320]](this[_0x5364[327]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[23]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[25]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[27]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[79]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[26]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[28]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[304]]);this[_0x5364[1]][_0x5364[320]](this[_0x5364[305]]);this[_0x5364[332]](this[_0x5364[304]],true,0,mxUtils[_0x5364[20]](this,function(_0x2ce5x44){this[_0x5364[107]]=_0x2ce5x44;this[_0x5364[15]]();this[_0x5364[0]][_0x5364[4]][_0x5364[100]]();this[_0x5364[0]][_0x5364[80]][_0x5364[101]](false);this[_0x5364[0]][_0x5364[80]][_0x5364[80]][_0x5364[100]]()}));this[_0x5364[332]](this[_0x5364[305]],false,this[_0x5364[106]],mxUtils[_0x5364[20]](this,function(_0x2ce5x44){this[_0x5364[108]]=_0x2ce5x44;this[_0x5364[15]]();this[_0x5364[0]][_0x5364[80]][_0x5364[101]](false);this[_0x5364[0]][_0x5364[80]][_0x5364[80]][_0x5364[100]]()}))};EditorUi[_0x5364[10]][_0x5364[328]]=function(){var _0x2ce5x2=document[_0x5364[334]](_0x5364[333]);_0x2ce5x2[_0x5364[335]]=_0x5364[336];return _0x2ce5x2};EditorUi[_0x5364[10]][_0x5364[328]]=function(){var _0x2ce5x2=document[_0x5364[334]](_0x5364[333]);_0x2ce5x2[_0x5364[335]]=_0x5364[336];return _0x2ce5x2};EditorUi[_0x5364[10]][_0x5364[331]]=function(_0x2ce5x44){this[_0x5364[327]][_0x5364[337]]=_0x2ce5x44};EditorUi[_0x5364[10]][_0x5364[323]]=function(_0x2ce5x2){return  new Toolbar(this,_0x2ce5x2)};EditorUi[_0x5364[10]][_0x5364[325]]=function(_0x2ce5x2){return  new Sidebar(this,_0x2ce5x2)};EditorUi[_0x5364[10]][_0x5364[326]]=function(){return this[_0x5364[307]](_0x5364[338])};EditorUi[_0x5364[10]][_0x5364[307]]=function(_0x2ce5x45){var _0x2ce5x46=document[_0x5364[334]](_0x5364[339]);_0x2ce5x46[_0x5364[335]]=_0x2ce5x45;return _0x2ce5x46};EditorUi[_0x5364[10]][_0x5364[340]]=function(_0x2ce5x45){var _0x2ce5x46=document[_0x5364[334]](_0x2ce5x45);return _0x2ce5x46};EditorUi[_0x5364[10]][_0x5364[341]]=function(_0x2ce5x45){var _0x2ce5x46=document[_0x5364[334]](_0x5364[342]);_0x2ce5x46[_0x5364[335]]=_0x2ce5x45;return _0x2ce5x46};EditorUi[_0x5364[10]][_0x5364[332]]=function(_0x2ce5x46,_0x2ce5x47,_0x2ce5x48,_0x2ce5x49){var _0x2ce5x4a=null;var _0x2ce5x4b=null;function _0x2ce5x4c(){return parseInt(((_0x2ce5x47)?_0x2ce5x46[_0x5364[6]][_0x5364[301]]:_0x2ce5x46[_0x5364[6]][_0x5364[300]]))}function _0x2ce5x4d(_0x2ce5x6){if(_0x2ce5x4a!=null){var _0x2ce5x4e= new mxPoint(mxEvent[_0x5364[343]](_0x2ce5x6),mxEvent[_0x5364[344]](_0x2ce5x6));_0x2ce5x49(Math[_0x5364[294]](0,_0x2ce5x4b+((_0x2ce5x47)?(_0x2ce5x4e[_0x5364[345]]-_0x2ce5x4a[_0x5364[345]]):(_0x2ce5x4a[_0x5364[346]]-_0x2ce5x4e[_0x5364[346]]))-_0x2ce5x48));mxEvent[_0x5364[74]](_0x2ce5x6)}}function _0x2ce5x4f(_0x2ce5x6){_0x2ce5x4d(_0x2ce5x6);_0x2ce5x4a=null;_0x2ce5x4b=null}mxEvent[_0x5364[82]](_0x2ce5x46,function(_0x2ce5x6){_0x2ce5x4a= new mxPoint(mxEvent[_0x5364[343]](_0x2ce5x6),mxEvent[_0x5364[344]](_0x2ce5x6));_0x2ce5x4b=_0x2ce5x4c();mxEvent[_0x5364[74]](_0x2ce5x6)});mxEvent[_0x5364[33]](document,_0x5364[347],_0x2ce5x4d);mxEvent[_0x5364[33]](document,_0x5364[348],_0x2ce5x4d);mxEvent[_0x5364[33]](document,_0x5364[349],_0x2ce5x4f);mxEvent[_0x5364[33]](document,_0x5364[350],_0x2ce5x4f)};EditorUi[_0x5364[10]][_0x5364[73]]=function(_0x2ce5x46,_0x2ce5x3d,_0x2ce5x3e,_0x2ce5x50,_0x2ce5x51,_0x2ce5x52){this[_0x5364[351]]();this[_0x5364[352]]= new Dialog(this,_0x2ce5x46,_0x2ce5x3d,(mxClient[_0x5364[353]])?_0x2ce5x3e-12:_0x2ce5x3e,_0x2ce5x50,_0x2ce5x51,_0x2ce5x52)};EditorUi[_0x5364[10]][_0x5364[351]]=function(){if(this[_0x5364[352]]!=null){this[_0x5364[352]][_0x5364[354]]();this[_0x5364[352]]=null;this[_0x5364[0]][_0x5364[4]][_0x5364[1]][_0x5364[47]]()}};EditorUi[_0x5364[10]][_0x5364[355]]=function(_0x2ce5x53){if(!_0x2ce5x53&&this[_0x5364[0]][_0x5364[125]]!=null){this[_0x5364[171]](this[_0x5364[0]][_0x5364[356]]())}else {this[_0x5364[73]]( new SaveDialog(this)[_0x5364[1]],300,100,true,true)}};EditorUi[_0x5364[10]][_0x5364[357]]=function(_0x2ce5x53){if(!_0x2ce5x53&&this[_0x5364[0]][_0x5364[125]]!=null){this[_0x5364[221]](this[_0x5364[0]][_0x5364[356]]())}else {}};EditorUi[_0x5364[10]][_0x5364[358]]=function(_0x2ce5x54,_0x2ce5x55,_0x2ce5x56){var _0x2ce5x3=this[_0x5364[0]][_0x5364[4]];var _0x2ce5xb=_0x2ce5x3[_0x5364[259]]();_0x2ce5x55=this[_0x5364[359]]!=null?this[_0x5364[359]]:_0x2ce5x55;_0x2ce5x3[_0x5364[65]]()[_0x5364[360]]();try{_0x2ce5x54[_0x5364[361]](_0x2ce5x3[_0x5364[219]](),_0x2ce5xb)}catch(e){throw e}finally{if(_0x2ce5x55&&navigator[_0x5364[363]][_0x5364[69]](_0x5364[362])<0){var _0x2ce5x57= new mxMorphing(_0x2ce5x3);_0x2ce5x57[_0x5364[33]](mxEvent.DONE,mxUtils[_0x5364[20]](this,function(){_0x2ce5x3[_0x5364[65]]()[_0x5364[364]]()}));_0x2ce5x57[_0x5364[365]]()}else {_0x2ce5x3[_0x5364[65]]()[_0x5364[364]]()}}};EditorUi[_0x5364[10]][_0x5364[97]]=function(_0x2ce5x1){var _0x2ce5x3=this[_0x5364[0]][_0x5364[4]];var _0x2ce5xf= new mxKeyHandler(_0x2ce5x3);_0x2ce5xf[_0x5364[366]]=function(_0x2ce5x6){return mxEvent[_0x5364[366]](_0x2ce5x6)||(mxClient[_0x5364[367]]&&_0x2ce5x6[_0x5364[368]])};function _0x2ce5x58(_0x2ce5x59){if(!_0x2ce5x3[_0x5364[240]]()){var _0x2ce5x48=0;var _0x2ce5x5a=0;if(_0x2ce5x59==37){_0x2ce5x48= -1}else {if(_0x2ce5x59==38){_0x2ce5x5a= -1}else {if(_0x2ce5x59==39){_0x2ce5x48=1}else {if(_0x2ce5x59==40){_0x2ce5x5a=1}}}};_0x2ce5x3[_0x5364[369]](_0x2ce5x3[_0x5364[241]](),_0x2ce5x48,_0x2ce5x5a);_0x2ce5x3[_0x5364[370]](_0x2ce5x3[_0x5364[259]]())}}var _0x2ce5x5b=mxUtils[_0x5364[20]](this,function(_0x2ce5x5c,_0x2ce5x5d,_0x2ce5x25,_0x2ce5x5e){var _0x2ce5x5f=this[_0x5364[12]][_0x5364[112]](_0x2ce5x25);if(_0x2ce5x5f!=null){var _0x2ce5x1f=function(){if(_0x2ce5x5f[_0x5364[371]]){_0x2ce5x5f[_0x5364[372]]()}};if(_0x2ce5x5d){if(_0x2ce5x5e){_0x2ce5xf[_0x5364[373]](_0x2ce5x5c,_0x2ce5x1f)}else {_0x2ce5xf[_0x5364[374]](_0x2ce5x5c,_0x2ce5x1f)}}else {if(_0x2ce5x5e){_0x2ce5xf[_0x5364[375]](_0x2ce5x5c,_0x2ce5x1f)}else {_0x2ce5xf[_0x5364[376]](_0x2ce5x5c,_0x2ce5x1f)}}}});var _0x2ce5x60=this;var _0x2ce5x61=_0x2ce5xf[_0x5364[377]];_0x2ce5xf[_0x5364[377]]=function(_0x2ce5x6){_0x2ce5x60[_0x5364[351]]();_0x2ce5x61[_0x5364[50]](this,arguments)};_0x2ce5xf[_0x5364[378]]=function(){};_0x2ce5xf[_0x5364[376]](8,function(){_0x2ce5x3[_0x5364[379]](true)});_0x2ce5xf[_0x5364[376]](13,function(){_0x2ce5x3[_0x5364[379]](false)});_0x2ce5xf[_0x5364[376]](33,function(){_0x2ce5x3[_0x5364[283]]()});_0x2ce5xf[_0x5364[376]](34,function(){_0x2ce5x3[_0x5364[284]]()});_0x2ce5xf[_0x5364[376]](36,function(){_0x2ce5x3[_0x5364[282]]()});_0x2ce5xf[_0x5364[376]](35,function(){_0x2ce5x3[_0x5364[15]]()});_0x2ce5xf[_0x5364[376]](37,function(){_0x2ce5x58(37)});_0x2ce5xf[_0x5364[376]](38,function(){_0x2ce5x58(38)});_0x2ce5xf[_0x5364[376]](39,function(){_0x2ce5x58(39)});_0x2ce5xf[_0x5364[376]](40,function(){_0x2ce5x58(40)});_0x2ce5xf[_0x5364[376]](113,function(){_0x2ce5x3[_0x5364[70]]()});_0x2ce5x5b(46,false,_0x5364[242]);_0x2ce5x5b(82,true,_0x5364[252]);_0x2ce5x5b(83,true,_0x5364[171]);_0x2ce5x5b(83,true,_0x5364[179],true);_0x2ce5x5b(107,false,_0x5364[380]);_0x2ce5x5b(109,false,_0x5364[381]);_0x2ce5x5b(65,true,_0x5364[382]);_0x2ce5x5b(86,true,_0x5364[383],true);_0x2ce5x5b(69,true,_0x5364[384],true);_0x2ce5x5b(69,true,_0x5364[385]);_0x2ce5x5b(66,true,_0x5364[248]);_0x2ce5x5b(70,true,_0x5364[247]);_0x2ce5x5b(68,true,_0x5364[243]);_0x2ce5x5b(90,true,_0x5364[236]);_0x2ce5x5b(89,true,_0x5364[237]);_0x2ce5x5b(88,true,_0x5364[115]);_0x2ce5x5b(67,true,_0x5364[116]);_0x2ce5x5b(81,true,_0x5364[386]);_0x2ce5x5b(86,true,_0x5364[111]);_0x2ce5x5b(71,true,_0x5364[258]);_0x2ce5x5b(71,true,_0x5364[387],true);_0x2ce5x5b(85,true,_0x5364[260]);_0x2ce5x5b(112,false,_0x5364[388]);_0x2ce5x5b(80,true,_0x5364[221],true);return _0x2ce5xf};EditorUi[_0x5364[10]][_0x5364[58]]=function(_0x2ce5x3,_0x2ce5x36,_0x2ce5x62,_0x2ce5x63){for(var _0x2ce5x37=0;_0x2ce5x37<_0x2ce5x36[_0x5364[143]];_0x2ce5x37++){_0x2ce5x3[_0x5364[391]]( new mxMultiplicity(true,_0x2ce5x36[_0x2ce5x37],null,null,_0x2ce5x62[_0x2ce5x37][0],_0x2ce5x62[_0x2ce5x37][1],null,mxResources[_0x5364[112]](_0x2ce5x36[_0x2ce5x37])+_0x5364[389]+_0x2ce5x62[_0x2ce5x37][0]+_0x5364[390],null));_0x2ce5x3[_0x5364[391]]( new mxMultiplicity(false,_0x2ce5x36[_0x2ce5x37],null,null,_0x2ce5x63[_0x2ce5x37][0],_0x2ce5x63[_0x2ce5x37][1],null,mxResources[_0x5364[112]](_0x2ce5x36[_0x2ce5x37])+_0x5364[389]+_0x2ce5x63[_0x2ce5x37][0]+_0x5364[392],null))}}
\ No newline at end of file
+/**
+ * $Id: EditorUi.js,v 1.21 2013/03/14 20:46:36 david Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+EditorUi = function(editor, container) {
+       this.editor = editor || new Editor();
+       this.container = container || document.getElementById('geEditor');
+       var graph = editor.graph;
+       var self = this;
+
+       // Disables scrollbars
+       this.container.style.overflow = 'hidden';
+
+       // Pre-fetches submenu image
+       new Image().src = mxPopupMenu.prototype.submenuImage;
+
+       // Pre-fetches connect image
+       if (mxConnectionHandler.prototype.connectImage != null) {
+               new Image().src = mxConnectionHandler.prototype.connectImage.src;
+       }
+
+       // Creates the user interface
+       this.actions = new Actions(this);
+       this.menus = new Menus(this);
+       this.createDivs();
+       this.refresh();
+       this.createUi();
+
+       // Disables HTML and text selection
+       var textEditing = mxUtils.bind(this, function(evt) {
+               if (evt == null) {
+                       evt = window.event;
+               }
+
+               if (this.isSelectionAllowed(evt)) {
+                       return true;
+               }
+
+               return graph.isEditing();
+       });
+
+       // Disables text selection while not editing and no dialog visible
+       if (this.container == document.body) {
+               this.menubarContainer.onselectstart = textEditing;
+               this.menubarContainer.onmousedown = textEditing;
+               this.toolbarContainer.onselectstart = textEditing;
+               this.toolbarContainer.onmousedown = textEditing;
+               this.diagramContainer.onselectstart = textEditing;
+               this.diagramContainer.onmousedown = textEditing;
+               this.sidebarContainer.onselectstart = textEditing;
+               this.sidebarContainer.onmousedown = textEditing;
+               this.footerContainer.onselectstart = textEditing;
+               this.footerContainer.onmousedown = textEditing;
+       }
+
+       // And uses built-in context menu while editing
+       if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' ||
+                       document.documentMode < 9)) {
+               mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
+               mxEvent.addListener(this.sidebarContainer, 'contextmenu', textEditing);
+       } else {
+               // Allows browser context menu outside of diagram and sidebar
+               this.diagramContainer.oncontextmenu = textEditing;
+               this.sidebarContainer.oncontextmenu = textEditing;
+       }
+
+       // Contains the main graph instance inside the given panel
+       graph.init(this.diagramContainer);
+       graph.refresh();
+
+       // Enables scrollbars and sets cursor style for the container
+       graph.container.setAttribute('tabindex', '0');
+       // graph.container.style.overflow = (touchStyle) ? 'hidden' : 'auto';
+       graph.container.style.cursor = 'default';
+       graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
+       graph.container.style.backgroundPosition = '-1px -1px';
+       graph.container.focus();
+
+       // Keeps graph container focused on mouse down
+       var graphFireMouseEvent = graph.fireMouseEvent;
+       graph.fireMouseEvent = function(evtName, me, sender) {
+               if (evtName == mxEvent.MOUSE_DOWN) {
+                       this.container.focus();
+               }
+
+               graphFireMouseEvent.apply(this, arguments);
+       };
+
+       // Giuseppe Careri
+       // Defines invalid connections along with the error messages that they produce.
+
+       this.createMultiplicities(graph.multiplicities, ['start', 'end', 'input',
+               'question', 'email'
+       ], [
+               [1, 1],
+               [0, 0],
+               [1, 1],
+               [1, 'n'],
+               [1, 'n']
+       ], [
+               [0, 0],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n']
+
+       ]);
+
+
+       // Giuseppe Careri
+       // Processes a doubleclick on an optional cell and fires a <dblclick> event.
+       // The event is fired initially.
+       // If the graph is enabled and the event has not been consumed, then <edit> is called with the given cell.
+       // The event is ignored if no cell was specified.
+       graph.dblClick = function(evt, cell) {
+               var edges = ['question'];
+               var mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell',
+                       cell);
+               this.fireEvent(mxe);
+
+               if (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed()) {
+                       // Override dblClick Vertices and Edges
+                       if (this.getModel().isEdge(cell)) {
+                               if (edges.indexOf(cell.source.value.tagName) >= 0)
+                                       this.startEditingAtCell(cell);
+                       } else if (this.getModel().isVertex(cell)) {
+                               console.log(self);
+                               console.log(cell);
+                               self.showDialog(new GeneralDialog(self, cell).container, 320, 280, true,
+                                       true);
+                       }
+                       mxe.consume();
+               }
+       }
+
+       // Configures automatic expand on mouseover
+       graph.panningHandler.autoExpand = true;
+
+       // Installs context menu
+       graph.panningHandler.factoryMethod = mxUtils.bind(this, function(menu, cell,
+               evt) {
+               this.menus.createPopupMenu(menu, cell, evt);
+       });
+
+       // Initializes the outline
+       editor.outline.init(this.outlineContainer);
+
+       // Hides context menu
+       mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
+               graph.panningHandler.hideMenu();
+       }));
+
+       // Adds gesture handling (pinch to zoom)
+       if (mxClient.IS_TOUCH) {
+               mxEvent.addListener(graph.container, 'gesturechange',
+                       mxUtils.bind(this, function(evt) {
+                               graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale +
+                                       ')');
+                               graph.view.getOverlayPane().style.visibility = 'hidden';
+                       })
+               );
+
+               mxEvent.addListener(graph.container, 'gestureend',
+                       mxUtils.bind(this, function(evt) {
+                               graph.view.getDrawPane().removeAttribute('transform');
+                               graph.zoomToCenter = true;
+                               graph.zoom(evt.scale);
+                               graph.view.getOverlayPane().style.visibility = 'visible';
+                       })
+               );
+       }
+
+       // Create handler for key events
+       var keyHandler = this.createKeyHandler(editor);
+
+       // Getter for key handler
+       this.getKeyHandler = function() {
+               return keyHandler;
+       };
+
+       // Updates the editor UI after the window has been resized
+       mxEvent.addListener(window, 'resize', mxUtils.bind(this, function() {
+               this.refresh();
+               graph.sizeDidChange();
+               this.editor.outline.update(false);
+               this.editor.outline.outline.sizeDidChange();
+       }));
+
+       // Updates action and menu states
+       this.init();
+       this.open();
+};
+
+/**
+ * Specifies the size of the split bar.
+ */
+EditorUi.prototype.splitSize = (mxClient.IS_TOUCH) ? 16 : 8;
+
+/**
+ * Specifies the height of the menubar. Default is 34.
+ */
+EditorUi.prototype.menubarHeight = 33;
+
+/**
+ * Specifies the height of the toolbar. Default is 36.
+ */
+EditorUi.prototype.toolbarHeight = 36;
+
+/**
+ * Specifies the height of the footer. Default is 28.
+ */
+EditorUi.prototype.footerHeight = 28;
+
+/**
+ * Specifies the position of the horizontal split bar. Default is 212.
+ */
+EditorUi.prototype.hsplitPosition = 204;
+
+/**
+ * Specifies the position of the vertical split bar. Default is 190.
+ */
+EditorUi.prototype.vsplitPosition = 190;
+
+/**
+ * Installs the listeners to update the action states.
+ */
+EditorUi.prototype.init = function() {
+       // Updates action states
+       this.addUndoListener();
+       this.addSelectionListener();
+
+       // Overrides clipboard to update paste action state
+       var paste = this.actions.get('paste');
+
+       var updatePaste = function() {
+               paste.setEnabled(!mxClipboard.isEmpty());
+       };
+
+       var mxClipboardCut = mxClipboard.cut;
+       mxClipboard.cut = function() {
+               mxClipboardCut.apply(this, arguments);
+               updatePaste();
+       };
+
+       var mxClipboardCopy = mxClipboard.copy;
+       mxClipboard.copy = function() {
+               mxClipboardCopy.apply(this, arguments);
+               updatePaste();
+       };
+};
+
+/**
+ * Hook for allowing selection and context menu for certain events.
+ */
+EditorUi.prototype.isSelectionAllowed = function(evt) {
+       return false;
+};
+
+/**
+ * Opens the current diagram via the window.opener if one exists.
+ */
+EditorUi.prototype.open = function() {
+       // Cross-domain window access is not allowed in FF, so if we
+       // were opened from another domain then this will fail.
+       try {
+               if (window.opener != null && window.opener.openFile != null) {
+                       window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml,
+                               filename) {
+                               try {
+                                       var doc = mxUtils.parseXml(xml);
+                                       this.editor.setGraphXml(doc.documentElement);
+                                       this.editor.modified = false;
+                                       this.editor.undoManager.clear();
+
+                                       if (filename != null) {
+                                               this.editor.filename = filename;
+                                       }
+                               } catch (e) {
+                                       mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+                               }
+                       }));
+               }
+       } catch (e) {
+               // ignore
+       }
+};
+
+/**
+ * Giuseppe Careri
+ * Opens the current diagram via string.
+ */
+EditorUi.prototype.openString = function(xml, filename, data) {
+       try {
+               var doc = mxUtils.parseXml(xml);
+               this.editor.setGraphXml(doc.documentElement);
+               this.editor.modified = false;
+               this.editor.undoManager.clear();
+
+               if (filename != null) {
+                       this.editor.filename = filename;
+               }
+
+               if (data != null) {
+                       this.editor.data = data;
+               }
+       } catch (e) {
+               mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+       }
+};
+
+/**
+ * Saves As the current graph under the given project name.
+ */
+EditorUi.prototype.new = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+               try {
+                       if (useLocalStorage) {
+                               if (localStorage.getItem(name) != null &&
+                                       !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                       return;
+                               }
+
+                               localStorage.setItem(name, xml);
+                               this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                       } else {
+                               console.log(xml.length);
+                               console.log(MAX_REQUEST_SIZE);
+                               if (xml.length < MAX_REQUEST_SIZE) {
+                                       xml = encodeURIComponent(xml);
+                                       name = encodeURIComponent(name);
+
+                                       var xhr = new XMLHttpRequest();
+                                       xhr.open("POST", SAVE_URL, true);
+                                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                       xhr.onload = function(e) {
+                                               if (xhr.readyState === 4) {
+                                                       if (xhr.status === 201) {
+                                                               editor.setStatus('Project ' + JSON.parse(xhr.response).name +
+                                                                       ' is opening in new window!');
+                                                               setTimeout(function() {
+                                                                       window.open('jscripty/project/' + JSON.parse(xhr.response).id,
+                                                                               '_blank');
+                                                               }, 1500);
+                                                       } else {
+                                                               editor.setStatus('Error creating project: ' +
+                                                                       JSON.parse(xhr.response).errors[0].message);
+                                                       }
+                                               }
+                                       };
+                                       xhr.onerror = function(e) {
+                                               mxUtils.alert(xhr.statusText);
+                                       };
+                                       xhr.send('description=project_new&name=' + name);
+                               } else {
+                                       mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                       mxUtils.popup(xml);
+
+                                       return;
+                               }
+                       }
+
+                       this.editor.filename = name;
+                       this.editor.modified = false;
+               } catch (e) {
+                       this.editor.setStatus('Error creating project');
+               }
+       } else {
+               this.editor.setStatus('Error creating project');
+       }
+};
+
+
+/**
+ * Saves the current graph under the given project name.
+ */
+EditorUi.prototype.save = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+               try {
+                       if (useLocalStorage) {
+                               if (localStorage.getItem(name) != null &&
+                                       !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                       return;
+                               }
+
+                               localStorage.setItem(name, xml);
+                               this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                       } else {
+                               console.log(xml.length);
+                               console.log(MAX_REQUEST_SIZE);
+                               if (xml.length < MAX_REQUEST_SIZE) {
+                                       xml = encodeURIComponent(xml);
+
+                                       var xhr = new XMLHttpRequest();
+                                       xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
+                                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                       xhr.onload = function(e) {
+                                               if (xhr.readyState === 4) {
+                                                       if (xhr.status === 200) {
+                                                               editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt +
+                                                                       ' (' + xhr.status + ' ' + xhr.statusText + ')');
+                                                       } else {
+                                                               editor.setStatus('Error saving project: ' +
+                                                                       JSON.parse(xhr.response).errors[0].message);
+                                                       }
+                                               }
+                                       };
+                                       xhr.onerror = function(e) {
+                                               mxUtils.alert(xhr.statusText);
+                                       };
+                                       xhr.send('draft=' + xml);
+                               } else {
+                                       mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                       mxUtils.popup(xml);
+
+                                       return;
+                               }
+                       }
+
+                       this.editor.filename = name;
+                       this.editor.modified = false;
+               } catch (e) {
+                       this.editor.setStatus('Error saving file');
+               }
+       } else {
+               this.editor.setStatus('Error saving file');
+       }
+};
+
+/**
+ * Saves As the current graph under the given project name.
+ */
+EditorUi.prototype.saveAs = function(name) {
+       var editor = this.editor;
+       console.log(name);
+       if (name != null) {
+               var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+               try {
+                       if (useLocalStorage) {
+                               if (localStorage.getItem(name) != null &&
+                                       !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                       return;
+                               }
+
+                               localStorage.setItem(name, xml);
+                               this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                       } else {
+                               console.log(xml.length);
+                               console.log(MAX_REQUEST_SIZE);
+                               if (xml.length < MAX_REQUEST_SIZE) {
+                                       xml = encodeURIComponent(xml);
+                                       name = encodeURIComponent(name);
+
+                                       var xhr = new XMLHttpRequest();
+                                       xhr.open("POST", SAVE_URL, true);
+                                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                       xhr.onload = function(e) {
+                                               if (xhr.readyState === 4) {
+                                                       if (xhr.status === 201) {
+                                                               editor.setStatus('Project ' + JSON.parse(xhr.response).name +
+                                                                       ' is opening in new window!');
+                                                               setTimeout(function() {
+                                                                       window.open('jscripty/project/' + JSON.parse(xhr.response).id,
+                                                                               '_blank');
+                                                               }, 1500);
+                                                       } else {
+                                                               editor.setStatus('Error cloning project: ' +
+                                                                       JSON.parse(xhr.response).errors[0].message);
+                                                       }
+                                               }
+                                       };
+                                       xhr.onerror = function(e) {
+                                               mxUtils.alert(xhr.statusText);
+                                       };
+                                       xhr.send('description=project_cloned&name=' + name +
+                                               '&draft=' + xml + '&production=' + xml);
+                               } else {
+                                       mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                       mxUtils.popup(xml);
+
+                                       return;
+                               }
+                       }
+
+                       this.editor.filename = name;
+                       this.editor.modified = false;
+               } catch (e) {
+                       this.editor.setStatus('Error saving file');
+               }
+       } else {
+               this.editor.setStatus('Error saving file');
+       }
+};
+
+/**
+ * Plush the current graph under the given project name.
+ */
+EditorUi.prototype.validate = function(a, b) {
+       var graph = this.editor.graph;
+       a = null != a ? a : graph.model.getRoot();
+       b = null != b ? b : {};
+       for (var c = !0, d = graph.model.getChildCount(a), e = 0; e < d; e++) {
+               var f = graph.model.getChildAt(a, e),
+                       g = b;
+               graph.isValidRoot(f) && (g = {});
+               g = this.validate(f, g);
+               null != g ? graph.setCellWarning(f, g.replace(/\n/g, "\x3cbr\x3e")) : graph.setCellWarning(f, null);
+               c = c && null == g
+       }
+       d = "";
+       if (graph.model.isVertex(a)) {
+               switch (a.value.nodeName) {
+                       case 'question':
+                               d = (a.value.getAttribute('question') !== "") ? "" :
+                                       'Question can not be empty' + "\n";
+                               d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n";
+
+                               break;
+                       case 'input':
+                               d = (a.value.getAttribute('question') !== "") ? "" : 'Question can not be empty' + "\n";
+                               d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n";
+
+                               break;
+                       case 'start':
+                               d = this.validateBlock('start') ? '' : "Only one Start block is allowed" + "\n";
+                               d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n";
+
+                               break;
+               }
+       }
+
+       if (graph.model.isEdge(a)) {
+               var z = graph.model.getCell(a.source.getId());
+               switch (z.value.nodeName) {
+                       case 'question':
+                               // var patt = /^[a-zA-Z0-9][a-zA-Z0-9\s]*$/;
+                               var str = String(a.getValue());
+                               console.log(str);
+                               if (str === 'null' || str === 'undefined') {
+                                       d = "Value can not be empty" + "\n";
+                               } else {
+                                       var result = str.split(",");
+                                       result.forEach(function(entry, key) {
+                                               d = d + ((entry.trim() !== "") ? "" : 'Value' + (key + 1) + ' can not be empty' + "\n");
+                                       });
+                               }
+                               // console.log(a.getValue());
+                               // if ((str == 'undefined') || (str == 'null')) {
+                               //      str = ' ';
+                               // }
+                               // d = ((a.getValue() !== "") && (a.getValue() !== 'undefined') && (a.getValue() !== null)) ? '' : "Value can not be empty" + "\n";
+                               // d = d + ((patt.test(str.trim())) ? "" : 'Value can not be empty' + "\n");
+                               //
+                               // res.forEach(function(entry) {
+                               // d = d + ((patt.test(entry.trim())) ? "" : 'Can not be empty' + "\n");
+                               // });
+                               break;
+
+               }
+       }
+
+       graph.isCellCollapsed(a) && !c && (d += (mxResources.get(graph.containsValidationErrorsResource) || graph.containsValidationErrorsResource) + "\n");
+       d = graph.model.isEdge(a) ? d + (graph.getEdgeValidationError(a, graph.model.getTerminal(a, !0), graph.model.getTerminal(a, !1)) || "") : d + (graph.getCellValidationError(a) || "");
+       e = graph.validateCell(a, b);
+       null != e && (d += e);
+       null == graph.model.getParent(a) && graph.view.validate();
+       return 0 < d.length || !c ? d : null
+}
+
+EditorUi.prototype.validateBlock = function(blockName) {
+       var graph = this.editor.graph;
+       var parent = graph.getDefaultParent();
+       var count = 0;
+       // var model = graph.getModel();
+       //We can also use model.getChildren(parent)
+       parent.children.forEach(function(n) {
+               if (graph.model.isVertex(n) && n.value.nodeName == blockName) {
+                       count++;
+               }
+       });
+       return count > 1 ? false : true;
+}
+
+EditorUi.prototype.publish = function(name) {
+
+       var editor = this.editor;
+
+       if (name != null) {
+
+               var response = this.validate();
+               if (response === null) {
+                       var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+                       try {
+                               if (useLocalStorage) {
+                                       if (localStorage.getItem(name) != null &&
+                                               !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                               return;
+                                       }
+
+                                       localStorage.setItem(name, xml);
+                                       this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                               } else {
+                                       console.log(xml.length);
+                                       console.log(MAX_REQUEST_SIZE);
+                                       if (xml.length < MAX_REQUEST_SIZE) {
+                                               xml = encodeURIComponent(xml);
+
+                                               var xhr = new XMLHttpRequest();
+                                               xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
+                                               xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                               xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                               xhr.onload = function(e) {
+                                                       if (xhr.readyState === 4) {
+                                                               if (xhr.status === 200) {
+                                                                       editor.setStatus('Published at ' + JSON.parse(xhr.response).updatedAt +
+                                                                               ' (' + xhr.status + ' ' + xhr.statusText + ')');
+                                                               } else {
+                                                                       editor.setStatus('Error saving project: ' +
+                                                                               JSON.parse(xhr.response).errors[0].message);
+                                                               }
+                                                       }
+                                               };
+                                               xhr.onerror = function(e) {
+                                                       mxUtils.alert(xhr.statusText);
+                                               };
+                                               xhr.send('draft=' + xml + '&production=' + xml);
+                                       } else {
+                                               mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                               mxUtils.popup(xml);
+
+                                               return;
+                                       }
+                               }
+
+                               this.editor.filename = name;
+                               this.editor.modified = false;
+                       } catch (e) {
+                               this.editor.setStatus('Error publishing file');
+                       }
+               } else {
+                       editor.setStatus('Error publishing project: ');
+               }
+       } else {
+               this.editor.setStatus('Error publishing file');
+       }
+       // }
+
+
+
+};
+
+/**
+ * Create variable
+ */
+EditorUi.prototype.variable = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               try {
+
+                       var xhr = new XMLHttpRequest();
+                       xhr.open("POST", VARIABLE_URL, true);
+                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                       xhr.onload = function(e) {
+                               if (xhr.readyState === 4) {
+                                       if (xhr.status === 201) {
+                                               editor.setStatus('Variable created at ' + JSON.parse(xhr.response).createdAt +
+                                                       ' (' + xhr.status + ' ' + xhr.statusText + ')');
+                                       } else {
+                                               editor.setStatus('Error cloning project: ' +
+                                                       JSON.parse(xhr.response).errors[0].message);
+                                       }
+                               }
+                       };
+                       xhr.onerror = function(e) {
+                               mxUtils.alert(xhr.statusText);
+                       };
+                       xhr.send('name=' + name);
+               } catch (e) {
+                       this.editor.setStatus('Error creating variable');
+               }
+       } else {
+               this.editor.setStatus('Error creating variable');
+       }
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.getUrl = function(pathname) {
+       var href = (pathname != null) ? pathname : window.location.pathname;
+       var parms = (href.indexOf('?') > 0) ? 1 : 0;
+
+       // Removes template URL parameter for new blank diagram
+       for (var key in urlParams) {
+               if (parms == 0) {
+                       href += '?';
+               } else {
+                       href += '&';
+               }
+
+               href += key + '=' + urlParams[key];
+               parms++;
+       }
+
+       return href;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addUndoListener = function() {
+       var undo = this.actions.get('undo');
+       var redo = this.actions.get('redo');
+
+       var undoMgr = this.editor.undoManager;
+
+       var undoListener = function() {
+               undo.setEnabled(undoMgr.canUndo());
+               redo.setEnabled(undoMgr.canRedo());
+       };
+
+       undoMgr.addListener(mxEvent.ADD, undoListener);
+       undoMgr.addListener(mxEvent.UNDO, undoListener);
+       undoMgr.addListener(mxEvent.REDO, undoListener);
+       undoMgr.addListener(mxEvent.CLEAR, undoListener);
+
+       // Updates the button states once
+       undoListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+EditorUi.prototype.addSelectionListener = function() {
+       var selectionListener = mxUtils.bind(this, function() {
+               var graph = this.editor.graph;
+               var selected = !graph.isSelectionEmpty();
+               var vertexSelected = false;
+               var edgeSelected = false;
+
+               var cells = graph.getSelectionCells();
+
+               if (cells != null) {
+                       for (var i = 0; i < cells.length; i++) {
+                               var cell = cells[i];
+
+                               if (graph.getModel().isEdge(cell)) {
+                                       edgeSelected = true;
+                               }
+
+                               if (graph.getModel().isVertex(cell)) {
+                                       vertexSelected = true;
+                               }
+
+                               if (edgeSelected && vertexSelected) {
+                                       break;
+                               }
+                       }
+               }
+
+               // Updates action states
+               var actions = ['cut', 'copy', 'delete', 'duplicate', 'bold', 'italic',
+                       'style', 'underline', 'toFront', 'toBack', 'dashed', 'rounded',
+                       'shadow',
+                       'tilt', 'autosize'
+               ];
+
+               for (var i = 0; i < actions.length; i++) {
+                       this.actions.get(actions[i]).setEnabled(selected);
+               }
+
+               this.actions.get('curved').setEnabled(edgeSelected);
+               this.actions.get('rotation').setEnabled(vertexSelected);
+               this.actions.get('wordWrap').setEnabled(vertexSelected);
+               this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
+               this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
+                       graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
+               var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
+               this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
+                       graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell()))
+               );
+
+               // Updates menu states
+               var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text',
+                       'format',
+                       'arrange', 'linewidth', 'spacing'
+               ];
+
+               for (var i = 0; i < menus.length; i++) {
+                       this.menus.get(menus[i]).setEnabled(selected);
+               }
+
+               menus = ['line', 'lineend', 'linestart'];
+
+               for (var i = 0; i < menus.length; i++) {
+                       this.menus.get(menus[i]).setEnabled(edgeSelected);
+               }
+
+               this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
+
+               this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
+               this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
+                       graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
+               this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view
+                               .currentRoot != null) ||
+                       (graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))
+               ));
+               this.actions.get('home').setEnabled(graph.view.currentRoot != null);
+               this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
+               var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(
+                       graph.getSelectionCell());
+               this.actions.get('enterGroup').setEnabled(groupEnabled);
+               this.actions.get('expand').setEnabled(groupEnabled);
+               this.actions.get('collapse').setEnabled(groupEnabled);
+               this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
+               this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
+                       graph.getLinkForCell(graph.getSelectionCell()) != null);
+       });
+
+       this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+               selectionListener);
+       selectionListener();
+};
+
+/**
+ * Refreshes the viewport.
+ */
+EditorUi.prototype.refresh = function() {
+       var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode ==
+               5);
+       var w = this.container.clientWidth;
+       var h = this.container.clientHeight;
+
+       if (this.container == document.body) {
+               w = document.body.clientWidth || document.documentElement.clientWidth;
+               h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight :
+                       document.documentElement.clientHeight;
+       }
+
+       var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize -
+               20));
+       var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight -
+               this.toolbarHeight - this.footerHeight - this.splitSize - 1));
+
+       this.menubarContainer.style.height = this.menubarHeight + 'px';
+       this.toolbarContainer.style.top = this.menubarHeight + 'px';
+       this.toolbarContainer.style.height = this.toolbarHeight + 'px';
+
+       var tmp = this.menubarHeight + this.toolbarHeight;
+
+       if (!mxClient.IS_QUIRKS) {
+               tmp += 1;
+       }
+
+       this.sidebarContainer.style.top = tmp + 'px';
+       this.sidebarContainer.style.width = effHsplitPosition + 'px';
+       this.outlineContainer.style.width = effHsplitPosition + 'px';
+       this.outlineContainer.style.height = effVsplitPosition + 'px';
+       this.outlineContainer.style.bottom = this.footerHeight + 'px';
+       this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) +
+               'px';
+       this.diagramContainer.style.top = this.sidebarContainer.style.top;
+       this.footerContainer.style.height = this.footerHeight + 'px';
+       this.footerContainer.style.display = 'none';
+       this.hsplit.style.top = this.sidebarContainer.style.top;
+       this.hsplit.style.bottom = this.outlineContainer.style.bottom;
+       this.hsplit.style.left = effHsplitPosition + 'px';
+       this.vsplit.style.width = this.sidebarContainer.style.width;
+       this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
+
+       if (quirks) {
+               this.menubarContainer.style.width = w + 'px';
+               this.toolbarContainer.style.width = this.menubarContainer.style.width;
+               var sidebarHeight = (h - effVsplitPosition - this.splitSize - this.footerHeight -
+                       this.menubarHeight - this.toolbarHeight);
+               this.sidebarContainer.style.height = sidebarHeight + 'px';
+               this.diagramContainer.style.width = (w - effHsplitPosition - this.splitSize) +
+                       'px';
+               var diagramHeight = (h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+               this.diagramContainer.style.height = diagramHeight + 'px';
+               this.footerContainer.style.width = this.menubarContainer.style.width;
+               this.hsplit.style.height = diagramHeight + 'px';
+       } else {
+               this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize +
+                       this.footerHeight) + 'px';
+               this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
+       }
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createDivs = function() {
+       this.menubarContainer = this.createDiv('geMenubarContainer');
+       this.toolbarContainer = this.createDiv('geToolbarContainer');
+       this.sidebarContainer = this.createDiv('geSidebarContainer');
+       this.outlineContainer = this.createDiv('geOutlineContainer');
+       this.diagramContainer = this.createDiv('geDiagramContainer');
+       this.footerContainer = this.createDiv('geFooterContainer');
+       this.hsplit = this.createDiv('geHsplit');
+       this.vsplit = this.createDiv('geVsplit');
+
+       // Sets static style for containers
+       this.menubarContainer.style.top = '0px';
+       this.menubarContainer.style.left = '0px';
+       this.menubarContainer.style.right = '0px';
+       this.toolbarContainer.style.left = '0px';
+       this.toolbarContainer.style.right = '0px';
+       this.sidebarContainer.style.left = '0px';
+       this.outlineContainer.style.left = '0px';
+       this.diagramContainer.style.right = '0px';
+       this.footerContainer.style.left = '0px';
+       this.footerContainer.style.right = '0px';
+       this.footerContainer.style.bottom = '0px';
+       this.vsplit.style.left = '0px';
+       this.vsplit.style.height = this.splitSize + 'px';
+       this.hsplit.style.width = this.splitSize + 'px';
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createUi = function() {
+       // Creates menubar
+       this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
+       this.menubarContainer.appendChild(this.menubar.container);
+
+       // Creates toolbar
+       this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
+       this.toolbarContainer.appendChild(this.toolbar.container);
+
+       // Creates the sidebar
+       this.sidebar = this.createSidebar(this.sidebarContainer);
+
+       // Creates the footer
+       this.footerContainer.appendChild(this.createFooter());
+
+       // Adds status bar in menubar
+       this.statusContainer = this.createStatusContainer();
+
+       // Connects the status bar to the editor status
+       this.editor.addListener('statusChanged', mxUtils.bind(this, function() {
+               this.setStatusText(this.editor.getStatus());
+       }));
+
+       this.setStatusText(this.editor.getStatus());
+       this.menubar.container.appendChild(this.statusContainer);
+
+       // Inserts into DOM
+       this.container.appendChild(this.menubarContainer);
+       this.container.appendChild(this.toolbarContainer);
+       this.container.appendChild(this.sidebarContainer);
+       this.container.appendChild(this.outlineContainer);
+       this.container.appendChild(this.diagramContainer);
+       this.container.appendChild(this.footerContainer);
+       this.container.appendChild(this.hsplit);
+       this.container.appendChild(this.vsplit);
+
+       // HSplit
+       this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(
+               value) {
+               this.hsplitPosition = value;
+               this.refresh();
+               this.editor.graph.sizeDidChange();
+               this.editor.outline.update(false);
+               this.editor.outline.outline.sizeDidChange();
+       }));
+
+       // VSplit
+       this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(
+               this,
+               function(value) {
+                       this.vsplitPosition = value;
+                       this.refresh();
+                       this.editor.outline.update(false);
+                       this.editor.outline.outline.sizeDidChange();
+               }));
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function() {
+       var container = document.createElement('a');
+       container.className = 'geItem geStatus';
+
+       return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function() {
+       var container = document.createElement('a');
+       container.className = 'geItem geStatus';
+
+       return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.setStatusText = function(value) {
+       this.statusContainer.innerHTML = value;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createToolbar = function(container) {
+       return new Toolbar(this, container);
+};
+
+/**
+ * Creates a new sidebar for the given container.
+ */
+EditorUi.prototype.createSidebar = function(container) {
+       return new Sidebar(this, container);
+};
+
+/**
+ * Creates and returns a new footer.
+ */
+EditorUi.prototype.createFooter = function() {
+       return this.createDiv('geFooter');
+};
+
+/**
+ * Creates the actual toolbar for the toolbar container.
+ */
+EditorUi.prototype.createDiv = function(classname) {
+       var elt = document.createElement('div');
+       elt.className = classname;
+
+       return elt;
+};
+
+/**
+ * Creates the custom header.
+ */
+EditorUi.prototype.createHeader = function(classname) {
+       var elt = document.createElement(classname);
+       return elt;
+};
+
+/**
+ * Creates the custom header.
+ */
+EditorUi.prototype.createForm = function(classname) {
+       var elt = document.createElement('form');
+       elt.className = classname;
+
+       return elt;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange) {
+       var start = null;
+       var initial = null;
+
+       function getValue() {
+               return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
+       };
+
+       function moveHandler(evt) {
+               if (start != null) {
+                       var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                       onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y -
+                               pt.y)) - dx));
+                       mxEvent.consume(evt);
+               }
+       };
+
+       function dropHandler(evt) {
+               moveHandler(evt);
+               start = null;
+               initial = null;
+       };
+
+       mxEvent.addGestureListeners(elt, function(evt) {
+               start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+               initial = getValue();
+               mxEvent.consume(evt);
+       });
+
+       mxEvent.addListener(document, 'mousemove', moveHandler);
+       mxEvent.addListener(document, 'touchmove', moveHandler);
+       mxEvent.addListener(document, 'mouseup', dropHandler);
+       mxEvent.addListener(document, 'touchend', dropHandler);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose) {
+       this.hideDialog();
+       this.dialog = new Dialog(this, elt, w, (mxClient.IS_VML) ? h - 12 : h,
+               modal,
+               closable, onClose);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.hideDialog = function() {
+       if (this.dialog != null) {
+               this.dialog.close();
+               this.dialog = null;
+               this.editor.graph.container.focus();
+       }
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.saveFile = function(forceDialog) {
+       if (!forceDialog && this.editor.filename != null) {
+               this.save(this.editor.getOrCreateFilename());
+       } else {
+               this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
+       }
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.publishFile = function(forceDialog) {
+       if (!forceDialog && this.editor.filename != null) {
+               this.publish(this.editor.getOrCreateFilename());
+       } else {
+               //this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
+       }
+};
+
+/**
+ * Executes the given layout.
+ */
+EditorUi.prototype.executeLayout = function(layout, animate, ignoreChildCount) {
+       var graph = this.editor.graph;
+       var cell = graph.getSelectionCell();
+
+       // Allow global overridding of animation
+       animate = this.animate != null ? this.animate : animate;
+
+       graph.getModel().beginUpdate();
+       try {
+               layout.execute(graph.getDefaultParent(), cell);
+       } catch (e) {
+               throw e;
+       } finally {
+               // Animates the changes in the graph model except
+               // for Camino, where animation is too slow
+               if (animate && navigator.userAgent.indexOf('Camino') < 0) {
+                       // New API for animating graph layout results asynchronously
+                       var morph = new mxMorphing(graph);
+                       morph.addListener(mxEvent.DONE, mxUtils.bind(this, function() {
+                               graph.getModel().endUpdate();
+                       }));
+
+                       morph.startAnimation();
+               } else {
+                       graph.getModel().endUpdate();
+               }
+       }
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+EditorUi.prototype.createKeyHandler = function(editor) {
+       var graph = this.editor.graph;
+       var keyHandler = new mxKeyHandler(graph);
+
+       // Routes command-key to control-key on Mac
+       keyHandler.isControlDown = function(evt) {
+               return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
+       };
+
+       // Helper function to move cells with the cursor keys
+       function nudge(keyCode) {
+               if (!graph.isSelectionEmpty()) {
+                       var dx = 0;
+                       var dy = 0;
+
+                       if (keyCode == 37) {
+                               dx = -1;
+                       } else if (keyCode == 38) {
+                               dy = -1;
+                       } else if (keyCode == 39) {
+                               dx = 1;
+                       } else if (keyCode == 40) {
+                               dy = 1;
+                       }
+
+                       graph.moveCells(graph.getSelectionCells(), dx, dy);
+                       graph.scrollCellToVisible(graph.getSelectionCell());
+               }
+       };
+
+       // Binds keystrokes to actions
+       var bindAction = mxUtils.bind(this, function(code, control, key, shift) {
+               var action = this.actions.get(key);
+
+               if (action != null) {
+                       var f = function() {
+                               if (action.enabled) {
+                                       action.funct();
+                               }
+                       };
+
+                       if (control) {
+                               if (shift) {
+                                       keyHandler.bindControlShiftKey(code, f);
+                               } else {
+                                       keyHandler.bindControlKey(code, f);
+                               }
+                       } else {
+                               if (shift) {
+                                       keyHandler.bindShiftKey(code, f);
+                               } else {
+                                       keyHandler.bindKey(code, f);
+                               }
+                       }
+               }
+       });
+
+       var ui = this;
+       var keyHandleEscape = keyHandler.escape;
+       keyHandler.escape = function(evt) {
+               ui.hideDialog();
+               keyHandleEscape.apply(this, arguments);
+       };
+
+       // Ignores enter keystroke. Remove this line if you want the
+       // enter keystroke to stop editing.
+       keyHandler.enter = function() {};
+       keyHandler.bindKey(8, function() {
+               graph.foldCells(true);
+       }); // Backspace
+       keyHandler.bindKey(13, function() {
+               graph.foldCells(false);
+       }); // Enter
+       keyHandler.bindKey(33, function() {
+               graph.exitGroup();
+       }); // Page Up
+       keyHandler.bindKey(34, function() {
+               graph.enterGroup();
+       }); // Page Down
+       keyHandler.bindKey(36, function() {
+               graph.home();
+       }); // Home
+       keyHandler.bindKey(35, function() {
+               graph.refresh();
+       }); // End
+       keyHandler.bindKey(37, function() {
+               nudge(37);
+       }); // Left arrow
+       keyHandler.bindKey(38, function() {
+               nudge(38);
+       }); // Up arrow
+       keyHandler.bindKey(39, function() {
+               nudge(39);
+       }); // Right arrow
+       keyHandler.bindKey(40, function() {
+               nudge(40);
+       }); // Down arrow
+       keyHandler.bindKey(113, function() {
+               graph.startEditingAtCell();
+       });
+       bindAction(46, false, 'delete'); // Delete
+       bindAction(82, true, 'tilt'); // Ctrl+R
+       bindAction(83, true, 'save'); // Ctrl+S
+       bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
+       bindAction(107, false, 'zoomIn'); // Add
+       bindAction(109, false, 'zoomOut'); // Subtract
+       bindAction(65, true, 'selectAll'); // Ctrl+A
+       bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
+       bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
+       bindAction(69, true, 'export'); // Ctrl+Shift+E
+       bindAction(66, true, 'toBack'); // Ctrl+B
+       bindAction(70, true, 'toFront'); // Ctrl+F
+       bindAction(68, true, 'duplicate'); // Ctrl+D
+       bindAction(90, true, 'undo'); // Ctrl+Z
+       bindAction(89, true, 'redo'); // Ctrl+Y
+       bindAction(88, true, 'cut'); // Ctrl+X
+       bindAction(67, true, 'copy'); // Ctrl+C
+       bindAction(81, true, 'connect'); // Ctrl+Q
+       bindAction(86, true, 'paste'); // Ctrl+V
+       bindAction(71, true, 'group'); // Ctrl+G
+       bindAction(71, true, 'grid', true); // Ctrl+Shift+G
+       bindAction(85, true, 'ungroup'); // Ctrl+U
+       bindAction(112, false, 'about'); // F1
+       bindAction(80, true, 'publish', true); // Ctrl+Shift+P
+
+       return keyHandler;
+};
+
+/**
+ * Giuseppe Careri
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createMultiplicities = function(graph, cells, source,
+       target) {
+       for (var i = 0; i < cells.length; i++) {
+               graph.push(new mxMultiplicity(true, cells[i], null, null, source[i][0],
+                       source[i][1], null, mxResources.get(cells[i]) + ' must have ' + source[i][0] + ' outgoing edge.', null));
+               graph.push(new mxMultiplicity(false, cells[i], null, null, target[i][0],
+                       target[i][1], null, mxResources.get(cells[i]) + ' must have ' + target[i][0] + ' incoming edge.', null));
+       };
+};
index b49ac45..46f34e4 100644 (file)
@@ -1 +1,748 @@
-var _0x7575=["\x63\x61\x6C\x6C","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x61\x70\x70\x6C\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x32","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6C\x6F\x61\x64\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x63\x75\x72\x73\x6F\x72","\x73\x74\x79\x6C\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x76\x69\x65\x77","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x68\x74\x6D\x6C","\x31","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x77\x72\x61\x70","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x61\x63\x74\x69\x76\x65","\x67\x72\x61\x70\x68","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x73\x74\x61\x72\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x6E\x69\x74\x54\x6F\x75\x63\x68","\x65\x78\x74\x65\x6E\x64","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x2F\x64\x65\x66\x61\x75\x6C\x74\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x64\x65\x63\x6F\x64\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x45\x4C\x42\x4F\x57\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x72\x6F\x75\x70","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","","\x69\x73\x56\x65\x72\x74\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x5F","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x67\x65\x74","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x6F\x62\x6A\x65\x63\x74","\x6C\x61\x62\x65\x6C","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x55\x73\x65\x72\x4F\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6E\x6B","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x61\x72\x6B\x65\x72","\x66\x69\x72\x73\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x73\x74\x61\x74\x65","\x73\x68\x61\x70\x65","\x6E\x6F\x64\x65","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x78","\x79","\x2F\x74\x6F\x75\x63\x68\x2D\x68\x61\x6E\x64\x6C\x65\x2E\x70\x6E\x67","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x72\x63","\x2F\x74\x6F\x75\x63\x68\x2D\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x69\x6E\x69\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x49\x6D\x67","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x32\x39\x70\x78","\x68\x65\x69\x67\x68\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x74\x69\x74\x6C\x65","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x70\x61\x64\x64\x69\x6E\x67","\x32\x70\x78","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x72\x65\x64\x72\x61\x77\x54\x6F\x6F\x6C\x73","\x72\x65\x64\x72\x61\x77","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x78","\x74\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x49\x53\x5F\x49\x45","\x49\x53\x5F\x53\x56\x47","\x64\x69\x76","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x65\x6E\x74\x65\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E"];Graph=function(_0xf035x1,_0xf035x2,_0xf035x3,_0xf035x4){mxGraph[_0x7575[0]](this,_0xf035x1,_0xf035x2,_0xf035x3,_0xf035x4);this[_0x7575[1]](true);this[_0x7575[2]](false);this[_0x7575[3]](true);this[_0x7575[4]](!mxClient.IS_TOUCH);this[_0x7575[5]](false);this[_0x7575[6]](false);this[_0x7575[7]]=true;this[_0x7575[8]]=false;this[_0x7575[9]]=false;this[_0x7575[11]][_0x7575[10]]=true;this[_0x7575[12]](false);this[_0x7575[11]][_0x7575[13]](false);this[_0x7575[11]][_0x7575[14]]=function(){return mxConnectionHandler[_0x7575[16]][_0x7575[14]][_0x7575[15]](this,arguments)&&urlParams[_0x7575[17]]!=_0x7575[18]};this[_0x7575[19]]=_0x7575[20];if(_0xf035x4==null){this[_0x7575[21]]()};var _0xf035x5= new mxRubberband(this);this[_0x7575[22]]=function(){return _0xf035x5};this[_0x7575[29]][_0x7575[28]](mxEvent.PAN_START,mxUtils[_0x7575[27]](this,function(){this[_0x7575[25]][_0x7575[24]][_0x7575[23]]=_0x7575[26]}));this[_0x7575[29]][_0x7575[28]](mxEvent.PAN_END,mxUtils[_0x7575[27]](this,function(){this[_0x7575[25]][_0x7575[24]][_0x7575[23]]=_0x7575[30]}));this[_0x7575[31]]=function(_0xf035x6){var _0xf035x7=this[_0x7575[33]][_0x7575[32]](_0xf035x6);var _0xf035x8=(_0xf035x7!=null)?_0xf035x7[_0x7575[24]]:this[_0x7575[34]](_0xf035x6);return _0xf035x8[_0x7575[35]]==_0x7575[36]||_0xf035x8[_0x7575[37]]==_0x7575[38]};this[_0x7575[40]][_0x7575[39]]=function(_0xf035x7){var _0xf035x9=mxCellRenderer[_0x7575[16]][_0x7575[39]][_0x7575[15]](this,arguments);if(_0xf035x7[_0x7575[24]][_0x7575[37]]==_0x7575[38]&&_0xf035x7[_0x7575[24]][_0x7575[35]]!=1){_0xf035x9=mxUtils[_0x7575[41]](_0xf035x9,false)};return _0xf035x9};this[_0x7575[42]]=function(_0xf035x6){return false};this[_0x7575[11]][_0x7575[43]]=16;var _0xf035xa=this[_0x7575[11]][_0x7575[44]];this[_0x7575[11]][_0x7575[44]]=function(_0xf035xb,_0xf035x7){if(_0xf035x7==null){if(!this[_0x7575[46]][_0x7575[29]][_0x7575[45]]){_0xf035x5[_0x7575[49]](_0xf035xb[_0x7575[47]](),_0xf035xb[_0x7575[48]]());this[_0x7575[46]][_0x7575[29]][_0x7575[50]]=false}}else {if(tapAndHoldStartsConnection){_0xf035xa[_0x7575[15]](this,arguments)}else {if(this[_0x7575[46]][_0x7575[52]](_0xf035x7[_0x7575[51]])&&this[_0x7575[46]][_0x7575[53]]()>1){this[_0x7575[46]][_0x7575[54]](_0xf035x7[_0x7575[51]])}}}};if(touchStyle){this[_0x7575[55]]()}};mxUtils[_0x7575[56]](Graph,mxGraph);Graph[_0x7575[16]][_0x7575[57]]=null;Graph[_0x7575[16]][_0x7575[58]]=null;Graph[_0x7575[16]][_0x7575[21]]=function(){var _0xf035xc=mxUtils[_0x7575[61]](STYLE_PATH+_0x7575[60])[_0x7575[59]]();var _0xf035xd= new mxCodec(_0xf035xc[_0x7575[62]]);_0xf035xd[_0x7575[64]](_0xf035xc,this[_0x7575[63]]())};Graph[_0x7575[16]][_0x7575[65]]=function(_0xf035xe){if(_0xf035xe!=null){var _0xf035x7=this[_0x7575[33]][_0x7575[32]](_0xf035xe);var _0xf035x8=(_0xf035x7!=null)?_0xf035x7[_0x7575[24]]:this[_0x7575[34]](_0xf035xe);if(_0xf035x8!=null){var _0xf035xf=mxUtils[_0x7575[66]](_0xf035x8,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL);var _0xf035x10=(_0xf035xf==mxConstants[_0x7575[67]])?mxConstants[_0x7575[68]]:mxConstants[_0x7575[67]];this[_0x7575[69]](mxConstants.STYLE_ELBOW,_0xf035x10,[_0xf035xe])}}};Graph[_0x7575[16]][_0x7575[70]]=function(_0xf035x6){if(_0xf035x6!=null&&this[_0x7575[72]]()[_0x7575[71]](_0xf035x6)){var _0xf035x11=this[_0x7575[72]]()[_0x7575[73]]([_0xf035x6])[0];if(_0xf035x11[_0x7575[74]]!=null){_0xf035x11[_0x7575[74]][_0x7575[75]]=null};var _0xf035x8=_0xf035x11[_0x7575[76]]();_0xf035x8=mxUtils[_0x7575[77]](_0xf035x8,mxConstants.STYLE_ENTRY_X,null);_0xf035x8=mxUtils[_0x7575[77]](_0xf035x8,mxConstants.STYLE_ENTRY_Y,null);_0xf035x8=mxUtils[_0x7575[77]](_0xf035x8,mxConstants.STYLE_EXIT_X,null);_0xf035x8=mxUtils[_0x7575[77]](_0xf035x8,mxConstants.STYLE_EXIT_Y,null);_0xf035x11[_0x7575[77]](_0xf035x8);this[_0x7575[11]][_0x7575[78]]=function(_0xf035xb){return this[_0x7575[46]][_0x7575[33]][_0x7575[79]](_0xf035x11)};this[_0x7575[11]][_0x7575[80]]=function(){return this[_0x7575[46]][_0x7575[73]]([_0xf035x11])[0]}}};Graph[_0x7575[16]][_0x7575[81]]=function(_0xf035x6){return this[_0x7575[82]]&&this[_0x7575[83]](_0xf035x6)};Graph[_0x7575[16]][_0x7575[84]]=function(_0xf035x6){return this[_0x7575[83]](_0xf035x6)};Graph[_0x7575[16]][_0x7575[85]]=function(){var _0xf035x12=mxGraph[_0x7575[16]][_0x7575[85]][_0x7575[15]](this,arguments);_0xf035x12[_0x7575[77]](_0x7575[86]);return _0xf035x12};Graph[_0x7575[16]][_0x7575[87]]=function(_0xf035x6){var _0xf035x13=_0x7575[88];if(this[_0x7575[72]]()[_0x7575[89]](_0xf035x6)){_0xf035x13+=mxResources[_0x7575[93]](_0x7575[90]+_0xf035x6[_0x7575[92]][_0x7575[91]])}else {if(this[_0x7575[72]]()[_0x7575[71]](_0xf035x6)){_0xf035x13=mxGraph[_0x7575[16]][_0x7575[87]][_0x7575[15]](this,arguments)}};return _0xf035x13};Graph[_0x7575[16]][_0x7575[94]]=function(_0xf035x6){if(_0xf035x6[_0x7575[92]]!=null&& typeof (_0xf035x6[_0x7575[92]])==_0x7575[95]){return _0xf035x6[_0x7575[92]][_0x7575[97]](_0x7575[96])};return mxGraph[_0x7575[16]][_0x7575[94]][_0x7575[15]](this,arguments)};Graph[_0x7575[16]][_0x7575[98]]=function(_0xf035x6,_0xf035x10,_0xf035x14){if(_0xf035x6[_0x7575[92]]!=null&& typeof (_0xf035x6[_0x7575[92]])==_0x7575[95]){var _0xf035x15=_0xf035x6[_0x7575[92]][_0x7575[99]](true);_0xf035x15[_0x7575[100]](_0x7575[96],_0xf035x10);_0xf035x10=_0xf035x15};mxGraph[_0x7575[16]][_0x7575[98]][_0x7575[15]](this,arguments)};Graph[_0x7575[16]][_0x7575[101]]=function(_0xf035x6,_0xf035x16){var _0xf035x10=null;if(_0xf035x6[_0x7575[92]]!=null&& typeof (_0xf035x6[_0x7575[92]])==_0x7575[95]){_0xf035x10=_0xf035x6[_0x7575[92]][_0x7575[99]](true)}else {var _0xf035x17=mxUtils[_0x7575[102]]();_0xf035x10=_0xf035x17[_0x7575[104]](_0x7575[103]);_0xf035x10[_0x7575[100]](_0x7575[96],_0xf035x6[_0x7575[92]])};if(_0xf035x16!=null&&_0xf035x16[_0x7575[105]]>0){_0xf035x10[_0x7575[100]](_0x7575[106],_0xf035x16)}else {_0xf035x10[_0x7575[107]](_0x7575[106])};this[_0x7575[109]][_0x7575[108]](_0xf035x6,_0xf035x10)};Graph[_0x7575[16]][_0x7575[110]]=function(_0xf035x6){if(_0xf035x6[_0x7575[92]]!=null&& typeof (_0xf035x6[_0x7575[92]])==_0x7575[95]){return _0xf035x6[_0x7575[92]][_0x7575[97]](_0x7575[106])};return null};Graph[_0x7575[16]][_0x7575[55]]=function(){this[_0x7575[11]][_0x7575[112]][_0x7575[111]]=function(){return this[_0x7575[46]][_0x7575[11]][_0x7575[113]]!=null};this[_0x7575[28]](mxEvent.START_EDITING,function(_0xf035x18,_0xf035x19){this[_0x7575[29]][_0x7575[114]]()});var _0xf035x1a=false;var _0xf035x1b=null;this[_0x7575[115]]=function(_0xf035xb){mxGraph[_0x7575[16]][_0x7575[115]][_0x7575[15]](this,arguments);if(_0xf035xb[_0x7575[32]]()==null){var _0xf035x6=this[_0x7575[118]](_0xf035xb[_0x7575[116]],_0xf035xb[_0x7575[117]]);if(this[_0x7575[72]]()[_0x7575[71]](_0xf035x6)){_0xf035xb[_0x7575[119]]=this[_0x7575[33]][_0x7575[32]](_0xf035x6);if(_0xf035xb[_0x7575[119]]!=null&&_0xf035xb[_0x7575[119]][_0x7575[120]]!=null){this[_0x7575[25]][_0x7575[24]][_0x7575[23]]=_0xf035xb[_0x7575[119]][_0x7575[120]][_0x7575[121]][_0x7575[24]][_0x7575[23]]}}};if(_0xf035xb[_0x7575[32]]()==null){this[_0x7575[25]][_0x7575[24]][_0x7575[23]]=_0x7575[30]}};this[_0x7575[122]]=function(_0xf035x1c,_0xf035xb,_0xf035x18){if(_0xf035x1c==mxEvent[_0x7575[123]]){if(!this[_0x7575[29]][_0x7575[124]]()){_0xf035x1b=_0xf035xb[_0x7575[125]]();_0xf035x1a=(_0xf035x1b!=null)?this[_0x7575[52]](_0xf035x1b):this[_0x7575[126]]()}else {_0xf035x1a=false;_0xf035x1b=null}}else {if(_0xf035x1c==mxEvent[_0x7575[127]]){if(_0xf035x1a&&!this[_0x7575[128]]()){if(!this[_0x7575[29]][_0x7575[124]]()){var _0xf035x1d=mxEvent[_0x7575[130]](_0xf035xb[_0x7575[129]]());var _0xf035x1e=mxEvent[_0x7575[131]](_0xf035xb[_0x7575[129]]());this[_0x7575[29]][_0x7575[132]](_0xf035x1d+16,_0xf035x1e,_0xf035x1b,_0xf035xb[_0x7575[129]]())};_0xf035x1a=false;_0xf035x1b=null;_0xf035xb[_0x7575[133]]();return};_0xf035x1a=false;_0xf035x1b=null}};mxGraph[_0x7575[16]][_0x7575[122]][_0x7575[15]](this,arguments);if(_0xf035x1c==mxEvent[_0x7575[134]]&&_0xf035xb[_0x7575[135]]()){_0xf035x1a=false;_0xf035x1b=null}}};(function(){mxVertexHandler[_0x7575[16]][_0x7575[136]]=true;mxText[_0x7575[16]][_0x7575[137]]=5;mxText[_0x7575[16]][_0x7575[138]]=1;if(touchStyle){mxConstants[_0x7575[139]]=16;mxConstants[_0x7575[140]]=7;if(mxClient[_0x7575[141]]){mxVertexHandler[_0x7575[16]][_0x7575[142]]=4;mxEdgeHandler[_0x7575[16]][_0x7575[142]]=6;Graph[_0x7575[16]][_0x7575[142]]=14;Graph[_0x7575[16]][_0x7575[143]]=20;mxPanningHandler[_0x7575[16]][_0x7575[144]]=false;mxPanningHandler[_0x7575[16]][_0x7575[145]]=true;mxPanningHandler[_0x7575[16]][_0x7575[146]]=function(_0xf035xb){var _0xf035x19=_0xf035xb[_0x7575[129]]();return (this[_0x7575[145]]&&(this[_0x7575[147]]||_0xf035xb[_0x7575[32]]()==null))||(mxEvent[_0x7575[148]](_0xf035x19)&&mxEvent[_0x7575[149]](_0xf035x19))||(this[_0x7575[150]]&&mxEvent[_0x7575[151]](_0xf035x19))}};var _0xf035x1f=mxGraphHandler[_0x7575[16]][_0x7575[152]];mxGraphHandler[_0x7575[16]][_0x7575[152]]=function(_0xf035x18,_0xf035xb){_0xf035x1f[_0x7575[15]](this,arguments);if(this[_0x7575[46]][_0x7575[52]](_0xf035xb[_0x7575[125]]())&&this[_0x7575[46]][_0x7575[53]]()>1){this[_0x7575[153]]=false}};Graph[_0x7575[16]][_0x7575[154]]=function(_0xf035x1){this[_0x7575[155]]= new mxTooltipHandler(this);this[_0x7575[155]][_0x7575[156]](false);this[_0x7575[157]]= new mxSelectionCellsHandler(this);this[_0x7575[29]]= new mxPanningHandler(this);this[_0x7575[29]][_0x7575[158]]=false;this[_0x7575[11]]= new mxConnectionHandler(this);this[_0x7575[11]][_0x7575[156]](false);this[_0x7575[159]]= new mxGraphHandler(this)};mxConnectionHandler[_0x7575[16]][_0x7575[160]]=function(_0xf035xe,_0xf035x20){if(touchStyle&&_0xf035x20!=null){this[_0x7575[46]][_0x7575[161]](_0xf035x20)}else {this[_0x7575[46]][_0x7575[161]](_0xf035xe)}};var _0xf035x21=mxGraph[_0x7575[16]][_0x7575[162]];Graph[_0x7575[16]][_0x7575[162]]=function(_0xf035x19,_0xf035x6){if(_0xf035x6==null){var _0xf035x22=mxUtils[_0x7575[163]](this[_0x7575[25]],mxEvent[_0x7575[130]](_0xf035x19),mxEvent[_0x7575[131]](_0xf035x19));_0xf035x6=this[_0x7575[118]](_0xf035x22[_0x7575[164]],_0xf035x22[_0x7575[165]])};_0xf035x21[_0x7575[0]](this,_0xf035x19,_0xf035x6)};var _0xf035x23= new mxImage(IMAGE_PATH+_0x7575[166],16,16);mxVertexHandler[_0x7575[16]][_0x7575[167]]=_0xf035x23;mxEdgeHandler[_0x7575[16]][_0x7575[167]]=_0xf035x23;mxOutline[_0x7575[16]][_0x7575[168]]=_0xf035x23; new Image()[_0x7575[169]]=_0xf035x23[_0x7575[169]];var _0xf035x24=IMAGE_PATH+_0x7575[170];var _0xf035x25=mxVertexHandler[_0x7575[16]][_0x7575[171]];mxVertexHandler[_0x7575[16]][_0x7575[171]]=function(){_0xf035x25[_0x7575[15]](this,arguments);if(showConnectorImg&&this[_0x7575[46]][_0x7575[11]][_0x7575[111]]()&&this[_0x7575[46]][_0x7575[172]](this[_0x7575[119]][_0x7575[51]])&&!this[_0x7575[46]][_0x7575[84]](this[_0x7575[119]][_0x7575[51]])&&this[_0x7575[46]][_0x7575[53]]()==1){this[_0x7575[173]]=mxUtils[_0x7575[174]](_0xf035x24);this[_0x7575[173]][_0x7575[24]][_0x7575[23]]=_0x7575[26];this[_0x7575[173]][_0x7575[24]][_0x7575[175]]=_0x7575[176];this[_0x7575[173]][_0x7575[24]][_0x7575[177]]=_0x7575[176];this[_0x7575[173]][_0x7575[24]][_0x7575[178]]=_0x7575[179];if(!mxClient[_0x7575[141]]){this[_0x7575[173]][_0x7575[100]](_0x7575[180],mxResources[_0x7575[93]](_0x7575[17]));mxEvent[_0x7575[181]](this[_0x7575[173]],this[_0x7575[46]],this[_0x7575[119]])};this[_0x7575[173]][_0x7575[24]][_0x7575[182]]=_0x7575[183];mxEvent[_0x7575[185]](this[_0x7575[173]],mxUtils[_0x7575[27]](this,function(_0xf035x19){this[_0x7575[46]][_0x7575[29]][_0x7575[114]]();var _0xf035x22=mxUtils[_0x7575[163]](this[_0x7575[46]][_0x7575[25]],mxEvent[_0x7575[130]](_0xf035x19),mxEvent[_0x7575[131]](_0xf035x19));this[_0x7575[46]][_0x7575[11]][_0x7575[49]](this[_0x7575[119]],_0xf035x22[_0x7575[164]],_0xf035x22[_0x7575[165]]);this[_0x7575[46]][_0x7575[184]]=true;mxEvent[_0x7575[133]](_0xf035x19)}));this[_0x7575[46]][_0x7575[25]][_0x7575[186]](this[_0x7575[173]])};this[_0x7575[187]]()};var _0xf035x26=mxVertexHandler[_0x7575[16]][_0x7575[188]];mxVertexHandler[_0x7575[16]][_0x7575[188]]=function(){_0xf035x26[_0x7575[15]](this);this[_0x7575[187]]()};mxVertexHandler[_0x7575[16]][_0x7575[187]]=function(){if(this[_0x7575[119]]!=null&&this[_0x7575[173]]!=null){if(mxVertexHandler[_0x7575[16]][_0x7575[189]]){this[_0x7575[173]][_0x7575[24]][_0x7575[190]]=(this[_0x7575[119]][_0x7575[164]]+this[_0x7575[119]][_0x7575[175]]-this[_0x7575[173]][_0x7575[191]]/2)+_0x7575[192];this[_0x7575[173]][_0x7575[24]][_0x7575[193]]=(this[_0x7575[119]][_0x7575[165]]-this[_0x7575[173]][_0x7575[194]]/2)+_0x7575[192]}else {this[_0x7575[173]][_0x7575[24]][_0x7575[190]]=(this[_0x7575[119]][_0x7575[164]]+this[_0x7575[119]][_0x7575[175]]+mxConstants[_0x7575[139]]/2+4)+_0x7575[192];this[_0x7575[173]][_0x7575[24]][_0x7575[193]]=(this[_0x7575[119]][_0x7575[165]]+(this[_0x7575[119]][_0x7575[177]]-this[_0x7575[173]][_0x7575[194]])/2)+_0x7575[192]}}};var _0xf035x27=mxVertexHandler[_0x7575[16]][_0x7575[195]];mxVertexHandler[_0x7575[16]][_0x7575[195]]=function(_0xf035x18,_0xf035xb){_0xf035x27[_0x7575[15]](this,arguments);if(this[_0x7575[173]]!=null){this[_0x7575[173]][_0x7575[197]][_0x7575[196]](this[_0x7575[173]]);this[_0x7575[173]]=null}}; new Image()[_0x7575[169]]=_0xf035x24}else {var _0xf035x28= new mxImage(IMAGE_PATH+_0x7575[198],15,15);mxConnectionHandler[_0x7575[16]][_0x7575[199]]=_0xf035x28; new Image()[_0x7575[169]]=_0xf035x28[_0x7575[169]];if(urlParams[_0x7575[17]]==_0x7575[18]){var _0xf035x28= new mxImage(IMAGE_PATH+_0x7575[198],15,15);var _0xf035x25=mxVertexHandler[_0x7575[16]][_0x7575[171]];mxVertexHandler[_0x7575[16]][_0x7575[171]]=function(){_0xf035x25[_0x7575[15]](this,arguments);if(showConnectorImg&&this[_0x7575[46]][_0x7575[11]][_0x7575[111]]()&&this[_0x7575[46]][_0x7575[172]](this[_0x7575[119]][_0x7575[51]])&&!this[_0x7575[46]][_0x7575[84]](this[_0x7575[119]][_0x7575[51]])&&this[_0x7575[46]][_0x7575[53]]()==1){if(mxClient[_0x7575[200]]&&!mxClient[_0x7575[201]]){this[_0x7575[173]]=document[_0x7575[104]](_0x7575[202]);this[_0x7575[173]][_0x7575[24]][_0x7575[203]]=_0x7575[204]+_0xf035x28[_0x7575[169]]+_0x7575[205];this[_0x7575[173]][_0x7575[24]][_0x7575[206]]=_0x7575[207];this[_0x7575[173]][_0x7575[24]][_0x7575[208]]=_0x7575[209];this[_0x7575[173]][_0x7575[24]][_0x7575[175]]=(_0xf035x28[_0x7575[175]]+4)+_0x7575[192];this[_0x7575[173]][_0x7575[24]][_0x7575[177]]=(_0xf035x28[_0x7575[177]]+4)+_0x7575[192];this[_0x7575[173]][_0x7575[24]][_0x7575[210]]=(mxClient[_0x7575[211]])?_0x7575[212]:_0x7575[213]}else {this[_0x7575[173]]=mxUtils[_0x7575[174]](_0xf035x28[_0x7575[169]]);this[_0x7575[173]][_0x7575[24]][_0x7575[175]]=_0xf035x28[_0x7575[175]]+_0x7575[192];this[_0x7575[173]][_0x7575[24]][_0x7575[177]]=_0xf035x28[_0x7575[177]]+_0x7575[192]};this[_0x7575[173]][_0x7575[24]][_0x7575[23]]=_0x7575[26];this[_0x7575[173]][_0x7575[24]][_0x7575[178]]=_0x7575[179];this[_0x7575[173]][_0x7575[100]](_0x7575[180],mxResources[_0x7575[93]](_0x7575[17]));mxEvent[_0x7575[181]](this[_0x7575[173]],this[_0x7575[46]],this[_0x7575[119]]);this[_0x7575[173]][_0x7575[24]][_0x7575[182]]=_0x7575[183];mxEvent[_0x7575[28]](this[_0x7575[173]],_0x7575[214],mxUtils[_0x7575[27]](this,function(_0xf035x19){this[_0x7575[46]][_0x7575[29]][_0x7575[114]]();var _0xf035x22=mxUtils[_0x7575[163]](this[_0x7575[46]][_0x7575[25]],mxEvent[_0x7575[130]](_0xf035x19),mxEvent[_0x7575[131]](_0xf035x19));this[_0x7575[46]][_0x7575[11]][_0x7575[49]](this[_0x7575[119]],_0xf035x22[_0x7575[164]],_0xf035x22[_0x7575[165]]);this[_0x7575[46]][_0x7575[184]]=true;mxEvent[_0x7575[133]](_0xf035x19)}));this[_0x7575[46]][_0x7575[25]][_0x7575[186]](this[_0x7575[173]])};this[_0x7575[187]]()};var _0xf035x26=mxVertexHandler[_0x7575[16]][_0x7575[188]];mxVertexHandler[_0x7575[16]][_0x7575[188]]=function(){_0xf035x26[_0x7575[15]](this);this[_0x7575[187]]()};mxVertexHandler[_0x7575[16]][_0x7575[187]]=function(){if(this[_0x7575[119]]!=null&&this[_0x7575[173]]!=null){if(mxVertexHandler[_0x7575[16]][_0x7575[189]]){this[_0x7575[173]][_0x7575[24]][_0x7575[190]]=(this[_0x7575[119]][_0x7575[164]]+this[_0x7575[119]][_0x7575[175]]-this[_0x7575[173]][_0x7575[191]]/2)+_0x7575[192];this[_0x7575[173]][_0x7575[24]][_0x7575[193]]=(this[_0x7575[119]][_0x7575[165]]-this[_0x7575[173]][_0x7575[194]]/2)+_0x7575[192]}else {this[_0x7575[173]][_0x7575[24]][_0x7575[190]]=(this[_0x7575[119]][_0x7575[164]]+this[_0x7575[119]][_0x7575[175]]+mxConstants[_0x7575[139]]/2+2)+_0x7575[192];this[_0x7575[173]][_0x7575[24]][_0x7575[193]]=(this[_0x7575[119]][_0x7575[165]]+(this[_0x7575[119]][_0x7575[177]]-this[_0x7575[173]][_0x7575[194]])/2)+_0x7575[192]}}};var _0xf035x27=mxVertexHandler[_0x7575[16]][_0x7575[195]];mxVertexHandler[_0x7575[16]][_0x7575[195]]=function(_0xf035x18,_0xf035xb){_0xf035x27[_0x7575[15]](this,arguments);if(this[_0x7575[173]]!=null){this[_0x7575[173]][_0x7575[197]][_0x7575[196]](this[_0x7575[173]]);this[_0x7575[173]]=null}}}}})()
\ No newline at end of file
+/**
+ * $Id: Graph.js,v 1.14 2013-02-16 10:19:54 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph instance. Note that the constructor does not take a
+ * container because the graph instance is needed for creating the UI, which
+ * in turn will create the container for the graph. Hence, the container is
+ * assigned later in EditorUi.
+ */
+Graph = function(container, model, renderHint, stylesheet)
+{
+       mxGraph.call(this, container, model, renderHint, stylesheet);
+       
+       this.setConnectable(true);
+       this.setDropEnabled(false);
+       this.setPanning(true);
+       this.setTooltips(!mxClient.IS_TOUCH);
+       this.setAllowLoops(false);
+       this.setMultigraph(false);
+       this.allowAutoPanning = true;
+       this.resetEdgesOnConnect = false;
+       this.constrainChildren = false;
+       
+       // Centers the port icon on the target port
+    this.connectionHandler.targetConnectImage = true;
+
+    // Does not allow dangling edges
+    this.setAllowDanglingEdges(false);
+
+       // Enables cloning of connection sources
+       this.connectionHandler.setCreateTarget(false);
+       
+       // Disables built-in connection starts
+       this.connectionHandler.isValidSource = function()
+       {
+               return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2';
+       };
+
+       // Sets the style to be used when an elbow edge is double clicked
+       this.alternateEdgeStyle = 'vertical';
+
+       if (stylesheet == null)
+       {
+               this.loadStylesheet();
+       }
+       
+       // Creates rubberband selection
+    var rubberband = new mxRubberband(this);
+    
+    this.getRubberband = function()
+    {
+       return rubberband;
+    };
+    
+    // Shows hand cursor while panning
+       this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()
+       {
+               this.container.style.cursor = 'pointer';
+       }));
+                       
+       this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()
+       {
+               this.container.style.cursor = 'default';
+       }));
+
+    // Adds support for HTML labels via style. Note: Currently, only the Java
+    // backend supports HTML labels but CSS support is limited to the following:
+    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+       this.isHtmlLabel = function(cell)
+       {
+               var state = this.view.getState(cell);
+               var style = (state != null) ? state.style : this.getCellStyle(cell);
+               
+               return style['html'] == '1' || style['whiteSpace'] == 'wrap';
+       };
+       
+       // HTML entities are displayed as plain text in wrapped plain text labels
+       this.cellRenderer.getLabelValue = function(state)
+       {
+               var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+               
+               if (state.style['whiteSpace'] == 'wrap' && state.style['html'] != 1)
+               {
+                       result = mxUtils.htmlEntities(result, false);
+               }
+               
+               return result;
+       };
+       
+       // Unlocks all cells
+       this.isCellLocked = function(cell)
+       {
+               return false;
+       };
+
+       // Tap and hold brings up context menu.
+       // Tolerance slightly below graph tolerance is better.
+       this.connectionHandler.tapAndHoldTolerance = 16;
+       
+       //  Tap and hold on background starts rubberband on cell starts connecting
+       var connectionHandlerTapAndHold = this.connectionHandler.tapAndHold;
+       this.connectionHandler.tapAndHold = function(me, state)
+       {
+               if (state == null)
+               {
+                       if (!this.graph.panningHandler.active)
+                       {
+                               rubberband.start(me.getGraphX(), me.getGraphY());
+                               this.graph.panningHandler.panningTrigger = false;
+                       }
+               }
+               else if (tapAndHoldStartsConnection)
+               {
+                       connectionHandlerTapAndHold.apply(this, arguments);     
+               }
+               else if (this.graph.isCellSelected(state.cell) && this.graph.getSelectionCount() > 1)
+               {
+                       this.graph.removeSelectionCell(state.cell);
+               }
+       };
+
+       if (touchStyle)
+       {
+               this.initTouch();
+       }
+};
+
+// Graph inherits from mxGraph
+mxUtils.extend(Graph, mxGraph);
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.minFitScale = null;
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.maxFitScale = null;
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+Graph.prototype.loadStylesheet = function()
+{
+    var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
+       var dec = new mxCodec(node.ownerDocument);
+       dec.decode(node, this.getStylesheet());
+};
+
+/**
+ * Inverts the elbow edge style without removing existing styles.
+ */
+Graph.prototype.flipEdge = function(edge)
+{
+       if (edge != null)
+       {
+               var state = this.view.getState(edge);
+               var style = (state != null) ? state.style : this.getCellStyle(edge);
+               
+               if (style != null)
+               {
+                       var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
+                               mxConstants.ELBOW_HORIZONTAL);
+                       var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
+                               mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
+                       this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
+               }
+       }
+};
+
+/**
+ * Sets the default edge for future connections.
+ */
+Graph.prototype.setDefaultEdge = function(cell)
+{
+       if (cell != null && this.getModel().isEdge(cell))
+       {
+               // Take a snapshot of the cell at the moment of calling
+               var proto = this.getModel().cloneCells([cell])[0];
+               
+               // Delete existing points
+               if (proto.geometry != null)
+               {
+                       proto.geometry.points = null;
+               }
+               
+               // Delete entry-/exitXY styles
+               var style = proto.getStyle();
+               style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
+               style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
+               style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
+               style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
+               proto.setStyle(style);
+               
+               // Uses edge template for connect preview
+               this.connectionHandler.createEdgeState = function(me)
+               {
+               return this.graph.view.createState(proto);
+           };
+
+           // Creates new connections from edge template
+           this.connectionHandler.factoryMethod = function()
+           {
+               return this.graph.cloneCells([proto])[0];
+           };
+       }
+};
+
+/**
+ * Disables folding for non-swimlanes.
+ */
+Graph.prototype.isCellFoldable = function(cell)
+{
+       return this.foldingEnabled && this.isSwimlane(cell);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidRoot = function(cell)
+{
+       return this.isSwimlane(cell);
+};
+
+/**
+ * Overrides createGroupCell to set the group style for new groups to 'group'.
+ */
+Graph.prototype.createGroupCell = function()
+{
+       var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
+       group.setStyle('group');
+       
+       return group;
+};
+
+/**
+ * Giuseppe Careri
+ * Overrides tooltips to show position and size
+ */
+Graph.prototype.getTooltipForCell = function(cell)
+{
+       var tip = '';
+       
+       if (this.getModel().isVertex(cell))
+       {
+               // var geo = this.getCellGeometry(cell);
+               
+               // var f2 = function(x)
+               // {
+               //      return Math.round(parseFloat(x) * 100) / 100;
+               // };
+               
+               // if (geo != null)
+               // {
+               //      if (tip == null)
+               //      {
+               //              tip = '';
+               //      }
+               //      else if (tip.length > 0)
+               //      {
+               //              tip += '\n';
+               //      }
+                       
+               //      tip += 'X: ' + f2(geo.x) + '\nY: ' + f2(geo.y) + '\nW: ' + f2(geo.width) + '\nH: ' + f2(geo.height);
+               // }
+               
+               tip += mxResources.get('description_' + cell.value.nodeName);
+       }
+       else if (this.getModel().isEdge(cell))
+       {
+               tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
+       }
+       
+       return tip;
+};
+
+/**
+ * Giuseppe Careri
+ * Returns the label for the given cell.
+ */
+Graph.prototype.convertValueToString = function(cell)
+{
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               return cell.value.getAttribute('label');
+       }
+       
+       return mxGraph.prototype.convertValueToString.apply(this, arguments);
+};
+
+/**
+ * Giuseppe Careri
+ * Handles label changes for XML user objects.
+ */
+Graph.prototype.cellLabelChanged = function(cell, value, autoSize)
+{
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               var tmp = cell.value.cloneNode(true);
+               tmp.setAttribute('label', value);
+               value = tmp;
+       }
+       
+       mxGraph.prototype.cellLabelChanged.apply(this, arguments);
+};
+
+/**
+ * Sets the link for the given cell.
+ */
+Graph.prototype.setLinkForCell = function(cell, link)
+{
+       var value = null;
+       
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               value = cell.value.cloneNode(true);
+       }
+       else
+       {
+               var doc = mxUtils.createXmlDocument();
+               
+               value = doc.createElement('UserObject');
+               value.setAttribute('label', cell.value);
+       }
+       
+       if (link != null && link.length > 0)
+       {
+               value.setAttribute('link', link);
+       }
+       else
+       {
+               value.removeAttribute('link');
+       }
+       
+       this.model.setValue(cell, value);
+};
+
+/**
+ * Returns the link for the given cell.
+ */
+Graph.prototype.getLinkForCell = function(cell)
+{
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               return cell.value.getAttribute('link');
+       }
+       
+       return null;
+};
+
+/**
+ * Customized graph for touch devices.
+ */
+Graph.prototype.initTouch = function()
+{
+       // Disables new connections via "hotspot"
+       this.connectionHandler.marker.isEnabled = function()
+       {
+               return this.graph.connectionHandler.first != null;
+       };
+
+       // Hides menu when editing starts
+       this.addListener(mxEvent.START_EDITING, function(sender, evt)
+       {
+               this.panningHandler.hideMenu();
+       });
+
+       // Context menu for touchstyle
+       var showMenu = false;
+       var menuCell = null;
+
+       // Checks if native hit detection did not return anything and does custom
+       // hit detection for edges to take into account the tolerance
+       this.updateMouseEvent = function(me)
+       {
+               mxGraph.prototype.updateMouseEvent.apply(this, arguments);
+
+               if (me.getState() == null)
+               {
+                       var cell = this.getCellAt(me.graphX, me.graphY);
+                       
+                       if (this.getModel().isEdge(cell))
+                       {
+                               me.state = this.view.getState(cell);
+                               
+                               if (me.state != null && me.state.shape != null)
+                               {
+                                       this.container.style.cursor = me.state.shape.node.style.cursor;
+                               }
+                       }
+               }
+               
+               if (me.getState() == null)
+               {
+                       this.container.style.cursor = 'default';
+               }
+       };
+       
+       // Handles popup menu on touch devices (tap selected cell)
+       this.fireMouseEvent = function(evtName, me, sender)
+       {
+               if (evtName == mxEvent.MOUSE_DOWN)
+               {
+                       if (!this.panningHandler.isMenuShowing())
+                       {
+                               menuCell = me.getCell();
+                               showMenu = (menuCell != null) ? this.isCellSelected(menuCell) : this.isSelectionEmpty();
+                       }
+                       else
+                       {
+                               showMenu = false;
+                               menuCell = null;
+                       }
+               }
+               else if (evtName == mxEvent.MOUSE_UP)
+               {
+                       if (showMenu && !this.isEditing())
+                       {
+                               if (!this.panningHandler.isMenuShowing())
+                               {
+                                       var x = mxEvent.getClientX(me.getEvent());
+                                       var y = mxEvent.getClientY(me.getEvent());
+                                       
+                                       this.panningHandler.popup(x + 16, y, menuCell, me.getEvent());
+                               }
+                               
+                               showMenu = false;
+                               menuCell = null;
+                               me.consume();
+                               
+                               return;
+                       }
+                       
+                       showMenu = false;
+                       menuCell = null;
+               }
+
+               mxGraph.prototype.fireMouseEvent.apply(this, arguments);
+
+               if (evtName == mxEvent.MOUSE_MOVE && me.isConsumed())
+               {
+                       showMenu = false;
+                       menuCell = null;
+               }
+       };
+};
+
+/**
+ * Implements touch devices.
+ */
+(function()
+{
+       // Enables rotation handle
+       mxVertexHandler.prototype.rotationEnabled = true;
+       
+       // Matches label positions of mxGraph 1.x
+       mxText.prototype.baseSpacingTop = 5;
+       mxText.prototype.baseSpacingBottom = 1;
+
+       // Touch-specific static overrides
+       if (touchStyle)
+       {
+               // Sets constants for touch style
+               mxConstants.HANDLE_SIZE = 16;
+               mxConstants.LABEL_HANDLE_SIZE = 7;
+               
+               // Larger tolerance and grid for real touch devices
+               if (mxClient.IS_TOUCH)
+               {
+                       mxVertexHandler.prototype.tolerance = 4;
+                       mxEdgeHandler.prototype.tolerance = 6;
+                       Graph.prototype.tolerance = 14;
+                       Graph.prototype.gridSize = 20;
+                       
+                       // One finger pans (no rubberband selection) must start regardless of mouse button
+                       mxPanningHandler.prototype.selectOnPopup = false;
+                       mxPanningHandler.prototype.useLeftButtonForPanning = true;
+                       mxPanningHandler.prototype.isPanningTrigger = function(me)
+                       {
+                               var evt = me.getEvent();
+                               
+                               return (this.useLeftButtonForPanning && (this.ignoreCell || me.getState() == null)/* &&
+                                               mxEvent.isLeftMouseButton(evt)*/) || (mxEvent.isControlDown(evt) &&
+                                               mxEvent.isShiftDown(evt)) || (this.usePopupTrigger &&
+                                               mxEvent.isPopupTrigger(evt));
+                       };
+               }
+               
+               // Don't clear selection if multiple cells selected
+               var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
+               mxGraphHandler.prototype.mouseDown = function(sender, me)
+               {
+                       graphHandlerMouseDown.apply(this, arguments);
+
+                       if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1)
+                       {
+                               this.delayedSelection = false;
+                       }
+               };
+
+               // Changes order of panninghandler
+               Graph.prototype.createHandlers = function(container)
+               {
+                       this.tooltipHandler = new mxTooltipHandler(this);
+                       this.tooltipHandler.setEnabled(false);
+                       // Selection cells first
+                       this.selectionCellsHandler = new mxSelectionCellsHandler(this);
+                       this.panningHandler = new mxPanningHandler(this);
+                       this.panningHandler.panningEnabled = false;
+                       this.connectionHandler = new mxConnectionHandler(this);
+                       this.connectionHandler.setEnabled(false);
+                       this.graphHandler = new mxGraphHandler(this);
+               };
+
+               // On connect the target is selected and we clone the cell of the preview edge for insert
+               mxConnectionHandler.prototype.selectCells = function(edge, target)
+               {
+                       if (touchStyle && target != null)
+                       {
+                               this.graph.setSelectionCell(target);
+                       }
+                       else
+                       {
+                               this.graph.setSelectionCell(edge);
+                       }
+               };
+
+               // Overrides double click handling to use the tolerance
+               // FIXME: Double click on edges in iPad needs focus on textarea
+               var graphDblClick = mxGraph.prototype.dblClick;
+               Graph.prototype.dblClick = function(evt, cell)
+               {
+                       if (cell == null)
+                       {
+                               var pt = mxUtils.convertPoint(this.container,
+                                       mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                               cell = this.getCellAt(pt.x, pt.y);
+                       }
+
+                       graphDblClick.call(this, evt, cell);
+               };
+
+               // Rounded edge and vertex handles
+               var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+               mxVertexHandler.prototype.handleImage = touchHandle;
+               mxEdgeHandler.prototype.handleImage = touchHandle;
+               mxOutline.prototype.sizerImage = touchHandle;
+               
+               // Pre-fetches touch handle
+               new Image().src = touchHandle.src;
+
+               // Adds connect icon to selected vertices
+               var connectorSrc = IMAGE_PATH + '/touch-connector.png';
+               
+               var vertexHandlerInit = mxVertexHandler.prototype.init;
+               mxVertexHandler.prototype.init = function()
+               {
+                       vertexHandlerInit.apply(this, arguments);
+
+                       // Only show connector image on one cell and do not show on containers
+                       if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+                               this.graph.isCellConnectable(this.state.cell) &&
+                               !this.graph.isValidRoot(this.state.cell) &&
+                               this.graph.getSelectionCount() == 1)
+                       {
+                               this.connectorImg = mxUtils.createImage(connectorSrc);
+                               this.connectorImg.style.cursor = 'pointer';
+                               this.connectorImg.style.width = '29px';
+                               this.connectorImg.style.height = '29px';
+                               this.connectorImg.style.position = 'absolute';
+                               
+                               if (!mxClient.IS_TOUCH)
+                               {
+                                       this.connectorImg.setAttribute('title', mxResources.get('connect'));
+                                       mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+                               }
+
+                               // Adds 2px tolerance
+                               this.connectorImg.style.padding = '2px';
+                               
+                               // Starts connecting on touch/mouse down
+                               mxEvent.addGestureListeners(this.connectorImg,
+                                       mxUtils.bind(this, function(evt)
+                                       {
+                                               this.graph.panningHandler.hideMenu();
+                                               var pt = mxUtils.convertPoint(this.graph.container,
+                                                               mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                                               this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+                                               this.graph.isMouseDown = true;
+                                               mxEvent.consume(evt);
+                                       })
+                               );
+
+                               this.graph.container.appendChild(this.connectorImg);
+                       }
+
+                       this.redrawTools();
+               };
+               
+               var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
+               mxVertexHandler.prototype.redraw = function()
+               {
+                       vertexHandlerRedraw.apply(this);
+                       this.redrawTools();
+               };
+               
+               mxVertexHandler.prototype.redrawTools = function()
+               {
+                       if (this.state != null && this.connectorImg != null)
+                       {
+                               // Top right for single-sizer
+                               if (mxVertexHandler.prototype.singleSizer)
+                               {
+                                       this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
+                                       this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
+                               }
+                               else
+                               {
+                                       this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 4/* - 2 padding*/) + 'px';
+                                       this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
+                               }
+                       }
+               };
+               
+               var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+               mxVertexHandler.prototype.destroy = function(sender, me)
+               {
+                       vertexHandlerDestroy.apply(this, arguments);
+
+                       if (this.connectorImg != null)
+                       {
+                               this.connectorImg.parentNode.removeChild(this.connectorImg);
+                               this.connectorImg = null;
+                       }
+               };
+               
+               // Pre-fetches touch connector
+               new Image().src = connectorSrc;
+       }
+       else
+       {
+               var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+               mxConnectionHandler.prototype.connectImage = img;
+
+               // Pre-fetches img
+               new Image().src = img.src;
+               
+               if (urlParams['connect'] == '2') // not touchStyle
+               {
+                       var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+                                       
+                       var vertexHandlerInit = mxVertexHandler.prototype.init;
+                       mxVertexHandler.prototype.init = function()
+                       {
+                               vertexHandlerInit.apply(this, arguments);
+       
+                               // Only show connector image on one cell and do not show on containers
+                               if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+                                       this.graph.isCellConnectable(this.state.cell) &&
+                                       !this.graph.isValidRoot(this.state.cell) &&
+                                       this.graph.getSelectionCount() == 1)
+                               {
+                                       // Workaround for event redirection via image tag in quirks and IE8
+                                       if (mxClient.IS_IE && !mxClient.IS_SVG)
+                                       {
+                                               this.connectorImg = document.createElement('div');
+                                               this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
+                                               this.connectorImg.style.backgroundPosition = 'center';
+                                               this.connectorImg.style.backgroundRepeat = 'no-repeat';
+                                               this.connectorImg.style.width = (img.width + 4) + 'px';
+                                               this.connectorImg.style.height = (img.height + 4) + 'px';
+                                               this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+                                       }
+                                       else
+                                       {
+                                               this.connectorImg = mxUtils.createImage(img.src);
+                                               this.connectorImg.style.width = img.width + 'px';
+                                               this.connectorImg.style.height = img.height + 'px';
+                                       }
+                                       
+                                       this.connectorImg.style.cursor = 'pointer';
+                                       this.connectorImg.style.position = 'absolute';
+                                       this.connectorImg.setAttribute('title', mxResources.get('connect'));
+                                       mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+                                       
+                                       // Adds 2px tolerance
+                                       this.connectorImg.style.padding = '2px';
+                                       
+                                       // Starts connecting on touch/mouse down
+                                       mxEvent.addListener(this.connectorImg, 'mousedown',
+                                               mxUtils.bind(this, function(evt)
+                                               {
+                                                       this.graph.panningHandler.hideMenu();
+                                                       var pt = mxUtils.convertPoint(this.graph.container,
+                                                                       mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                                                       this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+                                                       this.graph.isMouseDown = true;
+                                                       mxEvent.consume(evt);
+                                               })
+                                       );
+       
+                                       this.graph.container.appendChild(this.connectorImg);
+                               }
+       
+                               this.redrawTools();
+                       };
+                       
+                       var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
+                       mxVertexHandler.prototype.redraw = function()
+                       {
+                               vertexHandlerRedraw.apply(this);
+                               this.redrawTools();
+                       };
+                       
+                       mxVertexHandler.prototype.redrawTools = function()
+                       {
+                               if (this.state != null && this.connectorImg != null)
+                               {
+                                       // Top right for single-sizer
+                                       if (mxVertexHandler.prototype.singleSizer)
+                                       {
+                                               this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
+                                               this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
+                                       }
+                                       else
+                                       {
+                                               this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 2/* - 2 padding*/) + 'px';
+                                               this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
+                                       }
+                               }
+                       };
+                       
+                       var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+                       mxVertexHandler.prototype.destroy = function(sender, me)
+                       {
+                               vertexHandlerDestroy.apply(this, arguments);
+       
+                               if (this.connectorImg != null)
+                               {
+                                       this.connectorImg.parentNode.removeChild(this.connectorImg);
+                                       this.connectorImg = null;
+                               }
+                       };
+               }
+       }
+})();
index 51cb9f2..7d33b9e 100644 (file)
@@ -1 +1,716 @@
-var _0x3069=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x6D\x65\x6E\x75\x73","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x56\x65\x72\x64\x61\x6E\x61","\x54\x69\x6D\x65\x73\x20\x4E\x65\x77\x20\x52\x6F\x6D\x61\x6E","\x47\x61\x72\x61\x6D\x6F\x6E\x64","\x43\x6F\x6D\x69\x63\x20\x53\x61\x6E\x73\x20\x4D\x53","\x43\x6F\x75\x72\x69\x65\x72\x20\x4E\x65\x77","\x47\x65\x6F\x72\x67\x69\x61","\x4C\x75\x63\x69\x64\x61\x20\x43\x6F\x6E\x73\x6F\x6C\x65","\x54\x61\x68\x6F\x6D\x61","\x6C\x65\x6E\x67\x74\x68","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x73\x74\x79\x6C\x65\x43\x68\x61\x6E\x67\x65","\x73\x74\x79\x6C\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74","","\x70\x72\x6F\x6D\x70\x74\x43\x68\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x70\x75\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x28\x70\x74\x29","\x31\x32","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x70\x78","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x28\x70\x78\x29","\x31","\x6C\x69\x6E\x65","\x73\x74\x72\x61\x69\x67\x68\x74","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6D\x61\x6E\x75\x61\x6C","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x6D\x61\x74\x69\x63","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x63\x6C\x61\x73\x73\x69\x63","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x6F\x70\x65\x6E\x41\x72\x72\x6F\x77","\x41\x52\x52\x4F\x57\x5F\x4F\x50\x45\x4E","\x62\x6C\x6F\x63\x6B","\x41\x52\x52\x4F\x57\x5F\x42\x4C\x4F\x43\x4B","\x6F\x76\x61\x6C","\x41\x52\x52\x4F\x57\x5F\x4F\x56\x41\x4C","\x64\x69\x61\x6D\x6F\x6E\x64","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44\x5F\x54\x48\x49\x4E","\x6E\x6F\x6E\x65","\x4E\x4F\x4E\x45","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x65\x6E\x64\x46\x69\x6C\x6C","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x61\x64\x64\x49\x74\x65\x6D","\x73\x69\x7A\x65","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x73\x70\x61\x63\x69\x6E\x67","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x68\x61\x64\x6F\x77","\x61\x63\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x74\x6F\x70","\x30","\x72\x69\x67\x68\x74","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x67\x6C\x6F\x62\x61\x6C","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x74\x65\x78\x74","\x61\x64\x64\x53\x75\x62\x6D\x65\x6E\x75","\x2D","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D\x73","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x77\x6F\x72\x64\x57\x72\x61\x70","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x28\x25\x29","\x31\x30\x30","\x68\x69\x64\x65","\x6C\x65\x66\x74\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x63\x65\x6E\x74\x65\x72","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x72\x69\x67\x68\x74\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x74\x6F\x70\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x6D\x69\x64\x64\x6C\x65","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x62\x6F\x74\x74\x6F\x6D\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x74\x69\x6C\x74","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x6C\x69\x67\x6E","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x46\x6C\x6F\x77","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x61\x72\x72\x61\x6E\x67\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x76\x69\x65\x77","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x25","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x66\x69\x74\x50\x61\x67\x65","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x66\x69\x6C\x65","\x6E\x65\x77","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x41\x73","\x70\x75\x62\x6C\x69\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x65\x64\x69\x74\x46\x69\x6C\x65","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x65\x64\x69\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x75\x74","\x63\x6F\x70\x79","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x68\x65\x6C\x70","\x61\x62\x6F\x75\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x65\x78\x65\x63\x75\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x20","\x70\x72\x6F\x6D\x70\x74","\x6C\x61\x62\x65\x6C","\x66\x75\x6E\x63\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x6D\x61\x72\x6B","\x61\x64\x64\x53\x68\x6F\x72\x74\x63\x75\x74","\x73\x68\x6F\x72\x74\x63\x75\x74","\x73\x70\x61\x6E","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x79","\x77\x72\x69\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x32\x70\x78\x20\x35\x30\x25","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x69\x73\x45\x64\x67\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x62\x65\x6E\x64\x73","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x69\x76","\x20\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x4D\x65\x6E\x75","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x61\x70\x70\x6C\x79","\x64\x65\x73\x74\x72\x6F\x79","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6C\x69\x63\x6B","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74"];Menus=function(_0xa68ax1){this[_0x3069[0]]=_0xa68ax1;this[_0x3069[1]]= new Object();this[_0x3069[2]](); new Image()[_0x3069[3]]=IMAGE_PATH+_0x3069[4]};Menus[_0x3069[5]][_0x3069[2]]=function(){var _0xa68ax2=this[_0x3069[0]][_0x3069[7]][_0x3069[6]];this[_0x3069[30]](_0x3069[8], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){var _0xa68ax5=[_0x3069[9],_0x3069[10],_0x3069[11],_0x3069[12],_0x3069[13],_0x3069[14],_0x3069[15],_0x3069[16],_0x3069[17]];for(var _0xa68ax6=0;_0xa68ax6<_0xa68ax5[_0x3069[18]];_0xa68ax6++){var _0xa68ax7=this[_0x3069[20]](_0xa68ax3,_0xa68ax5[_0xa68ax6],[mxConstants[_0x3069[19]]],[_0xa68ax5[_0xa68ax6]],null,_0xa68ax4);_0xa68ax7[_0x3069[23]][_0x3069[22]][_0x3069[21]][_0x3069[8]]=_0xa68ax5[_0xa68ax6]};_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[25]),_0x3069[27],mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,_0xa68ax4)})));this[_0x3069[30]](_0x3069[31], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){var _0xa68ax8=[6,8,9,10,11,12,14,18,24,36,48,72];for(var _0xa68ax6=0;_0xa68ax6<_0xa68ax8[_0x3069[18]];_0xa68ax6++){this[_0x3069[20]](_0xa68ax3,_0xa68ax8[_0xa68ax6],[mxConstants[_0x3069[32]]],[_0xa68ax8[_0xa68ax6]],null,_0xa68ax4)};_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[25]),_0x3069[33],_0x3069[34],mxConstants.STYLE_FONTSIZE,_0xa68ax4)})));this[_0x3069[30]](_0x3069[35], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){var _0xa68ax8=[1,2,3,4,8,12,16,24];for(var _0xa68ax6=0;_0xa68ax6<_0xa68ax8[_0x3069[18]];_0xa68ax6++){this[_0x3069[20]](_0xa68ax3,_0xa68ax8[_0xa68ax6]+_0x3069[36],[mxConstants[_0x3069[37]]],[_0xa68ax8[_0xa68ax6]],null,_0xa68ax4)};_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[25]),_0x3069[38],_0x3069[39],mxConstants.STYLE_STROKEWIDTH,_0xa68ax4)})));this[_0x3069[30]](_0x3069[40], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[41]),[mxConstants[_0x3069[42]]],[null],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[43]),[mxConstants[_0x3069[42]]],[_0x3069[44]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[45]),[mxConstants[_0x3069[42]],mxConstants[_0x3069[46]]],[_0x3069[47],_0x3069[45]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[48]),[mxConstants[_0x3069[42]],mxConstants[_0x3069[46]]],[_0x3069[47],_0x3069[48]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[49]),[mxConstants[_0x3069[42]]],[_0x3069[50]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[51]),[mxConstants[_0x3069[42]]],[_0x3069[52]],null,_0xa68ax4)})));this[_0x3069[30]](_0x3069[53], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[54]),[mxConstants[_0x3069[55]]],[mxConstants[_0x3069[56]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[57]),[mxConstants[_0x3069[55]]],[mxConstants[_0x3069[58]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[59]),[mxConstants[_0x3069[55]]],[mxConstants[_0x3069[60]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[61]),[mxConstants[_0x3069[55]]],[mxConstants[_0x3069[62]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[63]),[mxConstants[_0x3069[55]]],[mxConstants[_0x3069[64]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[65]),[mxConstants[_0x3069[55]]],[mxConstants[_0x3069[66]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[67]),[mxConstants[_0x3069[55]]],[mxConstants[_0x3069[68]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[69]),null,function(){_0xa68ax2[_0x3069[71]](_0x3069[70],true)},_0xa68ax4,null,true);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[73]),_0x3069[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,_0xa68ax4)})));this[_0x3069[30]](_0x3069[74], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[54]),[mxConstants[_0x3069[75]]],[mxConstants[_0x3069[56]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[57]),[mxConstants[_0x3069[75]]],[mxConstants[_0x3069[58]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[59]),[mxConstants[_0x3069[75]]],[mxConstants[_0x3069[60]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[61]),[mxConstants[_0x3069[75]]],[mxConstants[_0x3069[62]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[63]),[mxConstants[_0x3069[75]]],[mxConstants[_0x3069[64]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[65]),[mxConstants[_0x3069[75]]],[mxConstants[_0x3069[66]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[67]),[mxConstants[_0x3069[75]]],[mxConstants[_0x3069[68]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[69]),null,function(){_0xa68ax2[_0x3069[71]](_0x3069[76],true)},_0xa68ax4,null,true);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[73]),_0x3069[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,_0xa68ax4)})));this[_0x3069[30]](_0x3069[77], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){var _0xa68ax9=this[_0x3069[0]][_0x3069[80]][_0x3069[26]](_0x3069[79])[_0x3069[78]];var _0xa68axa=this[_0x3069[26]](_0x3069[40])[_0x3069[78]];if(_0xa68ax9||_0xa68ax3[_0x3069[81]]){this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[82]),_0x3069[38],_0x3069[83],mxConstants.STYLE_SPACING_TOP,_0xa68ax4,_0xa68ax9);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[84]),_0x3069[38],_0x3069[83],mxConstants.STYLE_SPACING_RIGHT,_0xa68ax4,_0xa68ax9);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[85]),_0x3069[38],_0x3069[83],mxConstants.STYLE_SPACING_BOTTOM,_0xa68ax4,_0xa68ax9);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[86]),_0x3069[38],_0x3069[83],mxConstants.STYLE_SPACING_LEFT,_0xa68ax4,_0xa68ax9);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[87]),_0x3069[38],_0x3069[83],mxConstants.STYLE_SPACING,_0xa68ax4,_0xa68ax9);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[88]),_0x3069[38],_0x3069[83],mxConstants.STYLE_PERIMETER_SPACING,_0xa68ax4,_0xa68ax9)};if(_0xa68axa||_0xa68ax3[_0x3069[81]]){_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[89]),_0x3069[38],_0x3069[83],mxConstants.STYLE_SOURCE_PERIMETER_SPACING,_0xa68ax4,_0xa68axa);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[90]),_0x3069[38],_0x3069[83],mxConstants.STYLE_TARGET_PERIMETER_SPACING,_0xa68ax4,_0xa68axa)}})));this[_0x3069[30]](_0x3069[91], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[92]](_0xa68ax3,_0x3069[21],_0xa68ax4)})));this[_0x3069[30]](_0x3069[93], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){var _0xa68axb=this[_0x3069[26]](_0x3069[93])[_0x3069[78]];_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[94]](_0x3069[8],_0xa68ax3,_0xa68ax4);this[_0x3069[94]](_0x3069[31],_0xa68ax3,_0xa68ax4);this[_0x3069[99]](_0xa68ax3,[_0x3069[95],_0x3069[96],_0x3069[97],_0x3069[98],_0x3069[95]],_0xa68ax4);this[_0x3069[94]](_0x3069[100],_0xa68ax3,_0xa68ax4);this[_0x3069[92]](_0xa68ax3,_0x3069[101],_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[28]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[102]),_0x3069[103],_0x3069[104],mxConstants.STYLE_TEXT_OPACITY,_0xa68ax4,_0xa68axb);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[105]),null,function(){_0xa68ax2[_0x3069[71]](mxConstants.STYLE_NOLABEL,false)},_0xa68ax4,null,_0xa68axb)})));this[_0x3069[30]](_0x3069[100], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[106]),[mxConstants[_0x3069[107]]],[mxConstants[_0x3069[108]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[109]),[mxConstants[_0x3069[107]]],[mxConstants[_0x3069[110]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[111]),[mxConstants[_0x3069[107]]],[mxConstants[_0x3069[112]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[113]),[mxConstants[_0x3069[114]]],[mxConstants[_0x3069[115]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[116]),[mxConstants[_0x3069[114]]],[mxConstants[_0x3069[117]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[118]),[mxConstants[_0x3069[114]]],[mxConstants[_0x3069[119]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[94]](_0x3069[120],_0xa68ax3,_0xa68ax4);this[_0x3069[94]](_0x3069[77],_0xa68ax3,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);var _0xa68axb=this[_0x3069[26]](_0x3069[93])[_0x3069[78]];_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[48]),null,function(){_0xa68ax2[_0x3069[71]](mxConstants.STYLE_HORIZONTAL,true)},_0xa68ax4,null,_0xa68axb)})));this[_0x3069[30]](_0x3069[120], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[86]),[mxConstants[_0x3069[121]],mxConstants[_0x3069[107]]],[mxConstants[_0x3069[108]],mxConstants[_0x3069[112]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[109]),[mxConstants[_0x3069[121]],mxConstants[_0x3069[107]]],[mxConstants[_0x3069[110]],mxConstants[_0x3069[110]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[84]),[mxConstants[_0x3069[121]],mxConstants[_0x3069[107]]],[mxConstants[_0x3069[112]],mxConstants[_0x3069[108]]],null,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[82]),[mxConstants[_0x3069[122]],mxConstants[_0x3069[114]]],[mxConstants[_0x3069[115]],mxConstants[_0x3069[119]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[116]),[mxConstants[_0x3069[122]],mxConstants[_0x3069[114]]],[mxConstants[_0x3069[117]],mxConstants[_0x3069[117]]],null,_0xa68ax4);this[_0x3069[20]](_0xa68ax3,mxResources[_0x3069[26]](_0x3069[85]),[mxConstants[_0x3069[122]],mxConstants[_0x3069[114]]],[mxConstants[_0x3069[119]],mxConstants[_0x3069[115]]],null,_0xa68ax4)})));this[_0x3069[30]](_0x3069[123], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[124]),null,function(){_0xa68ax2[_0x3069[71]](mxConstants.STYLE_FLIPH,false)},_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[125]),null,function(){_0xa68ax2[_0x3069[71]](mxConstants.STYLE_FLIPV,false)},_0xa68ax4);this[_0x3069[99]](_0xa68ax3,[_0x3069[95],_0x3069[126],_0x3069[127]],_0xa68ax4)})));this[_0x3069[30]](_0x3069[128], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[106]),null,function(){_0xa68ax2[_0x3069[129]](mxConstants.ALIGN_LEFT)},_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[109]),null,function(){_0xa68ax2[_0x3069[129]](mxConstants.ALIGN_CENTER)},_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[111]),null,function(){_0xa68ax2[_0x3069[129]](mxConstants.ALIGN_RIGHT)},_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[113]),null,function(){_0xa68ax2[_0x3069[129]](mxConstants.ALIGN_TOP)},_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[116]),null,function(){_0xa68ax2[_0x3069[129]](mxConstants.ALIGN_MIDDLE)},_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[118]),null,function(){_0xa68ax2[_0x3069[129]](mxConstants.ALIGN_BOTTOM)},_0xa68ax4)})));this[_0x3069[30]](_0x3069[130], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[131]),null,mxUtils[_0x3069[29]](this,function(){var _0xa68axc= new mxHierarchicalLayout(_0xa68ax2,mxConstants.DIRECTION_WEST);this[_0x3069[0]][_0x3069[132]](_0xa68axc,true,true)}),_0xa68ax4);_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0x3069[133]),null,mxUtils[_0x3069[29]](this,function(){var _0xa68axc= new mxHierarchicalLayout(_0xa68ax2,mxConstants.DIRECTION_NORTH);this[_0x3069[0]][_0x3069[132]](_0xa68axc,true,true)}),_0xa68ax4)})));this[_0x3069[30]](_0x3069[134], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[99]](_0xa68ax3,[_0x3069[135],_0x3069[95],_0x3069[136],_0x3069[137],_0x3069[95],_0x3069[138],_0x3069[139]],_0xa68ax4)})));this[_0x3069[30]](_0x3069[140], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[99]](_0xa68ax3,[_0x3069[141],_0x3069[142],_0x3069[95]],_0xa68ax4);this[_0x3069[94]](_0x3069[130],_0xa68ax3,_0xa68ax4);_0xa68ax3[_0x3069[24]](_0xa68ax4);this[_0x3069[99]](_0xa68ax3,[_0x3069[95],_0x3069[143],_0x3069[144],_0x3069[145]],_0xa68ax4)})));this[_0x3069[30]](_0x3069[146], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[99]](_0xa68ax3,[_0x3069[147]],_0xa68ax4);_0xa68ax3[_0x3069[24]]();var _0xa68axd=[0.25,0.5,0.75,1,2,4];for(var _0xa68ax6=0;_0xa68ax6<_0xa68axd[_0x3069[18]];_0xa68ax6++){(function(_0xa68axe){_0xa68ax3[_0x3069[72]]((_0xa68axe*100)+_0x3069[148],null,function(){_0xa68ax2[_0x3069[149]](_0xa68axe)},_0xa68ax4)})(_0xa68axd[_0xa68ax6])};this[_0x3069[99]](_0xa68ax3,[_0x3069[95],_0x3069[150],_0x3069[151],_0x3069[95],_0x3069[152],_0x3069[153],_0x3069[95],_0x3069[154],_0x3069[155]],_0xa68ax4)})));this[_0x3069[30]](_0x3069[156], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[99]](_0xa68ax3,[_0x3069[157],_0x3069[158],_0x3069[95],_0x3069[159],_0x3069[160],_0x3069[161],_0x3069[95],_0x3069[162],_0x3069[95],_0x3069[163],_0x3069[164],_0x3069[95],_0x3069[165],_0x3069[166],_0x3069[95],_0x3069[167]],_0xa68ax4)})));this[_0x3069[30]](_0x3069[168], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[99]](_0xa68ax3,[_0x3069[169],_0x3069[170],_0x3069[95],_0x3069[171],_0x3069[172],_0x3069[173],_0x3069[174],_0x3069[95],_0x3069[175],_0x3069[95],_0x3069[176],_0x3069[177],_0x3069[178]])})));this[_0x3069[30]](_0x3069[179], new Menu(mxUtils[_0x3069[29]](this,function(_0xa68ax3,_0xa68ax4){this[_0x3069[99]](_0xa68ax3,[_0x3069[179],_0x3069[95],_0x3069[180]])})))};Menus[_0x3069[5]][_0x3069[30]]=function(_0xa68axf,_0xa68ax3){this[_0x3069[1]][_0xa68axf]=_0xa68ax3};Menus[_0x3069[5]][_0x3069[26]]=function(_0xa68axf){return this[_0x3069[1]][_0xa68axf]};Menus[_0x3069[5]][_0x3069[94]]=function(_0xa68axf,_0xa68ax3,_0xa68ax4){var _0xa68axb=this[_0x3069[26]](_0xa68axf)[_0x3069[78]];if(_0xa68ax3[_0x3069[81]]||_0xa68axb){var _0xa68ax10=_0xa68ax3[_0x3069[72]](mxResources[_0x3069[26]](_0xa68axf),null,null,_0xa68ax4,null,_0xa68axb);this[_0x3069[181]](_0xa68axf,_0xa68ax3,_0xa68ax10)}};Menus[_0x3069[5]][_0x3069[181]]=function(_0xa68axf,_0xa68ax11,_0xa68ax4){var _0xa68ax3=this[_0x3069[26]](_0xa68axf);if(_0xa68ax3!=null&&(_0xa68ax11[_0x3069[81]]||_0xa68ax3[_0x3069[78]])){this[_0x3069[26]](_0xa68axf)[_0x3069[182]](_0xa68ax11,_0xa68ax4)}};Menus[_0x3069[5]][_0x3069[20]]=function(_0xa68ax3,_0xa68ax12,_0xa68ax13,_0xa68ax14,_0xa68ax15,_0xa68ax4){return _0xa68ax3[_0x3069[72]](_0xa68ax12,null,mxUtils[_0x3069[29]](this,function(){var _0xa68ax2=this[_0x3069[0]][_0x3069[7]][_0x3069[6]];_0xa68ax2[_0x3069[184]]()[_0x3069[183]]();try{for(var _0xa68ax6=0;_0xa68ax6<_0xa68ax13[_0x3069[18]];_0xa68ax6++){_0xa68ax2[_0x3069[185]](_0xa68ax13[_0xa68ax6],_0xa68ax14[_0xa68ax6])}}finally{_0xa68ax2[_0x3069[184]]()[_0x3069[186]]()}}),_0xa68ax4,_0xa68ax15)};Menus[_0x3069[5]][_0x3069[28]]=function(_0xa68ax3,_0xa68ax12,_0xa68ax16,_0xa68ax17,_0xa68ax18,_0xa68ax4,_0xa68axb){return _0xa68ax3[_0x3069[72]](_0xa68ax12,null,mxUtils[_0x3069[29]](this,function(){var _0xa68ax2=this[_0x3069[0]][_0x3069[7]][_0x3069[6]];var _0xa68ax19=_0xa68ax17;var _0xa68ax1a=_0xa68ax2[_0x3069[189]]()[_0x3069[188]](_0xa68ax2[_0x3069[187]]());if(_0xa68ax1a!=null){_0xa68ax19=_0xa68ax1a[_0x3069[21]][_0xa68ax18]||_0xa68ax19};_0xa68ax19=mxUtils[_0x3069[192]](mxResources[_0x3069[26]](_0x3069[190])+((_0xa68ax16[_0x3069[18]]>0)?(_0x3069[191]+_0xa68ax16):_0x3069[27]),_0xa68ax19);if(_0xa68ax19!=null&&_0xa68ax19[_0x3069[18]]>0){_0xa68ax2[_0x3069[185]](_0xa68ax18,_0xa68ax19)}}),_0xa68ax4,null,_0xa68axb)};Menus[_0x3069[5]][_0x3069[92]]=function(_0xa68ax3,_0xa68ax18,_0xa68ax4){var _0xa68ax1b=this[_0x3069[0]][_0x3069[80]][_0x3069[26]](_0xa68ax18);if(_0xa68ax1b!=null&&(_0xa68ax3[_0x3069[81]]||_0xa68ax1b[_0x3069[78]])){var _0xa68ax1c=_0xa68ax3[_0x3069[72]](_0xa68ax1b[_0x3069[193]],null,_0xa68ax1b[_0x3069[194]],_0xa68ax4,null,_0xa68ax1b[_0x3069[78]]);if(_0xa68ax1b[_0x3069[195]]&&_0xa68ax1b[_0x3069[196]]()){this[_0x3069[197]](_0xa68ax1c)};this[_0x3069[198]](_0xa68ax1c,_0xa68ax1b);return _0xa68ax1c};return null};Menus[_0x3069[5]][_0x3069[198]]=function(_0xa68ax1c,_0xa68ax1b){if(_0xa68ax1b[_0x3069[199]]!=null){var _0xa68ax1d=_0xa68ax1c[_0x3069[23]][_0x3069[22]][_0x3069[22]];var _0xa68ax1e=document[_0x3069[201]](_0x3069[200]);_0xa68ax1e[_0x3069[21]][_0x3069[202]]=_0x3069[203];mxUtils[_0x3069[204]](_0xa68ax1e,_0xa68ax1b[_0x3069[199]]);_0xa68ax1d[_0x3069[205]](_0xa68ax1e)}};Menus[_0x3069[5]][_0x3069[197]]=function(_0xa68ax1c){var _0xa68ax1d=_0xa68ax1c[_0x3069[23]][_0x3069[22]];_0xa68ax1d[_0x3069[21]][_0x3069[206]]=_0x3069[207]+IMAGE_PATH+_0x3069[208];_0xa68ax1d[_0x3069[21]][_0x3069[209]]=_0x3069[210];_0xa68ax1d[_0x3069[21]][_0x3069[211]]=_0x3069[212]};Menus[_0x3069[5]][_0x3069[99]]=function(_0xa68ax3,_0xa68ax13,_0xa68ax4){for(var _0xa68ax6=0;_0xa68ax6<_0xa68ax13[_0x3069[18]];_0xa68ax6++){if(_0xa68ax13[_0xa68ax6]==_0x3069[95]){_0xa68ax3[_0x3069[24]](_0xa68ax4)}else {this[_0x3069[92]](_0xa68ax3,_0xa68ax13[_0xa68ax6],_0xa68ax4)}}};Menus[_0x3069[5]][_0x3069[213]]=function(_0xa68ax3,_0xa68ax1f,_0xa68ax20){var _0xa68ax2=this[_0x3069[0]][_0x3069[7]][_0x3069[6]];_0xa68ax3[_0x3069[214]]=true;if(_0xa68ax2[_0x3069[215]]()){this[_0x3069[99]](_0xa68ax3,[_0x3069[169],_0x3069[170],_0x3069[95],_0x3069[173],_0x3069[95]])}else {this[_0x3069[99]](_0xa68ax3,[_0x3069[174],_0x3069[95],_0x3069[171],_0x3069[172],_0x3069[95],_0x3069[175]]);if(_0xa68ax2[_0x3069[216]]()==1&&_0xa68ax2[_0x3069[184]]()[_0x3069[217]](_0xa68ax2[_0x3069[187]]())){this[_0x3069[99]](_0xa68ax3,[_0x3069[218]])};_0xa68ax3[_0x3069[24]]()};if(_0xa68ax2[_0x3069[216]]()>0){this[_0x3069[99]](_0xa68ax3,[_0x3069[141],_0x3069[142],_0x3069[95]]);if(_0xa68ax2[_0x3069[184]]()[_0x3069[217]](_0xa68ax2[_0x3069[187]]())){var _0xa68ax21=false;var _0xa68ax1f=_0xa68ax2[_0x3069[187]]();if(_0xa68ax1f!=null&&_0xa68ax2[_0x3069[184]]()[_0x3069[217]](_0xa68ax1f)){var _0xa68ax22=_0xa68ax2[_0x3069[220]][_0x3069[219]](_0xa68ax1f);if(_0xa68ax22 instanceof mxEdgeHandler&&_0xa68ax22[_0x3069[221]]!=null&&_0xa68ax22[_0x3069[221]][_0x3069[18]]>2){var _0xa68ax23=_0xa68ax22[_0x3069[222]]( new mxMouseEvent(_0xa68ax20));var _0xa68ax24=this[_0x3069[0]][_0x3069[80]][_0x3069[26]](_0x3069[223]);_0xa68ax24[_0x3069[224]]=_0xa68ax22;_0xa68ax24[_0x3069[225]]=_0xa68ax23;_0xa68ax21=_0xa68ax23>0&&_0xa68ax23<_0xa68ax22[_0x3069[221]][_0x3069[18]]}};this[_0x3069[99]](_0xa68ax3,[_0x3069[95],(_0xa68ax21)?_0x3069[223]:_0x3069[226]])}else {if(_0xa68ax2[_0x3069[216]]()>1){_0xa68ax3[_0x3069[24]]();this[_0x3069[99]](_0xa68ax3,[_0x3069[143]])}};_0xa68ax3[_0x3069[24]]();if(_0xa68ax2[_0x3069[216]]()==1){var _0xa68ax25=_0xa68ax2[_0x3069[227]](_0xa68ax2[_0x3069[187]]());if(_0xa68ax25!=null){this[_0x3069[99]](_0xa68ax3,[_0x3069[228]])}}}else {this[_0x3069[99]](_0xa68ax3,[_0x3069[95],_0x3069[176],_0x3069[177],_0x3069[95],_0x3069[178]])}};Menus[_0x3069[5]][_0x3069[229]]=function(_0xa68ax26){var _0xa68ax27= new Menubar(this[_0x3069[0]],_0xa68ax26);var _0xa68ax28=[_0x3069[156],_0x3069[168],_0x3069[146],_0x3069[91],_0x3069[93],_0x3069[140]];for(var _0xa68ax6=0;_0xa68ax6<_0xa68ax28[_0x3069[18]];_0xa68ax6++){_0xa68ax27[_0x3069[181]](mxResources[_0x3069[26]](_0xa68ax28[_0xa68ax6]),this[_0x3069[26]](_0xa68ax28[_0xa68ax6])[_0x3069[194]])};return _0xa68ax27};function Menubar(_0xa68ax1,_0xa68ax26){this[_0x3069[0]]=_0xa68ax1;this[_0x3069[230]]=_0xa68ax26;mxEvent[_0x3069[232]](document,mxUtils[_0x3069[29]](this,function(_0xa68ax20){this[_0x3069[231]]()}))}Menubar[_0x3069[5]][_0x3069[231]]=function(){if(this[_0x3069[233]]!=null){this[_0x3069[233]][_0x3069[231]]()}};Menubar[_0x3069[5]][_0x3069[181]]=function(_0xa68ax12,_0xa68ax2a){var _0xa68ax2b=document[_0x3069[201]](_0x3069[234]);_0xa68ax2b[_0x3069[237]](_0x3069[235],_0x3069[236]);_0xa68ax2b[_0x3069[238]]=_0x3069[239];mxUtils[_0x3069[204]](_0xa68ax2b,_0xa68ax12);this[_0x3069[240]](_0xa68ax2b,_0xa68ax2a);this[_0x3069[230]][_0x3069[205]](_0xa68ax2b);return _0xa68ax2b};Menubar[_0x3069[5]][_0x3069[240]]=function(_0xa68ax2b,_0xa68ax2a){if(_0xa68ax2a!=null){var _0xa68ax2c=true;var _0xa68ax2d=mxUtils[_0x3069[29]](this,function(_0xa68ax20){if(_0xa68ax2c&&_0xa68ax2b[_0x3069[78]]==null||_0xa68ax2b[_0x3069[78]]){this[_0x3069[0]][_0x3069[7]][_0x3069[6]][_0x3069[241]][_0x3069[231]]();var _0xa68ax3= new mxPopupMenu(_0xa68ax2a);_0xa68ax3[_0x3069[242]][_0x3069[238]]+=_0x3069[243];_0xa68ax3[_0x3069[214]]=true;_0xa68ax3[_0x3069[81]]=true;_0xa68ax3[_0x3069[244]]=true;_0xa68ax3[_0x3069[231]]=mxUtils[_0x3069[29]](this,function(){mxPopupMenu[_0x3069[5]][_0x3069[231]][_0x3069[245]](_0xa68ax3,arguments);_0xa68ax3[_0x3069[246]]();this[_0x3069[233]]=null;this[_0x3069[247]]=null});var _0xa68ax2e=_0xa68ax2b[_0x3069[248]]+document[_0x3069[251]](_0x3069[250])[_0x3069[249]]+22;var _0xa68ax2f=_0xa68ax2b[_0x3069[252]]+_0xa68ax2b[_0x3069[253]]+140;_0xa68ax3[_0x3069[254]](_0xa68ax2e,_0xa68ax2f,null,_0xa68ax20);this[_0x3069[233]]=_0xa68ax3;this[_0x3069[247]]=_0xa68ax2b};_0xa68ax2c=true;mxEvent[_0x3069[255]](_0xa68ax20)});mxEvent[_0x3069[257]](_0xa68ax2b,_0x3069[256],mxUtils[_0x3069[29]](this,function(_0xa68ax20){if(this[_0x3069[233]]!=null&&this[_0x3069[247]]!=_0xa68ax2b){this[_0x3069[231]]();_0xa68ax2d(_0xa68ax20)}}));mxEvent[_0x3069[257]](_0xa68ax2b,_0x3069[258],mxUtils[_0x3069[29]](this,function(){_0xa68ax2c=this[_0x3069[247]]!=_0xa68ax2b}));mxEvent[_0x3069[257]](_0xa68ax2b,_0x3069[259],_0xa68ax2d)}};function Menu(_0xa68ax2a,_0xa68axb){mxEventSource[_0x3069[260]](this);this[_0x3069[194]]=_0xa68ax2a;this[_0x3069[78]]=(_0xa68axb!=null)?_0xa68axb:true}mxUtils[_0x3069[261]](Menu,mxEventSource);Menu[_0x3069[5]][_0x3069[262]]=function(_0xa68ax19){if(this[_0x3069[78]]!=_0xa68ax19){this[_0x3069[78]]=_0xa68ax19;this[_0x3069[264]]( new mxEventObject(_0x3069[263]))}};Menu[_0x3069[5]][_0x3069[182]]=function(_0xa68ax3,_0xa68ax4){this[_0x3069[194]](_0xa68ax3,_0xa68ax4)}
\ No newline at end of file
+/**
+ * $Id: Menus.js,v 1.13 2013-02-20 16:21:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+Menus = function(editorUi) {
+       this.editorUi = editorUi;
+       this.menus = new Object();
+       this.init();
+
+       // Pre-fetches checkmark image
+       new Image().src = IMAGE_PATH + '/checkmark.gif';
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.init = function() {
+       var graph = this.editorUi.editor.graph;
+
+       this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var fonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond',
+                       'Comic Sans MS',
+                       'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'
+               ];
+
+               for (var i = 0; i < fonts.length; i++) {
+                       var tr = this.styleChange(menu, fonts[i], [mxConstants.STYLE_FONTFAMILY], [
+                               fonts[i]
+                       ], null, parent);
+                       tr.firstChild.nextSibling.style.fontFamily = fonts[i];
+               }
+
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY,
+                       mxConstants.STYLE_FONTFAMILY, parent);
+       })));
+       this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
+
+               for (var i = 0; i < sizes.length; i++) {
+                       this.styleChange(menu, sizes[i], [mxConstants.STYLE_FONTSIZE], [sizes[i]],
+                               null, parent);
+               }
+
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('custom'), '(pt)', '12',
+                       mxConstants.STYLE_FONTSIZE, parent);
+       })));
+       this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
+
+               for (var i = 0; i < sizes.length; i++) {
+                       this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [
+                               sizes[i]
+                       ], null, parent);
+               }
+
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('custom'), '(px)', '1',
+                       mxConstants.STYLE_STROKEWIDTH, parent);
+       })));
+       this.put('line', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [
+                       null
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], [
+                       'entityRelationEdgeStyle'
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE,
+                       mxConstants.STYLE_ELBOW
+               ], ['elbowEdgeStyle', 'horizontal'], null, parent);
+               this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE,
+                       mxConstants.STYLE_ELBOW
+               ], ['elbowEdgeStyle', 'vertical'], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], [
+                       'segmentEdgeStyle'
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], [
+                       'orthogonalEdgeStyle'
+               ], null, parent);
+       })));
+       this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_CLASSIC
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_OPEN
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_BLOCK
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_OVAL
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_DIAMOND
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_DIAMOND_THIN
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.NONE
+               ], null, parent);
+               menu.addSeparator(parent);
+               menu.addItem(mxResources.get('transparent'), null, function() {
+                       graph.toggleCellStyles('endFill', true);
+               }, parent, null, true);
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
+                       mxConstants.STYLE_ENDSIZE, parent);
+       })));
+       this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_CLASSIC
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_OPEN
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_BLOCK
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_OVAL
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_DIAMOND
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_DIAMOND_THIN
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.NONE
+               ], null, parent);
+               menu.addSeparator(parent);
+               menu.addItem(mxResources.get('transparent'), null, function() {
+                       graph.toggleCellStyles('startFill', true);
+               }, parent, null, true);
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
+                       mxConstants.STYLE_STARTSIZE, parent);
+       })));
+       this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent) {
+               // Uses shadow action and line menu to analyze selection
+               var vertexSelected = this.editorUi.actions.get('shadow').enabled;
+               var edgeSelected = this.get('line').enabled;
+
+               if (vertexSelected || menu.showDisabled) {
+                       this.promptChange(menu, mxResources.get('top'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('right'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('bottom'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('left'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
+                       menu.addSeparator(parent);
+                       this.promptChange(menu, mxResources.get('global'), '(px)', '0',
+                               mxConstants.STYLE_SPACING, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0',
+                               mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
+               }
+
+               if (edgeSelected || menu.showDisabled) {
+                       menu.addSeparator(parent);
+                       this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0',
+                               mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
+                       this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0',
+                               mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
+               }
+       })));
+       this.put('format', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItem(menu, 'style', parent);
+       })));
+       this.put('text', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var enabled = this.get('text').enabled;
+               menu.addSeparator(parent);
+               this.addSubmenu('fontFamily', menu, parent);
+               this.addSubmenu('fontSize', menu, parent);
+               this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'],
+                       parent);
+               this.addSubmenu('alignment', menu, parent);
+               this.addMenuItem(menu, 'wordWrap', parent);
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100',
+                       mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
+               menu.addItem(mxResources.get('hide'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false);
+               }, parent, null, enabled);
+       })));
+       this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [
+                       mxConstants.ALIGN_LEFT
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [
+                       mxConstants.ALIGN_CENTER
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [
+                       mxConstants.ALIGN_RIGHT
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
+                       mxConstants.ALIGN_TOP
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [
+                       mxConstants.ALIGN_MIDDLE
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
+                       mxConstants.ALIGN_BOTTOM
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.addSubmenu('position', menu, parent);
+               this.addSubmenu('spacing', menu, parent);
+               menu.addSeparator(parent);
+               var enabled = this.get('text').enabled;
+               menu.addItem(mxResources.get('vertical'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
+               }, parent, null, enabled);
+       })));
+       this.put('position', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION,
+                       mxConstants.STYLE_ALIGN
+               ], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
+               this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION,
+                       mxConstants.STYLE_ALIGN
+               ], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
+               this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION,
+                       mxConstants.STYLE_ALIGN
+               ], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
+                       mxConstants.STYLE_VERTICAL_ALIGN
+               ], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
+               this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
+                       mxConstants.STYLE_VERTICAL_ALIGN
+               ], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
+               this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
+                       mxConstants.STYLE_VERTICAL_ALIGN
+               ], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
+       })));
+       this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent) {
+               menu.addItem(mxResources.get('flipH'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false);
+               }, parent);
+               menu.addItem(mxResources.get('flipV'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false);
+               }, parent);
+               this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
+       })));
+       this.put('align', new Menu(mxUtils.bind(this, function(menu, parent) {
+               menu.addItem(mxResources.get('leftAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_LEFT);
+               }, parent);
+               menu.addItem(mxResources.get('center'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_CENTER);
+               }, parent);
+               menu.addItem(mxResources.get('rightAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_RIGHT);
+               }, parent);
+               menu.addSeparator(parent);
+               menu.addItem(mxResources.get('topAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_TOP);
+               }, parent);
+               menu.addItem(mxResources.get('middle'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_MIDDLE);
+               }, parent);
+               menu.addItem(mxResources.get('bottomAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_BOTTOM);
+               }, parent);
+       })));
+       this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent) {
+               // menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
+               // {
+               //      if (!graph.isSelectionEmpty())
+               //      {
+               //              var layout = new mxCompactTreeLayout(graph, true);
+               //              layout.edgeRouting = false;
+               //              layout.levelDistance = 30;
+               //              this.editorUi.executeLayout(layout, true, true);
+               //      }
+               // }), parent);
+               // menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
+               // {
+               //      if (!graph.isSelectionEmpty())
+               //      {
+               //              var layout = new mxCompactTreeLayout(graph, false);
+               //              layout.edgeRouting = false;
+               //              layout.levelDistance = 30;
+               //              this.editorUi.executeLayout(layout, true, true);
+               //      }
+               // }), parent);
+               // menu.addSeparator(parent);
+               menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this,
+                       function() {
+                               var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
+                               this.editorUi.executeLayout(layout, true, true);
+                       }), parent);
+               menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this,
+                       function() {
+                               var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
+                               this.editorUi.executeLayout(layout, true, true);
+                       }), parent);
+               //menu.addSeparator(parent);
+               // menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
+               // {
+               //      var layout = new mxFastOrganicLayout(graph);
+               //              this.editorUi.executeLayout(layout, true, true);
+               // }), parent);
+               // menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
+               // {
+               //      var layout = new mxCircleLayout(graph);
+               //              this.editorUi.executeLayout(layout, true, true, graph.getSelectionCells());
+               // }), parent);
+       })));
+       this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-',
+                       'expand', 'collapse'
+               ], parent);
+       })));
+       this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
+               //this.addSubmenu('direction', menu, parent);
+               this.addSubmenu('layout', menu, parent);
+               //this.addSubmenu('align', menu, parent);
+               menu.addSeparator(parent);
+               //this.addSubmenu('navigation', menu, parent);
+               this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup'],
+                       parent);
+               //this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'autosize'], parent);
+       })));
+       this.put('view', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['actualSize'], parent);
+               menu.addSeparator();
+               var scales = [0.25, 0.5, 0.75, 1, 2, 4];
+
+               for (var i = 0; i < scales.length; i++) {
+                       (function(scale) {
+                               menu.addItem((scale * 100) + '%', null, function() {
+                                       graph.zoomTo(scale);
+                               }, parent);
+                       })(scales[i]);
+               }
+
+               this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow',
+                       'customZoom', '-', 'fitPage', 'fitPageWidth'
+               ], parent);
+       })));
+       this.put('file', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', 'publish',
+                       '-', 'variable', '-', 'import', 'export', '-', 'editFile', 'rename', '-',
+                       'print'
+               ], parent);
+       })));
+       this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste',
+                       'delete', '-', 'duplicate', '-',
+                       'selectVertices', 'selectEdges', 'selectAll'
+               ]);
+       })));
+       this.put('help', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['help', '-', 'about']);
+       })));
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.put = function(name, menu) {
+       this.menus[name] = menu;
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.get = function(name) {
+       return this.menus[name];
+};
+
+/**
+ * Adds the given submenu.
+ */
+Menus.prototype.addSubmenu = function(name, menu, parent) {
+       var enabled = this.get(name).enabled;
+
+       if (menu.showDisabled || enabled) {
+               var submenu = menu.addItem(mxResources.get(name), null, null, parent, null,
+                       enabled);
+               this.addMenu(name, menu, submenu);
+       }
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.addMenu = function(name, popupMenu, parent) {
+       var menu = this.get(name);
+
+       if (menu != null && (popupMenu.showDisabled || menu.enabled)) {
+               this.get(name).execute(popupMenu, parent);
+       }
+};
+
+/**
+ * Adds a style change item to the given menu.
+ */
+Menus.prototype.styleChange = function(menu, label, keys, values, sprite,
+       parent) {
+       return menu.addItem(label, null, mxUtils.bind(this, function() {
+               var graph = this.editorUi.editor.graph;
+
+               graph.getModel().beginUpdate();
+               try {
+                       for (var i = 0; i < keys.length; i++) {
+                               graph.setCellStyles(keys[i], values[i]);
+                       }
+               } finally {
+                       graph.getModel().endUpdate();
+               }
+       }), parent, sprite);
+};
+
+/**
+ * Adds a style change item with a prompt to the given menu.
+ */
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key,
+       parent, enabled) {
+       return menu.addItem(label, null, mxUtils.bind(this, function() {
+               var graph = this.editorUi.editor.graph;
+               var value = defaultValue;
+               var state = graph.getView().getState(graph.getSelectionCell());
+
+               if (state != null) {
+                       value = state.style[key] || value;
+               }
+
+               value = mxUtils.prompt(mxResources.get('enterValue') + ((hint.length > 0) ?
+                       (' ' + hint) : ''), value);
+
+               if (value != null && value.length > 0) {
+                       graph.setCellStyles(key, value);
+               }
+       }), parent, null, enabled);
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItem = function(menu, key, parent) {
+       var action = this.editorUi.actions.get(key);
+
+       if (action != null && (menu.showDisabled || action.enabled)) {
+               var item = menu.addItem(action.label, null, action.funct, parent, null,
+                       action.enabled);
+
+               // Adds checkmark image
+               if (action.toggleAction && action.isSelected()) {
+                       this.addCheckmark(item);
+               }
+
+               this.addShortcut(item, action);
+
+               return item;
+       }
+
+       return null;
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addShortcut = function(item, action) {
+       if (action.shortcut != null) {
+               var td = item.firstChild.nextSibling.nextSibling;
+               var span = document.createElement('span');
+               span.style.color = 'gray';
+               mxUtils.write(span, action.shortcut);
+               td.appendChild(span);
+       }
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addCheckmark = function(item) {
+       var td = item.firstChild.nextSibling;
+       td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
+       td.style.backgroundRepeat = 'no-repeat';
+       td.style.backgroundPosition = '2px 50%';
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItems = function(menu, keys, parent) {
+       for (var i = 0; i < keys.length; i++) {
+               if (keys[i] == '-') {
+                       menu.addSeparator(parent);
+               } else {
+                       this.addMenuItem(menu, keys[i], parent);
+               }
+       }
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createPopupMenu = function(menu, cell, evt) {
+       var graph = this.editorUi.editor.graph;
+       menu.smartSeparators = true;
+
+       if (graph.isSelectionEmpty()) {
+               this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);
+       } else {
+               this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);
+
+               if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell())) {
+                       this.addMenuItems(menu, ['setAsDefaultEdge']);
+               }
+
+               menu.addSeparator();
+       }
+
+       if (graph.getSelectionCount() > 0) {
+               this.addMenuItems(menu, ['toFront', 'toBack', '-']);
+
+               if (graph.getModel().isEdge(graph.getSelectionCell())) {
+                       var isWaypoint = false;
+                       var cell = graph.getSelectionCell();
+
+                       if (cell != null && graph.getModel().isEdge(cell)) {
+                               var handler = graph.selectionCellsHandler.getHandler(cell);
+
+                               if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends
+                                       .length > 2) {
+                                       var index = handler.getHandleForEvent(new mxMouseEvent(evt));
+
+                                       // Configures removeWaypoint action before execution
+                                       var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
+                                       rmWaypointAction.handler = handler;
+                                       rmWaypointAction.index = index;
+
+                                       isWaypoint = index > 0 && index < handler.bends.length;
+                               }
+                       }
+
+                       this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' :
+                               'addWaypoint'
+                       ]);
+               } else if (graph.getSelectionCount() > 1) {
+                       menu.addSeparator();
+                       this.addMenuItems(menu, ['group']);
+               }
+
+               menu.addSeparator();
+
+               if (graph.getSelectionCount() == 1) {
+                       var link = graph.getLinkForCell(graph.getSelectionCell());
+
+                       if (link != null) {
+                               this.addMenuItems(menu, ['openLink']);
+                       }
+               }
+       } else {
+               this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-',
+                       'selectAll'
+               ]);
+       }
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createMenubar = function(container) {
+       var menubar = new Menubar(this.editorUi, container);
+       // var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange',
+       //      'help'
+       // ];
+       var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange'];
+       for (var i = 0; i < menus.length; i++) {
+               menubar.addMenu(mxResources.get(menus[i]), this.get(menus[i]).funct);
+       }
+
+       return menubar;
+};
+
+/**
+ * Construcs a new menubar for the given editor.
+ */
+function Menubar(editorUi, container) {
+       this.editorUi = editorUi;
+       this.container = container;
+
+       // Global handler to hide the current menu
+       mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
+               this.hideMenu();
+       }));
+};
+
+/**
+ * Adds the menubar elements.
+ */
+Menubar.prototype.hideMenu = function() {
+       if (this.currentMenu != null) {
+               this.currentMenu.hideMenu();
+       }
+};
+
+/**
+ * Adds a submenu to this menubar.
+ */
+Menubar.prototype.addMenu = function(label, funct) {
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geItem';
+       mxUtils.write(elt, label);
+
+       this.addMenuHandler(elt, funct);
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menubar.prototype.addMenuHandler = function(elt, funct) {
+       if (funct != null) {
+               var show = true;
+
+               var clickHandler = mxUtils.bind(this, function(evt) {
+                       if (show && elt.enabled == null || elt.enabled) {
+                               this.editorUi.editor.graph.panningHandler.hideMenu();
+                               var menu = new mxPopupMenu(funct);
+                               menu.div.className += ' geMenubarMenu';
+                               menu.smartSeparators = true;
+                               menu.showDisabled = true;
+                               menu.autoExpand = true;
+
+                               // Disables autoexpand and destroys menu when hidden
+                               menu.hideMenu = mxUtils.bind(this, function() {
+                                       mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
+                                       menu.destroy();
+                                       this.currentMenu = null;
+                                       this.currentElt = null;
+                               });
+
+                               // Added width of the page-sidebar
+                               var x = elt.offsetLeft + document.getElementById('page-sidebar').offsetWidth +
+                                       22;
+                               // Added static height of the page-navbar
+                               var y = elt.offsetTop + elt.offsetHeight + 140;
+
+                               menu.popup(x, y, null, evt);
+
+                               //menu.popup(elt.offsetLeft + 4, elt.offsetTop + elt.offsetHeight + 4, null, evt);
+                               this.currentMenu = menu;
+                               this.currentElt = elt;
+                       }
+
+                       show = true;
+                       mxEvent.consume(evt);
+               });
+
+               // Shows menu automatically while in expanded state
+               mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
+                       if (this.currentMenu != null && this.currentElt != elt) {
+                               this.hideMenu();
+                               clickHandler(evt);
+                       }
+               }));
+
+               // Hides menu if already showing
+               mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function() {
+                       show = this.currentElt != elt;
+               }));
+
+               mxEvent.addListener(elt, 'click', clickHandler);
+       }
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Menu(funct, enabled) {
+       mxEventSource.call(this);
+       this.funct = funct;
+       this.enabled = (enabled != null) ? enabled : true;
+};
+
+// Menu inherits from mxEventSource
+mxUtils.extend(Menu, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.setEnabled = function(value) {
+       if (this.enabled != value) {
+               this.enabled = value;
+               this.fireEvent(new mxEventObject('stateChanged'));
+       }
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.execute = function(menu, parent) {
+       this.funct(menu, parent);
+};
index adc53c9..42e13ca 100644 (file)
@@ -1 +1,1234 @@
-var _0xe976=["\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x73\x69\x7A\x65","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6D\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x65\x6E\x64","\x63\x6C\x6F\x73\x65","\x63\x75\x62\x65","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x6E\x6F\x74\x65","\x74\x61\x62\x57\x69\x64\x74\x68","\x74\x61\x62\x48\x65\x69\x67\x68\x74","\x74\x61\x62\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x69\x67\x68\x74","\x6C\x65\x66\x74","\x66\x6F\x6C\x64\x65\x72","\x63\x61\x72\x64","\x71\x75\x61\x64\x54\x6F","\x74\x61\x70\x65","\x73\x74\x65\x70","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x65\x67\x69\x6E","\x73\x74\x72\x6F\x6B\x65","\x61\x70\x70\x6C\x79","\x70\x6C\x75\x73","\x64\x6F\x75\x62\x6C\x65","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x6D\x61\x78","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x79\x6D\x62\x6F\x6C","\x41\x6C\x69\x67\x6E","\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x57\x69\x64\x74\x68","\x48\x65\x69\x67\x68\x74","\x53\x70\x61\x63\x69\x6E\x67","\x41\x72\x63\x53\x70\x61\x63\x69\x6E\x67","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x73\x61\x76\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x72\x65\x73\x74\x6F\x72\x65","\x65\x78\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x50\x69\x70\x65","\x63\x75\x72\x76\x65\x54\x6F","\x75\x6D\x6C\x41\x63\x74\x6F\x72","\x6C\x6F\x6C\x6C\x69\x70\x6F\x70","\x6A\x65\x74\x74\x79\x57\x69\x64\x74\x68","\x6A\x65\x74\x74\x79\x48\x65\x69\x67\x68\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x6F\x75\x74\x65\x72\x53\x74\x72\x6F\x6B\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x65\x6E\x64\x53\x74\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x74\x61\x74\x65","\x69\x6E\x69\x74\x53\x68\x61\x70\x65\x73","\x78","\x79","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x73\x68\x61\x70\x65\x73","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x72\x74","\x6C\x69\x6E\x6B","\x64\x61\x73\x68","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x73\x65\x47\x72\x69\x64\x46\x6F\x72\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x69\x6E\x69\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68","\x76\x69\x65\x77","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x73\x72\x63","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x74\x56\x69\x65\x77","\x63\x75\x72\x73\x6F\x72","\x6E\x6F\x64\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x43\x75\x72\x73\x6F\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74","\x72\x65\x64\x72\x61\x77","\x62\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x6F\x75\x72\x63\x65","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x73\x63\x61\x6C\x65","\x73\x6E\x61\x70","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x70\x70\x6C\x79\x53\x74\x79\x6C\x65","\x72\x65\x73\x65\x74","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x73\x68\x61\x70\x65","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x63\x6F\x73","\x73\x69\x6E","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x50\x6F\x69\x6E\x74","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65\x55\x6E\x72\x6F\x74\x61\x74\x65\x64","\x72\x6F\x75\x6E\x64","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x63\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x63\x61\x6C\x65\x46\x61\x63\x74\x6F\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x73\x74\x65\x6E\x63\x69\x6C","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73"];(function(){function _0xeb1ax1(){}_0xeb1ax1[_0xe976[0]]= new mxCylinder();_0xeb1ax1[_0xe976[0]][_0xe976[1]]=_0xeb1ax1;_0xeb1ax1[_0xe976[0]][_0xe976[2]]=20;_0xeb1ax1[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1ax8=Math[_0xe976[6]](_0xeb1ax5,Math[_0xe976[6]](_0xeb1ax6,mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[2],this[_0xe976[2]])));if(_0xeb1ax7){_0xeb1ax2[_0xe976[7]](_0xeb1ax8,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](_0xeb1ax8,_0xeb1ax8);_0xeb1ax2[_0xe976[8]](0,0);_0xeb1ax2[_0xe976[7]](_0xeb1ax8,_0xeb1ax8);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax8);_0xeb1ax2[_0xe976[9]]()}else {_0xeb1ax2[_0xe976[7]](0,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5-_0xeb1ax8,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax8);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](_0xeb1ax8,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6-_0xeb1ax8);_0xeb1ax2[_0xe976[8]](0,0);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[11]]=_0xeb1ax1;function _0xeb1ax9(){}_0xeb1ax9[_0xe976[0]]= new mxCylinder();_0xeb1ax9[_0xe976[0]][_0xe976[1]]=_0xeb1ax9;_0xeb1ax9[_0xe976[0]][_0xe976[2]]=30;_0xeb1ax9[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1ax8=Math[_0xe976[6]](_0xeb1ax5,Math[_0xe976[6]](_0xeb1ax6,mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[2],this[_0xe976[2]])));if(_0xeb1ax7){_0xeb1ax2[_0xe976[7]](_0xeb1ax5-_0xeb1ax8,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5-_0xeb1ax8,_0xeb1ax8);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax8);_0xeb1ax2[_0xe976[9]]()}else {_0xeb1ax2[_0xe976[7]](0,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5-_0xeb1ax8,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax8);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,0);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[13]]=_0xeb1ax9;function _0xeb1axa(){}_0xeb1axa[_0xe976[0]]= new mxCylinder();_0xeb1axa[_0xe976[0]][_0xe976[1]]=_0xeb1axa;_0xeb1axa[_0xe976[0]][_0xe976[14]]=60;_0xeb1axa[_0xe976[0]][_0xe976[15]]=20;_0xeb1axa[_0xe976[0]][_0xe976[16]]=_0xe976[17];_0xeb1axa[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1axb=mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[14],this[_0xe976[14]]);var _0xeb1axc=mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[15],this[_0xe976[15]]);var _0xeb1axd=mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[16],this[_0xe976[16]]);var _0xeb1axe=Math[_0xe976[6]](_0xeb1ax5,_0xeb1axb);var _0xeb1axf=Math[_0xe976[6]](_0xeb1ax6,_0xeb1axc);if(_0xeb1ax7){if(_0xeb1axd==_0xe976[18]){_0xeb1ax2[_0xe976[7]](0,_0xeb1axf);_0xeb1ax2[_0xe976[8]](_0xeb1axe,_0xeb1axf)}else {_0xeb1ax2[_0xe976[7]](_0xeb1ax5-_0xeb1axe,_0xeb1axf);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1axf)};_0xeb1ax2[_0xe976[9]]()}else {if(_0xeb1axd==_0xe976[18]){_0xeb1ax2[_0xe976[7]](0,0);_0xeb1ax2[_0xe976[8]](_0xeb1axe,0);_0xeb1ax2[_0xe976[8]](_0xeb1axe,_0xeb1axf);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1axf)}else {_0xeb1ax2[_0xe976[7]](0,_0xeb1axf);_0xeb1ax2[_0xe976[8]](_0xeb1ax5-_0xeb1axe,_0xeb1axf);_0xeb1ax2[_0xe976[8]](_0xeb1ax5-_0xeb1axe,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,0)};_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1axf);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[19]]=_0xeb1axa;function _0xeb1ax10(){}_0xeb1ax10[_0xe976[0]]= new mxCylinder();_0xeb1ax10[_0xe976[0]][_0xe976[1]]=_0xeb1ax10;_0xeb1ax10[_0xe976[0]][_0xe976[2]]=30;_0xeb1ax10[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1ax8=Math[_0xe976[6]](_0xeb1ax5,Math[_0xe976[6]](_0xeb1ax6,mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[2],this[_0xe976[2]])));if(!_0xeb1ax7){_0xeb1ax2[_0xe976[7]](_0xeb1ax8,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax8);_0xeb1ax2[_0xe976[8]](_0xeb1ax8,0);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[20]]=_0xeb1ax10;function _0xeb1ax11(){}_0xeb1ax11[_0xe976[0]]= new mxCylinder();_0xeb1ax11[_0xe976[0]][_0xe976[1]]=_0xeb1ax11;_0xeb1ax11[_0xe976[0]][_0xe976[2]]=0.4;_0xeb1ax11[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1ax8=mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[2],this[_0xe976[2]]);var _0xeb1axf=_0xeb1ax6*_0xeb1ax8;var _0xeb1ax12=1.4;if(!_0xeb1ax7){_0xeb1ax2[_0xe976[7]](0,_0xeb1axf/2);_0xeb1ax2[_0xe976[21]](_0xeb1ax5/4,_0xeb1axf*_0xeb1ax12,_0xeb1ax5/2,_0xeb1axf/2);_0xeb1ax2[_0xe976[21]](_0xeb1ax5*3/4,_0xeb1axf*(1-_0xeb1ax12),_0xeb1ax5,_0xeb1axf/2);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6-_0xeb1axf/2);_0xeb1ax2[_0xe976[21]](_0xeb1ax5*3/4,_0xeb1ax6-_0xeb1axf*_0xeb1ax12,_0xeb1ax5/2,_0xeb1ax6-_0xeb1axf/2);_0xeb1ax2[_0xe976[21]](_0xeb1ax5/4,_0xeb1ax6-_0xeb1axf*(1-_0xeb1ax12),0,_0xeb1ax6-_0xeb1axf/2);_0xeb1ax2[_0xe976[8]](0,_0xeb1axf/2);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[22]]=_0xeb1ax11;function _0xeb1ax13(){}_0xeb1ax13[_0xe976[0]]= new mxCylinder();_0xeb1ax13[_0xe976[0]][_0xe976[1]]=_0xeb1ax13;_0xeb1ax13[_0xe976[0]][_0xe976[2]]=0.2;_0xeb1ax13[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1ax8=_0xeb1ax5*mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[2],this[_0xe976[2]]);if(!_0xeb1ax7){_0xeb1ax2[_0xe976[7]](0,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5-_0xeb1ax8,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6/2);_0xeb1ax2[_0xe976[8]](_0xeb1ax5-_0xeb1ax8,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](_0xeb1ax8,_0xeb1ax6/2);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[23]]=_0xeb1ax13;function _0xeb1ax14(){mxRectangleShape[_0xe976[24]](this)}mxUtils[_0xe976[25]](_0xeb1ax14,mxRectangleShape);_0xeb1ax14[_0xe976[0]][_0xe976[26]]=function(){return false};_0xeb1ax14[_0xe976[0]][_0xe976[27]]=function(_0xeb1ax15,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6){var _0xeb1ax16=Math[_0xe976[6]](_0xeb1ax5/5,_0xeb1ax6/5)+1;_0xeb1ax15[_0xe976[28]]();_0xeb1ax15[_0xe976[7]](_0xeb1ax3+_0xeb1ax5/2,_0xeb1ax4+_0xeb1ax16);_0xeb1ax15[_0xe976[8]](_0xeb1ax3+_0xeb1ax5/2,_0xeb1ax4+_0xeb1ax6-_0xeb1ax16);_0xeb1ax15[_0xe976[7]](_0xeb1ax3+_0xeb1ax16,_0xeb1ax4+_0xeb1ax6/2);_0xeb1ax15[_0xe976[8]](_0xeb1ax3+_0xeb1ax5-_0xeb1ax16,_0xeb1ax4+_0xeb1ax6/2);_0xeb1ax15[_0xe976[9]]();_0xeb1ax15[_0xe976[29]]();mxRectangleShape[_0xe976[0]][_0xe976[27]][_0xe976[30]](this,arguments)};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[31]]=_0xeb1ax14;function _0xeb1ax17(){mxRectangleShape[_0xe976[24]](this)}mxUtils[_0xe976[25]](_0xeb1ax17,mxRectangleShape);_0xeb1ax17[_0xe976[0]][_0xe976[26]]=function(){return false};_0xeb1ax17[_0xe976[0]][_0xe976[27]]=function(_0xeb1ax15,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6){if(this[_0xe976[4]]!=null){if(this[_0xe976[4]][_0xe976[32]]==1){var _0xeb1ax18=Math[_0xe976[34]](2,this[_0xe976[33]]+1);mxRectangleShape[_0xe976[0]][_0xe976[35]][_0xe976[24]](this,_0xeb1ax15,_0xeb1ax3+_0xeb1ax18,_0xeb1ax4+_0xeb1ax18,_0xeb1ax5-2*_0xeb1ax18,_0xeb1ax6-2*_0xeb1ax18);mxRectangleShape[_0xe976[0]][_0xe976[27]][_0xe976[30]](this,arguments);_0xeb1ax3+=_0xeb1ax18;_0xeb1ax4+=_0xeb1ax18;_0xeb1ax5-=2*_0xeb1ax18;_0xeb1ax6-=2*_0xeb1ax18};_0xeb1ax15[_0xe976[36]](false);var _0xeb1ax19=0;var _0xeb1ax1a=null;do{_0xeb1ax1a=mxCellRenderer[_0xe976[0]][_0xe976[12]][this[_0xe976[4]][_0xe976[37]+_0xeb1ax19]];if(_0xeb1ax1a!=null){var _0xeb1ax1b=this[_0xe976[4]][_0xe976[37]+_0xeb1ax19+_0xe976[38]];var _0xeb1ax1c=this[_0xe976[4]][_0xe976[37]+_0xeb1ax19+_0xe976[39]];var _0xeb1ax1d=this[_0xe976[4]][_0xe976[37]+_0xeb1ax19+_0xe976[40]];var _0xeb1ax1e=this[_0xe976[4]][_0xe976[37]+_0xeb1ax19+_0xe976[41]];var _0xeb1ax1f=this[_0xe976[4]][_0xe976[37]+_0xeb1ax19+_0xe976[42]]||0;var _0xeb1ax20=this[_0xe976[4]][_0xe976[37]+_0xeb1ax19+_0xe976[43]];if(_0xeb1ax20!=null){_0xeb1ax1f+=this[_0xe976[44]](_0xeb1ax5+this[_0xe976[33]],_0xeb1ax6+this[_0xe976[33]])*_0xeb1ax20};var _0xeb1ax21=_0xeb1ax3;var _0xeb1ax22=_0xeb1ax4;if(_0xeb1ax1b==mxConstants[_0xe976[45]]){_0xeb1ax21+=(_0xeb1ax5-_0xeb1ax1d)/2}else {if(_0xeb1ax1b==mxConstants[_0xe976[46]]){_0xeb1ax21+=_0xeb1ax5-_0xeb1ax1d-_0xeb1ax1f}else {_0xeb1ax21+=_0xeb1ax1f}};if(_0xeb1ax1c==mxConstants[_0xe976[47]]){_0xeb1ax22+=(_0xeb1ax6-_0xeb1ax1e)/2}else {if(_0xeb1ax1c==mxConstants[_0xe976[48]]){_0xeb1ax22+=_0xeb1ax6-_0xeb1ax1e-_0xeb1ax1f}else {_0xeb1ax22+=_0xeb1ax1f}};_0xeb1ax15[_0xe976[49]]();var _0xeb1ax23= new _0xeb1ax1a();_0xeb1ax23[_0xe976[4]]=this[_0xe976[4]];_0xeb1ax1a[_0xe976[0]][_0xe976[50]][_0xe976[24]](_0xeb1ax23,_0xeb1ax15,_0xeb1ax21,_0xeb1ax22,_0xeb1ax1d,_0xeb1ax1e);_0xeb1ax15[_0xe976[51]]()};_0xeb1ax19++}while(_0xeb1ax1a!=null);}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[52]]=_0xeb1ax17;function _0xeb1ax24(){}_0xeb1ax24[_0xe976[0]]= new mxCylinder();_0xeb1ax24[_0xe976[0]][_0xe976[1]]=_0xeb1ax24;_0xeb1ax24[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){if(_0xeb1ax7){_0xeb1ax2[_0xe976[7]](0,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5/2,_0xeb1ax6/2);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,0);_0xeb1ax2[_0xe976[9]]()}else {_0xeb1ax2[_0xe976[7]](0,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6);_0xeb1ax2[_0xe976[10]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[53]]=_0xeb1ax24;function _0xeb1ax25(){}_0xeb1ax25[_0xe976[0]]= new mxCylinder();_0xeb1ax25[_0xe976[0]][_0xe976[1]]=_0xeb1ax25;_0xeb1ax25[_0xe976[0]][_0xe976[54]]=true;_0xeb1ax25[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1ax1d=_0xeb1ax5/3;var _0xeb1ax1e=_0xeb1ax6/4;if(!_0xeb1ax7){_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,_0xeb1ax1e);_0xeb1ax2[_0xe976[55]](_0xeb1ax5/2-_0xeb1ax1d,_0xeb1ax1e,_0xeb1ax5/2-_0xeb1ax1d,0,_0xeb1ax5/2,0);_0xeb1ax2[_0xe976[55]](_0xeb1ax5/2+_0xeb1ax1d,0,_0xeb1ax5/2+_0xeb1ax1d,_0xeb1ax1e,_0xeb1ax5/2,_0xeb1ax1e);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,_0xeb1ax1e);_0xeb1ax2[_0xe976[8]](_0xeb1ax5/2,2*_0xeb1ax6/3);_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,_0xeb1ax6/3);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6/3);_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,_0xeb1ax6/3);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6/3);_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,2*_0xeb1ax6/3);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax6);_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,2*_0xeb1ax6/3);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6);_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[56]]=_0xeb1ax25;function _0xeb1ax26(){}_0xeb1ax26[_0xe976[0]]= new mxCylinder();_0xeb1ax26[_0xe976[0]][_0xe976[1]]=_0xeb1ax26;_0xeb1ax26[_0xe976[0]][_0xe976[2]]=10;_0xeb1ax26[_0xe976[0]][_0xe976[54]]=true;_0xeb1ax26[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1ax27=mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[2],this[_0xe976[2]]);var _0xeb1ax1d=_0xeb1ax27*2/3;var _0xeb1ax1e=_0xeb1ax27;if(!_0xeb1ax7){_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,_0xeb1ax1e);_0xeb1ax2[_0xe976[55]](_0xeb1ax5/2-_0xeb1ax1d,_0xeb1ax1e,_0xeb1ax5/2-_0xeb1ax1d,0,_0xeb1ax5/2,0);_0xeb1ax2[_0xe976[55]](_0xeb1ax5/2+_0xeb1ax1d,0,_0xeb1ax5/2+_0xeb1ax1d,_0xeb1ax1e,_0xeb1ax5/2,_0xeb1ax1e);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[7]](_0xeb1ax5/2,_0xeb1ax1e);_0xeb1ax2[_0xe976[8]](_0xeb1ax5/2,_0xeb1ax6);_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[57]]=_0xeb1ax26;function _0xeb1ax28(){}_0xeb1ax28[_0xe976[0]]= new mxCylinder();_0xeb1ax28[_0xe976[0]][_0xe976[1]]=_0xeb1ax28;_0xeb1ax28[_0xe976[0]][_0xe976[58]]=32;_0xeb1ax28[_0xe976[0]][_0xe976[59]]=12;_0xeb1ax28[_0xe976[0]][_0xe976[3]]=function(_0xeb1ax2,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6,_0xeb1ax7){var _0xeb1axe=mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[58],this[_0xe976[58]]);var _0xeb1axf=mxUtils[_0xe976[5]](this[_0xe976[4]],_0xe976[59],this[_0xe976[59]]);var _0xeb1ax29=_0xeb1axe/2;var _0xeb1ax2a=_0xeb1ax29+_0xeb1axe/2;var _0xeb1ax2b=0.3*_0xeb1ax6-_0xeb1axf/2;var _0xeb1ax2c=0.7*_0xeb1ax6-_0xeb1axf/2;if(_0xeb1ax7){_0xeb1ax2[_0xe976[7]](_0xeb1ax29,_0xeb1ax2b);_0xeb1ax2[_0xe976[8]](_0xeb1ax2a,_0xeb1ax2b);_0xeb1ax2[_0xe976[8]](_0xeb1ax2a,_0xeb1ax2b+_0xeb1axf);_0xeb1ax2[_0xe976[8]](_0xeb1ax29,_0xeb1ax2b+_0xeb1axf);_0xeb1ax2[_0xe976[7]](_0xeb1ax29,_0xeb1ax2c);_0xeb1ax2[_0xe976[8]](_0xeb1ax2a,_0xeb1ax2c);_0xeb1ax2[_0xe976[8]](_0xeb1ax2a,_0xeb1ax2c+_0xeb1axf);_0xeb1ax2[_0xe976[8]](_0xeb1ax29,_0xeb1ax2c+_0xeb1axf);_0xeb1ax2[_0xe976[9]]()}else {_0xeb1ax2[_0xe976[7]](_0xeb1ax29,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,0);_0xeb1ax2[_0xe976[8]](_0xeb1ax5,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](_0xeb1ax29,_0xeb1ax6);_0xeb1ax2[_0xe976[8]](_0xeb1ax29,_0xeb1ax2c+_0xeb1axf);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax2c+_0xeb1axf);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax2c);_0xeb1ax2[_0xe976[8]](_0xeb1ax29,_0xeb1ax2c);_0xeb1ax2[_0xe976[8]](_0xeb1ax29,_0xeb1ax2b+_0xeb1axf);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax2b+_0xeb1axf);_0xeb1ax2[_0xe976[8]](0,_0xeb1ax2b);_0xeb1ax2[_0xe976[8]](_0xeb1ax29,_0xeb1ax2b);_0xeb1ax2[_0xe976[10]]();_0xeb1ax2[_0xe976[9]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[60]]=_0xeb1ax28;function _0xeb1ax2d(){}_0xeb1ax2d[_0xe976[0]]= new mxDoubleEllipse();_0xeb1ax2d[_0xe976[0]][_0xe976[1]]=_0xeb1ax2d;_0xeb1ax2d[_0xe976[0]][_0xe976[61]]=true;_0xeb1ax2d[_0xe976[0]][_0xe976[50]]=function(_0xeb1ax15,_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6){var _0xeb1ax18=Math[_0xe976[6]](4,Math[_0xe976[6]](_0xeb1ax5/5,_0xeb1ax6/5));if(_0xeb1ax5>0&&_0xeb1ax6>0){_0xeb1ax15[_0xe976[62]](_0xeb1ax3+_0xeb1ax18,_0xeb1ax4+_0xeb1ax18,_0xeb1ax5-2*_0xeb1ax18,_0xeb1ax6-2*_0xeb1ax18);_0xeb1ax15[_0xe976[63]]()};_0xeb1ax15[_0xe976[64]](false);if(this[_0xe976[61]]){_0xeb1ax15[_0xe976[62]](_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6);_0xeb1ax15[_0xe976[29]]()}};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[65]]=_0xeb1ax2d;function _0xeb1ax2e(){}_0xeb1ax2e[_0xe976[0]]= new _0xeb1ax2d();_0xeb1ax2e[_0xe976[0]][_0xe976[1]]=_0xeb1ax2e;_0xeb1ax2e[_0xe976[0]][_0xe976[61]]=false;mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[66]]=_0xeb1ax2e;var _0xeb1ax2f=mxImageExport[_0xe976[0]][_0xe976[67]];mxImageExport[_0xe976[0]][_0xe976[67]]=function(){_0xeb1ax2f[_0xe976[30]](this,arguments);function _0xeb1ax30(_0xeb1ax31){return {drawShape:function(_0xeb1ax32,_0xeb1ax33,_0xeb1ax34,_0xeb1ax35){var _0xeb1ax3=_0xeb1ax34[_0xe976[68]];var _0xeb1ax4=_0xeb1ax34[_0xe976[69]];var _0xeb1ax5=_0xeb1ax34[_0xe976[70]];var _0xeb1ax6=_0xeb1ax34[_0xe976[71]];if(_0xeb1ax35){var _0xeb1ax18=Math[_0xe976[6]](4,Math[_0xe976[6]](_0xeb1ax5/5,_0xeb1ax6/5));_0xeb1ax3+=_0xeb1ax18;_0xeb1ax4+=_0xeb1ax18;_0xeb1ax5-=2*_0xeb1ax18;_0xeb1ax6-=2*_0xeb1ax18;if(_0xeb1ax5>0&&_0xeb1ax6>0){_0xeb1ax32[_0xe976[62]](_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6)};return true}else {_0xeb1ax32[_0xe976[63]]();if(_0xeb1ax31){_0xeb1ax32[_0xe976[62]](_0xeb1ax3,_0xeb1ax4,_0xeb1ax5,_0xeb1ax6);_0xeb1ax32[_0xe976[29]]()}}}}}this[_0xe976[72]][_0xe976[65]]=_0xeb1ax30(true);this[_0xe976[72]][_0xe976[66]]=_0xeb1ax30(false)};function _0xeb1ax36(){mxArrow[_0xe976[24]](this)}mxUtils[_0xe976[25]](_0xeb1ax36,mxArrow);_0xeb1ax36[_0xe976[0]][_0xe976[73]]=function(_0xeb1ax15,_0xeb1ax37){var _0xeb1ax1d=10;var _0xeb1ax38=_0xeb1ax37[0];var _0xeb1ax39=_0xeb1ax37[_0xeb1ax37[_0xe976[74]]-1];var _0xeb1axe=_0xeb1ax39[_0xe976[68]]-_0xeb1ax38[_0xe976[68]];var _0xeb1axf=_0xeb1ax39[_0xe976[69]]-_0xeb1ax38[_0xe976[69]];var _0xeb1ax3a=Math[_0xe976[75]](_0xeb1axe*_0xeb1axe+_0xeb1axf*_0xeb1axf);var _0xeb1ax3b=_0xeb1ax3a;var _0xeb1ax3c=_0xeb1axe/_0xeb1ax3a;var _0xeb1ax3d=_0xeb1axf/_0xeb1ax3a;var _0xeb1ax3e=_0xeb1ax3b*_0xeb1ax3c;var _0xeb1ax3f=_0xeb1ax3b*_0xeb1ax3d;var _0xeb1ax40=_0xeb1ax1d*_0xeb1ax3d/3;var _0xeb1ax41=-_0xeb1ax1d*_0xeb1ax3c/3;var _0xeb1ax42=_0xeb1ax38[_0xe976[68]]-_0xeb1ax40/2;var _0xeb1ax43=_0xeb1ax38[_0xe976[69]]-_0xeb1ax41/2;var _0xeb1ax44=_0xeb1ax42+_0xeb1ax40;var _0xeb1ax45=_0xeb1ax43+_0xeb1ax41;var _0xeb1ax46=_0xeb1ax44+_0xeb1ax3e;var _0xeb1ax47=_0xeb1ax45+_0xeb1ax3f;var _0xeb1ax48=_0xeb1ax46+_0xeb1ax40;var _0xeb1ax49=_0xeb1ax47+_0xeb1ax41;var _0xeb1ax4a=_0xeb1ax48-3*_0xeb1ax40;var _0xeb1ax4b=_0xeb1ax49-3*_0xeb1ax41;_0xeb1ax15[_0xe976[28]]();_0xeb1ax15[_0xe976[7]](_0xeb1ax44,_0xeb1ax45);_0xeb1ax15[_0xe976[8]](_0xeb1ax46,_0xeb1ax47);_0xeb1ax15[_0xe976[7]](_0xeb1ax4a+_0xeb1ax40,_0xeb1ax4b+_0xeb1ax41);_0xeb1ax15[_0xe976[8]](_0xeb1ax42,_0xeb1ax43);_0xeb1ax15[_0xe976[29]]()};mxCellRenderer[_0xe976[0]][_0xe976[12]][_0xe976[76]]=_0xeb1ax36;mxMarker[_0xe976[78]](_0xe976[77],function(_0xeb1ax32,_0xeb1ax1a,_0xeb1ax4c,_0xeb1ax39,_0xeb1ax4d,_0xeb1ax4e,_0xeb1ax4f,_0xeb1ax50,_0xeb1ax51,_0xeb1ax52){var _0xeb1ax3c=_0xeb1ax4d*(_0xeb1ax4f+_0xeb1ax51+1);var _0xeb1ax3d=_0xeb1ax4e*(_0xeb1ax4f+_0xeb1ax51+1);return function(){_0xeb1ax32[_0xe976[28]]();_0xeb1ax32[_0xe976[7]](_0xeb1ax39[_0xe976[68]]-_0xeb1ax3c/2-_0xeb1ax3d/2,_0xeb1ax39[_0xe976[69]]-_0xeb1ax3d/2+_0xeb1ax3c/2);_0xeb1ax32[_0xe976[8]](_0xeb1ax39[_0xe976[68]]+_0xeb1ax3d/2-3*_0xeb1ax3c/2,_0xeb1ax39[_0xe976[69]]-3*_0xeb1ax3d/2-_0xeb1ax3c/2);_0xeb1ax32[_0xe976[29]]()}});var _0xeb1ax53=-99;if( typeof (mxVertexHandler)!=_0xe976[79]){function _0xeb1ax54(_0xeb1ax33){mxVertexHandler[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax54,mxVertexHandler);_0xeb1ax54[_0xe976[0]][_0xe976[80]]=false;_0xeb1ax54[_0xe976[0]][_0xe976[81]]=function(){this[_0xe976[82]]=mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],mxConstants.STYLE_HORIZONTAL,true);var _0xeb1ax55=this[_0xe976[83]][_0xe976[85]][_0xe976[84]];if(this[_0xe976[86]]!=null){var _0xeb1ax34= new mxRectangle(0,0,this[_0xe976[86]][_0xe976[70]],this[_0xe976[86]][_0xe976[71]]);this[_0xe976[87]]= new mxImageShape(_0xeb1ax34,this[_0xe976[86]][_0xe976[88]])}else {var _0xeb1ax4f=10;var _0xeb1ax34= new mxRectangle(0,0,_0xeb1ax4f,_0xeb1ax4f);this[_0xe976[87]]= new mxRhombus(_0xeb1ax34,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};this[_0xe976[87]][_0xe976[89]]=(_0xeb1ax55[_0xe976[89]]!=mxConstants[_0xe976[90]])?mxConstants[_0xe976[91]]:mxConstants[_0xe976[90]];this[_0xe976[87]][_0xe976[81]](_0xeb1ax55[_0xe976[93]]()[_0xe976[92]]());this[_0xe976[87]][_0xe976[95]][_0xe976[4]][_0xe976[94]]=this[_0xe976[96]]();mxEvent[_0xe976[97]](this[_0xe976[87]][_0xe976[95]],_0xeb1ax55,this[_0xe976[83]]);mxVertexHandler[_0xe976[0]][_0xe976[81]][_0xe976[30]](this,arguments)};_0xeb1ax54[_0xe976[0]][_0xe976[96]]=function(){return _0xe976[98]};_0xeb1ax54[_0xe976[0]][_0xe976[99]]=function(){mxVertexHandler[_0xe976[0]][_0xe976[99]][_0xe976[30]](this,arguments);var _0xeb1ax4f=this[_0xe976[87]][_0xe976[100]][_0xe976[70]];this[_0xe976[87]][_0xe976[100]]=this[_0xe976[101]](_0xeb1ax4f);this[_0xe976[87]][_0xe976[99]]()};_0xeb1ax54[_0xe976[0]][_0xe976[102]]=function(){mxVertexHandler[_0xe976[0]][_0xe976[102]][_0xe976[30]](this,arguments);if(this[_0xe976[87]]!=null){this[_0xe976[87]][_0xe976[102]]();this[_0xe976[87]]=null}};_0xeb1ax54[_0xe976[0]][_0xe976[103]]=function(_0xeb1ax56){if(_0xeb1ax56[_0xe976[104]](this[_0xe976[87]])){return _0xeb1ax53};return mxVertexHandler[_0xe976[0]][_0xe976[103]][_0xe976[30]](this,arguments)};_0xeb1ax54[_0xe976[0]][_0xe976[105]]=function(_0xeb1ax57,_0xeb1ax56){if(!_0xeb1ax56[_0xe976[106]]()&&this[_0xe976[107]]==_0xeb1ax53){var _0xeb1ax58= new mxPoint(_0xeb1ax56[_0xe976[108]](),_0xeb1ax56[_0xe976[109]]());this[_0xe976[110]](_0xeb1ax58);var _0xeb1ax59=this[_0xe976[84]][_0xe976[112]](_0xeb1ax56[_0xe976[111]]());var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];if(_0xeb1ax59&&this[_0xe976[80]]){_0xeb1ax58[_0xe976[68]]=this[_0xe976[84]][_0xe976[114]](_0xeb1ax58[_0xe976[68]]/_0xeb1ax5a)*_0xeb1ax5a;_0xeb1ax58[_0xe976[69]]=this[_0xe976[84]][_0xe976[114]](_0xeb1ax58[_0xe976[69]]/_0xeb1ax5a)*_0xeb1ax5a};this[_0xe976[115]](_0xeb1ax58);this[_0xe976[116]](this[_0xe976[87]],_0xeb1ax58[_0xe976[68]],_0xeb1ax58[_0xe976[69]]);this[_0xe976[83]][_0xe976[85]][_0xe976[84]][_0xe976[117]][_0xe976[99]](this[_0xe976[83]],true);_0xeb1ax56[_0xe976[118]]()}else {mxVertexHandler[_0xe976[0]][_0xe976[105]][_0xe976[30]](this,arguments)}};_0xeb1ax54[_0xe976[0]][_0xe976[119]]=function(_0xeb1ax57,_0xeb1ax56){if(!_0xeb1ax56[_0xe976[106]]()&&this[_0xe976[107]]==_0xeb1ax53){this[_0xe976[120]]();this[_0xe976[121]]();_0xeb1ax56[_0xe976[118]]()}else {mxVertexHandler[_0xe976[0]][_0xe976[119]][_0xe976[30]](this,arguments)}};_0xeb1ax54[_0xe976[0]][_0xe976[101]]=function(_0xeb1ax4f){var _0xeb1ax5b=this[_0xe976[83]][_0xe976[123]][_0xe976[122]]();var _0xeb1ax5c=mxUtils[_0xe976[124]](_0xeb1ax5b);var _0xeb1ax5d=Math[_0xe976[125]](_0xeb1ax5c);var _0xeb1ax5e=Math[_0xe976[126]](_0xeb1ax5c);var _0xeb1ax34= new mxRectangle(this[_0xe976[83]][_0xe976[68]],this[_0xe976[83]][_0xe976[69]],this[_0xe976[83]][_0xe976[70]],this[_0xe976[83]][_0xe976[71]]);if(this[_0xe976[83]][_0xe976[123]][_0xe976[127]]()){var _0xeb1ax5f=(_0xeb1ax34[_0xe976[70]]-_0xeb1ax34[_0xe976[71]])/2;_0xeb1ax34[_0xe976[68]]+=_0xeb1ax5f;_0xeb1ax34[_0xe976[69]]-=_0xeb1ax5f;var _0xeb1ax23=_0xeb1ax34[_0xe976[70]];_0xeb1ax34[_0xe976[70]]=_0xeb1ax34[_0xe976[71]];_0xeb1ax34[_0xe976[71]]=_0xeb1ax23};var _0xeb1ax60=this[_0xe976[128]](_0xeb1ax34);if(this[_0xe976[83]][_0xe976[123]][_0xe976[129]]){_0xeb1ax60[_0xe976[68]]=2*_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]-_0xeb1ax60[_0xe976[68]]};if(this[_0xe976[83]][_0xe976[123]][_0xe976[130]]){_0xeb1ax60[_0xe976[69]]=2*_0xeb1ax34[_0xe976[69]]+_0xeb1ax34[_0xe976[71]]-_0xeb1ax60[_0xe976[69]]};_0xeb1ax60=mxUtils[_0xe976[133]](_0xeb1ax60,_0xeb1ax5d,_0xeb1ax5e, new mxPoint(this[_0xe976[83]][_0xe976[131]](),this[_0xe976[83]][_0xe976[132]]()));return  new mxRectangle(_0xeb1ax60[_0xe976[68]]-_0xeb1ax4f/2,_0xeb1ax60[_0xe976[69]]-_0xeb1ax4f/2,_0xeb1ax4f,_0xeb1ax4f)};_0xeb1ax54[_0xe976[0]][_0xe976[128]]=function(_0xeb1ax34){return null};_0xeb1ax54[_0xe976[0]][_0xe976[115]]=function(_0xeb1ax58){};_0xeb1ax54[_0xe976[0]][_0xe976[110]]=function(_0xeb1ax58){_0xeb1ax58[_0xe976[68]]=Math[_0xe976[34]](this[_0xe976[83]][_0xe976[68]],Math[_0xe976[6]](this[_0xe976[83]][_0xe976[68]]+this[_0xe976[83]][_0xe976[70]],_0xeb1ax58[_0xe976[68]]));_0xeb1ax58[_0xe976[69]]=Math[_0xe976[34]](this[_0xe976[83]][_0xe976[69]],Math[_0xe976[6]](this[_0xe976[83]][_0xe976[69]]+this[_0xe976[83]][_0xe976[71]],_0xeb1ax58[_0xe976[69]]))};_0xeb1ax54[_0xe976[0]][_0xe976[120]]=function(){};function _0xeb1ax61(_0xeb1ax33){_0xeb1ax54[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax61,_0xeb1ax54);_0xeb1ax61[_0xe976[0]][_0xe976[128]]=function(_0xeb1ax34){var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];var _0xeb1axb=Math[_0xe976[6]](_0xeb1ax34[_0xe976[70]],mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[14],60)*_0xeb1ax5a);var _0xeb1axc=Math[_0xe976[6]](_0xeb1ax34[_0xe976[71]],mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[15],20)*_0xeb1ax5a);var _0xeb1axd=mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[16],_0xe976[17]);var _0xeb1ax3=(_0xeb1axd==_0xe976[18])?_0xeb1ax34[_0xe976[68]]+_0xeb1axb:_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]-_0xeb1axb;return  new mxPoint(_0xeb1ax3,_0xeb1ax34[_0xe976[69]]+_0xeb1axc)};_0xeb1ax61[_0xe976[0]][_0xe976[115]]=function(_0xeb1ax58){var _0xeb1ax5b=this[_0xe976[83]][_0xe976[123]][_0xe976[122]]();var _0xeb1ax5c=mxUtils[_0xe976[124]](_0xeb1ax5b);var _0xeb1ax5d=Math[_0xe976[125]](-_0xeb1ax5c);var _0xeb1ax5e=Math[_0xe976[126]](-_0xeb1ax5c);var _0xeb1ax34= new mxRectangle(this[_0xe976[83]][_0xe976[68]],this[_0xe976[83]][_0xe976[69]],this[_0xe976[83]][_0xe976[70]],this[_0xe976[83]][_0xe976[71]]);if(this[_0xe976[83]][_0xe976[123]][_0xe976[127]]()){var _0xeb1ax5f=(_0xeb1ax34[_0xe976[70]]-_0xeb1ax34[_0xe976[71]])/2;_0xeb1ax34[_0xe976[68]]+=_0xeb1ax5f;_0xeb1ax34[_0xe976[69]]-=_0xeb1ax5f;var _0xeb1ax23=_0xeb1ax34[_0xe976[70]];_0xeb1ax34[_0xe976[70]]=_0xeb1ax34[_0xe976[71]];_0xeb1ax34[_0xe976[71]]=_0xeb1ax23};var _0xeb1ax60= new mxPoint(_0xeb1ax58[_0xe976[68]],_0xeb1ax58[_0xe976[69]]);_0xeb1ax60=mxUtils[_0xe976[133]](_0xeb1ax60,_0xeb1ax5d,_0xeb1ax5e, new mxPoint(this[_0xe976[83]][_0xe976[131]](),this[_0xe976[83]][_0xe976[132]]()));if(this[_0xe976[83]][_0xe976[123]][_0xe976[129]]){_0xeb1ax60[_0xe976[68]]=2*_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]-_0xeb1ax60[_0xe976[68]]};if(this[_0xe976[83]][_0xe976[123]][_0xe976[130]]){_0xeb1ax60[_0xe976[69]]=2*_0xeb1ax34[_0xe976[69]]+_0xeb1ax34[_0xe976[71]]-_0xeb1ax60[_0xe976[69]]};var _0xeb1ax62=this[_0xe976[134]](_0xeb1ax60,_0xeb1ax34);if(_0xeb1ax62!=null){if(this[_0xe976[83]][_0xe976[123]][_0xe976[129]]){_0xeb1ax62[_0xe976[68]]=2*_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]-_0xeb1ax62[_0xe976[68]]};if(this[_0xe976[83]][_0xe976[123]][_0xe976[130]]){_0xeb1ax62[_0xe976[69]]=2*_0xeb1ax34[_0xe976[69]]+_0xeb1ax34[_0xe976[71]]-_0xeb1ax62[_0xe976[69]]};_0xeb1ax5d=Math[_0xe976[125]](_0xeb1ax5c);_0xeb1ax5e=Math[_0xe976[126]](_0xeb1ax5c);_0xeb1ax62=mxUtils[_0xe976[133]](_0xeb1ax62,_0xeb1ax5d,_0xeb1ax5e, new mxPoint(this[_0xe976[83]][_0xe976[131]](),this[_0xe976[83]][_0xe976[132]]()));_0xeb1ax58[_0xe976[68]]=_0xeb1ax62[_0xe976[68]];_0xeb1ax58[_0xe976[69]]=_0xeb1ax62[_0xe976[69]]}};_0xeb1ax61[_0xe976[0]][_0xe976[134]]=function(_0xeb1ax60,_0xeb1ax34){var _0xeb1axd=mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[16],_0xe976[17]);var _0xeb1axb=(_0xeb1axd==_0xe976[18])?_0xeb1ax60[_0xe976[68]]-_0xeb1ax34[_0xe976[68]]:_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]-_0xeb1ax60[_0xe976[68]];var _0xeb1axc=_0xeb1ax60[_0xe976[69]]-_0xeb1ax34[_0xe976[69]];var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];this[_0xe976[83]][_0xe976[4]][_0xe976[14]]=Math[_0xe976[135]](Math[_0xe976[34]](1,_0xeb1axb)/_0xeb1ax5a);this[_0xe976[83]][_0xe976[4]][_0xe976[15]]=Math[_0xe976[135]](Math[_0xe976[34]](1,_0xeb1axc)/_0xeb1ax5a)};_0xeb1ax61[_0xe976[0]][_0xe976[120]]=function(){var _0xeb1ax63=this[_0xe976[84]][_0xe976[136]]();_0xeb1ax63[_0xe976[137]]();try{this[_0xe976[83]][_0xe976[85]][_0xe976[84]][_0xe976[139]](_0xe976[14],this[_0xe976[83]][_0xe976[4]][_0xe976[14]],[this[_0xe976[83]][_0xe976[138]]]);this[_0xe976[83]][_0xe976[85]][_0xe976[84]][_0xe976[139]](_0xe976[15],this[_0xe976[83]][_0xe976[4]][_0xe976[15]],[this[_0xe976[83]][_0xe976[138]]])}finally{_0xeb1ax63[_0xe976[140]]()}};function _0xeb1ax64(_0xeb1ax33){_0xeb1ax61[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax64,_0xeb1ax61);_0xeb1ax64[_0xe976[0]][_0xe976[128]]=function(_0xeb1ax34){var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];var _0xeb1ax65=mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]/2,_0xeb1ax34[_0xe976[69]]+Math[_0xe976[6]](_0xeb1ax34[_0xe976[71]],_0xeb1ax65*_0xeb1ax5a))};_0xeb1ax64[_0xe976[0]][_0xe976[134]]=function(_0xeb1ax58,_0xeb1ax34){_0xeb1ax58[_0xe976[68]]=_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]/2;startSize=_0xeb1ax58[_0xe976[69]]-_0xeb1ax34[_0xe976[69]];var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];this[_0xe976[83]][_0xe976[4]][_0xe976[141]]=Math[_0xe976[135]](Math[_0xe976[34]](1,startSize)/_0xeb1ax5a);return _0xeb1ax58};_0xeb1ax64[_0xe976[0]][_0xe976[120]]=function(){this[_0xe976[83]][_0xe976[85]][_0xe976[84]][_0xe976[139]](_0xe976[141],this[_0xe976[83]][_0xe976[4]][_0xe976[141]],[this[_0xe976[83]][_0xe976[138]]])};function _0xeb1ax66(_0xeb1ax33){_0xeb1ax61[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax66,_0xeb1ax61);_0xeb1ax66[_0xe976[0]][_0xe976[142]]=20;_0xeb1ax66[_0xe976[0]][_0xe976[143]]=1;_0xeb1ax66[_0xe976[0]][_0xe976[128]]=function(_0xeb1ax34){var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];var _0xeb1ax67=Math[_0xe976[6]](_0xeb1ax34[_0xe976[70]],Math[_0xe976[6]](_0xeb1ax34[_0xe976[71]],mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[2],this[_0xe976[142]])*_0xeb1ax5a/this[_0xe976[143]]));return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax67,_0xeb1ax34[_0xe976[69]]+_0xeb1ax67)};_0xeb1ax66[_0xe976[0]][_0xe976[134]]=function(_0xeb1ax60,_0xeb1ax34){var _0xeb1ax4f=Math[_0xe976[34]](0,Math[_0xe976[6]](Math[_0xe976[6]](_0xeb1ax34[_0xe976[70]]/this[_0xe976[143]],_0xeb1ax60[_0xe976[68]]-_0xeb1ax34[_0xe976[68]]),Math[_0xe976[6]](_0xeb1ax34[_0xe976[71]]/this[_0xe976[143]],_0xeb1ax60[_0xe976[69]]-_0xeb1ax34[_0xe976[69]])));var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];this[_0xe976[83]][_0xe976[4]][_0xe976[2]]=Math[_0xe976[135]](Math[_0xe976[34]](1,_0xeb1ax4f)/_0xeb1ax5a)*this[_0xe976[143]];return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax4f,_0xeb1ax34[_0xe976[69]]+_0xeb1ax4f)};_0xeb1ax66[_0xe976[0]][_0xe976[120]]=function(){this[_0xe976[83]][_0xe976[85]][_0xe976[84]][_0xe976[139]](_0xe976[2],this[_0xe976[83]][_0xe976[4]][_0xe976[2]],[this[_0xe976[83]][_0xe976[138]]])};function _0xeb1ax68(_0xeb1ax33){_0xeb1ax66[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax68,_0xeb1ax66);_0xeb1ax68[_0xe976[0]][_0xe976[142]]=30;_0xeb1ax68[_0xe976[0]][_0xe976[143]]=2;function _0xeb1ax69(_0xeb1ax33){_0xeb1ax66[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax69,_0xeb1ax66);_0xeb1ax69[_0xe976[0]][_0xe976[142]]=30;_0xeb1ax69[_0xe976[0]][_0xe976[143]]=1;_0xeb1ax69[_0xe976[0]][_0xe976[128]]=function(_0xeb1ax34){var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];var _0xeb1ax67=Math[_0xe976[6]](_0xeb1ax34[_0xe976[70]],Math[_0xe976[6]](_0xeb1ax34[_0xe976[71]],mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[2],this[_0xe976[142]])*_0xeb1ax5a/this[_0xe976[143]]));return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]-_0xeb1ax67,_0xeb1ax34[_0xe976[69]]+_0xeb1ax67)};_0xeb1ax69[_0xe976[0]][_0xe976[134]]=function(_0xeb1ax60,_0xeb1ax34){var _0xeb1ax4f=Math[_0xe976[34]](0,Math[_0xe976[6]](Math[_0xe976[6]](_0xeb1ax34[_0xe976[70]]/this[_0xe976[143]],_0xeb1ax60[_0xe976[68]]-_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]),Math[_0xe976[6]](_0xeb1ax34[_0xe976[71]]/this[_0xe976[143]],_0xeb1ax60[_0xe976[69]]-_0xeb1ax34[_0xe976[69]])));var _0xeb1ax5a=this[_0xe976[84]][_0xe976[93]]()[_0xe976[113]];this[_0xe976[83]][_0xe976[4]][_0xe976[2]]=Math[_0xe976[135]](Math[_0xe976[34]](1,_0xeb1ax4f)/_0xeb1ax5a)*this[_0xe976[143]];return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]-_0xeb1ax4f,_0xeb1ax34[_0xe976[69]]+_0xeb1ax4f)};function _0xeb1ax6a(_0xeb1ax33){_0xeb1ax66[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax6a,_0xeb1ax66);_0xeb1ax6a[_0xe976[0]][_0xe976[142]]=0.2;_0xeb1ax6a[_0xe976[0]][_0xe976[143]]=1;_0xeb1ax6a[_0xe976[0]][_0xe976[128]]=function(_0xeb1ax34){var _0xeb1ax67=mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[2],this[_0xe976[142]]);return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]*_0xeb1ax67,_0xeb1ax34[_0xe976[69]]+_0xeb1ax34[_0xe976[71]]/2)};_0xeb1ax6a[_0xe976[0]][_0xe976[134]]=function(_0xeb1ax60,_0xeb1ax34){var _0xeb1ax4f=Math[_0xe976[6]](1,(_0xeb1ax60[_0xe976[68]]-_0xeb1ax34[_0xe976[68]])/_0xeb1ax34[_0xe976[70]]);this[_0xe976[83]][_0xe976[4]][_0xe976[2]]=_0xeb1ax4f;return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax4f*_0xeb1ax34[_0xe976[70]],_0xeb1ax34[_0xe976[69]]+_0xeb1ax34[_0xe976[71]]/2)};function _0xeb1ax6b(_0xeb1ax33){_0xeb1ax66[_0xe976[24]](this,_0xeb1ax33)}mxUtils[_0xe976[25]](_0xeb1ax6b,_0xeb1ax66);_0xeb1ax6b[_0xe976[0]][_0xe976[142]]=0.4;_0xeb1ax6b[_0xe976[0]][_0xe976[143]]=1;_0xeb1ax6b[_0xe976[0]][_0xe976[128]]=function(_0xeb1ax34){var _0xeb1ax67=mxUtils[_0xe976[5]](this[_0xe976[83]][_0xe976[4]],_0xe976[2],this[_0xe976[142]]);return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]/2,_0xeb1ax34[_0xe976[69]]+_0xeb1ax67*_0xeb1ax34[_0xe976[71]]/2)};_0xeb1ax6b[_0xe976[0]][_0xe976[134]]=function(_0xeb1ax60,_0xeb1ax34){var _0xeb1ax4f=Math[_0xe976[34]](0,Math[_0xe976[6]](1,((_0xeb1ax60[_0xe976[69]]-_0xeb1ax34[_0xe976[69]])/_0xeb1ax34[_0xe976[71]])*2));this[_0xe976[83]][_0xe976[4]][_0xe976[2]]=_0xeb1ax4f;return  new mxPoint(_0xeb1ax34[_0xe976[68]]+_0xeb1ax34[_0xe976[70]]/2,_0xeb1ax34[_0xe976[69]]+_0xeb1ax4f*_0xeb1ax34[_0xe976[71]]/2)};var _0xeb1ax6c={"\x73\x77\x69\x6D\x6C\x61\x6E\x65":_0xeb1ax64,"\x66\x6F\x6C\x64\x65\x72":_0xeb1ax61,"\x63\x75\x62\x65":_0xeb1ax66,"\x63\x61\x72\x64":_0xeb1ax68,"\x6E\x6F\x74\x65":_0xeb1ax69,"\x73\x74\x65\x70":_0xeb1ax6a,"\x74\x61\x70\x65":_0xeb1ax6b};var _0xeb1ax6d=mxGraph[_0xe976[0]][_0xe976[144]];mxGraph[_0xe976[0]][_0xe976[144]]=function(_0xeb1ax33){if(_0xeb1ax33!=null){var _0xeb1ax6e=_0xeb1ax6c[_0xeb1ax33[_0xe976[4]][_0xe976[123]]];if(_0xeb1ax6e!=null){return  new _0xeb1ax6e(_0xeb1ax33)}};return _0xeb1ax6d[_0xe976[30]](this,arguments)}};mxGraph[_0xe976[0]][_0xe976[145]]=function(_0xeb1ax6f,_0xeb1ax50){if(_0xeb1ax6f!=null&&_0xeb1ax6f[_0xe976[123]]!=null){if(_0xeb1ax6f[_0xe976[123]][_0xe976[146]]!=null){if(_0xeb1ax6f[_0xe976[123]][_0xe976[146]]!=null){return _0xeb1ax6f[_0xe976[123]][_0xe976[146]][_0xe976[147]]}}else {if(_0xeb1ax6f[_0xe976[123]][_0xe976[147]]!=null){return _0xeb1ax6f[_0xe976[123]][_0xe976[147]]}}};return null};mxRectangleShape[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxLabel[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];mxImageShape[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];mxSwimlane[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];_0xeb1ax14[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];_0xeb1ax9[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];_0xeb1ax10[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];_0xeb1ax1[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];_0xeb1axa[_0xe976[0]][_0xe976[147]]=mxRectangleShape[_0xe976[0]][_0xe976[147]];mxCylinder[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.15,0.05),false), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.85,0.05),false), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.3),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.7),true), new mxConnectionConstraint( new mxPoint(0.15,0.95),false), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.85,0.95),false)];_0xeb1ax25[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0.1),false), new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.75,0.1),false), new mxConnectionConstraint( new mxPoint(0,1/3),false), new mxConnectionConstraint( new mxPoint(0,1),false), new mxConnectionConstraint( new mxPoint(1,1/3),false), new mxConnectionConstraint( new mxPoint(1,1),false), new mxConnectionConstraint( new mxPoint(0.5,0.5),false)];_0xeb1ax28[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxActor[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.25,0.2),false), new mxConnectionConstraint( new mxPoint(0.1,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.75,0.25),false), new mxConnectionConstraint( new mxPoint(0.9,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];_0xeb1ax11[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0,0.35),false), new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.65),false), new mxConnectionConstraint( new mxPoint(1,0.35),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.65),false), new mxConnectionConstraint( new mxPoint(0.25,1),false), new mxConnectionConstraint( new mxPoint(0.75,0),false)];_0xeb1ax13[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true), new mxConnectionConstraint( new mxPoint(0.1,0.25),false), new mxConnectionConstraint( new mxPoint(0.2,0.5),false), new mxConnectionConstraint( new mxPoint(0.1,0.75),false), new mxConnectionConstraint( new mxPoint(0.9,0.25),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(0.9,0.75),false)];mxLine[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0.25,0.5),false), new mxConnectionConstraint( new mxPoint(0.75,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.5),false)];_0xeb1ax26[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.5,1),false)];mxEllipse[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0,0),true), new mxConnectionConstraint( new mxPoint(1,0),true), new mxConnectionConstraint( new mxPoint(0,1),true), new mxConnectionConstraint( new mxPoint(1,1),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5))];mxDoubleEllipse[_0xe976[0]][_0xe976[147]]=mxEllipse[_0xe976[0]][_0xe976[147]];mxRhombus[_0xe976[0]][_0xe976[147]]=mxEllipse[_0xe976[0]][_0xe976[147]];mxTriangle[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(1,0.5),true)];mxHexagon[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.375,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.625,0),true), new mxConnectionConstraint( new mxPoint(0.125,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0.125,0.75),false), new mxConnectionConstraint( new mxPoint(0.875,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(0.875,0.75),false), new mxConnectionConstraint( new mxPoint(0.375,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.625,1),true)];mxCloud[_0xe976[0]][_0xe976[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0.25),false), new mxConnectionConstraint( new mxPoint(0.4,0.1),false), new mxConnectionConstraint( new mxPoint(0.16,0.55),false), new mxConnectionConstraint( new mxPoint(0.07,0.4),false), new mxConnectionConstraint( new mxPoint(0.31,0.8),false), new mxConnectionConstraint( new mxPoint(0.13,0.77),false), new mxConnectionConstraint( new mxPoint(0.8,0.8),false), new mxConnectionConstraint( new mxPoint(0.55,0.95),false), new mxConnectionConstraint( new mxPoint(0.875,0.5),false), new mxConnectionConstraint( new mxPoint(0.96,0.7),false), new mxConnectionConstraint( new mxPoint(0.625,0.2),false), new mxConnectionConstraint( new mxPoint(0.88,0.25),false)];mxArrow[_0xe976[0]][_0xe976[147]]=null})()
\ No newline at end of file
+/**
+ * $Id: Shapes.js,v 1.13 2013-02-02 06:44:30 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+
+/**
+ * Registers shapes.
+ */
+(function()
+{
+       // Cube Shape, supports size style
+       function CubeShape() { };
+       CubeShape.prototype = new mxCylinder();
+       CubeShape.prototype.constructor = CubeShape;
+       CubeShape.prototype.size = 20;
+       CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+               if (isForeground)
+               {
+                       path.moveTo(s, h);
+                       path.lineTo(s, s);
+                       path.lineTo(0, 0);
+                       path.moveTo(s, s);
+                       path.lineTo(w, s);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w - s, 0);
+                       path.lineTo(w, s);
+                       path.lineTo(w, h);
+                       path.lineTo(s, h);
+                       path.lineTo(0, h - s);
+                       path.lineTo(0, 0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
+
+       // Note Shape, supports size style
+       function NoteShape() { };
+       NoteShape.prototype = new mxCylinder();
+       NoteShape.prototype.constructor = NoteShape;
+       NoteShape.prototype.size = 30;
+       NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+               if (isForeground)
+               {
+                       path.moveTo(w - s, 0);
+                       path.lineTo(w - s, s);
+                       path.lineTo(w, s);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w - s, 0);
+                       path.lineTo(w, s);
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.lineTo(0, 0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
+
+       // Folder Shape, supports tabWidth, tabHeight styles
+       function FolderShape() { };
+       FolderShape.prototype = new mxCylinder();
+       FolderShape.prototype.constructor = FolderShape;
+       FolderShape.prototype.tabWidth = 60;
+       FolderShape.prototype.tabHeight = 20;
+       FolderShape.prototype.tabPosition = 'right';
+       FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
+               var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
+               var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
+               var dx = Math.min(w, tw);
+               var dy = Math.min(h, th);
+
+               if (isForeground)
+               {
+                       if (tp == 'left')
+                       {
+                               path.moveTo(0, dy);
+                               path.lineTo(dx, dy);
+                       }
+                       // Right is default
+                       else
+                       {
+                               path.moveTo(w - dx, dy);
+                               path.lineTo(w, dy);
+                       }
+                       
+                       path.end();
+               }
+               else
+               {
+                       if (tp == 'left')
+                       {
+                               path.moveTo(0, 0);
+                               path.lineTo(dx, 0);
+                               path.lineTo(dx, dy);
+                               path.lineTo(w, dy);
+                       }
+                       // Right is default
+                       else
+                       {
+                               path.moveTo(0, dy);
+                               path.lineTo(w - dx, dy);
+                               path.lineTo(w - dx, 0);
+                               path.lineTo(w, 0);
+                       }
+                       
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.lineTo(0, dy);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
+
+       // Card Shape, supports size style
+       function CardShape() { };
+       CardShape.prototype = new mxCylinder();
+       CardShape.prototype.constructor = CardShape;
+       CardShape.prototype.size = 30;
+       CardShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+               if (!isForeground)
+               {
+                       path.moveTo(s, 0);
+                       path.lineTo(w, 0);
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.lineTo(0, s);
+                       path.lineTo(s, 0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
+
+       // Tape Shape, supports size style
+       function TapeShape() { };
+       TapeShape.prototype = new mxCylinder();
+       TapeShape.prototype.constructor = TapeShape;
+       TapeShape.prototype.size = 0.4;
+       TapeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = mxUtils.getValue(this.style, 'size', this.size);
+               var dy = h * s;
+               var fy = 1.4;
+
+               if (!isForeground)
+               {
+                       path.moveTo(0, dy / 2);
+                       path.quadTo(w / 4, dy * fy, w / 2, dy / 2);
+                       path.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
+                       path.lineTo(w, h - dy / 2);
+                       path.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+                       path.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+                       path.lineTo(0, dy / 2);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
+
+       // Tape Shape, supports size style
+       function StepShape() { };
+       StepShape.prototype = new mxCylinder();
+       StepShape.prototype.constructor = StepShape;
+       StepShape.prototype.size = 0.2;
+       StepShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s =  w * mxUtils.getValue(this.style, 'size', this.size);
+
+               if (!isForeground)
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w - s, 0);
+                       path.lineTo(w, h / 2);
+                       path.lineTo(w - s, h);
+                       path.lineTo(0, h);
+                       path.lineTo(s, h / 2);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
+
+       // Plus Shape
+       function PlusShape()
+       {
+               mxRectangleShape.call(this);
+       };
+       mxUtils.extend(PlusShape, mxRectangleShape);
+       PlusShape.prototype.isHtmlAllowed = function()
+       {
+               return false;
+       };
+       PlusShape.prototype.paintForeground = function(c, x, y, w, h)
+       {
+               var border = Math.min(w / 5, h / 5) + 1;
+               
+               c.begin();
+               c.moveTo(x + w / 2, y + border);
+               c.lineTo(x + w / 2, y + h - border);
+               c.moveTo(x + border, y + h / 2);
+               c.lineTo(x + w - border, y + h / 2);
+               c.end();
+               c.stroke();
+               mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+       };
+
+       mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
+
+       // CompositeShape
+       function ExtendedShape()
+       {
+               mxRectangleShape.call(this);
+       };
+       mxUtils.extend(ExtendedShape, mxRectangleShape);
+       ExtendedShape.prototype.isHtmlAllowed = function()
+       {
+               return false;
+       };
+       ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
+       {
+               if (this.style != null)
+               {
+                       if (this.style['double'] == 1)
+                       {
+                               var inset = Math.max(2, this.strokewidth + 1);
+       
+                               mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+                               mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+                               
+                               x += inset;
+                               y += inset;
+                               w -= 2 * inset;
+                               h -= 2 * inset;
+                       }
+                       
+                       c.setDashed(false);
+                       
+                       // Draws the symbols defined in the style. The symbols are
+                       // numbered from 1...n. Possible postfixes are align,
+                       // verticalAlign, spacing, arcSpacing, width, height
+                       var counter = 0;
+                       var shape = null;
+                       
+                       do
+                       {
+                               shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
+                               
+                               if (shape != null)
+                               {
+                                       var align = this.style['symbol' + counter + 'Align'];
+                                       var valign = this.style['symbol' + counter + 'VerticalAlign'];
+                                       var width = this.style['symbol' + counter + 'Width'];
+                                       var height = this.style['symbol' + counter + 'Height'];
+                                       var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
+                                       var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
+                                       
+                                       if (arcspacing != null)
+                                       {
+                                               spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
+                                       }
+                                       
+                                       var x2 = x;
+                                       var y2 = y;
+                                       
+                                       if (align == mxConstants.ALIGN_CENTER)
+                                       {
+                                               x2 += (w - width) / 2;
+                                       }
+                                       else if (align == mxConstants.ALIGN_RIGHT)
+                                       {
+                                               x2 += w - width - spacing;
+                                       }
+                                       else
+                                       {
+                                               x2 += spacing;
+                                       }
+                                       
+                                       if (valign == mxConstants.ALIGN_MIDDLE)
+                                       {
+                                               y2 += (h - height) / 2;
+                                       }
+                                       else if (valign == mxConstants.ALIGN_BOTTOM)
+                                       {
+                                               y2 += h - height - spacing;
+                                       }
+                                       else
+                                       {
+                                               y2 += spacing;
+                                       }
+                                       
+                                       c.save();
+                                       
+                                       // Small hack to pass style along into subshape
+                                       var tmp = new shape();
+                                       // TODO: Clone style and override settings (eg. strokewidth)
+                                       tmp.style = this.style;
+                                       shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
+                                       c.restore();
+                               }
+                               
+                               counter++;
+                       }
+                       while (shape != null);
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
+       
+       // Tape Shape, supports size style
+       function MessageShape() { };
+       MessageShape.prototype = new mxCylinder();
+       MessageShape.prototype.constructor = MessageShape;
+       MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               if (isForeground)
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w / 2, h / 2);
+                       path.lineTo(w, 0);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w, 0);
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.close();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
+       
+       // New Actor Shape
+       function UmlActorShape() { };
+       UmlActorShape.prototype = new mxCylinder();
+       UmlActorShape.prototype.constructor = UmlActorShape;
+       UmlActorShape.prototype.addPipe = true;
+       UmlActorShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var width = w / 3;
+               var height = h / 4;
+               
+               if (!isForeground)
+               {
+                       path.moveTo(w / 2, height);
+                       path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
+                       path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
+                       path.close();
+
+                       path.moveTo(w / 2, height);
+                       path.lineTo(w / 2, 2 * h / 3);
+                       
+                       // Arms
+                       path.moveTo(w / 2, h / 3);
+                       path.lineTo(0, h / 3);
+                       path.moveTo(w / 2, h / 3);
+                       path.lineTo(w, h / 3);
+                       
+                       // Legs
+                       path.moveTo(w / 2, 2 * h / 3);
+                       path.lineTo(0, h);
+                       path.moveTo(w / 2, 2 * h / 3);
+                       path.lineTo(w, h);
+                       path.end();
+               }
+       };
+
+       // Replaces existing actor shape
+       mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
+
+       // New Actor Shape
+       function LollipopShape() { };
+       LollipopShape.prototype = new mxCylinder();
+       LollipopShape.prototype.constructor = LollipopShape;
+       LollipopShape.prototype.size = 10;
+       LollipopShape.prototype.addPipe = true;
+       LollipopShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var ss = mxUtils.getValue(this.style, 'size', this.size);
+               var width = ss * 2 / 3;
+               var height = ss;
+               
+               if (!isForeground)
+               {
+                       path.moveTo(w / 2, height);
+                       path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
+                       path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
+                       path.close();
+
+                       path.moveTo(w / 2, height);
+                       path.lineTo(w / 2, h);
+                       path.end();
+               }
+       };
+
+       // Replaces existing actor shape
+       mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
+       
+       // Folder Shape, supports tabWidth, tabHeight styles
+       function ComponentShape() { };
+       ComponentShape.prototype = new mxCylinder();
+       ComponentShape.prototype.constructor = ComponentShape;
+       ComponentShape.prototype.jettyWidth = 32;
+       ComponentShape.prototype.jettyHeight = 12;
+       ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
+               var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
+               var x0 = dx / 2;
+               var x1 = x0 + dx / 2;
+               var y0 = 0.3 * h - dy / 2;
+               var y1 = 0.7 * h - dy / 2;
+
+               if (isForeground)
+               {
+                       path.moveTo(x0, y0);
+                       path.lineTo(x1, y0);
+                       path.lineTo(x1, y0 + dy);
+                       path.lineTo(x0, y0 + dy);
+                       path.moveTo(x0, y1);
+                       path.lineTo(x1, y1);
+                       path.lineTo(x1, y1 + dy);
+                       path.lineTo(x0, y1 + dy);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(x0, 0);
+                       path.lineTo(w, 0);
+                       path.lineTo(w, h);
+                       path.lineTo(x0, h);
+                       path.lineTo(x0, y1 + dy);
+                       path.lineTo(0, y1 + dy);
+                       path.lineTo(0, y1);
+                       path.lineTo(x0, y1);
+                       path.lineTo(x0, y0 + dy);
+                       path.lineTo(0, y0 + dy);
+                       path.lineTo(0, y0);
+                       path.lineTo(x0, y0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
+       
+       // State Shapes derives from double ellipse
+       function StateShape() { };
+       StateShape.prototype = new mxDoubleEllipse();
+       StateShape.prototype.constructor = StateShape;
+       StateShape.prototype.outerStroke = true;
+       StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
+       {
+               var inset = Math.min(4, Math.min(w / 5, h / 5));
+               
+               if (w > 0 && h > 0)
+               {
+                       c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+                       c.fillAndStroke();
+               }
+               
+               c.setShadow(false);
+
+               if (this.outerStroke)
+               {
+                       c.ellipse(x, y, w, h);
+                       c.stroke();                     
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
+
+       function StartStateShape() { };
+       StartStateShape.prototype = new StateShape();
+       StartStateShape.prototype.constructor = StartStateShape;
+       StartStateShape.prototype.outerStroke = false;
+       
+       mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
+
+       // Image export for state shapes
+       var imageExportInitShapes = mxImageExport.prototype.initShapes;
+       mxImageExport.prototype.initShapes = function()
+       {
+               imageExportInitShapes.apply(this, arguments);
+
+               function createStateShape(outerStroke)
+               {
+                       return {
+                               drawShape: function(canvas, state, bounds, background)
+                               {
+                                       var x = bounds.x;
+                                       var y = bounds.y;
+                                       var w = bounds.width;
+                                       var h = bounds.height;
+                                       
+                                       if (background)
+                                       {
+                                               var inset = Math.min(4, Math.min(w / 5, h / 5));
+                                               x += inset;
+                                               y += inset;
+                                               w -= 2 * inset;
+                                               h -= 2 * inset;
+                                               
+                                               if (w > 0 && h > 0)
+                                               {
+                                                       canvas.ellipse(x, y, w, h);
+                                               }
+                                               
+                                               return true;
+                                       }
+                                       else
+                                       {
+                                               canvas.fillAndStroke();
+               
+                                               if (outerStroke)
+                                               {
+                                                       canvas.ellipse(x, y, w, h);
+                                                       canvas.stroke();
+                                               }
+                                       }
+                               }
+                       };
+               };
+               
+               this.shapes['endState'] = createStateShape(true);
+               this.shapes['startState'] = createStateShape(false);
+       };
+
+       // Defines custom edge shape
+       function LinkShape()
+       {
+               mxArrow.call(this);
+       };
+       mxUtils.extend(LinkShape, mxArrow);
+       LinkShape.prototype.paintEdgeShape = function(c, pts)
+       {
+               var width = 10;
+
+               // Base vector (between end points)
+               var p0 = pts[0];
+               var pe = pts[pts.length - 1];
+               
+               var dx = pe.x - p0.x;
+               var dy = pe.y - p0.y;
+               var dist = Math.sqrt(dx * dx + dy * dy);
+               var length = dist;
+               
+               // Computes the norm and the inverse norm
+               var nx = dx / dist;
+               var ny = dy / dist;
+               var basex = length * nx;
+               var basey = length * ny;
+               var floorx = width * ny/3;
+               var floory = -width * nx/3;
+               
+               // Computes points
+               var p0x = p0.x - floorx / 2;
+               var p0y = p0.y - floory / 2;
+               var p1x = p0x + floorx;
+               var p1y = p0y + floory;
+               var p2x = p1x + basex;
+               var p2y = p1y + basey;
+               var p3x = p2x + floorx;
+               var p3y = p2y + floory;
+               // p4 not necessary
+               var p5x = p3x - 3 * floorx;
+               var p5y = p3y - 3 * floory;
+               
+               c.begin();
+               c.moveTo(p1x, p1y);
+               c.lineTo(p2x, p2y);
+               c.moveTo(p5x + floorx, p5y + floory);
+               c.lineTo(p0x, p0y);
+               c.stroke();
+       };
+
+       // Registers the link shape
+       mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
+
+       // Registers and defines the custom marker
+       mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
+       {
+               var nx = unitX * (size + sw + 1);
+               var ny = unitY * (size + sw + 1);
+
+               return function()
+               {
+                       canvas.begin();
+                       canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
+                       canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
+                       canvas.stroke();
+               };
+       });
+
+       // Implements custom handlers
+       var SPECIAL_HANDLE_INDEX = -99;
+
+       // Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
+       if (typeof(mxVertexHandler) != 'undefined')
+       {
+               function mxExtVertexHandler(state)
+               {
+                       mxVertexHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
+       
+               mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
+               
+               mxExtVertexHandler.prototype.init = function()
+               {
+                       this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
+                       var graph = this.state.view.graph;
+       
+                       if (this.handleImage != null)
+                       {
+                               var bounds = new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height);
+                               this.specialHandle = new mxImageShape(bounds, this.handleImage.src);
+                       }
+                       else
+                       {
+                               var size = 10;
+                               var bounds = new mxRectangle(0, 0, size, size);
+                               this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+                       }
+                       
+                       this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
+                                       mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
+                       this.specialHandle.init(graph.getView().getOverlayPane());
+                       this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
+       
+                       mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
+                       mxVertexHandler.prototype.init.apply(this, arguments);
+               };
+               
+               mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
+               {
+                       return 'default';
+               };
+               
+               mxExtVertexHandler.prototype.redraw = function()
+               {
+                       mxVertexHandler.prototype.redraw.apply(this, arguments);
+       
+                       var size = this.specialHandle.bounds.width;
+                       this.specialHandle.bounds = this.getSpecialHandleBounds(size);
+                       this.specialHandle.redraw();
+               };
+
+               mxExtVertexHandler.prototype.destroy = function()
+               {
+                       mxVertexHandler.prototype.destroy.apply(this, arguments);
+                       
+                       if (this.specialHandle != null)
+                       {
+                               this.specialHandle.destroy();
+                               this.specialHandle = null;
+                       }
+               };
+               
+               mxExtVertexHandler.prototype.getHandleForEvent = function(me)
+               {
+                       if (me.isSource(this.specialHandle))
+                       {
+                               return SPECIAL_HANDLE_INDEX;
+                       }
+                       
+                       return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
+               };
+
+               mxExtVertexHandler.prototype.mouseMove = function(sender, me)
+               {
+                       if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+                       {
+                               var point = new mxPoint(me.getGraphX(), me.getGraphY());
+                               this.constrainPoint(point);
+                               var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
+                               var scale = this.graph.getView().scale;
+                               
+                               if (gridEnabled && this.useGridForSpecialHandle)
+                               {
+                                       point.x = this.graph.snap(point.x / scale) * scale;
+                                       point.y = this.graph.snap(point.y / scale) * scale;
+                               }
+                               
+                               this.updateStyle(point);                        
+                               this.moveSizerTo(this.specialHandle, point.x, point.y);
+                               this.state.view.graph.cellRenderer.redraw(this.state, true);
+                               me.consume();
+                       }
+                       else
+                       {
+                               mxVertexHandler.prototype.mouseMove.apply(this, arguments);
+                       }
+               };
+
+               mxExtVertexHandler.prototype.mouseUp = function(sender, me)
+               {
+                       if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+                       {
+                               this.applyStyle();
+                               this.reset();
+                               me.consume();
+                       }
+                       else
+                       {
+                               mxVertexHandler.prototype.mouseUp.apply(this, arguments);
+                       }
+               };
+
+               mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
+               {
+                       var rotation = this.state.shape.getShapeRotation();
+                       var alpha = mxUtils.toRadians(rotation);
+                       var cos = Math.cos(alpha);
+                       var sin = Math.sin(alpha);
+                       
+                       var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+                       
+                       if (this.state.shape.isPaintBoundsInverted())
+                       {
+                               var t = (bounds.width - bounds.height) / 2;
+                               bounds.x += t;
+                               bounds.y -= t;
+                               var tmp = bounds.width;
+                               bounds.width = bounds.height;
+                               bounds.height = tmp;
+                       }
+       
+                       var pt = this.getSpecialHandlePoint(bounds);
+
+                       if (this.state.shape.flipH)
+                       {
+                               pt.x = 2 * bounds.x + bounds.width - pt.x;
+                       }
+                       
+                       if (this.state.shape.flipV)
+                       {
+                               pt.y = 2 * bounds.y + bounds.height - pt.y;
+                       }
+                       
+                       pt = mxUtils.getRotatedPoint(pt, cos, sin,
+                               new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+                       return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
+               };
+               
+               mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       // Hook for subclassers
+                       return null;
+               };
+       
+               mxExtVertexHandler.prototype.updateStyle = function(point)
+               {
+                       // Hook for subclassers
+               };
+               
+               mxExtVertexHandler.prototype.constrainPoint = function(point)
+               {
+                       point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
+                       point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
+               };
+               
+               mxExtVertexHandler.prototype.applyStyle = function()
+               {
+                       // Hook for subclassers
+               };
+
+               // Folder Handler
+               function mxFolderHandler(state)
+               {
+                       mxExtVertexHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
+
+               mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
+                       var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
+                       
+                       var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+                       var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
+       
+                       return new mxPoint(x, bounds.y + th);
+               };
+               
+               mxFolderHandler.prototype.updateStyle = function(point)
+               {
+                       var rotation = this.state.shape.getShapeRotation();
+                       var alpha = mxUtils.toRadians(rotation);
+                       var cos = Math.cos(-alpha);
+                       var sin = Math.sin(-alpha);
+
+                       var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+                       
+                       if (this.state.shape.isPaintBoundsInverted())
+                       {
+                               var t = (bounds.width - bounds.height) / 2;
+                               bounds.x += t;
+                               bounds.y -= t;
+                               var tmp = bounds.width;
+                               bounds.width = bounds.height;
+                               bounds.height = tmp;
+                       }
+       
+                       var pt = new mxPoint(point.x, point.y);
+                       pt = mxUtils.getRotatedPoint(pt, cos, sin,
+                               new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+                       if (this.state.shape.flipH)
+                       {
+                               pt.x = 2 * bounds.x + bounds.width - pt.x;
+                       }
+                       
+                       if (this.state.shape.flipV)
+                       {
+                               pt.y = 2 * bounds.y + bounds.height - pt.y;
+                       }
+                       
+                       var result = this.updateStyleUnrotated(pt, bounds);
+               
+                       // Modifies point to use rotated coordinates of return value
+                       if (result != null)
+                       {
+                               if (this.state.shape.flipH)
+                               {
+                                       result.x = 2 * bounds.x + bounds.width - result.x;
+                               }
+                               
+                               if (this.state.shape.flipV)
+                               {
+                                       result.y = 2 * bounds.y + bounds.height - result.y;
+                               }
+                               
+                               cos = Math.cos(alpha);
+                               sin = Math.sin(alpha);
+                               result = mxUtils.getRotatedPoint(result, cos, sin,
+                                               new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+                               point.x = result.x;
+                               point.y = result.y;
+                       }
+               };
+               
+               mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+                       var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
+                       var th = pt.y - bounds.y;
+                       
+                       var scale = this.graph.getView().scale;
+                       this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
+                       this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
+               };
+               
+               mxFolderHandler.prototype.applyStyle = function()
+               {
+                       var model = this.graph.getModel();
+                       model.beginUpdate();
+                       try
+                       {
+                               this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
+                               this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
+                       }
+                       finally
+                       {
+                               model.endUpdate();
+                       }
+               };
+               
+               // Swimlane Handler
+               function mxSwimlaneHandler(state)
+               {
+                       mxFolderHandler.call(this, state);
+               };
+               
+               mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
+               
+               mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
+
+                       return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
+               };
+               
+               mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
+               {
+                       point.x = bounds.x + bounds.width / 2;
+                       startSize = point.y - bounds.y;
+                       var scale = this.graph.getView().scale;
+                       this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
+                       
+                       return point;
+               };
+               
+               mxSwimlaneHandler.prototype.applyStyle = function()
+               {
+                       this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
+               };
+
+               // Cube Handler
+               function mxCubeHandler(state)
+               {
+                       mxFolderHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxCubeHandler, mxFolderHandler);
+               
+               mxCubeHandler.prototype.defaultValue = 20;
+       
+               mxCubeHandler.prototype.scaleFactor = 1;
+               
+               mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var sz = Math.min(bounds.width, Math.min(bounds.height,
+                               mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+                       
+                       return new mxPoint(bounds.x + sz, bounds.y + sz);
+               };
+       
+               mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
+                                       Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+                       var scale = this.graph.getView().scale;
+                       this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+                       
+                       // Stays on the diagonal
+                       return new mxPoint(bounds.x + size, bounds.y + size);
+               };
+               
+               mxCubeHandler.prototype.applyStyle = function()
+               {
+                       this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
+               };
+               
+               // Card Handler
+               function mxCardHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxCardHandler, mxCubeHandler);
+               
+               mxCardHandler.prototype.defaultValue = 30;
+       
+               mxCardHandler.prototype.scaleFactor = 2;
+               
+               // Note Handler
+               function mxNoteHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxNoteHandler, mxCubeHandler);
+               
+               mxNoteHandler.prototype.defaultValue = 30;
+       
+               mxNoteHandler.prototype.scaleFactor = 1;
+               
+               mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var sz = Math.min(bounds.width, Math.min(bounds.height,
+                                       mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+                       
+                       return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
+               };
+               
+               mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
+                                       Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+                       var scale = this.graph.getView().scale;
+                       this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+                       
+                       // Stays on the diagonal
+                       return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
+               };
+               
+               // Step Handler
+               function mxStepHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxStepHandler, mxCubeHandler);
+               
+               mxStepHandler.prototype.defaultValue = 0.2;
+       
+               mxStepHandler.prototype.scaleFactor = 1;
+               
+               mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+                       
+                       return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
+               };
+       
+               mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
+                       this.state.style['size'] = size;
+                       
+                       return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
+               };
+               
+               // Tape Handler
+               function mxTapeHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxTapeHandler, mxCubeHandler);
+               
+               mxTapeHandler.prototype.defaultValue = 0.4;
+       
+               mxTapeHandler.prototype.scaleFactor = 1;
+               
+               mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+       
+                       return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
+               };
+       
+               mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
+                       this.state.style['size'] = size;
+                       
+                       return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
+               };
+               
+               var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
+                               'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler};
+
+               var mxGraphCreateHandler = mxGraph.prototype.createHandler;
+               mxGraph.prototype.createHandler = function(state)
+               {
+                       if (state != null)
+                       {
+                               var ctor = handlers[state.style['shape']];
+
+                               if (ctor != null)
+                               {
+                                       return new ctor(state);
+                               }
+                       }
+                       
+                       return mxGraphCreateHandler.apply(this, arguments);
+               };
+       }
+       
+       // Constraints
+       mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
+       {
+               if (terminal != null && terminal.shape != null)
+               {
+                       if (terminal.shape.stencil != null)
+                       {
+                               if (terminal.shape.stencil != null)
+                               {
+                                       return terminal.shape.stencil.constraints;
+                               }
+                       }
+                       else if (terminal.shape.constraints != null)
+                       {
+                               return terminal.shape.constraints;
+                       }
+               }
+
+               return null;
+       };
+
+       mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+                                                new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+       mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
+       mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
+       PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
+                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
+                                new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+                                new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+                                new mxConnectionConstraint(new mxPoint(1, 0.3), true),
+                                new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                new mxConnectionConstraint(new mxPoint(1, 0.7), true),
+                                new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
+                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
+       UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
+                                                 new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+                                                 new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
+                                                new mxConnectionConstraint(new mxPoint(0, 1/3), false),
+                                                new mxConnectionConstraint(new mxPoint(0, 1), false),
+                                                new mxConnectionConstraint(new mxPoint(1, 1/3), false),
+                                                new mxConnectionConstraint(new mxPoint(1, 1), false),
+                                                new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
+       ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+                                                new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+       mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
+                                new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
+                                new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+                                new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
+                                new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
+                                new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+                                new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+       TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.65), false),
+                                          new mxConnectionConstraint(new mxPoint(1, 0.35), false),
+                                               new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+                                               new mxConnectionConstraint(new mxPoint(1, 0.65), false),
+                                                                               new mxConnectionConstraint(new mxPoint(0.25, 1), false),
+                                                                               new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
+       // TODO: Relative ports
+       StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                                       new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                       new mxConnectionConstraint(new mxPoint(0.75, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
+                                          new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
+                                          new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
+                                          new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
+                                               new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+                                               new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
+       mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
+                                                                       new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
+       LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+                                                                               new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+       mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                  new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
+       mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
+       mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
+       mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+                                           new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
+       mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
+                                           new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0.625, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
+                                          new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
+                                          new mxConnectionConstraint(new mxPoint(0.375, 1), true),
+                                           new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
+       mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
+                                        new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
+                                        new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
+                                        new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
+                                        new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
+                                        new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
+                                        new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
+                                        new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
+                                        new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
+                                        new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
+                                        new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
+                                        new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
+       mxArrow.prototype.constraints = null;
+})();
index 446a450..970d060 100644 (file)
@@ -1 +1,782 @@
-var _0x97eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x61\x6C\x65\x74\x74\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x67\x72\x61\x70\x68","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x65\x64\x69\x74\x6F\x72","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x6D\x6F\x75\x73\x65\x75\x70","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x74\x6F\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C\x61\x74\x65\x64\x54\x61\x72\x67\x65\x74","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x74\x6F\x6F\x6C\x74\x69\x70\x2E\x70\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x6F\x67","\x65\x6E\x74\x72\x79","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74","\x2F","\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x73\x74\x61\x72\x74","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x69\x6E\x70\x75\x74","\x65\x6E\x64","\x61\x64\x64\x49\x6D\x61\x67\x65\x50\x61\x6C\x65\x74\x74\x65","\x65\x6E\x61\x62\x6C\x65\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x42\x6F\x72\x64\x65\x72","\x74\x68\x75\x6D\x62\x42\x6F\x72\x64\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x44\x65\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x61\x72\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x69\x70\x61\x72\x74\x2F\x47\x65\x61\x72\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x74\x68\x75\x6D\x62\x57\x69\x64\x74\x68","\x74\x68\x75\x6D\x62\x48\x65\x69\x67\x68\x74","\x74\x68\x75\x6D\x62\x50\x61\x64\x64\x69\x6E\x67","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x53\x69\x7A\x65","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70","\x74\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x6F\x6C\x74\x69\x70","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x72\x61\x70\x68\x32","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x76\x69\x65\x77","\x49\x53\x5F\x53\x56\x47","\x63\x61\x6E\x76\x61\x73","\x72\x65\x6C\x61\x74\x69\x76\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x31\x34\x70\x78","\x68\x65\x69\x67\x68\x74","\x32\x37\x70\x78","\x64\x69\x73\x70\x6C\x61\x79","\x62\x6C\x6F\x63\x6B","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x63\x6C\x65\x61\x72","\x6D\x6F\x64\x65\x6C","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x76\x69\x73\x69\x62\x6C\x65","\x70\x78","\x6C\x65\x6E\x67\x74\x68","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x67\x72\x61\x79","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x31\x30\x30\x25","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x32\x70\x78","\x36\x70\x78","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","","\x77\x72\x69\x74\x65","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x74\x6F\x70","\x6E\x6F\x6E\x65","\x78","\x6D\x69\x6E","\x79","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x6D\x61\x78","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x29","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x65\x66\x74","\x64\x72\x61\x77\x50\x61\x6E\x65","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x54\x69\x74\x6C\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x68\x75\x6D\x62","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x66\x6C\x6F\x6F\x72","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x4E\x4F\x5F\x46\x4F","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x49\x53\x5F\x49\x45\x36","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x63\x75\x72\x73\x6F\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x49\x53\x5F\x49\x45","\x34\x70\x78","\x63\x72\x65\x61\x74\x65\x49\x74\x65\x6D","\x67\x65\x49\x74\x65\x6D","\x70\x61\x64\x64\x69\x6E\x67","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x63\x72\x65\x61\x74\x65\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x72\x64\x65\x72","\x31\x70\x78\x20\x64\x61\x73\x68\x65\x64\x20\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x53\x6F\x75\x72\x63\x65","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x61\x70\x70\x6C\x79","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x6D\x6F\x75\x73\x65\x55\x70","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x61\x62\x73","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x64\x72\x6F\x70","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6C\x61\x62\x65\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65","\x6F\x74\x68\x65\x72","\x61\x64\x64","\x48\x6F\x73\x74","\x55\x73\x65\x72\x6E\x61\x6D\x65","\x50\x61\x73\x73\x77\x6F\x72\x64","\x54\x6F","\x53\x75\x62\x6A\x65\x63\x74","\x42\x6F\x64\x79","\x65\x6D\x61\x69\x6C","\x76\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x65\x64\x67\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x23\x66\x66\x66\x66\x66\x66","\x61\x64\x64\x50\x61\x6C\x65\x74\x74\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72","\x61\x64\x64\x46\x6F\x6C\x64\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66\x29","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x31\x30\x30\x25\x20\x35\x30\x25","\x77\x61\x69\x74","\x72\x65\x6D\x6F\x76\x65\x50\x61\x6C\x65\x74\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D"];_0x97eb[0];function Sidebar(_0x7faex2,_0x7faex3){this[_0x97eb[1]]=_0x7faex2;this[_0x97eb[2]]=_0x7faex3;this[_0x97eb[3]]= new Object();this[_0x97eb[4]]=true;this[_0x97eb[5]]= new Graph(document[_0x97eb[7]](_0x97eb[6]),null,null,this[_0x97eb[1]][_0x97eb[9]][_0x97eb[5]][_0x97eb[8]]());this[_0x97eb[5]][_0x97eb[10]]=false;this[_0x97eb[5]][_0x97eb[11]]=false;this[_0x97eb[5]][_0x97eb[12]](false);this[_0x97eb[5]][_0x97eb[13]]=false;this[_0x97eb[5]][_0x97eb[14]](false);this[_0x97eb[5]][_0x97eb[15]](false);this[_0x97eb[5]][_0x97eb[2]][_0x97eb[17]][_0x97eb[16]]=_0x97eb[18];this[_0x97eb[5]][_0x97eb[2]][_0x97eb[17]][_0x97eb[19]]=_0x97eb[20];document[_0x97eb[22]][_0x97eb[21]](this[_0x97eb[5]][_0x97eb[2]]);if(!mxClient[_0x97eb[23]]){mxEvent[_0x97eb[26]](document,_0x97eb[24],mxUtils[_0x97eb[25]](this,function(){this[_0x97eb[4]]=true}));mxEvent[_0x97eb[26]](_0x7faex3,_0x97eb[27],mxUtils[_0x97eb[25]](this,function(){this[_0x97eb[4]]=true}));mxEvent[_0x97eb[26]](document,_0x97eb[28],mxUtils[_0x97eb[25]](this,function(){this[_0x97eb[4]]=false;this[_0x97eb[29]]()}));mxEvent[_0x97eb[26]](document,_0x97eb[30],mxUtils[_0x97eb[25]](this,function(_0x7faex4){var _0x7faex5=mxEvent[_0x97eb[31]](_0x7faex4);while(_0x7faex5!=null){if(_0x7faex5==this[_0x97eb[32]]){return};_0x7faex5=_0x7faex5[_0x97eb[33]]};this[_0x97eb[29]]()}));mxEvent[_0x97eb[26]](document,_0x97eb[34],mxUtils[_0x97eb[25]](this,function(_0x7faex4){if(_0x7faex4[_0x97eb[35]]==null&&_0x7faex4[_0x97eb[36]]==null){this[_0x97eb[29]]()}}))};this[_0x97eb[37]](); new Image()[_0x97eb[38]]=IMAGE_PATH+_0x97eb[39]}Sidebar[_0x97eb[40]][_0x97eb[37]]=function(){var _0x7faex6=STENCIL_PATH;console[_0x97eb[41]](_0x7faex6);this[_0x97eb[51]](_0x97eb[42],mxResources[_0x97eb[44]](_0x97eb[43]),_0x7faex6+_0x97eb[45],_0x97eb[46],[_0x97eb[47],_0x97eb[48],_0x97eb[49],_0x97eb[50]],[mxResources[_0x97eb[44]](_0x97eb[47]),mxResources[_0x97eb[44]](_0x97eb[48]),mxResources[_0x97eb[44]](_0x97eb[49]),mxResources[_0x97eb[44]](_0x97eb[50])])};Sidebar[_0x97eb[40]][_0x97eb[52]]=!mxClient[_0x97eb[23]];Sidebar[_0x97eb[40]][_0x97eb[53]]=16;Sidebar[_0x97eb[40]][_0x97eb[54]]=3;Sidebar[_0x97eb[40]][_0x97eb[55]]=300;Sidebar[_0x97eb[40]][_0x97eb[56]]=true;Sidebar[_0x97eb[40]][_0x97eb[57]]=STENCIL_PATH+_0x97eb[58];Sidebar[_0x97eb[40]][_0x97eb[59]]=34;Sidebar[_0x97eb[40]][_0x97eb[60]]=34;Sidebar[_0x97eb[40]][_0x97eb[61]]=2;Sidebar[_0x97eb[40]][_0x97eb[62]]=9;Sidebar[_0x97eb[40]][_0x97eb[63]]=false;Sidebar[_0x97eb[40]][_0x97eb[64]]=false;Sidebar[_0x97eb[40]][_0x97eb[65]]=function(_0x7faex7,_0x7faex8,_0x7faex9,_0x7faexa){if(this[_0x97eb[52]]&&this[_0x97eb[4]]){if(this[_0x97eb[32]]!=_0x7faex7){if(this[_0x97eb[66]]!=null){window[_0x97eb[67]](this[_0x97eb[66]]);this[_0x97eb[66]]=null};var _0x7faexb=mxUtils[_0x97eb[25]](this,function(){if(this[_0x97eb[68]]==null){this[_0x97eb[68]]=document[_0x97eb[7]](_0x97eb[6]);this[_0x97eb[68]][_0x97eb[69]]=_0x97eb[70];document[_0x97eb[22]][_0x97eb[21]](this[_0x97eb[68]]);this[_0x97eb[71]]= new Graph(this[_0x97eb[68]],null,null,this[_0x97eb[1]][_0x97eb[9]][_0x97eb[5]][_0x97eb[8]]());this[_0x97eb[71]][_0x97eb[73]][_0x97eb[72]](this[_0x97eb[53]],this[_0x97eb[53]]);this[_0x97eb[71]][_0x97eb[10]]=false;this[_0x97eb[71]][_0x97eb[11]]=false;this[_0x97eb[71]][_0x97eb[13]]=false;this[_0x97eb[71]][_0x97eb[14]](false);this[_0x97eb[71]][_0x97eb[12]](false);this[_0x97eb[71]][_0x97eb[15]](false);if(!mxClient[_0x97eb[74]]){this[_0x97eb[71]][_0x97eb[73]][_0x97eb[75]][_0x97eb[17]][_0x97eb[19]]=_0x97eb[76]};this[_0x97eb[77]]=mxUtils[_0x97eb[78]](IMAGE_PATH+_0x97eb[39]);this[_0x97eb[77]][_0x97eb[17]][_0x97eb[19]]=_0x97eb[20];this[_0x97eb[77]][_0x97eb[17]][_0x97eb[79]]=_0x97eb[80];this[_0x97eb[77]][_0x97eb[17]][_0x97eb[81]]=_0x97eb[82];document[_0x97eb[22]][_0x97eb[21]](this[_0x97eb[77]])};this[_0x97eb[68]][_0x97eb[17]][_0x97eb[83]]=_0x97eb[84];this[_0x97eb[71]][_0x97eb[85]]=(_0x7faexa==null||_0x7faexa);this[_0x97eb[71]][_0x97eb[87]][_0x97eb[86]]();this[_0x97eb[71]][_0x97eb[88]](_0x7faex8);var _0x7faexc=this[_0x97eb[71]][_0x97eb[89]]();var _0x7faexd=_0x7faexc[_0x97eb[79]]+2*this[_0x97eb[53]];var _0x7faexe=_0x7faexc[_0x97eb[81]]+2*this[_0x97eb[53]];if(mxClient[_0x97eb[90]]){_0x7faexd+=4;_0x7faexe+=4;this[_0x97eb[68]][_0x97eb[17]][_0x97eb[91]]=_0x97eb[18]}else {this[_0x97eb[68]][_0x97eb[17]][_0x97eb[91]]=_0x97eb[92]};this[_0x97eb[77]][_0x97eb[17]][_0x97eb[16]]=_0x97eb[92];this[_0x97eb[68]][_0x97eb[17]][_0x97eb[79]]=_0x7faexd+_0x97eb[93];if(this[_0x97eb[64]]&&_0x7faex9!=null&&_0x7faex9[_0x97eb[94]]>0){if(this[_0x97eb[95]]==null){this[_0x97eb[95]]=document[_0x97eb[7]](_0x97eb[6]);this[_0x97eb[95]][_0x97eb[17]][_0x97eb[96]]=_0x97eb[97];this[_0x97eb[95]][_0x97eb[17]][_0x97eb[98]]=_0x97eb[99];this[_0x97eb[95]][_0x97eb[17]][_0x97eb[79]]=_0x97eb[100];this[_0x97eb[95]][_0x97eb[17]][_0x97eb[91]]=_0x97eb[18];if(mxClient[_0x97eb[74]]){this[_0x97eb[95]][_0x97eb[17]][_0x97eb[101]]=_0x97eb[102]}else {this[_0x97eb[95]][_0x97eb[17]][_0x97eb[19]]=_0x97eb[20];this[_0x97eb[95]][_0x97eb[17]][_0x97eb[101]]=_0x97eb[103]};this[_0x97eb[68]][_0x97eb[21]](this[_0x97eb[95]])}else {this[_0x97eb[95]][_0x97eb[104]]=_0x97eb[105]};this[_0x97eb[95]][_0x97eb[17]][_0x97eb[83]]=_0x97eb[105];mxUtils[_0x97eb[106]](this[_0x97eb[95]],_0x7faex9);var _0x7faexf=this[_0x97eb[95]][_0x97eb[107]]+10;_0x7faexe+=_0x7faexf;if(mxClient[_0x97eb[74]]){this[_0x97eb[95]][_0x97eb[17]][_0x97eb[108]]=(-_0x7faexf)+_0x97eb[93]}else {_0x7faexe-=6;this[_0x97eb[95]][_0x97eb[17]][_0x97eb[109]]=(_0x7faexe-_0x7faexf)+_0x97eb[93]}}else {if(this[_0x97eb[95]]!=null&&this[_0x97eb[95]][_0x97eb[33]]!=null){this[_0x97eb[95]][_0x97eb[17]][_0x97eb[83]]=_0x97eb[110]}};this[_0x97eb[68]][_0x97eb[17]][_0x97eb[81]]=_0x7faexe+_0x97eb[93];var _0x7faex10=-Math[_0x97eb[112]](0,_0x7faexc[_0x97eb[111]]-this[_0x97eb[53]]);var _0x7faex11=-Math[_0x97eb[112]](0,_0x7faexc[_0x97eb[113]]-this[_0x97eb[53]]);var _0x7faex12=this[_0x97eb[2]][_0x97eb[114]]+this[_0x97eb[1]][_0x97eb[115]]+3;var _0x7faex13=Math[_0x97eb[118]](0,(this[_0x97eb[2]][_0x97eb[116]]+_0x7faex7[_0x97eb[116]]-this[_0x97eb[2]][_0x97eb[117]]-_0x7faexe/2+16));if(mxClient[_0x97eb[74]]){this[_0x97eb[71]][_0x97eb[73]][_0x97eb[75]][_0x97eb[123]](_0x97eb[119],_0x97eb[120]+_0x7faex10+_0x97eb[121]+_0x7faex11+_0x97eb[122])}else {this[_0x97eb[71]][_0x97eb[73]][_0x97eb[125]][_0x97eb[17]][_0x97eb[124]]=_0x7faex10+_0x97eb[93];this[_0x97eb[71]][_0x97eb[73]][_0x97eb[125]][_0x97eb[17]][_0x97eb[109]]=_0x7faex11+_0x97eb[93]};_0x7faex13+=90;this[_0x97eb[68]][_0x97eb[17]][_0x97eb[19]]=_0x97eb[20];this[_0x97eb[68]][_0x97eb[17]][_0x97eb[124]]=_0x7faex12+_0x97eb[93];this[_0x97eb[68]][_0x97eb[17]][_0x97eb[109]]=_0x7faex13+_0x97eb[93];this[_0x97eb[77]][_0x97eb[17]][_0x97eb[124]]=(_0x7faex12-13)+_0x97eb[93];this[_0x97eb[77]][_0x97eb[17]][_0x97eb[109]]=(_0x7faex13+_0x7faexe/2-13)+_0x97eb[93]});if(this[_0x97eb[68]]!=null&&this[_0x97eb[68]][_0x97eb[17]][_0x97eb[83]]!=_0x97eb[110]){_0x7faexb()}else {this[_0x97eb[66]]=window[_0x97eb[126]](_0x7faexb,this[_0x97eb[55]])};this[_0x97eb[32]]=_0x7faex7}}};Sidebar[_0x97eb[40]][_0x97eb[29]]=function(){if(this[_0x97eb[66]]!=null){window[_0x97eb[67]](this[_0x97eb[66]]);this[_0x97eb[66]]=null};if(this[_0x97eb[68]]!=null){this[_0x97eb[68]][_0x97eb[17]][_0x97eb[83]]=_0x97eb[110];this[_0x97eb[77]][_0x97eb[17]][_0x97eb[16]]=_0x97eb[18];this[_0x97eb[32]]=null}};Sidebar[_0x97eb[40]][_0x97eb[127]]=function(_0x7faex14){var _0x7faex7=document[_0x97eb[7]](_0x97eb[128]);_0x7faex7[_0x97eb[123]](_0x97eb[129],_0x97eb[130]);_0x7faex7[_0x97eb[69]]=_0x97eb[131];mxUtils[_0x97eb[106]](_0x7faex7,_0x7faex14);return _0x7faex7};Sidebar[_0x97eb[40]][_0x97eb[132]]=function(_0x7faex8,_0x7faexd,_0x7faexe,_0x7faex15,_0x7faex9,_0x7faexa){this[_0x97eb[5]][_0x97eb[85]]=(_0x7faexa==null||_0x7faexa);this[_0x97eb[5]][_0x97eb[73]][_0x97eb[133]](1,0,0);this[_0x97eb[5]][_0x97eb[88]](_0x7faex8);var _0x7faexc=this[_0x97eb[5]][_0x97eb[89]]();var _0x7faex16=this[_0x97eb[54]];var _0x7faex17=Math[_0x97eb[112]]((_0x7faexd-2)/(_0x7faexc[_0x97eb[79]]-_0x7faexc[_0x97eb[111]]+_0x7faex16),(_0x7faexe-2)/(_0x7faexc[_0x97eb[81]]-_0x7faexc[_0x97eb[113]]+_0x7faex16));var _0x7faex10=-Math[_0x97eb[112]](_0x7faexc[_0x97eb[111]],0);var _0x7faex11=-Math[_0x97eb[112]](_0x7faexc[_0x97eb[113]],0);this[_0x97eb[5]][_0x97eb[73]][_0x97eb[133]](_0x7faex17,_0x7faex10,_0x7faex11);_0x7faexc=this[_0x97eb[5]][_0x97eb[89]]();var _0x7faex18=Math[_0x97eb[118]](0,Math[_0x97eb[134]]((_0x7faexd-_0x7faexc[_0x97eb[79]]-_0x7faexc[_0x97eb[111]])/2));var _0x7faexf=Math[_0x97eb[118]](0,Math[_0x97eb[134]]((_0x7faexe-_0x7faexc[_0x97eb[81]]-_0x7faexc[_0x97eb[113]])/2));var _0x7faex19=null;if(this[_0x97eb[5]][_0x97eb[135]]==mxConstants[_0x97eb[136]]&&!mxClient[_0x97eb[137]]){_0x7faex19=this[_0x97eb[5]][_0x97eb[73]][_0x97eb[140]]()[_0x97eb[139]][_0x97eb[138]](true)}else {_0x7faex19=this[_0x97eb[5]][_0x97eb[2]][_0x97eb[138]](false);_0x7faex19[_0x97eb[104]]=this[_0x97eb[5]][_0x97eb[2]][_0x97eb[104]]};this[_0x97eb[5]][_0x97eb[141]]()[_0x97eb[86]]();if(mxClient[_0x97eb[142]]){_0x7faex15[_0x97eb[17]][_0x97eb[143]]=_0x97eb[144]+this[_0x97eb[1]][_0x97eb[9]][_0x97eb[145]]+_0x97eb[122]};var _0x7faex1a=3;_0x7faex19[_0x97eb[17]][_0x97eb[19]]=_0x97eb[76];_0x7faex19[_0x97eb[17]][_0x97eb[91]]=_0x97eb[18];_0x7faex19[_0x97eb[17]][_0x97eb[146]]=_0x97eb[147];_0x7faex19[_0x97eb[17]][_0x97eb[124]]=(_0x7faex18+_0x7faex1a)+_0x97eb[93];_0x7faex19[_0x97eb[17]][_0x97eb[109]]=(_0x7faexf+_0x7faex1a)+_0x97eb[93];_0x7faex19[_0x97eb[17]][_0x97eb[79]]=_0x7faexd+_0x97eb[93];_0x7faex19[_0x97eb[17]][_0x97eb[81]]=_0x7faexe+_0x97eb[93];_0x7faex19[_0x97eb[17]][_0x97eb[16]]=_0x97eb[105];_0x7faex19[_0x97eb[17]][_0x97eb[148]]=_0x97eb[105];_0x7faex19[_0x97eb[17]][_0x97eb[149]]=_0x97eb[105];_0x7faex15[_0x97eb[21]](_0x7faex19);if(this[_0x97eb[63]]&&_0x7faex9!=null){var _0x7faex1b=(mxClient[_0x97eb[90]])?2*this[_0x97eb[61]]+2:0;_0x7faex15[_0x97eb[17]][_0x97eb[81]]=(this[_0x97eb[60]]+_0x7faex1b+this[_0x97eb[62]]+8)+_0x97eb[93];var _0x7faex1c=document[_0x97eb[7]](_0x97eb[6]);_0x7faex1c[_0x97eb[17]][_0x97eb[150]]=this[_0x97eb[62]]+_0x97eb[93];_0x7faex1c[_0x97eb[17]][_0x97eb[98]]=_0x97eb[99];_0x7faex1c[_0x97eb[17]][_0x97eb[151]]=_0x97eb[152];if(mxClient[_0x97eb[153]]){_0x7faex1c[_0x97eb[17]][_0x97eb[81]]=(this[_0x97eb[62]]+12)+_0x97eb[93]};_0x7faex1c[_0x97eb[17]][_0x97eb[101]]=_0x97eb[154];mxUtils[_0x97eb[106]](_0x7faex1c,_0x7faex9);_0x7faex15[_0x97eb[21]](_0x7faex1c)}};Sidebar[_0x97eb[40]][_0x97eb[155]]=function(_0x7faex8,_0x7faex9,_0x7faexa){var _0x7faex7=document[_0x97eb[7]](_0x97eb[128]);_0x7faex7[_0x97eb[123]](_0x97eb[129],_0x97eb[130]);_0x7faex7[_0x97eb[69]]=_0x97eb[156];_0x7faex7[_0x97eb[17]][_0x97eb[91]]=_0x97eb[18];var _0x7faex1b=(mxClient[_0x97eb[90]])?8+2*this[_0x97eb[61]]:6;_0x7faex7[_0x97eb[17]][_0x97eb[79]]=(this[_0x97eb[59]]+_0x7faex1b)+_0x97eb[93];_0x7faex7[_0x97eb[17]][_0x97eb[81]]=(this[_0x97eb[60]]+_0x7faex1b)+_0x97eb[93];_0x7faex7[_0x97eb[17]][_0x97eb[157]]=this[_0x97eb[61]]+_0x97eb[93];mxEvent[_0x97eb[26]](_0x7faex7,_0x97eb[158],function(_0x7faex4){mxEvent[_0x97eb[159]](_0x7faex4)});this[_0x97eb[132]](_0x7faex8,this[_0x97eb[59]],this[_0x97eb[60]],_0x7faex7,_0x7faex9,_0x7faexa);return _0x7faex7};Sidebar[_0x97eb[40]][_0x97eb[160]]=function(_0x7faex8,_0x7faex1d){return function(_0x7faex1e,_0x7faex4,_0x7faex1f,_0x7faex20,_0x7faex21){if(_0x7faex1e[_0x97eb[161]]()){_0x7faex8=_0x7faex1e[_0x97eb[162]](_0x7faex8);if(_0x7faex8[_0x97eb[94]]>0){var _0x7faex22=(_0x7faex1f!=null)?_0x7faex1e[_0x97eb[163]](_0x7faex1f,_0x7faex8,_0x7faex4):false;var _0x7faex23=null;if(_0x7faex1f!=null&& !_0x7faex22){_0x7faex1f=null};if(_0x7faex1d&&_0x7faex1e[_0x97eb[164]]()&&_0x7faex1e[_0x97eb[165]](_0x7faex1f,_0x7faex8,_0x7faex4)){_0x7faex1e[_0x97eb[166]](_0x7faex1f,_0x7faex8,null,_0x7faex20,_0x7faex21);_0x7faex23=_0x7faex8}else {if(_0x7faex8[_0x97eb[94]]>0){_0x7faex23=_0x7faex1e[_0x97eb[167]](_0x7faex8,_0x7faex20,_0x7faex21,_0x7faex1f)}};if(_0x7faex23!=null&&_0x7faex23[_0x97eb[94]]>0){_0x7faex1e[_0x97eb[168]](_0x7faex23[0]);_0x7faex1e[_0x97eb[169]](_0x7faex23)}}}}};Sidebar[_0x97eb[40]][_0x97eb[170]]=function(_0x7faexd,_0x7faexe){var _0x7faex7=document[_0x97eb[7]](_0x97eb[6]);_0x7faex7[_0x97eb[17]][_0x97eb[171]]=_0x97eb[172];_0x7faex7[_0x97eb[17]][_0x97eb[79]]=_0x7faexd+_0x97eb[93];_0x7faex7[_0x97eb[17]][_0x97eb[81]]=_0x7faexe+_0x97eb[93];return _0x7faex7};Sidebar[_0x97eb[40]][_0x97eb[173]]=function(_0x7faex7,_0x7faex24,_0x7faex25){var _0x7faex26=mxUtils[_0x97eb[175]](_0x7faex7,this[_0x97eb[1]][_0x97eb[9]][_0x97eb[5]],_0x7faex24,_0x7faex25,0,0,this[_0x97eb[1]][_0x97eb[9]][_0x97eb[5]][_0x97eb[174]],true,true);_0x7faex26[_0x97eb[176]]=function(_0x7faex1e,_0x7faex20,_0x7faex21){var _0x7faex1f=mxDragSource[_0x97eb[40]][_0x97eb[176]][_0x97eb[177]](this,arguments);if(!_0x7faex1e[_0x97eb[178]](_0x7faex1f)){_0x7faex1f=null};return _0x7faex1f};return _0x7faex26};Sidebar[_0x97eb[40]][_0x97eb[179]]=function(_0x7faex7,_0x7faex27){var _0x7faex1e=this[_0x97eb[1]][_0x97eb[9]][_0x97eb[5]];var _0x7faex28=null;mxEvent[_0x97eb[182]](_0x7faex7,function(_0x7faex4){_0x7faex28= new mxPoint(mxEvent[_0x97eb[180]](_0x7faex4),mxEvent[_0x97eb[181]](_0x7faex4))});var _0x7faex29=_0x7faex27[_0x97eb[183]];_0x7faex27[_0x97eb[183]]=function(_0x7faex4){if(!mxEvent[_0x97eb[184]](_0x7faex4)&&this[_0x97eb[185]]==null&&_0x7faex28!=null){var _0x7faex2a=_0x7faex1e[_0x97eb[186]];if(Math[_0x97eb[187]](_0x7faex28[_0x97eb[111]]-mxEvent[_0x97eb[180]](_0x7faex4))<=_0x7faex2a&&Math[_0x97eb[187]](_0x7faex28[_0x97eb[113]]-mxEvent[_0x97eb[181]](_0x7faex4))<=_0x7faex2a){var _0x7faex2b=_0x7faex1e[_0x97eb[188]]();_0x7faex27[_0x97eb[189]](_0x7faex1e,_0x7faex4,null,_0x7faex2b,_0x7faex2b)}};_0x7faex29[_0x97eb[177]](this,arguments);_0x7faex28=null}};Sidebar[_0x97eb[40]][_0x97eb[190]]=function(_0x7faex2c,_0x7faex14,_0x7faex2d,_0x7faex2e){var _0x7faex2f=mxUtils[_0x97eb[190]]();var _0x7faex19=_0x7faex2f[_0x97eb[7]](_0x7faex2c);_0x7faex19[_0x97eb[123]](_0x97eb[191],_0x7faex14);_0x7faex2d[_0x97eb[192]](function(_0x7faex30,_0x7faex31){_0x7faex19[_0x97eb[123]](_0x7faex30,_0x7faex2e[_0x7faex31]?_0x7faex2e[_0x7faex31]:_0x97eb[105])});return _0x7faex19};Sidebar[_0x97eb[40]][_0x97eb[193]]=function(_0x7faex32,_0x7faexd,_0x7faexe,_0x7faex33,_0x7faex9,_0x7faexa){var _0x7faex2d=[];var _0x7faex2e=[];switch(_0x7faex33){case _0x97eb[48]:_0x7faex2d=[_0x97eb[48],_0x97eb[194]];_0x7faex2e=[_0x97eb[105]];break;case _0x97eb[49]:_0x7faex2d=[_0x97eb[48],_0x97eb[195]];_0x7faex2e=[_0x97eb[105]];break;case _0x97eb[202]:_0x7faex2d=[_0x97eb[196],_0x97eb[197],_0x97eb[198],_0x97eb[199],_0x97eb[200],_0x97eb[201]];_0x7faex2e=[_0x97eb[105]];break;default:_0x7faex2d=[];_0x7faex2e=[];break};var _0x7faex19=this[_0x97eb[190]](_0x7faex33,_0x7faex9,_0x7faex2d,_0x7faex2e);var _0x7faex8=[ new mxCell(_0x7faex19, new mxGeometry(0,0,_0x7faexd,_0x7faexe),_0x7faex32)];_0x7faex8[0][_0x97eb[203]]=true;return this[_0x97eb[204]](_0x7faex8,_0x7faexd,_0x7faexe,_0x7faex9,_0x7faexa)};Sidebar[_0x97eb[40]][_0x97eb[204]]=function(_0x7faex8,_0x7faexd,_0x7faexe,_0x7faex9,_0x7faexa){var _0x7faex7=this[_0x97eb[155]](_0x7faex8,_0x7faex9,_0x7faexa);var _0x7faex27=this[_0x97eb[173]](_0x7faex7,this[_0x97eb[160]](_0x7faex8,true),this[_0x97eb[170]](_0x7faexd,_0x7faexe));this[_0x97eb[179]](_0x7faex7,_0x7faex27);_0x7faex27[_0x97eb[205]]=mxUtils[_0x97eb[25]](this,function(){return this[_0x97eb[1]][_0x97eb[9]][_0x97eb[5]][_0x97eb[207]][_0x97eb[206]]});if(!touchStyle){mxEvent[_0x97eb[26]](_0x7faex7,_0x97eb[30],mxUtils[_0x97eb[25]](this,function(_0x7faex4){this[_0x97eb[65]](_0x7faex7,_0x7faex8,_0x7faex9,_0x7faexa)}))};return _0x7faex7};Sidebar[_0x97eb[40]][_0x97eb[208]]=function(_0x7faex32,_0x7faexd,_0x7faexe,_0x7faex33,_0x7faex9,_0x7faexa){var _0x7faex8=[ new mxCell((_0x7faex33!=null)?_0x7faex33:_0x97eb[105], new mxGeometry(0,0,_0x7faexd,_0x7faexe),_0x7faex32)];_0x7faex8[0][_0x97eb[210]][_0x97eb[209]]( new mxPoint(0,_0x7faexe),true);_0x7faex8[0][_0x97eb[210]][_0x97eb[209]]( new mxPoint(_0x7faexd,0),false);_0x7faex8[0][_0x97eb[210]][_0x97eb[76]]=true;_0x7faex8[0][_0x97eb[211]]=true;return this[_0x97eb[212]](_0x7faex8,_0x7faexd,_0x7faexe,_0x7faex9,_0x7faexa)};Sidebar[_0x97eb[40]][_0x97eb[212]]=function(_0x7faex8,_0x7faexd,_0x7faexe,_0x7faex9,_0x7faexa){var _0x7faex7=this[_0x97eb[155]](_0x7faex8,_0x7faex9,_0x7faexa);this[_0x97eb[173]](_0x7faex7,this[_0x97eb[160]](_0x7faex8,false),this[_0x97eb[170]](_0x7faexd,_0x7faexe));var _0x7faex1e=this[_0x97eb[1]][_0x97eb[9]][_0x97eb[5]];mxEvent[_0x97eb[26]](_0x7faex7,_0x97eb[158],mxUtils[_0x97eb[25]](this,function(_0x7faex4){if(this[_0x97eb[56]]){_0x7faex1e[_0x97eb[213]](_0x7faex8[0])};_0x7faex7[_0x97eb[17]][_0x97eb[214]]=_0x97eb[215];window[_0x97eb[126]](function(){_0x7faex7[_0x97eb[17]][_0x97eb[214]]=_0x97eb[105]},300);mxEvent[_0x97eb[159]](_0x7faex4)}));touchStyle=false;if(!touchStyle){mxEvent[_0x97eb[26]](_0x7faex7,_0x97eb[30],mxUtils[_0x97eb[25]](this,function(_0x7faex4){this[_0x97eb[65]](_0x7faex7,_0x7faex8,_0x7faex9,_0x7faexa)}))};return _0x7faex7};Sidebar[_0x97eb[40]][_0x97eb[216]]=function(_0x7faex34,_0x7faex9,_0x7faex35,_0x7faex36){var _0x7faex7=this[_0x97eb[127]](_0x7faex9);this[_0x97eb[2]][_0x97eb[21]](_0x7faex7);var _0x7faex1c=document[_0x97eb[7]](_0x97eb[6]);_0x7faex1c[_0x97eb[69]]=_0x97eb[217];if(_0x7faex35){_0x7faex36(_0x7faex1c);_0x7faex36=null}else {_0x7faex1c[_0x97eb[17]][_0x97eb[83]]=_0x97eb[110]};this[_0x97eb[218]](_0x7faex7,_0x7faex1c,_0x7faex36);var _0x7faex37=document[_0x97eb[7]](_0x97eb[6]);_0x7faex37[_0x97eb[21]](_0x7faex1c);this[_0x97eb[2]][_0x97eb[21]](_0x7faex37);if(_0x7faex34!=null){this[_0x97eb[3]][_0x7faex34]=[_0x7faex7,_0x7faex37]}};Sidebar[_0x97eb[40]][_0x97eb[218]]=function(_0x7faex9,_0x7faex38,_0x7faex39){var _0x7faex3a=false;_0x7faex9[_0x97eb[17]][_0x97eb[143]]=(_0x7faex38[_0x97eb[17]][_0x97eb[83]]==_0x97eb[110])?_0x97eb[144]+IMAGE_PATH+_0x97eb[219]:_0x97eb[144]+IMAGE_PATH+_0x97eb[220];_0x7faex9[_0x97eb[17]][_0x97eb[221]]=_0x97eb[222];_0x7faex9[_0x97eb[17]][_0x97eb[223]]=_0x97eb[224];mxEvent[_0x97eb[26]](_0x7faex9,_0x97eb[158],function(_0x7faex4){if(_0x7faex38[_0x97eb[17]][_0x97eb[83]]==_0x97eb[110]){if(!_0x7faex3a){_0x7faex3a=true;if(_0x7faex39!=null){_0x7faex9[_0x97eb[17]][_0x97eb[146]]=_0x97eb[225];window[_0x97eb[126]](function(){_0x7faex39(_0x7faex38);_0x7faex9[_0x97eb[17]][_0x97eb[146]]=_0x97eb[105]},0)}};_0x7faex9[_0x97eb[17]][_0x97eb[143]]=_0x97eb[144]+IMAGE_PATH+_0x97eb[220];_0x7faex38[_0x97eb[17]][_0x97eb[83]]=_0x97eb[84]}else {_0x7faex9[_0x97eb[17]][_0x97eb[143]]=_0x97eb[144]+IMAGE_PATH+_0x97eb[219];_0x7faex38[_0x97eb[17]][_0x97eb[83]]=_0x97eb[110]};mxEvent[_0x97eb[159]](_0x7faex4)})};Sidebar[_0x97eb[40]][_0x97eb[226]]=function(_0x7faex34){var _0x7faex3b=this[_0x97eb[3]][_0x7faex34];if(_0x7faex3b!=null){this[_0x97eb[3]][_0x7faex34]=null;for(var _0x7faex3c=0;_0x7faex3c<_0x7faex3b[_0x97eb[94]];_0x7faex3c++){this[_0x97eb[2]][_0x97eb[227]](_0x7faex3b[_0x7faex3c])};return true};return false};Sidebar[_0x97eb[40]][_0x97eb[51]]=function(_0x7faex34,_0x7faex9,_0x7faex3d,_0x7faex3e,_0x7faex3f,_0x7faex40){this[_0x97eb[216]](_0x7faex34,_0x7faex9,(_0x7faex34===_0x97eb[42]),mxUtils[_0x97eb[25]](this,function(_0x7faex38){var _0x7faex41=_0x7faex40!=null;for(var _0x7faex3c=0;_0x7faex3c<_0x7faex3f[_0x97eb[94]];_0x7faex3c++){var _0x7faex42=_0x7faex3d+_0x7faex3f[_0x7faex3c]+_0x7faex3e;_0x7faex38[_0x97eb[21]](this[_0x97eb[193]](_0x97eb[228]+_0x7faex42,80,80,_0x7faex3f[_0x7faex3c],(_0x7faex41)?_0x7faex40[_0x7faex3c]:null,_0x7faex41))}}))}
\ No newline at end of file
+'use strict';
+
+/**
+ * Construcs a new sidebar for the given editor.
+ */
+function Sidebar(editorUi, container) {
+       this.editorUi = editorUi;
+       this.container = container;
+       this.palettes = new Object();
+       this.showTooltips = true;
+       this.graph = new Graph(document.createElement('div'), null, null, this.editorUi
+               .editor.graph.getStylesheet());
+       this.graph.resetViewOnRootChange = false;
+       this.graph.foldingEnabled = false;
+       this.graph.setConnectable(false);
+       this.graph.autoScroll = false;
+       this.graph.setTooltips(false);
+       this.graph.setEnabled(false);
+
+       // Container must be in the DOM for correct HTML rendering
+       this.graph.container.style.visibility = 'hidden';
+       this.graph.container.style.position = 'absolute';
+       document.body.appendChild(this.graph.container);
+
+       if (!mxClient.IS_TOUCH) {
+               mxEvent.addListener(document, 'mouseup', mxUtils.bind(this, function() {
+                       this.showTooltips = true;
+               }));
+
+               // Enables tooltips after scroll
+               mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function() {
+                       this.showTooltips = true;
+               }));
+
+               mxEvent.addListener(document, 'mousedown', mxUtils.bind(this, function() {
+                       this.showTooltips = false;
+                       this.hideTooltip();
+               }));
+
+               mxEvent.addListener(document, 'mousemove', mxUtils.bind(this, function(evt) {
+                       var src = mxEvent.getSource(evt);
+
+                       while (src != null) {
+                               if (src == this.currentElt) {
+                                       return;
+                               }
+
+                               src = src.parentNode;
+                       }
+
+                       this.hideTooltip();
+               }));
+
+               // Handles mouse leaving the window
+               mxEvent.addListener(document, 'mouseout', mxUtils.bind(this, function(evt) {
+                       if (evt.toElement == null && evt.relatedTarget == null) {
+                               this.hideTooltip();
+                       }
+               }));
+       }
+
+       this.init();
+
+       // Pre-fetches tooltip image
+       new Image().src = IMAGE_PATH + '/tooltip.png';
+};
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.init = function() {
+       var dir = STENCIL_PATH;
+       console.log(dir);
+
+       // this.addImagePalette('entry', mxResources.get('application'), dir + '/',
+       //      '_128x128.png', ['start', 'question', 'input', 'end', 'email'], [mxResources.get('start'),
+       //              mxResources.get('question'), mxResources.get('input'), mxResources.get('end'), mxResources.get('email')
+       //      ]);
+       this.addImagePalette('entry', mxResources.get('application'), dir + '/',
+               '_128x128.png', ['start', 'question', 'input', 'end'], [mxResources.get('start'),
+                       mxResources.get('question'), mxResources.get('input'), mxResources.get('end')
+               ]);
+       // this.addBpmnPalette(dir, false);
+
+};
+
+/**
+ * Specifies if tooltips should be visible. Default is true.
+ */
+Sidebar.prototype.enableTooltips = !mxClient.IS_TOUCH;
+
+/**
+ * Specifies the delay for the tooltip. Default is 16 px.
+ */
+Sidebar.prototype.tooltipBorder = 16;
+
+/**
+ * Specifies the delay for the tooltip. Default is 3 px.
+ */
+Sidebar.prototype.thumbBorder = 3;
+
+/**
+ * Specifies the delay for the tooltip. Default is 300 ms.
+ */
+Sidebar.prototype.tooltipDelay = 300;
+
+/**
+ * Specifies if edges should be used as templates if clicked. Default is true.
+ */
+Sidebar.prototype.installEdges = true;
+
+/**
+ * Specifies the URL of the gear image.
+ */
+Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
+
+/**
+ * Specifies the width of the thumbnails.
+ */
+Sidebar.prototype.thumbWidth = 34;
+
+/**
+ * Specifies the height of the thumbnails.
+ */
+Sidebar.prototype.thumbHeight = 34;
+
+/**
+ * Specifies the padding for the thumbnails. Default is 3.
+ */
+Sidebar.prototype.thumbPadding = 2;
+
+/**
+ * Specifies the size of the sidebar titles.
+ */
+Sidebar.prototype.sidebarTitleSize = 9;
+
+/**
+ * Specifies if titles in the sidebar should be enabled.
+ */
+Sidebar.prototype.sidebarTitles = false;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.tooltipTitles = false;
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.showTooltip = function(elt, cells, title, showLabel) {
+       if (this.enableTooltips && this.showTooltips) {
+               if (this.currentElt != elt) {
+                       if (this.thread != null) {
+                               window.clearTimeout(this.thread);
+                               this.thread = null;
+                       }
+
+                       var show = mxUtils.bind(this, function() {
+                               // Lazy creation of the DOM nodes and graph instance
+                               if (this.tooltip == null) {
+                                       this.tooltip = document.createElement('div');
+                                       this.tooltip.className = 'geSidebarTooltip';
+                                       document.body.appendChild(this.tooltip);
+
+                                       this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph
+                                               .getStylesheet());
+                                       this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
+                                       this.graph2.resetViewOnRootChange = false;
+                                       this.graph2.foldingEnabled = false;
+                                       this.graph2.autoScroll = false;
+                                       this.graph2.setTooltips(false);
+                                       this.graph2.setConnectable(false);
+                                       this.graph2.setEnabled(false);
+
+                                       if (!mxClient.IS_SVG) {
+                                               this.graph2.view.canvas.style.position = 'relative';
+                                       }
+
+                                       this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
+                                       this.tooltipImage.style.position = 'absolute';
+                                       this.tooltipImage.style.width = '14px';
+                                       this.tooltipImage.style.height = '27px';
+
+                                       document.body.appendChild(this.tooltipImage);
+                               }
+
+                               this.tooltip.style.display = 'block';
+                               this.graph2.labelsVisible = (showLabel == null || showLabel);
+                               this.graph2.model.clear();
+                               this.graph2.addCells(cells);
+
+                               var bounds = this.graph2.getGraphBounds();
+                               var width = bounds.width + 2 * this.tooltipBorder;
+                               var height = bounds.height + 2 * this.tooltipBorder;
+
+                               if (mxClient.IS_QUIRKS) {
+                                       width += 4;
+                                       height += 4;
+                                       this.tooltip.style.overflow = 'hidden';
+                               } else {
+                                       this.tooltip.style.overflow = 'visible';
+                               }
+
+                               this.tooltipImage.style.visibility = 'visible';
+                               this.tooltip.style.width = width + 'px';
+
+                               // Adds title for entry
+                               if (this.tooltipTitles && title != null && title.length > 0) {
+                                       if (this.tooltipTitle == null) {
+                                               this.tooltipTitle = document.createElement('div');
+                                               this.tooltipTitle.style.borderTop = '1px solid gray';
+                                               this.tooltipTitle.style.textAlign = 'center';
+                                               this.tooltipTitle.style.width = '100%';
+
+                                               // Oversize titles are cut-off currently. Should make tooltip wider later.
+                                               this.tooltipTitle.style.overflow = 'hidden';
+
+                                               if (mxClient.IS_SVG) {
+                                                       this.tooltipTitle.style.paddingTop = '2px';
+                                               } else {
+                                                       this.tooltipTitle.style.position = 'absolute';
+                                                       this.tooltipTitle.style.paddingTop = '6px';
+                                               }
+
+                                               this.tooltip.appendChild(this.tooltipTitle);
+                                       } else {
+                                               this.tooltipTitle.innerHTML = '';
+                                       }
+
+                                       this.tooltipTitle.style.display = '';
+                                       mxUtils.write(this.tooltipTitle, title);
+
+                                       var dy = this.tooltipTitle.offsetHeight + 10;
+                                       height += dy;
+
+                                       if (mxClient.IS_SVG) {
+                                               this.tooltipTitle.style.marginTop = (-dy) + 'px';
+                                       } else {
+                                               height -= 6;
+                                               this.tooltipTitle.style.top = (height - dy) + 'px';
+                                       }
+                               } else if (this.tooltipTitle != null && this.tooltipTitle.parentNode !=
+                                       null) {
+                                       this.tooltipTitle.style.display = 'none';
+                               }
+
+                               this.tooltip.style.height = height + 'px';
+                               var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
+                               var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
+
+                               var left = this.container.clientWidth + this.editorUi.splitSize + 3;
+                               var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container
+                                       .scrollTop - height / 2 + 16));
+
+                               if (mxClient.IS_SVG) {
+                                       this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 +
+                                               ',' + y0 + ')');
+                               } else {
+                                       this.graph2.view.drawPane.style.left = x0 + 'px';
+                                       this.graph2.view.drawPane.style.top = y0 + 'px';
+                               }
+
+                               // Workaround for ignored position CSS style in IE9
+                               // (changes to relative without the following line)
+                               // Added width of the page-sidebar
+                               //              left += document.getElementById('page-sidebar').offsetWidth;
+                               // Added static height of the page-navbar
+                               top += 90;
+
+                               this.tooltip.style.position = 'absolute';
+                               this.tooltip.style.left = left + 'px';
+                               this.tooltip.style.top = top + 'px';
+                               this.tooltipImage.style.left = (left - 13) + 'px';
+                               this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
+                       });
+
+                       if (this.tooltip != null && this.tooltip.style.display != 'none') {
+                               show();
+                       } else {
+                               this.thread = window.setTimeout(show, this.tooltipDelay);
+                       }
+
+                       this.currentElt = elt;
+               }
+       }
+};
+
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.hideTooltip = function() {
+       if (this.thread != null) {
+               window.clearTimeout(this.thread);
+               this.thread = null;
+       }
+
+       if (this.tooltip != null) {
+               this.tooltip.style.display = 'none';
+               this.tooltipImage.style.visibility = 'hidden';
+               this.currentElt = null;
+       }
+};
+
+/**
+ * Creates and returns the given title element.
+ */
+Sidebar.prototype.createTitle = function(label) {
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geTitle';
+       mxUtils.write(elt, label);
+
+       return elt;
+};
+
+/**
+ * Creates a thumbnail for the given cells.
+ */
+Sidebar.prototype.createThumb = function(cells, width, height, parent, title,
+       showLabel) {
+       this.graph.labelsVisible = (showLabel == null || showLabel);
+       this.graph.view.scaleAndTranslate(1, 0, 0);
+       this.graph.addCells(cells);
+       var bounds = this.graph.getGraphBounds();
+       var corr = this.thumbBorder;
+       var s = Math.min((width - 2) / (bounds.width - bounds.x + corr), (height - 2) /
+               (bounds.height - bounds.y + corr));
+       var x0 = -Math.min(bounds.x, 0);
+       var y0 = -Math.min(bounds.y, 0);
+       this.graph.view.scaleAndTranslate(s, x0, y0);
+
+       bounds = this.graph.getGraphBounds();
+       var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
+       var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
+
+       var node = null;
+
+       // For supporting HTML labels in IE9 standards mode the container is cloned instead
+       if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO) {
+               node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
+       }
+       // LATER: Check if deep clone can be used for quirks if container in DOM
+       else {
+               node = this.graph.container.cloneNode(false);
+               node.innerHTML = this.graph.container.innerHTML;
+       }
+
+       this.graph.getModel().clear();
+
+       // Catch-all event handling
+       if (mxClient.IS_IE6) {
+               parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage +
+                       ')';
+       }
+
+       var dd = 3;
+       node.style.position = 'relative';
+       node.style.overflow = 'hidden';
+       node.style.cursor = 'pointer';
+       node.style.left = (dx + dd) + 'px';
+       node.style.top = (dy + dd) + 'px';
+       node.style.width = width + 'px';
+       node.style.height = height + 'px';
+       node.style.visibility = '';
+       node.style.minWidth = '';
+       node.style.minHeight = '';
+
+       parent.appendChild(node);
+
+       // Adds title for sidebar entries
+       if (this.sidebarTitles && title != null) {
+               var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2 : 0;
+               parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) +
+                       'px';
+
+               var div = document.createElement('div');
+               div.style.fontSize = this.sidebarTitleSize + 'px';
+               div.style.textAlign = 'center';
+               div.style.whiteSpace = 'nowrap';
+
+               if (mxClient.IS_IE) {
+                       div.style.height = (this.sidebarTitleSize + 12) + 'px';
+               }
+
+               div.style.paddingTop = '4px';
+               mxUtils.write(div, title);
+               parent.appendChild(div);
+       }
+};
+
+/**
+ * Creates and returns a new palette item for the given image.
+ */
+Sidebar.prototype.createItem = function(cells, title, showLabel) {
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geItem';
+       elt.style.overflow = 'hidden';
+       var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
+       elt.style.width = (this.thumbWidth + border) + 'px';
+       elt.style.height = (this.thumbHeight + border) + 'px';
+       elt.style.padding = this.thumbPadding + 'px';
+
+       // Blocks default click action
+       mxEvent.addListener(elt, 'click', function(evt) {
+               mxEvent.consume(evt);
+       });
+
+       this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title,
+               showLabel);
+
+       return elt;
+};
+
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createDropHandler = function(cells, allowSplit) {
+       return function(graph, evt, target, x, y) {
+               if (graph.isEnabled()) {
+                       cells = graph.getImportableCells(cells);
+
+                       if (cells.length > 0) {
+                               var validDropTarget = (target != null) ?
+                                       graph.isValidDropTarget(target, cells, evt) : false;
+                               var select = null;
+
+                               if (target != null && !validDropTarget) {
+                                       target = null;
+                               }
+
+                               // Splits the target edge or inserts into target group
+                               if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target,
+                                               cells, evt)) {
+                                       graph.splitEdge(target, cells, null, x, y);
+                                       select = cells;
+                               } else if (cells.length > 0) {
+                                       select = graph.importCells(cells, x, y, target);
+                               }
+
+                               if (select != null && select.length > 0) {
+                                       graph.scrollCellToVisible(select[0]);
+                                       graph.setSelectionCells(select);
+                               }
+                       }
+               }
+       };
+};
+
+/**
+ * Creates and returns a preview element for the given width and height.
+ */
+Sidebar.prototype.createDragPreview = function(width, height) {
+       var elt = document.createElement('div');
+       elt.style.border = '1px dashed black';
+       elt.style.width = width + 'px';
+       elt.style.height = height + 'px';
+
+       return elt;
+};
+
+/**
+ * Creates a drag source for the given element.
+ */
+Sidebar.prototype.createDragSource = function(elt, dropHandler, preview) {
+       var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph,
+               dropHandler,
+               preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
+
+
+
+       // Allows drop into cell only if target is a valid root
+       dragSource.getDropTarget = function(graph, x, y) {
+               var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
+               if (!graph.isValidRoot(target)) {
+                       target = null;
+               }
+
+               return target;
+       };
+
+       return dragSource;
+};
+
+
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.addClickHandler = function(elt, ds) {
+       var graph = this.editorUi.editor.graph;
+       var first = null;
+
+       mxEvent.addGestureListeners(elt, function(evt) {
+               first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+       });
+
+       var oldMouseUp = ds.mouseUp;
+       ds.mouseUp = function(evt) {
+               if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first !=
+                       null) {
+                       var tol = graph.tolerance;
+
+                       if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
+                               Math.abs(first.y - mxEvent.getClientY(evt)) <= tol) {
+                               var gs = graph.getGridSize();
+                               ds.drop(graph, evt, null, gs, gs);
+                       }
+               }
+
+               oldMouseUp.apply(this, arguments);
+               first = null;
+       };
+};
+
+/**
+ * Giuseppe Careri
+ * Create xml document vertex
+ */
+Sidebar.prototype.createXmlDocument = function(element, label, variables,
+       values) {
+       var doc = mxUtils.createXmlDocument();
+       var node = doc.createElement(element)
+       node.setAttribute('label', label);
+
+       variables.forEach(function(variable, index) {
+               node.setAttribute(variable, values[index] ? values[index] : '');
+       });
+
+       return node;
+}
+
+/**
+ * Giuseppe Careri
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplate = function(style, width, height, value,
+       title, showLabel) {
+       var variables = [];
+       var values = [];
+
+       switch (value) {
+
+               case 'question':
+                       variables = ['question', 'other'];
+                       values = [''];
+                       break;
+               case 'input':
+                       variables = ['question', 'add'];
+                       values = [''];
+                       break;
+               case 'email':
+                       variables = ["Host", "Username", "Password", "To", "Subject", "Body"];
+                       values = [''];
+                       break;
+               default:
+                       variables = [];
+                       values = [];
+                       break;
+       }
+
+       var node = this.createXmlDocument(value, title, variables, values);
+
+       //var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+       var cells = [new mxCell(node, new mxGeometry(0, 0, width, height), style)];
+       cells[0].vertex = true;
+
+       return this.createVertexTemplateFromCells(cells, width, height, title,
+               showLabel);
+};
+
+
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height,
+       title, showLabel) {
+       var elt = this.createItem(cells, title, showLabel);
+       var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this
+               .createDragPreview(width, height));
+       this.addClickHandler(elt, ds);
+
+       // Uses guides for vertices only if enabled in graph
+       ds.isGuidesEnabled = mxUtils.bind(this, function() {
+               return this.editorUi.editor.graph.graphHandler.guidesEnabled;
+       });
+
+       // Shows a tooltip with the rendered cell
+       if (!touchStyle) {
+               mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
+                       this.showTooltip(elt, cells, title, showLabel);
+               }));
+       }
+
+       return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplate = function(style, width, height, value,
+       title, showLabel) {
+       var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0,
+               width, height), style)];
+       cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
+       cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
+       cells[0].geometry.relative = true;
+       cells[0].edge = true;
+
+       return this.createEdgeTemplateFromCells(cells, width, height, title,
+               showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height,
+       title, showLabel) {
+       var elt = this.createItem(cells, title, showLabel);
+       this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(
+               width, height));
+
+       // Installs the default edge
+       var graph = this.editorUi.editor.graph;
+       mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) {
+               if (this.installEdges) {
+                       graph.setDefaultEdge(cells[0]);
+               }
+
+               // Highlights the entry for 200ms
+               elt.style.backgroundColor = '#ffffff';
+
+               window.setTimeout(function() {
+                       elt.style.backgroundColor = '';
+               }, 300);
+
+               mxEvent.consume(evt);
+       }));
+
+       // Shows a tooltip with the rendered cell
+       touchStyle = false;
+       if (!touchStyle) {
+               mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
+                       this.showTooltip(elt, cells, title, showLabel);
+               }));
+       }
+
+       return elt;
+};
+
+/**
+ * Adds the given palette.
+ */
+Sidebar.prototype.addPalette = function(id, title, expanded, onInit) {
+       var elt = this.createTitle(title);
+       this.container.appendChild(elt);
+
+       var div = document.createElement('div');
+       div.className = 'geSidebar';
+
+       if (expanded) {
+               onInit(div);
+               onInit = null;
+       } else {
+               div.style.display = 'none';
+       }
+
+       this.addFoldingHandler(elt, div, onInit);
+
+       var outer = document.createElement('div');
+       outer.appendChild(div);
+       this.container.appendChild(outer);
+
+       // Keeps references to the DOM nodes
+       if (id != null) {
+               this.palettes[id] = [elt, outer];
+       }
+};
+
+/**
+ * Create the given title element.
+ */
+Sidebar.prototype.addFoldingHandler = function(title, content, funct) {
+       var initialized = false;
+
+       title.style.backgroundImage = (content.style.display == 'none') ?
+               'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH +
+               '/expanded.gif)';
+       title.style.backgroundRepeat = 'no-repeat';
+       title.style.backgroundPosition = '100% 50%';
+
+       mxEvent.addListener(title, 'click', function(evt) {
+               if (content.style.display == 'none') {
+                       if (!initialized) {
+                               initialized = true;
+
+                               if (funct != null) {
+                                       title.style.cursor = 'wait';
+                                       window.setTimeout(function() {
+                                               funct(content);
+                                               title.style.cursor = '';
+                                       }, 0);
+                               }
+                       }
+
+                       title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+                       content.style.display = 'block';
+               } else {
+                       title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
+                       content.style.display = 'none';
+               }
+
+               mxEvent.consume(evt);
+       });
+};
+
+/**
+ * Removes the palette for the given ID.
+ */
+Sidebar.prototype.removePalette = function(id) {
+       var elts = this.palettes[id];
+
+       if (elts != null) {
+               this.palettes[id] = null;
+
+               for (var i = 0; i < elts.length; i++) {
+                       this.container.removeChild(elts[i]);
+               }
+
+               return true;
+       }
+
+       return false;
+};
+
+/**
+ * Adds the given image palette.
+ */
+Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items,
+       titles) {
+       // Giuseppe Careri
+       // Expanded Sidebar only entry
+       this.addPalette(id, title, (id === 'entry'), mxUtils.bind(this, function(
+               content) {
+               var showTitles = titles != null;
+
+               for (var i = 0; i < items.length; i++) {
+                       var icon = prefix + items[i] + postfix;
+                       content.appendChild(this.createVertexTemplate('image;image=' + icon, 80,
+                               80, items[i], (showTitles) ? titles[i] : null, showTitles));
+               }
+       }));
+};
+// ***********modified***************
+// Sidebar.prototype.addBpmnPalette = function(dir, expand) {
+//     //Abigael Dawit
+//
+//     var fns = [
+//             this.createVertexTemplate(
+//                     'text;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;',
+//                     40, 20, 'Text', 'Text', null),
+//             //this.createVertexTemplate('shape=ext;rounded=1;whiteSpace=wrap;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', null),
+//             this.createVertexTemplate('shape=swimlane;whiteSpace=wrap;startSize=60;',
+//                     120, 160, 'Container', 'Container', null),
+//             //      this.createVertexTemplate('shape=ellipse;', 120, 160, 'Ellips', 'Ellipse', null)
+//             this.createVertexTemplate(
+//                     'shape=swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;fillColor=none;rounded=1;verticalAlign=middle',
+//                     300, 120, 'Lane', 'Lane', null)
+//
+//     ]
+//
+//     this.addPalette('utility', 'Utility ', false, mxUtils.bind(this, function(
+//             content) {
+//             //var showTitles = titles != null;
+//             for (var i = 0; i < fns.length; i++) {
+//                     content.appendChild(fns[i]);
+//             }
+//     }));
+//
+// };
index c976946..7eab562 100644 (file)
@@ -1 +1,407 @@
-var _0x4d4b=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x6E\x69\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x62\x69\x6E\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x61\x76\x65","\x70\x75\x62\x6C\x69\x73\x68","\x2D","\x70\x72\x69\x6E\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x6F\x70\x79","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x61\x64\x64\x49\x74\x65\x6D\x73","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x67\x65\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x73\x74\x79\x6C\x65","\x6E\x6F\x77\x72\x61\x70","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x77\x69\x64\x74\x68","\x37\x30\x70\x78","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x31\x32","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x33\x30\x70\x78","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2E\x2E\x2E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x6E\x75\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x4D\x65\x6E\x75\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x42\x75\x74\x74\x6F\x6E","\x69\x6E\x69\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x67\x65\x53\x70\x72\x69\x74\x65\x2D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x64\x49\x74\x65\x6D","\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x61\x62\x65\x6C","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x61\x64\x64\x45\x64\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x69\x73\x45\x64\x67\x65","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x74\x69\x74\x6C\x65","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64\x53\x74\x61\x74\x65","\x20\x67\x65\x44\x69\x73\x61\x62\x6C\x65\x64","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x42\x75\x74\x74\x6F\x6E","\x67\x65\x53\x70\x72\x69\x74\x65\x20","\x67\x65\x4C\x61\x62\x65\x6C","\x77\x72\x69\x74\x65","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x20\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x65\x6E\x75","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x6C\x61\x62\x65\x6C\x73","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70"];function Toolbar(_0xc19dx2,_0xc19dx3){this[_0x4d4b[0]]=_0xc19dx2;this[_0x4d4b[1]]=_0xc19dx3;this[_0x4d4b[2]]();mxEvent[_0x4d4b[5]](document,mxUtils[_0x4d4b[4]](this,function(_0xc19dx4){this[_0x4d4b[3]]()}))}Toolbar[_0x4d4b[6]][_0x4d4b[2]]=function(){this[_0x4d4b[21]]([_0x4d4b[7],_0x4d4b[8],_0x4d4b[9],_0x4d4b[10],_0x4d4b[11],_0x4d4b[12],_0x4d4b[9],_0x4d4b[13],_0x4d4b[14],_0x4d4b[15],_0x4d4b[16],_0x4d4b[9],_0x4d4b[17],_0x4d4b[9],_0x4d4b[18],_0x4d4b[19],_0x4d4b[20],_0x4d4b[9]]);var _0xc19dx5=this[_0x4d4b[25]](_0x4d4b[22],mxResources[_0x4d4b[24]](_0x4d4b[23]),true,_0x4d4b[23]);_0xc19dx5[_0x4d4b[27]][_0x4d4b[26]]=_0x4d4b[28];_0xc19dx5[_0x4d4b[27]][_0x4d4b[29]]=_0x4d4b[30];_0xc19dx5[_0x4d4b[27]][_0x4d4b[31]]=_0x4d4b[32];this[_0x4d4b[33]]();var _0xc19dx6=this[_0x4d4b[25]](_0x4d4b[34],mxResources[_0x4d4b[24]](_0x4d4b[35]),true,_0x4d4b[35]);_0xc19dx6[_0x4d4b[27]][_0x4d4b[26]]=_0x4d4b[28];_0xc19dx6[_0x4d4b[27]][_0x4d4b[29]]=_0x4d4b[30];_0xc19dx6[_0x4d4b[27]][_0x4d4b[31]]=_0x4d4b[36];this[_0x4d4b[21]]([_0x4d4b[9],_0x4d4b[37],_0x4d4b[38],_0x4d4b[39]]);var _0xc19dx7=this[_0x4d4b[0]][_0x4d4b[41]][_0x4d4b[40]];var _0xc19dx8=mxUtils[_0x4d4b[4]](this,function(){var _0xc19dx9=_0x4d4b[22];var _0xc19dxa=_0x4d4b[34];var _0xc19dxb=_0xc19dx7[_0x4d4b[44]]()[_0x4d4b[43]](_0xc19dx7[_0x4d4b[42]]());if(_0xc19dxb!=null){_0xc19dx9=_0xc19dxb[_0x4d4b[27]][mxConstants[_0x4d4b[45]]]||_0xc19dx9;_0xc19dxa=_0xc19dxb[_0x4d4b[27]][mxConstants[_0x4d4b[46]]]||_0xc19dxa;if(_0xc19dx9[_0x4d4b[47]]>10){_0xc19dx9=_0xc19dx9[_0x4d4b[48]](0,8)+_0x4d4b[49]};_0xc19dx5[_0x4d4b[50]]=_0xc19dx9;_0xc19dx6[_0x4d4b[50]]=_0xc19dxa}});_0xc19dx7[_0x4d4b[52]]()[_0x4d4b[51]](mxEvent.CHANGE,_0xc19dx8);_0xc19dx7[_0x4d4b[53]]()[_0x4d4b[51]](mxEvent.CHANGE,_0xc19dx8)};Toolbar[_0x4d4b[6]][_0x4d4b[3]]=function(){if(this[_0x4d4b[54]]!=null){this[_0x4d4b[54]][_0x4d4b[3]]();this[_0x4d4b[54]][_0x4d4b[55]]();this[_0x4d4b[54]]=null}};Toolbar[_0x4d4b[6]][_0x4d4b[25]]=function(_0xc19dxc,_0xc19dxd,_0xc19dxe,_0xc19dxf){var _0xc19dx10=this[_0x4d4b[0]][_0x4d4b[56]][_0x4d4b[24]](_0xc19dxf);var _0xc19dx11=this[_0x4d4b[58]](_0xc19dxc,_0xc19dxd,_0xc19dxe,_0xc19dx10[_0x4d4b[57]]);_0xc19dx10[_0x4d4b[51]](_0x4d4b[59],function(){_0xc19dx11[_0x4d4b[61]](_0xc19dx10[_0x4d4b[60]])});return _0xc19dx11};Toolbar[_0x4d4b[6]][_0x4d4b[58]]=function(_0xc19dxc,_0xc19dxd,_0xc19dxe,_0xc19dx12){var _0xc19dx11=(_0xc19dxe)?this[_0x4d4b[62]](_0xc19dxc):this[_0x4d4b[63]](_0xc19dxc);this[_0x4d4b[64]](_0xc19dx11,_0xc19dxd);this[_0x4d4b[65]](_0xc19dx11,_0xc19dxe,_0xc19dx12);this[_0x4d4b[1]][_0x4d4b[66]](_0xc19dx11);return _0xc19dx11};Toolbar[_0x4d4b[6]][_0x4d4b[33]]=function(){var _0xc19dx11=document[_0x4d4b[68]](_0x4d4b[67]);_0xc19dx11[_0x4d4b[69]]=_0x4d4b[70];this[_0x4d4b[1]][_0x4d4b[66]](_0xc19dx11);return _0xc19dx11};Toolbar[_0x4d4b[6]][_0x4d4b[21]]=function(_0xc19dx13){for(var _0xc19dx14=0;_0xc19dx14<_0xc19dx13[_0x4d4b[47]];_0xc19dx14++){var _0xc19dx15=_0xc19dx13[_0xc19dx14];if(_0xc19dx15==_0x4d4b[9]){this[_0x4d4b[33]]()}else {this[_0x4d4b[73]](_0x4d4b[71]+_0xc19dx15[_0x4d4b[72]](),_0xc19dx15)}}};Toolbar[_0x4d4b[6]][_0x4d4b[73]]=function(_0xc19dx16,_0xc19dx15){var _0xc19dx17=this[_0x4d4b[0]][_0x4d4b[74]][_0x4d4b[24]](_0xc19dx15);var _0xc19dx11=null;if(_0xc19dx17!=null){_0xc19dx11=this[_0x4d4b[76]](_0xc19dx16,_0xc19dx17[_0x4d4b[75]],_0xc19dx17[_0x4d4b[57]]);_0xc19dx11[_0x4d4b[61]](_0xc19dx17[_0x4d4b[60]]);_0xc19dx17[_0x4d4b[51]](_0x4d4b[59],function(){_0xc19dx11[_0x4d4b[61]](_0xc19dx17[_0x4d4b[60]])})};return _0xc19dx11};Toolbar[_0x4d4b[6]][_0x4d4b[76]]=function(_0xc19dx18,_0xc19dxd,_0xc19dx12){var _0xc19dx11=this[_0x4d4b[63]](_0xc19dx18);this[_0x4d4b[64]](_0xc19dx11,_0xc19dxd);this[_0x4d4b[77]](_0xc19dx11,_0xc19dx12);this[_0x4d4b[1]][_0x4d4b[66]](_0xc19dx11);return _0xc19dx11};Toolbar[_0x4d4b[6]][_0x4d4b[78]]=function(_0xc19dx19){var _0xc19dx7=this[_0x4d4b[0]][_0x4d4b[41]][_0x4d4b[40]];var _0xc19dx1a=function(){var _0xc19dx1b=!_0xc19dx7[_0x4d4b[79]]();for(var _0xc19dx14=0;_0xc19dx14<_0xc19dx19[_0x4d4b[47]];_0xc19dx14++){_0xc19dx19[_0xc19dx14][_0x4d4b[61]](_0xc19dx1b)}};_0xc19dx7[_0x4d4b[52]]()[_0x4d4b[51]](mxEvent.CHANGE,_0xc19dx1a);_0xc19dx1a()};Toolbar[_0x4d4b[6]][_0x4d4b[80]]=function(_0xc19dx19){var _0xc19dx7=this[_0x4d4b[0]][_0x4d4b[41]][_0x4d4b[40]];var _0xc19dx1a=function(){var _0xc19dx1c=false;if(!_0xc19dx7[_0x4d4b[79]]()){var _0xc19dx1d=_0xc19dx7[_0x4d4b[81]]();for(var _0xc19dx14=0;_0xc19dx14<_0xc19dx1d[_0x4d4b[47]];_0xc19dx14++){if(_0xc19dx7[_0x4d4b[53]]()[_0x4d4b[82]](_0xc19dx1d[_0xc19dx14])){_0xc19dx1c=true;break}}};for(var _0xc19dx14=0;_0xc19dx14<_0xc19dx19[_0x4d4b[47]];_0xc19dx14++){_0xc19dx19[_0xc19dx14][_0x4d4b[61]](_0xc19dx1c)}};_0xc19dx7[_0x4d4b[52]]()[_0x4d4b[51]](mxEvent.CHANGE,_0xc19dx1a);_0xc19dx1a()};Toolbar[_0x4d4b[6]][_0x4d4b[64]]=function(_0xc19dx11,_0xc19dxd){_0xc19dx11[_0x4d4b[85]](_0x4d4b[83],_0x4d4b[84]);if(_0xc19dxd!=null){_0xc19dx11[_0x4d4b[85]](_0x4d4b[86],_0xc19dxd)};this[_0x4d4b[87]](_0xc19dx11)};Toolbar[_0x4d4b[6]][_0x4d4b[87]]=function(_0xc19dx11){var _0xc19dx18=_0xc19dx11[_0x4d4b[69]];_0xc19dx11[_0x4d4b[61]]=function(_0xc19dx1e){_0xc19dx11[_0x4d4b[60]]=_0xc19dx1e;if(_0xc19dx1e){_0xc19dx11[_0x4d4b[69]]=_0xc19dx18}else {_0xc19dx11[_0x4d4b[69]]=_0xc19dx18+_0x4d4b[88]}};_0xc19dx11[_0x4d4b[61]](true)};Toolbar[_0x4d4b[6]][_0x4d4b[77]]=function(_0xc19dx11,_0xc19dx12){if(_0xc19dx12!=null){mxEvent[_0x4d4b[51]](_0xc19dx11,_0x4d4b[89],function(_0xc19dx4){if(_0xc19dx11[_0x4d4b[60]]){_0xc19dx12(_0xc19dx4)};mxEvent[_0x4d4b[90]](_0xc19dx4)})}};Toolbar[_0x4d4b[6]][_0x4d4b[63]]=function(_0xc19dx18){var _0xc19dx11=document[_0x4d4b[68]](_0x4d4b[91]);_0xc19dx11[_0x4d4b[85]](_0x4d4b[92],_0x4d4b[93]);_0xc19dx11[_0x4d4b[69]]=_0x4d4b[94];var _0xc19dx1f=document[_0x4d4b[68]](_0x4d4b[67]);_0xc19dx1f[_0x4d4b[69]]=_0x4d4b[95]+_0xc19dx18;_0xc19dx11[_0x4d4b[66]](_0xc19dx1f);return _0xc19dx11};Toolbar[_0x4d4b[6]][_0x4d4b[62]]=function(_0xc19dxc,_0xc19dxd){var _0xc19dx11=document[_0x4d4b[68]](_0x4d4b[91]);_0xc19dx11[_0x4d4b[85]](_0x4d4b[92],_0x4d4b[93]);_0xc19dx11[_0x4d4b[69]]=_0x4d4b[96];mxUtils[_0x4d4b[97]](_0xc19dx11,_0xc19dxc);return _0xc19dx11};Toolbar[_0x4d4b[6]][_0x4d4b[65]]=function(_0xc19dx11,_0xc19dxe,_0xc19dx12,_0xc19dx20){if(_0xc19dx12!=null){var _0xc19dx7=this[_0x4d4b[0]][_0x4d4b[41]][_0x4d4b[40]];var _0xc19dx10=null;mxEvent[_0x4d4b[51]](_0xc19dx11,_0x4d4b[89],mxUtils[_0x4d4b[4]](this,function(_0xc19dx4){if(_0xc19dx11[_0x4d4b[60]]==null||_0xc19dx11[_0x4d4b[60]]){_0xc19dx7[_0x4d4b[98]][_0x4d4b[3]]();_0xc19dx10= new mxPopupMenu(_0xc19dx12);_0xc19dx10[_0x4d4b[67]][_0x4d4b[69]]+=_0x4d4b[99];_0xc19dx10[_0x4d4b[100]]=_0xc19dx20;_0xc19dx10[_0x4d4b[101]]=_0xc19dxe;_0xc19dx10[_0x4d4b[102]]=true;_0xc19dx10[_0x4d4b[106]](_0xc19dx11[_0x4d4b[103]],_0xc19dx11[_0x4d4b[104]]+_0xc19dx11[_0x4d4b[105]]+34,null,_0xc19dx4);this[_0x4d4b[54]]=_0xc19dx10};mxEvent[_0x4d4b[90]](_0xc19dx4)}))}}
\ No newline at end of file
+/**
+ * $Id: Toolbar.js,v 1.3 2013-02-20 16:21:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new toolbar for the given editor.
+ */
+function Toolbar(editorUi, container)
+{
+       this.editorUi = editorUi;
+       this.container = container;
+       this.init();
+
+       // Global handler to hide the current menu
+       mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+       {
+               this.hideMenu();
+       }));
+};
+
+/**
+ * Adds the toolbar elements.
+ */
+Toolbar.prototype.init = function()
+{
+       this.addItems(['save', 'publish', '-', 'print', 'undo', 'redo', '-', 'copy', 'cut', 'paste', 'delete', '-', 'duplicate', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
+       var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+       fontElt.style.whiteSpace = 'nowrap';
+       fontElt.style.overflow = 'hidden';
+       fontElt.style.width = '70px';
+       this.addSeparator();
+       var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+       sizeElt.style.whiteSpace = 'nowrap';
+       sizeElt.style.overflow = 'hidden';
+       sizeElt.style.width = '30px';
+
+       this.addItems(['-', 'bold', 'italic', 'underline']);
+       // Giuseppe Careri
+       // var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null).setAttribute('title', mxResources.get('left'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null).setAttribute('title', mxResources.get('center'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null).setAttribute('title', mxResources.get('right'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
+       // }));
+       // this.addItems(['fontColor', '-']);
+       // var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
+       // }));
+       // var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+       // }));
+       // var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+       // }));
+       // this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
+       // this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
+       // this.addItems(['shadow']);
+
+       var graph = this.editorUi.editor.graph;
+
+       // Update font size and font family labels
+       var update = mxUtils.bind(this, function()
+       {
+               var ff = 'Helvetica';
+               var fs = '12';
+       var state = graph.getView().getState(graph.getSelectionCell());
+
+       if (state != null)
+       {
+               ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
+               fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
+
+               if (ff.length > 10)
+               {
+                       ff = ff.substring(0, 8) + '...';
+               }
+
+               fontElt.innerHTML = ff;
+               sizeElt.innerHTML = fs;
+       }
+       });
+
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
+    graph.getModel().addListener(mxEvent.CHANGE, update);
+
+       // Giuseppe Careri
+       // Updates button states
+  //this.addEdgeSelectionHandler([line, linestart, lineend]);
+       //this.addSelectionHandler([align]);
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.hideMenu = function()
+{
+       if (this.currentMenu != null)
+       {
+               this.currentMenu.hideMenu();
+               this.currentMenu.destroy();
+               this.currentMenu = null;
+       }
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
+{
+       var menu = this.editorUi.menus.get(name);
+       var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
+
+       menu.addListener('stateChanged', function()
+       {
+               elt.setEnabled(menu.enabled);
+       });
+
+       return elt;
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
+{
+       var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
+       this.initElement(elt, tooltip);
+       this.addMenuHandler(elt, showLabels, funct);
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Adds a separator to the separator.
+ */
+Toolbar.prototype.addSeparator = function()
+{
+       var elt = document.createElement('div');
+       elt.className = 'geSeparator';
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItems = function(keys)
+{
+       for (var i = 0; i < keys.length; i++)
+       {
+               var key = keys[i];
+
+               if (key == '-')
+               {
+                       this.addSeparator();
+               }
+               else
+               {
+                       this.addItem('geSprite-' + key.toLowerCase(), key);
+               }
+       }
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItem = function(sprite, key)
+{
+       var action = this.editorUi.actions.get(key);
+       var elt = null;
+
+       if (action != null)
+       {
+               elt = this.addButton(sprite, action.label, action.funct);
+               elt.setEnabled(action.enabled);
+
+               action.addListener('stateChanged', function()
+               {
+                       elt.setEnabled(action.enabled);
+               });
+       }
+
+       return elt;
+};
+
+/**
+ * Adds a button to the toolbar.
+ */
+Toolbar.prototype.addButton = function(classname, tooltip, funct)
+{
+       var elt = this.createButton(classname);
+
+       this.initElement(elt, tooltip);
+       this.addClickHandler(elt, funct);
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addSelectionHandler = function(items)
+{
+       var graph = this.editorUi.editor.graph;
+
+       var selectionListener = function()
+    {
+       var selected = !graph.isSelectionEmpty();
+
+       for (var i = 0; i < items.length; i++)
+       {
+               items[i].setEnabled(selected);
+       }
+    };
+
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addEdgeSelectionHandler = function(items)
+{
+       var graph = this.editorUi.editor.graph;
+
+       var selectionListener = function()
+    {
+               var edgeSelected = false;
+
+               if (!graph.isSelectionEmpty())
+               {
+                       var cells = graph.getSelectionCells();
+
+                       for (var i = 0; i < cells.length; i++)
+                       {
+                               if (graph.getModel().isEdge(cells[i]))
+                               {
+                                       edgeSelected = true;
+                                       break;
+                               }
+                       }
+               }
+
+       for (var i = 0; i < items.length; i++)
+       {
+               items[i].setEnabled(edgeSelected);
+       }
+    };
+
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Initializes the given toolbar element.
+ */
+Toolbar.prototype.initElement = function(elt, tooltip)
+{
+       elt.setAttribute('tabindex', '0');
+
+       // Adds tooltip
+       if (tooltip != null)
+       {
+               elt.setAttribute('title', tooltip);
+       }
+
+       this.addEnabledState(elt);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addEnabledState = function(elt)
+{
+       var classname = elt.className;
+
+       elt.setEnabled = function(value)
+       {
+               elt.enabled = value;
+
+               if (value)
+               {
+                       elt.className = classname;
+               }
+               else
+               {
+                       elt.className = classname + ' geDisabled';
+               }
+       };
+
+       elt.setEnabled(true);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addClickHandler = function(elt, funct)
+{
+       if (funct != null)
+       {
+               mxEvent.addListener(elt, 'click', function(evt)
+               {
+                       if (elt.enabled)
+                       {
+                               funct(evt);
+                       }
+
+                       mxEvent.consume(evt);
+               });
+       }
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createButton = function(classname)
+{
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geButton';
+
+       var inner = document.createElement('div');
+       inner.className = 'geSprite ' + classname;
+       elt.appendChild(inner);
+
+       return elt;
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createLabel = function(label, tooltip)
+{
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geLabel';
+       mxUtils.write(elt, label);
+
+       return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
+{
+       if (funct != null)
+       {
+               var graph = this.editorUi.editor.graph;
+               var menu = null;
+
+               mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+               {
+                       if (elt.enabled == null || elt.enabled)
+                       {
+                               graph.panningHandler.hideMenu();
+                               menu = new mxPopupMenu(funct);
+                               menu.div.className += ' geToolbarMenu';
+                               menu.showDisabled = showAll;
+                               menu.labels = showLabels;
+                               menu.autoExpand = true;
+
+                               menu.popup(elt.offsetLeft, elt.offsetTop + elt.offsetHeight + 34, null, evt);
+                               this.currentMenu = menu;
+                       }
+
+                       mxEvent.consume(evt);
+               }));
+       }
+};
index 9070ea5..a53e30b 100644 (file)
@@ -1 +1,283 @@
-var _0xca78=["\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x26","\x73\x70\x6C\x69\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x3D","\x69\x6E\x64\x65\x78\x4F\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x65\x78\x70\x2E\x64\x72\x61\x77\x2E\x69\x6F\x2F\x49\x6D\x61\x67\x65\x45\x78\x70\x6F\x72\x74\x32\x2F\x65\x78\x70\x6F\x72\x74","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x33\x30\x30\x30","\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x2F","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x68\x61\x70\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x74\x79\x6C\x65\x73","\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6F\x70\x65\x6E","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x2F\x64\x69\x61","\x63\x75\x73\x74\x6F\x6D","\x4E\x47\x5F\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x4C\x41\x4E\x47\x5F\x4B\x45\x59","\x67\x65\x74\x49\x74\x65\x6D","\x6C\x6F\x67","\x65\x6E","\x65\x6E\x5F\x45\x4E","\x69\x74","\x6D\x78\x4C\x61\x6E\x67\x75\x61\x67\x65","\x61\x72","\x62\x73","\x63\x73","\x64\x61","\x64\x65","\x65\x6C","\x65\x73","\x65\x73\x2D\x61\x72","\x66\x72","\x68\x75","\x69\x64","\x6A\x61","\x6B\x6F","\x6E\x6C","\x6E\x6F","\x70\x6C","\x70\x74\x2D\x62\x72","\x70\x74","\x72\x6F","\x72\x75","\x73\x72","\x73\x76","\x74\x68","\x74\x72","\x75\x6B","\x7A\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x6A\x73","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x20\x43\x61\x6E\x74\x6F\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x54\x61\x69\x77\x61\x6E\x20\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x4D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x42\x72\x61\x7A\x69\x6C\x69\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x61\x74\x61\x6C\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x7A\x65\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x75\x74\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x49\x74\x61\x6C\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65\x09","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x4D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x4D\x61\x6C\x65","\x53\x77\x65\x64\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x53\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x4B\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x53\x70\x61\x69\x6E\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x4D\x65\x78\x69\x63\x6F\x29","\x49\x74\x61\x6C\x69\x61\x6E\x20\x28\x49\x74\x61\x6C\x79\x29\x20\x2F\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x28\x46\x69\x6E\x6C\x61\x6E\x64\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x46\x72\x61\x6E\x63\x65\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x50\x6F\x6C\x69\x73\x68\x20\x28\x50\x6F\x6C\x61\x6E\x64\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x50\x6F\x72\x74\x75\x67\x61\x6C\x29","\x43\x61\x74\x61\x6C\x61\x6E\x20\x28\x43\x61\x74\x61\x6C\x61\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x61\x69\x77\x61\x6E\x29","\x44\x61\x6E\x69\x73\x68\x20\x28\x44\x65\x6E\x6D\x61\x72\x6B\x29","\x47\x65\x72\x6D\x61\x6E\x20\x28\x47\x65\x72\x6D\x61\x6E\x79\x29","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x28\x4A\x61\x70\x61\x6E\x29","\x4B\x6F\x72\x65\x61\x6E\x20\x28\x4B\x6F\x72\x65\x61\x29","\x44\x75\x74\x63\x68\x20\x28\x4E\x65\x74\x68\x65\x72\x6C\x61\x6E\x64\x73\x29","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x6F\x72\x77\x61\x79\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x42\x72\x61\x7A\x69\x6C\x29","\x52\x75\x73\x73\x69\x61\x6E\x20\x28\x52\x75\x73\x73\x69\x61\x29","\x53\x77\x65\x64\x69\x73\x68\x20\x28\x53\x77\x65\x64\x65\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x43\x68\x69\x6E\x61\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x29","\x44\x65\x66\x61\x75\x6C\x74","\x44\x61\x74\x65","\x55\x53\x20\x4D\x6F\x6E\x65\x79","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39\x39","\x54\x69\x6D\x65","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72","\x53\x74\x72\x65\x65\x74\x73","\x55\x53\x20\x43\x69\x74\x79\x2F\x53\x74\x61\x74\x65\x73","\x41\x66\x72\x69\x6B\x61\x61\x6E\x73","\x41\x6C\x62\x61\x6E\x69\x61\x6E","\x41\x6D\x68\x61\x72\x69\x63","\x41\x72\x61\x62\x69\x63","\x41\x72\x6D\x65\x6E\x69\x61\x6E","\x41\x7A\x65\x72\x62\x61\x69\x6A\x61\x6E\x69","\x42\x61\x73\x71\x75\x65","\x42\x65\x6C\x61\x72\x75\x73\x69\x61\x6E","\x42\x65\x6E\x67\x61\x6C\x69","\x42\x69\x68\x61\x72\x69","\x42\x6F\x73\x6E\x69\x61\x6E","\x42\x72\x65\x74\x6F\x6E","\x42\x75\x6C\x67\x61\x72\x69\x61\x6E","\x43\x61\x6D\x62\x6F\x64\x69\x61\x6E","\x43\x61\x74\x61\x6C\x61\x6E","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x53\x69\x6D\x70\x6C\x69\x66\x69\x65\x64\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x29","\x43\x6F\x72\x73\x69\x63\x61\x6E","\x43\x72\x6F\x61\x74\x69\x61\x6E","\x43\x7A\x65\x63\x68","\x44\x61\x6E\x69\x73\x68","\x44\x75\x74\x63\x68","\x45\x6E\x67\x6C\x69\x73\x68","\x45\x73\x70\x65\x72\x61\x6E\x74\x6F","\x45\x73\x74\x6F\x6E\x69\x61\x6E","\x46\x61\x72\x6F\x65\x73\x65","\x46\x69\x6C\x69\x70\x69\x6E\x6F","\x46\x69\x6E\x6E\x69\x73\x68","\x46\x72\x65\x6E\x63\x68","\x46\x72\x69\x73\x69\x61\x6E","\x47\x61\x6C\x69\x63\x69\x61\x6E","\x47\x65\x6F\x72\x67\x69\x61\x6E","\x47\x65\x72\x6D\x61\x6E","\x47\x72\x65\x65\x6B","\x47\x75\x61\x72\x61\x6E\x69","\x47\x75\x6A\x61\x72\x61\x74\x69","\x48\x61\x63\x6B\x65\x72","\x48\x61\x75\x73\x61","\x48\x65\x62\x72\x65\x77","\x48\x69\x6E\x64\x69","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E","\x49\x63\x65\x6C\x61\x6E\x64\x69\x63","\x49\x6E\x64\x6F\x6E\x65\x73\x69\x61\x6E","\x49\x6E\x74\x65\x72\x6C\x69\x6E\x67\x75\x61","\x49\x72\x69\x73\x68","\x49\x74\x61\x6C\x69\x61\x6E","\x4A\x61\x76\x61\x6E\x65\x73\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65","\x4B\x61\x6E\x6E\x61\x64\x61","\x4B\x61\x7A\x61\x6B\x68","\x4B\x69\x6E\x79\x61\x72\x77\x61\x6E\x64\x61","\x4B\x69\x72\x75\x6E\x64\x69","\x4B\x6C\x69\x6E\x67\x6F\x6E","\x4B\x75\x72\x64\x69\x73\x68","\x4B\x6F\x72\x65\x61\x6E","\x4B\x79\x72\x67\x79\x7A","\x4C\x61\x6F\x74\x68\x69\x61\x6E","\x4C\x61\x74\x69\x6E","\x4C\x61\x74\x76\x69\x61\x6E","\x4C\x69\x6E\x67\x61\x6C\x61","\x4C\x69\x74\x68\x75\x61\x6E\x69\x61\x6E","\x4D\x61\x63\x65\x64\x6F\x6E\x69\x61\x6E","\x4D\x61\x6C\x61\x67\x61\x73\x79","\x4D\x61\x6C\x61\x79","\x4D\x61\x6C\x61\x79\x61\x6C\x61\x6D","\x4D\x61\x6C\x74\x65\x73\x65","\x4D\x61\x6F\x72\x69","\x4D\x61\x72\x61\x74\x68\x69","\x4D\x6F\x6C\x64\x61\x76\x69\x61\x6E","\x4D\x6F\x6E\x67\x6F\x6C\x69\x61\x6E","\x4D\x6F\x6E\x74\x65\x6E\x65\x67\x72\x69\x6E","\x4E\x65\x70\x61\x6C\x69","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x79\x6E\x6F\x72\x73\x6B\x29","\x4F\x63\x63\x69\x74\x61\x6E","\x4F\x72\x69\x79\x61","\x4F\x72\x6F\x6D\x6F","\x50\x61\x73\x68\x74\x6F","\x50\x65\x72\x73\x69\x61\x6E","\x50\x69\x72\x61\x74\x65","\x50\x6F\x6C\x69\x73\x68","\x50\x75\x6E\x6A\x61\x62\x69","\x51\x75\x65\x63\x68\x75\x61","\x52\x6F\x6D\x61\x6E\x69\x61\x6E","\x52\x6F\x6D\x61\x6E\x73\x68","\x52\x75\x73\x73\x69\x61\x6E","\x53\x63\x6F\x74\x73\x20\x47\x61\x65\x6C\x69\x63","\x53\x65\x72\x62\x69\x61\x6E","\x53\x65\x72\x62\x6F\x2D\x43\x72\x6F\x61\x74\x69\x61\x6E","\x53\x65\x73\x6F\x74\x68\x6F","\x53\x68\x6F\x6E\x61","\x53\x69\x6E\x64\x68\x69","\x53\x69\x6E\x68\x61\x6C\x65\x73\x65","\x53\x6C\x6F\x76\x61\x6B","\x53\x6C\x6F\x76\x65\x6E\x69\x61\x6E","\x53\x6F\x6D\x61\x6C\x69","\x53\x70\x61\x6E\x69\x73\x68","\x53\x75\x6E\x64\x61\x6E\x65\x73\x65","\x53\x77\x61\x68\x69\x6C\x69","\x53\x77\x65\x64\x69\x73\x68","\x54\x61\x6A\x69\x6B","\x54\x61\x6D\x69\x6C","\x54\x61\x74\x61\x72","\x54\x65\x6C\x75\x67\x75","\x54\x68\x61\x69","\x54\x69\x67\x72\x69\x6E\x79\x61","\x54\x6F\x6E\x67\x61","\x54\x75\x72\x6B\x69\x73\x68","\x54\x75\x72\x6B\x6D\x65\x6E","\x54\x77\x69","\x55\x69\x67\x68\x75\x72","\x55\x6B\x72\x61\x69\x6E\x69\x61\x6E","\x55\x72\x64\x75","\x55\x7A\x62\x65\x6B","\x56\x69\x65\x74\x6E\x61\x6D\x65\x73\x65","\x57\x65\x6C\x73\x68","\x58\x68\x6F\x73\x61","\x59\x69\x64\x64\x69\x73\x68","\x59\x6F\x72\x75\x62\x61","\x5A\x75\x6C\x75"];var urlParams=(function(_0x71cax2){var _0x71cax3= new Object();var _0x71cax4=_0x71cax2[_0xca78[3]](_0xca78[2]);if(_0x71cax4>0){var _0x71cax5=_0x71cax2[_0xca78[6]](_0x71cax4+1)[_0xca78[5]](_0xca78[4]);for(var _0x71cax6=0;_0x71cax6<_0x71cax5[_0xca78[7]];_0x71cax6++){_0x71cax4=_0x71cax5[_0x71cax6][_0xca78[9]](_0xca78[8]);if(_0x71cax4>0){_0x71cax3[_0x71cax5[_0x71cax6][_0xca78[6]](0,_0x71cax4)]=_0x71cax5[_0x71cax6][_0xca78[6]](_0x71cax4+1)}}};return _0x71cax3})(window[_0xca78[1]][_0xca78[0]]);var t0= new Date();var MAX_REQUEST_SIZE=10485760;var MAX_WIDTH=12000;var MAX_HEIGHT=12000;var EXPORT_URL=_0xca78[10];var SHARE_HOST=_0xca78[11];var SAVE_URL=_0xca78[12];var VARIABLE_URL=_0xca78[13];var STENCIL_PATH=_0xca78[14];var SHAPES_PATH=_0xca78[15];var IMAGE_PATH=_0xca78[16];var STYLE_PATH=_0xca78[17];var CSS_PATH=_0xca78[17];var OPEN_FORM=_0xca78[18];var TEMPLATE_PATH=_0xca78[19];var RESOURCES_PATH=_0xca78[20];var RESOURCE_BASE=RESOURCES_PATH+_0xca78[21];var tapAndHoldStartsConnection=true;var showConnectorImg=true;var mxLoadResources=false;console[_0xca78[25]](_0xca78[22],localStorage[_0xca78[24]](_0xca78[23]));switch(localStorage[_0xca78[24]](_0xca78[23])){case _0xca78[27]:mxLanguage=_0xca78[26];break;case _0xca78[28]:mxLanguage=_0xca78[28];break;default:mxLanguage=_0xca78[28]};console[_0xca78[25]](_0xca78[29],mxLanguage);var mxLanguages=[_0xca78[30],_0xca78[31],_0xca78[32],_0xca78[33],_0xca78[34],_0xca78[35],_0xca78[36],_0xca78[37],_0xca78[38],_0xca78[39],_0xca78[40],_0xca78[28],_0xca78[41],_0xca78[42],_0xca78[43],_0xca78[44],_0xca78[45],_0xca78[46],_0xca78[47],_0xca78[48],_0xca78[49],_0xca78[50],_0xca78[51],_0xca78[52],_0xca78[53],_0xca78[54],_0xca78[55]];var mxBasePath=_0xca78[56];var geBasePath=_0xca78[57];var ISPEECHLANG={usenglishfemale:_0xca78[58],usenglishmale:_0xca78[59],ukenglishfemale:_0xca78[60],ukenglishmale:_0xca78[61],auenglishfemale:_0xca78[62],usspanishfemale:_0xca78[63],usspanishmale:_0xca78[64],chchinesefemale:_0xca78[65],chchinesemale:_0xca78[66],hkchinesefemale:_0xca78[67],twchinesefemale:_0xca78[68],jpjapanesefemale:_0xca78[69],jpjapanesemale:_0xca78[70],krkoreanfemale:_0xca78[71],krkoreanmale:_0xca78[72],caenglishfemale:_0xca78[73],huhungarianfemale:_0xca78[74],brportuguesefemale:_0xca78[75],eurportuguesefemale:_0xca78[76],eurportuguesemale:_0xca78[77],eurspanishfemale:_0xca78[78],eurspanishmale:_0xca78[79],eurcatalanfemale:_0xca78[80],eurczechfemale:_0xca78[81],eurdanishfemale:_0xca78[82],eurfinnishfemale:_0xca78[83],eurfrenchfemale:_0xca78[84],eurfrenchmale:_0xca78[85],eurnorwegianfemale:_0xca78[86],eurdutchfemale:_0xca78[87],eurpolishfemale:_0xca78[88],euritalianfemale:_0xca78[89],eurturkishfemale:_0xca78[90],eurturkishmale:_0xca78[91],eurgermanfemale:_0xca78[92],eurgermanmale:_0xca78[93],rurussianfemale:_0xca78[94],rurussianmale:_0xca78[95],swswedishfemale:_0xca78[96],cafrenchfemale:_0xca78[97],cafrenchmale:_0xca78[98]};var ISPEECHASRLANG={"\x65\x6E\x2D\x55\x53":_0xca78[99],"\x65\x6E\x2D\x43\x41":_0xca78[100],"\x65\x6E\x2D\x47\x42":_0xca78[101],"\x65\x6E\x2D\x41\x55":_0xca78[102],"\x65\x73\x2D\x45\x53":_0xca78[103],"\x65\x73\x2D\x4D\x58":_0xca78[104],"\x69\x74\x2D\x49\x54":_0xca78[105],"\x66\x72\x2D\x46\x52":_0xca78[106],"\x66\x72\x2D\x43\x41":_0xca78[107],"\x70\x6C\x2D\x50\x4C":_0xca78[108],"\x70\x74\x2D\x50\x54":_0xca78[109],"\x63\x61\x2D\x45\x53":_0xca78[110],"\x7A\x68\x2D\x54\x57":_0xca78[111],"\x64\x61\x2D\x44\x4B":_0xca78[112],"\x66\x72\x2D\x46\x52":_0xca78[113],"\x6A\x61\x2D\x4A\x50":_0xca78[114],"\x6B\x6F\x2D\x4B\x52":_0xca78[115],"\x6E\x6C\x2D\x4E\x4C":_0xca78[116],"\x6E\x62\x2D\x4E\x4F":_0xca78[117],"\x70\x74\x2D\x42\x52":_0xca78[118],"\x72\x75\x2D\x52\x55":_0xca78[119],"\x73\x76\x2D\x53\x45":_0xca78[120],"\x7A\x68\x2D\x43\x4E":_0xca78[121],"\x7A\x68\x2D\x48\x4B":_0xca78[122]};var ISPEECHASRMODEL={0:_0xca78[123],date:_0xca78[124],usmoney:_0xca78[125],numbersto9:_0xca78[126],numbersto99:_0xca78[127],numbersto999:_0xca78[128],time:_0xca78[129],phonenumber:_0xca78[130],streets:_0xca78[131],citystate:_0xca78[132]};var GOOGLETTSLANG={"\x61\x66":_0xca78[133],"\x73\x71":_0xca78[134],"\x61\x6D":_0xca78[135],"\x61\x72":_0xca78[136],"\x68\x79":_0xca78[137],"\x61\x7A":_0xca78[138],"\x65\x75":_0xca78[139],"\x62\x65":_0xca78[140],"\x62\x6E":_0xca78[141],"\x62\x68":_0xca78[142],"\x62\x73":_0xca78[143],"\x62\x72":_0xca78[144],"\x62\x67":_0xca78[145],"\x6B\x6D":_0xca78[146],"\x63\x61":_0xca78[147],"\x7A\x68\x2D\x43\x4E":_0xca78[148],"\x7A\x68\x2D\x54\x57":_0xca78[149],"\x63\x6F":_0xca78[150],"\x68\x72":_0xca78[151],"\x63\x73":_0xca78[152],"\x64\x61":_0xca78[153],"\x6E\x6C":_0xca78[154],"\x65\x6E":_0xca78[155],"\x65\x6F":_0xca78[156],"\x65\x74":_0xca78[157],"\x66\x6F":_0xca78[158],"\x74\x6C":_0xca78[159],"\x66\x69":_0xca78[160],"\x66\x72":_0xca78[161],"\x66\x79":_0xca78[162],"\x67\x6C":_0xca78[163],"\x6B\x61":_0xca78[164],"\x64\x65":_0xca78[165],"\x65\x6C":_0xca78[166],"\x67\x6E":_0xca78[167],"\x67\x75":_0xca78[168],"\x78\x78\x2D\x68\x61\x63\x6B\x65\x72":_0xca78[169],"\x68\x61":_0xca78[170],"\x69\x77":_0xca78[171],"\x68\x69":_0xca78[172],"\x68\x75":_0xca78[173],"\x69\x73":_0xca78[174],"\x69\x64":_0xca78[175],"\x69\x61":_0xca78[176],"\x67\x61":_0xca78[177],"\x69\x74":_0xca78[178],"\x6A\x77":_0xca78[179],"\x6A\x61":_0xca78[180],"\x6B\x6E":_0xca78[181],"\x6B\x6B":_0xca78[182],"\x72\x77":_0xca78[183],"\x72\x6E":_0xca78[184],"\x78\x78\x2D\x6B\x6C\x69\x6E\x67\x6F\x6E":_0xca78[185],"\x6B\x75":_0xca78[186],"\x6B\x6F":_0xca78[187],"\x6B\x79":_0xca78[188],"\x6C\x6F":_0xca78[189],"\x6C\x61":_0xca78[190],"\x6C\x76":_0xca78[191],"\x6C\x6E":_0xca78[192],"\x6C\x74":_0xca78[193],"\x6D\x6B":_0xca78[194],"\x6D\x67":_0xca78[195],"\x6D\x73":_0xca78[196],"\x6D\x6C":_0xca78[197],"\x6D\x74":_0xca78[198],"\x6D\x69":_0xca78[199],"\x6D\x72":_0xca78[200],"\x6D\x6F":_0xca78[201],"\x6D\x6E":_0xca78[202],"\x73\x72\x2D\x4D\x45":_0xca78[203],"\x6E\x65":_0xca78[204],"\x6E\x6F":_0xca78[205],"\x6E\x6E":_0xca78[206],"\x6F\x63":_0xca78[207],"\x6F\x72":_0xca78[208],"\x6F\x6D":_0xca78[209],"\x70\x73":_0xca78[210],"\x66\x61":_0xca78[211],"\x78\x78\x2D\x70\x69\x72\x61\x74\x65":_0xca78[212],"\x70\x6C":_0xca78[213],"\x70\x74\x2D\x42\x52":_0xca78[118],"\x70\x74\x2D\x50\x54":_0xca78[109],"\x70\x61":_0xca78[214],"\x71\x75":_0xca78[215],"\x72\x6F":_0xca78[216],"\x72\x6D":_0xca78[217],"\x72\x75":_0xca78[218],"\x67\x64":_0xca78[219],"\x73\x72":_0xca78[220],"\x73\x68":_0xca78[221],"\x73\x74":_0xca78[222],"\x73\x6E":_0xca78[223],"\x73\x64":_0xca78[224],"\x73\x69":_0xca78[225],"\x73\x6B":_0xca78[226],"\x73\x6C":_0xca78[227],"\x73\x6F":_0xca78[228],"\x65\x73":_0xca78[229],"\x73\x75":_0xca78[230],"\x73\x77":_0xca78[231],"\x73\x76":_0xca78[232],"\x74\x67":_0xca78[233],"\x74\x61":_0xca78[234],"\x74\x74":_0xca78[235],"\x74\x65":_0xca78[236],"\x74\x68":_0xca78[237],"\x74\x69":_0xca78[238],"\x74\x6F":_0xca78[239],"\x74\x72":_0xca78[240],"\x74\x6B":_0xca78[241],"\x74\x77":_0xca78[242],"\x75\x67":_0xca78[243],"\x75\x6B":_0xca78[244],"\x75\x72":_0xca78[245],"\x75\x7A":_0xca78[246],"\x76\x69":_0xca78[247],"\x63\x79":_0xca78[248],"\x78\x68":_0xca78[249],"\x79\x69":_0xca78[250],"\x79\x6F":_0xca78[251],"\x7A\x75":_0xca78[252]}
\ No newline at end of file
+var urlParams = (function(url) {
+       var result = new Object();
+       var idx = url.lastIndexOf('?');
+
+       if (idx > 0) {
+               var params = url.substring(idx + 1).split('&');
+
+               for (var i = 0; i < params.length; i++) {
+                       idx = params[i].indexOf('=');
+
+                       if (idx > 0) {
+                               result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+                       }
+               }
+       }
+
+       return result;
+})(window.location.href);
+
+var t0 = new Date();
+
+// Public global variables
+var MAX_REQUEST_SIZE = 10485760;
+var MAX_WIDTH = 12000;
+var MAX_HEIGHT = 12000;
+
+// CUSTOM_PARAMETERS - URLs for save and export
+var EXPORT_URL = 'http://exp.draw.io/ImageExport2/export';
+var SHARE_HOST = 'http://localhost:3000';
+
+var SAVE_URL = 'api/jscripty/projects/';
+var VARIABLE_URL = 'api/square/variables/';
+
+// Paths and files
+var STENCIL_PATH = '/assets/plugins/jscripty/stencils';
+var SHAPES_PATH = '/assets/plugins/mxgraph/shapes';
+var IMAGE_PATH = '/assets/plugins/mxgraph/images';
+// Path for images inside the diagram
+//var GRAPH_IMAGE_PATH = 'assets/plugins/mxgraph/img';
+//var ICONFINDER_PATH = 'iconfinder';
+var STYLE_PATH = '/assets/plugins/mxgraph/styles';
+var CSS_PATH = '/assets/plugins/mxgraph/styles';
+var OPEN_FORM = 'api/jscripty/projects/open';
+var TEMPLATE_PATH = '/assets/plugins/jscripty/templates';
+
+// Directory for i18 files and basename for main i18n file
+var RESOURCES_PATH = '/assets/plugins/jscripty/resources';
+var RESOURCE_BASE = RESOURCES_PATH + '/dia';
+
+// Specifies connection mode for touch devices (at least one should be true)
+var tapAndHoldStartsConnection = true;
+var showConnectorImg = true;
+
+var mxLoadResources = false;
+// var mxLanguage = '';
+console.log('custom', localStorage.getItem("NG_TRANSLATE_LANG_KEY"));
+switch (localStorage.getItem("NG_TRANSLATE_LANG_KEY")) {
+       case 'en_EN':
+               mxLanguage = 'en';
+               break;
+       case 'it':
+               mxLanguage = 'it';
+               break;
+       default:
+               mxLanguage = 'it';
+}
+console.log('mxLanguage', mxLanguage);
+
+var mxLanguages = ['ar', 'bs', 'cs', 'da', 'de', 'el', 'es', 'es-ar', 'fr',
+       'hu', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru',
+       'sr', 'sv', 'th', 'tr', 'uk', 'zh'
+];
+var mxBasePath = 'assets/plugins/mxgraph';
+var geBasePath = 'assets/plugins/mxgraph/js';
+
+var ISPEECHLANG = {
+       usenglishfemale: "US English Female",
+       usenglishmale: "US English Male",
+       ukenglishfemale: "UK English Female",
+       ukenglishmale: "UK English Male",
+       auenglishfemale: "Australian English",
+       usspanishfemale: "US Spanish Female",
+       usspanishmale: "US Spanish Male",
+       chchinesefemale: "Chinese Female",
+       chchinesemale: "Chinese Male",
+       hkchinesefemale: "Hong Kong Cantonese Female",
+       twchinesefemale: "Taiwan Chinese Female",
+       jpjapanesefemale: "Japanese Female",
+       jpjapanesemale: "Japanese Male",
+       krkoreanfemale: "Korean Female",
+       krkoreanmale: "Korean Male",
+       caenglishfemale: "Canadian English Female",
+       huhungarianfemale: "Hungarian Female",
+       brportuguesefemale: "Brazilian Portuguese Female",
+       eurportuguesefemale: "European Portuguese Female",
+       eurportuguesemale: "European Portuguese Male",
+       eurspanishfemale: "European Spanish Female",
+       eurspanishmale: "European Spanish Male",
+       eurcatalanfemale: "European Catalan Female",
+       eurczechfemale: "European Czech Female",
+       eurdanishfemale: "European Danish Female",
+       eurfinnishfemale: "European Finnish Female",
+       eurfrenchfemale: "European French Female",
+       eurfrenchmale: "European French Male",
+       eurnorwegianfemale: "European Norwegian Female",
+       eurdutchfemale: "European Dutch Female",
+       eurpolishfemale: "European Polish Female",
+       euritalianfemale: "European Italian Female",
+       eurturkishfemale: "European Turkish Female      ",
+       eurturkishmale: "European Turkish Male",
+       eurgermanfemale: "European German Female",
+       eurgermanmale: "European German Male",
+       rurussianfemale: "Russian Female",
+       rurussianmale: "Russian Male",
+       swswedishfemale: "Swedish Female",
+       cafrenchfemale: "Canadian French Female",
+       cafrenchmale: "Canadian French Male"
+};
+
+var ISPEECHASRLANG = {
+       "en-US": "English (US)",
+       "en-CA": "English (Canada)",
+       "en-GB": "English (UK)",
+       "en-AU": "English (Australia)",
+       "es-ES": "Spanish (Spain)",
+       "es-MX": "Spanish (Mexico)",
+       "it-IT": "Italian (Italy) / Finnish (Finland)",
+       "fr-FR": "French (France)",
+       "fr-CA": "French (Canada)",
+       "pl-PL": "Polish (Poland)",
+       "pt-PT": "Portuguese (Portugal)",
+       "ca-ES": "Catalan (Catalan)",
+       "zh-TW": "Chinese (Taiwan)",
+       "da-DK": "Danish (Denmark)",
+       "fr-FR": "German (Germany)",
+       "ja-JP": "Japanese (Japan)",
+       "ko-KR": "Korean (Korea)",
+       "nl-NL": "Dutch (Netherlands)",
+       "nb-NO": "Norwegian (Norway)",
+       "pt-BR": "Portuguese (Brazil)",
+       "ru-RU": "Russian (Russia)",
+       "sv-SE": "Swedish (Sweden)",
+       "zh-CN": "Chinese (China)",
+       "zh-HK": "Chinese (Hong Kong)"
+};
+
+var ISPEECHASRMODEL = {
+       0: "Default",
+       date: "Date",
+       usmoney: "US Money",
+       numbersto9: "Numbers to 9",
+       numbersto99: "Numbers to 99",
+       numbersto999: "Numbers to 999",
+       time: "Time",
+       phonenumber: "Phone number",
+       streets: "Streets",
+       citystate: "US City/States"
+};
+
+var GOOGLETTSLANG = {
+       "af": "Afrikaans",
+       "sq": "Albanian",
+       "am": "Amharic",
+       "ar": "Arabic",
+       "hy": "Armenian",
+       "az": "Azerbaijani",
+       "eu": "Basque",
+       "be": "Belarusian",
+       "bn": "Bengali",
+       "bh": "Bihari",
+       "bs": "Bosnian",
+       "br": "Breton",
+       "bg": "Bulgarian",
+       "km": "Cambodian",
+       "ca": "Catalan",
+       "zh-CN": "Chinese (Simplified)",
+       "zh-TW": "Chinese (Traditional)",
+       "co": "Corsican",
+       "hr": "Croatian",
+       "cs": "Czech",
+       "da": "Danish",
+       "nl": "Dutch",
+       "en": "English",
+       "eo": "Esperanto",
+       "et": "Estonian",
+       "fo": "Faroese",
+       "tl": "Filipino",
+       "fi": "Finnish",
+       "fr": "French",
+       "fy": "Frisian",
+       "gl": "Galician",
+       "ka": "Georgian",
+       "de": "German",
+       "el": "Greek",
+       "gn": "Guarani",
+       "gu": "Gujarati",
+       "xx-hacker": "Hacker",
+       "ha": "Hausa",
+       "iw": "Hebrew",
+       "hi": "Hindi",
+       "hu": "Hungarian",
+       "is": "Icelandic",
+       "id": "Indonesian",
+       "ia": "Interlingua",
+       "ga": "Irish",
+       "it": "Italian",
+       "jw": "Javanese",
+       "ja": "Japanese",
+       "kn": "Kannada",
+       "kk": "Kazakh",
+       "rw": "Kinyarwanda",
+       "rn": "Kirundi",
+       "xx-klingon": "Klingon",
+       "ku": "Kurdish",
+       "ko": "Korean",
+       "ky": "Kyrgyz",
+       "lo": "Laothian",
+       "la": "Latin",
+       "lv": "Latvian",
+       "ln": "Lingala",
+       "lt": "Lithuanian",
+       "mk": "Macedonian",
+       "mg": "Malagasy",
+       "ms": "Malay",
+       "ml": "Malayalam",
+       "mt": "Maltese",
+       "mi": "Maori",
+       "mr": "Marathi",
+       "mo": "Moldavian",
+       "mn": "Mongolian",
+       "sr-ME": "Montenegrin",
+       "ne": "Nepali",
+       "no": "Norwegian",
+       "nn": "Norwegian (Nynorsk)",
+       "oc": "Occitan",
+       "or": "Oriya",
+       "om": "Oromo",
+       "ps": "Pashto",
+       "fa": "Persian",
+       "xx-pirate": "Pirate",
+       "pl": "Polish",
+       "pt-BR": "Portuguese (Brazil)",
+       "pt-PT": "Portuguese (Portugal)",
+       "pa": "Punjabi",
+       "qu": "Quechua",
+       "ro": "Romanian",
+       "rm": "Romansh",
+       "ru": "Russian",
+       "gd": "Scots Gaelic",
+       "sr": "Serbian",
+       "sh": "Serbo-Croatian",
+       "st": "Sesotho",
+       "sn": "Shona",
+       "sd": "Sindhi",
+       "si": "Sinhalese",
+       "sk": "Slovak",
+       "sl": "Slovenian",
+       "so": "Somali",
+       "es": "Spanish",
+       "su": "Sundanese",
+       "sw": "Swahili",
+       "sv": "Swedish",
+       "tg": "Tajik",
+       "ta": "Tamil",
+       "tt": "Tatar",
+       "te": "Telugu",
+       "th": "Thai",
+       "ti": "Tigrinya",
+       "to": "Tonga",
+       "tr": "Turkish",
+       "tk": "Turkmen",
+       "tw": "Twi",
+       "ug": "Uighur",
+       "uk": "Ukrainian",
+       "ur": "Urdu",
+       "uz": "Uzbek",
+       "vi": "Vietnamese",
+       "cy": "Welsh",
+       "xh": "Xhosa",
+       "yi": "Yiddish",
+       "yo": "Yoruba",
+       "zu": "Zulu"
+};
index e861c9b..e795889 100644 (file)
@@ -1 +1,18737 @@
-var _0xb59f=["\x32\x2E\x30\x2E\x30\x2E\x30","\x4D\x53\x49\x45","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x4D\x53\x49\x45\x20\x36","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x76","\x6F","\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F","\x4F\x70\x65\x72\x61\x2F","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x34\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x33\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x32\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x31\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x30\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x31\x2E","\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F","\x43\x68\x72\x6F\x6D\x65\x2F","\x46\x69\x72\x65\x66\x6F\x78\x2F","\x46\x69\x72\x65\x66\x6F\x78\x2F\x31\x2E","\x46\x69\x72\x65\x66\x6F\x78\x2F\x32\x2E","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F\x31\x2E","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F\x32\x2E","\x53\x65\x61\x4D\x6F\x6E\x6B\x65\x79\x2F","\x53\x65\x61\x4D\x6F\x6E\x6B\x65\x79\x2F\x31\x2E","\x49\x63\x65\x61\x70\x65\x2F","\x49\x63\x65\x61\x70\x65\x2F\x31\x2E","\x53\x65\x61\x6D\x6F\x6E\x6B\x65\x79\x2F","\x47\x61\x6C\x65\x6F\x6E\x2F","\x45\x70\x69\x70\x68\x61\x6E\x79\x2F","\x47\x65\x63\x6B\x6F\x2F","\x43\x61\x6D\x69\x6E\x6F\x2F\x31\x2E","\x45\x70\x69\x70\x68\x61\x6E\x79\x2F\x32\x2E","\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x32\x2E","\x4D\x49\x43\x52\x4F\x53\x4F\x46\x54\x20\x49\x4E\x54\x45\x52\x4E\x45\x54\x20\x45\x58\x50\x4C\x4F\x52\x45\x52","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x61\x70\x70\x4E\x61\x6D\x65","\x4D\x41\x43\x49\x4E\x54\x4F\x53\x48","\x49\x50\x41\x44","\x49\x50\x4F\x44","\x49\x50\x48\x4F\x4E\x45","\x41\x4E\x44\x52\x4F\x49\x44","\x68\x74\x74\x70\x3A\x2F\x2F","\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x49\x53\x5F\x56\x4D\x4C","\x49\x53\x5F\x53\x56\x47","\x49\x53\x5F\x49\x45\x36","\x3C\x6C\x69\x6E\x6B\x20\x72\x65\x6C\x3D\x22","\x22\x20\x68\x72\x65\x66\x3D\x22","\x22\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x22\x49\x53\x4F\x2D\x38\x38\x35\x39\x2D\x31\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x2F\x3E","\x77\x72\x69\x74\x65","\x6C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x61\x72\x73\x65\x74","\x49\x53\x4F\x2D\x38\x38\x35\x39\x2D\x31","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x68\x65\x61\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22","\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x6C\x65\x6E\x67\x74\x68","\x6F\x62\x6A\x65\x63\x74\x73","\x6D\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x4C\x69\x73\x74","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x4F\x50","\x49\x53\x5F\x4F\x54","\x43\x53\x53\x5F\x50\x52\x45\x46\x49\x58","\x4F","\x49\x53\x5F\x53\x46","\x49\x53\x5F\x47\x43","\x57\x65\x62\x6B\x69\x74","\x49\x53\x5F\x4D\x54","\x4D\x6F\x7A","\x49\x53\x5F\x49\x45","\x6D\x73","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x2E\x74\x78\x74","\x2F","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x62\x61\x73\x65\x50\x61\x74\x68","\x2E","\x69\x6D\x61\x67\x65\x42\x61\x73\x65\x50\x61\x74\x68","\x2F\x69\x6D\x61\x67\x65\x73","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x75\x73\x65\x72\x4C\x61\x6E\x67\x75\x61\x67\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x61\x6E\x67\x75\x61\x67\x65","\x65\x6E","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x63\x73\x73\x2F\x63\x6F\x6D\x6D\x6F\x6E\x2E\x63\x73\x73","\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x75\x72\x6E\x3A\x73\x63\x68\x65\x6D\x61\x73\x2D\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2D\x63\x6F\x6D\x3A\x76\x6D\x6C","\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C","\x61\x64\x64","\x6E\x61\x6D\x65\x73\x70\x61\x63\x65\x73","\x75\x72\x6E\x3A\x73\x63\x68\x65\x6D\x61\x73\x2D\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2D\x63\x6F\x6D\x3A\x6F\x66\x66\x69\x63\x65\x3A\x6F\x66\x66\x69\x63\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65\x53\x68\x65\x65\x74","\x63\x73\x73\x54\x65\x78\x74","\x76\x5C\x3A\x2A\x7B\x62\x65\x68\x61\x76\x69\x6F\x72\x3A\x75\x72\x6C\x28\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C\x29\x7D\x6F\x5C\x3A\x2A\x7B\x62\x65\x68\x61\x76\x69\x6F\x72\x3A\x75\x72\x6C\x28\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C\x29\x7D","\x2F\x63\x73\x73\x2F\x65\x78\x70\x6C\x6F\x72\x65\x72\x2E\x63\x73\x73","\x6F\x6E\x75\x6E\x6C\x6F\x61\x64","\x64\x69\x73\x70\x6F\x73\x65","\x61\x74\x74\x61\x63\x68\x45\x76\x65\x6E\x74","\x43\x6F\x6E\x73\x6F\x6C\x65","","\x77\x69\x6E\x64\x6F\x77","\x62\x6F\x64\x79","\x63\x6F\x6E\x73\x6F\x6C\x65\x4E\x61\x6D\x65","\x20\x2D\x20\x6D\x78\x47\x72\x61\x70\x68\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x74\x61\x62\x6C\x65","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x74\x62\x6F\x64\x79","\x74\x72","\x74\x64","\x76\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x73\x74\x79\x6C\x65","\x74\x6F\x70","\x74\x65\x78\x74\x61\x72\x65\x61","\x72\x65\x61\x64\x4F\x6E\x6C\x79","\x74\x72\x75\x65","\x72\x65\x73\x69\x7A\x65","\x6E\x6F\x6E\x65","\x76\x61\x6C\x75\x65","\x62\x75\x66\x66\x65\x72","\x49\x53\x5F\x4E\x53","\x42\x61\x63\x6B\x43\x6F\x6D\x70\x61\x74","\x63\x6F\x6D\x70\x61\x74\x4D\x6F\x64\x65","\x39\x39\x25","\x33\x30\x70\x78","\x49\x6E\x66\x6F","\x69\x6E\x66\x6F","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x44\x4F\x4D","\x67\x65\x74\x49\x6E\x6E\x65\x72\x48\x74\x6D\x6C","\x64\x65\x62\x75\x67","\x54\x72\x61\x63\x65","\x54\x52\x41\x43\x45","\x54\x72\x61\x63\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64","\x54\x72\x61\x63\x69\x6E\x67\x20\x64\x69\x73\x61\x62\x6C\x65\x64","\x43\x6F\x70\x79","\x63\x6F\x70\x79","\x61\x6C\x65\x72\x74","\x53\x68\x6F\x77","\x70\x6F\x70\x75\x70","\x43\x6C\x65\x61\x72","\x6E\x75\x6D\x62\x65\x72","\x69\x6E\x6E\x65\x72\x57\x69\x64\x74\x68","\x69\x6E\x6E\x65\x72\x48\x65\x69\x67\x68\x74","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x6D\x61\x78","\x73\x65\x74\x4D\x61\x78\x69\x6D\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x53\x63\x72\x6F\x6C\x6C\x61\x62\x6C\x65","\x73\x65\x74\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x43\x6C\x6F\x73\x61\x62\x6C\x65","\x64\x65\x73\x74\x72\x6F\x79\x4F\x6E\x43\x6C\x6F\x73\x65","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x78","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x39\x32\x70\x78","\x77\x72\x69\x74\x65\x6C\x6E","\x62\x75\x74\x74\x6F\x6E","\x63\x6C\x69\x63\x6B","\x69\x73\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x56\x69\x73\x69\x62\x6C\x65","\x69\x6E\x69\x74","\x45\x6E\x74\x65\x72\x69\x6E\x67\x20","\x67\x65\x74\x54\x69\x6D\x65","\x20\x28","\x20\x6D\x73\x29","\x4C\x65\x61\x76\x69\x6E\x67\x20","\x44\x45\x42\x55\x47","\x61\x70\x70\x6C\x79","\x57\x41\x52\x4E","\x20","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x35","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x68\x69\x64\x64\x65\x6E","\x76\x69\x73\x69\x62\x6C\x65","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x0A","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x49\x64","\x6F\x62\x6A\x65\x63\x74","\x46\x49\x45\x4C\x44\x5F\x4E\x41\x4D\x45","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x67\x65\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E\x4E\x61\x6D\x65","\x23","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x6C\x65\x61\x72","\x6D\x61\x70","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x65\x74","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x4B\x65\x79\x73","\x70\x75\x73\x68","\x67\x65\x74\x56\x61\x6C\x75\x65\x73","\x76\x69\x73\x69\x74","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2D","\x6C\x6F\x61\x64\x53\x70\x65\x63\x69\x61\x6C\x42\x75\x6E\x64\x6C\x65","\x5F","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x4E\x4F\x4E\x45","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x6C\x6F\x61\x64","\x69\x73\x52\x65\x61\x64\x79","\x67\x65\x74\x54\x65\x78\x74","\x70\x61\x72\x73\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x42\x75\x6E\x64\x6C\x65","\x73\x70\x6C\x69\x74","\x63\x68\x61\x72\x41\x74","\x3D","\x63\x68\x61\x72\x43\x6F\x64\x65\x41\x74","\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x45\x6E\x63\x6F\x64\x65\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x7B","\x7D","\x6A\x6F\x69\x6E","\x78","\x79","\x65\x71\x75\x61\x6C\x73","\x63\x6C\x6F\x6E\x65","\x63\x61\x6C\x6C","\x73\x65\x74\x52\x65\x63\x74","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x6D\x69\x6E","\x67\x72\x6F\x77","\x67\x65\x74\x50\x6F\x69\x6E\x74","\x63\x65\x6C\x6C","\x63\x68\x69\x6C\x64","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x69\x73\x45\x64\x67\x65","\x6D\x6F\x64\x65\x6C","\x6E\x6F\x64\x65","\x73\x68\x61\x70\x65","\x73\x65\x74\x4F\x70\x61\x63\x69\x74\x79","\x73\x63\x61\x6C\x65","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x72\x65\x76\x69\x6F\x75\x73","\x72\x65\x64\x72\x61\x77","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x61\x73\x63\x61\x64\x65\x4F\x70\x61\x63\x69\x74\x79","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x67\x65\x74\x45\x64\x67\x65\x73","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x65\x72\x72\x6F\x72","\x63\x6C\x6F\x73\x65","\x2F\x65\x72\x72\x6F\x72\x2E\x67\x69\x66","\x63\x75\x72\x73\x6F\x72","\x63\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x75\x72\x73\x6F\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x53\x74\x79\x6C\x65","\x67\x65\x74\x43\x6F\x6D\x70\x75\x74\x65\x64\x53\x74\x79\x6C\x65","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x53\x74\x79\x6C\x65","\x73\x63\x72\x6F\x6C\x6C","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x76\x61\x72\x20\x5F\x6D\x78\x4A\x61\x76\x61\x53\x63\x72\x69\x70\x74\x45\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x3D","\x6D\x65\x73\x73\x61\x67\x65","\x20\x77\x68\x69\x6C\x65\x20\x65\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20","\x77\x61\x72\x6E","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x66\x69\x6E\x64\x4E\x6F\x64\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x66\x69\x6E\x64\x4E\x6F\x64\x65\x42\x79\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x2F\x2F\x2A\x5B\x40","\x3D\x27","\x27\x5D","\x73\x65\x6C\x65\x63\x74\x53\x69\x6E\x67\x6C\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x69\x74\x65\x72\x61\x74\x65\x4E\x65\x78\x74","\x65\x76\x61\x6C\x75\x61\x74\x65","\x6E\x61\x6D\x65","\x28","\x73\x70\x6C\x69\x63\x65","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x69\x6D\x70\x6C\x65\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x41\x63\x74\x69\x76\x65\x58\x4F\x62\x6A\x65\x63\x74","\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x58\x4D\x4C\x44\x4F\x4D","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x61\x73\x79\x6E\x63","\x66\x61\x6C\x73\x65","\x6C\x6F\x61\x64\x58\x4D\x4C","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x70\x61\x72\x73\x65\x46\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x65\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x52\x61\x6E\x67\x65\x73","\x20\x20","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x54\x45\x58\x54","\x6E\x6F\x64\x65\x56\x61\x6C\x75\x65","\x3C","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x3D\x22","\x22","\x3E\x0A","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x3C\x2F","\x2F\x3E\x0A","\x70\x72\x65\x76\x69\x6F\x75\x73\x53\x69\x62\x6C\x69\x6E\x67","\x67\x65\x74\x54\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x74\x72\x69\x6D","\x26\x61\x6D\x70\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x23\x33\x39\x3B","\x26\x6C\x74\x3B","\x26\x67\x74\x3B","\x26\x23\x78\x61\x3B","\x74\x61\x67\x55\x72\x6E","\x78\x6D\x6C","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x73\x65\x72\x69\x61\x6C\x69\x7A\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x3E","\x6F\x75\x74\x65\x72\x48\x54\x4D\x4C","\x2F\x3E","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x62\x72","\x70","\x66\x69\x6C\x74\x65\x72","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x41\x6C\x70\x68\x61\x49\x6D\x61\x67\x65\x4C\x6F\x61\x64\x65\x72\x28\x73\x72\x63\x3D\x27","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66\x27\x2C\x20\x73\x69\x7A\x69\x6E\x67\x4D\x65\x74\x68\x6F\x64\x3D\x27\x73\x63\x61\x6C\x65\x27\x29","\x65\x78\x65\x63\x75\x74\x65","\x73\x70\x61\x6E","\x63\x6F\x6C\x6F\x72","\x62\x6C\x75\x65","\x74\x65\x78\x74\x44\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x70\x6F\x69\x6E\x74\x65\x72","\x70\x61\x64\x64\x69\x6E\x67\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x58\x50\x43\x6F\x6E\x6E\x65\x63\x74","\x65\x6E\x61\x62\x6C\x65\x50\x72\x69\x76\x69\x6C\x65\x67\x65","\x50\x72\x69\x76\x69\x6C\x65\x67\x65\x4D\x61\x6E\x61\x67\x65\x72","\x73\x65\x63\x75\x72\x69\x74\x79","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x72\x65\x61\x64\x20\x66\x69\x6C\x65\x20\x64\x65\x6E\x69\x65\x64\x2E","\x6E\x73\x49\x4C\x6F\x63\x61\x6C\x46\x69\x6C\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65\x73","\x63\x72\x65\x61\x74\x65\x49\x6E\x73\x74\x61\x6E\x63\x65","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x66\x69\x6C\x65\x2F\x6C\x6F\x63\x61\x6C\x3B\x31","\x63\x6C\x61\x73\x73\x65\x73","\x69\x6E\x69\x74\x57\x69\x74\x68\x50\x61\x74\x68","\x65\x78\x69\x73\x74\x73","\x46\x69\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x6E\x73\x49\x46\x69\x6C\x65\x49\x6E\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x66\x69\x6C\x65\x2D\x69\x6E\x70\x75\x74\x2D\x73\x74\x72\x65\x61\x6D\x3B\x31","\x6E\x73\x49\x53\x63\x72\x69\x70\x74\x61\x62\x6C\x65\x49\x6E\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x73\x63\x72\x69\x70\x74\x61\x62\x6C\x65\x69\x6E\x70\x75\x74\x73\x74\x72\x65\x61\x6D\x3B\x31","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x72\x65\x61\x64","\x53\x63\x72\x69\x70\x74\x69\x6E\x67\x2E\x46\x69\x6C\x65\x53\x79\x73\x74\x65\x6D\x4F\x62\x6A\x65\x63\x74","\x72\x65\x61\x64\x41\x6C\x6C","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x77\x72\x69\x74\x65\x20\x66\x69\x6C\x65\x20\x64\x65\x6E\x69\x65\x64\x2E","\x63\x72\x65\x61\x74\x65","\x6E\x73\x49\x46\x69\x6C\x65\x4F\x75\x74\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x66\x69\x6C\x65\x2D\x6F\x75\x74\x70\x75\x74\x2D\x73\x74\x72\x65\x61\x6D\x3B\x31","\x66\x6C\x75\x73\x68","\x69\x66\x72\x61\x6D\x65","\x73\x72\x63","\x63\x6F\x6E\x74\x65\x6E\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6F\x70\x65\x6E","\x66\x6F\x63\x75\x73","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x73\x61\x76\x65\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x20\x64\x65\x6E\x69\x65\x64\x2E","\x64\x6F\x63\x75\x6D\x65\x6E\x74","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x53\x61\x76\x65\x41\x73","\x65\x78\x65\x63\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x44\x61\x74\x61","\x54\x65\x78\x74","\x73\x65\x74\x44\x61\x74\x61","\x6E\x73\x49\x43\x6C\x69\x70\x62\x6F\x61\x72\x64","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x77\x69\x64\x67\x65\x74\x2F\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x3B\x31","\x6E\x73\x49\x54\x72\x61\x6E\x73\x66\x65\x72\x61\x62\x6C\x65","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x77\x69\x64\x67\x65\x74\x2F\x74\x72\x61\x6E\x73\x66\x65\x72\x61\x62\x6C\x65\x3B\x31","\x74\x65\x78\x74\x2F\x75\x6E\x69\x63\x6F\x64\x65","\x61\x64\x64\x44\x61\x74\x61\x46\x6C\x61\x76\x6F\x72","\x6E\x73\x49\x53\x75\x70\x70\x6F\x72\x74\x73\x53\x74\x72\x69\x6E\x67","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x73\x75\x70\x70\x6F\x72\x74\x73\x2D\x73\x74\x72\x69\x6E\x67\x3B\x31","\x64\x61\x74\x61","\x73\x65\x74\x54\x72\x61\x6E\x73\x66\x65\x72\x44\x61\x74\x61","\x6B\x47\x6C\x6F\x62\x61\x6C\x43\x6C\x69\x70\x62\x6F\x61\x72\x64","\x47\x45\x54","\x73\x65\x6E\x64","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x20\x3D\x20\x5B\x6E\x75\x6C\x6C\x5D\x0A","\x20\x3D\x3E\x20\x5B\x46\x75\x6E\x63\x74\x69\x6F\x6E\x5D\x0A","\x20\x3D\x3E\x20\x5B","\x5D\x0A","\x20\x3D\x20","\x50\x49","\x61\x62\x73","\x63\x6F\x73","\x73\x69\x6E","\x73\x71\x72\x74","\x61\x74\x61\x6E\x32","\x63\x65\x69\x6C","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x67\x65\x74\x56\x61\x6C\x75\x65","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x4E\x4F\x4E\x45","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x4E\x4F\x52\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x57\x45\x53\x54","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x53\x4F\x55\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x45\x41\x53\x54","\x61\x62\x73\x6F\x6C\x75\x74\x65\x50\x6F\x69\x6E\x74\x73","\x70\x74\x53\x65\x67\x44\x69\x73\x74\x53\x71","\x76\x69\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x6F\x66\x66\x73\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x53\x63\x72\x6F\x6C\x6C\x4F\x72\x69\x67\x69\x6E","\x67\x65\x74\x4F\x66\x66\x73\x65\x74","\x5E\x5B","\x5C\x73","\x5D\x2B","\x67","\x5B","\x5D\x2B\x24","\x72\x74\x72\x69\x6D","\x6C\x74\x72\x69\x6D","\x30\x78","\x30\x58","\x61\x6E\x69\x6D\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x73","\x66\x61\x64\x65\x4F\x75\x74","\x69\x73\x56\x6D\x6C","\x61\x6C\x70\x68\x61\x28\x6F\x70\x61\x63\x69\x74\x79\x3D","\x29","\x6F\x70\x61\x63\x69\x74\x79","\x43\x53\x53\x31\x43\x6F\x6D\x70\x61\x74","\x56\x4D\x4C\x5F\x50\x52\x45\x46\x49\x58","\x3A\x69\x6D\x61\x67\x65","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30","\x63\x6F\x6D\x70\x61\x72\x65","\x73\x6F\x72\x74","\x3B","\x69\x6E\x64\x65\x78\x4F\x66\x53\x74\x79\x6C\x65\x6E\x61\x6D\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x65\x74\x53\x74\x79\x6C\x65\x46\x6C\x61\x67","\x3D\x30","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x64\x69\x76","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x72\x6F\x75\x6E\x64","\x6C\x69\x6E\x65\x48\x65\x69\x67\x68\x74","\x4C\x49\x4E\x45\x5F\x48\x45\x49\x47\x48\x54","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x7A\x6F\x6F\x6D","\x31","\x67\x65\x74\x52\x6F\x6F\x74","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x69\x73\x45\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x64\x72\x61\x77\x50\x61\x6E\x65","\x6F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74\x4E\x53","\x63\x61\x6E\x76\x61\x73","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x67\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x65\x6E\x63\x6F\x64\x65","\x64\x65\x73\x74\x72\x6F\x79","\x50\x41\x47\x45\x5F\x46\x4F\x52\x4D\x41\x54\x5F\x41\x34\x5F\x50\x4F\x52\x54\x52\x41\x49\x54","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x63\x61\x6C\x65","\x66\x6C\x6F\x6F\x72","\x3C\x68\x74\x6D\x6C\x3E\x3C\x68\x65\x61\x64\x3E","\x62\x61\x73\x65","\x3C\x73\x74\x79\x6C\x65\x3E","\x73\x74\x79\x6C\x65\x53\x68\x65\x65\x74\x73","\x3C\x2F\x73\x74\x79\x6C\x65\x3E\x3C\x2F\x68\x65\x61\x64\x3E","\x3C\x62\x6F\x64\x79\x3E","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x3C\x2F\x62\x6F\x64\x79\x3E","\x3C\x68\x74\x6D\x6C\x3E","\x44\x49\x56","\x3C\x68\x74\x6D\x6C","\x3C\x68\x65\x61\x64\x3E","\x67\x65\x74\x4F\x75\x74\x65\x72\x48\x74\x6D\x6C","\x3C\x2F\x68\x65\x61\x64\x3E","\x3C\x2F\x68\x74\x6D\x6C\x3E","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x68\x6F\x77","\x70\x72\x69\x6E\x74","\x36\x33\x36\x70\x78","\x34\x36\x30\x70\x78","\x70\x72\x65","\x26\x6E\x62\x73\x70\x3B","\x3C\x62\x72\x3E","\x50\x6F\x70\x75\x70\x20\x57\x69\x6E\x64\x6F\x77","\x3C\x70\x72\x65\x3E","\x3C\x2F\x70\x72\x65","\x70\x61\x64\x64\x69\x6E\x67","\x32\x30\x70\x78","\x65\x72\x72\x6F\x72\x49\x6D\x61\x67\x65","\x76\x61\x6C\x69\x67\x6E","\x62\x6F\x74\x74\x6F\x6D","\x6D\x69\x64\x64\x6C\x65","\xA0","\x65\x72\x72\x6F\x72\x52\x65\x73\x6F\x75\x72\x63\x65","\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74","\x63\x6C\x6F\x73\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x72\x61\x67\x4F\x66\x66\x73\x65\x74","\x54\x4F\x4F\x4C\x54\x49\x50\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4F\x46\x46\x53\x45\x54","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74\x73","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x46\x6F\x72\x45\x76\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x45\x6C\x65\x6D\x65\x6E\x74","\x65\x78\x61\x63\x74","\x66\x61\x73\x74\x65\x72","\x66\x61\x73\x74\x65\x73\x74","\x73\x76\x67","\x76\x6D\x6C","\x6D\x69\x78\x65\x64\x48\x74\x6D\x6C","\x70\x72\x65\x66\x65\x72\x48\x74\x6D\x6C","\x73\x74\x72\x69\x63\x74\x48\x74\x6D\x6C","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x32\x30\x30\x30\x2F\x73\x76\x67","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x6C\x69\x6E\x6B","\x67\x72\x61\x79","\x23\x30\x30\x46\x46\x30\x30","\x23\x46\x46\x30\x30\x30\x30","\x6D\x6F\x76\x65","\x64\x65\x66\x61\x75\x6C\x74","\x23\x30\x30\x30\x30\x46\x46","\x23\x30\x30\x39\x39\x46\x46","\x62\x6C\x61\x63\x6B","\x79\x65\x6C\x6C\x6F\x77","\x23\x30\x30\x46\x46\x46\x46","\x23\x30\x30\x33\x33\x46\x46","\x41\x72\x69\x61\x6C\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x50\x6F\x72\x74","\x74\x61\x72\x67\x65\x74\x50\x6F\x72\x74","\x70\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C","\x65\x78\x69\x74\x58","\x65\x78\x69\x74\x59","\x65\x78\x69\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x65\x6E\x74\x72\x79\x58","\x65\x6E\x74\x72\x79\x59","\x65\x6E\x74\x72\x79\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x66\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74\x44\x69\x72\x65\x63\x74\x69\x6F\x6E","\x73\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x65\x70\x61\x72\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x61\x6C\x69\x67\x6E","\x6C\x61\x62\x65\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x65\x72\x74\x69\x63\x61\x6C\x4C\x61\x62\x65\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x6D\x61\x67\x65\x41\x73\x70\x65\x63\x74","\x69\x6D\x61\x67\x65\x41\x6C\x69\x67\x6E","\x69\x6D\x61\x67\x65\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x67\x6C\x61\x73\x73","\x69\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65\x57\x69\x64\x74\x68","\x69\x6D\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x69\x6D\x61\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x69\x6D\x61\x67\x65\x42\x6F\x72\x64\x65\x72","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x6E\x6F\x4C\x61\x62\x65\x6C","\x6E\x6F\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x61\x62\x65\x6C\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x6C\x61\x62\x65\x6C\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x6C\x61\x62\x65\x6C\x50\x61\x64\x64\x69\x6E\x67","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x68\x61\x70\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x49\x6D\x61\x67\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x47\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x70\x61\x63\x69\x6E\x67","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x57\x69\x64\x74\x68","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x48\x65\x69\x67\x68\x74","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x44\x69\x72\x65\x63\x74\x69\x6F\x6E","\x73\x68\x61\x64\x6F\x77","\x73\x65\x67\x6D\x65\x6E\x74","\x65\x6E\x64\x41\x72\x72\x6F\x77","\x73\x74\x61\x72\x74\x41\x72\x72\x6F\x77","\x65\x6E\x64\x53\x69\x7A\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x69\x6E\x65","\x65\x6E\x64\x46\x69\x6C\x6C","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x64\x61\x73\x68\x65\x64","\x64\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x61\x72\x63\x53\x69\x7A\x65","\x73\x6D\x6F\x6F\x74\x68","\x73\x6F\x75\x72\x63\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x70\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x73\x70\x61\x63\x69\x6E\x67","\x73\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x73\x70\x61\x63\x69\x6E\x67\x4C\x65\x66\x74","\x73\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x73\x70\x61\x63\x69\x6E\x67\x52\x69\x67\x68\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x65\x6C\x62\x6F\x77","\x66\x6F\x6E\x74\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x66\x6F\x6C\x64\x61\x62\x6C\x65","\x65\x64\x69\x74\x61\x62\x6C\x65","\x62\x65\x6E\x64\x61\x62\x6C\x65","\x6D\x6F\x76\x61\x62\x6C\x65","\x72\x65\x73\x69\x7A\x61\x62\x6C\x65","\x63\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x64\x65\x6C\x65\x74\x61\x62\x6C\x65","\x65\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x6F\x6F\x70\x53\x74\x79\x6C\x65","\x72\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x58","\x72\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x59","\x72\x65\x63\x74\x61\x6E\x67\x6C\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x64\x6F\x75\x62\x6C\x65\x45\x6C\x6C\x69\x70\x73\x65","\x72\x68\x6F\x6D\x62\x75\x73","\x6C\x69\x6E\x65","\x61\x72\x72\x6F\x77","\x6C\x61\x62\x65\x6C","\x63\x79\x6C\x69\x6E\x64\x65\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x61\x63\x74\x6F\x72","\x63\x6C\x6F\x75\x64","\x74\x72\x69\x61\x6E\x67\x6C\x65","\x68\x65\x78\x61\x67\x6F\x6E","\x63\x6C\x61\x73\x73\x69\x63","\x62\x6C\x6F\x63\x6B","\x6F\x76\x61\x6C","\x64\x69\x61\x6D\x6F\x6E\x64","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x63\x65\x6E\x74\x65\x72","\x72\x69\x67\x68\x74","\x6E\x6F\x72\x74\x68","\x73\x6F\x75\x74\x68","\x65\x61\x73\x74","\x77\x65\x73\x74","\x76\x65\x72\x74\x69\x63\x61\x6C","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x6F\x6F\x70\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x73\x69\x64\x65\x54\x6F\x53\x69\x64\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x74\x6F\x70\x54\x6F\x42\x6F\x74\x74\x6F\x6D\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x65\x6C\x6C\x69\x70\x73\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x65\x63\x74\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x68\x6F\x6D\x62\x75\x73\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x74\x72\x69\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x63\x6F\x6E\x73\x75\x6D\x65\x64","\x67\x65\x74\x4E\x61\x6D\x65","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x63\x6F\x6E\x73\x75\x6D\x65","\x65\x76\x74","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x69\x73\x53\x6F\x75\x72\x63\x65","\x67\x65\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x59","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x72\x65\x74\x75\x72\x6E\x56\x61\x6C\x75\x65","\x73\x65\x74\x45\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x65\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x65\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x65\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x67\x65\x74\x45\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x6F\x6E","\x66","\x72\x65\x6D\x6F\x76\x65\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x64\x65\x74\x61\x63\x68\x45\x76\x65\x6E\x74","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x75\x63\x68\x73\x74\x61\x72\x74","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x72\x65\x6C\x65\x61\x73\x65","\x65\x76\x65\x6E\x74","\x64\x65\x74\x61\x69\x6C","\x77\x68\x65\x65\x6C\x44\x65\x6C\x74\x61","\x6D\x6F\x75\x73\x65\x77\x68\x65\x65\x6C","\x44\x4F\x4D\x4D\x6F\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B","\x73\x72\x63\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x61\x72\x67\x65\x74","\x69\x73\x52\x69\x67\x68\x74\x4D\x6F\x75\x73\x65\x42\x75\x74\x74\x6F\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x73\x68\x69\x66\x74\x4B\x65\x79","\x61\x6C\x74\x4B\x65\x79","\x63\x74\x72\x6C\x4B\x65\x79","\x6D\x65\x74\x61\x4B\x65\x79","\x74\x6F\x75\x63\x68\x65\x73","\x63\x68\x61\x6E\x67\x65\x64\x54\x6F\x75\x63\x68\x65\x73","\x63\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x4D\x61\x69\x6E\x45\x76\x65\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x59","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x63\x61\x6E\x63\x65\x6C\x42\x75\x62\x62\x6C\x65","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x63\x74\x69\x76\x61\x74\x65","\x72\x65\x73\x69\x7A\x65\x53\x74\x61\x72\x74","\x72\x65\x73\x69\x7A\x65\x45\x6E\x64","\x6D\x6F\x76\x65\x53\x74\x61\x72\x74","\x6D\x6F\x76\x65\x45\x6E\x64","\x70\x61\x6E\x53\x74\x61\x72\x74","\x70\x61\x6E","\x70\x61\x6E\x45\x6E\x64","\x6D\x69\x6E\x69\x6D\x69\x7A\x65","\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65","\x6D\x61\x78\x69\x6D\x69\x7A\x65","\x68\x69\x64\x65","\x72\x65\x66\x72\x65\x73\x68","\x73\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74","\x66\x69\x72\x65\x64","\x72\x65\x63\x65\x69\x76\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x75\x73\x70\x65\x6E\x64","\x72\x65\x73\x75\x6D\x65","\x6D\x61\x72\x6B","\x73\x65\x73\x73\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x6F\x73\x74","\x73\x61\x76\x65","\x62\x65\x66\x6F\x72\x65\x41\x64\x64\x56\x65\x72\x74\x65\x78","\x61\x64\x64\x56\x65\x72\x74\x65\x78","\x61\x66\x74\x65\x72\x41\x64\x64\x56\x65\x72\x74\x65\x78","\x64\x6F\x6E\x65","\x65\x78\x65\x63\x75\x74\x65\x64","\x73\x74\x61\x72\x74\x45\x64\x69\x74","\x65\x6E\x64\x45\x64\x69\x74","\x62\x65\x66\x6F\x72\x65\x55\x6E\x64\x6F","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x68\x61\x6E\x67\x65","\x6E\x6F\x74\x69\x66\x79","\x6C\x61\x79\x6F\x75\x74\x43\x65\x6C\x6C\x73","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x75\x70","\x64\x6F\x77\x6E","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x41\x64\x64\x65\x64","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x4D\x6F\x76\x65\x64","\x72\x65\x73\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x65\x64","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x54\x6F\x67\x67\x6C\x65\x64","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x4F\x72\x64\x65\x72\x65\x64","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x52\x65\x6D\x6F\x76\x65\x64","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x46\x6F\x6C\x64\x65\x64","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67","\x61\x64\x64\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x4F\x76\x65\x72\x6C\x61\x79","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x73\x63\x61\x70\x65","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B","\x73\x74\x61\x72\x74","\x72\x65\x73\x65\x74","\x75\x72\x6C","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x74\x68\x6F\x64","\x50\x4F\x53\x54","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x62\x69\x6E\x61\x72\x79","\x72\x65\x71\x75\x65\x73\x74","\x69\x73\x42\x69\x6E\x61\x72\x79","\x73\x65\x74\x42\x69\x6E\x61\x72\x79","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x58\x6D\x6C","\x72\x65\x73\x70\x6F\x6E\x73\x65\x58\x4D\x4C","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x58\x4D\x4C\x48\x74\x74\x70\x52\x65\x71\x75\x65\x73\x74","\x6F\x76\x65\x72\x72\x69\x64\x65\x4D\x69\x6D\x65\x54\x79\x70\x65","\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x3B\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x78\x2D\x75\x73\x65\x72\x2D\x64\x65\x66\x69\x6E\x65\x64","\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x58\x4D\x4C\x48\x54\x54\x50","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72\x73","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x66\x6F\x72\x6D","\x61\x63\x74\x69\x6F\x6E","\x26","\x73\x75\x62\x6D\x69\x74","\x63\x65\x6C\x6C\x73","\x69\x6E\x73\x65\x72\x74\x43\x6F\x75\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x67\x65\x74\x45\x78\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x53\x54\x45\x50\x53\x49\x5A\x45","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x61\x78\x69\x6D\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x69\x6E\x69\x6D\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x4D\x69\x6E\x69\x6D\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x54\x69\x74\x6C\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x70\x6C\x61\x63\x65\x43\x68\x69\x6C\x64","\x63\x6C\x6F\x73\x65\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x6F\x73\x65\x2E\x67\x69\x66","\x6D\x69\x6E\x69\x6D\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6D\x69\x6E\x69\x6D\x69\x7A\x65\x2E\x67\x69\x66","\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65\x2E\x67\x69\x66","\x6D\x61\x78\x69\x6D\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6D\x61\x78\x69\x6D\x69\x7A\x65\x2E\x67\x69\x66","\x72\x65\x73\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x72\x65\x73\x69\x7A\x65\x2E\x67\x69\x66","\x6D\x69\x6E\x69\x6D\x75\x6D\x53\x69\x7A\x65","\x74\x69\x74\x6C\x65","\x6D\x78\x57\x69\x6E\x64\x6F\x77","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x54\x69\x74\x6C\x65","\x50\x61\x6E\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x72\x61\x70\x70\x65\x72","\x61\x63\x74\x69\x76\x65\x57\x69\x6E\x64\x6F\x77","\x7A\x49\x6E\x64\x65\x78","\x70\x72\x65\x76\x69\x6F\x75\x73\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x69\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x32\x70\x78","\x6E\x77\x2D\x72\x65\x73\x69\x7A\x65","\x73\x65\x74\x53\x69\x7A\x65","\x72\x65\x6D\x6F\x76\x65\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x67\x65\x74\x4D\x69\x6E\x69\x6D\x75\x6D\x53\x69\x7A\x65","\x4D\x69\x6E\x69\x6D\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E\x52\x69\x67\x68\x74","\x31\x70\x78","\x4E\x6F\x72\x6D\x61\x6C\x69\x7A\x65","\x4D\x61\x78\x69\x6D\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x30\x70\x78","\x73\x65\x74\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x73\x65\x49\x6D\x67","\x43\x6C\x6F\x73\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x73\x65\x74\x49\x6D\x61\x67\x65","\x34\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x2D\x32\x70\x78","\x67\x65\x74\x54\x61\x62\x6C\x65","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E\x73","\x6F\x6B","\x4F\x4B","\x63\x61\x6E\x63\x65\x6C","\x43\x61\x6E\x63\x65\x6C","\x61\x64\x64\x54\x65\x78\x74","\x69\x6E\x70\x75\x74","\x74\x65\x78\x74","\x61\x64\x64\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x65\x64","\x61\x64\x64\x54\x65\x78\x74\x61\x72\x65\x61","\x72\x6F\x77\x73","\x61\x64\x64\x43\x6F\x6D\x62\x6F","\x6D\x75\x6C\x74\x69\x70\x6C\x65","\x61\x64\x64\x4F\x70\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x65\x73\x69\x7A\x65\x57\x69\x64\x74\x68","\x72\x65\x73\x69\x7A\x65\x48\x65\x69\x67\x68\x74","\x68\x61\x6E\x64\x6C\x69\x6E\x67\x52\x65\x73\x69\x7A\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x57\x69\x64\x74\x68","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x65\x6C\x65\x6D\x65\x6E\x74","\x64\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77\x45\x6C\x65\x6D\x65\x6E\x74","\x65\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x63\x75\x72\x72\x65\x6E\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x63\x75\x72\x72\x65\x6E\x74\x50\x6F\x69\x6E\x74","\x63\x75\x72\x72\x65\x6E\x74\x47\x75\x69\x64\x65","\x63\x75\x72\x72\x65\x6E\x74\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74\x5A\x49\x6E\x64\x65\x78","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74\x4F\x70\x61\x63\x69\x74\x79","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x73\x74\x61\x72\x74\x44\x72\x61\x67","\x6D\x6F\x75\x73\x65\x55\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x74\x6F\x70\x44\x72\x61\x67","\x67\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x73\x45\x76\x65\x6E\x74","\x64\x72\x61\x67\x45\x78\x69\x74","\x64\x72\x61\x67\x45\x6E\x74\x65\x72","\x64\x72\x61\x67\x4F\x76\x65\x72","\x64\x72\x6F\x70","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x67\x65\x74\x47\x75\x69\x64\x65\x53\x74\x61\x74\x65\x73","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x61\x75\x74\x6F\x45\x78\x74\x65\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x50\x6F\x69\x6E\x74\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x68\x69\x67\x68\x6C\x69\x67\x68\x74","\x33","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x6E\x61\x70","\x70\x72\x65\x76\x69\x65\x77\x4F\x66\x66\x73\x65\x74","\x6E\x6F\x52\x65\x73\x65\x74","\x75\x70\x64\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x4D\x6F\x64\x65","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x6F\x64\x65","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x49\x74\x65\x6D","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x6D\x65\x6E\x75","\x63\x75\x72\x72\x65\x6E\x74\x49\x6D\x67","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6D\x62\x6F\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6D\x62\x6F","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x43\x6F\x6D\x62\x6F","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x6E\x64\x65\x78","\x6F\x70\x74\x69\x6F\x6E\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x53\x77\x69\x74\x63\x68\x4D\x6F\x64\x65","\x69\x6E\x69\x74\x69\x61\x6C\x43\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x61\x6C\x74\x49\x63\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x4D\x6F\x64\x65","\x64\x65\x66\x61\x75\x6C\x74\x4D\x6F\x64\x65","\x73\x65\x6C\x65\x63\x74\x4D\x6F\x64\x65","\x61\x64\x64\x4D\x6F\x64\x65","\x64\x65\x66\x61\x75\x6C\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x72\x65\x73\x65\x74\x4D\x6F\x64\x65","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x61\x64\x64\x42\x72\x65\x61\x6B","\x61\x64\x64\x4C\x69\x6E\x65","\x68\x72","\x36\x70\x78","\x75\x72\x6C\x49\x6E\x69\x74","\x75\x72\x6C\x50\x6F\x6C\x6C","\x75\x72\x6C\x4E\x6F\x74\x69\x66\x79","\x63\x6F\x64\x65\x63","\x6C\x6F\x6F\x6B\x75\x70","\x65\x64\x69\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x73\x75\x73\x70\x65\x6E\x64\x65\x64","\x3C\x65\x64\x69\x74\x3E","\x63\x68\x61\x6E\x67\x65\x73","\x75\x6E\x64\x6F\x6E\x65","\x65\x6E\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65\x73","\x3C\x2F\x65\x64\x69\x74\x3E","\x6C\x69\x6E\x65\x66\x65\x65\x64","\x65\x73\x63\x61\x70\x65\x50\x6F\x73\x74\x44\x61\x74\x61","\x73\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74\x52\x65\x6D\x6F\x74\x65\x43\x68\x61\x6E\x67\x65\x73","\x73\x65\x6E\x74","\x72\x65\x63\x65\x69\x76\x65\x64","\x70\x6F\x6C\x6C\x69\x6E\x67","\x70\x6F\x6C\x6C","\x73\x74\x6F\x70","\x72\x65\x61\x73\x6F\x6E","\x6D\x78\x53\x65\x73\x73\x69\x6F\x6E\x2E\x6E\x6F\x74\x69\x66\x79\x3A\x20","\x20\x78\x6D\x6C\x3D","\x3C\x6D\x65\x73\x73\x61\x67\x65\x3E\x3C\x64\x65\x6C\x74\x61\x3E","\x3C\x2F\x64\x65\x6C\x74\x61\x3E\x3C\x2F\x6D\x65\x73\x73\x61\x67\x65\x3E","\x78\x6D\x6C\x3D","\x69\x73\x56\x61\x6C\x69\x64\x52\x65\x73\x70\x6F\x6E\x73\x65","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3A\x20","\x52\x65\x73\x70\x6F\x6E\x73\x65\x20\x6E\x6F\x74\x20\x72\x65\x61\x64\x79","\x54\x72\x61\x6E\x73\x6D\x69\x73\x73\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x3C\x3F\x70\x68\x70","\x6E\x61\x6D\x65\x73\x70\x61\x63\x65","\x70\x72\x65\x66\x69\x78","\x70\x72\x6F\x63\x65\x73\x73\x53\x74\x61\x74\x65","\x64\x65\x6C\x74\x61","\x70\x72\x6F\x63\x65\x73\x73\x44\x65\x6C\x74\x61","\x64\x65\x63\x6F\x64\x65","\x70\x72\x6F\x63\x65\x73\x73\x45\x64\x69\x74","\x64\x65\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74","\x73\x6F\x75\x72\x63\x65","\x64\x65\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65","\x6D\x78\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x6D\x78\x43\x68\x69\x6C\x64\x43\x68\x61\x6E\x67\x65","\x70\x61\x72\x65\x6E\x74","\x63\x65\x6C\x6C\x52\x65\x6D\x6F\x76\x65\x64","\x67\x65\x74\x49\x64","\x70\x75\x74\x4F\x62\x6A\x65\x63\x74","\x73\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74","\x72\x65\x64\x6F\x6E\x65","\x69\x73\x45\x6D\x70\x74\x79","\x69\x73\x53\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74","\x64\x69\x65","\x68\x69\x73\x74\x6F\x72\x79","\x69\x6E\x64\x65\x78\x4F\x66\x4E\x65\x78\x74\x41\x64\x64","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x73\x68\x69\x66\x74","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65","\x69\x73\x52\x65\x6C\x61\x74\x69\x76\x65\x55\x72\x6C","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x2F\x2F","\x68\x6F\x73\x74","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x74\x68\x72\x65\x61\x64","\x61\x63\x74\x69\x76\x65","\x64\x79","\x64\x78","\x74\x30\x79","\x74\x30\x78","\x74\x64\x79","\x74\x64\x78","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x4D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x70\x61\x6E\x47\x72\x61\x70\x68","\x70\x61\x6E\x44\x78","\x70\x61\x6E\x44\x79","\x67\x65\x74\x44\x78","\x67\x65\x74\x44\x79","\x64\x65\x6C\x61\x79","\x73\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x41\x63\x74\x69\x76\x65","\x70\x61\x6E\x54\x6F","\x68\x61\x6E\x64\x6C\x65\x4D\x6F\x75\x73\x65\x4F\x75\x74","\x64\x61\x6D\x70\x65\x72","\x63\x6C\x65\x61\x72\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x2F\x73\x75\x62\x6D\x65\x6E\x75\x2E\x67\x69\x66","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x6F\x70\x75\x70","\x69\x74\x65\x6D\x43\x6F\x75\x6E\x74","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x6C\x61\x62\x65\x6C\x73","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x64\x69\x73\x61\x62\x6C\x65\x43\x6F\x6E\x74\x65\x78\x74\x4D\x65\x6E\x75","\x69\x73\x4C\x65\x66\x74\x4D\x6F\x75\x73\x65\x42\x75\x74\x74\x6F\x6E","\x77\x69\x6C\x6C\x41\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x49\x74\x65\x6D\x73","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x63\x6F\x6E","\x20\x64\x69\x73\x61\x62\x6C\x65\x64","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x72\x65\x61\x74\x65\x53\x75\x62\x6D\x65\x6E\x75","\x65\x76\x65\x6E\x74\x52\x65\x63\x65\x69\x76\x65\x72","\x61\x63\x74\x69\x76\x65\x52\x6F\x77","\x68\x69\x64\x65\x53\x75\x62\x6D\x65\x6E\x75","\x73\x68\x6F\x77\x53\x75\x62\x6D\x65\x6E\x75","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x74\x65\x6D\x48\x6F\x76\x65\x72","\x30\x20\x30\x20\x30\x20\x30\x70\x78","\x63\x6F\x6C\x53\x70\x61\x6E","\x32","\x73\x68\x6F\x77\x4D\x65\x6E\x75","\x63\x68\x61\x6E\x67\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x73\x65\x74\x47\x72\x61\x70\x68","\x67\x72\x61\x70\x68","\x61\x75\x74\x6F\x53\x61\x76\x65\x44\x65\x6C\x61\x79","\x61\x75\x74\x6F\x53\x61\x76\x65\x54\x68\x72\x6F\x74\x74\x6C\x65","\x61\x75\x74\x6F\x53\x61\x76\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x69\x67\x6E\x6F\x72\x65\x64\x43\x68\x61\x6E\x67\x65\x73","\x6C\x61\x73\x74\x53\x6E\x61\x70\x73\x68\x6F\x74","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x73\x74\x6F\x70\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x73\x74\x65\x70\x73","\x65\x61\x73\x65","\x73\x74\x65\x70","\x61\x6E\x69\x6D\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x44\x65\x6C\x74\x61","\x69\x73\x56\x65\x72\x74\x65\x78","\x6D\x6F\x76\x65\x53\x74\x61\x74\x65","\x73\x74\x6F\x70\x52\x65\x63\x75\x72\x73\x69\x6F\x6E","\x67\x65\x74\x4F\x72\x69\x67\x69\x6E\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x69\x6D\x61\x67\x65\x73","\x61\x6C\x74","\x70\x75\x74\x49\x6D\x61\x67\x65","\x67\x65\x74\x49\x6D\x61\x67\x65","\x66\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x6E\x63\x6C\x75\x64\x65\x4F\x76\x65\x72\x6C\x61\x79\x73","\x64\x72\x61\x77\x53\x74\x61\x74\x65","\x64\x72\x61\x77\x43\x65\x6C\x6C\x53\x74\x61\x74\x65","\x76\x69\x73\x69\x74\x53\x74\x61\x74\x65\x73\x52\x65\x63\x75\x72\x73\x69\x76\x65","\x64\x72\x61\x77\x4F\x76\x65\x72\x6C\x61\x79\x73","\x70\x61\x69\x6E\x74","\x72\x65\x73\x74\x6F\x72\x65","\x6F\x76\x65\x72\x6C\x61\x79\x73","\x63\x6F\x6E\x76\x65\x72\x74\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x72\x6C\x43\x6F\x6E\x76\x65\x72\x74\x65\x72","\x73\x74\x61\x74\x65\x73","\x70\x61\x74\x68","\x72\x6F\x74\x61\x74\x65\x48\x74\x6D\x6C","\x6C\x61\x73\x74\x58","\x6C\x61\x73\x74\x59","\x6D\x6F\x76\x65\x4F\x70","\x4D","\x6C\x69\x6E\x65\x4F\x70","\x4C","\x71\x75\x61\x64\x4F\x70","\x51","\x63\x75\x72\x76\x65\x4F\x70","\x43","\x63\x6C\x6F\x73\x65\x4F\x70","\x5A","\x70\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x33\x20\x33","\x66\x6C\x61\x74","\x6D\x69\x74\x65\x72","\x23\x30\x30\x30\x30\x30\x30","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x50\x41\x43\x49\x54\x59","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x46\x46\x53\x45\x54\x5F\x58","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x46\x46\x53\x45\x54\x5F\x59","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4F\x70","\x72\x6F\x74\x61\x74\x65\x50\x6F\x69\x6E\x74","\x70\x6F\x70","\x73\x65\x74\x41\x6C\x70\x68\x61","\x61\x6C\x70\x68\x61","\x73\x65\x74\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x47\x72\x61\x64\x69\x65\x6E\x74","\x66\x69\x6C\x6C\x41\x6C\x70\x68\x61","\x67\x72\x61\x64\x69\x65\x6E\x74\x41\x6C\x70\x68\x61","\x73\x65\x74\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x53\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x65\x74\x44\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x73\x65\x74\x4C\x69\x6E\x65\x43\x61\x70","\x6C\x69\x6E\x65\x43\x61\x70","\x73\x65\x74\x4C\x69\x6E\x65\x4A\x6F\x69\x6E","\x6C\x69\x6E\x65\x4A\x6F\x69\x6E","\x73\x65\x74\x4D\x69\x74\x65\x72\x4C\x69\x6D\x69\x74","\x6D\x69\x74\x65\x72\x4C\x69\x6D\x69\x74","\x73\x65\x74\x46\x6F\x6E\x74\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x53\x69\x7A\x65","\x73\x65\x74\x46\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x73\x65\x74\x46\x6F\x6E\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x43\x6F\x6C\x6F\x72","\x73\x68\x61\x64\x6F\x77\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x41\x6C\x70\x68\x61","\x73\x68\x61\x64\x6F\x77\x41\x6C\x70\x68\x61","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x4F\x66\x66\x73\x65\x74","\x73\x68\x61\x64\x6F\x77\x44\x78","\x73\x68\x61\x64\x6F\x77\x44\x79","\x62\x65\x67\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x71\x75\x61\x64\x54\x6F","\x63\x75\x72\x76\x65\x54\x6F","\x61\x72\x63\x54\x6F","\x61\x72\x63\x54\x6F\x43\x75\x72\x76\x65\x73","\x65\x6E\x64","\x77\x72\x69\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x73","\x65\x78\x74\x65\x6E\x64","\x74\x65\x78\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6D\x70\x72\x65\x73\x73\x65\x64","\x66\x6F\x6E\x74\x66\x61\x6D\x69\x6C\x79","\x66\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x73\x69\x7A\x65","\x73\x68\x61\x64\x6F\x77\x63\x6F\x6C\x6F\x72","\x73\x68\x61\x64\x6F\x77\x61\x6C\x70\x68\x61","\x73\x68\x61\x64\x6F\x77\x6F\x66\x66\x73\x65\x74","\x74\x6F\x46\x69\x78\x65\x64","\x72\x6F\x74\x61\x74\x65","\x74\x68\x65\x74\x61","\x63\x78","\x63\x79","\x66\x69\x6C\x6C\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74","\x63\x31","\x63\x32","\x77","\x68","\x61\x6C\x70\x68\x61\x31","\x61\x6C\x70\x68\x61\x32","\x73\x74\x72\x6F\x6B\x65\x63\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x64\x61\x73\x68\x70\x61\x74\x74\x65\x72\x6E","\x70\x61\x74\x74\x65\x72\x6E","\x6C\x69\x6E\x65\x63\x61\x70","\x63\x61\x70","\x6C\x69\x6E\x65\x6A\x6F\x69\x6E","\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74","\x6C\x69\x6D\x69\x74","\x66\x6F\x6E\x74\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x62\x6F\x72\x64\x65\x72\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x73\x74\x79\x6C\x65","\x72\x65\x63\x74","\x72\x6F\x75\x6E\x64\x72\x65\x63\x74","\x63\x6F\x6E\x76\x65\x72\x74","\x61\x73\x70\x65\x63\x74","\x71\x75\x61\x64","\x78\x31","\x79\x31","\x78\x32","\x79\x32","\x63\x75\x72\x76\x65","\x78\x33","\x79\x33","\x69\x73\x4E\x6F\x64\x65","\x73\x74\x72","\x77\x72\x61\x70","\x66\x69\x6C\x6C","\x63\x6C\x69\x70","\x73\x74\x72\x6F\x6B\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x66\x69\x6C\x6C\x73\x74\x72\x6F\x6B\x65","\x67\x72\x61\x64\x69\x65\x6E\x74\x73","\x64\x65\x66\x73","\x73\x74\x79\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x61\x74\x63\x68\x48\x74\x6D\x6C\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x66\x6F\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x72\x6F\x6B\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x72\x65\x66\x43\x6F\x75\x6E\x74","\x62\x6C\x6F\x63\x6B\x49\x6D\x61\x67\x65\x50\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x73\x76\x67\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A","\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A","\x3B\x66\x69\x6C\x6C\x3A\x6E\x6F\x6E\x65\x3B\x73\x74\x72\x6F\x6B\x65\x2D\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74\x3A\x31\x30\x7D","\x4E\x53\x5F\x53\x56\x47","\x78\x6D\x6C\x6E\x73","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x64\x69\x65\x6E\x74\x49\x64","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x53\x4F\x55\x54\x48","\x73","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x45\x41\x53\x54","\x65","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4E\x4F\x52\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x57\x45\x53\x54","\x6D\x78\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x2D","\x67\x65\x74\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x69\x64","\x63\x72\x65\x61\x74\x65\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74","\x6C\x69\x6E\x65\x61\x72\x47\x72\x61\x64\x69\x65\x6E\x74","\x30\x25","\x3B\x73\x74\x6F\x70\x2D\x6F\x70\x61\x63\x69\x74\x79\x3A","\x6F\x66\x66\x73\x65\x74","\x73\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A","\x61\x64\x64\x4E\x6F\x64\x65","\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x6C\x6C","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77","\x63\x72\x65\x61\x74\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73","\x61\x6C\x6C","\x66\x69\x6C\x6C\x2D\x6F\x70\x61\x63\x69\x74\x79","\x75\x72\x6C\x28\x23","\x73\x74\x72\x6F\x6B\x65\x2D\x6F\x70\x61\x63\x69\x74\x79","\x73\x74\x72\x6F\x6B\x65\x2D\x77\x69\x64\x74\x68","\x75\x70\x64\x61\x74\x65\x53\x74\x72\x6F\x6B\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x73\x74\x72\x6F\x6B\x65\x2D\x64\x61\x73\x68\x61\x72\x72\x61\x79","\x63\x72\x65\x61\x74\x65\x44\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x73\x74\x72\x6F\x6B\x65\x2D\x6C\x69\x6E\x65\x6A\x6F\x69\x6E","\x62\x75\x74\x74","\x73\x74\x72\x6F\x6B\x65\x2D\x6C\x69\x6E\x65\x63\x61\x70","\x73\x74\x72\x6F\x6B\x65\x2D\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x68\x69\x74\x65","\x29\x73\x63\x61\x6C\x65\x28","\x29\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x72\x6F\x74\x61\x74\x65\x28","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x43\x78","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x43\x79","\x72\x78","\x72\x79","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x53","\x78\x6C\x69\x6E\x6B\x3A\x68\x72\x65\x66","\x70\x72\x65\x73\x65\x72\x76\x65\x41\x73\x70\x65\x63\x74\x52\x61\x74\x69\x6F","\x73\x63\x61\x6C\x65\x28","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x6E\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A","\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A","\x3B\x63\x6F\x6C\x6F\x72\x3A","\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A","\x70\x78\x3B","\x46\x4F\x4E\x54\x5F\x42\x4F\x4C\x44","\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x62\x6F\x6C\x64\x3B","\x46\x4F\x4E\x54\x5F\x49\x54\x41\x4C\x49\x43","\x66\x6F\x6E\x74\x2D\x73\x74\x79\x6C\x65\x3A\x69\x74\x61\x6C\x69\x63\x3B","\x46\x4F\x4E\x54\x5F\x55\x4E\x44\x45\x52\x4C\x49\x4E\x45","\x66\x6F\x6E\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E\x3A\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65\x3B","\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B","\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x72\x69\x67\x68\x74\x3B","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A","\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20","\x26\x61\x6D\x70\x3B\x67\x74\x3B","\x26\x61\x6D\x70\x3B\x6C\x74\x3B","\x3C\x64\x69\x76\x20\x78\x6D\x6C\x6E\x73\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B","\x22\x3E","\x3C\x2F\x64\x69\x76\x3E","\x3C\x68\x72\x20\x2F\x3E","\x3C\x62\x72\x20\x2F\x3E","\x3C\x64\x69\x76\x20\x78\x6D\x6C\x6E\x73\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22","\x68\x74\x6D\x6C","\x76\x65\x72\x74\x69\x63\x61\x6C\x2D\x61\x6C\x69\x67\x6E\x3A\x74\x6F\x70\x3B","\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x68\x69\x64\x64\x65\x6E\x3B","\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A","\x77\x69\x64\x74\x68\x3A","\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x6E\x6F\x72\x6D\x61\x6C\x3B","\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x6E\x6F\x77\x72\x61\x70\x3B","\x66\x6F\x72\x65\x69\x67\x6E\x4F\x62\x6A\x65\x63\x74","\x70\x6C\x61\x69\x6E\x54\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x70","\x6D\x78\x2D\x63\x6C\x69\x70\x2D","\x63\x6C\x69\x70\x50\x61\x74\x68","\x63\x6C\x69\x70\x2D\x70\x61\x74\x68","\x75\x70\x64\x61\x74\x65\x46\x6F\x6E\x74","\x74\x65\x78\x74\x2D\x61\x6E\x63\x68\x6F\x72","\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65","\x61\x64\x64\x54\x65\x78\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74","\x62\x6F\x6C\x64","\x66\x6F\x6E\x74\x2D\x73\x74\x79\x6C\x65","\x69\x74\x61\x6C\x69\x63","\x74\x65\x78\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x67\x65\x74\x42\x42\x6F\x78","\x66\x6F\x6E\x74\x57\x65\x69\x67\x68\x74","\x3C\x62\x72\x2F\x3E","\x6D\x6F\x64","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28\x30\x2E\x35\x2C\x20\x30\x2E\x35\x29","\x6D","\x6C","\x63","\x72\x6F\x74\x61\x74\x65\x64\x48\x74\x6D\x6C\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x76\x6D\x6C\x53\x63\x61\x6C\x65","\x20\x65","\x63\x6F\x6F\x72\x64\x73\x69\x7A\x65","\x73\x74\x72\x6F\x6B\x65\x77\x65\x69\x67\x68\x74","\x73\x74\x72\x6F\x6B\x65\x64","\x63\x72\x65\x61\x74\x65\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x6C\x6C","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x46\x69\x6C\x6C","\x66\x69\x6C\x6C\x65\x64","\x3A\x66\x69\x6C\x6C","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x74\x69\x6C\x65","\x63\x6F\x6C\x6F\x72\x32","\x66\x6C\x69\x70","\x61\x6E\x67\x6C\x65","\x4F\x46\x46\x49\x43\x45\x5F\x50\x52\x45\x46\x49\x58","\x3A\x6F\x70\x61\x63\x69\x74\x79\x32","\x3A\x73\x74\x72\x6F\x6B\x65","\x65\x6E\x64\x63\x61\x70","\x6A\x6F\x69\x6E\x73\x74\x79\x6C\x65","\x31\x30","\x64\x61\x73\x68\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x6D\x6C\x44\x61\x73\x68\x53\x74\x79\x6C\x65","\x64\x61\x73\x68","\x30\x20\x32","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77\x46\x69\x6C\x6C","\x3A\x73\x68\x61\x70\x65","\x63\x20","\x63\x72\x65\x61\x74\x65\x52\x65\x63\x74","\x3A\x72\x65\x63\x74","\x3A\x72\x6F\x75\x6E\x64\x72\x65\x63\x74","\x61\x72\x63\x73\x69\x7A\x65","\x3A\x6F\x76\x61\x6C","\x61\x74\x6D\x6F\x73\x74","\x69\x67\x6E\x6F\x72\x65","\x66\x72\x61\x6D\x65","\x31\x38\x30","\x66\x6F\x6E\x74\x44\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x3A\x67\x72\x6F\x75\x70","\x72\x65\x6C\x61\x74\x69\x76\x65","\x67\x65\x74\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74\x41\x73\x50\x6F\x69\x6E\x74","\x6E\x6F\x72\x6D\x61\x6C","\x6D\x61\x78\x48\x65\x69\x67\x68\x74","\x67\x72\x6F\x75\x70","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x4D\x61\x74\x72\x69\x78\x28\x4D\x31\x31\x3D","\x2C\x20\x4D\x31\x32\x3D","\x2C\x20\x4D\x32\x31\x3D","\x2C\x20\x4D\x32\x32\x3D","\x2C\x20\x73\x69\x7A\x69\x6E\x67\x4D\x65\x74\x68\x6F\x64\x3D\x27\x61\x75\x74\x6F\x20\x65\x78\x70\x61\x6E\x64\x27\x29","\x3A\x70\x61\x74\x68","\x74\x65\x78\x74\x70\x61\x74\x68\x6F\x6B","\x6D\x20","\x20\x6C\x20","\x3A\x74\x65\x78\x74\x70\x61\x74\x68","\x76\x2D\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A","\x73\x74\x72\x69\x6E\x67","\x73\x65\x74\x53\x74\x61\x74\x65\x73","\x67\x75\x69\x64\x65\x58","\x67\x75\x69\x64\x65\x59","\x67\x65\x74\x47\x75\x69\x64\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x63\x72\x65\x61\x74\x65\x47\x75\x69\x64\x65\x53\x68\x61\x70\x65","\x69\x73\x44\x61\x73\x68\x65\x64","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x70\x6F\x69\x6E\x74\x73","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x64\x65\x73\x63","\x70\x61\x72\x73\x65\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x61\x72\x73\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x63\x61\x6C\x69\x7A\x65\x64","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x77\x30","\x68\x30","\x62\x67\x4E\x6F\x64\x65","\x66\x67\x4E\x6F\x64\x65","\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x70\x61\x72\x73\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x65\x76\x61\x6C\x75\x61\x74\x65\x54\x65\x78\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x65\x76\x61\x6C\x75\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x6F\x63\x61\x6C\x69\x7A\x65\x64","\x65\x76\x61\x6C","\x64\x72\x61\x77\x53\x68\x61\x70\x65","\x64\x72\x61\x77\x43\x68\x69\x6C\x64\x72\x65\x6E","\x63\x6F\x6D\x70\x75\x74\x65\x41\x73\x70\x65\x63\x74","\x69\x6E\x68\x65\x72\x69\x74","\x67\x65\x74\x4E\x75\x6D\x62\x65\x72","\x64\x72\x61\x77\x4E\x6F\x64\x65","\x66\x69\x78\x65\x64","\x61\x72\x63","\x78\x2D\x61\x78\x69\x73\x2D\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x6C\x61\x72\x67\x65\x2D\x61\x72\x63\x2D\x66\x6C\x61\x67","\x73\x77\x65\x65\x70\x2D\x66\x6C\x61\x67","\x52\x45\x43\x54\x41\x4E\x47\x4C\x45\x5F\x52\x4F\x55\x4E\x44\x49\x4E\x47\x5F\x46\x41\x43\x54\x4F\x52","\x61\x6C\x69\x67\x6E\x2D\x73\x68\x61\x70\x65","\x69\x6E\x63\x6C\x75\x64\x65\x2D\x73\x68\x61\x70\x65","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C","\x62\x6F\x75\x6E\x64\x73","\x62\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x73\x76\x67\x53\x74\x72\x6F\x6B\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x73\x74\x65\x6E\x63\x69\x6C\x50\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x69\x73\x50\x61\x72\x73\x65\x56\x6D\x6C","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x67\x65\x74\x53\x76\x67\x53\x63\x72\x65\x65\x6E\x4F\x66\x66\x73\x65\x74","\x63\x72\x65\x61\x74\x65\x53\x76\x67","\x63\x72\x65\x61\x74\x65\x48\x74\x6D\x6C","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x75\x70\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x73\x46\x72\x6F\x6D\x50\x6F\x69\x6E\x74\x73","\x63\x68\x65\x63\x6B\x42\x6F\x75\x6E\x64\x73","\x72\x65\x64\x72\x61\x77\x48\x74\x6D\x6C\x53\x68\x61\x70\x65","\x72\x65\x64\x72\x61\x77\x53\x68\x61\x70\x65","\x75\x70\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C\x47\x72\x6F\x75\x70","\x63\x72\x65\x61\x74\x65\x43\x61\x6E\x76\x61\x73","\x68\x61\x73\x43\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x6C\x61\x73\x74\x43\x68\x69\x6C\x64","\x62\x65\x66\x6F\x72\x65\x65\x6E\x64","\x69\x6E\x73\x65\x72\x74\x41\x64\x6A\x61\x63\x65\x6E\x74\x48\x54\x4D\x4C","\x61\x64\x64\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x69\x6C\x74\x65\x72","\x64\x65\x73\x74\x72\x6F\x79\x43\x61\x6E\x76\x61\x73","\x75\x70\x64\x61\x74\x65\x56\x6D\x6C\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x78\x52\x65\x66\x43\x6F\x75\x6E\x74","\x6F\x6C\x64\x47\x72\x61\x64\x69\x65\x6E\x74\x73","\x72\x65\x6C\x65\x61\x73\x65\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74\x73","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x75\x70\x64\x61\x74\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x43\x61\x6E\x76\x61\x73","\x70\x61\x69\x6E\x74\x53\x74\x65\x6E\x63\x69\x6C\x53\x68\x61\x70\x65","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x67\x65\x74\x47\x72\x61\x64\x69\x65\x6E\x74\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x64\x64\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x63\x74\x61\x6E\x67\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x70\x61\x69\x6E\x74\x47\x6C\x61\x73\x73\x45\x66\x66\x65\x63\x74","\x23\x66\x66\x66\x66\x66\x66","\x69\x73\x52\x6F\x75\x6E\x64\x65\x64","\x73\x74\x65\x6E\x63\x69\x6C\x46\x6C\x69\x70\x48","\x73\x74\x65\x6E\x63\x69\x6C\x46\x6C\x69\x70\x56","\x73\x65\x74\x43\x75\x72\x73\x6F\x72","\x67\x65\x74\x43\x75\x72\x73\x6F\x72","\x63\x72\x65\x61\x74\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x61\x75\x67\x6D\x65\x6E\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x67\x65\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x67\x65\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x67\x65\x74\x54\x65\x78\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x76\x65\x72\x74\x69\x63\x61\x6C\x54\x65\x78\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28\x27","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66\x27\x29","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x6D\x61\x72\x6B\x65\x72\x73","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x46\x69\x6C\x74\x65\x72\x73","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x43\x6F\x6C\x6F\x72\x73","\x62\x6F\x72\x64\x65\x72\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x73\x6F\x6C\x69\x64","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x64\x72\x6F\x70\x53\x68\x61\x64\x6F\x77\x20\x28\x4F\x66\x66\x58\x3D\x27","\x27\x2C\x20\x4F\x66\x66\x59\x3D\x27","\x27\x2C\x20\x43\x6F\x6C\x6F\x72\x3D\x27","\x27\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x73\x74\x61\x72\x74\x43\x6F\x6C\x6F\x72\x53\x74\x72\x3D\x27","\x27\x2C\x20\x65\x6E\x64\x43\x6F\x6C\x6F\x72\x53\x74\x72\x3D\x27","\x27\x2C\x20\x67\x72\x61\x64\x69\x65\x6E\x74\x54\x79\x70\x65\x3D\x27","\x70\x61\x69\x6E\x74\x4C\x69\x6E\x65","\x61\x72\x72\x6F\x77\x57\x69\x64\x74\x68","\x41\x52\x52\x4F\x57\x5F\x57\x49\x44\x54\x48","\x41\x52\x52\x4F\x57\x5F\x53\x50\x41\x43\x49\x4E\x47","\x41\x52\x52\x4F\x57\x5F\x53\x49\x5A\x45","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x53\x54\x59\x4C\x45","\x63\x6C\x69\x70\x70\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x4C\x65\x66\x74","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x52\x69\x67\x68\x74","\x72\x65\x70\x6C\x61\x63\x65\x4C\x69\x6E\x65\x66\x65\x65\x64\x73","\x69\x67\x6E\x6F\x72\x65\x43\x6C\x69\x70\x70\x65\x64\x53\x74\x72\x69\x6E\x67\x53\x69\x7A\x65","\x69\x67\x6E\x6F\x72\x65\x53\x74\x72\x69\x6E\x67\x53\x69\x7A\x65","\x74\x65\x78\x74\x44\x69\x76","\x75\x70\x64\x61\x74\x65\x53\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x75\x70\x64\x61\x74\x65\x56\x61\x6C\x75\x65","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x46\x69\x6C\x74\x65\x72","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x4F\x72\x69\x67\x69\x6E","\x25\x20","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x25\x2C","\x25\x29\x73\x63\x61\x6C\x65\x28","\x29\x20\x72\x6F\x74\x61\x74\x65\x28","\x64\x65\x67\x29","\x30\x25\x20\x30\x25","\x25\x29","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x7A\x6F\x6F\x6D\x3A\x31\x3B","\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x5F\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x70\x61\x64\x64\x69\x6E\x67\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x70\x78\x3B\x70\x61\x64\x64\x69\x6E\x67\x2D\x72\x69\x67\x68\x74\x3A\x31\x70\x78\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A","\x75\x70\x64\x61\x74\x65\x4D\x61\x72\x67\x69\x6E","\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x70\x72\x65\x73\x65\x72\x76\x65\x49\x6D\x61\x67\x65\x41\x73\x70\x65\x63\x74","\x69\x6D\x61\x67\x65\x46\x6C\x69\x70\x48","\x69\x6D\x61\x67\x65\x46\x6C\x69\x70\x56","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x72\x6F\x74\x61\x74\x69\x6F\x6E\x3D\x32\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x6D\x69\x72\x72\x6F\x72\x3D\x31\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x72\x6F\x74\x61\x74\x69\x6F\x6E\x3D\x32\x2C\x20\x6D\x69\x72\x72\x6F\x72\x3D\x31\x29","\x69\x6D\x61\x67\x65\x53\x69\x7A\x65","\x44\x45\x46\x41\x55\x4C\x54\x5F\x49\x4D\x41\x47\x45\x53\x49\x5A\x45","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x69\x7A\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72","\x70\x61\x69\x6E\x74\x49\x6D\x61\x67\x65","\x70\x61\x69\x6E\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72","\x67\x65\x74\x49\x6D\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x53\x54\x59\x4C\x45\x5F\x43\x55\x52\x56\x45\x44","\x70\x61\x69\x6E\x74\x43\x75\x72\x76\x65\x64\x4C\x69\x6E\x65","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x53\x49\x5A\x45","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x53\x49\x5A\x45","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x46\x49\x4C\x4C","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x46\x49\x4C\x4C","\x70\x61\x69\x6E\x74\x52\x6F\x75\x6E\x64\x65\x64\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x70\x61\x69\x6E\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x70\x61\x69\x6E\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x75\x73\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x6D\x6F\x76\x65\x43\x65\x6C\x6C","\x67\x65\x74\x47\x72\x61\x70\x68","\x67\x65\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x72\x61\x76\x65\x72\x73\x65","\x67\x65\x74\x45\x64\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x41\x74","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x69\x73\x56\x65\x72\x74\x65\x78\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x56\x65\x72\x74\x65\x78\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x45\x64\x67\x65\x49\x67\x6E\x6F\x72\x65\x64","\x73\x65\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x4F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x4F\x66\x66\x73\x65\x74","\x69\x73\x41\x6E\x63\x65\x73\x74\x6F\x72","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x65\x74\x45\x64\x67\x65\x50\x6F\x69\x6E\x74\x73","\x73\x65\x74\x52\x65\x6C\x61\x74\x69\x76\x65","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x65\x74\x56\x65\x72\x74\x65\x78\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74\x56\x65\x72\x74\x65\x78\x42\x6F\x75\x6E\x64\x73","\x61\x72\x72\x61\x6E\x67\x65\x47\x72\x6F\x75\x70\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x56\x65\x72\x74\x69\x63\x65\x73","\x67\x65\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78\x46\x72\x6F\x6D\x47\x65\x6F\x6D\x65\x74\x72\x79","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x67\x65\x74\x53\x74\x61\x72\x74\x53\x69\x7A\x65","\x78\x30","\x79\x30","\x6B\x65\x65\x70\x46\x69\x72\x73\x74\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x72\x65\x73\x69\x7A\x65\x50\x61\x72\x65\x6E\x74","\x72\x65\x73\x69\x7A\x65\x4C\x61\x73\x74","\x69\x73\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x67\x65\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x53\x69\x7A\x65","\x69\x73\x4C\x61\x79\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x72\x65\x73\x69\x7A\x65\x56\x65\x72\x74\x69\x63\x65\x73","\x69\x6E\x76\x65\x72\x74","\x67\x72\x6F\x75\x70\x50\x61\x64\x64\x69\x6E\x67","\x70\x61\x72\x65\x6E\x74\x73\x43\x68\x61\x6E\x67\x65\x64","\x6D\x6F\x76\x65\x54\x72\x65\x65","\x6C\x65\x76\x65\x6C\x44\x69\x73\x74\x61\x6E\x63\x65","\x6E\x6F\x64\x65\x44\x69\x73\x74\x61\x6E\x63\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73","\x70\x72\x65\x66\x48\x6F\x7A\x45\x64\x67\x65\x53\x65\x70","\x70\x72\x65\x66\x56\x65\x72\x74\x45\x64\x67\x65\x4F\x66\x66","\x6D\x69\x6E\x45\x64\x67\x65\x4A\x65\x74\x74\x79","\x63\x68\x61\x6E\x6E\x65\x6C\x42\x75\x66\x66\x65\x72","\x65\x64\x67\x65\x52\x6F\x75\x74\x69\x6E\x67","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x54\x72\x65\x65\x52\x6F\x6F\x74\x73","\x64\x66\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x4C\x61\x79\x6F\x75\x74","\x6D\x6F\x76\x65\x4E\x6F\x64\x65","\x61\x64\x6A\x75\x73\x74\x50\x61\x72\x65\x6E\x74\x73","\x6C\x6F\x63\x61\x6C\x45\x64\x67\x65\x50\x72\x6F\x63\x65\x73\x73\x69\x6E\x67","\x6E\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x4E\x6F\x64\x65","\x61\x74\x74\x61\x63\x68\x50\x61\x72\x65\x6E\x74","\x6C\x61\x79\x6F\x75\x74\x4C\x65\x61\x66","\x6F\x66\x66\x73\x65\x74\x58","\x6F\x66\x66\x73\x65\x74\x59","\x75\x70\x70\x65\x72\x48\x65\x61\x64","\x63\x6F\x6E\x74\x6F\x75\x72","\x63\x72\x65\x61\x74\x65\x4C\x69\x6E\x65","\x6C\x6F\x77\x65\x72\x48\x65\x61\x64","\x75\x70\x70\x65\x72\x54\x61\x69\x6C","\x6C\x6F\x77\x65\x72\x54\x61\x69\x6C","\x6D\x65\x72\x67\x65","\x62\x72\x69\x64\x67\x65","\x73\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x70\x72\x6F\x63\x65\x73\x73\x4E\x6F\x64\x65\x4F\x75\x74\x67\x6F\x69\x6E\x67","\x67\x65\x74\x45\x64\x67\x65\x73\x42\x65\x74\x77\x65\x65\x6E","\x77\x65\x69\x67\x68\x74\x65\x64\x56\x61\x6C\x75\x65","\x6E\x75\x64\x67\x65","\x76\x69\x73\x69\x74\x65\x64","\x72\x61\x6E\x6B\x49\x6E\x64\x65\x78","\x75\x73\x65\x49\x6E\x70\x75\x74\x4F\x72\x69\x67\x69\x6E","\x64\x69\x73\x61\x62\x6C\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x66\x6F\x72\x63\x65\x43\x6F\x6E\x73\x74\x61\x6E\x74","\x66\x6F\x72\x63\x65\x43\x6F\x6E\x73\x74\x61\x6E\x74\x53\x71\x75\x61\x72\x65\x64","\x6D\x69\x6E\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74","\x6D\x61\x78\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74","\x6D\x69\x6E\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74\x53\x71\x75\x61\x72\x65\x64","\x69\x6E\x69\x74\x69\x61\x6C\x54\x65\x6D\x70","\x74\x65\x6D\x70\x65\x72\x61\x74\x75\x72\x65","\x6D\x61\x78\x49\x74\x65\x72\x61\x74\x69\x6F\x6E\x73","\x69\x74\x65\x72\x61\x74\x69\x6F\x6E","\x61\x6C\x6C\x6F\x77\x65\x64\x54\x6F\x52\x75\x6E","\x76\x65\x72\x74\x65\x78\x41\x72\x72\x61\x79","\x67\x65\x74\x42\x6F\x75\x6E\x64\x73","\x69\x6E\x64\x69\x63\x65\x73","\x64\x69\x73\x70\x58","\x64\x69\x73\x70\x59","\x63\x65\x6C\x6C\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x69\x73\x4D\x6F\x76\x65\x61\x62\x6C\x65","\x6E\x65\x69\x67\x68\x62\x6F\x75\x72\x73","\x72\x61\x64\x69\x75\x73","\x72\x61\x64\x69\x75\x73\x53\x71\x75\x61\x72\x65\x64","\x67\x65\x74\x4F\x70\x70\x6F\x73\x69\x74\x65\x73","\x72\x65\x73\x65\x74\x45\x64\x67\x65","\x63\x61\x6C\x63\x52\x65\x70\x75\x6C\x73\x69\x6F\x6E","\x63\x61\x6C\x63\x41\x74\x74\x72\x61\x63\x74\x69\x6F\x6E","\x63\x61\x6C\x63\x50\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x72\x65\x64\x75\x63\x65\x54\x65\x6D\x70\x65\x72\x61\x74\x75\x72\x65","\x72\x61\x6E\x64\x6F\x6D","\x6D\x6F\x76\x65\x43\x69\x72\x63\x6C\x65","\x67\x65\x74\x52\x61\x64\x69\x75\x73","\x63\x69\x72\x63\x6C\x65","\x66\x69\x6E\x64\x50\x61\x72\x61\x6C\x6C\x65\x6C\x73","\x67\x65\x74\x45\x64\x67\x65\x49\x64","\x72\x6F\x75\x74\x65","\x6C\x61\x79\x6F\x75\x74\x73","\x6D\x61\x73\x74\x65\x72","\x70\x6C\x61\x63\x65\x4C\x61\x62\x65\x6C\x73","\x61\x76\x6F\x69\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x74\x65\x6D\x70","\x6D\x61\x78\x52\x61\x6E\x6B","\x6D\x69\x6E\x52\x61\x6E\x6B","\x6E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x70\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x4E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x65\x6E\x65\x72\x61\x6C\x50\x75\x72\x70\x6F\x73\x65\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x74\x47\x65\x6E\x65\x72\x61\x6C\x50\x75\x72\x70\x6F\x73\x65\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x74\x58","\x73\x65\x74\x59","\x63\x6F\x6E\x6E\x65\x63\x74\x73\x41\x73\x54\x61\x72\x67\x65\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x73\x41\x73\x53\x6F\x75\x72\x63\x65","\x68\x61\x73\x68\x43\x6F\x64\x65","\x67\x65\x74\x52\x61\x6E\x6B\x56\x61\x6C\x75\x65","\x67\x65\x74\x43\x6F\x72\x65\x43\x65\x6C\x6C","\x65\x64\x67\x65\x73","\x69\x73\x52\x65\x76\x65\x72\x73\x65\x64","\x74\x69\x67\x68\x74\x65\x6E\x54\x6F\x53\x6F\x75\x72\x63\x65","\x72\x6F\x6F\x74\x73","\x76\x65\x72\x74\x65\x78\x4D\x61\x70\x70\x65\x72","\x65\x64\x67\x65\x4D\x61\x70\x70\x65\x72","\x53\x4F\x55\x52\x43\x45\x53\x43\x41\x4E\x53\x54\x41\x52\x54\x52\x41\x4E\x4B","\x63\x72\x65\x61\x74\x65\x49\x6E\x74\x65\x72\x6E\x61\x6C\x43\x65\x6C\x6C\x73","\x72\x61\x6E\x6B\x73","\x64\x66\x73\x43\x6F\x75\x6E\x74","\x69\x6E\x69\x74\x69\x61\x6C\x52\x61\x6E\x6B","\x73\x6C\x69\x63\x65","\x66\x69\x78\x52\x61\x6E\x6B\x73","\x65\x78\x74\x65\x6E\x64\x65\x64\x44\x66\x73","\x6E\x65\x73\x74\x65\x64\x42\x65\x73\x74\x52\x61\x6E\x6B\x73","\x63\x75\x72\x72\x65\x6E\x74\x42\x65\x73\x74\x43\x72\x6F\x73\x73\x69\x6E\x67\x73","\x69\x74\x65\x72\x61\x74\x69\x6F\x6E\x73\x57\x69\x74\x68\x6F\x75\x74\x49\x6D\x70\x72\x6F\x76\x65\x6D\x65\x6E\x74","\x6D\x61\x78\x4E\x6F\x49\x6D\x70\x72\x6F\x76\x65\x6D\x65\x6E\x74\x49\x74\x65\x72\x61\x74\x69\x6F\x6E\x73","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x43\x72\x6F\x73\x73\x69\x6E\x67\x73","\x77\x65\x69\x67\x68\x74\x65\x64\x4D\x65\x64\x69\x61\x6E","\x74\x72\x61\x6E\x73\x70\x6F\x73\x65","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x52\x61\x6E\x6B\x43\x72\x6F\x73\x73\x69\x6E\x67","\x6D\x65\x64\x69\x61\x6E\x52\x61\x6E\x6B","\x6D\x65\x64\x69\x61\x6E\x56\x61\x6C\x75\x65","\x6C\x65\x6E\x74\x68","\x67\x65\x74\x49\x6E\x63\x6F\x6D\x69\x6E\x67\x45\x64\x67\x65\x73","\x69\x6E\x74\x72\x61\x43\x65\x6C\x6C\x53\x70\x61\x63\x69\x6E\x67","\x69\x6E\x74\x65\x72\x52\x61\x6E\x6B\x43\x65\x6C\x6C\x53\x70\x61\x63\x69\x6E\x67","\x6F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x58","\x70\x61\x72\x61\x6C\x6C\x65\x6C\x45\x64\x67\x65\x53\x70\x61\x63\x69\x6E\x67","\x6A\x65\x74\x74\x79\x50\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x69\x6D\x69\x74\x58","\x63\x75\x72\x72\x65\x6E\x74\x58\x44\x65\x6C\x74\x61","\x77\x69\x64\x65\x73\x74\x52\x61\x6E\x6B","\x72\x61\x6E\x6B\x54\x6F\x70\x59","\x72\x61\x6E\x6B\x42\x6F\x74\x74\x6F\x6D\x59","\x77\x69\x64\x65\x73\x74\x52\x61\x6E\x6B\x56\x61\x6C\x75\x65","\x72\x61\x6E\x6B\x57\x69\x64\x74\x68\x73","\x72\x61\x6E\x6B\x59","\x66\x69\x6E\x65\x54\x75\x6E\x69\x6E\x67","\x50\x4F\x4C\x59\x4C\x49\x4E\x45","\x6E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x61\x63\x68\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x61\x63\x68\x65","\x70\x72\x69\x6E\x74\x53\x74\x61\x74\x75\x73","\x3D\x3D\x3D\x3D\x3D\x3D\x43\x6F\x6F\x72\x64\x20\x61\x73\x73\x69\x67\x6E\x6D\x65\x6E\x74\x20\x64\x65\x62\x75\x67\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x52\x61\x6E\x6B\x20","\x20\x3A\x20","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x69\x6E\x69\x74\x69\x61\x6C\x43\x6F\x6F\x72\x64\x73","\x6D\x69\x6E\x4E\x6F\x64\x65","\x6D\x65\x64\x69\x61\x6E\x50\x6F\x73","\x6D\x69\x6E\x50\x61\x74\x68","\x73\x65\x74\x43\x65\x6C\x6C\x4C\x6F\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x65\x64\x69\x61\x6E\x58\x56\x61\x6C\x75\x65","\x72\x61\x6E\x6B\x4D\x65\x64\x69\x61\x6E\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x64\x57\x65\x69\x67\x68\x74\x65\x64\x56\x61\x6C\x75\x65","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x57\x69\x64\x65\x73\x74\x52\x61\x6E\x6B","\x72\x61\x6E\x6B\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x65\x64\x67\x65\x2E\x65\x64\x67\x65\x73\x20\x69\x73\x20\x6E\x75\x6C\x6C","\x41\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x63\x65\x6C\x6C\x20\x68\x61\x73\x20\x6E\x6F\x20\x62\x6F\x75\x6E\x64\x73","\x72\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E\x56\x61\x6C\x69\x64","\x4D\x41\x58\x5F\x56\x41\x4C\x55\x45","\x4F\x52\x54\x48\x4F\x47\x4F\x4E\x41\x4C","\x43\x55\x52\x56\x45","\x73\x65\x74\x45\x64\x67\x65\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x73\x50\x6F\x72\x74","\x70\x72\x6F\x63\x65\x73\x73\x52\x65\x76\x65\x72\x73\x65\x64\x45\x64\x67\x65","\x64\x65\x74\x65\x72\x6D\x69\x6E\x69\x73\x74\x69\x63","\x6D\x6F\x76\x65\x50\x61\x72\x65\x6E\x74","\x70\x61\x72\x65\x6E\x74\x42\x6F\x72\x64\x65\x72","\x69\x6E\x74\x65\x72\x48\x69\x65\x72\x61\x72\x63\x68\x79\x53\x70\x61\x63\x69\x6E\x67","\x74\x72\x61\x76\x65\x72\x73\x65\x41\x6E\x63\x65\x73\x74\x6F\x72\x73","\x65\x64\x67\x65\x73\x43\x61\x63\x68\x65","\x72\x75\x6E","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x66\x69\x6E\x64\x52\x6F\x6F\x74\x73","\x63\x6F\x6E\x63\x61\x74","\x69\x73\x56\x61\x6C\x69\x64\x41\x6E\x63\x65\x73\x74\x6F\x72","\x66\x69\x6C\x74\x65\x72\x44\x65\x73\x63\x65\x6E\x64\x61\x6E\x74\x73","\x63\x79\x63\x6C\x65\x53\x74\x61\x67\x65","\x6C\x61\x79\x65\x72\x69\x6E\x67\x53\x74\x61\x67\x65","\x63\x72\x6F\x73\x73\x69\x6E\x67\x53\x74\x61\x67\x65","\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x53\x74\x61\x67\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x64\x69\x74","\x73\x65\x74\x52\x6F\x6F\x74","\x6D\x61\x69\x6E\x74\x61\x69\x6E\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x49\x64\x73","\x70\x6F\x73\x74\x66\x69\x78","\x6E\x65\x78\x74\x49\x64","\x75\x70\x64\x61\x74\x65\x4C\x65\x76\x65\x6C","\x65\x6E\x64\x69\x6E\x67\x55\x70\x64\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x52\x6F\x6F\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x49\x64\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x49\x64\x73","\x69\x6E\x73\x65\x72\x74","\x66\x69\x6C\x74\x65\x72\x43\x65\x6C\x6C\x73","\x67\x65\x74\x44\x65\x73\x63\x65\x6E\x64\x61\x6E\x74\x73","\x72\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65\x64","\x63\x65\x6C\x6C\x41\x64\x64\x65\x64","\x69\x73\x52\x6F\x6F\x74","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x49\x64","\x73\x65\x74\x49\x64","\x69\x73\x4E\x75\x6D\x65\x72\x69\x63","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x4E\x65\x61\x72\x65\x73\x74\x43\x6F\x6D\x6D\x6F\x6E\x41\x6E\x63\x65\x73\x74\x6F\x72","\x67\x65\x74\x4F\x72\x69\x67\x69\x6E","\x50\x41\x54\x48\x5F\x53\x45\x50\x41\x52\x41\x54\x4F\x52","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x50\x61\x74\x68","\x70\x61\x72\x65\x6E\x74\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x43\x68\x69\x6C\x64\x72\x65\x6E","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x74\x65\x72\x6D\x69\x6E\x61\x6C\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x69\x6E\x73\x65\x72\x74\x45\x64\x67\x65","\x72\x65\x6D\x6F\x76\x65\x45\x64\x67\x65","\x67\x65\x74\x44\x69\x72\x65\x63\x74\x65\x64\x45\x64\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x4F\x75\x74\x67\x6F\x69\x6E\x67\x45\x64\x67\x65\x73","\x67\x65\x74\x54\x6F\x70\x6D\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x76\x61\x6C\x75\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x76\x61\x6C\x75\x65\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x6F\x6D\x65\x74\x72\x79\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x73\x74\x79\x6C\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x69\x73\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x73\x65\x74\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x76\x69\x73\x69\x62\x6C\x65\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x6D\x65\x72\x67\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x6D\x65\x72\x67\x65\x43\x68\x69\x6C\x64\x72\x65\x6E\x49\x6D\x70\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x73","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x49\x6D\x70\x6C","\x72\x65\x73\x74\x6F\x72\x65\x43\x6C\x6F\x6E\x65","\x63\x65\x6C\x6C\x43\x6C\x6F\x6E\x65\x64","\x70\x72\x65\x76\x69\x6F\x75\x73\x49\x6E\x64\x65\x78","\x69\x6E\x64\x65\x78","\x74\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x61\x74\x74\x72\x69\x62\x75\x74\x65","\x6F\x6E\x49\x6E\x69\x74","\x76\x65\x72\x74\x65\x78","\x65\x64\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x6D\x78\x54\x72\x61\x6E\x73\x69\x65\x6E\x74","\x69\x64\x20\x76\x61\x6C\x75\x65\x20\x70\x61\x72\x65\x6E\x74\x20\x73\x6F\x75\x72\x63\x65\x20\x74\x61\x72\x67\x65\x74\x20\x63\x68\x69\x6C\x64\x72\x65\x6E\x20\x65\x64\x67\x65\x73","\x73\x65\x74\x56\x65\x72\x74\x65\x78","\x73\x65\x74\x45\x64\x67\x65","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x50\x61\x72\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x49\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x6C\x6F\x6E\x65\x56\x61\x6C\x75\x65","\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x43\x4F\x4E\x54\x52\x4F\x4C\x5F\x50\x4F\x49\x4E\x54\x53","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x73\x6F\x75\x72\x63\x65\x50\x6F\x69\x6E\x74","\x74\x61\x72\x67\x65\x74\x50\x6F\x69\x6E\x74","\x73\x77\x61\x70","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x74\x61\x6E","\x70\x6F\x77","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x50\x72\x69\x6E\x74\x65\x72\x2D\x66\x72\x69\x65\x6E\x64\x6C\x79\x20\x76\x65\x72\x73\x69\x6F\x6E","\x70\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x61\x75\x74\x6F\x4F\x72\x69\x67\x69\x6E","\x70\x72\x69\x6E\x74\x4F\x76\x65\x72\x6C\x61\x79\x73","\x77\x6E\x64","\x70\x61\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x57\x69\x6E\x64\x6F\x77","\x67\x65\x74\x44\x6F\x63\x74\x79\x70\x65","\x3C\x6D\x65\x74\x61\x20\x68\x74\x74\x70\x2D\x65\x71\x75\x69\x76\x3D\x22\x58\x2D\x55\x41\x2D\x43\x6F\x6D\x70\x61\x74\x69\x62\x6C\x65\x22\x20\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x22\x49\x45\x3D\x38\x22\x3E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x4F\x76\x65\x72\x6C\x61\x79","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x77\x72\x69\x74\x65\x48\x65\x61\x64","\x3C\x62\x6F\x64\x79\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x78\x50\x61\x67\x65\x22\x3E","\x63\x72\x65\x61\x74\x65\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x41\x66\x74\x65\x72","\x61\x6C\x77\x61\x79\x73","\x6D\x78\x50\x61\x67\x65\x42\x72\x65\x61\x6B","\x67\x65\x74\x43\x6F\x76\x65\x72\x50\x61\x67\x65\x73","\x67\x65\x74\x41\x70\x70\x65\x6E\x64\x69\x63\x65\x73","\x61\x64\x64\x47\x72\x61\x70\x68\x46\x72\x61\x67\x6D\x65\x6E\x74","\x72\x65\x6E\x64\x65\x72\x50\x61\x67\x65","\x6D\x78\x50\x61\x67\x65\x2D","\x3C\x74\x69\x74\x6C\x65\x3E","\x3C\x2F\x74\x69\x74\x6C\x65\x3E","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x3E","\x40\x6D\x65\x64\x69\x61\x20\x70\x72\x69\x6E\x74\x20\x7B","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x7B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x7D","\x20\x20\x68\x72\x2E\x6D\x78\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x20\x7B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x7D","\x40\x6D\x65\x64\x69\x61\x20\x73\x63\x72\x65\x65\x6E\x20\x7B","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x7B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x41\x72\x69\x61\x6C\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x30\x70\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x73\x6F\x6C\x69\x64\x20\x31\x70\x78\x20\x64\x61\x72\x6B\x67\x72\x61\x79\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x77\x68\x69\x74\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6C\x61\x70\x73\x65\x3A\x63\x6F\x6C\x6C\x61\x70\x73\x65\x3B\x20\x7D","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x74\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x73\x6F\x6C\x69\x64\x20\x31\x70\x78\x20\x67\x72\x61\x79\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x34\x70\x78\x3B\x20\x7D","\x20\x20\x62\x6F\x64\x79\x2E\x6D\x78\x50\x61\x67\x65\x20\x7B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x67\x72\x61\x79\x3B\x20\x7D","\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x61","\x23\x6D\x78\x50\x61\x67\x65\x2D","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x49\x6E\x73\x69\x64\x65","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x73\x74\x79\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x70\x75\x74\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x70\x75\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x53\x48\x41\x50\x45","\x53\x48\x41\x50\x45\x5F\x52\x45\x43\x54\x41\x4E\x47\x4C\x45","\x53\x54\x59\x4C\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x52\x65\x63\x74\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x53\x54\x59\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x43\x33\x44\x39\x46\x46","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x36\x34\x38\x32\x42\x39","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x43\x4F\x4C\x4F\x52","\x23\x37\x37\x34\x34\x30\x30","\x53\x48\x41\x50\x45\x5F\x43\x4F\x4E\x4E\x45\x43\x54\x4F\x52","\x23\x34\x34\x36\x32\x39\x39","\x64\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78","\x70\x75\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6F\x72\x69\x67\x69\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65\x4F\x66\x66\x73\x65\x74","\x69\x6E\x76\x61\x6C\x69\x64","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x64\x65\x72","\x6F\x72\x64\x65\x72\x43\x68\x61\x6E\x67\x65\x64","\x76\x69\x73\x69\x62\x6C\x65\x53\x6F\x75\x72\x63\x65\x53\x74\x61\x74\x65","\x76\x69\x73\x69\x62\x6C\x65\x54\x61\x72\x67\x65\x74\x53\x74\x61\x74\x65","\x74\x65\x72\x6D\x69\x6E\x61\x6C\x44\x69\x73\x74\x61\x6E\x63\x65","\x73\x65\x67\x6D\x65\x6E\x74\x73","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x42\x6F\x75\x6E\x64\x73","\x73\x65\x74\x41\x62\x73\x6F\x6C\x75\x74\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x73\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x64\x6F\x6E\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x69\x73\x53\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x68\x61\x6E\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x43\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x73","\x67\x65\x74\x46\x69\x72\x73\x74\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x61\x64\x64\x43\x65\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x61\x64\x64\x65\x64","\x72\x65\x6D\x6F\x76\x65\x64","\x6D\x78\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x68\x61\x6E\x67\x65\x2E\x65\x78\x65\x63\x75\x74\x65","\x65\x6E\x74\x65\x72","\x6C\x65\x61\x76\x65","\x65\x64\x69\x74\x69\x6E\x67\x43\x65\x6C\x6C","\x74\x72\x69\x67\x67\x65\x72","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x61\x75\x74\x6F\x53\x69\x7A\x65","\x65\x6D\x70\x74\x79\x4C\x61\x62\x65\x6C\x54\x65\x78\x74","\x74\x65\x78\x74\x4E\x6F\x64\x65","\x6D\x78\x43\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x63\x6F\x6C\x73","\x32\x30","\x34","\x62\x6C\x75\x72","\x66\x6F\x63\x75\x73\x4C\x6F\x73\x74","\x6B\x65\x79\x64\x6F\x77\x6E","\x6B\x65\x79\x43\x6F\x64\x65","\x69\x73\x45\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x73\x74\x6F\x70\x45\x64\x69\x74\x69\x6E\x67","\x63\x6C\x65\x61\x72\x4F\x6E\x43\x68\x61\x6E\x67\x65","\x73\x65\x74\x4D\x6F\x64\x69\x66\x69\x65\x64","\x6B\x65\x79\x70\x72\x65\x73\x73","\x69\x73\x4C\x61\x62\x65\x6C\x43\x6C\x69\x70\x70\x65\x64","\x69\x73\x57\x72\x61\x70\x70\x69\x6E\x67","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x69\x73\x4D\x6F\x64\x69\x66\x69\x65\x64","\x69\x73\x49\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x69\x73\x48\x69\x64\x65\x4C\x61\x62\x65\x6C","\x6F\x75\x74\x6C\x69\x6E\x65","\x67\x65\x74\x45\x64\x69\x74\x6F\x72\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x56\x61\x6C\x75\x65","\x67\x65\x74\x45\x6D\x70\x74\x79\x4C\x61\x62\x65\x6C\x54\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x44\x69\x76","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x56\x61\x6C\x75\x65","\x67\x65\x74\x45\x64\x69\x74\x69\x6E\x67\x56\x61\x6C\x75\x65","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x54\x4F\x50","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x52\x49\x47\x48\x54","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x42\x4F\x54\x54\x4F\x4D","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x4C\x45\x46\x54","\x67\x65\x74\x45\x64\x69\x74\x69\x6E\x67\x43\x65\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x64\x65\x66\x61\x75\x6C\x74\x54\x65\x78\x74\x53\x68\x61\x70\x65","\x6C\x65\x67\x61\x63\x79\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x72\x65\x67\x69\x73\x74\x65\x72\x53\x68\x61\x70\x65","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x70\x65","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x53\x68\x61\x70\x65","\x6F\x72\x64\x65\x72\x65\x64","\x6B\x65\x65\x70\x45\x64\x67\x65\x73\x49\x6E\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x66\x69\x72\x73\x74\x45\x64\x67\x65","\x69\x6E\x73\x65\x72\x74\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x69\x6E\x73\x74\x61\x6C\x6C\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x67\x65\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x53\x74\x61\x74\x65\x49\x6E\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x69\x6E\x64\x50\x72\x65\x76\x69\x6F\x75\x73\x53\x74\x61\x74\x65\x49\x6E\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x72\x64\x65\x72","\x6F\x72\x64\x65\x72\x45\x64\x67\x65","\x6B\x65\x65\x70\x45\x64\x67\x65\x73\x49\x6E\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x53\x68\x61\x70\x65\x43\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x53\x68\x61\x70\x65","\x67\x65\x74\x53\x68\x61\x70\x65","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x68\x61\x70\x65","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x47\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x49\x6D\x61\x67\x65","\x70\x6F\x73\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x65\x53\x68\x61\x70\x65","\x72\x65\x73\x6F\x6C\x76\x65\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x6E\x64\x69\x63\x61\x74\x65\x64","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x67\x65\x74\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x54\x59\x4C\x45","\x53\x54\x59\x4C\x45\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x42\x41\x43\x4B\x47\x52\x4F\x55\x4E\x44\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x42\x4F\x52\x44\x45\x52\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x4F\x56\x45\x52\x46\x4C\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x41\x44\x44\x49\x4E\x47","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x4C\x61\x62\x65\x6C","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x69\x73\x4C\x61\x62\x65\x6C\x45\x76\x65\x6E\x74","\x49\x4D\x47","\x4E\x4F\x5F\x46\x4F","\x67\x65\x74\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x6F\x76\x65\x72\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C","\x67\x65\x74\x46\x6F\x6C\x64\x69\x6E\x67\x49\x6D\x61\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6E\x74\x72\x6F\x6C","\x69\x6E\x69\x74\x43\x6F\x6E\x74\x72\x6F\x6C","\x44\x49\x41\x4C\x45\x43\x54\x5F\x50\x52\x45\x46\x45\x52\x48\x54\x4D\x4C","\x69\x6E\x6E\x65\x72\x4E\x6F\x64\x65","\x69\x73\x53\x68\x61\x70\x65\x45\x76\x65\x6E\x74","\x67\x65\x73\x74\x75\x72\x65\x73\x74\x61\x72\x74","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x54\x69\x6D\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x67\x65\x73\x74\x75\x72\x65\x45\x6E\x61\x62\x6C\x65\x64","\x68\x61\x6E\x64\x6C\x65\x47\x65\x73\x74\x75\x72\x65","\x72\x65\x64\x72\x61\x77\x4C\x61\x62\x65\x6C","\x67\x65\x74\x4C\x61\x62\x65\x6C\x42\x6F\x75\x6E\x64\x73","\x69\x73\x43\x6C\x69\x70\x70\x69\x6E\x67","\x67\x65\x74\x54\x65\x78\x74\x53\x63\x61\x6C\x65","\x72\x6F\x74\x61\x74\x65\x4C\x61\x62\x65\x6C\x42\x6F\x75\x6E\x64\x73","\x72\x65\x64\x72\x61\x77\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x72\x65\x64\x72\x61\x77\x43\x6F\x6E\x74\x72\x6F\x6C","\x67\x65\x74\x43\x6F\x6E\x74\x72\x6F\x6C\x42\x6F\x75\x6E\x64\x73","\x65\x71\x75\x61\x6C\x45\x6E\x74\x72\x69\x65\x73","\x65\x71\x75\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x67\x65\x74\x50\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x67\x65\x74\x52\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x59","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x52\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x58","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x6F\x72\x74\x68\x42\x75\x66\x66\x65\x72","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x41\x4C\x4C","\x6C\x69\x6D\x69\x74\x73","\x76\x65\x72\x74\x65\x78\x53\x65\x70\x65\x72\x61\x74\x69\x6F\x6E\x73","\x72\x65\x76\x65\x72\x73\x65\x50\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x72\x6F\x75\x74\x65\x50\x61\x74\x74\x65\x72\x6E\x73","\x77\x61\x79\x50\x6F\x69\x6E\x74\x73\x31","\x64\x69\x72\x56\x65\x63\x74\x6F\x72\x73","\x54\x41\x52\x47\x45\x54\x5F\x4D\x41\x53\x4B","\x53\x4F\x55\x52\x43\x45\x5F\x4D\x41\x53\x4B","\x53\x49\x44\x45\x5F\x4D\x41\x53\x4B","\x43\x45\x4E\x54\x45\x52\x5F\x4D\x41\x53\x4B","\x76\x61\x6C\x75\x65\x73","\x70\x75\x74\x56\x61\x6C\x75\x65","\x67\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x45\x4D\x50\x54\x59\x5F\x50\x4F\x49\x4E\x54","\x75\x70\x64\x61\x74\x69\x6E\x67\x44\x6F\x63\x75\x6D\x65\x6E\x74\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x61\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x63\x61\x70\x74\x75\x72\x65\x44\x6F\x63\x75\x6D\x65\x6E\x74\x47\x65\x73\x74\x75\x72\x65","\x6F\x70\x74\x69\x6D\x69\x7A\x65\x56\x6D\x6C\x52\x65\x66\x6C\x6F\x77\x73","\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x73\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x73\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x53\x63\x61\x6C\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x65\x74\x53\x63\x61\x6C\x65","\x69\x6E\x76\x61\x6C\x69\x64\x61\x74\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x53\x74\x61\x74\x65","\x6D\x78\x47\x72\x61\x70\x68\x56\x69\x65\x77\x2E\x76\x61\x6C\x69\x64\x61\x74\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x76\x61\x6C\x69\x64\x61\x74\x65\x50\x6F\x69\x6E\x74\x73","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x75\x70\x64\x61\x74\x65\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x4F\x66\x66\x73\x65\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x4F\x66\x66\x73\x65\x74\x46\x6F\x72\x43\x65\x6C\x6C","\x75\x70\x64\x61\x74\x65\x46\x69\x78\x65\x64\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x46\x6C\x6F\x61\x74\x69\x6E\x67\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x4F\x66\x66\x73\x65\x74","\x63\x68\x69\x6C\x64\x4D\x6F\x76\x65\x64","\x69\x73\x52\x65\x6E\x64\x65\x72\x69\x6E\x67","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x46\x69\x78\x65\x64\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x72\x74","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x6F\x70\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x69\x73\x41\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x75\x70\x64\x61\x74\x65\x46\x6C\x6F\x61\x74\x69\x6E\x67\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x4E\x65\x78\x74\x50\x6F\x69\x6E\x74","\x69\x73\x4F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x53\x4F\x55\x52\x43\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x54\x41\x52\x47\x45\x54\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x53\x4F\x55\x52\x43\x45\x5F\x50\x4F\x52\x54","\x53\x54\x59\x4C\x45\x5F\x54\x41\x52\x47\x45\x54\x5F\x50\x4F\x52\x54","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x55\x54\x49\x4E\x47\x5F\x43\x45\x4E\x54\x45\x52\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x55\x54\x49\x4E\x47\x5F\x43\x45\x4E\x54\x45\x52\x5F\x59","\x67\x65\x74\x52\x65\x6C\x61\x74\x69\x76\x65\x50\x6F\x69\x6E\x74","\x72\x65\x6C\x61\x74\x69\x76\x65\x43\x63\x77","\x73\x65\x74\x52\x65\x6E\x64\x65\x72\x69\x6E\x67","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x67\x65\x74\x53\x74\x61\x74\x65\x73","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x61\x74\x65\x73","\x69\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x63\x72\x6F\x6C\x6C\x45\x76\x65\x6E\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x65\x6E\x64\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x48\x74\x6D\x6C\x50\x61\x6E\x65","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x43\x61\x6E\x76\x61\x73\x53\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C\x50\x61\x6E\x65","\x63\x6F\x6F\x72\x64\x6F\x72\x69\x67\x69\x6E","\x30\x2C\x30","\x73\x74\x61\x74\x69\x63","\x69\x73\x55\x70","\x67\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65\x46\x6F\x72\x52\x6F\x6F\x74","\x55\x50","\x44\x4F\x57\x4E","\x6D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x72\x65\x6E\x64\x65\x72\x48\x69\x6E\x74","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x45\x58\x41\x43\x54","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x46\x41\x53\x54\x45\x53\x54","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x46\x41\x53\x54\x45\x52","\x44\x49\x41\x4C\x45\x43\x54\x5F\x4D\x49\x58\x45\x44\x48\x54\x4D\x4C","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x69\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x73\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x70\x68\x56\x69\x65\x77","\x67\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x2F\x67\x72\x61\x70\x68","\x45\x4D\x50\x54\x59\x5F\x41\x52\x52\x41\x59","\x63\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x70\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x54\x69\x6D\x65\x6F\x75\x74","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x59","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x64\x65\x66\x61\x75\x6C\x74\x4F\x76\x65\x72\x6C\x61\x70","\x64\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x65\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x65\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x6D\x70\x6F\x72\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x63\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x65\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x76\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x64\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x74\x69\x6D\x65\x72\x41\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x67\x6E\x6F\x72\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x78\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x53\x69\x7A\x65","\x6D\x69\x6E\x69\x6D\x75\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x6D\x61\x78\x69\x6D\x75\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x72\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x61\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x54\x6F\x50\x72\x65\x66\x65\x72\x72\x65\x64\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x46\x61\x63\x74\x6F\x72","\x6B\x65\x65\x70\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x56\x69\x73\x69\x62\x6C\x65\x4F\x6E\x5A\x6F\x6F\x6D","\x63\x65\x6E\x74\x65\x72\x5A\x6F\x6F\x6D","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x52\x65\x73\x69\x7A\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x4D\x6F\x76\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x4C\x6F\x6F\x70","\x6D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x61\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x63\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x68\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x49\x6D\x61\x67\x65","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66","\x65\x78\x70\x61\x6E\x64\x65\x64\x49\x6D\x61\x67\x65","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66","\x77\x61\x72\x6E\x69\x6E\x67\x49\x6D\x61\x67\x65","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73\x2F\x77\x61\x72\x6E\x69\x6E\x67\x2E\x67\x69\x66","\x61\x6C\x72\x65\x61\x64\x79\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x61\x6C\x72\x65\x61\x64\x79\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x45\x78\x70\x61\x6E\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x2D\x65\x78\x70\x61\x6E\x64","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x75\x6E\x6C\x6F\x61\x64","\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x3C\x76\x3A\x67\x72\x6F\x75\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x44\x49\x53\x50\x4C\x41\x59\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x76\x3A\x67\x72\x6F\x75\x70\x3E","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x70\x72\x6F\x63\x65\x73\x73\x43\x68\x61\x6E\x67\x65","\x67\x65\x74\x52\x65\x6D\x6F\x76\x65\x64\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x6C\x65\x61\x72\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C","\x68\x6F\x6D\x65","\x61\x64\x64\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x63\x6C\x65\x61\x72\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x72\x65\x64\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x69\x73\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x65\x6C\x6C\x53\x69\x7A\x65\x55\x70\x64\x61\x74\x65\x64","\x68\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x41\x74","\x69\x73\x54\x6F\x67\x67\x6C\x65\x45\x76\x65\x6E\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x50\x61\x6E\x6E\x69\x6E\x67\x4D\x61\x6E\x61\x67\x65\x72","\x67\x65\x74\x42\x6F\x72\x64\x65\x72\x53\x69\x7A\x65\x73","\x74\x68\x69\x6E","\x6D\x65\x64\x69\x75\x6D","\x74\x68\x69\x63\x6B","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x70\x61\x64\x64\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x67\x65\x74\x50\x72\x65\x66\x65\x72\x72\x65\x64\x50\x61\x67\x65\x53\x69\x7A\x65","\x67\x65\x74\x42\x6F\x72\x64\x65\x72","\x64\x6F\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x73\x74\x50\x72\x6F\x63\x65\x73\x73\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x67\x65\x74\x49\x6D\x61\x67\x65\x46\x72\x6F\x6D\x42\x75\x6E\x64\x6C\x65\x73","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x61\x64\x64\x49\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65","\x72\x65\x6D\x6F\x76\x65\x49\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65","\x62\x61\x63\x6B","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x47\x72\x6F\x75\x70","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x65\x74\x42\x6F\x75\x6E\x64\x73\x46\x6F\x72\x47\x72\x6F\x75\x70","\x61\x64\x64\x41\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65","\x61\x64\x64\x45\x64\x67\x65","\x69\x73\x41\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64","\x67\x65\x74\x44\x65\x6C\x65\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x6E\x63\x6C\x75\x64\x65\x45\x64\x67\x65\x73","\x6E\x65\x77\x45\x64\x67\x65","\x67\x65\x74\x46\x6F\x6C\x64\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x72\x65\x63\x75\x72\x73\x65","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x73\x77\x61\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x41\x6C\x74\x65\x72\x6E\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x50\x72\x65\x66\x65\x72\x72\x65\x64\x53\x69\x7A\x65\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x45\x64\x67\x65\x73","\x69\x67\x6E\x6F\x72\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x53\x48\x41\x50\x45\x5F\x4C\x41\x42\x45\x4C","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45\x5F\x57\x49\x44\x54\x48","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45\x5F\x48\x45\x49\x47\x48\x54","\x67\x65\x74\x53\x69\x7A\x65\x46\x6F\x72\x53\x74\x72\x69\x6E\x67","\x72\x65\x73\x69\x7A\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x69\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x69\x73\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x47\x72\x61\x70\x68","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x43\x65\x6C\x6C\x43\x6F\x6E\x74\x61\x69\x6E\x6D\x65\x6E\x74\x41\x72\x65\x61","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x67\x65\x74\x4D\x61\x78\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x70","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x59","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x59","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x70\x6F\x69\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x46\x4C\x49\x50\x48","\x53\x54\x59\x4C\x45\x5F\x46\x4C\x49\x50\x56","\x69\x73\x50\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x46\x6F\x72\x50\x6F\x72\x74","\x69\x73\x43\x65\x6C\x6C\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x67\x65\x74\x43\x65\x6C\x6C\x42\x6F\x75\x6E\x64\x73","\x73\x68\x69\x66\x74\x50\x72\x65\x76\x69\x65\x77\x31","\x73\x68\x69\x66\x74\x50\x72\x65\x76\x69\x65\x77\x32","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x7A\x6F\x6F\x6D\x41\x63\x74\x75\x61\x6C","\x7A\x6F\x6F\x6D\x54\x6F","\x73\x63\x72\x6F\x6C\x6C\x52\x65\x63\x74\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x7A\x6F\x6F\x6D\x54\x6F\x52\x65\x63\x74","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x4F\x52\x54\x48\x4F\x47\x4F\x4E\x41\x4C","\x53\x65\x67\x6D\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x45\x6C\x62\x6F\x77\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x53\x69\x64\x65\x54\x6F\x53\x69\x64\x65","\x54\x6F\x70\x54\x6F\x42\x6F\x74\x74\x6F\x6D","\x45\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x4F\x72\x74\x68\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x69\x73\x4C\x6F\x6F\x70","\x69\x73\x43\x6C\x6F\x6E\x65\x45\x76\x65\x6E\x74","\x49\x53\x5F\x4D\x41\x43","\x69\x73\x4D\x65\x74\x61\x44\x6F\x77\x6E","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x65\x64\x45\x76\x65\x6E\x74","\x69\x73\x46\x6F\x72\x63\x65\x4D\x61\x72\x71\x75\x65\x65\x45\x76\x65\x6E\x74","\x76\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x41\x6C\x65\x72\x74","\x69\x73\x45\x64\x67\x65\x56\x61\x6C\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x63\x68\x65\x63\x6B","\x76\x61\x6C\x69\x64\x61\x74\x65\x45\x64\x67\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x47\x72\x61\x70\x68","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x61\x74\x74\x72","\x63\x6F\x75\x6E\x74\x45\x72\x72\x6F\x72","\x73\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x74\x6F\x53\x74\x72\x69\x6E\x67","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x73\x65\x74\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x4E\x6F\x64\x65","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x43\x75\x72\x73\x6F\x72\x46\x6F\x72\x43\x65\x6C\x6C","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x47\x52\x41\x44\x49\x45\x4E\x54\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x53\x48\x41\x50\x45","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x49\x4D\x41\x47\x45","\x73\x65\x74\x42\x6F\x72\x64\x65\x72","\x53\x48\x41\x50\x45\x5F\x53\x57\x49\x4D\x4C\x41\x4E\x45","\x69\x73\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x65\x74\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x73\x45\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x49\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x73\x65\x74\x45\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x69\x73\x43\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x73\x65\x74\x43\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x67\x65\x74\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x43\x65\x6C\x6C\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x43\x4C\x4F\x4E\x45\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x63\x61\x6E\x45\x78\x70\x6F\x72\x74\x43\x65\x6C\x6C","\x63\x61\x6E\x49\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x44\x45\x4C\x45\x54\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x69\x73\x4C\x61\x62\x65\x6C\x4D\x6F\x76\x61\x62\x6C\x65","\x67\x65\x74\x4D\x6F\x76\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x43\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x4D\x4F\x56\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x50\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x73\x65\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x69\x73\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x73\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x73\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x69\x73\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x65\x6C\x6C\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x52\x45\x53\x49\x5A\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x69\x73\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x42\x65\x6E\x64\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x42\x45\x4E\x44\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x45\x44\x49\x54\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x69\x73\x56\x61\x6C\x69\x64\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x53\x54\x59\x4C\x45\x5F\x41\x55\x54\x4F\x53\x49\x5A\x45","\x73\x65\x74\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x73\x65\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x69\x73\x41\x6C\x6C\x6F\x77\x4F\x76\x65\x72\x6C\x61\x70\x50\x61\x72\x65\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4C\x44\x41\x42\x4C\x45","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x68\x69\x74\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x43\x6F\x6E\x74\x65\x6E\x74","\x67\x65\x74\x50\x6F\x69\x6E\x74\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x73","\x67\x65\x74\x43\x65\x6C\x6C\x73\x42\x65\x79\x6F\x6E\x64","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x52\x65\x67\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x4E\x65\x78\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x50\x61\x72\x65\x6E\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x43\x68\x69\x6C\x64\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x58","\x6C\x61\x73\x74\x4D\x6F\x75\x73\x65\x58","\x6C\x61\x73\x74\x4D\x6F\x75\x73\x65\x59","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x64\x65\x73\x74\x72\x6F\x79\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70","\x68\x65\x6C\x70","\x67\x72\x61\x70\x68\x52\x65\x6E\x64\x65\x72\x48\x69\x6E\x74","\x73\x68\x6F\x77\x56\x69\x65\x77\x70\x6F\x72\x74","\x73\x69\x7A\x65\x72\x53\x69\x7A\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x68\x61\x70\x65\x2D\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x6F\x70\x74\x69\x6D\x69\x7A\x65\x53\x70\x65\x65\x64","\x69\x6D\x61\x67\x65\x2D\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x75\x70\x64\x61\x74\x65","\x70\x61\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x66\x72\x65\x73\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x72\x64\x65\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x73\x69\x7A\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x7A\x65\x72","\x73\x65\x74\x5A\x6F\x6F\x6D\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x53\x6F\x75\x72\x63\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x67\x65\x74\x4F\x75\x74\x6C\x69\x6E\x65\x4F\x66\x66\x73\x65\x74","\x73\x74\x61\x72\x74\x58","\x73\x74\x61\x72\x74\x59","\x64\x78\x30","\x64\x79\x30","\x6E","\x76\x61\x6C\x69\x64\x4E\x65\x69\x67\x68\x62\x6F\x72\x73","\x74\x79\x70\x65\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x4E\x65\x69\x67\x68\x62\x6F\x72\x73\x41\x6C\x6C\x6F\x77\x65\x64","\x63\x68\x65\x63\x6B\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x68\x65\x63\x6B\x4E\x65\x69\x67\x68\x62\x6F\x72\x73","\x63\x68\x65\x63\x6B\x54\x79\x70\x65","\x75\x6E\x64\x6F\x48\x61\x6E\x64\x6C\x65\x72","\x62\x75\x62\x62\x6C\x69\x6E\x67","\x69\x73\x42\x75\x62\x62\x6C\x69\x6E\x67","\x73\x65\x74\x42\x75\x62\x62\x6C\x69\x6E\x67","\x67\x65\x74\x4C\x61\x79\x6F\x75\x74","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x72\x65\x73\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x66\x6F\x6C\x64\x48\x61\x6E\x64\x6C\x65\x72","\x73\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x73\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x69\x73\x43\x65\x6C\x6C\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x53\x68\x69\x66\x74\x61\x62\x6C\x65","\x69\x73\x53\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x73\x65\x74\x53\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x73\x65\x74\x53\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x63\x65\x6C\x6C\x52\x65\x73\x69\x7A\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C\x73\x54\x6F\x53\x68\x69\x66\x74","\x73\x68\x69\x66\x74\x43\x65\x6C\x6C","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x61\x64\x64\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x41\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x52\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x65\x74\x41\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x52\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x41\x64\x64\x65\x64","\x72\x65\x73\x69\x7A\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x6F\x6C\x64\x42\x6F\x75\x6E\x64\x73","\x6F\x6C\x64\x53\x74\x61\x74\x65\x73","\x6F\x6C\x64\x53\x63\x61\x6C\x65","\x64\x65\x6C\x74\x61\x73","\x63\x6F\x75\x6E\x74","\x58","\x59","\x61\x64\x64\x45\x64\x67\x65\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x53\x74\x61\x74\x65","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65\x53\x74\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x68\x61\x70\x65","\x6D\x61\x78\x43\x65\x6C\x6C\x73","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65","\x63\x75\x72\x72\x65\x6E\x74\x44\x78","\x63\x75\x72\x72\x65\x6E\x74\x44\x79","\x75\x70\x64\x61\x74\x65\x43\x75\x72\x73\x6F\x72","\x73\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x44\x72\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x4F\x6E\x4D\x6F\x76\x65","\x70\x72\x65\x76\x69\x65\x77\x43\x6F\x6C\x6F\x72","\x68\x74\x6D\x6C\x50\x72\x65\x76\x69\x65\x77","\x73\x63\x61\x6C\x65\x47\x72\x69\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x4D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x4D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x73\x65\x74\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x65\x6C\x6C\x57\x61\x73\x43\x6C\x69\x63\x6B\x65\x64","\x53\x45\x4C\x45\x43\x54","\x66\x69\x72\x73\x74","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x68\x61\x70\x65","\x70\x42\x6F\x75\x6E\x64\x73","\x75\x73\x65\x47\x75\x69\x64\x65\x73\x46\x6F\x72\x45\x76\x65\x6E\x74","\x73\x65\x74\x48\x69\x67\x68\x6C\x69\x67\x68\x74\x43\x6F\x6C\x6F\x72","\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x54\x41\x52\x47\x45\x54\x5F\x43\x4F\x4C\x4F\x52","\x43\x55\x52\x53\x4F\x52\x5F\x4D\x4F\x56\x41\x42\x4C\x45\x5F\x45\x44\x47\x45","\x43\x55\x52\x53\x4F\x52\x5F\x4D\x4F\x56\x41\x42\x4C\x45\x5F\x56\x45\x52\x54\x45\x58","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x64\x65\x73\x74\x72\x6F\x79\x53\x68\x61\x70\x65\x73","\x67\x75\x69\x64\x65\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x74\x72\x69\x67\x67\x65\x72\x58","\x74\x72\x69\x67\x67\x65\x72\x59","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x63\x6C\x65\x61\x72\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4F\x6E\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77\x45\x6E\x61\x62\x6C\x65\x64","\x75\x73\x65\x47\x72\x69\x64","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x70\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x76\x61\x6C\x69\x64\x43\x6F\x6C\x6F\x72","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x69\x6E\x76\x61\x6C\x69\x64\x43\x6F\x6C\x6F\x72","\x44\x45\x46\x41\x55\x4C\x54\x5F\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x68\x6F\x74\x73\x70\x6F\x74","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x68\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x76\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x6D\x61\x72\x6B\x65\x64\x53\x74\x61\x74\x65","\x73\x65\x74\x48\x6F\x74\x73\x70\x6F\x74","\x67\x65\x74\x48\x6F\x74\x73\x70\x6F\x74","\x73\x65\x74\x48\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x48\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x68\x61\x73\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x4D\x61\x72\x6B\x65\x64\x53\x74\x61\x74\x65","\x75\x6E\x6D\x61\x72\x6B","\x70\x72\x6F\x63\x65\x73\x73","\x69\x73\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x4D\x61\x72\x6B\x65\x72\x43\x6F\x6C\x6F\x72","\x6D\x61\x72\x6B\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65\x54\x6F\x4D\x61\x72\x6B","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73\x48\x6F\x74\x73\x70\x6F\x74","\x72\x65\x73\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x68\x61\x6E\x64\x6C\x65\x72\x73","\x6D\x61\x78\x48\x61\x6E\x64\x6C\x65\x72\x73","\x6D\x6F\x76\x65\x49\x63\x6F\x6E\x46\x72\x6F\x6E\x74","\x6D\x6F\x76\x65\x49\x63\x6F\x6E\x42\x61\x63\x6B","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x6D\x61\x72\x6B\x65\x72","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x48\x61\x6E\x64\x6C\x65\x72","\x77\x61\x79\x70\x6F\x69\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x45\x6E\x61\x62\x6C\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x44\x65\x6C\x61\x79","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x49\x6E\x50\x72\x6F\x67\x72\x65\x73\x73","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x56\x61\x6C\x69\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x69\x6E\x69\x74\x69\x61\x6C\x54\x6F\x75\x63\x68\x58","\x69\x6E\x69\x74\x69\x61\x6C\x54\x6F\x75\x63\x68\x59","\x69\x67\x6E\x6F\x72\x65\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x63\x6F\x6E\x4F\x66\x66\x73\x65\x74","\x65\x64\x67\x65\x53\x74\x61\x74\x65","\x64\x72\x69\x6C\x6C\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E\x43\x6F\x75\x6E\x74\x65\x72","\x6D\x6F\x76\x65\x50\x72\x65\x76\x69\x65\x77\x41\x77\x61\x79","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x63\x6F\x6E\x53\x74\x61\x74\x65","\x69\x63\x6F\x6E\x73","\x72\x65\x64\x72\x61\x77\x49\x63\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x49\x63\x6F\x6E\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x69\x73\x4D\x6F\x76\x65\x49\x63\x6F\x6E\x54\x6F\x46\x72\x6F\x6E\x74\x46\x6F\x72\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x49\x63\x6F\x6E\x73","\x43\x55\x52\x53\x4F\x52\x5F\x43\x4F\x4E\x4E\x45\x43\x54","\x63\x75\x72\x72\x65\x6E\x74\x53\x74\x61\x74\x65","\x69\x63\x6F\x6E","\x67\x65\x74\x49\x63\x6F\x6E\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x73\x53\x74\x61\x72\x74\x45\x76\x65\x6E\x74","\x63\x75\x72\x72\x65\x6E\x74\x46\x6F\x63\x75\x73","\x63\x75\x72\x72\x65\x6E\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x73\x6F\x75\x72\x63\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x77\x61\x79\x70\x6F\x69\x6E\x74\x73","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x63\x6F\x6E","\x69\x73\x49\x6D\x6D\x65\x64\x69\x61\x74\x65\x43\x6F\x6E\x6E\x65\x63\x74\x53\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x65\x43\x75\x72\x72\x65\x6E\x74\x53\x74\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x54\x61\x72\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x67\x65\x74\x53\x6F\x75\x72\x63\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x64\x72\x61\x77\x50\x72\x65\x76\x69\x65\x77","\x75\x70\x64\x61\x74\x65\x49\x63\x6F\x6E\x73","\x69\x73\x53\x74\x6F\x70\x45\x76\x65\x6E\x74","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x57\x69\x64\x74\x68","\x67\x65\x74\x45\x64\x67\x65\x43\x6F\x6C\x6F\x72","\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x63\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x70\x6F\x69\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x70\x6F\x69\x6E\x74\x2E\x67\x69\x66","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x43\x6F\x6C\x6F\x72","\x66\x6F\x63\x75\x73\x49\x63\x6F\x6E\x73","\x66\x6F\x63\x75\x73\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x66\x6F\x63\x75\x73\x50\x6F\x69\x6E\x74\x73","\x63\x75\x72\x72\x65\x6E\x74\x46\x6F\x63\x75\x73\x41\x72\x65\x61","\x67\x65\x74\x49\x6D\x61\x67\x65\x46\x6F\x72\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x69\x73\x45\x76\x65\x6E\x74\x49\x67\x6E\x6F\x72\x65\x64","\x72\x65\x70\x61\x69\x6E\x74","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x73\x68\x61\x72\x65\x64\x44\x69\x76","\x63\x75\x72\x72\x65\x6E\x74\x58","\x63\x75\x72\x72\x65\x6E\x74\x59","\x64\x72\x61\x67\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x78\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x61\x6C\x6C\x6F\x77\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73\x43\x68\x65\x63\x6B","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x52\x61\x73\x74\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x53\x68\x61\x70\x65","\x73\x69\x7A\x65\x72\x73","\x6E\x2D\x72\x65\x73\x69\x7A\x65","\x6E\x65\x2D\x72\x65\x73\x69\x7A\x65","\x77\x2D\x72\x65\x73\x69\x7A\x65","\x65\x2D\x72\x65\x73\x69\x7A\x65","\x73\x77\x2D\x72\x65\x73\x69\x7A\x65","\x73\x2D\x72\x65\x73\x69\x7A\x65","\x73\x65\x2D\x72\x65\x73\x69\x7A\x65","\x6C\x61\x62\x65\x6C\x53\x68\x61\x70\x65","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x53\x68\x61\x70\x65","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x53\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x44\x61\x73\x68\x65\x64","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x45\x44","\x63\x72\x65\x61\x74\x65\x53\x69\x7A\x65\x72\x53\x68\x61\x70\x65","\x69\x73\x53\x69\x7A\x65\x72\x56\x69\x73\x69\x62\x6C\x65","\x52\x4F\x54\x41\x54\x49\x4F\x4E\x5F\x48\x41\x4E\x44\x4C\x45","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45","\x70\x72\x65\x76\x69\x65\x77","\x63\x75\x72\x72\x65\x6E\x74\x41\x6C\x70\x68\x61","\x61\x74\x61\x6E","\x75\x6E\x69\x6F\x6E","\x72\x6F\x74\x61\x74\x65\x43\x65\x6C\x6C","\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x62\x65\x6E\x64\x73","\x72\x65\x6D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x61\x62\x73\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x50\x6F\x69\x6E\x74\x73","\x69\x73\x41\x64\x64\x50\x6F\x69\x6E\x74\x45\x76\x65\x6E\x74","\x61\x64\x64\x50\x6F\x69\x6E\x74","\x63\x72\x65\x61\x74\x65\x42\x65\x6E\x64\x73","\x69\x6E\x69\x74\x42\x65\x6E\x64","\x43\x55\x52\x53\x4F\x52\x5F\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45","\x69\x73\x52\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74\x45\x76\x65\x6E\x74","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x45\x44","\x69\x73\x48\x61\x6E\x64\x6C\x65\x56\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x53\x68\x61\x70\x65","\x69\x73\x48\x61\x6E\x64\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x43\x55\x52\x53\x4F\x52\x5F\x42\x45\x4E\x44\x5F\x48\x41\x4E\x44\x4C\x45","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x73\x54\x61\x72\x67\x65\x74","\x69\x73\x4C\x61\x62\x65\x6C","\x63\x6C\x6F\x6E\x65\x50\x72\x65\x76\x69\x65\x77\x53\x74\x61\x74\x65","\x67\x65\x74\x53\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x74\x61\x74\x65","\x73\x65\x74\x50\x72\x65\x76\x69\x65\x77\x43\x6F\x6C\x6F\x72","\x6D\x6F\x76\x65\x4C\x61\x62\x65\x6C","\x63\x68\x61\x6E\x67\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x63\x68\x61\x6E\x67\x65\x50\x6F\x69\x6E\x74\x73","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x66\x69\x6E\x64\x4E\x65\x61\x72\x65\x73\x74\x53\x65\x67\x6D\x65\x6E\x74","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x4C\x4F\x43\x4B\x45\x44\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x72\x65\x64\x72\x61\x77\x49\x6E\x6E\x65\x72\x42\x65\x6E\x64\x73","\x66\x6C\x69\x70\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B\x4F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B\x4F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x56\x69\x72\x74\x75\x61\x6C\x42\x65\x6E\x64","\x67\x65\x74\x43\x75\x72\x73\x6F\x72\x46\x6F\x72\x42\x65\x6E\x64","\x45\x44\x47\x45\x53\x54\x59\x4C\x45\x5F\x54\x4F\x50\x54\x4F\x42\x4F\x54\x54\x4F\x4D","\x45\x44\x47\x45\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x72\x6F\x77\x2D\x72\x65\x73\x69\x7A\x65","\x63\x6F\x6C\x2D\x72\x65\x73\x69\x7A\x65","\x6E\x6F\x72\x6D\x61\x6C\x4B\x65\x79\x73","\x73\x68\x69\x66\x74\x4B\x65\x79\x73","\x63\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79\x73","\x63\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79\x73","\x6B\x65\x79\x44\x6F\x77\x6E","\x62\x69\x6E\x64\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x67\x65\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x69\x73\x47\x72\x61\x70\x68\x45\x76\x65\x6E\x74","\x68\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x73\x65\x74\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x6D\x78\x54\x6F\x6F\x6C\x74\x69\x70","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x73\x74\x61\x74\x65\x53\x6F\x75\x72\x63\x65","\x72\x65\x73\x65\x74\x54\x69\x6D\x65\x72","\x48\x49\x47\x48\x4C\x49\x47\x48\x54\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x72\x65\x70\x61\x69\x6E\x74\x48\x61\x6E\x64\x6C\x65\x72","\x6B\x65\x65\x70\x4F\x6E\x54\x6F\x70","\x64\x72\x61\x77\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x65\x64\x69\x74\x6F\x72","\x68\x69\x64\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x62\x69\x6E\x64\x41\x63\x74\x69\x6F\x6E","\x63\x6F\x6E\x66\x69\x67","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x49\x74\x65\x6D\x73","\x69\x66","\x61\x73","\x69\x63\x6F\x6E\x43\x6C\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x73\x65\x70\x61\x72\x61\x74\x6F\x72","\x6E\x6F\x63\x65\x6C\x6C","\x6E\x63\x65\x6C\x6C\x73","\x6E\x6F\x74\x52\x6F\x6F\x74","\x6E\x6F\x6E\x45\x6D\x70\x74\x79","\x65\x78\x70\x61\x6E\x64\x61\x62\x6C\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x61\x62\x6C\x65","\x76\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x65\x6D\x70\x74\x79\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x62\x61\x72","\x69\x6E\x73\x65\x72\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x2F\x73\x65\x70\x61\x72\x61\x74\x6F\x72\x2E\x67\x69\x66","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x4F\x70\x74\x69\x6F\x6E","\x73\x65\x74\x4D\x6F\x64\x65","\x61\x64\x64\x50\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x73","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x56\x61\x6C\x75\x65\x73","\x70\x6F\x70\x75\x70\x48\x61\x6E\x64\x6C\x65\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x70\x68","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x6B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x49\x53\x5F\x4C\x4F\x43\x41\x4C","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x2F\x65\x64\x69\x74\x6F\x72","\x61\x73\x6B\x5A\x6F\x6F\x6D\x52\x65\x73\x6F\x75\x72\x63\x65","\x61\x73\x6B\x5A\x6F\x6F\x6D","\x6C\x61\x73\x74\x53\x61\x76\x65\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x6C\x61\x73\x74\x53\x61\x76\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x46\x69\x6C\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x46\x69\x6C\x65","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x74\x61\x73\x6B\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x74\x61\x73\x6B\x73","\x68\x65\x6C\x70\x52\x65\x73\x6F\x75\x72\x63\x65","\x6F\x75\x74\x6C\x69\x6E\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x62\x6C\x43\x6C\x69\x63\x6B\x41\x63\x74\x69\x6F\x6E","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x52\x65\x71\x75\x69\x72\x65\x64","\x66\x6F\x72\x63\x65\x64\x49\x6E\x73\x65\x72\x74\x69\x6E\x67","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x47\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x42\x6F\x72\x64\x65\x72\x53\x69\x7A\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x6F\x73\x74\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x4E\x61\x6D\x65","\x75\x72\x6C\x50\x6F\x73\x74","\x75\x72\x6C\x49\x6D\x61\x67\x65","\x6C\x61\x79\x6F\x75\x74\x44\x69\x61\x67\x72\x61\x6D","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x53\x70\x61\x63\x69\x6E\x67","\x6D\x61\x69\x6E\x74\x61\x69\x6E\x53\x77\x69\x6D\x6C\x61\x6E\x65\x73","\x6C\x61\x79\x6F\x75\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x73","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x49\x6E\x64\x65\x78","\x74\x61\x73\x6B\x73\x57\x69\x6E\x64\x6F\x77\x49\x6D\x61\x67\x65","\x74\x61\x73\x6B\x73\x54\x6F\x70","\x68\x65\x6C\x70\x57\x69\x6E\x64\x6F\x77\x49\x6D\x61\x67\x65","\x75\x72\x6C\x48\x65\x6C\x70","\x68\x65\x6C\x70\x57\x69\x64\x74\x68","\x68\x65\x6C\x70\x48\x65\x69\x67\x68\x74","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x57\x69\x64\x74\x68","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x48\x65\x69\x67\x68\x74","\x6D\x6F\x76\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x44\x69\x61\x6C\x6F\x67","\x76\x61\x6C\x69\x64\x61\x74\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x49\x6D\x61\x67\x65","\x67\x65\x74\x55\x72\x6C\x49\x6D\x61\x67\x65","\x67\x65\x74\x56\x69\x65\x77\x58\x6D\x6C","\x5F\x62\x6C\x61\x6E\x6B","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x75\x6E\x67\x72\x6F\x75\x70","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x73\x68\x6F\x77\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x73\x65\x6C\x65\x63\x74\x4E\x6F\x6E\x65","\x74\x6F\x42\x61\x63\x6B","\x74\x6F\x46\x72\x6F\x6E\x74","\x73\x65\x6C\x65\x63\x74\x50\x72\x65\x76\x69\x6F\x75\x73","\x73\x65\x6C\x65\x63\x74\x4E\x65\x78\x74","\x73\x65\x6C\x65\x63\x74\x50\x61\x72\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x68\x69\x6C\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x41\x6C\x6C","\x65\x78\x70\x61\x6E\x64","\x65\x78\x70\x61\x6E\x64\x41\x6C\x6C","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x4C\x65\x66\x74","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x43\x65\x6E\x74\x65\x72","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x52\x69\x67\x68\x74","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x54\x6F\x70","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x4D\x69\x64\x64\x6C\x65","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x42\x6F\x74\x74\x6F\x6D","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x4C\x65\x66\x74","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x43\x65\x6E\x74\x65\x72","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x52\x69\x67\x68\x74","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x54\x6F\x70","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x4D\x69\x64\x64\x6C\x65","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x42\x6F\x74\x74\x6F\x6D","\x70\x72\x6F\x6D\x70\x74","\x74\x6F\x67\x67\x6C\x65\x54\x61\x73\x6B\x73","\x73\x68\x6F\x77\x54\x61\x73\x6B\x73","\x74\x6F\x67\x67\x6C\x65\x48\x65\x6C\x70","\x73\x68\x6F\x77\x48\x65\x6C\x70","\x74\x6F\x67\x67\x6C\x65\x4F\x75\x74\x6C\x69\x6E\x65","\x73\x68\x6F\x77\x4F\x75\x74\x6C\x69\x6E\x65","\x74\x6F\x67\x67\x6C\x65\x43\x6F\x6E\x73\x6F\x6C\x65","\x72\x65\x73\x65\x74\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x73\x65\x74\x46\x69\x72\x73\x74\x54\x69\x6D\x65","\x63\x6F\x6F\x6B\x69\x65","\x6D\x78\x67\x72\x61\x70\x68\x3D\x73\x65\x65\x6E\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D\x46\x72\x69\x2C\x20\x32\x37\x20\x4A\x75\x6C\x20\x32\x30\x30\x31\x20\x30\x32\x3A\x34\x37\x3A\x31\x31\x20\x55\x54\x43\x3B\x20\x70\x61\x74\x68\x3D\x2F","\x43\x61\x6E\x6E\x6F\x74\x20\x65\x78\x65\x63\x75\x74\x65\x20","\x3A\x20","\x43\x61\x6E\x6E\x6F\x74\x20\x66\x69\x6E\x64\x20\x61\x63\x74\x69\x6F\x6E\x20","\x61\x64\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x62\x6C\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x55\x6E\x64\x6F\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x72\x69\x6C\x6C\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x49\x6E\x73\x65\x72\x74\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x63\x72\x65\x61\x74\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x4C\x61\x79\x6F\x75\x74\x4D\x61\x6E\x61\x67\x65\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x61\x79\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x61\x79\x6F\x75\x74","\x64\x69\x61\x67\x72\x61\x6D\x4C\x61\x79\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x44\x69\x61\x67\x72\x61\x6D\x4C\x61\x79\x6F\x75\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x72\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x73\x65\x74\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x74\x6F\x4C\x6F\x63\x61\x6C\x65\x53\x74\x72\x69\x6E\x67","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x54\x69\x74\x6C\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x74\x54\x69\x74\x6C\x65","\x74\x72\x65\x65\x4C\x61\x79\x6F\x75\x74","\x20\x3E\x20","\x67\x65\x74\x52\x6F\x6F\x74\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70","\x72\x65\x61\x64\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x55\x72\x6C\x50\x6F\x73\x74","\x77\x72\x69\x74\x65\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x70\x6F\x73\x74\x44\x69\x61\x67\x72\x61\x6D","\x73\x77\x61\x70\x53\x74\x79\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x69\x73\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x56\x69\x73\x69\x62\x6C\x65","\x72\x65\x61\x64\x6F\x6E\x6C\x79","\x49\x44","\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x61\x73\x6B\x73","\x72\x65\x66\x72\x65\x73\x68\x54\x61\x73\x6B\x73","\x66\x72\x61\x6D\x65\x42\x6F\x72\x64\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x43\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x65\x64\x4D\x6F\x76\x69\x6E\x67","\x63\x6F\x64\x65\x63\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x64\x64\x41\x6C\x69\x61\x73","\x61\x6C\x69\x61\x73\x65\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x65\x6E\x63\x6F\x64\x65\x44\x65\x66\x61\x75\x6C\x74\x73","\x67\x65\x74\x4F\x62\x6A\x65\x63\x74","\x72\x65\x66\x65\x72\x65\x6E\x63\x65","\x67\x65\x74\x43\x6F\x64\x65\x63","\x69\x6D\x70\x6F\x72\x74\x4E\x6F\x64\x65","\x6D\x78\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x63\x6F\x64\x65\x63\x20\x66\x6F\x72\x20","\x43\x61\x6E\x6E\x6F\x74\x20\x64\x65\x63\x6F\x64\x65\x20","\x65\x6E\x63\x6F\x64\x65\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x64\x65\x63","\x64\x65\x63\x6F\x64\x65\x43\x65\x6C\x6C","\x69\x6E\x73\x65\x72\x74\x49\x6E\x74\x6F\x47\x72\x61\x70\x68","\x65\x78\x63\x6C\x75\x64\x65","\x69\x64\x72\x65\x66\x73","\x6D\x61\x70\x70\x69\x6E\x67","\x72\x65\x76\x65\x72\x73\x65","\x63\x6C\x6F\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x4E\x61\x6D\x65","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x69\x73\x45\x78\x63\x6C\x75\x64\x65\x64","\x69\x73\x52\x65\x66\x65\x72\x65\x6E\x63\x65","\x62\x65\x66\x6F\x72\x65\x45\x6E\x63\x6F\x64\x65","\x65\x6E\x63\x6F\x64\x65\x4F\x62\x6A\x65\x63\x74","\x61\x66\x74\x65\x72\x45\x6E\x63\x6F\x64\x65","\x65\x6E\x63\x6F\x64\x65\x56\x61\x6C\x75\x65","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x49\x44\x20\x66\x6F\x72\x20","\x77\x72\x69\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x72\x69\x74\x65\x50\x72\x69\x6D\x69\x74\x69\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x72\x69\x74\x65\x43\x6F\x6D\x70\x6C\x65\x78\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x58\x6D\x6C","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x6E\x6F\x64\x65\x20\x66\x6F\x72\x20","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x46\x72\x6F\x6D\x58\x6D\x6C","\x62\x65\x66\x6F\x72\x65\x44\x65\x63\x6F\x64\x65","\x64\x65\x63\x6F\x64\x65\x4E\x6F\x64\x65","\x61\x66\x74\x65\x72\x44\x65\x63\x6F\x64\x65","\x64\x65\x63\x6F\x64\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x63\x6F\x64\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x64\x65\x63\x6F\x64\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x64\x65\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x6F\x62\x6A\x65\x63\x74\x20\x66\x6F\x72\x20","\x70\x72\x6F\x63\x65\x73\x73\x49\x6E\x63\x6C\x75\x64\x65","\x64\x65\x63\x6F\x64\x65\x43\x68\x69\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x64\x64\x4F\x62\x6A\x65\x63\x74\x56\x61\x6C\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x72\x65\x6D\x6F\x76\x65\x57\x68\x69\x74\x65\x73\x70\x61\x63\x65","\x64\x65\x63\x6F\x64\x65\x52\x6F\x6F\x74","\x67\x72\x61\x70\x68\x4C\x69\x73\x74\x65\x6E\x65\x72\x73\x20\x65\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72\x73\x20\x76\x69\x65\x77\x20\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x20\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72\x20\x65\x64\x69\x74\x6F\x72\x20\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x6C\x61\x79\x65\x72","\x67\x65\x74\x53\x74\x72\x69\x6E\x67\x56\x61\x6C\x75\x65","\x6D\x78\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x43\x6F\x64\x65\x63\x2E\x64\x65\x63\x6F\x64\x65\x3A\x20\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x64","\x70\x72\x65\x73\x73\x65\x64\x49\x63\x6F\x6E","\x6D\x6F\x64\x65","\x74\x6F\x67\x67\x6C\x65","\x2D\x2D\x2D","\x63\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6D\x6F\x64\x69\x66\x69\x65\x64\x20\x6C\x61\x73\x74\x53\x6E\x61\x70\x73\x68\x6F\x74\x20\x69\x67\x6E\x6F\x72\x65\x64\x43\x68\x61\x6E\x67\x65\x73\x20\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72\x20\x67\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x20\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x41\x72\x72\x61\x79","\x64\x65\x63\x6F\x64\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x75\x69","\x64\x65\x63\x6F\x64\x65\x55\x69","\x73\x65\x74\x4D\x61\x70\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x72\x65\x73\x6F\x75\x72\x63\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65"];var mxClient={VERSION:_0xb59f[0],IS_IE:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[1]),IS_IE6:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[4]),IS_QUIRKS:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[1])&&(null==document[_0xb59f[5]]||5==document[_0xb59f[5]]),VML_PREFIX:_0xb59f[6],OFFICE_PREFIX:_0xb59f[7],IS_NS:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[8])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[1]),IS_OP:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[9]),IS_OT:0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[10])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[11])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[12])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[13])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[14])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[15]),IS_SF:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[16])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[17]),IS_GC:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[17]),IS_MT:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[18])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[19])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[20])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[21])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[22])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[23])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[24])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[25])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[26])&&0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[27]),IS_SVG:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[18])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[21])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[28])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[26])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[29])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[30])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[16])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[31])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[9]),NO_FO:0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[19])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[22])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[20])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[23])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[25])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[27])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[32])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[33])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[9])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[1])||0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[34]),IS_VML:_0xb59f[35]==navigator[_0xb59f[37]][_0xb59f[36]](),IS_MAC:0<navigator[_0xb59f[3]][_0xb59f[36]]()[_0xb59f[2]](_0xb59f[38]),IS_TOUCH:0<navigator[_0xb59f[3]][_0xb59f[36]]()[_0xb59f[2]](_0xb59f[39])||0<navigator[_0xb59f[3]][_0xb59f[36]]()[_0xb59f[2]](_0xb59f[40])||0<navigator[_0xb59f[3]][_0xb59f[36]]()[_0xb59f[2]](_0xb59f[41])||0<navigator[_0xb59f[3]][_0xb59f[36]]()[_0xb59f[2]](_0xb59f[42]),IS_LOCAL:0>document[_0xb59f[45]][_0xb59f[44]][_0xb59f[2]](_0xb59f[43])&&0>document[_0xb59f[45]][_0xb59f[44]][_0xb59f[2]](_0xb59f[46]),isBrowserSupported:function(){return mxClient[_0xb59f[47]]||mxClient[_0xb59f[48]]},link:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=_0x6b6cx4||document;if(mxClient[_0xb59f[49]]){_0x6b6cx4[_0xb59f[53]](_0xb59f[50]+_0x6b6cx2+_0xb59f[51]+_0x6b6cx3+_0xb59f[52])}else {var _0x6b6cx5=_0x6b6cx4[_0xb59f[55]](_0xb59f[54]);_0x6b6cx5[_0xb59f[57]](_0xb59f[56],_0x6b6cx2);_0x6b6cx5[_0xb59f[57]](_0xb59f[44],_0x6b6cx3);_0x6b6cx5[_0xb59f[57]](_0xb59f[58],_0xb59f[59]);_0x6b6cx5[_0xb59f[57]](_0xb59f[60],_0xb59f[61]);_0x6b6cx4[_0xb59f[64]](_0xb59f[63])[0][_0xb59f[62]](_0x6b6cx5)}},include:function(_0x6b6cx2){document[_0xb59f[53]](_0xb59f[65]+_0x6b6cx2+_0xb59f[66])},dispose:function(){for(var _0x6b6cx2=0;_0x6b6cx2<mxEvent[_0xb59f[68]][_0xb59f[67]];_0x6b6cx2++){null!=mxEvent[_0xb59f[68]][_0x6b6cx2][_0xb59f[69]]&&mxEvent[_0xb59f[70]](mxEvent[_0xb59f[68]][_0x6b6cx2])}}};mxClient[_0xb59f[71]]&&mxClient[_0xb59f[72]]?mxClient[_0xb59f[73]]=_0xb59f[74]:mxClient[_0xb59f[75]]||mxClient[_0xb59f[76]]?mxClient[_0xb59f[73]]=_0xb59f[77]:mxClient[_0xb59f[78]]?mxClient[_0xb59f[73]]=_0xb59f[79]:mxClient[_0xb59f[80]]&&9<=document[_0xb59f[5]]&&(mxClient[_0xb59f[73]]=_0xb59f[81]);_0xb59f[82]== typeof mxLoadResources&&(mxLoadResources= !0);_0xb59f[82]== typeof mxResourceExtension&&(mxResourceExtension=_0xb59f[83]);_0xb59f[82]== typeof mxLoadStylesheets&&(mxLoadStylesheets= !0);_0xb59f[82]!= typeof mxBasePath&&0<mxBasePath[_0xb59f[67]]?(_0xb59f[84]==mxBasePath[_0xb59f[85]](mxBasePath[_0xb59f[67]]-1)&&(mxBasePath=mxBasePath[_0xb59f[85]](0,mxBasePath[_0xb59f[67]]-1)),mxClient[_0xb59f[86]]=mxBasePath):mxClient[_0xb59f[86]]=_0xb59f[87];_0xb59f[82]!= typeof mxImageBasePath&&0<mxImageBasePath[_0xb59f[67]]?(_0xb59f[84]==mxImageBasePath[_0xb59f[85]](mxImageBasePath[_0xb59f[67]]-1)&&(mxImageBasePath=mxImageBasePath[_0xb59f[85]](0,mxImageBasePath[_0xb59f[67]]-1)),mxClient[_0xb59f[88]]=mxImageBasePath):mxClient[_0xb59f[88]]=mxClient[_0xb59f[86]]+_0xb59f[89];mxClient[_0xb59f[90]]=_0xb59f[82]!= typeof mxLanguage?mxLanguage:mxClient[_0xb59f[80]]?navigator[_0xb59f[91]]:navigator[_0xb59f[90]];mxClient[_0xb59f[92]]=_0xb59f[82]!= typeof mxDefaultLanguage?mxDefaultLanguage:_0xb59f[93];mxLoadStylesheets&&mxClient[_0xb59f[54]](_0xb59f[94],mxClient[_0xb59f[86]]+_0xb59f[95]);_0xb59f[82]!= typeof mxLanguages&&(mxClient[_0xb59f[96]]=mxLanguages);if(mxClient[_0xb59f[80]]){if(9<=document[_0xb59f[5]]){mxClient[_0xb59f[47]]= !1,mxClient[_0xb59f[48]]= !0}else {8==document[_0xb59f[5]]?(document[_0xb59f[100]][_0xb59f[99]](mxClient.VML_PREFIX,_0xb59f[97],_0xb59f[98]),document[_0xb59f[100]][_0xb59f[99]](mxClient.OFFICE_PREFIX,_0xb59f[101],_0xb59f[98])):(document[_0xb59f[100]][_0xb59f[99]](mxClient.VML_PREFIX,_0xb59f[97]),document[_0xb59f[100]][_0xb59f[99]](mxClient.OFFICE_PREFIX,_0xb59f[101]));var ss=document[_0xb59f[102]]();ss[_0xb59f[103]]=_0xb59f[104];mxLoadStylesheets&&mxClient[_0xb59f[54]](_0xb59f[94],mxClient[_0xb59f[86]]+_0xb59f[105])};window[_0xb59f[108]](_0xb59f[106],mxClient[_0xb59f[107]])};var mxLog={consoleName:_0xb59f[109],TRACE:!1,DEBUG:!0,WARN:!0,buffer:_0xb59f[110],init:function(){if(null==mxLog[_0xb59f[111]]&&null!=document[_0xb59f[112]]){var _0x6b6cx2=mxLog[_0xb59f[113]]+_0xb59f[114]+mxClient[_0xb59f[115]],_0x6b6cx3=document[_0xb59f[55]](_0xb59f[116]);_0x6b6cx3[_0xb59f[57]](_0xb59f[117],_0xb59f[118]);_0x6b6cx3[_0xb59f[57]](_0xb59f[119],_0xb59f[118]);var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[120]),_0x6b6cx5=document[_0xb59f[55]](_0xb59f[121]),_0x6b6cx9=document[_0xb59f[55]](_0xb59f[122]);_0x6b6cx9[_0xb59f[124]][_0xb59f[123]]=_0xb59f[125];mxLog[_0xb59f[126]]=document[_0xb59f[55]](_0xb59f[126]);mxLog[_0xb59f[126]][_0xb59f[57]](_0xb59f[127],_0xb59f[128]);mxLog[_0xb59f[126]][_0xb59f[124]][_0xb59f[119]]=_0xb59f[118];mxLog[_0xb59f[126]][_0xb59f[124]][_0xb59f[129]]=_0xb59f[130];mxLog[_0xb59f[126]][_0xb59f[131]]=mxLog[_0xb59f[132]];mxLog[_0xb59f[126]][_0xb59f[124]][_0xb59f[117]]=mxClient[_0xb59f[133]]&&_0xb59f[134]!=document[_0xb59f[135]]?_0xb59f[136]:_0xb59f[118];_0x6b6cx9[_0xb59f[62]](mxLog[_0xb59f[126]]);_0x6b6cx5[_0xb59f[62]](_0x6b6cx9);_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);_0x6b6cx5=document[_0xb59f[55]](_0xb59f[121]);mxLog[_0xb59f[122]]=document[_0xb59f[55]](_0xb59f[122]);mxLog[_0xb59f[122]][_0xb59f[124]][_0xb59f[123]]=_0xb59f[125];mxLog[_0xb59f[122]][_0xb59f[57]](_0xb59f[119],_0xb59f[137]);_0x6b6cx5[_0xb59f[62]](mxLog[_0xb59f[122]]);_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);_0x6b6cx3[_0xb59f[62]](_0x6b6cx4);mxLog[_0xb59f[140]](_0xb59f[138],function(_0x6b6cx2){mxLog[_0xb59f[139]]()});mxLog[_0xb59f[140]](_0xb59f[141],function(_0x6b6cx2){_0x6b6cx2=mxUtils[_0xb59f[142]](document[_0xb59f[112]]);mxLog[_0xb59f[143]](_0x6b6cx2)});mxLog[_0xb59f[140]](_0xb59f[144],function(_0x6b6cx2){mxLog[_0xb59f[145]]=!mxLog[_0xb59f[145]];mxLog[_0xb59f[145]]?mxLog[_0xb59f[143]](_0xb59f[146]):mxLog[_0xb59f[143]](_0xb59f[147])});mxLog[_0xb59f[140]](_0xb59f[148],function(_0x6b6cx2){try{mxUtils[_0xb59f[149]](mxLog[_0xb59f[126]][_0xb59f[131]])}catch(_0x6b6cx3){mxUtils[_0xb59f[150]](_0x6b6cx3)}});mxLog[_0xb59f[140]](_0xb59f[151],function(_0x6b6cx2){try{mxUtils[_0xb59f[152]](mxLog[_0xb59f[126]][_0xb59f[131]])}catch(_0x6b6cx3){mxUtils[_0xb59f[150]](_0x6b6cx3)}});mxLog[_0xb59f[140]](_0xb59f[153],function(_0x6b6cx2){mxLog[_0xb59f[126]][_0xb59f[131]]=_0xb59f[110]});_0x6b6cx5=_0x6b6cx4=0;_0xb59f[154]=== typeof window[_0xb59f[155]]?(_0x6b6cx4=window[_0xb59f[156]],_0x6b6cx5=window[_0xb59f[155]]):(_0x6b6cx4=document[_0xb59f[158]][_0xb59f[157]]||document[_0xb59f[112]][_0xb59f[157]],_0x6b6cx5=document[_0xb59f[112]][_0xb59f[159]]);mxLog[_0xb59f[111]]= new mxWindow(_0x6b6cx2,_0x6b6cx3,Math[_0xb59f[160]](0,_0x6b6cx5-320),Math[_0xb59f[160]](0,_0x6b6cx4-210),300,160);mxLog[_0xb59f[111]][_0xb59f[161]](!0);mxLog[_0xb59f[111]][_0xb59f[162]](!1);mxLog[_0xb59f[111]][_0xb59f[163]](!0);mxLog[_0xb59f[111]][_0xb59f[164]](!0);mxLog[_0xb59f[111]][_0xb59f[165]]= !1;if((mxClient[_0xb59f[133]]||mxClient[_0xb59f[80]])&&!mxClient[_0xb59f[76]]&&!mxClient[_0xb59f[75]]&&_0xb59f[134]!=document[_0xb59f[135]]){var _0x6b6cxa=mxLog[_0xb59f[111]][_0xb59f[166]](),_0x6b6cx2=function(_0x6b6cx2,_0x6b6cx3){mxLog[_0xb59f[126]][_0xb59f[124]][_0xb59f[119]]=Math[_0xb59f[160]](0,_0x6b6cxa[_0xb59f[167]]-70)+_0xb59f[168]};mxLog[_0xb59f[111]][_0xb59f[169]](mxEvent.RESIZE_END,_0x6b6cx2);mxLog[_0xb59f[111]][_0xb59f[169]](mxEvent.MAXIMIZE,_0x6b6cx2);mxLog[_0xb59f[111]][_0xb59f[169]](mxEvent.NORMALIZE,_0x6b6cx2);mxLog[_0xb59f[126]][_0xb59f[124]][_0xb59f[119]]=_0xb59f[170]}}},info:function(){mxLog[_0xb59f[171]](mxUtils.toString(navigator))},addButton:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[172]);mxUtils[_0xb59f[53]](_0x6b6cx4,_0x6b6cx2);mxEvent[_0xb59f[169]](_0x6b6cx4,_0xb59f[173],_0x6b6cx3);mxLog[_0xb59f[122]][_0xb59f[62]](_0x6b6cx4)},isVisible:function(){return null!=mxLog[_0xb59f[111]]?mxLog[_0xb59f[111]][_0xb59f[174]]():!1},show:function(){mxLog[_0xb59f[175]](!0)},setVisible:function(_0x6b6cx2){null==mxLog[_0xb59f[111]]&&mxLog[_0xb59f[176]]();null!=mxLog[_0xb59f[111]]&&mxLog[_0xb59f[111]][_0xb59f[175]](_0x6b6cx2)},enter:function(_0x6b6cx2){if(mxLog[_0xb59f[145]]){return mxLog[_0xb59f[171]](_0xb59f[177]+_0x6b6cx2),( new Date)[_0xb59f[178]]()}},leave:function(_0x6b6cx2,_0x6b6cx3){if(mxLog[_0xb59f[145]]){var _0x6b6cx4=0!=_0x6b6cx3?_0xb59f[179]+(( new Date)[_0xb59f[178]]()-_0x6b6cx3)+_0xb59f[180]:_0xb59f[110];mxLog[_0xb59f[171]](_0xb59f[181]+_0x6b6cx2+_0x6b6cx4)}},debug:function(){mxLog[_0xb59f[182]]&&mxLog[_0xb59f[171]][_0xb59f[183]](this,arguments)},warn:function(){mxLog[_0xb59f[184]]&&mxLog[_0xb59f[171]][_0xb59f[183]](this,arguments)},write:function(){for(var _0x6b6cx2=_0xb59f[110],_0x6b6cx3=0;_0x6b6cx3<arguments[_0xb59f[67]];_0x6b6cx3++){_0x6b6cx2+=arguments[_0x6b6cx3],_0x6b6cx3<arguments[_0xb59f[67]]-1&&(_0x6b6cx2+=_0xb59f[185])};null!=mxLog[_0xb59f[126]]?(mxLog[_0xb59f[126]][_0xb59f[131]]+=_0x6b6cx2,0<=navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[186])&&(mxLog[_0xb59f[126]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],mxLog[_0xb59f[126]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189]),mxLog[_0xb59f[126]][_0xb59f[190]]=mxLog[_0xb59f[126]][_0xb59f[191]]):mxLog[_0xb59f[132]]+=_0x6b6cx2},writeln:function(){for(var _0x6b6cx2=_0xb59f[110],_0x6b6cx3=0;_0x6b6cx3<arguments[_0xb59f[67]];_0x6b6cx3++){_0x6b6cx2+=arguments[_0x6b6cx3],_0x6b6cx3<arguments[_0xb59f[67]]-1&&(_0x6b6cx2+=_0xb59f[185])};mxLog[_0xb59f[53]](_0x6b6cx2+_0xb59f[192])}},mxObjectIdentity={FIELD_NAME:_0xb59f[193],counter:0,get:function(_0x6b6cx2){if(_0xb59f[194]== typeof _0x6b6cx2&&null==_0x6b6cx2[mxObjectIdentity[_0xb59f[195]]]){var _0x6b6cx3=mxUtils[_0xb59f[197]](_0x6b6cx2[_0xb59f[196]]);_0x6b6cx2[mxObjectIdentity[_0xb59f[195]]]=_0x6b6cx3+_0xb59f[198]+mxObjectIdentity[_0xb59f[199]]++};return _0x6b6cx2[mxObjectIdentity[_0xb59f[195]]]},clear:function(_0x6b6cx2){_0xb59f[194]== typeof _0x6b6cx2&& delete _0x6b6cx2[mxObjectIdentity[_0xb59f[195]]]}};function mxDictionary(){this[_0xb59f[200]]()}mxDictionary[_0xb59f[202]][_0xb59f[201]]=null;mxDictionary[_0xb59f[202]][_0xb59f[200]]=function(){this[_0xb59f[201]]={}};mxDictionary[_0xb59f[202]][_0xb59f[203]]=function(_0x6b6cx2){_0x6b6cx2=mxObjectIdentity[_0xb59f[203]](_0x6b6cx2);return this[_0xb59f[201]][_0x6b6cx2]};mxDictionary[_0xb59f[202]][_0xb59f[204]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=mxObjectIdentity[_0xb59f[203]](_0x6b6cx2),_0x6b6cx5=this[_0xb59f[201]][_0x6b6cx4];this[_0xb59f[201]][_0x6b6cx4]=_0x6b6cx3;return _0x6b6cx5};mxDictionary[_0xb59f[202]][_0xb59f[205]]=function(_0x6b6cx2){_0x6b6cx2=mxObjectIdentity[_0xb59f[203]](_0x6b6cx2);var _0x6b6cx3=this[_0xb59f[201]][_0x6b6cx2];delete this[_0xb59f[201]][_0x6b6cx2];return _0x6b6cx3};mxDictionary[_0xb59f[202]][_0xb59f[206]]=function(){var _0x6b6cx2=[],_0x6b6cx3;for(_0x6b6cx3 in this[_0xb59f[201]]){_0x6b6cx2[_0xb59f[207]](_0x6b6cx3)};return _0x6b6cx2};mxDictionary[_0xb59f[202]][_0xb59f[208]]=function(){var _0x6b6cx2=[],_0x6b6cx3;for(_0x6b6cx3 in this[_0xb59f[201]]){_0x6b6cx2[_0xb59f[207]](this[_0xb59f[201]][_0x6b6cx3])};return _0x6b6cx2};mxDictionary[_0xb59f[202]][_0xb59f[209]]=function(_0x6b6cx2){for(var _0x6b6cx3 in this[_0xb59f[201]]){_0x6b6cx2(_0x6b6cx3,this[_0xb59f[201]][_0x6b6cx3])}};var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(_0x6b6cx2){return null!=mxClient[_0xb59f[96]]?0<=mxUtils[_0xb59f[2]](mxClient[_0xb59f[96]],_0x6b6cx2):!0},getDefaultBundle:function(_0x6b6cx2,_0x6b6cx3){return mxResources[_0xb59f[210]]||!mxResources[_0xb59f[211]](_0x6b6cx3)?_0x6b6cx2+mxResources[_0xb59f[212]]:null},getSpecialBundle:function(_0x6b6cx2,_0x6b6cx3){if(null==mxClient[_0xb59f[96]]||!this[_0xb59f[211]](_0x6b6cx3)){var _0x6b6cx4=_0x6b6cx3[_0xb59f[2]](_0xb59f[213]);0<_0x6b6cx4&&(_0x6b6cx3=_0x6b6cx3[_0xb59f[85]](0,_0x6b6cx4))};return mxResources[_0xb59f[214]]&&mxResources[_0xb59f[211]](_0x6b6cx3)&&_0x6b6cx3!=mxClient[_0xb59f[92]]?_0x6b6cx2+_0xb59f[215]+_0x6b6cx3+mxResources[_0xb59f[212]]:null},add:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:mxClient[_0xb59f[90]][_0xb59f[216]]();if(_0x6b6cx3!=mxConstants[_0xb59f[217]]){var _0x6b6cx4=mxResources[_0xb59f[218]](_0x6b6cx2,_0x6b6cx3);if(null!=_0x6b6cx4){try{var _0x6b6cx5=mxUtils[_0xb59f[219]](_0x6b6cx4);_0x6b6cx5[_0xb59f[220]]()&&mxResources[_0xb59f[222]](_0x6b6cx5[_0xb59f[221]]())}catch(e){}};_0x6b6cx4=mxResources[_0xb59f[223]](_0x6b6cx2,_0x6b6cx3);if(null!=_0x6b6cx4){try{_0x6b6cx5=mxUtils[_0xb59f[219]](_0x6b6cx4),_0x6b6cx5[_0xb59f[220]]()&&mxResources[_0xb59f[222]](_0x6b6cx5[_0xb59f[221]]())}catch(f){}}}},parse:function(_0x6b6cx2){if(null!=_0x6b6cx2){_0x6b6cx2=_0x6b6cx2[_0xb59f[224]](_0xb59f[192]);for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3++){if(_0xb59f[198]!=_0x6b6cx2[_0x6b6cx3][_0xb59f[225]](0)){var _0x6b6cx4=_0x6b6cx2[_0x6b6cx3][_0xb59f[2]](_0xb59f[226]);if(0<_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0x6b6cx3][_0xb59f[85]](0,_0x6b6cx4),_0x6b6cx9=_0x6b6cx2[_0x6b6cx3][_0xb59f[67]];13==_0x6b6cx2[_0x6b6cx3][_0xb59f[227]](_0x6b6cx9-1)&&_0x6b6cx9--;_0x6b6cx4=_0x6b6cx2[_0x6b6cx3][_0xb59f[85]](_0x6b6cx4+1,_0x6b6cx9);this[_0xb59f[228]]?(_0x6b6cx4=_0x6b6cx4[_0xb59f[230]](/\\(?=u[a-fA-F\d]{4})/g,_0xb59f[229]),mxResources[_0xb59f[231]][_0x6b6cx5]=unescape(_0x6b6cx4)):mxResources[_0xb59f[231]][_0x6b6cx5]=_0x6b6cx4}}}}},get:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=mxResources[_0xb59f[231]][_0x6b6cx2];null==_0x6b6cx2&&(_0x6b6cx2=_0x6b6cx4);if(null!=_0x6b6cx2&&null!=_0x6b6cx3){_0x6b6cx4=[];for(var _0x6b6cx5=null,_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx2[_0xb59f[225]](_0x6b6cx9);_0xb59f[232]==_0x6b6cxa?_0x6b6cx5=_0xb59f[110]:null!=_0x6b6cx5&&_0xb59f[233]==_0x6b6cxa?(_0x6b6cx5=parseInt(_0x6b6cx5)-1,0<=_0x6b6cx5&&_0x6b6cx5<_0x6b6cx3[_0xb59f[67]]&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx3[_0x6b6cx5]),_0x6b6cx5=null):null!=_0x6b6cx5?_0x6b6cx5+=_0x6b6cxa:_0x6b6cx4[_0xb59f[207]](_0x6b6cxa)};_0x6b6cx2=_0x6b6cx4[_0xb59f[234]](_0xb59f[110])};return _0x6b6cx2}};function mxPoint(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[235]]=null!=_0x6b6cx2?_0x6b6cx2:0;this[_0xb59f[236]]=null!=_0x6b6cx3?_0x6b6cx3:0}mxPoint[_0xb59f[202]][_0xb59f[235]]=null;mxPoint[_0xb59f[202]][_0xb59f[236]]=null;mxPoint[_0xb59f[202]][_0xb59f[237]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[235]]==this[_0xb59f[235]]&&_0x6b6cx2[_0xb59f[236]]==this[_0xb59f[236]]};mxPoint[_0xb59f[202]][_0xb59f[238]]=function(){return mxUtils[_0xb59f[238]](this)};function mxRectangle(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxPoint[_0xb59f[239]](this,_0x6b6cx2,_0x6b6cx3);this[_0xb59f[117]]=null!=_0x6b6cx4?_0x6b6cx4:0;this[_0xb59f[119]]=null!=_0x6b6cx5?_0x6b6cx5:0}mxRectangle[_0xb59f[202]]= new mxPoint;mxRectangle[_0xb59f[202]][_0xb59f[196]]=mxRectangle;mxRectangle[_0xb59f[202]][_0xb59f[117]]=null;mxRectangle[_0xb59f[202]][_0xb59f[119]]=null;mxRectangle[_0xb59f[202]][_0xb59f[240]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[235]]=_0x6b6cx2;this[_0xb59f[236]]=_0x6b6cx3;this[_0xb59f[117]]=_0x6b6cx4;this[_0xb59f[119]]=_0x6b6cx5};mxRectangle[_0xb59f[202]][_0xb59f[241]]=function(){return this[_0xb59f[235]]+this[_0xb59f[117]]/2};mxRectangle[_0xb59f[202]][_0xb59f[242]]=function(){return this[_0xb59f[236]]+this[_0xb59f[119]]/2};mxRectangle[_0xb59f[202]][_0xb59f[99]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=Math[_0xb59f[243]](this[_0xb59f[235]],_0x6b6cx2[_0xb59f[235]]),_0x6b6cx4=Math[_0xb59f[243]](this[_0xb59f[236]],_0x6b6cx2[_0xb59f[236]]),_0x6b6cx5=Math[_0xb59f[160]](this[_0xb59f[235]]+this[_0xb59f[117]],_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]);_0x6b6cx2=Math[_0xb59f[160]](this[_0xb59f[236]]+this[_0xb59f[119]],_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]);this[_0xb59f[235]]=_0x6b6cx3;this[_0xb59f[236]]=_0x6b6cx4;this[_0xb59f[117]]=_0x6b6cx5-_0x6b6cx3;this[_0xb59f[119]]=_0x6b6cx2-_0x6b6cx4}};mxRectangle[_0xb59f[202]][_0xb59f[244]]=function(_0x6b6cx2){this[_0xb59f[235]]-=_0x6b6cx2;this[_0xb59f[236]]-=_0x6b6cx2;this[_0xb59f[117]]+=2*_0x6b6cx2;this[_0xb59f[119]]+=2*_0x6b6cx2};mxRectangle[_0xb59f[202]][_0xb59f[245]]=function(){return  new mxPoint(this[_0xb59f[235]],this[_0xb59f[236]])};mxRectangle[_0xb59f[202]][_0xb59f[237]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[235]]==this[_0xb59f[235]]&&_0x6b6cx2[_0xb59f[236]]==this[_0xb59f[236]]&&_0x6b6cx2[_0xb59f[117]]==this[_0xb59f[117]]&&_0x6b6cx2[_0xb59f[119]]==this[_0xb59f[119]]};var mxEffects={animateChanges:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=0,_0x6b6cx9=function(){for(var _0x6b6cx12=!1,_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx3[_0xb59f[67]];_0x6b6cx13++){var _0x6b6cx14=_0x6b6cx3[_0x6b6cx13];if(_0x6b6cx14 instanceof mxGeometryChange||_0x6b6cx14 instanceof mxTerminalChange||_0x6b6cx14 instanceof mxValueChange||_0x6b6cx14 instanceof mxChildChange||_0x6b6cx14 instanceof mxStyleChange){var _0x6b6cx15=_0x6b6cx2[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx14[_0xb59f[246]]||_0x6b6cx14[_0xb59f[247]],!1);if(null!=_0x6b6cx15){if(_0x6b6cx12= !0,_0x6b6cx14[_0xb59f[196]]!=mxGeometryChange||_0x6b6cx2[_0xb59f[251]][_0xb59f[250]](_0x6b6cx14[_0xb59f[246]])){mxUtils[_0xb59f[254]](_0x6b6cx15[_0xb59f[253]][_0xb59f[252]],100*_0x6b6cx5/10)}else {var _0x6b6cx16=_0x6b6cx2[_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx17=(_0x6b6cx14[_0xb59f[256]][_0xb59f[235]]-_0x6b6cx14[_0xb59f[257]][_0xb59f[235]])*_0x6b6cx16,_0x6b6cx18=(_0x6b6cx14[_0xb59f[256]][_0xb59f[236]]-_0x6b6cx14[_0xb59f[257]][_0xb59f[236]])*_0x6b6cx16,_0x6b6cx19=(_0x6b6cx14[_0xb59f[256]][_0xb59f[117]]-_0x6b6cx14[_0xb59f[257]][_0xb59f[117]])*_0x6b6cx16,_0x6b6cx16=(_0x6b6cx14[_0xb59f[256]][_0xb59f[119]]-_0x6b6cx14[_0xb59f[257]][_0xb59f[119]])*_0x6b6cx16;0==_0x6b6cx5?(_0x6b6cx15[_0xb59f[235]]-=_0x6b6cx17,_0x6b6cx15[_0xb59f[236]]-=_0x6b6cx18,_0x6b6cx15[_0xb59f[117]]-=_0x6b6cx19,_0x6b6cx15[_0xb59f[119]]-=_0x6b6cx16):(_0x6b6cx15[_0xb59f[235]]+=_0x6b6cx17/10,_0x6b6cx15[_0xb59f[236]]+=_0x6b6cx18/10,_0x6b6cx15[_0xb59f[117]]+=_0x6b6cx19/10,_0x6b6cx15[_0xb59f[119]]+=_0x6b6cx16/10);_0x6b6cx2[_0xb59f[259]][_0xb59f[258]](_0x6b6cx15);mxEffects[_0xb59f[260]](_0x6b6cx2,_0x6b6cx14[_0xb59f[246]],100*_0x6b6cx5/10)}}}};10>_0x6b6cx5&&_0x6b6cx12?(_0x6b6cx5++,window[_0xb59f[261]](_0x6b6cx9,_0x6b6cxa)):null!=_0x6b6cx4&&_0x6b6cx4()},_0x6b6cxa=30;_0x6b6cx9()},cascadeOpacity:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){for(var _0x6b6cx5=_0x6b6cx2[_0xb59f[251]][_0xb59f[262]](_0x6b6cx3),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx2[_0xb59f[251]][_0xb59f[263]](_0x6b6cx3,_0x6b6cx9),_0x6b6cx12=_0x6b6cx2[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cxa);null!=_0x6b6cx12&&(mxUtils[_0xb59f[254]](_0x6b6cx12[_0xb59f[253]][_0xb59f[252]],_0x6b6cx4),mxEffects[_0xb59f[260]](_0x6b6cx2,_0x6b6cxa,_0x6b6cx4))};_0x6b6cx3=_0x6b6cx2[_0xb59f[251]][_0xb59f[264]](_0x6b6cx3);if(null!=_0x6b6cx3){for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx3[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx5=_0x6b6cx2[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx3[_0x6b6cx9]),null!=_0x6b6cx5&&mxUtils[_0xb59f[254]](_0x6b6cx5[_0xb59f[253]][_0xb59f[252]],_0x6b6cx4)}}},fadeOut:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx5=_0x6b6cx5||40;_0x6b6cx9=_0x6b6cx9||30;var _0x6b6cx12=_0x6b6cx3||100;mxUtils[_0xb59f[254]](_0x6b6cx2,_0x6b6cx12);if(_0x6b6cxa||null==_0x6b6cxa){var _0x6b6cx13=function(){_0x6b6cx12=Math[_0xb59f[160]](_0x6b6cx12-_0x6b6cx5,0);mxUtils[_0xb59f[254]](_0x6b6cx2,_0x6b6cx12);0<_0x6b6cx12?window[_0xb59f[261]](_0x6b6cx13,_0x6b6cx9):(_0x6b6cx2[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],_0x6b6cx4&&_0x6b6cx2[_0xb59f[265]]&&_0x6b6cx2[_0xb59f[265]][_0xb59f[266]](_0x6b6cx2))};window[_0xb59f[261]](_0x6b6cx13,_0x6b6cx9)}else {_0x6b6cx2[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],_0x6b6cx4&&_0x6b6cx2[_0xb59f[265]]&&_0x6b6cx2[_0xb59f[265]][_0xb59f[266]](_0x6b6cx2)}}},mxUtils={errorResource:_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[267]:_0xb59f[110],closeResource:_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[268]:_0xb59f[110],errorImage:mxClient[_0xb59f[88]]+_0xb59f[269],removeCursors:function(_0x6b6cx2){null!=_0x6b6cx2[_0xb59f[124]]&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[270]]=_0xb59f[110]);_0x6b6cx2=_0x6b6cx2[_0xb59f[271]];if(null!=_0x6b6cx2){for(var _0x6b6cx3=_0x6b6cx2[_0xb59f[67]],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3;_0x6b6cx4+=1){mxUtils[_0xb59f[272]](_0x6b6cx2[_0x6b6cx4])}}},getCurrentStyle:function(){return mxClient[_0xb59f[80]]?function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[273]]:null}:function(_0x6b6cx2){return null!=_0x6b6cx2?window[_0xb59f[274]](_0x6b6cx2,_0xb59f[110]):null}}(),hasScrollbars:function(_0x6b6cx2){_0x6b6cx2=mxUtils[_0xb59f[275]](_0x6b6cx2);return null!=_0x6b6cx2&&(_0xb59f[276]==_0x6b6cx2[_0xb59f[277]]||_0xb59f[278]==_0x6b6cx2[_0xb59f[277]])},bind:function(_0x6b6cx2,_0x6b6cx3){return function(){return _0x6b6cx3[_0xb59f[183]](_0x6b6cx2,arguments)}},eval:function(_0x6b6cx2){var _0x6b6cx3=null;if(0<=_0x6b6cx2[_0xb59f[2]](_0xb59f[279])){try{eval(_0xb59f[280]+_0x6b6cx2),_0x6b6cx3=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog[_0xb59f[283]](c[_0xb59f[281]]+_0xb59f[282]+_0x6b6cx2)}}else {try{_0x6b6cx3=eval(_0x6b6cx2)}catch(d){mxLog[_0xb59f[283]](d[_0xb59f[281]]+_0xb59f[282]+_0x6b6cx2)}};return _0x6b6cx3},findNode:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0xb59f[284]](_0x6b6cx3);if(null!=_0x6b6cx5&&_0x6b6cx5==_0x6b6cx4){return _0x6b6cx2};for(_0x6b6cx2=_0x6b6cx2[_0xb59f[285]];null!=_0x6b6cx2;){_0x6b6cx5=mxUtils[_0xb59f[286]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);if(null!=_0x6b6cx5){return _0x6b6cx5};_0x6b6cx2=_0x6b6cx2[_0xb59f[287]]};return null},findNodeByAttribute:function(){return 9<=document[_0xb59f[5]]?function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=null;if(null!=_0x6b6cx2){if(_0x6b6cx2[_0xb59f[288]]==mxConstants[_0xb59f[289]]&&_0x6b6cx2[_0xb59f[284]](_0x6b6cx3)==_0x6b6cx4){_0x6b6cx5=_0x6b6cx2}else {for(_0x6b6cx2=_0x6b6cx2[_0xb59f[285]];null!=_0x6b6cx2&&null==_0x6b6cx5;){_0x6b6cx5=mxUtils[_0xb59f[290]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4),_0x6b6cx2=_0x6b6cx2[_0xb59f[287]]}}};return _0x6b6cx5}:mxClient[_0xb59f[80]]?function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return null==_0x6b6cx2?null:_0x6b6cx2[_0xb59f[295]][_0xb59f[294]](_0xb59f[291]+_0x6b6cx3+_0xb59f[292]+_0x6b6cx4+_0xb59f[293])}:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return null==_0x6b6cx2?null:_0x6b6cx2[_0xb59f[295]][_0xb59f[297]](_0xb59f[291]+_0x6b6cx3+_0xb59f[292]+_0x6b6cx4+_0xb59f[293],_0x6b6cx2[_0xb59f[295]],null,XPathResult.ANY_TYPE,null)[_0xb59f[296]]()}}(),getFunctionName:function(_0x6b6cx2){var _0x6b6cx3=null;if(null!=_0x6b6cx2){if(null!=_0x6b6cx2[_0xb59f[298]]){_0x6b6cx3=_0x6b6cx2[_0xb59f[298]]}else {_0x6b6cx2=_0x6b6cx2.toString();for(_0x6b6cx3=9;_0xb59f[185]==_0x6b6cx2[_0xb59f[225]](_0x6b6cx3);){_0x6b6cx3++};var _0x6b6cx4=_0x6b6cx2[_0xb59f[2]](_0xb59f[299],_0x6b6cx3),_0x6b6cx3=_0x6b6cx2[_0xb59f[85]](_0x6b6cx3,_0x6b6cx4)}};return _0x6b6cx3},indexOf:function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&null!=_0x6b6cx3){for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){if(_0x6b6cx2[_0x6b6cx4]==_0x6b6cx3){return _0x6b6cx4}}};return -1},remove:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null;if(_0xb59f[194]== typeof _0x6b6cx3){for(var _0x6b6cx5=mxUtils[_0xb59f[2]](_0x6b6cx3,_0x6b6cx2);0<=_0x6b6cx5;){_0x6b6cx3[_0xb59f[300]](_0x6b6cx5,1),_0x6b6cx4=_0x6b6cx2,_0x6b6cx5=mxUtils[_0xb59f[2]](_0x6b6cx3,_0x6b6cx2)}};for(var _0x6b6cx9 in _0x6b6cx3){_0x6b6cx3[_0x6b6cx9]==_0x6b6cx2&&( delete _0x6b6cx3[_0x6b6cx9],_0x6b6cx4=_0x6b6cx2)};return _0x6b6cx4},isNode:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){return null!=_0x6b6cx2&&!isNaN(_0x6b6cx2[_0xb59f[288]])&&(null==_0x6b6cx3||_0x6b6cx2[_0xb59f[301]][_0xb59f[216]]()==_0x6b6cx3[_0xb59f[216]]())?null==_0x6b6cx4||_0x6b6cx2[_0xb59f[284]](_0x6b6cx4)==_0x6b6cx5:!1},getChildNodes:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=_0x6b6cx3||mxConstants[_0xb59f[289]];for(var _0x6b6cx4=[],_0x6b6cx5=_0x6b6cx2[_0xb59f[285]];null!=_0x6b6cx5;){_0x6b6cx5[_0xb59f[288]]==_0x6b6cx3&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx5),_0x6b6cx5=_0x6b6cx5[_0xb59f[287]]};return _0x6b6cx4},createXmlDocument:function(){var _0x6b6cx2=null;document[_0xb59f[302]]&&document[_0xb59f[302]][_0xb59f[303]]?_0x6b6cx2=document[_0xb59f[302]][_0xb59f[303]](_0xb59f[110],_0xb59f[110],null):window[_0xb59f[304]]&&(_0x6b6cx2= new ActiveXObject(_0xb59f[305]));return _0x6b6cx2},parseXml:function(){return mxClient[_0xb59f[80]]&&(_0xb59f[82]=== typeof document[_0xb59f[5]]||9>document[_0xb59f[5]])?function(_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[306]]();_0x6b6cx3[_0xb59f[307]]=_0xb59f[308];_0x6b6cx3[_0xb59f[309]](_0x6b6cx2);return _0x6b6cx3}:function(_0x6b6cx2){return ( new DOMParser)[_0xb59f[311]](_0x6b6cx2,_0xb59f[310])}}(),clearSelection:function(){if(document[_0xb59f[312]]){return function(){document[_0xb59f[312]][_0xb59f[313]]()}};if(window[_0xb59f[314]]){return function(){window[_0xb59f[314]]()[_0xb59f[315]]()}}}(),getPrettyXml:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=[];if(null!=_0x6b6cx2){if(_0x6b6cx3=_0x6b6cx3||_0xb59f[316],_0x6b6cx4=_0x6b6cx4||_0xb59f[110],_0x6b6cx2[_0xb59f[288]]==mxConstants[_0xb59f[317]]){_0x6b6cx5[_0xb59f[207]](_0x6b6cx2[_0xb59f[318]])}else {_0x6b6cx5[_0xb59f[207]](_0x6b6cx4+_0xb59f[319]+_0x6b6cx2[_0xb59f[301]]);var _0x6b6cx9=_0x6b6cx2[_0xb59f[320]];if(null!=_0x6b6cx9){for(var _0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=mxUtils[_0xb59f[321]](_0x6b6cx9[_0x6b6cxa][_0xb59f[318]]);_0x6b6cx5[_0xb59f[207]](_0xb59f[185]+_0x6b6cx9[_0x6b6cxa][_0xb59f[301]]+_0xb59f[322]+_0x6b6cx12+_0xb59f[323])}};_0x6b6cx9=_0x6b6cx2[_0xb59f[285]];if(null!=_0x6b6cx9){for(_0x6b6cx5[_0xb59f[207]](_0xb59f[324]);null!=_0x6b6cx9;){_0x6b6cx5[_0xb59f[207]](mxUtils[_0xb59f[325]](_0x6b6cx9,_0x6b6cx3,_0x6b6cx4+_0x6b6cx3)),_0x6b6cx9=_0x6b6cx9[_0xb59f[287]]};_0x6b6cx5[_0xb59f[207]](_0x6b6cx4+_0xb59f[326]+_0x6b6cx2[_0xb59f[301]]+_0xb59f[324])}else {_0x6b6cx5[_0xb59f[207]](_0xb59f[327])}}};return _0x6b6cx5[_0xb59f[234]](_0xb59f[110])},removeWhitespace:function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=_0x6b6cx3?_0x6b6cx2[_0xb59f[328]]:_0x6b6cx2[_0xb59f[287]];null!=_0x6b6cx4&&_0x6b6cx4[_0xb59f[288]]==mxConstants[_0xb59f[317]];){var _0x6b6cx5=_0x6b6cx3?_0x6b6cx4[_0xb59f[328]]:_0x6b6cx4[_0xb59f[287]],_0x6b6cx9=mxUtils[_0xb59f[329]](_0x6b6cx4);0==mxUtils[_0xb59f[330]](_0x6b6cx9)[_0xb59f[67]]&&_0x6b6cx4[_0xb59f[265]][_0xb59f[266]](_0x6b6cx4);_0x6b6cx4=_0x6b6cx5}},htmlEntities:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2=(_0x6b6cx2||_0xb59f[110])[_0xb59f[230]](/&/g,_0xb59f[331]);_0x6b6cx2=_0x6b6cx2[_0xb59f[230]](/"/g,_0xb59f[332]);_0x6b6cx2=_0x6b6cx2[_0xb59f[230]](/\'/g,_0xb59f[333]);_0x6b6cx2=_0x6b6cx2[_0xb59f[230]](/</g,_0xb59f[334]);_0x6b6cx2=_0x6b6cx2[_0xb59f[230]](/>/g,_0xb59f[335]);if(null==_0x6b6cx3||_0x6b6cx3){_0x6b6cx2=_0x6b6cx2[_0xb59f[230]](/\n/g,_0xb59f[336])};return _0x6b6cx2},isVml:function(_0x6b6cx2){return null!=_0x6b6cx2&&_0xb59f[97]==_0x6b6cx2[_0xb59f[337]]},getXml:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0xb59f[110];null!=_0x6b6cx2&&(_0x6b6cx4=_0x6b6cx2[_0xb59f[338]],_0x6b6cx4=null==_0x6b6cx4?_0x6b6cx2[_0xb59f[339]]?_0x6b6cx2[_0xb59f[339]]:( new XMLSerializer)[_0xb59f[340]](_0x6b6cx2):_0x6b6cx4[_0xb59f[230]](/\r\n\t[\t]*/g,_0xb59f[110])[_0xb59f[230]](/>\r\n/g,_0xb59f[341])[_0xb59f[230]](/\r\n/g,_0xb59f[192]));return _0x6b6cx4=_0x6b6cx4[_0xb59f[230]](/\n/g,_0x6b6cx3||_0xb59f[336])},getTextContent:function(_0x6b6cx2){var _0x6b6cx3=_0xb59f[110];null!=_0x6b6cx2&&(null!=_0x6b6cx2[_0xb59f[285]]&&(_0x6b6cx2=_0x6b6cx2[_0xb59f[285]]),_0x6b6cx3=_0x6b6cx2[_0xb59f[318]]||_0xb59f[110]);return _0x6b6cx3},getInnerHtml:function(){return mxClient[_0xb59f[80]]?function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[339]]:_0xb59f[110]}:function(_0x6b6cx2){return null!=_0x6b6cx2?( new XMLSerializer)[_0xb59f[340]](_0x6b6cx2):_0xb59f[110]}}(),getOuterHtml:function(){return mxClient[_0xb59f[80]]?function(_0x6b6cx2){if(null!=_0x6b6cx2){if(null!=_0x6b6cx2[_0xb59f[342]]){return _0x6b6cx2[_0xb59f[342]]};var _0x6b6cx3=[];_0x6b6cx3[_0xb59f[207]](_0xb59f[319]+_0x6b6cx2[_0xb59f[301]]);var _0x6b6cx4=_0x6b6cx2[_0xb59f[320]];if(null!=_0x6b6cx4){for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=_0x6b6cx4[_0x6b6cx5][_0xb59f[318]];null!=_0x6b6cx9&&0<_0x6b6cx9[_0xb59f[67]]&&(_0x6b6cx3[_0xb59f[207]](_0xb59f[185]),_0x6b6cx3[_0xb59f[207]](_0x6b6cx4[_0x6b6cx5][_0xb59f[301]]),_0x6b6cx3[_0xb59f[207]](_0xb59f[322]),_0x6b6cx3[_0xb59f[207]](_0x6b6cx9),_0x6b6cx3[_0xb59f[207]](_0xb59f[323]))}};0==_0x6b6cx2[_0xb59f[339]][_0xb59f[67]]?_0x6b6cx3[_0xb59f[207]](_0xb59f[343]):(_0x6b6cx3[_0xb59f[207]](_0xb59f[341]),_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0xb59f[339]]),_0x6b6cx3[_0xb59f[207]](_0xb59f[326]+_0x6b6cx2[_0xb59f[301]]+_0xb59f[341]));return _0x6b6cx3[_0xb59f[234]](_0xb59f[110])};return _0xb59f[110]}:function(_0x6b6cx2){return null!=_0x6b6cx2?( new XMLSerializer)[_0xb59f[340]](_0x6b6cx2):_0xb59f[110]}}(),write:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[295]][_0xb59f[344]](_0x6b6cx3);null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[62]](_0x6b6cx4);return _0x6b6cx4},writeln:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[295]][_0xb59f[344]](_0x6b6cx3);null!=_0x6b6cx2&&(_0x6b6cx2[_0xb59f[62]](_0x6b6cx4),_0x6b6cx2[_0xb59f[62]](document[_0xb59f[55]](_0xb59f[345])));return _0x6b6cx4},br:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=_0x6b6cx3||1;for(var _0x6b6cx4=null,_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3;_0x6b6cx5++){null!=_0x6b6cx2&&(_0x6b6cx4=_0x6b6cx2[_0xb59f[295]][_0xb59f[55]](_0xb59f[345]),_0x6b6cx2[_0xb59f[62]](_0x6b6cx4))};return _0x6b6cx4},button:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:document;_0x6b6cx4=_0x6b6cx4[_0xb59f[55]](_0xb59f[172]);mxUtils[_0xb59f[53]](_0x6b6cx4,_0x6b6cx2);mxEvent[_0xb59f[169]](_0x6b6cx4,_0xb59f[173],function(_0x6b6cx2){_0x6b6cx3(_0x6b6cx2)});return _0x6b6cx4},para:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[346]);mxUtils[_0xb59f[53]](_0x6b6cx4,_0x6b6cx3);null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[62]](_0x6b6cx4);return _0x6b6cx4},addTransparentBackgroundFilter:function(_0x6b6cx2){_0x6b6cx2[_0xb59f[124]][_0xb59f[347]]+=_0xb59f[348]+mxClient[_0xb59f[88]]+_0xb59f[349]},linkAction:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return mxUtils[_0xb59f[54]](_0x6b6cx2,_0x6b6cx3,function(){_0x6b6cx4[_0xb59f[350]](_0x6b6cx5)},_0x6b6cx9)},linkInvoke:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){return mxUtils[_0xb59f[54]](_0x6b6cx2,_0x6b6cx3,function(){_0x6b6cx4[_0x6b6cx5](_0x6b6cx9)},_0x6b6cxa)},link:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=document[_0xb59f[55]](_0xb59f[351]);_0x6b6cx9[_0xb59f[124]][_0xb59f[352]]=_0xb59f[353];_0x6b6cx9[_0xb59f[124]][_0xb59f[354]]=_0xb59f[355];_0x6b6cx9[_0xb59f[124]][_0xb59f[270]]=_0xb59f[356];null!=_0x6b6cx5&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[357]]=_0x6b6cx5+_0xb59f[168]);mxEvent[_0xb59f[169]](_0x6b6cx9,_0xb59f[173],_0x6b6cx4);mxUtils[_0xb59f[53]](_0x6b6cx9,_0x6b6cx3);null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[62]](_0x6b6cx9);return _0x6b6cx9},fit:function(_0x6b6cx2){var _0x6b6cx3=parseInt(_0x6b6cx2[_0xb59f[358]]),_0x6b6cx4=parseInt(_0x6b6cx2[_0xb59f[359]]),_0x6b6cx5=document[_0xb59f[112]],_0x6b6cx9=document[_0xb59f[158]],_0x6b6cxa=(_0x6b6cx5[_0xb59f[360]]||_0x6b6cx9[_0xb59f[360]])+(_0x6b6cx5[_0xb59f[159]]||_0x6b6cx9[_0xb59f[159]]);_0x6b6cx3+_0x6b6cx4>_0x6b6cxa&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[160]](_0x6b6cx5[_0xb59f[360]]||_0x6b6cx9[_0xb59f[360]],_0x6b6cxa-_0x6b6cx4)+_0xb59f[168]);_0x6b6cx3=parseInt(_0x6b6cx2[_0xb59f[362]]);_0x6b6cx4=parseInt(_0x6b6cx2[_0xb59f[167]]);_0x6b6cxa=(_0x6b6cx5[_0xb59f[190]]||_0x6b6cx9[_0xb59f[190]])+Math[_0xb59f[160]](_0x6b6cx5[_0xb59f[157]]||0,_0x6b6cx9[_0xb59f[157]]);_0x6b6cx3+_0x6b6cx4>_0x6b6cxa&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[160]](_0x6b6cx5[_0xb59f[190]]||_0x6b6cx9[_0xb59f[190]],_0x6b6cxa-_0x6b6cx4)+_0xb59f[168])},open:function(_0x6b6cx2){if(mxClient[_0xb59f[133]]){try{netscape[_0xb59f[366]][_0xb59f[365]][_0xb59f[364]](_0xb59f[363])}catch(b){return mxUtils[_0xb59f[150]](_0xb59f[367]),_0xb59f[110]};var _0x6b6cx4=Components[_0xb59f[372]][_0xb59f[371]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[368]]);_0x6b6cx4[_0xb59f[373]](_0x6b6cx2);if(!_0x6b6cx4[_0xb59f[374]]()){return mxUtils[_0xb59f[150]](_0xb59f[375]),_0xb59f[110]};_0x6b6cx2=Components[_0xb59f[372]][_0xb59f[377]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[376]]);_0x6b6cx2[_0xb59f[176]](_0x6b6cx4,1,4,null);_0x6b6cx4=Components[_0xb59f[372]][_0xb59f[379]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[378]]);_0x6b6cx4[_0xb59f[176]](_0x6b6cx2);return _0x6b6cx4[_0xb59f[381]](_0x6b6cx4[_0xb59f[380]]())};_0x6b6cx4=( new ActiveXObject(_0xb59f[382])).OpenTextFile(_0x6b6cx2,1);_0x6b6cx2=_0x6b6cx4[_0xb59f[383]]();_0x6b6cx4[_0xb59f[268]]();return _0x6b6cx2},save:function(_0x6b6cx2,_0x6b6cx3){if(mxClient[_0xb59f[133]]){try{netscape[_0xb59f[366]][_0xb59f[365]][_0xb59f[364]](_0xb59f[363])}catch(c){mxUtils[_0xb59f[150]](_0xb59f[384]);return};var _0x6b6cx5=Components[_0xb59f[372]][_0xb59f[371]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[368]]);_0x6b6cx5[_0xb59f[373]](_0x6b6cx2);_0x6b6cx5[_0xb59f[374]]()||_0x6b6cx5[_0xb59f[385]](0,420);var _0x6b6cx9=Components[_0xb59f[372]][_0xb59f[387]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[386]]);_0x6b6cx9[_0xb59f[176]](_0x6b6cx5,34,4,null);_0x6b6cx9[_0xb59f[53]](_0x6b6cx3,_0x6b6cx3[_0xb59f[67]]);_0x6b6cx9[_0xb59f[388]]();_0x6b6cx9[_0xb59f[268]]()}else {_0x6b6cx5=( new ActiveXObject(_0xb59f[382])).CreateTextFile(_0x6b6cx2,!0),_0x6b6cx5.Write(_0x6b6cx3),_0x6b6cx5.Close()}},saveAs:function(_0x6b6cx2){var _0x6b6cx3=document[_0xb59f[55]](_0xb59f[389]);_0x6b6cx3[_0xb59f[57]](_0xb59f[390],_0xb59f[110]);_0x6b6cx3[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx3);try{if(mxClient[_0xb59f[133]]){var _0x6b6cx4=_0x6b6cx3[_0xb59f[391]];_0x6b6cx4[_0xb59f[392]]();_0x6b6cx4[_0xb59f[53]](_0x6b6cx2);_0x6b6cx4[_0xb59f[268]]();try{netscape[_0xb59f[366]][_0xb59f[365]][_0xb59f[364]](_0xb59f[363]),_0x6b6cx3[_0xb59f[393]](),saveDocument(_0x6b6cx4)}catch(d){mxUtils[_0xb59f[150]](_0xb59f[394])}}else {_0x6b6cx4=_0x6b6cx3[_0xb59f[396]][_0xb59f[395]],_0x6b6cx4[_0xb59f[53]](_0x6b6cx2),_0x6b6cx4[_0xb59f[398]](_0xb59f[397],!1,document[_0xb59f[45]])}}finally{document[_0xb59f[112]][_0xb59f[266]](_0x6b6cx3)}},copy:function(_0x6b6cx2){if(window[_0xb59f[399]]){window[_0xb59f[399]][_0xb59f[401]](_0xb59f[400],_0x6b6cx2)}else {netscape[_0xb59f[366]][_0xb59f[365]][_0xb59f[364]](_0xb59f[363]);var _0x6b6cx3=Components[_0xb59f[372]][_0xb59f[403]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[402]]);if(_0x6b6cx3){var _0x6b6cx4=Components[_0xb59f[372]][_0xb59f[405]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[404]]);if(_0x6b6cx4){_0x6b6cx4[_0xb59f[407]](_0xb59f[406]);var _0x6b6cx5=Components[_0xb59f[372]][_0xb59f[409]][_0xb59f[370]](Components[_0xb59f[369]][_0xb59f[408]]);_0x6b6cx5[_0xb59f[410]]=_0x6b6cx2;_0x6b6cx4[_0xb59f[411]](_0xb59f[406],_0x6b6cx5,2*_0x6b6cx2[_0xb59f[67]]);_0x6b6cx3[_0xb59f[401]](_0x6b6cx4,null,Components[_0xb59f[369]][_0xb59f[402]][_0xb59f[412]])}}}},load:function(_0x6b6cx2){_0x6b6cx2= new mxXmlRequest(_0x6b6cx2,null,_0xb59f[413],!1);_0x6b6cx2[_0xb59f[414]]();return _0x6b6cx2},get:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return ( new mxXmlRequest(_0x6b6cx2,null,_0xb59f[413]))[_0xb59f[414]](_0x6b6cx3,_0x6b6cx4)},post:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){return ( new mxXmlRequest(_0x6b6cx2,_0x6b6cx3))[_0xb59f[414]](_0x6b6cx4,_0x6b6cx5)},submit:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){return ( new mxXmlRequest(_0x6b6cx2,_0x6b6cx3))[_0xb59f[415]](_0x6b6cx4,_0x6b6cx5)},loadInto:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxClient[_0xb59f[80]]?_0x6b6cx3[_0xb59f[416]]=function(){4==_0x6b6cx3[_0xb59f[417]]&&_0x6b6cx4()}:_0x6b6cx3[_0xb59f[418]](_0xb59f[219],_0x6b6cx4,!1);_0x6b6cx3[_0xb59f[219]](_0x6b6cx2)},getValue:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2[_0x6b6cx3]:null;null==_0x6b6cx2&&(_0x6b6cx2=_0x6b6cx4);return _0x6b6cx2},getNumber:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2[_0x6b6cx3]:null;null==_0x6b6cx2&&(_0x6b6cx2=_0x6b6cx4||0);return Number(_0x6b6cx2)},getColor:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2[_0x6b6cx3]:null;null==_0x6b6cx2?_0x6b6cx2=_0x6b6cx4:_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);return _0x6b6cx2},clone:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!1;var _0x6b6cx5=null;if(null!=_0x6b6cx2&&_0xb59f[279]== typeof _0x6b6cx2[_0xb59f[196]]){var _0x6b6cx5= new _0x6b6cx2[_0xb59f[196]],_0x6b6cx9;for(_0x6b6cx9 in _0x6b6cx2){if(_0x6b6cx9!=mxObjectIdentity[_0xb59f[195]]&&(null==_0x6b6cx3||0>mxUtils[_0xb59f[2]](_0x6b6cx3,_0x6b6cx9))){_0x6b6cx5[_0x6b6cx9]=!_0x6b6cx4&&_0xb59f[194]== typeof _0x6b6cx2[_0x6b6cx9]?mxUtils[_0xb59f[238]](_0x6b6cx2[_0x6b6cx9]):_0x6b6cx2[_0x6b6cx9]}}};return _0x6b6cx5},equalPoints:function(_0x6b6cx2,_0x6b6cx3){if(null==_0x6b6cx2&&null!=_0x6b6cx3||null!=_0x6b6cx2&&null==_0x6b6cx3||null!=_0x6b6cx2&&null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[67]]!=_0x6b6cx3[_0xb59f[67]]){return !1};if(null!=_0x6b6cx2&&null!=_0x6b6cx3){for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){if(_0x6b6cx2[_0x6b6cx4]==_0x6b6cx3[_0x6b6cx4]||null!=_0x6b6cx2[_0x6b6cx4]&&!_0x6b6cx2[_0x6b6cx4][_0xb59f[237]](_0x6b6cx3[_0x6b6cx4])){return !1}}};return !0},equalEntries:function(_0x6b6cx2,_0x6b6cx3){if(null==_0x6b6cx2&&null!=_0x6b6cx3||null!=_0x6b6cx2&&null==_0x6b6cx3||null!=_0x6b6cx2&&null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[67]]!=_0x6b6cx3[_0xb59f[67]]){return !1};if(null!=_0x6b6cx2&&null!=_0x6b6cx3){for(var _0x6b6cx4 in _0x6b6cx2){if(_0x6b6cx2[_0x6b6cx4]!=_0x6b6cx3[_0x6b6cx4]){return !1}}};return !0},extend:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=function(){};_0x6b6cx4[_0xb59f[202]]=_0x6b6cx3[_0xb59f[202]];_0x6b6cx2[_0xb59f[202]]= new _0x6b6cx4;_0x6b6cx2[_0xb59f[202]][_0xb59f[196]]=_0x6b6cx2},toString:function(_0x6b6cx2){var _0x6b6cx3=_0xb59f[110],_0x6b6cx4;for(_0x6b6cx4 in _0x6b6cx2){try{if(null==_0x6b6cx2[_0x6b6cx4]){_0x6b6cx3+=_0x6b6cx4+_0xb59f[419]}else {if(_0xb59f[279]== typeof _0x6b6cx2[_0x6b6cx4]){_0x6b6cx3+=_0x6b6cx4+_0xb59f[420]}else {if(_0xb59f[194]== typeof _0x6b6cx2[_0x6b6cx4]){var _0x6b6cx5=mxUtils[_0xb59f[197]](_0x6b6cx2[_0x6b6cx4][_0xb59f[196]]),_0x6b6cx3=_0x6b6cx3+(_0x6b6cx4+_0xb59f[421]+_0x6b6cx5+_0xb59f[422])}else {_0x6b6cx3+=_0x6b6cx4+_0xb59f[423]+_0x6b6cx2[_0x6b6cx4]+_0xb59f[192]}}}}catch(e){_0x6b6cx3+=_0x6b6cx4+_0xb59f[226]+e[_0xb59f[281]]}};return _0x6b6cx3},toRadians:function(_0x6b6cx2){return Math[_0xb59f[424]]*_0x6b6cx2/180},arcToCurves:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){_0x6b6cx13-=_0x6b6cx2;_0x6b6cx14-=_0x6b6cx3;if(0===_0x6b6cx4||0===_0x6b6cx5){return _0x6b6cx18};_0x6b6cx4=Math[_0xb59f[425]](_0x6b6cx4);_0x6b6cx5=Math[_0xb59f[425]](_0x6b6cx5);var _0x6b6cx15=-_0x6b6cx13/2,_0x6b6cx16=-_0x6b6cx14/2,_0x6b6cx17=Math[_0xb59f[426]](_0x6b6cx9*Math[_0xb59f[424]]/180),_0x6b6cx18=Math[_0xb59f[427]](_0x6b6cx9*Math[_0xb59f[424]]/180);_0x6b6cx9=_0x6b6cx17*_0x6b6cx15+_0x6b6cx18*_0x6b6cx16;var _0x6b6cx15=-1*_0x6b6cx18*_0x6b6cx15+_0x6b6cx17*_0x6b6cx16,_0x6b6cx16=_0x6b6cx9*_0x6b6cx9,_0x6b6cx19=_0x6b6cx15*_0x6b6cx15,_0x6b6cx1a=_0x6b6cx4*_0x6b6cx4,_0x6b6cx1b=_0x6b6cx5*_0x6b6cx5,_0x6b6cx1c=_0x6b6cx16/_0x6b6cx1a+_0x6b6cx19/_0x6b6cx1b;1<_0x6b6cx1c?(_0x6b6cx4*=Math[_0xb59f[428]](_0x6b6cx1c),_0x6b6cx5*=Math[_0xb59f[428]](_0x6b6cx1c),_0x6b6cxa=0):(_0x6b6cx1c=1,_0x6b6cxa===_0x6b6cx12&&(_0x6b6cx1c= -1),_0x6b6cxa=_0x6b6cx1c*Math[_0xb59f[428]]((_0x6b6cx1a*_0x6b6cx1b-_0x6b6cx1a*_0x6b6cx19-_0x6b6cx1b*_0x6b6cx16)/(_0x6b6cx1a*_0x6b6cx19+_0x6b6cx1b*_0x6b6cx16)));_0x6b6cx16=_0x6b6cxa*_0x6b6cx4*_0x6b6cx15/_0x6b6cx5;_0x6b6cx19=-1*_0x6b6cxa*_0x6b6cx5*_0x6b6cx9/_0x6b6cx4;_0x6b6cx13=_0x6b6cx17*_0x6b6cx16-_0x6b6cx18*_0x6b6cx19+_0x6b6cx13/2;_0x6b6cx14=_0x6b6cx18*_0x6b6cx16+_0x6b6cx17*_0x6b6cx19+_0x6b6cx14/2;_0x6b6cx1a=Math[_0xb59f[429]]((_0x6b6cx15-_0x6b6cx19)/_0x6b6cx5,(_0x6b6cx9-_0x6b6cx16)/_0x6b6cx4)-Math[_0xb59f[429]](0,1);_0x6b6cxa=0<=_0x6b6cx1a?_0x6b6cx1a:2*Math[_0xb59f[424]]+_0x6b6cx1a;_0x6b6cx1a=Math[_0xb59f[429]]((-_0x6b6cx15-_0x6b6cx19)/_0x6b6cx5,(-_0x6b6cx9-_0x6b6cx16)/_0x6b6cx4)-Math[_0xb59f[429]]((_0x6b6cx15-_0x6b6cx19)/_0x6b6cx5,(_0x6b6cx9-_0x6b6cx16)/_0x6b6cx4);_0x6b6cx9=0<=_0x6b6cx1a?_0x6b6cx1a:2*Math[_0xb59f[424]]+_0x6b6cx1a;0==_0x6b6cx12&&0<_0x6b6cx9?_0x6b6cx9-=2*Math[_0xb59f[424]]:0!=_0x6b6cx12&&0>_0x6b6cx9&&(_0x6b6cx9+=2*Math[_0xb59f[424]]);_0x6b6cx12=2*_0x6b6cx9/Math[_0xb59f[424]];_0x6b6cx12=Math[_0xb59f[430]](0>_0x6b6cx12?-1*_0x6b6cx12:_0x6b6cx12);_0x6b6cx9/=_0x6b6cx12;_0x6b6cx15=8/3*Math[_0xb59f[427]](_0x6b6cx9/4)*Math[_0xb59f[427]](_0x6b6cx9/4)/Math[_0xb59f[427]](_0x6b6cx9/2);_0x6b6cx16=_0x6b6cx17*_0x6b6cx4;_0x6b6cx17*=_0x6b6cx5;_0x6b6cx4*=_0x6b6cx18;_0x6b6cx5*=_0x6b6cx18;for(var _0x6b6cx1d=Math[_0xb59f[426]](_0x6b6cxa),_0x6b6cx1e=Math[_0xb59f[427]](_0x6b6cxa),_0x6b6cx19=-_0x6b6cx15*(_0x6b6cx16*_0x6b6cx1e+_0x6b6cx5*_0x6b6cx1d),_0x6b6cx1a=-_0x6b6cx15*(_0x6b6cx4*_0x6b6cx1e-_0x6b6cx17*_0x6b6cx1d),_0x6b6cx1c=_0x6b6cx1b=0,_0x6b6cx18=[],_0x6b6cx1f=0;_0x6b6cx1f<_0x6b6cx12;++_0x6b6cx1f){_0x6b6cxa+=_0x6b6cx9;var _0x6b6cx1d=Math[_0xb59f[426]](_0x6b6cxa),_0x6b6cx1e=Math[_0xb59f[427]](_0x6b6cxa),_0x6b6cx1b=_0x6b6cx16*_0x6b6cx1d-_0x6b6cx5*_0x6b6cx1e+_0x6b6cx13,_0x6b6cx1c=_0x6b6cx4*_0x6b6cx1d+_0x6b6cx17*_0x6b6cx1e+_0x6b6cx14,_0x6b6cx20=-_0x6b6cx15*(_0x6b6cx16*_0x6b6cx1e+_0x6b6cx5*_0x6b6cx1d),_0x6b6cx1d=-_0x6b6cx15*(_0x6b6cx4*_0x6b6cx1e-_0x6b6cx17*_0x6b6cx1d),_0x6b6cx1e=6*_0x6b6cx1f;_0x6b6cx18[_0x6b6cx1e]=Number(_0x6b6cx19+_0x6b6cx2);_0x6b6cx18[_0x6b6cx1e+1]=Number(_0x6b6cx1a+_0x6b6cx3);_0x6b6cx18[_0x6b6cx1e+2]=Number(_0x6b6cx1b-_0x6b6cx20+_0x6b6cx2);_0x6b6cx18[_0x6b6cx1e+3]=Number(_0x6b6cx1c-_0x6b6cx1d+_0x6b6cx3);_0x6b6cx18[_0x6b6cx1e+4]=Number(_0x6b6cx1b+_0x6b6cx2);_0x6b6cx18[_0x6b6cx1e+5]=Number(_0x6b6cx1c+_0x6b6cx3);_0x6b6cx19=_0x6b6cx1b+_0x6b6cx20;_0x6b6cx1a=_0x6b6cx1c+_0x6b6cx1d};return _0x6b6cx18},getBoundingBox:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null;if(null!=_0x6b6cx2&&null!=_0x6b6cx3&&0!=_0x6b6cx3){var _0x6b6cx5=mxUtils[_0xb59f[431]](_0x6b6cx3),_0x6b6cx4=Math[_0xb59f[426]](_0x6b6cx5),_0x6b6cx9=Math[_0xb59f[427]](_0x6b6cx5),_0x6b6cxa= new mxPoint(_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]/2,_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]/2),_0x6b6cx12= new mxPoint(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]),_0x6b6cx5= new mxPoint(_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]],_0x6b6cx2[_0xb59f[236]]),_0x6b6cx13= new mxPoint(_0x6b6cx5[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]),_0x6b6cx14= new mxPoint(_0x6b6cx2[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]]),_0x6b6cx12=mxUtils[_0xb59f[432]](_0x6b6cx12,_0x6b6cx4,_0x6b6cx9,_0x6b6cxa),_0x6b6cx5=mxUtils[_0xb59f[432]](_0x6b6cx5,_0x6b6cx4,_0x6b6cx9,_0x6b6cxa),_0x6b6cx13=mxUtils[_0xb59f[432]](_0x6b6cx13,_0x6b6cx4,_0x6b6cx9,_0x6b6cxa),_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx4,_0x6b6cx9,_0x6b6cxa),_0x6b6cx4= new mxRectangle(_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]],0,0);_0x6b6cx4[_0xb59f[99]]( new mxRectangle(_0x6b6cx5[_0xb59f[235]],_0x6b6cx5[_0xb59f[236]],0,0));_0x6b6cx4[_0xb59f[99]]( new mxRectangle(_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]],0,0));_0x6b6cx4[_0xb59f[99]]( new mxRectangle(_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]],0,0))};return _0x6b6cx4},getRotatedPoint:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5: new mxPoint;var _0x6b6cx9=_0x6b6cx2[_0xb59f[235]]-_0x6b6cx5[_0xb59f[235]];_0x6b6cx2=_0x6b6cx2[_0xb59f[236]]-_0x6b6cx5[_0xb59f[236]];return  new mxPoint(_0x6b6cx9*_0x6b6cx3-_0x6b6cx2*_0x6b6cx4+_0x6b6cx5[_0xb59f[235]],_0x6b6cx2*_0x6b6cx3+_0x6b6cx9*_0x6b6cx4+_0x6b6cx5[_0xb59f[236]])},getPortConstraints:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx2=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==_0x6b6cx2){return _0x6b6cx5};_0x6b6cx5=_0x6b6cx2.toString();_0x6b6cx2=mxConstants[_0xb59f[434]];0<=_0x6b6cx5[_0xb59f[2]](mxConstants.DIRECTION_NORTH)&&(_0x6b6cx2|=mxConstants[_0xb59f[435]]);0<=_0x6b6cx5[_0xb59f[2]](mxConstants.DIRECTION_WEST)&&(_0x6b6cx2|=mxConstants[_0xb59f[436]]);0<=_0x6b6cx5[_0xb59f[2]](mxConstants.DIRECTION_SOUTH)&&(_0x6b6cx2|=mxConstants[_0xb59f[437]]);0<=_0x6b6cx5[_0xb59f[2]](mxConstants.DIRECTION_EAST)&&(_0x6b6cx2|=mxConstants[_0xb59f[438]]);return _0x6b6cx2},reversePortConstraints:function(_0x6b6cx2){var _0x6b6cx3=0,_0x6b6cx3=(_0x6b6cx2&mxConstants[_0xb59f[436]])<<3,_0x6b6cx3=_0x6b6cx3|(_0x6b6cx2&mxConstants[_0xb59f[435]])<<1,_0x6b6cx3=_0x6b6cx3|(_0x6b6cx2&mxConstants[_0xb59f[437]])>>1;return _0x6b6cx3|=(_0x6b6cx2&mxConstants[_0xb59f[438]])>>3},findNearestSegment:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=-1;if(0<_0x6b6cx2[_0xb59f[439]][_0xb59f[67]]){for(var _0x6b6cx9=_0x6b6cx2[_0xb59f[439]][0],_0x6b6cxa=null,_0x6b6cx12=1;_0x6b6cx12<_0x6b6cx2[_0xb59f[439]][_0xb59f[67]];_0x6b6cx12++){var _0x6b6cx13=_0x6b6cx2[_0xb59f[439]][_0x6b6cx12],_0x6b6cx9=mxUtils[_0xb59f[440]](_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]],_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]],_0x6b6cx3,_0x6b6cx4);if(null==_0x6b6cxa||_0x6b6cx9<_0x6b6cxa){_0x6b6cxa=_0x6b6cx9,_0x6b6cx5=_0x6b6cx12-1};_0x6b6cx9=_0x6b6cx13}};return _0x6b6cx5},rectangleIntersectsSegment:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0xb59f[236]],_0x6b6cx9=_0x6b6cx2[_0xb59f[235]],_0x6b6cxa=_0x6b6cx5+_0x6b6cx2[_0xb59f[119]],_0x6b6cx12=_0x6b6cx9+_0x6b6cx2[_0xb59f[117]];_0x6b6cx2=_0x6b6cx3[_0xb59f[235]];var _0x6b6cx13=_0x6b6cx4[_0xb59f[235]];_0x6b6cx3[_0xb59f[235]]>_0x6b6cx4[_0xb59f[235]]&&(_0x6b6cx2=_0x6b6cx4[_0xb59f[235]],_0x6b6cx13=_0x6b6cx3[_0xb59f[235]]);_0x6b6cx13>_0x6b6cx12&&(_0x6b6cx13=_0x6b6cx12);_0x6b6cx2<_0x6b6cx9&&(_0x6b6cx2=_0x6b6cx9);if(_0x6b6cx2>_0x6b6cx13){return !1};var _0x6b6cx9=_0x6b6cx3[_0xb59f[236]],_0x6b6cx12=_0x6b6cx4[_0xb59f[236]],_0x6b6cx14=_0x6b6cx4[_0xb59f[235]]-_0x6b6cx3[_0xb59f[235]];1E-7<Math[_0xb59f[425]](_0x6b6cx14)&&(_0x6b6cx4=(_0x6b6cx4[_0xb59f[236]]-_0x6b6cx3[_0xb59f[236]])/_0x6b6cx14,_0x6b6cx3=_0x6b6cx3[_0xb59f[236]]-_0x6b6cx4*_0x6b6cx3[_0xb59f[235]],_0x6b6cx9=_0x6b6cx4*_0x6b6cx2+_0x6b6cx3,_0x6b6cx12=_0x6b6cx4*_0x6b6cx13+_0x6b6cx3);_0x6b6cx9>_0x6b6cx12&&(_0x6b6cx3=_0x6b6cx12,_0x6b6cx12=_0x6b6cx9,_0x6b6cx9=_0x6b6cx3);_0x6b6cx12>_0x6b6cxa&&(_0x6b6cx12=_0x6b6cxa);_0x6b6cx9<_0x6b6cx5&&(_0x6b6cx9=_0x6b6cx5);return _0x6b6cx9>_0x6b6cx12?!1:!0},contains:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx2[_0xb59f[235]]<=_0x6b6cx3&&_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]>=_0x6b6cx3&&_0x6b6cx2[_0xb59f[236]]<=_0x6b6cx4&&_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]>=_0x6b6cx4},intersects:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[117]],_0x6b6cx5=_0x6b6cx2[_0xb59f[119]],_0x6b6cx9=_0x6b6cx3[_0xb59f[117]],_0x6b6cxa=_0x6b6cx3[_0xb59f[119]];if(0>=_0x6b6cx9||0>=_0x6b6cxa||0>=_0x6b6cx4||0>=_0x6b6cx5){return !1};var _0x6b6cx12=_0x6b6cx2[_0xb59f[235]],_0x6b6cx13=_0x6b6cx2[_0xb59f[236]],_0x6b6cx14=_0x6b6cx3[_0xb59f[235]],_0x6b6cx15=_0x6b6cx3[_0xb59f[236]],_0x6b6cx9=_0x6b6cx9+_0x6b6cx14,_0x6b6cxa=_0x6b6cxa+_0x6b6cx15,_0x6b6cx4=_0x6b6cx4+_0x6b6cx12,_0x6b6cx5=_0x6b6cx5+_0x6b6cx13;return (_0x6b6cx9<_0x6b6cx14||_0x6b6cx9>_0x6b6cx12)&&(_0x6b6cxa<_0x6b6cx15||_0x6b6cxa>_0x6b6cx13)&&(_0x6b6cx4<_0x6b6cx12||_0x6b6cx4>_0x6b6cx14)&&(_0x6b6cx5<_0x6b6cx13||_0x6b6cx5>_0x6b6cx15)},intersectsHotspot:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:1;_0x6b6cx9=null!=_0x6b6cx9?_0x6b6cx9:0;_0x6b6cxa=null!=_0x6b6cxa?_0x6b6cxa:0;if(0<_0x6b6cx5){var _0x6b6cx12=_0x6b6cx2[_0xb59f[241]](),_0x6b6cx13=_0x6b6cx2[_0xb59f[242]](),_0x6b6cx14=_0x6b6cx2[_0xb59f[117]],_0x6b6cx15=_0x6b6cx2[_0xb59f[119]],_0x6b6cx16=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_STARTSIZE)*_0x6b6cx2[_0xb59f[441]][_0xb59f[255]];0<_0x6b6cx16&&(mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_HORIZONTAL,!0)?(_0x6b6cx13=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx16/2,_0x6b6cx15=_0x6b6cx16):(_0x6b6cx12=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx16/2,_0x6b6cx14=_0x6b6cx16));_0x6b6cx14=Math[_0xb59f[160]](_0x6b6cx9,_0x6b6cx14*_0x6b6cx5);_0x6b6cx15=Math[_0xb59f[160]](_0x6b6cx9,_0x6b6cx15*_0x6b6cx5);0<_0x6b6cxa&&(_0x6b6cx14=Math[_0xb59f[243]](_0x6b6cx14,_0x6b6cxa),_0x6b6cx15=Math[_0xb59f[243]](_0x6b6cx15,_0x6b6cxa));_0x6b6cx5= new mxRectangle(_0x6b6cx12-_0x6b6cx14/2,_0x6b6cx13-_0x6b6cx15/2,_0x6b6cx14,_0x6b6cx15);_0x6b6cx12=mxUtils[_0xb59f[431]](mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ROTATION)||0);0!=_0x6b6cx12&&(_0x6b6cx9=Math[_0xb59f[426]](-_0x6b6cx12),_0x6b6cxa=Math[_0xb59f[427]](-_0x6b6cx12),_0x6b6cx12= new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]()),_0x6b6cx2=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx3,_0x6b6cx4),_0x6b6cx9,_0x6b6cxa,_0x6b6cx12),_0x6b6cx3=_0x6b6cx2[_0xb59f[235]],_0x6b6cx4=_0x6b6cx2[_0xb59f[236]]);return mxUtils[_0xb59f[442]](_0x6b6cx5,_0x6b6cx3,_0x6b6cx4)};return !0},getOffset:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=0,_0x6b6cx5=0;if(null!=_0x6b6cx3&&_0x6b6cx3){var _0x6b6cx9=document[_0xb59f[112]],_0x6b6cxa=document[_0xb59f[158]],_0x6b6cx4=_0x6b6cx4+(_0x6b6cx9[_0xb59f[360]]||_0x6b6cxa[_0xb59f[360]]),_0x6b6cx5=_0x6b6cx5+(_0x6b6cx9[_0xb59f[190]]||_0x6b6cxa[_0xb59f[190]])};for(;_0x6b6cx2[_0xb59f[443]];){_0x6b6cx4+=_0x6b6cx2[_0xb59f[358]],_0x6b6cx5+=_0x6b6cx2[_0xb59f[362]],_0x6b6cx2=_0x6b6cx2[_0xb59f[443]]};return  new mxPoint(_0x6b6cx4,_0x6b6cx5)},getScrollOrigin:function(_0x6b6cx2){for(var _0x6b6cx3=document[_0xb59f[112]],_0x6b6cx4=document[_0xb59f[158]],_0x6b6cx5= new mxPoint(_0x6b6cx3[_0xb59f[360]]||_0x6b6cx4[_0xb59f[360]],_0x6b6cx3[_0xb59f[190]]||_0x6b6cx4[_0xb59f[190]]);null!=_0x6b6cx2&&_0x6b6cx2!=_0x6b6cx3&&_0x6b6cx2!=_0x6b6cx4;){!isNaN(_0x6b6cx2[_0xb59f[360]])&&!isNaN(_0x6b6cx2[_0xb59f[190]])&&(_0x6b6cx5[_0xb59f[235]]+=_0x6b6cx2[_0xb59f[360]],_0x6b6cx5[_0xb59f[236]]+=_0x6b6cx2[_0xb59f[190]]),_0x6b6cx2=_0x6b6cx2[_0xb59f[265]]};return _0x6b6cx5},convertPoint:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=mxUtils[_0xb59f[444]](_0x6b6cx2);_0x6b6cx2=mxUtils[_0xb59f[445]](_0x6b6cx2);_0x6b6cx2[_0xb59f[235]]-=_0x6b6cx5[_0xb59f[235]];_0x6b6cx2[_0xb59f[236]]-=_0x6b6cx5[_0xb59f[236]];return  new mxPoint(_0x6b6cx3-_0x6b6cx2[_0xb59f[235]],_0x6b6cx4-_0x6b6cx2[_0xb59f[236]])},ltrim:function(_0x6b6cx2,_0x6b6cx3){return _0x6b6cx2[_0xb59f[230]](RegExp(_0xb59f[446]+(_0x6b6cx3||_0xb59f[447])+_0xb59f[448],_0xb59f[449]),_0xb59f[110])},rtrim:function(_0x6b6cx2,_0x6b6cx3){return _0x6b6cx2[_0xb59f[230]](RegExp(_0xb59f[450]+(_0x6b6cx3||_0xb59f[447])+_0xb59f[451],_0xb59f[449]),_0xb59f[110])},trim:function(_0x6b6cx2,_0x6b6cx3){return mxUtils[_0xb59f[453]](mxUtils[_0xb59f[452]](_0x6b6cx2,_0x6b6cx3),_0x6b6cx3)},isNumeric:function(_0x6b6cx2){return null!=_0x6b6cx2&&(null==_0x6b6cx2[_0xb59f[67]]||0<_0x6b6cx2[_0xb59f[67]]&&0>_0x6b6cx2[_0xb59f[2]](_0xb59f[454])&&0>_0x6b6cx2[_0xb59f[2]](_0xb59f[455]))&&!isNaN(_0x6b6cx2)},mod:function(_0x6b6cx2,_0x6b6cx3){return (_0x6b6cx2%_0x6b6cx3+_0x6b6cx3)%_0x6b6cx3},intersection:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13){var _0x6b6cx14=(_0x6b6cx13-_0x6b6cxa)*(_0x6b6cx4-_0x6b6cx2)-(_0x6b6cx12-_0x6b6cx9)*(_0x6b6cx5-_0x6b6cx3);_0x6b6cx12=((_0x6b6cx12-_0x6b6cx9)*(_0x6b6cx3-_0x6b6cxa)-(_0x6b6cx13-_0x6b6cxa)*(_0x6b6cx2-_0x6b6cx9))/_0x6b6cx14;_0x6b6cx9=((_0x6b6cx4-_0x6b6cx2)*(_0x6b6cx3-_0x6b6cxa)-(_0x6b6cx5-_0x6b6cx3)*(_0x6b6cx2-_0x6b6cx9))/_0x6b6cx14;return 0<=_0x6b6cx12&&1>=_0x6b6cx12&&0<=_0x6b6cx9&&1>=_0x6b6cx9? new mxPoint(_0x6b6cx2+_0x6b6cx12*(_0x6b6cx4-_0x6b6cx2),_0x6b6cx3+_0x6b6cx12*(_0x6b6cx5-_0x6b6cx3)):null},ptSegDistSq:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx4-=_0x6b6cx2;_0x6b6cx5-=_0x6b6cx3;_0x6b6cx9-=_0x6b6cx2;_0x6b6cxa-=_0x6b6cx3;0>=_0x6b6cx9*_0x6b6cx4+_0x6b6cxa*_0x6b6cx5?_0x6b6cx4=0:(_0x6b6cx9=_0x6b6cx4-_0x6b6cx9,_0x6b6cxa=_0x6b6cx5-_0x6b6cxa,_0x6b6cx2=_0x6b6cx9*_0x6b6cx4+_0x6b6cxa*_0x6b6cx5,_0x6b6cx4=0>=_0x6b6cx2?0:_0x6b6cx2*_0x6b6cx2/(_0x6b6cx4*_0x6b6cx4+_0x6b6cx5*_0x6b6cx5));_0x6b6cx9=_0x6b6cx9*_0x6b6cx9+_0x6b6cxa*_0x6b6cxa-_0x6b6cx4;0>_0x6b6cx9&&(_0x6b6cx9=0);return _0x6b6cx9},relativeCcw:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx4-=_0x6b6cx2;_0x6b6cx5-=_0x6b6cx3;_0x6b6cx9-=_0x6b6cx2;_0x6b6cxa-=_0x6b6cx3;_0x6b6cx2=_0x6b6cx9*_0x6b6cx5-_0x6b6cxa*_0x6b6cx4;0==_0x6b6cx2&&(_0x6b6cx2=_0x6b6cx9*_0x6b6cx4+_0x6b6cxa*_0x6b6cx5,0<_0x6b6cx2&&(_0x6b6cx2=(_0x6b6cx9-_0x6b6cx4)*_0x6b6cx4+(_0x6b6cxa-_0x6b6cx5)*_0x6b6cx5,0>_0x6b6cx2&&(_0x6b6cx2=0)));return 0>_0x6b6cx2?-1:0<_0x6b6cx2?1:0},animateChanges:function(_0x6b6cx2,_0x6b6cx3){mxEffects[_0xb59f[456]][_0xb59f[183]](this,arguments)},cascadeOpacity:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxEffects[_0xb59f[260]][_0xb59f[183]](this,arguments)},fadeOut:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){mxEffects[_0xb59f[457]][_0xb59f[183]](this,arguments)},setOpacity:function(_0x6b6cx2,_0x6b6cx3){mxUtils[_0xb59f[458]](_0x6b6cx2)?_0x6b6cx2[_0xb59f[124]][_0xb59f[347]]=100<=_0x6b6cx3?null:_0xb59f[459]+_0x6b6cx3/5+_0xb59f[460]:mxClient[_0xb59f[80]]&&(_0xb59f[82]=== typeof document[_0xb59f[5]]||9>document[_0xb59f[5]])?_0x6b6cx2[_0xb59f[124]][_0xb59f[347]]=100<=_0x6b6cx3?null:_0xb59f[459]+_0x6b6cx3+_0xb59f[460]:_0x6b6cx2[_0xb59f[124]][_0xb59f[461]]=_0x6b6cx3/100},createImage:function(_0x6b6cx2){var _0x6b6cx3=null;mxClient[_0xb59f[49]]&&_0xb59f[462]!=document[_0xb59f[135]]?(_0x6b6cx3=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[464]),_0x6b6cx3[_0xb59f[57]](_0xb59f[390],_0x6b6cx2),_0x6b6cx3[_0xb59f[124]][_0xb59f[465]]=_0xb59f[130]):(_0x6b6cx3=document[_0xb59f[55]](_0xb59f[466]),_0x6b6cx3[_0xb59f[57]](_0xb59f[390],_0x6b6cx2),_0x6b6cx3[_0xb59f[57]](_0xb59f[467],_0xb59f[468]));return _0x6b6cx3},sortCells:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;var _0x6b6cx4= new mxDictionary;_0x6b6cx2[_0xb59f[470]](function(_0x6b6cx2,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx4[_0xb59f[203]](_0x6b6cx2);null==_0x6b6cxa&&(_0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2)[_0xb59f[224]](mxCellPath.PATH_SEPARATOR),_0x6b6cx4[_0xb59f[204]](_0x6b6cx2,_0x6b6cxa));var _0x6b6cx12=_0x6b6cx4[_0xb59f[203]](_0x6b6cx9);null==_0x6b6cx12&&(_0x6b6cx12=mxCellPath[_0xb59f[385]](_0x6b6cx9)[_0xb59f[224]](mxCellPath.PATH_SEPARATOR),_0x6b6cx4[_0xb59f[204]](_0x6b6cx9,_0x6b6cx12));_0x6b6cxa=mxCellPath[_0xb59f[469]](_0x6b6cxa,_0x6b6cx12);return 0==_0x6b6cxa?0:0<_0x6b6cxa==_0x6b6cx3?1:-1});return _0x6b6cx2},getStylename:function(_0x6b6cx2){return null!=_0x6b6cx2&&(_0x6b6cx2=_0x6b6cx2[_0xb59f[224]](_0xb59f[471])[0],0>_0x6b6cx2[_0xb59f[2]](_0xb59f[226]))?_0x6b6cx2:_0xb59f[110]},getStylenames:function(_0x6b6cx2){var _0x6b6cx3=[];if(null!=_0x6b6cx2){_0x6b6cx2=_0x6b6cx2[_0xb59f[224]](_0xb59f[471]);for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){0>_0x6b6cx2[_0x6b6cx4][_0xb59f[2]](_0xb59f[226])&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0x6b6cx4])}};return _0x6b6cx3},indexOfStylename:function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&null!=_0x6b6cx3){for(var _0x6b6cx4=_0x6b6cx2[_0xb59f[224]](_0xb59f[471]),_0x6b6cx5=0,_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx4[_0xb59f[67]];_0x6b6cx9++){if(_0x6b6cx4[_0x6b6cx9]==_0x6b6cx3){return _0x6b6cx5};_0x6b6cx5+=_0x6b6cx4[_0x6b6cx9][_0xb59f[67]]+1}};return -1},addStylename:function(_0x6b6cx2,_0x6b6cx3){0>mxUtils[_0xb59f[472]](_0x6b6cx2,_0x6b6cx3)&&(null==_0x6b6cx2?_0x6b6cx2=_0xb59f[110]:0<_0x6b6cx2[_0xb59f[67]]&&_0xb59f[471]!=_0x6b6cx2[_0xb59f[225]](_0x6b6cx2[_0xb59f[67]]-1)&&(_0x6b6cx2+=_0xb59f[471]),_0x6b6cx2+=_0x6b6cx3);return _0x6b6cx2},removeStylename:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=[];if(null!=_0x6b6cx2){for(var _0x6b6cx5=_0x6b6cx2[_0xb59f[224]](_0xb59f[471]),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx5[_0x6b6cx9]!=_0x6b6cx3&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx5[_0x6b6cx9])}};return _0x6b6cx4[_0xb59f[234]](_0xb59f[471])},removeAllStylenames:function(_0x6b6cx2){var _0x6b6cx3=[];if(null!=_0x6b6cx2){_0x6b6cx2=_0x6b6cx2[_0xb59f[224]](_0xb59f[471]);for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){0<=_0x6b6cx2[_0x6b6cx4][_0xb59f[2]](_0xb59f[226])&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0x6b6cx4])}};return _0x6b6cx3[_0xb59f[234]](_0xb59f[471])},setCellStyles:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]){_0x6b6cx2[_0xb59f[473]]();try{for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx3[_0xb59f[67]];_0x6b6cx9++){if(null!=_0x6b6cx3[_0x6b6cx9]){var _0x6b6cxa=mxUtils[_0xb59f[475]](_0x6b6cx2[_0xb59f[474]](_0x6b6cx3[_0x6b6cx9]),_0x6b6cx4,_0x6b6cx5);_0x6b6cx2[_0xb59f[475]](_0x6b6cx3[_0x6b6cx9],_0x6b6cxa)}}}finally{_0x6b6cx2[_0xb59f[476]]()}}},setStyle:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=null!=_0x6b6cx4&&(_0xb59f[82]== typeof _0x6b6cx4[_0xb59f[67]]||0<_0x6b6cx4[_0xb59f[67]]);if(null==_0x6b6cx2||0==_0x6b6cx2[_0xb59f[67]]){_0x6b6cx5&&(_0x6b6cx2=_0x6b6cx3+_0xb59f[226]+_0x6b6cx4)}else {var _0x6b6cx9=_0x6b6cx2[_0xb59f[2]](_0x6b6cx3+_0xb59f[226]);0>_0x6b6cx9?_0x6b6cx5&&(_0x6b6cx5=_0xb59f[471]==_0x6b6cx2[_0xb59f[225]](_0x6b6cx2[_0xb59f[67]]-1)?_0xb59f[110]:_0xb59f[471],_0x6b6cx2=_0x6b6cx2+_0x6b6cx5+_0x6b6cx3+_0xb59f[226]+_0x6b6cx4):(_0x6b6cx3=_0x6b6cx5?_0x6b6cx3+_0xb59f[226]+_0x6b6cx4:_0xb59f[110],_0x6b6cx4=_0x6b6cx2[_0xb59f[2]](_0xb59f[471],_0x6b6cx9),_0x6b6cx5||_0x6b6cx4++,_0x6b6cx2=_0x6b6cx2[_0xb59f[85]](0,_0x6b6cx9)+_0x6b6cx3+(_0x6b6cx4>_0x6b6cx9?_0x6b6cx2[_0xb59f[85]](_0x6b6cx4):_0xb59f[110]))};return _0x6b6cx2},setCellStyleFlags:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]){_0x6b6cx2[_0xb59f[473]]();try{for(var _0x6b6cxa=0;_0x6b6cxa<_0x6b6cx3[_0xb59f[67]];_0x6b6cxa++){if(null!=_0x6b6cx3[_0x6b6cxa]){var _0x6b6cx12=mxUtils[_0xb59f[477]](_0x6b6cx2[_0xb59f[474]](_0x6b6cx3[_0x6b6cxa]),_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[475]](_0x6b6cx3[_0x6b6cxa],_0x6b6cx12)}}}finally{_0x6b6cx2[_0xb59f[476]]()}}},setStyleFlag:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null==_0x6b6cx2||0==_0x6b6cx2[_0xb59f[67]]){_0x6b6cx2=_0x6b6cx5||null==_0x6b6cx5?_0x6b6cx3+_0xb59f[226]+_0x6b6cx4:_0x6b6cx3+_0xb59f[478]}else {var _0x6b6cx9=_0x6b6cx2[_0xb59f[2]](_0x6b6cx3+_0xb59f[226]);if(0>_0x6b6cx9){_0x6b6cx9=_0xb59f[471]==_0x6b6cx2[_0xb59f[225]](_0x6b6cx2[_0xb59f[67]]-1)?_0xb59f[110]:_0xb59f[471],_0x6b6cx2=_0x6b6cx5||null==_0x6b6cx5?_0x6b6cx2+_0x6b6cx9+_0x6b6cx3+_0xb59f[226]+_0x6b6cx4:_0x6b6cx2+_0x6b6cx9+_0x6b6cx3+_0xb59f[478]}else {var _0x6b6cxa=_0x6b6cx2[_0xb59f[2]](_0xb59f[471],_0x6b6cx9),_0x6b6cx12=_0xb59f[110],_0x6b6cx12=0>_0x6b6cxa?_0x6b6cx2[_0xb59f[85]](_0x6b6cx9+_0x6b6cx3[_0xb59f[67]]+1):_0x6b6cx2[_0xb59f[85]](_0x6b6cx9+_0x6b6cx3[_0xb59f[67]]+1,_0x6b6cxa),_0x6b6cx12=null==_0x6b6cx5?parseInt(_0x6b6cx12)^_0x6b6cx4:_0x6b6cx5?parseInt(_0x6b6cx12)|_0x6b6cx4:parseInt(_0x6b6cx12)& ~_0x6b6cx4;_0x6b6cx2=_0x6b6cx2[_0xb59f[85]](0,_0x6b6cx9)+_0x6b6cx3+_0xb59f[226]+_0x6b6cx12+(0<=_0x6b6cxa?_0x6b6cx2[_0xb59f[85]](_0x6b6cxa):_0xb59f[110])}};return _0x6b6cx2},getAlignmentAsPoint:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=0,_0x6b6cx5=0;_0x6b6cx2==mxConstants[_0xb59f[479]]?_0x6b6cx4= -0.5:_0x6b6cx2==mxConstants[_0xb59f[480]]&&(_0x6b6cx4= -1);_0x6b6cx3==mxConstants[_0xb59f[481]]?_0x6b6cx5= -0.5:_0x6b6cx3==mxConstants[_0xb59f[482]]&&(_0x6b6cx5= -1);return  new mxPoint(_0x6b6cx4,_0x6b6cx5)},getSizeForString:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:mxConstants[_0xb59f[483]];_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:mxConstants[_0xb59f[484]];var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx5[_0xb59f[124]][_0xb59f[486]]=_0x6b6cx4;_0x6b6cx5[_0xb59f[124]][_0xb59f[487]]=Math[_0xb59f[488]](_0x6b6cx3)+_0xb59f[168];_0x6b6cx5[_0xb59f[124]][_0xb59f[489]]=Math[_0xb59f[488]](_0x6b6cx3*mxConstants[_0xb59f[490]])+_0xb59f[168];_0x6b6cx5[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx5[_0xb59f[124]][_0xb59f[493]]=_0xb59f[494];_0x6b6cx5[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];_0x6b6cx5[_0xb59f[124]][_0xb59f[495]]=mxClient[_0xb59f[496]]?_0xb59f[497]:_0xb59f[498];_0x6b6cx5[_0xb59f[124]][_0xb59f[499]]=_0xb59f[500];_0x6b6cx5[_0xb59f[339]]=_0x6b6cx2;document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx5);_0x6b6cx2= new mxRectangle(0,0,_0x6b6cx5[_0xb59f[359]],_0x6b6cx5[_0xb59f[167]]);document[_0xb59f[112]][_0xb59f[266]](_0x6b6cx5);return _0x6b6cx2},getViewXml:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:0;_0x6b6cx9=null!=_0x6b6cx9?_0x6b6cx9:0;_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:1;null==_0x6b6cx4&&(_0x6b6cx4=[_0x6b6cx2[_0xb59f[502]]()[_0xb59f[501]]()]);var _0x6b6cxa=_0x6b6cx2[_0xb59f[249]](),_0x6b6cx12=null,_0x6b6cx13=_0x6b6cxa[_0xb59f[503]]();_0x6b6cxa[_0xb59f[504]](!1);var _0x6b6cx14=_0x6b6cxa[_0xb59f[505]],_0x6b6cx15=_0x6b6cxa[_0xb59f[506]];_0x6b6cx2[_0xb59f[507]]==mxConstants[_0xb59f[508]]?(_0x6b6cxa[_0xb59f[505]]=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[449]),_0x6b6cxa[_0xb59f[510]][_0xb59f[62]](_0x6b6cxa[_0xb59f[505]]),_0x6b6cxa[_0xb59f[506]]=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[449])):(_0x6b6cxa[_0xb59f[505]]=_0x6b6cxa[_0xb59f[505]][_0xb59f[511]](!1),_0x6b6cxa[_0xb59f[510]][_0xb59f[62]](_0x6b6cxa[_0xb59f[505]]),_0x6b6cxa[_0xb59f[506]]=_0x6b6cxa[_0xb59f[506]][_0xb59f[511]](!1));_0x6b6cxa[_0xb59f[510]][_0xb59f[62]](_0x6b6cxa[_0xb59f[506]]);var _0x6b6cx16=_0x6b6cxa[_0xb59f[512]]();_0x6b6cxa[_0xb59f[513]]= new mxPoint(_0x6b6cx5,_0x6b6cx9);_0x6b6cx3= new mxTemporaryCellStates(_0x6b6cx2[_0xb59f[249]](),_0x6b6cx3,_0x6b6cx4);try{_0x6b6cx12=( new mxCodec)[_0xb59f[514]](_0x6b6cx2[_0xb59f[249]]())}finally{_0x6b6cx3[_0xb59f[515]](),_0x6b6cxa[_0xb59f[513]]=_0x6b6cx16,_0x6b6cxa[_0xb59f[510]][_0xb59f[266]](_0x6b6cxa[_0xb59f[505]]),_0x6b6cxa[_0xb59f[510]][_0xb59f[266]](_0x6b6cxa[_0xb59f[506]]),_0x6b6cxa[_0xb59f[505]]=_0x6b6cx14,_0x6b6cxa[_0xb59f[506]]=_0x6b6cx15,_0x6b6cxa[_0xb59f[504]](_0x6b6cx13)};return _0x6b6cx12},getScaleForPageCount:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(1>_0x6b6cx2){return 1};_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:mxConstants[_0xb59f[516]];_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:0;var _0x6b6cx9=_0x6b6cx4[_0xb59f[117]]-2*_0x6b6cx5;_0x6b6cx4=_0x6b6cx4[_0xb59f[119]]-2*_0x6b6cx5;_0x6b6cx5=_0x6b6cx3[_0xb59f[517]]()[_0xb59f[238]]();_0x6b6cx3=_0x6b6cx3[_0xb59f[249]]()[_0xb59f[518]]();_0x6b6cx5[_0xb59f[117]]/=_0x6b6cx3;_0x6b6cx5[_0xb59f[119]]/=_0x6b6cx3;_0x6b6cx3=_0x6b6cx5[_0xb59f[117]];_0x6b6cx4=_0x6b6cx3/_0x6b6cx5[_0xb59f[119]]/(_0x6b6cx9/_0x6b6cx4);_0x6b6cx5=Math[_0xb59f[428]](_0x6b6cx2);var _0x6b6cxa=Math[_0xb59f[428]](_0x6b6cx4);_0x6b6cx4=_0x6b6cx5*_0x6b6cxa;_0x6b6cx5/=_0x6b6cxa;if(1>_0x6b6cx4&&_0x6b6cx5>_0x6b6cx2){var _0x6b6cx12=_0x6b6cx5/_0x6b6cx2;_0x6b6cx5=_0x6b6cx2;_0x6b6cx4/=_0x6b6cx12};1>_0x6b6cx5&&_0x6b6cx4>_0x6b6cx2&&(_0x6b6cx12=_0x6b6cx4/_0x6b6cx2,_0x6b6cx4=_0x6b6cx2,_0x6b6cx5/=_0x6b6cx12);_0x6b6cx12=Math[_0xb59f[430]](_0x6b6cx4)*Math[_0xb59f[430]](_0x6b6cx5);for(_0x6b6cxa=0;_0x6b6cx12>_0x6b6cx2;){var _0x6b6cx12=Math[_0xb59f[519]](_0x6b6cx4)/_0x6b6cx4,_0x6b6cx13=Math[_0xb59f[519]](_0x6b6cx5)/_0x6b6cx5;1==_0x6b6cx12&&(_0x6b6cx12=Math[_0xb59f[519]](_0x6b6cx4-1)/_0x6b6cx4);1==_0x6b6cx13&&(_0x6b6cx13=Math[_0xb59f[519]](_0x6b6cx5-1)/_0x6b6cx5);_0x6b6cx12=_0x6b6cx12>_0x6b6cx13?_0x6b6cx12:_0x6b6cx13;_0x6b6cx4*=_0x6b6cx12;_0x6b6cx5*=_0x6b6cx12;_0x6b6cx12=Math[_0xb59f[430]](_0x6b6cx4)*Math[_0xb59f[430]](_0x6b6cx5);_0x6b6cxa++;if(10<_0x6b6cxa){break}};return 0.99999*(_0x6b6cx9*_0x6b6cx4/_0x6b6cx3)},show:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:0;_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:0;null==_0x6b6cx3?_0x6b6cx3=window[_0xb59f[392]]()[_0xb59f[395]]:_0x6b6cx3[_0xb59f[392]]();var _0x6b6cx9=_0x6b6cx2[_0xb59f[517]]();_0x6b6cx4=-_0x6b6cx9[_0xb59f[235]]+_0x6b6cx4;_0x6b6cx5=-_0x6b6cx9[_0xb59f[236]]+_0x6b6cx5;if(mxClient[_0xb59f[80]]){for(var _0x6b6cx9=_0xb59f[520],_0x6b6cxa=document[_0xb59f[64]](_0xb59f[521]),_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa[_0xb59f[67]];_0x6b6cx12++){_0x6b6cx9+=_0x6b6cxa[_0x6b6cx12][_0xb59f[342]]};_0x6b6cx9+=_0xb59f[522];for(_0x6b6cx12=0;_0x6b6cx12<document[_0xb59f[523]][_0xb59f[67]];_0x6b6cx12++){try{_0x6b6cx9+=document[_0xb59f[523]](_0x6b6cx12)[_0xb59f[103]]}catch(h){}};_0x6b6cx9+=_0xb59f[524];_0x6b6cx9+=_0xb59f[525];_0x6b6cx9+=_0x6b6cx2[_0xb59f[526]][_0xb59f[339]];_0x6b6cx9+=_0xb59f[527];_0x6b6cx9+=_0xb59f[528];_0x6b6cx3[_0xb59f[171]](_0x6b6cx9);_0x6b6cx3[_0xb59f[268]]();_0x6b6cx2=_0x6b6cx3[_0xb59f[112]][_0xb59f[64]](_0xb59f[529])[0];null!=_0x6b6cx2&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492],_0x6b6cx2[_0xb59f[124]][_0xb59f[361]]=_0x6b6cx4+_0xb59f[168],_0x6b6cx2[_0xb59f[124]][_0xb59f[125]]=_0x6b6cx5+_0xb59f[168])}else {_0x6b6cx3[_0xb59f[171]](_0xb59f[530]);_0x6b6cx3[_0xb59f[171]](_0xb59f[531]);_0x6b6cxa=document[_0xb59f[64]](_0xb59f[521]);for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa[_0xb59f[67]];_0x6b6cx12++){_0x6b6cx3[_0xb59f[171]](mxUtils[_0xb59f[532]](_0x6b6cxa[_0x6b6cx12]))};_0x6b6cxa=document[_0xb59f[64]](_0xb59f[54]);for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa[_0xb59f[67]];_0x6b6cx12++){_0x6b6cx3[_0xb59f[171]](mxUtils[_0xb59f[532]](_0x6b6cxa[_0x6b6cx12]))};_0x6b6cxa=document[_0xb59f[64]](_0xb59f[124]);for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa[_0xb59f[67]];_0x6b6cx12++){_0x6b6cx3[_0xb59f[171]](mxUtils[_0xb59f[532]](_0x6b6cxa[_0x6b6cx12]))};_0x6b6cx3[_0xb59f[171]](_0xb59f[533]);_0x6b6cx3[_0xb59f[171]](_0xb59f[534]);_0x6b6cx3[_0xb59f[268]]();null==_0x6b6cx3[_0xb59f[112]]&&_0x6b6cx3[_0xb59f[158]][_0xb59f[62]](_0x6b6cx3[_0xb59f[55]](_0xb59f[112]));_0x6b6cx3[_0xb59f[112]][_0xb59f[124]][_0xb59f[277]]=_0xb59f[278];for(_0x6b6cx2=_0x6b6cx2[_0xb59f[526]][_0xb59f[285]];null!=_0x6b6cx2;){_0x6b6cx12=_0x6b6cx2[_0xb59f[511]](!0),_0x6b6cx3[_0xb59f[112]][_0xb59f[62]](_0x6b6cx12),_0x6b6cx2=_0x6b6cx2[_0xb59f[287]]};_0x6b6cx2=_0x6b6cx3[_0xb59f[64]](_0xb59f[449])[0];null!=_0x6b6cx2&&(_0x6b6cx2[_0xb59f[57]](_0xb59f[535],_0xb59f[536]+_0x6b6cx4+_0xb59f[537]+_0x6b6cx5+_0xb59f[460]),_0x6b6cx4=_0x6b6cx2[_0xb59f[538]],_0x6b6cx4[_0xb59f[57]](_0xb59f[117],_0x6b6cx9[_0xb59f[117]]+Math[_0xb59f[160]](_0x6b6cx9[_0xb59f[235]],0)+3),_0x6b6cx4[_0xb59f[57]](_0xb59f[119],_0x6b6cx9[_0xb59f[119]]+Math[_0xb59f[160]](_0x6b6cx9[_0xb59f[236]],0)+3))};mxUtils[_0xb59f[272]](_0x6b6cx3[_0xb59f[112]]);return _0x6b6cx3},printScreen:function(_0x6b6cx2){var _0x6b6cx3=window[_0xb59f[392]]();mxUtils[_0xb59f[539]](_0x6b6cx2,_0x6b6cx3[_0xb59f[395]]);_0x6b6cx2=function(){_0x6b6cx3[_0xb59f[393]]();_0x6b6cx3[_0xb59f[540]]();_0x6b6cx3[_0xb59f[268]]()};mxClient[_0xb59f[76]]?_0x6b6cx3[_0xb59f[261]](_0x6b6cx2,500):_0x6b6cx2()},popup:function(_0x6b6cx2,_0x6b6cx3){if(_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx4[_0xb59f[124]][_0xb59f[277]]=_0xb59f[276];_0x6b6cx4[_0xb59f[124]][_0xb59f[117]]=_0xb59f[541];_0x6b6cx4[_0xb59f[124]][_0xb59f[119]]=_0xb59f[542];var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[543]);_0x6b6cx5[_0xb59f[339]]=mxUtils[_0xb59f[321]](_0x6b6cx2,!1)[_0xb59f[230]](/\n/g,_0xb59f[545])[_0xb59f[230]](/ /g,_0xb59f[544]);_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);_0x6b6cx4= new mxWindow(_0xb59f[546],_0x6b6cx4,document[_0xb59f[112]][_0xb59f[159]]/2-320,(document[_0xb59f[112]][_0xb59f[157]]||document[_0xb59f[158]][_0xb59f[157]])/2-240,640,480,!1,!0);_0x6b6cx4[_0xb59f[164]](!0);_0x6b6cx4[_0xb59f[175]](!0)}else {mxClient[_0xb59f[133]]?(_0x6b6cx4=window[_0xb59f[392]](),_0x6b6cx4[_0xb59f[395]][_0xb59f[171]](_0xb59f[547]+mxUtils[_0xb59f[321]](_0x6b6cx2)+_0xb59f[548]),_0x6b6cx4[_0xb59f[395]][_0xb59f[268]]()):(_0x6b6cx4=window[_0xb59f[392]](),_0x6b6cx5=_0x6b6cx4[_0xb59f[395]][_0xb59f[55]](_0xb59f[543]),_0x6b6cx5[_0xb59f[339]]=mxUtils[_0xb59f[321]](_0x6b6cx2,!1)[_0xb59f[230]](/\n/g,_0xb59f[545])[_0xb59f[230]](/ /g,_0xb59f[544]),_0x6b6cx4[_0xb59f[395]][_0xb59f[112]][_0xb59f[62]](_0x6b6cx5))}},alert:function(_0x6b6cx2){alert(_0x6b6cx2)},prompt:function(_0x6b6cx2,_0x6b6cx3){return prompt(_0x6b6cx2,_0x6b6cx3)},confirm:function(_0x6b6cx2){return confirm(_0x6b6cx2)},error:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx9[_0xb59f[124]][_0xb59f[549]]=_0xb59f[550];var _0x6b6cxa=document[_0xb59f[55]](_0xb59f[466]);_0x6b6cxa[_0xb59f[57]](_0xb59f[390],_0x6b6cx5||mxUtils[_0xb59f[551]]);_0x6b6cxa[_0xb59f[57]](_0xb59f[552],_0xb59f[553]);_0x6b6cxa[_0xb59f[124]][_0xb59f[123]]=_0xb59f[554];_0x6b6cx9[_0xb59f[62]](_0x6b6cxa);_0x6b6cx9[_0xb59f[62]](document[_0xb59f[344]](_0xb59f[555]));_0x6b6cx9[_0xb59f[62]](document[_0xb59f[344]](_0xb59f[555]));_0x6b6cx9[_0xb59f[62]](document[_0xb59f[344]](_0xb59f[555]));mxUtils[_0xb59f[53]](_0x6b6cx9,_0x6b6cx2);_0x6b6cx2=document[_0xb59f[112]][_0xb59f[159]];_0x6b6cx5=document[_0xb59f[112]][_0xb59f[157]]||document[_0xb59f[158]][_0xb59f[157]];var _0x6b6cx12= new mxWindow(mxResources[_0xb59f[203]](mxUtils[_0xb59f[556]])||mxUtils[_0xb59f[556]],_0x6b6cx9,(_0x6b6cx2-_0x6b6cx3)/2,_0x6b6cx5/4,_0x6b6cx3,null,!1,!0);_0x6b6cx4&&(mxUtils[_0xb59f[345]](_0x6b6cx9),_0x6b6cx3=document[_0xb59f[55]](_0xb59f[346]),_0x6b6cx4=document[_0xb59f[55]](_0xb59f[172]),mxClient[_0xb59f[80]]?_0x6b6cx4[_0xb59f[124]][_0xb59f[103]]=_0xb59f[557]:_0x6b6cx4[_0xb59f[57]](_0xb59f[124],_0xb59f[557]),mxEvent[_0xb59f[169]](_0x6b6cx4,_0xb59f[173],function(_0x6b6cx2){_0x6b6cx12[_0xb59f[515]]()}),mxUtils[_0xb59f[53]](_0x6b6cx4,mxResources[_0xb59f[203]](mxUtils[_0xb59f[558]])||mxUtils[_0xb59f[558]]),_0x6b6cx3[_0xb59f[62]](_0x6b6cx4),_0x6b6cx9[_0xb59f[62]](_0x6b6cx3),mxUtils[_0xb59f[345]](_0x6b6cx9),_0x6b6cx12[_0xb59f[164]](!0));_0x6b6cx12[_0xb59f[175]](!0);return _0x6b6cx12},makeDraggable:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15){_0x6b6cx2= new mxDragSource(_0x6b6cx2,_0x6b6cx4);_0x6b6cx2[_0xb59f[559]]= new mxPoint(null!=_0x6b6cx9?_0x6b6cx9:0,null!=_0x6b6cxa?_0x6b6cxa:mxConstants[_0xb59f[560]]);_0x6b6cx2[_0xb59f[561]]=_0x6b6cx12;_0x6b6cx2[_0xb59f[562]](!1);null!=_0x6b6cx14&&(_0x6b6cx2[_0xb59f[563]]=_0x6b6cx14);null!=_0x6b6cx15&&(_0x6b6cx2[_0xb59f[564]]=_0x6b6cx15);_0x6b6cx2[_0xb59f[565]]=function(_0x6b6cx2){return _0xb59f[279]== typeof _0x6b6cx3?_0x6b6cx3(_0x6b6cx2):_0x6b6cx3};null!=_0x6b6cx5&&(_0x6b6cx2[_0xb59f[566]]=function(){return _0x6b6cx5[_0xb59f[511]](!0)},_0x6b6cx13&&(_0x6b6cx2[_0xb59f[567]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx5[_0xb59f[511]](!0),_0x6b6cx4=parseInt(_0x6b6cx3[_0xb59f[124]][_0xb59f[117]]),_0x6b6cx9=parseInt(_0x6b6cx3[_0xb59f[124]][_0xb59f[119]]);_0x6b6cx3[_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[488]](_0x6b6cx4*_0x6b6cx2[_0xb59f[441]][_0xb59f[255]])+_0xb59f[168];_0x6b6cx3[_0xb59f[124]][_0xb59f[119]]=Math[_0xb59f[488]](_0x6b6cx9*_0x6b6cx2[_0xb59f[441]][_0xb59f[255]])+_0xb59f[168];return _0x6b6cx3}));return _0x6b6cx2}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:_0xb59f[568],RENDERING_HINT_FASTER:_0xb59f[569],RENDERING_HINT_FASTEST:_0xb59f[570],DIALECT_SVG:_0xb59f[571],DIALECT_VML:_0xb59f[572],DIALECT_MIXEDHTML:_0xb59f[573],DIALECT_PREFERHTML:_0xb59f[574],DIALECT_STRICTHTML:_0xb59f[575],NS_SVG:_0xb59f[576],NS_XHTML:_0xb59f[577],NS_XLINK:_0xb59f[578],SHADOWCOLOR:_0xb59f[579],SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:_0xb59f[580],DEFAULT_INVALID_COLOR:_0xb59f[581],HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:_0xb59f[582],CURSOR_MOVABLE_EDGE:_0xb59f[582],CURSOR_LABEL_HANDLE:_0xb59f[583],CURSOR_BEND_HANDLE:_0xb59f[356],CURSOR_CONNECT:_0xb59f[356],HIGHLIGHT_COLOR:_0xb59f[580],CONNECT_TARGET_COLOR:_0xb59f[584],INVALID_CONNECT_TARGET_COLOR:_0xb59f[581],DROP_TARGET_COLOR:_0xb59f[584],VALID_COLOR:_0xb59f[580],INVALID_COLOR:_0xb59f[581],EDGE_SELECTION_COLOR:_0xb59f[580],VERTEX_SELECTION_COLOR:_0xb59f[580],VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:_0xb59f[581],GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:_0xb59f[585],OUTLINE_STROKEWIDTH:mxClient[_0xb59f[80]]?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:_0xb59f[580],HANDLE_STROKECOLOR:_0xb59f[586],LABEL_HANDLE_FILLCOLOR:_0xb59f[587],CONNECT_HANDLE_FILLCOLOR:_0xb59f[584],LOCKED_HANDLE_FILLCOLOR:_0xb59f[581],OUTLINE_HANDLE_FILLCOLOR:_0xb59f[588],OUTLINE_HANDLE_STROKECOLOR:_0xb59f[589],DEFAULT_FONTFAMILY:_0xb59f[590],DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT: new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE: new mxRectangle(0,0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT: new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE: new mxRectangle(0,0,1100,850),NONE:_0xb59f[130],STYLE_PERIMETER:_0xb59f[591],STYLE_SOURCE_PORT:_0xb59f[592],STYLE_TARGET_PORT:_0xb59f[593],STYLE_PORT_CONSTRAINT:_0xb59f[594],STYLE_OPACITY:_0xb59f[461],STYLE_TEXT_OPACITY:_0xb59f[595],STYLE_OVERFLOW:_0xb59f[277],STYLE_ORTHOGONAL:_0xb59f[596],STYLE_EXIT_X:_0xb59f[597],STYLE_EXIT_Y:_0xb59f[598],STYLE_EXIT_PERIMETER:_0xb59f[599],STYLE_ENTRY_X:_0xb59f[600],STYLE_ENTRY_Y:_0xb59f[601],STYLE_ENTRY_PERIMETER:_0xb59f[602],STYLE_WHITE_SPACE:_0xb59f[493],STYLE_ROTATION:_0xb59f[603],STYLE_FILLCOLOR:_0xb59f[604],STYLE_SWIMLANE_FILLCOLOR:_0xb59f[605],STYLE_GRADIENTCOLOR:_0xb59f[606],STYLE_GRADIENT_DIRECTION:_0xb59f[607],STYLE_STROKECOLOR:_0xb59f[608],STYLE_SEPARATORCOLOR:_0xb59f[609],STYLE_STROKEWIDTH:_0xb59f[610],STYLE_ALIGN:_0xb59f[611],STYLE_VERTICAL_ALIGN:_0xb59f[123],STYLE_LABEL_POSITION:_0xb59f[612],STYLE_VERTICAL_LABEL_POSITION:_0xb59f[613],STYLE_IMAGE_ASPECT:_0xb59f[614],STYLE_IMAGE_ALIGN:_0xb59f[615],STYLE_IMAGE_VERTICAL_ALIGN:_0xb59f[616],STYLE_GLASS:_0xb59f[617],STYLE_IMAGE:_0xb59f[618],STYLE_IMAGE_WIDTH:_0xb59f[619],STYLE_IMAGE_HEIGHT:_0xb59f[620],STYLE_IMAGE_BACKGROUND:_0xb59f[621],STYLE_IMAGE_BORDER:_0xb59f[622],STYLE_FLIPH:_0xb59f[623],STYLE_FLIPV:_0xb59f[624],STYLE_NOLABEL:_0xb59f[625],STYLE_NOEDGESTYLE:_0xb59f[626],STYLE_LABEL_BACKGROUNDCOLOR:_0xb59f[627],STYLE_LABEL_BORDERCOLOR:_0xb59f[628],STYLE_LABEL_PADDING:_0xb59f[629],STYLE_INDICATOR_SHAPE:_0xb59f[630],STYLE_INDICATOR_IMAGE:_0xb59f[631],STYLE_INDICATOR_COLOR:_0xb59f[632],STYLE_INDICATOR_STROKECOLOR:_0xb59f[633],STYLE_INDICATOR_GRADIENTCOLOR:_0xb59f[634],STYLE_INDICATOR_SPACING:_0xb59f[635],STYLE_INDICATOR_WIDTH:_0xb59f[636],STYLE_INDICATOR_HEIGHT:_0xb59f[637],STYLE_INDICATOR_DIRECTION:_0xb59f[638],STYLE_SHADOW:_0xb59f[639],STYLE_SEGMENT:_0xb59f[640],STYLE_ENDARROW:_0xb59f[641],STYLE_STARTARROW:_0xb59f[642],STYLE_ENDSIZE:_0xb59f[643],STYLE_STARTSIZE:_0xb59f[644],STYLE_SWIMLANE_LINE:_0xb59f[645],STYLE_ENDFILL:_0xb59f[646],STYLE_STARTFILL:_0xb59f[647],STYLE_DASHED:_0xb59f[648],STYLE_DASH_PATTERN:_0xb59f[649],STYLE_ROUNDED:_0xb59f[650],STYLE_CURVED:_0xb59f[651],STYLE_ARCSIZE:_0xb59f[652],STYLE_SMOOTH:_0xb59f[653],STYLE_SOURCE_PERIMETER_SPACING:_0xb59f[654],STYLE_TARGET_PERIMETER_SPACING:_0xb59f[655],STYLE_PERIMETER_SPACING:_0xb59f[656],STYLE_SPACING:_0xb59f[657],STYLE_SPACING_TOP:_0xb59f[658],STYLE_SPACING_LEFT:_0xb59f[659],STYLE_SPACING_BOTTOM:_0xb59f[660],STYLE_SPACING_RIGHT:_0xb59f[661],STYLE_HORIZONTAL:_0xb59f[662],STYLE_DIRECTION:_0xb59f[663],STYLE_ELBOW:_0xb59f[664],STYLE_FONTCOLOR:_0xb59f[665],STYLE_FONTFAMILY:_0xb59f[486],STYLE_FONTSIZE:_0xb59f[487],STYLE_FONTSTYLE:_0xb59f[666],STYLE_AUTOSIZE:_0xb59f[667],STYLE_FOLDABLE:_0xb59f[668],STYLE_EDITABLE:_0xb59f[669],STYLE_BENDABLE:_0xb59f[670],STYLE_MOVABLE:_0xb59f[671],STYLE_RESIZABLE:_0xb59f[672],STYLE_CLONEABLE:_0xb59f[673],STYLE_DELETABLE:_0xb59f[674],STYLE_SHAPE:_0xb59f[253],STYLE_EDGE:_0xb59f[675],STYLE_LOOP:_0xb59f[676],STYLE_ROUTING_CENTER_X:_0xb59f[677],STYLE_ROUTING_CENTER_Y:_0xb59f[678],FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:_0xb59f[679],SHAPE_ELLIPSE:_0xb59f[680],SHAPE_DOUBLE_ELLIPSE:_0xb59f[681],SHAPE_RHOMBUS:_0xb59f[682],SHAPE_LINE:_0xb59f[683],SHAPE_IMAGE:_0xb59f[618],SHAPE_ARROW:_0xb59f[684],SHAPE_LABEL:_0xb59f[685],SHAPE_CYLINDER:_0xb59f[686],SHAPE_SWIMLANE:_0xb59f[687],SHAPE_CONNECTOR:_0xb59f[688],SHAPE_ACTOR:_0xb59f[689],SHAPE_CLOUD:_0xb59f[690],SHAPE_TRIANGLE:_0xb59f[691],SHAPE_HEXAGON:_0xb59f[692],ARROW_CLASSIC:_0xb59f[693],ARROW_BLOCK:_0xb59f[694],ARROW_OPEN:_0xb59f[392],ARROW_OVAL:_0xb59f[695],ARROW_DIAMOND:_0xb59f[696],ARROW_DIAMOND_THIN:_0xb59f[697],ALIGN_LEFT:_0xb59f[361],ALIGN_CENTER:_0xb59f[698],ALIGN_RIGHT:_0xb59f[699],ALIGN_TOP:_0xb59f[125],ALIGN_MIDDLE:_0xb59f[554],ALIGN_BOTTOM:_0xb59f[553],DIRECTION_NORTH:_0xb59f[700],DIRECTION_SOUTH:_0xb59f[701],DIRECTION_EAST:_0xb59f[702],DIRECTION_WEST:_0xb59f[703],DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:_0xb59f[704],ELBOW_HORIZONTAL:_0xb59f[662],EDGESTYLE_ELBOW:_0xb59f[705],EDGESTYLE_ENTITY_RELATION:_0xb59f[706],EDGESTYLE_LOOP:_0xb59f[707],EDGESTYLE_SIDETOSIDE:_0xb59f[708],EDGESTYLE_TOPTOBOTTOM:_0xb59f[709],EDGESTYLE_ORTHOGONAL:_0xb59f[710],EDGESTYLE_SEGMENT:_0xb59f[711],PERIMETER_ELLIPSE:_0xb59f[712],PERIMETER_RECTANGLE:_0xb59f[713],PERIMETER_RHOMBUS:_0xb59f[714],PERIMETER_TRIANGLE:_0xb59f[715]};function mxEventObject(_0x6b6cx2){this[_0xb59f[298]]=_0x6b6cx2;this[_0xb59f[716]]=[];for(var _0x6b6cx3=1;_0x6b6cx3<arguments[_0xb59f[67]];_0x6b6cx3+=2){null!=arguments[_0x6b6cx3+1]&&(this[_0xb59f[716]][arguments[_0x6b6cx3]]=arguments[_0x6b6cx3+1])}}mxEventObject[_0xb59f[202]][_0xb59f[298]]=null;mxEventObject[_0xb59f[202]][_0xb59f[716]]=null;mxEventObject[_0xb59f[202]][_0xb59f[717]]= !1;mxEventObject[_0xb59f[202]][_0xb59f[718]]=function(){return this[_0xb59f[298]]};mxEventObject[_0xb59f[202]][_0xb59f[719]]=function(){return this[_0xb59f[716]]};mxEventObject[_0xb59f[202]][_0xb59f[720]]=function(_0x6b6cx2){return this[_0xb59f[716]][_0x6b6cx2]};mxEventObject[_0xb59f[202]][_0xb59f[721]]=function(){return this[_0xb59f[717]]};mxEventObject[_0xb59f[202]][_0xb59f[722]]=function(){this[_0xb59f[717]]= !0};function mxMouseEvent(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[723]]=_0x6b6cx2;this[_0xb59f[724]]=_0x6b6cx3}mxMouseEvent[_0xb59f[202]][_0xb59f[717]]= !1;mxMouseEvent[_0xb59f[202]][_0xb59f[723]]=null;mxMouseEvent[_0xb59f[202]][_0xb59f[725]]=null;mxMouseEvent[_0xb59f[202]][_0xb59f[726]]=null;mxMouseEvent[_0xb59f[202]][_0xb59f[724]]=null;mxMouseEvent[_0xb59f[202]][_0xb59f[727]]=function(){return this[_0xb59f[723]]};mxMouseEvent[_0xb59f[202]][_0xb59f[728]]=function(){return mxEvent[_0xb59f[728]](this[_0xb59f[723]])};mxMouseEvent[_0xb59f[202]][_0xb59f[729]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){for(var _0x6b6cx3=this[_0xb59f[728]]();null!=_0x6b6cx3;){if(_0x6b6cx3==_0x6b6cx2[_0xb59f[252]]){return !0};_0x6b6cx3=_0x6b6cx3[_0xb59f[265]]}};return !1};mxMouseEvent[_0xb59f[202]][_0xb59f[730]]=function(){return mxEvent[_0xb59f[731]](this[_0xb59f[727]]())};mxMouseEvent[_0xb59f[202]][_0xb59f[732]]=function(){return mxEvent[_0xb59f[733]](this[_0xb59f[727]]())};mxMouseEvent[_0xb59f[202]][_0xb59f[734]]=function(){return this[_0xb59f[725]]};mxMouseEvent[_0xb59f[202]][_0xb59f[735]]=function(){return this[_0xb59f[726]]};mxMouseEvent[_0xb59f[202]][_0xb59f[248]]=function(){return this[_0xb59f[724]]};mxMouseEvent[_0xb59f[202]][_0xb59f[736]]=function(){var _0x6b6cx2=this[_0xb59f[248]]();return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[246]]:null};mxMouseEvent[_0xb59f[202]][_0xb59f[737]]=function(){return mxEvent[_0xb59f[737]](this[_0xb59f[727]]())};mxMouseEvent[_0xb59f[202]][_0xb59f[721]]=function(){return this[_0xb59f[717]]};mxMouseEvent[_0xb59f[202]][_0xb59f[722]]=function(_0x6b6cx2){(null!=_0x6b6cx2?_0x6b6cx2:1)&&this[_0xb59f[723]][_0xb59f[738]]&&this[_0xb59f[723]][_0xb59f[738]]();this[_0xb59f[723]][_0xb59f[739]]= !1;this[_0xb59f[717]]= !0};function mxEventSource(_0x6b6cx2){this[_0xb59f[740]](_0x6b6cx2)}mxEventSource[_0xb59f[202]][_0xb59f[741]]=null;mxEventSource[_0xb59f[202]][_0xb59f[742]]= !0;mxEventSource[_0xb59f[202]][_0xb59f[743]]=null;mxEventSource[_0xb59f[202]][_0xb59f[503]]=function(){return this[_0xb59f[742]]};mxEventSource[_0xb59f[202]][_0xb59f[504]]=function(_0x6b6cx2){this[_0xb59f[742]]=_0x6b6cx2};mxEventSource[_0xb59f[202]][_0xb59f[744]]=function(){return this[_0xb59f[743]]};mxEventSource[_0xb59f[202]][_0xb59f[740]]=function(_0x6b6cx2){this[_0xb59f[743]]=_0x6b6cx2};mxEventSource[_0xb59f[202]][_0xb59f[169]]=function(_0x6b6cx2,_0x6b6cx3){null==this[_0xb59f[741]]&&(this[_0xb59f[741]]=[]);this[_0xb59f[741]][_0xb59f[207]](_0x6b6cx2);this[_0xb59f[741]][_0xb59f[207]](_0x6b6cx3)};mxEventSource[_0xb59f[202]][_0xb59f[745]]=function(_0x6b6cx2){if(null!=this[_0xb59f[741]]){for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[741]][_0xb59f[67]];){this[_0xb59f[741]][_0x6b6cx3+1]==_0x6b6cx2?this[_0xb59f[741]][_0xb59f[300]](_0x6b6cx3,2):_0x6b6cx3+=2}}};mxEventSource[_0xb59f[202]][_0xb59f[746]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=this[_0xb59f[741]]&&this[_0xb59f[503]]()){null==_0x6b6cx2&&(_0x6b6cx2= new mxEventObject);null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[744]]());null==_0x6b6cx3&&(_0x6b6cx3=this);for(var _0x6b6cx4=[_0x6b6cx3,_0x6b6cx2],_0x6b6cx5=0;_0x6b6cx5<this[_0xb59f[741]][_0xb59f[67]];_0x6b6cx5+=2){var _0x6b6cx9=this[_0xb59f[741]][_0x6b6cx5];(null==_0x6b6cx9||_0x6b6cx9==_0x6b6cx2[_0xb59f[718]]())&&this[_0xb59f[741]][_0x6b6cx5+1][_0xb59f[183]](this,_0x6b6cx4)}}};var mxEvent={objects:[],addListener:function(){var _0x6b6cx2=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){null==_0x6b6cx2[_0xb59f[69]]&&(_0x6b6cx2[_0xb59f[69]]=[],mxEvent[_0xb59f[68]][_0xb59f[207]](_0x6b6cx2));_0x6b6cx2[_0xb59f[69]][_0xb59f[207]]({name:_0x6b6cx4,f:_0x6b6cx5})};return window[_0xb59f[418]]?function(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3[_0xb59f[418]](_0x6b6cx4,_0x6b6cx5,!1);_0x6b6cx2(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)}:function(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3[_0xb59f[108]](_0xb59f[747]+_0x6b6cx4,_0x6b6cx5);_0x6b6cx2(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)}}(),removeListener:function(){var _0x6b6cx2=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx2[_0xb59f[69]]){_0x6b6cx4=_0x6b6cx2[_0xb59f[69]][_0xb59f[67]];for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx4;_0x6b6cx9++){if(_0x6b6cx2[_0xb59f[69]][_0x6b6cx9][_0xb59f[748]]==_0x6b6cx5){_0x6b6cx2[_0xb59f[69]][_0xb59f[300]](_0x6b6cx9,1);break}};0==_0x6b6cx2[_0xb59f[69]][_0xb59f[67]]&&(_0x6b6cx2[_0xb59f[69]]=null)}};return window[_0xb59f[749]]?function(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3[_0xb59f[749]](_0x6b6cx4,_0x6b6cx5,!1);_0x6b6cx2(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)}:function(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3[_0xb59f[750]](_0xb59f[747]+_0x6b6cx4,_0x6b6cx5);_0x6b6cx2(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)}}(),removeAllListeners:function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[69]];if(null!=_0x6b6cx3){for(;0<_0x6b6cx3[_0xb59f[67]];){var _0x6b6cx4=_0x6b6cx3[0];mxEvent[_0xb59f[745]](_0x6b6cx2,_0x6b6cx4[_0xb59f[298]],_0x6b6cx4[_0xb59f[748]])}}},addGestureListeners:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){null!=_0x6b6cx3&&mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[751],_0x6b6cx3);null!=_0x6b6cx4&&mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[752],_0x6b6cx4);null!=_0x6b6cx5&&mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[753],_0x6b6cx5);mxClient[_0xb59f[754]]&&(null!=_0x6b6cx3&&mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[755],_0x6b6cx3),null!=_0x6b6cx4&&mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[756],_0x6b6cx4),null!=_0x6b6cx5&&mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[757],_0x6b6cx5))},removeGestureListeners:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){null!=_0x6b6cx3&&mxEvent[_0xb59f[745]](_0x6b6cx2,_0xb59f[751],_0x6b6cx3);null!=_0x6b6cx4&&mxEvent[_0xb59f[745]](_0x6b6cx2,_0xb59f[752],_0x6b6cx4);null!=_0x6b6cx5&&mxEvent[_0xb59f[745]](_0x6b6cx2,_0xb59f[753],_0x6b6cx5);mxClient[_0xb59f[754]]&&(null!=_0x6b6cx3&&mxEvent[_0xb59f[745]](_0x6b6cx2,_0xb59f[755],_0x6b6cx3),null!=_0x6b6cx4&&mxEvent[_0xb59f[745]](_0x6b6cx2,_0xb59f[756],_0x6b6cx4),null!=_0x6b6cx5&&mxEvent[_0xb59f[745]](_0x6b6cx2,_0xb59f[757],_0x6b6cx5))},redirectMouseEvents:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){var _0x6b6cx13=function(_0x6b6cx2){return _0xb59f[279]== typeof _0x6b6cx4?_0x6b6cx4(_0x6b6cx2):_0x6b6cx4};mxEvent[_0xb59f[759]](_0x6b6cx2,function(_0x6b6cx2){null!=_0x6b6cx5?_0x6b6cx5(_0x6b6cx2):mxEvent[_0xb59f[721]](_0x6b6cx2)||_0x6b6cx3[_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx2,_0x6b6cx13(_0x6b6cx2)))},function(_0x6b6cx2){null!=_0x6b6cx9?_0x6b6cx9(_0x6b6cx2):mxEvent[_0xb59f[721]](_0x6b6cx2)||_0x6b6cx3[_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx2,_0x6b6cx13(_0x6b6cx2)))},function(_0x6b6cx2){null!=_0x6b6cxa?_0x6b6cxa(_0x6b6cx2):mxEvent[_0xb59f[721]](_0x6b6cx2)||_0x6b6cx3[_0xb59f[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6b6cx2,_0x6b6cx13(_0x6b6cx2)))});mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[760],function(_0x6b6cx2){if(null!=_0x6b6cx12){_0x6b6cx12(_0x6b6cx2)}else {if(!mxEvent[_0xb59f[721]](_0x6b6cx2)){var _0x6b6cx4=_0x6b6cx13(_0x6b6cx2);_0x6b6cx3[_0xb59f[761]](_0x6b6cx2,null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[246]]:null)}}})},release:function(_0x6b6cx2){if(null!=_0x6b6cx2&&(mxEvent[_0xb59f[70]](_0x6b6cx2),_0x6b6cx2=_0x6b6cx2[_0xb59f[271]],null!=_0x6b6cx2)){for(var _0x6b6cx3=_0x6b6cx2[_0xb59f[67]],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3;_0x6b6cx4+=1){mxEvent[_0xb59f[762]](_0x6b6cx2[_0x6b6cx4])}}},addMouseWheelListener:function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=function(_0x6b6cx3){null==_0x6b6cx3&&(_0x6b6cx3=window[_0xb59f[763]]);var _0x6b6cx5=0,_0x6b6cx5=mxClient[_0xb59f[133]]&&!mxClient[_0xb59f[75]]&&!mxClient[_0xb59f[76]]?-_0x6b6cx3[_0xb59f[764]]/2:_0x6b6cx3[_0xb59f[765]]/120;0!=_0x6b6cx5&&_0x6b6cx2(_0x6b6cx3,0<_0x6b6cx5)};mxClient[_0xb59f[133]]?mxEvent[_0xb59f[169]](window,mxClient[_0xb59f[75]]||mxClient[_0xb59f[76]]?_0xb59f[766]:_0xb59f[767],_0x6b6cx3):mxEvent[_0xb59f[169]](document,_0xb59f[766],_0x6b6cx3)}},disableContextMenu:function(){return mxClient[_0xb59f[80]]&&(_0xb59f[82]=== typeof document[_0xb59f[5]]||9>document[_0xb59f[5]])?function(_0x6b6cx2){mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[768],function(){return !1})}:function(_0x6b6cx2){_0x6b6cx2[_0xb59f[57]](_0xb59f[769],_0xb59f[770])}}(),getSource:function(_0x6b6cx2){return null!=_0x6b6cx2[_0xb59f[771]]?_0x6b6cx2[_0xb59f[771]]:_0x6b6cx2[_0xb59f[772]]},isConsumed:function(_0x6b6cx2){return null!=_0x6b6cx2[_0xb59f[721]]&&_0x6b6cx2[_0xb59f[721]]},isLeftMouseButton:function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[172]]==(mxClient[_0xb59f[80]]&&(_0xb59f[82]=== typeof document[_0xb59f[5]]||9>document[_0xb59f[5]])?1:0)},isRightMouseButton:function(_0x6b6cx2){return 2==_0x6b6cx2[_0xb59f[172]]},isPopupTrigger:function(_0x6b6cx2){return mxEvent[_0xb59f[773]](_0x6b6cx2)||mxEvent[_0xb59f[774]](_0x6b6cx2)&&!mxEvent[_0xb59f[775]](_0x6b6cx2)},isShiftDown:function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[776]]:!1},isAltDown:function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[777]]:!1},isControlDown:function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[778]]:!1},isMetaDown:function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[779]]:!1},getMainEvent:function(_0x6b6cx2){(_0xb59f[755]==_0x6b6cx2[_0xb59f[60]]||_0xb59f[756]==_0x6b6cx2[_0xb59f[60]])&&null!=_0x6b6cx2[_0xb59f[780]]&&null!=_0x6b6cx2[_0xb59f[780]][0]?_0x6b6cx2=_0x6b6cx2[_0xb59f[780]][0]:_0xb59f[757]==_0x6b6cx2[_0xb59f[60]]&&(null!=_0x6b6cx2[_0xb59f[781]]&&null!=_0x6b6cx2[_0xb59f[781]][0])&&(_0x6b6cx2=_0x6b6cx2[_0xb59f[781]][0]);return _0x6b6cx2},getClientX:function(_0x6b6cx2){return mxEvent[_0xb59f[783]](_0x6b6cx2)[_0xb59f[782]]},getClientY:function(_0x6b6cx2){return mxEvent[_0xb59f[783]](_0x6b6cx2)[_0xb59f[784]]},consume:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;if(null!=_0x6b6cx3?_0x6b6cx3:1){_0x6b6cx2[_0xb59f[738]]?(_0x6b6cx4&&_0x6b6cx2[_0xb59f[785]](),_0x6b6cx2[_0xb59f[738]]()):_0x6b6cx4&&(_0x6b6cx2[_0xb59f[786]]= !0)};_0x6b6cx2[_0xb59f[721]]= !0;_0x6b6cx2[_0xb59f[739]]= !1},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:_0xb59f[787],MOUSE_MOVE:_0xb59f[788],MOUSE_UP:_0xb59f[789],ACTIVATE:_0xb59f[790],RESIZE_START:_0xb59f[791],RESIZE:_0xb59f[129],RESIZE_END:_0xb59f[792],MOVE_START:_0xb59f[793],MOVE:_0xb59f[582],MOVE_END:_0xb59f[794],PAN_START:_0xb59f[795],PAN:_0xb59f[796],PAN_END:_0xb59f[797],MINIMIZE:_0xb59f[798],NORMALIZE:_0xb59f[799],MAXIMIZE:_0xb59f[800],HIDE:_0xb59f[801],SHOW:_0xb59f[539],CLOSE:_0xb59f[268],DESTROY:_0xb59f[515],REFRESH:_0xb59f[802],SIZE:_0xb59f[803],SELECT:_0xb59f[804],FIRED:_0xb59f[805],GET:_0xb59f[203],RECEIVE:_0xb59f[806],CONNECT:_0xb59f[807],DISCONNECT:_0xb59f[808],SUSPEND:_0xb59f[809],RESUME:_0xb59f[810],MARK:_0xb59f[811],SESSION:_0xb59f[812],ROOT:_0xb59f[813],POST:_0xb59f[814],OPEN:_0xb59f[392],SAVE:_0xb59f[815],BEFORE_ADD_VERTEX:_0xb59f[816],ADD_VERTEX:_0xb59f[817],AFTER_ADD_VERTEX:_0xb59f[818],DONE:_0xb59f[819],EXECUTE:_0xb59f[350],EXECUTED:_0xb59f[820],BEGIN_UPDATE:_0xb59f[473],START_EDIT:_0xb59f[821],END_UPDATE:_0xb59f[476],END_EDIT:_0xb59f[822],BEFORE_UNDO:_0xb59f[823],UNDO:_0xb59f[824],REDO:_0xb59f[825],CHANGE:_0xb59f[826],NOTIFY:_0xb59f[827],LAYOUT_CELLS:_0xb59f[828],CLICK:_0xb59f[173],SCALE:_0xb59f[255],TRANSLATE:_0xb59f[513],SCALE_AND_TRANSLATE:_0xb59f[829],UP:_0xb59f[830],DOWN:_0xb59f[831],ADD:_0xb59f[99],REMOVE:_0xb59f[205],CLEAR:_0xb59f[200],ADD_CELLS:_0xb59f[832],CELLS_ADDED:_0xb59f[833],MOVE_CELLS:_0xb59f[834],CELLS_MOVED:_0xb59f[835],RESIZE_CELLS:_0xb59f[836],CELLS_RESIZED:_0xb59f[837],TOGGLE_CELLS:_0xb59f[838],CELLS_TOGGLED:_0xb59f[839],ORDER_CELLS:_0xb59f[840],CELLS_ORDERED:_0xb59f[841],REMOVE_CELLS:_0xb59f[842],CELLS_REMOVED:_0xb59f[843],GROUP_CELLS:_0xb59f[844],UNGROUP_CELLS:_0xb59f[845],REMOVE_CELLS_FROM_PARENT:_0xb59f[846],FOLD_CELLS:_0xb59f[847],CELLS_FOLDED:_0xb59f[848],ALIGN_CELLS:_0xb59f[849],LABEL_CHANGED:_0xb59f[850],CONNECT_CELL:_0xb59f[851],CELL_CONNECTED:_0xb59f[852],SPLIT_EDGE:_0xb59f[853],FLIP_EDGE:_0xb59f[854],START_EDITING:_0xb59f[855],ADD_OVERLAY:_0xb59f[856],REMOVE_OVERLAY:_0xb59f[857],UPDATE_CELL_SIZE:_0xb59f[858],ESCAPE:_0xb59f[859],CLICK:_0xb59f[173],DOUBLE_CLICK:_0xb59f[860],START:_0xb59f[861],RESET:_0xb59f[862]};function mxXmlRequest(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[863]]=_0x6b6cx2;this[_0xb59f[864]]=_0x6b6cx3;this[_0xb59f[865]]=_0x6b6cx4||_0xb59f[866];this[_0xb59f[307]]=null!=_0x6b6cx5?_0x6b6cx5:!0;this[_0xb59f[867]]=_0x6b6cx9;this[_0xb59f[868]]=_0x6b6cxa}mxXmlRequest[_0xb59f[202]][_0xb59f[863]]=null;mxXmlRequest[_0xb59f[202]][_0xb59f[864]]=null;mxXmlRequest[_0xb59f[202]][_0xb59f[865]]=null;mxXmlRequest[_0xb59f[202]][_0xb59f[307]]=null;mxXmlRequest[_0xb59f[202]][_0xb59f[869]]= !1;mxXmlRequest[_0xb59f[202]][_0xb59f[867]]=null;mxXmlRequest[_0xb59f[202]][_0xb59f[868]]=null;mxXmlRequest[_0xb59f[202]][_0xb59f[870]]=null;mxXmlRequest[_0xb59f[202]][_0xb59f[871]]=function(){return this[_0xb59f[869]]};mxXmlRequest[_0xb59f[202]][_0xb59f[872]]=function(_0x6b6cx2){this[_0xb59f[869]]=_0x6b6cx2};mxXmlRequest[_0xb59f[202]][_0xb59f[221]]=function(){return this[_0xb59f[870]][_0xb59f[873]]};mxXmlRequest[_0xb59f[202]][_0xb59f[220]]=function(){return 4==this[_0xb59f[870]][_0xb59f[417]]};mxXmlRequest[_0xb59f[202]][_0xb59f[874]]=function(){var _0x6b6cx2=this[_0xb59f[875]]();return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[158]]:null};mxXmlRequest[_0xb59f[202]][_0xb59f[875]]=function(){var _0x6b6cx2=this[_0xb59f[870]][_0xb59f[876]];if(9<=document[_0xb59f[5]]||null==_0x6b6cx2||null==_0x6b6cx2[_0xb59f[158]]){_0x6b6cx2=mxUtils[_0xb59f[877]](this[_0xb59f[870]][_0xb59f[873]])};return _0x6b6cx2};mxXmlRequest[_0xb59f[202]][_0xb59f[221]]=function(){return this[_0xb59f[870]][_0xb59f[873]]};mxXmlRequest[_0xb59f[202]][_0xb59f[878]]=function(){return this[_0xb59f[870]][_0xb59f[879]]};mxXmlRequest[_0xb59f[202]][_0xb59f[385]]=function(){if(window[_0xb59f[880]]){return function(){var _0x6b6cx2= new XMLHttpRequest;this[_0xb59f[871]]()&&_0x6b6cx2[_0xb59f[881]]&&_0x6b6cx2[_0xb59f[881]](_0xb59f[882]);return _0x6b6cx2}};if(_0xb59f[82]!= typeof ActiveXObject){return function(){return  new ActiveXObject(_0xb59f[883])}}}();mxXmlRequest[_0xb59f[202]][_0xb59f[414]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[870]]=this[_0xb59f[385]]();null!=this[_0xb59f[870]]&&(null!=_0x6b6cx2&&(this[_0xb59f[870]][_0xb59f[416]]=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[220]]()&&(_0x6b6cx2(this),this[_0xb59f[884]]=null)})),this[_0xb59f[870]][_0xb59f[392]](this[_0xb59f[865]],this[_0xb59f[863]],this[_0xb59f[307]],this[_0xb59f[867]],this[_0xb59f[868]]),this[_0xb59f[886]](this[_0xb59f[870]],this[_0xb59f[864]]),this[_0xb59f[870]][_0xb59f[414]](this[_0xb59f[864]]))};mxXmlRequest[_0xb59f[202]][_0xb59f[886]]=function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[889]](_0xb59f[887],_0xb59f[888])};mxXmlRequest[_0xb59f[202]][_0xb59f[415]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2=_0x6b6cx2||document;var _0x6b6cx4=null;_0x6b6cx2==document&&(_0x6b6cx4=window[_0xb59f[890]],window[_0xb59f[890]]=null);var _0x6b6cx5=_0x6b6cx2[_0xb59f[55]](_0xb59f[891]);_0x6b6cx5[_0xb59f[57]](_0xb59f[865],this[_0xb59f[865]]);_0x6b6cx5[_0xb59f[57]](_0xb59f[892],this[_0xb59f[863]]);null!=_0x6b6cx3&&_0x6b6cx5[_0xb59f[57]](_0xb59f[772],_0x6b6cx3);_0x6b6cx5[_0xb59f[124]][_0xb59f[495]]=_0xb59f[130];_0x6b6cx5[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];for(var _0x6b6cx9=0<this[_0xb59f[864]][_0xb59f[2]](_0xb59f[893])?this[_0xb59f[864]][_0xb59f[224]](_0xb59f[893]):this[_0xb59f[864]][_0xb59f[224]](),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx9[_0x6b6cxa][_0xb59f[2]](_0xb59f[226]);if(0<_0x6b6cx12){var _0x6b6cx13=_0x6b6cx9[_0x6b6cxa][_0xb59f[85]](0,_0x6b6cx12),_0x6b6cx14=_0x6b6cx9[_0x6b6cxa][_0xb59f[85]](_0x6b6cx12+1),_0x6b6cx12=_0x6b6cx2[_0xb59f[55]](_0xb59f[126]);_0x6b6cx12[_0xb59f[57]](_0xb59f[298],_0x6b6cx13);_0x6b6cx14=_0x6b6cx14[_0xb59f[230]](/\n/g,_0xb59f[336]);_0x6b6cx13=_0x6b6cx2[_0xb59f[344]](_0x6b6cx14);_0x6b6cx12[_0xb59f[62]](_0x6b6cx13);_0x6b6cx5[_0xb59f[62]](_0x6b6cx12)}};_0x6b6cx2[_0xb59f[112]][_0xb59f[62]](_0x6b6cx5);_0x6b6cx5[_0xb59f[894]]();_0x6b6cx2[_0xb59f[112]][_0xb59f[266]](_0x6b6cx5);null!=_0x6b6cx4&&(window[_0xb59f[890]]=_0x6b6cx4)};var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,isEmpty:function(){return null==mxClipboard[_0xb59f[895]]},cut:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=mxClipboard[_0xb59f[149]](_0x6b6cx2,_0x6b6cx3);mxClipboard[_0xb59f[896]]=0;mxClipboard[_0xb59f[842]](_0x6b6cx2,_0x6b6cx3);return _0x6b6cx3},removeCells:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[842]](_0x6b6cx3)},copy:function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=_0x6b6cx3||_0x6b6cx2[_0xb59f[897]]();var _0x6b6cx4=_0x6b6cx2[_0xb59f[898]](_0x6b6cx3);mxClipboard[_0xb59f[896]]=1;mxClipboard[_0xb59f[895]]=_0x6b6cx2[_0xb59f[899]](_0x6b6cx4);return _0x6b6cx4},paste:function(_0x6b6cx2){if(null!=mxClipboard[_0xb59f[895]]){var _0x6b6cx3=_0x6b6cx2[_0xb59f[900]](mxClipboard[_0xb59f[895]]),_0x6b6cx4=mxClipboard[_0xb59f[896]]*mxClipboard[_0xb59f[901]],_0x6b6cx5=_0x6b6cx2[_0xb59f[902]](),_0x6b6cx3=_0x6b6cx2[_0xb59f[903]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx4,_0x6b6cx5);mxClipboard[_0xb59f[896]]++;_0x6b6cx2[_0xb59f[904]](_0x6b6cx3)}}};function mxWindow(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15){null!=_0x6b6cx3&&(_0x6b6cx12=null!=_0x6b6cx12?_0x6b6cx12:!0,this[_0xb59f[905]]=_0x6b6cx3,this[_0xb59f[176]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx15),this[_0xb59f[906]](),this[_0xb59f[907]](),this[_0xb59f[908]](),this[_0xb59f[909]](_0x6b6cx12),this[_0xb59f[910]](_0x6b6cx2),(null==_0x6b6cx13||_0x6b6cx13)&&this[_0xb59f[911]](),null!=_0x6b6cx14&&null!=_0x6b6cx14[_0xb59f[265]]?_0x6b6cx14[_0xb59f[265]][_0xb59f[912]](this[_0xb59f[485]],_0x6b6cx14):document[_0xb59f[112]][_0xb59f[62]](this[_0xb59f[485]]))}mxWindow[_0xb59f[202]]= new mxEventSource;mxWindow[_0xb59f[202]][_0xb59f[196]]=mxWindow;mxWindow[_0xb59f[202]][_0xb59f[913]]=mxClient[_0xb59f[88]]+_0xb59f[914];mxWindow[_0xb59f[202]][_0xb59f[915]]=mxClient[_0xb59f[88]]+_0xb59f[916];mxWindow[_0xb59f[202]][_0xb59f[917]]=mxClient[_0xb59f[88]]+_0xb59f[918];mxWindow[_0xb59f[202]][_0xb59f[919]]=mxClient[_0xb59f[88]]+_0xb59f[920];mxWindow[_0xb59f[202]][_0xb59f[921]]=mxClient[_0xb59f[88]]+_0xb59f[922];mxWindow[_0xb59f[202]][_0xb59f[189]]= !1;mxWindow[_0xb59f[202]][_0xb59f[905]]= !1;mxWindow[_0xb59f[202]][_0xb59f[923]]= new mxRectangle(0,0,50,40);mxWindow[_0xb59f[202]][_0xb59f[924]]= !1;mxWindow[_0xb59f[202]][_0xb59f[905]]= !1;mxWindow[_0xb59f[202]][_0xb59f[165]]= !0;mxWindow[_0xb59f[202]][_0xb59f[176]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx9=null!=_0x6b6cx9?_0x6b6cx9:_0xb59f[925];this[_0xb59f[485]]=document[_0xb59f[55]](_0xb59f[485]);this[_0xb59f[485]][_0xb59f[926]]=_0x6b6cx9;this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2+_0xb59f[168];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx3+_0xb59f[168];this[_0xb59f[116]]=document[_0xb59f[55]](_0xb59f[116]);this[_0xb59f[116]][_0xb59f[926]]=_0x6b6cx9;null!=_0x6b6cx4&&(mxClient[_0xb59f[80]]||(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx4+_0xb59f[168]),this[_0xb59f[116]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx4+_0xb59f[168]);null!=_0x6b6cx5&&(mxClient[_0xb59f[80]]||(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx5+_0xb59f[168]),this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx5+_0xb59f[168]);_0x6b6cx2=document[_0xb59f[55]](_0xb59f[120]);_0x6b6cx3=document[_0xb59f[55]](_0xb59f[121]);this[_0xb59f[924]]=document[_0xb59f[55]](_0xb59f[122]);this[_0xb59f[924]][_0xb59f[926]]=_0x6b6cx9+_0xb59f[927];_0x6b6cx3[_0xb59f[62]](this[_0xb59f[924]]);_0x6b6cx2[_0xb59f[62]](_0x6b6cx3);_0x6b6cx3=document[_0xb59f[55]](_0xb59f[121]);this[_0xb59f[122]]=document[_0xb59f[55]](_0xb59f[122]);this[_0xb59f[122]][_0xb59f[926]]=_0x6b6cx9+_0xb59f[928];this[_0xb59f[929]]=document[_0xb59f[55]](_0xb59f[485]);this[_0xb59f[929]][_0xb59f[926]]=_0x6b6cx9+_0xb59f[928];this[_0xb59f[929]][_0xb59f[124]][_0xb59f[117]]=_0xb59f[118];this[_0xb59f[929]][_0xb59f[62]](this[_0xb59f[905]]);if(mxClient[_0xb59f[80]]||_0xb59f[529]!=this[_0xb59f[905]][_0xb59f[301]][_0xb59f[36]]()){this[_0xb59f[929]][_0xb59f[124]][_0xb59f[119]]=_0xb59f[118]};this[_0xb59f[122]][_0xb59f[62]](this[_0xb59f[929]]);_0x6b6cx3[_0xb59f[62]](this[_0xb59f[122]]);_0x6b6cx2[_0xb59f[62]](_0x6b6cx3);this[_0xb59f[116]][_0xb59f[62]](_0x6b6cx2);this[_0xb59f[485]][_0xb59f[62]](this[_0xb59f[116]]);_0x6b6cx9=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[790]]()});mxEvent[_0xb59f[169]](this[_0xb59f[924]],_0xb59f[751],_0x6b6cx9);mxEvent[_0xb59f[169]](this[_0xb59f[116]],_0xb59f[751],_0x6b6cx9);mxClient[_0xb59f[754]]&&(mxEvent[_0xb59f[169]](this[_0xb59f[924]],_0xb59f[755],_0x6b6cx9),mxEvent[_0xb59f[169]](this[_0xb59f[116]],_0xb59f[755],_0x6b6cx9));this[_0xb59f[801]]()};mxWindow[_0xb59f[202]][_0xb59f[910]]=function(_0x6b6cx2){for(var _0x6b6cx3=this[_0xb59f[924]][_0xb59f[285]];null!=_0x6b6cx3;){var _0x6b6cx4=_0x6b6cx3[_0xb59f[287]];_0x6b6cx3[_0xb59f[288]]==mxConstants[_0xb59f[317]]&&_0x6b6cx3[_0xb59f[265]][_0xb59f[266]](_0x6b6cx3);_0x6b6cx3=_0x6b6cx4};mxUtils[_0xb59f[53]](this[_0xb59f[924]],_0x6b6cx2||_0xb59f[110])};mxWindow[_0xb59f[202]][_0xb59f[162]]=function(_0x6b6cx2){0>navigator[_0xb59f[3]][_0xb59f[2]](_0xb59f[186])&&(this[_0xb59f[929]][_0xb59f[124]][_0xb59f[277]]=_0x6b6cx2?_0xb59f[278]:_0xb59f[188])};mxWindow[_0xb59f[202]][_0xb59f[790]]=function(){if(mxWindow[_0xb59f[930]]!=this){var _0x6b6cx2=mxUtils[_0xb59f[275]](this[_0xb59f[166]]()),_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[931]]:3;if(mxWindow[_0xb59f[930]]){var _0x6b6cx3=mxWindow[_0xb59f[930]][_0xb59f[166]]();null!=_0x6b6cx3&&null!=_0x6b6cx3[_0xb59f[124]]&&(_0x6b6cx3[_0xb59f[124]][_0xb59f[931]]=_0x6b6cx2)};_0x6b6cx3=mxWindow[_0xb59f[930]];this[_0xb59f[166]]()[_0xb59f[124]][_0xb59f[931]]=parseInt(_0x6b6cx2)+1;mxWindow[_0xb59f[930]]=this;this[_0xb59f[746]]( new mxEventObject(mxEvent.ACTIVATE,_0xb59f[932],_0x6b6cx3))}};mxWindow[_0xb59f[202]][_0xb59f[166]]=function(){return this[_0xb59f[485]]};mxWindow[_0xb59f[202]][_0xb59f[933]]=function(){mxUtils[_0xb59f[933]](this[_0xb59f[485]])};mxWindow[_0xb59f[202]][_0xb59f[934]]=function(){return null!=this[_0xb59f[129]]?_0xb59f[130]!=this[_0xb59f[129]][_0xb59f[124]][_0xb59f[495]]:!1};mxWindow[_0xb59f[202]][_0xb59f[163]]=function(_0x6b6cx2){_0x6b6cx2?null==this[_0xb59f[129]]?(this[_0xb59f[129]]=document[_0xb59f[55]](_0xb59f[466]),this[_0xb59f[129]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492],this[_0xb59f[129]][_0xb59f[124]][_0xb59f[553]]=_0xb59f[935],this[_0xb59f[129]][_0xb59f[124]][_0xb59f[699]]=_0xb59f[935],this[_0xb59f[129]][_0xb59f[57]](_0xb59f[390],mxClient[_0xb59f[88]]+_0xb59f[922]),this[_0xb59f[129]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[936],mxEvent[_0xb59f[759]](this[_0xb59f[129]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[790]]();var _0x6b6cx4=mxEvent[_0xb59f[731]](_0x6b6cx2),_0x6b6cx5=mxEvent[_0xb59f[733]](_0x6b6cx2),_0x6b6cx9=this[_0xb59f[485]][_0xb59f[359]],_0x6b6cxa=this[_0xb59f[485]][_0xb59f[167]],_0x6b6cx12=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){var _0x6b6cx3=mxEvent[_0xb59f[731]](_0x6b6cx2)-_0x6b6cx4,_0x6b6cx12=mxEvent[_0xb59f[733]](_0x6b6cx2)-_0x6b6cx5;this[_0xb59f[937]](_0x6b6cx9+_0x6b6cx3,_0x6b6cxa+_0x6b6cx12);this[_0xb59f[746]]( new mxEventObject(mxEvent.RESIZE,_0xb59f[763],_0x6b6cx2));mxEvent[_0xb59f[722]](_0x6b6cx2)}),_0x6b6cx13=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){mxEvent[_0xb59f[938]](document,null,_0x6b6cx12,_0x6b6cx13);this[_0xb59f[746]]( new mxEventObject(mxEvent.RESIZE_END,_0xb59f[763],_0x6b6cx2));mxEvent[_0xb59f[722]](_0x6b6cx2)});mxEvent[_0xb59f[759]](document,null,_0x6b6cx12,_0x6b6cx13);this[_0xb59f[746]]( new mxEventObject(mxEvent.RESIZE_START,_0xb59f[763],_0x6b6cx2));mxEvent[_0xb59f[722]](_0x6b6cx2)}),null,null),this[_0xb59f[485]][_0xb59f[62]](this[_0xb59f[129]])):this[_0xb59f[129]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[497]:null!=this[_0xb59f[129]]&&(this[_0xb59f[129]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130])};mxWindow[_0xb59f[202]][_0xb59f[937]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2=Math[_0xb59f[160]](this[_0xb59f[923]][_0xb59f[117]],_0x6b6cx2);_0x6b6cx3=Math[_0xb59f[160]](this[_0xb59f[923]][_0xb59f[119]],_0x6b6cx3);mxClient[_0xb59f[80]]||(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2+_0xb59f[168],this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3+_0xb59f[168]);this[_0xb59f[116]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2+_0xb59f[168];this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3+_0xb59f[168];mxClient[_0xb59f[80]]||(this[_0xb59f[929]][_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[485]][_0xb59f[167]]-this[_0xb59f[924]][_0xb59f[167]]-2+_0xb59f[168])};mxWindow[_0xb59f[202]][_0xb59f[909]]=function(_0x6b6cx2){this[_0xb59f[798]][_0xb59f[124]][_0xb59f[495]]=_0x6b6cx2?_0xb59f[110]:_0xb59f[130]};mxWindow[_0xb59f[202]][_0xb59f[939]]=function(){return  new mxRectangle(0,0,0,this[_0xb59f[924]][_0xb59f[167]])};mxWindow[_0xb59f[202]][_0xb59f[907]]=function(){this[_0xb59f[798]]=document[_0xb59f[55]](_0xb59f[466]);this[_0xb59f[798]][_0xb59f[57]](_0xb59f[390],this[_0xb59f[915]]);this[_0xb59f[798]][_0xb59f[57]](_0xb59f[611],_0xb59f[699]);this[_0xb59f[798]][_0xb59f[57]](_0xb59f[924],_0xb59f[940]);this[_0xb59f[798]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[356];this[_0xb59f[798]][_0xb59f[124]][_0xb59f[941]]=_0xb59f[942];this[_0xb59f[798]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130];this[_0xb59f[924]][_0xb59f[62]](this[_0xb59f[798]]);var _0x6b6cx2=!1,_0x6b6cx3=null,_0x6b6cx4=null,_0x6b6cx5=mxUtils[_0xb59f[885]](this,function(_0x6b6cx5){this[_0xb59f[790]]();if(_0x6b6cx2){_0x6b6cx2= !1,this[_0xb59f[798]][_0xb59f[57]](_0xb59f[390],this[_0xb59f[915]]),this[_0xb59f[798]][_0xb59f[57]](_0xb59f[924],_0xb59f[940]),this[_0xb59f[929]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[110],this[_0xb59f[800]][_0xb59f[124]][_0xb59f[495]]=_0x6b6cx3,mxClient[_0xb59f[80]]||(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx4),this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx4,null!=this[_0xb59f[129]]&&(this[_0xb59f[129]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[110]),this[_0xb59f[746]]( new mxEventObject(mxEvent.NORMALIZE,_0xb59f[763],_0x6b6cx5))}else {_0x6b6cx2= !0;this[_0xb59f[798]][_0xb59f[57]](_0xb59f[390],this[_0xb59f[917]]);this[_0xb59f[798]][_0xb59f[57]](_0xb59f[924],_0xb59f[943]);this[_0xb59f[929]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130];_0x6b6cx3=this[_0xb59f[800]][_0xb59f[124]][_0xb59f[495]];this[_0xb59f[800]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130];_0x6b6cx4=this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]];var _0x6b6cxa=this[_0xb59f[939]]();0<_0x6b6cxa[_0xb59f[119]]&&(mxClient[_0xb59f[80]]||(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cxa[_0xb59f[119]]+_0xb59f[168]),this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cxa[_0xb59f[119]]+_0xb59f[168]);0<_0x6b6cxa[_0xb59f[117]]&&(mxClient[_0xb59f[80]]||(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cxa[_0xb59f[117]]+_0xb59f[168]),this[_0xb59f[116]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cxa[_0xb59f[117]]+_0xb59f[168]);null!=this[_0xb59f[129]]&&(this[_0xb59f[129]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188]);this[_0xb59f[746]]( new mxEventObject(mxEvent.MINIMIZE,_0xb59f[763],_0x6b6cx5))};mxEvent[_0xb59f[722]](_0x6b6cx5)});mxEvent[_0xb59f[169]](this[_0xb59f[798]],_0xb59f[751],_0x6b6cx5);mxClient[_0xb59f[754]]&&mxEvent[_0xb59f[169]](this[_0xb59f[798]],_0xb59f[755],_0x6b6cx5)};mxWindow[_0xb59f[202]][_0xb59f[161]]=function(_0x6b6cx2){this[_0xb59f[800]][_0xb59f[124]][_0xb59f[495]]=_0x6b6cx2?_0xb59f[110]:_0xb59f[130]};mxWindow[_0xb59f[202]][_0xb59f[906]]=function(){this[_0xb59f[800]]=document[_0xb59f[55]](_0xb59f[466]);this[_0xb59f[800]][_0xb59f[57]](_0xb59f[390],this[_0xb59f[919]]);this[_0xb59f[800]][_0xb59f[57]](_0xb59f[611],_0xb59f[699]);this[_0xb59f[800]][_0xb59f[57]](_0xb59f[924],_0xb59f[944]);this[_0xb59f[800]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[583];this[_0xb59f[800]][_0xb59f[124]][_0xb59f[945]]=_0xb59f[942];this[_0xb59f[800]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[356];this[_0xb59f[800]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130];this[_0xb59f[924]][_0xb59f[62]](this[_0xb59f[800]]);var _0x6b6cx2=!1,_0x6b6cx3=null,_0x6b6cx4=null,_0x6b6cx5=null,_0x6b6cx9=null,_0x6b6cxa=mxUtils[_0xb59f[885]](this,function(_0x6b6cxa){this[_0xb59f[790]]();if(_0xb59f[130]!=this[_0xb59f[800]][_0xb59f[124]][_0xb59f[495]]){if(_0x6b6cx2){_0x6b6cx2= !1;this[_0xb59f[800]][_0xb59f[57]](_0xb59f[390],this[_0xb59f[919]]);this[_0xb59f[800]][_0xb59f[57]](_0xb59f[924],_0xb59f[944]);this[_0xb59f[929]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[110];this[_0xb59f[798]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[110];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx3+_0xb59f[168];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx4+_0xb59f[168];if(!mxClient[_0xb59f[80]]&&(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx5,this[_0xb59f[485]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx9,_0x6b6cx13=mxUtils[_0xb59f[275]](this[_0xb59f[929]]),_0xb59f[278]==_0x6b6cx13[_0xb59f[277]]||null!=this[_0xb59f[129]])){this[_0xb59f[929]][_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[485]][_0xb59f[167]]-this[_0xb59f[924]][_0xb59f[167]]-2+_0xb59f[168]};this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx5;this[_0xb59f[116]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx9;null!=this[_0xb59f[129]]&&(this[_0xb59f[129]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[110]);this[_0xb59f[746]]( new mxEventObject(mxEvent.NORMALIZE,_0xb59f[763],_0x6b6cxa))}else {_0x6b6cx2= !0;this[_0xb59f[800]][_0xb59f[57]](_0xb59f[390],this[_0xb59f[917]]);this[_0xb59f[800]][_0xb59f[57]](_0xb59f[924],_0xb59f[943]);this[_0xb59f[929]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[110];this[_0xb59f[798]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];_0x6b6cx3=parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]);_0x6b6cx4=parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]);_0x6b6cx5=this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]];_0x6b6cx9=this[_0xb59f[116]][_0xb59f[124]][_0xb59f[117]];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0xb59f[946];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=_0xb59f[946];mxClient[_0xb59f[80]]||(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=document[_0xb59f[112]][_0xb59f[157]]-2+_0xb59f[168],this[_0xb59f[485]][_0xb59f[124]][_0xb59f[117]]=document[_0xb59f[112]][_0xb59f[159]]-2+_0xb59f[168]);this[_0xb59f[116]][_0xb59f[124]][_0xb59f[117]]=document[_0xb59f[112]][_0xb59f[159]]-2+_0xb59f[168];this[_0xb59f[116]][_0xb59f[124]][_0xb59f[119]]=document[_0xb59f[112]][_0xb59f[157]]-2+_0xb59f[168];null!=this[_0xb59f[129]]&&(this[_0xb59f[129]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188]);if(!mxClient[_0xb59f[80]]){var _0x6b6cx13=mxUtils[_0xb59f[275]](this[_0xb59f[929]]);if(_0xb59f[278]==_0x6b6cx13[_0xb59f[277]]||null!=this[_0xb59f[129]]){this[_0xb59f[929]][_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[485]][_0xb59f[167]]-this[_0xb59f[924]][_0xb59f[167]]-2+_0xb59f[168]}};this[_0xb59f[746]]( new mxEventObject(mxEvent.MAXIMIZE,_0xb59f[763],_0x6b6cxa))};mxEvent[_0xb59f[722]](_0x6b6cxa)}});mxEvent[_0xb59f[759]](this[_0xb59f[800]],_0x6b6cxa);mxEvent[_0xb59f[169]](this[_0xb59f[924]],_0xb59f[760],_0x6b6cxa)};mxWindow[_0xb59f[202]][_0xb59f[911]]=function(){this[_0xb59f[924]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[582];mxEvent[_0xb59f[759]](this[_0xb59f[924]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){var _0x6b6cx3=mxEvent[_0xb59f[731]](_0x6b6cx2),_0x6b6cx4=mxEvent[_0xb59f[733]](_0x6b6cx2),_0x6b6cx5=this[_0xb59f[730]](),_0x6b6cx9=this[_0xb59f[732]](),_0x6b6cxa=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){var _0x6b6cxa=mxEvent[_0xb59f[731]](_0x6b6cx2)-_0x6b6cx3,_0x6b6cx12=mxEvent[_0xb59f[733]](_0x6b6cx2)-_0x6b6cx4;this[_0xb59f[947]](_0x6b6cx5+_0x6b6cxa,_0x6b6cx9+_0x6b6cx12);this[_0xb59f[746]]( new mxEventObject(mxEvent.MOVE,_0xb59f[763],_0x6b6cx2));mxEvent[_0xb59f[722]](_0x6b6cx2)}),_0x6b6cx12=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){mxEvent[_0xb59f[938]](document,null,_0x6b6cxa,_0x6b6cx12);this[_0xb59f[746]]( new mxEventObject(mxEvent.MOVE_END,_0xb59f[763],_0x6b6cx2));mxEvent[_0xb59f[722]](_0x6b6cx2)});mxEvent[_0xb59f[759]](document,null,_0x6b6cxa,_0x6b6cx12);this[_0xb59f[746]]( new mxEventObject(mxEvent.MOVE_START,_0xb59f[763],_0x6b6cx2));mxEvent[_0xb59f[722]](_0x6b6cx2)}))};mxWindow[_0xb59f[202]][_0xb59f[947]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2+_0xb59f[168];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx3+_0xb59f[168]};mxWindow[_0xb59f[202]][_0xb59f[730]]=function(){return parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]])};mxWindow[_0xb59f[202]][_0xb59f[732]]=function(){return parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]])};mxWindow[_0xb59f[202]][_0xb59f[908]]=function(){this[_0xb59f[948]]=document[_0xb59f[55]](_0xb59f[466]);this[_0xb59f[948]][_0xb59f[57]](_0xb59f[390],this[_0xb59f[913]]);this[_0xb59f[948]][_0xb59f[57]](_0xb59f[611],_0xb59f[699]);this[_0xb59f[948]][_0xb59f[57]](_0xb59f[924],_0xb59f[949]);this[_0xb59f[948]][_0xb59f[124]][_0xb59f[945]]=_0xb59f[935];this[_0xb59f[948]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[356];this[_0xb59f[948]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130];this[_0xb59f[924]][_0xb59f[950]](this[_0xb59f[948]],this[_0xb59f[924]][_0xb59f[285]]);mxEvent[_0xb59f[759]](this[_0xb59f[948]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[746]]( new mxEventObject(mxEvent.CLOSE,_0xb59f[763],_0x6b6cx2));this[_0xb59f[165]]?this[_0xb59f[515]]():this[_0xb59f[175]](!1);mxEvent[_0xb59f[722]](_0x6b6cx2)}))};mxWindow[_0xb59f[202]][_0xb59f[951]]=function(_0x6b6cx2){this[_0xb59f[618]]=document[_0xb59f[55]](_0xb59f[466]);this[_0xb59f[618]][_0xb59f[57]](_0xb59f[390],_0x6b6cx2);this[_0xb59f[618]][_0xb59f[57]](_0xb59f[611],_0xb59f[361]);this[_0xb59f[618]][_0xb59f[124]][_0xb59f[941]]=_0xb59f[952];this[_0xb59f[618]][_0xb59f[124]][_0xb59f[945]]=_0xb59f[946];this[_0xb59f[618]][_0xb59f[124]][_0xb59f[953]]=_0xb59f[954];this[_0xb59f[924]][_0xb59f[950]](this[_0xb59f[618]],this[_0xb59f[924]][_0xb59f[285]])};mxWindow[_0xb59f[202]][_0xb59f[164]]=function(_0x6b6cx2){this[_0xb59f[948]][_0xb59f[124]][_0xb59f[495]]=_0x6b6cx2?_0xb59f[110]:_0xb59f[130]};mxWindow[_0xb59f[202]][_0xb59f[174]]=function(){return null!=this[_0xb59f[485]]?_0xb59f[188]!=this[_0xb59f[485]][_0xb59f[124]][_0xb59f[187]]:!1};mxWindow[_0xb59f[202]][_0xb59f[175]]=function(_0x6b6cx2){null!=this[_0xb59f[485]]&&this[_0xb59f[174]]()!=_0x6b6cx2&&(_0x6b6cx2?this[_0xb59f[539]]():this[_0xb59f[801]]())};mxWindow[_0xb59f[202]][_0xb59f[539]]=function(){this[_0xb59f[485]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[110];this[_0xb59f[790]]();var _0x6b6cx2=mxUtils[_0xb59f[275]](this[_0xb59f[929]]);if(!mxClient[_0xb59f[80]]&&(_0xb59f[278]==_0x6b6cx2[_0xb59f[277]]||null!=this[_0xb59f[129]])){this[_0xb59f[929]][_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[485]][_0xb59f[167]]-this[_0xb59f[924]][_0xb59f[167]]-2+_0xb59f[168]};this[_0xb59f[746]]( new mxEventObject(mxEvent.SHOW))};mxWindow[_0xb59f[202]][_0xb59f[801]]=function(){this[_0xb59f[485]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];this[_0xb59f[746]]( new mxEventObject(mxEvent.HIDE))};mxWindow[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[746]]( new mxEventObject(mxEvent.DESTROY));null!=this[_0xb59f[485]]&&(mxEvent[_0xb59f[762]](this[_0xb59f[485]]),this[_0xb59f[485]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[485]]),this[_0xb59f[485]]=null);this[_0xb59f[929]]=this[_0xb59f[905]]=this[_0xb59f[924]]=null};function mxForm(_0x6b6cx2){this[_0xb59f[116]]=document[_0xb59f[55]](_0xb59f[116]);this[_0xb59f[116]][_0xb59f[926]]=_0x6b6cx2;this[_0xb59f[112]]=document[_0xb59f[55]](_0xb59f[120]);this[_0xb59f[116]][_0xb59f[62]](this[_0xb59f[112]])}mxForm[_0xb59f[202]][_0xb59f[116]]=null;mxForm[_0xb59f[202]][_0xb59f[112]]= !1;mxForm[_0xb59f[202]][_0xb59f[955]]=function(){return this[_0xb59f[116]]};mxForm[_0xb59f[202]][_0xb59f[956]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[121]),_0x6b6cx5=document[_0xb59f[55]](_0xb59f[122]);_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[122]),_0x6b6cx9=document[_0xb59f[55]](_0xb59f[172]);mxUtils[_0xb59f[53]](_0x6b6cx9,mxResources[_0xb59f[203]](_0xb59f[957])||_0xb59f[958]);_0x6b6cx5[_0xb59f[62]](_0x6b6cx9);mxEvent[_0xb59f[169]](_0x6b6cx9,_0xb59f[173],function(){_0x6b6cx2()});_0x6b6cx9=document[_0xb59f[55]](_0xb59f[172]);mxUtils[_0xb59f[53]](_0x6b6cx9,mxResources[_0xb59f[203]](_0xb59f[959])||_0xb59f[960]);_0x6b6cx5[_0xb59f[62]](_0x6b6cx9);mxEvent[_0xb59f[169]](_0x6b6cx9,_0xb59f[173],function(){_0x6b6cx3()});_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);this[_0xb59f[112]][_0xb59f[62]](_0x6b6cx4)};mxForm[_0xb59f[202]][_0xb59f[961]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[962]);_0x6b6cx4[_0xb59f[57]](_0xb59f[60],_0xb59f[963]);_0x6b6cx4[_0xb59f[131]]=_0x6b6cx3;return this[_0xb59f[964]](_0x6b6cx2,_0x6b6cx4)};mxForm[_0xb59f[202]][_0xb59f[965]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[962]);_0x6b6cx4[_0xb59f[57]](_0xb59f[60],_0xb59f[966]);this[_0xb59f[964]](_0x6b6cx2,_0x6b6cx4);_0x6b6cx3&&(_0x6b6cx4[_0xb59f[967]]= !0);return _0x6b6cx4};mxForm[_0xb59f[202]][_0xb59f[968]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[126]);mxClient[_0xb59f[133]]&&_0x6b6cx4--;_0x6b6cx5[_0xb59f[57]](_0xb59f[969],_0x6b6cx4||2);_0x6b6cx5[_0xb59f[131]]=_0x6b6cx3;return this[_0xb59f[964]](_0x6b6cx2,_0x6b6cx5)};mxForm[_0xb59f[202]][_0xb59f[970]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[804]);null!=_0x6b6cx4&&_0x6b6cx5[_0xb59f[57]](_0xb59f[803],_0x6b6cx4);_0x6b6cx3&&_0x6b6cx5[_0xb59f[57]](_0xb59f[971],_0xb59f[128]);return this[_0xb59f[964]](_0x6b6cx2,_0x6b6cx5)};mxForm[_0xb59f[202]][_0xb59f[972]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=document[_0xb59f[55]](_0xb59f[973]);mxUtils[_0xb59f[171]](_0x6b6cx9,_0x6b6cx3);_0x6b6cx9[_0xb59f[57]](_0xb59f[131],_0x6b6cx4);_0x6b6cx5&&_0x6b6cx9[_0xb59f[57]](_0xb59f[974],_0x6b6cx5);_0x6b6cx2[_0xb59f[62]](_0x6b6cx9)};mxForm[_0xb59f[202]][_0xb59f[964]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[121]),_0x6b6cx5=document[_0xb59f[55]](_0xb59f[122]);mxUtils[_0xb59f[53]](_0x6b6cx5,_0x6b6cx2);_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);_0x6b6cx5=document[_0xb59f[55]](_0xb59f[122]);_0x6b6cx5[_0xb59f[62]](_0x6b6cx3);_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);this[_0xb59f[112]][_0xb59f[62]](_0x6b6cx4);return _0x6b6cx3};function mxImage(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[390]]=_0x6b6cx2;this[_0xb59f[117]]=_0x6b6cx3;this[_0xb59f[119]]=_0x6b6cx4}mxImage[_0xb59f[202]][_0xb59f[390]]=null;mxImage[_0xb59f[202]][_0xb59f[117]]=null;mxImage[_0xb59f[202]][_0xb59f[119]]=null;function mxDivResizer(_0x6b6cx2,_0x6b6cx3){if(_0xb59f[485]==_0x6b6cx2[_0xb59f[301]][_0xb59f[216]]()){null==_0x6b6cx3&&(_0x6b6cx3=window);this[_0xb59f[485]]=_0x6b6cx2;var _0x6b6cx4=mxUtils[_0xb59f[275]](_0x6b6cx2);null!=_0x6b6cx4&&(this[_0xb59f[975]]=_0xb59f[278]==_0x6b6cx4[_0xb59f[117]],this[_0xb59f[976]]=_0xb59f[278]==_0x6b6cx4[_0xb59f[119]]);mxEvent[_0xb59f[169]](_0x6b6cx3,_0xb59f[129],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[977]]||(this[_0xb59f[977]]= !0,this[_0xb59f[129]](),this[_0xb59f[977]]= !1)}));this[_0xb59f[129]]()}}mxDivResizer[_0xb59f[202]][_0xb59f[975]]= !0;mxDivResizer[_0xb59f[202]][_0xb59f[976]]= !0;mxDivResizer[_0xb59f[202]][_0xb59f[977]]= !1;mxDivResizer[_0xb59f[202]][_0xb59f[129]]=function(){var _0x6b6cx2=this[_0xb59f[978]](),_0x6b6cx3=this[_0xb59f[979]](),_0x6b6cx4=parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]),_0x6b6cx5=parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[699]]),_0x6b6cx9=parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]),_0x6b6cxa=parseInt(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[553]]);this[_0xb59f[975]]&&(!isNaN(_0x6b6cx4)&&!isNaN(_0x6b6cx5)&&0<=_0x6b6cx4&&0<=_0x6b6cx5&&0<_0x6b6cx2-_0x6b6cx5-_0x6b6cx4)&&(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2-_0x6b6cx5-_0x6b6cx4+_0xb59f[168]);this[_0xb59f[976]]&&(!isNaN(_0x6b6cx9)&&!isNaN(_0x6b6cxa)&&0<=_0x6b6cx9&&0<=_0x6b6cxa&&0<_0x6b6cx3-_0x6b6cx9-_0x6b6cxa)&&(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3-_0x6b6cx9-_0x6b6cxa+_0xb59f[168])};mxDivResizer[_0xb59f[202]][_0xb59f[978]]=function(){return document[_0xb59f[112]][_0xb59f[159]]};mxDivResizer[_0xb59f[202]][_0xb59f[979]]=function(){return document[_0xb59f[112]][_0xb59f[157]]};function mxDragSource(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[980]]=_0x6b6cx2;this[_0xb59f[981]]=_0x6b6cx3;mxEvent[_0xb59f[759]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,this[_0xb59f[787]]))}mxDragSource[_0xb59f[202]][_0xb59f[980]]=null;mxDragSource[_0xb59f[202]][_0xb59f[981]]=null;mxDragSource[_0xb59f[202]][_0xb59f[559]]=null;mxDragSource[_0xb59f[202]][_0xb59f[982]]=null;mxDragSource[_0xb59f[202]][_0xb59f[983]]=null;mxDragSource[_0xb59f[202]][_0xb59f[984]]= !0;mxDragSource[_0xb59f[202]][_0xb59f[985]]=null;mxDragSource[_0xb59f[202]][_0xb59f[986]]=null;mxDragSource[_0xb59f[202]][_0xb59f[987]]=null;mxDragSource[_0xb59f[202]][_0xb59f[988]]=null;mxDragSource[_0xb59f[202]][_0xb59f[989]]=null;mxDragSource[_0xb59f[202]][_0xb59f[561]]= !0;mxDragSource[_0xb59f[202]][_0xb59f[990]]= !0;mxDragSource[_0xb59f[202]][_0xb59f[991]]= !0;mxDragSource[_0xb59f[202]][_0xb59f[563]]= !0;mxDragSource[_0xb59f[202]][_0xb59f[992]]=100;mxDragSource[_0xb59f[202]][_0xb59f[993]]=70;mxDragSource[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxDragSource[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxDragSource[_0xb59f[202]][_0xb59f[996]]=function(){return this[_0xb59f[990]]};mxDragSource[_0xb59f[202]][_0xb59f[562]]=function(_0x6b6cx2){this[_0xb59f[990]]=_0x6b6cx2};mxDragSource[_0xb59f[202]][_0xb59f[997]]=function(){return this[_0xb59f[991]]};mxDragSource[_0xb59f[202]][_0xb59f[998]]=function(_0x6b6cx2){this[_0xb59f[991]]=_0x6b6cx2};mxDragSource[_0xb59f[202]][_0xb59f[565]]=function(_0x6b6cx2){return null};mxDragSource[_0xb59f[202]][_0xb59f[564]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx2[_0xb59f[999]](_0x6b6cx3,_0x6b6cx4)};mxDragSource[_0xb59f[202]][_0xb59f[566]]=function(_0x6b6cx2){return this[_0xb59f[980]][_0xb59f[511]](!0)};mxDragSource[_0xb59f[202]][_0xb59f[567]]=function(_0x6b6cx2){return null};mxDragSource[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2){this[_0xb59f[984]]&&(!mxEvent[_0xb59f[721]](_0x6b6cx2)&&null==this[_0xb59f[1000]])&&(this[_0xb59f[1001]](_0x6b6cx2),this[_0xb59f[1000]]=mxUtils[_0xb59f[885]](this,this[_0xb59f[788]]),this[_0xb59f[1002]]=mxUtils[_0xb59f[885]](this,this[_0xb59f[789]]),mxEvent[_0xb59f[759]](document,null,this[_0xb59f[1000]],this[_0xb59f[1002]]),mxEvent[_0xb59f[722]](_0x6b6cx2,!0,!1))};mxDragSource[_0xb59f[202]][_0xb59f[1001]]=function(_0x6b6cx2){this[_0xb59f[982]]=this[_0xb59f[566]](_0x6b6cx2);this[_0xb59f[982]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];this[_0xb59f[982]][_0xb59f[124]][_0xb59f[931]]=this[_0xb59f[992]];mxUtils[_0xb59f[254]](this[_0xb59f[982]],this[_0xb59f[993]])};mxDragSource[_0xb59f[202]][_0xb59f[1003]]=function(_0x6b6cx2){null!=this[_0xb59f[982]]&&(null!=this[_0xb59f[982]][_0xb59f[265]]&&this[_0xb59f[982]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[982]]),this[_0xb59f[982]]=null)};mxDragSource[_0xb59f[202]][_0xb59f[1004]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=mxEvent[_0xb59f[731]](_0x6b6cx3),_0x6b6cx5=mxEvent[_0xb59f[733]](_0x6b6cx3),_0x6b6cx9=mxUtils[_0xb59f[445]](_0x6b6cx2[_0xb59f[526]]),_0x6b6cxa=mxUtils[_0xb59f[444]]();return _0x6b6cx4>=_0x6b6cx9[_0xb59f[235]]-_0x6b6cxa[_0xb59f[235]]&&_0x6b6cx5>=_0x6b6cx9[_0xb59f[236]]-_0x6b6cxa[_0xb59f[236]]&&_0x6b6cx4<=_0x6b6cx9[_0xb59f[235]]-_0x6b6cxa[_0xb59f[235]]+_0x6b6cx2[_0xb59f[526]][_0xb59f[359]]&&_0x6b6cx5<=_0x6b6cx9[_0xb59f[236]]-_0x6b6cxa[_0xb59f[236]]+_0x6b6cx2[_0xb59f[526]][_0xb59f[167]]};mxDragSource[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[565]](_0x6b6cx2);null!=_0x6b6cx3&&!this[_0xb59f[1004]](_0x6b6cx3,_0x6b6cx2)&&(_0x6b6cx3=null);_0x6b6cx3!=this[_0xb59f[985]]&&(null!=this[_0xb59f[985]]&&this[_0xb59f[1005]](this[_0xb59f[985]]),this[_0xb59f[985]]=_0x6b6cx3,null!=this[_0xb59f[985]]&&this[_0xb59f[1006]](this[_0xb59f[985]]));null!=this[_0xb59f[985]]&&this[_0xb59f[1007]](this[_0xb59f[985]],_0x6b6cx2);if(null!=this[_0xb59f[982]]&&(null==this[_0xb59f[983]]||_0xb59f[189]!=this[_0xb59f[983]][_0xb59f[124]][_0xb59f[187]])){var _0x6b6cx3=mxEvent[_0xb59f[731]](_0x6b6cx2),_0x6b6cx4=mxEvent[_0xb59f[733]](_0x6b6cx2);null==this[_0xb59f[982]][_0xb59f[265]]&&document[_0xb59f[112]][_0xb59f[62]](this[_0xb59f[982]]);this[_0xb59f[982]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189];null!=this[_0xb59f[559]]&&(_0x6b6cx3+=this[_0xb59f[559]][_0xb59f[235]],_0x6b6cx4+=this[_0xb59f[559]][_0xb59f[236]]);_0x6b6cx3+=document[_0xb59f[112]][_0xb59f[360]]||document[_0xb59f[158]][_0xb59f[360]];_0x6b6cx4+=document[_0xb59f[112]][_0xb59f[190]]||document[_0xb59f[158]][_0xb59f[190]];this[_0xb59f[982]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx3+_0xb59f[168];this[_0xb59f[982]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx4+_0xb59f[168]}else {null!=this[_0xb59f[982]]&&(this[_0xb59f[982]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188])};mxEvent[_0xb59f[722]](_0x6b6cx2)};mxDragSource[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2){if(null!=this[_0xb59f[985]]){if(null!=this[_0xb59f[987]]&&(null==this[_0xb59f[983]]||_0xb59f[188]!=this[_0xb59f[983]][_0xb59f[124]][_0xb59f[187]])){var _0x6b6cx3=this[_0xb59f[985]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx4=this[_0xb59f[985]][_0xb59f[441]][_0xb59f[513]];this[_0xb59f[1008]](this[_0xb59f[985]],_0x6b6cx2,this[_0xb59f[986]],this[_0xb59f[987]][_0xb59f[235]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[235]],this[_0xb59f[987]][_0xb59f[236]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[236]])};this[_0xb59f[1005]](this[_0xb59f[985]])};this[_0xb59f[1003]](_0x6b6cx2);mxEvent[_0xb59f[938]](document,null,this[_0xb59f[1000]],this[_0xb59f[1002]]);this[_0xb59f[985]]=this[_0xb59f[1002]]=this[_0xb59f[1000]]=null;mxEvent[_0xb59f[722]](_0x6b6cx2)};mxDragSource[_0xb59f[202]][_0xb59f[1006]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1009]]= !0;this[_0xb59f[983]]=this[_0xb59f[567]](_0x6b6cx2);this[_0xb59f[996]]()&&null!=this[_0xb59f[983]]&&(this[_0xb59f[988]]= new mxGuide(_0x6b6cx2,_0x6b6cx2[_0xb59f[1011]][_0xb59f[1010]]()));this[_0xb59f[563]]&&(this[_0xb59f[989]]= new mxCellHighlight(_0x6b6cx2,mxConstants.DROP_TARGET_COLOR))};mxDragSource[_0xb59f[202]][_0xb59f[1005]]=function(_0x6b6cx2){this[_0xb59f[987]]=this[_0xb59f[986]]=null;_0x6b6cx2[_0xb59f[1009]]= !1;null!=this[_0xb59f[983]]&&(null!=this[_0xb59f[983]][_0xb59f[265]]&&this[_0xb59f[983]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[983]]),this[_0xb59f[983]]=null);null!=this[_0xb59f[988]]&&(this[_0xb59f[988]][_0xb59f[515]](),this[_0xb59f[988]]=null);null!=this[_0xb59f[989]]&&(this[_0xb59f[989]][_0xb59f[515]](),this[_0xb59f[989]]=null)};mxDragSource[_0xb59f[202]][_0xb59f[1007]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=mxUtils[_0xb59f[445]](_0x6b6cx2[_0xb59f[526]]),_0x6b6cx5=mxUtils[_0xb59f[444]](_0x6b6cx2[_0xb59f[526]]),_0x6b6cx9=mxEvent[_0xb59f[731]](_0x6b6cx3)-_0x6b6cx4[_0xb59f[235]]+_0x6b6cx5[_0xb59f[235]],_0x6b6cx4=mxEvent[_0xb59f[733]](_0x6b6cx3)-_0x6b6cx4[_0xb59f[236]]+_0x6b6cx5[_0xb59f[236]];_0x6b6cx2[_0xb59f[1012]]&&(null==this[_0xb59f[561]]||this[_0xb59f[561]])&&_0x6b6cx2[_0xb59f[1014]](_0x6b6cx9,_0x6b6cx4,_0x6b6cx2[_0xb59f[1013]]);null!=this[_0xb59f[989]]&&_0x6b6cx2[_0xb59f[1015]]()&&(this[_0xb59f[986]]=this[_0xb59f[564]](_0x6b6cx2,_0x6b6cx9,_0x6b6cx4),_0x6b6cx5=_0x6b6cx2[_0xb59f[249]]()[_0xb59f[248]](this[_0xb59f[986]]),this[_0xb59f[989]][_0xb59f[1016]](_0x6b6cx5));if(null!=this[_0xb59f[983]]){null==this[_0xb59f[983]][_0xb59f[265]]&&(_0x6b6cx2[_0xb59f[526]][_0xb59f[62]](this[_0xb59f[983]]),this[_0xb59f[983]][_0xb59f[124]][_0xb59f[931]]=_0xb59f[1017],this[_0xb59f[983]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492]);var _0x6b6cx5=this[_0xb59f[997]]()&&_0x6b6cx2[_0xb59f[1018]](_0x6b6cx3),_0x6b6cxa=!0;if(null!=this[_0xb59f[988]]&&this[_0xb59f[988]][_0xb59f[1019]](_0x6b6cx3)){var _0x6b6cxa=parseInt(this[_0xb59f[983]][_0xb59f[124]][_0xb59f[117]]),_0x6b6cx12=parseInt(this[_0xb59f[983]][_0xb59f[124]][_0xb59f[119]]),_0x6b6cxa= new mxRectangle(0,0,_0x6b6cxa,_0x6b6cx12),_0x6b6cx4= new mxPoint(_0x6b6cx9,_0x6b6cx4),_0x6b6cx4=this[_0xb59f[988]][_0xb59f[582]](_0x6b6cxa,_0x6b6cx4,_0x6b6cx5),_0x6b6cxa=!1,_0x6b6cx9=_0x6b6cx4[_0xb59f[235]],_0x6b6cx4=_0x6b6cx4[_0xb59f[236]]}else {if(_0x6b6cx5){var _0x6b6cx5=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],_0x6b6cx12=_0x6b6cx2[_0xb59f[441]][_0xb59f[513]],_0x6b6cx13=_0x6b6cx2[_0xb59f[1020]]/2,_0x6b6cx9=(_0x6b6cx2[_0xb59f[1021]](_0x6b6cx9/_0x6b6cx5-_0x6b6cx12[_0xb59f[235]]-_0x6b6cx13)+_0x6b6cx12[_0xb59f[235]])*_0x6b6cx5,_0x6b6cx4=(_0x6b6cx2[_0xb59f[1021]](_0x6b6cx4/_0x6b6cx5-_0x6b6cx12[_0xb59f[236]]-_0x6b6cx13)+_0x6b6cx12[_0xb59f[236]])*_0x6b6cx5}};null!=this[_0xb59f[988]]&&_0x6b6cxa&&this[_0xb59f[988]][_0xb59f[801]]();null!=this[_0xb59f[1022]]&&(_0x6b6cx9+=this[_0xb59f[1022]][_0xb59f[235]],_0x6b6cx4+=this[_0xb59f[1022]][_0xb59f[236]]);this[_0xb59f[983]][_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[488]](_0x6b6cx9)+_0xb59f[168];this[_0xb59f[983]][_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[488]](_0x6b6cx4)+_0xb59f[168];this[_0xb59f[983]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189]};this[_0xb59f[987]]= new mxPoint(_0x6b6cx9,_0x6b6cx4)};mxDragSource[_0xb59f[202]][_0xb59f[1008]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){this[_0xb59f[981]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[526]][_0xb59f[393]]()};function mxToolbar(_0x6b6cx2){this[_0xb59f[526]]=_0x6b6cx2}mxToolbar[_0xb59f[202]]= new mxEventSource;mxToolbar[_0xb59f[202]][_0xb59f[196]]=mxToolbar;mxToolbar[_0xb59f[202]][_0xb59f[526]]=null;mxToolbar[_0xb59f[202]][_0xb59f[984]]= !0;mxToolbar[_0xb59f[202]][_0xb59f[1023]]= !1;mxToolbar[_0xb59f[202]][_0xb59f[1024]]= !0;mxToolbar[_0xb59f[202]][_0xb59f[1025]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){var _0x6b6cx12=document[_0xb59f[55]](null!=_0x6b6cx3?_0xb59f[466]:_0xb59f[172]),_0x6b6cx13=_0x6b6cx9||(null!=_0x6b6cxa?_0xb59f[1026]:_0xb59f[1027]);_0x6b6cx12[_0xb59f[926]]=_0x6b6cx13;_0x6b6cx12[_0xb59f[57]](_0xb59f[390],_0x6b6cx3);null!=_0x6b6cx2&&(null!=_0x6b6cx3?_0x6b6cx12[_0xb59f[57]](_0xb59f[924],_0x6b6cx2):mxUtils[_0xb59f[53]](_0x6b6cx12,_0x6b6cx2));this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx12);null!=_0x6b6cx4&&(mxEvent[_0xb59f[169]](_0x6b6cx12,_0xb59f[173],_0x6b6cx4),mxClient[_0xb59f[754]]&&mxEvent[_0xb59f[169]](_0x6b6cx12,_0xb59f[757],_0x6b6cx4));_0x6b6cx2=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){null!=_0x6b6cx5?_0x6b6cx12[_0xb59f[57]](_0xb59f[390],_0x6b6cx3):_0x6b6cx12[_0xb59f[124]][_0xb59f[1028]]=_0xb59f[110]});mxEvent[_0xb59f[759]](_0x6b6cx12,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){null!=_0x6b6cx5?_0x6b6cx12[_0xb59f[57]](_0xb59f[390],_0x6b6cx5):_0x6b6cx12[_0xb59f[124]][_0xb59f[1028]]=_0xb59f[579];if(null!=_0x6b6cxa){null==this[_0xb59f[1029]]&&(this[_0xb59f[1029]]= new mxPopupMenu,this[_0xb59f[1029]][_0xb59f[176]]());var _0x6b6cx3=this[_0xb59f[1030]];this[_0xb59f[1029]][_0xb59f[1031]]()&&this[_0xb59f[1029]][_0xb59f[1032]]();_0x6b6cx3!=_0x6b6cx12&&(this[_0xb59f[1030]]=_0x6b6cx12,this[_0xb59f[1029]][_0xb59f[1033]]=_0x6b6cxa,_0x6b6cx3= new mxPoint(_0x6b6cx12[_0xb59f[358]],_0x6b6cx12[_0xb59f[362]]+_0x6b6cx12[_0xb59f[167]]),this[_0xb59f[1029]][_0xb59f[152]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]],null,_0x6b6cx2),this[_0xb59f[1029]][_0xb59f[1031]]()&&(_0x6b6cx12[_0xb59f[926]]=_0x6b6cx13+_0xb59f[1034],this[_0xb59f[1029]][_0xb59f[1032]]=function(){mxPopupMenu[_0xb59f[202]][_0xb59f[1032]][_0xb59f[183]](this);_0x6b6cx12[_0xb59f[926]]=_0x6b6cx13;this[_0xb59f[1030]]=null}))}}),null,_0x6b6cx2);mxEvent[_0xb59f[169]](_0x6b6cx12,_0xb59f[1035],_0x6b6cx2);return _0x6b6cx12};mxToolbar[_0xb59f[202]][_0xb59f[970]]=function(_0x6b6cx2){var _0x6b6cx3=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx3[_0xb59f[124]][_0xb59f[495]]=_0xb59f[497];_0x6b6cx3[_0xb59f[926]]=_0xb59f[1036];var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[804]);_0x6b6cx4[_0xb59f[926]]=_0x6b6cx2||_0xb59f[1037];_0x6b6cx3[_0xb59f[62]](_0x6b6cx4);this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx3);return _0x6b6cx4};mxToolbar[_0xb59f[202]][_0xb59f[1038]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[804]);_0x6b6cx4[_0xb59f[926]]=_0x6b6cx3||_0xb59f[1037];this[_0xb59f[972]](_0x6b6cx4,_0x6b6cx2,null);mxEvent[_0xb59f[169]](_0x6b6cx4,_0xb59f[826],function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx4[_0xb59f[1040]][_0x6b6cx4[_0xb59f[1039]]];_0x6b6cx4[_0xb59f[1039]]=0;null!=_0x6b6cx3[_0xb59f[1041]]&&_0x6b6cx3[_0xb59f[1041]](_0x6b6cx2)});this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx4);return _0x6b6cx4};mxToolbar[_0xb59f[202]][_0xb59f[972]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[973]);mxUtils[_0xb59f[171]](_0x6b6cx5,_0x6b6cx3);_0xb59f[279]== typeof _0x6b6cx4?_0x6b6cx5[_0xb59f[1041]]=_0x6b6cx4:_0x6b6cx5[_0xb59f[57]](_0xb59f[131],_0x6b6cx4);_0x6b6cx2[_0xb59f[62]](_0x6b6cx5);return _0x6b6cx5};mxToolbar[_0xb59f[202]][_0xb59f[1042]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=document[_0xb59f[55]](_0xb59f[466]);_0x6b6cxa[_0xb59f[1043]]=_0x6b6cx9||_0xb59f[1026];_0x6b6cxa[_0xb59f[926]]=_0x6b6cxa[_0xb59f[1043]];_0x6b6cxa[_0xb59f[57]](_0xb59f[390],_0x6b6cx3);_0x6b6cxa[_0xb59f[1044]]=_0x6b6cx5;null!=_0x6b6cx2&&_0x6b6cxa[_0xb59f[57]](_0xb59f[924],_0x6b6cx2);mxEvent[_0xb59f[169]](_0x6b6cxa,_0xb59f[173],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[1045]][_0xb59f[1044]];null!=_0x6b6cx2?(this[_0xb59f[1045]][_0xb59f[1044]]=this[_0xb59f[1045]][_0xb59f[284]](_0xb59f[390]),this[_0xb59f[1045]][_0xb59f[57]](_0xb59f[390],_0x6b6cx2)):this[_0xb59f[1045]][_0xb59f[926]]=this[_0xb59f[1045]][_0xb59f[1043]];this[_0xb59f[1024]]&&(this[_0xb59f[1046]]=_0x6b6cxa);this[_0xb59f[1045]]=_0x6b6cxa;_0x6b6cx2=_0x6b6cxa[_0xb59f[1044]];null!=_0x6b6cx2?(_0x6b6cxa[_0xb59f[1044]]=_0x6b6cxa[_0xb59f[284]](_0xb59f[390]),_0x6b6cxa[_0xb59f[57]](_0xb59f[390],_0x6b6cx2)):_0x6b6cxa[_0xb59f[926]]=_0x6b6cxa[_0xb59f[1043]]+_0xb59f[1034];this[_0xb59f[746]]( new mxEventObject(mxEvent.SELECT));_0x6b6cx4()}));this[_0xb59f[526]][_0xb59f[62]](_0x6b6cxa);null==this[_0xb59f[1046]]&&(this[_0xb59f[1046]]=_0x6b6cxa,this[_0xb59f[1047]](_0x6b6cxa),_0x6b6cx4());return _0x6b6cxa};mxToolbar[_0xb59f[202]][_0xb59f[1048]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cxa=null!=_0x6b6cxa?_0x6b6cxa:!0;var _0x6b6cx12=document[_0xb59f[55]](null!=_0x6b6cx3?_0xb59f[466]:_0xb59f[172]);_0x6b6cx12[_0xb59f[1043]]=_0x6b6cx9||_0xb59f[1026];_0x6b6cx12[_0xb59f[926]]=_0x6b6cx12[_0xb59f[1043]];_0x6b6cx12[_0xb59f[57]](_0xb59f[390],_0x6b6cx3);_0x6b6cx12[_0xb59f[1044]]=_0x6b6cx5;null!=_0x6b6cx2&&_0x6b6cx12[_0xb59f[57]](_0xb59f[924],_0x6b6cx2);this[_0xb59f[984]]&&_0x6b6cxa&&(mxEvent[_0xb59f[169]](_0x6b6cx12,_0xb59f[173],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1047]](_0x6b6cx12,_0x6b6cx4);this[_0xb59f[1023]]= !1})),mxEvent[_0xb59f[169]](_0x6b6cx12,_0xb59f[760],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1047]](_0x6b6cx12,_0x6b6cx4);this[_0xb59f[1023]]= !0})),null==this[_0xb59f[1046]]&&(this[_0xb59f[1046]]=_0x6b6cx12,this[_0xb59f[1049]]=_0x6b6cx4,this[_0xb59f[1047]](_0x6b6cx12,_0x6b6cx4)));this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx12);return _0x6b6cx12};mxToolbar[_0xb59f[202]][_0xb59f[1047]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1045]]!=_0x6b6cx2){if(null!=this[_0xb59f[1045]]){var _0x6b6cx4=this[_0xb59f[1045]][_0xb59f[1044]];null!=_0x6b6cx4?(this[_0xb59f[1045]][_0xb59f[1044]]=this[_0xb59f[1045]][_0xb59f[284]](_0xb59f[390]),this[_0xb59f[1045]][_0xb59f[57]](_0xb59f[390],_0x6b6cx4)):this[_0xb59f[1045]][_0xb59f[926]]=this[_0xb59f[1045]][_0xb59f[1043]]};this[_0xb59f[1045]]=_0x6b6cx2;_0x6b6cx4=this[_0xb59f[1045]][_0xb59f[1044]];null!=_0x6b6cx4?(this[_0xb59f[1045]][_0xb59f[1044]]=this[_0xb59f[1045]][_0xb59f[284]](_0xb59f[390]),this[_0xb59f[1045]][_0xb59f[57]](_0xb59f[390],_0x6b6cx4)):this[_0xb59f[1045]][_0xb59f[926]]=this[_0xb59f[1045]][_0xb59f[1043]]+_0xb59f[1034];this[_0xb59f[746]]( new mxEventObject(mxEvent.SELECT,_0xb59f[279],_0x6b6cx3))}};mxToolbar[_0xb59f[202]][_0xb59f[1050]]=function(_0x6b6cx2){(_0x6b6cx2||!this[_0xb59f[1023]])&&this[_0xb59f[1045]]!=this[_0xb59f[1046]]&&this[_0xb59f[1047]](this[_0xb59f[1046]],this[_0xb59f[1049]])};mxToolbar[_0xb59f[202]][_0xb59f[1051]]=function(_0x6b6cx2){return this[_0xb59f[1025]](null,_0x6b6cx2,null)};mxToolbar[_0xb59f[202]][_0xb59f[1052]]=function(){mxUtils[_0xb59f[345]](this[_0xb59f[526]])};mxToolbar[_0xb59f[202]][_0xb59f[1053]]=function(){var _0x6b6cx2=document[_0xb59f[55]](_0xb59f[1054]);_0x6b6cx2[_0xb59f[124]][_0xb59f[941]]=_0xb59f[1055];_0x6b6cx2[_0xb59f[57]](_0xb59f[803],_0xb59f[500]);this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx2)};mxToolbar[_0xb59f[202]][_0xb59f[515]]=function(){mxEvent[_0xb59f[762]](this[_0xb59f[526]]);this[_0xb59f[1045]]=this[_0xb59f[1049]]=this[_0xb59f[1046]]=this[_0xb59f[526]]=null;null!=this[_0xb59f[1029]]&&this[_0xb59f[1029]][_0xb59f[515]]()};function mxSession(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[1056]]=_0x6b6cx3;this[_0xb59f[1057]]=_0x6b6cx4;this[_0xb59f[1058]]=_0x6b6cx5;null!=_0x6b6cx2&&(this[_0xb59f[1059]]= new mxCodec,this[_0xb59f[1059]][_0xb59f[1060]]=function(_0x6b6cx3){return _0x6b6cx2[_0xb59f[736]](_0x6b6cx3)});_0x6b6cx2[_0xb59f[169]](mxEvent.NOTIFY,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx3[_0xb59f[720]](_0xb59f[1061]);(null!=_0x6b6cx4&&this[_0xb59f[143]]||this[_0xb59f[1062]]&&!this[_0xb59f[1063]])&&this[_0xb59f[827]](_0xb59f[1064]+this[_0xb59f[1067]](_0x6b6cx4[_0xb59f[1065]],_0x6b6cx4[_0xb59f[1066]])+_0xb59f[1068])}))}mxSession[_0xb59f[202]]= new mxEventSource;mxSession[_0xb59f[202]][_0xb59f[196]]=mxSession;mxSession[_0xb59f[202]][_0xb59f[251]]=null;mxSession[_0xb59f[202]][_0xb59f[1056]]=null;mxSession[_0xb59f[202]][_0xb59f[1057]]=null;mxSession[_0xb59f[202]][_0xb59f[1058]]=null;mxSession[_0xb59f[202]][_0xb59f[1059]]=null;mxSession[_0xb59f[202]][_0xb59f[1069]]=_0xb59f[336];mxSession[_0xb59f[202]][_0xb59f[1070]]= !0;mxSession[_0xb59f[202]][_0xb59f[1071]]= !0;mxSession[_0xb59f[202]][_0xb59f[1072]]=0;mxSession[_0xb59f[202]][_0xb59f[1073]]=0;mxSession[_0xb59f[202]][_0xb59f[143]]= !1;mxSession[_0xb59f[202]][_0xb59f[1062]]= !1;mxSession[_0xb59f[202]][_0xb59f[1063]]= !1;mxSession[_0xb59f[202]][_0xb59f[1074]]= !1;mxSession[_0xb59f[202]][_0xb59f[861]]=function(){this[_0xb59f[143]]?(this[_0xb59f[1062]]= !0,this[_0xb59f[746]]( new mxEventObject(mxEvent.CONNECT))):this[_0xb59f[1062]]||this[_0xb59f[203]](this[_0xb59f[1056]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1062]]= !0;this[_0xb59f[746]]( new mxEventObject(mxEvent.CONNECT));this[_0xb59f[1075]]()}))};mxSession[_0xb59f[202]][_0xb59f[809]]=function(){this[_0xb59f[1062]]&&!this[_0xb59f[1063]]&&(this[_0xb59f[1063]]= !0,this[_0xb59f[746]]( new mxEventObject(mxEvent.SUSPEND)))};mxSession[_0xb59f[202]][_0xb59f[810]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[1062]]&&this[_0xb59f[1063]]&&(this[_0xb59f[1063]]= !1,this[_0xb59f[746]]( new mxEventObject(mxEvent.RESUME)),this[_0xb59f[1074]]||this[_0xb59f[1075]]())};mxSession[_0xb59f[202]][_0xb59f[1076]]=function(_0x6b6cx2){this[_0xb59f[1062]]&&(this[_0xb59f[1062]]= !1);this[_0xb59f[746]]( new mxEventObject(mxEvent.DISCONNECT,_0xb59f[1077],_0x6b6cx2))};mxSession[_0xb59f[202]][_0xb59f[1075]]=function(){this[_0xb59f[1062]]&&!this[_0xb59f[1063]]&&null!=this[_0xb59f[1057]]?(this[_0xb59f[1074]]= !0,this[_0xb59f[203]](this[_0xb59f[1057]],mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[1075]]()}))):this[_0xb59f[1074]]= !1};mxSession[_0xb59f[202]][_0xb59f[827]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]&&(null!=this[_0xb59f[1058]]&&(this[_0xb59f[143]]?(mxLog[_0xb59f[539]](),mxLog[_0xb59f[143]](_0xb59f[1078]+this[_0xb59f[1058]]+_0xb59f[1079]+_0x6b6cx2)):(_0x6b6cx2=_0xb59f[1080]+_0x6b6cx2+_0xb59f[1081],this[_0xb59f[1070]]&&(_0x6b6cx2=encodeURIComponent(_0x6b6cx2)),mxUtils[_0xb59f[814]](this[_0xb59f[1058]],_0xb59f[1082]+_0x6b6cx2,_0x6b6cx3,_0x6b6cx4))),this[_0xb59f[1072]]+=_0x6b6cx2[_0xb59f[67]],this[_0xb59f[746]]( new mxEventObject(mxEvent.NOTIFY,_0xb59f[863],this[_0xb59f[1058]],_0xb59f[338],_0x6b6cx2)))};mxSession[_0xb59f[202]][_0xb59f[203]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(_0xb59f[82]!= typeof mxUtils){var _0x6b6cx5=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){null!=_0x6b6cx4?_0x6b6cx4(_0x6b6cx2):this[_0xb59f[1076]](_0x6b6cx2)});mxUtils[_0xb59f[203]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,function(_0x6b6cx4){if(_0xb59f[82]!= typeof mxUtils){if(_0x6b6cx4[_0xb59f[220]]()&&404!=_0x6b6cx4[_0xb59f[878]]()){if(this[_0xb59f[1073]]+=_0x6b6cx4[_0xb59f[221]]()[_0xb59f[67]],this[_0xb59f[746]]( new mxEventObject(mxEvent.GET,_0xb59f[863],_0x6b6cx2,_0xb59f[870],_0x6b6cx4)),this[_0xb59f[1083]](_0x6b6cx4)){if(0<_0x6b6cx4[_0xb59f[221]]()[_0xb59f[67]]){var _0x6b6cxa=_0x6b6cx4[_0xb59f[874]]();null==_0x6b6cxa?_0x6b6cx5(_0xb59f[1084]+_0x6b6cx4[_0xb59f[221]]()):this[_0xb59f[806]](_0x6b6cxa)};null!=_0x6b6cx3&&_0x6b6cx3(_0x6b6cx4)}}else {_0x6b6cx5(_0xb59f[1085])}}}),function(_0x6b6cx2){_0x6b6cx5(_0xb59f[1086])})}};mxSession[_0xb59f[202]][_0xb59f[1083]]=function(_0x6b6cx2){return 0>_0x6b6cx2[_0xb59f[221]]()[_0xb59f[2]](_0xb59f[1087])};mxSession[_0xb59f[202]][_0xb59f[1067]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=_0xb59f[110],_0x6b6cx5=_0x6b6cx3?-1:1,_0x6b6cx9=_0x6b6cx3?_0x6b6cx2[_0xb59f[67]]-1:0;0<=_0x6b6cx9&&_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9+=_0x6b6cx5){var _0x6b6cxa=this[_0xb59f[1059]][_0xb59f[514]](_0x6b6cx2[_0x6b6cx9]),_0x6b6cx4=_0x6b6cx4+mxUtils[_0xb59f[875]](_0x6b6cxa,this[_0xb59f[1069]])};return _0x6b6cx4};mxSession[_0xb59f[202]][_0xb59f[806]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[288]]==mxConstants[_0xb59f[289]]){var _0x6b6cx3=_0x6b6cx2[_0xb59f[284]](_0xb59f[1088]);null!=_0x6b6cx3&&(this[_0xb59f[251]][_0xb59f[1089]]=_0x6b6cx3+_0xb59f[213]);for(_0x6b6cx3=_0x6b6cx2[_0xb59f[285]];null!=_0x6b6cx3;){var _0x6b6cx4=_0x6b6cx3[_0xb59f[301]][_0xb59f[216]]();_0xb59f[724]==_0x6b6cx4?this[_0xb59f[1090]](_0x6b6cx3):_0xb59f[1091]==_0x6b6cx4&&this[_0xb59f[1092]](_0x6b6cx3);_0x6b6cx3=_0x6b6cx3[_0xb59f[287]]};this[_0xb59f[746]]( new mxEventObject(mxEvent.RECEIVE,_0xb59f[252],_0x6b6cx2))}};mxSession[_0xb59f[202]][_0xb59f[1090]]=function(_0x6b6cx2){( new mxCodec(_0x6b6cx2[_0xb59f[295]]))[_0xb59f[1093]](_0x6b6cx2[_0xb59f[285]],this[_0xb59f[251]])};mxSession[_0xb59f[202]][_0xb59f[1092]]=function(_0x6b6cx2){for(_0x6b6cx2=_0x6b6cx2[_0xb59f[285]];null!=_0x6b6cx2;){_0xb59f[1061]==_0x6b6cx2[_0xb59f[301]]&&this[_0xb59f[1094]](_0x6b6cx2),_0x6b6cx2=_0x6b6cx2[_0xb59f[287]]}};mxSession[_0xb59f[202]][_0xb59f[1094]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[1095]](_0x6b6cx2);if(0<_0x6b6cx2[_0xb59f[67]]){var _0x6b6cx3=this[_0xb59f[1096]](_0x6b6cx2);this[_0xb59f[251]][_0xb59f[746]]( new mxEventObject(mxEvent.CHANGE,_0xb59f[1061],_0x6b6cx3,_0xb59f[1065],_0x6b6cx2));this[_0xb59f[251]][_0xb59f[746]]( new mxEventObject(mxEvent.UNDO,_0xb59f[1061],_0x6b6cx3));this[_0xb59f[746]]( new mxEventObject(mxEvent.FIRED,_0xb59f[1061],_0x6b6cx3))}};mxSession[_0xb59f[202]][_0xb59f[1096]]=function(_0x6b6cx2){var _0x6b6cx3= new mxUndoableEdit(this[_0xb59f[251]],this[_0xb59f[1071]]);_0x6b6cx3[_0xb59f[1065]]=_0x6b6cx2;_0x6b6cx3[_0xb59f[827]]=function(){_0x6b6cx3[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.CHANGE,_0xb59f[1061],_0x6b6cx3,_0xb59f[1065],_0x6b6cx3[_0xb59f[1065]]));_0x6b6cx3[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.NOTIFY,_0xb59f[1061],_0x6b6cx3,_0xb59f[1065],_0x6b6cx3[_0xb59f[1065]]))};return _0x6b6cx3};mxSession[_0xb59f[202]][_0xb59f[1095]]=function(_0x6b6cx2){this[_0xb59f[1059]][_0xb59f[395]]=_0x6b6cx2[_0xb59f[295]];var _0x6b6cx3=[];for(_0x6b6cx2=_0x6b6cx2[_0xb59f[285]];null!=_0x6b6cx2;){var _0x6b6cx4=this[_0xb59f[1098]](_0x6b6cx2);null!=_0x6b6cx4&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx4);_0x6b6cx2=_0x6b6cx2[_0xb59f[287]]};return _0x6b6cx3};mxSession[_0xb59f[202]][_0xb59f[1098]]=function(_0x6b6cx2){var _0x6b6cx3=null;_0x6b6cx2[_0xb59f[288]]==mxConstants[_0xb59f[289]]&&(_0x6b6cx3=_0xb59f[1099]==_0x6b6cx2[_0xb59f[301]]?( new mxCodec(_0x6b6cx2[_0xb59f[295]]))[_0xb59f[1093]](_0x6b6cx2):this[_0xb59f[1059]][_0xb59f[1093]](_0x6b6cx2),null!=_0x6b6cx3&&(_0x6b6cx3[_0xb59f[251]]=this[_0xb59f[251]],_0x6b6cx3[_0xb59f[350]](),_0xb59f[1100]==_0x6b6cx2[_0xb59f[301]]&&null==_0x6b6cx3[_0xb59f[1101]]&&this[_0xb59f[1102]](_0x6b6cx3[_0xb59f[247]])));return _0x6b6cx3};mxSession[_0xb59f[202]][_0xb59f[1102]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1059]][_0xb59f[1104]](_0x6b6cx2[_0xb59f[1103]](),_0x6b6cx2);for(var _0x6b6cx4=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2),_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4;_0x6b6cx5++){this[_0xb59f[1102]](this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,_0x6b6cx5))}};function mxUndoableEdit(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1097]]=_0x6b6cx2;this[_0xb59f[1065]]=[];this[_0xb59f[1105]]=null!=_0x6b6cx3?_0x6b6cx3:!0}mxUndoableEdit[_0xb59f[202]][_0xb59f[1097]]=null;mxUndoableEdit[_0xb59f[202]][_0xb59f[1065]]=null;mxUndoableEdit[_0xb59f[202]][_0xb59f[1105]]=null;mxUndoableEdit[_0xb59f[202]][_0xb59f[1066]]= !1;mxUndoableEdit[_0xb59f[202]][_0xb59f[1106]]= !1;mxUndoableEdit[_0xb59f[202]][_0xb59f[1107]]=function(){return 0==this[_0xb59f[1065]][_0xb59f[67]]};mxUndoableEdit[_0xb59f[202]][_0xb59f[1108]]=function(){return this[_0xb59f[1105]]};mxUndoableEdit[_0xb59f[202]][_0xb59f[99]]=function(_0x6b6cx2){this[_0xb59f[1065]][_0xb59f[207]](_0x6b6cx2)};mxUndoableEdit[_0xb59f[202]][_0xb59f[827]]=function(){};mxUndoableEdit[_0xb59f[202]][_0xb59f[1109]]=function(){};mxUndoableEdit[_0xb59f[202]][_0xb59f[824]]=function(){if(!this[_0xb59f[1066]]){this[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.START_EDIT));for(var _0x6b6cx2=this[_0xb59f[1065]][_0xb59f[67]]-1;0<=_0x6b6cx2;_0x6b6cx2--){var _0x6b6cx3=this[_0xb59f[1065]][_0x6b6cx2];null!=_0x6b6cx3[_0xb59f[350]]?_0x6b6cx3[_0xb59f[350]]():null!=_0x6b6cx3[_0xb59f[824]]&&_0x6b6cx3[_0xb59f[824]]();this[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.EXECUTED,_0xb59f[826],_0x6b6cx3))};this[_0xb59f[1066]]= !0;this[_0xb59f[1106]]= !1;this[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.END_EDIT))};this[_0xb59f[827]]()};mxUndoableEdit[_0xb59f[202]][_0xb59f[825]]=function(){if(!this[_0xb59f[1106]]){this[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.START_EDIT));for(var _0x6b6cx2=this[_0xb59f[1065]][_0xb59f[67]],_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2;_0x6b6cx3++){var _0x6b6cx4=this[_0xb59f[1065]][_0x6b6cx3];null!=_0x6b6cx4[_0xb59f[350]]?_0x6b6cx4[_0xb59f[350]]():null!=_0x6b6cx4[_0xb59f[825]]&&_0x6b6cx4[_0xb59f[825]]();this[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.EXECUTED,_0xb59f[826],_0x6b6cx4))};this[_0xb59f[1066]]= !1;this[_0xb59f[1106]]= !0;this[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.END_EDIT))};this[_0xb59f[827]]()};function mxUndoManager(_0x6b6cx2){this[_0xb59f[803]]=null!=_0x6b6cx2?_0x6b6cx2:100;this[_0xb59f[200]]()}mxUndoManager[_0xb59f[202]]= new mxEventSource;mxUndoManager[_0xb59f[202]][_0xb59f[196]]=mxUndoManager;mxUndoManager[_0xb59f[202]][_0xb59f[803]]=null;mxUndoManager[_0xb59f[202]][_0xb59f[1110]]=null;mxUndoManager[_0xb59f[202]][_0xb59f[1111]]=0;mxUndoManager[_0xb59f[202]][_0xb59f[1107]]=function(){return 0==this[_0xb59f[1110]][_0xb59f[67]]};mxUndoManager[_0xb59f[202]][_0xb59f[200]]=function(){this[_0xb59f[1110]]=[];this[_0xb59f[1111]]=0;this[_0xb59f[746]]( new mxEventObject(mxEvent.CLEAR))};mxUndoManager[_0xb59f[202]][_0xb59f[1112]]=function(){return 0<this[_0xb59f[1111]]};mxUndoManager[_0xb59f[202]][_0xb59f[824]]=function(){for(;0<this[_0xb59f[1111]];){var _0x6b6cx2=this[_0xb59f[1110]][--this[_0xb59f[1111]]];_0x6b6cx2[_0xb59f[824]]();if(_0x6b6cx2[_0xb59f[1108]]()){this[_0xb59f[746]]( new mxEventObject(mxEvent.UNDO,_0xb59f[1061],_0x6b6cx2));break}}};mxUndoManager[_0xb59f[202]][_0xb59f[1113]]=function(){return this[_0xb59f[1111]]<this[_0xb59f[1110]][_0xb59f[67]]};mxUndoManager[_0xb59f[202]][_0xb59f[825]]=function(){for(var _0x6b6cx2=this[_0xb59f[1110]][_0xb59f[67]];this[_0xb59f[1111]]<_0x6b6cx2;){var _0x6b6cx3=this[_0xb59f[1110]][this[_0xb59f[1111]]++];_0x6b6cx3[_0xb59f[825]]();if(_0x6b6cx3[_0xb59f[1108]]()){this[_0xb59f[746]]( new mxEventObject(mxEvent.REDO,_0xb59f[1061],_0x6b6cx3));break}}};mxUndoManager[_0xb59f[202]][_0xb59f[1114]]=function(_0x6b6cx2){this[_0xb59f[330]]();0<this[_0xb59f[803]]&&this[_0xb59f[803]]==this[_0xb59f[1110]][_0xb59f[67]]&&this[_0xb59f[1110]][_0xb59f[1115]]();this[_0xb59f[1110]][_0xb59f[207]](_0x6b6cx2);this[_0xb59f[1111]]=this[_0xb59f[1110]][_0xb59f[67]];this[_0xb59f[746]]( new mxEventObject(mxEvent.ADD,_0xb59f[1061],_0x6b6cx2))};mxUndoManager[_0xb59f[202]][_0xb59f[330]]=function(){if(this[_0xb59f[1110]][_0xb59f[67]]>this[_0xb59f[1111]]){for(var _0x6b6cx2=this[_0xb59f[1110]][_0xb59f[300]](this[_0xb59f[1111]],this[_0xb59f[1110]][_0xb59f[67]]-this[_0xb59f[1111]]),_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3++){_0x6b6cx2[_0x6b6cx3][_0xb59f[1109]]()}}};var mxUrlConverter=function(_0x6b6cx2){var _0x6b6cx3=!0,_0x6b6cx4=null,_0x6b6cx5=null;return {isEnabled:function(){return _0x6b6cx3},setEnabled:function(_0x6b6cx2){_0x6b6cx3=_0x6b6cx2},getBaseUrl:function(){return _0x6b6cx4},setBaseUrl:function(_0x6b6cx2){_0x6b6cx4=_0x6b6cx2},getBaseDomain:function(){return _0x6b6cx4},setBaseDomain:function(_0x6b6cx2){_0x6b6cx4=_0x6b6cx2},isRelativeUrl:function(_0x6b6cx2){return _0xb59f[43]!=_0x6b6cx2[_0xb59f[85]](0,7)&&_0xb59f[46]!=_0x6b6cx2[_0xb59f[85]](0,8)&&_0xb59f[1116]!=_0x6b6cx2[_0xb59f[85]](0,10)},convert:function(_0x6b6cx2){if(_0x6b6cx3&&this[_0xb59f[1117]](_0x6b6cx2)){if(null==_0x6b6cx4){_0x6b6cx5=location[_0xb59f[1118]]+_0xb59f[1119]+location[_0xb59f[1120]];_0x6b6cx4=_0x6b6cx5+location[_0xb59f[1121]];var _0x6b6cxa=_0x6b6cx4[_0xb59f[1122]](_0xb59f[84]);0<_0x6b6cxa&&(_0x6b6cx4=_0x6b6cx4[_0xb59f[85]](0,_0x6b6cxa+1))};_0x6b6cx2=_0xb59f[84]==_0x6b6cx2[_0xb59f[225]](0)?_0x6b6cx5+_0x6b6cx2:_0x6b6cx4+_0x6b6cx2};return _0x6b6cx2}}};function mxPanningManager(_0x6b6cx2){this[_0xb59f[1123]]=null;this[_0xb59f[1124]]= !1;this[_0xb59f[1125]]=this[_0xb59f[1126]]=this[_0xb59f[1127]]=this[_0xb59f[1128]]=this[_0xb59f[1129]]=this[_0xb59f[1130]]=0;this[_0xb59f[1131]]= !1;this[_0xb59f[190]]=this[_0xb59f[360]]=0;this[_0xb59f[1132]]={mouseDown:function(_0x6b6cx2,_0x6b6cx3){},mouseMove:function(_0x6b6cx2,_0x6b6cx3){},mouseUp:mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1124]]&&this[_0xb59f[1076]]()})};_0x6b6cx2[_0xb59f[1133]](this[_0xb59f[1132]]);mxEvent[_0xb59f[169]](document,_0xb59f[753],mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[1124]]&&this[_0xb59f[1076]]()}));var _0x6b6cx3=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[1131]]=mxUtils[_0xb59f[1134]](_0x6b6cx2[_0xb59f[526]]);this[_0xb59f[360]]=_0x6b6cx2[_0xb59f[526]][_0xb59f[360]];this[_0xb59f[190]]=_0x6b6cx2[_0xb59f[526]][_0xb59f[190]];return window[_0xb59f[1141]](mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[1130]]-=this[_0xb59f[1126]];this[_0xb59f[1129]]-=this[_0xb59f[1125]];if(this[_0xb59f[1131]]){var _0x6b6cx3=-_0x6b6cx2[_0xb59f[526]][_0xb59f[360]]-Math[_0xb59f[430]](this[_0xb59f[1126]]),_0x6b6cx5=-_0x6b6cx2[_0xb59f[526]][_0xb59f[190]]-Math[_0xb59f[430]](this[_0xb59f[1125]]);_0x6b6cx2[_0xb59f[1135]](_0x6b6cx3,_0x6b6cx5);_0x6b6cx2[_0xb59f[1136]]=this[_0xb59f[360]]-_0x6b6cx2[_0xb59f[526]][_0xb59f[360]];_0x6b6cx2[_0xb59f[1137]]=this[_0xb59f[190]]-_0x6b6cx2[_0xb59f[526]][_0xb59f[190]];_0x6b6cx2[_0xb59f[746]]( new mxEventObject(mxEvent.PAN))}else {_0x6b6cx2[_0xb59f[1135]](this[_0xb59f[1138]](),this[_0xb59f[1139]]())}}),this[_0xb59f[1140]])});this[_0xb59f[1142]]=function(){return active};this[_0xb59f[1138]]=function(){return Math[_0xb59f[488]](this[_0xb59f[1130]])};this[_0xb59f[1139]]=function(){return Math[_0xb59f[488]](this[_0xb59f[1129]])};this[_0xb59f[861]]=function(){this[_0xb59f[1128]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]];this[_0xb59f[1127]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]];this[_0xb59f[1124]]= !0};this[_0xb59f[1143]]=function(_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[1124]]||this[_0xb59f[861]]();this[_0xb59f[360]]=_0x6b6cx2[_0xb59f[526]][_0xb59f[360]];this[_0xb59f[190]]=_0x6b6cx2[_0xb59f[526]][_0xb59f[190]];_0x6b6cxa=null!=_0x6b6cxa?_0x6b6cxa:0;var _0x6b6cx12=_0x6b6cx2[_0xb59f[526]];this[_0xb59f[1126]]=_0x6b6cx4+(null!=_0x6b6cx9?_0x6b6cx9:0)-_0x6b6cx12[_0xb59f[360]]-_0x6b6cx12[_0xb59f[159]];0>this[_0xb59f[1126]]&&Math[_0xb59f[425]](this[_0xb59f[1126]])<this[_0xb59f[467]]?this[_0xb59f[1126]]=this[_0xb59f[467]]+this[_0xb59f[1126]]:this[_0xb59f[1126]]=this[_0xb59f[1144]]?Math[_0xb59f[160]](this[_0xb59f[1126]],0):0;0==this[_0xb59f[1126]]&&(this[_0xb59f[1126]]=_0x6b6cx4-_0x6b6cx12[_0xb59f[360]],this[_0xb59f[1126]]=0<this[_0xb59f[1126]]&&this[_0xb59f[1126]]<this[_0xb59f[467]]?this[_0xb59f[1126]]-this[_0xb59f[467]]:this[_0xb59f[1144]]?Math[_0xb59f[243]](0,this[_0xb59f[1126]]):0);this[_0xb59f[1125]]=_0x6b6cx5+_0x6b6cxa-_0x6b6cx12[_0xb59f[190]]-_0x6b6cx12[_0xb59f[157]];0>this[_0xb59f[1125]]&&Math[_0xb59f[425]](this[_0xb59f[1125]])<this[_0xb59f[467]]?this[_0xb59f[1125]]=this[_0xb59f[467]]+this[_0xb59f[1125]]:this[_0xb59f[1125]]=this[_0xb59f[1144]]?Math[_0xb59f[160]](this[_0xb59f[1125]],0):0;0==this[_0xb59f[1125]]&&(this[_0xb59f[1125]]=_0x6b6cx5-_0x6b6cx12[_0xb59f[190]],this[_0xb59f[1125]]=0<this[_0xb59f[1125]]&&this[_0xb59f[1125]]<this[_0xb59f[467]]?this[_0xb59f[1125]]-this[_0xb59f[467]]:this[_0xb59f[1144]]?Math[_0xb59f[243]](0,this[_0xb59f[1125]]):0);0!=this[_0xb59f[1126]]||0!=this[_0xb59f[1125]]?(this[_0xb59f[1126]]*=this[_0xb59f[1145]],this[_0xb59f[1125]]*=this[_0xb59f[1145]],null==this[_0xb59f[1123]]&&(this[_0xb59f[1123]]=_0x6b6cx3())):null!=this[_0xb59f[1123]]&&(window[_0xb59f[1146]](this[_0xb59f[1123]]),this[_0xb59f[1123]]=null)};this[_0xb59f[1076]]=function(){if(this[_0xb59f[1124]]){if(this[_0xb59f[1124]]= !1,null!=this[_0xb59f[1123]]&&(window[_0xb59f[1146]](this[_0xb59f[1123]]),this[_0xb59f[1123]]=null),this[_0xb59f[1129]]=this[_0xb59f[1130]]=0,this[_0xb59f[1131]]){_0x6b6cx2[_0xb59f[1136]]=0,_0x6b6cx2[_0xb59f[1137]]=0,_0x6b6cx2[_0xb59f[746]]( new mxEventObject(mxEvent.PAN))}else {var _0x6b6cx3=_0x6b6cx2[_0xb59f[1136]],_0x6b6cx5=_0x6b6cx2[_0xb59f[1137]];if(0!=_0x6b6cx3||0!=_0x6b6cx5){_0x6b6cx2[_0xb59f[1135]](0,0),_0x6b6cx2[_0xb59f[441]][_0xb59f[1147]](this[_0xb59f[1128]]+_0x6b6cx3/_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],this[_0xb59f[1127]]+_0x6b6cx5/_0x6b6cx2[_0xb59f[441]][_0xb59f[255]])}}}};this[_0xb59f[515]]=function(){_0x6b6cx2[_0xb59f[1148]](this[_0xb59f[1132]])}}mxPanningManager[_0xb59f[202]][_0xb59f[1145]]=1/6;mxPanningManager[_0xb59f[202]][_0xb59f[1140]]=10;mxPanningManager[_0xb59f[202]][_0xb59f[1144]]= !0;mxPanningManager[_0xb59f[202]][_0xb59f[467]]=0;function mxPopupMenu(_0x6b6cx2){this[_0xb59f[1033]]=_0x6b6cx2;null!=_0x6b6cx2&&this[_0xb59f[176]]()}mxPopupMenu[_0xb59f[202]]= new mxEventSource;mxPopupMenu[_0xb59f[202]][_0xb59f[196]]=mxPopupMenu;mxPopupMenu[_0xb59f[202]][_0xb59f[1149]]=mxClient[_0xb59f[88]]+_0xb59f[1150];mxPopupMenu[_0xb59f[202]][_0xb59f[931]]=10006;mxPopupMenu[_0xb59f[202]][_0xb59f[1033]]=null;mxPopupMenu[_0xb59f[202]][_0xb59f[1151]]= !1;mxPopupMenu[_0xb59f[202]][_0xb59f[984]]= !0;mxPopupMenu[_0xb59f[202]][_0xb59f[1152]]=0;mxPopupMenu[_0xb59f[202]][_0xb59f[1153]]= !1;mxPopupMenu[_0xb59f[202]][_0xb59f[1154]]= !1;mxPopupMenu[_0xb59f[202]][_0xb59f[1155]]= !0;mxPopupMenu[_0xb59f[202]][_0xb59f[176]]=function(){this[_0xb59f[116]]=document[_0xb59f[55]](_0xb59f[116]);this[_0xb59f[116]][_0xb59f[926]]=_0xb59f[1156];this[_0xb59f[120]]=document[_0xb59f[55]](_0xb59f[120]);this[_0xb59f[116]][_0xb59f[62]](this[_0xb59f[120]]);this[_0xb59f[485]]=document[_0xb59f[55]](_0xb59f[485]);this[_0xb59f[485]][_0xb59f[926]]=_0xb59f[1156];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[497];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[931]]=this[_0xb59f[931]];this[_0xb59f[485]][_0xb59f[62]](this[_0xb59f[116]]);mxEvent[_0xb59f[1157]](this[_0xb59f[485]])};mxPopupMenu[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxPopupMenu[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxPopupMenu[_0xb59f[202]][_0xb59f[737]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[737]]()||this[_0xb59f[1151]]&&mxEvent[_0xb59f[1158]](_0x6b6cx2[_0xb59f[727]]())};mxPopupMenu[_0xb59f[202]][_0xb59f[1025]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx5=_0x6b6cx5||this;this[_0xb59f[1152]]++;_0x6b6cx5[_0xb59f[1159]]&&(_0x6b6cx5[_0xb59f[1160]]&&this[_0xb59f[1051]](_0x6b6cx5,!0),_0x6b6cx5[_0xb59f[1159]]= !1);_0x6b6cx5[_0xb59f[1160]]= !0;var _0x6b6cx12=document[_0xb59f[55]](_0xb59f[121]);_0x6b6cx12[_0xb59f[926]]=_0xb59f[1161];var _0x6b6cx13=document[_0xb59f[55]](_0xb59f[122]);_0x6b6cx13[_0xb59f[926]]=_0xb59f[1162];null!=_0x6b6cx3?(_0x6b6cx9=document[_0xb59f[55]](_0xb59f[466]),_0x6b6cx9[_0xb59f[390]]=_0x6b6cx3,_0x6b6cx13[_0xb59f[62]](_0x6b6cx9)):null!=_0x6b6cx9&&(_0x6b6cx3=document[_0xb59f[55]](_0xb59f[485]),_0x6b6cx3[_0xb59f[926]]=_0x6b6cx9,_0x6b6cx13[_0xb59f[62]](_0x6b6cx3));_0x6b6cx12[_0xb59f[62]](_0x6b6cx13);this[_0xb59f[1155]]&&(_0x6b6cx13=document[_0xb59f[55]](_0xb59f[122]),_0x6b6cx13[_0xb59f[926]]=_0xb59f[1161]+(null!=_0x6b6cxa&&!_0x6b6cxa?_0xb59f[1163]:_0xb59f[110]),mxUtils[_0xb59f[53]](_0x6b6cx13,_0x6b6cx2),_0x6b6cx13[_0xb59f[611]]=_0xb59f[361],_0x6b6cx12[_0xb59f[62]](_0x6b6cx13),_0x6b6cx2=document[_0xb59f[55]](_0xb59f[122]),_0x6b6cx2[_0xb59f[926]]=_0xb59f[1161]+(null!=_0x6b6cxa&&!_0x6b6cxa?_0xb59f[1163]:_0xb59f[110]),_0x6b6cx2[_0xb59f[124]][_0xb59f[1164]]=_0xb59f[1055],_0x6b6cx2[_0xb59f[124]][_0xb59f[1165]]=_0xb59f[699],_0x6b6cx12[_0xb59f[62]](_0x6b6cx2),null==_0x6b6cx5[_0xb59f[485]]&&this[_0xb59f[1166]](_0x6b6cx5));_0x6b6cx5[_0xb59f[120]][_0xb59f[62]](_0x6b6cx12);if(null==_0x6b6cxa||_0x6b6cxa){mxEvent[_0xb59f[759]](_0x6b6cx12,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1167]]=_0x6b6cx12;_0x6b6cx5[_0xb59f[1168]]!=_0x6b6cx12&&_0x6b6cx5[_0xb59f[1168]]!=_0x6b6cx5&&(null!=_0x6b6cx5[_0xb59f[1168]]&&null!=_0x6b6cx5[_0xb59f[1168]][_0xb59f[485]][_0xb59f[265]]&&this[_0xb59f[1169]](_0x6b6cx5),null!=_0x6b6cx12[_0xb59f[485]]&&(this[_0xb59f[1170]](_0x6b6cx5,_0x6b6cx12),_0x6b6cx5[_0xb59f[1168]]=_0x6b6cx12));mxEvent[_0xb59f[722]](_0x6b6cx2)}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){_0x6b6cx5[_0xb59f[1168]]!=_0x6b6cx12&&_0x6b6cx5[_0xb59f[1168]]!=_0x6b6cx5&&(null!=_0x6b6cx5[_0xb59f[1168]]&&null!=_0x6b6cx5[_0xb59f[1168]][_0xb59f[485]][_0xb59f[265]]&&this[_0xb59f[1169]](_0x6b6cx5),this[_0xb59f[1153]]&&null!=_0x6b6cx12[_0xb59f[485]]&&(this[_0xb59f[1170]](_0x6b6cx5,_0x6b6cx12),_0x6b6cx5[_0xb59f[1168]]=_0x6b6cx12));_0x6b6cx12[_0xb59f[926]]=_0xb59f[1171]}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1167]]==_0x6b6cx12&&(_0x6b6cx5[_0xb59f[1168]]!=_0x6b6cx12&&this[_0xb59f[1032]](),null!=_0x6b6cx4&&_0x6b6cx4(_0x6b6cx2));this[_0xb59f[1167]]=null;mxEvent[_0xb59f[722]](_0x6b6cx2)})),mxEvent[_0xb59f[169]](_0x6b6cx12,_0xb59f[1035],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){_0x6b6cx12[_0xb59f[926]]=_0xb59f[1161]}))};return _0x6b6cx12};mxPopupMenu[_0xb59f[202]][_0xb59f[1166]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[116]]=document[_0xb59f[55]](_0xb59f[116]);_0x6b6cx2[_0xb59f[116]][_0xb59f[926]]=_0xb59f[1156];_0x6b6cx2[_0xb59f[120]]=document[_0xb59f[55]](_0xb59f[120]);_0x6b6cx2[_0xb59f[116]][_0xb59f[62]](_0x6b6cx2[_0xb59f[120]]);_0x6b6cx2[_0xb59f[485]]=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx2[_0xb59f[485]][_0xb59f[926]]=_0xb59f[1156];_0x6b6cx2[_0xb59f[485]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx2[_0xb59f[485]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[497];_0x6b6cx2[_0xb59f[485]][_0xb59f[124]][_0xb59f[931]]=this[_0xb59f[931]];_0x6b6cx2[_0xb59f[485]][_0xb59f[62]](_0x6b6cx2[_0xb59f[116]]);var _0x6b6cx3=document[_0xb59f[55]](_0xb59f[466]);_0x6b6cx3[_0xb59f[57]](_0xb59f[390],this[_0xb59f[1149]]);td=_0x6b6cx2[_0xb59f[285]][_0xb59f[287]][_0xb59f[287]];td[_0xb59f[62]](_0x6b6cx3)};mxPopupMenu[_0xb59f[202]][_0xb59f[1170]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx3[_0xb59f[485]]){_0x6b6cx3[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2[_0xb59f[485]][_0xb59f[358]]+_0x6b6cx3[_0xb59f[358]]+_0x6b6cx3[_0xb59f[359]]-1+_0xb59f[168];_0x6b6cx3[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx2[_0xb59f[485]][_0xb59f[362]]+_0x6b6cx3[_0xb59f[362]]+_0xb59f[168];document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx3[_0xb59f[485]]);var _0x6b6cx4=parseInt(_0x6b6cx3[_0xb59f[485]][_0xb59f[358]]),_0x6b6cx5=parseInt(_0x6b6cx3[_0xb59f[485]][_0xb59f[359]]),_0x6b6cx9=document[_0xb59f[112]],_0x6b6cxa=document[_0xb59f[158]];if(_0x6b6cx4+_0x6b6cx5>(_0x6b6cx9[_0xb59f[360]]||_0x6b6cxa[_0xb59f[360]])+(_0x6b6cx9[_0xb59f[159]]||_0x6b6cxa[_0xb59f[159]])){_0x6b6cx3[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2[_0xb59f[485]][_0xb59f[358]]-_0x6b6cx5+(mxClient[_0xb59f[80]]?6:-6)+_0xb59f[168]};mxUtils[_0xb59f[933]](_0x6b6cx3[_0xb59f[485]])}};mxPopupMenu[_0xb59f[202]][_0xb59f[1051]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2=_0x6b6cx2||this;if(this[_0xb59f[1154]]&& !_0x6b6cx3){_0x6b6cx2[_0xb59f[1159]]= !0}else {if(null!=_0x6b6cx2[_0xb59f[120]]){_0x6b6cx2[_0xb59f[1159]]= !1;var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[121]),_0x6b6cx5=document[_0xb59f[55]](_0xb59f[122]);_0x6b6cx5[_0xb59f[926]]=_0xb59f[1162];_0x6b6cx5[_0xb59f[124]][_0xb59f[549]]=_0xb59f[1172];_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);_0x6b6cx5=document[_0xb59f[55]](_0xb59f[122]);_0x6b6cx5[_0xb59f[124]][_0xb59f[549]]=_0xb59f[1172];_0x6b6cx5[_0xb59f[57]](_0xb59f[1173],_0xb59f[1174]);var _0x6b6cx9=document[_0xb59f[55]](_0xb59f[1054]);_0x6b6cx9[_0xb59f[57]](_0xb59f[803],_0xb59f[500]);_0x6b6cx5[_0xb59f[62]](_0x6b6cx9);_0x6b6cx4[_0xb59f[62]](_0x6b6cx5);_0x6b6cx2[_0xb59f[120]][_0xb59f[62]](_0x6b6cx4)}}};mxPopupMenu[_0xb59f[202]][_0xb59f[152]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=this[_0xb59f[485]]&&null!=this[_0xb59f[120]]&&null!=this[_0xb59f[1033]]){this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2+_0xb59f[168];for(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx3+_0xb59f[168];null!=this[_0xb59f[120]][_0xb59f[285]];){mxEvent[_0xb59f[762]](this[_0xb59f[120]][_0xb59f[285]]),this[_0xb59f[120]][_0xb59f[266]](this[_0xb59f[120]][_0xb59f[285]])};this[_0xb59f[1152]]=0;this[_0xb59f[1033]](this,_0x6b6cx4,_0x6b6cx5);0<this[_0xb59f[1152]]&&(this[_0xb59f[1175]](),this[_0xb59f[746]]( new mxEventObject(mxEvent.SHOW)))}};mxPopupMenu[_0xb59f[202]][_0xb59f[1031]]=function(){return null!=this[_0xb59f[485]]&&this[_0xb59f[485]][_0xb59f[265]]==document[_0xb59f[112]]};mxPopupMenu[_0xb59f[202]][_0xb59f[1175]]=function(){9<=document[_0xb59f[5]]&&(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[347]]=_0xb59f[130]);document[_0xb59f[112]][_0xb59f[62]](this[_0xb59f[485]]);mxUtils[_0xb59f[933]](this[_0xb59f[485]])};mxPopupMenu[_0xb59f[202]][_0xb59f[1032]]=function(){null!=this[_0xb59f[485]]&&(null!=this[_0xb59f[485]][_0xb59f[265]]&&this[_0xb59f[485]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[485]]),this[_0xb59f[1169]](this),this[_0xb59f[1160]]= !1)};mxPopupMenu[_0xb59f[202]][_0xb59f[1169]]=function(_0x6b6cx2){null!=_0x6b6cx2[_0xb59f[1168]]&&(this[_0xb59f[1169]](_0x6b6cx2[_0xb59f[1168]]),null!=_0x6b6cx2[_0xb59f[1168]][_0xb59f[485]][_0xb59f[265]]&&_0x6b6cx2[_0xb59f[1168]][_0xb59f[485]][_0xb59f[265]][_0xb59f[266]](_0x6b6cx2[_0xb59f[1168]][_0xb59f[485]]),_0x6b6cx2[_0xb59f[1168]]=null)};mxPopupMenu[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[485]]&&(mxEvent[_0xb59f[762]](this[_0xb59f[485]]),null!=this[_0xb59f[485]][_0xb59f[265]]&&this[_0xb59f[485]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[485]]),this[_0xb59f[485]]=null)};function mxAutoSaveManager(_0x6b6cx2){this[_0xb59f[1176]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx4){this[_0xb59f[994]]()&&this[_0xb59f[1177]](_0x6b6cx4[_0xb59f[720]](_0xb59f[1061])[_0xb59f[1065]])});this[_0xb59f[1178]](_0x6b6cx2)}mxAutoSaveManager[_0xb59f[202]]= new mxEventSource;mxAutoSaveManager[_0xb59f[202]][_0xb59f[196]]=mxAutoSaveManager;mxAutoSaveManager[_0xb59f[202]][_0xb59f[1179]]=null;mxAutoSaveManager[_0xb59f[202]][_0xb59f[1180]]=10;mxAutoSaveManager[_0xb59f[202]][_0xb59f[1181]]=2;mxAutoSaveManager[_0xb59f[202]][_0xb59f[1182]]=5;mxAutoSaveManager[_0xb59f[202]][_0xb59f[1183]]=0;mxAutoSaveManager[_0xb59f[202]][_0xb59f[1184]]=0;mxAutoSaveManager[_0xb59f[202]][_0xb59f[984]]= !0;mxAutoSaveManager[_0xb59f[202]][_0xb59f[1176]]=null;mxAutoSaveManager[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxAutoSaveManager[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxAutoSaveManager[_0xb59f[202]][_0xb59f[1178]]=function(_0x6b6cx2){null!=this[_0xb59f[1179]]&&this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[745]](this[_0xb59f[1176]]);this[_0xb59f[1179]]=_0x6b6cx2;null!=this[_0xb59f[1179]]&&this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[169]](mxEvent.CHANGE,this[_0xb59f[1176]])};mxAutoSaveManager[_0xb59f[202]][_0xb59f[815]]=function(){};mxAutoSaveManager[_0xb59f[202]][_0xb59f[1177]]=function(_0x6b6cx2){_0x6b6cx2=(( new Date)[_0xb59f[178]]()-this[_0xb59f[1184]])/1E3;_0x6b6cx2>this[_0xb59f[1180]]||this[_0xb59f[1183]]>=this[_0xb59f[1182]]&&_0x6b6cx2>this[_0xb59f[1181]]?(this[_0xb59f[815]](),this[_0xb59f[862]]()):this[_0xb59f[1183]]++};mxAutoSaveManager[_0xb59f[202]][_0xb59f[862]]=function(){this[_0xb59f[1184]]=( new Date)[_0xb59f[178]]();this[_0xb59f[1183]]=0};mxAutoSaveManager[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1178]](null)};function mxAnimation(_0x6b6cx2){this[_0xb59f[1140]]=null!=_0x6b6cx2?_0x6b6cx2:20}mxAnimation[_0xb59f[202]]= new mxEventSource;mxAnimation[_0xb59f[202]][_0xb59f[196]]=mxAnimation;mxAnimation[_0xb59f[202]][_0xb59f[1140]]=null;mxAnimation[_0xb59f[202]][_0xb59f[1123]]=null;mxAnimation[_0xb59f[202]][_0xb59f[1185]]=function(){null==this[_0xb59f[1123]]&&(this[_0xb59f[1123]]=window[_0xb59f[1141]](mxUtils[_0xb59f[885]](this,this[_0xb59f[1186]]),this[_0xb59f[1140]]))};mxAnimation[_0xb59f[202]][_0xb59f[1186]]=function(){this[_0xb59f[746]]( new mxEventObject(mxEvent.EXECUTE))};mxAnimation[_0xb59f[202]][_0xb59f[1187]]=function(){null!=this[_0xb59f[1123]]&&(window[_0xb59f[1146]](this[_0xb59f[1123]]),this[_0xb59f[1123]]=null,this[_0xb59f[746]]( new mxEventObject(mxEvent.DONE)))};function mxMorphing(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxAnimation[_0xb59f[239]](this,_0x6b6cx5);this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[1188]]=null!=_0x6b6cx3?_0x6b6cx3:6;this[_0xb59f[1189]]=null!=_0x6b6cx4?_0x6b6cx4:1.5}mxMorphing[_0xb59f[202]]= new mxAnimation;mxMorphing[_0xb59f[202]][_0xb59f[196]]=mxMorphing;mxMorphing[_0xb59f[202]][_0xb59f[1179]]=null;mxMorphing[_0xb59f[202]][_0xb59f[1188]]=null;mxMorphing[_0xb59f[202]][_0xb59f[1190]]=0;mxMorphing[_0xb59f[202]][_0xb59f[1189]]=null;mxMorphing[_0xb59f[202]][_0xb59f[895]]=null;mxMorphing[_0xb59f[202]][_0xb59f[1186]]=function(){var _0x6b6cx2= new mxCellStatePreview(this[_0xb59f[1179]]);if(null!=this[_0xb59f[895]]){for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[895]][_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[1191]](cells[_0x6b6cx3],_0x6b6cx2,!1)}}else {this[_0xb59f[1191]](this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[501]](),_0x6b6cx2,!0)};this[_0xb59f[539]](_0x6b6cx2);(_0x6b6cx2[_0xb59f[1107]]()||this[_0xb59f[1190]]++ >=this[_0xb59f[1188]])&&this[_0xb59f[1187]]()};mxMorphing[_0xb59f[202]][_0xb59f[539]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[539]]()};mxMorphing[_0xb59f[202]][_0xb59f[1191]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2),_0x6b6cx9=null;if(null!=_0x6b6cx5&&(_0x6b6cx9=this[_0xb59f[1192]](_0x6b6cx5),this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx2)&&(0!=_0x6b6cx9[_0xb59f[235]]||0!=_0x6b6cx9[_0xb59f[236]]))){var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[512]](),_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[518]]();_0x6b6cx9[_0xb59f[235]]+=_0x6b6cxa[_0xb59f[235]]*_0x6b6cx12;_0x6b6cx9[_0xb59f[236]]+=_0x6b6cxa[_0xb59f[236]]*_0x6b6cx12;_0x6b6cx3[_0xb59f[1194]](_0x6b6cx5,-_0x6b6cx9[_0xb59f[235]]/this[_0xb59f[1189]],-_0x6b6cx9[_0xb59f[236]]/this[_0xb59f[1189]])};if(_0x6b6cx4&&!this[_0xb59f[1195]](_0x6b6cx5,_0x6b6cx9)){_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[262]](_0x6b6cx2);for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){this[_0xb59f[1191]](this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9),_0x6b6cx3,_0x6b6cx4)}}};mxMorphing[_0xb59f[202]][_0xb59f[1195]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx3&&(0!=_0x6b6cx3[_0xb59f[235]]||0!=_0x6b6cx3[_0xb59f[236]])};mxMorphing[_0xb59f[202]][_0xb59f[1192]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1196]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[512]](),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[518]]();_0x6b6cx2= new mxPoint(_0x6b6cx2[_0xb59f[235]]/_0x6b6cx5-_0x6b6cx4[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]/_0x6b6cx5-_0x6b6cx4[_0xb59f[236]]);return  new mxPoint((_0x6b6cx3[_0xb59f[235]]-_0x6b6cx2[_0xb59f[235]])*_0x6b6cx5,(_0x6b6cx3[_0xb59f[236]]-_0x6b6cx2[_0xb59f[236]])*_0x6b6cx5)};mxMorphing[_0xb59f[202]][_0xb59f[1196]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=_0x6b6cx2&&(_0x6b6cx3=this[_0xb59f[1196]](this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx2)),_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx2),null!=_0x6b6cx2&&(_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx2[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]+=_0x6b6cx2[_0xb59f[236]]));null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[512]](),_0x6b6cx3= new mxPoint(-_0x6b6cx3[_0xb59f[235]],-_0x6b6cx3[_0xb59f[236]]));return _0x6b6cx3};function mxImageBundle(_0x6b6cx2){this[_0xb59f[1199]]=[];this[_0xb59f[1200]]=null!=_0x6b6cx2?_0x6b6cx2:!1}mxImageBundle[_0xb59f[202]][_0xb59f[1199]]=null;mxImageBundle[_0xb59f[202]][_0xb59f[1199]]=null;mxImageBundle[_0xb59f[202]][_0xb59f[1201]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[1199]][_0x6b6cx2]={value:_0x6b6cx3,fallback:_0x6b6cx4}};mxImageBundle[_0xb59f[202]][_0xb59f[1202]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[1199]][_0x6b6cx2],null!=_0x6b6cx2&&(_0x6b6cx3=this[_0xb59f[1200]]?_0x6b6cx2[_0xb59f[1203]]:_0x6b6cx2[_0xb59f[131]]));return _0x6b6cx3};function mxImageExport(){}mxImageExport[_0xb59f[202]][_0xb59f[1204]]= !1;mxImageExport[_0xb59f[202]][_0xb59f[1205]]=function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2&&(this[_0xb59f[1207]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[1206]]),this[_0xb59f[1204]]&&this[_0xb59f[1207]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[1208]]))};mxImageExport[_0xb59f[202]][_0xb59f[1207]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(null!=_0x6b6cx2){_0x6b6cx4(_0x6b6cx2,_0x6b6cx3);for(var _0x6b6cx5=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cx9=_0x6b6cx5[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9;_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx5[_0xb59f[441]][_0xb59f[248]](_0x6b6cx5[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2[_0xb59f[246]],_0x6b6cxa));this[_0xb59f[1207]](_0x6b6cx12,_0x6b6cx3,_0x6b6cx4)}}};mxImageExport[_0xb59f[202]][_0xb59f[1206]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[253]] instanceof mxShape&&(_0x6b6cx3[_0xb59f[815]](),_0x6b6cx2[_0xb59f[253]][_0xb59f[1209]](_0x6b6cx3),_0x6b6cx3[_0xb59f[1210]]());null!=_0x6b6cx2[_0xb59f[963]]&&(_0x6b6cx3[_0xb59f[815]](),_0x6b6cx2[_0xb59f[963]][_0xb59f[1209]](_0x6b6cx3),_0x6b6cx3[_0xb59f[1210]]())};mxImageExport[_0xb59f[202]][_0xb59f[1208]]=function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2[_0xb59f[1211]]&&_0x6b6cx2[_0xb59f[1211]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx5){_0x6b6cx5 instanceof mxShape&&_0x6b6cx5[_0xb59f[1209]](_0x6b6cx3)})};function mxAbstractCanvas2D(){this[_0xb59f[1212]]=this[_0xb59f[1213]]();this[_0xb59f[862]]()}mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[724]]=null;mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1214]]=null;mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1215]]=null;mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1216]]= !0;mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1217]]=0;mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1218]]=0;mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1219]]=_0xb59f[1220];mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1221]]=_0xb59f[1222];mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1223]]=_0xb59f[1224];mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1225]]=_0xb59f[1226];mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1227]]=_0xb59f[1228];mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1229]]= !1;mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1213]]=function(){return  new mxUrlConverter};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[862]]=function(){this[_0xb59f[724]]=this[_0xb59f[1230]]();this[_0xb59f[1214]]=[]};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1230]]=function(){return {dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:_0xb59f[1231],lineCap:_0xb59f[1232],lineJoin:_0xb59f[1233],miterLimit:10,fontColor:_0xb59f[1234],fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants[_0xb59f[483]],fontFamily:mxConstants[_0xb59f[484]],fontStyle:0,shadow:!1,shadowColor:mxConstants[_0xb59f[1235]],shadowAlpha:mxConstants[_0xb59f[1236]],shadowDx:mxConstants[_0xb59f[1237]],shadowDy:mxConstants[_0xb59f[1238]],rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1239]]=function(_0x6b6cx2){return Math[_0xb59f[488]](parseFloat(_0x6b6cx2))};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1240]]=function(){if(null!=this[_0xb59f[1215]]&&(this[_0xb59f[1215]][_0xb59f[207]](arguments[0]),2<arguments[_0xb59f[67]])){for(var _0x6b6cx2=this[_0xb59f[724]],_0x6b6cx3=2;_0x6b6cx3<arguments[_0xb59f[67]];_0x6b6cx3+=2){this[_0xb59f[1217]]=arguments[_0x6b6cx3-1],this[_0xb59f[1218]]=arguments[_0x6b6cx3],this[_0xb59f[1215]][_0xb59f[207]](this[_0xb59f[1239]]((this[_0xb59f[1217]]+_0x6b6cx2[_0xb59f[1126]])*_0x6b6cx2[_0xb59f[255]])),this[_0xb59f[1215]][_0xb59f[207]](this[_0xb59f[1239]]((this[_0xb59f[1218]]+_0x6b6cx2[_0xb59f[1125]])*_0x6b6cx2[_0xb59f[255]]))}}};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1241]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx4*=Math[_0xb59f[424]]/180;return mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx2,_0x6b6cx3),Math[_0xb59f[426]](_0x6b6cx4),Math[_0xb59f[427]](_0x6b6cx4), new mxPoint(_0x6b6cx5,_0x6b6cx9))};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[815]]=function(){this[_0xb59f[1214]][_0xb59f[207]](this[_0xb59f[724]]);this[_0xb59f[724]]=mxUtils[_0xb59f[238]](this[_0xb59f[724]])};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1210]]=function(){this[_0xb59f[724]]=this[_0xb59f[1214]][_0xb59f[1242]]()};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[255]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[255]]*=_0x6b6cx2;this[_0xb59f[724]][_0xb59f[610]]*=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[513]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[724]][_0xb59f[1126]]+=_0x6b6cx2;this[_0xb59f[724]][_0xb59f[1125]]+=_0x6b6cx3};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1243]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[1244]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1245]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);this[_0xb59f[724]][_0xb59f[604]]=_0x6b6cx2;this[_0xb59f[724]][_0xb59f[606]]=null};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1246]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){_0x6b6cx4=this[_0xb59f[724]];_0x6b6cx4[_0xb59f[604]]=_0x6b6cx2;_0x6b6cx4[_0xb59f[1247]]=null!=_0x6b6cx13?_0x6b6cx13:1;_0x6b6cx4[_0xb59f[606]]=_0x6b6cx3;_0x6b6cx4[_0xb59f[1248]]=null!=_0x6b6cx14?_0x6b6cx14:1;_0x6b6cx4[_0xb59f[607]]=_0x6b6cx12};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1249]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);this[_0xb59f[724]][_0xb59f[608]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1250]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[610]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1251]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[648]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1252]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[649]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1253]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[1254]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1255]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[1256]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1257]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[1258]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1259]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);this[_0xb59f[724]][_0xb59f[665]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1260]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);this[_0xb59f[724]][_0xb59f[1261]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1262]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);this[_0xb59f[724]][_0xb59f[1263]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1264]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[487]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1265]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[486]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1266]]=function(_0x6b6cx2){null==_0x6b6cx2&&(_0x6b6cx2=0);this[_0xb59f[724]][_0xb59f[666]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1267]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[639]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1268]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);this[_0xb59f[724]][_0xb59f[1269]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1270]]=function(_0x6b6cx2){this[_0xb59f[724]][_0xb59f[1271]]=_0x6b6cx2};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1272]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[724]][_0xb59f[1273]]=_0x6b6cx2;this[_0xb59f[724]][_0xb59f[1274]]=_0x6b6cx3};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1275]]=function(){this[_0xb59f[1218]]=this[_0xb59f[1217]]=0;this[_0xb59f[1215]]=[]};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1276]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1240]](this[_0xb59f[1219]],_0x6b6cx2,_0x6b6cx3)};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1277]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1240]](this[_0xb59f[1221]],_0x6b6cx2,_0x6b6cx3)};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1278]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[1240]](this[_0xb59f[1223]],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1279]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[1240]](this[_0xb59f[1225]],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa)};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1280]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){_0x6b6cx2=mxUtils[_0xb59f[1281]](this[_0xb59f[1217]],this[_0xb59f[1218]],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12);for(_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3+=6){this[_0xb59f[1279]](_0x6b6cx2[_0x6b6cx3],_0x6b6cx2[_0x6b6cx3+1],_0x6b6cx2[_0x6b6cx3+2],_0x6b6cx2[_0x6b6cx3+3],_0x6b6cx2[_0x6b6cx3+4],_0x6b6cx2[_0x6b6cx3+5])}};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[268]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[1240]](this[_0xb59f[1227]])};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1282]]=function(){};function mxXmlCanvas2D(_0x6b6cx2){mxAbstractCanvas2D[_0xb59f[239]](this);this[_0xb59f[813]]=_0x6b6cx2;this[_0xb59f[1283]]()}mxUtils[_0xb59f[1284]](mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1285]]= !0;mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1286]]= !0;mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1283]]=function(){var _0x6b6cx2;_0x6b6cx2=this[_0xb59f[55]](_0xb59f[1287]);_0x6b6cx2[_0xb59f[57]](_0xb59f[1288],mxConstants.DEFAULT_FONTFAMILY);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx2);_0x6b6cx2=this[_0xb59f[55]](_0xb59f[1289]);_0x6b6cx2[_0xb59f[57]](_0xb59f[803],mxConstants.DEFAULT_FONTSIZE);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx2);_0x6b6cx2=this[_0xb59f[55]](_0xb59f[1290]);_0x6b6cx2[_0xb59f[57]](_0xb59f[352],mxConstants.SHADOWCOLOR);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx2);_0x6b6cx2=this[_0xb59f[55]](_0xb59f[1291]);_0x6b6cx2[_0xb59f[57]](_0xb59f[1244],mxConstants.SHADOW_OPACITY);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx2);_0x6b6cx2=this[_0xb59f[55]](_0xb59f[1292]);_0x6b6cx2[_0xb59f[57]](_0xb59f[1126],mxConstants.SHADOW_OFFSET_X);_0x6b6cx2[_0xb59f[57]](_0xb59f[1125],mxConstants.SHADOW_OFFSET_Y);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx2)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1239]]=function(_0x6b6cx2){return parseFloat(parseFloat(_0x6b6cx2)[_0xb59f[1293]](2))};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[55]]=function(_0x6b6cx2){return this[_0xb59f[813]][_0xb59f[295]][_0xb59f[55]](_0x6b6cx2)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[815]]=function(){this[_0xb59f[1286]]&&mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[815]][_0xb59f[183]](this,arguments);this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[55]](_0xb59f[815]))};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1210]]=function(){this[_0xb59f[1286]]&&mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1210]][_0xb59f[183]](this,arguments);this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[55]](_0xb59f[1210]))};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[255]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[255]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1243]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[255]);_0x6b6cx3[_0xb59f[57]](_0xb59f[255],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[513]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[55]](_0xb59f[513]);_0x6b6cx4[_0xb59f[57]](_0xb59f[1126],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx4[_0xb59f[57]](_0xb59f[1125],this[_0xb59f[1239]](_0x6b6cx3));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx4)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1294]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=this[_0xb59f[55]](_0xb59f[1294]);if(0!=_0x6b6cx2||_0x6b6cx3||_0x6b6cx4){_0x6b6cxa[_0xb59f[57]](_0xb59f[1295],this[_0xb59f[1239]](_0x6b6cx2)),_0x6b6cxa[_0xb59f[57]](_0xb59f[623],_0x6b6cx3?_0xb59f[500]:_0xb59f[468]),_0x6b6cxa[_0xb59f[57]](_0xb59f[624],_0x6b6cx4?_0xb59f[500]:_0xb59f[468]),_0x6b6cxa[_0xb59f[57]](_0xb59f[1296],this[_0xb59f[1239]](_0x6b6cx5)),_0x6b6cxa[_0xb59f[57]](_0xb59f[1297],this[_0xb59f[1239]](_0x6b6cx9)),this[_0xb59f[813]][_0xb59f[62]](_0x6b6cxa)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1243]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1244]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1243]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1244]);_0x6b6cx3[_0xb59f[57]](_0xb59f[1244],this[_0xb59f[1239]](_0x6b6cx2));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1245]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[604]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1245]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1298]);_0x6b6cx3[_0xb59f[57]](_0xb59f[352],null!=_0x6b6cx2?_0x6b6cx2:mxConstants[_0xb59f[217]]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1246]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){if(null!=_0x6b6cx2&&null!=_0x6b6cx3){mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1246]][_0xb59f[183]](this,arguments);var _0x6b6cx15=this[_0xb59f[55]](_0xb59f[1299]);_0x6b6cx15[_0xb59f[57]](_0xb59f[1300],_0x6b6cx2);_0x6b6cx15[_0xb59f[57]](_0xb59f[1301],_0x6b6cx3);_0x6b6cx15[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx15[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx5));_0x6b6cx15[_0xb59f[57]](_0xb59f[1302],this[_0xb59f[1239]](_0x6b6cx9));_0x6b6cx15[_0xb59f[57]](_0xb59f[1303],this[_0xb59f[1239]](_0x6b6cxa));null!=_0x6b6cx12&&_0x6b6cx15[_0xb59f[57]](_0xb59f[663],_0x6b6cx12);null!=_0x6b6cx13&&_0x6b6cx15[_0xb59f[57]](_0xb59f[1304],_0x6b6cx13);null!=_0x6b6cx14&&_0x6b6cx15[_0xb59f[57]](_0xb59f[1305],_0x6b6cx14);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx15)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1249]]=function(_0x6b6cx2){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[608]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1249]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1306]);_0x6b6cx3[_0xb59f[57]](_0xb59f[352],null!=_0x6b6cx2?_0x6b6cx2:mxConstants[_0xb59f[217]]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1250]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[610]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1250]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1307]);_0x6b6cx3[_0xb59f[57]](_0xb59f[117],this[_0xb59f[1239]](_0x6b6cx2));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1251]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[648]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1251]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[648]);_0x6b6cx3[_0xb59f[57]](_0xb59f[648],_0x6b6cx2?_0xb59f[500]:_0xb59f[468]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1252]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[649]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1252]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1308]);_0x6b6cx3[_0xb59f[57]](_0xb59f[1309],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1253]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1254]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1253]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1310]);_0x6b6cx3[_0xb59f[57]](_0xb59f[1311],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1255]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1256]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1255]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1312]);_0x6b6cx3[_0xb59f[57]](_0xb59f[234],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1257]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1258]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1257]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1313]);_0x6b6cx3[_0xb59f[57]](_0xb59f[1314],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1259]]=function(_0x6b6cx2){if(this[_0xb59f[1285]]){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[665]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1259]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1315]);_0x6b6cx3[_0xb59f[57]](_0xb59f[352],null!=_0x6b6cx2?_0x6b6cx2:mxConstants[_0xb59f[217]]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1260]]=function(_0x6b6cx2){if(this[_0xb59f[1285]]){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1261]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1260]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1316]);_0x6b6cx3[_0xb59f[57]](_0xb59f[352],null!=_0x6b6cx2?_0x6b6cx2:mxConstants[_0xb59f[217]]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1262]]=function(_0x6b6cx2){if(this[_0xb59f[1285]]){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1263]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1262]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1317]);_0x6b6cx3[_0xb59f[57]](_0xb59f[352],null!=_0x6b6cx2?_0x6b6cx2:mxConstants[_0xb59f[217]]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1264]]=function(_0x6b6cx2){if(this[_0xb59f[1285]]){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[487]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1264]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1289]);_0x6b6cx3[_0xb59f[57]](_0xb59f[803],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1265]]=function(_0x6b6cx2){if(this[_0xb59f[1285]]){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[486]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1265]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1287]);_0x6b6cx3[_0xb59f[57]](_0xb59f[1288],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1266]]=function(_0x6b6cx2){if(this[_0xb59f[1285]]){null==_0x6b6cx2&&(_0x6b6cx2=0);if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[666]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1266]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1318]);_0x6b6cx3[_0xb59f[57]](_0xb59f[124],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1267]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[639]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1267]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[639]);_0x6b6cx3[_0xb59f[57]](_0xb59f[984],_0x6b6cx2?_0xb59f[500]:_0xb59f[468]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1268]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){_0x6b6cx2==mxConstants[_0xb59f[217]]&&(_0x6b6cx2=null);if(this[_0xb59f[724]][_0xb59f[1269]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1268]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1290]);_0x6b6cx3[_0xb59f[57]](_0xb59f[352],null!=_0x6b6cx2?_0x6b6cx2:mxConstants[_0xb59f[217]]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1270]]=function(_0x6b6cx2){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1271]]==_0x6b6cx2){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1270]][_0xb59f[183]](this,arguments)};var _0x6b6cx3=this[_0xb59f[55]](_0xb59f[1291]);_0x6b6cx3[_0xb59f[57]](_0xb59f[1244],_0x6b6cx2);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx3)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1272]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1286]]){if(this[_0xb59f[724]][_0xb59f[1273]]==_0x6b6cx2&&this[_0xb59f[724]][_0xb59f[1274]]==_0x6b6cx3){return};mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1272]][_0xb59f[183]](this,arguments)};var _0x6b6cx4=this[_0xb59f[55]](_0xb59f[1292]);_0x6b6cx4[_0xb59f[57]](_0xb59f[1126],_0x6b6cx2);_0x6b6cx4[_0xb59f[57]](_0xb59f[1125],_0x6b6cx3);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx4)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1319]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[55]](_0xb59f[1319]);_0x6b6cx9[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx9[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3));_0x6b6cx9[_0xb59f[57]](_0xb59f[1302],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx9[_0xb59f[57]](_0xb59f[1303],this[_0xb59f[1239]](_0x6b6cx5));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx9)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1320]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){var _0x6b6cx12=this[_0xb59f[55]](_0xb59f[1320]);_0x6b6cx12[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx12[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3));_0x6b6cx12[_0xb59f[57]](_0xb59f[1302],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx12[_0xb59f[57]](_0xb59f[1303],this[_0xb59f[1239]](_0x6b6cx5));_0x6b6cx12[_0xb59f[57]](_0xb59f[1126],this[_0xb59f[1239]](_0x6b6cx9));_0x6b6cx12[_0xb59f[57]](_0xb59f[1125],this[_0xb59f[1239]](_0x6b6cxa));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx12)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[680]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[55]](_0xb59f[680]);_0x6b6cx9[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx9[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3));_0x6b6cx9[_0xb59f[57]](_0xb59f[1302],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx9[_0xb59f[57]](_0xb59f[1303],this[_0xb59f[1239]](_0x6b6cx5));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx9)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[618]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13){_0x6b6cx9=this[_0xb59f[1212]][_0xb59f[1321]](_0x6b6cx9);var _0x6b6cx14=this[_0xb59f[55]](_0xb59f[618]);_0x6b6cx14[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx14[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3));_0x6b6cx14[_0xb59f[57]](_0xb59f[1302],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx14[_0xb59f[57]](_0xb59f[1303],this[_0xb59f[1239]](_0x6b6cx5));_0x6b6cx14[_0xb59f[57]](_0xb59f[390],_0x6b6cx9);_0x6b6cx14[_0xb59f[57]](_0xb59f[1322],_0x6b6cxa?_0xb59f[500]:_0xb59f[468]);_0x6b6cx14[_0xb59f[57]](_0xb59f[623],_0x6b6cx12?_0xb59f[500]:_0xb59f[468]);_0x6b6cx14[_0xb59f[57]](_0xb59f[624],_0x6b6cx13?_0xb59f[500]:_0xb59f[468]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx14)};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1275]]=function(){this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[55]](_0xb59f[1275]));this[_0xb59f[1218]]=this[_0xb59f[1217]]=0};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1276]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[55]](_0xb59f[582]);_0x6b6cx4[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx4[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx4);this[_0xb59f[1217]]=_0x6b6cx2;this[_0xb59f[1218]]=_0x6b6cx3};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1277]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[55]](_0xb59f[683]);_0x6b6cx4[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx4[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx4);this[_0xb59f[1217]]=_0x6b6cx2;this[_0xb59f[1218]]=_0x6b6cx3};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1278]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[55]](_0xb59f[1323]);_0x6b6cx9[_0xb59f[57]](_0xb59f[1324],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx9[_0xb59f[57]](_0xb59f[1325],this[_0xb59f[1239]](_0x6b6cx3));_0x6b6cx9[_0xb59f[57]](_0xb59f[1326],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx9[_0xb59f[57]](_0xb59f[1327],this[_0xb59f[1239]](_0x6b6cx5));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx9);this[_0xb59f[1217]]=_0x6b6cx4;this[_0xb59f[1218]]=_0x6b6cx5};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1279]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){var _0x6b6cx12=this[_0xb59f[55]](_0xb59f[1328]);_0x6b6cx12[_0xb59f[57]](_0xb59f[1324],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx12[_0xb59f[57]](_0xb59f[1325],this[_0xb59f[1239]](_0x6b6cx3));_0x6b6cx12[_0xb59f[57]](_0xb59f[1326],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx12[_0xb59f[57]](_0xb59f[1327],this[_0xb59f[1239]](_0x6b6cx5));_0x6b6cx12[_0xb59f[57]](_0xb59f[1329],this[_0xb59f[1239]](_0x6b6cx9));_0x6b6cx12[_0xb59f[57]](_0xb59f[1330],this[_0xb59f[1239]](_0x6b6cxa));this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx12);this[_0xb59f[1217]]=_0x6b6cx9;this[_0xb59f[1218]]=_0x6b6cxa};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[268]]=function(){this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[55]](_0xb59f[268]))};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[963]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){if(this[_0xb59f[1285]]&&null!=_0x6b6cx9){mxUtils[_0xb59f[1331]](_0x6b6cx9)&&(_0x6b6cx9=mxUtils[_0xb59f[532]](_0x6b6cx9));var _0x6b6cx18=this[_0xb59f[55]](_0xb59f[963]);_0x6b6cx18[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2));_0x6b6cx18[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3));_0x6b6cx18[_0xb59f[57]](_0xb59f[1302],this[_0xb59f[1239]](_0x6b6cx4));_0x6b6cx18[_0xb59f[57]](_0xb59f[1303],this[_0xb59f[1239]](_0x6b6cx5));_0x6b6cx18[_0xb59f[57]](_0xb59f[1332],_0x6b6cx9);null!=_0x6b6cxa&&_0x6b6cx18[_0xb59f[57]](_0xb59f[611],_0x6b6cxa);null!=_0x6b6cx12&&_0x6b6cx18[_0xb59f[57]](_0xb59f[552],_0x6b6cx12);_0x6b6cx18[_0xb59f[57]](_0xb59f[1333],_0x6b6cx13?_0xb59f[500]:_0xb59f[468]);null==_0x6b6cx14&&(_0x6b6cx14=_0xb59f[110]);_0x6b6cx18[_0xb59f[57]](_0xb59f[1239],_0x6b6cx14);null!=_0x6b6cx15&&_0x6b6cx18[_0xb59f[57]](_0xb59f[1334],_0x6b6cx15?_0xb59f[500]:_0xb59f[468]);null!=_0x6b6cx16&&_0x6b6cx18[_0xb59f[57]](_0xb59f[1335],_0x6b6cx16?_0xb59f[500]:_0xb59f[468]);null!=_0x6b6cx17&&_0x6b6cx18[_0xb59f[57]](_0xb59f[603],_0x6b6cx17);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx18)}};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1336]]=function(){this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[55]](_0xb59f[1336]))};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1334]]=function(){this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[55]](_0xb59f[1334]))};mxXmlCanvas2D[_0xb59f[202]][_0xb59f[1337]]=function(){this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[55]](_0xb59f[1338]))};function mxSvgCanvas2D(_0x6b6cx2,_0x6b6cx3){mxAbstractCanvas2D[_0xb59f[239]](this);this[_0xb59f[813]]=_0x6b6cx2;this[_0xb59f[1339]]=[];this[_0xb59f[1340]]=null;this[_0xb59f[1341]]=null!=_0x6b6cx3?_0x6b6cx3:!1;var _0x6b6cx4=null;if(_0x6b6cx2[_0xb59f[295]]!=document){for(_0x6b6cx4=_0x6b6cx2;null!=_0x6b6cx4&&_0xb59f[571]!=_0x6b6cx4[_0xb59f[301]];){_0x6b6cx4=_0x6b6cx4[_0xb59f[265]]}};null!=_0x6b6cx4&&(0<_0x6b6cx4[_0xb59f[64]](_0xb59f[1340])[_0xb59f[67]]&&(this[_0xb59f[1340]]=_0x6b6cx4[_0xb59f[64]](_0xb59f[1340])[0]),null==this[_0xb59f[1340]]&&(this[_0xb59f[1340]]=this[_0xb59f[55]](_0xb59f[1340]),null!=_0x6b6cx4[_0xb59f[285]]?_0x6b6cx4[_0xb59f[950]](this[_0xb59f[1340]],_0x6b6cx4[_0xb59f[285]]):_0x6b6cx4[_0xb59f[62]](this[_0xb59f[1340]])),this[_0xb59f[1341]]&&this[_0xb59f[1340]][_0xb59f[62]](this[_0xb59f[1342]]()))}mxUtils[_0xb59f[1284]](mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D[_0xb59f[202]][_0xb59f[252]]=null;mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1343]]= !0;mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1285]]= !0;mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1344]]= !0;mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1345]]=0;mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1346]]=0;mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1347]]= !1;mxSvgCanvas2D[_0xb59f[202]][_0xb59f[862]]=function(){mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[862]][_0xb59f[183]](this,arguments);this[_0xb59f[1339]]=[]};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1342]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[55]](_0xb59f[124]);_0x6b6cx2[_0xb59f[57]](_0xb59f[60],_0xb59f[61]);mxUtils[_0xb59f[53]](_0x6b6cx2,_0xb59f[1348]+mxConstants[_0xb59f[484]]+_0xb59f[1349]+mxConstants[_0xb59f[483]]+_0xb59f[1350]);return _0x6b6cx2};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[55]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=this[_0xb59f[813]][_0xb59f[295]][_0xb59f[509]]){return this[_0xb59f[813]][_0xb59f[295]][_0xb59f[509]](_0x6b6cx3||mxConstants[_0xb59f[1351]],_0x6b6cx2)};var _0x6b6cx4=this[_0xb59f[813]][_0xb59f[295]][_0xb59f[55]](_0x6b6cx2);null!=_0x6b6cx3&&_0x6b6cx4[_0xb59f[57]](_0xb59f[1352],_0x6b6cx3);return _0x6b6cx4};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1353]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0xb59f[198]==_0x6b6cx2[_0xb59f[225]](0)&&(_0x6b6cx2=_0x6b6cx2[_0xb59f[85]](1));_0xb59f[198]==_0x6b6cx3[_0xb59f[225]](0)&&(_0x6b6cx3=_0x6b6cx3[_0xb59f[85]](1));_0x6b6cx2=_0x6b6cx2[_0xb59f[216]]()+_0xb59f[213]+_0x6b6cx4;_0x6b6cx3=_0x6b6cx3[_0xb59f[216]]()+_0xb59f[213]+_0x6b6cx5;_0x6b6cx4=null;null==_0x6b6cx9||_0x6b6cx9==mxConstants[_0xb59f[1354]]?_0x6b6cx4=_0xb59f[1355]:_0x6b6cx9==mxConstants[_0xb59f[1356]]?_0x6b6cx4=_0xb59f[1357]:(_0x6b6cx5=_0x6b6cx2,_0x6b6cx2=_0x6b6cx3,_0x6b6cx3=_0x6b6cx5,_0x6b6cx9==mxConstants[_0xb59f[1358]]?_0x6b6cx4=_0xb59f[1355]:_0x6b6cx9==mxConstants[_0xb59f[1359]]&&(_0x6b6cx4=_0xb59f[1357]));return _0xb59f[1360]+_0x6b6cx2+_0xb59f[213]+_0x6b6cx3+_0xb59f[213]+_0x6b6cx4};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1361]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=this[_0xb59f[1353]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),_0x6b6cx12=this[_0xb59f[1339]][_0x6b6cxa];if(null==_0x6b6cx12){var _0x6b6cx13=this[_0xb59f[813]][_0xb59f[538]],_0x6b6cx14=0,_0x6b6cx15=_0x6b6cxa+_0xb59f[213]+_0x6b6cx14;if(null!=_0x6b6cx13){for(_0x6b6cx12=_0x6b6cx13[_0xb59f[295]][_0xb59f[1362]](_0x6b6cx15);null!=_0x6b6cx12&&_0x6b6cx12[_0xb59f[538]]!=_0x6b6cx13;){_0x6b6cx15=_0x6b6cxa+_0xb59f[213]+_0x6b6cx14++,_0x6b6cx12=_0x6b6cx13[_0xb59f[295]][_0xb59f[1362]](_0x6b6cx15)}}else {_0x6b6cx15=_0xb59f[1363]+++this[_0xb59f[1346]]};null==_0x6b6cx12&&(_0x6b6cx12=this[_0xb59f[1364]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),_0x6b6cx12[_0xb59f[57]](_0xb59f[1363],_0x6b6cx15),null!=this[_0xb59f[1340]]?this[_0xb59f[1340]][_0xb59f[62]](_0x6b6cx12):_0x6b6cx13[_0xb59f[62]](_0x6b6cx12));this[_0xb59f[1339]][_0x6b6cxa]=_0x6b6cx12};return _0x6b6cx12[_0xb59f[284]](_0xb59f[1363])};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1364]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=this[_0xb59f[55]](_0xb59f[1365]);_0x6b6cxa[_0xb59f[57]](_0xb59f[1324],_0xb59f[1366]);_0x6b6cxa[_0xb59f[57]](_0xb59f[1325],_0xb59f[1366]);_0x6b6cxa[_0xb59f[57]](_0xb59f[1326],_0xb59f[1366]);_0x6b6cxa[_0xb59f[57]](_0xb59f[1327],_0xb59f[1366]);null==_0x6b6cx9||_0x6b6cx9==mxConstants[_0xb59f[1354]]?_0x6b6cxa[_0xb59f[57]](_0xb59f[1327],_0xb59f[118]):_0x6b6cx9==mxConstants[_0xb59f[1356]]?_0x6b6cxa[_0xb59f[57]](_0xb59f[1326],_0xb59f[118]):_0x6b6cx9==mxConstants[_0xb59f[1358]]?_0x6b6cxa[_0xb59f[57]](_0xb59f[1325],_0xb59f[118]):_0x6b6cx9==mxConstants[_0xb59f[1359]]&&_0x6b6cxa[_0xb59f[57]](_0xb59f[1324],_0xb59f[118]);_0x6b6cx4=1>_0x6b6cx4?_0xb59f[1367]+_0x6b6cx4:_0xb59f[110];_0x6b6cx9=this[_0xb59f[55]](_0xb59f[1076]);_0x6b6cx9[_0xb59f[57]](_0xb59f[1368],_0xb59f[1366]);_0x6b6cx9[_0xb59f[57]](_0xb59f[124],_0xb59f[1369]+_0x6b6cx2+_0x6b6cx4);_0x6b6cxa[_0xb59f[62]](_0x6b6cx9);_0x6b6cx4=1>_0x6b6cx5?_0xb59f[1367]+_0x6b6cx5:_0xb59f[110];_0x6b6cx9=this[_0xb59f[55]](_0xb59f[1076]);_0x6b6cx9[_0xb59f[57]](_0xb59f[1368],_0xb59f[118]);_0x6b6cx9[_0xb59f[57]](_0xb59f[124],_0xb59f[1369]+_0x6b6cx3+_0x6b6cx4);_0x6b6cxa[_0xb59f[62]](_0x6b6cx9);return _0x6b6cxa};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1370]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[252]],_0x6b6cx5=this[_0xb59f[724]];if(null!=_0x6b6cx4){if(_0xb59f[1215]==_0x6b6cx4[_0xb59f[301]]){if(null!=this[_0xb59f[1215]]&&0<this[_0xb59f[1215]][_0xb59f[67]]){_0x6b6cx4[_0xb59f[57]](_0xb59f[1371],this[_0xb59f[1215]][_0xb59f[234]](_0xb59f[185]))}else {return}};_0x6b6cx2&&null!=_0x6b6cx5[_0xb59f[604]]?this[_0xb59f[1372]]():this[_0xb59f[1341]]||(_0xb59f[680]==_0x6b6cx4[_0xb59f[301]]&&mxClient[_0xb59f[133]]&&!mxClient[_0xb59f[76]]&&!mxClient[_0xb59f[75]]?_0x6b6cx4[_0xb59f[57]](_0xb59f[1334],_0xb59f[1373]):_0x6b6cx4[_0xb59f[57]](_0xb59f[1334],_0xb59f[130]),_0x6b6cx2= !1);_0x6b6cx3&&null!=_0x6b6cx5[_0xb59f[608]]?this[_0xb59f[1374]]():this[_0xb59f[1341]]||_0x6b6cx4[_0xb59f[57]](_0xb59f[1336],_0xb59f[130]);null!=_0x6b6cx5[_0xb59f[535]]&&0<_0x6b6cx5[_0xb59f[535]][_0xb59f[67]]&&_0x6b6cx4[_0xb59f[57]](_0xb59f[535],_0x6b6cx5[_0xb59f[535]]);_0x6b6cx5[_0xb59f[639]]&&this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[1375]](_0x6b6cx4));0<this[_0xb59f[1345]]&&!_0x6b6cx2&&this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[1376]](_0x6b6cx4));this[_0xb59f[1229]]&&(_0xb59f[1215]!=_0x6b6cx4[_0xb59f[301]]||this[_0xb59f[1215]][this[_0xb59f[1215]][_0xb59f[67]]-1]==this[_0xb59f[1227]])&&_0x6b6cx4[_0xb59f[57]](_0xb59f[1377],_0xb59f[1378]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx4)}};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1372]]=function(){var _0x6b6cx2=this[_0xb59f[724]];1>_0x6b6cx2[_0xb59f[1244]]&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1379],_0x6b6cx2[_0xb59f[1244]]);null!=_0x6b6cx2[_0xb59f[604]]&&(null!=_0x6b6cx2[_0xb59f[606]]?(_0x6b6cx2=this[_0xb59f[1361]](_0x6b6cx2[_0xb59f[604]],_0x6b6cx2[_0xb59f[606]],_0x6b6cx2[_0xb59f[1247]],_0x6b6cx2[_0xb59f[1248]],_0x6b6cx2[_0xb59f[607]]),this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1334],_0xb59f[1380]+_0x6b6cx2+_0xb59f[460])):this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1334],_0x6b6cx2[_0xb59f[604]][_0xb59f[216]]()))};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1374]]=function(){var _0x6b6cx2=this[_0xb59f[724]];this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1336],_0x6b6cx2[_0xb59f[608]][_0xb59f[216]]());1>_0x6b6cx2[_0xb59f[1244]]&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1381],_0x6b6cx2[_0xb59f[1244]]);var _0x6b6cx3=Math[_0xb59f[160]](1,this[_0xb59f[1239]](_0x6b6cx2[_0xb59f[610]]*_0x6b6cx2[_0xb59f[255]]));1!=_0x6b6cx3&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1382],_0x6b6cx3);_0xb59f[1215]==this[_0xb59f[252]][_0xb59f[301]]&&this[_0xb59f[1383]]();_0x6b6cx2[_0xb59f[648]]&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1384],this[_0xb59f[1385]](_0x6b6cx3))};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1383]]=function(){var _0x6b6cx2=this[_0xb59f[724]];null!=_0x6b6cx2[_0xb59f[1256]]&&_0xb59f[1233]!=_0x6b6cx2[_0xb59f[1256]]&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1386],_0x6b6cx2[_0xb59f[1256]]);if(null!=_0x6b6cx2[_0xb59f[1254]]){var _0x6b6cx3=_0x6b6cx2[_0xb59f[1254]];_0xb59f[1232]==_0x6b6cx3&&(_0x6b6cx3=_0xb59f[1387]);_0xb59f[1387]!=_0x6b6cx3&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1388],_0x6b6cx3)};null!=_0x6b6cx2[_0xb59f[1258]]&&(!this[_0xb59f[1341]]||10!=_0x6b6cx2[_0xb59f[1258]])&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1389],_0x6b6cx2[_0xb59f[1258]])};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1385]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[724]][_0xb59f[649]][_0xb59f[224]](_0xb59f[185]),_0x6b6cx4=[];if(0<_0x6b6cx3[_0xb59f[67]]){for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx4[_0x6b6cx5]=Number(_0x6b6cx3[_0x6b6cx5])*_0x6b6cx2}};return _0x6b6cx4[_0xb59f[234]](_0xb59f[185])};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1376]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2[_0xb59f[511]](!0);var _0x6b6cx3=parseFloat(_0x6b6cx2[_0xb59f[284]](_0xb59f[1382])||1)+this[_0xb59f[1345]];_0x6b6cx2[_0xb59f[57]](_0xb59f[1377],_0xb59f[1336]);_0x6b6cx2[_0xb59f[57]](_0xb59f[187],_0xb59f[188]);_0x6b6cx2[_0xb59f[1390]](_0xb59f[1384]);_0x6b6cx2[_0xb59f[57]](_0xb59f[1382],_0x6b6cx3);_0x6b6cx2[_0xb59f[57]](_0xb59f[1334],_0xb59f[130]);_0x6b6cx2[_0xb59f[57]](_0xb59f[1336],mxClient[_0xb59f[71]]?_0xb59f[130]:_0xb59f[1391]);return _0x6b6cx2};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1375]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2[_0xb59f[511]](!0);var _0x6b6cx3=this[_0xb59f[724]];_0xb59f[130]!=_0x6b6cx2[_0xb59f[284]](_0xb59f[1334])&&_0x6b6cx2[_0xb59f[57]](_0xb59f[1334],_0x6b6cx3[_0xb59f[1269]]);_0xb59f[130]!=_0x6b6cx2[_0xb59f[284]](_0xb59f[1336])&&_0x6b6cx2[_0xb59f[57]](_0xb59f[1336],_0x6b6cx3[_0xb59f[1269]]);_0x6b6cx2[_0xb59f[57]](_0xb59f[535],_0xb59f[536]+this[_0xb59f[1239]](_0x6b6cx3[_0xb59f[1273]]*_0x6b6cx3[_0xb59f[255]])+_0xb59f[537]+this[_0xb59f[1239]](_0x6b6cx3[_0xb59f[1274]]*_0x6b6cx3[_0xb59f[255]])+_0xb59f[460]+(_0x6b6cx3[_0xb59f[535]]||_0xb59f[110]));_0x6b6cx2[_0xb59f[57]](_0xb59f[461],_0x6b6cx3[_0xb59f[1271]]);return _0x6b6cx2};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1294]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(0!=_0x6b6cx2||_0x6b6cx3||_0x6b6cx4){var _0x6b6cxa=this[_0xb59f[724]];_0x6b6cx5+=_0x6b6cxa[_0xb59f[1126]];_0x6b6cx9+=_0x6b6cxa[_0xb59f[1125]];_0x6b6cx5*=_0x6b6cxa[_0xb59f[255]];_0x6b6cx9*=_0x6b6cxa[_0xb59f[255]];_0x6b6cxa[_0xb59f[535]]=_0x6b6cxa[_0xb59f[535]]||_0xb59f[110];if(_0x6b6cx3&&_0x6b6cx4){_0x6b6cx2+=180}else {if(_0x6b6cx3^_0x6b6cx4){var _0x6b6cx12=_0x6b6cx3?_0x6b6cx5:0,_0x6b6cx13=_0x6b6cx3?-1:1,_0x6b6cx14=_0x6b6cx4?_0x6b6cx9:0,_0x6b6cx15=_0x6b6cx4?-1:1;_0x6b6cxa[_0xb59f[535]]+=_0xb59f[536]+this[_0xb59f[1239]](_0x6b6cx12)+_0xb59f[537]+this[_0xb59f[1239]](_0x6b6cx14)+_0xb59f[1392]+this[_0xb59f[1239]](_0x6b6cx13)+_0xb59f[537]+this[_0xb59f[1239]](_0x6b6cx15)+_0xb59f[1393]+this[_0xb59f[1239]](-_0x6b6cx12)+_0xb59f[537]+this[_0xb59f[1239]](-_0x6b6cx14)+_0xb59f[460]}};if(_0x6b6cx3?!_0x6b6cx4:_0x6b6cx4){_0x6b6cx2*= -1};0!=_0x6b6cx2&&(_0x6b6cxa[_0xb59f[535]]+=_0xb59f[1394]+this[_0xb59f[1239]](_0x6b6cx2)+_0xb59f[537]+this[_0xb59f[1239]](_0x6b6cx5)+_0xb59f[537]+this[_0xb59f[1239]](_0x6b6cx9)+_0xb59f[460]);_0x6b6cxa[_0xb59f[603]]+=_0x6b6cx2;_0x6b6cxa[_0xb59f[1395]]=_0x6b6cx5;_0x6b6cxa[_0xb59f[1396]]=_0x6b6cx9}};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1275]]=function(){mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1275]][_0xb59f[183]](this,arguments);this[_0xb59f[252]]=this[_0xb59f[55]](_0xb59f[1215])};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1319]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[724]],_0x6b6cxa=this[_0xb59f[55]](_0xb59f[1319]);_0x6b6cxa[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]]((_0x6b6cx2+_0x6b6cx9[_0xb59f[1126]])*_0x6b6cx9[_0xb59f[255]]));_0x6b6cxa[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]]((_0x6b6cx3+_0x6b6cx9[_0xb59f[1125]])*_0x6b6cx9[_0xb59f[255]]));_0x6b6cxa[_0xb59f[57]](_0xb59f[117],this[_0xb59f[1239]](_0x6b6cx4*_0x6b6cx9[_0xb59f[255]]));_0x6b6cxa[_0xb59f[57]](_0xb59f[119],this[_0xb59f[1239]](_0x6b6cx5*_0x6b6cx9[_0xb59f[255]]));this[_0xb59f[252]]=_0x6b6cxa};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1320]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[1319]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5);0<_0x6b6cx9&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1397],this[_0xb59f[1239]](_0x6b6cx9*this[_0xb59f[724]][_0xb59f[255]]));0<_0x6b6cxa&&this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1398],this[_0xb59f[1239]](_0x6b6cxa*this[_0xb59f[724]][_0xb59f[255]]))};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[680]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[724]],_0x6b6cxa=this[_0xb59f[55]](_0xb59f[680]);_0x6b6cxa[_0xb59f[57]](_0xb59f[1296],Math[_0xb59f[488]]((_0x6b6cx2+_0x6b6cx4/2+_0x6b6cx9[_0xb59f[1126]])*_0x6b6cx9[_0xb59f[255]]));_0x6b6cxa[_0xb59f[57]](_0xb59f[1297],Math[_0xb59f[488]]((_0x6b6cx3+_0x6b6cx5/2+_0x6b6cx9[_0xb59f[1125]])*_0x6b6cx9[_0xb59f[255]]));_0x6b6cxa[_0xb59f[57]](_0xb59f[1397],_0x6b6cx4/2*_0x6b6cx9[_0xb59f[255]]);_0x6b6cxa[_0xb59f[57]](_0xb59f[1398],_0x6b6cx5/2*_0x6b6cx9[_0xb59f[255]]);this[_0xb59f[252]]=_0x6b6cxa};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[618]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13){_0x6b6cx9=this[_0xb59f[1212]][_0xb59f[1321]](_0x6b6cx9);_0x6b6cxa=null!=_0x6b6cxa?_0x6b6cxa:!0;_0x6b6cx12=null!=_0x6b6cx12?_0x6b6cx12:!1;_0x6b6cx13=null!=_0x6b6cx13?_0x6b6cx13:!1;var _0x6b6cx14=this[_0xb59f[724]];_0x6b6cx2+=_0x6b6cx14[_0xb59f[1126]];_0x6b6cx3+=_0x6b6cx14[_0xb59f[1125]];var _0x6b6cx15=this[_0xb59f[55]](_0xb59f[618]);_0x6b6cx15[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2*_0x6b6cx14[_0xb59f[255]]));_0x6b6cx15[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3*_0x6b6cx14[_0xb59f[255]]));_0x6b6cx15[_0xb59f[57]](_0xb59f[117],this[_0xb59f[1239]](_0x6b6cx4*_0x6b6cx14[_0xb59f[255]]));_0x6b6cx15[_0xb59f[57]](_0xb59f[119],this[_0xb59f[1239]](_0x6b6cx5*_0x6b6cx14[_0xb59f[255]]));null==_0x6b6cx15[_0xb59f[1399]]?_0x6b6cx15[_0xb59f[57]](_0xb59f[1400],_0x6b6cx9):_0x6b6cx15[_0xb59f[1399]](mxConstants.NS_XLINK,_0xb59f[44],_0x6b6cx9);_0x6b6cxa||_0x6b6cx15[_0xb59f[57]](_0xb59f[1401],_0xb59f[130]);1>_0x6b6cx14[_0xb59f[1244]]&&_0x6b6cx15[_0xb59f[57]](_0xb59f[461],_0x6b6cx14[_0xb59f[1244]]);_0x6b6cx9=this[_0xb59f[724]][_0xb59f[535]]||_0xb59f[110];if(_0x6b6cx12||_0x6b6cx13){var _0x6b6cx16=_0x6b6cxa=1,_0x6b6cx17=0,_0x6b6cx18=0;_0x6b6cx12&&(_0x6b6cxa= -1,_0x6b6cx17=-_0x6b6cx4-2*_0x6b6cx2);_0x6b6cx13&&(_0x6b6cx16= -1,_0x6b6cx18=-_0x6b6cx5-2*_0x6b6cx3);_0x6b6cx9+=_0xb59f[1402]+_0x6b6cxa+_0xb59f[537]+_0x6b6cx16+_0xb59f[1393]+_0x6b6cx17+_0xb59f[537]+_0x6b6cx18+_0xb59f[460]};0<_0x6b6cx9[_0xb59f[67]]&&_0x6b6cx15[_0xb59f[57]](_0xb59f[535],_0x6b6cx9);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx15);this[_0xb59f[1347]]&&(_0x6b6cx15[_0xb59f[57]](_0xb59f[124],_0xb59f[1403]),_0x6b6cx15=this[_0xb59f[55]](_0xb59f[1319]),_0x6b6cx15[_0xb59f[57]](_0xb59f[187],_0xb59f[188]),_0x6b6cx15[_0xb59f[57]](_0xb59f[1377],_0xb59f[1334]),_0x6b6cx15[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2*_0x6b6cx14[_0xb59f[255]])),_0x6b6cx15[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx3*_0x6b6cx14[_0xb59f[255]])),_0x6b6cx15[_0xb59f[57]](_0xb59f[117],this[_0xb59f[1239]](_0x6b6cx4*_0x6b6cx14[_0xb59f[255]])),_0x6b6cx15[_0xb59f[57]](_0xb59f[119],this[_0xb59f[1239]](_0x6b6cx5*_0x6b6cx14[_0xb59f[255]])),this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx15))};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1404]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx4=this[_0xb59f[724]];_0x6b6cx5=_0xb59f[1405]+Math[_0xb59f[488]](_0x6b6cx4[_0xb59f[487]])+_0xb59f[1406]+_0x6b6cx4[_0xb59f[486]]+_0xb59f[1407]+_0x6b6cx4[_0xb59f[665]]+_0xb59f[1408]+Math[_0xb59f[488]](_0x6b6cx4[_0xb59f[487]]*mxConstants[_0xb59f[490]])+_0xb59f[1409]+_0x6b6cx5;(_0x6b6cx4[_0xb59f[666]]&mxConstants[_0xb59f[1410]])==mxConstants[_0xb59f[1410]]&&(_0x6b6cx5+=_0xb59f[1411]);(_0x6b6cx4[_0xb59f[666]]&mxConstants[_0xb59f[1412]])==mxConstants[_0xb59f[1412]]&&(_0x6b6cx5+=_0xb59f[1413]);(_0x6b6cx4[_0xb59f[666]]&mxConstants[_0xb59f[1414]])==mxConstants[_0xb59f[1414]]&&(_0x6b6cx5+=_0xb59f[1415]);_0x6b6cx3==mxConstants[_0xb59f[479]]?_0x6b6cx5+=_0xb59f[1416]:_0x6b6cx3==mxConstants[_0xb59f[480]]&&(_0x6b6cx5+=_0xb59f[1417]);_0x6b6cx3=_0xb59f[110];null!=_0x6b6cx4[_0xb59f[1261]]&&(_0x6b6cx3+=_0xb59f[1418]+_0x6b6cx4[_0xb59f[1261]]+_0xb59f[471]);null!=_0x6b6cx4[_0xb59f[1263]]&&(_0x6b6cx3+=_0xb59f[1419]+_0x6b6cx4[_0xb59f[1263]]+_0xb59f[471]);mxUtils[_0xb59f[1331]](_0x6b6cx2)||(_0x6b6cx4=document[_0xb59f[55]](_0xb59f[126]),_0x6b6cx4[_0xb59f[339]]=_0x6b6cx2[_0xb59f[230]](/&lt;/g,_0xb59f[1421])[_0xb59f[230]](/&gt;/g,_0xb59f[1420])[_0xb59f[230]](/</g,_0xb59f[334])[_0xb59f[230]](/>/g,_0xb59f[335]),_0x6b6cx2=_0x6b6cx4[_0xb59f[131]],_0x6b6cx9?_0x6b6cx5+=_0x6b6cx3:0<_0x6b6cx3[_0xb59f[67]]&&(_0x6b6cx2=_0xb59f[1422]+_0x6b6cx3+_0xb59f[1423]+_0x6b6cx2+_0xb59f[1424]));if(!mxClient[_0xb59f[80]]&&document[_0xb59f[509]]){return _0x6b6cx9=document[_0xb59f[509]](_0xb59f[577],_0xb59f[485]),_0x6b6cx9[_0xb59f[57]](_0xb59f[124],_0x6b6cx5),mxUtils[_0xb59f[1331]](_0x6b6cx2)?this[_0xb59f[813]][_0xb59f[295]]!=document?_0x6b6cx9[_0xb59f[62]](_0x6b6cx2[_0xb59f[511]](!0)):_0x6b6cx9[_0xb59f[62]](_0x6b6cx2):_0x6b6cx9[_0xb59f[339]]=_0x6b6cx2,_0x6b6cx9};mxUtils[_0xb59f[1331]](_0x6b6cx2)&&this[_0xb59f[813]][_0xb59f[295]]!=document&&(_0x6b6cx2=_0x6b6cx2[_0xb59f[342]]);_0x6b6cx2=_0x6b6cx2[_0xb59f[230]](/<br>/g,_0xb59f[1426])[_0xb59f[230]](/<hr>/g,_0xb59f[1425]);return mxUtils[_0xb59f[877]](_0xb59f[1427]+_0x6b6cx5+_0xb59f[1423]+_0x6b6cx2+_0xb59f[1424])[_0xb59f[158]]};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[963]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){if(this[_0xb59f[1285]]&&null!=_0x6b6cx9){_0x6b6cx17=null!=_0x6b6cx17?_0x6b6cx17:0;var _0x6b6cx18=this[_0xb59f[724]];_0x6b6cx2+=_0x6b6cx18[_0xb59f[1126]];_0x6b6cx3+=_0x6b6cx18[_0xb59f[1125]];if(this[_0xb59f[1344]]&&_0xb59f[1428]==_0x6b6cx14){var _0x6b6cx19=_0xb59f[1429];_0x6b6cx16?(_0x6b6cx19+=_0xb59f[1430],0<_0x6b6cx5&&(_0x6b6cx19+=_0xb59f[1431]+Math[_0xb59f[488]](_0x6b6cx5)+_0xb59f[1409]),0<_0x6b6cx4&&(_0x6b6cx19+=_0xb59f[1432]+Math[_0xb59f[488]](_0x6b6cx4)+_0xb59f[1409])):_0x6b6cx15&&(_0x6b6cx19+=_0xb59f[1432]+Math[_0xb59f[488]](_0x6b6cx4)+_0xb59f[1409],0<_0x6b6cx5&&(_0x6b6cx19+=_0xb59f[1431]+Math[_0xb59f[488]](_0x6b6cx5)+_0xb59f[1409]));_0x6b6cx13?(!_0x6b6cx16&&0<_0x6b6cx4&&(_0x6b6cx19+=_0xb59f[1432]+Math[_0xb59f[488]](_0x6b6cx4)+_0xb59f[1409]),_0x6b6cx19+=_0xb59f[1433]):_0x6b6cx19+=_0xb59f[1434];_0x6b6cx13=this[_0xb59f[55]](_0xb59f[449]);1>_0x6b6cx18[_0xb59f[1244]]&&_0x6b6cx13[_0xb59f[57]](_0xb59f[461],_0x6b6cx18[_0xb59f[1244]]);_0x6b6cx14=this[_0xb59f[55]](_0xb59f[1435]);_0x6b6cx14[_0xb59f[57]](_0xb59f[1377],_0xb59f[1378]);_0x6b6cx19=this[_0xb59f[1404]](_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx19,_0x6b6cx15);if(null!=_0x6b6cx19){_0x6b6cx13[_0xb59f[62]](_0x6b6cx14);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx13);var _0x6b6cx1a=0;if(mxClient[_0xb59f[80]]&&!mxClient[_0xb59f[48]]){var _0x6b6cx1b=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx1b[_0xb59f[124]][_0xb59f[103]]=_0x6b6cx19[_0xb59f[284]](_0xb59f[124]);_0x6b6cx1b[_0xb59f[124]][_0xb59f[495]]=mxClient[_0xb59f[496]]?_0xb59f[497]:_0xb59f[498];_0x6b6cx1b[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];_0x6b6cx1b[_0xb59f[339]]=mxUtils[_0xb59f[1331]](_0x6b6cx9)?_0x6b6cx9[_0xb59f[342]]:_0x6b6cx9;document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx1b);_0x6b6cx1a=_0x6b6cx1b[_0xb59f[359]];_0x6b6cx5=mxClient[_0xb59f[496]]&&0<_0x6b6cx5&&_0x6b6cx16?Math[_0xb59f[243]](_0x6b6cx5,_0x6b6cx1b[_0xb59f[167]]+2):_0x6b6cx1b[_0xb59f[167]];_0x6b6cx1b[_0xb59f[265]][_0xb59f[266]](_0x6b6cx1b);_0x6b6cx14[_0xb59f[62]](_0x6b6cx19)}else {this[_0xb59f[813]][_0xb59f[295]]!=document?(_0x6b6cx19[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx19),_0x6b6cx1a=_0x6b6cx19[_0xb59f[359]],_0x6b6cx5=_0x6b6cx19[_0xb59f[167]],_0x6b6cx14[_0xb59f[62]](_0x6b6cx19),_0x6b6cx19[_0xb59f[124]][_0xb59f[187]]=_0xb59f[110]):(_0x6b6cx14[_0xb59f[62]](_0x6b6cx19),_0x6b6cx1a=_0x6b6cx19[_0xb59f[359]],_0x6b6cx5=_0x6b6cx19[_0xb59f[167]])};_0x6b6cx4=_0x6b6cx15?Math[_0xb59f[160]](_0x6b6cx4,_0x6b6cx1a):_0x6b6cx1a;1>_0x6b6cx18[_0xb59f[1244]]&&_0x6b6cx13[_0xb59f[57]](_0xb59f[461],_0x6b6cx18[_0xb59f[1244]]);_0x6b6cx15=_0x6b6cx9=0;_0x6b6cxa==mxConstants[_0xb59f[479]]?_0x6b6cx9-=_0x6b6cx4/2:_0x6b6cxa==mxConstants[_0xb59f[480]]&&(_0x6b6cx9-=_0x6b6cx4);_0x6b6cx2+=_0x6b6cx9;_0x6b6cx12==mxConstants[_0xb59f[481]]?_0x6b6cx15-=_0x6b6cx5/2:_0x6b6cx12==mxConstants[_0xb59f[482]]&&(_0x6b6cx15-=_0x6b6cx5);_0x6b6cx3+=_0x6b6cx15;_0x6b6cxa=1!=_0x6b6cx18[_0xb59f[255]]?_0xb59f[1402]+_0x6b6cx18[_0xb59f[255]]+_0xb59f[460]:_0xb59f[110];0!=_0x6b6cx18[_0xb59f[603]]&&this[_0xb59f[1216]]?(_0x6b6cxa+=_0xb59f[1394]+_0x6b6cx18[_0xb59f[603]]+_0xb59f[537]+_0x6b6cx4/2+_0xb59f[537]+_0x6b6cx5/2+_0xb59f[460],_0x6b6cx3=this[_0xb59f[1241]]((_0x6b6cx2+_0x6b6cx4/2)*_0x6b6cx18[_0xb59f[255]],(_0x6b6cx3+_0x6b6cx5/2)*_0x6b6cx18[_0xb59f[255]],_0x6b6cx18[_0xb59f[603]],_0x6b6cx18[_0xb59f[1395]],_0x6b6cx18[_0xb59f[1396]]),_0x6b6cx2=_0x6b6cx3[_0xb59f[235]]-_0x6b6cx4*_0x6b6cx18[_0xb59f[255]]/2,_0x6b6cx3=_0x6b6cx3[_0xb59f[236]]-_0x6b6cx5*_0x6b6cx18[_0xb59f[255]]/2):(_0x6b6cx2*=_0x6b6cx18[_0xb59f[255]],_0x6b6cx3*=_0x6b6cx18[_0xb59f[255]]);0!=_0x6b6cx17&&(_0x6b6cxa+=_0xb59f[1394]+_0x6b6cx17+_0xb59f[537]+-_0x6b6cx9+_0xb59f[537]+-_0x6b6cx15+_0xb59f[460]);_0x6b6cx13[_0xb59f[57]](_0xb59f[535],_0xb59f[536]+Math[_0xb59f[488]](_0x6b6cx2)+_0xb59f[537]+Math[_0xb59f[488]](_0x6b6cx3)+_0xb59f[460]+_0x6b6cxa);_0x6b6cx14[_0xb59f[57]](_0xb59f[117],Math[_0xb59f[488]](Math[_0xb59f[160]](1,_0x6b6cx4)));_0x6b6cx14[_0xb59f[57]](_0xb59f[119],Math[_0xb59f[488]](Math[_0xb59f[160]](1,_0x6b6cx5)))}}else {this[_0xb59f[1436]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17)}}};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1437]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx2=Math[_0xb59f[488]](_0x6b6cx2);_0x6b6cx3=Math[_0xb59f[488]](_0x6b6cx3);_0x6b6cx4=Math[_0xb59f[488]](_0x6b6cx4);_0x6b6cx5=Math[_0xb59f[488]](_0x6b6cx5);for(var _0x6b6cx9=_0xb59f[1438]+_0x6b6cx2+_0xb59f[213]+_0x6b6cx3+_0xb59f[213]+_0x6b6cx4+_0xb59f[213]+_0x6b6cx5,_0x6b6cxa=0,_0x6b6cx12=_0x6b6cx9+_0xb59f[213]+_0x6b6cxa;null!=document[_0xb59f[1362]](_0x6b6cx12);){_0x6b6cx12=_0x6b6cx9+_0xb59f[213]+ ++_0x6b6cxa};clip=this[_0xb59f[55]](_0xb59f[1439]);clip[_0xb59f[57]](_0xb59f[1363],_0x6b6cx12);_0x6b6cx9=this[_0xb59f[55]](_0xb59f[1319]);_0x6b6cx9[_0xb59f[57]](_0xb59f[235],_0x6b6cx2);_0x6b6cx9[_0xb59f[57]](_0xb59f[236],_0x6b6cx3);_0x6b6cx9[_0xb59f[57]](_0xb59f[117],_0x6b6cx4);_0x6b6cx9[_0xb59f[57]](_0xb59f[119],_0x6b6cx5);clip[_0xb59f[62]](_0x6b6cx9);return clip};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1436]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16){_0x6b6cx16=null!=_0x6b6cx16?_0x6b6cx16:0;_0x6b6cx13=this[_0xb59f[724]];var _0x6b6cx17=Math[_0xb59f[488]](_0x6b6cx13[_0xb59f[487]]),_0x6b6cx18=this[_0xb59f[55]](_0xb59f[449]),_0x6b6cx19=_0x6b6cx13[_0xb59f[535]]||_0xb59f[110];0!=_0x6b6cx16&&(_0x6b6cx19+=_0xb59f[1394]+_0x6b6cx16+_0xb59f[537]+this[_0xb59f[1239]](_0x6b6cx2*_0x6b6cx13[_0xb59f[255]])+_0xb59f[537]+this[_0xb59f[1239]](_0x6b6cx3*_0x6b6cx13[_0xb59f[255]])+_0xb59f[460]);if(_0x6b6cx15&&0<_0x6b6cx4&&0<_0x6b6cx5){var _0x6b6cx1a=_0x6b6cx2;_0x6b6cx16=_0x6b6cx3;_0x6b6cxa==mxConstants[_0xb59f[479]]?_0x6b6cx1a-=_0x6b6cx4/2:_0x6b6cxa==mxConstants[_0xb59f[480]]&&(_0x6b6cx1a-=_0x6b6cx4);_0x6b6cx12==mxConstants[_0xb59f[481]]?_0x6b6cx16-=_0x6b6cx5/2:_0x6b6cx12==mxConstants[_0xb59f[482]]&&(_0x6b6cx16-=_0x6b6cx5);_0x6b6cx16=this[_0xb59f[1437]](_0x6b6cx1a*_0x6b6cx13[_0xb59f[255]]-2,_0x6b6cx16*_0x6b6cx13[_0xb59f[255]]-2,_0x6b6cx4*_0x6b6cx13[_0xb59f[255]]+4,_0x6b6cx5*_0x6b6cx13[_0xb59f[255]]+4);null!=this[_0xb59f[1340]]?this[_0xb59f[1340]][_0xb59f[62]](_0x6b6cx16):this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx16);_0x6b6cx18[_0xb59f[57]](_0xb59f[1440],_0xb59f[1380]+_0x6b6cx16[_0xb59f[284]](_0xb59f[1363])+_0xb59f[460])};this[_0xb59f[1441]](_0x6b6cx18,_0x6b6cxa);_0x6b6cx16=_0x6b6cxa==mxConstants[_0xb59f[480]]?_0xb59f[1282]:_0x6b6cxa==mxConstants[_0xb59f[479]]?_0xb59f[554]:_0xb59f[861];_0xb59f[861]!=_0x6b6cx16&&_0x6b6cx18[_0xb59f[57]](_0xb59f[1442],_0x6b6cx16);(!this[_0xb59f[1341]]||_0x6b6cx17!=mxConstants[_0xb59f[483]])&&_0x6b6cx18[_0xb59f[57]](_0xb59f[1443],Math[_0xb59f[488]](_0x6b6cx17*_0x6b6cx13[_0xb59f[255]])+_0xb59f[168]);0<_0x6b6cx19[_0xb59f[67]]&&_0x6b6cx18[_0xb59f[57]](_0xb59f[535],_0x6b6cx19);1>_0x6b6cx13[_0xb59f[1244]]&&_0x6b6cx18[_0xb59f[57]](_0xb59f[461],_0x6b6cx13[_0xb59f[1244]]);var _0x6b6cx19=_0x6b6cx9[_0xb59f[224]](_0xb59f[192]),_0x6b6cx1a=Math[_0xb59f[488]](_0x6b6cx17*mxConstants[_0xb59f[490]]),_0x6b6cx1b=_0x6b6cx17+(_0x6b6cx19[_0xb59f[67]]-1)*_0x6b6cx1a;_0x6b6cx16=_0x6b6cx3+_0x6b6cx17-1;_0x6b6cx12==mxConstants[_0xb59f[481]]?(_0x6b6cx5=(this[_0xb59f[1343]]&&_0x6b6cx15&&0<_0x6b6cx5?Math[_0xb59f[243]](_0x6b6cx1b,_0x6b6cx5):_0x6b6cx1b)/2,_0x6b6cx16-=_0x6b6cx5+1):_0x6b6cx12==mxConstants[_0xb59f[482]]&&(_0x6b6cx5=this[_0xb59f[1343]]&&_0x6b6cx15&&0<_0x6b6cx5?Math[_0xb59f[243]](_0x6b6cx1b,_0x6b6cx5):_0x6b6cx1b,_0x6b6cx16-=_0x6b6cx5+2);for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx19[_0xb59f[67]];_0x6b6cx5++){0<_0x6b6cx19[_0x6b6cx5][_0xb59f[67]]&&0<mxUtils[_0xb59f[330]](_0x6b6cx19[_0x6b6cx5])[_0xb59f[67]]&&(_0x6b6cx15=this[_0xb59f[55]](_0xb59f[963]),_0x6b6cx15[_0xb59f[57]](_0xb59f[235],this[_0xb59f[1239]](_0x6b6cx2*_0x6b6cx13[_0xb59f[255]])),_0x6b6cx15[_0xb59f[57]](_0xb59f[236],this[_0xb59f[1239]](_0x6b6cx16*_0x6b6cx13[_0xb59f[255]])),mxUtils[_0xb59f[53]](_0x6b6cx15,_0x6b6cx19[_0x6b6cx5]),_0x6b6cx18[_0xb59f[62]](_0x6b6cx15)),_0x6b6cx16+=_0x6b6cx1a};this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx18);this[_0xb59f[1444]](_0x6b6cx18,_0x6b6cx9,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx1b,_0x6b6cxa,_0x6b6cx12,_0x6b6cx14)};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1441]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[724]];_0x6b6cx2[_0xb59f[57]](_0xb59f[1334],_0x6b6cx3[_0xb59f[665]]);(!this[_0xb59f[1341]]||_0x6b6cx3[_0xb59f[486]]!=mxConstants[_0xb59f[484]])&&_0x6b6cx2[_0xb59f[57]](_0xb59f[1445],_0x6b6cx3[_0xb59f[486]]);(_0x6b6cx3[_0xb59f[666]]&mxConstants[_0xb59f[1410]])==mxConstants[_0xb59f[1410]]&&_0x6b6cx2[_0xb59f[57]](_0xb59f[1446],_0xb59f[1447]);(_0x6b6cx3[_0xb59f[666]]&mxConstants[_0xb59f[1412]])==mxConstants[_0xb59f[1412]]&&_0x6b6cx2[_0xb59f[57]](_0xb59f[1448],_0xb59f[1449]);(_0x6b6cx3[_0xb59f[666]]&mxConstants[_0xb59f[1414]])==mxConstants[_0xb59f[1414]]&&_0x6b6cx2[_0xb59f[57]](_0xb59f[1450],_0xb59f[355])};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1444]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){var _0x6b6cx15=this[_0xb59f[724]];if(null!=_0x6b6cx15[_0xb59f[1261]]||null!=_0x6b6cx15[_0xb59f[1263]]){var _0x6b6cx16=null;_0x6b6cx14?(_0x6b6cx12==mxConstants[_0xb59f[479]]?_0x6b6cx4-=_0x6b6cx9/2:_0x6b6cx12==mxConstants[_0xb59f[480]]&&(_0x6b6cx4-=_0x6b6cx9),_0x6b6cx13==mxConstants[_0xb59f[481]]?_0x6b6cx5-=_0x6b6cxa/2:_0x6b6cx13==mxConstants[_0xb59f[482]]&&(_0x6b6cx5-=_0x6b6cxa),_0x6b6cx16= new mxRectangle((_0x6b6cx4+1)*_0x6b6cx15[_0xb59f[255]],_0x6b6cx5*_0x6b6cx15[_0xb59f[255]],(_0x6b6cx9-2)*_0x6b6cx15[_0xb59f[255]],(_0x6b6cxa+2)*_0x6b6cx15[_0xb59f[255]])):null!=_0x6b6cx2[_0xb59f[1451]]&&this[_0xb59f[813]][_0xb59f[295]]==document?(_0x6b6cx16=_0x6b6cx2[_0xb59f[1451]](),_0x6b6cx3=mxClient[_0xb59f[80]]&&mxClient[_0xb59f[48]],_0x6b6cx16= new mxRectangle(_0x6b6cx16[_0xb59f[235]],_0x6b6cx16[_0xb59f[236]]+(_0x6b6cx3?0:1),_0x6b6cx16[_0xb59f[117]],_0x6b6cx16[_0xb59f[119]]+(_0x6b6cx3?1:0))):(_0x6b6cx16=document[_0xb59f[55]](_0xb59f[485]),_0x6b6cx16[_0xb59f[124]][_0xb59f[489]]=Math[_0xb59f[488]](_0x6b6cx15[_0xb59f[487]]*mxConstants[_0xb59f[490]])+_0xb59f[168],_0x6b6cx16[_0xb59f[124]][_0xb59f[487]]=Math[_0xb59f[488]](_0x6b6cx15[_0xb59f[487]])+_0xb59f[168],_0x6b6cx16[_0xb59f[124]][_0xb59f[486]]=_0x6b6cx15[_0xb59f[486]],_0x6b6cx16[_0xb59f[124]][_0xb59f[493]]=_0xb59f[494],_0x6b6cx16[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492],_0x6b6cx16[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],_0x6b6cx16[_0xb59f[124]][_0xb59f[495]]=mxClient[_0xb59f[496]]?_0xb59f[497]:_0xb59f[498],_0x6b6cx16[_0xb59f[124]][_0xb59f[499]]=_0xb59f[500],(_0x6b6cx15[_0xb59f[666]]&mxConstants[_0xb59f[1410]])==mxConstants[_0xb59f[1410]]&&(_0x6b6cx16[_0xb59f[124]][_0xb59f[1452]]=_0xb59f[1447]),(_0x6b6cx15[_0xb59f[666]]&mxConstants[_0xb59f[1412]])==mxConstants[_0xb59f[1412]]&&(_0x6b6cx16[_0xb59f[124]][_0xb59f[666]]=_0xb59f[1449]),_0x6b6cx3=mxUtils[_0xb59f[321]](_0x6b6cx3,!1),_0x6b6cx16[_0xb59f[339]]=_0x6b6cx3[_0xb59f[230]](/\n/g,_0xb59f[1453]),document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx16),_0x6b6cx9=_0x6b6cx16[_0xb59f[359]],_0x6b6cxa=_0x6b6cx16[_0xb59f[167]],_0x6b6cx16[_0xb59f[265]][_0xb59f[266]](_0x6b6cx16),_0x6b6cx12==mxConstants[_0xb59f[479]]?_0x6b6cx4-=_0x6b6cx9/2:_0x6b6cx12==mxConstants[_0xb59f[480]]&&(_0x6b6cx4-=_0x6b6cx9),_0x6b6cx13==mxConstants[_0xb59f[481]]?_0x6b6cx5-=_0x6b6cxa/2:_0x6b6cx13==mxConstants[_0xb59f[482]]&&(_0x6b6cx5-=_0x6b6cxa),_0x6b6cx16= new mxRectangle((_0x6b6cx4+1)*_0x6b6cx15[_0xb59f[255]],(_0x6b6cx5+2)*_0x6b6cx15[_0xb59f[255]],_0x6b6cx9*_0x6b6cx15[_0xb59f[255]],(_0x6b6cxa+1)*_0x6b6cx15[_0xb59f[255]]));null!=_0x6b6cx16&&(_0x6b6cx3=this[_0xb59f[55]](_0xb59f[1319]),_0x6b6cx3[_0xb59f[57]](_0xb59f[1334],_0x6b6cx15[_0xb59f[1261]]||_0xb59f[130]),_0x6b6cx3[_0xb59f[57]](_0xb59f[1336],_0x6b6cx15[_0xb59f[1263]]||_0xb59f[130]),_0x6b6cx3[_0xb59f[57]](_0xb59f[235],Math[_0xb59f[519]](_0x6b6cx16[_0xb59f[235]]-1)),_0x6b6cx3[_0xb59f[57]](_0xb59f[236],Math[_0xb59f[519]](_0x6b6cx16[_0xb59f[236]]-1)),_0x6b6cx3[_0xb59f[57]](_0xb59f[117],Math[_0xb59f[430]](_0x6b6cx16[_0xb59f[117]]+2)),_0x6b6cx3[_0xb59f[57]](_0xb59f[119],Math[_0xb59f[430]](_0x6b6cx16[_0xb59f[119]])),_0x6b6cx15=null!=_0x6b6cx15[_0xb59f[1263]]?Math[_0xb59f[160]](1,this[_0xb59f[1239]](_0x6b6cx15[_0xb59f[255]])):0,_0x6b6cx3[_0xb59f[57]](_0xb59f[1382],_0x6b6cx15),this[_0xb59f[813]][_0xb59f[295]]==document&&1==mxUtils[_0xb59f[1454]](_0x6b6cx15,2)&&_0x6b6cx3[_0xb59f[57]](_0xb59f[535],_0xb59f[1455]),_0x6b6cx2[_0xb59f[950]](_0x6b6cx3,_0x6b6cx2[_0xb59f[285]]))}};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1336]]=function(){this[_0xb59f[1370]](!1,!0)};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1334]]=function(){this[_0xb59f[1370]](!0,!1)};mxSvgCanvas2D[_0xb59f[202]][_0xb59f[1337]]=function(){this[_0xb59f[1370]](!0,!0)};var mxVmlCanvas2D=function(_0x6b6cx2){mxAbstractCanvas2D[_0xb59f[239]](this);this[_0xb59f[813]]=_0x6b6cx2};mxUtils[_0xb59f[1284]](mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D[_0xb59f[202]][_0xb59f[252]]=null;mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1285]]= !0;mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1219]]=_0xb59f[1456];mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1221]]=_0xb59f[1457];mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1225]]=_0xb59f[1458];mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1227]]=_0xb59f[235];mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1459]]=_0xb59f[110];mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1460]]=1;mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1370]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[252]],_0x6b6cx5=this[_0xb59f[724]];if(null!=_0x6b6cx4){if(_0xb59f[253]==_0x6b6cx4[_0xb59f[301]]){if(null!=this[_0xb59f[1215]]&&0<this[_0xb59f[1215]][_0xb59f[67]]){_0x6b6cx4[_0xb59f[1215]]=this[_0xb59f[1215]][_0xb59f[234]](_0xb59f[185])+_0xb59f[1461],_0x6b6cx4[_0xb59f[124]][_0xb59f[117]]=this[_0xb59f[813]][_0xb59f[124]][_0xb59f[117]],_0x6b6cx4[_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[813]][_0xb59f[124]][_0xb59f[119]],_0x6b6cx4[_0xb59f[1462]]=parseInt(_0x6b6cx4[_0xb59f[124]][_0xb59f[117]])+_0xb59f[185]+parseInt(_0x6b6cx4[_0xb59f[124]][_0xb59f[119]])}else {return}};_0x6b6cx4[_0xb59f[1463]]=this[_0xb59f[1239]](Math[_0xb59f[160]](1,_0x6b6cx5[_0xb59f[610]]*_0x6b6cx5[_0xb59f[255]]/this[_0xb59f[1460]]))+_0xb59f[168];_0x6b6cx5[_0xb59f[639]]&&this[_0xb59f[813]][_0xb59f[62]](this[_0xb59f[1375]](_0x6b6cx4,_0x6b6cx2&&null!=_0x6b6cx5[_0xb59f[604]],_0x6b6cx3&&null!=_0x6b6cx5[_0xb59f[608]]));_0x6b6cx3&&null!=_0x6b6cx5[_0xb59f[608]]?(_0x6b6cx4[_0xb59f[1464]]=_0xb59f[128],_0x6b6cx4[_0xb59f[1306]]=_0x6b6cx5[_0xb59f[608]]):_0x6b6cx4[_0xb59f[1464]]=_0xb59f[308];_0x6b6cx4[_0xb59f[62]](this[_0xb59f[1465]]());_0x6b6cx2&&null!=_0x6b6cx5[_0xb59f[604]]?_0x6b6cx4[_0xb59f[62]](this[_0xb59f[1466]]()):this[_0xb59f[1229]]&&(_0xb59f[253]!=_0x6b6cx4[_0xb59f[301]]||this[_0xb59f[1215]][this[_0xb59f[1215]][_0xb59f[67]]-1]==this[_0xb59f[1227]])?_0x6b6cx4[_0xb59f[62]](this[_0xb59f[1467]]()):_0x6b6cx4[_0xb59f[1468]]=_0xb59f[308];this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx4)}};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1467]]=function(){var _0x6b6cx2=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1469]);_0x6b6cx2[_0xb59f[390]]=mxClient[_0xb59f[88]]+_0xb59f[1470];_0x6b6cx2[_0xb59f[60]]=_0xb59f[1471];return _0x6b6cx2};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1466]]=function(){var _0x6b6cx2=this[_0xb59f[724]],_0x6b6cx3=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1469]);_0x6b6cx3[_0xb59f[352]]=_0x6b6cx2[_0xb59f[604]];if(null!=_0x6b6cx2[_0xb59f[606]]){_0x6b6cx3[_0xb59f[60]]=_0xb59f[1299];_0x6b6cx3[_0xb59f[865]]=_0xb59f[130];_0x6b6cx3[_0xb59f[1472]]=_0x6b6cx2[_0xb59f[606]];var _0x6b6cx4=180-_0x6b6cx2[_0xb59f[603]],_0x6b6cx4=_0x6b6cx2[_0xb59f[607]]==mxConstants[_0xb59f[1359]]?_0x6b6cx4-(90+(_0xb59f[235]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]?180:0)):_0x6b6cx2[_0xb59f[607]]==mxConstants[_0xb59f[1356]]?_0x6b6cx4+(90+(_0xb59f[235]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]?180:0)):_0x6b6cx2[_0xb59f[607]]==mxConstants[_0xb59f[1358]]?_0x6b6cx4-(180+(_0xb59f[236]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]?-180:0)):_0x6b6cx4+(_0xb59f[236]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]?-180:0);if(_0xb59f[235]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]||_0xb59f[236]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]){_0x6b6cx4*= -1};_0x6b6cx3[_0xb59f[1474]]=mxUtils[_0xb59f[1454]](_0x6b6cx4,360);_0x6b6cx3[_0xb59f[461]]=100*_0x6b6cx2[_0xb59f[1244]]*_0x6b6cx2[_0xb59f[1247]]+_0xb59f[229];_0x6b6cx3[_0xb59f[57]](mxClient[_0xb59f[1475]]+_0xb59f[1476],100*_0x6b6cx2[_0xb59f[1244]]*_0x6b6cx2[_0xb59f[1248]]+_0xb59f[229])}else {1>_0x6b6cx2[_0xb59f[1244]]&&(_0x6b6cx3[_0xb59f[461]]=100*_0x6b6cx2[_0xb59f[1244]]+_0xb59f[229])};return _0x6b6cx3};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1465]]=function(){var _0x6b6cx2=this[_0xb59f[724]],_0x6b6cx3=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1477]);_0x6b6cx3[_0xb59f[1478]]=_0x6b6cx2[_0xb59f[1254]]||_0xb59f[1232];_0x6b6cx3[_0xb59f[1479]]=_0x6b6cx2[_0xb59f[1256]]||_0xb59f[1233];_0x6b6cx3[_0xb59f[1313]]=_0x6b6cx2[_0xb59f[1258]]||_0xb59f[1480];1>_0x6b6cx2[_0xb59f[1244]]&&(_0x6b6cx3[_0xb59f[461]]=100*_0x6b6cx2[_0xb59f[1244]]+_0xb59f[229]);_0x6b6cx2[_0xb59f[648]]&&(_0x6b6cx3[_0xb59f[1481]]=this[_0xb59f[1482]]());return _0x6b6cx3};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1482]]=function(){var _0x6b6cx2=_0xb59f[1483];if(null!=this[_0xb59f[724]][_0xb59f[649]]){var _0x6b6cx3=this[_0xb59f[724]][_0xb59f[649]][_0xb59f[224]](_0xb59f[185]);0<_0x6b6cx3[_0xb59f[67]]&&1==_0x6b6cx3[0]&&(_0x6b6cx2=_0xb59f[1484])};return _0x6b6cx2};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1375]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[724]],_0x6b6cx9=-_0x6b6cx5[_0xb59f[603]]*(Math[_0xb59f[424]]/180),_0x6b6cxa=Math[_0xb59f[426]](_0x6b6cx9),_0x6b6cx9=Math[_0xb59f[427]](_0x6b6cx9),_0x6b6cx12=_0x6b6cx5[_0xb59f[1273]]*_0x6b6cx5[_0xb59f[255]],_0x6b6cx13=_0x6b6cx5[_0xb59f[1274]]*_0x6b6cx5[_0xb59f[255]];_0xb59f[235]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]?_0x6b6cx12*= -1:_0xb59f[236]==this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]&&(_0x6b6cx13*= -1);var _0x6b6cx14=_0x6b6cx2[_0xb59f[511]](!0);_0x6b6cx14[_0xb59f[124]][_0xb59f[945]]=Math[_0xb59f[488]](_0x6b6cx12*_0x6b6cxa-_0x6b6cx13*_0x6b6cx9)+_0xb59f[168];_0x6b6cx14[_0xb59f[124]][_0xb59f[953]]=Math[_0xb59f[488]](_0x6b6cx12*_0x6b6cx9+_0x6b6cx13*_0x6b6cxa)+_0xb59f[168];8==document[_0xb59f[5]]&&(_0x6b6cx14[_0xb59f[1463]]=_0x6b6cx2[_0xb59f[1463]],_0xb59f[253]==_0x6b6cx2[_0xb59f[301]]&&(_0x6b6cx14[_0xb59f[1215]]=this[_0xb59f[1215]][_0xb59f[234]](_0xb59f[185])+_0xb59f[1461],_0x6b6cx14[_0xb59f[124]][_0xb59f[117]]=this[_0xb59f[813]][_0xb59f[124]][_0xb59f[117]],_0x6b6cx14[_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[813]][_0xb59f[124]][_0xb59f[119]],_0x6b6cx14[_0xb59f[1462]]=parseInt(_0x6b6cx2[_0xb59f[124]][_0xb59f[117]])+_0xb59f[185]+parseInt(_0x6b6cx2[_0xb59f[124]][_0xb59f[119]])));_0x6b6cx4?(_0x6b6cx14[_0xb59f[1306]]=_0x6b6cx5[_0xb59f[1269]],_0x6b6cx14[_0xb59f[62]](this[_0xb59f[1485]]())):_0x6b6cx14[_0xb59f[1464]]=_0xb59f[308];_0x6b6cx3?_0x6b6cx14[_0xb59f[62]](this[_0xb59f[1486]]()):_0x6b6cx14[_0xb59f[1468]]=_0xb59f[308];return _0x6b6cx14};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1486]]=function(){var _0x6b6cx2=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1469]);_0x6b6cx2[_0xb59f[352]]=this[_0xb59f[724]][_0xb59f[1269]];_0x6b6cx2[_0xb59f[461]]=100*this[_0xb59f[724]][_0xb59f[1244]]*this[_0xb59f[724]][_0xb59f[1271]]+_0xb59f[229];return _0x6b6cx2};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1485]]=function(){var _0x6b6cx2=this[_0xb59f[1465]]();_0x6b6cx2[_0xb59f[461]]=100*this[_0xb59f[724]][_0xb59f[1244]]*this[_0xb59f[724]][_0xb59f[1271]]+_0xb59f[229];return _0x6b6cx2};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1294]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx3&&_0x6b6cx4?_0x6b6cx2+=180:_0x6b6cx3?this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]=_0xb59f[235]:_0x6b6cx4&&(this[_0xb59f[813]][_0xb59f[124]][_0xb59f[1473]]=_0xb59f[236]);if(_0x6b6cx3?!_0x6b6cx4:_0x6b6cx4){_0x6b6cx2*= -1};this[_0xb59f[813]][_0xb59f[124]][_0xb59f[603]]=_0x6b6cx2;this[_0xb59f[724]][_0xb59f[603]]+=_0x6b6cx2;this[_0xb59f[724]][_0xb59f[1395]]=_0x6b6cx5;this[_0xb59f[724]][_0xb59f[1396]]=_0x6b6cx9};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1275]]=function(){mxAbstractCanvas2D[_0xb59f[202]][_0xb59f[1275]][_0xb59f[183]](this,arguments);this[_0xb59f[252]]=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1487]);this[_0xb59f[252]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492]};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1278]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[724]],_0x6b6cxa=(this[_0xb59f[1217]]+_0x6b6cx9[_0xb59f[1126]])*_0x6b6cx9[_0xb59f[255]],_0x6b6cx12=(this[_0xb59f[1218]]+_0x6b6cx9[_0xb59f[1125]])*_0x6b6cx9[_0xb59f[255]];_0x6b6cx2=(_0x6b6cx2+_0x6b6cx9[_0xb59f[1126]])*_0x6b6cx9[_0xb59f[255]];_0x6b6cx3=(_0x6b6cx3+_0x6b6cx9[_0xb59f[1125]])*_0x6b6cx9[_0xb59f[255]];_0x6b6cx4=(_0x6b6cx4+_0x6b6cx9[_0xb59f[1126]])*_0x6b6cx9[_0xb59f[255]];_0x6b6cx5=(_0x6b6cx5+_0x6b6cx9[_0xb59f[1125]])*_0x6b6cx9[_0xb59f[255]];var _0x6b6cx12=_0x6b6cx12+2/3*(_0x6b6cx3-_0x6b6cx12),_0x6b6cx13=_0x6b6cx4+2/3*(_0x6b6cx2-_0x6b6cx4);_0x6b6cx3=_0x6b6cx5+2/3*(_0x6b6cx3-_0x6b6cx5);this[_0xb59f[1215]][_0xb59f[207]](_0xb59f[1488]+this[_0xb59f[1239]](_0x6b6cxa+2/3*(_0x6b6cx2-_0x6b6cxa))+_0xb59f[185]+this[_0xb59f[1239]](_0x6b6cx12)+_0xb59f[185]+this[_0xb59f[1239]](_0x6b6cx13)+_0xb59f[185]+this[_0xb59f[1239]](_0x6b6cx3)+_0xb59f[185]+this[_0xb59f[1239]](_0x6b6cx4)+_0xb59f[185]+this[_0xb59f[1239]](_0x6b6cx5));this[_0xb59f[1217]]=_0x6b6cx4/_0x6b6cx9[_0xb59f[255]]-_0x6b6cx9[_0xb59f[1126]];this[_0xb59f[1218]]=_0x6b6cx5/_0x6b6cx9[_0xb59f[255]]-_0x6b6cx9[_0xb59f[1125]]};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1489]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=this[_0xb59f[724]];_0x6b6cx2=document[_0xb59f[55]](_0x6b6cx2);_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx2[_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[1239]]((_0x6b6cx3+_0x6b6cxa[_0xb59f[1126]])*_0x6b6cxa[_0xb59f[255]])+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[1239]]((_0x6b6cx4+_0x6b6cxa[_0xb59f[1125]])*_0x6b6cxa[_0xb59f[255]])+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[117]]=this[_0xb59f[1239]](_0x6b6cx5*_0x6b6cxa[_0xb59f[255]])+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[1239]](_0x6b6cx9*_0x6b6cxa[_0xb59f[255]])+_0xb59f[168];return _0x6b6cx2};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1319]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[252]]=this[_0xb59f[1489]](mxClient[_0xb59f[463]]+_0xb59f[1490],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1320]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[252]]=this[_0xb59f[1489]](mxClient[_0xb59f[463]]+_0xb59f[1491],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5);this[_0xb59f[252]][_0xb59f[57]](_0xb59f[1492],Math[_0xb59f[160]](100*_0x6b6cx9/_0x6b6cx4,100*_0x6b6cxa/_0x6b6cx5)+_0xb59f[229])};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[680]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[252]]=this[_0xb59f[1489]](mxClient[_0xb59f[463]]+_0xb59f[1493],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[618]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13){var _0x6b6cx14=null;_0x6b6cxa?(_0x6b6cx14=this[_0xb59f[1489]](mxClient[_0xb59f[463]]+_0xb59f[1490],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5),_0x6b6cx14[_0xb59f[1464]]=_0xb59f[308],_0x6b6cx2=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1469]),_0x6b6cx2[_0xb59f[1322]]=_0x6b6cxa?_0xb59f[1494]:_0xb59f[1495],_0x6b6cx2[_0xb59f[1294]]=_0xb59f[128],_0x6b6cx2[_0xb59f[60]]=_0xb59f[1496],_0x6b6cx2[_0xb59f[390]]=_0x6b6cx9,_0x6b6cx14[_0xb59f[62]](_0x6b6cx2)):(_0x6b6cx14=this[_0xb59f[1489]](mxClient[_0xb59f[463]]+_0xb59f[464],_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5),_0x6b6cx14[_0xb59f[390]]=_0x6b6cx9);_0x6b6cx12&&_0x6b6cx13?_0x6b6cx14[_0xb59f[124]][_0xb59f[603]]=_0xb59f[1497]:_0x6b6cx12?_0x6b6cx14[_0xb59f[124]][_0xb59f[1473]]=_0xb59f[235]:_0x6b6cx13&&(_0x6b6cx14[_0xb59f[124]][_0xb59f[1473]]=_0xb59f[236]);1>this[_0xb59f[724]][_0xb59f[1244]]&&(_0x6b6cx14[_0xb59f[124]][_0xb59f[347]]+=_0xb59f[459]+100*this[_0xb59f[724]][_0xb59f[1244]]+_0xb59f[460]);this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx14)};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1404]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx4=document[_0xb59f[55]](_0xb59f[485]);var _0x6b6cx9=this[_0xb59f[724]],_0x6b6cxa=_0xb59f[110];null!=_0x6b6cx9[_0xb59f[1261]]&&(_0x6b6cxa+=_0xb59f[1418]+_0x6b6cx9[_0xb59f[1261]]+_0xb59f[471]);null!=_0x6b6cx9[_0xb59f[1263]]&&(_0x6b6cxa+=_0xb59f[1419]+_0x6b6cx9[_0xb59f[1263]]+_0xb59f[471]);mxUtils[_0xb59f[1331]](_0x6b6cx2)?_0x6b6cx4[_0xb59f[62]](_0x6b6cx2):0<_0x6b6cxa[_0xb59f[67]]&&!_0x6b6cx5?(_0x6b6cx5=document[_0xb59f[55]](_0xb59f[485]),_0x6b6cx5[_0xb59f[124]][_0xb59f[103]]=_0x6b6cxa,_0x6b6cx5[_0xb59f[124]][_0xb59f[495]]=mxClient[_0xb59f[496]]?_0xb59f[497]:_0xb59f[498],_0x6b6cx5[_0xb59f[124]][_0xb59f[499]]=_0xb59f[500],_0x6b6cx5[_0xb59f[339]]=_0x6b6cx2,_0x6b6cx4[_0xb59f[62]](_0x6b6cx5)):(_0x6b6cx4[_0xb59f[124]][_0xb59f[103]]=_0x6b6cxa,_0x6b6cx4[_0xb59f[339]]=_0x6b6cx2);_0x6b6cx2=_0x6b6cx4[_0xb59f[124]];_0x6b6cx2[_0xb59f[487]]=Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[487]]/this[_0xb59f[1460]])+_0xb59f[168];_0x6b6cx2[_0xb59f[486]]=_0x6b6cx9[_0xb59f[486]];_0x6b6cx2[_0xb59f[352]]=_0x6b6cx9[_0xb59f[665]];_0x6b6cx2[_0xb59f[123]]=_0xb59f[125];_0x6b6cx2[_0xb59f[1165]]=_0x6b6cx3||_0xb59f[361];_0x6b6cx2[_0xb59f[489]]=Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[487]]*mxConstants[_0xb59f[490]]/this[_0xb59f[1460]])+_0xb59f[168];(_0x6b6cx9[_0xb59f[666]]&mxConstants[_0xb59f[1410]])==mxConstants[_0xb59f[1410]]&&(_0x6b6cx2[_0xb59f[1452]]=_0xb59f[1447]);(_0x6b6cx9[_0xb59f[666]]&mxConstants[_0xb59f[1412]])==mxConstants[_0xb59f[1412]]&&(_0x6b6cx2[_0xb59f[666]]=_0xb59f[1449]);(_0x6b6cx9[_0xb59f[666]]&mxConstants[_0xb59f[1414]])==mxConstants[_0xb59f[1414]]&&(_0x6b6cx2[_0xb59f[1498]]=_0xb59f[355]);return _0x6b6cx4};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[963]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){if(this[_0xb59f[1285]]&&null!=_0x6b6cx9){var _0x6b6cx18=this[_0xb59f[724]];if(_0xb59f[1428]==_0x6b6cx14){null!=_0x6b6cx18[_0xb59f[603]]&&(_0x6b6cx3=this[_0xb59f[1241]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx18[_0xb59f[603]],_0x6b6cx18[_0xb59f[1395]],_0x6b6cx18[_0xb59f[1396]]),_0x6b6cx2=_0x6b6cx3[_0xb59f[235]],_0x6b6cx3=_0x6b6cx3[_0xb59f[236]]);8==document[_0xb59f[5]]?(_0x6b6cx2+=_0x6b6cx18[_0xb59f[1126]],_0x6b6cx3+=_0x6b6cx18[_0xb59f[1125]]):(_0x6b6cx2*=_0x6b6cx18[_0xb59f[255]],_0x6b6cx3*=_0x6b6cx18[_0xb59f[255]]);_0x6b6cx14=8==document[_0xb59f[5]]?document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1499]):document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx14[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx14[_0xb59f[124]][_0xb59f[495]]=_0xb59f[497];_0x6b6cx14[_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[1239]](_0x6b6cx2)+_0xb59f[168];_0x6b6cx14[_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[1239]](_0x6b6cx3)+_0xb59f[168];_0x6b6cx14[_0xb59f[124]][_0xb59f[499]]=_0x6b6cx18[_0xb59f[255]];var _0x6b6cx19=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx19[_0xb59f[124]][_0xb59f[491]]=_0xb59f[1500];_0x6b6cx19[_0xb59f[124]][_0xb59f[495]]=_0xb59f[497];var _0x6b6cx1a=mxUtils[_0xb59f[1501]](_0x6b6cxa,_0x6b6cx12),_0x6b6cx1b=_0x6b6cx1a[_0xb59f[235]],_0x6b6cx1a=_0x6b6cx1a[_0xb59f[236]];_0x6b6cx9=this[_0xb59f[1404]](_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx15);_0x6b6cxa=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx13?(!_0x6b6cx16&&0<_0x6b6cx4&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[488]](_0x6b6cx4)+_0xb59f[168]),_0x6b6cx9[_0xb59f[124]][_0xb59f[493]]=_0xb59f[1502]):_0x6b6cx9[_0xb59f[124]][_0xb59f[493]]=_0xb59f[494];_0x6b6cx13=_0x6b6cx18[_0xb59f[603]]+(_0x6b6cx17||0);this[_0xb59f[1216]]&&0!=_0x6b6cx13?(_0x6b6cxa[_0xb59f[124]][_0xb59f[495]]=_0xb59f[497],_0x6b6cxa[_0xb59f[124]][_0xb59f[499]]=_0xb59f[500],_0x6b6cxa[_0xb59f[62]](_0x6b6cx9),8==document[_0xb59f[5]]&&_0xb59f[529]!=this[_0xb59f[813]][_0xb59f[301]]?(_0x6b6cx19[_0xb59f[62]](_0x6b6cxa),_0x6b6cx14[_0xb59f[62]](_0x6b6cx19)):_0x6b6cx14[_0xb59f[62]](_0x6b6cxa)):8==document[_0xb59f[5]]?(_0x6b6cx19[_0xb59f[62]](_0x6b6cx9),_0x6b6cx14[_0xb59f[62]](_0x6b6cx19)):(_0x6b6cx9[_0xb59f[124]][_0xb59f[495]]=_0xb59f[497],_0x6b6cx14[_0xb59f[62]](_0x6b6cx9));_0xb59f[529]!=this[_0xb59f[813]][_0xb59f[301]]?(_0x6b6cx17=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1490]),_0x6b6cx17[_0xb59f[1464]]=_0xb59f[308],_0x6b6cx17[_0xb59f[1468]]=_0xb59f[308],_0x6b6cx17[_0xb59f[62]](_0x6b6cx14),this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx17)):this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx14);_0x6b6cx16?(_0x6b6cx9[_0xb59f[124]][_0xb59f[277]]=_0xb59f[188],0<_0x6b6cx4&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[488]](_0x6b6cx4)+_0xb59f[168]),0<_0x6b6cx5&&8==document[_0xb59f[5]]&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[1503]]=Math[_0xb59f[488]](_0x6b6cx5)+_0xb59f[168])):_0x6b6cx15&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[117]]=_0x6b6cx4+_0xb59f[168],0<_0x6b6cx5&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[1503]]=Math[_0xb59f[488]](_0x6b6cx5)+_0xb59f[168]));if(this[_0xb59f[1216]]&&0!=_0x6b6cx13){_0x6b6cx4=_0x6b6cx13*(Math[_0xb59f[424]]/180);_0x6b6cx13=parseFloat(parseFloat(Math[_0xb59f[426]](_0x6b6cx4))[_0xb59f[1293]](8));_0x6b6cx17=parseFloat(parseFloat(Math[_0xb59f[427]](-_0x6b6cx4))[_0xb59f[1293]](8));_0x6b6cx4%=2*Math[_0xb59f[424]];0>_0x6b6cx4&&(_0x6b6cx4+=2*Math[_0xb59f[424]]);_0x6b6cx4%=Math[_0xb59f[424]];_0x6b6cx4>Math[_0xb59f[424]]/2&&(_0x6b6cx4=Math[_0xb59f[424]]-_0x6b6cx4);_0x6b6cx12=Math[_0xb59f[426]](_0x6b6cx4);var _0x6b6cx1c=Math[_0xb59f[427]](_0x6b6cx4);8==document[_0xb59f[5]]&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[495]]=_0xb59f[498],_0x6b6cxa[_0xb59f[124]][_0xb59f[495]]=_0xb59f[498],_0x6b6cx19[_0xb59f[124]][_0xb59f[495]]=_0xb59f[498]);_0x6b6cx9[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx9);_0x6b6cx4=_0x6b6cx9[_0xb59f[359]];_0x6b6cx19=_0x6b6cx9[_0xb59f[167]];if(mxClient[_0xb59f[496]]&&(_0x6b6cx16||_0x6b6cx15)&&_0x6b6cx19>_0x6b6cx5){_0x6b6cx19=_0x6b6cx5,_0x6b6cx9[_0xb59f[124]][_0xb59f[119]]=_0x6b6cx19+_0xb59f[168]};_0x6b6cx5=_0x6b6cx19;_0x6b6cx16=(_0x6b6cx5-_0x6b6cx5*_0x6b6cx12+_0x6b6cx4* -_0x6b6cx1c)/2-_0x6b6cx17*_0x6b6cx4*(_0x6b6cx1b+0.5)+_0x6b6cx13*_0x6b6cx5*(_0x6b6cx1a+0.5);_0x6b6cx15=(_0x6b6cx4-_0x6b6cx4*_0x6b6cx12+_0x6b6cx5* -_0x6b6cx1c)/2+_0x6b6cx13*_0x6b6cx4*(_0x6b6cx1b+0.5)+_0x6b6cx17*_0x6b6cx5*(_0x6b6cx1a+0.5);_0xb59f[1504]==_0x6b6cx14[_0xb59f[301]]&&_0xb59f[529]==this[_0xb59f[813]][_0xb59f[301]]?(_0x6b6cx1b=document[_0xb59f[55]](_0xb59f[485]),_0x6b6cx1b[_0xb59f[124]][_0xb59f[495]]=_0xb59f[498],_0x6b6cx1b[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492],_0x6b6cx1b[_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[1239]](_0x6b6cx2+(_0x6b6cx15-_0x6b6cx4/2)*_0x6b6cx18[_0xb59f[255]])+_0xb59f[168],_0x6b6cx1b[_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[1239]](_0x6b6cx3+(_0x6b6cx16-_0x6b6cx5/2)*_0x6b6cx18[_0xb59f[255]])+_0xb59f[168],_0x6b6cx14[_0xb59f[265]][_0xb59f[62]](_0x6b6cx1b),_0x6b6cx1b[_0xb59f[62]](_0x6b6cx14)):(_0x6b6cx18=8==document[_0xb59f[5]]?1:_0x6b6cx18[_0xb59f[255]],_0x6b6cx14[_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[1239]](_0x6b6cx2+(_0x6b6cx15-_0x6b6cx4/2)*_0x6b6cx18)+_0xb59f[168],_0x6b6cx14[_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[1239]](_0x6b6cx3+(_0x6b6cx16-_0x6b6cx5/2)*_0x6b6cx18)+_0xb59f[168]);_0x6b6cxa[_0xb59f[124]][_0xb59f[347]]=_0xb59f[1505]+_0x6b6cx13+_0xb59f[1506]+_0x6b6cx17+_0xb59f[1507]+-_0x6b6cx17+_0xb59f[1508]+_0x6b6cx13+_0xb59f[1509];_0x6b6cxa[_0xb59f[124]][_0xb59f[1028]]=this[_0xb59f[1459]];1>this[_0xb59f[724]][_0xb59f[1244]]&&(_0x6b6cxa[_0xb59f[124]][_0xb59f[347]]+=_0xb59f[459]+100*this[_0xb59f[724]][_0xb59f[1244]]+_0xb59f[460]);_0x6b6cx9[_0xb59f[124]][_0xb59f[187]]=_0xb59f[110];_0x6b6cxa[_0xb59f[62]](_0x6b6cx9)}else {8!=document[_0xb59f[5]]?(_0x6b6cx9[_0xb59f[124]][_0xb59f[123]]=_0xb59f[125],1>this[_0xb59f[724]][_0xb59f[1244]]&&(_0x6b6cx14[_0xb59f[124]][_0xb59f[347]]=_0xb59f[459]+100*this[_0xb59f[724]][_0xb59f[1244]]+_0xb59f[460]),_0x6b6cx18=_0x6b6cx9[_0xb59f[265]],_0x6b6cx9[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx9),_0x6b6cx4=_0x6b6cx9[_0xb59f[359]],_0x6b6cx19=_0x6b6cx9[_0xb59f[167]],mxClient[_0xb59f[496]]&&(_0x6b6cx16&&_0x6b6cx19>_0x6b6cx5)&&(_0x6b6cx19=_0x6b6cx5,_0x6b6cx9[_0xb59f[124]][_0xb59f[119]]=_0x6b6cx19+_0xb59f[168]),_0x6b6cx5=_0x6b6cx19,_0x6b6cx9[_0xb59f[124]][_0xb59f[187]]=_0xb59f[110],_0x6b6cx18[_0xb59f[62]](_0x6b6cx9),_0x6b6cx14[_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[1239]](_0x6b6cx2+_0x6b6cx4*_0x6b6cx1b*this[_0xb59f[724]][_0xb59f[255]])+_0xb59f[168],_0x6b6cx14[_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[1239]](_0x6b6cx3+_0x6b6cx5*_0x6b6cx1a*this[_0xb59f[724]][_0xb59f[255]])+_0xb59f[168]):(1>this[_0xb59f[724]][_0xb59f[1244]]&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[347]]=_0xb59f[459]+100*this[_0xb59f[724]][_0xb59f[1244]]+_0xb59f[460]),_0x6b6cx19[_0xb59f[124]][_0xb59f[361]]=100*_0x6b6cx1b+_0xb59f[229],_0x6b6cx19[_0xb59f[124]][_0xb59f[125]]=100*_0x6b6cx1a+_0xb59f[229])}}else {this[_0xb59f[1436]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,mxUtils[_0xb59f[321]](_0x6b6cx9,!1),_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17)}}};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1436]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){_0x6b6cx5=this[_0xb59f[724]];_0x6b6cx2=(_0x6b6cx2+_0x6b6cx5[_0xb59f[1126]])*_0x6b6cx5[_0xb59f[255]];_0x6b6cx3=(_0x6b6cx3+_0x6b6cx5[_0xb59f[1125]])*_0x6b6cx5[_0xb59f[255]];_0x6b6cx4=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1487]);_0x6b6cx4[_0xb59f[124]][_0xb59f[117]]=_0xb59f[942];_0x6b6cx4[_0xb59f[124]][_0xb59f[119]]=_0xb59f[942];_0x6b6cx4[_0xb59f[1464]]=_0xb59f[308];_0x6b6cx15=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1469]);_0x6b6cx15[_0xb59f[352]]=_0x6b6cx5[_0xb59f[665]];_0x6b6cx15[_0xb59f[461]]=100*_0x6b6cx5[_0xb59f[1244]]+_0xb59f[229];_0x6b6cx4[_0xb59f[62]](_0x6b6cx15);_0x6b6cx15=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1510]);_0x6b6cx15[_0xb59f[1511]]=_0xb59f[128];_0x6b6cx15[_0xb59f[6]]=_0xb59f[1512]+this[_0xb59f[1239]](0)+_0xb59f[185]+this[_0xb59f[1239]](0)+_0xb59f[1513]+this[_0xb59f[1239]](1)+_0xb59f[185]+this[_0xb59f[1239]](0);_0x6b6cx4[_0xb59f[62]](_0x6b6cx15);_0x6b6cx15=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1514]);_0x6b6cx15[_0xb59f[124]][_0xb59f[103]]=_0xb59f[1515]+_0x6b6cxa;_0x6b6cx15[_0xb59f[124]][_0xb59f[611]]=_0x6b6cxa;_0x6b6cx15[_0xb59f[124]][_0xb59f[486]]=_0x6b6cx5[_0xb59f[486]];_0x6b6cx15[_0xb59f[1516]]=_0x6b6cx9;_0x6b6cx15[_0xb59f[747]]=_0xb59f[128];_0x6b6cxa=Math[_0xb59f[488]](_0x6b6cx5[_0xb59f[487]]*_0x6b6cx5[_0xb59f[255]]/this[_0xb59f[1460]]);_0x6b6cx15[_0xb59f[124]][_0xb59f[487]]=_0x6b6cxa+_0xb59f[168];(_0x6b6cx5[_0xb59f[666]]&mxConstants[_0xb59f[1410]])==mxConstants[_0xb59f[1410]]&&(_0x6b6cx15[_0xb59f[124]][_0xb59f[1452]]=_0xb59f[1447]);(_0x6b6cx5[_0xb59f[666]]&mxConstants[_0xb59f[1412]])==mxConstants[_0xb59f[1412]]&&(_0x6b6cx15[_0xb59f[124]][_0xb59f[666]]=_0xb59f[1449]);(_0x6b6cx5[_0xb59f[666]]&mxConstants[_0xb59f[1414]])==mxConstants[_0xb59f[1414]]&&(_0x6b6cx15[_0xb59f[124]][_0xb59f[354]]=_0xb59f[355]);_0x6b6cx9=_0x6b6cx9[_0xb59f[224]](_0xb59f[192]);_0x6b6cx5=_0x6b6cxa+(_0x6b6cx9[_0xb59f[67]]-1)*_0x6b6cxa*mxConstants[_0xb59f[490]];_0x6b6cxa=_0x6b6cx9=0;_0x6b6cx12==mxConstants[_0xb59f[482]]?_0x6b6cxa=-_0x6b6cx5/2:_0x6b6cx12!=mxConstants[_0xb59f[481]]&&(_0x6b6cxa=_0x6b6cx5/2);null!=_0x6b6cx17&&(_0x6b6cx4[_0xb59f[124]][_0xb59f[603]]=_0x6b6cx17,_0x6b6cx12=_0x6b6cx17*(Math[_0xb59f[424]]/180),_0x6b6cx9=Math[_0xb59f[427]](_0x6b6cx12)*_0x6b6cxa,_0x6b6cxa*=Math[_0xb59f[426]](_0x6b6cx12));_0x6b6cx4[_0xb59f[62]](_0x6b6cx15);_0x6b6cx4[_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[1239]](_0x6b6cx2-_0x6b6cx9)+_0xb59f[168];_0x6b6cx4[_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[1239]](_0x6b6cx3+_0x6b6cxa)+_0xb59f[168];this[_0xb59f[813]][_0xb59f[62]](_0x6b6cx4)};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1336]]=function(){this[_0xb59f[1370]](!1,!0)};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1334]]=function(){this[_0xb59f[1370]](!0,!1)};mxVmlCanvas2D[_0xb59f[202]][_0xb59f[1337]]=function(){this[_0xb59f[1370]](!0,!0)};function mxGuide(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[1517]](_0x6b6cx3)}mxGuide[_0xb59f[202]][_0xb59f[1179]]=null;mxGuide[_0xb59f[202]][_0xb59f[1214]]=null;mxGuide[_0xb59f[202]][_0xb59f[662]]= !0;mxGuide[_0xb59f[202]][_0xb59f[704]]= !0;mxGuide[_0xb59f[202]][_0xb59f[1518]]=null;mxGuide[_0xb59f[202]][_0xb59f[1519]]=null;mxGuide[_0xb59f[202]][_0xb59f[1517]]=function(_0x6b6cx2){this[_0xb59f[1214]]=_0x6b6cx2};mxGuide[_0xb59f[202]][_0xb59f[1019]]=function(_0x6b6cx2){return !0};mxGuide[_0xb59f[202]][_0xb59f[1520]]=function(){return this[_0xb59f[1179]][_0xb59f[1020]]*this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]]/2};mxGuide[_0xb59f[202]][_0xb59f[1521]]=function(_0x6b6cx2){_0x6b6cx2= new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);_0x6b6cx2[_0xb59f[1522]]= !0;return _0x6b6cx2};mxGuide[_0xb59f[202]][_0xb59f[582]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(null!=this[_0xb59f[1214]]&&(this[_0xb59f[662]]||this[_0xb59f[704]])&&null!=_0x6b6cx2&&null!=_0x6b6cx3){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[513]],_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cxa=_0x6b6cx3[_0xb59f[235]],_0x6b6cx12=_0x6b6cx3[_0xb59f[236]],_0x6b6cx13=!1,_0x6b6cx14=!1,_0x6b6cx15=this[_0xb59f[1520]](),_0x6b6cx16=_0x6b6cx15,_0x6b6cx17=_0x6b6cx15,_0x6b6cx15=_0x6b6cx2[_0xb59f[238]]();_0x6b6cx15[_0xb59f[235]]+=_0x6b6cx3[_0xb59f[235]];_0x6b6cx15[_0xb59f[236]]+=_0x6b6cx3[_0xb59f[236]];var _0x6b6cx18=_0x6b6cx15[_0xb59f[235]],_0x6b6cx19=_0x6b6cx15[_0xb59f[235]]+_0x6b6cx15[_0xb59f[117]],_0x6b6cx1a=_0x6b6cx15[_0xb59f[241]](),_0x6b6cx1b=_0x6b6cx15[_0xb59f[236]],_0x6b6cx1c=_0x6b6cx15[_0xb59f[236]]+_0x6b6cx15[_0xb59f[119]],_0x6b6cx1d=_0x6b6cx15[_0xb59f[242]]();_0x6b6cx3=function(_0x6b6cx3){_0x6b6cx3+=this[_0xb59f[1179]][_0xb59f[1136]];var _0x6b6cx4=!1;Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1a)<_0x6b6cx16?(_0x6b6cxa=_0x6b6cx3-_0x6b6cx2[_0xb59f[241]](),_0x6b6cx16=Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1a),_0x6b6cx4= !0):Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx18)<_0x6b6cx16?(_0x6b6cxa=_0x6b6cx3-_0x6b6cx2[_0xb59f[235]],_0x6b6cx16=Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx18),_0x6b6cx4= !0):Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx19)<_0x6b6cx16&&(_0x6b6cxa=_0x6b6cx3-_0x6b6cx2[_0xb59f[235]]-_0x6b6cx2[_0xb59f[117]],_0x6b6cx16=Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx19),_0x6b6cx4= !0);if(_0x6b6cx4){null==this[_0xb59f[1518]]&&(this[_0xb59f[1518]]=this[_0xb59f[1521]](!0),this[_0xb59f[1518]][_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]],this[_0xb59f[1518]][_0xb59f[1229]]= !1,this[_0xb59f[1518]][_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]()));var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[526]];_0x6b6cx3-=this[_0xb59f[1179]][_0xb59f[1136]];this[_0xb59f[1518]][_0xb59f[1525]]=[ new mxPoint(_0x6b6cx3,-this[_0xb59f[1179]][_0xb59f[1137]]), new mxPoint(_0x6b6cx3,_0x6b6cx5[_0xb59f[191]]-3-this[_0xb59f[1179]][_0xb59f[1137]])]};_0x6b6cx13=_0x6b6cx13||_0x6b6cx4};for(var _0x6b6cx15=function(_0x6b6cx3){_0x6b6cx3+=this[_0xb59f[1179]][_0xb59f[1137]];var _0x6b6cx4=!1;Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1d)<_0x6b6cx17?(_0x6b6cx12=_0x6b6cx3-_0x6b6cx2[_0xb59f[242]](),_0x6b6cx17=Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1d),_0x6b6cx4= !0):Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1b)<_0x6b6cx17?(_0x6b6cx12=_0x6b6cx3-_0x6b6cx2[_0xb59f[236]],_0x6b6cx17=Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1b),_0x6b6cx4= !0):Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1c)<_0x6b6cx17&&(_0x6b6cx12=_0x6b6cx3-_0x6b6cx2[_0xb59f[236]]-_0x6b6cx2[_0xb59f[119]],_0x6b6cx17=Math[_0xb59f[425]](_0x6b6cx3-_0x6b6cx1c),_0x6b6cx4= !0);if(_0x6b6cx4){null==this[_0xb59f[1519]]&&(this[_0xb59f[1519]]=this[_0xb59f[1521]](!1),this[_0xb59f[1519]][_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]],this[_0xb59f[1519]][_0xb59f[1229]]= !1,this[_0xb59f[1519]][_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]()));var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[526]];_0x6b6cx3-=this[_0xb59f[1179]][_0xb59f[1137]];this[_0xb59f[1519]][_0xb59f[1525]]=[ new mxPoint(-this[_0xb59f[1179]][_0xb59f[1136]],_0x6b6cx3), new mxPoint(_0x6b6cx5[_0xb59f[1526]]-3-this[_0xb59f[1179]][_0xb59f[1136]],_0x6b6cx3)]};_0x6b6cx14=_0x6b6cx14||_0x6b6cx4},_0x6b6cx1e=0;_0x6b6cx1e<this[_0xb59f[1214]][_0xb59f[67]];_0x6b6cx1e++){var _0x6b6cx1f=this[_0xb59f[1214]][_0x6b6cx1e];null!=_0x6b6cx1f&&(this[_0xb59f[662]]&&(_0x6b6cx3[_0xb59f[239]](this,_0x6b6cx1f[_0xb59f[241]]()),_0x6b6cx3[_0xb59f[239]](this,_0x6b6cx1f[_0xb59f[235]]),_0x6b6cx3[_0xb59f[239]](this,_0x6b6cx1f[_0xb59f[235]]+_0x6b6cx1f[_0xb59f[117]])),this[_0xb59f[704]]&&(_0x6b6cx15[_0xb59f[239]](this,_0x6b6cx1f[_0xb59f[242]]()),_0x6b6cx15[_0xb59f[239]](this,_0x6b6cx1f[_0xb59f[236]]),_0x6b6cx15[_0xb59f[239]](this,_0x6b6cx1f[_0xb59f[236]]+_0x6b6cx1f[_0xb59f[119]])))};!_0x6b6cx13&&null!=this[_0xb59f[1518]]?this[_0xb59f[1518]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188]:null!=this[_0xb59f[1518]]&&(this[_0xb59f[1518]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189],this[_0xb59f[1518]][_0xb59f[258]]());!_0x6b6cx14&&null!=this[_0xb59f[1519]]?this[_0xb59f[1519]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188]:null!=this[_0xb59f[1519]]&&(this[_0xb59f[1519]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189],this[_0xb59f[1519]][_0xb59f[258]]());_0x6b6cx4&&(_0x6b6cx13||(_0x6b6cx4=_0x6b6cx2[_0xb59f[235]]-(this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[235]]/_0x6b6cx9-_0x6b6cx5[_0xb59f[235]])+_0x6b6cx5[_0xb59f[235]])*_0x6b6cx9,_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cxa/_0x6b6cx9)*_0x6b6cx9-_0x6b6cx4),_0x6b6cx14||(_0x6b6cx5=_0x6b6cx2[_0xb59f[236]]-(this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[236]]/_0x6b6cx9-_0x6b6cx5[_0xb59f[236]])+_0x6b6cx5[_0xb59f[236]])*_0x6b6cx9,_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx12/_0x6b6cx9)*_0x6b6cx9-_0x6b6cx5));_0x6b6cx3= new mxPoint(_0x6b6cxa,_0x6b6cx12)};return _0x6b6cx3};mxGuide[_0xb59f[202]][_0xb59f[801]]=function(){null!=this[_0xb59f[1518]]&&(this[_0xb59f[1518]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188]);null!=this[_0xb59f[1519]]&&(this[_0xb59f[1519]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188])};mxGuide[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[1518]]&&(this[_0xb59f[1518]][_0xb59f[515]](),this[_0xb59f[1518]]=null);null!=this[_0xb59f[1519]]&&(this[_0xb59f[1519]][_0xb59f[515]](),this[_0xb59f[1519]]=null)};function mxStencil(_0x6b6cx2){this[_0xb59f[1527]]=_0x6b6cx2;this[_0xb59f[1528]]();this[_0xb59f[1529]]()}mxStencil[_0xb59f[1530]]= !1;mxStencil[_0xb59f[202]][_0xb59f[1527]]=null;mxStencil[_0xb59f[202]][_0xb59f[1531]]=null;mxStencil[_0xb59f[202]][_0xb59f[1322]]=null;mxStencil[_0xb59f[202]][_0xb59f[1532]]=null;mxStencil[_0xb59f[202]][_0xb59f[1533]]=null;mxStencil[_0xb59f[202]][_0xb59f[1534]]=null;mxStencil[_0xb59f[202]][_0xb59f[1535]]=null;mxStencil[_0xb59f[202]][_0xb59f[1307]]=null;mxStencil[_0xb59f[202]][_0xb59f[1528]]=function(){this[_0xb59f[1535]]=this[_0xb59f[1527]][_0xb59f[64]](_0xb59f[1536])[0];this[_0xb59f[1534]]=this[_0xb59f[1527]][_0xb59f[64]](_0xb59f[1537])[0];this[_0xb59f[1532]]=Number(this[_0xb59f[1527]][_0xb59f[284]](_0xb59f[1302])||100);this[_0xb59f[1533]]=Number(this[_0xb59f[1527]][_0xb59f[284]](_0xb59f[1303])||100);var _0x6b6cx2=this[_0xb59f[1527]][_0xb59f[284]](_0xb59f[1322]);this[_0xb59f[1322]]=null!=_0x6b6cx2?_0x6b6cx2:_0xb59f[1538];_0x6b6cx2=this[_0xb59f[1527]][_0xb59f[284]](_0xb59f[1307]);this[_0xb59f[1307]]=null!=_0x6b6cx2?_0x6b6cx2:_0xb59f[500]};mxStencil[_0xb59f[202]][_0xb59f[1529]]=function(){var _0x6b6cx2=this[_0xb59f[1527]][_0xb59f[64]](_0xb59f[1539])[0];if(null!=_0x6b6cx2&&(_0x6b6cx2=mxUtils[_0xb59f[1540]](_0x6b6cx2),null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]])){this[_0xb59f[1531]]=[];for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[1531]][_0xb59f[207]](this[_0xb59f[1541]](_0x6b6cx2[_0x6b6cx3]))}}};mxStencil[_0xb59f[202]][_0xb59f[1541]]=function(_0x6b6cx2){var _0x6b6cx3=Number(_0x6b6cx2[_0xb59f[284]](_0xb59f[235])),_0x6b6cx4=Number(_0x6b6cx2[_0xb59f[284]](_0xb59f[236]));_0x6b6cx2=_0xb59f[500]==_0x6b6cx2[_0xb59f[284]](_0xb59f[591]);return  new mxConnectionConstraint( new mxPoint(_0x6b6cx3,_0x6b6cx4),_0x6b6cx2)};mxStencil[_0xb59f[202]][_0xb59f[1542]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=this[_0xb59f[1543]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);_0x6b6cx2=_0x6b6cx2[_0xb59f[284]](_0xb59f[1544]);if(mxStencil[_0xb59f[1530]]&&null==_0x6b6cx2||_0xb59f[500]==_0x6b6cx2){_0x6b6cx3=mxResources[_0xb59f[203]](_0x6b6cx3)};return _0x6b6cx3};mxStencil[_0xb59f[202]][_0xb59f[1543]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=_0x6b6cx2[_0xb59f[284]](_0x6b6cx3);null==_0x6b6cx3&&(_0x6b6cx2=mxUtils[_0xb59f[329]](_0x6b6cx2),null!=_0x6b6cx2&&(_0x6b6cx2=mxUtils[_0xb59f[1545]](_0x6b6cx2),_0xb59f[279]== typeof _0x6b6cx2&&(_0x6b6cx3=_0x6b6cx2(_0x6b6cx4))));return _0x6b6cx3};mxStencil[_0xb59f[202]][_0xb59f[1546]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[1547]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,this[_0xb59f[1534]],!1);this[_0xb59f[1547]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,this[_0xb59f[1535]],!0)};mxStencil[_0xb59f[202]][_0xb59f[1547]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13){if(null!=_0x6b6cx12){var _0x6b6cx14=mxUtils[_0xb59f[433]](_0x6b6cx3[_0xb59f[124]],mxConstants.STYLE_DIRECTION,null);_0x6b6cx4=this[_0xb59f[1548]](_0x6b6cx3[_0xb59f[124]],_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx14);_0x6b6cx5=Math[_0xb59f[243]](_0x6b6cx4[_0xb59f[117]],_0x6b6cx4[_0xb59f[119]]);_0x6b6cx5=_0xb59f[1549]==this[_0xb59f[1307]]?Number(mxUtils[_0xb59f[1550]](_0x6b6cx3[_0xb59f[124]],mxConstants.STYLE_STROKEWIDTH,1)):Number(this[_0xb59f[1307]])*_0x6b6cx5;_0x6b6cx2[_0xb59f[1250]](_0x6b6cx5);for(_0x6b6cx12=_0x6b6cx12[_0xb59f[285]];null!=_0x6b6cx12;){_0x6b6cx12[_0xb59f[288]]==mxConstants[_0xb59f[289]]&&this[_0xb59f[1551]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx12,_0x6b6cx4,_0x6b6cx13),_0x6b6cx12=_0x6b6cx12[_0xb59f[287]]}}};mxStencil[_0xb59f[202]][_0xb59f[1548]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx2=_0x6b6cx3;_0x6b6cx3=_0x6b6cx5/this[_0xb59f[1532]];var _0x6b6cx12=_0x6b6cx9/this[_0xb59f[1533]];if(_0x6b6cxa=_0xb59f[700]==_0x6b6cxa||_0xb59f[701]==_0x6b6cxa){_0x6b6cx12=_0x6b6cx5/this[_0xb59f[1533]];_0x6b6cx3=_0x6b6cx9/this[_0xb59f[1532]];var _0x6b6cx13=(_0x6b6cx5-_0x6b6cx9)/2;_0x6b6cx2+=_0x6b6cx13;_0x6b6cx4-=_0x6b6cx13};_0xb59f[1552]==this[_0xb59f[1322]]&&(_0x6b6cx3=_0x6b6cx12=Math[_0xb59f[243]](_0x6b6cx3,_0x6b6cx12),_0x6b6cxa?(_0x6b6cx2+=(_0x6b6cx9-this[_0xb59f[1532]]*_0x6b6cx3)/2,_0x6b6cx4+=(_0x6b6cx5-this[_0xb59f[1533]]*_0x6b6cx12)/2):(_0x6b6cx2+=(_0x6b6cx5-this[_0xb59f[1532]]*_0x6b6cx3)/2,_0x6b6cx4+=(_0x6b6cx9-this[_0xb59f[1533]]*_0x6b6cx12)/2));return  new mxRectangle(_0x6b6cx2,_0x6b6cx4,_0x6b6cx3,_0x6b6cx12)};mxStencil[_0xb59f[202]][_0xb59f[1551]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx4[_0xb59f[301]],_0x6b6cx12=_0x6b6cx5[_0xb59f[235]],_0x6b6cx13=_0x6b6cx5[_0xb59f[236]],_0x6b6cx14=_0x6b6cx5[_0xb59f[117]],_0x6b6cx15=_0x6b6cx5[_0xb59f[119]],_0x6b6cx16=Math[_0xb59f[243]](_0x6b6cx14,_0x6b6cx15);if(_0xb59f[815]==_0x6b6cxa){_0x6b6cx2[_0xb59f[815]]()}else {if(_0xb59f[1210]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1210]]()}else {if(_0xb59f[1215]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1275]]();for(_0x6b6cx4=_0x6b6cx4[_0xb59f[285]];null!=_0x6b6cx4;){_0x6b6cx4[_0xb59f[288]]==mxConstants[_0xb59f[289]]&&this[_0xb59f[1551]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),_0x6b6cx4=_0x6b6cx4[_0xb59f[287]]}}else {if(_0xb59f[268]==_0x6b6cxa){_0x6b6cx2[_0xb59f[268]]()}else {if(_0xb59f[582]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1276]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15)}else {if(_0xb59f[683]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1277]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15)}else {if(_0xb59f[1323]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1278]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1324]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1325]))*_0x6b6cx15,_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1326]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1327]))*_0x6b6cx15)}else {if(_0xb59f[1328]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1279]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1324]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1325]))*_0x6b6cx15,_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1326]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1327]))*_0x6b6cx15,_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1329]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1330]))*_0x6b6cx15)}else {if(_0xb59f[1553]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1280]](Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1397]))*_0x6b6cx14,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1398]))*_0x6b6cx15,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1554])),Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1555])),Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1556])),_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15)}else {if(_0xb59f[1319]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1319]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1302]))*_0x6b6cx14,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1303]))*_0x6b6cx15)}else {if(_0xb59f[1320]==_0x6b6cxa){_0x6b6cx3=_0x6b6cx4[_0xb59f[284]](_0xb59f[1492]),0==_0x6b6cx3&&(_0x6b6cx3=100*mxConstants[_0xb59f[1557]]),_0x6b6cx16=Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1302]))*_0x6b6cx14,_0x6b6cx5=Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1303]))*_0x6b6cx15,_0x6b6cx3=Number(_0x6b6cx3)/100,_0x6b6cx3=Math[_0xb59f[243]](_0x6b6cx16*_0x6b6cx3,_0x6b6cx5*_0x6b6cx3),_0x6b6cx2[_0xb59f[1320]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15,_0x6b6cx16,_0x6b6cx5,_0x6b6cx3,_0x6b6cx3)}else {if(_0xb59f[680]==_0x6b6cxa){_0x6b6cx2[_0xb59f[680]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1302]))*_0x6b6cx14,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1303]))*_0x6b6cx15)}else {if(_0xb59f[618]==_0x6b6cxa){_0x6b6cx3=this[_0xb59f[1543]](_0x6b6cx4,_0xb59f[390],_0x6b6cx3),_0x6b6cx2[_0xb59f[618]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1302]))*_0x6b6cx14,Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1303]))*_0x6b6cx15,_0x6b6cx3,!1,_0xb59f[500]==_0x6b6cx4[_0xb59f[284]](_0xb59f[623]),_0xb59f[500]==_0x6b6cx4[_0xb59f[284]](_0xb59f[624]))}else {if(_0xb59f[963]==_0x6b6cxa){_0x6b6cx16=this[_0xb59f[1542]](_0x6b6cx4,_0xb59f[1332],_0x6b6cx3);_0x6b6cx5=_0xb59f[500]==_0x6b6cx4[_0xb59f[284]](_0xb59f[704])?-90:0;if(_0xb59f[468]==_0x6b6cx4[_0xb59f[284]](_0xb59f[1558])){var _0x6b6cx17=_0x6b6cx3[_0xb59f[603]],_0x6b6cx18=1==mxUtils[_0xb59f[433]](_0x6b6cx3[_0xb59f[124]],mxConstants.STYLE_FLIPH,0);_0x6b6cx3=1==mxUtils[_0xb59f[433]](_0x6b6cx3[_0xb59f[124]],mxConstants.STYLE_FLIPV,0);_0x6b6cx5=_0x6b6cx18&&_0x6b6cx3?_0x6b6cx5-_0x6b6cx17:_0x6b6cx18||_0x6b6cx3?_0x6b6cx5+_0x6b6cx17:_0x6b6cx5-_0x6b6cx17};_0x6b6cx5-=_0x6b6cx4[_0xb59f[284]](_0xb59f[603]);_0x6b6cx2[_0xb59f[963]](_0x6b6cx12+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15,0,0,_0x6b6cx16,_0x6b6cx4[_0xb59f[284]](_0xb59f[611])||_0xb59f[361],_0x6b6cx4[_0xb59f[284]](_0xb59f[552])||_0xb59f[125],!1,_0xb59f[110],!1,!1,_0x6b6cx5)}else {if(_0xb59f[1559]==_0x6b6cxa){_0x6b6cx17=mxStencilRegistry[_0xb59f[1560]](_0x6b6cx4[_0xb59f[284]](_0xb59f[298])),null!=_0x6b6cx17&&(_0x6b6cx12+=Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[235]))*_0x6b6cx14,_0x6b6cx13+=Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[236]))*_0x6b6cx15,_0x6b6cx16=Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1302]))*_0x6b6cx14,_0x6b6cx5=Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1303]))*_0x6b6cx15,_0x6b6cx17[_0xb59f[1546]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx12,_0x6b6cx13,_0x6b6cx16,_0x6b6cx5))}else {if(_0xb59f[1338]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1337]]()}else {if(_0xb59f[1334]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1334]]()}else {if(_0xb59f[1336]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1336]]()}else {if(_0xb59f[1307]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1250]](Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[117]))*_0x6b6cx16)}else {if(_0xb59f[648]==_0x6b6cxa){_0x6b6cx2[_0xb59f[1251]](_0xb59f[500]==_0x6b6cx4[_0xb59f[284]](_0xb59f[648]))}else {if(_0xb59f[1308]==_0x6b6cxa){if(_0x6b6cx4=_0x6b6cx4[_0xb59f[284]](_0xb59f[1309]),null!=_0x6b6cx4){_0x6b6cx4=_0x6b6cx4[_0xb59f[224]](_0xb59f[185]);_0x6b6cx14=[];for(_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx4[_0xb59f[67]];_0x6b6cx15++){0<_0x6b6cx4[_0x6b6cx15][_0xb59f[67]]&&_0x6b6cx14[_0xb59f[207]](Number(_0x6b6cx4[_0x6b6cx15])*_0x6b6cx16)};_0x6b6cx4=_0x6b6cx14[_0xb59f[234]](_0xb59f[185]);_0x6b6cx2[_0xb59f[1252]](_0x6b6cx4)}}else {_0xb59f[1306]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1249]](_0x6b6cx4[_0xb59f[284]](_0xb59f[352])):_0xb59f[1310]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1253]](_0x6b6cx4[_0xb59f[284]](_0xb59f[1311])):_0xb59f[1312]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1255]](_0x6b6cx4[_0xb59f[284]](_0xb59f[234])):_0xb59f[1313]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1257]](Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[1314]))):_0xb59f[1298]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1245]](_0x6b6cx4[_0xb59f[284]](_0xb59f[352])):_0xb59f[1244]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1243]](_0x6b6cx4[_0xb59f[284]](_0xb59f[1244])):_0xb59f[1315]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1259]](_0x6b6cx4[_0xb59f[284]](_0xb59f[352])):_0xb59f[1318]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1266]](_0x6b6cx4[_0xb59f[284]](_0xb59f[124])):_0xb59f[1287]==_0x6b6cxa?_0x6b6cx2[_0xb59f[1265]](_0x6b6cx4[_0xb59f[284]](_0xb59f[1288])):_0xb59f[1289]==_0x6b6cxa&&_0x6b6cx2[_0xb59f[1264]](Number(_0x6b6cx4[_0xb59f[284]](_0xb59f[803]))*_0x6b6cx16)}}}}}}}}}}}}}}}}}}}}};_0x6b6cx9&&(_0xb59f[1338]==_0x6b6cxa||_0xb59f[1334]==_0x6b6cxa||_0xb59f[1336]==_0x6b6cxa)&&_0x6b6cx2[_0xb59f[1267]](!1)};function mxShape(_0x6b6cx2){this[_0xb59f[1561]]=_0x6b6cx2;this[_0xb59f[1307]]=1;this[_0xb59f[603]]=0;this[_0xb59f[461]]=100;this[_0xb59f[624]]=this[_0xb59f[623]]= !1}mxShape[_0xb59f[202]][_0xb59f[507]]=null;mxShape[_0xb59f[202]][_0xb59f[255]]=1;mxShape[_0xb59f[202]][_0xb59f[1562]]=null;mxShape[_0xb59f[202]][_0xb59f[1525]]=null;mxShape[_0xb59f[202]][_0xb59f[252]]=null;mxShape[_0xb59f[202]][_0xb59f[124]]=null;mxShape[_0xb59f[202]][_0xb59f[124]]=null;mxShape[_0xb59f[202]][_0xb59f[1563]]=null;mxShape[_0xb59f[202]][_0xb59f[1561]]=null;mxShape[_0xb59f[202]][_0xb59f[1564]]=6;mxShape[_0xb59f[202]][_0xb59f[1229]]= !0;mxShape[_0xb59f[202]][_0xb59f[1565]]= !1;mxShape[_0xb59f[202]][_0xb59f[1460]]=1;mxShape[_0xb59f[202]][_0xb59f[176]]=function(_0x6b6cx2){null==this[_0xb59f[252]]&&(this[_0xb59f[252]]=this[_0xb59f[385]](_0x6b6cx2),null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[62]](this[_0xb59f[252]]))};mxShape[_0xb59f[202]][_0xb59f[1566]]=function(){return !0};mxShape[_0xb59f[202]][_0xb59f[1567]]=function(){return !1};mxShape[_0xb59f[202]][_0xb59f[1568]]=function(){return 1==mxUtils[_0xb59f[1454]](Math[_0xb59f[160]](1,Math[_0xb59f[488]](this[_0xb59f[1307]]*this[_0xb59f[255]])),2)?0.5:0};mxShape[_0xb59f[202]][_0xb59f[385]]=function(_0x6b6cx2){var _0x6b6cx3=null;return _0x6b6cx3=null!=_0x6b6cx2[_0xb59f[538]]?this[_0xb59f[1569]](_0x6b6cx2):8==document[_0xb59f[5]]||this[_0xb59f[507]]==mxConstants[_0xb59f[508]]||this[_0xb59f[507]]!=mxConstants[_0xb59f[1523]]&&this[_0xb59f[1567]]()?this[_0xb59f[1570]](_0x6b6cx2):this[_0xb59f[1571]](_0x6b6cx2)};mxShape[_0xb59f[202]][_0xb59f[1569]]=function(){return document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[449])};mxShape[_0xb59f[202]][_0xb59f[1571]]=function(){var _0x6b6cx2=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1499]);_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];return _0x6b6cx2};mxShape[_0xb59f[202]][_0xb59f[1570]]=function(){var _0x6b6cx2=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];return _0x6b6cx2};mxShape[_0xb59f[202]][_0xb59f[1572]]=function(){this[_0xb59f[258]]()};mxShape[_0xb59f[202]][_0xb59f[258]]=function(){this[_0xb59f[1573]]();this[_0xb59f[1574]]()?(this[_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[110],_0xb59f[529]==this[_0xb59f[252]][_0xb59f[301]]&&this[_0xb59f[1567]]()?this[_0xb59f[1575]]():this[_0xb59f[1576]](),this[_0xb59f[1577]]()):(this[_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],this[_0xb59f[1563]]=null)};mxShape[_0xb59f[202]][_0xb59f[1573]]=function(){var _0x6b6cx2=this[_0xb59f[1525]];if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]&&null!=_0x6b6cx2[0]){this[_0xb59f[1562]]= new mxRectangle(Number(_0x6b6cx2[0][_0xb59f[235]]),Number(_0x6b6cx2[0][_0xb59f[236]]),1,1);for(var _0x6b6cx3=1;_0x6b6cx3<this[_0xb59f[1525]][_0xb59f[67]];_0x6b6cx3++){null!=_0x6b6cx2[_0x6b6cx3]&&this[_0xb59f[1562]][_0xb59f[99]]( new mxRectangle(Number(_0x6b6cx2[_0x6b6cx3][_0xb59f[235]]),Number(_0x6b6cx2[_0x6b6cx3][_0xb59f[236]]),1,1))}}};mxShape[_0xb59f[202]][_0xb59f[1574]]=function(){return null!=this[_0xb59f[1562]]&&!isNaN(this[_0xb59f[1562]][_0xb59f[235]])&&!isNaN(this[_0xb59f[1562]][_0xb59f[236]])&&!isNaN(this[_0xb59f[1562]][_0xb59f[117]])&&!isNaN(this[_0xb59f[1562]][_0xb59f[119]])&&0<this[_0xb59f[1562]][_0xb59f[117]]&&0<this[_0xb59f[1562]][_0xb59f[119]]};mxShape[_0xb59f[202]][_0xb59f[1578]]=function(){var _0x6b6cx2=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1499]);_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx2[_0xb59f[124]][_0xb59f[117]]=this[_0xb59f[252]][_0xb59f[124]][_0xb59f[117]];_0x6b6cx2[_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[252]][_0xb59f[124]][_0xb59f[119]];return _0x6b6cx2};mxShape[_0xb59f[202]][_0xb59f[1576]]=function(){var _0x6b6cx2=this[_0xb59f[1579]]();for(_0x6b6cx2[_0xb59f[1229]]=this[_0xb59f[1229]];this[_0xb59f[252]][_0xb59f[1580]]();){this[_0xb59f[252]][_0xb59f[266]](this[_0xb59f[252]][_0xb59f[1581]])};this[_0xb59f[1209]](_0x6b6cx2);this[_0xb59f[252]]!=_0x6b6cx2[_0xb59f[813]]&&this[_0xb59f[252]][_0xb59f[1583]](_0xb59f[1582],_0x6b6cx2[_0xb59f[813]][_0xb59f[342]]);_0xb59f[529]==this[_0xb59f[252]][_0xb59f[301]]&&8==document[_0xb59f[5]]&&(this[_0xb59f[252]][_0xb59f[124]][_0xb59f[347]]=_0xb59f[110],(null==this[_0xb59f[1561]]||!this[_0xb59f[1565]])&&mxUtils[_0xb59f[1584]](this[_0xb59f[252]]));this[_0xb59f[1585]](_0x6b6cx2)};mxShape[_0xb59f[202]][_0xb59f[1579]]=function(){var _0x6b6cx2=null,_0x6b6cx3=null;if(null!=this[_0xb59f[252]][_0xb59f[538]]){_0x6b6cx2= new mxSvgCanvas2D(this[_0xb59f[252]],!1),_0x6b6cx2[_0xb59f[1345]]=this[_0xb59f[1564]],_0x6b6cx2[_0xb59f[1347]]=mxClient[_0xb59f[133]]&&!mxClient[_0xb59f[75]]&&!mxClient[_0xb59f[76]],_0x6b6cx3=this[_0xb59f[1568]](),0!=_0x6b6cx3?this[_0xb59f[252]][_0xb59f[57]](_0xb59f[535],_0xb59f[536]+_0x6b6cx3+_0xb59f[537]+_0x6b6cx3+_0xb59f[460]):this[_0xb59f[252]][_0xb59f[1390]](_0xb59f[535])}else {this[_0xb59f[1586]]();var _0x6b6cx4=Math[_0xb59f[160]](1,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[117]])),_0x6b6cx5=Math[_0xb59f[160]](1,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[119]])),_0x6b6cx3=8==document[_0xb59f[5]]&&this[_0xb59f[1566]]()?this[_0xb59f[1578]]():this[_0xb59f[252]],_0x6b6cx2= new mxVmlCanvas2D(_0x6b6cx3,!1);_0xb59f[110]!=_0x6b6cx3[_0xb59f[337]]&&(_0x6b6cx3[_0xb59f[1462]]=_0x6b6cx4*this[_0xb59f[1460]]+_0xb59f[537]+_0x6b6cx5*this[_0xb59f[1460]],_0x6b6cx2[_0xb59f[255]](this[_0xb59f[1460]]),_0x6b6cx2[_0xb59f[1460]]=this[_0xb59f[1460]]);_0x6b6cx3=this[_0xb59f[255]];_0x6b6cx2[_0xb59f[513]](-Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]]/_0x6b6cx3),-Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]]/_0x6b6cx3))};return _0x6b6cx2};mxShape[_0xb59f[202]][_0xb59f[1586]]=function(){this[_0xb59f[252]][_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]])+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]])+_0xb59f[168];var _0x6b6cx2=Math[_0xb59f[160]](1,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[117]])),_0x6b6cx3=Math[_0xb59f[160]](1,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[119]]));this[_0xb59f[252]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[277]]=_0xb59f[189]};mxShape[_0xb59f[202]][_0xb59f[1585]]=function(_0x6b6cx2){if(_0x6b6cx2 instanceof mxSvgCanvas2D){for(var _0x6b6cx3 in _0x6b6cx2[_0xb59f[1339]]){var _0x6b6cx4=_0x6b6cx2[_0xb59f[1339]][_0x6b6cx3];_0x6b6cx4[_0xb59f[1587]]=(_0x6b6cx4[_0xb59f[1587]]||0)+1};this[_0xb59f[1589]](this[_0xb59f[1588]]);this[_0xb59f[1588]]=_0x6b6cx2[_0xb59f[1339]]}};mxShape[_0xb59f[202]][_0xb59f[1209]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[255]],_0x6b6cx4=this[_0xb59f[1562]][_0xb59f[235]]/_0x6b6cx3,_0x6b6cx5=this[_0xb59f[1562]][_0xb59f[236]]/_0x6b6cx3,_0x6b6cx9=this[_0xb59f[1562]][_0xb59f[117]]/_0x6b6cx3,_0x6b6cxa=this[_0xb59f[1562]][_0xb59f[119]]/_0x6b6cx3;if(this[_0xb59f[1590]]()){var _0x6b6cx12=(_0x6b6cx9-_0x6b6cxa)/2,_0x6b6cx4=_0x6b6cx4+_0x6b6cx12,_0x6b6cx5=_0x6b6cx5-_0x6b6cx12,_0x6b6cx12=_0x6b6cx9,_0x6b6cx9=_0x6b6cxa,_0x6b6cxa=_0x6b6cx12};this[_0xb59f[1591]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa);this[_0xb59f[1592]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa);if(null!=this[_0xb59f[1561]]){this[_0xb59f[1593]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa)}else {if(_0x6b6cx2[_0xb59f[1250]](this[_0xb59f[1307]]),null!=this[_0xb59f[1525]]){_0x6b6cx4=[];for(_0x6b6cx5=0;_0x6b6cx5<this[_0xb59f[1525]][_0xb59f[67]];_0x6b6cx5++){_0x6b6cx4[_0xb59f[207]]( new mxPoint(this[_0xb59f[1525]][_0x6b6cx5][_0xb59f[235]]/_0x6b6cx3,this[_0xb59f[1525]][_0x6b6cx5][_0xb59f[236]]/_0x6b6cx3))};this[_0xb59f[1594]](_0x6b6cx2,_0x6b6cx4)}else {this[_0xb59f[1595]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa)}}};mxShape[_0xb59f[202]][_0xb59f[1592]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=null;null!=this[_0xb59f[124]]&&(_0x6b6cxa=this[_0xb59f[124]][_0xb59f[649]]);_0x6b6cx2[_0xb59f[1243]](this[_0xb59f[461]]/100);null!=this[_0xb59f[1596]]&&_0x6b6cx2[_0xb59f[1267]](this[_0xb59f[1596]]);null!=this[_0xb59f[1522]]&&_0x6b6cx2[_0xb59f[1251]](this[_0xb59f[1522]]);null!=_0x6b6cxa&&_0x6b6cx2[_0xb59f[1252]](_0x6b6cxa);null!=this[_0xb59f[1299]]?(_0x6b6cx3=this[_0xb59f[1597]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),_0x6b6cx2[_0xb59f[1246]](this[_0xb59f[1334]],this[_0xb59f[1299]],_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]],_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]],this[_0xb59f[607]])):_0x6b6cx2[_0xb59f[1245]](this[_0xb59f[1334]]);_0x6b6cx2[_0xb59f[1249]](this[_0xb59f[1336]])};mxShape[_0xb59f[202]][_0xb59f[1597]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return  new mxRectangle(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)};mxShape[_0xb59f[202]][_0xb59f[1591]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[255]](this[_0xb59f[255]]);_0x6b6cx2[_0xb59f[1294]](this[_0xb59f[1598]](),this[_0xb59f[623]],this[_0xb59f[624]],_0x6b6cx3+_0x6b6cx5/2,_0x6b6cx4+_0x6b6cx9/2)};mxShape[_0xb59f[202]][_0xb59f[1593]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){this[_0xb59f[1565]]&&(this[_0xb59f[507]]==mxConstants[_0xb59f[508]]?this[_0xb59f[1599]](this[_0xb59f[252]],_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9):8!=document[_0xb59f[5]]&&this[_0xb59f[1600]](this[_0xb59f[252]]));this[_0xb59f[1561]][_0xb59f[1546]](_0x6b6cx2,this,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)};mxShape[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){this[_0xb59f[1601]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[1267]](!1);this[_0xb59f[1602]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)};mxShape[_0xb59f[202]][_0xb59f[1601]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){};mxShape[_0xb59f[202]][_0xb59f[1602]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){};mxShape[_0xb59f[202]][_0xb59f[1594]]=function(_0x6b6cx2,_0x6b6cx3){};mxShape[_0xb59f[202]][_0xb59f[1603]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ARCSIZE,100*mxConstants[_0xb59f[1557]])/100;return Math[_0xb59f[243]](_0x6b6cx2*_0x6b6cx4,_0x6b6cx3*_0x6b6cx4)};mxShape[_0xb59f[202]][_0xb59f[1604]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){var _0x6b6cx12=Math[_0xb59f[430]](this[_0xb59f[1307]]/2);_0x6b6cx2[_0xb59f[1246]](_0xb59f[1605],_0xb59f[1605],_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,0.6*_0x6b6cx9,_0xb59f[701],0.9,0.1);_0x6b6cx2[_0xb59f[1275]]();_0x6b6cxa+=2*_0x6b6cx12;this[_0xb59f[1606]]?(_0x6b6cx2[_0xb59f[1276]](_0x6b6cx3-_0x6b6cx12+_0x6b6cxa,_0x6b6cx4-_0x6b6cx12),_0x6b6cx2[_0xb59f[1278]](_0x6b6cx3-_0x6b6cx12,_0x6b6cx4-_0x6b6cx12,_0x6b6cx3-_0x6b6cx12,_0x6b6cx4-_0x6b6cx12+_0x6b6cxa),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3-_0x6b6cx12,_0x6b6cx4+0.4*_0x6b6cx9),_0x6b6cx2[_0xb59f[1278]](_0x6b6cx3+0.5*_0x6b6cx5,_0x6b6cx4+0.7*_0x6b6cx9,_0x6b6cx3+_0x6b6cx5+_0x6b6cx12,_0x6b6cx4+0.4*_0x6b6cx9),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3+_0x6b6cx5+_0x6b6cx12,_0x6b6cx4-_0x6b6cx12+_0x6b6cxa),_0x6b6cx2[_0xb59f[1278]](_0x6b6cx3+_0x6b6cx5+_0x6b6cx12,_0x6b6cx4-_0x6b6cx12,_0x6b6cx3+_0x6b6cx5+_0x6b6cx12-_0x6b6cxa,_0x6b6cx4-_0x6b6cx12)):(_0x6b6cx2[_0xb59f[1276]](_0x6b6cx3-_0x6b6cx12,_0x6b6cx4-_0x6b6cx12),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3-_0x6b6cx12,_0x6b6cx4+0.4*_0x6b6cx9),_0x6b6cx2[_0xb59f[1278]](_0x6b6cx3+0.5*_0x6b6cx5,_0x6b6cx4+0.7*_0x6b6cx9,_0x6b6cx3+_0x6b6cx5+_0x6b6cx12,_0x6b6cx4+0.4*_0x6b6cx9),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3+_0x6b6cx5+_0x6b6cx12,_0x6b6cx4-_0x6b6cx12));_0x6b6cx2[_0xb59f[268]]();_0x6b6cx2[_0xb59f[1334]]()};mxShape[_0xb59f[202]][_0xb59f[183]]=function(_0x6b6cx2){this[_0xb59f[724]]=_0x6b6cx2;this[_0xb59f[124]]=_0x6b6cx2[_0xb59f[124]];if(null!=this[_0xb59f[124]]){this[_0xb59f[1334]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_FILLCOLOR,this[_0xb59f[1334]]);this[_0xb59f[1299]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_GRADIENTCOLOR,this[_0xb59f[1299]]);this[_0xb59f[607]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_GRADIENT_DIRECTION,this[_0xb59f[607]]);this[_0xb59f[461]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_OPACITY,this[_0xb59f[461]]);this[_0xb59f[1336]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_STROKECOLOR,this[_0xb59f[1336]]);this[_0xb59f[1307]]=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_STROKEWIDTH,this[_0xb59f[1307]]);this[_0xb59f[657]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_SPACING,this[_0xb59f[657]]);this[_0xb59f[644]]=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_STARTSIZE,this[_0xb59f[644]]);this[_0xb59f[643]]=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_ENDSIZE,this[_0xb59f[643]]);this[_0xb59f[642]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_STARTARROW,this[_0xb59f[642]]);this[_0xb59f[641]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ENDARROW,this[_0xb59f[641]]);this[_0xb59f[603]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ROTATION,this[_0xb59f[603]]);this[_0xb59f[663]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_DIRECTION,this[_0xb59f[663]]);this[_0xb59f[623]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_FLIPH,0);this[_0xb59f[624]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_FLIPV,0);null!=this[_0xb59f[1561]]&&(this[_0xb59f[623]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],_0xb59f[1607],0)||this[_0xb59f[623]],this[_0xb59f[624]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],_0xb59f[1608],0)||this[_0xb59f[624]]);if(_0xb59f[700]==this[_0xb59f[663]]||_0xb59f[701]==this[_0xb59f[663]]){_0x6b6cx2=this[_0xb59f[623]],this[_0xb59f[623]]=this[_0xb59f[624]],this[_0xb59f[624]]=_0x6b6cx2};this[_0xb59f[1596]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_SHADOW,this[_0xb59f[1596]]);this[_0xb59f[1522]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_DASHED,this[_0xb59f[1522]]);this[_0xb59f[1606]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ROUNDED,this[_0xb59f[1606]]);this[_0xb59f[617]]=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_GLASS,this[_0xb59f[617]]);_0xb59f[130]==this[_0xb59f[1334]]&&(this[_0xb59f[1334]]=null);_0xb59f[130]==this[_0xb59f[1299]]&&(this[_0xb59f[1299]]=null);_0xb59f[130]==this[_0xb59f[1336]]&&(this[_0xb59f[1336]]=null)}};mxShape[_0xb59f[202]][_0xb59f[1609]]=function(_0x6b6cx2){null==_0x6b6cx2&&(_0x6b6cx2=_0xb59f[110]);this[_0xb59f[270]]=_0x6b6cx2;null!=this[_0xb59f[252]]&&(this[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=_0x6b6cx2)};mxShape[_0xb59f[202]][_0xb59f[1610]]=function(){return this[_0xb59f[270]]};mxShape[_0xb59f[202]][_0xb59f[1577]]=function(){if(null!=this[_0xb59f[1562]]){var _0x6b6cx2=this[_0xb59f[1611]]();if(null!=_0x6b6cx2){this[_0xb59f[1612]](_0x6b6cx2);var _0x6b6cx3=this[_0xb59f[1598]]();0!=_0x6b6cx3&&(_0x6b6cx2=mxUtils[_0xb59f[1613]](_0x6b6cx2,_0x6b6cx3));_0x6b6cx2[_0xb59f[235]]=Math[_0xb59f[519]](_0x6b6cx2[_0xb59f[235]]);_0x6b6cx2[_0xb59f[236]]=Math[_0xb59f[519]](_0x6b6cx2[_0xb59f[236]]);_0x6b6cx2[_0xb59f[117]]=Math[_0xb59f[430]](_0x6b6cx2[_0xb59f[117]]);_0x6b6cx2[_0xb59f[119]]=Math[_0xb59f[430]](_0x6b6cx2[_0xb59f[119]])};this[_0xb59f[1563]]=_0x6b6cx2}};mxShape[_0xb59f[202]][_0xb59f[1611]]=function(){var _0x6b6cx2=this[_0xb59f[1562]][_0xb59f[238]]();if(this[_0xb59f[1590]]()){var _0x6b6cx3=(_0x6b6cx2[_0xb59f[117]]-_0x6b6cx2[_0xb59f[119]])/2;_0x6b6cx2[_0xb59f[235]]+=_0x6b6cx3;_0x6b6cx2[_0xb59f[236]]-=_0x6b6cx3;_0x6b6cx3=_0x6b6cx2[_0xb59f[117]];_0x6b6cx2[_0xb59f[117]]=_0x6b6cx2[_0xb59f[119]];_0x6b6cx2[_0xb59f[119]]=_0x6b6cx3};return _0x6b6cx2};mxShape[_0xb59f[202]][_0xb59f[1612]]=function(_0x6b6cx2){this[_0xb59f[1596]]&&(_0x6b6cx2[_0xb59f[117]]+=Math[_0xb59f[430]](mxConstants[_0xb59f[1237]]*this[_0xb59f[255]]),_0x6b6cx2[_0xb59f[119]]+=Math[_0xb59f[430]](mxConstants[_0xb59f[1238]]*this[_0xb59f[255]]));var _0x6b6cx3=Math[_0xb59f[430]](this[_0xb59f[1307]]*this[_0xb59f[255]]);_0x6b6cx2[_0xb59f[244]](Math[_0xb59f[430]](_0x6b6cx3/2))};mxShape[_0xb59f[202]][_0xb59f[1590]]=function(){return null==this[_0xb59f[1561]]&&(_0xb59f[700]==this[_0xb59f[663]]||_0xb59f[701]==this[_0xb59f[663]])};mxShape[_0xb59f[202]][_0xb59f[1614]]=function(){return null!=this[_0xb59f[603]]?this[_0xb59f[603]]:0};mxShape[_0xb59f[202]][_0xb59f[1615]]=function(){var _0x6b6cx2=this[_0xb59f[1614]]();1!=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_HORIZONTAL,1)&&(_0x6b6cx2+=mxText[_0xb59f[202]][_0xb59f[1616]]);return _0x6b6cx2};mxShape[_0xb59f[202]][_0xb59f[1598]]=function(){var _0x6b6cx2=this[_0xb59f[1614]]();null!=this[_0xb59f[663]]&&(_0xb59f[700]==this[_0xb59f[663]]?_0x6b6cx2+=270:_0xb59f[703]==this[_0xb59f[663]]?_0x6b6cx2+=180:_0xb59f[701]==this[_0xb59f[663]]&&(_0x6b6cx2+=90));return _0x6b6cx2};mxShape[_0xb59f[202]][_0xb59f[1599]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[1319]);_0x6b6cx2[_0xb59f[57]](_0xb59f[235],_0x6b6cx3);_0x6b6cx2[_0xb59f[57]](_0xb59f[236],_0x6b6cx4);_0x6b6cx2[_0xb59f[57]](_0xb59f[117],_0x6b6cx5);_0x6b6cx2[_0xb59f[57]](_0xb59f[119],_0x6b6cx9);_0x6b6cx2[_0xb59f[57]](_0xb59f[1334],_0xb59f[130]);_0x6b6cx2[_0xb59f[57]](_0xb59f[1336],_0xb59f[130]);_0x6b6cx2[_0xb59f[57]](_0xb59f[1377],_0xb59f[1378]);this[_0xb59f[252]][_0xb59f[62]](_0x6b6cx2)};mxShape[_0xb59f[202]][_0xb59f[1600]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[124]][_0xb59f[1617]]=_0xb59f[1618]+mxClient[_0xb59f[88]]+_0xb59f[1619]};mxShape[_0xb59f[202]][_0xb59f[1589]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){for(var _0x6b6cx3 in _0x6b6cx2){var _0x6b6cx4=_0x6b6cx2[_0x6b6cx3];_0x6b6cx4[_0xb59f[1587]]=(_0x6b6cx4[_0xb59f[1587]]||0)-1;0==_0x6b6cx4[_0xb59f[1587]]&&null!=_0x6b6cx4[_0xb59f[265]]&&_0x6b6cx4[_0xb59f[265]][_0xb59f[266]](_0x6b6cx4)}}};mxShape[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[252]]&&(mxEvent[_0xb59f[762]](this[_0xb59f[252]]),null!=this[_0xb59f[252]][_0xb59f[265]]&&this[_0xb59f[252]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[252]]),this[_0xb59f[252]]=null);this[_0xb59f[1589]](this[_0xb59f[1588]]);this[_0xb59f[1588]]=null};var mxStencilRegistry={stencils:[],addStencil:function(_0x6b6cx2,_0x6b6cx3){mxStencilRegistry[_0xb59f[1620]][_0x6b6cx2]=_0x6b6cx3},getStencil:function(_0x6b6cx2){return mxStencilRegistry[_0xb59f[1620]][_0x6b6cx2]}},mxMarker={markers:[],addMarker:function(_0x6b6cx2,_0x6b6cx3){mxMarker[_0xb59f[1621]][_0x6b6cx2]=_0x6b6cx3},createMarker:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15){var _0x6b6cx16=mxMarker[_0xb59f[1621]][_0x6b6cx4];return null!=_0x6b6cx16?_0x6b6cx16(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15):null}};(function(){function _0x6b6cx2(_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){_0x6b6cx3=1.118*_0x6b6cx12*_0x6b6cx16;_0x6b6cx15=1.118*_0x6b6cx13*_0x6b6cx16;_0x6b6cx12*=_0x6b6cx14+_0x6b6cx16;_0x6b6cx13*=_0x6b6cx14+_0x6b6cx16;var _0x6b6cx18=_0x6b6cxa[_0xb59f[238]]();_0x6b6cx18[_0xb59f[235]]-=_0x6b6cx3;_0x6b6cx18[_0xb59f[236]]-=_0x6b6cx15;_0x6b6cx14=_0x6b6cx9!=mxConstants[_0xb59f[1622]]?1:0.75;_0x6b6cxa[_0xb59f[235]]+=-_0x6b6cx12*_0x6b6cx14-_0x6b6cx3;_0x6b6cxa[_0xb59f[236]]+=-_0x6b6cx13*_0x6b6cx14-_0x6b6cx15;return function(){_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx18[_0xb59f[235]],_0x6b6cx18[_0xb59f[236]]);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]]-_0x6b6cx12-_0x6b6cx13/2,_0x6b6cx18[_0xb59f[236]]-_0x6b6cx13+_0x6b6cx12/2);_0x6b6cx9==mxConstants[_0xb59f[1622]]&&_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]]-3*_0x6b6cx12/4,_0x6b6cx18[_0xb59f[236]]-3*_0x6b6cx13/4);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]]+_0x6b6cx13/2-_0x6b6cx12,_0x6b6cx18[_0xb59f[236]]-_0x6b6cx13-_0x6b6cx12/2);_0x6b6cx2[_0xb59f[268]]();_0x6b6cx17?_0x6b6cx2[_0xb59f[1337]]():_0x6b6cx2[_0xb59f[1336]]()}}function _0x6b6cx3(_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){_0x6b6cx15=_0x6b6cx9==mxConstants[_0xb59f[1623]]?0.7071:0.9862;_0x6b6cx3=_0x6b6cx12*_0x6b6cx16*_0x6b6cx15;_0x6b6cx15*=_0x6b6cx13*_0x6b6cx16;_0x6b6cx12*=_0x6b6cx14+_0x6b6cx16;_0x6b6cx13*=_0x6b6cx14+_0x6b6cx16;var _0x6b6cx18=_0x6b6cxa[_0xb59f[238]]();_0x6b6cx18[_0xb59f[235]]-=_0x6b6cx3;_0x6b6cx18[_0xb59f[236]]-=_0x6b6cx15;_0x6b6cxa[_0xb59f[235]]+=-_0x6b6cx12-_0x6b6cx3;_0x6b6cxa[_0xb59f[236]]+=-_0x6b6cx13-_0x6b6cx15;var _0x6b6cx19=_0x6b6cx9==mxConstants[_0xb59f[1623]]?2:3.4;return function(){_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx18[_0xb59f[235]],_0x6b6cx18[_0xb59f[236]]);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]]-_0x6b6cx12/2-_0x6b6cx13/_0x6b6cx19,_0x6b6cx18[_0xb59f[236]]+_0x6b6cx12/_0x6b6cx19-_0x6b6cx13/2);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]]-_0x6b6cx12,_0x6b6cx18[_0xb59f[236]]-_0x6b6cx13);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]]-_0x6b6cx12/2+_0x6b6cx13/_0x6b6cx19,_0x6b6cx18[_0xb59f[236]]-_0x6b6cx13/2-_0x6b6cx12/_0x6b6cx19);_0x6b6cx2[_0xb59f[268]]();_0x6b6cx17?_0x6b6cx2[_0xb59f[1337]]():_0x6b6cx2[_0xb59f[1336]]()}}mxMarker[_0xb59f[1624]](_0xb59f[693],_0x6b6cx2);mxMarker[_0xb59f[1624]](_0xb59f[694],_0x6b6cx2);mxMarker[_0xb59f[1624]](_0xb59f[392],function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){_0x6b6cx3=1.118*_0x6b6cx12*_0x6b6cx16;_0x6b6cx9=1.118*_0x6b6cx13*_0x6b6cx16;_0x6b6cx12*=_0x6b6cx14+_0x6b6cx16;_0x6b6cx13*=_0x6b6cx14+_0x6b6cx16;var _0x6b6cx18=_0x6b6cxa[_0xb59f[238]]();_0x6b6cx18[_0xb59f[235]]-=_0x6b6cx3;_0x6b6cx18[_0xb59f[236]]-=_0x6b6cx9;_0x6b6cxa[_0xb59f[235]]+=2* -_0x6b6cx3;_0x6b6cxa[_0xb59f[236]]+=2* -_0x6b6cx9;return function(){_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx18[_0xb59f[235]]-_0x6b6cx12-_0x6b6cx13/2,_0x6b6cx18[_0xb59f[236]]-_0x6b6cx13+_0x6b6cx12/2);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]],_0x6b6cx18[_0xb59f[236]]);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx18[_0xb59f[235]]+_0x6b6cx13/2-_0x6b6cx12,_0x6b6cx18[_0xb59f[236]]-_0x6b6cx13-_0x6b6cx12/2);_0x6b6cx2[_0xb59f[1336]]()}});mxMarker[_0xb59f[1624]](_0xb59f[695],function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17){var _0x6b6cx18=_0x6b6cx14/2,_0x6b6cx19=_0x6b6cxa[_0xb59f[238]]();_0x6b6cxa[_0xb59f[235]]-=_0x6b6cx12*_0x6b6cx18;_0x6b6cxa[_0xb59f[236]]-=_0x6b6cx13*_0x6b6cx18;return function(){_0x6b6cx2[_0xb59f[680]](_0x6b6cx19[_0xb59f[235]]-_0x6b6cx18,_0x6b6cx19[_0xb59f[236]]-_0x6b6cx18,_0x6b6cx14,_0x6b6cx14);_0x6b6cx17?_0x6b6cx2[_0xb59f[1337]]():_0x6b6cx2[_0xb59f[1336]]()}});mxMarker[_0xb59f[1624]](_0xb59f[696],_0x6b6cx3);mxMarker[_0xb59f[1624]](_0xb59f[697],_0x6b6cx3)})();function mxActor(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxActor,mxShape);mxActor[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[513]](_0x6b6cx3,_0x6b6cx4);_0x6b6cx2[_0xb59f[1275]]();this[_0xb59f[1625]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[1337]]()};mxActor[_0xb59f[202]][_0xb59f[1625]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx3=_0x6b6cx5/3;_0x6b6cx2[_0xb59f[1276]](0,_0x6b6cx9);_0x6b6cx2[_0xb59f[1279]](0,3*_0x6b6cx9/5,0,2*_0x6b6cx9/5,_0x6b6cx5/2,2*_0x6b6cx9/5);_0x6b6cx2[_0xb59f[1279]](_0x6b6cx5/2-_0x6b6cx3,2*_0x6b6cx9/5,_0x6b6cx5/2-_0x6b6cx3,0,_0x6b6cx5/2,0);_0x6b6cx2[_0xb59f[1279]](_0x6b6cx5/2+_0x6b6cx3,0,_0x6b6cx5/2+_0x6b6cx3,2*_0x6b6cx9/5,_0x6b6cx5/2,2*_0x6b6cx9/5);_0x6b6cx2[_0xb59f[1279]](_0x6b6cx5,2*_0x6b6cx9/5,_0x6b6cx5,3*_0x6b6cx9/5,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[268]]()};function mxCloud(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxActor[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxCloud,mxActor);mxCloud[_0xb59f[202]][_0xb59f[1625]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[1276]](0.25*_0x6b6cx5,0.25*_0x6b6cx9);_0x6b6cx2[_0xb59f[1279]](0.05*_0x6b6cx5,0.25*_0x6b6cx9,0,0.5*_0x6b6cx9,0.16*_0x6b6cx5,0.55*_0x6b6cx9);_0x6b6cx2[_0xb59f[1279]](0,0.66*_0x6b6cx9,0.18*_0x6b6cx5,0.9*_0x6b6cx9,0.31*_0x6b6cx5,0.8*_0x6b6cx9);_0x6b6cx2[_0xb59f[1279]](0.4*_0x6b6cx5,_0x6b6cx9,0.7*_0x6b6cx5,_0x6b6cx9,0.8*_0x6b6cx5,0.8*_0x6b6cx9);_0x6b6cx2[_0xb59f[1279]](_0x6b6cx5,0.8*_0x6b6cx9,_0x6b6cx5,0.6*_0x6b6cx9,0.875*_0x6b6cx5,0.5*_0x6b6cx9);_0x6b6cx2[_0xb59f[1279]](_0x6b6cx5,0.3*_0x6b6cx9,0.8*_0x6b6cx5,0.1*_0x6b6cx9,0.625*_0x6b6cx5,0.2*_0x6b6cx9);_0x6b6cx2[_0xb59f[1279]](0.5*_0x6b6cx5,0.05*_0x6b6cx9,0.3*_0x6b6cx5,0.05*_0x6b6cx9,0.25*_0x6b6cx5,0.25*_0x6b6cx9);_0x6b6cx2[_0xb59f[268]]()};function mxRectangleShape(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxRectangleShape,mxShape);mxRectangleShape[_0xb59f[202]][_0xb59f[1567]]=function(){return !this[_0xb59f[1606]]&&!this[_0xb59f[617]]&&0==this[_0xb59f[603]]};mxRectangleShape[_0xb59f[202]][_0xb59f[1601]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(this[_0xb59f[1606]]){var _0x6b6cxa=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ARCSIZE,100*mxConstants[_0xb59f[1557]])/100,_0x6b6cxa=Math[_0xb59f[243]](_0x6b6cx5*_0x6b6cxa,_0x6b6cx9*_0x6b6cxa);_0x6b6cx2[_0xb59f[1320]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cxa)}else {_0x6b6cx2[_0xb59f[1319]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)};_0x6b6cx2[_0xb59f[1337]]()};mxRectangleShape[_0xb59f[202]][_0xb59f[1602]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){this[_0xb59f[617]]&&this[_0xb59f[1604]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,this[_0xb59f[1603]](_0x6b6cx5+this[_0xb59f[1307]],_0x6b6cx9+this[_0xb59f[1307]]))};mxRectangleShape[_0xb59f[202]][_0xb59f[1575]]=function(){this[_0xb59f[1626]](this[_0xb59f[252]]);this[_0xb59f[1627]](this[_0xb59f[252]]);this[_0xb59f[1628]](this[_0xb59f[252]])};mxRectangleShape[_0xb59f[202]][_0xb59f[1626]]=function(_0x6b6cx2){var _0x6b6cx3=9<=document[_0xb59f[5]]?0:Math[_0xb59f[430]](this[_0xb59f[1307]]*this[_0xb59f[255]]);_0x6b6cx2[_0xb59f[124]][_0xb59f[1629]]=Math[_0xb59f[160]](1,_0x6b6cx3)+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[277]]=_0xb59f[188];_0x6b6cx2[_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]]-_0x6b6cx3/2)+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]]-_0x6b6cx3/2)+_0xb59f[168];_0xb59f[462]==document[_0xb59f[135]]&&(_0x6b6cx3= -_0x6b6cx3);_0x6b6cx2[_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[488]](Math[_0xb59f[160]](0,this[_0xb59f[1562]][_0xb59f[117]]+_0x6b6cx3))+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[119]]=Math[_0xb59f[488]](Math[_0xb59f[160]](0,this[_0xb59f[1562]][_0xb59f[119]]+_0x6b6cx3))+_0xb59f[168]};mxRectangleShape[_0xb59f[202]][_0xb59f[1628]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1336]];null!=_0x6b6cx3&&_0x6b6cx3!=mxConstants[_0xb59f[217]]?(_0x6b6cx2[_0xb59f[124]][_0xb59f[1630]]=_0x6b6cx3,this[_0xb59f[1522]]?_0x6b6cx2[_0xb59f[124]][_0xb59f[465]]=_0xb59f[648]:0<this[_0xb59f[1307]]&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[465]]=_0xb59f[1631]),_0x6b6cx2[_0xb59f[124]][_0xb59f[1629]]=Math[_0xb59f[160]](1,Math[_0xb59f[430]](this[_0xb59f[1307]]*this[_0xb59f[255]]))+_0xb59f[168]):_0x6b6cx2[_0xb59f[124]][_0xb59f[1629]]=_0xb59f[946];_0x6b6cx3=this[_0xb59f[1334]];null!=_0x6b6cx3&&_0x6b6cx3!=mxConstants[_0xb59f[217]]?(_0x6b6cx2[_0xb59f[124]][_0xb59f[1028]]=_0x6b6cx3,_0x6b6cx2[_0xb59f[124]][_0xb59f[1617]]=_0xb59f[130]):this[_0xb59f[1229]]?_0x6b6cx2[_0xb59f[124]][_0xb59f[1028]]=_0xb59f[1373]:8==document[_0xb59f[5]]?mxUtils[_0xb59f[1584]](_0x6b6cx2):this[_0xb59f[1600]](_0x6b6cx2)};mxRectangleShape[_0xb59f[202]][_0xb59f[1627]]=function(_0x6b6cx2){var _0x6b6cx3=_0xb59f[110];100>this[_0xb59f[461]]&&(_0x6b6cx3+=_0xb59f[459]+this[_0xb59f[461]]+_0xb59f[460]);this[_0xb59f[1596]]&&(_0x6b6cx3+=_0xb59f[1632]+Math[_0xb59f[488]](mxConstants[_0xb59f[1237]]*this[_0xb59f[255]])+_0xb59f[1633]+Math[_0xb59f[488]](mxConstants[_0xb59f[1238]]*this[_0xb59f[255]])+_0xb59f[1634]+mxConstants[_0xb59f[1235]]+_0xb59f[1635]);if(this[_0xb59f[1299]]){var _0x6b6cx4=this[_0xb59f[1334]],_0x6b6cx5=this[_0xb59f[1299]],_0x6b6cx9=_0xb59f[468],_0x6b6cxa={east:0,south:1,west:2,north:3},_0x6b6cx12=null!=this[_0xb59f[663]]?_0x6b6cxa[this[_0xb59f[663]]]:0;null!=this[_0xb59f[607]]&&(_0x6b6cx12=mxUtils[_0xb59f[1454]](_0x6b6cx12+_0x6b6cxa[this[_0xb59f[607]]]-1,4));1==_0x6b6cx12?(_0x6b6cx9=_0xb59f[500],_0x6b6cxa=_0x6b6cx4,_0x6b6cx4=_0x6b6cx5,_0x6b6cx5=_0x6b6cxa):2==_0x6b6cx12?(_0x6b6cxa=_0x6b6cx4,_0x6b6cx4=_0x6b6cx5,_0x6b6cx5=_0x6b6cxa):3==_0x6b6cx12&&(_0x6b6cx9=_0xb59f[500]);_0x6b6cx3+=_0xb59f[1636]+_0x6b6cx4+_0xb59f[1637]+_0x6b6cx5+_0xb59f[1638]+_0x6b6cx9+_0xb59f[1635]};_0x6b6cx2[_0xb59f[124]][_0xb59f[347]]=_0x6b6cx3};function mxEllipse(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxEllipse,mxShape);mxEllipse[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[680]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[1337]]()};function mxDoubleEllipse(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxDoubleEllipse,mxShape);mxDoubleEllipse[_0xb59f[202]][_0xb59f[1460]]=10;mxDoubleEllipse[_0xb59f[202]][_0xb59f[1601]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[680]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[1337]]()};mxDoubleEllipse[_0xb59f[202]][_0xb59f[1602]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=Math[_0xb59f[243]](4,Math[_0xb59f[243]](_0x6b6cx5/5,_0x6b6cx9/5));_0x6b6cx5-=2*_0x6b6cxa;_0x6b6cx9-=2*_0x6b6cxa;0<_0x6b6cx5&&0<_0x6b6cx9&&_0x6b6cx2[_0xb59f[680]](_0x6b6cx3+_0x6b6cxa,_0x6b6cx4+_0x6b6cxa,_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[1336]]()};function mxRhombus(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxRhombus,mxShape);mxRhombus[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx5/2,_0x6b6cx12=_0x6b6cx9/2;_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx3+_0x6b6cxa,_0x6b6cx4);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3+_0x6b6cx5,_0x6b6cx4+_0x6b6cx12);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3+_0x6b6cxa,_0x6b6cx4+_0x6b6cx9);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3,_0x6b6cx4+_0x6b6cx12);_0x6b6cx2[_0xb59f[268]]();_0x6b6cx2[_0xb59f[1337]]()};function mxPolyline(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxShape[_0xb59f[239]](this);this[_0xb59f[1525]]=_0x6b6cx2;this[_0xb59f[1336]]=_0x6b6cx3;this[_0xb59f[1307]]=null!=_0x6b6cx4?_0x6b6cx4:1}mxUtils[_0xb59f[1284]](mxPolyline,mxShape);mxPolyline[_0xb59f[202]][_0xb59f[1614]]=function(){return 0};mxPolyline[_0xb59f[202]][_0xb59f[1594]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1639]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[1606]])};mxPolyline[_0xb59f[202]][_0xb59f[1639]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,_0x6b6cx9=_0x6b6cx3[0],_0x6b6cxa=_0x6b6cx3[_0x6b6cx3[_0xb59f[67]]-1];_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]]);for(var _0x6b6cx12=1;_0x6b6cx12<_0x6b6cx3[_0xb59f[67]]-1;_0x6b6cx12++){var _0x6b6cx13=_0x6b6cx3[_0x6b6cx12],_0x6b6cx14=_0x6b6cx9[_0xb59f[235]]-_0x6b6cx13[_0xb59f[235]],_0x6b6cx9=_0x6b6cx9[_0xb59f[236]]-_0x6b6cx13[_0xb59f[236]];if(_0x6b6cx4&&_0x6b6cx12<_0x6b6cx3[_0xb59f[67]]-1&&(0!=_0x6b6cx14||0!=_0x6b6cx9)){var _0x6b6cx15=Math[_0xb59f[428]](_0x6b6cx14*_0x6b6cx14+_0x6b6cx9*_0x6b6cx9),_0x6b6cx14=_0x6b6cx14*Math[_0xb59f[243]](_0x6b6cx5,_0x6b6cx15/2)/_0x6b6cx15,_0x6b6cx9=_0x6b6cx9*Math[_0xb59f[243]](_0x6b6cx5,_0x6b6cx15/2)/_0x6b6cx15;_0x6b6cx2[_0xb59f[1277]](_0x6b6cx13[_0xb59f[235]]+_0x6b6cx14,_0x6b6cx13[_0xb59f[236]]+_0x6b6cx9);_0x6b6cx9=_0x6b6cx3[_0x6b6cx12+1];_0x6b6cx14=_0x6b6cx9[_0xb59f[235]]-_0x6b6cx13[_0xb59f[235]];_0x6b6cx9=_0x6b6cx9[_0xb59f[236]]-_0x6b6cx13[_0xb59f[236]];_0x6b6cx15=Math[_0xb59f[160]](1,Math[_0xb59f[428]](_0x6b6cx14*_0x6b6cx14+_0x6b6cx9*_0x6b6cx9));_0x6b6cx14=_0x6b6cx14*Math[_0xb59f[243]](_0x6b6cx5,_0x6b6cx15/2)/_0x6b6cx15;_0x6b6cx9=_0x6b6cx9*Math[_0xb59f[243]](_0x6b6cx5,_0x6b6cx15/2)/_0x6b6cx15;_0x6b6cx14=_0x6b6cx13[_0xb59f[235]]+_0x6b6cx14;_0x6b6cx9=_0x6b6cx13[_0xb59f[236]]+_0x6b6cx9;_0x6b6cx2[_0xb59f[1278]](_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]],_0x6b6cx14,_0x6b6cx9);_0x6b6cx13= new mxPoint(_0x6b6cx14,_0x6b6cx9)}else {_0x6b6cx2[_0xb59f[1277]](_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]])};_0x6b6cx9=_0x6b6cx13};_0x6b6cx2[_0xb59f[1277]](_0x6b6cxa[_0xb59f[235]],_0x6b6cxa[_0xb59f[236]]);_0x6b6cx2[_0xb59f[1336]]()};function mxArrow(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){mxShape[_0xb59f[239]](this);this[_0xb59f[1525]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1;this[_0xb59f[1640]]=null!=_0x6b6cx9?_0x6b6cx9:mxConstants[_0xb59f[1641]];this[_0xb59f[657]]=null!=_0x6b6cxa?_0x6b6cxa:mxConstants[_0xb59f[1642]];this[_0xb59f[643]]=null!=_0x6b6cx12?_0x6b6cx12:mxConstants[_0xb59f[1643]]}mxUtils[_0xb59f[1284]](mxArrow,mxShape);mxArrow[_0xb59f[202]][_0xb59f[1594]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=mxConstants[_0xb59f[1642]],_0x6b6cx5=mxConstants[_0xb59f[1641]],_0x6b6cx9=mxConstants[_0xb59f[1643]],_0x6b6cxa=_0x6b6cx3[0],_0x6b6cx12=_0x6b6cx3[_0x6b6cx3[_0xb59f[67]]-1],_0x6b6cx13=_0x6b6cx12[_0xb59f[235]]-_0x6b6cxa[_0xb59f[235]],_0x6b6cx14=_0x6b6cx12[_0xb59f[236]]-_0x6b6cxa[_0xb59f[236]],_0x6b6cx15=Math[_0xb59f[428]](_0x6b6cx13*_0x6b6cx13+_0x6b6cx14*_0x6b6cx14),_0x6b6cx16=_0x6b6cx15-2*_0x6b6cx4-_0x6b6cx9,_0x6b6cx13=_0x6b6cx13/_0x6b6cx15,_0x6b6cx14=_0x6b6cx14/_0x6b6cx15,_0x6b6cx15=_0x6b6cx5*_0x6b6cx14/3,_0x6b6cx5=-_0x6b6cx5*_0x6b6cx13/3,_0x6b6cx9=_0x6b6cxa[_0xb59f[235]]-_0x6b6cx15/2+_0x6b6cx4*_0x6b6cx13,_0x6b6cxa=_0x6b6cxa[_0xb59f[236]]-_0x6b6cx5/2+_0x6b6cx4*_0x6b6cx14,_0x6b6cx17=_0x6b6cx9+_0x6b6cx15,_0x6b6cx18=_0x6b6cxa+_0x6b6cx5,_0x6b6cx19=_0x6b6cx17+_0x6b6cx16*_0x6b6cx13,_0x6b6cx16=_0x6b6cx18+_0x6b6cx16*_0x6b6cx14,_0x6b6cx1a=_0x6b6cx19+_0x6b6cx15,_0x6b6cx1b=_0x6b6cx16+_0x6b6cx5,_0x6b6cx1c=_0x6b6cx1a-3*_0x6b6cx15,_0x6b6cx1d=_0x6b6cx1b-3*_0x6b6cx5;_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx9,_0x6b6cxa);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx17,_0x6b6cx18);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx19,_0x6b6cx16);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx1a,_0x6b6cx1b);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx12[_0xb59f[235]]-_0x6b6cx4*_0x6b6cx13,_0x6b6cx12[_0xb59f[236]]-_0x6b6cx4*_0x6b6cx14);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx1c,_0x6b6cx1d);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx1c+_0x6b6cx15,_0x6b6cx1d+_0x6b6cx5);_0x6b6cx2[_0xb59f[268]]();_0x6b6cx2[_0xb59f[1337]]()};function mxText(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,_0x6b6cx16,_0x6b6cx17,_0x6b6cx18,_0x6b6cx19,_0x6b6cx1a,_0x6b6cx1b,_0x6b6cx1c,_0x6b6cx1d,_0x6b6cx1e,_0x6b6cx1f){mxShape[_0xb59f[239]](this);this[_0xb59f[131]]=_0x6b6cx2;this[_0xb59f[1562]]=_0x6b6cx3;this[_0xb59f[352]]=null!=_0x6b6cx9?_0x6b6cx9:_0xb59f[586];this[_0xb59f[611]]=null!=_0x6b6cx4?_0x6b6cx4:_0xb59f[110];this[_0xb59f[552]]=null!=_0x6b6cx5?_0x6b6cx5:_0xb59f[110];this[_0xb59f[1288]]=null!=_0x6b6cxa?_0x6b6cxa:mxConstants[_0xb59f[484]];this[_0xb59f[803]]=null!=_0x6b6cx12?_0x6b6cx12:mxConstants[_0xb59f[483]];this[_0xb59f[666]]=null!=_0x6b6cx13?_0x6b6cx13:mxConstants[_0xb59f[1644]];this[_0xb59f[657]]=parseInt(_0x6b6cx14||2);this[_0xb59f[658]]=this[_0xb59f[657]]+parseInt(_0x6b6cx15||0);this[_0xb59f[661]]=this[_0xb59f[657]]+parseInt(_0x6b6cx16||0);this[_0xb59f[660]]=this[_0xb59f[657]]+parseInt(_0x6b6cx17||0);this[_0xb59f[659]]=this[_0xb59f[657]]+parseInt(_0x6b6cx18||0);this[_0xb59f[662]]=null!=_0x6b6cx19?_0x6b6cx19:!0;this[_0xb59f[1537]]=_0x6b6cx1a;this[_0xb59f[467]]=_0x6b6cx1b;this[_0xb59f[1333]]=null!=_0x6b6cx1c?_0x6b6cx1c:!1;this[_0xb59f[1645]]=null!=_0x6b6cx1d?_0x6b6cx1d:!1;this[_0xb59f[277]]=null!=_0x6b6cx1e?_0x6b6cx1e:_0xb59f[189];this[_0xb59f[629]]=null!=_0x6b6cx1f?_0x6b6cx1f:0;this[_0xb59f[603]]=0}mxUtils[_0xb59f[1284]](mxText,mxShape);mxText[_0xb59f[202]][_0xb59f[1646]]=0;mxText[_0xb59f[202]][_0xb59f[1647]]=0;mxText[_0xb59f[202]][_0xb59f[1648]]=0;mxText[_0xb59f[202]][_0xb59f[1649]]=0;mxText[_0xb59f[202]][_0xb59f[1650]]= !0;mxText[_0xb59f[202]][_0xb59f[1616]]= -90;mxText[_0xb59f[202]][_0xb59f[1651]]= !0;mxText[_0xb59f[202]][_0xb59f[1652]]= !1;mxText[_0xb59f[202]][_0xb59f[1566]]=function(){return !1};mxText[_0xb59f[202]][_0xb59f[1567]]=function(){return 8!=document[_0xb59f[5]]};mxText[_0xb59f[202]][_0xb59f[1568]]=function(){return 0};mxText[_0xb59f[202]][_0xb59f[1574]]=function(){return null!=this[_0xb59f[1562]]&&!isNaN(this[_0xb59f[1562]][_0xb59f[235]])&&!isNaN(this[_0xb59f[1562]][_0xb59f[236]])&&!isNaN(this[_0xb59f[1562]][_0xb59f[117]])&&!isNaN(this[_0xb59f[1562]][_0xb59f[119]])};mxText[_0xb59f[202]][_0xb59f[1577]]=function(){var _0x6b6cx2=this[_0xb59f[252]];8==document[_0xb59f[5]]&&null!=_0x6b6cx2[_0xb59f[285]]&&(_0x6b6cx2=_0x6b6cx2[_0xb59f[285]],null!=_0x6b6cx2[_0xb59f[285]]&&(_0x6b6cx2=_0x6b6cx2[_0xb59f[285]]));this[_0xb59f[1563]]=this[_0xb59f[1562]][_0xb59f[238]]();var _0x6b6cx3=this[_0xb59f[1615]]();if(!this[_0xb59f[1652]]&&null!=_0x6b6cx2&&_0xb59f[1334]!=this[_0xb59f[277]]&&(!this[_0xb59f[1645]]||!this[_0xb59f[1651]])){var _0x6b6cx4=null,_0x6b6cx5=null;if(null!=_0x6b6cx2[_0xb59f[538]]){if(null!=_0x6b6cx2[_0xb59f[285]]&&null!=_0x6b6cx2[_0xb59f[285]][_0xb59f[285]]&&_0xb59f[1435]==_0x6b6cx2[_0xb59f[285]][_0xb59f[285]][_0xb59f[301]]){_0x6b6cx2=_0x6b6cx2[_0xb59f[285]][_0xb59f[285]],_0x6b6cx4=this[_0xb59f[1333]]?this[_0xb59f[1562]][_0xb59f[117]]:parseInt(_0x6b6cx2[_0xb59f[284]](_0xb59f[117]))*this[_0xb59f[255]],_0x6b6cx5=parseInt(_0x6b6cx2[_0xb59f[284]](_0xb59f[119]))*this[_0xb59f[255]]}else {_0x6b6cx3=_0x6b6cx2[_0xb59f[1451]]();if(0==_0x6b6cx3[_0xb59f[117]]&&0==_0x6b6cx3[_0xb59f[119]]){return};this[_0xb59f[1563]]= new mxRectangle(_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]],_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]]);_0x6b6cx3=0}}else {_0x6b6cx5=this[_0xb59f[724]][_0xb59f[441]][_0xb59f[1653]],null!=this[_0xb59f[359]]&&null!=this[_0xb59f[167]]?(_0x6b6cx4=this[_0xb59f[1333]]?this[_0xb59f[1562]][_0xb59f[117]]:this[_0xb59f[359]]*this[_0xb59f[255]],_0x6b6cx5=this[_0xb59f[167]]*this[_0xb59f[255]]):null!=_0x6b6cx5?(this[_0xb59f[1441]](_0x6b6cx5),this[_0xb59f[1654]](_0x6b6cx5),mxUtils[_0xb59f[1331]](this[_0xb59f[131]])?_0x6b6cx5[_0xb59f[339]]=this[_0xb59f[131]][_0xb59f[342]]:(_0x6b6cx4=this[_0xb59f[1650]]?this[_0xb59f[131]][_0xb59f[230]](/\n/g,_0xb59f[1453]):this[_0xb59f[131]],_0x6b6cx5[_0xb59f[339]]=_0x6b6cx4),_0x6b6cx4=this[_0xb59f[1333]]?this[_0xb59f[1562]][_0xb59f[117]]:_0x6b6cx5[_0xb59f[359]]*this[_0xb59f[255]],_0x6b6cx5=_0x6b6cx5[_0xb59f[167]]*this[_0xb59f[255]]):(_0x6b6cx4=this[_0xb59f[1333]]?this[_0xb59f[1562]][_0xb59f[117]]:_0x6b6cx2[_0xb59f[359]]*this[_0xb59f[255]],_0x6b6cx5=_0x6b6cx2[_0xb59f[167]]*this[_0xb59f[255]])};null!=_0x6b6cx4&&null!=_0x6b6cx5&&(this[_0xb59f[1563]]= new mxRectangle(this[_0xb59f[1562]][_0xb59f[235]]+this[_0xb59f[1655]][_0xb59f[235]]*_0x6b6cx4,this[_0xb59f[1562]][_0xb59f[236]]+this[_0xb59f[1655]][_0xb59f[236]]*_0x6b6cx5,_0x6b6cx4,_0x6b6cx5))}else {this[_0xb59f[1563]][_0xb59f[235]]+=this[_0xb59f[1655]][_0xb59f[235]]*this[_0xb59f[1563]][_0xb59f[117]],this[_0xb59f[1563]][_0xb59f[236]]+=this[_0xb59f[1655]][_0xb59f[236]]*this[_0xb59f[1563]][_0xb59f[119]]};null!=this[_0xb59f[1563]]&&(0!=_0x6b6cx3&&(_0x6b6cx3=mxUtils[_0xb59f[1613]](this[_0xb59f[1563]],_0x6b6cx3),this[_0xb59f[1563]][_0xb59f[235]]=_0x6b6cx3[_0xb59f[235]],this[_0xb59f[1563]][_0xb59f[236]]=_0x6b6cx3[_0xb59f[236]],mxClient[_0xb59f[496]]||(this[_0xb59f[1563]][_0xb59f[117]]=_0x6b6cx3[_0xb59f[117]],this[_0xb59f[1563]][_0xb59f[119]]=_0x6b6cx3[_0xb59f[119]])),this[_0xb59f[1563]][_0xb59f[235]]=Math[_0xb59f[519]](this[_0xb59f[1563]][_0xb59f[235]]),this[_0xb59f[1563]][_0xb59f[236]]=Math[_0xb59f[519]](this[_0xb59f[1563]][_0xb59f[236]]),this[_0xb59f[1563]][_0xb59f[117]]=Math[_0xb59f[430]](this[_0xb59f[1563]][_0xb59f[117]]),this[_0xb59f[1563]][_0xb59f[119]]=Math[_0xb59f[430]](this[_0xb59f[1563]][_0xb59f[119]]))};mxText[_0xb59f[202]][_0xb59f[1598]]=function(){return 0};mxText[_0xb59f[202]][_0xb59f[1615]]=function(){return null!=this[_0xb59f[724]]&&null!=this[_0xb59f[724]][_0xb59f[253]]?this[_0xb59f[724]][_0xb59f[253]][_0xb59f[1615]]():0};mxText[_0xb59f[202]][_0xb59f[1590]]=function(){return !this[_0xb59f[662]]&&null!=this[_0xb59f[724]]&&this[_0xb59f[724]][_0xb59f[441]][_0xb59f[1179]][_0xb59f[251]][_0xb59f[1193]](this[_0xb59f[724]][_0xb59f[246]])};mxText[_0xb59f[202]][_0xb59f[1592]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){mxShape[_0xb59f[202]][_0xb59f[1592]][_0xb59f[183]](this,arguments);_0x6b6cx2[_0xb59f[1259]](this[_0xb59f[352]]);_0x6b6cx2[_0xb59f[1260]](this[_0xb59f[1537]]);_0x6b6cx2[_0xb59f[1262]](this[_0xb59f[467]]);_0x6b6cx2[_0xb59f[1265]](this[_0xb59f[1288]]);_0x6b6cx2[_0xb59f[1264]](this[_0xb59f[803]]);_0x6b6cx2[_0xb59f[1266]](this[_0xb59f[666]])};mxText[_0xb59f[202]][_0xb59f[1586]]=function(){this[_0xb59f[252]][_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]])+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]])+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[117]]=_0xb59f[942];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[119]]=_0xb59f[942];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[277]]=_0xb59f[189]};mxText[_0xb59f[202]][_0xb59f[1209]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[255]],_0x6b6cx4=this[_0xb59f[1562]][_0xb59f[235]]/_0x6b6cx3,_0x6b6cx5=this[_0xb59f[1562]][_0xb59f[236]]/_0x6b6cx3,_0x6b6cx9=this[_0xb59f[1562]][_0xb59f[117]]/_0x6b6cx3,_0x6b6cx3=this[_0xb59f[1562]][_0xb59f[119]]/_0x6b6cx3;this[_0xb59f[1591]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cx3);this[_0xb59f[1592]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cx3);var _0x6b6cxa=mxUtils[_0xb59f[1331]](this[_0xb59f[131]])||this[_0xb59f[507]]==mxConstants[_0xb59f[1656]],_0x6b6cx12=_0x6b6cxa||_0x6b6cx2 instanceof mxVmlCanvas2D?_0xb59f[1428]:_0xb59f[110],_0x6b6cx13=this[_0xb59f[131]];!_0x6b6cxa&&_0xb59f[1428]==_0x6b6cx12&&(_0x6b6cx13=mxUtils[_0xb59f[321]](_0x6b6cx13,!1));_0x6b6cx13=!mxUtils[_0xb59f[1331]](this[_0xb59f[131]])&&this[_0xb59f[1650]]&&_0xb59f[1428]==_0x6b6cx12?_0x6b6cx13[_0xb59f[230]](/\n/g,_0xb59f[1453]):_0x6b6cx13;_0x6b6cx2[_0xb59f[963]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cx3,_0x6b6cx13,this[_0xb59f[611]],this[_0xb59f[552]],this[_0xb59f[1333]],_0x6b6cx12,_0xb59f[1334]==this[_0xb59f[277]],this[_0xb59f[1645]],this[_0xb59f[1615]]())};mxText[_0xb59f[202]][_0xb59f[1575]]=function(){var _0x6b6cx2=this[_0xb59f[252]][_0xb59f[124]];_0x6b6cx2[_0xb59f[461]]=1>this[_0xb59f[461]]?this[_0xb59f[461]]:_0xb59f[110];_0x6b6cx2[_0xb59f[277]]=_0xb59f[110];_0x6b6cx2[_0xb59f[117]]=_0xb59f[110];_0x6b6cx2[_0xb59f[119]]=_0xb59f[110];this[_0xb59f[1441]](this[_0xb59f[252]]);this[_0xb59f[1654]](this[_0xb59f[252]]);this[_0xb59f[1657]]();this[_0xb59f[167]]=this[_0xb59f[359]]=null;null!=mxClient[_0xb59f[73]]?this[_0xb59f[1658]]():this[_0xb59f[1659]]()};mxText[_0xb59f[202]][_0xb59f[1658]]=function(){var _0x6b6cx2=this[_0xb59f[1615]](),_0x6b6cx3=this[_0xb59f[252]][_0xb59f[124]],_0x6b6cx4=this[_0xb59f[1655]][_0xb59f[235]],_0x6b6cx5=this[_0xb59f[1655]][_0xb59f[236]];0!=_0x6b6cx2?(_0x6b6cx3[mxClient[_0xb59f[73]]+_0xb59f[1660]]=100*-_0x6b6cx4+_0xb59f[1661]+100*-_0x6b6cx5+_0xb59f[229],_0x6b6cx3[mxClient[_0xb59f[73]]+_0xb59f[1662]]=_0xb59f[536]+100*_0x6b6cx4+_0xb59f[1663]+100*_0x6b6cx5+_0xb59f[1664]+this[_0xb59f[255]]+_0xb59f[1665]+_0x6b6cx2+_0xb59f[1666]):(_0x6b6cx3[mxClient[_0xb59f[73]]+_0xb59f[1660]]=_0xb59f[1667],_0x6b6cx3[mxClient[_0xb59f[73]]+_0xb59f[1662]]=_0xb59f[1402]+this[_0xb59f[255]]+_0xb59f[1393]+100*_0x6b6cx4+_0xb59f[1663]+100*_0x6b6cx5+_0xb59f[1668]);_0x6b6cx3[_0xb59f[361]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]])+_0xb59f[168];_0x6b6cx3[_0xb59f[125]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]])+_0xb59f[168]};mxText[_0xb59f[202]][_0xb59f[1659]]=function(){var _0x6b6cx2=this[_0xb59f[252]][_0xb59f[124]],_0x6b6cx3=this[_0xb59f[1655]][_0xb59f[235]],_0x6b6cx4=this[_0xb59f[1655]][_0xb59f[236]],_0x6b6cx5=this[_0xb59f[255]];_0x6b6cx2[_0xb59f[347]]=_0xb59f[110];var _0x6b6cx9=0,_0x6b6cxa=0,_0x6b6cx12=null!=this[_0xb59f[724]]?this[_0xb59f[724]][_0xb59f[441]][_0xb59f[1653]]:null;if(null!=_0x6b6cx12){_0x6b6cx12[_0xb59f[124]][_0xb59f[277]]=_0xb59f[110];_0x6b6cx12[_0xb59f[124]][_0xb59f[119]]=_0xb59f[110];_0x6b6cx12[_0xb59f[124]][_0xb59f[117]]=_0xb59f[110];this[_0xb59f[1441]](_0x6b6cx12);this[_0xb59f[1654]](_0x6b6cx12);if(mxUtils[_0xb59f[1331]](this[_0xb59f[131]])){_0x6b6cx12[_0xb59f[339]]=this[_0xb59f[131]][_0xb59f[342]]}else {var _0x6b6cx13=this[_0xb59f[131]];this[_0xb59f[507]]!=mxConstants[_0xb59f[1656]]&&(_0x6b6cx13=mxUtils[_0xb59f[321]](_0x6b6cx13,!1));_0x6b6cx13=this[_0xb59f[1650]]?_0x6b6cx13[_0xb59f[230]](/\n/g,_0xb59f[1453]):_0x6b6cx13;_0x6b6cx12[_0xb59f[339]]=_0x6b6cx13};_0x6b6cx9=_0x6b6cx12[_0xb59f[359]]+2;_0x6b6cxa=_0x6b6cx12[_0xb59f[167]]+2}else {_0x6b6cx9=this[_0xb59f[252]][_0xb59f[359]],_0x6b6cxa=this[_0xb59f[252]][_0xb59f[167]]+1};this[_0xb59f[359]]=_0x6b6cx9;this[_0xb59f[167]]=_0x6b6cxa;_0x6b6cx12=this[_0xb59f[1562]][_0xb59f[117]]/_0x6b6cx5;_0x6b6cx13=this[_0xb59f[1562]][_0xb59f[119]]/_0x6b6cx5;mxClient[_0xb59f[496]]&&(this[_0xb59f[1645]]||_0xb59f[1334]==this[_0xb59f[277]])&&0<_0x6b6cx13?(_0x6b6cx13=Math[_0xb59f[243]](_0x6b6cx13,_0x6b6cxa),_0x6b6cx2[_0xb59f[119]]=Math[_0xb59f[488]](_0x6b6cx13+1)+_0xb59f[168]):_0x6b6cx13=_0x6b6cxa;_0xb59f[1334]!=this[_0xb59f[277]]&&(mxClient[_0xb59f[496]]&&(this[_0xb59f[1645]]||this[_0xb59f[1333]])&&0<_0x6b6cx12?(_0x6b6cx12=Math[_0xb59f[243]](_0x6b6cx12,_0x6b6cx9),_0x6b6cx2[_0xb59f[117]]=Math[_0xb59f[488]](_0x6b6cx12)+_0xb59f[168]):_0x6b6cx12=_0x6b6cx9);var _0x6b6cx13=_0x6b6cx13*_0x6b6cx5,_0x6b6cx12=_0x6b6cx12*_0x6b6cx5,_0x6b6cx9=this[_0xb59f[1615]]()*(Math[_0xb59f[424]]/180),_0x6b6cxa=parseFloat(parseFloat(Math[_0xb59f[426]](_0x6b6cx9))[_0xb59f[1293]](8)),_0x6b6cx14=parseFloat(parseFloat(Math[_0xb59f[427]](-_0x6b6cx9))[_0xb59f[1293]](8)),_0x6b6cx9=_0x6b6cx9%(2*Math[_0xb59f[424]]);0>_0x6b6cx9&&(_0x6b6cx9+=2*Math[_0xb59f[424]]);_0x6b6cx9%=Math[_0xb59f[424]];_0x6b6cx9>Math[_0xb59f[424]]/2&&(_0x6b6cx9=Math[_0xb59f[424]]-_0x6b6cx9);var _0x6b6cx15=Math[_0xb59f[426]](_0x6b6cx9),_0x6b6cx16=Math[_0xb59f[427]](-_0x6b6cx9),_0x6b6cx3=_0x6b6cx12* -(_0x6b6cx3+0.5),_0x6b6cx4=_0x6b6cx13* -(_0x6b6cx4+0.5),_0x6b6cx17=(_0x6b6cx13-_0x6b6cx13*_0x6b6cx15+_0x6b6cx12*_0x6b6cx16)/2+_0x6b6cx14*_0x6b6cx3-_0x6b6cxa*_0x6b6cx4;0!=_0x6b6cx9&&(_0x6b6cx2[_0xb59f[347]]=_0xb59f[1505]+_0x6b6cxa+_0xb59f[1506]+_0x6b6cx14+_0xb59f[1507]+-_0x6b6cx14+_0xb59f[1508]+_0x6b6cxa+_0xb59f[1509]);_0x6b6cx2[_0xb59f[499]]=_0x6b6cx5;_0x6b6cx2[_0xb59f[361]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]]+((_0x6b6cx12-_0x6b6cx12*_0x6b6cx15+_0x6b6cx13*_0x6b6cx16)/2-_0x6b6cxa*_0x6b6cx3-_0x6b6cx14*_0x6b6cx4)-_0x6b6cx12/2)+_0xb59f[168];_0x6b6cx2[_0xb59f[125]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]]+_0x6b6cx17-_0x6b6cx13/2)+_0xb59f[168]};mxText[_0xb59f[202]][_0xb59f[1657]]=function(){if(mxUtils[_0xb59f[1331]](this[_0xb59f[131]])){this[_0xb59f[252]][_0xb59f[339]]=_0xb59f[110],this[_0xb59f[252]][_0xb59f[62]](this[_0xb59f[131]])}else {var _0x6b6cx2=this[_0xb59f[131]];this[_0xb59f[507]]!=mxConstants[_0xb59f[1656]]&&(_0x6b6cx2=mxUtils[_0xb59f[321]](_0x6b6cx2,!1));var _0x6b6cx2=this[_0xb59f[1650]]?_0x6b6cx2[_0xb59f[230]](/\n/g,_0xb59f[1453]):_0x6b6cx2,_0x6b6cx3=null!=this[_0xb59f[1537]]&&this[_0xb59f[1537]]!=mxConstants[_0xb59f[217]]?this[_0xb59f[1537]]:null,_0x6b6cx4=null!=this[_0xb59f[467]]&&this[_0xb59f[467]]!=mxConstants[_0xb59f[217]]?this[_0xb59f[467]]:null;if(null!=_0x6b6cx3||null!=_0x6b6cx4){if(_0xb59f[1334]==this[_0xb59f[277]]){null!=_0x6b6cx3&&(this[_0xb59f[252]][_0xb59f[124]][_0xb59f[1028]]=_0x6b6cx3),null!=_0x6b6cx4&&(this[_0xb59f[252]][_0xb59f[124]][_0xb59f[467]]=_0xb59f[1669]+_0x6b6cx4)}else {var _0x6b6cx5=_0xb59f[110];null!=_0x6b6cx3&&(_0x6b6cx5+=_0xb59f[1418]+_0x6b6cx3+_0xb59f[471]);null!=_0x6b6cx4&&(_0x6b6cx5+=_0xb59f[1419]+_0x6b6cx4+_0xb59f[471]);_0x6b6cx2=_0xb59f[1670]+_0x6b6cx5+_0xb59f[1671]+this[_0xb59f[252]][_0xb59f[124]][_0xb59f[489]]+_0xb59f[1423]+_0x6b6cx2+_0xb59f[1424];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[489]]=_0xb59f[110]}};this[_0xb59f[252]][_0xb59f[339]]=_0x6b6cx2}};mxText[_0xb59f[202]][_0xb59f[1441]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2[_0xb59f[124]];_0x6b6cx2[_0xb59f[489]]=Math[_0xb59f[488]](this[_0xb59f[803]]*mxConstants[_0xb59f[490]])+_0xb59f[168];_0x6b6cx2[_0xb59f[487]]=Math[_0xb59f[488]](this[_0xb59f[803]])+_0xb59f[168];_0x6b6cx2[_0xb59f[486]]=this[_0xb59f[1288]];_0x6b6cx2[_0xb59f[123]]=_0xb59f[125];_0x6b6cx2[_0xb59f[352]]=this[_0xb59f[352]];_0x6b6cx2[_0xb59f[1452]]=(this[_0xb59f[666]]&mxConstants[_0xb59f[1410]])==mxConstants[_0xb59f[1410]]?_0xb59f[1447]:_0xb59f[110];_0x6b6cx2[_0xb59f[666]]=(this[_0xb59f[666]]&mxConstants[_0xb59f[1412]])==mxConstants[_0xb59f[1412]]?_0xb59f[1449]:_0xb59f[110];_0x6b6cx2[_0xb59f[1498]]=(this[_0xb59f[666]]&mxConstants[_0xb59f[1414]])==mxConstants[_0xb59f[1414]]?_0xb59f[355]:_0xb59f[110];_0x6b6cx2[_0xb59f[1165]]=this[_0xb59f[611]]==mxConstants[_0xb59f[479]]?_0xb59f[698]:this[_0xb59f[611]]==mxConstants[_0xb59f[480]]?_0xb59f[699]:_0xb59f[361]};mxText[_0xb59f[202]][_0xb59f[1654]]=function(_0x6b6cx2){var _0x6b6cx3=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[117]]/this[_0xb59f[255]]),_0x6b6cx4=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[119]]/this[_0xb59f[255]]);_0x6b6cx2=_0x6b6cx2[_0xb59f[124]];this[_0xb59f[1645]]?(_0x6b6cx2[_0xb59f[277]]=_0xb59f[188],0<_0x6b6cx4&&(_0x6b6cx2[_0xb59f[1503]]=_0x6b6cx4+_0xb59f[168]),0<_0x6b6cx3&&(_0x6b6cx2[_0xb59f[117]]=_0x6b6cx3+_0xb59f[168])):_0xb59f[1334]==this[_0xb59f[277]]&&(_0x6b6cx2[_0xb59f[117]]=_0x6b6cx3+_0xb59f[168],0<_0x6b6cx4&&(_0x6b6cx2[_0xb59f[1503]]=_0x6b6cx4+_0xb59f[168]));this[_0xb59f[1333]]?(!this[_0xb59f[1645]]&&0<_0x6b6cx3&&(_0x6b6cx2[_0xb59f[117]]=_0x6b6cx3+_0xb59f[168]),_0x6b6cx2[_0xb59f[493]]=_0xb59f[1502]):_0x6b6cx2[_0xb59f[493]]=_0xb59f[494]};mxText[_0xb59f[202]][_0xb59f[1672]]=function(){this[_0xb59f[1655]]=mxUtils[_0xb59f[1501]](this[_0xb59f[611]],this[_0xb59f[552]])};mxText[_0xb59f[202]][_0xb59f[1673]]=function(){var _0x6b6cx2=0,_0x6b6cx3=0,_0x6b6cx2=this[_0xb59f[611]]==mxConstants[_0xb59f[479]]?(this[_0xb59f[659]]-this[_0xb59f[661]])/2:this[_0xb59f[611]]==mxConstants[_0xb59f[480]]?-this[_0xb59f[661]]-this[_0xb59f[1649]]:this[_0xb59f[659]]+this[_0xb59f[1648]],_0x6b6cx3=this[_0xb59f[552]]==mxConstants[_0xb59f[481]]?(this[_0xb59f[658]]-this[_0xb59f[660]])/2:this[_0xb59f[552]]==mxConstants[_0xb59f[482]]?-this[_0xb59f[660]]-this[_0xb59f[1647]]:this[_0xb59f[658]]+this[_0xb59f[1646]];return  new mxPoint(_0x6b6cx2,_0x6b6cx3)};function mxTriangle(){mxActor[_0xb59f[239]](this)}mxUtils[_0xb59f[1284]](mxTriangle,mxActor);mxTriangle[_0xb59f[202]][_0xb59f[1625]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[1276]](0,0);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,0.5*_0x6b6cx9);_0x6b6cx2[_0xb59f[1277]](0,_0x6b6cx9);_0x6b6cx2[_0xb59f[268]]()};function mxHexagon(){mxActor[_0xb59f[239]](this)}mxUtils[_0xb59f[1284]](mxHexagon,mxActor);mxHexagon[_0xb59f[202]][_0xb59f[1625]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[1276]](0.25*_0x6b6cx5,0);_0x6b6cx2[_0xb59f[1277]](0.75*_0x6b6cx5,0);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,0.5*_0x6b6cx9);_0x6b6cx2[_0xb59f[1277]](0.75*_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[1277]](0.25*_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[1277]](0,0.5*_0x6b6cx9);_0x6b6cx2[_0xb59f[268]]()};function mxLine(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1336]]=_0x6b6cx3;this[_0xb59f[1307]]=null!=_0x6b6cx4?_0x6b6cx4:1}mxUtils[_0xb59f[1284]](mxLine,mxShape);mxLine[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx4+=_0x6b6cx9/2;_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx3,_0x6b6cx4);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3+_0x6b6cx5,_0x6b6cx4);_0x6b6cx2[_0xb59f[1336]]()};function mxImageShape(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[618]]=_0x6b6cx3;this[_0xb59f[1334]]=_0x6b6cx4;this[_0xb59f[1336]]=_0x6b6cx5;this[_0xb59f[1307]]=null!=_0x6b6cx9?_0x6b6cx9:1;this[_0xb59f[639]]= !1}mxUtils[_0xb59f[1284]](mxImageShape,mxRectangleShape);mxImageShape[_0xb59f[202]][_0xb59f[1674]]= !0;mxImageShape[_0xb59f[202]][_0xb59f[1568]]=function(){return !mxClient[_0xb59f[80]]?0.5:0};mxImageShape[_0xb59f[202]][_0xb59f[183]]=function(_0x6b6cx2){mxShape[_0xb59f[202]][_0xb59f[183]][_0xb59f[183]](this,arguments);this[_0xb59f[1299]]=this[_0xb59f[1336]]=this[_0xb59f[1334]]=null;null!=this[_0xb59f[124]]&&(this[_0xb59f[1334]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_BACKGROUND),this[_0xb59f[1336]]=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_BORDER),this[_0xb59f[1674]]=1==mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_ASPECT,1),this[_0xb59f[623]]=this[_0xb59f[623]]||1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],_0xb59f[1675],0),this[_0xb59f[624]]=this[_0xb59f[624]]||1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],_0xb59f[1676],0))};mxImageShape[_0xb59f[202]][_0xb59f[1567]]=function(){return !this[_0xb59f[1674]]};mxImageShape[_0xb59f[202]][_0xb59f[1570]]=function(){var _0x6b6cx2=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];return _0x6b6cx2};mxImageShape[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=this[_0xb59f[618]]){var _0x6b6cxa=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_BACKGROUND,null),_0x6b6cx12=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_BORDER,null);if(null!=_0x6b6cxa||null!=_0x6b6cx12){_0x6b6cx2[_0xb59f[1245]](_0x6b6cxa),_0x6b6cx2[_0xb59f[1249]](_0x6b6cx12),_0x6b6cx2[_0xb59f[1319]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),_0x6b6cx2[_0xb59f[1337]]()};_0x6b6cx2[_0xb59f[618]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,this[_0xb59f[618]],this[_0xb59f[1674]],!1,!1)}else {mxRectangleShape[_0xb59f[202]][_0xb59f[1601]][_0xb59f[183]](this,arguments)}};mxImageShape[_0xb59f[202]][_0xb59f[1575]]=function(){this[_0xb59f[252]][_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]])+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]])+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[160]](0,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[117]]))+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[119]]=Math[_0xb59f[160]](0,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[119]]))+_0xb59f[168];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[1028]]=this[_0xb59f[1334]]||_0xb59f[110];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[1630]]=this[_0xb59f[1336]]||_0xb59f[110];this[_0xb59f[252]][_0xb59f[339]]=_0xb59f[110];if(null!=this[_0xb59f[618]]){var _0x6b6cx2=document[_0xb59f[55]](mxClient[_0xb59f[49]]||null==mxClient[_0xb59f[73]]&&0!=this[_0xb59f[603]]?mxClient[_0xb59f[463]]+_0xb59f[464]:_0xb59f[466]);_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx2[_0xb59f[390]]=this[_0xb59f[618]];var _0x6b6cx3=100>this[_0xb59f[461]]?_0xb59f[459]+this[_0xb59f[461]]+_0xb59f[460]:_0xb59f[110];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[347]]=_0x6b6cx3;this[_0xb59f[623]]&&this[_0xb59f[624]]?_0x6b6cx3+=_0xb59f[1677]:this[_0xb59f[623]]?_0x6b6cx3+=_0xb59f[1678]:this[_0xb59f[624]]&&(_0x6b6cx3+=_0xb59f[1679]);_0x6b6cx2[_0xb59f[124]][_0xb59f[347]]!=_0x6b6cx3&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[347]]=_0x6b6cx3);_0xb59f[618]==_0x6b6cx2[_0xb59f[301]]?_0x6b6cx2[_0xb59f[124]][_0xb59f[603]]=this[_0xb59f[603]]:_0x6b6cx2[_0xb59f[124]][mxClient[_0xb59f[73]]+_0xb59f[1662]]=_0xb59f[1394]+this[_0xb59f[603]]+_0xb59f[1666];_0x6b6cx2[_0xb59f[124]][_0xb59f[117]]=this[_0xb59f[252]][_0xb59f[124]][_0xb59f[117]];_0x6b6cx2[_0xb59f[124]][_0xb59f[119]]=this[_0xb59f[252]][_0xb59f[124]][_0xb59f[119]];this[_0xb59f[252]][_0xb59f[124]][_0xb59f[1617]]=_0xb59f[110];this[_0xb59f[252]][_0xb59f[62]](_0x6b6cx2)}else {this[_0xb59f[1600]](this[_0xb59f[252]])}};function mxLabel(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxRectangleShape[_0xb59f[239]](this,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)}mxUtils[_0xb59f[1284]](mxLabel,mxRectangleShape);mxLabel[_0xb59f[202]][_0xb59f[1680]]=mxConstants[_0xb59f[1681]];mxLabel[_0xb59f[202]][_0xb59f[657]]=2;mxLabel[_0xb59f[202]][_0xb59f[1682]]=10;mxLabel[_0xb59f[202]][_0xb59f[635]]=2;mxLabel[_0xb59f[202]][_0xb59f[176]]=function(_0x6b6cx2){mxShape[_0xb59f[202]][_0xb59f[176]][_0xb59f[183]](this,arguments);null!=this[_0xb59f[632]]&&null!=this[_0xb59f[630]]&&(this[_0xb59f[1683]]= new this[_0xb59f[630]],this[_0xb59f[1683]][_0xb59f[507]]=this[_0xb59f[507]],this[_0xb59f[1683]][_0xb59f[1562]]=this[_0xb59f[1562]],this[_0xb59f[1683]][_0xb59f[1334]]=this[_0xb59f[632]],this[_0xb59f[1683]][_0xb59f[1336]]=this[_0xb59f[632]],this[_0xb59f[1683]][_0xb59f[1299]]=this[_0xb59f[634]],this[_0xb59f[1683]][_0xb59f[663]]=this[_0xb59f[638]],this[_0xb59f[1683]][_0xb59f[176]](this[_0xb59f[252]]))};mxLabel[_0xb59f[202]][_0xb59f[258]]=function(){null!=this[_0xb59f[1683]]&&(this[_0xb59f[1683]][_0xb59f[1334]]=this[_0xb59f[632]],this[_0xb59f[1683]][_0xb59f[1336]]=this[_0xb59f[632]],this[_0xb59f[1683]][_0xb59f[1299]]=this[_0xb59f[634]],this[_0xb59f[1683]][_0xb59f[663]]=this[_0xb59f[638]]);mxShape[_0xb59f[202]][_0xb59f[258]][_0xb59f[183]](this,arguments)};mxLabel[_0xb59f[202]][_0xb59f[1567]]=function(){return mxRectangleShape[_0xb59f[202]][_0xb59f[1567]][_0xb59f[183]](this,arguments)&&null==this[_0xb59f[632]]&&null==this[_0xb59f[630]]};mxLabel[_0xb59f[202]][_0xb59f[1602]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){this[_0xb59f[1684]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);this[_0xb59f[1685]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9);mxRectangleShape[_0xb59f[202]][_0xb59f[1602]][_0xb59f[183]](this,arguments)};mxLabel[_0xb59f[202]][_0xb59f[1684]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){null!=this[_0xb59f[618]]&&(_0x6b6cx3=this[_0xb59f[1686]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),_0x6b6cx2[_0xb59f[618]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]],_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]],this[_0xb59f[618]],!1,!1,!1))};mxLabel[_0xb59f[202]][_0xb59f[1686]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),_0x6b6cxa=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x6b6cx12=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),_0x6b6cx13=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),_0x6b6cx14=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_SPACING,this[_0xb59f[657]])+5;_0x6b6cx2=_0x6b6cx9==mxConstants[_0xb59f[479]]?_0x6b6cx2+(_0x6b6cx4-_0x6b6cx12)/2:_0x6b6cx9==mxConstants[_0xb59f[480]]?_0x6b6cx2+(_0x6b6cx4-_0x6b6cx12-_0x6b6cx14):_0x6b6cx2+_0x6b6cx14;_0x6b6cx3=_0x6b6cxa==mxConstants[_0xb59f[1687]]?_0x6b6cx3+_0x6b6cx14:_0x6b6cxa==mxConstants[_0xb59f[482]]?_0x6b6cx3+(_0x6b6cx5-_0x6b6cx13-_0x6b6cx14):_0x6b6cx3+(_0x6b6cx5-_0x6b6cx13)/2;return  new mxRectangle(_0x6b6cx2,_0x6b6cx3,_0x6b6cx12,_0x6b6cx13)};mxLabel[_0xb59f[202]][_0xb59f[1685]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){null!=this[_0xb59f[1683]]?(this[_0xb59f[1683]][_0xb59f[1562]]=this[_0xb59f[1688]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),this[_0xb59f[1683]][_0xb59f[1209]](_0x6b6cx2)):null!=this[_0xb59f[631]]&&(_0x6b6cx3=this[_0xb59f[1688]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9),_0x6b6cx2[_0xb59f[618]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]],_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]],this[_0xb59f[631]],!1,!1,!1))};mxLabel[_0xb59f[202]][_0xb59f[1688]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),_0x6b6cxa=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x6b6cx12=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_INDICATOR_WIDTH,this[_0xb59f[1682]]),_0x6b6cx13=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_INDICATOR_HEIGHT,this[_0xb59f[1682]]),_0x6b6cx14=this[_0xb59f[657]]+5;_0x6b6cx2=_0x6b6cx9==mxConstants[_0xb59f[480]]?_0x6b6cx2+(_0x6b6cx4-_0x6b6cx12-_0x6b6cx14):_0x6b6cx9==mxConstants[_0xb59f[479]]?_0x6b6cx2+(_0x6b6cx4-_0x6b6cx12)/2:_0x6b6cx2+_0x6b6cx14;_0x6b6cx3=_0x6b6cxa==mxConstants[_0xb59f[482]]?_0x6b6cx3+(_0x6b6cx5-_0x6b6cx13-_0x6b6cx14):_0x6b6cxa==mxConstants[_0xb59f[1687]]?_0x6b6cx3+_0x6b6cx14:_0x6b6cx3+(_0x6b6cx5-_0x6b6cx13)/2;return  new mxRectangle(_0x6b6cx2,_0x6b6cx3,_0x6b6cx12,_0x6b6cx13)};mxLabel[_0xb59f[202]][_0xb59f[1575]]=function(){for(mxRectangleShape[_0xb59f[202]][_0xb59f[1575]][_0xb59f[183]](this,arguments);this[_0xb59f[252]][_0xb59f[1580]]();){this[_0xb59f[252]][_0xb59f[266]](this[_0xb59f[252]][_0xb59f[1581]])};if(null!=this[_0xb59f[618]]){var _0x6b6cx2=document[_0xb59f[55]](_0xb59f[466]);_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[1500];_0x6b6cx2[_0xb59f[57]](_0xb59f[467],_0xb59f[468]);var _0x6b6cx3=this[_0xb59f[1686]](this[_0xb59f[1562]][_0xb59f[235]],this[_0xb59f[1562]][_0xb59f[236]],this[_0xb59f[1562]][_0xb59f[117]],this[_0xb59f[1562]][_0xb59f[119]]);_0x6b6cx3[_0xb59f[235]]-=this[_0xb59f[1562]][_0xb59f[235]];_0x6b6cx3[_0xb59f[236]]-=this[_0xb59f[1562]][_0xb59f[236]];_0x6b6cx2[_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[488]](_0x6b6cx3[_0xb59f[235]])+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[488]](_0x6b6cx3[_0xb59f[236]])+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[488]](_0x6b6cx3[_0xb59f[117]])+_0xb59f[168];_0x6b6cx2[_0xb59f[124]][_0xb59f[119]]=Math[_0xb59f[488]](_0x6b6cx3[_0xb59f[119]])+_0xb59f[168];_0x6b6cx2[_0xb59f[390]]=this[_0xb59f[618]];this[_0xb59f[252]][_0xb59f[62]](_0x6b6cx2)}};function mxCylinder(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxCylinder,mxShape);mxCylinder[_0xb59f[202]][_0xb59f[1503]]=40;mxCylinder[_0xb59f[202]][_0xb59f[1564]]=0;mxCylinder[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[513]](_0x6b6cx3,_0x6b6cx4);_0x6b6cx2[_0xb59f[1275]]();this[_0xb59f[1625]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,!1);_0x6b6cx2[_0xb59f[1337]]();_0x6b6cx2[_0xb59f[1267]](!1);_0x6b6cx2[_0xb59f[1275]]();this[_0xb59f[1625]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,!0);_0x6b6cx2[_0xb59f[1336]]()};mxCylinder[_0xb59f[202]][_0xb59f[1625]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx3=Math[_0xb59f[243]](this[_0xb59f[1503]],Math[_0xb59f[488]](_0x6b6cx9/5));if(_0x6b6cxa&&null!=this[_0xb59f[1334]]||!_0x6b6cxa&&null==this[_0xb59f[1334]]){_0x6b6cx2[_0xb59f[1276]](0,_0x6b6cx3),_0x6b6cx2[_0xb59f[1279]](0,2*_0x6b6cx3,_0x6b6cx5,2*_0x6b6cx3,_0x6b6cx5,_0x6b6cx3),_0x6b6cxa||(_0x6b6cx2[_0xb59f[1336]](),_0x6b6cx2[_0xb59f[1275]]())};_0x6b6cxa||(_0x6b6cx2[_0xb59f[1276]](0,_0x6b6cx3),_0x6b6cx2[_0xb59f[1279]](0,-_0x6b6cx3/3,_0x6b6cx5,-_0x6b6cx3/3,_0x6b6cx5,_0x6b6cx3),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,_0x6b6cx9-_0x6b6cx3),_0x6b6cx2[_0xb59f[1279]](_0x6b6cx5,_0x6b6cx9+_0x6b6cx3/3,0,_0x6b6cx9+_0x6b6cx3/3,0,_0x6b6cx9-_0x6b6cx3),_0x6b6cx2[_0xb59f[268]]())};function mxConnector(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxPolyline[_0xb59f[239]](this,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)}mxUtils[_0xb59f[1284]](mxConnector,mxPolyline);mxConnector[_0xb59f[202]][_0xb59f[1594]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1689]](_0x6b6cx2,_0x6b6cx3,!0),_0x6b6cx5=this[_0xb59f[1689]](_0x6b6cx2,_0x6b6cx3,!1);null==this[_0xb59f[124]]||1!=this[_0xb59f[124]][mxConstants[_0xb59f[1690]]]?this[_0xb59f[1639]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[1606]]):this[_0xb59f[1691]](_0x6b6cx2,_0x6b6cx3);_0x6b6cx2[_0xb59f[1245]](this[_0xb59f[1336]]);_0x6b6cx2[_0xb59f[1267]](!1);_0x6b6cx2[_0xb59f[1251]](!1);null!=_0x6b6cx4&&_0x6b6cx4();null!=_0x6b6cx5&&_0x6b6cx5()};mxConnector[_0xb59f[202]][_0xb59f[1691]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[1275]]();var _0x6b6cx4=_0x6b6cx3[0],_0x6b6cx5=_0x6b6cx3[_0xb59f[67]];_0x6b6cx2[_0xb59f[1276]](_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]]);for(_0x6b6cx4=1;_0x6b6cx4<_0x6b6cx5-2;_0x6b6cx4++){var _0x6b6cx9=_0x6b6cx3[_0x6b6cx4],_0x6b6cxa=_0x6b6cx3[_0x6b6cx4+1];_0x6b6cx2[_0xb59f[1278]](_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]],(_0x6b6cx9[_0xb59f[235]]+_0x6b6cxa[_0xb59f[235]])/2,(_0x6b6cx9[_0xb59f[236]]+_0x6b6cxa[_0xb59f[236]])/2)};_0x6b6cx9=_0x6b6cx3[_0x6b6cx5-2];_0x6b6cxa=_0x6b6cx3[_0x6b6cx5-1];_0x6b6cx2[_0xb59f[1278]](_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]],_0x6b6cxa[_0xb59f[235]],_0x6b6cxa[_0xb59f[236]]);_0x6b6cx2[_0xb59f[1336]]()};mxConnector[_0xb59f[202]][_0xb59f[1689]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx3[_0xb59f[67]],_0x6b6cx9=_0x6b6cx4?_0x6b6cx3[1]:_0x6b6cx3[_0x6b6cx5-2];_0x6b6cx3=_0x6b6cx4?_0x6b6cx3[0]:_0x6b6cx3[_0x6b6cx5-1];var _0x6b6cx5=_0x6b6cx3[_0xb59f[235]]-_0x6b6cx9[_0xb59f[235]],_0x6b6cxa=_0x6b6cx3[_0xb59f[236]]-_0x6b6cx9[_0xb59f[236]],_0x6b6cx12=Math[_0xb59f[160]](1,Math[_0xb59f[428]](_0x6b6cx5*_0x6b6cx5+_0x6b6cxa*_0x6b6cxa)),_0x6b6cx9=_0x6b6cx5/_0x6b6cx12,_0x6b6cx5=_0x6b6cxa/_0x6b6cx12,_0x6b6cxa=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],_0x6b6cx4?mxConstants[_0xb59f[1692]]:mxConstants[_0xb59f[1693]],mxConstants.DEFAULT_MARKERSIZE),_0x6b6cx12=mxUtils[_0xb59f[433]](this[_0xb59f[124]],_0x6b6cx4?mxConstants[_0xb59f[1694]]:mxConstants[_0xb59f[1695]]);return mxMarker[_0xb59f[1689]](_0x6b6cx2,this,_0x6b6cx12,_0x6b6cx3,_0x6b6cx9,_0x6b6cx5,_0x6b6cxa,_0x6b6cx4,this[_0xb59f[1307]],0!=this[_0xb59f[124]][_0x6b6cx4?mxConstants[_0xb59f[1696]]:mxConstants[_0xb59f[1697]]])};mxConnector[_0xb59f[202]][_0xb59f[1612]]=function(_0x6b6cx2){mxShape[_0xb59f[202]][_0xb59f[1612]][_0xb59f[183]](this,arguments);var _0x6b6cx3=0;mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants[_0xb59f[217]]&&(_0x6b6cx3=mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants[_0xb59f[217]]&&(_0x6b6cx3=Math[_0xb59f[160]](_0x6b6cx3,mxUtils[_0xb59f[1550]](this[_0xb59f[124]],mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+1);_0x6b6cx2[_0xb59f[244]](Math[_0xb59f[430]](_0x6b6cx3*this[_0xb59f[255]]))};function mxSwimlane(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxShape[_0xb59f[239]](this);this[_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[1334]]=_0x6b6cx3;this[_0xb59f[1336]]=_0x6b6cx4;this[_0xb59f[1307]]=null!=_0x6b6cx5?_0x6b6cx5:1}mxUtils[_0xb59f[1284]](mxSwimlane,mxShape);mxSwimlane[_0xb59f[202]][_0xb59f[1680]]=16;mxSwimlane[_0xb59f[202]][_0xb59f[1597]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2=Math[_0xb59f[243]](_0x6b6cx9,mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return  new mxRectangle(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx2)};mxSwimlane[_0xb59f[202]][_0xb59f[1614]]=function(){var _0x6b6cx2=mxShape[_0xb59f[202]][_0xb59f[1614]][_0xb59f[183]](this,arguments);1!=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_HORIZONTAL,1)&&(_0x6b6cx2+=mxText[_0xb59f[202]][_0xb59f[1616]]);return _0x6b6cx2};mxSwimlane[_0xb59f[202]][_0xb59f[1615]]=function(){return this[_0xb59f[1614]]()};mxSwimlane[_0xb59f[202]][_0xb59f[1590]]=function(){return mxShape[_0xb59f[202]][_0xb59f[1590]][_0xb59f[183]](this,arguments)||1!=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_HORIZONTAL,1)};mxSwimlane[_0xb59f[202]][_0xb59f[1603]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_ARCSIZE,100*mxConstants[_0xb59f[1557]])/100;return 3*_0x6b6cx4*_0x6b6cx2};mxSwimlane[_0xb59f[202]][_0xb59f[1595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=Math[_0xb59f[243]](_0x6b6cx9,mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),_0x6b6cx12=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),_0x6b6cx13=1==mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_SWIMLANE_LINE,1),_0x6b6cx14=0;_0x6b6cx2[_0xb59f[513]](_0x6b6cx3,_0x6b6cx4);this[_0xb59f[1606]]?(_0x6b6cx14=this[_0xb59f[1603]](_0x6b6cx5,_0x6b6cx9,_0x6b6cxa),this[_0xb59f[1698]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx14,_0x6b6cx12,_0x6b6cx13)):this[_0xb59f[1699]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13);_0x6b6cx12=mxUtils[_0xb59f[433]](this[_0xb59f[124]],mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this[_0xb59f[1700]](_0x6b6cx2,_0x6b6cx5,_0x6b6cxa,_0x6b6cx9,_0x6b6cx12);null!=this[_0xb59f[618]]&&(_0x6b6cx9=this[_0xb59f[1686]](_0x6b6cx3,_0x6b6cxa,_0x6b6cx5,_0x6b6cx9),_0x6b6cx2[_0xb59f[618]](_0x6b6cx9[_0xb59f[235]]-_0x6b6cx3,_0x6b6cx9[_0xb59f[236]]-_0x6b6cx4,_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]],this[_0xb59f[618]],!1,!1,!1));this[_0xb59f[617]]&&(_0x6b6cx2[_0xb59f[1267]](!1),this[_0xb59f[1604]](_0x6b6cx2,0,0,_0x6b6cx5,_0x6b6cxa,_0x6b6cx14))};mxSwimlane[_0xb59f[202]][_0xb59f[1699]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13){_0x6b6cx12!=mxConstants[_0xb59f[217]]&&(_0x6b6cx2[_0xb59f[815]](),_0x6b6cx2[_0xb59f[1245]](_0x6b6cx12),_0x6b6cx2[_0xb59f[1319]](0,0,_0x6b6cx5,_0x6b6cx9),_0x6b6cx2[_0xb59f[1337]](),_0x6b6cx2[_0xb59f[1210]](),_0x6b6cx2[_0xb59f[1267]](!1));_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](0,_0x6b6cxa);_0x6b6cx2[_0xb59f[1277]](0,0);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,0);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,_0x6b6cxa);_0x6b6cx13&&_0x6b6cx2[_0xb59f[268]]();_0x6b6cx2[_0xb59f[1337]]();_0x6b6cxa<_0x6b6cx9&&_0x6b6cx12==mxConstants[_0xb59f[217]]&&(_0x6b6cx2[_0xb59f[1229]]= !1,_0x6b6cx2[_0xb59f[1275]](),_0x6b6cx2[_0xb59f[1276]](0,_0x6b6cxa),_0x6b6cx2[_0xb59f[1277]](0,_0x6b6cx9),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,_0x6b6cx9),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,_0x6b6cxa),_0x6b6cx2[_0xb59f[1336]]())};mxSwimlane[_0xb59f[202]][_0xb59f[1698]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){_0x6b6cx13!=mxConstants[_0xb59f[217]]&&(_0x6b6cx2[_0xb59f[815]](),_0x6b6cx2[_0xb59f[1245]](_0x6b6cx13),_0x6b6cx2[_0xb59f[1320]](0,0,_0x6b6cx5,_0x6b6cx9,_0x6b6cx12,_0x6b6cx12),_0x6b6cx2[_0xb59f[1337]](),_0x6b6cx2[_0xb59f[1210]](),_0x6b6cx2[_0xb59f[1267]](!1));_0x6b6cx2[_0xb59f[1275]]();_0x6b6cx2[_0xb59f[1276]](_0x6b6cx5,_0x6b6cxa);_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,_0x6b6cx12);_0x6b6cx2[_0xb59f[1278]](_0x6b6cx5,0,_0x6b6cx5-Math[_0xb59f[243]](_0x6b6cx5/2,_0x6b6cx12),0);_0x6b6cx2[_0xb59f[1277]](Math[_0xb59f[243]](_0x6b6cx5/2,_0x6b6cx12),0);_0x6b6cx2[_0xb59f[1278]](0,0,0,_0x6b6cx12);_0x6b6cx2[_0xb59f[1277]](0,_0x6b6cxa);_0x6b6cx14&&_0x6b6cx2[_0xb59f[268]]();_0x6b6cx2[_0xb59f[1337]]();_0x6b6cxa<_0x6b6cx9&&_0x6b6cx13==mxConstants[_0xb59f[217]]&&(_0x6b6cx2[_0xb59f[1229]]= !1,_0x6b6cx2[_0xb59f[1275]](),_0x6b6cx2[_0xb59f[1276]](0,_0x6b6cxa),_0x6b6cx2[_0xb59f[1277]](0,_0x6b6cx9-_0x6b6cx12),_0x6b6cx2[_0xb59f[1278]](0,_0x6b6cx9,Math[_0xb59f[243]](_0x6b6cx5/2,_0x6b6cx12),_0x6b6cx9),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5-Math[_0xb59f[243]](_0x6b6cx5/2,_0x6b6cx12),_0x6b6cx9),_0x6b6cx2[_0xb59f[1278]](_0x6b6cx5,_0x6b6cx9,_0x6b6cx5,_0x6b6cx9-_0x6b6cx12),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx5,_0x6b6cxa),_0x6b6cx2[_0xb59f[1336]]())};mxSwimlane[_0xb59f[202]][_0xb59f[1700]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx9!=mxConstants[_0xb59f[217]]&&(_0x6b6cx2[_0xb59f[1249]](_0x6b6cx9),_0x6b6cx2[_0xb59f[1251]](!0),_0x6b6cx2[_0xb59f[1275]](),_0x6b6cx2[_0xb59f[1276]](_0x6b6cx3,_0x6b6cx4),_0x6b6cx2[_0xb59f[1277]](_0x6b6cx3,_0x6b6cx5),_0x6b6cx2[_0xb59f[1336]](),_0x6b6cx2[_0xb59f[1251]](!1))};mxSwimlane[_0xb59f[202]][_0xb59f[1686]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){return  new mxRectangle(_0x6b6cx2+_0x6b6cx4-this[_0xb59f[1680]],_0x6b6cx3,this[_0xb59f[1680]],this[_0xb59f[1680]])};function mxGraphLayout(_0x6b6cx2){this[_0xb59f[1179]]=_0x6b6cx2}mxGraphLayout[_0xb59f[202]][_0xb59f[1179]]=null;mxGraphLayout[_0xb59f[202]][_0xb59f[1701]]= !0;mxGraphLayout[_0xb59f[202]][_0xb59f[1101]]=null;mxGraphLayout[_0xb59f[202]][_0xb59f[1702]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){};mxGraphLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){};mxGraphLayout[_0xb59f[202]][_0xb59f[1703]]=function(){return this[_0xb59f[1179]]};mxGraphLayout[_0xb59f[202]][_0xb59f[1704]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx3);_0x6b6cx3=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[124]]:this[_0xb59f[1179]][_0xb59f[1705]](_0x6b6cx3);return null!=_0x6b6cx3?_0x6b6cx3[_0x6b6cx2]:null};mxGraphLayout[_0xb59f[1706]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=_0x6b6cx4&&null!=_0x6b6cx2){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;_0x6b6cx9=_0x6b6cx9||[];var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2);if(null==_0x6b6cx9[_0x6b6cxa]&&(_0x6b6cx9[_0x6b6cxa]=_0x6b6cx2,_0x6b6cx5=_0x6b6cx4(_0x6b6cx2,_0x6b6cx5),null==_0x6b6cx5||_0x6b6cx5)){if(_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1707]](_0x6b6cx2),0<_0x6b6cx5){for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5;_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1708]](_0x6b6cx2,_0x6b6cxa),_0x6b6cx13=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1709]](_0x6b6cx12,!0)==_0x6b6cx2;if(!_0x6b6cx3||_0x6b6cx13){_0x6b6cx13=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[1710]](_0x6b6cx12,!_0x6b6cx13),this[_0xb59f[1706]](_0x6b6cx13,_0x6b6cx3,_0x6b6cx4,_0x6b6cx12,_0x6b6cx9)}}}}}};mxGraphLayout[_0xb59f[202]][_0xb59f[1711]]=function(_0x6b6cx2){return this[_0xb59f[1179]][_0xb59f[1712]](_0x6b6cx2)};mxGraphLayout[_0xb59f[202]][_0xb59f[1713]]=function(_0x6b6cx2){return !this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx2)||!this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx2)};mxGraphLayout[_0xb59f[202]][_0xb59f[1715]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]();return !_0x6b6cx3[_0xb59f[250]](_0x6b6cx2)||!this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx2)||null==_0x6b6cx3[_0xb59f[1709]](_0x6b6cx2,!0)||null==_0x6b6cx3[_0xb59f[1709]](_0x6b6cx2,!1)};mxGraphLayout[_0xb59f[202]][_0xb59f[1716]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_NOEDGESTYLE,_0x6b6cx3?_0xb59f[468]:_0xb59f[500],[_0x6b6cx2])};mxGraphLayout[_0xb59f[202]][_0xb59f[1718]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_ORTHOGONAL,_0x6b6cx3?_0xb59f[500]:_0xb59f[468],[_0x6b6cx2])};mxGraphLayout[_0xb59f[202]][_0xb59f[1719]]=function(_0x6b6cx2){var _0x6b6cx3= new mxPoint;if(null!=_0x6b6cx2&&_0x6b6cx2!=this[_0xb59f[1101]]){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]();if(_0x6b6cx4[_0xb59f[1720]](this[_0xb59f[1101]],_0x6b6cx2)){for(var _0x6b6cx5=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx2);_0x6b6cx2!=this[_0xb59f[1101]];){_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx5[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]+=_0x6b6cx5[_0xb59f[236]],_0x6b6cx2=_0x6b6cx4[_0xb59f[1197]](_0x6b6cx2),_0x6b6cx5=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx2)}}};return _0x6b6cx3};mxGraphLayout[_0xb59f[202]][_0xb59f[1722]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[251]],_0x6b6cx5=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx2);null==_0x6b6cx5?(_0x6b6cx5= new mxGeometry,_0x6b6cx5[_0xb59f[1723]](!0)):_0x6b6cx5=_0x6b6cx5[_0xb59f[238]]();if(null!=this[_0xb59f[1101]]&&null!=_0x6b6cx3){for(var _0x6b6cx9=_0x6b6cx4[_0xb59f[1197]](_0x6b6cx2),_0x6b6cx9=this[_0xb59f[1719]](_0x6b6cx9),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx3[_0xb59f[67]];_0x6b6cxa++){_0x6b6cx3[_0x6b6cxa][_0xb59f[235]]-=_0x6b6cx9[_0xb59f[235]],_0x6b6cx3[_0x6b6cxa][_0xb59f[236]]-=_0x6b6cx9[_0xb59f[236]]}};_0x6b6cx5[_0xb59f[1525]]=_0x6b6cx3;_0x6b6cx4[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx5)}};mxGraphLayout[_0xb59f[202]][_0xb59f[1725]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx9=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx2),_0x6b6cxa=null;if(null!=_0x6b6cx9){_0x6b6cxa= new mxRectangle(_0x6b6cx3,_0x6b6cx4,_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]]);if(this[_0xb59f[1701]]){var _0x6b6cx12=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);if(null!=_0x6b6cx12&&null!=_0x6b6cx12[_0xb59f[963]]&&null!=_0x6b6cx12[_0xb59f[963]][_0xb59f[1563]]){var _0x6b6cx13=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx14=_0x6b6cx12[_0xb59f[963]][_0xb59f[1563]];_0x6b6cx12[_0xb59f[963]][_0xb59f[1563]][_0xb59f[235]]<_0x6b6cx12[_0xb59f[235]]&&(_0x6b6cx3+=(_0x6b6cx12[_0xb59f[235]]-_0x6b6cx14[_0xb59f[235]])/_0x6b6cx13,_0x6b6cxa[_0xb59f[117]]=_0x6b6cx14[_0xb59f[117]]);_0x6b6cx12[_0xb59f[963]][_0xb59f[1563]][_0xb59f[236]]<_0x6b6cx12[_0xb59f[236]]&&(_0x6b6cx4+=(_0x6b6cx12[_0xb59f[236]]-_0x6b6cx14[_0xb59f[236]])/_0x6b6cx13,_0x6b6cxa[_0xb59f[119]]=_0x6b6cx14[_0xb59f[119]])}};null!=this[_0xb59f[1101]]&&(_0x6b6cx12=_0x6b6cx5[_0xb59f[1197]](_0x6b6cx2),null!=_0x6b6cx12&&_0x6b6cx12!=this[_0xb59f[1101]]&&(_0x6b6cx12=this[_0xb59f[1719]](_0x6b6cx12),_0x6b6cx3-=_0x6b6cx12[_0xb59f[235]],_0x6b6cx4-=_0x6b6cx12[_0xb59f[236]]));if(_0x6b6cx9[_0xb59f[235]]!=_0x6b6cx3||_0x6b6cx9[_0xb59f[236]]!=_0x6b6cx4){_0x6b6cx9=_0x6b6cx9[_0xb59f[238]](),_0x6b6cx9[_0xb59f[235]]=_0x6b6cx3,_0x6b6cx9[_0xb59f[236]]=_0x6b6cx4,_0x6b6cx5[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx9)}};return _0x6b6cxa};mxGraphLayout[_0xb59f[202]][_0xb59f[1726]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1721]](_0x6b6cx2);if(this[_0xb59f[1701]]){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);if(null!=_0x6b6cx4&&null!=_0x6b6cx4[_0xb59f[963]]&&null!=_0x6b6cx4[_0xb59f[963]][_0xb59f[1563]]){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx9=_0x6b6cx4[_0xb59f[963]][_0xb59f[1563]],_0x6b6cxa=Math[_0xb59f[160]](_0x6b6cx4[_0xb59f[235]]-_0x6b6cx9[_0xb59f[235]],0)/_0x6b6cx5,_0x6b6cx12=Math[_0xb59f[160]](_0x6b6cx4[_0xb59f[236]]-_0x6b6cx9[_0xb59f[236]],0)/_0x6b6cx5,_0x6b6cx13=Math[_0xb59f[160]](_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]]-(_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]),0)/_0x6b6cx5,_0x6b6cx4=Math[_0xb59f[160]](_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]]-(_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]),0)/_0x6b6cx5,_0x6b6cx3= new mxRectangle(_0x6b6cx3[_0xb59f[235]]-_0x6b6cxa,_0x6b6cx3[_0xb59f[236]]-_0x6b6cx12,_0x6b6cx3[_0xb59f[117]]+_0x6b6cxa+_0x6b6cx13,_0x6b6cx3[_0xb59f[119]]+_0x6b6cx12+_0x6b6cx4)}};null!=this[_0xb59f[1101]]&&(_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx2),_0x6b6cx3=_0x6b6cx3[_0xb59f[238]](),null!=_0x6b6cx2&&_0x6b6cx2!=this[_0xb59f[1101]]&&(_0x6b6cx2=this[_0xb59f[1719]](_0x6b6cx2),_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx2[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]+=_0x6b6cx2[_0xb59f[236]]));return  new mxRectangle(_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]],_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]])};mxGraphLayout[_0xb59f[202]][_0xb59f[1727]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[473]]();try{for(var _0x6b6cx4=_0x6b6cx2[_0xb59f[67]]-1;0<=_0x6b6cx4;_0x6b6cx4--){var _0x6b6cx5=_0x6b6cx2[_0x6b6cx4],_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[1728]](_0x6b6cx5),_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[1729]](_0x6b6cx9),_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx5),_0x6b6cx13=0,_0x6b6cx14=0;if(this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx5)){var _0x6b6cx15=this[_0xb59f[1179]][_0xb59f[1731]](_0x6b6cx5),_0x6b6cx13=_0x6b6cx15[_0xb59f[117]],_0x6b6cx14=_0x6b6cx15[_0xb59f[119]]};null!=_0x6b6cxa&&null!=_0x6b6cx12&&(_0x6b6cx12=_0x6b6cx12[_0xb59f[238]](),_0x6b6cx12[_0xb59f[235]]=_0x6b6cx12[_0xb59f[235]]+_0x6b6cxa[_0xb59f[235]]-_0x6b6cx3-_0x6b6cx13,_0x6b6cx12[_0xb59f[236]]=_0x6b6cx12[_0xb59f[236]]+_0x6b6cxa[_0xb59f[236]]-_0x6b6cx3-_0x6b6cx14,_0x6b6cx12[_0xb59f[117]]=_0x6b6cxa[_0xb59f[117]]+2*_0x6b6cx3+_0x6b6cx13,_0x6b6cx12[_0xb59f[119]]=_0x6b6cxa[_0xb59f[119]]+2*_0x6b6cx3+_0x6b6cx14,this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1724]](_0x6b6cx5,_0x6b6cx12),this[_0xb59f[1179]][_0xb59f[834]](_0x6b6cx9,_0x6b6cx3+_0x6b6cx13-_0x6b6cxa[_0xb59f[235]],_0x6b6cx3+_0x6b6cx14-_0x6b6cxa[_0xb59f[236]]))}}finally{this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[476]]()}};function mxStackLayout(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2);this[_0xb59f[662]]=null!=_0x6b6cx3?_0x6b6cx3:!0;this[_0xb59f[657]]=null!=_0x6b6cx4?_0x6b6cx4:0;this[_0xb59f[1732]]=null!=_0x6b6cx5?_0x6b6cx5:0;this[_0xb59f[1733]]=null!=_0x6b6cx9?_0x6b6cx9:0;this[_0xb59f[467]]=null!=_0x6b6cxa?_0x6b6cxa:0}mxStackLayout[_0xb59f[202]]= new mxGraphLayout;mxStackLayout[_0xb59f[202]][_0xb59f[196]]=mxStackLayout;mxStackLayout[_0xb59f[202]][_0xb59f[662]]=null;mxStackLayout[_0xb59f[202]][_0xb59f[657]]=null;mxStackLayout[_0xb59f[202]][_0xb59f[1732]]=null;mxStackLayout[_0xb59f[202]][_0xb59f[1733]]=null;mxStackLayout[_0xb59f[202]][_0xb59f[467]]=0;mxStackLayout[_0xb59f[202]][_0xb59f[1734]]= !1;mxStackLayout[_0xb59f[202]][_0xb59f[1334]]= !1;mxStackLayout[_0xb59f[202]][_0xb59f[1735]]= !1;mxStackLayout[_0xb59f[202]][_0xb59f[1736]]= !1;mxStackLayout[_0xb59f[202]][_0xb59f[1333]]=null;mxStackLayout[_0xb59f[202]][_0xb59f[1737]]=function(){return this[_0xb59f[662]]};mxStackLayout[_0xb59f[202]][_0xb59f[1702]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx9=_0x6b6cx5[_0xb59f[1197]](_0x6b6cx2),_0x6b6cxa=this[_0xb59f[1737]]();if(null!=_0x6b6cx2&&null!=_0x6b6cx9){var _0x6b6cx12=0,_0x6b6cx13=0,_0x6b6cx14=_0x6b6cx5[_0xb59f[262]](_0x6b6cx9);_0x6b6cx3=_0x6b6cxa?_0x6b6cx3:_0x6b6cx4;_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx9);null!=_0x6b6cx12&&(_0x6b6cx3-=_0x6b6cxa?_0x6b6cx12[_0xb59f[235]]:_0x6b6cx12[_0xb59f[236]]);for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cx14;_0x6b6cx12++){if(_0x6b6cx4=_0x6b6cx5[_0xb59f[263]](_0x6b6cx9,_0x6b6cx12),_0x6b6cx4!=_0x6b6cx2&&(_0x6b6cx4=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx4),null!=_0x6b6cx4)){_0x6b6cx4=_0x6b6cxa?_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]/2:_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]/2;if(_0x6b6cx13<_0x6b6cx3&&_0x6b6cx4>_0x6b6cx3){break};_0x6b6cx13=_0x6b6cx4}};_0x6b6cxa=_0x6b6cx9[_0xb59f[1738]](_0x6b6cx2);_0x6b6cxa=Math[_0xb59f[160]](0,_0x6b6cx12-(_0x6b6cx12>_0x6b6cxa?1:0));_0x6b6cx5[_0xb59f[99]](_0x6b6cx9,_0x6b6cx2,_0x6b6cxa)}};mxStackLayout[_0xb59f[202]][_0xb59f[1739]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[1721]](_0x6b6cx2);if(null!=this[_0xb59f[1179]][_0xb59f[526]]&&(null==_0x6b6cx4&&_0x6b6cx3[_0xb59f[1740]](_0x6b6cx2)||_0x6b6cx2==this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1741]])){_0x6b6cx4= new mxRectangle(0,0,this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[359]]-1,this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[167]]-1)};return _0x6b6cx4};mxStackLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1737]](),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=this[_0xb59f[1739]](_0x6b6cx2),_0x6b6cx9=0;null!=_0x6b6cx5&&(_0x6b6cx9=_0x6b6cx3?_0x6b6cx5[_0xb59f[119]]:_0x6b6cx5[_0xb59f[117]]);var _0x6b6cx9=_0x6b6cx9-(2*this[_0xb59f[657]]+2*this[_0xb59f[467]]),_0x6b6cxa=this[_0xb59f[1732]]+this[_0xb59f[467]],_0x6b6cx12=this[_0xb59f[1733]]+this[_0xb59f[467]];if(this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx2)){var _0x6b6cx13=this[_0xb59f[1179]][_0xb59f[1705]](_0x6b6cx2),_0x6b6cx14=mxUtils[_0xb59f[433]](_0x6b6cx13,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),_0x6b6cx13=mxUtils[_0xb59f[433]](_0x6b6cx13,mxConstants.STYLE_HORIZONTAL,!0);_0x6b6cx3==_0x6b6cx13&&(_0x6b6cx9-=_0x6b6cx14);_0x6b6cx3?_0x6b6cx12+=_0x6b6cx14:_0x6b6cxa+=_0x6b6cx14};_0x6b6cx4[_0xb59f[473]]();try{for(var _0x6b6cx14=0,_0x6b6cx13=null,_0x6b6cx15=_0x6b6cx4[_0xb59f[262]](_0x6b6cx2),_0x6b6cx16=0;_0x6b6cx16<_0x6b6cx15;_0x6b6cx16++){var _0x6b6cx17=_0x6b6cx4[_0xb59f[263]](_0x6b6cx2,_0x6b6cx16);if(!this[_0xb59f[1713]](_0x6b6cx17)&&this[_0xb59f[1711]](_0x6b6cx17)){var _0x6b6cx18=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx17);if(null!=_0x6b6cx18){_0x6b6cx18=_0x6b6cx18[_0xb59f[238]]();if(null!=this[_0xb59f[1333]]&&null!=_0x6b6cx13&&(_0x6b6cx3&&_0x6b6cx13[_0xb59f[235]]+_0x6b6cx13[_0xb59f[117]]+_0x6b6cx18[_0xb59f[117]]+2*this[_0xb59f[657]]>this[_0xb59f[1333]]||!_0x6b6cx3&&_0x6b6cx13[_0xb59f[236]]+_0x6b6cx13[_0xb59f[119]]+_0x6b6cx18[_0xb59f[119]]+2*this[_0xb59f[657]]>this[_0xb59f[1333]])){_0x6b6cx13=null,_0x6b6cx3?_0x6b6cx12+=_0x6b6cx14+this[_0xb59f[657]]:_0x6b6cxa+=_0x6b6cx14+this[_0xb59f[657]],_0x6b6cx14=0};_0x6b6cx14=Math[_0xb59f[160]](_0x6b6cx14,_0x6b6cx3?_0x6b6cx18[_0xb59f[119]]:_0x6b6cx18[_0xb59f[117]]);null!=_0x6b6cx13?_0x6b6cx3?_0x6b6cx18[_0xb59f[235]]=_0x6b6cx13[_0xb59f[235]]+_0x6b6cx13[_0xb59f[117]]+this[_0xb59f[657]]:_0x6b6cx18[_0xb59f[236]]=_0x6b6cx13[_0xb59f[236]]+_0x6b6cx13[_0xb59f[119]]+this[_0xb59f[657]]:this[_0xb59f[1734]]||(_0x6b6cx3?_0x6b6cx18[_0xb59f[235]]=_0x6b6cxa:_0x6b6cx18[_0xb59f[236]]=_0x6b6cx12);_0x6b6cx3?_0x6b6cx18[_0xb59f[236]]=_0x6b6cx12:_0x6b6cx18[_0xb59f[235]]=_0x6b6cxa;this[_0xb59f[1334]]&&0<_0x6b6cx9&&(_0x6b6cx3?_0x6b6cx18[_0xb59f[119]]=_0x6b6cx9:_0x6b6cx18[_0xb59f[117]]=_0x6b6cx9);_0x6b6cx4[_0xb59f[1724]](_0x6b6cx17,_0x6b6cx18);_0x6b6cx13=_0x6b6cx18}}};this[_0xb59f[1735]]&&null!=_0x6b6cx5&&null!=_0x6b6cx13&&!this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx2)?(_0x6b6cx5=_0x6b6cx5[_0xb59f[238]](),_0x6b6cx3?_0x6b6cx5[_0xb59f[117]]=_0x6b6cx13[_0xb59f[235]]+_0x6b6cx13[_0xb59f[117]]+this[_0xb59f[657]]:_0x6b6cx5[_0xb59f[119]]=_0x6b6cx13[_0xb59f[236]]+_0x6b6cx13[_0xb59f[119]]+this[_0xb59f[657]],_0x6b6cx4[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx5)):this[_0xb59f[1736]]&&(null!=_0x6b6cx5&&null!=_0x6b6cx13)&&(_0x6b6cx3?_0x6b6cx13[_0xb59f[117]]=_0x6b6cx5[_0xb59f[117]]-_0x6b6cx13[_0xb59f[235]]-this[_0xb59f[657]]:_0x6b6cx13[_0xb59f[119]]=_0x6b6cx5[_0xb59f[119]]-_0x6b6cx13[_0xb59f[236]]-this[_0xb59f[657]])}finally{_0x6b6cx4[_0xb59f[476]]()}}};function mxPartitionLayout(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2);this[_0xb59f[662]]=null!=_0x6b6cx3?_0x6b6cx3:!0;this[_0xb59f[657]]=_0x6b6cx4||0;this[_0xb59f[467]]=_0x6b6cx5||0}mxPartitionLayout[_0xb59f[202]]= new mxGraphLayout;mxPartitionLayout[_0xb59f[202]][_0xb59f[196]]=mxPartitionLayout;mxPartitionLayout[_0xb59f[202]][_0xb59f[662]]=null;mxPartitionLayout[_0xb59f[202]][_0xb59f[657]]=null;mxPartitionLayout[_0xb59f[202]][_0xb59f[467]]=null;mxPartitionLayout[_0xb59f[202]][_0xb59f[1743]]= !0;mxPartitionLayout[_0xb59f[202]][_0xb59f[1737]]=function(){return this[_0xb59f[662]]};mxPartitionLayout[_0xb59f[202]][_0xb59f[1702]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]();var _0x6b6cx5=_0x6b6cx4[_0xb59f[1197]](_0x6b6cx2);if(null!=_0x6b6cx2&&null!=_0x6b6cx5){for(var _0x6b6cx9=0,_0x6b6cxa=0,_0x6b6cx12=_0x6b6cx4[_0xb59f[262]](_0x6b6cx5),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx12;_0x6b6cx9++){var _0x6b6cx13=_0x6b6cx4[_0xb59f[263]](_0x6b6cx5,_0x6b6cx9),_0x6b6cx13=this[_0xb59f[1726]](_0x6b6cx13);if(null!=_0x6b6cx13){_0x6b6cx13=_0x6b6cx13[_0xb59f[235]]+_0x6b6cx13[_0xb59f[117]]/2;if(_0x6b6cxa<_0x6b6cx3&&_0x6b6cx13>_0x6b6cx3){break};_0x6b6cxa=_0x6b6cx13}};_0x6b6cx3=_0x6b6cx5[_0xb59f[1738]](_0x6b6cx2);_0x6b6cx3=Math[_0xb59f[160]](0,_0x6b6cx9-(_0x6b6cx9>_0x6b6cx3?1:0));_0x6b6cx4[_0xb59f[99]](_0x6b6cx5,_0x6b6cx2,_0x6b6cx3)}};mxPartitionLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1737]](),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx2);if(null!=this[_0xb59f[1179]][_0xb59f[526]]&&(null==_0x6b6cx5&&_0x6b6cx4[_0xb59f[1740]](_0x6b6cx2)||_0x6b6cx2==this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1741]])){_0x6b6cx5= new mxRectangle(0,0,this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[359]]-1,this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[167]]-1)};if(null!=_0x6b6cx5){for(var _0x6b6cx9=[],_0x6b6cxa=_0x6b6cx4[_0xb59f[262]](_0x6b6cx2),_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa;_0x6b6cx12++){var _0x6b6cx13=_0x6b6cx4[_0xb59f[263]](_0x6b6cx2,_0x6b6cx12);!this[_0xb59f[1713]](_0x6b6cx13)&&this[_0xb59f[1711]](_0x6b6cx13)&&_0x6b6cx9[_0xb59f[207]](_0x6b6cx13)};_0x6b6cxa=_0x6b6cx9[_0xb59f[67]];if(0<_0x6b6cxa){var _0x6b6cx14=this[_0xb59f[467]],_0x6b6cx15=this[_0xb59f[467]],_0x6b6cx16=_0x6b6cx3?_0x6b6cx5[_0xb59f[119]]:_0x6b6cx5[_0xb59f[117]],_0x6b6cx16=_0x6b6cx16-2*this[_0xb59f[467]];_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx2)?this[_0xb59f[1179]][_0xb59f[1731]](_0x6b6cx2): new mxRectangle;_0x6b6cx16-=_0x6b6cx3?_0x6b6cx2[_0xb59f[119]]:_0x6b6cx2[_0xb59f[117]];_0x6b6cx14+=_0x6b6cx2[_0xb59f[117]];_0x6b6cx15+=_0x6b6cx2[_0xb59f[119]];_0x6b6cx2=this[_0xb59f[467]]+(_0x6b6cxa-1)*this[_0xb59f[657]];_0x6b6cx5=_0x6b6cx3?(_0x6b6cx5[_0xb59f[117]]-_0x6b6cx14-_0x6b6cx2)/_0x6b6cxa:(_0x6b6cx5[_0xb59f[119]]-_0x6b6cx15-_0x6b6cx2)/_0x6b6cxa;if(0<_0x6b6cx5){_0x6b6cx4[_0xb59f[473]]();try{for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa;_0x6b6cx12++){var _0x6b6cx13=_0x6b6cx9[_0x6b6cx12],_0x6b6cx17=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx13);null!=_0x6b6cx17&&(_0x6b6cx17=_0x6b6cx17[_0xb59f[238]](),_0x6b6cx17[_0xb59f[235]]=_0x6b6cx14,_0x6b6cx17[_0xb59f[236]]=_0x6b6cx15,_0x6b6cx3?(this[_0xb59f[1743]]&&(_0x6b6cx17[_0xb59f[117]]=_0x6b6cx5,_0x6b6cx17[_0xb59f[119]]=_0x6b6cx16),_0x6b6cx14+=_0x6b6cx5+this[_0xb59f[657]]):(this[_0xb59f[1743]]&&(_0x6b6cx17[_0xb59f[119]]=_0x6b6cx5,_0x6b6cx17[_0xb59f[117]]=_0x6b6cx16),_0x6b6cx15+=_0x6b6cx5+this[_0xb59f[657]]),_0x6b6cx4[_0xb59f[1724]](_0x6b6cx13,_0x6b6cx17))}}finally{_0x6b6cx4[_0xb59f[476]]()}}}}};function mxCompactTreeLayout(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2);this[_0xb59f[662]]=null!=_0x6b6cx3?_0x6b6cx3:!0;this[_0xb59f[1744]]=null!=_0x6b6cx4?_0x6b6cx4:!1}mxCompactTreeLayout[_0xb59f[202]]= new mxGraphLayout;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[196]]=mxCompactTreeLayout;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[662]]=null;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1744]]=null;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1735]]= !0;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1745]]=10;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1746]]=null;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1747]]= !1;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1748]]=10;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1749]]=20;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1750]]= !0;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1751]]=5;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1752]]=4;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1753]]=8;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1754]]=4;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1755]]= !0;mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1713]]=function(_0x6b6cx2){return mxGraphLayout[_0xb59f[202]][_0xb59f[1713]][_0xb59f[183]](this,arguments)||0==this[_0xb59f[1179]][_0xb59f[1756]](_0x6b6cx2)[_0xb59f[67]]};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1737]]=function(){return this[_0xb59f[662]]};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1101]]=_0x6b6cx2;var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]();if(null==_0x6b6cx3){if(0<this[_0xb59f[1179]][_0xb59f[264]](_0x6b6cx2,_0x6b6cx4[_0xb59f[1197]](_0x6b6cx2),this[_0xb59f[1744]],!this[_0xb59f[1744]],!1)[_0xb59f[67]]){_0x6b6cx3=_0x6b6cx2}else {var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1757]](_0x6b6cx2,!0,this[_0xb59f[1744]]);if(0<_0x6b6cx5[_0xb59f[67]]){for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5[_0xb59f[67]];_0x6b6cx9++){if(!this[_0xb59f[1713]](_0x6b6cx5[_0x6b6cx9])&&0<this[_0xb59f[1179]][_0xb59f[264]](_0x6b6cx5[_0x6b6cx9],null,this[_0xb59f[1744]],!this[_0xb59f[1744]],!1)[_0xb59f[67]]){_0x6b6cx3=_0x6b6cx5[_0x6b6cx9];break}}}}};if(null!=_0x6b6cx3){this[_0xb59f[1746]]=this[_0xb59f[1735]]?{}:null;_0x6b6cx4[_0xb59f[473]]();try{var _0x6b6cxa=this[_0xb59f[1758]](_0x6b6cx3,_0x6b6cx2);if(null!=_0x6b6cxa){this[_0xb59f[1759]](_0x6b6cxa);var _0x6b6cx12=this[_0xb59f[1179]][_0xb59f[1020]],_0x6b6cx5=_0x6b6cx12;if(!this[_0xb59f[1747]]){var _0x6b6cx13=this[_0xb59f[1726]](_0x6b6cx3);null!=_0x6b6cx13&&(_0x6b6cx12=_0x6b6cx13[_0xb59f[235]],_0x6b6cx5=_0x6b6cx13[_0xb59f[236]])};_0x6b6cx13=null;_0x6b6cx13=this[_0xb59f[1737]]()?this[_0xb59f[1760]](_0x6b6cxa,_0x6b6cx12,_0x6b6cx5):this[_0xb59f[1761]](_0x6b6cxa,null,_0x6b6cx12,_0x6b6cx5);if(null!=_0x6b6cx13){var _0x6b6cx14=_0x6b6cx9=0;0>_0x6b6cx13[_0xb59f[235]]&&(_0x6b6cx9=Math[_0xb59f[425]](_0x6b6cx12-_0x6b6cx13[_0xb59f[235]]));0>_0x6b6cx13[_0xb59f[236]]&&(_0x6b6cx14=Math[_0xb59f[425]](_0x6b6cx5-_0x6b6cx13[_0xb59f[236]]));(0!=_0x6b6cx9||0!=_0x6b6cx14)&&this[_0xb59f[1762]](_0x6b6cxa,_0x6b6cx9,_0x6b6cx14);this[_0xb59f[1735]]&&this[_0xb59f[1763]]();this[_0xb59f[1755]]&&this[_0xb59f[1764]](_0x6b6cxa)}}}finally{_0x6b6cx4[_0xb59f[476]]()}}};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1762]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2[_0xb59f[235]]+=_0x6b6cx3;_0x6b6cx2[_0xb59f[236]]+=_0x6b6cx4;this[_0xb59f[183]](_0x6b6cx2);for(_0x6b6cx2=_0x6b6cx2[_0xb59f[247]];null!=_0x6b6cx2;){this[_0xb59f[1762]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4),_0x6b6cx2=_0x6b6cx2[_0xb59f[1765]]}};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1758]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:[];var _0x6b6cx5=mxCellPath[_0xb59f[385]](_0x6b6cx2),_0x6b6cx9=null;if(null!=_0x6b6cx2&&null==_0x6b6cx4[_0x6b6cx5]&&!this[_0xb59f[1713]](_0x6b6cx2)){_0x6b6cx4[_0x6b6cx5]=_0x6b6cx2;var _0x6b6cx9=this[_0xb59f[1766]](_0x6b6cx2),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cxa=null;_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[264]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[1744]],!this[_0xb59f[1744]],!1,!0);for(var _0x6b6cx12=this[_0xb59f[1179]][_0xb59f[249]](),_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx2[_0xb59f[67]];_0x6b6cx13++){var _0x6b6cx14=_0x6b6cx2[_0x6b6cx13];if(!this[_0xb59f[1715]](_0x6b6cx14)){this[_0xb59f[1750]]&&this[_0xb59f[1722]](_0x6b6cx14,null);this[_0xb59f[1755]]&&(this[_0xb59f[1716]](_0x6b6cx14,!1),this[_0xb59f[1722]](_0x6b6cx14,null));var _0x6b6cx15=_0x6b6cx12[_0xb59f[248]](_0x6b6cx14),_0x6b6cx14=null!=_0x6b6cx15?_0x6b6cx15[_0xb59f[1710]](this[_0xb59f[1744]]):_0x6b6cx12[_0xb59f[1710]](_0x6b6cx14,this[_0xb59f[1744]]),_0x6b6cx15=this[_0xb59f[1758]](_0x6b6cx14,_0x6b6cx3,_0x6b6cx4);null!=_0x6b6cx15&&null!=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx14)&&(null==_0x6b6cxa?_0x6b6cx9[_0xb59f[247]]=_0x6b6cx15:_0x6b6cxa[_0xb59f[1765]]=_0x6b6cx15,_0x6b6cxa=_0x6b6cx15)}}};return _0x6b6cx9};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1759]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){for(var _0x6b6cx3=_0x6b6cx2[_0xb59f[247]];null!=_0x6b6cx3;){this[_0xb59f[1759]](_0x6b6cx3),_0x6b6cx3=_0x6b6cx3[_0xb59f[1765]]};null!=_0x6b6cx2[_0xb59f[247]]?this[_0xb59f[1767]](_0x6b6cx2,this[_0xb59f[234]](_0x6b6cx2)):this[_0xb59f[1768]](_0x6b6cx2)}};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1760]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx2[_0xb59f[235]]+=_0x6b6cx3+_0x6b6cx2[_0xb59f[1769]];_0x6b6cx2[_0xb59f[236]]+=_0x6b6cx4+_0x6b6cx2[_0xb59f[1770]];_0x6b6cx5=this[_0xb59f[183]](_0x6b6cx2,_0x6b6cx5);_0x6b6cx3=_0x6b6cx2[_0xb59f[247]];if(null!=_0x6b6cx3){_0x6b6cx5=this[_0xb59f[1760]](_0x6b6cx3,_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],_0x6b6cx5);_0x6b6cx4=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx3[_0xb59f[1770]];for(var _0x6b6cx9=_0x6b6cx3[_0xb59f[1765]];null!=_0x6b6cx9;){_0x6b6cx5=this[_0xb59f[1760]](_0x6b6cx9,_0x6b6cx2[_0xb59f[235]]+_0x6b6cx3[_0xb59f[1769]],_0x6b6cx4,_0x6b6cx5),_0x6b6cx4+=_0x6b6cx9[_0xb59f[1770]],_0x6b6cx9=_0x6b6cx9[_0xb59f[1765]]}};return _0x6b6cx5};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1761]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[235]]+=_0x6b6cx4+_0x6b6cx2[_0xb59f[1770]];_0x6b6cx2[_0xb59f[236]]+=_0x6b6cx5+_0x6b6cx2[_0xb59f[1769]];_0x6b6cx9=this[_0xb59f[183]](_0x6b6cx2,_0x6b6cx9);_0x6b6cx3=_0x6b6cx2[_0xb59f[247]];if(null!=_0x6b6cx3){_0x6b6cx9=this[_0xb59f[1761]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],_0x6b6cx9);_0x6b6cx4=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx3[_0xb59f[1770]];for(_0x6b6cx5=_0x6b6cx3[_0xb59f[1765]];null!=_0x6b6cx5;){_0x6b6cx9=this[_0xb59f[1761]](_0x6b6cx5,_0x6b6cx2,_0x6b6cx4,_0x6b6cx2[_0xb59f[236]]+_0x6b6cx3[_0xb59f[1769]],_0x6b6cx9),_0x6b6cx4+=_0x6b6cx5[_0xb59f[1770]],_0x6b6cx5=_0x6b6cx5[_0xb59f[1765]]}};return _0x6b6cx9};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1767]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1749]]+this[_0xb59f[1748]],_0x6b6cx5=(_0x6b6cx3-_0x6b6cx2[_0xb59f[117]])/2-this[_0xb59f[1749]],_0x6b6cx9=_0x6b6cx5+_0x6b6cx2[_0xb59f[117]]+2*this[_0xb59f[1749]]-_0x6b6cx3;_0x6b6cx2[_0xb59f[247]][_0xb59f[1769]]=_0x6b6cx4+_0x6b6cx2[_0xb59f[119]];_0x6b6cx2[_0xb59f[247]][_0xb59f[1770]]=_0x6b6cx9;_0x6b6cx2[_0xb59f[1772]][_0xb59f[1771]]=this[_0xb59f[1773]](_0x6b6cx2[_0xb59f[119]],0,this[_0xb59f[1773]](_0x6b6cx4,_0x6b6cx9,_0x6b6cx2[_0xb59f[1772]][_0xb59f[1771]]));_0x6b6cx2[_0xb59f[1772]][_0xb59f[1774]]=this[_0xb59f[1773]](_0x6b6cx2[_0xb59f[119]],0,this[_0xb59f[1773]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx2[_0xb59f[1772]][_0xb59f[1774]]))};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1768]]=function(_0x6b6cx2){var _0x6b6cx3=2*this[_0xb59f[1749]];_0x6b6cx2[_0xb59f[1772]][_0xb59f[1775]]=this[_0xb59f[1773]](_0x6b6cx2[_0xb59f[119]]+_0x6b6cx3,0);_0x6b6cx2[_0xb59f[1772]][_0xb59f[1771]]=_0x6b6cx2[_0xb59f[1772]][_0xb59f[1775]];_0x6b6cx2[_0xb59f[1772]][_0xb59f[1776]]=this[_0xb59f[1773]](0,-_0x6b6cx2[_0xb59f[117]]-_0x6b6cx3);_0x6b6cx2[_0xb59f[1772]][_0xb59f[1774]]=this[_0xb59f[1773]](_0x6b6cx2[_0xb59f[119]]+_0x6b6cx3,0,_0x6b6cx2[_0xb59f[1772]][_0xb59f[1776]])};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[234]]=function(_0x6b6cx2){var _0x6b6cx3=2*this[_0xb59f[1749]],_0x6b6cx4=_0x6b6cx2[_0xb59f[247]];_0x6b6cx2[_0xb59f[1772]]=_0x6b6cx4[_0xb59f[1772]];for(var _0x6b6cx5=_0x6b6cx4[_0xb59f[117]]+_0x6b6cx3,_0x6b6cx9=_0x6b6cx5,_0x6b6cx4=_0x6b6cx4[_0xb59f[1765]];null!=_0x6b6cx4;){var _0x6b6cxa=this[_0xb59f[1777]](_0x6b6cx2[_0xb59f[1772]],_0x6b6cx4[_0xb59f[1772]]);_0x6b6cx4[_0xb59f[1770]]=_0x6b6cxa+_0x6b6cx5;_0x6b6cx4[_0xb59f[1769]]=0;_0x6b6cx5=_0x6b6cx4[_0xb59f[117]]+_0x6b6cx3;_0x6b6cx9+=_0x6b6cxa+_0x6b6cx5;_0x6b6cx4=_0x6b6cx4[_0xb59f[1765]]};return _0x6b6cx9};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1777]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=0,_0x6b6cx5=0,_0x6b6cx9=0,_0x6b6cxa=_0x6b6cx2[_0xb59f[1774]],_0x6b6cx12=_0x6b6cx3[_0xb59f[1771]];null!=_0x6b6cx12&&null!=_0x6b6cxa;){var _0x6b6cx13=this[_0xb59f[1368]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx12[_0xb59f[1126]],_0x6b6cx12[_0xb59f[1125]],_0x6b6cxa[_0xb59f[1126]],_0x6b6cxa[_0xb59f[1125]]),_0x6b6cx5=_0x6b6cx5+_0x6b6cx13,_0x6b6cx9=_0x6b6cx9+_0x6b6cx13;_0x6b6cx4+_0x6b6cx12[_0xb59f[1126]]<=_0x6b6cxa[_0xb59f[1126]]?(_0x6b6cx4+=_0x6b6cx12[_0xb59f[1126]],_0x6b6cx5+=_0x6b6cx12[_0xb59f[1125]],_0x6b6cx12=_0x6b6cx12[_0xb59f[1765]]):(_0x6b6cx4-=_0x6b6cxa[_0xb59f[1126]],_0x6b6cx5-=_0x6b6cxa[_0xb59f[1125]],_0x6b6cxa=_0x6b6cxa[_0xb59f[1765]])};null!=_0x6b6cx12?(_0x6b6cx4=this[_0xb59f[1778]](_0x6b6cx2[_0xb59f[1775]],0,0,_0x6b6cx12,_0x6b6cx4,_0x6b6cx5),_0x6b6cx2[_0xb59f[1775]]=null!=_0x6b6cx4[_0xb59f[1765]]?_0x6b6cx3[_0xb59f[1775]]:_0x6b6cx4,_0x6b6cx2[_0xb59f[1776]]=_0x6b6cx3[_0xb59f[1776]]):(_0x6b6cx4=this[_0xb59f[1778]](_0x6b6cx3[_0xb59f[1776]],_0x6b6cx4,_0x6b6cx5,_0x6b6cxa,0,0),null==_0x6b6cx4[_0xb59f[1765]]&&(_0x6b6cx2[_0xb59f[1776]]=_0x6b6cx4));_0x6b6cx2[_0xb59f[1774]]=_0x6b6cx3[_0xb59f[1774]];return _0x6b6cx9};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1368]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){var _0x6b6cx12=0;if(_0x6b6cx9<=_0x6b6cx2||0>=_0x6b6cx2+_0x6b6cx4){return 0};_0x6b6cx12=0<_0x6b6cx9*_0x6b6cx5-_0x6b6cx4*_0x6b6cxa?0>_0x6b6cx2?_0x6b6cx2*_0x6b6cx5/_0x6b6cx4-_0x6b6cx3:0<_0x6b6cx2?_0x6b6cx2*_0x6b6cxa/_0x6b6cx9-_0x6b6cx3:-_0x6b6cx3:_0x6b6cx9<_0x6b6cx2+_0x6b6cx4?_0x6b6cxa-(_0x6b6cx3+(_0x6b6cx9-_0x6b6cx2)*_0x6b6cx5/_0x6b6cx4):_0x6b6cx9>_0x6b6cx2+_0x6b6cx4?(_0x6b6cx4+_0x6b6cx2)*_0x6b6cxa/_0x6b6cx9-(_0x6b6cx3+_0x6b6cx5):_0x6b6cxa-(_0x6b6cx3+_0x6b6cx5);return 0<_0x6b6cx12?_0x6b6cx12:0};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1778]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx3=_0x6b6cx9+_0x6b6cx5[_0xb59f[1126]]-_0x6b6cx3;_0x6b6cx9=_0x6b6cx9=0;0==_0x6b6cx5[_0xb59f[1126]]?_0x6b6cx9=_0x6b6cx5[_0xb59f[1125]]:(_0x6b6cx9=_0x6b6cx3*_0x6b6cx5[_0xb59f[1125]],_0x6b6cx9/=_0x6b6cx5[_0xb59f[1126]]);_0x6b6cx3=this[_0xb59f[1773]](_0x6b6cx3,_0x6b6cx9,_0x6b6cx5[_0xb59f[1765]]);_0x6b6cx2[_0xb59f[1765]]=this[_0xb59f[1773]](0,_0x6b6cxa+_0x6b6cx5[_0xb59f[1125]]-_0x6b6cx9-_0x6b6cx4,_0x6b6cx3);return _0x6b6cx3};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1766]]=function(_0x6b6cx2){var _0x6b6cx3={};_0x6b6cx3[_0xb59f[246]]=_0x6b6cx2;_0x6b6cx3[_0xb59f[235]]=0;_0x6b6cx3[_0xb59f[236]]=0;_0x6b6cx3[_0xb59f[117]]=0;_0x6b6cx3[_0xb59f[119]]=0;_0x6b6cx2=this[_0xb59f[1726]](_0x6b6cx2);null!=_0x6b6cx2&&(this[_0xb59f[1737]]()?(_0x6b6cx3[_0xb59f[117]]=_0x6b6cx2[_0xb59f[119]],_0x6b6cx3[_0xb59f[119]]=_0x6b6cx2[_0xb59f[117]]):(_0x6b6cx3[_0xb59f[117]]=_0x6b6cx2[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]]=_0x6b6cx2[_0xb59f[119]]));_0x6b6cx3[_0xb59f[1769]]=0;_0x6b6cx3[_0xb59f[1770]]=0;_0x6b6cx3[_0xb59f[1772]]={};return _0x6b6cx3};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[183]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=_0x6b6cx2[_0xb59f[246]],_0x6b6cx9=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx5);null!=_0x6b6cx5&&null!=_0x6b6cx9&&(this[_0xb59f[1711]](_0x6b6cx5)&&(_0x6b6cx9=this[_0xb59f[1725]](_0x6b6cx5,_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]),this[_0xb59f[1735]]&&(_0x6b6cx4=_0x6b6cx4[_0xb59f[1197]](_0x6b6cx5),_0x6b6cx5=mxCellPath[_0xb59f[385]](_0x6b6cx4),null==this[_0xb59f[1746]][_0x6b6cx5]&&(this[_0xb59f[1746]][_0x6b6cx5]=_0x6b6cx4))),_0x6b6cx3=null==_0x6b6cx3? new mxRectangle(_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]],_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]]): new mxRectangle(Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx9[_0xb59f[235]]),Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[236]],_0x6b6cx9[_0xb59f[236]]),Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]],_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]]),Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]],_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]])));return _0x6b6cx3};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1773]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5={};_0x6b6cx5[_0xb59f[1126]]=_0x6b6cx2;_0x6b6cx5[_0xb59f[1125]]=_0x6b6cx3;_0x6b6cx5[_0xb59f[1765]]=_0x6b6cx4;return _0x6b6cx5};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1763]]=function(){var _0x6b6cx2=[],_0x6b6cx3;for(_0x6b6cx3 in this[_0xb59f[1746]]){_0x6b6cx2[_0xb59f[207]](this[_0xb59f[1746]][_0x6b6cx3])};this[_0xb59f[1727]](mxUtils[_0xb59f[1779]](_0x6b6cx2,!0),this[_0xb59f[1745]])};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1764]]=function(_0x6b6cx2){this[_0xb59f[1780]](_0x6b6cx2);for(_0x6b6cx2=_0x6b6cx2[_0xb59f[247]];null!=_0x6b6cx2;){this[_0xb59f[1764]](_0x6b6cx2),_0x6b6cx2=_0x6b6cx2[_0xb59f[1765]]}};mxCompactTreeLayout[_0xb59f[202]][_0xb59f[1780]]=function(_0x6b6cx2){for(var _0x6b6cx3=_0x6b6cx2[_0xb59f[247]],_0x6b6cx4=_0x6b6cx2[_0xb59f[246]],_0x6b6cx5=0,_0x6b6cx9=[];null!=_0x6b6cx3;){_0x6b6cx5++;var _0x6b6cxa=_0x6b6cx3[_0xb59f[235]];this[_0xb59f[662]]&&(_0x6b6cxa=_0x6b6cx3[_0xb59f[236]]);_0x6b6cx9[_0xb59f[207]]( new WeightedCellSorter(_0x6b6cx3,_0x6b6cxa));_0x6b6cx3=_0x6b6cx3[_0xb59f[1765]]};_0x6b6cx9[_0xb59f[470]](WeightedCellSorter[_0xb59f[202]][_0xb59f[469]]);var _0x6b6cxa=_0x6b6cx2[_0xb59f[117]],_0x6b6cx12=(_0x6b6cx5+1)*this[_0xb59f[1751]];_0x6b6cxa>_0x6b6cx12+2*this[_0xb59f[1751]]&&(_0x6b6cxa-=2*this[_0xb59f[1751]]);_0x6b6cx2=_0x6b6cxa/_0x6b6cx5;_0x6b6cx3=_0x6b6cx2/2;_0x6b6cxa>_0x6b6cx12+2*this[_0xb59f[1751]]&&(_0x6b6cx3+=this[_0xb59f[1751]]);for(var _0x6b6cxa=this[_0xb59f[1753]]-this[_0xb59f[1752]],_0x6b6cx12=0,_0x6b6cx13=this[_0xb59f[1726]](_0x6b6cx4),_0x6b6cx14=0;_0x6b6cx14<_0x6b6cx9[_0xb59f[67]];_0x6b6cx14++){for(var _0x6b6cx15=_0x6b6cx9[_0x6b6cx14][_0xb59f[246]][_0xb59f[246]],_0x6b6cx16=this[_0xb59f[1726]](_0x6b6cx15),_0x6b6cx15=this[_0xb59f[1179]][_0xb59f[1781]](_0x6b6cx4,_0x6b6cx15,!1),_0x6b6cx17=[],_0x6b6cx18=0,_0x6b6cx19=0,_0x6b6cx1a=0;_0x6b6cx1a<_0x6b6cx15[_0xb59f[67]];_0x6b6cx1a++){this[_0xb59f[662]]?(_0x6b6cx18=_0x6b6cx13[_0xb59f[235]]+_0x6b6cx13[_0xb59f[117]],_0x6b6cx19=_0x6b6cx13[_0xb59f[236]]+_0x6b6cx3,_0x6b6cx17[_0xb59f[207]]( new mxPoint(_0x6b6cx18,_0x6b6cx19)),_0x6b6cx18=_0x6b6cx13[_0xb59f[235]]+_0x6b6cx13[_0xb59f[117]]+_0x6b6cxa,_0x6b6cx17[_0xb59f[207]]( new mxPoint(_0x6b6cx18,_0x6b6cx19)),_0x6b6cx19=_0x6b6cx16[_0xb59f[236]]+_0x6b6cx16[_0xb59f[119]]/2):(_0x6b6cx18=_0x6b6cx13[_0xb59f[235]]+_0x6b6cx3,_0x6b6cx19=_0x6b6cx13[_0xb59f[236]]+_0x6b6cx13[_0xb59f[119]],_0x6b6cx17[_0xb59f[207]]( new mxPoint(_0x6b6cx18,_0x6b6cx19)),_0x6b6cx19=_0x6b6cx13[_0xb59f[236]]+_0x6b6cx13[_0xb59f[119]]+_0x6b6cxa,_0x6b6cx17[_0xb59f[207]]( new mxPoint(_0x6b6cx18,_0x6b6cx19)),_0x6b6cx18=_0x6b6cx16[_0xb59f[235]]+_0x6b6cx16[_0xb59f[117]]/2),_0x6b6cx17[_0xb59f[207]]( new mxPoint(_0x6b6cx18,_0x6b6cx19)),this[_0xb59f[1722]](_0x6b6cx15[_0x6b6cx1a],_0x6b6cx17)};_0x6b6cx14<_0x6b6cx5/2?_0x6b6cxa+=this[_0xb59f[1752]]:_0x6b6cx14>_0x6b6cx5/2&&(_0x6b6cxa-=this[_0xb59f[1752]]);_0x6b6cx3+=_0x6b6cx2;_0x6b6cx12=Math[_0xb59f[160]](_0x6b6cx12,_0x6b6cxa)}};function WeightedCellSorter(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[246]]=_0x6b6cx2;this[_0xb59f[1782]]=_0x6b6cx3}WeightedCellSorter[_0xb59f[202]][_0xb59f[1782]]=0;WeightedCellSorter[_0xb59f[202]][_0xb59f[1783]]= !1;WeightedCellSorter[_0xb59f[202]][_0xb59f[1784]]= !1;WeightedCellSorter[_0xb59f[202]][_0xb59f[1785]]=null;WeightedCellSorter[_0xb59f[202]][_0xb59f[246]]=null;WeightedCellSorter[_0xb59f[202]][_0xb59f[469]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2&&null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[1782]]>_0x6b6cx2[_0xb59f[1782]]?1:_0x6b6cx3[_0xb59f[1782]]<_0x6b6cx2[_0xb59f[1782]]?-1:_0x6b6cx3[_0xb59f[1783]]?1:-1:0};function mxFastOrganicLayout(_0x6b6cx2){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2)}mxFastOrganicLayout[_0xb59f[202]]= new mxGraphLayout;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[196]]=mxFastOrganicLayout;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1786]]= !0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1750]]= !0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1787]]= !0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1788]]=50;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1789]]=0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1790]]=2;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1791]]=500;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1792]]=4;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1793]]=200;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1794]]=0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1795]]=0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1796]]=0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1797]]= !0;mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1713]]=function(_0x6b6cx2){return mxGraphLayout[_0xb59f[202]][_0xb59f[1713]][_0xb59f[183]](this,arguments)||0==this[_0xb59f[1179]][_0xb59f[1756]](_0x6b6cx2)[_0xb59f[67]]};mxFastOrganicLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]();this[_0xb59f[1798]]=[];for(var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1728]](_0x6b6cx2),_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]];_0x6b6cx5++){this[_0xb59f[1713]](_0x6b6cx4[_0x6b6cx5])||this[_0xb59f[1798]][_0xb59f[207]](_0x6b6cx4[_0x6b6cx5])};var _0x6b6cx9=this[_0xb59f[1786]]?this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[1799]](this[_0xb59f[1798]]):null,_0x6b6cxa=this[_0xb59f[1798]][_0xb59f[67]];this[_0xb59f[1800]]=[];this[_0xb59f[1801]]=[];this[_0xb59f[1802]]=[];this[_0xb59f[1803]]=[];this[_0xb59f[1804]]=[];this[_0xb59f[1805]]=[];this[_0xb59f[1806]]=[];this[_0xb59f[1807]]=[];0.0010>this[_0xb59f[1788]]&&(this[_0xb59f[1788]]=0.0010);this[_0xb59f[1789]]=this[_0xb59f[1788]]*this[_0xb59f[1788]];for(_0x6b6cx5=0;_0x6b6cx5<this[_0xb59f[1798]][_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx12=this[_0xb59f[1798]][_0x6b6cx5];this[_0xb59f[1803]][_0x6b6cx5]=[];var _0x6b6cx13=mxCellPath[_0xb59f[385]](_0x6b6cx12);this[_0xb59f[1800]][_0x6b6cx13]=_0x6b6cx5;var _0x6b6cx14=this[_0xb59f[1726]](_0x6b6cx12),_0x6b6cx15=_0x6b6cx14[_0xb59f[117]],_0x6b6cx16=_0x6b6cx14[_0xb59f[119]],_0x6b6cx17=_0x6b6cx14[_0xb59f[235]],_0x6b6cx18=_0x6b6cx14[_0xb59f[236]];this[_0xb59f[1803]][_0x6b6cx5][0]=_0x6b6cx17+_0x6b6cx15/2;this[_0xb59f[1803]][_0x6b6cx5][1]=_0x6b6cx18+_0x6b6cx16/2;this[_0xb59f[1806]][_0x6b6cx5]=Math[_0xb59f[243]](_0x6b6cx15,_0x6b6cx16);this[_0xb59f[1807]][_0x6b6cx5]=this[_0xb59f[1806]][_0x6b6cx5]*this[_0xb59f[1806]][_0x6b6cx5]};_0x6b6cx3[_0xb59f[473]]();try{for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cxa;_0x6b6cx5++){this[_0xb59f[1801]][_0x6b6cx5]=0;this[_0xb59f[1802]][_0x6b6cx5]=0;this[_0xb59f[1804]][_0x6b6cx5]=this[_0xb59f[1711]](this[_0xb59f[1798]][_0x6b6cx5]);var _0x6b6cx19=this[_0xb59f[1179]][_0xb59f[1756]](this[_0xb59f[1798]][_0x6b6cx5],_0x6b6cx2),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1808]](_0x6b6cx19,this[_0xb59f[1798]][_0x6b6cx5]);this[_0xb59f[1805]][_0x6b6cx5]=[];for(_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx4[_0xb59f[67]];_0x6b6cx15++){this[_0xb59f[1750]]&&this[_0xb59f[1179]][_0xb59f[1809]](_0x6b6cx19[_0x6b6cx15]);this[_0xb59f[1787]]&&this[_0xb59f[1716]](_0x6b6cx19[_0x6b6cx15],!1);var _0x6b6cx13=mxCellPath[_0xb59f[385]](_0x6b6cx4[_0x6b6cx15]),_0x6b6cx1a=this[_0xb59f[1800]][_0x6b6cx13];this[_0xb59f[1805]][_0x6b6cx5][_0x6b6cx15]=null!=_0x6b6cx1a?_0x6b6cx1a:_0x6b6cx5}};this[_0xb59f[1794]]=this[_0xb59f[1793]];0==this[_0xb59f[1795]]&&(this[_0xb59f[1795]]=20*Math[_0xb59f[428]](_0x6b6cxa));for(this[_0xb59f[1796]]=0;this[_0xb59f[1796]]<this[_0xb59f[1795]];this[_0xb59f[1796]]++){if(!this[_0xb59f[1797]]){return};this[_0xb59f[1810]]();this[_0xb59f[1811]]();this[_0xb59f[1812]]();this[_0xb59f[1813]]()};_0x6b6cx2=_0x6b6cx4=null;for(_0x6b6cx5=0;_0x6b6cx5<this[_0xb59f[1798]][_0xb59f[67]];_0x6b6cx5++){_0x6b6cx12=this[_0xb59f[1798]][_0x6b6cx5],this[_0xb59f[1711]](_0x6b6cx12)&&(_0x6b6cx14=this[_0xb59f[1726]](_0x6b6cx12),null!=_0x6b6cx14&&(this[_0xb59f[1803]][_0x6b6cx5][0]-=_0x6b6cx14[_0xb59f[117]]/2,this[_0xb59f[1803]][_0x6b6cx5][1]-=_0x6b6cx14[_0xb59f[119]]/2,_0x6b6cx17=this[_0xb59f[1179]][_0xb59f[1021]](this[_0xb59f[1803]][_0x6b6cx5][0]),_0x6b6cx18=this[_0xb59f[1179]][_0xb59f[1021]](this[_0xb59f[1803]][_0x6b6cx5][1]),this[_0xb59f[1725]](_0x6b6cx12,_0x6b6cx17,_0x6b6cx18),_0x6b6cx4=null==_0x6b6cx4?_0x6b6cx17:Math[_0xb59f[243]](_0x6b6cx4,_0x6b6cx17),_0x6b6cx2=null==_0x6b6cx2?_0x6b6cx18:Math[_0xb59f[243]](_0x6b6cx2,_0x6b6cx18)))};_0x6b6cx5=-(_0x6b6cx4||0)+1;_0x6b6cx12=-(_0x6b6cx2||0)+1;null!=_0x6b6cx9&&(_0x6b6cx5+=_0x6b6cx9[_0xb59f[235]],_0x6b6cx12+=_0x6b6cx9[_0xb59f[236]]);this[_0xb59f[1179]][_0xb59f[834]](this[_0xb59f[1798]],_0x6b6cx5,_0x6b6cx12)}finally{_0x6b6cx3[_0xb59f[476]]()}};mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1812]]=function(){for(var _0x6b6cx2=0;_0x6b6cx2<this[_0xb59f[1798]][_0xb59f[67]];_0x6b6cx2++){if(this[_0xb59f[1804]][_0x6b6cx2]){var _0x6b6cx3=Math[_0xb59f[428]](this[_0xb59f[1801]][_0x6b6cx2]*this[_0xb59f[1801]][_0x6b6cx2]+this[_0xb59f[1802]][_0x6b6cx2]*this[_0xb59f[1802]][_0x6b6cx2]);0.0010>_0x6b6cx3&&(_0x6b6cx3=0.0010);var _0x6b6cx4=this[_0xb59f[1801]][_0x6b6cx2]/_0x6b6cx3*Math[_0xb59f[243]](_0x6b6cx3,this[_0xb59f[1794]]),_0x6b6cx3=this[_0xb59f[1802]][_0x6b6cx2]/_0x6b6cx3*Math[_0xb59f[243]](_0x6b6cx3,this[_0xb59f[1794]]);this[_0xb59f[1801]][_0x6b6cx2]=0;this[_0xb59f[1802]][_0x6b6cx2]=0;this[_0xb59f[1803]][_0x6b6cx2][0]+=_0x6b6cx4;this[_0xb59f[1803]][_0x6b6cx2][1]+=_0x6b6cx3}}};mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1811]]=function(){for(var _0x6b6cx2=0;_0x6b6cx2<this[_0xb59f[1798]][_0xb59f[67]];_0x6b6cx2++){for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1805]][_0x6b6cx2][_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx4=this[_0xb59f[1805]][_0x6b6cx2][_0x6b6cx3];if(_0x6b6cx2!=_0x6b6cx4&&this[_0xb59f[1804]][_0x6b6cx2]&&this[_0xb59f[1804]][_0x6b6cx4]){var _0x6b6cx5=this[_0xb59f[1803]][_0x6b6cx2][0]-this[_0xb59f[1803]][_0x6b6cx4][0],_0x6b6cx9=this[_0xb59f[1803]][_0x6b6cx2][1]-this[_0xb59f[1803]][_0x6b6cx4][1],_0x6b6cxa=_0x6b6cx5*_0x6b6cx5+_0x6b6cx9*_0x6b6cx9-this[_0xb59f[1807]][_0x6b6cx2]-this[_0xb59f[1807]][_0x6b6cx4];_0x6b6cxa<this[_0xb59f[1792]]&&(_0x6b6cxa=this[_0xb59f[1792]]);var _0x6b6cx12=Math[_0xb59f[428]](_0x6b6cxa),_0x6b6cxa=_0x6b6cxa/this[_0xb59f[1788]],_0x6b6cx5=_0x6b6cx5/_0x6b6cx12*_0x6b6cxa,_0x6b6cx9=_0x6b6cx9/_0x6b6cx12*_0x6b6cxa;this[_0xb59f[1801]][_0x6b6cx2]-=_0x6b6cx5;this[_0xb59f[1802]][_0x6b6cx2]-=_0x6b6cx9;this[_0xb59f[1801]][_0x6b6cx4]+=_0x6b6cx5;this[_0xb59f[1802]][_0x6b6cx4]+=_0x6b6cx9}}}};mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1810]]=function(){for(var _0x6b6cx2=this[_0xb59f[1798]][_0xb59f[67]],_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2;_0x6b6cx3++){for(var _0x6b6cx4=_0x6b6cx3;_0x6b6cx4<_0x6b6cx2;_0x6b6cx4++){if(!this[_0xb59f[1797]]){return};if(_0x6b6cx4!=_0x6b6cx3&&this[_0xb59f[1804]][_0x6b6cx3]&&this[_0xb59f[1804]][_0x6b6cx4]){var _0x6b6cx5=this[_0xb59f[1803]][_0x6b6cx3][0]-this[_0xb59f[1803]][_0x6b6cx4][0],_0x6b6cx9=this[_0xb59f[1803]][_0x6b6cx3][1]-this[_0xb59f[1803]][_0x6b6cx4][1];0==_0x6b6cx5&&(_0x6b6cx5=0.01+Math[_0xb59f[1814]]());0==_0x6b6cx9&&(_0x6b6cx9=0.01+Math[_0xb59f[1814]]());var _0x6b6cxa=Math[_0xb59f[428]](_0x6b6cx5*_0x6b6cx5+_0x6b6cx9*_0x6b6cx9),_0x6b6cx12=_0x6b6cxa-this[_0xb59f[1806]][_0x6b6cx3]-this[_0xb59f[1806]][_0x6b6cx4];_0x6b6cx12>this[_0xb59f[1791]]||(_0x6b6cx12<this[_0xb59f[1790]]&&(_0x6b6cx12=this[_0xb59f[1790]]),_0x6b6cx12=this[_0xb59f[1789]]/_0x6b6cx12,_0x6b6cx5=_0x6b6cx5/_0x6b6cxa*_0x6b6cx12,_0x6b6cx9=_0x6b6cx9/_0x6b6cxa*_0x6b6cx12,this[_0xb59f[1801]][_0x6b6cx3]+=_0x6b6cx5,this[_0xb59f[1802]][_0x6b6cx3]+=_0x6b6cx9,this[_0xb59f[1801]][_0x6b6cx4]-=_0x6b6cx5,this[_0xb59f[1802]][_0x6b6cx4]-=_0x6b6cx9)}}}};mxFastOrganicLayout[_0xb59f[202]][_0xb59f[1813]]=function(){this[_0xb59f[1794]]=this[_0xb59f[1793]]*(1-this[_0xb59f[1796]]/this[_0xb59f[1795]])};function mxCircleLayout(_0x6b6cx2,_0x6b6cx3){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2);this[_0xb59f[1806]]=null!=_0x6b6cx3?_0x6b6cx3:100}mxCircleLayout[_0xb59f[202]]= new mxGraphLayout;mxCircleLayout[_0xb59f[202]][_0xb59f[196]]=mxCircleLayout;mxCircleLayout[_0xb59f[202]][_0xb59f[1806]]=null;mxCircleLayout[_0xb59f[202]][_0xb59f[1815]]= !1;mxCircleLayout[_0xb59f[202]][_0xb59f[1732]]=0;mxCircleLayout[_0xb59f[202]][_0xb59f[1733]]=0;mxCircleLayout[_0xb59f[202]][_0xb59f[1750]]= !0;mxCircleLayout[_0xb59f[202]][_0xb59f[1787]]= !0;mxCircleLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]();_0x6b6cx3[_0xb59f[473]]();try{for(var _0x6b6cx4=0,_0x6b6cx5=null,_0x6b6cx9=null,_0x6b6cxa=[],_0x6b6cx12=_0x6b6cx3[_0xb59f[262]](_0x6b6cx2),_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx12;_0x6b6cx13++){var _0x6b6cx14=_0x6b6cx3[_0xb59f[263]](_0x6b6cx2,_0x6b6cx13);if(this[_0xb59f[1713]](_0x6b6cx14)){this[_0xb59f[1715]](_0x6b6cx14)||(this[_0xb59f[1750]]&&this[_0xb59f[1179]][_0xb59f[1809]](_0x6b6cx14),this[_0xb59f[1787]]&&this[_0xb59f[1716]](_0x6b6cx14,!1))}else {_0x6b6cxa[_0xb59f[207]](_0x6b6cx14);var _0x6b6cx15=this[_0xb59f[1726]](_0x6b6cx14),_0x6b6cx5=null==_0x6b6cx5?_0x6b6cx15[_0xb59f[236]]:Math[_0xb59f[243]](_0x6b6cx5,_0x6b6cx15[_0xb59f[236]]),_0x6b6cx9=null==_0x6b6cx9?_0x6b6cx15[_0xb59f[235]]:Math[_0xb59f[243]](_0x6b6cx9,_0x6b6cx15[_0xb59f[235]]),_0x6b6cx4=Math[_0xb59f[160]](_0x6b6cx4,Math[_0xb59f[160]](_0x6b6cx15[_0xb59f[117]],_0x6b6cx15[_0xb59f[119]]))}};var _0x6b6cx16=this[_0xb59f[1816]](_0x6b6cxa[_0xb59f[67]],_0x6b6cx4);this[_0xb59f[1815]]&&(_0x6b6cx9=this[_0xb59f[1732]],_0x6b6cx5=this[_0xb59f[1733]]);this[_0xb59f[1817]](_0x6b6cxa,_0x6b6cx16,_0x6b6cx9,_0x6b6cx5)}finally{_0x6b6cx3[_0xb59f[476]]()}};mxCircleLayout[_0xb59f[202]][_0xb59f[1816]]=function(_0x6b6cx2,_0x6b6cx3){return Math[_0xb59f[160]](_0x6b6cx2*_0x6b6cx3/Math[_0xb59f[424]],this[_0xb59f[1806]])};mxCircleLayout[_0xb59f[202]][_0xb59f[1817]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){for(var _0x6b6cx9=_0x6b6cx2[_0xb59f[67]],_0x6b6cxa=2*Math[_0xb59f[424]]/_0x6b6cx9,_0x6b6cx12=0;_0x6b6cx12<_0x6b6cx9;_0x6b6cx12++){this[_0xb59f[1711]](_0x6b6cx2[_0x6b6cx12])&&this[_0xb59f[1725]](_0x6b6cx2[_0x6b6cx12],_0x6b6cx4+_0x6b6cx3+_0x6b6cx3*Math[_0xb59f[427]](_0x6b6cx12*_0x6b6cxa),_0x6b6cx5+_0x6b6cx3+_0x6b6cx3*Math[_0xb59f[426]](_0x6b6cx12*_0x6b6cxa))}};function mxParallelEdgeLayout(_0x6b6cx2){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2)}mxParallelEdgeLayout[_0xb59f[202]]= new mxGraphLayout;mxParallelEdgeLayout[_0xb59f[202]][_0xb59f[196]]=mxParallelEdgeLayout;mxParallelEdgeLayout[_0xb59f[202]][_0xb59f[657]]=20;mxParallelEdgeLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[1818]](_0x6b6cx2);this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx3 in _0x6b6cx2){var _0x6b6cx4=_0x6b6cx2[_0x6b6cx3];1<_0x6b6cx4[_0xb59f[67]]&&this[_0xb59f[1759]](_0x6b6cx4)}}finally{this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[476]]()}};mxParallelEdgeLayout[_0xb59f[202]][_0xb59f[1818]]=function(_0x6b6cx2){for(var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx4=[],_0x6b6cx5=_0x6b6cx3[_0xb59f[262]](_0x6b6cx2),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx3[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9);if(!this[_0xb59f[1715]](_0x6b6cxa)){var _0x6b6cx12=this[_0xb59f[1819]](_0x6b6cxa);null!=_0x6b6cx12&&(null==_0x6b6cx4[_0x6b6cx12]&&(_0x6b6cx4[_0x6b6cx12]=[]),_0x6b6cx4[_0x6b6cx12][_0xb59f[207]](_0x6b6cxa))}};return _0x6b6cx4};mxParallelEdgeLayout[_0xb59f[202]][_0xb59f[1819]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[249]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[248]](_0x6b6cx2),_0x6b6cx5=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[1710]](!0):_0x6b6cx3[_0xb59f[1710]](_0x6b6cx2,!0);_0x6b6cx2=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[1710]](!1):_0x6b6cx3[_0xb59f[1710]](_0x6b6cx2,!1);return null!=_0x6b6cx5&&null!=_0x6b6cx2?(_0x6b6cx5=mxCellPath[_0xb59f[385]](_0x6b6cx5),_0x6b6cx2=mxCellPath[_0xb59f[385]](_0x6b6cx2),_0x6b6cx5>_0x6b6cx2?_0x6b6cx2+_0xb59f[213]+_0x6b6cx5:_0x6b6cx5+_0xb59f[213]+_0x6b6cx2):null};mxParallelEdgeLayout[_0xb59f[202]][_0xb59f[1759]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[0],_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx4[_0xb59f[1709]](_0x6b6cx3,!0)),_0x6b6cx9=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx4[_0xb59f[1709]](_0x6b6cx3,!1));if(_0x6b6cx5==_0x6b6cx9){for(var _0x6b6cx3=_0x6b6cx5[_0xb59f[235]]+_0x6b6cx5[_0xb59f[117]]+this[_0xb59f[657]],_0x6b6cx4=_0x6b6cx5[_0xb59f[236]]+_0x6b6cx5[_0xb59f[119]]/2,_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2[_0xb59f[67]];_0x6b6cxa++){this[_0xb59f[1820]](_0x6b6cx2[_0x6b6cxa],_0x6b6cx3,_0x6b6cx4),_0x6b6cx3+=this[_0xb59f[657]]}}else {if(null!=_0x6b6cx5&&null!=_0x6b6cx9){for(var _0x6b6cx3=_0x6b6cx5[_0xb59f[235]]+_0x6b6cx5[_0xb59f[117]]/2,_0x6b6cx4=_0x6b6cx5[_0xb59f[236]]+_0x6b6cx5[_0xb59f[119]]/2,_0x6b6cxa=_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]]/2-_0x6b6cx3,_0x6b6cx12=_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]]/2-_0x6b6cx4,_0x6b6cx9=Math[_0xb59f[428]](_0x6b6cxa*_0x6b6cxa+_0x6b6cx12*_0x6b6cx12),_0x6b6cx5=_0x6b6cx12*this[_0xb59f[657]]/_0x6b6cx9,_0x6b6cx9=_0x6b6cxa*this[_0xb59f[657]]/_0x6b6cx9,_0x6b6cx3=_0x6b6cx3+_0x6b6cxa/2+_0x6b6cx5*(_0x6b6cx2[_0xb59f[67]]-1)/2,_0x6b6cx4=_0x6b6cx4+_0x6b6cx12/2-_0x6b6cx9*(_0x6b6cx2[_0xb59f[67]]-1)/2,_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2[_0xb59f[67]];_0x6b6cxa++){this[_0xb59f[1820]](_0x6b6cx2[_0x6b6cxa],_0x6b6cx3,_0x6b6cx4),_0x6b6cx3-=_0x6b6cx5,_0x6b6cx4+=_0x6b6cx9}}}};mxParallelEdgeLayout[_0xb59f[202]][_0xb59f[1820]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[1179]][_0xb59f[1712]](_0x6b6cx2)&&this[_0xb59f[1722]](_0x6b6cx2,[ new mxPoint(_0x6b6cx3,_0x6b6cx4)])};function mxCompositeLayout(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2);this[_0xb59f[1821]]=_0x6b6cx3;this[_0xb59f[1822]]=_0x6b6cx4}mxCompositeLayout[_0xb59f[202]]= new mxGraphLayout;mxCompositeLayout[_0xb59f[202]][_0xb59f[196]]=mxCompositeLayout;mxCompositeLayout[_0xb59f[202]][_0xb59f[1821]]=null;mxCompositeLayout[_0xb59f[202]][_0xb59f[1822]]=null;mxCompositeLayout[_0xb59f[202]][_0xb59f[1702]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null!=this[_0xb59f[1822]]?this[_0xb59f[1822]][_0xb59f[582]][_0xb59f[183]](this[_0xb59f[1822]],arguments):this[_0xb59f[1821]][0][_0xb59f[582]][_0xb59f[183]](this[_0xb59f[1821]][0],arguments)};mxCompositeLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]();_0x6b6cx3[_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<this[_0xb59f[1821]][_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[1821]][_0x6b6cx4][_0xb59f[350]][_0xb59f[183]](this[_0xb59f[1821]][_0x6b6cx4],arguments)}}finally{_0x6b6cx3[_0xb59f[476]]()}};function mxEdgeLabelLayout(_0x6b6cx2,_0x6b6cx3){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2)}mxEdgeLabelLayout[_0xb59f[202]]= new mxGraphLayout;mxEdgeLabelLayout[_0xb59f[202]][_0xb59f[196]]=mxEdgeLabelLayout;mxEdgeLabelLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){for(var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[441]],_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=[],_0x6b6cx9=[],_0x6b6cxa=_0x6b6cx4[_0xb59f[262]](_0x6b6cx2),_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa;_0x6b6cx12++){var _0x6b6cx13=_0x6b6cx4[_0xb59f[263]](_0x6b6cx2,_0x6b6cx12),_0x6b6cx14=_0x6b6cx3[_0xb59f[248]](_0x6b6cx13);null!=_0x6b6cx14&&(this[_0xb59f[1713]](_0x6b6cx13)?this[_0xb59f[1715]](_0x6b6cx13)||_0x6b6cx5[_0xb59f[207]](_0x6b6cx14):_0x6b6cx9[_0xb59f[207]](_0x6b6cx14))};this[_0xb59f[1823]](_0x6b6cx9,_0x6b6cx5)};mxEdgeLabelLayout[_0xb59f[202]][_0xb59f[1823]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]();_0x6b6cx4[_0xb59f[473]]();try{for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=_0x6b6cx3[_0x6b6cx5];if(null!=_0x6b6cx9&&null!=_0x6b6cx9[_0xb59f[963]]&&null!=_0x6b6cx9[_0xb59f[963]][_0xb59f[1563]]){for(var _0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx2[_0x6b6cxa];null!=_0x6b6cx12&&this[_0xb59f[1824]](_0x6b6cx9,_0x6b6cx12)}}}}finally{_0x6b6cx4[_0xb59f[476]]()}};mxEdgeLabelLayout[_0xb59f[202]][_0xb59f[1824]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]];if(mxUtils[_0xb59f[1825]](_0x6b6cx5,_0x6b6cx3)){var _0x6b6cx9=-_0x6b6cx5[_0xb59f[236]]-_0x6b6cx5[_0xb59f[119]]+_0x6b6cx3[_0xb59f[236]],_0x6b6cxa=-_0x6b6cx5[_0xb59f[236]]+_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]],_0x6b6cx9=Math[_0xb59f[425]](_0x6b6cx9)<Math[_0xb59f[425]](_0x6b6cxa)?_0x6b6cx9:_0x6b6cxa,_0x6b6cxa=-_0x6b6cx5[_0xb59f[235]]-_0x6b6cx5[_0xb59f[117]]+_0x6b6cx3[_0xb59f[235]],_0x6b6cx5=-_0x6b6cx5[_0xb59f[235]]+_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]],_0x6b6cx5=Math[_0xb59f[425]](_0x6b6cxa)<Math[_0xb59f[425]](_0x6b6cx5)?_0x6b6cxa:_0x6b6cx5;Math[_0xb59f[425]](_0x6b6cx5)<Math[_0xb59f[425]](_0x6b6cx9)?_0x6b6cx9=0:_0x6b6cx5=0;_0x6b6cxa=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx2[_0xb59f[246]]);null!=_0x6b6cxa&&(_0x6b6cxa=_0x6b6cxa[_0xb59f[238]](),null!=_0x6b6cxa[_0xb59f[1368]]?(_0x6b6cxa[_0xb59f[1368]][_0xb59f[235]]+=_0x6b6cx5,_0x6b6cxa[_0xb59f[1368]][_0xb59f[236]]+=_0x6b6cx9):_0x6b6cxa[_0xb59f[1368]]= new mxPoint(_0x6b6cx5,_0x6b6cx9),_0x6b6cx4[_0xb59f[1724]](_0x6b6cx2[_0xb59f[246]],_0x6b6cxa))}};function mxGraphAbstractHierarchyCell(){this[_0xb59f[235]]=[];this[_0xb59f[236]]=[];this[_0xb59f[1826]]=[]}mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1827]]= -1;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1828]]= -1;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[235]]=null;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[236]]=null;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[117]]=0;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[119]]=0;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1829]]=null;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1830]]=null;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1826]]=null;mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1831]]=function(_0x6b6cx2){return null};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1832]]=function(_0x6b6cx2){return null};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[250]]=function(){return !1};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1193]]=function(){return !1};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1833]]=function(_0x6b6cx2){return null};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1834]]=function(_0x6b6cx2,_0x6b6cx3){return null};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1835]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1193]]()?this[_0xb59f[235]][0]=_0x6b6cx3:this[_0xb59f[250]]()&&(this[_0xb59f[235]][_0x6b6cx2-this[_0xb59f[1828]]-1]=_0x6b6cx3)};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[730]]=function(_0x6b6cx2){return this[_0xb59f[1193]]()?this[_0xb59f[235]][0]:this[_0xb59f[250]]()?this[_0xb59f[235]][_0x6b6cx2-this[_0xb59f[1828]]-1]:0};mxGraphAbstractHierarchyCell[_0xb59f[202]][_0xb59f[1836]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1193]]()?this[_0xb59f[236]][0]=_0x6b6cx3:this[_0xb59f[250]]()&&(this[_0xb59f[236]][_0x6b6cx2-this[_0xb59f[1828]]-1]=_0x6b6cx3)};function mxGraphHierarchyNode(_0x6b6cx2){mxGraphAbstractHierarchyCell[_0xb59f[183]](this,arguments);this[_0xb59f[246]]=_0x6b6cx2}mxGraphHierarchyNode[_0xb59f[202]]= new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[196]]=mxGraphHierarchyNode;mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[246]]=null;mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1837]]=[];mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1838]]=[];mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1839]]= !1;mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1840]]=function(_0x6b6cx2){return this[_0xb59f[1827]]};mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1831]]=function(_0x6b6cx2){if(null==this[_0xb59f[1829]]){this[_0xb59f[1829]]=[];this[_0xb59f[1829]][0]=[];for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1837]][_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx4=this[_0xb59f[1837]][_0x6b6cx3];-1==_0x6b6cx4[_0xb59f[1827]]||_0x6b6cx4[_0xb59f[1827]]==_0x6b6cx2+1?this[_0xb59f[1829]][0][_0xb59f[207]](_0x6b6cx4[_0xb59f[1097]]):this[_0xb59f[1829]][0][_0xb59f[207]](_0x6b6cx4)}};return this[_0xb59f[1829]][0]};mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1832]]=function(_0x6b6cx2){if(null==this[_0xb59f[1830]]){this[_0xb59f[1830]]=[];this[_0xb59f[1830]][0]=[];for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1838]][_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx4=this[_0xb59f[1838]][_0x6b6cx3];-1==_0x6b6cx4[_0xb59f[1828]]||_0x6b6cx4[_0xb59f[1828]]==_0x6b6cx2-1?this[_0xb59f[1830]][0][_0xb59f[207]](_0x6b6cx4[_0xb59f[772]]):this[_0xb59f[1830]][0][_0xb59f[207]](_0x6b6cx4)}};return this[_0xb59f[1830]][0]};mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1193]]=function(){return !0};mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1833]]=function(_0x6b6cx2){return this[_0xb59f[1826]][0]};mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1834]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1826]][0]=_0x6b6cx3};mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1720]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&null!=this[_0xb59f[1839]]&&null!=_0x6b6cx2[_0xb59f[1839]]&&this[_0xb59f[1839]][_0xb59f[67]]<_0x6b6cx2[_0xb59f[1839]][_0xb59f[67]]){if(this[_0xb59f[1839]]==_0x6b6cx2[_0xb59f[1839]]){return !0};if(null==this[_0xb59f[1839]]||null==this[_0xb59f[1839]]){return !1};for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1839]][_0xb59f[67]];_0x6b6cx3++){if(this[_0xb59f[1839]][_0x6b6cx3]!=_0x6b6cx2[_0xb59f[1839]][_0x6b6cx3]){return !1}};return !0};return !1};mxGraphHierarchyNode[_0xb59f[202]][_0xb59f[1841]]=function(){return this[_0xb59f[246]]};function mxGraphHierarchyEdge(_0x6b6cx2){mxGraphAbstractHierarchyCell[_0xb59f[183]](this,arguments);this[_0xb59f[1842]]=_0x6b6cx2}mxGraphHierarchyEdge[_0xb59f[202]]= new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[196]]=mxGraphHierarchyEdge;mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1842]]=null;mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1097]]=null;mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[772]]=null;mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1843]]= !1;mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1744]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[1097]];this[_0xb59f[1097]]=this[_0xb59f[772]];this[_0xb59f[772]]=_0x6b6cx2;this[_0xb59f[1843]]=!this[_0xb59f[1843]]};mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1831]]=function(_0x6b6cx2){if(null==this[_0xb59f[1829]]){this[_0xb59f[1829]]=[];for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1826]][_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[1829]][_0x6b6cx3]=[],_0x6b6cx3==this[_0xb59f[1826]][_0xb59f[67]]-1?this[_0xb59f[1829]][_0x6b6cx3][_0xb59f[207]](this[_0xb59f[1097]]):this[_0xb59f[1829]][_0x6b6cx3][_0xb59f[207]](this)}};return this[_0xb59f[1829]][_0x6b6cx2-this[_0xb59f[1828]]-1]};mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1832]]=function(_0x6b6cx2){if(null==this[_0xb59f[1830]]){this[_0xb59f[1830]]=[];for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1826]][_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[1830]][_0x6b6cx3]=[],0==_0x6b6cx3?this[_0xb59f[1830]][_0x6b6cx3][_0xb59f[207]](this[_0xb59f[772]]):this[_0xb59f[1830]][_0x6b6cx3][_0xb59f[207]](this)}};return this[_0xb59f[1830]][_0x6b6cx2-this[_0xb59f[1828]]-1]};mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[250]]=function(){return !0};mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1833]]=function(_0x6b6cx2){return this[_0xb59f[1826]][_0x6b6cx2-this[_0xb59f[1828]]-1]};mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1834]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1826]][_0x6b6cx2-this[_0xb59f[1828]]-1]=_0x6b6cx3};mxGraphHierarchyEdge[_0xb59f[202]][_0xb59f[1841]]=function(){return null!=this[_0xb59f[1842]]&&0<this[_0xb59f[1842]][_0xb59f[67]]?this[_0xb59f[1842]][0]:null};function mxGraphHierarchyModel(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2[_0xb59f[1703]]();this[_0xb59f[1844]]=_0x6b6cx9;this[_0xb59f[1845]]=_0x6b6cx4;this[_0xb59f[1101]]=_0x6b6cx5;this[_0xb59f[1846]]={};this[_0xb59f[1847]]={};this[_0xb59f[1827]]=0;_0x6b6cx4=[];null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[1728]](_0x6b6cx5));this[_0xb59f[1827]]=this[_0xb59f[1848]];this[_0xb59f[1849]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx9=_0x6b6cx4[_0x6b6cx5][_0xb59f[1838]];for(var _0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx9[_0x6b6cxa],_0x6b6cx13=_0x6b6cx12[_0xb59f[1842]];if(null!=_0x6b6cx13&&0<_0x6b6cx13[_0xb59f[67]]){var _0x6b6cx13=_0x6b6cx13[0],_0x6b6cx14=_0x6b6cx2[_0xb59f[1710]](_0x6b6cx13,!1),_0x6b6cx14=mxCellPath[_0xb59f[385]](_0x6b6cx14),_0x6b6cx14=this[_0xb59f[1846]][_0x6b6cx14];_0x6b6cx4[_0x6b6cx5]==_0x6b6cx14&&(_0x6b6cx14=_0x6b6cx2[_0xb59f[1710]](_0x6b6cx13,!0),_0x6b6cx14=mxCellPath[_0xb59f[385]](_0x6b6cx14),_0x6b6cx14=this[_0xb59f[1846]][_0x6b6cx14]);null!=_0x6b6cx14&&_0x6b6cx4[_0x6b6cx5]!=_0x6b6cx14&&(_0x6b6cx12[_0xb59f[772]]=_0x6b6cx14,0==_0x6b6cx14[_0xb59f[1837]][_0xb59f[67]]&&(_0x6b6cx14[_0xb59f[1837]]=[]),0>mxUtils[_0xb59f[2]](_0x6b6cx14[_0xb59f[1837]],_0x6b6cx12)&&_0x6b6cx14[_0xb59f[1837]][_0xb59f[207]](_0x6b6cx12))}};_0x6b6cx4[_0x6b6cx5][_0xb59f[1826]][0]=1}}mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1827]]=null;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1846]]=null;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1847]]=null;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1850]]=null;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1845]]=null;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1101]]=null;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1851]]=0;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1848]]=1E8;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1844]]= !1;mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1849]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){for(var _0x6b6cx5=_0x6b6cx2[_0xb59f[1703]](),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx3[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx4[_0x6b6cx9]= new mxGraphHierarchyNode(_0x6b6cx3[_0x6b6cx9]);var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0x6b6cx9]);this[_0xb59f[1846]][_0x6b6cxa]=_0x6b6cx4[_0x6b6cx9];_0x6b6cxa=_0x6b6cx2[_0xb59f[264]](_0x6b6cx3[_0x6b6cx9]);_0x6b6cx4[_0x6b6cx9][_0xb59f[1838]]=[];for(var _0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa[_0xb59f[67]];_0x6b6cx12++){var _0x6b6cx13=_0x6b6cx2[_0xb59f[1710]](_0x6b6cxa[_0x6b6cx12],!1);if(_0x6b6cx13!=_0x6b6cx3[_0x6b6cx9]&&_0x6b6cx13!=_0x6b6cx3[_0x6b6cx9]&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1193]](_0x6b6cx13)&&!_0x6b6cx2[_0xb59f[1713]](_0x6b6cx13)){var _0x6b6cx14=_0x6b6cx2[_0xb59f[1781]](_0x6b6cx3[_0x6b6cx9],_0x6b6cx13,!1),_0x6b6cx15=_0x6b6cx2[_0xb59f[1781]](_0x6b6cx3[_0x6b6cx9],_0x6b6cx13,!0),_0x6b6cx13=mxCellPath[_0xb59f[385]](_0x6b6cx14[0]);if(null!=_0x6b6cx14&&0<_0x6b6cx14[_0xb59f[67]]&&null==this[_0xb59f[1847]][_0x6b6cx13]&&2*_0x6b6cx15[_0xb59f[67]]>=_0x6b6cx14[_0xb59f[67]]){for(var _0x6b6cx15= new mxGraphHierarchyEdge(_0x6b6cx14),_0x6b6cx16=0;_0x6b6cx16<_0x6b6cx14[_0xb59f[67]];_0x6b6cx16++){var _0x6b6cx17=_0x6b6cx14[_0x6b6cx16],_0x6b6cx13=mxCellPath[_0xb59f[385]](_0x6b6cx17);this[_0xb59f[1847]][_0x6b6cx13]=_0x6b6cx15;_0x6b6cx5[_0xb59f[1809]](_0x6b6cx17);_0x6b6cx2[_0xb59f[1787]]&&(_0x6b6cx2[_0xb59f[1716]](_0x6b6cx17,!1),_0x6b6cx2[_0xb59f[1718]](_0x6b6cx17,!0))};_0x6b6cx15[_0xb59f[1097]]=_0x6b6cx4[_0x6b6cx9];0>mxUtils[_0xb59f[2]](_0x6b6cx4[_0x6b6cx9][_0xb59f[1838]],_0x6b6cx15)&&_0x6b6cx4[_0x6b6cx9][_0xb59f[1838]][_0xb59f[207]](_0x6b6cx15)}}};_0x6b6cx4[_0x6b6cx9][_0xb59f[1826]][0]=0}};mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1852]]=function(){var _0x6b6cx2=[];if(null!=this[_0xb59f[1845]]){for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1845]][_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx4=mxCellPath[_0xb59f[385]](this[_0xb59f[1845]][_0x6b6cx3]),_0x6b6cx4=this[_0xb59f[1846]][_0x6b6cx4];null!=_0x6b6cx4&&_0x6b6cx2[_0xb59f[207]](_0x6b6cx4)}};for(var _0x6b6cx5 in this[_0xb59f[1846]]){_0x6b6cx4=this[_0xb59f[1846]][_0x6b6cx5],_0x6b6cx4[_0xb59f[1826]][0]= -1};for(var _0x6b6cx9=_0x6b6cx2[_0xb59f[1853]]();0<_0x6b6cx2[_0xb59f[67]];){var _0x6b6cx4=_0x6b6cx2[0],_0x6b6cxa,_0x6b6cx12;_0x6b6cxa=_0x6b6cx4[_0xb59f[1837]];_0x6b6cx12=_0x6b6cx4[_0xb59f[1838]];for(var _0x6b6cx13=!0,_0x6b6cx14=this[_0xb59f[1848]],_0x6b6cx3=0;_0x6b6cx3<_0x6b6cxa[_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx15=_0x6b6cxa[_0x6b6cx3];if(5270620==_0x6b6cx15[_0xb59f[1826]][0]){_0x6b6cx15=_0x6b6cx15[_0xb59f[1097]],_0x6b6cx14=Math[_0xb59f[243]](_0x6b6cx14,_0x6b6cx15[_0xb59f[1826]][0]-1)}else {_0x6b6cx13= !1;break}};if(_0x6b6cx13){_0x6b6cx4[_0xb59f[1826]][0]=_0x6b6cx14;this[_0xb59f[1827]]=Math[_0xb59f[243]](this[_0xb59f[1827]],_0x6b6cx14);if(null!=_0x6b6cx12){for(_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx12[_0xb59f[67]];_0x6b6cx3++){_0x6b6cx15=_0x6b6cx12[_0x6b6cx3],_0x6b6cx15[_0xb59f[1826]][0]=5270620,_0x6b6cx15=_0x6b6cx15[_0xb59f[772]],-1==_0x6b6cx15[_0xb59f[1826]][0]&&(_0x6b6cx2[_0xb59f[207]](_0x6b6cx15),_0x6b6cx15[_0xb59f[1826]][0]= -2)}};_0x6b6cx2[_0xb59f[1115]]()}else {if(_0x6b6cx3=_0x6b6cx2[_0xb59f[1115]](),_0x6b6cx2[_0xb59f[207]](_0x6b6cx4),_0x6b6cx3==_0x6b6cx4&&1==_0x6b6cx2[_0xb59f[67]]){break}}};for(_0x6b6cx5 in this[_0xb59f[1846]]){_0x6b6cx4=this[_0xb59f[1846]][_0x6b6cx5],_0x6b6cx4[_0xb59f[1826]][0]-=this[_0xb59f[1827]]};for(_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx9[_0xb59f[67]];_0x6b6cx3++){_0x6b6cx4=_0x6b6cx9[_0x6b6cx3];_0x6b6cx2=0;_0x6b6cxa=_0x6b6cx4[_0xb59f[1838]];for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cxa[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx15=_0x6b6cxa[_0x6b6cx5],_0x6b6cx15=_0x6b6cx15[_0xb59f[772]],_0x6b6cx4[_0xb59f[1826]][0]=Math[_0xb59f[160]](_0x6b6cx2,_0x6b6cx15[_0xb59f[1826]][0]+1),_0x6b6cx2=_0x6b6cx4[_0xb59f[1826]][0]}};this[_0xb59f[1827]]=this[_0xb59f[1848]]-this[_0xb59f[1827]]};mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1854]]=function(){var _0x6b6cx2=[];this[_0xb59f[1850]]=[];for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1827]]+1;_0x6b6cx3++){_0x6b6cx2[_0x6b6cx3]=[],this[_0xb59f[1850]][_0x6b6cx3]=_0x6b6cx2[_0x6b6cx3]};var _0x6b6cx4=null;if(null!=this[_0xb59f[1845]]){for(var _0x6b6cx5=this[_0xb59f[1845]],_0x6b6cx4=[],_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx5[_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx9=mxCellPath[_0xb59f[385]](_0x6b6cx5[_0x6b6cx3]);_0x6b6cx4[_0x6b6cx3]=this[_0xb59f[1846]][_0x6b6cx9]}};this[_0xb59f[209]](function(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cx15){0==_0x6b6cx15&&(0>_0x6b6cx4[_0xb59f[1827]]&&0>_0x6b6cx4[_0xb59f[1828]])&&(_0x6b6cx2[_0x6b6cx4[_0xb59f[1826]][0]][_0xb59f[207]](_0x6b6cx4),_0x6b6cx4[_0xb59f[1827]]=_0x6b6cx4[_0xb59f[1826]][0],_0x6b6cx4[_0xb59f[1828]]=_0x6b6cx4[_0xb59f[1826]][0],_0x6b6cx4[_0xb59f[1826]][0]=_0x6b6cx2[_0x6b6cx4[_0xb59f[1827]]][_0xb59f[67]]-1);if(null!=_0x6b6cx3&&null!=_0x6b6cx5&&1<_0x6b6cx3[_0xb59f[1827]]-_0x6b6cx4[_0xb59f[1827]]){_0x6b6cx5[_0xb59f[1827]]=_0x6b6cx3[_0xb59f[1827]];_0x6b6cx5[_0xb59f[1828]]=_0x6b6cx4[_0xb59f[1827]];_0x6b6cx5[_0xb59f[1826]]=[];_0x6b6cx5[_0xb59f[235]]=[];_0x6b6cx5[_0xb59f[236]]=[];for(_0x6b6cx3=_0x6b6cx5[_0xb59f[1828]]+1;_0x6b6cx3<_0x6b6cx5[_0xb59f[1827]];_0x6b6cx3++){_0x6b6cx2[_0x6b6cx3][_0xb59f[207]](_0x6b6cx5),_0x6b6cx5[_0xb59f[1834]](_0x6b6cx3,_0x6b6cx2[_0x6b6cx3][_0xb59f[67]]-1)}}},_0x6b6cx4,!1,null)};mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[209]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx3){for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx3[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx3[_0x6b6cx9];null!=_0x6b6cxa&&(null==_0x6b6cx5&&(_0x6b6cx5={}),_0x6b6cx4?(_0x6b6cxa[_0xb59f[1839]]=[],_0x6b6cxa[_0xb59f[1839]][0]=this[_0xb59f[1851]],_0x6b6cxa[_0xb59f[1839]][1]=_0x6b6cx9,this[_0xb59f[1855]](null,_0x6b6cxa,null,_0x6b6cx2,_0x6b6cx5,_0x6b6cxa[_0xb59f[1839]],_0x6b6cx9,0)):this[_0xb59f[1758]](null,_0x6b6cxa,null,_0x6b6cx2,_0x6b6cx5,0))};this[_0xb59f[1851]]++}};mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1758]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){if(null!=_0x6b6cx3){var _0x6b6cx12=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0xb59f[246]]);if(null==_0x6b6cx9[_0x6b6cx12]){_0x6b6cx9[_0x6b6cx12]=_0x6b6cx3;_0x6b6cx5(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cxa,0);_0x6b6cx2=_0x6b6cx3[_0xb59f[1838]][_0xb59f[1853]]();for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){_0x6b6cx12=_0x6b6cx2[_0x6b6cx4],this[_0xb59f[1758]](_0x6b6cx3,_0x6b6cx12[_0xb59f[772]],_0x6b6cx12,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa+1)}}else {_0x6b6cx5(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cxa,1)}}};mxGraphHierarchyModel[_0xb59f[202]][_0xb59f[1855]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13){if(null!=_0x6b6cx3){if(null!=_0x6b6cx2&&(null==_0x6b6cx3[_0xb59f[1839]]||_0x6b6cx3[_0xb59f[1839]][0]!=_0x6b6cx2[_0xb59f[1839]][0])){_0x6b6cxa=_0x6b6cx2[_0xb59f[1839]][_0xb59f[67]]+1,_0x6b6cx3[_0xb59f[1839]]=_0x6b6cx2[_0xb59f[1839]][_0xb59f[1853]](),_0x6b6cx3[_0xb59f[1839]][_0x6b6cxa-1]=_0x6b6cx12};_0x6b6cx12=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0xb59f[246]]);if(null==_0x6b6cx9[_0x6b6cx12]){_0x6b6cx9[_0x6b6cx12]=_0x6b6cx3;_0x6b6cx5(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx13,0);_0x6b6cx2=_0x6b6cx3[_0xb59f[1838]][_0xb59f[1853]]();for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){_0x6b6cx12=_0x6b6cx2[_0x6b6cx4],this[_0xb59f[1855]](_0x6b6cx3,_0x6b6cx12[_0xb59f[772]],_0x6b6cx12,_0x6b6cx5,_0x6b6cx9,_0x6b6cx3[_0xb59f[1839]],_0x6b6cx4,_0x6b6cx13+1)}}else {_0x6b6cx5(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx13,1)}}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){};function mxMedianHybridCrossingReduction(_0x6b6cx2){this[_0xb59f[1759]]=_0x6b6cx2}mxMedianHybridCrossingReduction[_0xb59f[202]]= new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[196]]=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1759]]=null;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1795]]=24;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1856]]=null;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1857]]=0;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1858]]=0;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1859]]=2;mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[1759]][_0xb59f[502]]();this[_0xb59f[1856]]=[];for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[1850]][_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[1856]][_0x6b6cx3]=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx3][_0xb59f[1853]]()};for(var _0x6b6cx4=0,_0x6b6cx5=this[_0xb59f[1860]](_0x6b6cx2),_0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1795]]&&_0x6b6cx4<this[_0xb59f[1859]];_0x6b6cx3++){this[_0xb59f[1861]](_0x6b6cx3,_0x6b6cx2);this[_0xb59f[1862]](_0x6b6cx3,_0x6b6cx2);var _0x6b6cx9=this[_0xb59f[1860]](_0x6b6cx2);if(_0x6b6cx9<_0x6b6cx5){_0x6b6cx5=_0x6b6cx9;for(_0x6b6cx9=_0x6b6cx4=0;_0x6b6cx9<this[_0xb59f[1856]][_0xb59f[67]];_0x6b6cx9++){for(var _0x6b6cxa=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx9],_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa[_0xb59f[67]];_0x6b6cx12++){var _0x6b6cx13=_0x6b6cxa[_0x6b6cx12];this[_0xb59f[1856]][_0x6b6cx9][_0x6b6cx13[_0xb59f[1833]](_0x6b6cx9)]=_0x6b6cx13}}}else {_0x6b6cx4++;for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[1856]][_0xb59f[67]];_0x6b6cx9++){_0x6b6cxa=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx9];for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa[_0xb59f[67]];_0x6b6cx12++){_0x6b6cx13=_0x6b6cxa[_0x6b6cx12],_0x6b6cx13[_0xb59f[1834]](_0x6b6cx9,_0x6b6cx12)}}};if(0==_0x6b6cx5){break}};_0x6b6cx4=[];_0x6b6cx5=[];for(_0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[1827]]+1;_0x6b6cx3++){_0x6b6cx5[_0x6b6cx3]=[],_0x6b6cx4[_0x6b6cx3]=_0x6b6cx5[_0x6b6cx3]};for(_0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[1856]][_0xb59f[67]];_0x6b6cx3++){for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[1856]][_0x6b6cx3][_0xb59f[67]];_0x6b6cx9++){_0x6b6cx5[_0x6b6cx3][_0xb59f[207]](this[_0xb59f[1856]][_0x6b6cx3][_0x6b6cx9])}};_0x6b6cx2[_0xb59f[1850]]=_0x6b6cx4};mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1860]]=function(_0x6b6cx2){for(var _0x6b6cx3=_0x6b6cx2[_0xb59f[1850]][_0xb59f[67]],_0x6b6cx4=0,_0x6b6cx5=1;_0x6b6cx5<_0x6b6cx3;_0x6b6cx5++){_0x6b6cx4+=this[_0xb59f[1863]](_0x6b6cx5,_0x6b6cx2)};return _0x6b6cx4};mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1863]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=0,_0x6b6cx5=_0x6b6cx3[_0xb59f[1850]][_0x6b6cx2],_0x6b6cx9=_0x6b6cx5[_0xb59f[67]],_0x6b6cxa=_0x6b6cx3[_0xb59f[1850]][_0x6b6cx2-1][_0xb59f[67]],_0x6b6cx12=[],_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx9;_0x6b6cx13++){_0x6b6cx12[_0x6b6cx13]=[]};for(_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx5[_0xb59f[67]];_0x6b6cx13++){for(var _0x6b6cx14=_0x6b6cx5[_0x6b6cx13],_0x6b6cx15=_0x6b6cx14[_0xb59f[1833]](_0x6b6cx2),_0x6b6cx16=_0x6b6cx14[_0xb59f[1832]](_0x6b6cx2),_0x6b6cx14=0;_0x6b6cx14<_0x6b6cx16[_0xb59f[67]];_0x6b6cx14++){var _0x6b6cx17=_0x6b6cx16[_0x6b6cx14][_0xb59f[1833]](_0x6b6cx2-1);_0x6b6cx12[_0x6b6cx15][_0x6b6cx17]=201207}};for(_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx9;_0x6b6cx13++){for(_0x6b6cx14=0;_0x6b6cx14<_0x6b6cxa;_0x6b6cx14++){if(201207==_0x6b6cx12[_0x6b6cx13][_0x6b6cx14]){for(_0x6b6cx5=_0x6b6cx13+1;_0x6b6cx5<_0x6b6cx9;_0x6b6cx5++){for(_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx14;_0x6b6cx15++){201207==_0x6b6cx12[_0x6b6cx5][_0x6b6cx15]&&_0x6b6cx4++}};for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx13;_0x6b6cx5++){for(_0x6b6cx15=_0x6b6cx14+1;_0x6b6cx15<_0x6b6cxa;_0x6b6cx15++){201207==_0x6b6cx12[_0x6b6cx5][_0x6b6cx15]&&_0x6b6cx4++}}}}};return _0x6b6cx4/2};mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1862]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=!0,_0x6b6cx5=0;_0x6b6cx4&&10>_0x6b6cx5++;){for(var _0x6b6cx9=1==_0x6b6cx2%2&&1==_0x6b6cx5%2,_0x6b6cx4=!1,_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx3[_0xb59f[1850]][_0xb59f[67]];_0x6b6cxa++){for(var _0x6b6cx12=_0x6b6cx3[_0xb59f[1850]][_0x6b6cxa],_0x6b6cx13=[],_0x6b6cx14=0;_0x6b6cx14<_0x6b6cx12[_0xb59f[67]];_0x6b6cx14++){var _0x6b6cx15=_0x6b6cx12[_0x6b6cx14],_0x6b6cx16=_0x6b6cx15[_0xb59f[1833]](_0x6b6cxa);0>_0x6b6cx16&&(_0x6b6cx16=_0x6b6cx14);_0x6b6cx13[_0x6b6cx16]=_0x6b6cx15};for(var _0x6b6cx17=_0x6b6cx16=_0x6b6cx15=null,_0x6b6cx18=null,_0x6b6cx19=null,_0x6b6cx1a=null,_0x6b6cx1b=null,_0x6b6cx1c=null,_0x6b6cx1d=null,_0x6b6cx1e=null,_0x6b6cx14=0;_0x6b6cx14<_0x6b6cx12[_0xb59f[67]]-1;_0x6b6cx14++){if(0==_0x6b6cx14){for(var _0x6b6cx1d=_0x6b6cx13[_0x6b6cx14],_0x6b6cx15=_0x6b6cx1d[_0xb59f[1831]](_0x6b6cxa),_0x6b6cx16=_0x6b6cx1d[_0xb59f[1832]](_0x6b6cxa),_0x6b6cx19=[],_0x6b6cx1a=[],_0x6b6cx1f=0;_0x6b6cx1f<_0x6b6cx15[_0xb59f[67]];_0x6b6cx1f++){_0x6b6cx19[_0x6b6cx1f]=_0x6b6cx15[_0x6b6cx1f][_0xb59f[1833]](_0x6b6cxa+1)};for(_0x6b6cx1f=0;_0x6b6cx1f<_0x6b6cx16[_0xb59f[67]];_0x6b6cx1f++){_0x6b6cx1a[_0x6b6cx1f]=_0x6b6cx16[_0x6b6cx1f][_0xb59f[1833]](_0x6b6cxa-1)}}else {_0x6b6cx15=_0x6b6cx17,_0x6b6cx16=_0x6b6cx18,_0x6b6cx19=_0x6b6cx1b,_0x6b6cx1a=_0x6b6cx1c,_0x6b6cx1d=_0x6b6cx1e};_0x6b6cx1e=_0x6b6cx13[_0x6b6cx14+1];_0x6b6cx17=_0x6b6cx1e[_0xb59f[1831]](_0x6b6cxa);_0x6b6cx18=_0x6b6cx1e[_0xb59f[1832]](_0x6b6cxa);_0x6b6cx1b=[];_0x6b6cx1c=[];for(_0x6b6cx1f=0;_0x6b6cx1f<_0x6b6cx17[_0xb59f[67]];_0x6b6cx1f++){_0x6b6cx1b[_0x6b6cx1f]=_0x6b6cx17[_0x6b6cx1f][_0xb59f[1833]](_0x6b6cxa+1)};for(_0x6b6cx1f=0;_0x6b6cx1f<_0x6b6cx18[_0xb59f[67]];_0x6b6cx1f++){_0x6b6cx1c[_0x6b6cx1f]=_0x6b6cx18[_0x6b6cx1f][_0xb59f[1833]](_0x6b6cxa-1)};for(var _0x6b6cx20=0,_0x6b6cx62=0,_0x6b6cx1f=0;_0x6b6cx1f<_0x6b6cx19[_0xb59f[67]];_0x6b6cx1f++){for(var _0x6b6cx63=0;_0x6b6cx63<_0x6b6cx1b[_0xb59f[67]];_0x6b6cx63++){_0x6b6cx19[_0x6b6cx1f]>_0x6b6cx1b[_0x6b6cx63]&&_0x6b6cx20++,_0x6b6cx19[_0x6b6cx1f]<_0x6b6cx1b[_0x6b6cx63]&&_0x6b6cx62++}};for(_0x6b6cx1f=0;_0x6b6cx1f<_0x6b6cx1a[_0xb59f[67]];_0x6b6cx1f++){for(_0x6b6cx63=0;_0x6b6cx63<_0x6b6cx1c[_0xb59f[67]];_0x6b6cx63++){_0x6b6cx1a[_0x6b6cx1f]>_0x6b6cx1c[_0x6b6cx63]&&_0x6b6cx20++,_0x6b6cx1a[_0x6b6cx1f]<_0x6b6cx1c[_0x6b6cx63]&&_0x6b6cx62++}};if(_0x6b6cx62<_0x6b6cx20||_0x6b6cx62==_0x6b6cx20&&_0x6b6cx9){_0x6b6cx17=_0x6b6cx1d[_0xb59f[1833]](_0x6b6cxa),_0x6b6cx1d[_0xb59f[1834]](_0x6b6cxa,_0x6b6cx1e[_0xb59f[1833]](_0x6b6cxa)),_0x6b6cx1e[_0xb59f[1834]](_0x6b6cxa,_0x6b6cx17),_0x6b6cx17=_0x6b6cx15,_0x6b6cx18=_0x6b6cx16,_0x6b6cx1b=_0x6b6cx19,_0x6b6cx1c=_0x6b6cx1a,_0x6b6cx1e=_0x6b6cx1d,_0x6b6cx9||(_0x6b6cx4= !0)}}}}};mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1861]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=0==_0x6b6cx2%2;if(_0x6b6cx4){for(var _0x6b6cx5=_0x6b6cx3[_0xb59f[1827]]-1;0<=_0x6b6cx5;_0x6b6cx5--){this[_0xb59f[1864]](_0x6b6cx5,_0x6b6cx4)}}else {for(_0x6b6cx5=1;_0x6b6cx5<_0x6b6cx3[_0xb59f[1827]];_0x6b6cx5++){this[_0xb59f[1864]](_0x6b6cx5,_0x6b6cx4)}}};mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1864]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=this[_0xb59f[1856]][_0x6b6cx2][_0xb59f[67]],_0x6b6cx5=[],_0x6b6cx9=[],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx4;_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[1856]][_0x6b6cx2][_0x6b6cxa],_0x6b6cx13= new MedianCellSorter;_0x6b6cx13[_0xb59f[246]]=_0x6b6cx12;var _0x6b6cx14;_0x6b6cx14=_0x6b6cx3?_0x6b6cx12[_0xb59f[1831]](_0x6b6cx2):_0x6b6cx12[_0xb59f[1832]](_0x6b6cx2);var _0x6b6cx15;_0x6b6cx15=_0x6b6cx3?_0x6b6cx2+1:_0x6b6cx2-1;null!=_0x6b6cx14&&0!=_0x6b6cx14[_0xb59f[67]]?(_0x6b6cx13[_0xb59f[1865]]=this[_0xb59f[1865]](_0x6b6cx14,_0x6b6cx15),_0x6b6cx5[_0xb59f[207]](_0x6b6cx13)):_0x6b6cx9[_0x6b6cx12[_0xb59f[1833]](_0x6b6cx2)]= !0};_0x6b6cx5[_0xb59f[470]](MedianCellSorter[_0xb59f[202]][_0xb59f[469]]);for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx4;_0x6b6cxa++){null==_0x6b6cx9[_0x6b6cxa]&&(_0x6b6cx12=_0x6b6cx5[_0xb59f[1115]]()[_0xb59f[246]],_0x6b6cx12[_0xb59f[1834]](_0x6b6cx2,_0x6b6cxa))}};mxMedianHybridCrossingReduction[_0xb59f[202]][_0xb59f[1865]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=[],_0x6b6cx5=0,_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx2[_0x6b6cx9];_0x6b6cx4[_0x6b6cx5++]=_0x6b6cxa[_0xb59f[1833]](_0x6b6cx3)};_0x6b6cx4[_0xb59f[470]](function(_0x6b6cx2,_0x6b6cx3){return _0x6b6cx2-_0x6b6cx3});if(1==_0x6b6cx5%2){return _0x6b6cx4[Math[_0xb59f[519]](_0x6b6cx5/2)]};if(2==_0x6b6cx5){return (_0x6b6cx4[0]+_0x6b6cx4[1])/2};_0x6b6cx9=_0x6b6cx5/2;_0x6b6cxa=_0x6b6cx4[_0x6b6cx9-1]-_0x6b6cx4[0];_0x6b6cx5=_0x6b6cx4[_0x6b6cx5-1]-_0x6b6cx4[_0x6b6cx9];return (_0x6b6cx4[_0x6b6cx9-1]*_0x6b6cx5+_0x6b6cx4[_0x6b6cx9]*_0x6b6cxa)/(_0x6b6cxa+_0x6b6cx5)};function MedianCellSorter(){}MedianCellSorter[_0xb59f[202]][_0xb59f[1865]]=0;MedianCellSorter[_0xb59f[202]][_0xb59f[246]]= !1;MedianCellSorter[_0xb59f[202]][_0xb59f[469]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2&&null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[1865]]>_0x6b6cx2[_0xb59f[1865]]?-1:_0x6b6cx3[_0xb59f[1865]]<_0x6b6cx2[_0xb59f[1865]]?1:0:0};function mxMinimumCycleRemover(_0x6b6cx2){this[_0xb59f[1759]]=_0x6b6cx2}mxMinimumCycleRemover[_0xb59f[202]]= new mxHierarchicalLayoutStage;mxMinimumCycleRemover[_0xb59f[202]][_0xb59f[196]]=mxMinimumCycleRemover;mxMinimumCycleRemover[_0xb59f[202]][_0xb59f[1759]]=null;mxMinimumCycleRemover[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1759]][_0xb59f[502]](),_0x6b6cx4={},_0x6b6cx5=mxUtils[_0xb59f[238]](_0x6b6cx3[_0xb59f[1846]],null,!0),_0x6b6cx9=null;if(null!=_0x6b6cx3[_0xb59f[1845]]){var _0x6b6cxa=_0x6b6cx3[_0xb59f[1845]],_0x6b6cx9=[];for(_0x6b6cx2=0;_0x6b6cx2<_0x6b6cxa[_0xb59f[67]];_0x6b6cx2++){var _0x6b6cx12=mxCellPath[_0xb59f[385]](_0x6b6cxa[_0x6b6cx2]);_0x6b6cx9[_0x6b6cx2]=_0x6b6cx3[_0xb59f[1846]][_0x6b6cx12]}};_0x6b6cx3[_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){_0x6b6cx3[_0xb59f[1720]](_0x6b6cx2)&&(_0x6b6cx9[_0xb59f[1744]](),mxUtils[_0xb59f[205]](_0x6b6cx9,_0x6b6cx2[_0xb59f[1838]]),_0x6b6cx2[_0xb59f[1837]][_0xb59f[207]](_0x6b6cx9),mxUtils[_0xb59f[205]](_0x6b6cx9,_0x6b6cx3[_0xb59f[1837]]),_0x6b6cx3[_0xb59f[1838]][_0xb59f[207]](_0x6b6cx9));_0x6b6cx2=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0xb59f[246]]);_0x6b6cx4[_0x6b6cx2]=_0x6b6cx3;delete _0x6b6cx5[_0x6b6cx2]},_0x6b6cx9,!0,null);_0x6b6cx9=null;0<_0x6b6cx5[_0xb59f[1866]]&&(_0x6b6cx9=mxUtils[_0xb59f[238]](_0x6b6cx5,null,!0));_0x6b6cx2=mxUtils[_0xb59f[238]](_0x6b6cx4,null,!0);_0x6b6cx3[_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){_0x6b6cx3[_0xb59f[1720]](_0x6b6cx2)&&(_0x6b6cx9[_0xb59f[1744]](),mxUtils[_0xb59f[205]](_0x6b6cx9,_0x6b6cx2[_0xb59f[1838]]),_0x6b6cx3[_0xb59f[1838]][_0xb59f[207]](_0x6b6cx9),_0x6b6cx2[_0xb59f[1837]][_0xb59f[207]](_0x6b6cx9),mxUtils[_0xb59f[205]](_0x6b6cx9,_0x6b6cx3[_0xb59f[1837]]));_0x6b6cx2=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0xb59f[246]]);_0x6b6cx4[_0x6b6cx2]=_0x6b6cx3;delete _0x6b6cx5[_0x6b6cx2]},_0x6b6cx5,!0,_0x6b6cx2);_0x6b6cxa=this[_0xb59f[1759]][_0xb59f[1703]]();if(null!=_0x6b6cx9&&0<_0x6b6cx9[_0xb59f[67]]){_0x6b6cx3=_0x6b6cx3[_0xb59f[1845]];for(_0x6b6cx2=0;_0x6b6cx2<_0x6b6cx9[_0xb59f[67]];_0x6b6cx2++){_0x6b6cx12=_0x6b6cx9[_0x6b6cx2][_0xb59f[246]],0==_0x6b6cxa[_0xb59f[1867]](_0x6b6cx12)[_0xb59f[67]]&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx12)}}};function mxCoordinateAssignment(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[1759]]=_0x6b6cx2;this[_0xb59f[1868]]=_0x6b6cx3;this[_0xb59f[1869]]=_0x6b6cx4;this[_0xb59f[1870]]=_0x6b6cx5;this[_0xb59f[1871]]=_0x6b6cx9;this[_0xb59f[1872]]=_0x6b6cxa}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxCoordinateAssignment[_0xb59f[202]]= new mxHierarchicalLayoutStage;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[196]]=mxCoordinateAssignment;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1759]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1868]]=30;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1869]]=100;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1872]]=10;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1795]]=8;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1751]]=5;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1752]]=2;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1753]]=12;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1754]]=4;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1873]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1870]]=mxConstants[_0xb59f[1358]];mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1871]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1874]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1875]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1876]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1877]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1878]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1879]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1880]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1881]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1882]]= !0;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[675]]=mxHierarchicalEdgeStyle[_0xb59f[1883]];mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1884]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1885]]=null;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1745]]=10;mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1886]]=function(){var _0x6b6cx2=this[_0xb59f[1759]][_0xb59f[502]]();mxLog[_0xb59f[539]]();mxLog[_0xb59f[171]](_0xb59f[1887]);for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[1850]][_0xb59f[67]];_0x6b6cx3++){mxLog[_0xb59f[53]](_0xb59f[1888],_0x6b6cx3,_0xb59f[1889]);for(var _0x6b6cx4=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx3],_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]];_0x6b6cx5++){mxLog[_0xb59f[53]](_0x6b6cx4[_0x6b6cx5][_0xb59f[1833]](_0x6b6cx3),_0xb59f[316])};mxLog[_0xb59f[171]]()};mxLog[_0xb59f[171]](_0xb59f[1890])};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){this[_0xb59f[1873]]=[];_0x6b6cx2=this[_0xb59f[1759]][_0xb59f[502]]();this[_0xb59f[1875]]=0;this[_0xb59f[1891]](this[_0xb59f[1759]][_0xb59f[1703]](),_0x6b6cx2);this[_0xb59f[1882]]&&this[_0xb59f[1892]](_0x6b6cx2);var _0x6b6cx3=1E8;if(this[_0xb59f[1882]]){for(var _0x6b6cx4=0;_0x6b6cx4<this[_0xb59f[1795]];_0x6b6cx4++){0!=_0x6b6cx4&&(this[_0xb59f[1893]](_0x6b6cx4,_0x6b6cx2),this[_0xb59f[1892]](_0x6b6cx2));if(this[_0xb59f[1875]]<_0x6b6cx3){for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[1850]][_0xb59f[67]];_0x6b6cx5++){for(var _0x6b6cx9=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx5],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx9[_0x6b6cxa];_0x6b6cx12[_0xb59f[1835]](_0x6b6cx5,_0x6b6cx12[_0xb59f[1833]](_0x6b6cx5))}};_0x6b6cx3=this[_0xb59f[1875]]}else {for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[1850]][_0xb59f[67]];_0x6b6cx5++){_0x6b6cx9=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx5];for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){_0x6b6cx12=_0x6b6cx9[_0x6b6cxa],_0x6b6cx12[_0xb59f[1834]](_0x6b6cx5,_0x6b6cx12[_0xb59f[730]](_0x6b6cx5))}}};this[_0xb59f[1894]](this[_0xb59f[1759]][_0xb59f[1703]](),_0x6b6cx2);this[_0xb59f[1875]]=0}};this[_0xb59f[1895]](this[_0xb59f[1759]][_0xb59f[1703]](),_0x6b6cx2)};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1892]]=function(_0x6b6cx2){for(var _0x6b6cx3=[],_0x6b6cx4=[],_0x6b6cx5=[],_0x6b6cx9=0;_0x6b6cx9<=_0x6b6cx2[_0xb59f[1827]];_0x6b6cx9++){_0x6b6cx5[_0x6b6cx9]=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx9];for(var _0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5[_0x6b6cx9][_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx5[_0x6b6cx9][_0x6b6cxa],_0x6b6cx13= new WeightedCellSorter(_0x6b6cx12,_0x6b6cx9);_0x6b6cx13[_0xb59f[1785]]=_0x6b6cxa;_0x6b6cx13[_0xb59f[1784]]= !0;_0x6b6cx3[_0xb59f[207]](_0x6b6cx13);_0x6b6cx12=mxCellPath[_0xb59f[385]](_0x6b6cx12[_0xb59f[1841]]());_0x6b6cx4[_0x6b6cx12]=_0x6b6cx13}};_0x6b6cx2=10*_0x6b6cx3[_0xb59f[67]];for(_0x6b6cxa=0;0<_0x6b6cx3[_0xb59f[67]]&&_0x6b6cxa<=_0x6b6cx2;){var _0x6b6cx13=_0x6b6cx3[_0xb59f[1115]](),_0x6b6cx9=_0x6b6cx13[_0xb59f[246]],_0x6b6cx14=_0x6b6cx13[_0xb59f[1782]],_0x6b6cx15=parseInt(_0x6b6cx13[_0xb59f[1785]]),_0x6b6cx12=_0x6b6cx9[_0xb59f[1831]](_0x6b6cx14),_0x6b6cx16=_0x6b6cx9[_0xb59f[1832]](_0x6b6cx14),_0x6b6cx17=_0x6b6cx12[_0xb59f[67]],_0x6b6cx18=_0x6b6cx16[_0xb59f[67]],_0x6b6cx19=this[_0xb59f[1896]](_0x6b6cx12,_0x6b6cx14+1),_0x6b6cx1a=this[_0xb59f[1896]](_0x6b6cx16,_0x6b6cx14-1),_0x6b6cx1b=_0x6b6cx17+_0x6b6cx18,_0x6b6cx1c=_0x6b6cx9[_0xb59f[1833]](_0x6b6cx14),_0x6b6cx1d=_0x6b6cx1c;0<_0x6b6cx1b&&(_0x6b6cx1d=(_0x6b6cx19*_0x6b6cx17+_0x6b6cx1a*_0x6b6cx18)/_0x6b6cx1b);_0x6b6cx17= !1;_0x6b6cx1d<_0x6b6cx1c-1?0==_0x6b6cx15?(_0x6b6cx9[_0xb59f[1834]](_0x6b6cx14,_0x6b6cx1d),_0x6b6cx17= !0):(_0x6b6cx15=_0x6b6cx5[_0x6b6cx14][_0x6b6cx15-1],_0x6b6cx1c=_0x6b6cx15[_0xb59f[1833]](_0x6b6cx14),_0x6b6cx1c=_0x6b6cx1c+_0x6b6cx15[_0xb59f[117]]/2+this[_0xb59f[1868]]+_0x6b6cx9[_0xb59f[117]]/2,_0x6b6cx1c<_0x6b6cx1d?(_0x6b6cx9[_0xb59f[1834]](_0x6b6cx14,_0x6b6cx1d),_0x6b6cx17= !0):_0x6b6cx1c<_0x6b6cx9[_0xb59f[1833]](_0x6b6cx14)-1&&(_0x6b6cx9[_0xb59f[1834]](_0x6b6cx14,_0x6b6cx1c),_0x6b6cx17= !0)):_0x6b6cx1d>_0x6b6cx1c+1&&(_0x6b6cx15==_0x6b6cx5[_0x6b6cx14][_0xb59f[67]]-1?(_0x6b6cx9[_0xb59f[1834]](_0x6b6cx14,_0x6b6cx1d),_0x6b6cx17= !0):(_0x6b6cx15=_0x6b6cx5[_0x6b6cx14][_0x6b6cx15+1],_0x6b6cx1c=_0x6b6cx15[_0xb59f[1833]](_0x6b6cx14),_0x6b6cx1c=_0x6b6cx1c-_0x6b6cx15[_0xb59f[117]]/2-this[_0xb59f[1868]]-_0x6b6cx9[_0xb59f[117]]/2,_0x6b6cx1c>_0x6b6cx1d?(_0x6b6cx9[_0xb59f[1834]](_0x6b6cx14,_0x6b6cx1d),_0x6b6cx17= !0):_0x6b6cx1c>_0x6b6cx9[_0xb59f[1833]](_0x6b6cx14)+1&&(_0x6b6cx9[_0xb59f[1834]](_0x6b6cx14,_0x6b6cx1c),_0x6b6cx17= !0)));if(_0x6b6cx17){for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx12[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx14=_0x6b6cx12[_0x6b6cx9],_0x6b6cx14=mxCellPath[_0xb59f[385]](_0x6b6cx14[_0xb59f[1841]]()),_0x6b6cx14=_0x6b6cx4[_0x6b6cx14],null!=_0x6b6cx14&&!1==_0x6b6cx14[_0xb59f[1784]]&&(_0x6b6cx14[_0xb59f[1784]]= !0,_0x6b6cx3[_0xb59f[207]](_0x6b6cx14))};for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx16[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx14=_0x6b6cx16[_0x6b6cx9],_0x6b6cx14=mxCellPath[_0xb59f[385]](_0x6b6cx14[_0xb59f[1841]]()),_0x6b6cx14=_0x6b6cx4[_0x6b6cx14],null!=_0x6b6cx14&&!1==_0x6b6cx14[_0xb59f[1784]]&&(_0x6b6cx14[_0xb59f[1784]]= !0,_0x6b6cx3[_0xb59f[207]](_0x6b6cx14))}};_0x6b6cx13[_0xb59f[1784]]= !1;_0x6b6cxa++}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1893]]=function(_0x6b6cx2,_0x6b6cx3){if(0==_0x6b6cx2%2){for(var _0x6b6cx4=_0x6b6cx3[_0xb59f[1827]];0<_0x6b6cx4;_0x6b6cx4--){this[_0xb59f[1897]](_0x6b6cx4-1,_0x6b6cx3,_0x6b6cx4)}}else {for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3[_0xb59f[1827]]-1;_0x6b6cx4++){this[_0xb59f[1897]](_0x6b6cx4+1,_0x6b6cx3,_0x6b6cx4)}}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1897]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=_0x6b6cx3[_0xb59f[1850]][_0x6b6cx2];for(var _0x6b6cx5=[],_0x6b6cx9=[],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx3[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx3[_0x6b6cxa];_0x6b6cx5[_0x6b6cxa]= new WeightedCellSorter;_0x6b6cx5[_0x6b6cxa][_0xb59f[246]]=_0x6b6cx12;_0x6b6cx5[_0x6b6cxa][_0xb59f[1785]]=_0x6b6cxa;var _0x6b6cx13=mxCellPath[_0xb59f[385]](_0x6b6cx12[_0xb59f[1841]]());_0x6b6cx9[_0x6b6cx13]=_0x6b6cx5[_0x6b6cxa];var _0x6b6cx14=null,_0x6b6cx14=_0x6b6cx4<_0x6b6cx2?_0x6b6cx12[_0xb59f[1832]](_0x6b6cx2):_0x6b6cx12[_0xb59f[1831]](_0x6b6cx2);_0x6b6cx5[_0x6b6cxa][_0xb59f[1782]]=this[_0xb59f[1898]](_0x6b6cx12,_0x6b6cx14)};_0x6b6cx5[_0xb59f[470]](WeightedCellSorter[_0xb59f[202]][_0xb59f[469]]);for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5[_0xb59f[67]];_0x6b6cxa++){_0x6b6cx13=0;_0x6b6cx12=_0x6b6cx5[_0x6b6cxa][_0xb59f[246]];_0x6b6cx13=0;_0x6b6cx14=_0x6b6cx4<_0x6b6cx2?_0x6b6cx12[_0xb59f[1832]](_0x6b6cx2)[_0xb59f[1853]]():_0x6b6cx12[_0xb59f[1831]](_0x6b6cx2)[_0xb59f[1853]]();null!=_0x6b6cx14&&(_0x6b6cx13=_0x6b6cx14[_0xb59f[67]],_0x6b6cx13=0<_0x6b6cx13?this[_0xb59f[1896]](_0x6b6cx14,_0x6b6cx4):_0x6b6cx12[_0xb59f[1833]](_0x6b6cx2));for(var _0x6b6cx15=0,_0x6b6cx14=-1E8,_0x6b6cx16=_0x6b6cx5[_0x6b6cxa][_0xb59f[1785]]-1;0<=_0x6b6cx16;){var _0x6b6cx17=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0x6b6cx16][_0xb59f[1841]]()),_0x6b6cx17=_0x6b6cx9[_0x6b6cx17];if(null!=_0x6b6cx17){var _0x6b6cx18=_0x6b6cx17[_0xb59f[246]];_0x6b6cx17[_0xb59f[1784]]?(_0x6b6cx14=_0x6b6cx18[_0xb59f[1833]](_0x6b6cx2)+_0x6b6cx18[_0xb59f[117]]/2+this[_0xb59f[1868]]+_0x6b6cx15+_0x6b6cx12[_0xb59f[117]]/2,_0x6b6cx16= -1):(_0x6b6cx15+=_0x6b6cx18[_0xb59f[117]]+this[_0xb59f[1868]],_0x6b6cx16--)}};_0x6b6cx15=0;_0x6b6cx18=1E8;for(_0x6b6cx16=_0x6b6cx5[_0x6b6cxa][_0xb59f[1785]]+1;_0x6b6cx16<_0x6b6cx5[_0xb59f[67]];){if(_0x6b6cx17=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0x6b6cx16][_0xb59f[1841]]()),_0x6b6cx17=_0x6b6cx9[_0x6b6cx17],null!=_0x6b6cx17){var _0x6b6cx19=_0x6b6cx17[_0xb59f[246]];_0x6b6cx17[_0xb59f[1784]]?(_0x6b6cx18=_0x6b6cx19[_0xb59f[1833]](_0x6b6cx2)-_0x6b6cx19[_0xb59f[117]]/2-this[_0xb59f[1868]]-_0x6b6cx15-_0x6b6cx12[_0xb59f[117]]/2,_0x6b6cx16=_0x6b6cx5[_0xb59f[67]]):(_0x6b6cx15+=_0x6b6cx19[_0xb59f[117]]+this[_0xb59f[1868]],_0x6b6cx16++)}};_0x6b6cx13>=_0x6b6cx14&&_0x6b6cx13<=_0x6b6cx18?_0x6b6cx12[_0xb59f[1834]](_0x6b6cx2,_0x6b6cx13):_0x6b6cx13<_0x6b6cx14?(_0x6b6cx12[_0xb59f[1834]](_0x6b6cx2,_0x6b6cx14),this[_0xb59f[1875]]+=_0x6b6cx14-_0x6b6cx13):_0x6b6cx13>_0x6b6cx18&&(_0x6b6cx12[_0xb59f[1834]](_0x6b6cx2,_0x6b6cx18),this[_0xb59f[1875]]+=_0x6b6cx13-_0x6b6cx18);_0x6b6cx5[_0x6b6cxa][_0xb59f[1784]]= !0}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1898]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=0,_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=_0x6b6cx3[_0x6b6cx5];_0x6b6cx2[_0xb59f[1193]]()&&_0x6b6cx9[_0xb59f[1193]]()?_0x6b6cx4++:_0x6b6cx4=_0x6b6cx2[_0xb59f[250]]()&&_0x6b6cx9[_0xb59f[250]]()?_0x6b6cx4+8:_0x6b6cx4+2};return _0x6b6cx4};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1896]]=function(_0x6b6cx2,_0x6b6cx3){if(0==_0x6b6cx2[_0xb59f[67]]){return 0};for(var _0x6b6cx4=[],_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx4[_0x6b6cx5]=_0x6b6cx2[_0x6b6cx5][_0xb59f[1833]](_0x6b6cx3)};_0x6b6cx4[_0xb59f[470]](function(_0x6b6cx2,_0x6b6cx3){return _0x6b6cx2-_0x6b6cx3});if(1==_0x6b6cx2[_0xb59f[67]]%2){return _0x6b6cx4[Math[_0xb59f[519]](_0x6b6cx2[_0xb59f[67]]/2)]};_0x6b6cx5=_0x6b6cx2[_0xb59f[67]]/2;return (_0x6b6cx4[_0x6b6cx5-1]+_0x6b6cx4[_0x6b6cx5])/2};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1891]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1899]](_0x6b6cx2,_0x6b6cx3);for(var _0x6b6cx4=this[_0xb59f[1876]];0<=_0x6b6cx4;_0x6b6cx4--){_0x6b6cx4<_0x6b6cx3[_0xb59f[1827]]&&this[_0xb59f[1900]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx3)};for(_0x6b6cx4=this[_0xb59f[1876]]+1;_0x6b6cx4<=_0x6b6cx3[_0xb59f[1827]];_0x6b6cx4++){0<_0x6b6cx4&&this[_0xb59f[1900]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx3)}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1900]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=_0x6b6cx4[_0xb59f[1850]][_0x6b6cx2];_0x6b6cx4=0;for(var _0x6b6cx5=this[_0xb59f[1871]]+(this[_0xb59f[1879]]-this[_0xb59f[1880]][_0x6b6cx2])/2,_0x6b6cx9=!1,_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx3[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx3[_0x6b6cxa];if(_0x6b6cx12[_0xb59f[1193]]()){var _0x6b6cx13=this[_0xb59f[1759]][_0xb59f[1726]](_0x6b6cx12[_0xb59f[246]]);null!=_0x6b6cx13?this[_0xb59f[1870]]==mxConstants[_0xb59f[1358]]||this[_0xb59f[1870]]==mxConstants[_0xb59f[1354]]?(_0x6b6cx12[_0xb59f[117]]=_0x6b6cx13[_0xb59f[117]],_0x6b6cx12[_0xb59f[119]]=_0x6b6cx13[_0xb59f[119]]):(_0x6b6cx12[_0xb59f[117]]=_0x6b6cx13[_0xb59f[119]],_0x6b6cx12[_0xb59f[119]]=_0x6b6cx13[_0xb59f[117]]):_0x6b6cx9= !0;_0x6b6cx4=Math[_0xb59f[160]](_0x6b6cx4,_0x6b6cx12[_0xb59f[119]])}else {_0x6b6cx12[_0xb59f[250]]()&&(_0x6b6cx13=1,null!=_0x6b6cx12[_0xb59f[1842]]?_0x6b6cx13=_0x6b6cx12[_0xb59f[1842]][_0xb59f[67]]:mxLog[_0xb59f[283]](_0xb59f[1901]),_0x6b6cx12[_0xb59f[117]]=(_0x6b6cx13-1)*this[_0xb59f[1872]])};_0x6b6cx5+=_0x6b6cx12[_0xb59f[117]]/2;_0x6b6cx12[_0xb59f[1835]](_0x6b6cx2,_0x6b6cx5);_0x6b6cx12[_0xb59f[1834]](_0x6b6cx2,_0x6b6cx5);_0x6b6cx5+=_0x6b6cx12[_0xb59f[117]]/2;_0x6b6cx5+=this[_0xb59f[1868]]};!0==_0x6b6cx9&&mxLog[_0xb59f[283]](_0xb59f[1902])};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1899]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=-this[_0xb59f[1869]],_0x6b6cx5=0;this[_0xb59f[1880]]=[];this[_0xb59f[1881]]=[];for(var _0x6b6cx9=_0x6b6cx3[_0xb59f[1827]];0<=_0x6b6cx9;_0x6b6cx9--){for(var _0x6b6cxa=0,_0x6b6cx12=_0x6b6cx3[_0xb59f[1850]][_0x6b6cx9],_0x6b6cx13=this[_0xb59f[1871]],_0x6b6cx14=!1,_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx12[_0xb59f[67]];_0x6b6cx15++){var _0x6b6cx16=_0x6b6cx12[_0x6b6cx15];if(_0x6b6cx16[_0xb59f[1193]]()){var _0x6b6cx17=this[_0xb59f[1759]][_0xb59f[1726]](_0x6b6cx16[_0xb59f[246]]);null!=_0x6b6cx17?this[_0xb59f[1870]]==mxConstants[_0xb59f[1358]]||this[_0xb59f[1870]]==mxConstants[_0xb59f[1354]]?(_0x6b6cx16[_0xb59f[117]]=_0x6b6cx17[_0xb59f[117]],_0x6b6cx16[_0xb59f[119]]=_0x6b6cx17[_0xb59f[119]]):(_0x6b6cx16[_0xb59f[117]]=_0x6b6cx17[_0xb59f[119]],_0x6b6cx16[_0xb59f[119]]=_0x6b6cx17[_0xb59f[117]]):_0x6b6cx14= !0;_0x6b6cxa=Math[_0xb59f[160]](_0x6b6cxa,_0x6b6cx16[_0xb59f[119]])}else {_0x6b6cx16[_0xb59f[250]]()&&(_0x6b6cx17=1,null!=_0x6b6cx16[_0xb59f[1842]]?_0x6b6cx17=_0x6b6cx16[_0xb59f[1842]][_0xb59f[67]]:mxLog[_0xb59f[283]](_0xb59f[1901]),_0x6b6cx16[_0xb59f[117]]=(_0x6b6cx17-1)*this[_0xb59f[1872]])};_0x6b6cx13+=_0x6b6cx16[_0xb59f[117]]/2;_0x6b6cx16[_0xb59f[1835]](_0x6b6cx9,_0x6b6cx13);_0x6b6cx16[_0xb59f[1834]](_0x6b6cx9,_0x6b6cx13);_0x6b6cx13+=_0x6b6cx16[_0xb59f[117]]/2;_0x6b6cx13+=this[_0xb59f[1868]];_0x6b6cx13>this[_0xb59f[1879]]&&(this[_0xb59f[1879]]=_0x6b6cx13,this[_0xb59f[1876]]=_0x6b6cx9);this[_0xb59f[1880]][_0x6b6cx9]=_0x6b6cx13};!0==_0x6b6cx14&&mxLog[_0xb59f[283]](_0xb59f[1902]);this[_0xb59f[1881]][_0x6b6cx9]=_0x6b6cx4;_0x6b6cx13=_0x6b6cxa/2+_0x6b6cx5/2+this[_0xb59f[1869]];_0x6b6cx5=_0x6b6cxa;_0x6b6cx4=this[_0xb59f[1870]]==mxConstants[_0xb59f[1358]]||this[_0xb59f[1870]]==mxConstants[_0xb59f[1359]]?_0x6b6cx4+_0x6b6cx13:_0x6b6cx4-_0x6b6cx13;for(_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx12[_0xb59f[67]];_0x6b6cx15++){_0x6b6cx12[_0x6b6cx15][_0xb59f[1836]](_0x6b6cx9,_0x6b6cx4)}}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1894]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx3[_0xb59f[1847]],_0x6b6cx5;for(_0x6b6cx5 in _0x6b6cx4){var _0x6b6cx9=_0x6b6cx4[_0x6b6cx5];if(!(1>_0x6b6cx9[_0xb59f[1827]]-_0x6b6cx9[_0xb59f[1828]]-1)){for(var _0x6b6cxa=_0x6b6cx9[_0xb59f[1833]](_0x6b6cx9[_0xb59f[1828]]+1),_0x6b6cx12=!0,_0x6b6cx13=0,_0x6b6cx14=_0x6b6cx9[_0xb59f[1828]]+2;_0x6b6cx14<_0x6b6cx9[_0xb59f[1827]];_0x6b6cx14++){var _0x6b6cx15=_0x6b6cx9[_0xb59f[1833]](_0x6b6cx14);_0x6b6cxa!=_0x6b6cx15?(_0x6b6cx12= !1,_0x6b6cxa=_0x6b6cx15):_0x6b6cx13++};if(!_0x6b6cx12){for(var _0x6b6cx12=_0x6b6cxa=0,_0x6b6cx15=[],_0x6b6cx16=[],_0x6b6cx17=_0x6b6cx9[_0xb59f[1833]](_0x6b6cx9[_0xb59f[1828]]+1),_0x6b6cx14=_0x6b6cx9[_0xb59f[1828]]+1;_0x6b6cx14<_0x6b6cx9[_0xb59f[1827]]-1;_0x6b6cx14++){var _0x6b6cx18=_0x6b6cx9[_0xb59f[730]](_0x6b6cx14+1);_0x6b6cx17==_0x6b6cx18?(_0x6b6cx15[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-1]=_0x6b6cx17,_0x6b6cxa++):this[_0xb59f[1903]](_0x6b6cx3,_0x6b6cx9,_0x6b6cx14+1,_0x6b6cx17)?(_0x6b6cx15[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-1]=_0x6b6cx17,_0x6b6cxa++):_0x6b6cx17=_0x6b6cx15[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-1]=_0x6b6cx18};_0x6b6cx17=_0x6b6cx9[_0xb59f[730]](_0x6b6cx14);for(_0x6b6cx14=_0x6b6cx9[_0xb59f[1827]]-1;_0x6b6cx14>_0x6b6cx9[_0xb59f[1828]]+1;_0x6b6cx14--){_0x6b6cx18=_0x6b6cx9[_0xb59f[730]](_0x6b6cx14-1),_0x6b6cx17==_0x6b6cx18?(_0x6b6cx16[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-2]=_0x6b6cx17,_0x6b6cx12++):this[_0xb59f[1903]](_0x6b6cx3,_0x6b6cx9,_0x6b6cx14-1,_0x6b6cx17)?(_0x6b6cx16[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-2]=_0x6b6cx17,_0x6b6cx12++):(_0x6b6cx16[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-2]=_0x6b6cx9[_0xb59f[730]](_0x6b6cx14-1),_0x6b6cx17=_0x6b6cx18)};if(_0x6b6cx12>_0x6b6cx13||_0x6b6cxa>_0x6b6cx13){if(_0x6b6cx12>=_0x6b6cxa){for(_0x6b6cx14=_0x6b6cx9[_0xb59f[1827]]-2;_0x6b6cx14>_0x6b6cx9[_0xb59f[1828]];_0x6b6cx14--){_0x6b6cx9[_0xb59f[1835]](_0x6b6cx14,_0x6b6cx16[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-1])}}else {if(_0x6b6cxa>_0x6b6cx12){for(_0x6b6cx14=_0x6b6cx9[_0xb59f[1828]]+2;_0x6b6cx14<_0x6b6cx9[_0xb59f[1827]];_0x6b6cx14++){_0x6b6cx9[_0xb59f[1835]](_0x6b6cx14,_0x6b6cx15[_0x6b6cx14-_0x6b6cx9[_0xb59f[1828]]-2])}}}}}}}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1903]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx2=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx4];for(var _0x6b6cx9=-1,_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2[_0xb59f[67]];_0x6b6cxa++){if(_0x6b6cx3==_0x6b6cx2[_0x6b6cxa]){_0x6b6cx9=_0x6b6cxa;break}};if(0>_0x6b6cx9){return !1};_0x6b6cxa=_0x6b6cx3[_0xb59f[1833]](_0x6b6cx4);if(_0x6b6cx5<_0x6b6cxa){if(0==_0x6b6cx9){return !0};_0x6b6cx2=_0x6b6cx2[_0x6b6cx9-1];_0x6b6cx4=_0x6b6cx2[_0xb59f[1833]](_0x6b6cx4);_0x6b6cx4=_0x6b6cx4+_0x6b6cx2[_0xb59f[117]]/2+this[_0xb59f[1868]]+_0x6b6cx3[_0xb59f[117]]/2;if(!(_0x6b6cx4<=_0x6b6cx5)){return !1}}else {if(_0x6b6cx5>_0x6b6cxa){if(_0x6b6cx9==_0x6b6cx2[_0xb59f[67]]-1){return !0};_0x6b6cx2=_0x6b6cx2[_0x6b6cx9+1];_0x6b6cx4=_0x6b6cx2[_0xb59f[1833]](_0x6b6cx4);_0x6b6cx4=_0x6b6cx4-_0x6b6cx2[_0xb59f[117]]/2-this[_0xb59f[1868]]-_0x6b6cx3[_0xb59f[117]]/2;if(!(_0x6b6cx4>=_0x6b6cx5)){return !1}}};return !0};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1895]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1877]]=[];this[_0xb59f[1878]]=[];for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3[_0xb59f[1850]][_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[1877]][_0x6b6cx4]=Number[_0xb59f[1904]],this[_0xb59f[1878]][_0x6b6cx4]=0};_0x6b6cx4=null;this[_0xb59f[1759]][_0xb59f[1735]]&&(_0x6b6cx4={});var _0x6b6cx5=_0x6b6cx3[_0xb59f[1847]],_0x6b6cx9=_0x6b6cx3[_0xb59f[1846]],_0x6b6cxa;for(_0x6b6cxa in _0x6b6cx9){var _0x6b6cx12=_0x6b6cx9[_0x6b6cxa];this[_0xb59f[1725]](_0x6b6cx12);if(this[_0xb59f[1759]][_0xb59f[1735]]){var _0x6b6cx12=_0x6b6cx2[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx12[_0xb59f[246]]),_0x6b6cx13=mxCellPath[_0xb59f[385]](_0x6b6cx12);null==_0x6b6cx4[_0x6b6cx13]&&(_0x6b6cx4[_0x6b6cx13]=_0x6b6cx12)}};this[_0xb59f[1759]][_0xb59f[1735]]&&null!=_0x6b6cx4&&this[_0xb59f[1763]](_0x6b6cx4);(this[_0xb59f[675]]==mxHierarchicalEdgeStyle[_0xb59f[1905]]||this[_0xb59f[675]]==mxHierarchicalEdgeStyle[_0xb59f[1883]]||this[_0xb59f[675]]==mxHierarchicalEdgeStyle[_0xb59f[1906]])&&this[_0xb59f[1764]](_0x6b6cx3);for(_0x6b6cxa in _0x6b6cx5){this[_0xb59f[1907]](_0x6b6cx5[_0x6b6cxa])}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1763]]=function(_0x6b6cx2){var _0x6b6cx3=[],_0x6b6cx4;for(_0x6b6cx4 in _0x6b6cx2){_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0x6b6cx4])};this[_0xb59f[1759]][_0xb59f[1727]](mxUtils[_0xb59f[1779]](_0x6b6cx3,!0),this[_0xb59f[1745]])};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1764]]=function(_0x6b6cx2){for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[1850]][_0xb59f[67]];_0x6b6cx3++){for(var _0x6b6cx4=_0x6b6cx2[_0xb59f[1850]][_0x6b6cx3],_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=_0x6b6cx4[_0x6b6cx5];if(_0x6b6cx9[_0xb59f[1193]]()){for(var _0x6b6cxa=_0x6b6cx9[_0xb59f[1832]](_0x6b6cx3),_0x6b6cx12=_0x6b6cx3-1,_0x6b6cx13=0;2>_0x6b6cx13;_0x6b6cx13++){if(-1<_0x6b6cx12&&_0x6b6cx12<_0x6b6cx2[_0xb59f[1850]][_0xb59f[67]]&&null!=_0x6b6cxa&&0<_0x6b6cxa[_0xb59f[67]]){for(var _0x6b6cx14=[],_0x6b6cx15=0;_0x6b6cx15<_0x6b6cxa[_0xb59f[67]];_0x6b6cx15++){var _0x6b6cx16= new WeightedCellSorter(_0x6b6cxa[_0x6b6cx15],_0x6b6cxa[_0x6b6cx15][_0xb59f[730]](_0x6b6cx12));_0x6b6cx14[_0xb59f[207]](_0x6b6cx16)};_0x6b6cx14[_0xb59f[470]](WeightedCellSorter[_0xb59f[202]][_0xb59f[469]]);for(var _0x6b6cx16=_0x6b6cx9[_0xb59f[235]][0]-_0x6b6cx9[_0xb59f[117]]/2,_0x6b6cx17=_0x6b6cx16+_0x6b6cx9[_0xb59f[117]],_0x6b6cx18=_0x6b6cxa=0,_0x6b6cx12=[],_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx14[_0xb59f[67]];_0x6b6cx15++){var _0x6b6cx19=_0x6b6cx14[_0x6b6cx15][_0xb59f[246]],_0x6b6cx1a;if(_0x6b6cx19[_0xb59f[1193]]()){_0x6b6cx1a=0==_0x6b6cx13?_0x6b6cx9[_0xb59f[1838]]:_0x6b6cx9[_0xb59f[1837]];for(var _0x6b6cx1b=0;_0x6b6cx1b<_0x6b6cx1a[_0xb59f[67]];_0x6b6cx1b++){if(_0x6b6cx1a[_0x6b6cx1b][_0xb59f[1097]]==_0x6b6cx19||_0x6b6cx1a[_0x6b6cx1b][_0xb59f[772]]==_0x6b6cx19){_0x6b6cxa+=_0x6b6cx1a[_0x6b6cx1b][_0xb59f[1842]][_0xb59f[67]],_0x6b6cx18++,_0x6b6cx12[_0xb59f[207]](_0x6b6cx1a[_0x6b6cx1b])}}}else {_0x6b6cxa+=_0x6b6cx19[_0xb59f[1842]][_0xb59f[67]],_0x6b6cx18++,_0x6b6cx12[_0xb59f[207]](_0x6b6cx19)}};_0x6b6cx9[_0xb59f[117]]>(_0x6b6cxa+1)*this[_0xb59f[1751]]+2*this[_0xb59f[1751]]&&(_0x6b6cx16+=this[_0xb59f[1751]],_0x6b6cx17-=this[_0xb59f[1751]]);_0x6b6cx14=(_0x6b6cx17-_0x6b6cx16)/_0x6b6cxa;_0x6b6cx16+=_0x6b6cx14/2;_0x6b6cx17=this[_0xb59f[1753]]-this[_0xb59f[1752]];for(_0x6b6cx15=_0x6b6cx18=0;_0x6b6cx15<_0x6b6cx12[_0xb59f[67]];_0x6b6cx15++){_0x6b6cx19=_0x6b6cx12[_0x6b6cx15][_0xb59f[1842]][_0xb59f[67]];_0x6b6cx1b=mxCellPath[_0xb59f[385]](_0x6b6cx12[_0x6b6cx15][_0xb59f[1842]][0]);_0x6b6cx1a=this[_0xb59f[1873]][_0x6b6cx1b];null==_0x6b6cx1a&&(_0x6b6cx1a=[],this[_0xb59f[1873]][_0x6b6cx1b]=_0x6b6cx1a);_0x6b6cx15<_0x6b6cxa/2?_0x6b6cx17+=this[_0xb59f[1752]]:_0x6b6cx15>_0x6b6cxa/2&&(_0x6b6cx17-=this[_0xb59f[1752]]);for(_0x6b6cx1b=0;_0x6b6cx1b<_0x6b6cx19;_0x6b6cx1b++){_0x6b6cx1a[4*_0x6b6cx1b+2*_0x6b6cx13]=_0x6b6cx16,_0x6b6cx16+=_0x6b6cx14,_0x6b6cx1a[4*_0x6b6cx1b+2*_0x6b6cx13+1]=_0x6b6cx17};_0x6b6cx18=Math[_0xb59f[160]](_0x6b6cx18,_0x6b6cx17)}};_0x6b6cxa=_0x6b6cx9[_0xb59f[1831]](_0x6b6cx3);_0x6b6cx12=_0x6b6cx3+1}}}}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1907]]=function(_0x6b6cx2){var _0x6b6cx3=0;if(101207!=_0x6b6cx2[_0xb59f[1826]][0]){var _0x6b6cx4=_0x6b6cx2[_0xb59f[1827]],_0x6b6cx5=_0x6b6cx2[_0xb59f[1828]];_0x6b6cx4==_0x6b6cx5&&(_0x6b6cx4=_0x6b6cx2[_0xb59f[1097]][_0xb59f[1827]],_0x6b6cx5=_0x6b6cx2[_0xb59f[772]][_0xb59f[1828]]);for(var _0x6b6cx9=0,_0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2[_0xb59f[1842]][0]),_0x6b6cxa=this[_0xb59f[1873]][_0x6b6cxa],_0x6b6cx12=_0x6b6cx2[_0xb59f[1843]]?_0x6b6cx2[_0xb59f[772]][_0xb59f[246]]:_0x6b6cx2[_0xb59f[1097]][_0xb59f[246]],_0x6b6cx13=this[_0xb59f[1759]][_0xb59f[1179]],_0x6b6cx14=0;_0x6b6cx14<_0x6b6cx2[_0xb59f[1842]][_0xb59f[67]];_0x6b6cx14++){var _0x6b6cx15=_0x6b6cx2[_0xb59f[1842]][_0x6b6cx14],_0x6b6cx16=this[_0xb59f[1759]][_0xb59f[1710]](_0x6b6cx15,!0),_0x6b6cx17=_0x6b6cx13[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx15,!0),_0x6b6cx18=[],_0x6b6cx19=_0x6b6cx2[_0xb59f[1843]];_0x6b6cx16!=_0x6b6cx12&&(_0x6b6cx19= !_0x6b6cx19);if(null!=_0x6b6cxa){var _0x6b6cx1a=_0x6b6cx19?2:0,_0x6b6cx1b=_0x6b6cx19?this[_0xb59f[1877]][_0x6b6cx5]:this[_0xb59f[1878]][_0x6b6cx4],_0x6b6cx1c=_0x6b6cxa[4*_0x6b6cx9+1+_0x6b6cx1a];_0x6b6cx19&&(_0x6b6cx1c= -_0x6b6cx1c);_0x6b6cx1b+=_0x6b6cx1c;_0x6b6cx1a=_0x6b6cxa[4*_0x6b6cx9+_0x6b6cx1a];_0x6b6cx17=_0x6b6cx13[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx15,!0);this[_0xb59f[1759]][_0xb59f[1908]](_0x6b6cx17)&&_0x6b6cx13[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx17)==_0x6b6cx16&&(_0x6b6cx1a=_0x6b6cx13[_0xb59f[441]][_0xb59f[248]](_0x6b6cx17),_0x6b6cx1a=null!=_0x6b6cx1a?_0x6b6cx1a[_0xb59f[235]]:_0x6b6cx16[_0xb59f[256]][_0xb59f[235]]+_0x6b6cx2[_0xb59f[1097]][_0xb59f[117]]*_0x6b6cx17[_0xb59f[256]][_0xb59f[235]]);this[_0xb59f[1870]]==mxConstants[_0xb59f[1358]]||this[_0xb59f[1870]]==mxConstants[_0xb59f[1354]]?(_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1a,_0x6b6cx1b)),this[_0xb59f[675]]==mxHierarchicalEdgeStyle[_0xb59f[1906]]&&_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1a,_0x6b6cx1b+_0x6b6cx1c))):(_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1b,_0x6b6cx1a)),this[_0xb59f[675]]==mxHierarchicalEdgeStyle[_0xb59f[1906]]&&_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1b+_0x6b6cx1c,_0x6b6cx1a)))};_0x6b6cx1a=_0x6b6cx2[_0xb59f[235]][_0xb59f[67]]-1;_0x6b6cx1b=_0x6b6cx1c= -1;_0x6b6cx16=_0x6b6cx2[_0xb59f[1827]]-1;_0x6b6cx19&&(_0x6b6cx1a=0,_0x6b6cx1c=_0x6b6cx2[_0xb59f[235]][_0xb59f[67]],_0x6b6cx1b=1,_0x6b6cx16=_0x6b6cx2[_0xb59f[1828]]+1);for(;_0x6b6cx2[_0xb59f[1827]]!=_0x6b6cx2[_0xb59f[1828]]&&_0x6b6cx1a!=_0x6b6cx1c;_0x6b6cx1a+=_0x6b6cx1b){var _0x6b6cx17=_0x6b6cx2[_0xb59f[235]][_0x6b6cx1a]+_0x6b6cx3,_0x6b6cx1d=(this[_0xb59f[1877]][_0x6b6cx16]+this[_0xb59f[1878]][_0x6b6cx16+1])/2,_0x6b6cx1e=(this[_0xb59f[1877]][_0x6b6cx16-1]+this[_0xb59f[1878]][_0x6b6cx16])/2;if(_0x6b6cx19){var _0x6b6cx1f=_0x6b6cx1d,_0x6b6cx1d=_0x6b6cx1e,_0x6b6cx1e=_0x6b6cx1f};this[_0xb59f[1870]]==mxConstants[_0xb59f[1358]]||this[_0xb59f[1870]]==mxConstants[_0xb59f[1354]]?(_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx17,_0x6b6cx1d)),_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx17,_0x6b6cx1e))):(_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1d,_0x6b6cx17)),_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1e,_0x6b6cx17)));this[_0xb59f[1874]]=Math[_0xb59f[160]](this[_0xb59f[1874]],_0x6b6cx17);_0x6b6cx16+=_0x6b6cx1b};null!=_0x6b6cxa&&(_0x6b6cx1a=_0x6b6cx19?2:0,_0x6b6cx1b=_0x6b6cx19?this[_0xb59f[1878]][_0x6b6cx4]:this[_0xb59f[1877]][_0x6b6cx5],_0x6b6cx1c=_0x6b6cxa[4*_0x6b6cx9+3-_0x6b6cx1a],_0x6b6cx19&&(_0x6b6cx1c= -_0x6b6cx1c),_0x6b6cx1b-=_0x6b6cx1c,_0x6b6cx1a=_0x6b6cxa[4*_0x6b6cx9+2-_0x6b6cx1a],_0x6b6cx19=_0x6b6cx13[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx15,!1),_0x6b6cx16=this[_0xb59f[1759]][_0xb59f[1710]](_0x6b6cx15,!1),this[_0xb59f[1759]][_0xb59f[1908]](_0x6b6cx19)&&_0x6b6cx13[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx19)==_0x6b6cx16&&(_0x6b6cx1a=_0x6b6cx13[_0xb59f[441]][_0xb59f[248]](_0x6b6cx19),_0x6b6cx1a=null!=_0x6b6cx1a?_0x6b6cx1a[_0xb59f[235]]:_0x6b6cx16[_0xb59f[256]][_0xb59f[235]]+_0x6b6cx2[_0xb59f[772]][_0xb59f[117]]*_0x6b6cx19[_0xb59f[256]][_0xb59f[235]]),this[_0xb59f[1870]]==mxConstants[_0xb59f[1358]]||this[_0xb59f[1870]]==mxConstants[_0xb59f[1354]]?(this[_0xb59f[675]]==mxHierarchicalEdgeStyle[_0xb59f[1906]]&&_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1a,_0x6b6cx1b-_0x6b6cx1c)),_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1a,_0x6b6cx1b))):(this[_0xb59f[675]]==mxHierarchicalEdgeStyle[_0xb59f[1906]]&&_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1b-_0x6b6cx1c,_0x6b6cx1a)),_0x6b6cx18[_0xb59f[207]]( new mxPoint(_0x6b6cx1b,_0x6b6cx1a))));_0x6b6cx2[_0xb59f[1843]]&&this[_0xb59f[1909]](_0x6b6cx2,_0x6b6cx15);this[_0xb59f[1759]][_0xb59f[1722]](_0x6b6cx15,_0x6b6cx18);_0x6b6cx3=0==_0x6b6cx3?this[_0xb59f[1872]]:0<_0x6b6cx3?-_0x6b6cx3:-_0x6b6cx3+this[_0xb59f[1872]];_0x6b6cx9++};_0x6b6cx2[_0xb59f[1826]][0]=101207}};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1725]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[246]],_0x6b6cx4=_0x6b6cx2[_0xb59f[235]][0]-_0x6b6cx2[_0xb59f[117]]/2,_0x6b6cx5=_0x6b6cx2[_0xb59f[236]][0]-_0x6b6cx2[_0xb59f[119]]/2;this[_0xb59f[1877]][_0x6b6cx2[_0xb59f[1828]]]=Math[_0xb59f[243]](this[_0xb59f[1877]][_0x6b6cx2[_0xb59f[1828]]],_0x6b6cx5);this[_0xb59f[1878]][_0x6b6cx2[_0xb59f[1828]]]=Math[_0xb59f[160]](this[_0xb59f[1878]][_0x6b6cx2[_0xb59f[1828]]],_0x6b6cx5+_0x6b6cx2[_0xb59f[119]]);this[_0xb59f[1870]]==mxConstants[_0xb59f[1358]]||this[_0xb59f[1870]]==mxConstants[_0xb59f[1354]]?this[_0xb59f[1759]][_0xb59f[1725]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5):this[_0xb59f[1759]][_0xb59f[1725]](_0x6b6cx3,_0x6b6cx5,_0x6b6cx4);this[_0xb59f[1874]]=Math[_0xb59f[160]](this[_0xb59f[1874]],_0x6b6cx4+_0x6b6cx2[_0xb59f[117]])};mxCoordinateAssignment[_0xb59f[202]][_0xb59f[1909]]=function(_0x6b6cx2,_0x6b6cx3){};function WeightedCellSorter(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[246]]=_0x6b6cx2;this[_0xb59f[1782]]=_0x6b6cx3}WeightedCellSorter[_0xb59f[202]][_0xb59f[1782]]=0;WeightedCellSorter[_0xb59f[202]][_0xb59f[1783]]= !1;WeightedCellSorter[_0xb59f[202]][_0xb59f[1784]]= !1;WeightedCellSorter[_0xb59f[202]][_0xb59f[1785]]=null;WeightedCellSorter[_0xb59f[202]][_0xb59f[246]]=null;WeightedCellSorter[_0xb59f[202]][_0xb59f[469]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2&&null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[1782]]>_0x6b6cx2[_0xb59f[1782]]?-1:_0x6b6cx3[_0xb59f[1782]]<_0x6b6cx2[_0xb59f[1782]]?1:_0x6b6cx3[_0xb59f[1783]]?-1:1:0};function mxHierarchicalLayout(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxGraphLayout[_0xb59f[239]](this,_0x6b6cx2);this[_0xb59f[1870]]=null!=_0x6b6cx3?_0x6b6cx3:mxConstants[_0xb59f[1358]];this[_0xb59f[1910]]=null!=_0x6b6cx4?_0x6b6cx4:!0}mxHierarchicalLayout[_0xb59f[202]]= new mxGraphLayout;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[196]]=mxHierarchicalLayout;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1845]]=null;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1735]]= !1;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1911]]= !1;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1912]]=0;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1868]]=30;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1869]]=100;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1913]]=60;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1872]]=10;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1870]]=mxConstants[_0xb59f[1358]];mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1882]]= !0;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1844]]= !0;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1787]]= !0;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1914]]= !0;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[251]]=null;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1915]]=null;mxHierarchicalLayout[_0xb59f[202]][_0xb59f[502]]=function(){return this[_0xb59f[251]]};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1101]]=_0x6b6cx2;var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[251]];this[_0xb59f[1915]]={};if(!(null==_0x6b6cx3&&null==_0x6b6cx2)){if(null!=_0x6b6cx3&&null!=_0x6b6cx2){for(var _0x6b6cx5=[],_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx3[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx4[_0xb59f[1720]](_0x6b6cx2,_0x6b6cx3[_0x6b6cx9])&&_0x6b6cx5[_0xb59f[207]](_0x6b6cx3[_0x6b6cx9])};this[_0xb59f[1845]]=_0x6b6cx5}else {this[_0xb59f[1845]]=_0x6b6cx3};_0x6b6cx4[_0xb59f[473]]();try{this[_0xb59f[1916]](_0x6b6cx2),this[_0xb59f[1735]]&&!this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx2)&&this[_0xb59f[1179]][_0xb59f[1917]]([_0x6b6cx2],this[_0xb59f[1912]],this[_0xb59f[1911]])}finally{_0x6b6cx4[_0xb59f[476]]()}}};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1918]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=[];if(null!=_0x6b6cx2&&null!=_0x6b6cx3){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[251]],_0x6b6cx9=null,_0x6b6cxa=-1E5,_0x6b6cx12;for(_0x6b6cx12 in _0x6b6cx3){var _0x6b6cx13=_0x6b6cx3[_0x6b6cx12];if(_0x6b6cx5[_0xb59f[1193]](_0x6b6cx13)&&this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx13)){for(var _0x6b6cx14=this[_0xb59f[264]](_0x6b6cx13),_0x6b6cx15=0,_0x6b6cx16=0,_0x6b6cx17=0;_0x6b6cx17<_0x6b6cx14[_0xb59f[67]];_0x6b6cx17++){this[_0xb59f[1710]](_0x6b6cx14[_0x6b6cx17],!0)==_0x6b6cx13?_0x6b6cx15++:_0x6b6cx16++};0==_0x6b6cx16&&0<_0x6b6cx15&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx13);_0x6b6cx14=_0x6b6cx15-_0x6b6cx16;_0x6b6cx14>_0x6b6cxa&&(_0x6b6cxa=_0x6b6cx14,_0x6b6cx9=_0x6b6cx13)}};0==_0x6b6cx4[_0xb59f[67]]&&null!=_0x6b6cx9&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx9)};return _0x6b6cx4};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[264]]=function(_0x6b6cx2){var _0x6b6cx3=mxCellPath[_0xb59f[385]](_0x6b6cx2);if(null!=this[_0xb59f[1915]][_0x6b6cx3]){return this[_0xb59f[1915]][_0x6b6cx3]};for(var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[251]],_0x6b6cx5=[],_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx2),_0x6b6cxa=_0x6b6cx4[_0xb59f[262]](_0x6b6cx2),_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa;_0x6b6cx12++){var _0x6b6cx13=_0x6b6cx4[_0xb59f[263]](_0x6b6cx2,_0x6b6cx12);if(this[_0xb59f[1908]](_0x6b6cx13)){_0x6b6cx5=_0x6b6cx5[_0xb59f[1919]](_0x6b6cx4[_0xb59f[264]](_0x6b6cx13,!0,!0))}else {if(_0x6b6cx9||!this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx13)){_0x6b6cx5=_0x6b6cx5[_0xb59f[1919]](_0x6b6cx4[_0xb59f[264]](_0x6b6cx13,!0,!0))}}};_0x6b6cx5=_0x6b6cx5[_0xb59f[1919]](_0x6b6cx4[_0xb59f[264]](_0x6b6cx2,!0,!0));_0x6b6cx4=[];for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cx5[_0xb59f[67]];_0x6b6cx12++){_0x6b6cx9=this[_0xb59f[1710]](_0x6b6cx5[_0x6b6cx12],!0),_0x6b6cxa=this[_0xb59f[1710]](_0x6b6cx5[_0x6b6cx12],!1),(_0x6b6cx9==_0x6b6cxa||_0x6b6cx9!=_0x6b6cxa&&(_0x6b6cxa==_0x6b6cx2&&(null==this[_0xb59f[1101]]||this[_0xb59f[1179]][_0xb59f[1920]](_0x6b6cx9,this[_0xb59f[1101]],this[_0xb59f[1914]]))||_0x6b6cx9==_0x6b6cx2&&(null==this[_0xb59f[1101]]||this[_0xb59f[1179]][_0xb59f[1920]](_0x6b6cxa,this[_0xb59f[1101]],this[_0xb59f[1914]]))))&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx5[_0x6b6cx12])};return this[_0xb59f[1915]][_0x6b6cx3]=_0x6b6cx4};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1710]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[1710]](_0x6b6cx3):this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[1710]](_0x6b6cx2,_0x6b6cx3);this[_0xb59f[1908]](_0x6b6cx4)&&(_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1197]](_0x6b6cx4));return _0x6b6cx4};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1916]]=function(_0x6b6cx2){var _0x6b6cx3=[],_0x6b6cx4=[];if(null==this[_0xb59f[1845]]&&null!=_0x6b6cx2){var _0x6b6cx5={};this[_0xb59f[1921]](_0x6b6cx2,_0x6b6cx5);this[_0xb59f[1845]]=[];var _0x6b6cx9=!0,_0x6b6cxa;for(_0x6b6cxa in _0x6b6cx5){if(null!=_0x6b6cx5[_0x6b6cxa]){_0x6b6cx9= !1;break}};for(;!_0x6b6cx9;){for(var _0x6b6cx12=this[_0xb59f[1918]](_0x6b6cx2,_0x6b6cx5),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx12[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cx13=[];_0x6b6cx3[_0xb59f[207]](_0x6b6cx13);this[_0xb59f[1706]](_0x6b6cx12[_0x6b6cx9],!0,null,_0x6b6cx4,_0x6b6cx13,_0x6b6cx3,_0x6b6cx5)};for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx12[_0xb59f[67]];_0x6b6cx9++){this[_0xb59f[1845]][_0xb59f[207]](_0x6b6cx12[_0x6b6cx9])};_0x6b6cx9= !0;for(_0x6b6cxa in _0x6b6cx5){if(null!=_0x6b6cx5[_0x6b6cxa]){_0x6b6cx9= !1;break}}}}else {for(_0x6b6cx9=0;_0x6b6cx9<roots[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx13=[],_0x6b6cx3[_0xb59f[207]](_0x6b6cx13),traverse(roots[_0xb59f[203]](_0x6b6cx9),!0,null,_0x6b6cx4,_0x6b6cx13,_0x6b6cx3,null)}};for(_0x6b6cx9=_0x6b6cx4=0;_0x6b6cx9<_0x6b6cx3[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx13=_0x6b6cx3[_0x6b6cx9];_0x6b6cx5=[];for(_0x6b6cxa in _0x6b6cx13){_0x6b6cx5[_0xb59f[207]](_0x6b6cx13[_0x6b6cxa])};this[_0xb59f[251]]= new mxGraphHierarchyModel(this,_0x6b6cx5,this[_0xb59f[1845]],_0x6b6cx2,this[_0xb59f[1844]]);this[_0xb59f[1922]](_0x6b6cx2);this[_0xb59f[1923]]();this[_0xb59f[1924]](_0x6b6cx2);_0x6b6cx4=this[_0xb59f[1925]](_0x6b6cx4,_0x6b6cx2)}};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1921]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[251]];_0x6b6cx4[_0xb59f[1193]](_0x6b6cx2)&&(_0x6b6cx2!=this[_0xb59f[1101]]&&this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx2))&&(_0x6b6cx3[mxCellPath[_0xb59f[385]](_0x6b6cx2)]=_0x6b6cx2);if(this[_0xb59f[1914]]||_0x6b6cx2==this[_0xb59f[1101]]&&this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx2)){for(var _0x6b6cx5=_0x6b6cx4[_0xb59f[262]](_0x6b6cx2),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx4[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9);this[_0xb59f[1908]](_0x6b6cxa)||this[_0xb59f[1921]](_0x6b6cxa,_0x6b6cx3)}}};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1908]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[256]][_0xb59f[1500]]?!0:!1};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1781]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!1;for(var _0x6b6cx5=this[_0xb59f[264]](_0x6b6cx2),_0x6b6cx9=[],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[1710]](_0x6b6cx5[_0x6b6cxa],!0),_0x6b6cx13=this[_0xb59f[1710]](_0x6b6cx5[_0x6b6cxa],!1);(_0x6b6cx12==_0x6b6cx2&&_0x6b6cx13==_0x6b6cx3||!_0x6b6cx4&&_0x6b6cx12==_0x6b6cx3&&_0x6b6cx13==_0x6b6cx2)&&_0x6b6cx9[_0xb59f[207]](_0x6b6cx5[_0x6b6cxa])};return _0x6b6cx9};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1706]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){if(null!=_0x6b6cx2&&null!=_0x6b6cx5){var _0x6b6cx13=mxCellPath[_0xb59f[385]](_0x6b6cx2);if(null==_0x6b6cx5[_0x6b6cx13]&&(null==_0x6b6cx12||null!=_0x6b6cx12[_0x6b6cx13])){null==_0x6b6cx9[_0x6b6cx13]&&(_0x6b6cx9[_0x6b6cx13]=_0x6b6cx2);null==_0x6b6cx5[_0x6b6cx13]&&(_0x6b6cx5[_0x6b6cx13]=_0x6b6cx2);delete _0x6b6cx12[_0x6b6cx13];var _0x6b6cx14=this[_0xb59f[264]](_0x6b6cx2);for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx14[_0xb59f[67]];_0x6b6cx4++){if(_0x6b6cx13=this[_0xb59f[1710]](_0x6b6cx14[_0x6b6cx4],!0)==_0x6b6cx2,!_0x6b6cx3||_0x6b6cx13){_0x6b6cx13=this[_0xb59f[1710]](_0x6b6cx14[_0x6b6cx4],!_0x6b6cx13),_0x6b6cx9=this[_0xb59f[1706]](_0x6b6cx13,_0x6b6cx3,_0x6b6cx14[_0x6b6cx4],_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12)}}}else {if(null==_0x6b6cx9[_0x6b6cx13]){for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cxa[_0xb59f[67]];_0x6b6cx4++){if(_0x6b6cx2=_0x6b6cxa[_0x6b6cx4],null!=_0x6b6cx2[_0x6b6cx13]){for(_0x6b6cx14 in _0x6b6cx9){_0x6b6cx2[_0x6b6cx14]=_0x6b6cx9[_0x6b6cx14]};_0x6b6cxa[_0xb59f[1242]]();return _0x6b6cx2}}}}};return _0x6b6cx9};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1922]]=function(_0x6b6cx2){( new mxMinimumCycleRemover(this))[_0xb59f[350]](_0x6b6cx2)};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1923]]=function(){this[_0xb59f[251]][_0xb59f[1852]]();this[_0xb59f[251]][_0xb59f[1854]]()};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1924]]=function(_0x6b6cx2){( new mxMedianHybridCrossingReduction(this))[_0xb59f[350]](_0x6b6cx2)};mxHierarchicalLayout[_0xb59f[202]][_0xb59f[1925]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4= new mxCoordinateAssignment(this,this[_0xb59f[1868]],this[_0xb59f[1869]],this[_0xb59f[1870]],_0x6b6cx2,this[_0xb59f[1872]]);_0x6b6cx4[_0xb59f[1882]]=this[_0xb59f[1882]];_0x6b6cx4[_0xb59f[350]](_0x6b6cx3);return _0x6b6cx4[_0xb59f[1874]]+this[_0xb59f[1913]]};function mxGraphModel(_0x6b6cx2){this[_0xb59f[1926]]=this[_0xb59f[1096]]();null!=_0x6b6cx2?this[_0xb59f[1927]](_0x6b6cx2):this[_0xb59f[200]]()}mxGraphModel[_0xb59f[202]]= new mxEventSource;mxGraphModel[_0xb59f[202]][_0xb59f[196]]=mxGraphModel;mxGraphModel[_0xb59f[202]][_0xb59f[813]]=null;mxGraphModel[_0xb59f[202]][_0xb59f[895]]=null;mxGraphModel[_0xb59f[202]][_0xb59f[1928]]= !0;mxGraphModel[_0xb59f[202]][_0xb59f[1929]]= !0;mxGraphModel[_0xb59f[202]][_0xb59f[1089]]=_0xb59f[110];mxGraphModel[_0xb59f[202]][_0xb59f[1930]]=_0xb59f[110];mxGraphModel[_0xb59f[202]][_0xb59f[1931]]=0;mxGraphModel[_0xb59f[202]][_0xb59f[1926]]=null;mxGraphModel[_0xb59f[202]][_0xb59f[1932]]=0;mxGraphModel[_0xb59f[202]][_0xb59f[1933]]= !1;mxGraphModel[_0xb59f[202]][_0xb59f[200]]=function(){this[_0xb59f[1927]](this[_0xb59f[1934]]())};mxGraphModel[_0xb59f[202]][_0xb59f[1935]]=function(){return this[_0xb59f[1929]]};mxGraphModel[_0xb59f[202]][_0xb59f[1936]]=function(_0x6b6cx2){this[_0xb59f[1929]]=_0x6b6cx2};mxGraphModel[_0xb59f[202]][_0xb59f[1934]]=function(){var _0x6b6cx2= new mxCell;_0x6b6cx2[_0xb59f[1937]]( new mxCell);return _0x6b6cx2};mxGraphModel[_0xb59f[202]][_0xb59f[736]]=function(_0x6b6cx2){return null!=this[_0xb59f[895]]?this[_0xb59f[895]][_0x6b6cx2]:null};mxGraphModel[_0xb59f[202]][_0xb59f[1938]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null;if(null!=_0x6b6cx2){for(var _0x6b6cx4=[],_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx3(_0x6b6cx2[_0x6b6cx5])&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx2[_0x6b6cx5])}};return _0x6b6cx4};mxGraphModel[_0xb59f[202]][_0xb59f[1939]]=function(_0x6b6cx2){return this[_0xb59f[1921]](null,_0x6b6cx2)};mxGraphModel[_0xb59f[202]][_0xb59f[1921]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=[];_0x6b6cx3=_0x6b6cx3||this[_0xb59f[501]]();(null==_0x6b6cx2||_0x6b6cx2(_0x6b6cx3))&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx3);for(var _0x6b6cx5=this[_0xb59f[262]](_0x6b6cx3),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[263]](_0x6b6cx3,_0x6b6cx9),_0x6b6cx4=_0x6b6cx4[_0xb59f[1919]](this[_0xb59f[1921]](_0x6b6cx2,_0x6b6cxa))};return _0x6b6cx4};mxGraphModel[_0xb59f[202]][_0xb59f[501]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2||this[_0xb59f[813]];if(null!=_0x6b6cx2){for(;null!=_0x6b6cx2;){_0x6b6cx3=_0x6b6cx2,_0x6b6cx2=this[_0xb59f[1197]](_0x6b6cx2)}};return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1927]]=function(_0x6b6cx2){this[_0xb59f[350]]( new mxRootChange(this,_0x6b6cx2));return _0x6b6cx2};mxGraphModel[_0xb59f[202]][_0xb59f[1940]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[813]];this[_0xb59f[813]]=_0x6b6cx2;this[_0xb59f[1931]]=0;this[_0xb59f[895]]=null;this[_0xb59f[1941]](_0x6b6cx2);return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1942]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&this[_0xb59f[813]]==_0x6b6cx2};mxGraphModel[_0xb59f[202]][_0xb59f[1740]]=function(_0x6b6cx2){return this[_0xb59f[1942]](this[_0xb59f[1197]](_0x6b6cx2))};mxGraphModel[_0xb59f[202]][_0xb59f[1720]]=function(_0x6b6cx2,_0x6b6cx3){for(;null!=_0x6b6cx3&&_0x6b6cx3!=_0x6b6cx2;){_0x6b6cx3=this[_0xb59f[1197]](_0x6b6cx3)};return _0x6b6cx3==_0x6b6cx2};mxGraphModel[_0xb59f[202]][_0xb59f[442]]=function(_0x6b6cx2){return this[_0xb59f[1720]](this[_0xb59f[813]],_0x6b6cx2)};mxGraphModel[_0xb59f[202]][_0xb59f[1197]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1197]]():null};mxGraphModel[_0xb59f[202]][_0xb59f[99]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(_0x6b6cx3!=_0x6b6cx2&&null!=_0x6b6cx2&&null!=_0x6b6cx3){null==_0x6b6cx4&&(_0x6b6cx4=this[_0xb59f[262]](_0x6b6cx2));var _0x6b6cx5=_0x6b6cx2!=this[_0xb59f[1197]](_0x6b6cx3);this[_0xb59f[350]]( new mxChildChange(this,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4));this[_0xb59f[1928]]&&_0x6b6cx5&&this[_0xb59f[1943]](_0x6b6cx3)};return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1941]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){null==_0x6b6cx2[_0xb59f[1103]]()&&this[_0xb59f[1929]]&&_0x6b6cx2[_0xb59f[1945]](this[_0xb59f[1944]](_0x6b6cx2));if(null!=_0x6b6cx2[_0xb59f[1103]]()){var _0x6b6cx3=this[_0xb59f[736]](_0x6b6cx2[_0xb59f[1103]]());if(_0x6b6cx3!=_0x6b6cx2){for(;null!=_0x6b6cx3;){_0x6b6cx2[_0xb59f[1945]](this[_0xb59f[1944]](_0x6b6cx2)),_0x6b6cx3=this[_0xb59f[736]](_0x6b6cx2[_0xb59f[1103]]())};null==this[_0xb59f[895]]&&(this[_0xb59f[895]]={});this[_0xb59f[895]][_0x6b6cx2[_0xb59f[1103]]()]=_0x6b6cx2}};mxUtils[_0xb59f[1946]](_0x6b6cx2[_0xb59f[1103]]())&&(this[_0xb59f[1931]]=Math[_0xb59f[160]](this[_0xb59f[1931]],_0x6b6cx2[_0xb59f[1103]]()));for(var _0x6b6cx3=this[_0xb59f[262]](_0x6b6cx2),_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3;_0x6b6cx4++){this[_0xb59f[1941]](this[_0xb59f[263]](_0x6b6cx2,_0x6b6cx4))}}};mxGraphModel[_0xb59f[202]][_0xb59f[1944]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[1931]];this[_0xb59f[1931]]++;return this[_0xb59f[1089]]+_0x6b6cx2+this[_0xb59f[1930]]};mxGraphModel[_0xb59f[202]][_0xb59f[1943]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=_0x6b6cx3||this[_0xb59f[501]](_0x6b6cx2);for(var _0x6b6cx4=this[_0xb59f[262]](_0x6b6cx2),_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4;_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[263]](_0x6b6cx2,_0x6b6cx5);this[_0xb59f[1943]](_0x6b6cx9,_0x6b6cx3)};_0x6b6cx9=this[_0xb59f[1707]](_0x6b6cx2);_0x6b6cx4=[];for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx9;_0x6b6cx5++){_0x6b6cx4[_0xb59f[207]](this[_0xb59f[1708]](_0x6b6cx2,_0x6b6cx5))};for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx9=_0x6b6cx4[_0x6b6cx5],this[_0xb59f[1720]](_0x6b6cx3,_0x6b6cx9)&&this[_0xb59f[1947]](_0x6b6cx9,_0x6b6cx3)}};mxGraphModel[_0xb59f[202]][_0xb59f[1947]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=this[_0xb59f[1709]](_0x6b6cx2,!0),_0x6b6cx5=this[_0xb59f[1709]](_0x6b6cx2,!1),_0x6b6cx9=null;null!=_0x6b6cx4&&!this[_0xb59f[250]](_0x6b6cx4)&&null!=_0x6b6cx4[_0xb59f[256]]&&_0x6b6cx4[_0xb59f[256]][_0xb59f[1500]];){_0x6b6cx4=this[_0xb59f[1197]](_0x6b6cx4)};for(;null!=_0x6b6cx5&&!this[_0xb59f[250]](_0x6b6cx5)&&null!=_0x6b6cx5[_0xb59f[256]]&&_0x6b6cx5[_0xb59f[256]][_0xb59f[1500]];){_0x6b6cx5=this[_0xb59f[1197]](_0x6b6cx5)};if(this[_0xb59f[1720]](_0x6b6cx3,_0x6b6cx4)&&this[_0xb59f[1720]](_0x6b6cx3,_0x6b6cx5)&&(_0x6b6cx9=_0x6b6cx4==_0x6b6cx5?this[_0xb59f[1197]](_0x6b6cx4):this[_0xb59f[1948]](_0x6b6cx4,_0x6b6cx5),null!=_0x6b6cx9&&(this[_0xb59f[1197]](_0x6b6cx9)!=this[_0xb59f[813]]||this[_0xb59f[1720]](_0x6b6cx9,_0x6b6cx2))&&this[_0xb59f[1197]](_0x6b6cx2)!=_0x6b6cx9)){_0x6b6cx4=this[_0xb59f[1721]](_0x6b6cx2);if(null!=_0x6b6cx4){var _0x6b6cxa=this[_0xb59f[1949]](this[_0xb59f[1197]](_0x6b6cx2)),_0x6b6cx12=this[_0xb59f[1949]](_0x6b6cx9),_0x6b6cx5=_0x6b6cx12[_0xb59f[235]]-_0x6b6cxa[_0xb59f[235]],_0x6b6cxa=_0x6b6cx12[_0xb59f[236]]-_0x6b6cxa[_0xb59f[236]],_0x6b6cx4=_0x6b6cx4[_0xb59f[238]]();_0x6b6cx4[_0xb59f[513]](-_0x6b6cx5,-_0x6b6cxa);this[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx4)};this[_0xb59f[99]](_0x6b6cx9,_0x6b6cx2,this[_0xb59f[262]](_0x6b6cx9))}};mxGraphModel[_0xb59f[202]][_0xb59f[1949]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=_0x6b6cx2?(_0x6b6cx3=this[_0xb59f[1949]](this[_0xb59f[1197]](_0x6b6cx2)),this[_0xb59f[250]](_0x6b6cx2)||(_0x6b6cx2=this[_0xb59f[1721]](_0x6b6cx2),null!=_0x6b6cx2&&(_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx2[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]+=_0x6b6cx2[_0xb59f[236]]))):_0x6b6cx3= new mxPoint;return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1948]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&null!=_0x6b6cx3){var _0x6b6cx4=mxCellPath[_0xb59f[385]](_0x6b6cx3);if(null!=_0x6b6cx4&&0<_0x6b6cx4[_0xb59f[67]]){var _0x6b6cx5=_0x6b6cx2,_0x6b6cx9=mxCellPath[_0xb59f[385]](_0x6b6cx5);if(_0x6b6cx4[_0xb59f[67]]<_0x6b6cx9[_0xb59f[67]]){var _0x6b6cx5=_0x6b6cx3,_0x6b6cxa=_0x6b6cx9,_0x6b6cx9=_0x6b6cx4,_0x6b6cx4=_0x6b6cxa};for(;null!=_0x6b6cx5;){_0x6b6cxa=this[_0xb59f[1197]](_0x6b6cx5);if(0==_0x6b6cx4[_0xb59f[2]](_0x6b6cx9+mxCellPath[_0xb59f[1950]])&&null!=_0x6b6cxa){return _0x6b6cx5};_0x6b6cx9=mxCellPath[_0xb59f[1951]](_0x6b6cx9);_0x6b6cx5=_0x6b6cxa}}};return null};mxGraphModel[_0xb59f[202]][_0xb59f[205]]=function(_0x6b6cx2){_0x6b6cx2==this[_0xb59f[813]]?this[_0xb59f[1927]](null):null!=this[_0xb59f[1197]](_0x6b6cx2)&&this[_0xb59f[350]]( new mxChildChange(this,null,_0x6b6cx2));return _0x6b6cx2};mxGraphModel[_0xb59f[202]][_0xb59f[1102]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&null!=this[_0xb59f[895]]){for(var _0x6b6cx3=this[_0xb59f[262]](_0x6b6cx2)-1;0<=_0x6b6cx3;_0x6b6cx3--){this[_0xb59f[1102]](this[_0xb59f[263]](_0x6b6cx2,_0x6b6cx3))};null!=this[_0xb59f[895]]&&null!=_0x6b6cx2[_0xb59f[1103]]()&& delete this[_0xb59f[895]][_0x6b6cx2[_0xb59f[1103]]()]}};mxGraphModel[_0xb59f[202]][_0xb59f[1952]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1197]](_0x6b6cx2);null!=_0x6b6cx3?(_0x6b6cx3!=_0x6b6cx5||_0x6b6cx5[_0xb59f[1738]](_0x6b6cx2)!=_0x6b6cx4)&&_0x6b6cx3[_0xb59f[1937]](_0x6b6cx2,_0x6b6cx4):null!=_0x6b6cx5&&(_0x6b6cx4=_0x6b6cx5[_0xb59f[1738]](_0x6b6cx2),_0x6b6cx5[_0xb59f[205]](_0x6b6cx4));!this[_0xb59f[442]](_0x6b6cx5)&&null!=_0x6b6cx3?this[_0xb59f[1941]](_0x6b6cx2):null==_0x6b6cx3&&this[_0xb59f[1102]](_0x6b6cx2);return _0x6b6cx5};mxGraphModel[_0xb59f[202]][_0xb59f[262]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[262]]():0};mxGraphModel[_0xb59f[202]][_0xb59f[263]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[263]](_0x6b6cx3):null};mxGraphModel[_0xb59f[202]][_0xb59f[1953]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1954]]:null};mxGraphModel[_0xb59f[202]][_0xb59f[1728]]=function(_0x6b6cx2){return this[_0xb59f[1955]](_0x6b6cx2,!0,!1)};mxGraphModel[_0xb59f[202]][_0xb59f[1956]]=function(_0x6b6cx2){return this[_0xb59f[1955]](_0x6b6cx2,!1,!0)};mxGraphModel[_0xb59f[202]][_0xb59f[1955]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!1;for(var _0x6b6cx5=this[_0xb59f[262]](_0x6b6cx2),_0x6b6cx9=[],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5;_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[263]](_0x6b6cx2,_0x6b6cxa);(!_0x6b6cx4&&!_0x6b6cx3||_0x6b6cx4&&this[_0xb59f[250]](_0x6b6cx12)||_0x6b6cx3&&this[_0xb59f[1193]](_0x6b6cx12))&&_0x6b6cx9[_0xb59f[207]](_0x6b6cx12)};return _0x6b6cx9};mxGraphModel[_0xb59f[202]][_0xb59f[1709]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1709]](_0x6b6cx3):null};mxGraphModel[_0xb59f[202]][_0xb59f[1957]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx3!=this[_0xb59f[1709]](_0x6b6cx2,_0x6b6cx4);this[_0xb59f[350]]( new mxTerminalChange(this,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4));this[_0xb59f[1928]]&&_0x6b6cx5&&this[_0xb59f[1947]](_0x6b6cx2,this[_0xb59f[501]]());return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1958]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[473]]();try{this[_0xb59f[1957]](_0x6b6cx2,_0x6b6cx3,!0),this[_0xb59f[1957]](_0x6b6cx2,_0x6b6cx4,!1)}finally{this[_0xb59f[476]]()}};mxGraphModel[_0xb59f[202]][_0xb59f[1959]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1709]](_0x6b6cx2,_0x6b6cx4);null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[1960]](_0x6b6cx2,_0x6b6cx4):null!=_0x6b6cx5&&_0x6b6cx5[_0xb59f[1961]](_0x6b6cx2,_0x6b6cx4);return _0x6b6cx5};mxGraphModel[_0xb59f[202]][_0xb59f[1707]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1707]]():0};mxGraphModel[_0xb59f[202]][_0xb59f[1708]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1708]](_0x6b6cx3):null};mxGraphModel[_0xb59f[202]][_0xb59f[1962]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){for(var _0x6b6cx5=0,_0x6b6cx9=this[_0xb59f[1707]](_0x6b6cx2),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9;_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[1708]](_0x6b6cx2,_0x6b6cxa);_0x6b6cx12!=_0x6b6cx4&&this[_0xb59f[1709]](_0x6b6cx12,_0x6b6cx3)==_0x6b6cx2&&_0x6b6cx5++};return _0x6b6cx5};mxGraphModel[_0xb59f[202]][_0xb59f[1756]]=function(_0x6b6cx2){return this[_0xb59f[264]](_0x6b6cx2,!0,!0,!1)};mxGraphModel[_0xb59f[202]][_0xb59f[1867]]=function(_0x6b6cx2){return this[_0xb59f[264]](_0x6b6cx2,!0,!1,!1)};mxGraphModel[_0xb59f[202]][_0xb59f[1963]]=function(_0x6b6cx2){return this[_0xb59f[264]](_0x6b6cx2,!1,!0,!1)};mxGraphModel[_0xb59f[202]][_0xb59f[264]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!0;for(var _0x6b6cx9=this[_0xb59f[1707]](_0x6b6cx2),_0x6b6cxa=[],_0x6b6cx12=0;_0x6b6cx12<_0x6b6cx9;_0x6b6cx12++){var _0x6b6cx13=this[_0xb59f[1708]](_0x6b6cx2,_0x6b6cx12),_0x6b6cx14=this[_0xb59f[1709]](_0x6b6cx13,!0),_0x6b6cx15=this[_0xb59f[1709]](_0x6b6cx13,!1);(_0x6b6cx5&&_0x6b6cx14==_0x6b6cx15||_0x6b6cx14!=_0x6b6cx15&&(_0x6b6cx3&&_0x6b6cx15==_0x6b6cx2||_0x6b6cx4&&_0x6b6cx14==_0x6b6cx2))&&_0x6b6cxa[_0xb59f[207]](_0x6b6cx13)};return _0x6b6cxa};mxGraphModel[_0xb59f[202]][_0xb59f[1781]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!1;var _0x6b6cx5=this[_0xb59f[1707]](_0x6b6cx2),_0x6b6cx9=this[_0xb59f[1707]](_0x6b6cx3),_0x6b6cxa=_0x6b6cx2,_0x6b6cx12=_0x6b6cx5;_0x6b6cx9<_0x6b6cx5&&(_0x6b6cx12=_0x6b6cx9,_0x6b6cxa=_0x6b6cx3);_0x6b6cx5=[];for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx12;_0x6b6cx9++){var _0x6b6cx13=this[_0xb59f[1708]](_0x6b6cxa,_0x6b6cx9),_0x6b6cx14=this[_0xb59f[1709]](_0x6b6cx13,!0),_0x6b6cx15=this[_0xb59f[1709]](_0x6b6cx13,!1),_0x6b6cx16=_0x6b6cx15==_0x6b6cx2&&_0x6b6cx14==_0x6b6cx3;(_0x6b6cx14==_0x6b6cx2&&_0x6b6cx15==_0x6b6cx3||!_0x6b6cx4&&_0x6b6cx16)&&_0x6b6cx5[_0xb59f[207]](_0x6b6cx13)};return _0x6b6cx5};mxGraphModel[_0xb59f[202]][_0xb59f[1808]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!0;var _0x6b6cx9=[];if(null!=_0x6b6cx2){for(var _0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[1709]](_0x6b6cx2[_0x6b6cxa],!0),_0x6b6cx13=this[_0xb59f[1709]](_0x6b6cx2[_0x6b6cxa],!1);_0x6b6cx12==_0x6b6cx3&&null!=_0x6b6cx13&&_0x6b6cx13!=_0x6b6cx3&&_0x6b6cx5?_0x6b6cx9[_0xb59f[207]](_0x6b6cx13):_0x6b6cx13==_0x6b6cx3&&(null!=_0x6b6cx12&&_0x6b6cx12!=_0x6b6cx3&&_0x6b6cx4)&&_0x6b6cx9[_0xb59f[207]](_0x6b6cx12)}};return _0x6b6cx9};mxGraphModel[_0xb59f[202]][_0xb59f[1964]]=function(_0x6b6cx2){for(var _0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){for(var _0x6b6cx5=_0x6b6cx2[_0x6b6cx4],_0x6b6cx9=!0,_0x6b6cxa=this[_0xb59f[1197]](_0x6b6cx5);null!=_0x6b6cxa;){if(0<=mxUtils[_0xb59f[2]](_0x6b6cx2,_0x6b6cxa)){_0x6b6cx9= !1;break};_0x6b6cxa=this[_0xb59f[1197]](_0x6b6cxa)};_0x6b6cx9&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx5)};return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1193]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1193]]():!1};mxGraphModel[_0xb59f[202]][_0xb59f[250]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[250]]():!1};mxGraphModel[_0xb59f[202]][_0xb59f[1965]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1965]]():!1};mxGraphModel[_0xb59f[202]][_0xb59f[433]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[433]]():null};mxGraphModel[_0xb59f[202]][_0xb59f[1966]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[350]]( new mxValueChange(this,_0x6b6cx2,_0x6b6cx3));return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1967]]=function(_0x6b6cx2,_0x6b6cx3){return _0x6b6cx2[_0xb59f[1968]](_0x6b6cx3)};mxGraphModel[_0xb59f[202]][_0xb59f[1721]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1721]]():null};mxGraphModel[_0xb59f[202]][_0xb59f[1724]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3!=this[_0xb59f[1721]](_0x6b6cx2)&&this[_0xb59f[350]]( new mxGeometryChange(this,_0x6b6cx2,_0x6b6cx3));return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1969]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1721]](_0x6b6cx2);_0x6b6cx2[_0xb59f[1724]](_0x6b6cx3);return _0x6b6cx4};mxGraphModel[_0xb59f[202]][_0xb59f[474]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[474]]():null};mxGraphModel[_0xb59f[202]][_0xb59f[475]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3!=this[_0xb59f[474]](_0x6b6cx2)&&this[_0xb59f[350]]( new mxStyleChange(this,_0x6b6cx2,_0x6b6cx3));return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1970]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[474]](_0x6b6cx2);_0x6b6cx2[_0xb59f[475]](_0x6b6cx3);return _0x6b6cx4};mxGraphModel[_0xb59f[202]][_0xb59f[1971]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1971]]():!1};mxGraphModel[_0xb59f[202]][_0xb59f[1972]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3!=this[_0xb59f[1971]](_0x6b6cx2)&&this[_0xb59f[350]]( new mxCollapseChange(this,_0x6b6cx2,_0x6b6cx3));return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1973]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1971]](_0x6b6cx2);_0x6b6cx2[_0xb59f[1972]](_0x6b6cx3);return _0x6b6cx4};mxGraphModel[_0xb59f[202]][_0xb59f[174]]=function(_0x6b6cx2){return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[174]]():!1};mxGraphModel[_0xb59f[202]][_0xb59f[175]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3!=this[_0xb59f[174]](_0x6b6cx2)&&this[_0xb59f[350]]( new mxVisibleChange(this,_0x6b6cx2,_0x6b6cx3));return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1974]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[174]](_0x6b6cx2);_0x6b6cx2[_0xb59f[175]](_0x6b6cx3);return _0x6b6cx4};mxGraphModel[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[350]]();this[_0xb59f[473]]();this[_0xb59f[1926]][_0xb59f[99]](_0x6b6cx2);this[_0xb59f[746]]( new mxEventObject(mxEvent.EXECUTE,_0xb59f[826],_0x6b6cx2));this[_0xb59f[746]]( new mxEventObject(mxEvent.EXECUTED,_0xb59f[826],_0x6b6cx2));this[_0xb59f[476]]()};mxGraphModel[_0xb59f[202]][_0xb59f[473]]=function(){this[_0xb59f[1932]]++;this[_0xb59f[746]]( new mxEventObject(mxEvent.BEGIN_UPDATE));1==this[_0xb59f[1932]]&&this[_0xb59f[746]]( new mxEventObject(mxEvent.START_EDIT))};mxGraphModel[_0xb59f[202]][_0xb59f[476]]=function(){this[_0xb59f[1932]]--;0==this[_0xb59f[1932]]&&this[_0xb59f[746]]( new mxEventObject(mxEvent.END_EDIT));if(!this[_0xb59f[1933]]){this[_0xb59f[1933]]=0==this[_0xb59f[1932]];this[_0xb59f[746]]( new mxEventObject(mxEvent.END_UPDATE,_0xb59f[1061],this[_0xb59f[1926]]));try{if(this[_0xb59f[1933]]&&!this[_0xb59f[1926]][_0xb59f[1107]]()){this[_0xb59f[746]]( new mxEventObject(mxEvent.BEFORE_UNDO,_0xb59f[1061],this[_0xb59f[1926]]));var _0x6b6cx2=this[_0xb59f[1926]];this[_0xb59f[1926]]=this[_0xb59f[1096]]();_0x6b6cx2[_0xb59f[827]]();this[_0xb59f[746]]( new mxEventObject(mxEvent.UNDO,_0xb59f[1061],_0x6b6cx2))}}finally{this[_0xb59f[1933]]= !1}}};mxGraphModel[_0xb59f[202]][_0xb59f[1096]]=function(){var _0x6b6cx2= new mxUndoableEdit(this,!0);_0x6b6cx2[_0xb59f[827]]=function(){_0x6b6cx2[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.CHANGE,_0xb59f[1061],_0x6b6cx2,_0xb59f[1065],_0x6b6cx2[_0xb59f[1065]]));_0x6b6cx2[_0xb59f[1097]][_0xb59f[746]]( new mxEventObject(mxEvent.NOTIFY,_0xb59f[1061],_0x6b6cx2,_0xb59f[1065],_0x6b6cx2[_0xb59f[1065]]))};return _0x6b6cx2};mxGraphModel[_0xb59f[202]][_0xb59f[1975]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;this[_0xb59f[473]]();try{var _0x6b6cx5={};this[_0xb59f[1976]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5);for(var _0x6b6cx9 in _0x6b6cx5){var _0x6b6cxa=_0x6b6cx5[_0x6b6cx9],_0x6b6cx12=this[_0xb59f[1709]](_0x6b6cxa,!0);null!=_0x6b6cx12&&(_0x6b6cx12=_0x6b6cx5[mxCellPath[_0xb59f[385]](_0x6b6cx12)],this[_0xb59f[1957]](_0x6b6cxa,_0x6b6cx12,!0));_0x6b6cx12=this[_0xb59f[1709]](_0x6b6cxa,!1);null!=_0x6b6cx12&&(_0x6b6cx12=_0x6b6cx5[mxCellPath[_0xb59f[385]](_0x6b6cx12)],this[_0xb59f[1957]](_0x6b6cxa,_0x6b6cx12,!1))}}finally{this[_0xb59f[476]]()}};mxGraphModel[_0xb59f[202]][_0xb59f[1976]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[473]]();try{for(var _0x6b6cx9=_0x6b6cx2[_0xb59f[262]](),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9;_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx2[_0xb59f[263]](_0x6b6cxa);if(_0xb59f[279]== typeof _0x6b6cx12[_0xb59f[1103]]){var _0x6b6cx13=_0x6b6cx12[_0xb59f[1103]](),_0x6b6cx14=null!=_0x6b6cx13&&(!this[_0xb59f[250]](_0x6b6cx12)|| !_0x6b6cx4)?this[_0xb59f[736]](_0x6b6cx13):null;if(null==_0x6b6cx14){var _0x6b6cx15=_0x6b6cx12[_0xb59f[238]]();_0x6b6cx15[_0xb59f[1945]](_0x6b6cx13);_0x6b6cx15[_0xb59f[1957]](_0x6b6cx12[_0xb59f[1709]](!0),!0);_0x6b6cx15[_0xb59f[1957]](_0x6b6cx12[_0xb59f[1709]](!1),!1);_0x6b6cx14=_0x6b6cx3[_0xb59f[1937]](_0x6b6cx15);this[_0xb59f[1941]](_0x6b6cx14)};_0x6b6cx5[mxCellPath[_0xb59f[385]](_0x6b6cx12)]=_0x6b6cx14;this[_0xb59f[1976]](_0x6b6cx12,_0x6b6cx14,_0x6b6cx4,_0x6b6cx5)}}}finally{this[_0xb59f[476]]()}};mxGraphModel[_0xb59f[202]][_0xb59f[1977]]=function(_0x6b6cx2){var _0x6b6cx3=[];if(null!=_0x6b6cx2){for(var _0x6b6cx4={},_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[1197]](_0x6b6cx2[_0x6b6cx5]);if(null!=_0x6b6cx9){var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx9);null==_0x6b6cx4[_0x6b6cxa]&&(_0x6b6cx4[_0x6b6cxa]=_0x6b6cx9,_0x6b6cx3[_0xb59f[207]](_0x6b6cx9))}}};return _0x6b6cx3};mxGraphModel[_0xb59f[202]][_0xb59f[1978]]=function(_0x6b6cx2){return null!=_0x6b6cx2?this[_0xb59f[899]]([_0x6b6cx2],!0)[0]:null};mxGraphModel[_0xb59f[202]][_0xb59f[899]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4={},_0x6b6cx5=[],_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){null!=_0x6b6cx2[_0x6b6cx9]?_0x6b6cx5[_0xb59f[207]](this[_0xb59f[1979]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx4,_0x6b6cx3)):_0x6b6cx5[_0xb59f[207]](null)};for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5[_0xb59f[67]];_0x6b6cx9++){null!=_0x6b6cx5[_0x6b6cx9]&&this[_0xb59f[1980]](_0x6b6cx5[_0x6b6cx9],_0x6b6cx2[_0x6b6cx9],_0x6b6cx4)};return _0x6b6cx5};mxGraphModel[_0xb59f[202]][_0xb59f[1979]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1981]](_0x6b6cx2);_0x6b6cx3[mxObjectIdentity[_0xb59f[203]](_0x6b6cx2)]=_0x6b6cx5;if(_0x6b6cx4){_0x6b6cx4=this[_0xb59f[262]](_0x6b6cx2);for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx4;_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[1979]](this[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9),_0x6b6cx3,!0);_0x6b6cx5[_0xb59f[1937]](_0x6b6cxa)}};return _0x6b6cx5};mxGraphModel[_0xb59f[202]][_0xb59f[1981]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[238]]()};mxGraphModel[_0xb59f[202]][_0xb59f[1980]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1709]](_0x6b6cx3,!0);null!=_0x6b6cx5&&(_0x6b6cx5=_0x6b6cx4[mxObjectIdentity[_0xb59f[203]](_0x6b6cx5)],null!=_0x6b6cx5&&_0x6b6cx5[_0xb59f[1960]](_0x6b6cx2,!0));_0x6b6cx5=this[_0xb59f[1709]](_0x6b6cx3,!1);null!=_0x6b6cx5&&(_0x6b6cx5=_0x6b6cx4[mxObjectIdentity[_0xb59f[203]](_0x6b6cx5)],null!=_0x6b6cx5&&_0x6b6cx5[_0xb59f[1960]](_0x6b6cx2,!1));for(var _0x6b6cx5=this[_0xb59f[262]](_0x6b6cx2),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){this[_0xb59f[1980]](this[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9),this[_0xb59f[263]](_0x6b6cx3,_0x6b6cx9),_0x6b6cx4)}};function mxRootChange(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[257]]=this[_0xb59f[813]]=_0x6b6cx3}mxRootChange[_0xb59f[202]][_0xb59f[350]]=function(){this[_0xb59f[813]]=this[_0xb59f[257]];this[_0xb59f[257]]=this[_0xb59f[251]][_0xb59f[1940]](this[_0xb59f[257]])};function mxChildChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[257]]=this[_0xb59f[1101]]=_0x6b6cx3;this[_0xb59f[247]]=_0x6b6cx4;this[_0xb59f[1982]]=this[_0xb59f[1983]]=_0x6b6cx5}mxChildChange[_0xb59f[202]][_0xb59f[350]]=function(){var _0x6b6cx2=this[_0xb59f[251]][_0xb59f[1197]](this[_0xb59f[247]]),_0x6b6cx3=null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[1738]](this[_0xb59f[247]]):0;null==this[_0xb59f[257]]&&this[_0xb59f[807]](this[_0xb59f[247]],!1);_0x6b6cx2=this[_0xb59f[251]][_0xb59f[1952]](this[_0xb59f[247]],this[_0xb59f[257]],this[_0xb59f[1982]]);null!=this[_0xb59f[257]]&&this[_0xb59f[807]](this[_0xb59f[247]],!0);this[_0xb59f[1101]]=this[_0xb59f[257]];this[_0xb59f[257]]=_0x6b6cx2;this[_0xb59f[1983]]=this[_0xb59f[1982]];this[_0xb59f[1982]]=_0x6b6cx3};mxChildChange[_0xb59f[202]][_0xb59f[807]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;var _0x6b6cx4=_0x6b6cx2[_0xb59f[1709]](!0),_0x6b6cx5=_0x6b6cx2[_0xb59f[1709]](!1);null!=_0x6b6cx4&&(_0x6b6cx3?this[_0xb59f[251]][_0xb59f[1959]](_0x6b6cx2,_0x6b6cx4,!0):this[_0xb59f[251]][_0xb59f[1959]](_0x6b6cx2,null,!0));null!=_0x6b6cx5&&(_0x6b6cx3?this[_0xb59f[251]][_0xb59f[1959]](_0x6b6cx2,_0x6b6cx5,!1):this[_0xb59f[251]][_0xb59f[1959]](_0x6b6cx2,null,!1));_0x6b6cx2[_0xb59f[1957]](_0x6b6cx4,!0);_0x6b6cx2[_0xb59f[1957]](_0x6b6cx5,!1);_0x6b6cx4=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2);for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4;_0x6b6cx5++){this[_0xb59f[807]](this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,_0x6b6cx5),_0x6b6cx3)}};function mxTerminalChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[246]]=_0x6b6cx3;this[_0xb59f[257]]=this[_0xb59f[1984]]=_0x6b6cx4;this[_0xb59f[1097]]=_0x6b6cx5}mxTerminalChange[_0xb59f[202]][_0xb59f[350]]=function(){this[_0xb59f[1984]]=this[_0xb59f[257]];this[_0xb59f[257]]=this[_0xb59f[251]][_0xb59f[1959]](this[_0xb59f[246]],this[_0xb59f[257]],this[_0xb59f[1097]])};function mxValueChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[246]]=_0x6b6cx3;this[_0xb59f[257]]=this[_0xb59f[131]]=_0x6b6cx4}mxValueChange[_0xb59f[202]][_0xb59f[350]]=function(){this[_0xb59f[131]]=this[_0xb59f[257]];this[_0xb59f[257]]=this[_0xb59f[251]][_0xb59f[1967]](this[_0xb59f[246]],this[_0xb59f[257]])};function mxStyleChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[246]]=_0x6b6cx3;this[_0xb59f[257]]=this[_0xb59f[124]]=_0x6b6cx4}mxStyleChange[_0xb59f[202]][_0xb59f[350]]=function(){this[_0xb59f[124]]=this[_0xb59f[257]];this[_0xb59f[257]]=this[_0xb59f[251]][_0xb59f[1970]](this[_0xb59f[246]],this[_0xb59f[257]])};function mxGeometryChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[246]]=_0x6b6cx3;this[_0xb59f[257]]=this[_0xb59f[256]]=_0x6b6cx4}mxGeometryChange[_0xb59f[202]][_0xb59f[350]]=function(){this[_0xb59f[256]]=this[_0xb59f[257]];this[_0xb59f[257]]=this[_0xb59f[251]][_0xb59f[1969]](this[_0xb59f[246]],this[_0xb59f[257]])};function mxCollapseChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[246]]=_0x6b6cx3;this[_0xb59f[257]]=this[_0xb59f[1985]]=_0x6b6cx4}mxCollapseChange[_0xb59f[202]][_0xb59f[350]]=function(){this[_0xb59f[1985]]=this[_0xb59f[257]];this[_0xb59f[257]]=this[_0xb59f[251]][_0xb59f[1973]](this[_0xb59f[246]],this[_0xb59f[257]])};function mxVisibleChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[251]]=_0x6b6cx2;this[_0xb59f[246]]=_0x6b6cx3;this[_0xb59f[257]]=this[_0xb59f[189]]=_0x6b6cx4}mxVisibleChange[_0xb59f[202]][_0xb59f[350]]=function(){this[_0xb59f[189]]=this[_0xb59f[257]];this[_0xb59f[257]]=this[_0xb59f[251]][_0xb59f[1974]](this[_0xb59f[246]],this[_0xb59f[257]])};function mxCellAttributeChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[246]]=_0x6b6cx2;this[_0xb59f[1986]]=_0x6b6cx3;this[_0xb59f[257]]=this[_0xb59f[131]]=_0x6b6cx4}mxCellAttributeChange[_0xb59f[202]][_0xb59f[350]]=function(){var _0x6b6cx2=this[_0xb59f[246]][_0xb59f[284]](this[_0xb59f[1986]]);null==this[_0xb59f[257]]?this[_0xb59f[246]][_0xb59f[131]][_0xb59f[1390]](this[_0xb59f[1986]]):this[_0xb59f[246]][_0xb59f[57]](this[_0xb59f[1986]],this[_0xb59f[257]]);this[_0xb59f[257]]=_0x6b6cx2};function mxCell(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[131]]=_0x6b6cx2;this[_0xb59f[1724]](_0x6b6cx3);this[_0xb59f[475]](_0x6b6cx4);if(null!=this[_0xb59f[1987]]){this[_0xb59f[1987]]()}}mxCell[_0xb59f[202]][_0xb59f[1363]]=null;mxCell[_0xb59f[202]][_0xb59f[131]]=null;mxCell[_0xb59f[202]][_0xb59f[256]]=null;mxCell[_0xb59f[202]][_0xb59f[124]]=null;mxCell[_0xb59f[202]][_0xb59f[1988]]= !1;mxCell[_0xb59f[202]][_0xb59f[1989]]= !1;mxCell[_0xb59f[202]][_0xb59f[1990]]= !0;mxCell[_0xb59f[202]][_0xb59f[189]]= !0;mxCell[_0xb59f[202]][_0xb59f[1985]]= !1;mxCell[_0xb59f[202]][_0xb59f[1101]]=null;mxCell[_0xb59f[202]][_0xb59f[1097]]=null;mxCell[_0xb59f[202]][_0xb59f[772]]=null;mxCell[_0xb59f[202]][_0xb59f[1954]]=null;mxCell[_0xb59f[202]][_0xb59f[1842]]=null;mxCell[_0xb59f[202]][_0xb59f[1991]]=_0xb59f[1992][_0xb59f[224]](_0xb59f[185]);mxCell[_0xb59f[202]][_0xb59f[1103]]=function(){return this[_0xb59f[1363]]};mxCell[_0xb59f[202]][_0xb59f[1945]]=function(_0x6b6cx2){this[_0xb59f[1363]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[433]]=function(){return this[_0xb59f[131]]};mxCell[_0xb59f[202]][_0xb59f[1966]]=function(_0x6b6cx2){this[_0xb59f[131]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1968]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[433]]();this[_0xb59f[1966]](_0x6b6cx2);return _0x6b6cx3};mxCell[_0xb59f[202]][_0xb59f[1721]]=function(){return this[_0xb59f[256]]};mxCell[_0xb59f[202]][_0xb59f[1724]]=function(_0x6b6cx2){this[_0xb59f[256]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[474]]=function(){return this[_0xb59f[124]]};mxCell[_0xb59f[202]][_0xb59f[475]]=function(_0x6b6cx2){this[_0xb59f[124]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1193]]=function(){return this[_0xb59f[1988]]};mxCell[_0xb59f[202]][_0xb59f[1993]]=function(_0x6b6cx2){this[_0xb59f[1988]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[250]]=function(){return this[_0xb59f[1989]]};mxCell[_0xb59f[202]][_0xb59f[1994]]=function(_0x6b6cx2){this[_0xb59f[1989]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1965]]=function(){return this[_0xb59f[1990]]};mxCell[_0xb59f[202]][_0xb59f[1995]]=function(_0x6b6cx2){this[_0xb59f[1990]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[174]]=function(){return this[_0xb59f[189]]};mxCell[_0xb59f[202]][_0xb59f[175]]=function(_0x6b6cx2){this[_0xb59f[189]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1971]]=function(){return this[_0xb59f[1985]]};mxCell[_0xb59f[202]][_0xb59f[1972]]=function(_0x6b6cx2){this[_0xb59f[1985]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1197]]=function(){return this[_0xb59f[1101]]};mxCell[_0xb59f[202]][_0xb59f[1996]]=function(_0x6b6cx2){this[_0xb59f[1101]]=_0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1709]]=function(_0x6b6cx2){return _0x6b6cx2?this[_0xb59f[1097]]:this[_0xb59f[772]]};mxCell[_0xb59f[202]][_0xb59f[1957]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3?this[_0xb59f[1097]]=_0x6b6cx2:this[_0xb59f[772]]=_0x6b6cx2;return _0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[262]]=function(){return null==this[_0xb59f[1954]]?0:this[_0xb59f[1954]][_0xb59f[67]]};mxCell[_0xb59f[202]][_0xb59f[1738]]=function(_0x6b6cx2){return mxUtils[_0xb59f[2]](this[_0xb59f[1954]],_0x6b6cx2)};mxCell[_0xb59f[202]][_0xb59f[263]]=function(_0x6b6cx2){return null==this[_0xb59f[1954]]?null:this[_0xb59f[1954]][_0x6b6cx2]};mxCell[_0xb59f[202]][_0xb59f[1937]]=function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2&&(null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[262]](),_0x6b6cx2[_0xb59f[1197]]()==this&&_0x6b6cx3--),_0x6b6cx2[_0xb59f[1997]](),_0x6b6cx2[_0xb59f[1996]](this),null==this[_0xb59f[1954]]?(this[_0xb59f[1954]]=[],this[_0xb59f[1954]][_0xb59f[207]](_0x6b6cx2)):this[_0xb59f[1954]][_0xb59f[300]](_0x6b6cx3,0,_0x6b6cx2));return _0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[205]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=this[_0xb59f[1954]]&&0<=_0x6b6cx2&&(_0x6b6cx3=this[_0xb59f[263]](_0x6b6cx2),null!=_0x6b6cx3&&(this[_0xb59f[1954]][_0xb59f[300]](_0x6b6cx2,1),_0x6b6cx3[_0xb59f[1996]](null)));return _0x6b6cx3};mxCell[_0xb59f[202]][_0xb59f[1997]]=function(){if(null!=this[_0xb59f[1101]]){var _0x6b6cx2=this[_0xb59f[1101]][_0xb59f[1738]](this);this[_0xb59f[1101]][_0xb59f[205]](_0x6b6cx2)}};mxCell[_0xb59f[202]][_0xb59f[1707]]=function(){return null==this[_0xb59f[1842]]?0:this[_0xb59f[1842]][_0xb59f[67]]};mxCell[_0xb59f[202]][_0xb59f[1998]]=function(_0x6b6cx2){return mxUtils[_0xb59f[2]](this[_0xb59f[1842]],_0x6b6cx2)};mxCell[_0xb59f[202]][_0xb59f[1708]]=function(_0x6b6cx2){return null==this[_0xb59f[1842]]?null:this[_0xb59f[1842]][_0x6b6cx2]};mxCell[_0xb59f[202]][_0xb59f[1960]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&(_0x6b6cx2[_0xb59f[1999]](_0x6b6cx3),_0x6b6cx2[_0xb59f[1957]](this,_0x6b6cx3),null==this[_0xb59f[1842]]||_0x6b6cx2[_0xb59f[1709]](!_0x6b6cx3)!=this||0>mxUtils[_0xb59f[2]](this[_0xb59f[1842]],_0x6b6cx2))){null==this[_0xb59f[1842]]&&(this[_0xb59f[1842]]=[]),this[_0xb59f[1842]][_0xb59f[207]](_0x6b6cx2)};return _0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1961]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2){if(_0x6b6cx2[_0xb59f[1709]](!_0x6b6cx3)!=this&&null!=this[_0xb59f[1842]]){var _0x6b6cx4=this[_0xb59f[1998]](_0x6b6cx2);0<=_0x6b6cx4&&this[_0xb59f[1842]][_0xb59f[300]](_0x6b6cx4,1)};_0x6b6cx2[_0xb59f[1957]](null,_0x6b6cx3)};return _0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[1999]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1709]](_0x6b6cx2);null!=_0x6b6cx3&&_0x6b6cx3[_0xb59f[1961]](this,_0x6b6cx2)};mxCell[_0xb59f[202]][_0xb59f[284]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[433]]();return (null!=_0x6b6cx4&&_0x6b6cx4[_0xb59f[288]]==mxConstants[_0xb59f[289]]?_0x6b6cx4[_0xb59f[284]](_0x6b6cx2):null)||_0x6b6cx3};mxCell[_0xb59f[202]][_0xb59f[57]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[433]]();null!=_0x6b6cx4&&_0x6b6cx4[_0xb59f[288]]==mxConstants[_0xb59f[289]]&&_0x6b6cx4[_0xb59f[57]](_0x6b6cx2,_0x6b6cx3)};mxCell[_0xb59f[202]][_0xb59f[238]]=function(){var _0x6b6cx2=mxUtils[_0xb59f[238]](this,this[_0xb59f[1991]]);_0x6b6cx2[_0xb59f[1966]](this[_0xb59f[2000]]());return _0x6b6cx2};mxCell[_0xb59f[202]][_0xb59f[2000]]=function(){var _0x6b6cx2=this[_0xb59f[433]]();null!=_0x6b6cx2&&(_0xb59f[279]== typeof _0x6b6cx2[_0xb59f[238]]?_0x6b6cx2=_0x6b6cx2[_0xb59f[238]]():isNaN(_0x6b6cx2[_0xb59f[288]])||(_0x6b6cx2=_0x6b6cx2[_0xb59f[511]](!0)));return _0x6b6cx2};function mxGeometry(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxRectangle[_0xb59f[239]](this,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)}mxGeometry[_0xb59f[202]]= new mxRectangle;mxGeometry[_0xb59f[202]][_0xb59f[196]]=mxGeometry;mxGeometry[_0xb59f[202]][_0xb59f[2001]]= !0;mxGeometry[_0xb59f[202]][_0xb59f[2002]]=null;mxGeometry[_0xb59f[202]][_0xb59f[2003]]=null;mxGeometry[_0xb59f[202]][_0xb59f[2004]]=null;mxGeometry[_0xb59f[202]][_0xb59f[1525]]=null;mxGeometry[_0xb59f[202]][_0xb59f[1368]]=null;mxGeometry[_0xb59f[202]][_0xb59f[1500]]= !1;mxGeometry[_0xb59f[202]][_0xb59f[2005]]=function(){if(null!=this[_0xb59f[2002]]){var _0x6b6cx2= new mxRectangle(this[_0xb59f[235]],this[_0xb59f[236]],this[_0xb59f[117]],this[_0xb59f[119]]);this[_0xb59f[235]]=this[_0xb59f[2002]][_0xb59f[235]];this[_0xb59f[236]]=this[_0xb59f[2002]][_0xb59f[236]];this[_0xb59f[117]]=this[_0xb59f[2002]][_0xb59f[117]];this[_0xb59f[119]]=this[_0xb59f[2002]][_0xb59f[119]];this[_0xb59f[2002]]=_0x6b6cx2}};mxGeometry[_0xb59f[202]][_0xb59f[2006]]=function(_0x6b6cx2){return _0x6b6cx2?this[_0xb59f[2003]]:this[_0xb59f[2004]]};mxGeometry[_0xb59f[202]][_0xb59f[2007]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3?this[_0xb59f[2003]]=_0x6b6cx2:this[_0xb59f[2004]]=_0x6b6cx2;return _0x6b6cx2};mxGeometry[_0xb59f[202]][_0xb59f[513]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[238]]();this[_0xb59f[1500]]||(this[_0xb59f[235]]+=_0x6b6cx2,this[_0xb59f[236]]+=_0x6b6cx3);null!=this[_0xb59f[2003]]&&(this[_0xb59f[2003]][_0xb59f[235]]+=_0x6b6cx2,this[_0xb59f[2003]][_0xb59f[236]]+=_0x6b6cx3);null!=this[_0xb59f[2004]]&&(this[_0xb59f[2004]][_0xb59f[235]]+=_0x6b6cx2,this[_0xb59f[2004]][_0xb59f[236]]+=_0x6b6cx3);if(this[_0xb59f[2001]]&&null!=this[_0xb59f[1525]]){for(var _0x6b6cx4=this[_0xb59f[1525]][_0xb59f[67]],_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4;_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[1525]][_0x6b6cx5];null!=_0x6b6cx9&&(_0x6b6cx9[_0xb59f[235]]+=_0x6b6cx2,_0x6b6cx9[_0xb59f[236]]+=_0x6b6cx3)}}};var mxCellPath={PATH_SEPARATOR:_0xb59f[87],create:function(_0x6b6cx2){var _0x6b6cx3=_0xb59f[110];if(null!=_0x6b6cx2){for(var _0x6b6cx4=_0x6b6cx2[_0xb59f[1197]]();null!=_0x6b6cx4;){_0x6b6cx3=_0x6b6cx4[_0xb59f[1738]](_0x6b6cx2)+mxCellPath[_0xb59f[1950]]+_0x6b6cx3,_0x6b6cx2=_0x6b6cx4,_0x6b6cx4=_0x6b6cx2[_0xb59f[1197]]()}};_0x6b6cx2=_0x6b6cx3[_0xb59f[67]];1<_0x6b6cx2&&(_0x6b6cx3=_0x6b6cx3[_0xb59f[85]](0,_0x6b6cx2-1));return _0x6b6cx3},getParentPath:function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[1122]](mxCellPath.PATH_SEPARATOR);if(0<=_0x6b6cx3){return _0x6b6cx2[_0xb59f[85]](0,_0x6b6cx3)};if(0<_0x6b6cx2[_0xb59f[67]]){return _0xb59f[110]}};return null},resolve:function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2;if(null!=_0x6b6cx3){for(var _0x6b6cx5=_0x6b6cx3[_0xb59f[224]](mxCellPath.PATH_SEPARATOR),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5[_0xb59f[67]];_0x6b6cx9++){_0x6b6cx4=_0x6b6cx4[_0xb59f[263]](parseInt(_0x6b6cx5[_0x6b6cx9]))}};return _0x6b6cx4},compare:function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=Math[_0xb59f[243]](_0x6b6cx2[_0xb59f[67]],_0x6b6cx3[_0xb59f[67]]),_0x6b6cx5=0,_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx4;_0x6b6cx9++){if(_0x6b6cx2[_0x6b6cx9]!=_0x6b6cx3[_0x6b6cx9]){0==_0x6b6cx2[_0x6b6cx9][_0xb59f[67]]||0==_0x6b6cx3[_0x6b6cx9][_0xb59f[67]]?_0x6b6cx5=_0x6b6cx2[_0x6b6cx9]==_0x6b6cx3[_0x6b6cx9]?0:_0x6b6cx2[_0x6b6cx9]>_0x6b6cx3[_0x6b6cx9]?1:-1:(_0x6b6cx4=parseInt(_0x6b6cx2[_0x6b6cx9]),_0x6b6cx9=parseInt(_0x6b6cx3[_0x6b6cx9]),_0x6b6cx5=_0x6b6cx4==_0x6b6cx9?0:_0x6b6cx4>_0x6b6cx9?1:-1);break}};0==_0x6b6cx5&&(_0x6b6cx4=_0x6b6cx2[_0xb59f[67]],_0x6b6cx9=_0x6b6cx3[_0xb59f[67]],_0x6b6cx4!=_0x6b6cx9&&(_0x6b6cx5=_0x6b6cx4>_0x6b6cx9?1:-1));return _0x6b6cx5}},mxPerimeter={RectanglePerimeter:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3=_0x6b6cx2[_0xb59f[241]]();var _0x6b6cx9=_0x6b6cx2[_0xb59f[242]](),_0x6b6cxa=Math[_0xb59f[429]](_0x6b6cx4[_0xb59f[236]]-_0x6b6cx9,_0x6b6cx4[_0xb59f[235]]-_0x6b6cx3),_0x6b6cx12= new mxPoint(0,0),_0x6b6cx13=Math[_0xb59f[424]],_0x6b6cx14=Math[_0xb59f[424]]/2-_0x6b6cxa,_0x6b6cx15=Math[_0xb59f[429]](_0x6b6cx2[_0xb59f[119]],_0x6b6cx2[_0xb59f[117]]);_0x6b6cxa<-_0x6b6cx13+_0x6b6cx15||_0x6b6cxa>_0x6b6cx13-_0x6b6cx15?(_0x6b6cx12[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]]=_0x6b6cx9-_0x6b6cx2[_0xb59f[117]]*Math[_0xb59f[2008]](_0x6b6cxa)/2):_0x6b6cxa<-_0x6b6cx15?(_0x6b6cx12[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]],_0x6b6cx12[_0xb59f[235]]=_0x6b6cx3-_0x6b6cx2[_0xb59f[119]]*Math[_0xb59f[2008]](_0x6b6cx14)/2):_0x6b6cxa<_0x6b6cx15?(_0x6b6cx12[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]],_0x6b6cx12[_0xb59f[236]]=_0x6b6cx9+_0x6b6cx2[_0xb59f[117]]*Math[_0xb59f[2008]](_0x6b6cxa)/2):(_0x6b6cx12[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]],_0x6b6cx12[_0xb59f[235]]=_0x6b6cx3+_0x6b6cx2[_0xb59f[119]]*Math[_0xb59f[2008]](_0x6b6cx14)/2);_0x6b6cx5&&(_0x6b6cx4[_0xb59f[235]]>=_0x6b6cx2[_0xb59f[235]]&&_0x6b6cx4[_0xb59f[235]]<=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]?_0x6b6cx12[_0xb59f[235]]=_0x6b6cx4[_0xb59f[235]]:_0x6b6cx4[_0xb59f[236]]>=_0x6b6cx2[_0xb59f[236]]&&_0x6b6cx4[_0xb59f[236]]<=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]&&(_0x6b6cx12[_0xb59f[236]]=_0x6b6cx4[_0xb59f[236]]),_0x6b6cx4[_0xb59f[235]]<_0x6b6cx2[_0xb59f[235]]?_0x6b6cx12[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]]:_0x6b6cx4[_0xb59f[235]]>_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]&&(_0x6b6cx12[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]),_0x6b6cx4[_0xb59f[236]]<_0x6b6cx2[_0xb59f[236]]?_0x6b6cx12[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]]:_0x6b6cx4[_0xb59f[236]]>_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]&&(_0x6b6cx12[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]));return _0x6b6cx12},EllipsePerimeter:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx2[_0xb59f[235]],_0x6b6cxa=_0x6b6cx2[_0xb59f[236]],_0x6b6cx12=_0x6b6cx2[_0xb59f[117]]/2,_0x6b6cx13=_0x6b6cx2[_0xb59f[119]]/2,_0x6b6cx14=_0x6b6cx9+_0x6b6cx12,_0x6b6cx15=_0x6b6cxa+_0x6b6cx13;_0x6b6cx3=_0x6b6cx4[_0xb59f[235]];_0x6b6cx4=_0x6b6cx4[_0xb59f[236]];var _0x6b6cx16=parseInt(_0x6b6cx3-_0x6b6cx14),_0x6b6cx17=parseInt(_0x6b6cx4-_0x6b6cx15);if(0==_0x6b6cx16&&0!=_0x6b6cx17){return  new mxPoint(_0x6b6cx14,_0x6b6cx15+_0x6b6cx13*_0x6b6cx17/Math[_0xb59f[425]](_0x6b6cx17))};if(0==_0x6b6cx16&&0==_0x6b6cx17){return  new mxPoint(_0x6b6cx3,_0x6b6cx4)};if(_0x6b6cx5){if(_0x6b6cx4>=_0x6b6cxa&&_0x6b6cx4<=_0x6b6cxa+_0x6b6cx2[_0xb59f[119]]){return _0x6b6cx2=_0x6b6cx4-_0x6b6cx15,_0x6b6cx2=Math[_0xb59f[428]](_0x6b6cx12*_0x6b6cx12*(1-_0x6b6cx2*_0x6b6cx2/(_0x6b6cx13*_0x6b6cx13)))||0,_0x6b6cx3<=_0x6b6cx9&&(_0x6b6cx2= -_0x6b6cx2), new mxPoint(_0x6b6cx14+_0x6b6cx2,_0x6b6cx4)};if(_0x6b6cx3>=_0x6b6cx9&&_0x6b6cx3<=_0x6b6cx9+_0x6b6cx2[_0xb59f[117]]){return _0x6b6cx2=_0x6b6cx3-_0x6b6cx14,_0x6b6cx2=Math[_0xb59f[428]](_0x6b6cx13*_0x6b6cx13*(1-_0x6b6cx2*_0x6b6cx2/(_0x6b6cx12*_0x6b6cx12)))||0,_0x6b6cx4<=_0x6b6cxa&&(_0x6b6cx2= -_0x6b6cx2), new mxPoint(_0x6b6cx3,_0x6b6cx15+_0x6b6cx2)}};_0x6b6cx9=_0x6b6cx17/_0x6b6cx16;_0x6b6cx15-=_0x6b6cx9*_0x6b6cx14;_0x6b6cxa=_0x6b6cx12*_0x6b6cx12*_0x6b6cx9*_0x6b6cx9+_0x6b6cx13*_0x6b6cx13;_0x6b6cx2=-2*_0x6b6cx14*_0x6b6cxa;_0x6b6cx13=Math[_0xb59f[428]](_0x6b6cx2*_0x6b6cx2-4*_0x6b6cxa*(_0x6b6cx12*_0x6b6cx12*_0x6b6cx9*_0x6b6cx9*_0x6b6cx14*_0x6b6cx14+_0x6b6cx13*_0x6b6cx13*_0x6b6cx14*_0x6b6cx14-_0x6b6cx12*_0x6b6cx12*_0x6b6cx13*_0x6b6cx13));_0x6b6cx12=(-_0x6b6cx2+_0x6b6cx13)/(2*_0x6b6cxa);_0x6b6cx13=(-_0x6b6cx2-_0x6b6cx13)/(2*_0x6b6cxa);_0x6b6cx14=_0x6b6cx9*_0x6b6cx12+_0x6b6cx15;_0x6b6cx15=_0x6b6cx9*_0x6b6cx13+_0x6b6cx15;_0x6b6cx9=Math[_0xb59f[428]](Math[_0xb59f[2009]](_0x6b6cx12-_0x6b6cx3,2)+Math[_0xb59f[2009]](_0x6b6cx14-_0x6b6cx4,2));_0x6b6cx3=Math[_0xb59f[428]](Math[_0xb59f[2009]](_0x6b6cx13-_0x6b6cx3,2)+Math[_0xb59f[2009]](_0x6b6cx15-_0x6b6cx4,2));_0x6b6cxa=_0x6b6cx4=0;_0x6b6cx9<_0x6b6cx3?(_0x6b6cx4=_0x6b6cx12,_0x6b6cxa=_0x6b6cx14):(_0x6b6cx4=_0x6b6cx13,_0x6b6cxa=_0x6b6cx15);return  new mxPoint(_0x6b6cx4,_0x6b6cxa)},RhombusPerimeter:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3=_0x6b6cx2[_0xb59f[235]];var _0x6b6cx9=_0x6b6cx2[_0xb59f[236]],_0x6b6cxa=_0x6b6cx2[_0xb59f[117]];_0x6b6cx2=_0x6b6cx2[_0xb59f[119]];var _0x6b6cx12=_0x6b6cx3+_0x6b6cxa/2,_0x6b6cx13=_0x6b6cx9+_0x6b6cx2/2,_0x6b6cx14=_0x6b6cx4[_0xb59f[235]];_0x6b6cx4=_0x6b6cx4[_0xb59f[236]];if(_0x6b6cx12==_0x6b6cx14){return _0x6b6cx13>_0x6b6cx4? new mxPoint(_0x6b6cx12,_0x6b6cx9): new mxPoint(_0x6b6cx12,_0x6b6cx9+_0x6b6cx2)};if(_0x6b6cx13==_0x6b6cx4){return _0x6b6cx12>_0x6b6cx14? new mxPoint(_0x6b6cx3,_0x6b6cx13): new mxPoint(_0x6b6cx3+_0x6b6cxa,_0x6b6cx13)};var _0x6b6cx15=_0x6b6cx12,_0x6b6cx16=_0x6b6cx13;_0x6b6cx5&&(_0x6b6cx14>=_0x6b6cx3&&_0x6b6cx14<=_0x6b6cx3+_0x6b6cxa?_0x6b6cx15=_0x6b6cx14:_0x6b6cx4>=_0x6b6cx9&&_0x6b6cx4<=_0x6b6cx9+_0x6b6cx2&&(_0x6b6cx16=_0x6b6cx4));return _0x6b6cx14<_0x6b6cx12?_0x6b6cx4<_0x6b6cx13?mxUtils[_0xb59f[2010]](_0x6b6cx14,_0x6b6cx4,_0x6b6cx15,_0x6b6cx16,_0x6b6cx12,_0x6b6cx9,_0x6b6cx3,_0x6b6cx13):mxUtils[_0xb59f[2010]](_0x6b6cx14,_0x6b6cx4,_0x6b6cx15,_0x6b6cx16,_0x6b6cx12,_0x6b6cx9+_0x6b6cx2,_0x6b6cx3,_0x6b6cx13):_0x6b6cx4<_0x6b6cx13?mxUtils[_0xb59f[2010]](_0x6b6cx14,_0x6b6cx4,_0x6b6cx15,_0x6b6cx16,_0x6b6cx12,_0x6b6cx9,_0x6b6cx3+_0x6b6cxa,_0x6b6cx13):mxUtils[_0xb59f[2010]](_0x6b6cx14,_0x6b6cx4,_0x6b6cx15,_0x6b6cx16,_0x6b6cx12,_0x6b6cx9+_0x6b6cx2,_0x6b6cx3+_0x6b6cxa,_0x6b6cx13)},TrianglePerimeter:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]][mxConstants[_0xb59f[2011]]]:null;var _0x6b6cx9=_0x6b6cx3==mxConstants[_0xb59f[1358]]||_0x6b6cx3==mxConstants[_0xb59f[1354]],_0x6b6cxa=_0x6b6cx2[_0xb59f[235]],_0x6b6cx12=_0x6b6cx2[_0xb59f[236]],_0x6b6cx13=_0x6b6cx2[_0xb59f[117]];_0x6b6cx2=_0x6b6cx2[_0xb59f[119]];var _0x6b6cx14=_0x6b6cxa+_0x6b6cx13/2,_0x6b6cx15=_0x6b6cx12+_0x6b6cx2/2,_0x6b6cx16= new mxPoint(_0x6b6cxa,_0x6b6cx12),_0x6b6cx17= new mxPoint(_0x6b6cxa+_0x6b6cx13,_0x6b6cx15),_0x6b6cx18= new mxPoint(_0x6b6cxa,_0x6b6cx12+_0x6b6cx2);_0x6b6cx3==mxConstants[_0xb59f[1358]]?(_0x6b6cx16=_0x6b6cx18,_0x6b6cx17= new mxPoint(_0x6b6cx14,_0x6b6cx12),_0x6b6cx18= new mxPoint(_0x6b6cxa+_0x6b6cx13,_0x6b6cx12+_0x6b6cx2)):_0x6b6cx3==mxConstants[_0xb59f[1354]]?(_0x6b6cx17= new mxPoint(_0x6b6cx14,_0x6b6cx12+_0x6b6cx2),_0x6b6cx18= new mxPoint(_0x6b6cxa+_0x6b6cx13,_0x6b6cx12)):_0x6b6cx3==mxConstants[_0xb59f[1359]]&&(_0x6b6cx16= new mxPoint(_0x6b6cxa+_0x6b6cx13,_0x6b6cx12),_0x6b6cx17= new mxPoint(_0x6b6cxa,_0x6b6cx15),_0x6b6cx18= new mxPoint(_0x6b6cxa+_0x6b6cx13,_0x6b6cx12+_0x6b6cx2));var _0x6b6cx19=_0x6b6cx4[_0xb59f[235]]-_0x6b6cx14,_0x6b6cx1a=_0x6b6cx4[_0xb59f[236]]-_0x6b6cx15,_0x6b6cx19=_0x6b6cx9?Math[_0xb59f[429]](_0x6b6cx19,_0x6b6cx1a):Math[_0xb59f[429]](_0x6b6cx1a,_0x6b6cx19),_0x6b6cx1b=_0x6b6cx9?Math[_0xb59f[429]](_0x6b6cx13,_0x6b6cx2):Math[_0xb59f[429]](_0x6b6cx2,_0x6b6cx13),_0x6b6cx1a=!1,_0x6b6cx1a=_0x6b6cx3==mxConstants[_0xb59f[1358]]||_0x6b6cx3==mxConstants[_0xb59f[1359]]?_0x6b6cx19>-_0x6b6cx1b&&_0x6b6cx19<_0x6b6cx1b:_0x6b6cx19<-Math[_0xb59f[424]]+_0x6b6cx1b||_0x6b6cx19>Math[_0xb59f[424]]-_0x6b6cx1b,_0x6b6cx1b=null;_0x6b6cx1a?_0x6b6cx1b=_0x6b6cx5&&(_0x6b6cx9&&_0x6b6cx4[_0xb59f[235]]>=_0x6b6cx16[_0xb59f[235]]&&_0x6b6cx4[_0xb59f[235]]<=_0x6b6cx18[_0xb59f[235]]||!_0x6b6cx9&&_0x6b6cx4[_0xb59f[236]]>=_0x6b6cx16[_0xb59f[236]]&&_0x6b6cx4[_0xb59f[236]]<=_0x6b6cx18[_0xb59f[236]])?_0x6b6cx9? new mxPoint(_0x6b6cx4[_0xb59f[235]],_0x6b6cx16[_0xb59f[236]]): new mxPoint(_0x6b6cx16[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]]):_0x6b6cx3==mxConstants[_0xb59f[1358]]? new mxPoint(_0x6b6cxa+_0x6b6cx13/2+_0x6b6cx2*Math[_0xb59f[2008]](_0x6b6cx19)/2,_0x6b6cx12+_0x6b6cx2):_0x6b6cx3==mxConstants[_0xb59f[1354]]? new mxPoint(_0x6b6cxa+_0x6b6cx13/2-_0x6b6cx2*Math[_0xb59f[2008]](_0x6b6cx19)/2,_0x6b6cx12):_0x6b6cx3==mxConstants[_0xb59f[1359]]? new mxPoint(_0x6b6cxa+_0x6b6cx13,_0x6b6cx12+_0x6b6cx2/2+_0x6b6cx13*Math[_0xb59f[2008]](_0x6b6cx19)/2): new mxPoint(_0x6b6cxa,_0x6b6cx12+_0x6b6cx2/2-_0x6b6cx13*Math[_0xb59f[2008]](_0x6b6cx19)/2):(_0x6b6cx5&&(_0x6b6cx5= new mxPoint(_0x6b6cx14,_0x6b6cx15),_0x6b6cx4[_0xb59f[236]]>=_0x6b6cx12&&_0x6b6cx4[_0xb59f[236]]<=_0x6b6cx12+_0x6b6cx2?(_0x6b6cx5[_0xb59f[235]]=_0x6b6cx9?_0x6b6cx14:_0x6b6cx3==mxConstants[_0xb59f[1359]]?_0x6b6cxa+_0x6b6cx13:_0x6b6cxa,_0x6b6cx5[_0xb59f[236]]=_0x6b6cx4[_0xb59f[236]]):_0x6b6cx4[_0xb59f[235]]>=_0x6b6cxa&&_0x6b6cx4[_0xb59f[235]]<=_0x6b6cxa+_0x6b6cx13&&(_0x6b6cx5[_0xb59f[235]]=_0x6b6cx4[_0xb59f[235]],_0x6b6cx5[_0xb59f[236]]=!_0x6b6cx9?_0x6b6cx15:_0x6b6cx3==mxConstants[_0xb59f[1358]]?_0x6b6cx12+_0x6b6cx2:_0x6b6cx12),_0x6b6cx14=_0x6b6cx5[_0xb59f[235]],_0x6b6cx15=_0x6b6cx5[_0xb59f[236]]),_0x6b6cx1b=_0x6b6cx9&&_0x6b6cx4[_0xb59f[235]]<=_0x6b6cxa+_0x6b6cx13/2||!_0x6b6cx9&&_0x6b6cx4[_0xb59f[236]]<=_0x6b6cx12+_0x6b6cx2/2?mxUtils[_0xb59f[2010]](_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]],_0x6b6cx14,_0x6b6cx15,_0x6b6cx16[_0xb59f[235]],_0x6b6cx16[_0xb59f[236]],_0x6b6cx17[_0xb59f[235]],_0x6b6cx17[_0xb59f[236]]):mxUtils[_0xb59f[2010]](_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]],_0x6b6cx14,_0x6b6cx15,_0x6b6cx17[_0xb59f[235]],_0x6b6cx17[_0xb59f[236]],_0x6b6cx18[_0xb59f[235]],_0x6b6cx18[_0xb59f[236]]));null==_0x6b6cx1b&&(_0x6b6cx1b= new mxPoint(_0x6b6cx14,_0x6b6cx15));return _0x6b6cx1b}};function mxPrintPreview(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[255]]=null!=_0x6b6cx3?_0x6b6cx3:1/_0x6b6cx2[_0xb59f[2012]];this[_0xb59f[467]]=null!=_0x6b6cx5?_0x6b6cx5:0;this[_0xb59f[2013]]=null!=_0x6b6cx4?_0x6b6cx4:_0x6b6cx2[_0xb59f[2013]];this[_0xb59f[924]]=null!=_0x6b6cx13?_0x6b6cx13:_0xb59f[2014];this[_0xb59f[1732]]=null!=_0x6b6cx9?_0x6b6cx9:0;this[_0xb59f[1733]]=null!=_0x6b6cxa?_0x6b6cxa:0;this[_0xb59f[1630]]=_0x6b6cx12;this[_0xb59f[2015]]=null!=_0x6b6cx14?_0x6b6cx14:!0}mxPrintPreview[_0xb59f[202]][_0xb59f[1179]]=null;mxPrintPreview[_0xb59f[202]][_0xb59f[2013]]=null;mxPrintPreview[_0xb59f[202]][_0xb59f[255]]=null;mxPrintPreview[_0xb59f[202]][_0xb59f[467]]=0;mxPrintPreview[_0xb59f[202]][_0xb59f[1732]]=0;mxPrintPreview[_0xb59f[202]][_0xb59f[1733]]=0;mxPrintPreview[_0xb59f[202]][_0xb59f[2016]]= !0;mxPrintPreview[_0xb59f[202]][_0xb59f[2017]]= !1;mxPrintPreview[_0xb59f[202]][_0xb59f[1630]]=null;mxPrintPreview[_0xb59f[202]][_0xb59f[924]]=null;mxPrintPreview[_0xb59f[202]][_0xb59f[2015]]=null;mxPrintPreview[_0xb59f[202]][_0xb59f[2018]]=null;mxPrintPreview[_0xb59f[202]][_0xb59f[2019]]=0;mxPrintPreview[_0xb59f[202]][_0xb59f[2020]]=function(){return this[_0xb59f[2018]]};mxPrintPreview[_0xb59f[202]][_0xb59f[2021]]=function(){var _0x6b6cx2=_0xb59f[110];8==document[_0xb59f[5]]&&(_0x6b6cx2=_0xb59f[2022]);return _0x6b6cx2};mxPrintPreview[_0xb59f[202]][_0xb59f[392]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[259]][_0xb59f[2023]],_0x6b6cx4=null;try{this[_0xb59f[2017]]&&(this[_0xb59f[1179]][_0xb59f[259]][_0xb59f[2023]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3[_0xb59f[176]](_0x6b6cx2[_0xb59f[441]][_0xb59f[2024]]())});if(null==this[_0xb59f[2018]]){this[_0xb59f[2018]]=window[_0xb59f[392]]();var _0x6b6cx5=this[_0xb59f[2018]][_0xb59f[395]],_0x6b6cx9=this[_0xb59f[2021]]();null!=_0x6b6cx9&&0<_0x6b6cx9[_0xb59f[67]]&&_0x6b6cx5[_0xb59f[171]](_0x6b6cx9);_0x6b6cx5[_0xb59f[171]](_0xb59f[528]);_0x6b6cx5[_0xb59f[171]](_0xb59f[531]);this[_0xb59f[2025]](_0x6b6cx5,_0x6b6cx2);_0x6b6cx5[_0xb59f[171]](_0xb59f[533]);_0x6b6cx5[_0xb59f[171]](_0xb59f[2026]);mxClient[_0xb59f[54]](_0xb59f[94],mxClient[_0xb59f[86]]+_0xb59f[95],_0x6b6cx5);mxClient[_0xb59f[47]]&&(_0x6b6cx5[_0xb59f[100]][_0xb59f[99]](_0xb59f[6],_0xb59f[97]),_0x6b6cx5[_0xb59f[100]][_0xb59f[99]](_0xb59f[7],_0xb59f[101]),_0x6b6cx5[_0xb59f[102]]()[_0xb59f[103]]=_0xb59f[104],mxClient[_0xb59f[54]](_0xb59f[94],mxClient[_0xb59f[86]]+_0xb59f[105],_0x6b6cx5));var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[517]]()[_0xb59f[238]](),_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[518]](),_0x6b6cx13=_0x6b6cx12/this[_0xb59f[255]],_0x6b6cx14=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[512]]();this[_0xb59f[2016]]||(this[_0xb59f[1732]]=-_0x6b6cx14[_0xb59f[235]]*this[_0xb59f[255]],this[_0xb59f[1733]]=-_0x6b6cx14[_0xb59f[236]]*this[_0xb59f[255]],_0x6b6cxa[_0xb59f[117]]+=_0x6b6cxa[_0xb59f[235]],_0x6b6cxa[_0xb59f[119]]+=_0x6b6cxa[_0xb59f[236]],_0x6b6cxa[_0xb59f[235]]=0,this[_0xb59f[467]]=_0x6b6cxa[_0xb59f[236]]=0);_0x6b6cxa[_0xb59f[117]]/=_0x6b6cx13;_0x6b6cxa[_0xb59f[119]]/=_0x6b6cx13;var _0x6b6cx15=this[_0xb59f[2013]][_0xb59f[117]]-2*this[_0xb59f[467]],_0x6b6cx16=this[_0xb59f[2013]][_0xb59f[119]]-2*this[_0xb59f[467]],_0x6b6cx17=Math[_0xb59f[160]](1,Math[_0xb59f[430]]((_0x6b6cxa[_0xb59f[117]]+this[_0xb59f[1732]])/_0x6b6cx15)),_0x6b6cx18=Math[_0xb59f[160]](1,Math[_0xb59f[430]]((_0x6b6cxa[_0xb59f[119]]+this[_0xb59f[1733]])/_0x6b6cx16));this[_0xb59f[2019]]=_0x6b6cx17*_0x6b6cx18;var _0x6b6cx19=mxUtils[_0xb59f[885]](this,function(){if(this[_0xb59f[2015]]&&(1<_0x6b6cx18||1<_0x6b6cx17)){var _0x6b6cx2=this[_0xb59f[2027]](_0x6b6cx18,_0x6b6cx17);_0x6b6cx5[_0xb59f[112]][_0xb59f[62]](_0x6b6cx2);if(mxClient[_0xb59f[80]]){_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];var _0x6b6cx3=function(){_0x6b6cx2[_0xb59f[124]][_0xb59f[125]]=_0x6b6cx5[_0xb59f[112]][_0xb59f[190]]+10+_0xb59f[168]};mxEvent[_0xb59f[169]](this[_0xb59f[2018]],_0xb59f[276],function(_0x6b6cx2){_0x6b6cx3()});mxEvent[_0xb59f[169]](this[_0xb59f[2018]],_0xb59f[129],function(_0x6b6cx2){_0x6b6cx3()})}}});_0x6b6cx2=function(_0x6b6cx2,_0x6b6cx3){null!=this[_0xb59f[1630]]&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[1630]]=this[_0xb59f[1630]],_0x6b6cx2[_0xb59f[124]][_0xb59f[465]]=_0xb59f[1631],_0x6b6cx2[_0xb59f[124]][_0xb59f[1629]]=_0xb59f[942]);_0x6b6cx2[_0xb59f[124]][_0xb59f[1537]]=_0xb59f[1391];_0x6b6cx3&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[2028]]=_0xb59f[2029]);mxClient[_0xb59f[80]]?(_0x6b6cx5[_0xb59f[171]](_0x6b6cx2[_0xb59f[342]]),_0x6b6cx2[_0xb59f[265]][_0xb59f[266]](_0x6b6cx2)):(_0x6b6cx2[_0xb59f[265]][_0xb59f[266]](_0x6b6cx2),_0x6b6cx5[_0xb59f[112]][_0xb59f[62]](_0x6b6cx2));if(_0x6b6cx3){var _0x6b6cx4=_0x6b6cx5[_0xb59f[55]](_0xb59f[1054]);_0x6b6cx4[_0xb59f[926]]=_0xb59f[2030];_0x6b6cx5[_0xb59f[112]][_0xb59f[62]](_0x6b6cx4)}};var _0x6b6cx1a=this[_0xb59f[2031]](this[_0xb59f[2013]][_0xb59f[117]],this[_0xb59f[2013]][_0xb59f[119]]);if(null!=_0x6b6cx1a){for(var _0x6b6cx1b=0;_0x6b6cx1b<_0x6b6cx1a[_0xb59f[67]];_0x6b6cx1b++){_0x6b6cx2(_0x6b6cx1a[_0x6b6cx1b],!0)}};for(var _0x6b6cx1c=this[_0xb59f[2032]](this[_0xb59f[2013]][_0xb59f[117]],this[_0xb59f[2013]][_0xb59f[119]]),_0x6b6cx1b=0;_0x6b6cx1b<_0x6b6cx18;_0x6b6cx1b++){for(var _0x6b6cx1d=_0x6b6cx1b*_0x6b6cx16/this[_0xb59f[255]]-this[_0xb59f[1733]]/this[_0xb59f[255]]+(_0x6b6cxa[_0xb59f[236]]-_0x6b6cx14[_0xb59f[236]]*_0x6b6cx12)/_0x6b6cx12,_0x6b6cx1a=0;_0x6b6cx1a<_0x6b6cx17;_0x6b6cx1a++){if(null==this[_0xb59f[2018]]){return null};var _0x6b6cx1e=_0x6b6cx1a*_0x6b6cx15/this[_0xb59f[255]]-this[_0xb59f[1732]]/this[_0xb59f[255]]+(_0x6b6cxa[_0xb59f[235]]-_0x6b6cx14[_0xb59f[235]]*_0x6b6cx12)/_0x6b6cx12,_0x6b6cx1f=_0x6b6cx1b*_0x6b6cx17+_0x6b6cx1a+1,_0x6b6cx4=this[_0xb59f[2034]](this[_0xb59f[2013]][_0xb59f[117]],this[_0xb59f[2013]][_0xb59f[119]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2033]](-_0x6b6cx1e,-_0x6b6cx1d,this[_0xb59f[255]],_0x6b6cx1f,_0x6b6cx2)}));_0x6b6cx4[_0xb59f[57]](_0xb59f[1363],_0xb59f[2035]+_0x6b6cx1f);_0x6b6cx2(_0x6b6cx4,null!=_0x6b6cx1c||_0x6b6cx1b<_0x6b6cx18-1||_0x6b6cx1a<_0x6b6cx17-1)}};if(null!=_0x6b6cx1c){for(_0x6b6cx1b=0;_0x6b6cx1b<_0x6b6cx1c[_0xb59f[67]];_0x6b6cx1b++){_0x6b6cx2(_0x6b6cx1c[_0x6b6cx1b],_0x6b6cx1b<_0x6b6cx1c[_0xb59f[67]])}};_0x6b6cx5[_0xb59f[171]](_0xb59f[527]);_0x6b6cx5[_0xb59f[171]](_0xb59f[534]);_0x6b6cx5[_0xb59f[268]]();_0x6b6cx19();mxEvent[_0xb59f[762]](_0x6b6cx5[_0xb59f[112]])};this[_0xb59f[2018]][_0xb59f[393]]()}catch(y){null!=_0x6b6cx4&&null!=_0x6b6cx4[_0xb59f[265]]&&_0x6b6cx4[_0xb59f[265]][_0xb59f[266]](_0x6b6cx4)}finally{this[_0xb59f[1179]][_0xb59f[259]][_0xb59f[2023]]=_0x6b6cx3};return this[_0xb59f[2018]]};mxPrintPreview[_0xb59f[202]][_0xb59f[2025]]=function(_0x6b6cx2,_0x6b6cx3){null!=this[_0xb59f[924]]&&_0x6b6cx2[_0xb59f[171]](_0xb59f[2036]+this[_0xb59f[924]]+_0xb59f[2037]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2038]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2039]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2040]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2041]);_0x6b6cx2[_0xb59f[171]](_0xb59f[233]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2042]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2043]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2044]);_0x6b6cx2[_0xb59f[171]](_0xb59f[2045]);_0x6b6cx2[_0xb59f[171]](_0xb59f[233]);null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[171]](_0x6b6cx3);_0x6b6cx2[_0xb59f[171]](_0xb59f[2046])};mxPrintPreview[_0xb59f[202]][_0xb59f[2027]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[2018]][_0xb59f[395]],_0x6b6cx5=_0x6b6cx4[_0xb59f[55]](_0xb59f[116]);_0x6b6cx5[_0xb59f[926]]=_0xb59f[2047];_0x6b6cx5[_0xb59f[57]](_0xb59f[467],_0xb59f[468]);for(var _0x6b6cx9=_0x6b6cx4[_0xb59f[55]](_0xb59f[120]),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2;_0x6b6cxa++){for(var _0x6b6cx12=_0x6b6cx4[_0xb59f[55]](_0xb59f[121]),_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx3;_0x6b6cx13++){var _0x6b6cx14=_0x6b6cxa*_0x6b6cx3+_0x6b6cx13+1,_0x6b6cx15=_0x6b6cx4[_0xb59f[55]](_0xb59f[122]);if(!mxClient[_0xb59f[133]]||mxClient[_0xb59f[75]]||mxClient[_0xb59f[76]]){var _0x6b6cx16=_0x6b6cx4[_0xb59f[55]](_0xb59f[2048]);_0x6b6cx16[_0xb59f[57]](_0xb59f[44],_0xb59f[2049]+_0x6b6cx14);mxUtils[_0xb59f[53]](_0x6b6cx16,_0x6b6cx14,_0x6b6cx4);_0x6b6cx15[_0xb59f[62]](_0x6b6cx16)}else {mxUtils[_0xb59f[53]](_0x6b6cx15,_0x6b6cx14,_0x6b6cx4)};_0x6b6cx12[_0xb59f[62]](_0x6b6cx15)};_0x6b6cx9[_0xb59f[62]](_0x6b6cx12)};_0x6b6cx5[_0xb59f[62]](_0x6b6cx9);return _0x6b6cx5};mxPrintPreview[_0xb59f[202]][_0xb59f[2034]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[485]);try{_0x6b6cx5[_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2+_0xb59f[168];_0x6b6cx5[_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3+_0xb59f[168];_0x6b6cx5[_0xb59f[124]][_0xb59f[277]]=_0xb59f[188];_0x6b6cx5[_0xb59f[124]][_0xb59f[2050]]=_0xb59f[1824];_0x6b6cx5[_0xb59f[124]][_0xb59f[491]]=_0xb59f[1500];var _0x6b6cx9=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx9[_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[467]]+_0xb59f[168];_0x6b6cx9[_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[467]]+_0xb59f[168];_0x6b6cx9[_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2-2*this[_0xb59f[467]]+_0xb59f[168];_0x6b6cx9[_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3-2*this[_0xb59f[467]]+_0xb59f[168];_0x6b6cx9[_0xb59f[124]][_0xb59f[277]]=_0xb59f[188];this[_0xb59f[1179]][_0xb59f[507]]==mxConstants[_0xb59f[1523]]&&(_0x6b6cx9[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492]);_0x6b6cx5[_0xb59f[62]](_0x6b6cx9);document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx5);_0x6b6cx4(_0x6b6cx9)}catch(f){throw _0x6b6cx5[_0xb59f[265]][_0xb59f[266]](_0x6b6cx5),f};return _0x6b6cx5};mxPrintPreview[_0xb59f[202]][_0xb59f[2033]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]();var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[526]];this[_0xb59f[1179]][_0xb59f[526]]=_0x6b6cx9;var _0x6b6cx12=_0x6b6cx5[_0xb59f[2051]](),_0x6b6cx13=_0x6b6cx5[_0xb59f[2052]](),_0x6b6cx14=_0x6b6cx5[_0xb59f[2024]](),_0x6b6cx15=_0x6b6cx5[_0xb59f[1524]]();this[_0xb59f[1179]][_0xb59f[507]]==mxConstants[_0xb59f[508]]?_0x6b6cx5[_0xb59f[1569]]():this[_0xb59f[1179]][_0xb59f[507]]==mxConstants[_0xb59f[1523]]?_0x6b6cx5[_0xb59f[1571]]():_0x6b6cx5[_0xb59f[1570]]();var _0x6b6cx16=_0x6b6cx5[_0xb59f[503]]();_0x6b6cx5[_0xb59f[504]](!1);var _0x6b6cx17=this[_0xb59f[1179]][_0xb59f[994]]();this[_0xb59f[1179]][_0xb59f[995]](!1);var _0x6b6cx18=_0x6b6cx5[_0xb59f[512]]();_0x6b6cx5[_0xb59f[513]]= new mxPoint(_0x6b6cx2,_0x6b6cx3);_0x6b6cx2=null;try{var _0x6b6cx19=[this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[501]]()];_0x6b6cx2= new mxTemporaryCellStates(_0x6b6cx5,_0x6b6cx4,_0x6b6cx19)}finally{if(mxClient[_0xb59f[80]]){_0x6b6cx5[_0xb59f[506]][_0xb59f[339]]=_0xb59f[110]}else {for(_0x6b6cx4=_0x6b6cx9[_0xb59f[285]];null!=_0x6b6cx4;){_0x6b6cx19=_0x6b6cx4[_0xb59f[287]],_0x6b6cx3=_0x6b6cx4[_0xb59f[301]][_0xb59f[216]](),_0xb59f[571]==_0x6b6cx3?(_0x6b6cx4[_0xb59f[57]](_0xb59f[117],parseInt(_0x6b6cx9[_0xb59f[124]][_0xb59f[117]])),_0x6b6cx4[_0xb59f[57]](_0xb59f[119],parseInt(_0x6b6cx9[_0xb59f[124]][_0xb59f[119]]))):_0xb59f[583]!=_0x6b6cx4[_0xb59f[124]][_0xb59f[270]]&&_0xb59f[116]!=_0x6b6cx3&&_0x6b6cx4[_0xb59f[265]][_0xb59f[266]](_0x6b6cx4),_0x6b6cx4=_0x6b6cx19}};_0x6b6cx5[_0xb59f[506]][_0xb59f[265]][_0xb59f[266]](_0x6b6cx5[_0xb59f[506]]);this[_0xb59f[1179]][_0xb59f[995]](_0x6b6cx17);this[_0xb59f[1179]][_0xb59f[526]]=_0x6b6cxa;_0x6b6cx5[_0xb59f[510]]=_0x6b6cx12;_0x6b6cx5[_0xb59f[2053]]=_0x6b6cx13;_0x6b6cx5[_0xb59f[505]]=_0x6b6cx14;_0x6b6cx5[_0xb59f[506]]=_0x6b6cx15;_0x6b6cx5[_0xb59f[513]]=_0x6b6cx18;_0x6b6cx2[_0xb59f[515]]();_0x6b6cx5[_0xb59f[504]](_0x6b6cx16)}};mxPrintPreview[_0xb59f[202]][_0xb59f[2031]]=function(){return null};mxPrintPreview[_0xb59f[202]][_0xb59f[2032]]=function(){return null};mxPrintPreview[_0xb59f[202]][_0xb59f[540]]=function(){var _0x6b6cx2=this[_0xb59f[392]]();null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[540]]()};mxPrintPreview[_0xb59f[202]][_0xb59f[268]]=function(){null!=this[_0xb59f[2018]]&&(this[_0xb59f[2018]][_0xb59f[268]](),this[_0xb59f[2018]]=null)};function mxStylesheet(){this[_0xb59f[2054]]={};this[_0xb59f[2056]](this[_0xb59f[2055]]());this[_0xb59f[2058]](this[_0xb59f[2057]]())}mxStylesheet[_0xb59f[202]][_0xb59f[2055]]=function(){var _0x6b6cx2={};_0x6b6cx2[mxConstants[_0xb59f[2059]]]=mxConstants[_0xb59f[2060]];_0x6b6cx2[mxConstants[_0xb59f[2061]]]=mxPerimeter[_0xb59f[2062]];_0x6b6cx2[mxConstants[_0xb59f[2063]]]=mxConstants[_0xb59f[481]];_0x6b6cx2[mxConstants[_0xb59f[2064]]]=mxConstants[_0xb59f[479]];_0x6b6cx2[mxConstants[_0xb59f[2065]]]=_0xb59f[2066];_0x6b6cx2[mxConstants[_0xb59f[2067]]]=_0xb59f[2068];_0x6b6cx2[mxConstants[_0xb59f[2069]]]=_0xb59f[2070];return _0x6b6cx2};mxStylesheet[_0xb59f[202]][_0xb59f[2057]]=function(){var _0x6b6cx2={};_0x6b6cx2[mxConstants[_0xb59f[2059]]]=mxConstants[_0xb59f[2071]];_0x6b6cx2[mxConstants[_0xb59f[1695]]]=mxConstants[_0xb59f[1622]];_0x6b6cx2[mxConstants[_0xb59f[2063]]]=mxConstants[_0xb59f[481]];_0x6b6cx2[mxConstants[_0xb59f[2064]]]=mxConstants[_0xb59f[479]];_0x6b6cx2[mxConstants[_0xb59f[2067]]]=_0xb59f[2068];_0x6b6cx2[mxConstants[_0xb59f[2069]]]=_0xb59f[2072];return _0x6b6cx2};mxStylesheet[_0xb59f[202]][_0xb59f[2056]]=function(_0x6b6cx2){this[_0xb59f[2074]](_0xb59f[2073],_0x6b6cx2)};mxStylesheet[_0xb59f[202]][_0xb59f[2058]]=function(_0x6b6cx2){this[_0xb59f[2074]](_0xb59f[2075],_0x6b6cx2)};mxStylesheet[_0xb59f[202]][_0xb59f[2076]]=function(){return this[_0xb59f[2054]][_0xb59f[2073]]};mxStylesheet[_0xb59f[202]][_0xb59f[2077]]=function(){return this[_0xb59f[2054]][_0xb59f[2075]]};mxStylesheet[_0xb59f[202]][_0xb59f[2074]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2054]][_0x6b6cx2]=_0x6b6cx3};mxStylesheet[_0xb59f[202]][_0xb59f[1705]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx3;if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){for(var _0x6b6cx5=_0x6b6cx2[_0xb59f[224]](_0xb59f[471]),_0x6b6cx4=null!=_0x6b6cx4&&_0xb59f[471]!=_0x6b6cx2[_0xb59f[225]](0)?mxUtils[_0xb59f[238]](_0x6b6cx4):{},_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx5[_0x6b6cx9],_0x6b6cx12=_0x6b6cxa[_0xb59f[2]](_0xb59f[226]);if(0<=_0x6b6cx12){var _0x6b6cx13=_0x6b6cxa[_0xb59f[85]](0,_0x6b6cx12),_0x6b6cxa=_0x6b6cxa[_0xb59f[85]](_0x6b6cx12+1);_0x6b6cxa==mxConstants[_0xb59f[217]]? delete _0x6b6cx4[_0x6b6cx13]:mxUtils[_0xb59f[1946]](_0x6b6cxa)?_0x6b6cx4[_0x6b6cx13]=parseFloat(_0x6b6cxa):_0x6b6cx4[_0x6b6cx13]=_0x6b6cxa}else {if(_0x6b6cxa=this[_0xb59f[2054]][_0x6b6cxa],null!=_0x6b6cxa){for(_0x6b6cx13 in _0x6b6cxa){_0x6b6cx4[_0x6b6cx13]=_0x6b6cxa[_0x6b6cx13]}}}}};return _0x6b6cx4};function mxCellState(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[441]]=_0x6b6cx2;this[_0xb59f[246]]=_0x6b6cx3;this[_0xb59f[124]]=_0x6b6cx4;this[_0xb59f[2078]]= new mxPoint;this[_0xb59f[2079]]= new mxPoint}mxCellState[_0xb59f[202]]= new mxRectangle;mxCellState[_0xb59f[202]][_0xb59f[196]]=mxCellState;mxCellState[_0xb59f[202]][_0xb59f[441]]=null;mxCellState[_0xb59f[202]][_0xb59f[246]]=null;mxCellState[_0xb59f[202]][_0xb59f[124]]=null;mxCellState[_0xb59f[202]][_0xb59f[2080]]= !0;mxCellState[_0xb59f[202]][_0xb59f[2081]]= !1;mxCellState[_0xb59f[202]][_0xb59f[2082]]= !1;mxCellState[_0xb59f[202]][_0xb59f[2078]]=null;mxCellState[_0xb59f[202]][_0xb59f[439]]=null;mxCellState[_0xb59f[202]][_0xb59f[2079]]=null;mxCellState[_0xb59f[202]][_0xb59f[2083]]=null;mxCellState[_0xb59f[202]][_0xb59f[2084]]=null;mxCellState[_0xb59f[202]][_0xb59f[2085]]=0;mxCellState[_0xb59f[202]][_0xb59f[67]]=0;mxCellState[_0xb59f[202]][_0xb59f[2086]]=null;mxCellState[_0xb59f[202]][_0xb59f[253]]=null;mxCellState[_0xb59f[202]][_0xb59f[963]]=null;mxCellState[_0xb59f[202]][_0xb59f[2087]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2=_0x6b6cx2||0;_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3: new mxRectangle(this[_0xb59f[235]],this[_0xb59f[236]],this[_0xb59f[117]],this[_0xb59f[119]]);if(null!=this[_0xb59f[253]]&&null!=this[_0xb59f[253]][_0xb59f[1561]]){var _0x6b6cx4=this[_0xb59f[253]][_0xb59f[1561]][_0xb59f[1548]](this[_0xb59f[124]],_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]],_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]]);_0x6b6cx3[_0xb59f[235]]=_0x6b6cx4[_0xb59f[235]];_0x6b6cx3[_0xb59f[236]]=_0x6b6cx4[_0xb59f[236]];_0x6b6cx3[_0xb59f[117]]=this[_0xb59f[253]][_0xb59f[1561]][_0xb59f[1532]]*_0x6b6cx4[_0xb59f[117]];_0x6b6cx3[_0xb59f[119]]=this[_0xb59f[253]][_0xb59f[1561]][_0xb59f[1533]]*_0x6b6cx4[_0xb59f[119]]};0!=_0x6b6cx2&&_0x6b6cx3[_0xb59f[244]](_0x6b6cx2);return _0x6b6cx3};mxCellState[_0xb59f[202]][_0xb59f[2088]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3?(null==this[_0xb59f[439]]&&(this[_0xb59f[439]]=[]),0==this[_0xb59f[439]][_0xb59f[67]]?this[_0xb59f[439]][_0xb59f[207]](_0x6b6cx2):this[_0xb59f[439]][0]=_0x6b6cx2):null==this[_0xb59f[439]]?(this[_0xb59f[439]]=[],this[_0xb59f[439]][_0xb59f[207]](null),this[_0xb59f[439]][_0xb59f[207]](_0x6b6cx2)):1==this[_0xb59f[439]][_0xb59f[67]]?this[_0xb59f[439]][_0xb59f[207]](_0x6b6cx2):this[_0xb59f[439]][this[_0xb59f[439]][_0xb59f[67]]-1]=_0x6b6cx2};mxCellState[_0xb59f[202]][_0xb59f[1609]]=function(_0x6b6cx2){null!=this[_0xb59f[253]]&&this[_0xb59f[253]][_0xb59f[1609]](_0x6b6cx2);null!=this[_0xb59f[963]]&&this[_0xb59f[963]][_0xb59f[1609]](_0x6b6cx2)};mxCellState[_0xb59f[202]][_0xb59f[1710]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[2089]](_0x6b6cx2);return null!=_0x6b6cx2?_0x6b6cx2[_0xb59f[246]]:null};mxCellState[_0xb59f[202]][_0xb59f[2089]]=function(_0x6b6cx2){return _0x6b6cx2?this[_0xb59f[2083]]:this[_0xb59f[2084]]};mxCellState[_0xb59f[202]][_0xb59f[2090]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3?this[_0xb59f[2083]]=_0x6b6cx2:this[_0xb59f[2084]]=_0x6b6cx2};mxCellState[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[441]][_0xb59f[1179]][_0xb59f[259]][_0xb59f[515]](this)};mxCellState[_0xb59f[202]][_0xb59f[238]]=function(){var _0x6b6cx2= new mxCellState(this[_0xb59f[441]],this[_0xb59f[246]],this[_0xb59f[124]]);if(null!=this[_0xb59f[439]]){_0x6b6cx2[_0xb59f[439]]=[];for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[439]][_0xb59f[67]];_0x6b6cx3++){_0x6b6cx2[_0xb59f[439]][_0x6b6cx3]=this[_0xb59f[439]][_0x6b6cx3][_0xb59f[238]]()}};null!=this[_0xb59f[2078]]&&(_0x6b6cx2[_0xb59f[2078]]=this[_0xb59f[2078]][_0xb59f[238]]());null!=this[_0xb59f[2079]]&&(_0x6b6cx2[_0xb59f[2079]]=this[_0xb59f[2079]][_0xb59f[238]]());null!=this[_0xb59f[1563]]&&(_0x6b6cx2[_0xb59f[1563]]=this[_0xb59f[1563]][_0xb59f[238]]());_0x6b6cx2[_0xb59f[2085]]=this[_0xb59f[2085]];_0x6b6cx2[_0xb59f[2086]]=this[_0xb59f[2086]];_0x6b6cx2[_0xb59f[67]]=this[_0xb59f[67]];_0x6b6cx2[_0xb59f[235]]=this[_0xb59f[235]];_0x6b6cx2[_0xb59f[236]]=this[_0xb59f[236]];_0x6b6cx2[_0xb59f[117]]=this[_0xb59f[117]];_0x6b6cx2[_0xb59f[119]]=this[_0xb59f[119]];return _0x6b6cx2};function mxGraphSelectionModel(_0x6b6cx2){this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[895]]=[]}mxGraphSelectionModel[_0xb59f[202]]= new mxEventSource;mxGraphSelectionModel[_0xb59f[202]][_0xb59f[196]]=mxGraphSelectionModel;mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2091]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[819]:_0xb59f[110];mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2092]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[2093]:_0xb59f[110];mxGraphSelectionModel[_0xb59f[202]][_0xb59f[1179]]=null;mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2094]]= !1;mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2095]]=function(){return this[_0xb59f[2094]]};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2096]]=function(_0x6b6cx2){this[_0xb59f[2094]]=_0x6b6cx2};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2097]]=function(_0x6b6cx2){return null!=_0x6b6cx2?0<=mxUtils[_0xb59f[2]](this[_0xb59f[895]],_0x6b6cx2):!1};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[1107]]=function(){return 0==this[_0xb59f[895]][_0xb59f[67]]};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[200]]=function(){this[_0xb59f[2098]](null,this[_0xb59f[895]])};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2099]]=function(_0x6b6cx2){null!=_0x6b6cx2&&this[_0xb59f[2100]]([_0x6b6cx2])};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2100]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){this[_0xb59f[2094]]&&(_0x6b6cx2=[this[_0xb59f[2101]](_0x6b6cx2)]);for(var _0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[1179]][_0xb59f[2102]](_0x6b6cx2[_0x6b6cx4])&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0x6b6cx4])};this[_0xb59f[2098]](_0x6b6cx3,this[_0xb59f[895]])}};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2101]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3++){if(this[_0xb59f[1179]][_0xb59f[2102]](_0x6b6cx2[_0x6b6cx3])){return _0x6b6cx2[_0x6b6cx3]}}};return null};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2103]]=function(_0x6b6cx2){null!=_0x6b6cx2&&this[_0xb59f[832]]([_0x6b6cx2])};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[832]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=null;this[_0xb59f[2094]]&&(_0x6b6cx3=this[_0xb59f[895]],_0x6b6cx2=[this[_0xb59f[2101]](_0x6b6cx2)]);for(var _0x6b6cx4=[],_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){!this[_0xb59f[2097]](_0x6b6cx2[_0x6b6cx5])&&this[_0xb59f[1179]][_0xb59f[2102]](_0x6b6cx2[_0x6b6cx5])&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx2[_0x6b6cx5])};this[_0xb59f[2098]](_0x6b6cx4,_0x6b6cx3)}};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2104]]=function(_0x6b6cx2){null!=_0x6b6cx2&&this[_0xb59f[842]]([_0x6b6cx2])};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[842]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){for(var _0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[2097]](_0x6b6cx2[_0x6b6cx4])&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0x6b6cx4])};this[_0xb59f[2098]](null,_0x6b6cx3)}};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[2098]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]&&null!=_0x6b6cx2[0]||null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]&&null!=_0x6b6cx3[0]){var _0x6b6cx4= new mxSelectionChange(this,_0x6b6cx2,_0x6b6cx3);_0x6b6cx4[_0xb59f[350]]();var _0x6b6cx5= new mxUndoableEdit(this,!1);_0x6b6cx5[_0xb59f[99]](_0x6b6cx4);this[_0xb59f[746]]( new mxEventObject(mxEvent.UNDO,_0xb59f[1061],_0x6b6cx5))}};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[1941]]=function(_0x6b6cx2){null!=_0x6b6cx2&&!this[_0xb59f[2097]](_0x6b6cx2)&&this[_0xb59f[895]][_0xb59f[207]](_0x6b6cx2)};mxGraphSelectionModel[_0xb59f[202]][_0xb59f[1102]]=function(_0x6b6cx2){null!=_0x6b6cx2&&(_0x6b6cx2=mxUtils[_0xb59f[2]](this[_0xb59f[895]],_0x6b6cx2),0<=_0x6b6cx2&&this[_0xb59f[895]][_0xb59f[300]](_0x6b6cx2,1))};function mxSelectionChange(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[2105]]=_0x6b6cx2;this[_0xb59f[2106]]=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[1853]]():null;this[_0xb59f[2107]]=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[1853]]():null}mxSelectionChange[_0xb59f[202]][_0xb59f[350]]=function(){var _0x6b6cx2=mxLog[_0xb59f[2109]](_0xb59f[2108]);window[_0xb59f[879]]=mxResources[_0xb59f[203]](this[_0xb59f[2105]][_0xb59f[2092]])||this[_0xb59f[2105]][_0xb59f[2092]];if(null!=this[_0xb59f[2107]]){for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[2107]][_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[2105]][_0xb59f[1102]](this[_0xb59f[2107]][_0x6b6cx3])}};if(null!=this[_0xb59f[2106]]){for(_0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[2106]][_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[2105]][_0xb59f[1941]](this[_0xb59f[2106]][_0x6b6cx3])}};_0x6b6cx3=this[_0xb59f[2106]];this[_0xb59f[2106]]=this[_0xb59f[2107]];this[_0xb59f[2107]]=_0x6b6cx3;window[_0xb59f[879]]=mxResources[_0xb59f[203]](this[_0xb59f[2105]][_0xb59f[2091]])||this[_0xb59f[2105]][_0xb59f[2091]];mxLog[_0xb59f[2110]](_0xb59f[2108],_0x6b6cx2);this[_0xb59f[2105]][_0xb59f[746]]( new mxEventObject(mxEvent.CHANGE,_0xb59f[2106],this[_0xb59f[2106]],_0xb59f[2107],this[_0xb59f[2107]]))};function mxCellEditor(_0x6b6cx2){this[_0xb59f[1179]]=_0x6b6cx2}mxCellEditor[_0xb59f[202]][_0xb59f[1179]]=null;mxCellEditor[_0xb59f[202]][_0xb59f[126]]=null;mxCellEditor[_0xb59f[202]][_0xb59f[2111]]=null;mxCellEditor[_0xb59f[202]][_0xb59f[2112]]=null;mxCellEditor[_0xb59f[202]][_0xb59f[2113]]= !1;mxCellEditor[_0xb59f[202]][_0xb59f[2114]]= !0;mxCellEditor[_0xb59f[202]][_0xb59f[2115]]=_0xb59f[110];mxCellEditor[_0xb59f[202]][_0xb59f[2116]]=_0xb59f[110];mxCellEditor[_0xb59f[202]][_0xb59f[176]]=function(){this[_0xb59f[126]]=document[_0xb59f[55]](_0xb59f[126]);this[_0xb59f[126]][_0xb59f[926]]=_0xb59f[2117];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[277]]=_0xb59f[189];this[_0xb59f[126]][_0xb59f[57]](_0xb59f[2118],_0xb59f[2119]);this[_0xb59f[126]][_0xb59f[57]](_0xb59f[969],_0xb59f[2120]);mxClient[_0xb59f[133]]&&(this[_0xb59f[126]][_0xb59f[124]][_0xb59f[129]]=_0xb59f[130]);mxEvent[_0xb59f[169]](this[_0xb59f[126]],_0xb59f[2121],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2122]]()}));mxEvent[_0xb59f[169]](this[_0xb59f[126]],_0xb59f[2123],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){mxEvent[_0xb59f[721]](_0x6b6cx2)||(113==_0x6b6cx2[_0xb59f[2124]]||this[_0xb59f[1179]][_0xb59f[2125]]()&&13==_0x6b6cx2[_0xb59f[2124]]&&!mxEvent[_0xb59f[775]](_0x6b6cx2)&&!mxEvent[_0xb59f[774]](_0x6b6cx2)?(this[_0xb59f[1179]][_0xb59f[2126]](!1),mxEvent[_0xb59f[722]](_0x6b6cx2)):27==_0x6b6cx2[_0xb59f[2124]]?(this[_0xb59f[1179]][_0xb59f[2126]](!0),mxEvent[_0xb59f[722]](_0x6b6cx2)):(this[_0xb59f[2127]]&&(this[_0xb59f[2127]]= !1,this[_0xb59f[126]][_0xb59f[131]]=_0xb59f[110]),this[_0xb59f[2128]](!0)))}));mxEvent[_0xb59f[169]](this[_0xb59f[126]],_0xb59f[2129],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2114]]&&!mxEvent[_0xb59f[721]](_0x6b6cx2)&&setTimeout(mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[129]]()}),0)}))};mxCellEditor[_0xb59f[202]][_0xb59f[129]]=function(){if(null!=this[_0xb59f[1653]]){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](this[_0xb59f[2111]]),_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[2130]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[2131]](_0x6b6cx2[_0xb59f[246]]);if(this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]])){this[_0xb59f[1562]][_0xb59f[235]]=_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]],this[_0xb59f[1562]][_0xb59f[236]]=_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]],this[_0xb59f[1562]][_0xb59f[117]]=0,this[_0xb59f[1562]][_0xb59f[119]]=0}else {if(null!=this[_0xb59f[1562]]){this[_0xb59f[1562]][_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]];this[_0xb59f[1562]][_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]];this[_0xb59f[1562]][_0xb59f[117]]=_0x6b6cx2[_0xb59f[117]];this[_0xb59f[1562]][_0xb59f[119]]=_0x6b6cx2[_0xb59f[119]];var _0x6b6cx5=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);_0x6b6cx5==mxConstants[_0xb59f[2132]]?this[_0xb59f[1562]][_0xb59f[235]]-=_0x6b6cx2[_0xb59f[117]]:_0x6b6cx5==mxConstants[_0xb59f[480]]&&(this[_0xb59f[1562]][_0xb59f[235]]+=_0x6b6cx2[_0xb59f[117]]);_0x6b6cx5=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);_0x6b6cx5==mxConstants[_0xb59f[1687]]?this[_0xb59f[1562]][_0xb59f[236]]-=_0x6b6cx2[_0xb59f[119]]:_0x6b6cx5==mxConstants[_0xb59f[482]]&&(this[_0xb59f[1562]][_0xb59f[236]]+=_0x6b6cx2[_0xb59f[119]])}};_0x6b6cx5=this[_0xb59f[126]][_0xb59f[131]];if(_0xb59f[192]==_0x6b6cx5[_0xb59f[225]](_0x6b6cx5[_0xb59f[67]]-1)||_0xb59f[110]==_0x6b6cx5){_0x6b6cx5+=_0xb59f[544]};_0x6b6cx5=mxUtils[_0xb59f[321]](_0x6b6cx5,!1);_0x6b6cx4?(this[_0xb59f[1653]][_0xb59f[124]][_0xb59f[493]]=_0xb59f[1502],this[_0xb59f[1653]][_0xb59f[124]][_0xb59f[117]]=this[_0xb59f[1562]][_0xb59f[117]]+_0xb59f[168]):_0x6b6cx5=_0x6b6cx5[_0xb59f[230]](/ /g,_0xb59f[544]);_0x6b6cx5=_0x6b6cx5[_0xb59f[230]](/\n/g,_0xb59f[1453]);this[_0xb59f[1653]][_0xb59f[339]]=_0x6b6cx5;var _0x6b6cx5=this[_0xb59f[1653]][_0xb59f[359]]+30,_0x6b6cx9=this[_0xb59f[1653]][_0xb59f[167]]+16,_0x6b6cx5=Math[_0xb59f[160]](_0x6b6cx5,40),_0x6b6cx9=Math[_0xb59f[160]](_0x6b6cx9,20);_0x6b6cx3&&(_0x6b6cx5=Math[_0xb59f[243]](this[_0xb59f[1562]][_0xb59f[117]]-4,_0x6b6cx5),_0x6b6cx9=Math[_0xb59f[243]](this[_0xb59f[1562]][_0xb59f[119]],_0x6b6cx9));var _0x6b6cxa=null!=_0x6b6cx2[_0xb59f[963]]?_0x6b6cx2[_0xb59f[963]][_0xb59f[1655]]:null;null==_0x6b6cxa&&(_0x6b6cxa=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),_0x6b6cx2=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x6b6cxa=mxUtils[_0xb59f[1501]](_0x6b6cxa,_0x6b6cx2));if(null!=_0x6b6cxa){if(_0x6b6cx3|| !_0x6b6cx4){this[_0xb59f[126]][_0xb59f[124]][_0xb59f[361]]=Math[_0xb59f[160]](0,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[235]]-_0x6b6cxa[_0xb59f[235]]*this[_0xb59f[1562]][_0xb59f[117]]+_0x6b6cxa[_0xb59f[235]]*_0x6b6cx5)-3)+_0xb59f[168]};this[_0xb59f[126]][_0xb59f[124]][_0xb59f[125]]=Math[_0xb59f[160]](0,Math[_0xb59f[488]](this[_0xb59f[1562]][_0xb59f[236]]-_0x6b6cxa[_0xb59f[236]]*this[_0xb59f[1562]][_0xb59f[119]]+_0x6b6cxa[_0xb59f[236]]*_0x6b6cx9)+4)+_0xb59f[168]};if(_0x6b6cx3|| !_0x6b6cx4){this[_0xb59f[126]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx5+_0xb59f[168]};this[_0xb59f[126]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx9+_0xb59f[168]}};mxCellEditor[_0xb59f[202]][_0xb59f[2133]]=function(){return this[_0xb59f[2113]]};mxCellEditor[_0xb59f[202]][_0xb59f[2128]]=function(_0x6b6cx2){this[_0xb59f[2113]]=_0x6b6cx2};mxCellEditor[_0xb59f[202]][_0xb59f[2122]]=function(){this[_0xb59f[2126]](!this[_0xb59f[1179]][_0xb59f[2134]]())};mxCellEditor[_0xb59f[202]][_0xb59f[855]]=function(_0x6b6cx2,_0x6b6cx3){null==this[_0xb59f[126]]&&this[_0xb59f[176]]();this[_0xb59f[2126]](!0);var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);if(null!=_0x6b6cx4){this[_0xb59f[2111]]=_0x6b6cx2;this[_0xb59f[2112]]=_0x6b6cx3;this[_0xb59f[2116]]=null;null!=_0x6b6cx4[_0xb59f[963]]&&this[_0xb59f[2135]](_0x6b6cx4)&&(this[_0xb59f[2116]]=_0x6b6cx4[_0xb59f[963]][_0xb59f[252]],this[_0xb59f[2116]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188]);var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx5=mxUtils[_0xb59f[433]](_0x6b6cx4[_0xb59f[124]],mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*_0x6b6cx5,_0x6b6cx9=mxUtils[_0xb59f[433]](_0x6b6cx4[_0xb59f[124]],mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),_0x6b6cxa=mxUtils[_0xb59f[433]](_0x6b6cx4[_0xb59f[124]],mxConstants.STYLE_FONTCOLOR,_0xb59f[586]),_0x6b6cx12=mxUtils[_0xb59f[433]](_0x6b6cx4[_0xb59f[124]],mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),_0x6b6cx13=(mxUtils[_0xb59f[433]](_0x6b6cx4[_0xb59f[124]],mxConstants.STYLE_FONTSTYLE,0)&mxConstants[_0xb59f[1410]])==mxConstants[_0xb59f[1410]],_0x6b6cx14=(mxUtils[_0xb59f[433]](_0x6b6cx4[_0xb59f[124]],mxConstants.STYLE_FONTSTYLE,0)&mxConstants[_0xb59f[1412]])==mxConstants[_0xb59f[1412]],_0x6b6cx15=(mxUtils[_0xb59f[433]](_0x6b6cx4[_0xb59f[124]],mxConstants.STYLE_FONTSTYLE,0)&mxConstants[_0xb59f[1414]])==mxConstants[_0xb59f[1414]];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[487]]=Math[_0xb59f[488]](_0x6b6cx5)+_0xb59f[168];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[489]]=Math[_0xb59f[488]](_0x6b6cx5*mxConstants[_0xb59f[490]])+_0xb59f[168];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[486]]=_0x6b6cx9;this[_0xb59f[126]][_0xb59f[124]][_0xb59f[1165]]=_0x6b6cx12;this[_0xb59f[126]][_0xb59f[124]][_0xb59f[352]]=_0x6b6cxa;this[_0xb59f[126]][_0xb59f[124]][_0xb59f[1452]]=_0x6b6cx13?_0xb59f[1447]:_0xb59f[1502];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[666]]=_0x6b6cx14?_0xb59f[1449]:_0xb59f[110];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[354]]=_0x6b6cx15?_0xb59f[355]:_0xb59f[110];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[277]]=_0xb59f[278];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[2136]]=_0xb59f[130];this[_0xb59f[1562]]=_0x6b6cx5=this[_0xb59f[2137]](_0x6b6cx4);this[_0xb59f[126]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx5[_0xb59f[235]]+_0xb59f[168];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx5[_0xb59f[236]]+_0xb59f[168];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[117]]=_0x6b6cx5[_0xb59f[117]]+_0xb59f[168];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx5[_0xb59f[119]]+_0xb59f[168];this[_0xb59f[126]][_0xb59f[124]][_0xb59f[931]]=5;_0x6b6cx4=this[_0xb59f[2138]](_0x6b6cx4,_0x6b6cx3);null==_0x6b6cx4||0==_0x6b6cx4[_0xb59f[67]]?(_0x6b6cx4=this[_0xb59f[2139]](),this[_0xb59f[2127]]= !0):this[_0xb59f[2127]]= !1;this[_0xb59f[2128]](!1);this[_0xb59f[126]][_0xb59f[131]]=_0x6b6cx4;this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[62]](this[_0xb59f[126]]);_0xb59f[130]!=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[495]]&&(this[_0xb59f[2114]]&&(this[_0xb59f[1653]]=this[_0xb59f[2140]](),document[_0xb59f[112]][_0xb59f[62]](this[_0xb59f[1653]]),this[_0xb59f[129]]()),this[_0xb59f[126]][_0xb59f[393]](),this[_0xb59f[126]][_0xb59f[804]]())}};mxCellEditor[_0xb59f[202]][_0xb59f[2140]]=function(){var _0x6b6cx2=document[_0xb59f[55]](_0xb59f[485]),_0x6b6cx3=_0x6b6cx2[_0xb59f[124]];_0x6b6cx3[_0xb59f[491]]=_0xb59f[492];_0x6b6cx3[_0xb59f[493]]=_0xb59f[494];_0x6b6cx3[_0xb59f[187]]=_0xb59f[188];_0x6b6cx3[_0xb59f[495]]=mxClient[_0xb59f[496]]?_0xb59f[497]:_0xb59f[498];_0x6b6cx3[_0xb59f[499]]=_0xb59f[500];_0x6b6cx3[_0xb59f[123]]=_0xb59f[125];_0x6b6cx3[_0xb59f[489]]=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[489]];_0x6b6cx3[_0xb59f[487]]=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[487]];_0x6b6cx3[_0xb59f[486]]=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[486]];_0x6b6cx3[_0xb59f[1452]]=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[1452]];_0x6b6cx3[_0xb59f[1165]]=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[1165]];_0x6b6cx3[_0xb59f[666]]=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[666]];_0x6b6cx3[_0xb59f[354]]=this[_0xb59f[126]][_0xb59f[124]][_0xb59f[354]];return _0x6b6cx2};mxCellEditor[_0xb59f[202]][_0xb59f[2126]]=function(_0x6b6cx2){null!=this[_0xb59f[2111]]&&(null!=this[_0xb59f[2116]]&&(this[_0xb59f[2116]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189],this[_0xb59f[2116]]=null),!_0x6b6cx2&&this[_0xb59f[2133]]()&&this[_0xb59f[1179]][_0xb59f[850]](this[_0xb59f[2111]],this[_0xb59f[2141]](),this[_0xb59f[2112]]),null!=this[_0xb59f[1653]]&&(document[_0xb59f[112]][_0xb59f[266]](this[_0xb59f[1653]]),this[_0xb59f[1653]]=null),this[_0xb59f[1562]]=this[_0xb59f[2112]]=this[_0xb59f[2111]]=null,this[_0xb59f[126]][_0xb59f[2121]](),this[_0xb59f[126]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[126]]))};mxCellEditor[_0xb59f[202]][_0xb59f[2138]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[1179]][_0xb59f[2142]](_0x6b6cx2[_0xb59f[246]],_0x6b6cx3)};mxCellEditor[_0xb59f[202]][_0xb59f[2141]]=function(){return this[_0xb59f[126]][_0xb59f[131]][_0xb59f[230]](/\r/g,_0xb59f[110])};mxCellEditor[_0xb59f[202]][_0xb59f[2135]]=function(_0x6b6cx2){return !0};mxCellEditor[_0xb59f[202]][_0xb59f[939]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]];return  new mxRectangle(0,0,null==_0x6b6cx2[_0xb59f[963]]?30:_0x6b6cx2[_0xb59f[963]][_0xb59f[803]]*_0x6b6cx3+20,_0xb59f[361]==this[_0xb59f[126]][_0xb59f[124]][_0xb59f[1165]]?120:40)};mxCellEditor[_0xb59f[202]][_0xb59f[2137]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx5=this[_0xb59f[939]](_0x6b6cx2),_0x6b6cx9=_0x6b6cx5[_0xb59f[117]],_0x6b6cx5=_0x6b6cx5[_0xb59f[119]],_0x6b6cxa=parseInt(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2143]]]||2)*_0x6b6cx4,_0x6b6cx12=parseInt(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2144]]]||0)*_0x6b6cx4+_0x6b6cxa,_0x6b6cx13=parseInt(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2145]]]||0)*_0x6b6cx4+_0x6b6cxa,_0x6b6cx14=parseInt(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2146]]]||0)*_0x6b6cx4+_0x6b6cxa,_0x6b6cx4=parseInt(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2147]]]||0)*_0x6b6cx4+_0x6b6cxa,_0x6b6cx13= new mxRectangle(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],Math[_0xb59f[160]](_0x6b6cx9,_0x6b6cx2[_0xb59f[117]]-_0x6b6cx4-_0x6b6cx13),Math[_0xb59f[160]](_0x6b6cx5,_0x6b6cx2[_0xb59f[119]]-_0x6b6cx12-_0x6b6cx14));_0x6b6cx3?(_0x6b6cx13[_0xb59f[235]]=_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]],_0x6b6cx13[_0xb59f[236]]=_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]],null!=_0x6b6cx2[_0xb59f[963]]&&null!=_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]]&&(0<_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[235]]&&(_0x6b6cx13[_0xb59f[235]]=_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[235]]),0<_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[236]]&&(_0x6b6cx13[_0xb59f[236]]=_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[236]]))):null!=_0x6b6cx2[_0xb59f[963]]&&null!=_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]]&&(_0x6b6cx13[_0xb59f[235]]=Math[_0xb59f[243]](_0x6b6cx13[_0xb59f[235]],_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[235]]),_0x6b6cx13[_0xb59f[236]]=Math[_0xb59f[243]](_0x6b6cx13[_0xb59f[236]],_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[236]]));_0x6b6cx13[_0xb59f[235]]+=_0x6b6cx4;_0x6b6cx13[_0xb59f[236]]+=_0x6b6cx12;null!=_0x6b6cx2[_0xb59f[963]]&&null!=_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]]&&(_0x6b6cx3?(_0x6b6cx13[_0xb59f[117]]=Math[_0xb59f[160]](_0x6b6cx9,_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[117]]),_0x6b6cx13[_0xb59f[119]]=Math[_0xb59f[160]](_0x6b6cx5,_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[119]])):(_0x6b6cx13[_0xb59f[117]]=Math[_0xb59f[160]](_0x6b6cx13[_0xb59f[117]],_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[117]]),_0x6b6cx13[_0xb59f[119]]=Math[_0xb59f[160]](_0x6b6cx13[_0xb59f[119]],_0x6b6cx2[_0xb59f[963]][_0xb59f[1563]][_0xb59f[119]])));this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx2[_0xb59f[246]])&&(_0x6b6cx3=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),_0x6b6cx3==mxConstants[_0xb59f[2132]]?_0x6b6cx13[_0xb59f[235]]-=_0x6b6cx2[_0xb59f[117]]:_0x6b6cx3==mxConstants[_0xb59f[480]]&&(_0x6b6cx13[_0xb59f[235]]+=_0x6b6cx2[_0xb59f[117]]),_0x6b6cx3=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),_0x6b6cx3==mxConstants[_0xb59f[1687]]?_0x6b6cx13[_0xb59f[236]]-=_0x6b6cx2[_0xb59f[119]]:_0x6b6cx3==mxConstants[_0xb59f[482]]&&(_0x6b6cx13[_0xb59f[236]]+=_0x6b6cx2[_0xb59f[119]]));return _0x6b6cx13};mxCellEditor[_0xb59f[202]][_0xb59f[2139]]=function(_0x6b6cx2){return this[_0xb59f[2115]]};mxCellEditor[_0xb59f[202]][_0xb59f[2148]]=function(){return this[_0xb59f[2111]]};mxCellEditor[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[126]]&&(mxEvent[_0xb59f[762]](this[_0xb59f[126]]),null!=this[_0xb59f[126]][_0xb59f[265]]&&this[_0xb59f[126]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[126]]),this[_0xb59f[126]]=null)};function mxCellRenderer(){}mxCellRenderer[_0xb59f[202]][_0xb59f[2149]]=mxConnector;mxCellRenderer[_0xb59f[202]][_0xb59f[2150]]=mxRectangleShape;mxCellRenderer[_0xb59f[202]][_0xb59f[2151]]=mxText;mxCellRenderer[_0xb59f[202]][_0xb59f[2152]]= !0;mxCellRenderer[_0xb59f[202]][_0xb59f[2153]]={};mxCellRenderer[_0xb59f[2154]]=function(_0x6b6cx2,_0x6b6cx3){mxCellRenderer[_0xb59f[202]][_0xb59f[2153]][_0x6b6cx2]=_0x6b6cx3};mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_CYLINDER,mxCylinder);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_LINE,mxLine);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_ARROW,mxArrow);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer[_0xb59f[2154]](mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer[_0xb59f[202]][_0xb59f[2155]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]();if(null!=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[526]]&&null==_0x6b6cx2[_0xb59f[253]]&&_0x6b6cx2[_0xb59f[246]]!=_0x6b6cx2[_0xb59f[441]][_0xb59f[1741]]&&(_0x6b6cx4[_0xb59f[1193]](_0x6b6cx2[_0xb59f[246]])||_0x6b6cx4[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]))){if(this[_0xb59f[2156]](_0x6b6cx2),null!=_0x6b6cx2[_0xb59f[253]]&&(null==_0x6b6cx3||_0x6b6cx3)){this[_0xb59f[2157]](_0x6b6cx2),_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2158]]||_0x6b6cx4[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]])?_0x6b6cx2[_0xb59f[2081]]= !0:_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2159]]&&null!=this[_0xb59f[2160]]&&(this[_0xb59f[2160]][_0xb59f[265]]==_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]]?this[_0xb59f[2161]](_0x6b6cx2,this[_0xb59f[2160]]):this[_0xb59f[2160]]=null),_0x6b6cx2[_0xb59f[253]][_0xb59f[255]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],this[_0xb59f[2162]](_0x6b6cx2),this[_0xb59f[2163]](_0x6b6cx2)}}};mxCellRenderer[_0xb59f[202]][_0xb59f[2157]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[253]][_0xb59f[176]](_0x6b6cx2[_0xb59f[441]][_0xb59f[2024]]())};mxCellRenderer[_0xb59f[202]][_0xb59f[2164]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=null,_0x6b6cx5=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cx9=_0x6b6cx5[_0xb59f[502]](),_0x6b6cxa=_0x6b6cx2[_0xb59f[246]],_0x6b6cx12=_0x6b6cx9[_0xb59f[1197]](_0x6b6cxa);null!=_0x6b6cx12&&null==_0x6b6cx4;){_0x6b6cx4=this[_0xb59f[2165]](_0x6b6cx5,_0x6b6cx12,_0x6b6cxa,_0x6b6cx3),_0x6b6cxa=_0x6b6cx12,_0x6b6cx12=_0x6b6cx9[_0xb59f[1197]](_0x6b6cxa)};return _0x6b6cx4};mxCellRenderer[_0xb59f[202]][_0xb59f[2165]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=null,_0x6b6cxa=_0x6b6cx2[_0xb59f[502]]();for(_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx3[_0xb59f[1738]](_0x6b6cx4)-1:_0x6b6cxa[_0xb59f[262]](_0x6b6cx3)-1;0<=_0x6b6cx4&&null==_0x6b6cx9;_0x6b6cx4--){_0x6b6cx9=this[_0xb59f[2165]](_0x6b6cx2,_0x6b6cxa[_0xb59f[263]](_0x6b6cx3,_0x6b6cx4),null,_0x6b6cx5)};if(null==_0x6b6cx9&&(_0x6b6cx9=_0x6b6cx2[_0xb59f[441]][_0xb59f[248]](_0x6b6cx3),null!=_0x6b6cx9&&(null==_0x6b6cx9[_0xb59f[253]]||null==_0x6b6cx9[_0xb59f[253]][_0xb59f[252]]||_0x6b6cx9[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]]!=_0x6b6cx5))){_0x6b6cx9=null};return _0x6b6cx9};mxCellRenderer[_0xb59f[202]][_0xb59f[2166]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]],_0x6b6cx4=this[_0xb59f[2164]](_0x6b6cx2,_0x6b6cx3),_0x6b6cx5=_0x6b6cx3[_0xb59f[285]];null!=_0x6b6cx4&&(_0x6b6cx5=_0x6b6cx4[_0xb59f[253]][_0xb59f[252]],null!=_0x6b6cx4[_0xb59f[963]]&&(null!=_0x6b6cx4[_0xb59f[963]][_0xb59f[252]]&&_0x6b6cx4[_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==_0x6b6cx3)&&(_0x6b6cx5=_0x6b6cx4[_0xb59f[963]][_0xb59f[252]]),_0x6b6cx5=_0x6b6cx5[_0xb59f[287]]);this[_0xb59f[2161]](_0x6b6cx2,_0x6b6cx5)};mxCellRenderer[_0xb59f[202]][_0xb59f[2167]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[441]],_0x6b6cx4=_0x6b6cx3[_0xb59f[1179]][_0xb59f[502]]();if(_0x6b6cx3[_0xb59f[1179]][_0xb59f[2159]]){if(null==this[_0xb59f[2160]]||null==this[_0xb59f[2160]][_0xb59f[265]]||this[_0xb59f[2160]][_0xb59f[265]]!=_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]]){this[_0xb59f[2160]]=_0x6b6cx2[_0xb59f[253]][_0xb59f[252]]}}else {if(_0x6b6cx3[_0xb59f[1179]][_0xb59f[2168]]){var _0x6b6cx5=_0x6b6cx2[_0xb59f[253]][_0xb59f[252]],_0x6b6cx9=_0x6b6cx5[_0xb59f[265]],_0x6b6cx4=_0x6b6cx4[_0xb59f[1197]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx3=_0x6b6cx3[_0xb59f[248]](_0x6b6cx4),_0x6b6cx9=null!=_0x6b6cx3&&null!=_0x6b6cx3[_0xb59f[253]]&&null!=_0x6b6cx3[_0xb59f[253]][_0xb59f[252]]?_0x6b6cx3[_0xb59f[253]][_0xb59f[252]][_0xb59f[287]]:_0x6b6cx9[_0xb59f[285]];null!=_0x6b6cx9&&_0x6b6cx9!=_0x6b6cx5&&this[_0xb59f[2161]](_0x6b6cx2,_0x6b6cx9)}}};mxCellRenderer[_0xb59f[202]][_0xb59f[2161]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]][_0xb59f[950]](_0x6b6cx2[_0xb59f[253]][_0xb59f[252]],_0x6b6cx3);null!=_0x6b6cx2[_0xb59f[963]]&&(null!=_0x6b6cx2[_0xb59f[963]][_0xb59f[252]]&&_0x6b6cx2[_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]])&&_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]][_0xb59f[950]](_0x6b6cx2[_0xb59f[963]][_0xb59f[252]],_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[287]])};mxCellRenderer[_0xb59f[202]][_0xb59f[2156]]=function(_0x6b6cx2){if(null!=_0x6b6cx2[_0xb59f[124]]){var _0x6b6cx3=mxStencilRegistry[_0xb59f[1560]](_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2059]]]);null!=_0x6b6cx3?_0x6b6cx2[_0xb59f[253]]= new mxShape(_0x6b6cx3):(_0x6b6cx3=this[_0xb59f[2169]](_0x6b6cx2),_0x6b6cx2[_0xb59f[253]]= new _0x6b6cx3);_0x6b6cx2[_0xb59f[253]][_0xb59f[1525]]=_0x6b6cx2[_0xb59f[439]];_0x6b6cx2[_0xb59f[253]][_0xb59f[1562]]= new mxRectangle(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],_0x6b6cx2[_0xb59f[117]],_0x6b6cx2[_0xb59f[119]]);_0x6b6cx2[_0xb59f[253]][_0xb59f[507]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[507]];this[_0xb59f[2170]](_0x6b6cx2)}};mxCellRenderer[_0xb59f[202]][_0xb59f[2171]]=function(_0x6b6cx2){return null!=_0x6b6cx2?mxCellRenderer[_0xb59f[202]][_0xb59f[2153]][_0x6b6cx2]:null};mxCellRenderer[_0xb59f[202]][_0xb59f[2169]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[2171]](_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2059]]]);null==_0x6b6cx3&&(_0x6b6cx3=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]])?this[_0xb59f[2149]]:this[_0xb59f[2150]]);return _0x6b6cx3};mxCellRenderer[_0xb59f[202]][_0xb59f[2170]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[253]][_0xb59f[183]](_0x6b6cx2);_0x6b6cx2[_0xb59f[253]][_0xb59f[618]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[1202]](_0x6b6cx2);_0x6b6cx2[_0xb59f[253]][_0xb59f[630]]=this[_0xb59f[2171]](_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2172]](_0x6b6cx2));_0x6b6cx2[_0xb59f[253]][_0xb59f[632]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2173]](_0x6b6cx2);_0x6b6cx2[_0xb59f[253]][_0xb59f[634]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2174]](_0x6b6cx2);_0x6b6cx2[_0xb59f[253]][_0xb59f[638]]=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2175]]];_0x6b6cx2[_0xb59f[253]][_0xb59f[631]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2176]](_0x6b6cx2);this[_0xb59f[2177]](_0x6b6cx2)};mxCellRenderer[_0xb59f[202]][_0xb59f[2177]]=function(_0x6b6cx2){null!=_0x6b6cx2[_0xb59f[253]]&&(this[_0xb59f[2178]](_0x6b6cx2,_0xb59f[632],mxConstants.STYLE_FILLCOLOR),this[_0xb59f[2178]](_0x6b6cx2,_0xb59f[634],mxConstants.STYLE_GRADIENTCOLOR),this[_0xb59f[2178]](_0x6b6cx2,_0xb59f[1334],mxConstants.STYLE_FILLCOLOR),this[_0xb59f[2178]](_0x6b6cx2,_0xb59f[1336],mxConstants.STYLE_STROKECOLOR),this[_0xb59f[2178]](_0x6b6cx2,_0xb59f[1299],mxConstants.STYLE_GRADIENTCOLOR))};mxCellRenderer[_0xb59f[202]][_0xb59f[2178]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0xb59f[253]][_0x6b6cx3],_0x6b6cx9=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cxa=null;_0xb59f[1549]==_0x6b6cx5?_0x6b6cxa=_0x6b6cx9[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0xb59f[246]]):_0xb59f[687]==_0x6b6cx5?(_0x6b6cxa=null!=_0x6b6cx9[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2[_0xb59f[246]],!1)?_0x6b6cx9[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2[_0xb59f[246]],!1):_0x6b6cx2[_0xb59f[246]],_0x6b6cxa=_0x6b6cx9[_0xb59f[2179]](_0x6b6cxa),_0x6b6cx4=_0x6b6cx9[_0xb59f[2180]]):_0xb59f[2181]==_0x6b6cx5&&(_0x6b6cx2[_0xb59f[253]][_0x6b6cx3]=_0x6b6cx2[_0xb59f[253]][_0xb59f[632]]);null!=_0x6b6cxa&&(_0x6b6cx5=_0x6b6cx9[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cxa),_0x6b6cx2[_0xb59f[253]][_0x6b6cx3]=null,null!=_0x6b6cx5&&(_0x6b6cx2[_0xb59f[253]][_0x6b6cx3]=null!=_0x6b6cx5[_0xb59f[253]]&&_0xb59f[632]!=_0x6b6cx3?_0x6b6cx5[_0xb59f[253]][_0x6b6cx3]:_0x6b6cx5[_0xb59f[124]][_0x6b6cx4]))};mxCellRenderer[_0xb59f[202]][_0xb59f[2182]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2183]](_0x6b6cx2[_0xb59f[246]])};mxCellRenderer[_0xb59f[202]][_0xb59f[2184]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]];_0x6b6cx4[_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]);if(0<_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2185]]]||null==_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2185]]]){var _0x6b6cx5=_0x6b6cx4[_0xb59f[2186]](_0x6b6cx2[_0xb59f[246]])||null!=_0x6b6cx3&&mxUtils[_0xb59f[1331]](_0x6b6cx3);_0x6b6cx2[_0xb59f[963]]= new this[_0xb59f[2151]](_0x6b6cx3, new mxRectangle,_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2064]]]||mxConstants[_0xb59f[479]],_0x6b6cx4[_0xb59f[2187]](_0x6b6cx2),_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2069]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2188]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2185]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2189]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2143]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2144]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2145]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2146]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2147]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2190]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2191]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2192]]],_0x6b6cx4[_0xb59f[2131]](_0x6b6cx2[_0xb59f[246]])&&_0x6b6cx4[_0xb59f[2186]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx4[_0xb59f[2130]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2193]]],_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2194]]]);_0x6b6cx2[_0xb59f[963]][_0xb59f[461]]=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_TEXT_OPACITY,100);_0x6b6cx2[_0xb59f[963]][_0xb59f[507]]=_0x6b6cx5?mxConstants[_0xb59f[1656]]:_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[507]];_0x6b6cx2[_0xb59f[963]][_0xb59f[724]]=_0x6b6cx2;this[_0xb59f[2195]](_0x6b6cx2);var _0x6b6cx9=!1,_0x6b6cxa=function(_0x6b6cx3){var _0x6b6cx5=_0x6b6cx2;if(mxClient[_0xb59f[754]]||_0x6b6cx9){_0x6b6cx5=mxEvent[_0xb59f[731]](_0x6b6cx3),_0x6b6cx3=mxEvent[_0xb59f[733]](_0x6b6cx3),_0x6b6cx3=mxUtils[_0xb59f[2196]](_0x6b6cx4[_0xb59f[526]],_0x6b6cx5,_0x6b6cx3),_0x6b6cx5=_0x6b6cx4[_0xb59f[441]][_0xb59f[248]](_0x6b6cx4[_0xb59f[999]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]))};return _0x6b6cx5};mxEvent[_0xb59f[759]](_0x6b6cx2[_0xb59f[963]][_0xb59f[252]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){this[_0xb59f[2197]](_0x6b6cx2,_0x6b6cx3)&&(_0x6b6cx4[_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx3,_0x6b6cx2)),_0x6b6cx9=_0x6b6cx4[_0xb59f[507]]!=mxConstants[_0xb59f[508]]&&_0xb59f[2198]==mxEvent[_0xb59f[728]](_0x6b6cx3)[_0xb59f[301]])}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){this[_0xb59f[2197]](_0x6b6cx2,_0x6b6cx3)&&_0x6b6cx4[_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx3,_0x6b6cxa(_0x6b6cx3)))}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){this[_0xb59f[2197]](_0x6b6cx2,_0x6b6cx3)&&(_0x6b6cx4[_0xb59f[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6b6cx3,_0x6b6cxa(_0x6b6cx3))),_0x6b6cx9= !1)}));mxEvent[_0xb59f[169]](_0x6b6cx2[_0xb59f[963]][_0xb59f[252]],_0xb59f[760],mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){this[_0xb59f[2197]](_0x6b6cx2,_0x6b6cx3)&&(_0x6b6cx4[_0xb59f[761]](_0x6b6cx3,_0x6b6cx2[_0xb59f[246]]),mxEvent[_0xb59f[722]](_0x6b6cx3))}))}};mxCellRenderer[_0xb59f[202]][_0xb59f[2195]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]];_0x6b6cx2[_0xb59f[963]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]&&(mxClient[_0xb59f[48]]&&mxClient[_0xb59f[2199]]?_0x6b6cx2[_0xb59f[963]][_0xb59f[176]](_0x6b6cx3[_0xb59f[526]]):mxUtils[_0xb59f[458]](_0x6b6cx2[_0xb59f[441]][_0xb59f[2024]]())&&(null!=_0x6b6cx2[_0xb59f[253]][_0xb59f[685]]?_0x6b6cx2[_0xb59f[963]][_0xb59f[176]](_0x6b6cx2[_0xb59f[253]][_0xb59f[685]]):_0x6b6cx2[_0xb59f[963]][_0xb59f[176]](_0x6b6cx2[_0xb59f[253]][_0xb59f[252]])));null==_0x6b6cx2[_0xb59f[963]][_0xb59f[252]]&&(_0x6b6cx2[_0xb59f[963]][_0xb59f[176]](_0x6b6cx2[_0xb59f[441]][_0xb59f[2024]]()),null!=_0x6b6cx2[_0xb59f[253]]&&null!=_0x6b6cx2[_0xb59f[963]]&&_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]][_0xb59f[950]](_0x6b6cx2[_0xb59f[963]][_0xb59f[252]],_0x6b6cx2[_0xb59f[253]][_0xb59f[252]][_0xb59f[287]]))};mxCellRenderer[_0xb59f[202]][_0xb59f[2162]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2200]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx4=null;if(null!=_0x6b6cx3){for(var _0x6b6cx4= new mxDictionary,_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=null!=_0x6b6cx2[_0xb59f[1211]]?_0x6b6cx2[_0xb59f[1211]][_0xb59f[205]](_0x6b6cx3[_0x6b6cx5]):null;null==_0x6b6cx9&&(_0x6b6cx9= new mxImageShape( new mxRectangle,_0x6b6cx3[_0x6b6cx5][_0xb59f[618]][_0xb59f[390]]),_0x6b6cx9[_0xb59f[507]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[507]],_0x6b6cx9[_0xb59f[1674]]= !1,_0x6b6cx9[_0xb59f[2201]]=_0x6b6cx3[_0x6b6cx5],this[_0xb59f[2023]](_0x6b6cx2,_0x6b6cx9),this[_0xb59f[2202]](_0x6b6cx2,_0x6b6cx3[_0x6b6cx5],_0x6b6cx9),null!=_0x6b6cx3[_0x6b6cx5][_0xb59f[270]]&&(_0x6b6cx9[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=_0x6b6cx3[_0x6b6cx5][_0xb59f[270]]));_0x6b6cx4[_0xb59f[204]](_0x6b6cx3[_0x6b6cx5],_0x6b6cx9)}};null!=_0x6b6cx2[_0xb59f[1211]]&&_0x6b6cx2[_0xb59f[1211]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3[_0xb59f[515]]()});_0x6b6cx2[_0xb59f[1211]]=_0x6b6cx4};mxCellRenderer[_0xb59f[202]][_0xb59f[2023]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3[_0xb59f[176]](_0x6b6cx2[_0xb59f[441]][_0xb59f[1524]]())};mxCellRenderer[_0xb59f[202]][_0xb59f[2202]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]];mxEvent[_0xb59f[169]](_0x6b6cx4[_0xb59f[252]],_0xb59f[173],function(_0x6b6cx4){_0x6b6cx5[_0xb59f[2203]]()&&_0x6b6cx5[_0xb59f[2126]](!_0x6b6cx5[_0xb59f[2134]]());_0x6b6cx3[_0xb59f[746]]( new mxEventObject(mxEvent.CLICK,_0xb59f[763],_0x6b6cx4,_0xb59f[246],_0x6b6cx2[_0xb59f[246]]))});mxEvent[_0xb59f[759]](_0x6b6cx4[_0xb59f[252]],function(_0x6b6cx2){mxEvent[_0xb59f[722]](_0x6b6cx2)},function(_0x6b6cx3){_0x6b6cx5[_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx3,_0x6b6cx2))});mxClient[_0xb59f[754]]&&mxEvent[_0xb59f[169]](_0x6b6cx4[_0xb59f[252]],_0xb59f[757],function(_0x6b6cx4){_0x6b6cx3[_0xb59f[746]]( new mxEventObject(mxEvent.CLICK,_0xb59f[763],_0x6b6cx4,_0xb59f[246],_0x6b6cx2[_0xb59f[246]]))})};mxCellRenderer[_0xb59f[202]][_0xb59f[2204]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cx4=_0x6b6cx3[_0xb59f[2205]](_0x6b6cx2);if(_0x6b6cx3[_0xb59f[2206]]&&null!=_0x6b6cx4){if(null==_0x6b6cx2[_0xb59f[2207]]){var _0x6b6cx5= new mxRectangle(0,0,_0x6b6cx4[_0xb59f[117]],_0x6b6cx4[_0xb59f[119]]);_0x6b6cx2[_0xb59f[2207]]= new mxImageShape(_0x6b6cx5,_0x6b6cx4[_0xb59f[390]]);_0x6b6cx2[_0xb59f[2207]][_0xb59f[1674]]= !1;_0x6b6cx2[_0xb59f[2207]][_0xb59f[507]]=_0x6b6cx3[_0xb59f[507]];this[_0xb59f[2208]](_0x6b6cx2,_0x6b6cx2[_0xb59f[2207]],!0,function(_0x6b6cx4){if(_0x6b6cx3[_0xb59f[994]]()){var _0x6b6cx5=!_0x6b6cx3[_0xb59f[1742]](_0x6b6cx2[_0xb59f[246]]);_0x6b6cx3[_0xb59f[847]](_0x6b6cx5,!1,[_0x6b6cx2[_0xb59f[246]]]);mxEvent[_0xb59f[722]](_0x6b6cx4)}})}}else {null!=_0x6b6cx2[_0xb59f[2207]]&&(_0x6b6cx2[_0xb59f[2207]][_0xb59f[515]](),_0x6b6cx2[_0xb59f[2207]]=null)}};mxCellRenderer[_0xb59f[202]][_0xb59f[2208]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]];_0x6b6cx9[_0xb59f[2186]](_0x6b6cx2[_0xb59f[246]])&&mxClient[_0xb59f[2199]]&&_0x6b6cx9[_0xb59f[507]]==mxConstants[_0xb59f[508]]?(_0x6b6cx3[_0xb59f[507]]=mxConstants[_0xb59f[2209]],_0x6b6cx3[_0xb59f[176]](_0x6b6cx9[_0xb59f[526]]),_0x6b6cx3[_0xb59f[252]][_0xb59f[124]][_0xb59f[931]]=1):_0x6b6cx3[_0xb59f[176]](_0x6b6cx2[_0xb59f[441]][_0xb59f[1524]]());_0x6b6cx3=_0x6b6cx3[_0xb59f[2210]]||_0x6b6cx3[_0xb59f[252]];_0x6b6cx5&&(_0x6b6cx9[_0xb59f[994]]()&&(_0x6b6cx3[_0xb59f[124]][_0xb59f[270]]=_0xb59f[356]),mxEvent[_0xb59f[169]](_0x6b6cx3,_0xb59f[173],_0x6b6cx5));_0x6b6cx4&&mxEvent[_0xb59f[759]](_0x6b6cx3,function(_0x6b6cx3){_0x6b6cx9[_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx3,_0x6b6cx2));mxEvent[_0xb59f[722]](_0x6b6cx3)},function(_0x6b6cx3){_0x6b6cx9[_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx3,_0x6b6cx2))});return _0x6b6cx3};mxCellRenderer[_0xb59f[202]][_0xb59f[2211]]=function(_0x6b6cx2,_0x6b6cx3){return !0};mxCellRenderer[_0xb59f[202]][_0xb59f[2197]]=function(_0x6b6cx2,_0x6b6cx3){return !0};mxCellRenderer[_0xb59f[202]][_0xb59f[2163]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cx4=function(_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2;if(_0x6b6cx3[_0xb59f[507]]!=mxConstants[_0xb59f[508]]&&_0xb59f[2198]==mxEvent[_0xb59f[728]](_0x6b6cx4)[_0xb59f[301]]||mxClient[_0xb59f[754]]){_0x6b6cx5=mxEvent[_0xb59f[731]](_0x6b6cx4),_0x6b6cx4=mxEvent[_0xb59f[733]](_0x6b6cx4),_0x6b6cx4=mxUtils[_0xb59f[2196]](_0x6b6cx3[_0xb59f[526]],_0x6b6cx5,_0x6b6cx4),_0x6b6cx5=_0x6b6cx3[_0xb59f[441]][_0xb59f[248]](_0x6b6cx3[_0xb59f[999]](_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]]))};return _0x6b6cx5},_0x6b6cx5=!1;mxEvent[_0xb59f[169]](_0x6b6cx2[_0xb59f[253]][_0xb59f[252]],_0xb59f[2212],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){_0x6b6cx3[_0xb59f[2213]]=0;_0x6b6cx5= !0;mxEvent[_0xb59f[722]](_0x6b6cx2)}));mxEvent[_0xb59f[759]](_0x6b6cx2[_0xb59f[253]][_0xb59f[252]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx4){this[_0xb59f[2211]](_0x6b6cx2,_0x6b6cx4)&&!_0x6b6cx5?_0x6b6cx3[_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx4,null!=_0x6b6cx2[_0xb59f[253]]&&mxEvent[_0xb59f[728]](_0x6b6cx4)==_0x6b6cx2[_0xb59f[253]][_0xb59f[905]]?null:_0x6b6cx2)):_0x6b6cx5&&mxEvent[_0xb59f[722]](_0x6b6cx4)}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx9){this[_0xb59f[2211]](_0x6b6cx2,_0x6b6cx9)&&!_0x6b6cx5?_0x6b6cx3[_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx9,null!=_0x6b6cx2[_0xb59f[253]]&&mxEvent[_0xb59f[728]](_0x6b6cx9)==_0x6b6cx2[_0xb59f[253]][_0xb59f[905]]?null:_0x6b6cx4(_0x6b6cx9))):_0x6b6cx5&&mxEvent[_0xb59f[722]](_0x6b6cx9)}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx9){this[_0xb59f[2211]](_0x6b6cx2,_0x6b6cx9)&&!_0x6b6cx5?_0x6b6cx3[_0xb59f[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6b6cx9,null!=_0x6b6cx2[_0xb59f[253]]&&mxEvent[_0xb59f[728]](_0x6b6cx9)==_0x6b6cx2[_0xb59f[253]][_0xb59f[905]]?null:_0x6b6cx4(_0x6b6cx9))):_0x6b6cx5&&mxEvent[_0xb59f[722]](_0x6b6cx9)}));var _0x6b6cx9=mxClient[_0xb59f[754]]?_0xb59f[2214]:_0xb59f[760];mxEvent[_0xb59f[169]](_0x6b6cx2[_0xb59f[253]][_0xb59f[252]],_0x6b6cx9,mxUtils[_0xb59f[885]](this,function(_0x6b6cx4){_0x6b6cx5= !1;_0xb59f[2214]==_0x6b6cx9?(_0x6b6cx3[_0xb59f[2213]]=0,_0x6b6cx3[_0xb59f[2215]]&&(_0x6b6cx3[_0xb59f[2216]](_0x6b6cx2,_0x6b6cx4),mxEvent[_0xb59f[722]](_0x6b6cx4))):this[_0xb59f[2211]](_0x6b6cx2,_0x6b6cx4)&&(_0x6b6cx3[_0xb59f[761]](_0x6b6cx4,null!=_0x6b6cx2[_0xb59f[253]]&&mxEvent[_0xb59f[728]](_0x6b6cx4)==_0x6b6cx2[_0xb59f[253]][_0xb59f[905]]?null:_0x6b6cx2[_0xb59f[246]]),mxEvent[_0xb59f[722]](_0x6b6cx4))}))};mxCellRenderer[_0xb59f[202]][_0xb59f[2217]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[2182]](_0x6b6cx2);if(null==_0x6b6cx2[_0xb59f[963]]&&null!=_0x6b6cx4&&(mxUtils[_0xb59f[1331]](_0x6b6cx4)||0<_0x6b6cx4[_0xb59f[67]])){this[_0xb59f[2184]](_0x6b6cx2,_0x6b6cx4)}else {if(null!=_0x6b6cx2[_0xb59f[963]]&&(null==_0x6b6cx4||0==_0x6b6cx4[_0xb59f[67]])){_0x6b6cx2[_0xb59f[963]][_0xb59f[515]](),_0x6b6cx2[_0xb59f[963]]=null}};if(null!=_0x6b6cx2[_0xb59f[963]]){var _0x6b6cx5=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cx9=_0x6b6cx5[_0xb59f[2131]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx5=_0x6b6cx5[_0xb59f[2130]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cxa=this[_0xb59f[2218]](_0x6b6cx2);if(_0x6b6cx3||_0x6b6cx2[_0xb59f[963]][_0xb59f[131]]!=_0x6b6cx4||_0x6b6cx2[_0xb59f[963]][_0xb59f[2131]]!=_0x6b6cx9||_0x6b6cx2[_0xb59f[963]][_0xb59f[2219]]!=_0x6b6cx5||_0x6b6cx2[_0xb59f[963]][_0xb59f[255]]!=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]]||!_0x6b6cx2[_0xb59f[963]][_0xb59f[1562]][_0xb59f[237]](_0x6b6cxa)){_0x6b6cx2[_0xb59f[963]][_0xb59f[131]]=_0x6b6cx4,_0x6b6cx2[_0xb59f[963]][_0xb59f[1562]]=_0x6b6cxa,_0x6b6cx2[_0xb59f[963]][_0xb59f[255]]=this[_0xb59f[2220]](_0x6b6cx2),_0x6b6cx2[_0xb59f[963]][_0xb59f[2131]]=_0x6b6cx9,_0x6b6cx2[_0xb59f[963]][_0xb59f[2219]]=_0x6b6cx5,_0x6b6cx2[_0xb59f[963]][_0xb59f[258]]()}}};mxCellRenderer[_0xb59f[202]][_0xb59f[2220]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[441]][_0xb59f[255]]};mxCellRenderer[_0xb59f[202]][_0xb59f[2218]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cx4=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],_0x6b6cx5=_0x6b6cx3[_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx9= new mxRectangle(_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]],_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]]);_0x6b6cx2[_0xb59f[963]][_0xb59f[1672]]();_0x6b6cx5?(_0x6b6cx5=_0x6b6cx2[_0xb59f[963]][_0xb59f[1673]](),_0x6b6cx9[_0xb59f[235]]+=_0x6b6cx5[_0xb59f[235]]*_0x6b6cx4,_0x6b6cx9[_0xb59f[236]]+=_0x6b6cx5[_0xb59f[236]]*_0x6b6cx4,_0x6b6cx3=_0x6b6cx3[_0xb59f[1198]](_0x6b6cx2[_0xb59f[246]]),null!=_0x6b6cx3&&(_0x6b6cx9[_0xb59f[117]]=Math[_0xb59f[160]](0,_0x6b6cx2[_0xb59f[963]][_0xb59f[1655]][_0xb59f[235]]*_0x6b6cx3[_0xb59f[117]]*_0x6b6cx4-_0x6b6cx2[_0xb59f[963]][_0xb59f[659]]*_0x6b6cx4-_0x6b6cx2[_0xb59f[963]][_0xb59f[661]]*_0x6b6cx4),_0x6b6cx9[_0xb59f[119]]=Math[_0xb59f[160]](0,_0x6b6cx2[_0xb59f[963]][_0xb59f[1655]][_0xb59f[236]]*_0x6b6cx3[_0xb59f[119]]*_0x6b6cx4-_0x6b6cx2[_0xb59f[963]][_0xb59f[658]]*_0x6b6cx4-_0x6b6cx2[_0xb59f[963]][_0xb59f[660]]*_0x6b6cx4))):(_0x6b6cx2[_0xb59f[963]][_0xb59f[1590]]()&&(_0x6b6cx5=_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[235]]=_0x6b6cx9[_0xb59f[236]],_0x6b6cx9[_0xb59f[236]]=_0x6b6cx5),_0x6b6cx9[_0xb59f[235]]+=_0x6b6cx2[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]]+=_0x6b6cx2[_0xb59f[236]],_0x6b6cx9[_0xb59f[117]]=Math[_0xb59f[160]](1,_0x6b6cx2[_0xb59f[117]]),_0x6b6cx9[_0xb59f[119]]=Math[_0xb59f[160]](1,_0x6b6cx2[_0xb59f[119]]),_0x6b6cx3[_0xb59f[1730]](_0x6b6cx2[_0xb59f[246]])&&(_0x6b6cx3=_0x6b6cx3[_0xb59f[1731]](_0x6b6cx2[_0xb59f[246]]),0<_0x6b6cx3[_0xb59f[117]]?(_0x6b6cx5=Math[_0xb59f[243]](_0x6b6cx9[_0xb59f[117]],_0x6b6cx3[_0xb59f[117]]*_0x6b6cx4),_0x6b6cx2[_0xb59f[253]][_0xb59f[623]]&&(_0x6b6cx9[_0xb59f[235]]+=_0x6b6cx9[_0xb59f[117]]-_0x6b6cx5),_0x6b6cx9[_0xb59f[117]]=_0x6b6cx5):0<_0x6b6cx3[_0xb59f[119]]&&(_0x6b6cx5=Math[_0xb59f[243]](_0x6b6cx9[_0xb59f[119]],_0x6b6cx3[_0xb59f[119]]*_0x6b6cx4),_0x6b6cx2[_0xb59f[253]][_0xb59f[624]]&&(_0x6b6cx9[_0xb59f[236]]+=_0x6b6cx9[_0xb59f[119]]-_0x6b6cx5),_0x6b6cx9[_0xb59f[119]]=_0x6b6cx5)),this[_0xb59f[2221]](_0x6b6cx2,_0x6b6cx9));return _0x6b6cx9};mxCellRenderer[_0xb59f[202]][_0xb59f[2221]]=function(_0x6b6cx2,_0x6b6cx3){if(_0x6b6cx2[_0xb59f[963]][_0xb59f[1590]]()){var _0x6b6cx4=(_0x6b6cx2[_0xb59f[117]]-_0x6b6cx2[_0xb59f[119]])/2;_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx4;_0x6b6cx3[_0xb59f[236]]-=_0x6b6cx4;_0x6b6cx4=_0x6b6cx3[_0xb59f[117]];_0x6b6cx3[_0xb59f[117]]=_0x6b6cx3[_0xb59f[119]];_0x6b6cx3[_0xb59f[119]]=_0x6b6cx4};_0x6b6cx3[_0xb59f[235]]-=_0x6b6cx2[_0xb59f[963]][_0xb59f[1655]][_0xb59f[235]]*_0x6b6cx3[_0xb59f[117]];_0x6b6cx3[_0xb59f[236]]-=_0x6b6cx2[_0xb59f[963]][_0xb59f[1655]][_0xb59f[236]]*_0x6b6cx3[_0xb59f[119]];if(_0xb59f[1334]!=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2193]]]){var _0x6b6cx4=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],_0x6b6cx5=_0x6b6cx2[_0xb59f[963]][_0xb59f[1673]]();_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx5[_0xb59f[235]]*_0x6b6cx4;_0x6b6cx3[_0xb59f[236]]+=_0x6b6cx5[_0xb59f[236]]*_0x6b6cx4;_0x6b6cx3[_0xb59f[117]]=Math[_0xb59f[160]](0,_0x6b6cx3[_0xb59f[117]]-_0x6b6cx2[_0xb59f[963]][_0xb59f[659]]*_0x6b6cx4-_0x6b6cx2[_0xb59f[963]][_0xb59f[661]]*_0x6b6cx4);_0x6b6cx3[_0xb59f[119]]=Math[_0xb59f[160]](0,_0x6b6cx3[_0xb59f[119]]-_0x6b6cx2[_0xb59f[963]][_0xb59f[658]]*_0x6b6cx4-_0x6b6cx2[_0xb59f[963]][_0xb59f[660]]*_0x6b6cx4)};var _0x6b6cx9=_0x6b6cx2[_0xb59f[963]][_0xb59f[1615]]();if(0!=_0x6b6cx9&&(null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[251]][_0xb59f[1193]](_0x6b6cx2[_0xb59f[246]]))&&(_0x6b6cx4=_0x6b6cx2[_0xb59f[241]](),_0x6b6cx5=_0x6b6cx2[_0xb59f[242]](),_0x6b6cx3[_0xb59f[235]]!=_0x6b6cx4||_0x6b6cx3[_0xb59f[236]]!=_0x6b6cx5)){_0x6b6cx9*=Math[_0xb59f[424]]/180,pt=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]),Math[_0xb59f[426]](_0x6b6cx9),Math[_0xb59f[427]](_0x6b6cx9), new mxPoint(_0x6b6cx4,_0x6b6cx5)),_0x6b6cx3[_0xb59f[235]]=pt[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]=pt[_0xb59f[236]]}};mxCellRenderer[_0xb59f[202]][_0xb59f[2222]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2162]](_0x6b6cx2);if(null!=_0x6b6cx2[_0xb59f[1211]]){var _0x6b6cx4=mxUtils[_0xb59f[1454]](mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ROTATION,0),90),_0x6b6cx5=mxUtils[_0xb59f[431]](_0x6b6cx4),_0x6b6cx9=Math[_0xb59f[426]](_0x6b6cx5),_0x6b6cxa=Math[_0xb59f[427]](_0x6b6cx5);_0x6b6cx2[_0xb59f[1211]][_0xb59f[209]](function(_0x6b6cx5,_0x6b6cx13){var _0x6b6cx14=_0x6b6cx13[_0xb59f[2201]][_0xb59f[1799]](_0x6b6cx2);if(!_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]])&&null!=_0x6b6cx2[_0xb59f[253]]&&0!=_0x6b6cx4){var _0x6b6cx15=_0x6b6cx14[_0xb59f[241]](),_0x6b6cx16=_0x6b6cx14[_0xb59f[242]](),_0x6b6cx16=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx15,_0x6b6cx16),_0x6b6cx9,_0x6b6cxa, new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]())),_0x6b6cx15=_0x6b6cx16[_0xb59f[235]],_0x6b6cx16=_0x6b6cx16[_0xb59f[236]];_0x6b6cx14[_0xb59f[235]]=Math[_0xb59f[488]](_0x6b6cx15-_0x6b6cx14[_0xb59f[117]]/2);_0x6b6cx14[_0xb59f[236]]=Math[_0xb59f[488]](_0x6b6cx16-_0x6b6cx14[_0xb59f[119]]/2)};if(_0x6b6cx3||null==_0x6b6cx13[_0xb59f[1562]]||_0x6b6cx13[_0xb59f[255]]!=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]]||!_0x6b6cx13[_0xb59f[1562]][_0xb59f[237]](_0x6b6cx14)){_0x6b6cx13[_0xb59f[1562]]=_0x6b6cx14,_0x6b6cx13[_0xb59f[255]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],_0x6b6cx13[_0xb59f[258]]()}})}};mxCellRenderer[_0xb59f[202]][_0xb59f[2223]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2[_0xb59f[2207]]){var _0x6b6cx4=this[_0xb59f[2224]](_0x6b6cx2),_0x6b6cx5=this[_0xb59f[2152]]?mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ROTATION,0):_0x6b6cx2[_0xb59f[253]][_0xb59f[1615]](),_0x6b6cx9=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]];if(_0x6b6cx3||_0x6b6cx2[_0xb59f[2207]][_0xb59f[255]]!=_0x6b6cx9||!_0x6b6cx2[_0xb59f[2207]][_0xb59f[1562]][_0xb59f[237]](_0x6b6cx4)||_0x6b6cx2[_0xb59f[2207]][_0xb59f[603]]!=_0x6b6cx5){_0x6b6cx2[_0xb59f[2207]][_0xb59f[603]]=_0x6b6cx5,_0x6b6cx2[_0xb59f[2207]][_0xb59f[1562]]=_0x6b6cx4,_0x6b6cx2[_0xb59f[2207]][_0xb59f[255]]=_0x6b6cx9,_0x6b6cx2[_0xb59f[2207]][_0xb59f[258]]()}}};mxCellRenderer[_0xb59f[202]][_0xb59f[2224]]=function(_0x6b6cx2){if(null!=_0x6b6cx2[_0xb59f[2207]]){var _0x6b6cx3=_0x6b6cx2[_0xb59f[2207]][_0xb59f[255]],_0x6b6cx4=_0x6b6cx2[_0xb59f[2207]][_0xb59f[1562]][_0xb59f[117]]/_0x6b6cx3,_0x6b6cx3=_0x6b6cx2[_0xb59f[2207]][_0xb59f[1562]][_0xb59f[119]]/_0x6b6cx3,_0x6b6cx5=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],_0x6b6cx9=_0x6b6cx2[_0xb59f[241]](),_0x6b6cxa=_0x6b6cx2[_0xb59f[242]]();if(!_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]])&&(_0x6b6cx9=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx4*_0x6b6cx5,_0x6b6cxa=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx3*_0x6b6cx5,null!=_0x6b6cx2[_0xb59f[253]])){var _0x6b6cx12=_0x6b6cx2[_0xb59f[253]][_0xb59f[1598]]();if(this[_0xb59f[2152]]){_0x6b6cx12=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ROTATION,0)}else {if(_0x6b6cx2[_0xb59f[253]][_0xb59f[1590]]()){var _0x6b6cx13=(_0x6b6cx2[_0xb59f[117]]-_0x6b6cx2[_0xb59f[119]])/2,_0x6b6cx9=_0x6b6cx9+_0x6b6cx13,_0x6b6cxa=_0x6b6cxa-_0x6b6cx13}};0!=_0x6b6cx12&&(_0x6b6cx13=mxUtils[_0xb59f[431]](_0x6b6cx12),_0x6b6cx12=Math[_0xb59f[426]](_0x6b6cx13),_0x6b6cx13=Math[_0xb59f[427]](_0x6b6cx13),_0x6b6cxa=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx9,_0x6b6cxa),_0x6b6cx12,_0x6b6cx13, new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]())),_0x6b6cx9=_0x6b6cxa[_0xb59f[235]],_0x6b6cxa=_0x6b6cxa[_0xb59f[236]])};return _0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]), new mxRectangle(Math[_0xb59f[488]](_0x6b6cx9-_0x6b6cx4/2*_0x6b6cx5),Math[_0xb59f[488]](_0x6b6cxa-_0x6b6cx3/2*_0x6b6cx5),Math[_0xb59f[488]](_0x6b6cx4*_0x6b6cx5),Math[_0xb59f[488]](_0x6b6cx3*_0x6b6cx5))};return null};mxCellRenderer[_0xb59f[202]][_0xb59f[258]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(null!=_0x6b6cx2[_0xb59f[253]]){var _0x6b6cx5=!1;_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]);reconfigure=null!=_0x6b6cx3?_0x6b6cx3:!1;this[_0xb59f[2204]](_0x6b6cx2);if(_0x6b6cx2[_0xb59f[2082]]||_0x6b6cx2[_0xb59f[2081]]){_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2158]]?this[_0xb59f[2166]](_0x6b6cx2):this[_0xb59f[2167]](_0x6b6cx2)};if(_0x6b6cx2[_0xb59f[2082]]||!mxUtils[_0xb59f[2225]](_0x6b6cx2[_0xb59f[253]][_0xb59f[124]],_0x6b6cx2[_0xb59f[124]])){this[_0xb59f[2170]](_0x6b6cx2),_0x6b6cx3= !0};delete _0x6b6cx2[_0xb59f[2081]];delete _0x6b6cx2[_0xb59f[2082]];if(_0x6b6cx3||null==_0x6b6cx2[_0xb59f[253]][_0xb59f[1562]]||_0x6b6cx2[_0xb59f[253]][_0xb59f[255]]!=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]]||!_0x6b6cx2[_0xb59f[253]][_0xb59f[1562]][_0xb59f[237]](_0x6b6cx2)||!mxUtils[_0xb59f[2226]](_0x6b6cx2[_0xb59f[253]][_0xb59f[1525]],_0x6b6cx2[_0xb59f[439]])){_0x6b6cx5= !0,_0x6b6cx2[_0xb59f[253]][_0xb59f[1525]]=null!=_0x6b6cx2[_0xb59f[439]]?_0x6b6cx2[_0xb59f[439]][_0xb59f[1853]]():null,_0x6b6cx2[_0xb59f[253]][_0xb59f[1562]]= new mxRectangle(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],_0x6b6cx2[_0xb59f[117]],_0x6b6cx2[_0xb59f[119]]),_0x6b6cx2[_0xb59f[253]][_0xb59f[255]]=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],null==_0x6b6cx4||_0x6b6cx4?_0x6b6cx2[_0xb59f[253]][_0xb59f[258]]():_0x6b6cx2[_0xb59f[253]][_0xb59f[1577]]()};if(null==_0x6b6cx4||_0x6b6cx4){this[_0xb59f[2217]](_0x6b6cx2,_0x6b6cx5),this[_0xb59f[2222]](_0x6b6cx2,_0x6b6cx5),this[_0xb59f[2223]](_0x6b6cx2,_0x6b6cx5)}}};mxCellRenderer[_0xb59f[202]][_0xb59f[515]]=function(_0x6b6cx2){null!=_0x6b6cx2[_0xb59f[253]]&&(null!=_0x6b6cx2[_0xb59f[963]]&&(_0x6b6cx2[_0xb59f[963]][_0xb59f[515]](),_0x6b6cx2[_0xb59f[963]]=null),null!=_0x6b6cx2[_0xb59f[1211]]&&(_0x6b6cx2[_0xb59f[1211]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx4){_0x6b6cx4[_0xb59f[515]]()}),_0x6b6cx2[_0xb59f[1211]]=null),null!=_0x6b6cx2[_0xb59f[2207]]&&(_0x6b6cx2[_0xb59f[2207]][_0xb59f[515]](),_0x6b6cx2[_0xb59f[2207]]=null),_0x6b6cx2[_0xb59f[253]][_0xb59f[515]](),_0x6b6cx2[_0xb59f[253]]=null)};var mxEdgeStyle={EntityRelation:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx2[_0xb59f[441]],_0x6b6cx12=_0x6b6cxa[_0xb59f[1179]];_0x6b6cx5=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*_0x6b6cxa[_0xb59f[255]];var _0x6b6cx13=_0x6b6cx2[_0xb59f[439]],_0x6b6cx14=_0x6b6cx13[0],_0x6b6cx15=_0x6b6cx13[_0x6b6cx13[_0xb59f[67]]-1],_0x6b6cx13=!1;if(null!=_0x6b6cx14){_0x6b6cx3= new mxCellState,_0x6b6cx3[_0xb59f[235]]=_0x6b6cx14[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]=_0x6b6cx14[_0xb59f[236]]}else {if(null!=_0x6b6cx3){var _0x6b6cx16=mxUtils[_0xb59f[2227]](_0x6b6cx3,_0x6b6cx2,!0,mxConstants.DIRECTION_MASK_NONE);_0x6b6cx16!=mxConstants[_0xb59f[434]]?_0x6b6cx13=_0x6b6cx16==mxConstants[_0xb59f[436]]:(_0x6b6cx14=_0x6b6cx12[_0xb59f[1198]](_0x6b6cx3[_0xb59f[246]]),_0x6b6cx14[_0xb59f[1500]]?_0x6b6cx13=0.5>=_0x6b6cx14[_0xb59f[235]]:null!=_0x6b6cx4&&(_0x6b6cx13=_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]<_0x6b6cx3[_0xb59f[235]]))}else {return}};_0x6b6cx14= !0;null!=_0x6b6cx15?(_0x6b6cx4= new mxCellState,_0x6b6cx4[_0xb59f[235]]=_0x6b6cx15[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]]=_0x6b6cx15[_0xb59f[236]]):null!=_0x6b6cx4&&(_0x6b6cx16=mxUtils[_0xb59f[2227]](_0x6b6cx4,_0x6b6cx2,!1,mxConstants.DIRECTION_MASK_NONE),_0x6b6cx16!=mxConstants[_0xb59f[434]]?_0x6b6cx14=_0x6b6cx16==mxConstants[_0xb59f[436]]:(_0x6b6cx2=_0x6b6cx12[_0xb59f[1198]](_0x6b6cx4[_0xb59f[246]]),_0x6b6cx2[_0xb59f[1500]]?_0x6b6cx14=0.5>=_0x6b6cx2[_0xb59f[235]]:null!=_0x6b6cx3&&(_0x6b6cx14=_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]]<_0x6b6cx4[_0xb59f[235]])));null!=_0x6b6cx3&&null!=_0x6b6cx4&&(_0x6b6cx2=_0x6b6cx13?_0x6b6cx3[_0xb59f[235]]:_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]],_0x6b6cx3=_0x6b6cxa[_0xb59f[2228]](_0x6b6cx3),_0x6b6cx12=_0x6b6cx14?_0x6b6cx4[_0xb59f[235]]:_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]],_0x6b6cx4=_0x6b6cxa[_0xb59f[2228]](_0x6b6cx4),_0x6b6cxa= new mxPoint(_0x6b6cx2+(_0x6b6cx13?-_0x6b6cx5:_0x6b6cx5),_0x6b6cx3),_0x6b6cx15= new mxPoint(_0x6b6cx12+(_0x6b6cx14?-_0x6b6cx5:_0x6b6cx5),_0x6b6cx4),_0x6b6cx13==_0x6b6cx14?(_0x6b6cx5=_0x6b6cx13?Math[_0xb59f[243]](_0x6b6cx2,_0x6b6cx12)-_0x6b6cx5:Math[_0xb59f[160]](_0x6b6cx2,_0x6b6cx12)+_0x6b6cx5,_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx5,_0x6b6cx3)),_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx5,_0x6b6cx4))):(_0x6b6cxa[_0xb59f[235]]<_0x6b6cx15[_0xb59f[235]]==_0x6b6cx13?(_0x6b6cx5=_0x6b6cx3+(_0x6b6cx4-_0x6b6cx3)/2,_0x6b6cx9[_0xb59f[207]](_0x6b6cxa),_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cxa[_0xb59f[235]],_0x6b6cx5)),_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx15[_0xb59f[235]],_0x6b6cx5))):_0x6b6cx9[_0xb59f[207]](_0x6b6cxa),_0x6b6cx9[_0xb59f[207]](_0x6b6cx15)))},Loop:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=_0x6b6cx3){_0x6b6cx4=_0x6b6cx2[_0xb59f[441]];var _0x6b6cxa=_0x6b6cx4[_0xb59f[1179]];_0x6b6cx5=null!=_0x6b6cx5&&0<_0x6b6cx5[_0xb59f[67]]?_0x6b6cx5[0]:null;null!=_0x6b6cx5&&(_0x6b6cx5=_0x6b6cx4[_0xb59f[2229]](_0x6b6cx2,_0x6b6cx5),mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx5[_0xb59f[235]],_0x6b6cx5[_0xb59f[236]])&&(_0x6b6cx5=null));var _0x6b6cx12=0,_0x6b6cx13=0,_0x6b6cx14=0,_0x6b6cx15=0,_0x6b6cxa=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_SEGMENT,_0x6b6cxa[_0xb59f[1020]])*_0x6b6cx4[_0xb59f[255]];_0x6b6cx2=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);_0x6b6cx2==mxConstants[_0xb59f[1358]]||_0x6b6cx2==mxConstants[_0xb59f[1354]]?(_0x6b6cx12=_0x6b6cx4[_0xb59f[2230]](_0x6b6cx3),_0x6b6cx13=_0x6b6cxa):(_0x6b6cx14=_0x6b6cx4[_0xb59f[2228]](_0x6b6cx3),_0x6b6cx15=_0x6b6cxa);null==_0x6b6cx5||_0x6b6cx5[_0xb59f[235]]<_0x6b6cx3[_0xb59f[235]]||_0x6b6cx5[_0xb59f[235]]>_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]]?null!=_0x6b6cx5?(_0x6b6cx12=_0x6b6cx5[_0xb59f[235]],_0x6b6cx15=Math[_0xb59f[160]](Math[_0xb59f[425]](_0x6b6cx14-_0x6b6cx5[_0xb59f[236]]),_0x6b6cx15)):_0x6b6cx2==mxConstants[_0xb59f[1358]]?_0x6b6cx14=_0x6b6cx3[_0xb59f[236]]-2*_0x6b6cx13:_0x6b6cx2==mxConstants[_0xb59f[1354]]?_0x6b6cx14=_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]]+2*_0x6b6cx13:_0x6b6cx12=_0x6b6cx2==mxConstants[_0xb59f[1356]]?_0x6b6cx3[_0xb59f[235]]-2*_0x6b6cx15:_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]]+2*_0x6b6cx15:null!=_0x6b6cx5&&(_0x6b6cx12=_0x6b6cx4[_0xb59f[2230]](_0x6b6cx3),_0x6b6cx13=Math[_0xb59f[160]](Math[_0xb59f[425]](_0x6b6cx12-_0x6b6cx5[_0xb59f[235]]),_0x6b6cx15),_0x6b6cx14=_0x6b6cx5[_0xb59f[236]],_0x6b6cx15=0);_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx12-_0x6b6cx13,_0x6b6cx14-_0x6b6cx15));_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx12+_0x6b6cx13,_0x6b6cx14+_0x6b6cx15))}},ElbowConnector:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=null!=_0x6b6cx5&&0<_0x6b6cx5[_0xb59f[67]]?_0x6b6cx5[0]:null,_0x6b6cx12=!1,_0x6b6cx13=!1;if(null!=_0x6b6cx3&&null!=_0x6b6cx4){if(null!=_0x6b6cxa){var _0x6b6cx14=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx4[_0xb59f[235]]),_0x6b6cx15=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]],_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]),_0x6b6cx13=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[236]],_0x6b6cx4[_0xb59f[236]]),_0x6b6cx16=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]],_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]),_0x6b6cxa=_0x6b6cx2[_0xb59f[441]][_0xb59f[2229]](_0x6b6cx2,_0x6b6cxa),_0x6b6cx12=_0x6b6cxa[_0xb59f[236]]<_0x6b6cx13||_0x6b6cxa[_0xb59f[236]]>_0x6b6cx16,_0x6b6cx13=_0x6b6cxa[_0xb59f[235]]<_0x6b6cx14||_0x6b6cxa[_0xb59f[235]]>_0x6b6cx15}else {_0x6b6cx14=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx4[_0xb59f[235]]),_0x6b6cx15=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]],_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]),_0x6b6cx12=_0x6b6cx14==_0x6b6cx15,_0x6b6cx12||(_0x6b6cx13=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[236]],_0x6b6cx4[_0xb59f[236]]),_0x6b6cx16=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]],_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]),_0x6b6cx13=_0x6b6cx13==_0x6b6cx16)}};!_0x6b6cx13&&(_0x6b6cx12||_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2231]]]==mxConstants[_0xb59f[2232]])?mxEdgeStyle.TopToBottom(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9):mxEdgeStyle.SideToSide(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)},SideToSide:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx2[_0xb59f[441]];_0x6b6cx5=null!=_0x6b6cx5&&0<_0x6b6cx5[_0xb59f[67]]?_0x6b6cx5[0]:null;var _0x6b6cx12=_0x6b6cx2[_0xb59f[439]],_0x6b6cx13=_0x6b6cx12[0],_0x6b6cx12=_0x6b6cx12[_0x6b6cx12[_0xb59f[67]]-1];null!=_0x6b6cx5&&(_0x6b6cx5=_0x6b6cxa[_0xb59f[2229]](_0x6b6cx2,_0x6b6cx5));null!=_0x6b6cx13&&(_0x6b6cx3= new mxCellState,_0x6b6cx3[_0xb59f[235]]=_0x6b6cx13[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]=_0x6b6cx13[_0xb59f[236]]);null!=_0x6b6cx12&&(_0x6b6cx4= new mxCellState,_0x6b6cx4[_0xb59f[235]]=_0x6b6cx12[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]]=_0x6b6cx12[_0xb59f[236]]);null!=_0x6b6cx3&&null!=_0x6b6cx4&&(_0x6b6cx2=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx4[_0xb59f[235]]),_0x6b6cx13=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]],_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]),_0x6b6cx2=null!=_0x6b6cx5?_0x6b6cx5[_0xb59f[235]]:_0x6b6cx13+(_0x6b6cx2-_0x6b6cx13)/2,_0x6b6cx13=_0x6b6cxa[_0xb59f[2228]](_0x6b6cx3),_0x6b6cxa=_0x6b6cxa[_0xb59f[2228]](_0x6b6cx4),null!=_0x6b6cx5&&(_0x6b6cx5[_0xb59f[236]]>=_0x6b6cx3[_0xb59f[236]]&&_0x6b6cx5[_0xb59f[236]]<=_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]]&&(_0x6b6cx13=_0x6b6cx5[_0xb59f[236]]),_0x6b6cx5[_0xb59f[236]]>=_0x6b6cx4[_0xb59f[236]]&&_0x6b6cx5[_0xb59f[236]]<=_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]&&(_0x6b6cxa=_0x6b6cx5[_0xb59f[236]])),!mxUtils[_0xb59f[442]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx13)&&!mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx13)&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx2,_0x6b6cx13)),!mxUtils[_0xb59f[442]](_0x6b6cx4,_0x6b6cx2,_0x6b6cxa)&&!mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx2,_0x6b6cxa)&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx2,_0x6b6cxa)),1==_0x6b6cx9[_0xb59f[67]]&&(null!=_0x6b6cx5?!mxUtils[_0xb59f[442]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx5[_0xb59f[236]])&&!mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx5[_0xb59f[236]])&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx2,_0x6b6cx5[_0xb59f[236]])):(_0x6b6cxa=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[236]],_0x6b6cx4[_0xb59f[236]]),_0x6b6cx3=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]],_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]),_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx2,_0x6b6cxa+(_0x6b6cx3-_0x6b6cxa)/2)))))},TopToBottom:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx2[_0xb59f[441]];_0x6b6cx5=null!=_0x6b6cx5&&0<_0x6b6cx5[_0xb59f[67]]?_0x6b6cx5[0]:null;var _0x6b6cx12=_0x6b6cx2[_0xb59f[439]],_0x6b6cx13=_0x6b6cx12[0],_0x6b6cx12=_0x6b6cx12[_0x6b6cx12[_0xb59f[67]]-1];null!=_0x6b6cx5&&(_0x6b6cx5=_0x6b6cxa[_0xb59f[2229]](_0x6b6cx2,_0x6b6cx5));null!=_0x6b6cx13&&(_0x6b6cx3= new mxCellState,_0x6b6cx3[_0xb59f[235]]=_0x6b6cx13[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]=_0x6b6cx13[_0xb59f[236]]);null!=_0x6b6cx12&&(_0x6b6cx4= new mxCellState,_0x6b6cx4[_0xb59f[235]]=_0x6b6cx12[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]]=_0x6b6cx12[_0xb59f[236]]);null!=_0x6b6cx3&&null!=_0x6b6cx4&&(_0x6b6cx13=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[236]],_0x6b6cx4[_0xb59f[236]]),_0x6b6cx12=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]],_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]),_0x6b6cx2=_0x6b6cxa[_0xb59f[2230]](_0x6b6cx3),null!=_0x6b6cx5&&(_0x6b6cx5[_0xb59f[235]]>=_0x6b6cx3[_0xb59f[235]]&&_0x6b6cx5[_0xb59f[235]]<=_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]])&&(_0x6b6cx2=_0x6b6cx5[_0xb59f[235]]),_0x6b6cx13=null!=_0x6b6cx5?_0x6b6cx5[_0xb59f[236]]:_0x6b6cx12+(_0x6b6cx13-_0x6b6cx12)/2,!mxUtils[_0xb59f[442]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx13)&&!mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx13)&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx2,_0x6b6cx13)),_0x6b6cx2=null!=_0x6b6cx5&&_0x6b6cx5[_0xb59f[235]]>=_0x6b6cx4[_0xb59f[235]]&&_0x6b6cx5[_0xb59f[235]]<=_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]?_0x6b6cx5[_0xb59f[235]]:_0x6b6cxa[_0xb59f[2230]](_0x6b6cx4),!mxUtils[_0xb59f[442]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx13)&&!mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx13)&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx2,_0x6b6cx13)),1==_0x6b6cx9[_0xb59f[67]]&&(null!=_0x6b6cx5&&1==_0x6b6cx9[_0xb59f[67]]?!mxUtils[_0xb59f[442]](_0x6b6cx4,_0x6b6cx5[_0xb59f[235]],_0x6b6cx13)&&!mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx5[_0xb59f[235]],_0x6b6cx13)&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx5[_0xb59f[235]],_0x6b6cx13)):(_0x6b6cxa=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx4[_0xb59f[235]]),_0x6b6cx3=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]],_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]),_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cxa+(_0x6b6cx3-_0x6b6cxa)/2,_0x6b6cx13)))))},SegmentConnector:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx2[_0xb59f[439]],_0x6b6cx12=!0,_0x6b6cx13=null,_0x6b6cx14=_0x6b6cxa[0];null==_0x6b6cx14&&null!=_0x6b6cx3?_0x6b6cx14= new mxPoint(_0x6b6cx2[_0xb59f[441]][_0xb59f[2230]](_0x6b6cx3),_0x6b6cx2[_0xb59f[441]][_0xb59f[2228]](_0x6b6cx3)):null!=_0x6b6cx14&&(_0x6b6cx14=_0x6b6cx14[_0xb59f[238]]());var _0x6b6cx15=_0x6b6cxa[_0xb59f[67]]-1;if(null!=_0x6b6cx5&&0<_0x6b6cx5[_0xb59f[67]]){for(var _0x6b6cx13=_0x6b6cx2[_0xb59f[441]][_0xb59f[2229]](_0x6b6cx2,_0x6b6cx5[0]),_0x6b6cx16=_0x6b6cx3,_0x6b6cx17=_0x6b6cxa[0],_0x6b6cx18=!1,_0x6b6cx19=!1,_0x6b6cx18=_0x6b6cx13,_0x6b6cx1a=_0x6b6cx5[_0xb59f[67]],_0x6b6cx1b=0;2>_0x6b6cx1b;_0x6b6cx1b++){var _0x6b6cx1c=null!=_0x6b6cx17&&_0x6b6cx17[_0xb59f[235]]==_0x6b6cx18[_0xb59f[235]],_0x6b6cx1d=null!=_0x6b6cx17&&_0x6b6cx17[_0xb59f[236]]==_0x6b6cx18[_0xb59f[236]],_0x6b6cx1e=null!=_0x6b6cx16&&_0x6b6cx18[_0xb59f[236]]>=_0x6b6cx16[_0xb59f[236]]&&_0x6b6cx18[_0xb59f[236]]<=_0x6b6cx16[_0xb59f[236]]+_0x6b6cx16[_0xb59f[119]],_0x6b6cx16=null!=_0x6b6cx16&&_0x6b6cx18[_0xb59f[235]]>=_0x6b6cx16[_0xb59f[235]]&&_0x6b6cx18[_0xb59f[235]]<=_0x6b6cx16[_0xb59f[235]]+_0x6b6cx16[_0xb59f[117]],_0x6b6cx18=_0x6b6cx1d||null==_0x6b6cx17&&_0x6b6cx1e,_0x6b6cx19=_0x6b6cx1c||null==_0x6b6cx17&&_0x6b6cx16;if(null!=_0x6b6cx17&&!_0x6b6cx1d&&!_0x6b6cx1c&&(_0x6b6cx1e||_0x6b6cx16)){_0x6b6cx12=_0x6b6cx1e?!1:!0;break};if(_0x6b6cx19||_0x6b6cx18){_0x6b6cx12=_0x6b6cx18;1==_0x6b6cx1b&&(_0x6b6cx12=0==_0x6b6cx5[_0xb59f[67]]%2?_0x6b6cx18:_0x6b6cx19);break};_0x6b6cx16=_0x6b6cx4;_0x6b6cx17=_0x6b6cxa[_0x6b6cx15];_0x6b6cx18=_0x6b6cx2[_0xb59f[441]][_0xb59f[2229]](_0x6b6cx2,_0x6b6cx5[_0x6b6cx1a-1])};_0x6b6cx12&&(null!=_0x6b6cxa[0]&&_0x6b6cxa[0][_0xb59f[236]]!=_0x6b6cx13[_0xb59f[236]]||null==_0x6b6cxa[0]&&null!=_0x6b6cx3&&(_0x6b6cx13[_0xb59f[236]]<_0x6b6cx3[_0xb59f[236]]||_0x6b6cx13[_0xb59f[236]]>_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]]))?_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx14[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]])):!_0x6b6cx12&&(null!=_0x6b6cxa[0]&&_0x6b6cxa[0][_0xb59f[235]]!=_0x6b6cx13[_0xb59f[235]]||null==_0x6b6cxa[0]&&null!=_0x6b6cx3&&(_0x6b6cx13[_0xb59f[235]]<_0x6b6cx3[_0xb59f[235]]||_0x6b6cx13[_0xb59f[235]]>_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]]))&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx13[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]));_0x6b6cx12?_0x6b6cx14[_0xb59f[236]]=_0x6b6cx13[_0xb59f[236]]:_0x6b6cx14[_0xb59f[235]]=_0x6b6cx13[_0xb59f[235]];for(_0x6b6cx1b=0;_0x6b6cx1b<_0x6b6cx5[_0xb59f[67]];_0x6b6cx1b++){_0x6b6cx12= !_0x6b6cx12,_0x6b6cx13=_0x6b6cx2[_0xb59f[441]][_0xb59f[2229]](_0x6b6cx2,_0x6b6cx5[_0x6b6cx1b]),_0x6b6cx12?_0x6b6cx14[_0xb59f[236]]=_0x6b6cx13[_0xb59f[236]]:_0x6b6cx14[_0xb59f[235]]=_0x6b6cx13[_0xb59f[235]],_0x6b6cx9[_0xb59f[207]](_0x6b6cx14[_0xb59f[238]]())}}else {_0x6b6cx13=_0x6b6cx14,_0x6b6cx12= !0};_0x6b6cx14=_0x6b6cxa[_0x6b6cx15];null==_0x6b6cx14&&null!=_0x6b6cx4&&(_0x6b6cx14= new mxPoint(_0x6b6cx2[_0xb59f[441]][_0xb59f[2230]](_0x6b6cx4),_0x6b6cx2[_0xb59f[441]][_0xb59f[2228]](_0x6b6cx4)));_0x6b6cx12&&(null!=_0x6b6cxa[_0x6b6cx15]&&_0x6b6cxa[_0x6b6cx15][_0xb59f[236]]!=_0x6b6cx13[_0xb59f[236]]||null==_0x6b6cxa[_0x6b6cx15]&&null!=_0x6b6cx4&&(_0x6b6cx13[_0xb59f[236]]<_0x6b6cx4[_0xb59f[236]]||_0x6b6cx13[_0xb59f[236]]>_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]))?_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx14[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]])):!_0x6b6cx12&&(null!=_0x6b6cxa[_0x6b6cx15]&&_0x6b6cxa[_0x6b6cx15][_0xb59f[235]]!=_0x6b6cx13[_0xb59f[235]]||null==_0x6b6cxa[_0x6b6cx15]&&null!=_0x6b6cx4&&(_0x6b6cx13[_0xb59f[235]]<_0x6b6cx4[_0xb59f[235]]||_0x6b6cx13[_0xb59f[235]]>_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]))&&_0x6b6cx9[_0xb59f[207]]( new mxPoint(_0x6b6cx13[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]));if(null==_0x6b6cxa[0]&&null!=_0x6b6cx3){for(;1<_0x6b6cx9[_0xb59f[67]]&&mxUtils[_0xb59f[442]](_0x6b6cx3,_0x6b6cx9[1][_0xb59f[235]],_0x6b6cx9[1][_0xb59f[236]]);){_0x6b6cx9=_0x6b6cx9[_0xb59f[300]](1,1)}};if(null==_0x6b6cxa[_0x6b6cx15]&&null!=_0x6b6cx4){for(;1<_0x6b6cx9[_0xb59f[67]]&&mxUtils[_0xb59f[442]](_0x6b6cx4,_0x6b6cx9[_0x6b6cx9[_0xb59f[67]]-1][_0xb59f[235]],_0x6b6cx9[_0x6b6cx9[_0xb59f[67]]-1][_0xb59f[236]]);){_0x6b6cx9=_0x6b6cx9[_0xb59f[300]](_0x6b6cx9[_0xb59f[67]]-1,1)}}},orthBuffer:10,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]],_0x6b6cx12=null==_0x6b6cx3?!1:_0x6b6cxa[_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx3[_0xb59f[246]]),_0x6b6cxa=null==_0x6b6cx4?!1:_0x6b6cxa[_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx4[_0xb59f[246]]);if(null!=_0x6b6cx5&&0<_0x6b6cx5[_0xb59f[67]]||_0x6b6cx12||_0x6b6cxa){mxEdgeStyle.SegmentConnector(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)}else {_0x6b6cx5=_0x6b6cx2[_0xb59f[439]];var _0x6b6cx13=_0x6b6cx5[0],_0x6b6cx14=_0x6b6cx5[_0x6b6cx5[_0xb59f[67]]-1];_0x6b6cx5=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[235]]:_0x6b6cx13[_0xb59f[235]];var _0x6b6cx12=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[236]]:_0x6b6cx13[_0xb59f[236]],_0x6b6cx15=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[117]]:1,_0x6b6cx16=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[119]]:1,_0x6b6cx17=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[235]]:_0x6b6cx14[_0xb59f[235]],_0x6b6cx18=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[236]]:_0x6b6cx14[_0xb59f[236]],_0x6b6cx19=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[117]]:1,_0x6b6cx1a=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[119]]:1,_0x6b6cxa=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]]*mxEdgeStyle[_0xb59f[2233]],_0x6b6cx1b=[mxConstants[_0xb59f[2234]],mxConstants[_0xb59f[2234]]];null!=_0x6b6cx3&&(_0x6b6cx1b[0]=mxUtils[_0xb59f[2227]](_0x6b6cx3,_0x6b6cx2,!0,mxConstants.DIRECTION_MASK_ALL));null!=_0x6b6cx4&&(_0x6b6cx1b[1]=mxUtils[_0xb59f[2227]](_0x6b6cx4,_0x6b6cx2,!1,mxConstants.DIRECTION_MASK_ALL));_0x6b6cx2=[0,0];_0x6b6cx5=[[_0x6b6cx5,_0x6b6cx12,_0x6b6cx15,_0x6b6cx16],[_0x6b6cx17,_0x6b6cx18,_0x6b6cx19,_0x6b6cx1a]];for(_0x6b6cx15=0;2>_0x6b6cx15;_0x6b6cx15++){mxEdgeStyle[_0xb59f[2235]][_0x6b6cx15][1]=_0x6b6cx5[_0x6b6cx15][0]-_0x6b6cxa,mxEdgeStyle[_0xb59f[2235]][_0x6b6cx15][2]=_0x6b6cx5[_0x6b6cx15][1]-_0x6b6cxa,mxEdgeStyle[_0xb59f[2235]][_0x6b6cx15][4]=_0x6b6cx5[_0x6b6cx15][0]+_0x6b6cx5[_0x6b6cx15][2]+_0x6b6cxa,mxEdgeStyle[_0xb59f[2235]][_0x6b6cx15][8]=_0x6b6cx5[_0x6b6cx15][1]+_0x6b6cx5[_0x6b6cx15][3]+_0x6b6cxa};_0x6b6cx15=_0x6b6cx5[0][0]+_0x6b6cx5[0][2]/2-(_0x6b6cx5[1][0]+_0x6b6cx5[1][2]/2);_0x6b6cx16=_0x6b6cx5[0][1]+_0x6b6cx5[0][3]/2-(_0x6b6cx5[1][1]+_0x6b6cx5[1][3]/2);_0x6b6cx12=0;0>_0x6b6cx15?_0x6b6cx12=0>_0x6b6cx16?2:1:0>=_0x6b6cx16&&(_0x6b6cx12=3,0==_0x6b6cx15&&(_0x6b6cx12=2));_0x6b6cx16=null;null!=_0x6b6cx3&&(_0x6b6cx16=_0x6b6cx13);_0x6b6cx3=[[0.5,0.5],[0.5,0.5]];for(_0x6b6cx15=0;2>_0x6b6cx15;_0x6b6cx15++){null!=_0x6b6cx16&&(_0x6b6cx3[_0x6b6cx15][0]=(_0x6b6cx16[_0xb59f[235]]-_0x6b6cx5[_0x6b6cx15][0])/_0x6b6cx5[_0x6b6cx15][2],0.01>_0x6b6cx3[_0x6b6cx15][0]?_0x6b6cx2[_0x6b6cx15]=mxConstants[_0xb59f[436]]:0.99<_0x6b6cx3[_0x6b6cx15][0]&&(_0x6b6cx2[_0x6b6cx15]=mxConstants[_0xb59f[438]]),_0x6b6cx3[_0x6b6cx15][1]=(_0x6b6cx16[_0xb59f[236]]-_0x6b6cx5[_0x6b6cx15][1])/_0x6b6cx5[_0x6b6cx15][3],0.01>_0x6b6cx3[_0x6b6cx15][1]?_0x6b6cx2[_0x6b6cx15]=mxConstants[_0xb59f[435]]:0.99<_0x6b6cx3[_0x6b6cx15][1]&&(_0x6b6cx2[_0x6b6cx15]=mxConstants[_0xb59f[437]])),_0x6b6cx16=null,null!=_0x6b6cx4&&(_0x6b6cx16=_0x6b6cx14)};_0x6b6cx15=_0x6b6cx5[0][1]-(_0x6b6cx5[1][1]+_0x6b6cx5[1][3]);_0x6b6cx16=_0x6b6cx5[0][0]-(_0x6b6cx5[1][0]+_0x6b6cx5[1][2]);_0x6b6cx17=_0x6b6cx5[1][1]-(_0x6b6cx5[0][1]+_0x6b6cx5[0][3]);_0x6b6cx18=_0x6b6cx5[1][0]-(_0x6b6cx5[0][0]+_0x6b6cx5[0][2]);mxEdgeStyle[_0xb59f[2236]][1]=Math[_0xb59f[160]](_0x6b6cx16-2*_0x6b6cxa,0);mxEdgeStyle[_0xb59f[2236]][2]=Math[_0xb59f[160]](_0x6b6cx15-2*_0x6b6cxa,0);mxEdgeStyle[_0xb59f[2236]][4]=Math[_0xb59f[160]](_0x6b6cx17-2*_0x6b6cxa,0);mxEdgeStyle[_0xb59f[2236]][3]=Math[_0xb59f[160]](_0x6b6cx18-2*_0x6b6cxa,0);_0x6b6cx4=[];_0x6b6cx13=[];_0x6b6cx14=[];_0x6b6cx13[0]=_0x6b6cx16>=_0x6b6cx18?mxConstants[_0xb59f[436]]:mxConstants[_0xb59f[438]];_0x6b6cx14[0]=_0x6b6cx15>=_0x6b6cx17?mxConstants[_0xb59f[435]]:mxConstants[_0xb59f[437]];_0x6b6cx13[1]=mxUtils[_0xb59f[2237]](_0x6b6cx13[0]);_0x6b6cx14[1]=mxUtils[_0xb59f[2237]](_0x6b6cx14[0]);_0x6b6cx16=_0x6b6cx16>=_0x6b6cx18?_0x6b6cx16:_0x6b6cx18;_0x6b6cx17=_0x6b6cx15>=_0x6b6cx17?_0x6b6cx15:_0x6b6cx17;_0x6b6cx18=[[0,0],[0,0]];_0x6b6cx19= !1;for(_0x6b6cx15=0;2>_0x6b6cx15;_0x6b6cx15++){0==_0x6b6cx2[_0x6b6cx15]&&(0==(_0x6b6cx13[_0x6b6cx15]&_0x6b6cx1b[_0x6b6cx15])&&(_0x6b6cx13[_0x6b6cx15]=mxUtils[_0xb59f[2237]](_0x6b6cx13[_0x6b6cx15])),0==(_0x6b6cx14[_0x6b6cx15]&_0x6b6cx1b[_0x6b6cx15])&&(_0x6b6cx14[_0x6b6cx15]=mxUtils[_0xb59f[2237]](_0x6b6cx14[_0x6b6cx15])),_0x6b6cx18[_0x6b6cx15][0]=_0x6b6cx14[_0x6b6cx15],_0x6b6cx18[_0x6b6cx15][1]=_0x6b6cx13[_0x6b6cx15])};_0x6b6cx17>2*_0x6b6cxa&&_0x6b6cx16>2*_0x6b6cxa&&(0<(_0x6b6cx13[0]&_0x6b6cx1b[0])&&0<(_0x6b6cx14[1]&_0x6b6cx1b[1])?(_0x6b6cx18[0][0]=_0x6b6cx13[0],_0x6b6cx18[0][1]=_0x6b6cx14[0],_0x6b6cx18[1][0]=_0x6b6cx14[1],_0x6b6cx18[1][1]=_0x6b6cx13[1],_0x6b6cx19= !0):0<(_0x6b6cx14[0]&_0x6b6cx1b[0])&&0<(_0x6b6cx13[1]&_0x6b6cx1b[1])&&(_0x6b6cx18[0][0]=_0x6b6cx14[0],_0x6b6cx18[0][1]=_0x6b6cx13[0],_0x6b6cx18[1][0]=_0x6b6cx13[1],_0x6b6cx18[1][1]=_0x6b6cx14[1],_0x6b6cx19= !0));_0x6b6cx17>2*_0x6b6cxa&&!_0x6b6cx19&&(_0x6b6cx18[0][0]=_0x6b6cx14[0],_0x6b6cx18[0][1]=_0x6b6cx13[0],_0x6b6cx18[1][0]=_0x6b6cx14[1],_0x6b6cx18[1][1]=_0x6b6cx13[1],_0x6b6cx19= !0);_0x6b6cx16>2*_0x6b6cxa&&!_0x6b6cx19&&(_0x6b6cx18[0][0]=_0x6b6cx13[0],_0x6b6cx18[0][1]=_0x6b6cx14[0],_0x6b6cx18[1][0]=_0x6b6cx13[1],_0x6b6cx18[1][1]=_0x6b6cx14[1]);for(_0x6b6cx15=0;2>_0x6b6cx15;_0x6b6cx15++){if(0==_0x6b6cx2[_0x6b6cx15]&&(0==(_0x6b6cx18[_0x6b6cx15][0]&_0x6b6cx1b[_0x6b6cx15])&&(_0x6b6cx18[_0x6b6cx15][0]=_0x6b6cx18[_0x6b6cx15][1]),_0x6b6cx4[_0x6b6cx15]=_0x6b6cx18[_0x6b6cx15][0]&_0x6b6cx1b[_0x6b6cx15],_0x6b6cx4[_0x6b6cx15]|=(_0x6b6cx18[_0x6b6cx15][1]&_0x6b6cx1b[_0x6b6cx15])<<8,_0x6b6cx4[_0x6b6cx15]|=(_0x6b6cx18[1-_0x6b6cx15][_0x6b6cx15]&_0x6b6cx1b[_0x6b6cx15])<<16,_0x6b6cx4[_0x6b6cx15]|=(_0x6b6cx18[1-_0x6b6cx15][1-_0x6b6cx15]&_0x6b6cx1b[_0x6b6cx15])<<24,0==(_0x6b6cx4[_0x6b6cx15]&15)&&(_0x6b6cx4[_0x6b6cx15]<<=8),0==(_0x6b6cx4[_0x6b6cx15]&3840)&&(_0x6b6cx4[_0x6b6cx15]=_0x6b6cx4[_0x6b6cx15]&15|_0x6b6cx4[_0x6b6cx15]>>8),0==(_0x6b6cx4[_0x6b6cx15]&983040)&&(_0x6b6cx4[_0x6b6cx15]=_0x6b6cx4[_0x6b6cx15]&65535|(_0x6b6cx4[_0x6b6cx15]&251658240)>>8),_0x6b6cx2[_0x6b6cx15]=_0x6b6cx4[_0x6b6cx15]&15,_0x6b6cx1b[_0x6b6cx15]==mxConstants[_0xb59f[436]]||_0x6b6cx1b[_0x6b6cx15]==mxConstants[_0xb59f[435]]||_0x6b6cx1b[_0x6b6cx15]==mxConstants[_0xb59f[438]]||_0x6b6cx1b[_0x6b6cx15]==mxConstants[_0xb59f[437]])){_0x6b6cx2[_0x6b6cx15]=_0x6b6cx1b[_0x6b6cx15]}};_0x6b6cx15=_0x6b6cx2[0]==mxConstants[_0xb59f[438]]?3:_0x6b6cx2[0];_0x6b6cx1b=_0x6b6cx2[1]==mxConstants[_0xb59f[438]]?3:_0x6b6cx2[1];_0x6b6cx15-=_0x6b6cx12;_0x6b6cx1b-=_0x6b6cx12;1>_0x6b6cx15&&(_0x6b6cx15+=4);1>_0x6b6cx1b&&(_0x6b6cx1b+=4);_0x6b6cx1b=mxEdgeStyle[_0xb59f[2238]][_0x6b6cx15-1][_0x6b6cx1b-1];mxEdgeStyle[_0xb59f[2239]][0][0]=_0x6b6cx5[0][0];mxEdgeStyle[_0xb59f[2239]][0][1]=_0x6b6cx5[0][1];switch(_0x6b6cx2[0]){case mxConstants[_0xb59f[436]]:mxEdgeStyle[_0xb59f[2239]][0][0]-=_0x6b6cxa;mxEdgeStyle[_0xb59f[2239]][0][1]+=_0x6b6cx3[0][1]*_0x6b6cx5[0][3];break;case mxConstants[_0xb59f[437]]:mxEdgeStyle[_0xb59f[2239]][0][0]+=_0x6b6cx3[0][0]*_0x6b6cx5[0][2];mxEdgeStyle[_0xb59f[2239]][0][1]+=_0x6b6cx5[0][3]+_0x6b6cxa;break;case mxConstants[_0xb59f[438]]:mxEdgeStyle[_0xb59f[2239]][0][0]+=_0x6b6cx5[0][2]+_0x6b6cxa;mxEdgeStyle[_0xb59f[2239]][0][1]+=_0x6b6cx3[0][1]*_0x6b6cx5[0][3];break;case mxConstants[_0xb59f[435]]:mxEdgeStyle[_0xb59f[2239]][0][0]+=_0x6b6cx3[0][0]*_0x6b6cx5[0][2],mxEdgeStyle[_0xb59f[2239]][0][1]-=_0x6b6cxa};_0x6b6cxa=0;_0x6b6cx13=_0x6b6cx4=0<(_0x6b6cx2[0]&(mxConstants[_0xb59f[438]]|mxConstants[_0xb59f[436]]))?0:1;for(_0x6b6cx15=_0x6b6cx14=0;_0x6b6cx15<_0x6b6cx1b[_0xb59f[67]];_0x6b6cx15++){_0x6b6cx14=_0x6b6cx1b[_0x6b6cx15]&15;_0x6b6cx1a=_0x6b6cx14==mxConstants[_0xb59f[438]]?3:_0x6b6cx14;_0x6b6cx1a+=_0x6b6cx12;4<_0x6b6cx1a&&(_0x6b6cx1a-=4);_0x6b6cx16=mxEdgeStyle[_0xb59f[2240]][_0x6b6cx1a-1];_0x6b6cx14=0<_0x6b6cx1a%2?0:1;_0x6b6cx14!=_0x6b6cx4&&(_0x6b6cxa++,mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][0]=mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa-1][0],mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][1]=mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa-1][1]);var _0x6b6cx1c=0<(_0x6b6cx1b[_0x6b6cx15]&mxEdgeStyle[_0xb59f[2241]]),_0x6b6cx19=0<(_0x6b6cx1b[_0x6b6cx15]&mxEdgeStyle[_0xb59f[2242]]),_0x6b6cx17=(_0x6b6cx1b[_0x6b6cx15]&mxEdgeStyle[_0xb59f[2243]])>>5,_0x6b6cx17=_0x6b6cx17<<_0x6b6cx12;15<_0x6b6cx17&&(_0x6b6cx17>>=4);_0x6b6cx18=0<(_0x6b6cx1b[_0x6b6cx15]&mxEdgeStyle[_0xb59f[2244]]);(_0x6b6cx19||_0x6b6cx1c)&&9>_0x6b6cx17?(_0x6b6cx1a=0,_0x6b6cx19=_0x6b6cx19?0:1,_0x6b6cx1a=_0x6b6cx18&&0==_0x6b6cx14?_0x6b6cx5[_0x6b6cx19][0]+_0x6b6cx3[_0x6b6cx19][0]*_0x6b6cx5[_0x6b6cx19][2]:_0x6b6cx18?_0x6b6cx5[_0x6b6cx19][1]+_0x6b6cx3[_0x6b6cx19][1]*_0x6b6cx5[_0x6b6cx19][3]:mxEdgeStyle[_0xb59f[2235]][_0x6b6cx19][_0x6b6cx17],0==_0x6b6cx14?(_0x6b6cx17=(_0x6b6cx1a-mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][0])*_0x6b6cx16[0],0<_0x6b6cx17&&(mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][0]+=_0x6b6cx16[0]*_0x6b6cx17)):(_0x6b6cx17=(_0x6b6cx1a-mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][1])*_0x6b6cx16[1],0<_0x6b6cx17&&(mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][1]+=_0x6b6cx16[1]*_0x6b6cx17))):_0x6b6cx18&&(mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][0]+=_0x6b6cx16[0]*Math[_0xb59f[425]](mxEdgeStyle[_0xb59f[2236]][_0x6b6cx1a]/2),mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][1]+=_0x6b6cx16[1]*Math[_0xb59f[425]](mxEdgeStyle[_0xb59f[2236]][_0x6b6cx1a]/2));0<_0x6b6cxa&&mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa][_0x6b6cx14]==mxEdgeStyle[_0xb59f[2239]][_0x6b6cxa-1][_0x6b6cx14]?_0x6b6cxa--:_0x6b6cx4=_0x6b6cx14};for(_0x6b6cx15=0;_0x6b6cx15<=_0x6b6cxa&& !(_0x6b6cx15==_0x6b6cxa&&((0<(_0x6b6cx2[1]&(mxConstants[_0xb59f[438]]|mxConstants[_0xb59f[436]]))?0:1)==_0x6b6cx13?0:1)!=(_0x6b6cxa+1)%2);_0x6b6cx15++){_0x6b6cx9[_0xb59f[207]]( new mxPoint(mxEdgeStyle[_0xb59f[2239]][_0x6b6cx15][0],mxEdgeStyle[_0xb59f[2239]][_0x6b6cx15][1]))}}},getRoutePattern:function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx2[0]==mxConstants[_0xb59f[438]]?3:_0x6b6cx2[0];_0x6b6cx2=_0x6b6cx2[1]==mxConstants[_0xb59f[438]]?3:_0x6b6cx2[1];_0x6b6cx9-=_0x6b6cx3;_0x6b6cx2-=_0x6b6cx3;1>_0x6b6cx9&&(_0x6b6cx9+=4);1>_0x6b6cx2&&(_0x6b6cx2+=4);_0x6b6cx3=routePatterns[_0x6b6cx9-1][_0x6b6cx2-1];if(0==_0x6b6cx4||0==_0x6b6cx5){null!=inlineRoutePatterns[_0x6b6cx9-1][_0x6b6cx2-1]&&(_0x6b6cx3=inlineRoutePatterns[_0x6b6cx9-1][_0x6b6cx2-1])};return _0x6b6cx3}},mxStyleRegistry={values:[],putValue:function(_0x6b6cx2,_0x6b6cx3){mxStyleRegistry[_0xb59f[2245]][_0x6b6cx2]=_0x6b6cx3},getValue:function(_0x6b6cx2){return mxStyleRegistry[_0xb59f[2245]][_0x6b6cx2]},getName:function(_0x6b6cx2){for(var _0x6b6cx3 in mxStyleRegistry[_0xb59f[2245]]){if(mxStyleRegistry[_0xb59f[2245]][_0x6b6cx3]==_0x6b6cx2){return _0x6b6cx3}};return null}};mxStyleRegistry[_0xb59f[2246]](mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry[_0xb59f[2246]](mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry[_0xb59f[2246]](mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry[_0xb59f[2246]](mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry[_0xb59f[2246]](mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry[_0xb59f[2246]](mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry[_0xb59f[2246]](mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry[_0xb59f[2246]](mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry[_0xb59f[2246]](mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry[_0xb59f[2246]](mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry[_0xb59f[2246]](mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);function mxGraphView(_0x6b6cx2){this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[513]]= new mxPoint;this[_0xb59f[2247]]= new mxRectangle;this[_0xb59f[1214]]= new mxDictionary}mxGraphView[_0xb59f[202]]= new mxEventSource;mxGraphView[_0xb59f[202]][_0xb59f[196]]=mxGraphView;mxGraphView[_0xb59f[202]][_0xb59f[2248]]= new mxPoint;mxGraphView[_0xb59f[202]][_0xb59f[2091]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[819]:_0xb59f[110];mxGraphView[_0xb59f[202]][_0xb59f[2249]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[2250]:_0xb59f[110];mxGraphView[_0xb59f[202]][_0xb59f[2251]]= !1;mxGraphView[_0xb59f[202]][_0xb59f[2252]]= !0;mxGraphView[_0xb59f[202]][_0xb59f[2253]]= !0;mxGraphView[_0xb59f[202]][_0xb59f[2254]]= !0;mxGraphView[_0xb59f[202]][_0xb59f[1179]]=null;mxGraphView[_0xb59f[202]][_0xb59f[1741]]=null;mxGraphView[_0xb59f[202]][_0xb59f[2247]]=null;mxGraphView[_0xb59f[202]][_0xb59f[255]]=1;mxGraphView[_0xb59f[202]][_0xb59f[513]]=null;mxGraphView[_0xb59f[202]][_0xb59f[2255]]= !1;mxGraphView[_0xb59f[202]][_0xb59f[517]]=function(){return this[_0xb59f[2247]]};mxGraphView[_0xb59f[202]][_0xb59f[2256]]=function(_0x6b6cx2){this[_0xb59f[2247]]=_0x6b6cx2};mxGraphView[_0xb59f[202]][_0xb59f[1799]]=function(_0x6b6cx2){var _0x6b6cx3=null;if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){for(var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){if(_0x6b6cx4[_0xb59f[1193]](_0x6b6cx2[_0x6b6cx5])||_0x6b6cx4[_0xb59f[250]](_0x6b6cx2[_0x6b6cx5])){var _0x6b6cx9=this[_0xb59f[248]](_0x6b6cx2[_0x6b6cx5]);null!=_0x6b6cx9&&(null==_0x6b6cx3?_0x6b6cx3= new mxRectangle(_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]],_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]]):_0x6b6cx3[_0xb59f[99]](_0x6b6cx9))}}};return _0x6b6cx3};mxGraphView[_0xb59f[202]][_0xb59f[2257]]=function(_0x6b6cx2){if(this[_0xb59f[1741]]!=_0x6b6cx2){var _0x6b6cx3= new mxCurrentRootChange(this,_0x6b6cx2);_0x6b6cx3[_0xb59f[350]]();var _0x6b6cx4= new mxUndoableEdit(this,!1);_0x6b6cx4[_0xb59f[99]](_0x6b6cx3);this[_0xb59f[746]]( new mxEventObject(mxEvent.UNDO,_0xb59f[1061],_0x6b6cx4));this[_0xb59f[1179]][_0xb59f[2258]]()};return _0x6b6cx2};mxGraphView[_0xb59f[202]][_0xb59f[829]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[255]],_0x6b6cx9= new mxPoint(this[_0xb59f[513]][_0xb59f[235]],this[_0xb59f[513]][_0xb59f[236]]);if(this[_0xb59f[255]]!=_0x6b6cx2||this[_0xb59f[513]][_0xb59f[235]]!=_0x6b6cx3||this[_0xb59f[513]][_0xb59f[236]]!=_0x6b6cx4){this[_0xb59f[255]]=_0x6b6cx2,this[_0xb59f[513]][_0xb59f[235]]=_0x6b6cx3,this[_0xb59f[513]][_0xb59f[236]]=_0x6b6cx4,this[_0xb59f[503]]()&&(this[_0xb59f[2259]](),this[_0xb59f[1179]][_0xb59f[2258]]())};this[_0xb59f[746]]( new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,_0xb59f[255],_0x6b6cx2,_0xb59f[2260],_0x6b6cx5,_0xb59f[513],this[_0xb59f[513]],_0xb59f[2261],_0x6b6cx9))};mxGraphView[_0xb59f[202]][_0xb59f[518]]=function(){return this[_0xb59f[255]]};mxGraphView[_0xb59f[202]][_0xb59f[2262]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[255]];this[_0xb59f[255]]!=_0x6b6cx2&&(this[_0xb59f[255]]=_0x6b6cx2,this[_0xb59f[503]]()&&(this[_0xb59f[2259]](),this[_0xb59f[1179]][_0xb59f[2258]]()));this[_0xb59f[746]]( new mxEventObject(mxEvent.SCALE,_0xb59f[255],_0x6b6cx2,_0xb59f[2260],_0x6b6cx3))};mxGraphView[_0xb59f[202]][_0xb59f[512]]=function(){return this[_0xb59f[513]]};mxGraphView[_0xb59f[202]][_0xb59f[1147]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4= new mxPoint(this[_0xb59f[513]][_0xb59f[235]],this[_0xb59f[513]][_0xb59f[236]]);if(this[_0xb59f[513]][_0xb59f[235]]!=_0x6b6cx2||this[_0xb59f[513]][_0xb59f[236]]!=_0x6b6cx3){this[_0xb59f[513]][_0xb59f[235]]=_0x6b6cx2,this[_0xb59f[513]][_0xb59f[236]]=_0x6b6cx3,this[_0xb59f[503]]()&&(this[_0xb59f[2259]](),this[_0xb59f[1179]][_0xb59f[2258]]())};this[_0xb59f[746]]( new mxEventObject(mxEvent.TRANSLATE,_0xb59f[513],this[_0xb59f[513]],_0xb59f[2261],_0x6b6cx4))};mxGraphView[_0xb59f[202]][_0xb59f[802]]=function(){null!=this[_0xb59f[1741]]&&this[_0xb59f[200]]();this[_0xb59f[2259]]()};mxGraphView[_0xb59f[202]][_0xb59f[2259]]=function(){this[_0xb59f[2263]]();this[_0xb59f[2264]]()};mxGraphView[_0xb59f[202]][_0xb59f[200]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]]();_0x6b6cx2=_0x6b6cx2||_0x6b6cx5[_0xb59f[501]]();_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;this[_0xb59f[2265]](_0x6b6cx2);if(_0x6b6cx4&&(_0x6b6cx3||_0x6b6cx2!=this[_0xb59f[1741]])){_0x6b6cx4=_0x6b6cx5[_0xb59f[262]](_0x6b6cx2);for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx4;_0x6b6cx9++){this[_0xb59f[200]](_0x6b6cx5[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9),_0x6b6cx3)}}else {this[_0xb59f[2263]](_0x6b6cx2)}};mxGraphView[_0xb59f[202]][_0xb59f[2263]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[502]]();_0x6b6cx2=_0x6b6cx2||_0x6b6cx9[_0xb59f[501]]();_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!1;var _0x6b6cxa=this[_0xb59f[248]](_0x6b6cx2);null!=_0x6b6cxa&&(_0x6b6cxa[_0xb59f[2080]]= !0,_0x6b6cx5&&(_0x6b6cxa[_0xb59f[2082]]= !0));if(_0x6b6cx3){for(var _0x6b6cx12=_0x6b6cx9[_0xb59f[262]](_0x6b6cx2),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx12;_0x6b6cxa++){var _0x6b6cx13=_0x6b6cx9[_0xb59f[263]](_0x6b6cx2,_0x6b6cxa);this[_0xb59f[2263]](_0x6b6cx13,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)}};if(_0x6b6cx4){_0x6b6cx5=_0x6b6cx9[_0xb59f[1707]](_0x6b6cx2);for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5;_0x6b6cxa++){this[_0xb59f[2263]](_0x6b6cx9[_0xb59f[1708]](_0x6b6cx2,_0x6b6cxa),_0x6b6cx3,_0x6b6cx4)}}};mxGraphView[_0xb59f[202]][_0xb59f[2264]]=function(_0x6b6cx2){var _0x6b6cx3=mxLog[_0xb59f[2109]](_0xb59f[2266]);window[_0xb59f[879]]=mxResources[_0xb59f[203]](this[_0xb59f[2249]])||this[_0xb59f[2249]];var _0x6b6cx4=null;if(this[_0xb59f[2253]]&&null!=this[_0xb59f[510]]&&null==this[_0xb59f[1653]]&&(8==document[_0xb59f[5]]||mxClient[_0xb59f[496]])){_0x6b6cx4=this[_0xb59f[510]][_0xb59f[124]][_0xb59f[495]];this[_0xb59f[510]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130];var _0x6b6cx5=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx5[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx5[_0xb59f[124]][_0xb59f[493]]=_0xb59f[494];_0x6b6cx5[_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];_0x6b6cx5[_0xb59f[124]][_0xb59f[495]]=mxClient[_0xb59f[496]]?_0xb59f[497]:_0xb59f[498];_0x6b6cx5[_0xb59f[124]][_0xb59f[499]]=_0xb59f[500];document[_0xb59f[112]][_0xb59f[62]](_0x6b6cx5);this[_0xb59f[1653]]=_0x6b6cx5};_0x6b6cx2=_0x6b6cx2||(null!=this[_0xb59f[1741]]?this[_0xb59f[1741]]:this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[501]]());this[_0xb59f[2267]](null,_0x6b6cx2);_0x6b6cx2=this[_0xb59f[2268]](null,_0x6b6cx2);null==_0x6b6cx2&&(_0x6b6cx2= new mxRectangle);this[_0xb59f[2256]](_0x6b6cx2);this[_0xb59f[2269]]();null!=_0x6b6cx4&&(this[_0xb59f[510]][_0xb59f[124]][_0xb59f[495]]=_0x6b6cx4,document[_0xb59f[112]][_0xb59f[266]](this[_0xb59f[1653]]),this[_0xb59f[1653]]=null);window[_0xb59f[879]]=mxResources[_0xb59f[203]](this[_0xb59f[2091]])||this[_0xb59f[2091]];mxLog[_0xb59f[2110]](_0xb59f[2266],_0x6b6cx3)};mxGraphView[_0xb59f[202]][_0xb59f[2270]]=function(_0x6b6cx2){return  new mxRectangleShape(_0x6b6cx2,_0xb59f[1391],_0xb59f[586])};mxGraphView[_0xb59f[202]][_0xb59f[2269]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[2271]]();if(null!=_0x6b6cx2){if(null==this[_0xb59f[1617]]||this[_0xb59f[1617]][_0xb59f[618]]!=_0x6b6cx2[_0xb59f[390]]){null!=this[_0xb59f[1617]]&&this[_0xb59f[1617]][_0xb59f[515]]();var _0x6b6cx3= new mxRectangle(0,0,1,1);this[_0xb59f[1617]]= new mxImageShape(_0x6b6cx3,_0x6b6cx2[_0xb59f[390]]);this[_0xb59f[1617]][_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]];this[_0xb59f[1617]][_0xb59f[176]](this[_0xb59f[2053]]);this[_0xb59f[1617]][_0xb59f[258]]()};this[_0xb59f[2272]](this[_0xb59f[1617]],_0x6b6cx2)}else {null!=this[_0xb59f[1617]]&&(this[_0xb59f[1617]][_0xb59f[515]](),this[_0xb59f[1617]]=null)};this[_0xb59f[1179]][_0xb59f[2273]]?(_0x6b6cx3=this[_0xb59f[2274]](),null==this[_0xb59f[2275]]?(this[_0xb59f[2275]]=this[_0xb59f[2270]](_0x6b6cx3),this[_0xb59f[2275]][_0xb59f[255]]=this[_0xb59f[255]],this[_0xb59f[2275]][_0xb59f[1596]]= !0,this[_0xb59f[2275]][_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]],this[_0xb59f[2275]][_0xb59f[176]](this[_0xb59f[2053]]),this[_0xb59f[2275]][_0xb59f[258]](),mxEvent[_0xb59f[169]](this[_0xb59f[2275]][_0xb59f[252]],_0xb59f[760],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[761]](_0x6b6cx2)})),mxEvent[_0xb59f[759]](this[_0xb59f[2275]][_0xb59f[252]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx2))}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){null!=this[_0xb59f[1179]][_0xb59f[2276]]&&this[_0xb59f[1179]][_0xb59f[2276]][_0xb59f[2277]]()&&this[_0xb59f[1179]][_0xb59f[2276]][_0xb59f[801]]();this[_0xb59f[1179]][_0xb59f[1009]]&&!mxEvent[_0xb59f[721]](_0x6b6cx2)&&this[_0xb59f[1179]][_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx2))}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6b6cx2))}))):(this[_0xb59f[2275]][_0xb59f[255]]=this[_0xb59f[255]],this[_0xb59f[2275]][_0xb59f[1562]]=_0x6b6cx3,this[_0xb59f[2275]][_0xb59f[258]]())):null!=this[_0xb59f[2275]]&&(this[_0xb59f[2275]][_0xb59f[515]](),this[_0xb59f[2275]]=null)};mxGraphView[_0xb59f[202]][_0xb59f[2274]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[2013]],_0x6b6cx3=this[_0xb59f[255]]*this[_0xb59f[1179]][_0xb59f[2012]];return  new mxRectangle(this[_0xb59f[255]]*this[_0xb59f[513]][_0xb59f[235]],this[_0xb59f[255]]*this[_0xb59f[513]][_0xb59f[236]],_0x6b6cx2[_0xb59f[117]]*_0x6b6cx3,_0x6b6cx2[_0xb59f[119]]*_0x6b6cx3)};mxGraphView[_0xb59f[202]][_0xb59f[2272]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[255]]=this[_0xb59f[255]];_0x6b6cx2[_0xb59f[1562]][_0xb59f[235]]=this[_0xb59f[255]]*this[_0xb59f[513]][_0xb59f[235]];_0x6b6cx2[_0xb59f[1562]][_0xb59f[236]]=this[_0xb59f[255]]*this[_0xb59f[513]][_0xb59f[236]];_0x6b6cx2[_0xb59f[1562]][_0xb59f[117]]=this[_0xb59f[255]]*_0x6b6cx3[_0xb59f[117]];_0x6b6cx2[_0xb59f[1562]][_0xb59f[119]]=this[_0xb59f[255]]*_0x6b6cx3[_0xb59f[119]];_0x6b6cx2[_0xb59f[258]]()};mxGraphView[_0xb59f[202]][_0xb59f[2267]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=this[_0xb59f[248]](_0x6b6cx3,!0);if(null!=_0x6b6cx5&&_0x6b6cx5[_0xb59f[2080]]){if(this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx3)){if(_0x6b6cx3!=this[_0xb59f[1741]]&&null!=_0x6b6cx2){_0x6b6cx5[_0xb59f[2079]][_0xb59f[235]]=0;_0x6b6cx5[_0xb59f[2079]][_0xb59f[236]]=0;_0x6b6cx5[_0xb59f[2078]][_0xb59f[235]]=_0x6b6cx2[_0xb59f[2078]][_0xb59f[235]];_0x6b6cx5[_0xb59f[2078]][_0xb59f[236]]=_0x6b6cx2[_0xb59f[2078]][_0xb59f[236]];var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx3);if(null!=_0x6b6cx9){if(!_0x6b6cx4[_0xb59f[250]](_0x6b6cx3)){var _0x6b6cxa=_0x6b6cx9[_0xb59f[1368]]||this[_0xb59f[2248]];_0x6b6cx9[_0xb59f[1500]]?(_0x6b6cx5[_0xb59f[2078]][_0xb59f[235]]+=_0x6b6cx9[_0xb59f[235]]*_0x6b6cx2[_0xb59f[117]]/this[_0xb59f[255]]+_0x6b6cxa[_0xb59f[235]],_0x6b6cx5[_0xb59f[2078]][_0xb59f[236]]+=_0x6b6cx9[_0xb59f[236]]*_0x6b6cx2[_0xb59f[119]]/this[_0xb59f[255]]+_0x6b6cxa[_0xb59f[236]]):(_0x6b6cx5[_0xb59f[2079]][_0xb59f[235]]=this[_0xb59f[255]]*_0x6b6cxa[_0xb59f[235]],_0x6b6cx5[_0xb59f[2079]][_0xb59f[236]]=this[_0xb59f[255]]*_0x6b6cxa[_0xb59f[236]],_0x6b6cx5[_0xb59f[2078]][_0xb59f[235]]+=_0x6b6cx9[_0xb59f[235]],_0x6b6cx5[_0xb59f[2078]][_0xb59f[236]]+=_0x6b6cx9[_0xb59f[236]])};_0x6b6cx5[_0xb59f[235]]=this[_0xb59f[255]]*(this[_0xb59f[513]][_0xb59f[235]]+_0x6b6cx5[_0xb59f[2078]][_0xb59f[235]]);_0x6b6cx5[_0xb59f[236]]=this[_0xb59f[255]]*(this[_0xb59f[513]][_0xb59f[236]]+_0x6b6cx5[_0xb59f[2078]][_0xb59f[236]]);_0x6b6cx5[_0xb59f[117]]=this[_0xb59f[255]]*_0x6b6cx9[_0xb59f[117]];_0x6b6cx5[_0xb59f[119]]=this[_0xb59f[255]]*_0x6b6cx9[_0xb59f[119]];if(_0x6b6cx4[_0xb59f[1193]](_0x6b6cx3)){if(_0x6b6cx9[_0xb59f[1500]]&&(_0x6b6cxa=mxUtils[_0xb59f[431]](_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]),0!=_0x6b6cxa)){var _0x6b6cx9=Math[_0xb59f[426]](_0x6b6cxa),_0x6b6cxa=Math[_0xb59f[427]](_0x6b6cxa),_0x6b6cx12= new mxPoint(_0x6b6cx5[_0xb59f[241]](),_0x6b6cx5[_0xb59f[242]]()),_0x6b6cx13= new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]()),_0x6b6cx9=mxUtils[_0xb59f[432]](_0x6b6cx12,_0x6b6cx9,_0x6b6cxa,_0x6b6cx13);_0x6b6cx5[_0xb59f[235]]=_0x6b6cx9[_0xb59f[235]]-_0x6b6cx5[_0xb59f[117]]/2;_0x6b6cx5[_0xb59f[236]]=_0x6b6cx9[_0xb59f[236]]-_0x6b6cx5[_0xb59f[119]]/2};this[_0xb59f[2279]](_0x6b6cx5)}}}}else {this[_0xb59f[2265]](_0x6b6cx3)};_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[2280]](_0x6b6cx3);null!=_0x6b6cxa&&(_0x6b6cx5[_0xb59f[2078]][_0xb59f[235]]+=_0x6b6cxa[_0xb59f[235]],_0x6b6cx5[_0xb59f[2078]][_0xb59f[236]]+=_0x6b6cxa[_0xb59f[236]])};if(null!=_0x6b6cx5&&(!this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx3)||_0x6b6cx3==this[_0xb59f[1741]])){_0x6b6cx9=_0x6b6cx4[_0xb59f[262]](_0x6b6cx3);for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9;_0x6b6cxa++){_0x6b6cx12=_0x6b6cx4[_0xb59f[263]](_0x6b6cx3,_0x6b6cxa),this[_0xb59f[2267]](_0x6b6cx5,_0x6b6cx12)}}};mxGraphView[_0xb59f[202]][_0xb59f[2279]]=function(_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);_0x6b6cx3==mxConstants[_0xb59f[2132]]?_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]]-=_0x6b6cx2[_0xb59f[117]]:_0x6b6cx3==mxConstants[_0xb59f[480]]&&(_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]]+=_0x6b6cx2[_0xb59f[117]]);_0x6b6cx3=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);_0x6b6cx3==mxConstants[_0xb59f[1687]]?_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]]-=_0x6b6cx2[_0xb59f[119]]:_0x6b6cx3==mxConstants[_0xb59f[482]]&&(_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]]+=_0x6b6cx2[_0xb59f[119]])};mxGraphView[_0xb59f[202]][_0xb59f[2268]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=this[_0xb59f[248]](_0x6b6cx3),_0x6b6cx9=null;if(null!=_0x6b6cx5){if(_0x6b6cx5[_0xb59f[2080]]){var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx3);if(null!=_0x6b6cxa&&_0x6b6cx4[_0xb59f[250]](_0x6b6cx3)){var _0x6b6cx12=this[_0xb59f[248]](this[_0xb59f[1710]](_0x6b6cx3,!0));_0x6b6cx5[_0xb59f[2090]](_0x6b6cx12,!0);if(null!=_0x6b6cx12&&_0x6b6cx4[_0xb59f[250]](_0x6b6cx12[_0xb59f[246]])&&!_0x6b6cx4[_0xb59f[1720]](_0x6b6cx12[_0xb59f[246]],_0x6b6cx3)){var _0x6b6cx13=this[_0xb59f[248]](_0x6b6cx4[_0xb59f[1197]](_0x6b6cx12[_0xb59f[246]]));this[_0xb59f[2268]](_0x6b6cx13,_0x6b6cx12[_0xb59f[246]])};var _0x6b6cx14=this[_0xb59f[248]](this[_0xb59f[1710]](_0x6b6cx3,!1));_0x6b6cx5[_0xb59f[2090]](_0x6b6cx14,!1);null!=_0x6b6cx14&&(_0x6b6cx4[_0xb59f[250]](_0x6b6cx14[_0xb59f[246]])&&!_0x6b6cx4[_0xb59f[1720]](_0x6b6cx14[_0xb59f[246]],_0x6b6cx3))&&(_0x6b6cx13=this[_0xb59f[248]](_0x6b6cx4[_0xb59f[1197]](_0x6b6cx14[_0xb59f[246]])),this[_0xb59f[2268]](_0x6b6cx13,_0x6b6cx14[_0xb59f[246]]));this[_0xb59f[2281]](_0x6b6cx5,_0x6b6cx12,_0x6b6cx14);this[_0xb59f[2282]](_0x6b6cx5,_0x6b6cxa[_0xb59f[1525]],_0x6b6cx12,_0x6b6cx14);this[_0xb59f[2283]](_0x6b6cx5,_0x6b6cx12,_0x6b6cx14);this[_0xb59f[2284]](_0x6b6cx5);this[_0xb59f[2285]](_0x6b6cx5)}else {null!=_0x6b6cxa&&(_0x6b6cxa[_0xb59f[1500]]&&null!=_0x6b6cx2&&_0x6b6cx4[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]))&&(_0x6b6cxa=this[_0xb59f[245]](_0x6b6cx2,_0x6b6cxa),null!=_0x6b6cxa&&(_0x6b6cx5[_0xb59f[235]]=_0x6b6cxa[_0xb59f[235]],_0x6b6cx5[_0xb59f[236]]=_0x6b6cxa[_0xb59f[236]],_0x6b6cxa[_0xb59f[235]]=_0x6b6cxa[_0xb59f[235]]/this[_0xb59f[255]]-this[_0xb59f[513]][_0xb59f[235]],_0x6b6cxa[_0xb59f[236]]=_0x6b6cxa[_0xb59f[236]]/this[_0xb59f[255]]-this[_0xb59f[513]][_0xb59f[236]],_0x6b6cx5[_0xb59f[2078]]=_0x6b6cxa,this[_0xb59f[2286]](_0x6b6cx2,_0x6b6cx5)))};_0x6b6cx5[_0xb59f[2080]]= !1;_0x6b6cx3!=this[_0xb59f[1741]]&&this[_0xb59f[1179]][_0xb59f[259]][_0xb59f[258]](_0x6b6cx5,!1,this[_0xb59f[2287]]())};if(_0x6b6cx4[_0xb59f[250]](_0x6b6cx3)||_0x6b6cx4[_0xb59f[1193]](_0x6b6cx3)){null!=_0x6b6cx5[_0xb59f[253]]&&null!=_0x6b6cx5[_0xb59f[253]][_0xb59f[1563]]&&(_0x6b6cx9=_0x6b6cx5[_0xb59f[253]][_0xb59f[1563]][_0xb59f[238]]()),null!=_0x6b6cx5[_0xb59f[963]]&&!this[_0xb59f[1179]][_0xb59f[2130]](_0x6b6cx5[_0xb59f[246]])&&null!=_0x6b6cx5[_0xb59f[963]][_0xb59f[1563]]&&(null!=_0x6b6cx9?_0x6b6cx9[_0xb59f[99]](_0x6b6cx5[_0xb59f[963]][_0xb59f[1563]]):_0x6b6cx9=_0x6b6cx5[_0xb59f[963]][_0xb59f[1563]][_0xb59f[238]]())}};if(null!=_0x6b6cx5&&(!this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx3)||_0x6b6cx3==this[_0xb59f[1741]])){_0x6b6cxa=_0x6b6cx4[_0xb59f[262]](_0x6b6cx3);for(_0x6b6cx12=0;_0x6b6cx12<_0x6b6cxa;_0x6b6cx12++){_0x6b6cx13=_0x6b6cx4[_0xb59f[263]](_0x6b6cx3,_0x6b6cx12),_0x6b6cx13=this[_0xb59f[2268]](_0x6b6cx5,_0x6b6cx13),null!=_0x6b6cx13&&(null==_0x6b6cx9?_0x6b6cx9=_0x6b6cx13:_0x6b6cx9[_0xb59f[99]](_0x6b6cx13))}};return _0x6b6cx9};mxGraphView[_0xb59f[202]][_0xb59f[2286]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx3[_0xb59f[246]];if(!this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx4)||_0x6b6cx4==this[_0xb59f[1741]]){for(var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx9=_0x6b6cx5[_0xb59f[262]](_0x6b6cx4),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9;_0x6b6cxa++){this[_0xb59f[2267]](_0x6b6cx3,_0x6b6cx5[_0xb59f[263]](_0x6b6cx4,_0x6b6cxa))}}};mxGraphView[_0xb59f[202]][_0xb59f[2281]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[2289]](_0x6b6cx2,_0x6b6cx3,!0,this[_0xb59f[1179]][_0xb59f[2288]](_0x6b6cx2,_0x6b6cx3,!0));this[_0xb59f[2289]](_0x6b6cx2,_0x6b6cx4,!1,this[_0xb59f[1179]][_0xb59f[2288]](_0x6b6cx2,_0x6b6cx4,!1))};mxGraphView[_0xb59f[202]][_0xb59f[2289]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=null;null!=_0x6b6cx5&&(_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[2290]](_0x6b6cx3,_0x6b6cx5));if(null==_0x6b6cx9&&null==_0x6b6cx3){_0x6b6cx3=this[_0xb59f[255]];_0x6b6cx5=this[_0xb59f[513]];var _0x6b6cxa=_0x6b6cx2[_0xb59f[2078]],_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx2[_0xb59f[246]])[_0xb59f[2006]](_0x6b6cx4);null!=_0x6b6cx9&&(_0x6b6cx9= new mxPoint(_0x6b6cx3*(_0x6b6cx5[_0xb59f[235]]+_0x6b6cx9[_0xb59f[235]]+_0x6b6cxa[_0xb59f[235]]),_0x6b6cx3*(_0x6b6cx5[_0xb59f[236]]+_0x6b6cx9[_0xb59f[236]]+_0x6b6cxa[_0xb59f[236]])))};_0x6b6cx2[_0xb59f[2088]](_0x6b6cx9,_0x6b6cx4)};mxGraphView[_0xb59f[202]][_0xb59f[2282]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx2){var _0x6b6cx9=[];_0x6b6cx9[_0xb59f[207]](_0x6b6cx2[_0xb59f[439]][0]);var _0x6b6cxa=this[_0xb59f[2291]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5);if(null!=_0x6b6cxa){_0x6b6cx4=this[_0xb59f[2292]](_0x6b6cx2,_0x6b6cx4,!0),_0x6b6cx5=this[_0xb59f[2292]](_0x6b6cx2,_0x6b6cx5,!1),_0x6b6cxa(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx3,_0x6b6cx9)}else {if(null!=_0x6b6cx3){for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx3[_0xb59f[67]];_0x6b6cxa++){null!=_0x6b6cx3[_0x6b6cxa]&&(_0x6b6cx5=mxUtils[_0xb59f[238]](_0x6b6cx3[_0x6b6cxa]),_0x6b6cx9[_0xb59f[207]](this[_0xb59f[2229]](_0x6b6cx2,_0x6b6cx5)))}}};_0x6b6cx3=_0x6b6cx2[_0xb59f[439]];_0x6b6cx9[_0xb59f[207]](_0x6b6cx3[_0x6b6cx3[_0xb59f[67]]-1]);_0x6b6cx2[_0xb59f[439]]=_0x6b6cx9}};mxGraphView[_0xb59f[202]][_0xb59f[2229]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[2078]];return  new mxPoint(this[_0xb59f[255]]*(_0x6b6cx3[_0xb59f[235]]+this[_0xb59f[513]][_0xb59f[235]]+_0x6b6cx4[_0xb59f[235]]),this[_0xb59f[255]]*(_0x6b6cx3[_0xb59f[236]]+this[_0xb59f[513]][_0xb59f[236]]+_0x6b6cx4[_0xb59f[236]]))};mxGraphView[_0xb59f[202]][_0xb59f[2291]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx2=null!=_0x6b6cx4&&_0x6b6cx4==_0x6b6cx5?mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_LOOP,this[_0xb59f[1179]][_0xb59f[2293]]):!mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_NOEDGESTYLE,!1)?_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2294]]]:null;_0xb59f[1516]== typeof _0x6b6cx2&&(_0x6b6cx3=mxStyleRegistry[_0xb59f[433]](_0x6b6cx2),null==_0x6b6cx3&&this[_0xb59f[2295]]()&&(_0x6b6cx3=mxUtils[_0xb59f[1545]](_0x6b6cx2)),_0x6b6cx2=_0x6b6cx3);return _0xb59f[279]== typeof _0x6b6cx2?_0x6b6cx2:null};mxGraphView[_0xb59f[202]][_0xb59f[2283]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0xb59f[439]],_0x6b6cx9=_0x6b6cx5[0];null==_0x6b6cx5[_0x6b6cx5[_0xb59f[67]]-1]&&null!=_0x6b6cx4&&this[_0xb59f[2296]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx3,!1);null==_0x6b6cx9&&null!=_0x6b6cx3&&this[_0xb59f[2296]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,!0)};mxGraphView[_0xb59f[202]][_0xb59f[2296]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3=this[_0xb59f[2292]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx5);var _0x6b6cx9=this[_0xb59f[2297]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5),_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[2298]](_0x6b6cx2);_0x6b6cx4=mxUtils[_0xb59f[431]](Number(_0x6b6cx3[_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]));var _0x6b6cx12= new mxPoint(_0x6b6cx3[_0xb59f[241]](),_0x6b6cx3[_0xb59f[242]]());if(0!=_0x6b6cx4){var _0x6b6cx13=Math[_0xb59f[426]](-_0x6b6cx4),_0x6b6cx14=Math[_0xb59f[427]](-_0x6b6cx4),_0x6b6cx9=mxUtils[_0xb59f[432]](_0x6b6cx9,_0x6b6cx13,_0x6b6cx14,_0x6b6cx12)};_0x6b6cx13=parseFloat(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2299]]]||0);_0x6b6cx13+=parseFloat(_0x6b6cx2[_0xb59f[124]][_0x6b6cx5?mxConstants[_0xb59f[2300]]:mxConstants[_0xb59f[2301]]]||0);_0x6b6cx3=this[_0xb59f[2302]](_0x6b6cx3,_0x6b6cx9,0==_0x6b6cx4&&_0x6b6cxa,_0x6b6cx13);0!=_0x6b6cx4&&(_0x6b6cx13=Math[_0xb59f[426]](_0x6b6cx4),_0x6b6cx14=Math[_0xb59f[427]](_0x6b6cx4),_0x6b6cx3=mxUtils[_0xb59f[432]](_0x6b6cx3,_0x6b6cx13,_0x6b6cx14,_0x6b6cx12));_0x6b6cx2[_0xb59f[2088]](_0x6b6cx3,_0x6b6cx5)};mxGraphView[_0xb59f[202]][_0xb59f[2292]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],_0x6b6cx4?mxConstants[_0xb59f[2303]]:mxConstants[_0xb59f[2304]]);null!=_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[248]](this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[736]](_0x6b6cx2)),null!=_0x6b6cx2&&(_0x6b6cx3=_0x6b6cx2));return _0x6b6cx3};mxGraphView[_0xb59f[202]][_0xb59f[2302]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=null;if(null!=_0x6b6cx2){var _0x6b6cxa=this[_0xb59f[2305]](_0x6b6cx2);if(null!=_0x6b6cxa&&null!=_0x6b6cx3&&(_0x6b6cx5=this[_0xb59f[2087]](_0x6b6cx2,_0x6b6cx5),0<_0x6b6cx5[_0xb59f[117]]||0<_0x6b6cx5[_0xb59f[119]])){_0x6b6cx9=_0x6b6cxa(_0x6b6cx5,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)};null==_0x6b6cx9&&(_0x6b6cx9=this[_0xb59f[245]](_0x6b6cx2))};return _0x6b6cx9};mxGraphView[_0xb59f[202]][_0xb59f[2230]]=function(_0x6b6cx2){var _0x6b6cx3=null!=_0x6b6cx2[_0xb59f[124]]?parseFloat(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2306]]])||0:0;return _0x6b6cx2[_0xb59f[241]]()+_0x6b6cx3*_0x6b6cx2[_0xb59f[117]]};mxGraphView[_0xb59f[202]][_0xb59f[2228]]=function(_0x6b6cx2){var _0x6b6cx3=null!=_0x6b6cx2[_0xb59f[124]]?parseFloat(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2307]]])||0:0;return _0x6b6cx2[_0xb59f[242]]()+_0x6b6cx3*_0x6b6cx2[_0xb59f[119]]};mxGraphView[_0xb59f[202]][_0xb59f[2087]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:0;null!=_0x6b6cx2&&(_0x6b6cx3+=parseFloat(_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2299]]]||0));return _0x6b6cx2[_0xb59f[2087]](_0x6b6cx3*this[_0xb59f[255]])};mxGraphView[_0xb59f[202]][_0xb59f[2305]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2061]]];if(_0xb59f[1516]== typeof _0x6b6cx2){var _0x6b6cx3=mxStyleRegistry[_0xb59f[433]](_0x6b6cx2);null==_0x6b6cx3&&this[_0xb59f[2295]]()&&(_0x6b6cx3=mxUtils[_0xb59f[1545]](_0x6b6cx2));_0x6b6cx2=_0x6b6cx3};return _0xb59f[279]== typeof _0x6b6cx2?_0x6b6cx2:null};mxGraphView[_0xb59f[202]][_0xb59f[2297]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=_0x6b6cx2[_0xb59f[439]];var _0x6b6cx5=null;if(null!=_0x6b6cx2&&(_0x6b6cx4||2<_0x6b6cx2[_0xb59f[67]]||null==_0x6b6cx3)){_0x6b6cx5=_0x6b6cx2[_0xb59f[67]],_0x6b6cx5=_0x6b6cx2[_0x6b6cx4?Math[_0xb59f[243]](1,_0x6b6cx5-1):Math[_0xb59f[160]](0,_0x6b6cx5-2)]};null==_0x6b6cx5&&null!=_0x6b6cx3&&(_0x6b6cx5= new mxPoint(_0x6b6cx3[_0xb59f[241]](),_0x6b6cx3[_0xb59f[242]]()));return _0x6b6cx5};mxGraphView[_0xb59f[202]][_0xb59f[1710]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=_0x6b6cx4[_0xb59f[1709]](_0x6b6cx2,_0x6b6cx3),_0x6b6cx9=_0x6b6cx5;null!=_0x6b6cx5&&_0x6b6cx5!=this[_0xb59f[1741]];){if(!this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx9)||this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx5)){_0x6b6cx9=_0x6b6cx5};_0x6b6cx5=_0x6b6cx4[_0xb59f[1197]](_0x6b6cx5)};_0x6b6cx4[_0xb59f[1197]](_0x6b6cx9)==_0x6b6cx4[_0xb59f[501]]()&&(_0x6b6cx9=null);return _0x6b6cx9};mxGraphView[_0xb59f[202]][_0xb59f[2284]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[439]];_0x6b6cx2[_0xb59f[67]]=0;if(null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]){var _0x6b6cx4=_0x6b6cx3[0],_0x6b6cx5=_0x6b6cx3[_0x6b6cx3[_0xb59f[67]]-1];if(null==_0x6b6cx4||null==_0x6b6cx5){_0x6b6cx2[_0xb59f[246]]!=this[_0xb59f[1741]]&&this[_0xb59f[200]](_0x6b6cx2[_0xb59f[246]],!0)}else {if(_0x6b6cx4[_0xb59f[235]]!=_0x6b6cx5[_0xb59f[235]]||_0x6b6cx4[_0xb59f[236]]!=_0x6b6cx5[_0xb59f[236]]){var _0x6b6cx9=_0x6b6cx5[_0xb59f[235]]-_0x6b6cx4[_0xb59f[235]],_0x6b6cxa=_0x6b6cx5[_0xb59f[236]]-_0x6b6cx4[_0xb59f[236]];_0x6b6cx2[_0xb59f[2085]]=Math[_0xb59f[428]](_0x6b6cx9*_0x6b6cx9+_0x6b6cxa*_0x6b6cxa)}else {_0x6b6cx2[_0xb59f[2085]]=0};var _0x6b6cx5=0,_0x6b6cx12=[],_0x6b6cxa=_0x6b6cx4;if(null!=_0x6b6cxa){for(var _0x6b6cx4=_0x6b6cxa[_0xb59f[235]],_0x6b6cx13=_0x6b6cxa[_0xb59f[236]],_0x6b6cx14=_0x6b6cx4,_0x6b6cx15=_0x6b6cx13,_0x6b6cx16=1;_0x6b6cx16<_0x6b6cx3[_0xb59f[67]];_0x6b6cx16++){var _0x6b6cx17=_0x6b6cx3[_0x6b6cx16];null!=_0x6b6cx17&&(_0x6b6cx9=_0x6b6cxa[_0xb59f[235]]-_0x6b6cx17[_0xb59f[235]],_0x6b6cxa=_0x6b6cxa[_0xb59f[236]]-_0x6b6cx17[_0xb59f[236]],_0x6b6cx9=Math[_0xb59f[428]](_0x6b6cx9*_0x6b6cx9+_0x6b6cxa*_0x6b6cxa),_0x6b6cx12[_0xb59f[207]](_0x6b6cx9),_0x6b6cx5+=_0x6b6cx9,_0x6b6cxa=_0x6b6cx17,_0x6b6cx4=Math[_0xb59f[243]](_0x6b6cxa[_0xb59f[235]],_0x6b6cx4),_0x6b6cx13=Math[_0xb59f[243]](_0x6b6cxa[_0xb59f[236]],_0x6b6cx13),_0x6b6cx14=Math[_0xb59f[160]](_0x6b6cxa[_0xb59f[235]],_0x6b6cx14),_0x6b6cx15=Math[_0xb59f[160]](_0x6b6cxa[_0xb59f[236]],_0x6b6cx15))};_0x6b6cx2[_0xb59f[67]]=_0x6b6cx5;_0x6b6cx2[_0xb59f[2086]]=_0x6b6cx12;_0x6b6cx2[_0xb59f[235]]=_0x6b6cx4;_0x6b6cx2[_0xb59f[236]]=_0x6b6cx13;_0x6b6cx2[_0xb59f[117]]=Math[_0xb59f[160]](1,_0x6b6cx14-_0x6b6cx4);_0x6b6cx2[_0xb59f[119]]=Math[_0xb59f[160]](1,_0x6b6cx15-_0x6b6cx13)}}}};mxGraphView[_0xb59f[202]][_0xb59f[245]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[241]](),_0x6b6cx5=_0x6b6cx2[_0xb59f[242]]();if(null!=_0x6b6cx2[_0xb59f[2086]]&&(null==_0x6b6cx3||_0x6b6cx3[_0xb59f[1500]])){for(var _0x6b6cx9=_0x6b6cx2[_0xb59f[439]][_0xb59f[67]],_0x6b6cxa=((null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[235]]/2:0)+0.5)*_0x6b6cx2[_0xb59f[67]],_0x6b6cx12=_0x6b6cx2[_0xb59f[2086]][0],_0x6b6cx13=0,_0x6b6cx14=1;_0x6b6cxa>_0x6b6cx13+_0x6b6cx12&&_0x6b6cx14<_0x6b6cx9-1;){_0x6b6cx13+=_0x6b6cx12,_0x6b6cx12=_0x6b6cx2[_0xb59f[2086]][_0x6b6cx14++]};_0x6b6cx9=0==_0x6b6cx12?0:(_0x6b6cxa-_0x6b6cx13)/_0x6b6cx12;_0x6b6cxa=_0x6b6cx2[_0xb59f[439]][_0x6b6cx14-1];_0x6b6cx14=_0x6b6cx2[_0xb59f[439]][_0x6b6cx14];if(null!=_0x6b6cxa&&null!=_0x6b6cx14){_0x6b6cx13=_0x6b6cx4=_0x6b6cx5=0;if(null!=_0x6b6cx3){var _0x6b6cx5=_0x6b6cx3[_0xb59f[236]],_0x6b6cx15=_0x6b6cx3[_0xb59f[1368]];null!=_0x6b6cx15&&(_0x6b6cx4=_0x6b6cx15[_0xb59f[235]],_0x6b6cx13=_0x6b6cx15[_0xb59f[236]])};_0x6b6cx15=_0x6b6cx14[_0xb59f[235]]-_0x6b6cxa[_0xb59f[235]];_0x6b6cx14=_0x6b6cx14[_0xb59f[236]]-_0x6b6cxa[_0xb59f[236]];_0x6b6cx4=_0x6b6cxa[_0xb59f[235]]+_0x6b6cx15*_0x6b6cx9+((0==_0x6b6cx12?0:_0x6b6cx14/_0x6b6cx12)*_0x6b6cx5+_0x6b6cx4)*this[_0xb59f[255]];_0x6b6cx5=_0x6b6cxa[_0xb59f[236]]+_0x6b6cx14*_0x6b6cx9-((0==_0x6b6cx12?0:_0x6b6cx15/_0x6b6cx12)*_0x6b6cx5-_0x6b6cx13)*this[_0xb59f[255]]}}else {null!=_0x6b6cx3&&(_0x6b6cx15=_0x6b6cx3[_0xb59f[1368]],null!=_0x6b6cx15&&(_0x6b6cx4+=_0x6b6cx15[_0xb59f[235]],_0x6b6cx5+=_0x6b6cx15[_0xb59f[236]]))};return  new mxPoint(_0x6b6cx4,_0x6b6cx5)};mxGraphView[_0xb59f[202]][_0xb59f[2308]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1721]](_0x6b6cx2[_0xb59f[246]]);if(null!=_0x6b6cx5){var _0x6b6cx9=_0x6b6cx2[_0xb59f[439]][_0xb59f[67]];if(_0x6b6cx5[_0xb59f[1500]]&&1<_0x6b6cx9){for(var _0x6b6cx5=_0x6b6cx2[_0xb59f[67]],_0x6b6cxa=_0x6b6cx2[_0xb59f[2086]],_0x6b6cx12=_0x6b6cx2[_0xb59f[439]][0],_0x6b6cx13=_0x6b6cx2[_0xb59f[439]][1],_0x6b6cx14=mxUtils[_0xb59f[440]](_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]],_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]],_0x6b6cx3,_0x6b6cx4),_0x6b6cx15=0,_0x6b6cx16=0,_0x6b6cx17=0,_0x6b6cx18=2;_0x6b6cx18<_0x6b6cx9;_0x6b6cx18++){_0x6b6cx16+=_0x6b6cxa[_0x6b6cx18-2],_0x6b6cx13=_0x6b6cx2[_0xb59f[439]][_0x6b6cx18],_0x6b6cx12=mxUtils[_0xb59f[440]](_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]],_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]],_0x6b6cx3,_0x6b6cx4),_0x6b6cx12<=_0x6b6cx14&&(_0x6b6cx14=_0x6b6cx12,_0x6b6cx15=_0x6b6cx18-1,_0x6b6cx17=_0x6b6cx16),_0x6b6cx12=_0x6b6cx13};_0x6b6cx9=_0x6b6cxa[_0x6b6cx15];_0x6b6cx12=_0x6b6cx2[_0xb59f[439]][_0x6b6cx15];_0x6b6cx13=_0x6b6cx2[_0xb59f[439]][_0x6b6cx15+1];_0x6b6cx14=_0x6b6cx13[_0xb59f[235]];_0x6b6cxa=_0x6b6cx13[_0xb59f[236]];_0x6b6cx2=_0x6b6cx12[_0xb59f[235]]-_0x6b6cx14;_0x6b6cx15=_0x6b6cx12[_0xb59f[236]]-_0x6b6cxa;_0x6b6cx14=_0x6b6cx3-_0x6b6cx14;_0x6b6cxa=_0x6b6cx4-_0x6b6cxa;_0x6b6cx14=_0x6b6cx2-_0x6b6cx14;_0x6b6cxa=_0x6b6cx15-_0x6b6cxa;_0x6b6cxa=_0x6b6cx14*_0x6b6cx2+_0x6b6cxa*_0x6b6cx15;_0x6b6cx2=Math[_0xb59f[428]](0>=_0x6b6cxa?0:_0x6b6cxa*_0x6b6cxa/(_0x6b6cx2*_0x6b6cx2+_0x6b6cx15*_0x6b6cx15));_0x6b6cx2>_0x6b6cx9&&(_0x6b6cx2=_0x6b6cx9);_0x6b6cx9=Math[_0xb59f[428]](mxUtils[_0xb59f[440]](_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]],_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]],_0x6b6cx3,_0x6b6cx4));-1==mxUtils[_0xb59f[2309]](_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]],_0x6b6cx13[_0xb59f[235]],_0x6b6cx13[_0xb59f[236]],_0x6b6cx3,_0x6b6cx4)&&(_0x6b6cx9= -_0x6b6cx9);return  new mxPoint(-2*((_0x6b6cx5/2-_0x6b6cx17-_0x6b6cx2)/_0x6b6cx5),_0x6b6cx9/this[_0xb59f[255]])}};return  new mxPoint};mxGraphView[_0xb59f[202]][_0xb59f[2285]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[439]];_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]]=_0x6b6cx2[_0xb59f[241]]();_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]]=_0x6b6cx2[_0xb59f[242]]();if(null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]&&null!=_0x6b6cx2[_0xb59f[2086]]){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx2[_0xb59f[246]]);if(_0x6b6cx4[_0xb59f[1500]]){var _0x6b6cx5=this[_0xb59f[245]](_0x6b6cx2,_0x6b6cx4);null!=_0x6b6cx5&&(_0x6b6cx2[_0xb59f[2079]]=_0x6b6cx5)}else {var _0x6b6cx5=_0x6b6cx3[0],_0x6b6cx9=_0x6b6cx3[_0x6b6cx3[_0xb59f[67]]-1];if(null!=_0x6b6cx5&&null!=_0x6b6cx9){var _0x6b6cx3=_0x6b6cx9[_0xb59f[235]]-_0x6b6cx5[_0xb59f[235]],_0x6b6cxa=_0x6b6cx9[_0xb59f[236]]-_0x6b6cx5[_0xb59f[236]],_0x6b6cx12=_0x6b6cx9=0,_0x6b6cx4=_0x6b6cx4[_0xb59f[1368]];null!=_0x6b6cx4&&(_0x6b6cx9=_0x6b6cx4[_0xb59f[235]],_0x6b6cx12=_0x6b6cx4[_0xb59f[236]]);_0x6b6cx4=_0x6b6cx5[_0xb59f[236]]+_0x6b6cxa/2+_0x6b6cx12*this[_0xb59f[255]];_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]]=_0x6b6cx5[_0xb59f[235]]+_0x6b6cx3/2+_0x6b6cx9*this[_0xb59f[255]];_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]]=_0x6b6cx4}}}};mxGraphView[_0xb59f[202]][_0xb59f[248]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=_0x6b6cx3|| !1;var _0x6b6cx4=null;null!=_0x6b6cx2&&(_0x6b6cx4=this[_0xb59f[1214]][_0xb59f[203]](_0x6b6cx2),this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx2)&&(null==_0x6b6cx4&&_0x6b6cx3&&this[_0xb59f[1179]][_0xb59f[1714]](_0x6b6cx2)?(_0x6b6cx4=this[_0xb59f[1230]](_0x6b6cx2),this[_0xb59f[1214]][_0xb59f[204]](_0x6b6cx2,_0x6b6cx4)):_0x6b6cx3&&(null!=_0x6b6cx4&&this[_0xb59f[2255]])&&(_0x6b6cx4[_0xb59f[124]]=this[_0xb59f[1179]][_0xb59f[1705]](_0x6b6cx2))));return _0x6b6cx4};mxGraphView[_0xb59f[202]][_0xb59f[2287]]=function(){return this[_0xb59f[2254]]};mxGraphView[_0xb59f[202]][_0xb59f[2310]]=function(_0x6b6cx2){this[_0xb59f[2254]]=_0x6b6cx2};mxGraphView[_0xb59f[202]][_0xb59f[2295]]=function(){return this[_0xb59f[2251]]};mxGraphView[_0xb59f[202]][_0xb59f[2311]]=function(_0x6b6cx2){this[_0xb59f[2251]]=_0x6b6cx2};mxGraphView[_0xb59f[202]][_0xb59f[2312]]=function(){return this[_0xb59f[1214]]};mxGraphView[_0xb59f[202]][_0xb59f[1517]]=function(_0x6b6cx2){this[_0xb59f[1214]]=_0x6b6cx2};mxGraphView[_0xb59f[202]][_0xb59f[2313]]=function(_0x6b6cx2){if(null==_0x6b6cx2){return this[_0xb59f[1214]]};for(var _0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5=this[_0xb59f[248]](_0x6b6cx2[_0x6b6cx4]);null!=_0x6b6cx5&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx5)};return _0x6b6cx3};mxGraphView[_0xb59f[202]][_0xb59f[2265]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=_0x6b6cx2&&(_0x6b6cx3=this[_0xb59f[1214]][_0xb59f[205]](_0x6b6cx2),null!=_0x6b6cx3&&(this[_0xb59f[1179]][_0xb59f[259]][_0xb59f[515]](_0x6b6cx3),_0x6b6cx3[_0xb59f[515]]()));return _0x6b6cx3};mxGraphView[_0xb59f[202]][_0xb59f[1230]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[1705]](_0x6b6cx2);_0x6b6cx2= new mxCellState(this,_0x6b6cx2,_0x6b6cx3);this[_0xb59f[1179]][_0xb59f[259]][_0xb59f[2155]](_0x6b6cx2,this[_0xb59f[2287]]());return _0x6b6cx2};mxGraphView[_0xb59f[202]][_0xb59f[2051]]=function(){return this[_0xb59f[510]]};mxGraphView[_0xb59f[202]][_0xb59f[2052]]=function(){return this[_0xb59f[2053]]};mxGraphView[_0xb59f[202]][_0xb59f[2024]]=function(){return this[_0xb59f[505]]};mxGraphView[_0xb59f[202]][_0xb59f[1524]]=function(){return this[_0xb59f[506]]};mxGraphView[_0xb59f[202]][_0xb59f[2314]]=function(_0x6b6cx2){_0x6b6cx2=mxEvent[_0xb59f[728]](_0x6b6cx2);return _0x6b6cx2==this[_0xb59f[1179]][_0xb59f[526]]||_0x6b6cx2[_0xb59f[265]]==this[_0xb59f[2053]]||null!=_0x6b6cx2[_0xb59f[265]]&&_0x6b6cx2[_0xb59f[265]][_0xb59f[265]]==this[_0xb59f[2053]]||_0x6b6cx2==this[_0xb59f[510]][_0xb59f[265]]||_0x6b6cx2==this[_0xb59f[510]]||_0x6b6cx2==this[_0xb59f[2053]]||_0x6b6cx2==this[_0xb59f[505]]||_0x6b6cx2==this[_0xb59f[506]]};mxGraphView[_0xb59f[202]][_0xb59f[2315]]=function(_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[445]](this[_0xb59f[1179]][_0xb59f[526]]);_0x6b6cx2= new mxPoint(_0x6b6cx2[_0xb59f[782]]-_0x6b6cx3[_0xb59f[235]],_0x6b6cx2[_0xb59f[784]]-_0x6b6cx3[_0xb59f[236]]);var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[359]],_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[159]];if(_0x6b6cx3>_0x6b6cx4&&_0x6b6cx2[_0xb59f[235]]>_0x6b6cx4+2&&_0x6b6cx2[_0xb59f[235]]<=_0x6b6cx3){return !0};_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[167]];_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[157]];return _0x6b6cx3>_0x6b6cx4&&_0x6b6cx2[_0xb59f[236]]>_0x6b6cx4+2&&_0x6b6cx2[_0xb59f[236]]<=_0x6b6cx3?!0:!1};mxGraphView[_0xb59f[202]][_0xb59f[176]]=function(){this[_0xb59f[2163]]();var _0x6b6cx2=this[_0xb59f[1179]];_0x6b6cx2[_0xb59f[507]]==mxConstants[_0xb59f[508]]?this[_0xb59f[1569]]():_0x6b6cx2[_0xb59f[507]]==mxConstants[_0xb59f[1523]]?this[_0xb59f[1571]]():this[_0xb59f[1570]]()};mxGraphView[_0xb59f[202]][_0xb59f[2163]]=function(){var _0x6b6cx2=this[_0xb59f[1179]],_0x6b6cx3=_0x6b6cx2[_0xb59f[526]];if(null!=_0x6b6cx3){mxEvent[_0xb59f[759]](_0x6b6cx3,mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){mxClient[_0xb59f[754]]&&_0x6b6cx2[_0xb59f[2203]]()&&_0x6b6cx2[_0xb59f[2126]](!_0x6b6cx2[_0xb59f[2134]]());this[_0xb59f[2314]](_0x6b6cx3)&&(!mxClient[_0xb59f[80]]&&!mxClient[_0xb59f[76]]&&!mxClient[_0xb59f[71]]&&!mxClient[_0xb59f[75]]||!this[_0xb59f[2315]](_0x6b6cx3))&&_0x6b6cx2[_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx3))}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){this[_0xb59f[2314]](_0x6b6cx3)&&_0x6b6cx2[_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx3))}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){this[_0xb59f[2314]](_0x6b6cx3)&&_0x6b6cx2[_0xb59f[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6b6cx3))}));mxEvent[_0xb59f[169]](_0x6b6cx3,_0xb59f[760],mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){_0x6b6cx2[_0xb59f[761]](_0x6b6cx3)}));var _0x6b6cx4=function(_0x6b6cx4){var _0x6b6cx9=null;mxClient[_0xb59f[754]]&&(_0x6b6cx9=mxEvent[_0xb59f[731]](_0x6b6cx4),_0x6b6cx4=mxEvent[_0xb59f[733]](_0x6b6cx4),_0x6b6cx4=mxUtils[_0xb59f[2196]](_0x6b6cx3,_0x6b6cx9,_0x6b6cx4),_0x6b6cx9=_0x6b6cx2[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2[_0xb59f[999]](_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]])));return _0x6b6cx9};_0x6b6cx2[_0xb59f[1133]]({mouseDown:function(_0x6b6cx3,_0x6b6cx4){_0x6b6cx2[_0xb59f[2316]][_0xb59f[1032]]()},mouseMove:function(){},mouseUp:function(){}});this[_0xb59f[2317]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){null!=_0x6b6cx2[_0xb59f[2276]]&&_0x6b6cx2[_0xb59f[2276]][_0xb59f[2277]]()&&_0x6b6cx2[_0xb59f[2276]][_0xb59f[801]]();this[_0xb59f[2252]]&&(_0x6b6cx2[_0xb59f[1009]]&&!mxEvent[_0xb59f[721]](_0x6b6cx3))&&_0x6b6cx2[_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx3,_0x6b6cx4(_0x6b6cx3)))});this[_0xb59f[2318]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){this[_0xb59f[2252]]&&_0x6b6cx2[_0xb59f[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6b6cx3))});mxEvent[_0xb59f[759]](document,null,this[_0xb59f[2317]],this[_0xb59f[2318]])}};mxGraphView[_0xb59f[202]][_0xb59f[1570]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[526]];null!=_0x6b6cx2&&(this[_0xb59f[510]]=this[_0xb59f[2319]](_0xb59f[118],_0xb59f[118]),this[_0xb59f[2053]]=this[_0xb59f[2319]](_0xb59f[942],_0xb59f[942]),this[_0xb59f[505]]=this[_0xb59f[2319]](_0xb59f[942],_0xb59f[942]),this[_0xb59f[506]]=this[_0xb59f[2319]](_0xb59f[942],_0xb59f[942]),this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[2053]]),this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[505]]),this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[506]]),_0x6b6cx2[_0xb59f[62]](this[_0xb59f[510]]),mxClient[_0xb59f[496]]&&(_0x6b6cx2=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[517]]();this[_0xb59f[2320]](_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]+this[_0xb59f[1179]][_0xb59f[467]],_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]+this[_0xb59f[1179]][_0xb59f[467]])}),mxEvent[_0xb59f[169]](window,_0xb59f[129],_0x6b6cx2)))};mxGraphView[_0xb59f[202]][_0xb59f[2320]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=this[_0xb59f[1179]][_0xb59f[526]]){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[167]];this[_0xb59f[510]][_0xb59f[124]][_0xb59f[117]]=this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[359]]<_0x6b6cx2?_0x6b6cx2+_0xb59f[168]:_0xb59f[118];this[_0xb59f[510]][_0xb59f[124]][_0xb59f[119]]=_0x6b6cx4<_0x6b6cx3?_0x6b6cx3+_0xb59f[168]:_0xb59f[118]}};mxGraphView[_0xb59f[202]][_0xb59f[2319]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[529]);null!=_0x6b6cx2&&null!=_0x6b6cx3?(_0x6b6cx4[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492],_0x6b6cx4[_0xb59f[124]][_0xb59f[361]]=_0xb59f[946],_0x6b6cx4[_0xb59f[124]][_0xb59f[125]]=_0xb59f[946],_0x6b6cx4[_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2,_0x6b6cx4[_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3):_0x6b6cx4[_0xb59f[124]][_0xb59f[491]]=_0xb59f[1500];return _0x6b6cx4};mxGraphView[_0xb59f[202]][_0xb59f[1571]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[526]];if(null!=_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[359]],_0x6b6cx4=_0x6b6cx2[_0xb59f[167]];this[_0xb59f[510]]=this[_0xb59f[2321]](_0x6b6cx3,_0x6b6cx4);this[_0xb59f[2053]]=this[_0xb59f[2321]](_0x6b6cx3,_0x6b6cx4);this[_0xb59f[505]]=this[_0xb59f[2321]](_0x6b6cx3,_0x6b6cx4);this[_0xb59f[506]]=this[_0xb59f[2321]](_0x6b6cx3,_0x6b6cx4);this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[2053]]);this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[505]]);this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[506]]);_0x6b6cx2[_0xb59f[62]](this[_0xb59f[510]])}};mxGraphView[_0xb59f[202]][_0xb59f[2321]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](mxClient[_0xb59f[463]]+_0xb59f[1499]);_0x6b6cx4[_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];_0x6b6cx4[_0xb59f[124]][_0xb59f[361]]=_0xb59f[946];_0x6b6cx4[_0xb59f[124]][_0xb59f[125]]=_0xb59f[946];_0x6b6cx4[_0xb59f[124]][_0xb59f[117]]=_0x6b6cx2+_0xb59f[168];_0x6b6cx4[_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3+_0xb59f[168];_0x6b6cx4[_0xb59f[57]](_0xb59f[1462],_0x6b6cx2+_0xb59f[537]+_0x6b6cx3);_0x6b6cx4[_0xb59f[57]](_0xb59f[2322],_0xb59f[2323]);return _0x6b6cx4};mxGraphView[_0xb59f[202]][_0xb59f[1569]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[526]];this[_0xb59f[510]]=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[449]);this[_0xb59f[2053]]=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[449]);this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[2053]]);this[_0xb59f[505]]=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[449]);this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[505]]);this[_0xb59f[506]]=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[449]);this[_0xb59f[510]][_0xb59f[62]](this[_0xb59f[506]]);var _0x6b6cx3=document[_0xb59f[509]](mxConstants.NS_SVG,_0xb59f[571]);_0x6b6cx3[_0xb59f[124]][_0xb59f[117]]=_0xb59f[118];_0x6b6cx3[_0xb59f[124]][_0xb59f[119]]=_0xb59f[118];_0x6b6cx3[_0xb59f[124]][_0xb59f[495]]=_0xb59f[694];_0x6b6cx3[_0xb59f[62]](this[_0xb59f[510]]);null!=_0x6b6cx2&&(_0x6b6cx2[_0xb59f[62]](_0x6b6cx3),_0xb59f[2324]==mxUtils[_0xb59f[275]](_0x6b6cx2)[_0xb59f[491]]&&(_0x6b6cx2[_0xb59f[124]][_0xb59f[491]]=_0xb59f[1500]))};mxGraphView[_0xb59f[202]][_0xb59f[515]]=function(){var _0x6b6cx2=null!=this[_0xb59f[510]]?this[_0xb59f[510]][_0xb59f[538]]:null;null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[510]]);null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[265]]&&(this[_0xb59f[200]](this[_0xb59f[1741]],!0),mxEvent[_0xb59f[938]](document,null,this[_0xb59f[2317]],this[_0xb59f[2318]]),mxEvent[_0xb59f[762]](this[_0xb59f[1179]][_0xb59f[526]]),_0x6b6cx2[_0xb59f[265]][_0xb59f[266]](_0x6b6cx2),this[_0xb59f[506]]=this[_0xb59f[505]]=this[_0xb59f[2053]]=this[_0xb59f[510]]=this[_0xb59f[2318]]=this[_0xb59f[2317]]=null)};function mxCurrentRootChange(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[441]]=_0x6b6cx2;this[_0xb59f[257]]=this[_0xb59f[813]]=_0x6b6cx3;this[_0xb59f[2325]]=null==_0x6b6cx3;if(!this[_0xb59f[2325]]){for(var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[1741]],_0x6b6cx5=this[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]();null!=_0x6b6cx4;){if(_0x6b6cx4==_0x6b6cx3){this[_0xb59f[2325]]= !0;break};_0x6b6cx4=_0x6b6cx5[_0xb59f[1197]](_0x6b6cx4)}}}mxCurrentRootChange[_0xb59f[202]][_0xb59f[350]]=function(){var _0x6b6cx2=this[_0xb59f[441]][_0xb59f[1741]];this[_0xb59f[441]][_0xb59f[1741]]=this[_0xb59f[257]];this[_0xb59f[257]]=_0x6b6cx2;_0x6b6cx2=this[_0xb59f[441]][_0xb59f[1179]][_0xb59f[2326]](this[_0xb59f[441]][_0xb59f[1741]]);null!=_0x6b6cx2&&(this[_0xb59f[441]][_0xb59f[513]]= new mxPoint(-_0x6b6cx2[_0xb59f[235]],-_0x6b6cx2[_0xb59f[236]]));this[_0xb59f[441]][_0xb59f[746]]( new mxEventObject(this[_0xb59f[2325]]?mxEvent[_0xb59f[2327]]:mxEvent[_0xb59f[2328]],_0xb59f[813],this[_0xb59f[441]][_0xb59f[1741]],_0xb59f[257],this[_0xb59f[257]]));this[_0xb59f[2325]]?(this[_0xb59f[441]][_0xb59f[200]](this[_0xb59f[441]][_0xb59f[1741]],!0),this[_0xb59f[441]][_0xb59f[2264]]()):this[_0xb59f[441]][_0xb59f[802]]();this[_0xb59f[2325]]=!this[_0xb59f[2325]]};function mxGraph(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[2329]]=null;this[_0xb59f[2330]]=_0x6b6cx4;this[_0xb59f[507]]=mxClient[_0xb59f[48]]?mxConstants[_0xb59f[508]]:_0x6b6cx4==mxConstants[_0xb59f[2331]]&&mxClient[_0xb59f[47]]?mxConstants[_0xb59f[1523]]:_0x6b6cx4==mxConstants[_0xb59f[2332]]?mxConstants[_0xb59f[1656]]:_0x6b6cx4==mxConstants[_0xb59f[2333]]?mxConstants[_0xb59f[2209]]:mxConstants[_0xb59f[2334]];this[_0xb59f[251]]=null!=_0x6b6cx3?_0x6b6cx3: new mxGraphModel;this[_0xb59f[2335]]=[];this[_0xb59f[2336]]=[];this[_0xb59f[259]]=this[_0xb59f[2337]]();this[_0xb59f[2339]](this[_0xb59f[2338]]());this[_0xb59f[2341]](null!=_0x6b6cx5?_0x6b6cx5:this[_0xb59f[2340]]());this[_0xb59f[441]]=this[_0xb59f[2342]]();this[_0xb59f[2343]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1177]](_0x6b6cx3[_0xb59f[720]](_0xb59f[1061])[_0xb59f[1065]])});this[_0xb59f[251]][_0xb59f[169]](mxEvent.CHANGE,this[_0xb59f[2343]]);this[_0xb59f[2344]]();null!=_0x6b6cx2&&this[_0xb59f[176]](_0x6b6cx2);this[_0xb59f[441]][_0xb59f[2259]]()}mxLoadResources&&mxResources[_0xb59f[99]](mxClient[_0xb59f[86]]+_0xb59f[2345]);mxGraph[_0xb59f[202]]= new mxEventSource;mxGraph[_0xb59f[202]][_0xb59f[196]]=mxGraph;mxGraph[_0xb59f[202]][_0xb59f[2346]]=[];mxGraph[_0xb59f[202]][_0xb59f[2329]]=null;mxGraph[_0xb59f[202]][_0xb59f[1009]]= !1;mxGraph[_0xb59f[202]][_0xb59f[251]]=null;mxGraph[_0xb59f[202]][_0xb59f[441]]=null;mxGraph[_0xb59f[202]][_0xb59f[94]]=null;mxGraph[_0xb59f[202]][_0xb59f[2105]]=null;mxGraph[_0xb59f[202]][_0xb59f[2347]]=null;mxGraph[_0xb59f[202]][_0xb59f[259]]=null;mxGraph[_0xb59f[202]][_0xb59f[2335]]=null;mxGraph[_0xb59f[202]][_0xb59f[2330]]=null;mxGraph[_0xb59f[202]][_0xb59f[507]]=null;mxGraph[_0xb59f[202]][_0xb59f[1020]]=10;mxGraph[_0xb59f[202]][_0xb59f[991]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2348]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2349]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2350]]=700;mxGraph[_0xb59f[202]][_0xb59f[2351]]=25;mxGraph[_0xb59f[202]][_0xb59f[2352]]=0;mxGraph[_0xb59f[202]][_0xb59f[2352]]=0;mxGraph[_0xb59f[202]][_0xb59f[2213]]=0;mxGraph[_0xb59f[202]][_0xb59f[2215]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2353]]=4;mxGraph[_0xb59f[202]][_0xb59f[2354]]=0.5;mxGraph[_0xb59f[202]][_0xb59f[2355]]=null;mxGraph[_0xb59f[202]][_0xb59f[2356]]=null;mxGraph[_0xb59f[202]][_0xb59f[1617]]=null;mxGraph[_0xb59f[202]][_0xb59f[2273]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2357]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2358]]=_0xb59f[579];mxGraph[_0xb59f[202]][_0xb59f[2359]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2360]]=20;mxGraph[_0xb59f[202]][_0xb59f[2361]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2013]]=mxConstants[_0xb59f[516]];mxGraph[_0xb59f[202]][_0xb59f[2012]]=1.5;mxGraph[_0xb59f[202]][_0xb59f[984]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2362]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2363]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2364]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2365]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2366]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2367]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2368]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2369]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2206]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2370]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2371]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2372]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2373]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2374]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2375]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2376]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2377]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2378]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2379]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2380]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2381]]= !1;mxGraph[_0xb59f[202]][_0xb59f[1012]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2382]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2383]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2384]]= !1;mxGraph[_0xb59f[202]][_0xb59f[1013]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2385]]=null;mxGraph[_0xb59f[202]][_0xb59f[2386]]=null;mxGraph[_0xb59f[202]][_0xb59f[2387]]=null;mxGraph[_0xb59f[202]][_0xb59f[2388]]=null;mxGraph[_0xb59f[202]][_0xb59f[2389]]= !1;mxGraph[_0xb59f[202]][_0xb59f[467]]=0;mxGraph[_0xb59f[202]][_0xb59f[2158]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2159]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2168]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2390]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2391]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2392]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2393]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2394]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2395]]=1.2;mxGraph[_0xb59f[202]][_0xb59f[2396]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2397]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2398]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2399]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2400]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2401]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2402]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2293]]=mxEdgeStyle[_0xb59f[2403]];mxGraph[_0xb59f[202]][_0xb59f[2404]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2405]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2406]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2407]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2408]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2409]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2410]]= !1;mxGraph[_0xb59f[202]][_0xb59f[2411]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2412]]= !0;mxGraph[_0xb59f[202]][_0xb59f[2180]]=mxConstants[_0xb59f[2065]];mxGraph[_0xb59f[202]][_0xb59f[2336]]=null;mxGraph[_0xb59f[202]][_0xb59f[2413]]=0.1;mxGraph[_0xb59f[202]][_0xb59f[2414]]=8;mxGraph[_0xb59f[202]][_0xb59f[1136]]=0;mxGraph[_0xb59f[202]][_0xb59f[1137]]=0;mxGraph[_0xb59f[202]][_0xb59f[2415]]= new mxImage(mxClient[_0xb59f[88]]+_0xb59f[2416],9,9);mxGraph[_0xb59f[202]][_0xb59f[2417]]= new mxImage(mxClient[_0xb59f[88]]+_0xb59f[2418],9,9);mxGraph[_0xb59f[202]][_0xb59f[2419]]= new mxImage(_0xb59f[2420],16,16);mxGraph[_0xb59f[202]][_0xb59f[2421]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[2422]:_0xb59f[110];mxGraph[_0xb59f[202]][_0xb59f[2423]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[2424]:_0xb59f[110];mxGraph[_0xb59f[202]][_0xb59f[2425]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[2426]:_0xb59f[110];mxGraph[_0xb59f[202]][_0xb59f[176]]=function(_0x6b6cx2){this[_0xb59f[526]]=_0x6b6cx2;this[_0xb59f[2347]]=this[_0xb59f[2427]]();this[_0xb59f[441]][_0xb59f[176]]();this[_0xb59f[2258]]();mxClient[_0xb59f[80]]&&(mxEvent[_0xb59f[169]](window,_0xb59f[2428],mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[515]]()})),mxEvent[_0xb59f[169]](_0x6b6cx2,_0xb59f[2429],mxUtils[_0xb59f[885]](this,function(){return this[_0xb59f[2203]]()})));8==document[_0xb59f[5]]&&_0x6b6cx2[_0xb59f[1583]](_0xb59f[1582],_0xb59f[2430])};mxGraph[_0xb59f[202]][_0xb59f[2344]]=function(_0x6b6cx2){this[_0xb59f[2276]]= new mxTooltipHandler(this);this[_0xb59f[2276]][_0xb59f[995]](!1);this[_0xb59f[2316]]= new mxPanningHandler(this);this[_0xb59f[2316]][_0xb59f[2431]]= !1;this[_0xb59f[2432]]= new mxSelectionCellsHandler(this);this[_0xb59f[2433]]= new mxConnectionHandler(this);this[_0xb59f[2433]][_0xb59f[995]](!1);this[_0xb59f[1011]]= new mxGraphHandler(this)};mxGraph[_0xb59f[202]][_0xb59f[2338]]=function(){return  new mxGraphSelectionModel(this)};mxGraph[_0xb59f[202]][_0xb59f[2340]]=function(){return  new mxStylesheet};mxGraph[_0xb59f[202]][_0xb59f[2342]]=function(){return  new mxGraphView(this)};mxGraph[_0xb59f[202]][_0xb59f[2337]]=function(){return  new mxCellRenderer};mxGraph[_0xb59f[202]][_0xb59f[2427]]=function(){return  new mxCellEditor(this)};mxGraph[_0xb59f[202]][_0xb59f[502]]=function(){return this[_0xb59f[251]]};mxGraph[_0xb59f[202]][_0xb59f[249]]=function(){return this[_0xb59f[441]]};mxGraph[_0xb59f[202]][_0xb59f[2434]]=function(){return this[_0xb59f[94]]};mxGraph[_0xb59f[202]][_0xb59f[2341]]=function(_0x6b6cx2){this[_0xb59f[94]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2435]]=function(){return this[_0xb59f[2105]]};mxGraph[_0xb59f[202]][_0xb59f[2339]]=function(_0x6b6cx2){this[_0xb59f[2105]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2436]]=function(_0x6b6cx2){for(var _0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5=_0x6b6cx2[_0x6b6cx4];if(_0x6b6cx5[_0xb59f[196]]!=mxRootChange){var _0x6b6cx9=null;_0x6b6cx5 instanceof mxChildChange&&null==_0x6b6cx5[_0xb59f[257]]?_0x6b6cx9=_0x6b6cx5[_0xb59f[247]]:null!=_0x6b6cx5[_0xb59f[246]]&&_0x6b6cx5[_0xb59f[246]] instanceof mxCell&&(_0x6b6cx9=_0x6b6cx5[_0xb59f[246]]);null!=_0x6b6cx9&&0>mxUtils[_0xb59f[2]](_0x6b6cx3,_0x6b6cx9)&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx9)}};return this[_0xb59f[502]]()[_0xb59f[1964]](_0x6b6cx3)};mxGraph[_0xb59f[202]][_0xb59f[1177]]=function(_0x6b6cx2){for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3++){this[_0xb59f[2437]](_0x6b6cx2[_0x6b6cx3])};this[_0xb59f[2439]](this[_0xb59f[2438]](_0x6b6cx2));this[_0xb59f[441]][_0xb59f[2264]]();this[_0xb59f[2258]]()};mxGraph[_0xb59f[202]][_0xb59f[2438]]=function(_0x6b6cx2){for(var _0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5=_0x6b6cx2[_0x6b6cx4];if(_0x6b6cx5 instanceof mxRootChange){break}else {_0x6b6cx5 instanceof mxChildChange?null!=_0x6b6cx5[_0xb59f[257]]&&null==_0x6b6cx5[_0xb59f[1101]]&&(_0x6b6cx3=_0x6b6cx3[_0xb59f[1919]](this[_0xb59f[251]][_0xb59f[1939]](_0x6b6cx5[_0xb59f[247]]))):_0x6b6cx5 instanceof mxVisibleChange&&(_0x6b6cx3=_0x6b6cx3[_0xb59f[1919]](this[_0xb59f[251]][_0xb59f[1939]](_0x6b6cx5[_0xb59f[246]])))}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2437]]=function(_0x6b6cx2){if(_0x6b6cx2 instanceof mxRootChange){this[_0xb59f[2440]](),this[_0xb59f[2441]](_0x6b6cx2[_0xb59f[257]]),this[_0xb59f[2398]]&&(this[_0xb59f[441]][_0xb59f[255]]=1,this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]]=0,this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]=0),this[_0xb59f[746]]( new mxEventObject(mxEvent.ROOT))}else {if(_0x6b6cx2 instanceof mxChildChange){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0xb59f[247]]);null!=_0x6b6cx3?this[_0xb59f[441]][_0xb59f[2263]](_0x6b6cx2[_0xb59f[247]],!0,!1,null!=_0x6b6cx2[_0xb59f[257]]):(this[_0xb59f[2441]](_0x6b6cx2[_0xb59f[247]]),this[_0xb59f[441]][_0xb59f[1741]]==_0x6b6cx2[_0xb59f[247]]&&this[_0xb59f[2442]]());_0x6b6cx3!=_0x6b6cx2[_0xb59f[257]]&&(null!=_0x6b6cx3&&this[_0xb59f[441]][_0xb59f[2263]](_0x6b6cx3,!1,!1),null!=_0x6b6cx2[_0xb59f[257]]&&this[_0xb59f[441]][_0xb59f[2263]](_0x6b6cx2[_0xb59f[257]],!1,!1))}else {_0x6b6cx2 instanceof mxTerminalChange||_0x6b6cx2 instanceof mxGeometryChange?this[_0xb59f[441]][_0xb59f[2263]](_0x6b6cx2[_0xb59f[246]]):_0x6b6cx2 instanceof mxValueChange?this[_0xb59f[441]][_0xb59f[2263]](_0x6b6cx2[_0xb59f[246]],!1,!1):_0x6b6cx2 instanceof mxStyleChange?(this[_0xb59f[441]][_0xb59f[2263]](_0x6b6cx2[_0xb59f[246]],!0,!0,!1),this[_0xb59f[441]][_0xb59f[2265]](_0x6b6cx2[_0xb59f[246]])):null!=_0x6b6cx2[_0xb59f[246]]&&_0x6b6cx2[_0xb59f[246]] instanceof mxCell&&this[_0xb59f[2441]](_0x6b6cx2[_0xb59f[246]])}}};mxGraph[_0xb59f[202]][_0xb59f[2441]]=function(_0x6b6cx2){for(var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2),_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3;_0x6b6cx4++){this[_0xb59f[2441]](this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,_0x6b6cx4))};this[_0xb59f[441]][_0xb59f[2265]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2443]]=function(_0x6b6cx2,_0x6b6cx3){null==_0x6b6cx2[_0xb59f[1211]]&&(_0x6b6cx2[_0xb59f[1211]]=[]);_0x6b6cx2[_0xb59f[1211]][_0xb59f[207]](_0x6b6cx3);var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);null!=_0x6b6cx4&&this[_0xb59f[259]][_0xb59f[258]](_0x6b6cx4);this[_0xb59f[746]]( new mxEventObject(mxEvent.ADD_OVERLAY,_0xb59f[246],_0x6b6cx2,_0xb59f[2201],_0x6b6cx3));return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2200]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[1211]]};mxGraph[_0xb59f[202]][_0xb59f[2444]]=function(_0x6b6cx2,_0x6b6cx3){if(null==_0x6b6cx3){this[_0xb59f[2445]](_0x6b6cx2)}else {var _0x6b6cx4=mxUtils[_0xb59f[2]](_0x6b6cx2[_0xb59f[1211]],_0x6b6cx3);0<=_0x6b6cx4?(_0x6b6cx2[_0xb59f[1211]][_0xb59f[300]](_0x6b6cx4,1),0==_0x6b6cx2[_0xb59f[1211]][_0xb59f[67]]&&(_0x6b6cx2[_0xb59f[1211]]=null),_0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),null!=_0x6b6cx4&&this[_0xb59f[259]][_0xb59f[258]](_0x6b6cx4),this[_0xb59f[746]]( new mxEventObject(mxEvent.REMOVE_OVERLAY,_0xb59f[246],_0x6b6cx2,_0xb59f[2201],_0x6b6cx3))):_0x6b6cx3=null};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2445]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[1211]];if(null!=_0x6b6cx3){_0x6b6cx2[_0xb59f[1211]]=null;var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);null!=_0x6b6cx4&&this[_0xb59f[259]][_0xb59f[258]](_0x6b6cx4);for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3[_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[746]]( new mxEventObject(mxEvent.REMOVE_OVERLAY,_0xb59f[246],_0x6b6cx2,_0xb59f[2201],_0x6b6cx3[_0x6b6cx4]))}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2446]]=function(_0x6b6cx2){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2:this[_0xb59f[251]][_0xb59f[501]]();this[_0xb59f[2445]](_0x6b6cx2);for(var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2),_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3;_0x6b6cx4++){var _0x6b6cx5=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,_0x6b6cx4);this[_0xb59f[2446]](_0x6b6cx5)}};mxGraph[_0xb59f[202]][_0xb59f[2447]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]){return _0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:this[_0xb59f[2419]],_0x6b6cx3= new mxCellOverlay(_0x6b6cx4,_0xb59f[2448]+_0x6b6cx3+_0xb59f[2449]),_0x6b6cx5&&_0x6b6cx3[_0xb59f[169]](mxEvent.CLICK,mxUtils[_0xb59f[885]](this,function(_0x6b6cx3,_0x6b6cx4){this[_0xb59f[994]]()&&this[_0xb59f[2450]](_0x6b6cx2)})),this[_0xb59f[2443]](_0x6b6cx2,_0x6b6cx3)};this[_0xb59f[2445]](_0x6b6cx2);return null};mxGraph[_0xb59f[202]][_0xb59f[855]]=function(_0x6b6cx2){this[_0xb59f[2451]](null,_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2451]]=function(_0x6b6cx2,_0x6b6cx3){null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[2452]](),null!=_0x6b6cx2&&!this[_0xb59f[2453]](_0x6b6cx2)&&(_0x6b6cx2=null));null!=_0x6b6cx2&&(this[_0xb59f[746]]( new mxEventObject(mxEvent.START_EDITING,_0xb59f[246],_0x6b6cx2,_0xb59f[763],_0x6b6cx3)),this[_0xb59f[2347]][_0xb59f[855]](_0x6b6cx2,_0x6b6cx3))};mxGraph[_0xb59f[202]][_0xb59f[2142]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[2454]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2126]]=function(_0x6b6cx2){this[_0xb59f[2347]][_0xb59f[2126]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[850]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[2456]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[2455]](_0x6b6cx2)),this[_0xb59f[746]]( new mxEventObject(mxEvent.LABEL_CHANGED,_0xb59f[246],_0x6b6cx2,_0xb59f[131],_0x6b6cx3,_0xb59f[763],_0x6b6cx4))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2456]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[251]][_0xb59f[1966]](_0x6b6cx2,_0x6b6cx3),_0x6b6cx4&&this[_0xb59f[2457]](_0x6b6cx2,!1)}finally{this[_0xb59f[251]][_0xb59f[476]]()}};mxGraph[_0xb59f[202]][_0xb59f[859]]=function(_0x6b6cx2){this[_0xb59f[2126]](!0);this[_0xb59f[2433]][_0xb59f[862]]();this[_0xb59f[1011]][_0xb59f[862]]();_0x6b6cx2=this[_0xb59f[897]]();for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2[_0x6b6cx3]);null!=_0x6b6cx4&&null!=_0x6b6cx4[_0xb59f[2458]]&&_0x6b6cx4[_0xb59f[2458]][_0xb59f[862]]()}};mxGraph[_0xb59f[202]][_0xb59f[173]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[727]](),_0x6b6cx4=_0x6b6cx2[_0xb59f[736]](),_0x6b6cx5= new mxEventObject(mxEvent.CLICK,_0xb59f[763],_0x6b6cx3,_0xb59f[246],_0x6b6cx4);_0x6b6cx2[_0xb59f[721]]()&&_0x6b6cx5[_0xb59f[722]]();this[_0xb59f[746]](_0x6b6cx5);this[_0xb59f[994]]()&&(!mxEvent[_0xb59f[721]](_0x6b6cx3)&&!_0x6b6cx5[_0xb59f[721]]())&&(null!=_0x6b6cx4?this[_0xb59f[2459]](_0x6b6cx4,_0x6b6cx3):(_0x6b6cx4=null,this[_0xb59f[2460]]()&&(_0x6b6cx4=this[_0xb59f[2461]](_0x6b6cx2[_0xb59f[734]](),_0x6b6cx2[_0xb59f[735]]())),null!=_0x6b6cx4?this[_0xb59f[2459]](_0x6b6cx4,_0x6b6cx3):this[_0xb59f[2462]](_0x6b6cx3)||this[_0xb59f[2440]]()))};mxGraph[_0xb59f[202]][_0xb59f[761]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4= new mxEventObject(mxEvent.DOUBLE_CLICK,_0xb59f[763],_0x6b6cx2,_0xb59f[246],_0x6b6cx3);this[_0xb59f[746]](_0x6b6cx4);this[_0xb59f[994]]()&&(!mxEvent[_0xb59f[721]](_0x6b6cx2)&&!_0x6b6cx4[_0xb59f[721]]()&&null!=_0x6b6cx3&&this[_0xb59f[2453]](_0x6b6cx3))&&this[_0xb59f[2451]](_0x6b6cx3,_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[1014]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(!this[_0xb59f[2382]]&&(this[_0xb59f[2384]]||mxUtils[_0xb59f[1134]](this[_0xb59f[526]]))){var _0x6b6cx9=this[_0xb59f[526]];_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:20;if(_0x6b6cx2>=_0x6b6cx9[_0xb59f[360]]&&_0x6b6cx3>=_0x6b6cx9[_0xb59f[190]]&&_0x6b6cx2<=_0x6b6cx9[_0xb59f[360]]+_0x6b6cx9[_0xb59f[159]]&&_0x6b6cx3<=_0x6b6cx9[_0xb59f[190]]+_0x6b6cx9[_0xb59f[157]]){var _0x6b6cxa=_0x6b6cx9[_0xb59f[360]]+_0x6b6cx9[_0xb59f[159]]-_0x6b6cx2;if(_0x6b6cxa<_0x6b6cx5){if(_0x6b6cx2=_0x6b6cx9[_0xb59f[360]],_0x6b6cx9[_0xb59f[360]]+=_0x6b6cx5-_0x6b6cxa,_0x6b6cx4&&_0x6b6cx2==_0x6b6cx9[_0xb59f[360]]){if(this[_0xb59f[507]]==mxConstants[_0xb59f[508]]){_0x6b6cx2=this[_0xb59f[441]][_0xb59f[2024]]()[_0xb59f[538]];var _0x6b6cx12=this[_0xb59f[526]][_0xb59f[1526]]+_0x6b6cx5-_0x6b6cxa}else {_0x6b6cx12=Math[_0xb59f[160]](_0x6b6cx9[_0xb59f[159]],_0x6b6cx9[_0xb59f[1526]])+_0x6b6cx5-_0x6b6cxa,_0x6b6cx2=this[_0xb59f[441]][_0xb59f[2051]]()};_0x6b6cx2[_0xb59f[124]][_0xb59f[117]]=_0x6b6cx12+_0xb59f[168];_0x6b6cx9[_0xb59f[360]]+=_0x6b6cx5-_0x6b6cxa}}else {_0x6b6cxa=_0x6b6cx2-_0x6b6cx9[_0xb59f[360]],_0x6b6cxa<_0x6b6cx5&&(_0x6b6cx9[_0xb59f[360]]-=_0x6b6cx5-_0x6b6cxa)};_0x6b6cxa=_0x6b6cx9[_0xb59f[190]]+_0x6b6cx9[_0xb59f[157]]-_0x6b6cx3;_0x6b6cxa<_0x6b6cx5?(_0x6b6cx2=_0x6b6cx9[_0xb59f[190]],_0x6b6cx9[_0xb59f[190]]+=_0x6b6cx5-_0x6b6cxa,_0x6b6cx2==_0x6b6cx9[_0xb59f[190]]&&_0x6b6cx4&&(this[_0xb59f[507]]==mxConstants[_0xb59f[508]]?(_0x6b6cx2=this[_0xb59f[441]][_0xb59f[2024]]()[_0xb59f[538]],_0x6b6cx3=this[_0xb59f[526]][_0xb59f[191]]+_0x6b6cx5-_0x6b6cxa):(_0x6b6cx3=Math[_0xb59f[160]](_0x6b6cx9[_0xb59f[157]],_0x6b6cx9[_0xb59f[191]])+_0x6b6cx5-_0x6b6cxa,_0x6b6cx2=this[_0xb59f[441]][_0xb59f[2051]]()),_0x6b6cx2[_0xb59f[124]][_0xb59f[119]]=_0x6b6cx3+_0xb59f[168],_0x6b6cx9[_0xb59f[190]]+=_0x6b6cx5-_0x6b6cxa)):(_0x6b6cxa=_0x6b6cx3-_0x6b6cx9[_0xb59f[190]],_0x6b6cxa<_0x6b6cx5&&(_0x6b6cx9[_0xb59f[190]]-=_0x6b6cx5-_0x6b6cxa))}}else {this[_0xb59f[2383]]&&!this[_0xb59f[2316]][_0xb59f[1124]]&&(null==this[_0xb59f[2463]]&&(this[_0xb59f[2463]]=this[_0xb59f[2464]]()),this[_0xb59f[2463]][_0xb59f[1143]](_0x6b6cx2+this[_0xb59f[1136]],_0x6b6cx3+this[_0xb59f[1137]]))}};mxGraph[_0xb59f[202]][_0xb59f[2464]]=function(){return  new mxPanningManager(this)};mxGraph[_0xb59f[202]][_0xb59f[2465]]=function(){function _0x6b6cx2(_0x6b6cx2){var _0x6b6cx3=0,_0x6b6cx3=_0xb59f[2466]==_0x6b6cx2?2:_0xb59f[2467]==_0x6b6cx2?4:_0xb59f[2468]==_0x6b6cx2?6:parseInt(_0x6b6cx2);isNaN(_0x6b6cx3)&&(_0x6b6cx3=0);return _0x6b6cx3}var _0x6b6cx3=mxUtils[_0xb59f[275]](this[_0xb59f[526]]),_0x6b6cx4= new mxRectangle;_0x6b6cx4[_0xb59f[235]]=_0x6b6cx2(_0x6b6cx3[_0xb59f[2469]])+parseInt(_0x6b6cx3[_0xb59f[357]]||0);_0x6b6cx4[_0xb59f[236]]=_0x6b6cx2(_0x6b6cx3[_0xb59f[2470]])+parseInt(_0x6b6cx3[_0xb59f[2471]]||0);_0x6b6cx4[_0xb59f[117]]=_0x6b6cx2(_0x6b6cx3[_0xb59f[2472]])+parseInt(_0x6b6cx3[_0xb59f[1164]]||0);_0x6b6cx4[_0xb59f[119]]=_0x6b6cx2(_0x6b6cx3[_0xb59f[2473]])+parseInt(_0x6b6cx3[_0xb59f[2474]]||0);return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[2475]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=this[_0xb59f[441]][_0xb59f[255]];var _0x6b6cx5=this[_0xb59f[441]][_0xb59f[513]],_0x6b6cx9=this[_0xb59f[2013]],_0x6b6cxa=_0x6b6cx2*this[_0xb59f[2012]],_0x6b6cx9= new mxRectangle(0,0,_0x6b6cx9[_0xb59f[117]]*_0x6b6cxa,_0x6b6cx9[_0xb59f[119]]*_0x6b6cxa);_0x6b6cx3=this[_0xb59f[2357]]?Math[_0xb59f[430]](_0x6b6cx3/_0x6b6cx9[_0xb59f[117]]):1;_0x6b6cx4=this[_0xb59f[2357]]?Math[_0xb59f[430]](_0x6b6cx4/_0x6b6cx9[_0xb59f[119]]):1;return  new mxRectangle(0,0,_0x6b6cx3*_0x6b6cx9[_0xb59f[117]]+2+_0x6b6cx5[_0xb59f[235]]/_0x6b6cx2,_0x6b6cx4*_0x6b6cx9[_0xb59f[119]]+2+_0x6b6cx5[_0xb59f[236]]/_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2258]]=function(){var _0x6b6cx2=this[_0xb59f[517]]();if(null!=this[_0xb59f[526]]){var _0x6b6cx3=this[_0xb59f[2476]](),_0x6b6cx4=Math[_0xb59f[160]](0,_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]+1+_0x6b6cx3),_0x6b6cx3=Math[_0xb59f[160]](0,_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]+1+_0x6b6cx3);null!=this[_0xb59f[2387]]&&(_0x6b6cx4=Math[_0xb59f[160]](_0x6b6cx4,this[_0xb59f[2387]][_0xb59f[117]]),_0x6b6cx3=Math[_0xb59f[160]](_0x6b6cx3,this[_0xb59f[2387]][_0xb59f[119]]));this[_0xb59f[2389]]&&this[_0xb59f[2477]](_0x6b6cx4,_0x6b6cx3);if(this[_0xb59f[2361]]||!mxClient[_0xb59f[80]]&&this[_0xb59f[2273]]){var _0x6b6cx5=this[_0xb59f[2475]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx3);null!=_0x6b6cx5&&(_0x6b6cx4=_0x6b6cx5[_0xb59f[117]],_0x6b6cx3=_0x6b6cx5[_0xb59f[119]])};null!=this[_0xb59f[2386]]&&(_0x6b6cx4=Math[_0xb59f[160]](_0x6b6cx4,this[_0xb59f[2386]][_0xb59f[117]]*this[_0xb59f[441]][_0xb59f[255]]),_0x6b6cx3=Math[_0xb59f[160]](_0x6b6cx3,this[_0xb59f[2386]][_0xb59f[119]]*this[_0xb59f[441]][_0xb59f[255]]));_0x6b6cx4=Math[_0xb59f[430]](_0x6b6cx4-1);_0x6b6cx3=Math[_0xb59f[430]](_0x6b6cx3-1);this[_0xb59f[507]]==mxConstants[_0xb59f[508]]?(_0x6b6cx5=this[_0xb59f[441]][_0xb59f[2024]]()[_0xb59f[538]],_0x6b6cx5[_0xb59f[124]][_0xb59f[2478]]=Math[_0xb59f[160]](1,_0x6b6cx4)+_0xb59f[168],_0x6b6cx5[_0xb59f[124]][_0xb59f[2479]]=Math[_0xb59f[160]](1,_0x6b6cx3)+_0xb59f[168],_0x6b6cx5[_0xb59f[124]][_0xb59f[117]]=_0xb59f[118],_0x6b6cx5[_0xb59f[124]][_0xb59f[119]]=_0xb59f[118]):mxClient[_0xb59f[496]]?this[_0xb59f[441]][_0xb59f[2320]](Math[_0xb59f[160]](1,_0x6b6cx4),Math[_0xb59f[160]](1,_0x6b6cx3)):(this[_0xb59f[441]][_0xb59f[510]][_0xb59f[124]][_0xb59f[2478]]=Math[_0xb59f[160]](1,_0x6b6cx4)+_0xb59f[168],this[_0xb59f[441]][_0xb59f[510]][_0xb59f[124]][_0xb59f[2479]]=Math[_0xb59f[160]](1,_0x6b6cx3)+_0xb59f[168]);this[_0xb59f[2480]](this[_0xb59f[2357]],_0x6b6cx4-1,_0x6b6cx3-1)};this[_0xb59f[746]]( new mxEventObject(mxEvent.SIZE,_0xb59f[1562],_0x6b6cx2))};mxGraph[_0xb59f[202]][_0xb59f[2477]]=function(_0x6b6cx2,_0x6b6cx3){if(mxClient[_0xb59f[80]]){if(mxClient[_0xb59f[496]]){var _0x6b6cx4=this[_0xb59f[2465]]();_0x6b6cx2+=Math[_0xb59f[160]](2,_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]+1);_0x6b6cx3+=Math[_0xb59f[160]](2,_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]+1)}else {9<=document[_0xb59f[5]]?(_0x6b6cx2+=3,_0x6b6cx3+=5):(_0x6b6cx2+=1,_0x6b6cx3+=1)}}else {_0x6b6cx3+=1};null!=this[_0xb59f[2388]]&&(_0x6b6cx2=Math[_0xb59f[243]](this[_0xb59f[2388]][_0xb59f[117]],_0x6b6cx2),_0x6b6cx3=Math[_0xb59f[243]](this[_0xb59f[2388]][_0xb59f[119]],_0x6b6cx3));this[_0xb59f[526]][_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[430]](_0x6b6cx2)+_0xb59f[168];this[_0xb59f[526]][_0xb59f[124]][_0xb59f[119]]=Math[_0xb59f[430]](_0x6b6cx3)+_0xb59f[168]};mxGraph[_0xb59f[202]][_0xb59f[2480]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx9=this[_0xb59f[441]][_0xb59f[513]],_0x6b6cxa=this[_0xb59f[2013]],_0x6b6cx12=_0x6b6cx5*this[_0xb59f[2012]],_0x6b6cx9= new mxRectangle(_0x6b6cx5*_0x6b6cx9[_0xb59f[235]],_0x6b6cx5*_0x6b6cx9[_0xb59f[236]],_0x6b6cxa[_0xb59f[117]]*_0x6b6cx12,_0x6b6cxa[_0xb59f[119]]*_0x6b6cx12);_0x6b6cx2=_0x6b6cx2&&Math[_0xb59f[243]](_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]])>this[_0xb59f[2360]];_0x6b6cx9[_0xb59f[235]]=mxUtils[_0xb59f[1454]](_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[117]]);_0x6b6cx9[_0xb59f[236]]=mxUtils[_0xb59f[1454]](_0x6b6cx9[_0xb59f[236]],_0x6b6cx9[_0xb59f[119]]);_0x6b6cxa=_0x6b6cx2?Math[_0xb59f[430]]((_0x6b6cx3-_0x6b6cx9[_0xb59f[235]])/_0x6b6cx9[_0xb59f[117]]):0;_0x6b6cx2=_0x6b6cx2?Math[_0xb59f[430]]((_0x6b6cx4-_0x6b6cx9[_0xb59f[236]])/_0x6b6cx9[_0xb59f[119]]):0;null==this[_0xb59f[2481]]&&0<_0x6b6cxa&&(this[_0xb59f[2481]]=[]);if(null!=this[_0xb59f[2481]]){for(_0x6b6cx12=0;_0x6b6cx12<=_0x6b6cxa;_0x6b6cx12++){var _0x6b6cx13=[ new mxPoint(_0x6b6cx9[_0xb59f[235]]+_0x6b6cx12*_0x6b6cx9[_0xb59f[117]],1), new mxPoint(_0x6b6cx9[_0xb59f[235]]+_0x6b6cx12*_0x6b6cx9[_0xb59f[117]],_0x6b6cx4)];null!=this[_0xb59f[2481]][_0x6b6cx12]?(this[_0xb59f[2481]][_0x6b6cx12][_0xb59f[255]]=1,this[_0xb59f[2481]][_0x6b6cx12][_0xb59f[1525]]=_0x6b6cx13,this[_0xb59f[2481]][_0x6b6cx12][_0xb59f[258]]()):(_0x6b6cx13= new mxPolyline(_0x6b6cx13,this[_0xb59f[2358]],this[_0xb59f[255]]),_0x6b6cx13[_0xb59f[507]]=this[_0xb59f[507]],_0x6b6cx13[_0xb59f[1522]]=this[_0xb59f[2359]],_0x6b6cx13[_0xb59f[255]]=_0x6b6cx5,_0x6b6cx13[_0xb59f[176]](this[_0xb59f[441]][_0xb59f[2053]]),_0x6b6cx13[_0xb59f[258]](),this[_0xb59f[2481]][_0x6b6cx12]=_0x6b6cx13)};for(_0x6b6cx12=_0x6b6cxa;_0x6b6cx12<this[_0xb59f[2481]][_0xb59f[67]];_0x6b6cx12++){this[_0xb59f[2481]][_0x6b6cx12][_0xb59f[515]]()};this[_0xb59f[2481]][_0xb59f[300]](_0x6b6cxa,this[_0xb59f[2481]][_0xb59f[67]]-_0x6b6cxa)};null==this[_0xb59f[2482]]&&0<_0x6b6cx2&&(this[_0xb59f[2482]]=[]);if(null!=this[_0xb59f[2482]]){for(_0x6b6cx12=0;_0x6b6cx12<=_0x6b6cx2;_0x6b6cx12++){_0x6b6cx13=[ new mxPoint(1,_0x6b6cx9[_0xb59f[236]]+_0x6b6cx12*_0x6b6cx9[_0xb59f[119]]), new mxPoint(_0x6b6cx3,_0x6b6cx9[_0xb59f[236]]+_0x6b6cx12*_0x6b6cx9[_0xb59f[119]])],null!=this[_0xb59f[2482]][_0x6b6cx12]?(this[_0xb59f[2482]][_0x6b6cx12][_0xb59f[255]]=1,this[_0xb59f[2482]][_0x6b6cx12][_0xb59f[1525]]=_0x6b6cx13,this[_0xb59f[2482]][_0x6b6cx12][_0xb59f[258]]()):(_0x6b6cx13= new mxPolyline(_0x6b6cx13,this[_0xb59f[2358]],_0x6b6cx5),_0x6b6cx13[_0xb59f[507]]=this[_0xb59f[507]],_0x6b6cx13[_0xb59f[1522]]=this[_0xb59f[2359]],_0x6b6cx13[_0xb59f[255]]=_0x6b6cx5,_0x6b6cx13[_0xb59f[176]](this[_0xb59f[441]][_0xb59f[2053]]),_0x6b6cx13[_0xb59f[258]](),this[_0xb59f[2482]][_0x6b6cx12]=_0x6b6cx13)};for(_0x6b6cx12=_0x6b6cx2;_0x6b6cx12<this[_0xb59f[2482]][_0xb59f[67]];_0x6b6cx12++){this[_0xb59f[2482]][_0x6b6cx12][_0xb59f[515]]()};this[_0xb59f[2482]][_0xb59f[300]](_0x6b6cx2,this[_0xb59f[2482]][_0xb59f[67]]-_0x6b6cx2)}};mxGraph[_0xb59f[202]][_0xb59f[1705]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[474]](_0x6b6cx2),_0x6b6cx4=null,_0x6b6cx4=this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)?this[_0xb59f[94]][_0xb59f[2077]]():this[_0xb59f[94]][_0xb59f[2076]]();null!=_0x6b6cx3&&(_0x6b6cx4=this[_0xb59f[2483]](this[_0xb59f[94]][_0xb59f[1705]](_0x6b6cx3,_0x6b6cx4)));null==_0x6b6cx4&&(_0x6b6cx4=mxGraph[_0xb59f[202]][_0xb59f[2346]]);return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[2483]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[mxConstants[_0xb59f[2484]]],_0x6b6cx4=this[_0xb59f[2485]](_0x6b6cx3);null!=_0x6b6cx4?_0x6b6cx2[mxConstants[_0xb59f[2484]]]=_0x6b6cx4:_0x6b6cx4=_0x6b6cx3;null!=_0x6b6cx4&&_0xb59f[2486]==_0x6b6cx4[_0xb59f[85]](0,11)&&(_0x6b6cx3=_0x6b6cx4[_0xb59f[2]](_0xb59f[537]),0<_0x6b6cx3&&(_0x6b6cx4=_0x6b6cx4[_0xb59f[85]](0,_0x6b6cx3)+_0xb59f[2487]+_0x6b6cx4[_0xb59f[85]](_0x6b6cx3+1)),_0x6b6cx2[mxConstants[_0xb59f[2484]]]=_0x6b6cx4)};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2488]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=_0x6b6cx3||this[_0xb59f[897]]();if(null!=_0x6b6cx3){this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3[_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[251]][_0xb59f[475]](_0x6b6cx3[_0x6b6cx4],_0x6b6cx2)}}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2489]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=_0x6b6cx4||this[_0xb59f[2452]]();this[_0xb59f[2490]](_0x6b6cx2,_0x6b6cx3,[_0x6b6cx4])};mxGraph[_0xb59f[202]][_0xb59f[2490]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;_0x6b6cx4=_0x6b6cx4||this[_0xb59f[897]]();if(null!=_0x6b6cx4&&0<_0x6b6cx4[_0xb59f[67]]){var _0x6b6cx5=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx4[0]),_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx4[0]);null!=_0x6b6cx5&&(_0x6b6cx3=mxUtils[_0xb59f[433]](_0x6b6cx5,_0x6b6cx2,_0x6b6cx3)?0:1,this[_0xb59f[1717]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4))}};mxGraph[_0xb59f[202]][_0xb59f[1717]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=_0x6b6cx4||this[_0xb59f[897]]();mxUtils[_0xb59f[1717]](this[_0xb59f[251]],_0x6b6cx4,_0x6b6cx2,_0x6b6cx3)};mxGraph[_0xb59f[202]][_0xb59f[2491]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[2492]](_0x6b6cx2,_0x6b6cx3,null,_0x6b6cx4)};mxGraph[_0xb59f[202]][_0xb59f[2492]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx5=_0x6b6cx5||this[_0xb59f[897]]();if(null!=_0x6b6cx5&&0<_0x6b6cx5[_0xb59f[67]]){if(null==_0x6b6cx4){var _0x6b6cx9=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx5[0]),_0x6b6cx9=null!=_0x6b6cx9?_0x6b6cx9[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx5[0]);null!=_0x6b6cx9&&(_0x6b6cx4=(parseInt(_0x6b6cx9[_0x6b6cx2]||0)&_0x6b6cx3)!=_0x6b6cx3)};mxUtils[_0xb59f[2492]](this[_0xb59f[251]],_0x6b6cx5,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)}};mxGraph[_0xb59f[202]][_0xb59f[849]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[897]]());if(null!=_0x6b6cx3&&1<_0x6b6cx3[_0xb59f[67]]){if(null==_0x6b6cx4){for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[1198]](_0x6b6cx3[_0x6b6cx5]);if(null!=_0x6b6cx9&&!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx3[_0x6b6cx5])){if(null==_0x6b6cx4){if(_0x6b6cx2==mxConstants[_0xb59f[479]]){_0x6b6cx4=_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]]/2;break}else {if(_0x6b6cx2==mxConstants[_0xb59f[480]]){_0x6b6cx4=_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]]}else {if(_0x6b6cx2==mxConstants[_0xb59f[1687]]){_0x6b6cx4=_0x6b6cx9[_0xb59f[236]]}else {if(_0x6b6cx2==mxConstants[_0xb59f[481]]){_0x6b6cx4=_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]]/2;break}else {_0x6b6cx4=_0x6b6cx2==mxConstants[_0xb59f[482]]?_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]]:_0x6b6cx9[_0xb59f[235]]}}}}}else {_0x6b6cx4=_0x6b6cx2==mxConstants[_0xb59f[480]]?Math[_0xb59f[160]](_0x6b6cx4,_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]]):_0x6b6cx2==mxConstants[_0xb59f[1687]]?Math[_0xb59f[243]](_0x6b6cx4,_0x6b6cx9[_0xb59f[236]]):_0x6b6cx2==mxConstants[_0xb59f[482]]?Math[_0xb59f[160]](_0x6b6cx4,_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]]):Math[_0xb59f[243]](_0x6b6cx4,_0x6b6cx9[_0xb59f[235]])}}}};if(null!=_0x6b6cx4){this[_0xb59f[251]][_0xb59f[473]]();try{for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx9=this[_0xb59f[1198]](_0x6b6cx3[_0x6b6cx5]),null!=_0x6b6cx9&&!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx3[_0x6b6cx5])&&(_0x6b6cx9=_0x6b6cx9[_0xb59f[238]](),_0x6b6cx2==mxConstants[_0xb59f[479]]?_0x6b6cx9[_0xb59f[235]]=_0x6b6cx4-_0x6b6cx9[_0xb59f[117]]/2:_0x6b6cx2==mxConstants[_0xb59f[480]]?_0x6b6cx9[_0xb59f[235]]=_0x6b6cx4-_0x6b6cx9[_0xb59f[117]]:_0x6b6cx2==mxConstants[_0xb59f[1687]]?_0x6b6cx9[_0xb59f[236]]=_0x6b6cx4:_0x6b6cx2==mxConstants[_0xb59f[481]]?_0x6b6cx9[_0xb59f[236]]=_0x6b6cx4-_0x6b6cx9[_0xb59f[119]]/2:_0x6b6cx2==mxConstants[_0xb59f[482]]?_0x6b6cx9[_0xb59f[236]]=_0x6b6cx4-_0x6b6cx9[_0xb59f[119]]:_0x6b6cx9[_0xb59f[235]]=_0x6b6cx4,this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx3[_0x6b6cx5],_0x6b6cx9))};this[_0xb59f[746]]( new mxEventObject(mxEvent.ALIGN_CELLS,_0xb59f[611],_0x6b6cx2,_0xb59f[895],_0x6b6cx3))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[854]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&null!=this[_0xb59f[2356]]){this[_0xb59f[251]][_0xb59f[473]]();try{var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[474]](_0x6b6cx2);null==_0x6b6cx3||0==_0x6b6cx3[_0xb59f[67]]?this[_0xb59f[251]][_0xb59f[475]](_0x6b6cx2,this[_0xb59f[2356]]):this[_0xb59f[251]][_0xb59f[475]](_0x6b6cx2,null);this[_0xb59f[1809]](_0x6b6cx2);this[_0xb59f[746]]( new mxEventObject(mxEvent.FLIP_EDGE,_0xb59f[1989],_0x6b6cx2))}finally{this[_0xb59f[251]][_0xb59f[476]]()}};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2493]]=function(_0x6b6cx2){this[_0xb59f[2336]][_0xb59f[207]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2494]]=function(_0x6b6cx2){for(var _0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<this[_0xb59f[2336]][_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[2336]][_0x6b6cx4]!=_0x6b6cx2&&_0x6b6cx3[_0xb59f[207]](this[_0xb59f[2336]][_0x6b6cx4])};this[_0xb59f[2336]]=_0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2485]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[2336]][_0xb59f[67]];_0x6b6cx3++){var _0x6b6cx4=this[_0xb59f[2336]][_0x6b6cx3][_0xb59f[1202]](_0x6b6cx2);if(null!=_0x6b6cx4){return _0x6b6cx4}}};return null};mxGraph[_0xb59f[202]][_0xb59f[840]]=function(_0x6b6cx2,_0x6b6cx3){null==_0x6b6cx3&&(_0x6b6cx3=mxUtils[_0xb59f[1779]](this[_0xb59f[897]](),!0));this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[841]](_0x6b6cx3,_0x6b6cx2),this[_0xb59f[746]]( new mxEventObject(mxEvent.ORDER_CELLS,_0xb59f[2495],_0x6b6cx2,_0xb59f[895],_0x6b6cx3))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[841]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2){this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0x6b6cx4]);_0x6b6cx3?this[_0xb59f[251]][_0xb59f[99]](_0x6b6cx5,_0x6b6cx2[_0x6b6cx4],_0x6b6cx4):this[_0xb59f[251]][_0xb59f[99]](_0x6b6cx5,_0x6b6cx2[_0x6b6cx4],this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx5)-1)};this[_0xb59f[746]]( new mxEventObject(mxEvent.CELLS_ORDERED,_0xb59f[2495],_0x6b6cx3,_0xb59f[895],_0x6b6cx2))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[844]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null==_0x6b6cx4&&(_0x6b6cx4=mxUtils[_0xb59f[1779]](this[_0xb59f[897]](),!0));_0x6b6cx4=this[_0xb59f[2496]](_0x6b6cx4);null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[2497]](_0x6b6cx4));var _0x6b6cx5=this[_0xb59f[2498]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx3);if(0<_0x6b6cx4[_0xb59f[67]]&&null!=_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2);null==_0x6b6cx9&&(_0x6b6cx9=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx4[0]));this[_0xb59f[251]][_0xb59f[473]]();try{null==this[_0xb59f[1198]](_0x6b6cx2)&&this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2, new mxGeometry);var _0x6b6cxa=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx9);this[_0xb59f[833]]([_0x6b6cx2],_0x6b6cx9,_0x6b6cxa,null,null,!1);_0x6b6cxa=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2);this[_0xb59f[833]](_0x6b6cx4,_0x6b6cx2,_0x6b6cxa,null,null,!1,!1);this[_0xb59f[835]](_0x6b6cx4,-_0x6b6cx5[_0xb59f[235]],-_0x6b6cx5[_0xb59f[236]],!1,!0);this[_0xb59f[837]]([_0x6b6cx2],[_0x6b6cx5]);this[_0xb59f[746]]( new mxEventObject(mxEvent.GROUP_CELLS,_0xb59f[1504],_0x6b6cx2,_0xb59f[467],_0x6b6cx3,_0xb59f[895],_0x6b6cx4))}finally{this[_0xb59f[251]][_0xb59f[476]]()}};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2496]]=function(_0x6b6cx2){var _0x6b6cx3=[];if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){var _0x6b6cx4=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[0]);_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[0]);for(var _0x6b6cx5=1;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0x6b6cx5])==_0x6b6cx4&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0x6b6cx5])}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2498]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=this[_0xb59f[1729]](_0x6b6cx3);null!=_0x6b6cx3&&(this[_0xb59f[1730]](_0x6b6cx2)&&(_0x6b6cx2=this[_0xb59f[1731]](_0x6b6cx2),_0x6b6cx3[_0xb59f[235]]-=_0x6b6cx2[_0xb59f[117]],_0x6b6cx3[_0xb59f[236]]-=_0x6b6cx2[_0xb59f[119]],_0x6b6cx3[_0xb59f[117]]+=_0x6b6cx2[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]]+=_0x6b6cx2[_0xb59f[119]]),_0x6b6cx3[_0xb59f[235]]-=_0x6b6cx4,_0x6b6cx3[_0xb59f[236]]-=_0x6b6cx4,_0x6b6cx3[_0xb59f[117]]+=2*_0x6b6cx4,_0x6b6cx3[_0xb59f[119]]+=2*_0x6b6cx4);return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2497]]=function(_0x6b6cx2){_0x6b6cx2= new mxCell(_0xb59f[110]);_0x6b6cx2[_0xb59f[1993]](!0);_0x6b6cx2[_0xb59f[1995]](!1);return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[845]]=function(_0x6b6cx2){var _0x6b6cx3=[];if(null==_0x6b6cx2){_0x6b6cx2=this[_0xb59f[897]]();for(var _0x6b6cx4=[],_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){0<this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2[_0x6b6cx5])&&_0x6b6cx4[_0xb59f[207]](_0x6b6cx2[_0x6b6cx5])};_0x6b6cx2=_0x6b6cx4};if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){this[_0xb59f[251]][_0xb59f[473]]();try{for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[1953]](_0x6b6cx2[_0x6b6cx5]);if(null!=_0x6b6cx9&&0<_0x6b6cx9[_0xb59f[67]]){var _0x6b6cx9=_0x6b6cx9[_0xb59f[1853]](),_0x6b6cxa=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0x6b6cx5]),_0x6b6cx12=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cxa);this[_0xb59f[833]](_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,null,null,!0);_0x6b6cx3=_0x6b6cx3[_0xb59f[1919]](_0x6b6cx9)}};this[_0xb59f[843]](this[_0xb59f[2499]](_0x6b6cx2));this[_0xb59f[746]]( new mxEventObject(mxEvent.UNGROUP_CELLS,_0xb59f[895],_0x6b6cx2))}finally{this[_0xb59f[251]][_0xb59f[476]]()}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[846]]=function(_0x6b6cx2){null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[897]]());this[_0xb59f[251]][_0xb59f[473]]();try{var _0x6b6cx3=this[_0xb59f[902]](),_0x6b6cx4=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx3);this[_0xb59f[833]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,null,null,!0);this[_0xb59f[746]]( new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,_0xb59f[895],_0x6b6cx2))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[1917]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[897]]());_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:0;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!1;this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[1198]](_0x6b6cx2[_0x6b6cx5]);if(null!=_0x6b6cx9){var _0x6b6cxa=this[_0xb59f[1955]](_0x6b6cx2[_0x6b6cx5]);if(null!=_0x6b6cxa&&0<_0x6b6cxa[_0xb59f[67]]){var _0x6b6cx12=this[_0xb59f[1729]](_0x6b6cxa);if(0<_0x6b6cx12[_0xb59f[117]]&&0<_0x6b6cx12[_0xb59f[119]]){var _0x6b6cx13=this[_0xb59f[1730]](_0x6b6cx2[_0x6b6cx5])?this[_0xb59f[1731]](_0x6b6cx2[_0x6b6cx5]): new mxRectangle,_0x6b6cx9=_0x6b6cx9[_0xb59f[238]]();_0x6b6cx4&&(_0x6b6cx9[_0xb59f[235]]+=_0x6b6cx12[_0xb59f[235]]-_0x6b6cx13[_0xb59f[117]]-_0x6b6cx3,_0x6b6cx9[_0xb59f[236]]+=_0x6b6cx12[_0xb59f[236]]-_0x6b6cx13[_0xb59f[119]]-_0x6b6cx3);_0x6b6cx9[_0xb59f[117]]=_0x6b6cx12[_0xb59f[117]]+_0x6b6cx13[_0xb59f[117]]+2*_0x6b6cx3;_0x6b6cx9[_0xb59f[119]]=_0x6b6cx12[_0xb59f[119]]+_0x6b6cx13[_0xb59f[119]]+2*_0x6b6cx3;this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2[_0x6b6cx5],_0x6b6cx9);this[_0xb59f[834]](_0x6b6cxa,-_0x6b6cx12[_0xb59f[235]]+_0x6b6cx13[_0xb59f[117]]+_0x6b6cx3,-_0x6b6cx12[_0xb59f[236]]+_0x6b6cx13[_0xb59f[119]]+_0x6b6cx3)}}}}}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[899]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;var _0x6b6cx4=null;if(null!=_0x6b6cx2){for(var _0x6b6cx5={},_0x6b6cx4=[],_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2[_0x6b6cx9]);_0x6b6cx5[_0x6b6cxa]=_0x6b6cx2[_0x6b6cx9];_0x6b6cx4[_0xb59f[207]](_0x6b6cx2[_0x6b6cx9])};if(0<_0x6b6cx4[_0xb59f[67]]){for(var _0x6b6cxa=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx12=this[_0xb59f[441]][_0xb59f[513]],_0x6b6cx4=this[_0xb59f[251]][_0xb59f[899]](_0x6b6cx2,!0),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){if(!_0x6b6cx3&&this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx4[_0x6b6cx9])&&null!=this[_0xb59f[2500]](_0x6b6cx4[_0x6b6cx9],this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx4[_0x6b6cx9],!0),this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx4[_0x6b6cx9],!1))){_0x6b6cx4[_0x6b6cx9]=null}else {var _0x6b6cx13=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx4[_0x6b6cx9]);if(null!=_0x6b6cx13){var _0x6b6cx14=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2[_0x6b6cx9]),_0x6b6cx15=this[_0xb59f[441]][_0xb59f[248]](this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0x6b6cx9]));if(null!=_0x6b6cx14&&null!=_0x6b6cx15){var _0x6b6cx16=_0x6b6cx15[_0xb59f[2078]][_0xb59f[235]],_0x6b6cx15=_0x6b6cx15[_0xb59f[2078]][_0xb59f[236]];if(this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx4[_0x6b6cx9])){for(var _0x6b6cx14=_0x6b6cx14[_0xb59f[439]],_0x6b6cx17=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2[_0x6b6cx9],!0),_0x6b6cx18=mxCellPath[_0xb59f[385]](_0x6b6cx17);null!=_0x6b6cx17&&null==_0x6b6cx5[_0x6b6cx18];){_0x6b6cx17=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx17),_0x6b6cx18=mxCellPath[_0xb59f[385]](_0x6b6cx17)};null==_0x6b6cx17&&_0x6b6cx13[_0xb59f[2007]]( new mxPoint(_0x6b6cx14[0][_0xb59f[235]]/_0x6b6cxa-_0x6b6cx12[_0xb59f[235]],_0x6b6cx14[0][_0xb59f[236]]/_0x6b6cxa-_0x6b6cx12[_0xb59f[236]]),!0);_0x6b6cx17=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2[_0x6b6cx9],!1);for(_0x6b6cx18=mxCellPath[_0xb59f[385]](_0x6b6cx17);null!=_0x6b6cx17&&null==_0x6b6cx5[_0x6b6cx18];){_0x6b6cx17=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx17),_0x6b6cx18=mxCellPath[_0xb59f[385]](_0x6b6cx17)};null==_0x6b6cx17&&(_0x6b6cx17=_0x6b6cx14[_0xb59f[67]]-1,_0x6b6cx13[_0xb59f[2007]]( new mxPoint(_0x6b6cx14[_0x6b6cx17][_0xb59f[235]]/_0x6b6cxa-_0x6b6cx12[_0xb59f[235]],_0x6b6cx14[_0x6b6cx17][_0xb59f[236]]/_0x6b6cxa-_0x6b6cx12[_0xb59f[236]]),!1));_0x6b6cx13=_0x6b6cx13[_0xb59f[1525]];if(null!=_0x6b6cx13){for(_0x6b6cx14=0;_0x6b6cx14<_0x6b6cx13[_0xb59f[67]];_0x6b6cx14++){_0x6b6cx13[_0x6b6cx14][_0xb59f[235]]+=_0x6b6cx16,_0x6b6cx13[_0x6b6cx14][_0xb59f[236]]+=_0x6b6cx15}}}else {_0x6b6cx13[_0xb59f[235]]+=_0x6b6cx16,_0x6b6cx13[_0xb59f[236]]+=_0x6b6cx15}}}}}}else {_0x6b6cx4=[]}};return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[2501]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){_0x6b6cx3=this[_0xb59f[2502]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14);return this[_0xb59f[2103]](_0x6b6cx3,_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2502]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){_0x6b6cx2= new mxGeometry(_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12);_0x6b6cx2[_0xb59f[1500]]=null!=_0x6b6cx14?_0x6b6cx14:!1;_0x6b6cx4= new mxCell(_0x6b6cx4,_0x6b6cx2,_0x6b6cx13);_0x6b6cx4[_0xb59f[1945]](_0x6b6cx3);_0x6b6cx4[_0xb59f[1993]](!0);_0x6b6cx4[_0xb59f[1995]](!0);return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[1960]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx3=this[_0xb59f[2503]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa);return this[_0xb59f[2504]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx5,_0x6b6cx9)};mxGraph[_0xb59f[202]][_0xb59f[2503]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx2= new mxCell(_0x6b6cx4, new mxGeometry,_0x6b6cxa);_0x6b6cx2[_0xb59f[1945]](_0x6b6cx3);_0x6b6cx2[_0xb59f[1994]](!0);_0x6b6cx2[_0xb59f[256]][_0xb59f[1500]]= !0;return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2504]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return this[_0xb59f[2103]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cx4,_0x6b6cx5)};mxGraph[_0xb59f[202]][_0xb59f[2103]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return this[_0xb59f[832]]([_0x6b6cx2],_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)[0]};mxGraph[_0xb59f[202]][_0xb59f[832]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[902]]());null==_0x6b6cx4&&(_0x6b6cx4=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx3));this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[833]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,!1,!0),this[_0xb59f[746]]( new mxEventObject(mxEvent.ADD_CELLS,_0xb59f[895],_0x6b6cx2,_0xb59f[1101],_0x6b6cx3,_0xb59f[1983],_0x6b6cx4,_0xb59f[1097],_0x6b6cx5,_0xb59f[772],_0x6b6cx9))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[833]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){if(null!=_0x6b6cx2&&null!=_0x6b6cx3&&null!=_0x6b6cx4){this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx13=_0x6b6cxa?this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx3):null,_0x6b6cx14=null!=_0x6b6cx13?_0x6b6cx13[_0xb59f[2078]]:null,_0x6b6cx15= new mxPoint(0,0),_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx2[_0xb59f[67]];_0x6b6cx13++){if(null==_0x6b6cx2[_0x6b6cx13]){_0x6b6cx4--}else {var _0x6b6cx16=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0x6b6cx13]);if(null!=_0x6b6cx14&&_0x6b6cx2[_0x6b6cx13]!=_0x6b6cx3&&_0x6b6cx3!=_0x6b6cx16){var _0x6b6cx17=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx16),_0x6b6cx18=null!=_0x6b6cx17?_0x6b6cx17[_0xb59f[2078]]:_0x6b6cx15,_0x6b6cx19=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2[_0x6b6cx13]);if(null!=_0x6b6cx19){var _0x6b6cx1a=_0x6b6cx18[_0xb59f[235]]-_0x6b6cx14[_0xb59f[235]],_0x6b6cx1b=_0x6b6cx18[_0xb59f[236]]-_0x6b6cx14[_0xb59f[236]],_0x6b6cx19=_0x6b6cx19[_0xb59f[238]]();_0x6b6cx19[_0xb59f[513]](_0x6b6cx1a,_0x6b6cx1b);!_0x6b6cx19[_0xb59f[1500]]&&(this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx2[_0x6b6cx13])&&!this[_0xb59f[2505]]())&&(_0x6b6cx19[_0xb59f[235]]=Math[_0xb59f[160]](0,_0x6b6cx19[_0xb59f[235]]),_0x6b6cx19[_0xb59f[236]]=Math[_0xb59f[160]](0,_0x6b6cx19[_0xb59f[236]]));this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2[_0x6b6cx13],_0x6b6cx19)}};_0x6b6cx3==_0x6b6cx16&&_0x6b6cx4+_0x6b6cx13>this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx3)&&_0x6b6cx4--;this[_0xb59f[251]][_0xb59f[99]](_0x6b6cx3,_0x6b6cx2[_0x6b6cx13],_0x6b6cx4+_0x6b6cx13);this[_0xb59f[2506]]()&&this[_0xb59f[2507]](_0x6b6cx2[_0x6b6cx13])&&this[_0xb59f[2508]](_0x6b6cx2[_0x6b6cx13]);(null==_0x6b6cx12||_0x6b6cx12)&&this[_0xb59f[2509]](_0x6b6cx2[_0x6b6cx13]);null!=_0x6b6cx5&&this[_0xb59f[852]](_0x6b6cx2[_0x6b6cx13],_0x6b6cx5,!0);null!=_0x6b6cx9&&this[_0xb59f[852]](_0x6b6cx2[_0x6b6cx13],_0x6b6cx9,!1)}};this[_0xb59f[746]]( new mxEventObject(mxEvent.CELLS_ADDED,_0xb59f[895],_0x6b6cx2,_0xb59f[1101],_0x6b6cx3,_0xb59f[1983],_0x6b6cx4,_0xb59f[1097],_0x6b6cx5,_0xb59f[772],_0x6b6cx9,_0xb59f[492],_0x6b6cxa))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[842]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[2510]](this[_0xb59f[897]]()));_0x6b6cx3&&(_0x6b6cx2=this[_0xb59f[2510]](this[_0xb59f[2499]](_0x6b6cx2)));this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[843]](_0x6b6cx2),this[_0xb59f[746]]( new mxEventObject(mxEvent.REMOVE_CELLS,_0xb59f[895],_0x6b6cx2,_0xb59f[2511],_0x6b6cx3))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[843]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx4=this[_0xb59f[441]][_0xb59f[513]];this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx5={},_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2[_0x6b6cx9]);_0x6b6cx5[_0x6b6cxa]=_0x6b6cx2[_0x6b6cx9]};for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){for(var _0x6b6cx12=this[_0xb59f[1756]](_0x6b6cx2[_0x6b6cx9]),_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx12[_0xb59f[67]];_0x6b6cx13++){if(_0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx12[_0x6b6cx13]),null==_0x6b6cx5[_0x6b6cxa]){var _0x6b6cx14=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx12[_0x6b6cx13]);if(null!=_0x6b6cx14){var _0x6b6cx15=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx12[_0x6b6cx13]);if(null!=_0x6b6cx15){var _0x6b6cx14=_0x6b6cx14[_0xb59f[238]](),_0x6b6cx16=_0x6b6cx15[_0xb59f[1710]](!0)==_0x6b6cx2[_0x6b6cx9],_0x6b6cx17=_0x6b6cx15[_0xb59f[439]],_0x6b6cx18=_0x6b6cx16?0:_0x6b6cx17[_0xb59f[67]]-1;_0x6b6cx14[_0xb59f[2007]]( new mxPoint(_0x6b6cx17[_0x6b6cx18][_0xb59f[235]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[235]],_0x6b6cx17[_0x6b6cx18][_0xb59f[236]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[236]]),_0x6b6cx16);this[_0xb59f[251]][_0xb59f[1957]](_0x6b6cx12[_0x6b6cx13],null,_0x6b6cx16);this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx12[_0x6b6cx13],_0x6b6cx14)}}}};this[_0xb59f[251]][_0xb59f[205]](_0x6b6cx2[_0x6b6cx9])};this[_0xb59f[746]]( new mxEventObject(mxEvent.CELLS_REMOVED,_0xb59f[895],_0x6b6cx2))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[853]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx5=_0x6b6cx5||0;_0x6b6cx9=_0x6b6cx9||0;null==_0x6b6cx4&&(_0x6b6cx4=this[_0xb59f[899]]([_0x6b6cx2])[0]);var _0x6b6cxa=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2),_0x6b6cx12=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!0);this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[835]](_0x6b6cx3,_0x6b6cx5,_0x6b6cx9,!1,!1),this[_0xb59f[833]](_0x6b6cx3,_0x6b6cxa,this[_0xb59f[251]][_0xb59f[262]](_0x6b6cxa),null,null,!0),this[_0xb59f[833]]([_0x6b6cx4],_0x6b6cxa,this[_0xb59f[251]][_0xb59f[262]](_0x6b6cxa),_0x6b6cx12,_0x6b6cx3[0],!1),this[_0xb59f[852]](_0x6b6cx2,_0x6b6cx3[0],!0),this[_0xb59f[746]]( new mxEventObject(mxEvent.SPLIT_EDGE,_0xb59f[1989],_0x6b6cx2,_0xb59f[895],_0x6b6cx3,_0xb59f[2512],_0x6b6cx4,_0xb59f[1126],_0x6b6cx5,_0xb59f[1125],_0x6b6cx9))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[838]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[897]]());_0x6b6cx4&&(_0x6b6cx3=this[_0xb59f[2499]](_0x6b6cx3));this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[839]](_0x6b6cx3,_0x6b6cx2),this[_0xb59f[746]]( new mxEventObject(mxEvent.TOGGLE_CELLS,_0xb59f[539],_0x6b6cx2,_0xb59f[895],_0x6b6cx3,_0xb59f[2511],_0x6b6cx4))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[839]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[251]][_0xb59f[175]](_0x6b6cx2[_0x6b6cx4],_0x6b6cx3)}}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[847]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;null==_0x6b6cx4&&(_0x6b6cx4=this[_0xb59f[2513]](this[_0xb59f[897]](),_0x6b6cx2));this[_0xb59f[2126]](!1);this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[848]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx3,_0x6b6cx5),this[_0xb59f[746]]( new mxEventObject(mxEvent.FOLD_CELLS,_0xb59f[2514],_0x6b6cx2,_0xb59f[2515],_0x6b6cx3,_0xb59f[895],_0x6b6cx4))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[848]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){if((!_0x6b6cx5||this[_0xb59f[2516]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx3))&&_0x6b6cx3!=this[_0xb59f[1742]](_0x6b6cx2[_0x6b6cx9])){if(this[_0xb59f[251]][_0xb59f[1972]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx3),this[_0xb59f[2517]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx3),this[_0xb59f[2507]](_0x6b6cx2[_0x6b6cx9])&&this[_0xb59f[2508]](_0x6b6cx2[_0x6b6cx9]),_0x6b6cx4){var _0x6b6cxa=this[_0xb59f[251]][_0xb59f[1953]](_0x6b6cx2[_0x6b6cx9]);this[_0xb59f[847]](_0x6b6cxa,_0x6b6cx3,_0x6b6cx4)}}};this[_0xb59f[746]]( new mxEventObject(mxEvent.CELLS_FOLDED,_0xb59f[895],_0x6b6cx2,_0xb59f[2514],_0x6b6cx3,_0xb59f[2515],_0x6b6cx4))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2517]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2){var _0x6b6cx4=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2);null!=_0x6b6cx4&&(_0x6b6cx4=_0x6b6cx4[_0xb59f[238]](),this[_0xb59f[2518]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx3),_0x6b6cx4[_0xb59f[2005]](),this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2,_0x6b6cx4))}};mxGraph[_0xb59f[202]][_0xb59f[2518]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(null!=_0x6b6cx2&&null!=_0x6b6cx3){_0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);if(null==_0x6b6cx3[_0xb59f[2002]]){var _0x6b6cx5=_0x6b6cx3;this[_0xb59f[2394]]&&(_0x6b6cx2=this[_0xb59f[2519]](_0x6b6cx2),null!=_0x6b6cx2&&(_0x6b6cx5=_0x6b6cx2,_0x6b6cx2=mxUtils[_0xb59f[433]](_0x6b6cx4,mxConstants.STYLE_STARTSIZE),0<_0x6b6cx2&&(_0x6b6cx5[_0xb59f[119]]=Math[_0xb59f[160]](_0x6b6cx5[_0xb59f[119]],_0x6b6cx2))));_0x6b6cx3[_0xb59f[2002]]= new mxRectangle(0,0,_0x6b6cx5[_0xb59f[117]],_0x6b6cx5[_0xb59f[119]])};if(null!=_0x6b6cx3[_0xb59f[2002]]){_0x6b6cx3[_0xb59f[2002]][_0xb59f[235]]=_0x6b6cx3[_0xb59f[235]];_0x6b6cx3[_0xb59f[2002]][_0xb59f[236]]=_0x6b6cx3[_0xb59f[236]];var _0x6b6cx9=mxUtils[_0xb59f[431]](_0x6b6cx4[mxConstants[_0xb59f[2278]]]||_0xb59f[468]);0!=_0x6b6cx9&&(_0x6b6cx2=_0x6b6cx3[_0xb59f[2002]][_0xb59f[241]]()-_0x6b6cx3[_0xb59f[241]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[2002]][_0xb59f[242]]()-_0x6b6cx3[_0xb59f[242]](),_0x6b6cx5=Math[_0xb59f[426]](_0x6b6cx9),_0x6b6cx9=Math[_0xb59f[427]](_0x6b6cx9),_0x6b6cx3[_0xb59f[2002]][_0xb59f[235]]+=_0x6b6cx5*_0x6b6cx2-_0x6b6cx9*_0x6b6cx4-_0x6b6cx2,_0x6b6cx3[_0xb59f[2002]][_0xb59f[236]]+=_0x6b6cx9*_0x6b6cx2+_0x6b6cx5*_0x6b6cx4-_0x6b6cx4)}}};mxGraph[_0xb59f[202]][_0xb59f[2499]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[1853]]();return _0x6b6cx3=_0x6b6cx3[_0xb59f[1919]](this[_0xb59f[2520]](_0x6b6cx2))};mxGraph[_0xb59f[202]][_0xb59f[2520]]=function(_0x6b6cx2){var _0x6b6cx3=[];if(null!=_0x6b6cx2){for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){for(var _0x6b6cx5=this[_0xb59f[251]][_0xb59f[1707]](_0x6b6cx2[_0x6b6cx4]),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){_0x6b6cx3[_0xb59f[207]](this[_0xb59f[251]][_0xb59f[1708]](_0x6b6cx2[_0x6b6cx4],_0x6b6cx9))};_0x6b6cx5=this[_0xb59f[251]][_0xb59f[1953]](_0x6b6cx2[_0x6b6cx4]);_0x6b6cx3=_0x6b6cx3[_0xb59f[1919]](this[_0xb59f[2520]](_0x6b6cx5))}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[858]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[2457]](_0x6b6cx2,_0x6b6cx3),this[_0xb59f[746]]( new mxEventObject(mxEvent.UPDATE_CELL_SIZE,_0xb59f[246],_0x6b6cx2,_0xb59f[2521],_0x6b6cx3))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2457]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2){this[_0xb59f[251]][_0xb59f[473]]();try{var _0x6b6cx4=this[_0xb59f[2519]](_0x6b6cx2),_0x6b6cx5=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2);if(null!=_0x6b6cx4&&null!=_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[1742]](_0x6b6cx2),_0x6b6cx5=_0x6b6cx5[_0xb59f[238]]();if(this[_0xb59f[1730]](_0x6b6cx2)){var _0x6b6cxa=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx12=null!=_0x6b6cxa?_0x6b6cxa[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2),_0x6b6cx13=this[_0xb59f[251]][_0xb59f[474]](_0x6b6cx2);null==_0x6b6cx13&&(_0x6b6cx13=_0xb59f[110]);mxUtils[_0xb59f[433]](_0x6b6cx12,mxConstants.STYLE_HORIZONTAL,!0)?(_0x6b6cx13=mxUtils[_0xb59f[475]](_0x6b6cx13,mxConstants.STYLE_STARTSIZE,_0x6b6cx4[_0xb59f[119]]+8),_0x6b6cx9&&(_0x6b6cx5[_0xb59f[119]]=_0x6b6cx4[_0xb59f[119]]+8),_0x6b6cx5[_0xb59f[117]]=_0x6b6cx4[_0xb59f[117]]):(_0x6b6cx13=mxUtils[_0xb59f[475]](_0x6b6cx13,mxConstants.STYLE_STARTSIZE,_0x6b6cx4[_0xb59f[117]]+8),_0x6b6cx9&&(_0x6b6cx5[_0xb59f[117]]=_0x6b6cx4[_0xb59f[117]]+8),_0x6b6cx5[_0xb59f[119]]=_0x6b6cx4[_0xb59f[119]]);this[_0xb59f[251]][_0xb59f[475]](_0x6b6cx2,_0x6b6cx13)}else {_0x6b6cx5[_0xb59f[117]]=_0x6b6cx4[_0xb59f[117]],_0x6b6cx5[_0xb59f[119]]=_0x6b6cx4[_0xb59f[119]]};if(!_0x6b6cx3&& !_0x6b6cx9){var _0x6b6cx14=this[_0xb59f[441]][_0xb59f[1799]](this[_0xb59f[251]][_0xb59f[1953]](_0x6b6cx2));if(null!=_0x6b6cx14){var _0x6b6cx15=this[_0xb59f[441]][_0xb59f[513]],_0x6b6cx16=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx17=(_0x6b6cx14[_0xb59f[236]]+_0x6b6cx14[_0xb59f[119]])/_0x6b6cx16-_0x6b6cx5[_0xb59f[236]]-_0x6b6cx15[_0xb59f[236]];_0x6b6cx5[_0xb59f[117]]=Math[_0xb59f[160]](_0x6b6cx5[_0xb59f[117]],(_0x6b6cx14[_0xb59f[235]]+_0x6b6cx14[_0xb59f[117]])/_0x6b6cx16-_0x6b6cx5[_0xb59f[235]]-_0x6b6cx15[_0xb59f[235]]);_0x6b6cx5[_0xb59f[119]]=Math[_0xb59f[160]](_0x6b6cx5[_0xb59f[119]],_0x6b6cx17)}};this[_0xb59f[837]]([_0x6b6cx2],[_0x6b6cx5])}}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2519]]=function(_0x6b6cx2){var _0x6b6cx3=null;if(null!=_0x6b6cx2){var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx5=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);if(null!=_0x6b6cx5&&!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)){var _0x6b6cx9=_0x6b6cx5[mxConstants[_0xb59f[2185]]]||mxConstants[_0xb59f[483]],_0x6b6cxa=0,_0x6b6cx3=0;if((null!=this[_0xb59f[1202]](_0x6b6cx4)||null!=_0x6b6cx5[mxConstants[_0xb59f[2484]]])&&_0x6b6cx5[mxConstants[_0xb59f[2059]]]==mxConstants[_0xb59f[2522]]){_0x6b6cx5[mxConstants[_0xb59f[2063]]]==mxConstants[_0xb59f[481]]&&(_0x6b6cxa+=parseFloat(_0x6b6cx5[mxConstants[_0xb59f[2523]]])||mxLabel[_0xb59f[202]][_0xb59f[1680]]),_0x6b6cx5[mxConstants[_0xb59f[2064]]]!=mxConstants[_0xb59f[479]]&&(_0x6b6cx3+=parseFloat(_0x6b6cx5[mxConstants[_0xb59f[2524]]])||mxLabel[_0xb59f[202]][_0xb59f[1680]])};_0x6b6cxa+=2*(_0x6b6cx5[mxConstants[_0xb59f[2143]]]||0);_0x6b6cxa+=_0x6b6cx5[mxConstants[_0xb59f[2147]]]||0;_0x6b6cxa+=_0x6b6cx5[mxConstants[_0xb59f[2145]]]||0;_0x6b6cx3+=2*(_0x6b6cx5[mxConstants[_0xb59f[2143]]]||0);_0x6b6cx3+=_0x6b6cx5[mxConstants[_0xb59f[2144]]]||0;_0x6b6cx3+=_0x6b6cx5[mxConstants[_0xb59f[2146]]]||0;_0x6b6cx4=this[_0xb59f[2205]](_0x6b6cx4);null!=_0x6b6cx4&&(_0x6b6cxa+=_0x6b6cx4[_0xb59f[117]]+8);_0x6b6cx4=this[_0xb59f[2183]](_0x6b6cx2);null!=_0x6b6cx4&&0<_0x6b6cx4[_0xb59f[67]]?(this[_0xb59f[2186]](_0x6b6cx2)||(_0x6b6cx4=_0x6b6cx4[_0xb59f[230]](/\n/g,_0xb59f[545])),_0x6b6cx9=mxUtils[_0xb59f[2525]](_0x6b6cx4,_0x6b6cx9,_0x6b6cx5[mxConstants[_0xb59f[2188]]]),_0x6b6cx2=_0x6b6cx9[_0xb59f[117]]+_0x6b6cxa,_0x6b6cx3=_0x6b6cx9[_0xb59f[119]]+_0x6b6cx3,mxUtils[_0xb59f[433]](_0x6b6cx5,mxConstants.STYLE_HORIZONTAL,!0)||(_0x6b6cx5=_0x6b6cx3,_0x6b6cx3=_0x6b6cx2,_0x6b6cx2=_0x6b6cx5),this[_0xb59f[991]]&&(_0x6b6cx2=this[_0xb59f[1021]](_0x6b6cx2+this[_0xb59f[1020]]/2),_0x6b6cx3=this[_0xb59f[1021]](_0x6b6cx3+this[_0xb59f[1020]]/2)),_0x6b6cx3= new mxRectangle(0,0,_0x6b6cx2,_0x6b6cx3)):(_0x6b6cx5=4*this[_0xb59f[1020]],_0x6b6cx3= new mxRectangle(0,0,_0x6b6cx5,_0x6b6cx5))}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2216]]=function(_0x6b6cx2,_0x6b6cx3){if(0.2<Math[_0xb59f[425]](1-_0x6b6cx3[_0xb59f[255]])){var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx5=this[_0xb59f[441]][_0xb59f[513]],_0x6b6cx9=_0x6b6cx2[_0xb59f[117]]*_0x6b6cx3[_0xb59f[255]],_0x6b6cxa=_0x6b6cx2[_0xb59f[119]]*_0x6b6cx3[_0xb59f[255]],_0x6b6cx12=_0x6b6cx2[_0xb59f[236]]-(_0x6b6cxa-_0x6b6cx2[_0xb59f[119]])/2,_0x6b6cx4= new mxRectangle(this[_0xb59f[1021]]((_0x6b6cx2[_0xb59f[235]]-(_0x6b6cx9-_0x6b6cx2[_0xb59f[117]])/2)/_0x6b6cx4)-_0x6b6cx5[_0xb59f[235]],this[_0xb59f[1021]](_0x6b6cx12/_0x6b6cx4)-_0x6b6cx5[_0xb59f[236]],this[_0xb59f[1021]](_0x6b6cx9/_0x6b6cx4),this[_0xb59f[1021]](_0x6b6cxa/_0x6b6cx4));this[_0xb59f[2526]](_0x6b6cx2[_0xb59f[246]],_0x6b6cx4)}};mxGraph[_0xb59f[202]][_0xb59f[2526]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[836]]([_0x6b6cx2],[_0x6b6cx3])[0]};mxGraph[_0xb59f[202]][_0xb59f[836]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[251]][_0xb59f[473]]();try{this[_0xb59f[837]](_0x6b6cx2,_0x6b6cx3),this[_0xb59f[746]]( new mxEventObject(mxEvent.RESIZE_CELLS,_0xb59f[895],_0x6b6cx2,_0xb59f[1562],_0x6b6cx3))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[837]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[67]]==_0x6b6cx3[_0xb59f[67]]){this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5=_0x6b6cx3[_0x6b6cx4],_0x6b6cx9=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2[_0x6b6cx4]);if(null!=_0x6b6cx9&&(_0x6b6cx9[_0xb59f[235]]!=_0x6b6cx5[_0xb59f[235]]||_0x6b6cx9[_0xb59f[236]]!=_0x6b6cx5[_0xb59f[236]]||_0x6b6cx9[_0xb59f[117]]!=_0x6b6cx5[_0xb59f[117]]||_0x6b6cx9[_0xb59f[119]]!=_0x6b6cx5[_0xb59f[119]])){_0x6b6cx9=_0x6b6cx9[_0xb59f[238]]();if(_0x6b6cx9[_0xb59f[1500]]){var _0x6b6cxa=_0x6b6cx9[_0xb59f[1368]];null!=_0x6b6cxa&&(_0x6b6cxa[_0xb59f[235]]+=_0x6b6cx5[_0xb59f[235]]-_0x6b6cx9[_0xb59f[235]],_0x6b6cxa[_0xb59f[236]]+=_0x6b6cx5[_0xb59f[236]]-_0x6b6cx9[_0xb59f[236]])}else {_0x6b6cx9[_0xb59f[235]]=_0x6b6cx5[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]]=_0x6b6cx5[_0xb59f[236]]};_0x6b6cx9[_0xb59f[117]]=_0x6b6cx5[_0xb59f[117]];_0x6b6cx9[_0xb59f[119]]=_0x6b6cx5[_0xb59f[119]];!_0x6b6cx9[_0xb59f[1500]]&&(this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx2[_0x6b6cx4])&&!this[_0xb59f[2505]]())&&(_0x6b6cx9[_0xb59f[235]]=Math[_0xb59f[160]](0,_0x6b6cx9[_0xb59f[235]]),_0x6b6cx9[_0xb59f[236]]=Math[_0xb59f[160]](0,_0x6b6cx9[_0xb59f[236]]));this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2[_0x6b6cx4],_0x6b6cx9);this[_0xb59f[2507]](_0x6b6cx2[_0x6b6cx4])&&this[_0xb59f[2508]](_0x6b6cx2[_0x6b6cx4])}};this[_0xb59f[2399]]&&this[_0xb59f[1750]](_0x6b6cx2);this[_0xb59f[746]]( new mxEventObject(mxEvent.CELLS_RESIZED,_0xb59f[895],_0x6b6cx2,_0xb59f[1562],_0x6b6cx3))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2508]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2),_0x6b6cx4=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx3);if(null!=_0x6b6cx3&&(null!=_0x6b6cx4&&!this[_0xb59f[1742]](_0x6b6cx3))&&(_0x6b6cx2=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2),null!=_0x6b6cx2&&(_0x6b6cx4[_0xb59f[117]]<_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]||_0x6b6cx4[_0xb59f[119]]<_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]))){_0x6b6cx4=_0x6b6cx4[_0xb59f[238]](),_0x6b6cx4[_0xb59f[117]]=Math[_0xb59f[160]](_0x6b6cx4[_0xb59f[117]],_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]),_0x6b6cx4[_0xb59f[119]]=Math[_0xb59f[160]](_0x6b6cx4[_0xb59f[119]],_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]),this[_0xb59f[837]]([_0x6b6cx3],[_0x6b6cx4])}}};mxGraph[_0xb59f[202]][_0xb59f[903]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return this[_0xb59f[834]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,!0,_0x6b6cx5,_0x6b6cx9)};mxGraph[_0xb59f[202]][_0xb59f[834]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:0;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:0;_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!1;if(null!=_0x6b6cx2&&(0!=_0x6b6cx3||0!=_0x6b6cx4||_0x6b6cx5||null!=_0x6b6cx9)){this[_0xb59f[251]][_0xb59f[473]]();try{_0x6b6cx5&&(_0x6b6cx2=this[_0xb59f[899]](_0x6b6cx2,this[_0xb59f[2527]]()),null==_0x6b6cx9&&(_0x6b6cx9=this[_0xb59f[902]]()));var _0x6b6cx12=this[_0xb59f[2505]]();null!=_0x6b6cx9&&this[_0xb59f[2528]](!0);this[_0xb59f[835]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,!_0x6b6cx5&&this[_0xb59f[2529]]()&&this[_0xb59f[2530]](),null==_0x6b6cx9);this[_0xb59f[2528]](_0x6b6cx12);if(null!=_0x6b6cx9){var _0x6b6cx13=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx9);this[_0xb59f[833]](_0x6b6cx2,_0x6b6cx9,_0x6b6cx13,null,null,!0)};this[_0xb59f[746]]( new mxEventObject(mxEvent.MOVE_CELLS,_0xb59f[895],_0x6b6cx2,_0xb59f[1126],_0x6b6cx3,_0xb59f[1125],_0x6b6cx4,_0xb59f[238],_0x6b6cx5,_0xb59f[772],_0x6b6cx9,_0xb59f[763],_0x6b6cxa))}finally{this[_0xb59f[251]][_0xb59f[476]]()}};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[835]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=_0x6b6cx2&&(0!=_0x6b6cx3||0!=_0x6b6cx4)){this[_0xb59f[251]][_0xb59f[473]]();try{_0x6b6cx5&&this[_0xb59f[2531]](_0x6b6cx2);for(var _0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2[_0xb59f[67]];_0x6b6cxa++){this[_0xb59f[2532]](_0x6b6cx2[_0x6b6cxa],_0x6b6cx3,_0x6b6cx4),_0x6b6cx9&&this[_0xb59f[2509]](_0x6b6cx2[_0x6b6cxa])};this[_0xb59f[2400]]&&this[_0xb59f[1750]](_0x6b6cx2);this[_0xb59f[746]]( new mxEventObject(mxEvent.CELLS_MOVED,_0xb59f[895],_0x6b6cx2,_0xb59f[1126],_0x6b6cx4,_0xb59f[1125],_0x6b6cx4,_0xb59f[808],_0x6b6cx5))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2532]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2);null!=_0x6b6cx5&&(_0x6b6cx5=_0x6b6cx5[_0xb59f[238]](),_0x6b6cx5[_0xb59f[513]](_0x6b6cx3,_0x6b6cx4),!_0x6b6cx5[_0xb59f[1500]]&&(this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx2)&&!this[_0xb59f[2505]]())&&(_0x6b6cx5[_0xb59f[235]]=Math[_0xb59f[160]](0,_0x6b6cx5[_0xb59f[235]]),_0x6b6cx5[_0xb59f[236]]=Math[_0xb59f[160]](0,_0x6b6cx5[_0xb59f[236]])),_0x6b6cx5[_0xb59f[1500]]&&!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)&&(null==_0x6b6cx5[_0xb59f[1368]]?_0x6b6cx5[_0xb59f[1368]]= new mxPoint(_0x6b6cx3,_0x6b6cx4):(_0x6b6cx5[_0xb59f[1368]][_0xb59f[235]]+=_0x6b6cx3,_0x6b6cx5[_0xb59f[1368]][_0xb59f[236]]+=_0x6b6cx4)),this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2,_0x6b6cx5))};mxGraph[_0xb59f[202]][_0xb59f[2533]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2);if(_0x6b6cx3==this[_0xb59f[902]]()||_0x6b6cx3==this[_0xb59f[2534]]()){return this[_0xb59f[2535]]()};if(null!=_0x6b6cx3&&_0x6b6cx3!=this[_0xb59f[902]]()){var _0x6b6cx4=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx3);if(null!=_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2=0,_0x6b6cx9=_0x6b6cx4[_0xb59f[117]],_0x6b6cx4=_0x6b6cx4[_0xb59f[119]];this[_0xb59f[1730]](_0x6b6cx3)&&(_0x6b6cx3=this[_0xb59f[1731]](_0x6b6cx3),_0x6b6cx2=_0x6b6cx3[_0xb59f[117]],_0x6b6cx9-=_0x6b6cx3[_0xb59f[117]],_0x6b6cx5=_0x6b6cx3[_0xb59f[119]],_0x6b6cx4-=_0x6b6cx3[_0xb59f[119]]);return  new mxRectangle(_0x6b6cx2,_0x6b6cx5,_0x6b6cx9,_0x6b6cx4)}}};return null};mxGraph[_0xb59f[202]][_0xb59f[2535]]=function(){return this[_0xb59f[2385]]};mxGraph[_0xb59f[202]][_0xb59f[2509]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2),_0x6b6cx4=this[_0xb59f[2536]](_0x6b6cx2)?this[_0xb59f[2533]](_0x6b6cx2):this[_0xb59f[2535]]();if(null!=_0x6b6cx3&&null!=_0x6b6cx4&&!_0x6b6cx3[_0xb59f[1500]]&&(_0x6b6cx3[_0xb59f[235]]<_0x6b6cx4[_0xb59f[235]]||_0x6b6cx3[_0xb59f[236]]<_0x6b6cx4[_0xb59f[236]]||_0x6b6cx4[_0xb59f[117]]<_0x6b6cx3[_0xb59f[235]]+_0x6b6cx3[_0xb59f[117]]||_0x6b6cx4[_0xb59f[119]]<_0x6b6cx3[_0xb59f[236]]+_0x6b6cx3[_0xb59f[119]])){_0x6b6cx2=this[_0xb59f[2537]](_0x6b6cx2),0<_0x6b6cx4[_0xb59f[117]]&&(_0x6b6cx3[_0xb59f[235]]=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx4[_0xb59f[235]]+_0x6b6cx4[_0xb59f[117]]-(1-_0x6b6cx2)*_0x6b6cx3[_0xb59f[117]])),0<_0x6b6cx4[_0xb59f[119]]&&(_0x6b6cx3[_0xb59f[236]]=Math[_0xb59f[243]](_0x6b6cx3[_0xb59f[236]],_0x6b6cx4[_0xb59f[236]]+_0x6b6cx4[_0xb59f[119]]-(1-_0x6b6cx2)*_0x6b6cx3[_0xb59f[119]])),_0x6b6cx3[_0xb59f[235]]=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[235]],_0x6b6cx4[_0xb59f[235]]-_0x6b6cx3[_0xb59f[117]]*_0x6b6cx2),_0x6b6cx3[_0xb59f[236]]=Math[_0xb59f[160]](_0x6b6cx3[_0xb59f[236]],_0x6b6cx4[_0xb59f[236]]-_0x6b6cx3[_0xb59f[119]]*_0x6b6cx2)}}};mxGraph[_0xb59f[202]][_0xb59f[1750]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){for(var _0x6b6cx3={},_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5=mxCellPath[_0xb59f[385]](_0x6b6cx2[_0x6b6cx4]);_0x6b6cx3[_0x6b6cx5]=_0x6b6cx2[_0x6b6cx4]};this[_0xb59f[251]][_0xb59f[473]]();try{for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[264]](_0x6b6cx2[_0x6b6cx4]);if(null!=_0x6b6cx9){for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx9[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cxa=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx9[_0x6b6cx5]),_0x6b6cx12=null!=_0x6b6cxa?_0x6b6cxa[_0xb59f[1710]](!0):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx9[_0x6b6cx5],!0),_0x6b6cx13=null!=_0x6b6cxa?_0x6b6cxa[_0xb59f[1710]](!1):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx9[_0x6b6cx5],!1),_0x6b6cx14=mxCellPath[_0xb59f[385]](_0x6b6cx12),_0x6b6cx15=mxCellPath[_0xb59f[385]](_0x6b6cx13);(null==_0x6b6cx3[_0x6b6cx14]||null==_0x6b6cx3[_0x6b6cx15])&&this[_0xb59f[1809]](_0x6b6cx9[_0x6b6cx5])}};this[_0xb59f[1750]](this[_0xb59f[251]][_0xb59f[1953]](_0x6b6cx2[_0x6b6cx4]))}}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[1809]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2);null!=_0x6b6cx3&&(null!=_0x6b6cx3[_0xb59f[1525]]&&0<_0x6b6cx3[_0xb59f[1525]][_0xb59f[67]])&&(_0x6b6cx3=_0x6b6cx3[_0xb59f[238]](),_0x6b6cx3[_0xb59f[1525]]=[],this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2,_0x6b6cx3));return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2538]]=function(_0x6b6cx2,_0x6b6cx3){return null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[253]]&&null!=_0x6b6cx2[_0xb59f[253]][_0xb59f[1561]]?_0x6b6cx2[_0xb59f[253]][_0xb59f[1561]][_0xb59f[1531]]:null};mxGraph[_0xb59f[202]][_0xb59f[2288]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=null;var _0x6b6cx5=_0x6b6cx2[_0xb59f[124]][_0x6b6cx4?mxConstants[_0xb59f[2539]]:mxConstants[_0xb59f[2540]]];if(null!=_0x6b6cx5){var _0x6b6cx9=_0x6b6cx2[_0xb59f[124]][_0x6b6cx4?mxConstants[_0xb59f[2541]]:mxConstants[_0xb59f[2542]]];null!=_0x6b6cx9&&(_0x6b6cx3= new mxPoint(parseFloat(_0x6b6cx5),parseFloat(_0x6b6cx9)))};_0x6b6cx5= !1;null!=_0x6b6cx3&&(_0x6b6cx5=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],_0x6b6cx4?mxConstants[_0xb59f[2543]]:mxConstants[_0xb59f[2544]],!0));return  new mxConnectionConstraint(_0x6b6cx3,_0x6b6cx5)};mxGraph[_0xb59f[202]][_0xb59f[2545]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx5){this[_0xb59f[251]][_0xb59f[473]]();try{null==_0x6b6cx5||null==_0x6b6cx5[_0xb59f[2546]]?(this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2539]]:mxConstants[_0xb59f[2540]],null,[_0x6b6cx2]),this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2541]]:mxConstants[_0xb59f[2542]],null,[_0x6b6cx2]),this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2543]]:mxConstants[_0xb59f[2544]],null,[_0x6b6cx2])):null!=_0x6b6cx5[_0xb59f[2546]]&&(this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2539]]:mxConstants[_0xb59f[2540]],_0x6b6cx5[_0xb59f[2546]][_0xb59f[235]],[_0x6b6cx2]),this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2541]]:mxConstants[_0xb59f[2542]],_0x6b6cx5[_0xb59f[2546]][_0xb59f[236]],[_0x6b6cx2]),_0x6b6cx5[_0xb59f[591]]?this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2543]]:mxConstants[_0xb59f[2544]],null,[_0x6b6cx2]):this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2543]]:mxConstants[_0xb59f[2544]],_0xb59f[468],[_0x6b6cx2]))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2290]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null;if(null!=_0x6b6cx2){var _0x6b6cx5=this[_0xb59f[441]][_0xb59f[2087]](_0x6b6cx2),_0x6b6cx9= new mxPoint(_0x6b6cx5[_0xb59f[241]](),_0x6b6cx5[_0xb59f[242]]()),_0x6b6cxa=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2011]]],_0x6b6cx12=0;if(null!=_0x6b6cxa&&(_0xb59f[700]==_0x6b6cxa?_0x6b6cx12+=270:_0xb59f[703]==_0x6b6cxa?_0x6b6cx12+=180:_0xb59f[701]==_0x6b6cxa&&(_0x6b6cx12+=90),_0xb59f[700]==_0x6b6cxa||_0xb59f[701]==_0x6b6cxa)){_0x6b6cx5[_0xb59f[235]]+=_0x6b6cx5[_0xb59f[117]]/2-_0x6b6cx5[_0xb59f[119]]/2;_0x6b6cx5[_0xb59f[236]]+=_0x6b6cx5[_0xb59f[119]]/2-_0x6b6cx5[_0xb59f[117]]/2;var _0x6b6cx13=_0x6b6cx5[_0xb59f[117]];_0x6b6cx5[_0xb59f[117]]=_0x6b6cx5[_0xb59f[119]];_0x6b6cx5[_0xb59f[119]]=_0x6b6cx13};if(null!=_0x6b6cx3[_0xb59f[2546]]){var _0x6b6cx14=_0x6b6cx4=1,_0x6b6cx15=0,_0x6b6cx16=0;if(this[_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx2[_0xb59f[246]])){var _0x6b6cx17=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2547]]],_0x6b6cx18=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2548]]];null!=_0x6b6cx2[_0xb59f[253]][_0xb59f[1561]]&&(_0x6b6cx17=1==mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],_0xb59f[1607],0)||_0x6b6cx17,_0x6b6cx18=1==mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],_0xb59f[1608],0)||_0x6b6cx18);if(_0xb59f[700]==_0x6b6cxa||_0xb59f[701]==_0x6b6cxa){_0x6b6cx13=_0x6b6cx17,_0x6b6cx17=_0x6b6cx18,_0x6b6cx18=_0x6b6cx13};_0x6b6cx17&&(_0x6b6cx4= -1,_0x6b6cx15=-_0x6b6cx5[_0xb59f[117]]);_0x6b6cx18&&(_0x6b6cx14= -1,_0x6b6cx16=-_0x6b6cx5[_0xb59f[119]])};_0x6b6cx4= new mxPoint(_0x6b6cx5[_0xb59f[235]]+_0x6b6cx3[_0xb59f[2546]][_0xb59f[235]]*_0x6b6cx5[_0xb59f[117]]*_0x6b6cx4-_0x6b6cx15,_0x6b6cx5[_0xb59f[236]]+_0x6b6cx3[_0xb59f[2546]][_0xb59f[236]]*_0x6b6cx5[_0xb59f[119]]*_0x6b6cx14-_0x6b6cx16)};_0x6b6cxa=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2278]]]||0;_0x6b6cx3[_0xb59f[591]]?(0!=_0x6b6cx12&&null!=_0x6b6cx4&&(_0x6b6cx13=_0x6b6cx5=0,90==_0x6b6cx12?_0x6b6cx13=1:180==_0x6b6cx12?_0x6b6cx5= -1:270==_0x6b6cxa&&(_0x6b6cx13= -1),_0x6b6cx4=mxUtils[_0xb59f[432]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx13,_0x6b6cx9)),null!=_0x6b6cx4&&_0x6b6cx3[_0xb59f[591]]&&(_0x6b6cx4=this[_0xb59f[441]][_0xb59f[2302]](_0x6b6cx2,_0x6b6cx4,!1))):_0x6b6cxa+=_0x6b6cx12;0!=_0x6b6cxa&&null!=_0x6b6cx4&&(_0x6b6cx12=mxUtils[_0xb59f[431]](_0x6b6cxa),_0x6b6cx5=Math[_0xb59f[426]](_0x6b6cx12),_0x6b6cx13=Math[_0xb59f[427]](_0x6b6cx12),_0x6b6cx4=mxUtils[_0xb59f[432]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx13,_0x6b6cx9))};return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[851]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[251]][_0xb59f[473]]();try{var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,_0x6b6cx4);this[_0xb59f[852]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5);this[_0xb59f[746]]( new mxEventObject(mxEvent.CONNECT_CELL,_0xb59f[1989],_0x6b6cx2,_0xb59f[1984],_0x6b6cx3,_0xb59f[1097],_0x6b6cx4,_0xb59f[257],_0x6b6cx9))}finally{this[_0xb59f[251]][_0xb59f[476]]()};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[852]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx2){this[_0xb59f[251]][_0xb59f[473]]();try{var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,_0x6b6cx4);this[_0xb59f[2545]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5);this[_0xb59f[2549]]()&&(_0x6b6cx5=null,this[_0xb59f[1908]](_0x6b6cx3)&&(_0x6b6cx5=_0x6b6cx3[_0xb59f[1103]](),_0x6b6cx3=this[_0xb59f[2550]](_0x6b6cx3,_0x6b6cx4)),this[_0xb59f[1717]](_0x6b6cx4?mxConstants[_0xb59f[2303]]:mxConstants[_0xb59f[2304]],_0x6b6cx5,[_0x6b6cx2]));this[_0xb59f[251]][_0xb59f[1957]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);this[_0xb59f[2401]]&&this[_0xb59f[1809]](_0x6b6cx2);this[_0xb59f[746]]( new mxEventObject(mxEvent.CELL_CONNECTED,_0xb59f[1989],_0x6b6cx2,_0xb59f[1984],_0x6b6cx3,_0xb59f[1097],_0x6b6cx4,_0xb59f[257],_0x6b6cx9))}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2531]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){this[_0xb59f[251]][_0xb59f[473]]();try{for(var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx4=this[_0xb59f[441]][_0xb59f[513]],_0x6b6cx5={},_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2[_0x6b6cx9]);_0x6b6cx5[_0x6b6cxa]=_0x6b6cx2[_0x6b6cx9]};for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){if(this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2[_0x6b6cx9])){var _0x6b6cx12=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2[_0x6b6cx9]);if(null!=_0x6b6cx12){var _0x6b6cx13=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2[_0x6b6cx9]),_0x6b6cx14=this[_0xb59f[441]][_0xb59f[248]](this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2[_0x6b6cx9]));if(null!=_0x6b6cx13&&null!=_0x6b6cx14){var _0x6b6cx12=_0x6b6cx12[_0xb59f[238]](),_0x6b6cx15=-_0x6b6cx14[_0xb59f[2078]][_0xb59f[235]],_0x6b6cx16=-_0x6b6cx14[_0xb59f[2078]][_0xb59f[236]],_0x6b6cx17=_0x6b6cx13[_0xb59f[439]],_0x6b6cx18=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2[_0x6b6cx9],!0);if(null!=_0x6b6cx18&&this[_0xb59f[2551]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx18,!0)){for(var _0x6b6cx19=mxCellPath[_0xb59f[385]](_0x6b6cx18);null!=_0x6b6cx18&&null==_0x6b6cx5[_0x6b6cx19];){_0x6b6cx18=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx18),_0x6b6cx19=mxCellPath[_0xb59f[385]](_0x6b6cx18)};null==_0x6b6cx18&&(_0x6b6cx12[_0xb59f[2007]]( new mxPoint(_0x6b6cx17[0][_0xb59f[235]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[235]]+_0x6b6cx15,_0x6b6cx17[0][_0xb59f[236]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[236]]+_0x6b6cx16),!0),this[_0xb59f[251]][_0xb59f[1957]](_0x6b6cx2[_0x6b6cx9],null,!0))};var _0x6b6cx1a=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2[_0x6b6cx9],!1);if(null!=_0x6b6cx1a&&this[_0xb59f[2551]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx1a,!1)){for(var _0x6b6cx1b=mxCellPath[_0xb59f[385]](_0x6b6cx1a);null!=_0x6b6cx1a&&null==_0x6b6cx5[_0x6b6cx1b];){_0x6b6cx1a=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx1a),_0x6b6cx1b=mxCellPath[_0xb59f[385]](_0x6b6cx1a)};if(null==_0x6b6cx1a){var _0x6b6cx1c=_0x6b6cx17[_0xb59f[67]]-1;_0x6b6cx12[_0xb59f[2007]]( new mxPoint(_0x6b6cx17[_0x6b6cx1c][_0xb59f[235]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[235]]+_0x6b6cx15,_0x6b6cx17[_0x6b6cx1c][_0xb59f[236]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[236]]+_0x6b6cx16),!1);this[_0xb59f[251]][_0xb59f[1957]](_0x6b6cx2[_0x6b6cx9],null,!1)}};this[_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx12)}}}}}finally{this[_0xb59f[251]][_0xb59f[476]]()}}};mxGraph[_0xb59f[202]][_0xb59f[2534]]=function(){return this[_0xb59f[441]][_0xb59f[1741]]};mxGraph[_0xb59f[202]][_0xb59f[2326]]=function(_0x6b6cx2){return null};mxGraph[_0xb59f[202]][_0xb59f[1908]]=function(_0x6b6cx2){return !1};mxGraph[_0xb59f[202]][_0xb59f[2550]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2280]]=function(_0x6b6cx2){return null};mxGraph[_0xb59f[202]][_0xb59f[2552]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2||this[_0xb59f[2452]]();null!=_0x6b6cx2&&this[_0xb59f[2553]](_0x6b6cx2)&&(this[_0xb59f[441]][_0xb59f[2257]](_0x6b6cx2),this[_0xb59f[2440]]())};mxGraph[_0xb59f[202]][_0xb59f[2554]]=function(){var _0x6b6cx2=this[_0xb59f[251]][_0xb59f[501]](),_0x6b6cx3=this[_0xb59f[2534]]();if(null!=_0x6b6cx3){for(var _0x6b6cx4=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx3);_0x6b6cx4!=_0x6b6cx2&&!this[_0xb59f[2553]](_0x6b6cx4)&&this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx4)!=_0x6b6cx2;){_0x6b6cx4=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx4)};_0x6b6cx4==_0x6b6cx2||this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx4)==_0x6b6cx2?this[_0xb59f[441]][_0xb59f[2257]](null):this[_0xb59f[441]][_0xb59f[2257]](_0x6b6cx4);null!=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx3)&&this[_0xb59f[2450]](_0x6b6cx3)}};mxGraph[_0xb59f[202]][_0xb59f[2442]]=function(){var _0x6b6cx2=this[_0xb59f[2534]]();null!=_0x6b6cx2&&(this[_0xb59f[441]][_0xb59f[2257]](null),null!=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2)&&this[_0xb59f[2450]](_0x6b6cx2))};mxGraph[_0xb59f[202]][_0xb59f[2553]]=function(_0x6b6cx2){return null!=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[517]]=function(){return this[_0xb59f[441]][_0xb59f[517]]()};mxGraph[_0xb59f[202]][_0xb59f[2555]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=[_0x6b6cx2];_0x6b6cx3&&(_0x6b6cx5=_0x6b6cx5[_0xb59f[1919]](this[_0xb59f[251]][_0xb59f[264]](_0x6b6cx2)));_0x6b6cx5=this[_0xb59f[441]][_0xb59f[1799]](_0x6b6cx5);if(_0x6b6cx4){_0x6b6cx4=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2);for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx4;_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[2555]](this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,_0x6b6cx9),_0x6b6cx3,!0);null!=_0x6b6cx5?_0x6b6cx5[_0xb59f[99]](_0x6b6cxa):_0x6b6cx5=_0x6b6cxa}};return _0x6b6cx5};mxGraph[_0xb59f[202]][_0xb59f[1729]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;var _0x6b6cx4=null;if(null!=_0x6b6cx2){for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){if(_0x6b6cx3||this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx2[_0x6b6cx5])){var _0x6b6cx9=this[_0xb59f[1198]](_0x6b6cx2[_0x6b6cx5]);if(null!=_0x6b6cx9){var _0x6b6cxa=_0x6b6cx9[_0xb59f[1525]];if(null!=_0x6b6cxa&&0<_0x6b6cxa[_0xb59f[67]]){for(var _0x6b6cx12= new mxRectangle(_0x6b6cxa[0][_0xb59f[235]],_0x6b6cxa[0][_0xb59f[236]],0,0),_0x6b6cx13=function(_0x6b6cx2){null!=_0x6b6cx2&&_0x6b6cx12[_0xb59f[99]]( new mxRectangle(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],0,0))},_0x6b6cx14=1;_0x6b6cx14<_0x6b6cxa[_0xb59f[67]];_0x6b6cx14++){_0x6b6cx13(_0x6b6cxa[_0x6b6cx14])};_0x6b6cx13(_0x6b6cx9[_0xb59f[2006]](!0));_0x6b6cx13(_0x6b6cx9[_0xb59f[2006]](!1))};null==_0x6b6cx4?_0x6b6cx4= new mxRectangle(_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]],_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]]):_0x6b6cx4[_0xb59f[99]](_0x6b6cx9)}}}};return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[802]]=function(_0x6b6cx2){this[_0xb59f[441]][_0xb59f[200]](_0x6b6cx2,null==_0x6b6cx2);this[_0xb59f[441]][_0xb59f[2264]]();this[_0xb59f[2258]]();this[_0xb59f[746]]( new mxEventObject(mxEvent.REFRESH))};mxGraph[_0xb59f[202]][_0xb59f[1021]]=function(_0x6b6cx2){this[_0xb59f[991]]&&(_0x6b6cx2=Math[_0xb59f[488]](_0x6b6cx2/this[_0xb59f[1020]])*this[_0xb59f[1020]]);return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[1135]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[2365]]&&mxUtils[_0xb59f[1134]](this[_0xb59f[526]])){this[_0xb59f[526]][_0xb59f[360]]= -_0x6b6cx2,this[_0xb59f[526]][_0xb59f[190]]= -_0x6b6cx3}else {var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[2051]]();if(this[_0xb59f[507]]==mxConstants[_0xb59f[508]]){if(0==_0x6b6cx2&&0==_0x6b6cx3){if(mxClient[_0xb59f[80]]?_0x6b6cx4[_0xb59f[57]](_0xb59f[535],_0xb59f[536]+_0x6b6cx2+_0xb59f[537]+_0x6b6cx3+_0xb59f[460]):_0x6b6cx4[_0xb59f[1390]](_0xb59f[535]),null!=this[_0xb59f[2556]]){for(var _0x6b6cx5=this[_0xb59f[2556]][_0xb59f[285]];null!=_0x6b6cx5;){var _0x6b6cx9=_0x6b6cx5[_0xb59f[287]];this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx5);_0x6b6cx5=_0x6b6cx9};this[_0xb59f[2556]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[2556]]);this[_0xb59f[2556]]=null;this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx4[_0xb59f[265]]);for(_0x6b6cx5=this[_0xb59f[2557]][_0xb59f[285]];null!=_0x6b6cx5;){_0x6b6cx9=_0x6b6cx5[_0xb59f[287]],this[_0xb59f[526]][_0xb59f[62]](_0x6b6cx5),_0x6b6cx5=_0x6b6cx9};this[_0xb59f[2557]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[2557]]);this[_0xb59f[2557]]=null}}else {_0x6b6cx4[_0xb59f[57]](_0xb59f[535],_0xb59f[536]+_0x6b6cx2+_0xb59f[537]+_0x6b6cx3+_0xb59f[460]);if(null==this[_0xb59f[2556]]){this[_0xb59f[2556]]=document[_0xb59f[55]](_0xb59f[485]);this[_0xb59f[2556]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];this[_0xb59f[2556]][_0xb59f[124]][_0xb59f[277]]=_0xb59f[189];this[_0xb59f[2557]]=document[_0xb59f[55]](_0xb59f[485]);this[_0xb59f[2557]][_0xb59f[124]][_0xb59f[491]]=_0xb59f[492];this[_0xb59f[2557]][_0xb59f[124]][_0xb59f[277]]=_0xb59f[189];for(var _0x6b6cxa=this[_0xb59f[2556]],_0x6b6cx5=this[_0xb59f[526]][_0xb59f[285]];null!=_0x6b6cx5;){_0x6b6cx9=_0x6b6cx5[_0xb59f[287]],_0x6b6cx5!=_0x6b6cx4[_0xb59f[265]]?_0x6b6cxa[_0xb59f[62]](_0x6b6cx5):_0x6b6cxa=this[_0xb59f[2557]],_0x6b6cx5=_0x6b6cx9};this[_0xb59f[526]][_0xb59f[950]](this[_0xb59f[2556]],_0x6b6cx4[_0xb59f[265]]);this[_0xb59f[526]][_0xb59f[62]](this[_0xb59f[2557]])};this[_0xb59f[2556]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2+_0xb59f[168];this[_0xb59f[2556]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx3+_0xb59f[168];this[_0xb59f[2557]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2+_0xb59f[168];this[_0xb59f[2557]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx3+_0xb59f[168]}}else {_0x6b6cx4[_0xb59f[124]][_0xb59f[361]]=_0x6b6cx2+_0xb59f[168],_0x6b6cx4[_0xb59f[124]][_0xb59f[125]]=_0x6b6cx3+_0xb59f[168]};this[_0xb59f[1136]]=_0x6b6cx2;this[_0xb59f[1137]]=_0x6b6cx3;this[_0xb59f[746]]( new mxEventObject(mxEvent.PAN))}};mxGraph[_0xb59f[202]][_0xb59f[2558]]=function(){this[_0xb59f[499]](this[_0xb59f[2395]])};mxGraph[_0xb59f[202]][_0xb59f[2559]]=function(){this[_0xb59f[499]](1/this[_0xb59f[2395]])};mxGraph[_0xb59f[202]][_0xb59f[2560]]=function(){1==this[_0xb59f[441]][_0xb59f[255]]?this[_0xb59f[441]][_0xb59f[1147]](0,0):(this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]]=0,this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]=0,this[_0xb59f[441]][_0xb59f[2262]](1))};mxGraph[_0xb59f[202]][_0xb59f[2561]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[499]](_0x6b6cx2/this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx3)};mxGraph[_0xb59f[202]][_0xb59f[499]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:this[_0xb59f[2397]];var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[255]]*_0x6b6cx2,_0x6b6cx5=this[_0xb59f[441]][_0xb59f[248]](this[_0xb59f[2452]]());if(this[_0xb59f[2396]]&&null!=_0x6b6cx5){_0x6b6cx5= new mxRectangle(_0x6b6cx5[_0xb59f[235]]*_0x6b6cx2,_0x6b6cx5[_0xb59f[236]]*_0x6b6cx2,_0x6b6cx5[_0xb59f[117]]*_0x6b6cx2,_0x6b6cx5[_0xb59f[119]]*_0x6b6cx2),this[_0xb59f[441]][_0xb59f[255]]=_0x6b6cx4,this[_0xb59f[2562]](_0x6b6cx5)||(this[_0xb59f[441]][_0xb59f[2259]](),this[_0xb59f[441]][_0xb59f[2262]](_0x6b6cx4))}else {if(_0x6b6cx3&&!mxUtils[_0xb59f[1134]](this[_0xb59f[526]])){var _0x6b6cx5=this[_0xb59f[526]][_0xb59f[359]],_0x6b6cx9=this[_0xb59f[526]][_0xb59f[167]];if(1<_0x6b6cx2){var _0x6b6cxa=(_0x6b6cx2-1)/(2*_0x6b6cx4),_0x6b6cx5=_0x6b6cx5* -_0x6b6cxa,_0x6b6cx9=_0x6b6cx9* -_0x6b6cxa}else {_0x6b6cxa=(1/_0x6b6cx2-1)/(2*this[_0xb59f[441]][_0xb59f[255]]),_0x6b6cx5*=_0x6b6cxa,_0x6b6cx9*=_0x6b6cxa};this[_0xb59f[441]][_0xb59f[829]](_0x6b6cx4,this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]]+_0x6b6cx5,this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]+_0x6b6cx9)}else {this[_0xb59f[441]][_0xb59f[2262]](_0x6b6cx4),mxUtils[_0xb59f[1134]](this[_0xb59f[526]])&&(_0x6b6cx9=_0x6b6cx5=0,_0x6b6cx3&&(_0x6b6cx5=this[_0xb59f[526]][_0xb59f[359]]*(_0x6b6cx2-1)/2,_0x6b6cx9=this[_0xb59f[526]][_0xb59f[167]]*(_0x6b6cx2-1)/2),this[_0xb59f[526]][_0xb59f[360]]=Math[_0xb59f[488]](this[_0xb59f[526]][_0xb59f[360]]*_0x6b6cx2+_0x6b6cx5),this[_0xb59f[526]][_0xb59f[190]]=Math[_0xb59f[488]](this[_0xb59f[526]][_0xb59f[190]]*_0x6b6cx2+_0x6b6cx9))}}};mxGraph[_0xb59f[202]][_0xb59f[2563]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[526]][_0xb59f[159]]/_0x6b6cx2[_0xb59f[117]]/(this[_0xb59f[526]][_0xb59f[157]]/_0x6b6cx2[_0xb59f[119]]);_0x6b6cx2[_0xb59f[235]]=Math[_0xb59f[160]](0,_0x6b6cx2[_0xb59f[235]]);_0x6b6cx2[_0xb59f[236]]=Math[_0xb59f[160]](0,_0x6b6cx2[_0xb59f[236]]);var _0x6b6cx4=Math[_0xb59f[243]](this[_0xb59f[526]][_0xb59f[1526]],_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]),_0x6b6cx5=Math[_0xb59f[243]](this[_0xb59f[526]][_0xb59f[191]],_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]);_0x6b6cx2[_0xb59f[117]]=_0x6b6cx4-_0x6b6cx2[_0xb59f[235]];_0x6b6cx2[_0xb59f[119]]=_0x6b6cx5-_0x6b6cx2[_0xb59f[236]];1>_0x6b6cx3?(_0x6b6cx3=_0x6b6cx2[_0xb59f[119]]/_0x6b6cx3,_0x6b6cx4=(_0x6b6cx3-_0x6b6cx2[_0xb59f[119]])/2,_0x6b6cx2[_0xb59f[119]]=_0x6b6cx3,_0x6b6cx3=Math[_0xb59f[243]](_0x6b6cx2[_0xb59f[236]],_0x6b6cx4),_0x6b6cx2[_0xb59f[236]]-=_0x6b6cx3,_0x6b6cx5=Math[_0xb59f[243]](this[_0xb59f[526]][_0xb59f[191]],_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]),_0x6b6cx2[_0xb59f[119]]=_0x6b6cx5-_0x6b6cx2[_0xb59f[236]]):(_0x6b6cx3*=_0x6b6cx2[_0xb59f[117]],_0x6b6cx4=(_0x6b6cx3-_0x6b6cx2[_0xb59f[117]])/2,_0x6b6cx2[_0xb59f[117]]=_0x6b6cx3,_0x6b6cx3=Math[_0xb59f[243]](_0x6b6cx2[_0xb59f[235]],_0x6b6cx4),_0x6b6cx2[_0xb59f[235]]-=_0x6b6cx3,_0x6b6cx4=Math[_0xb59f[243]](this[_0xb59f[526]][_0xb59f[1526]],_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]),_0x6b6cx2[_0xb59f[117]]=_0x6b6cx4-_0x6b6cx2[_0xb59f[235]]);_0x6b6cx3=this[_0xb59f[526]][_0xb59f[159]]/_0x6b6cx2[_0xb59f[117]];_0x6b6cx4=this[_0xb59f[441]][_0xb59f[255]]*_0x6b6cx3;mxUtils[_0xb59f[1134]](this[_0xb59f[526]])?(this[_0xb59f[441]][_0xb59f[2262]](_0x6b6cx4),this[_0xb59f[526]][_0xb59f[360]]=Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[235]]*_0x6b6cx3),this[_0xb59f[526]][_0xb59f[190]]=Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[236]]*_0x6b6cx3)):this[_0xb59f[441]][_0xb59f[829]](_0x6b6cx4,this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]]-_0x6b6cx2[_0xb59f[235]]/this[_0xb59f[441]][_0xb59f[255]],this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]-_0x6b6cx2[_0xb59f[236]]/this[_0xb59f[441]][_0xb59f[255]])};mxGraph[_0xb59f[202]][_0xb59f[933]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=this[_0xb59f[526]]){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2:0;_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;var _0x6b6cx4=this[_0xb59f[526]][_0xb59f[159]],_0x6b6cx5=this[_0xb59f[526]][_0xb59f[157]],_0x6b6cx9=this[_0xb59f[441]][_0xb59f[517]]();_0x6b6cx3&&(null!=_0x6b6cx9[_0xb59f[235]]&&null!=_0x6b6cx9[_0xb59f[236]])&&(_0x6b6cx9[_0xb59f[117]]+=_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[119]]+=_0x6b6cx9[_0xb59f[236]],_0x6b6cx9[_0xb59f[235]]=0,_0x6b6cx9[_0xb59f[236]]=0);var _0x6b6cxa=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx12=_0x6b6cx9[_0xb59f[117]]/_0x6b6cxa,_0x6b6cx13=_0x6b6cx9[_0xb59f[119]]/_0x6b6cxa;null!=this[_0xb59f[1617]]&&(_0x6b6cx12=Math[_0xb59f[160]](_0x6b6cx12,this[_0xb59f[1617]][_0xb59f[117]]-_0x6b6cx9[_0xb59f[235]]/_0x6b6cxa),_0x6b6cx13=Math[_0xb59f[160]](_0x6b6cx13,this[_0xb59f[1617]][_0xb59f[119]]-_0x6b6cx9[_0xb59f[236]]/_0x6b6cxa));var _0x6b6cx14=_0x6b6cx3?_0x6b6cx2:2*_0x6b6cx2,_0x6b6cx4=Math[_0xb59f[519]](100*Math[_0xb59f[243]](_0x6b6cx4/(_0x6b6cx12+_0x6b6cx14),_0x6b6cx5/(_0x6b6cx13+_0x6b6cx14)))/100;null!=this[_0xb59f[2413]]&&(_0x6b6cx4=Math[_0xb59f[160]](_0x6b6cx4,this[_0xb59f[2413]]));null!=this[_0xb59f[2414]]&&(_0x6b6cx4=Math[_0xb59f[243]](_0x6b6cx4,this[_0xb59f[2414]]));_0x6b6cx3?this[_0xb59f[441]][_0xb59f[255]]!=_0x6b6cx4&&this[_0xb59f[441]][_0xb59f[2262]](_0x6b6cx4):mxUtils[_0xb59f[1134]](this[_0xb59f[526]])?(this[_0xb59f[441]][_0xb59f[2262]](_0x6b6cx4),null!=_0x6b6cx9[_0xb59f[235]]&&(this[_0xb59f[526]][_0xb59f[360]]=Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[235]]/_0x6b6cxa)*_0x6b6cx4-_0x6b6cx2-Math[_0xb59f[160]](0,(this[_0xb59f[526]][_0xb59f[159]]-_0x6b6cx12*_0x6b6cx4)/2)),null!=_0x6b6cx9[_0xb59f[236]]&&(this[_0xb59f[526]][_0xb59f[190]]=Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[236]]/_0x6b6cxa)*_0x6b6cx4-_0x6b6cx2-Math[_0xb59f[160]](0,(this[_0xb59f[526]][_0xb59f[157]]-_0x6b6cx13*_0x6b6cx4)/2))):this[_0xb59f[441]][_0xb59f[829]](_0x6b6cx4,null!=_0x6b6cx9[_0xb59f[235]]?Math[_0xb59f[519]](this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]]-_0x6b6cx9[_0xb59f[235]]/_0x6b6cxa+_0x6b6cx2+1):_0x6b6cx2,null!=_0x6b6cx9[_0xb59f[236]]?Math[_0xb59f[519]](this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]-_0x6b6cx9[_0xb59f[236]]/_0x6b6cxa+_0x6b6cx2+1):_0x6b6cx2)};return this[_0xb59f[441]][_0xb59f[255]]};mxGraph[_0xb59f[202]][_0xb59f[2564]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=-this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]],_0x6b6cx5=-this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]],_0x6b6cx9=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);null!=_0x6b6cx9&&(_0x6b6cx4= new mxRectangle(_0x6b6cx4+_0x6b6cx9[_0xb59f[235]],_0x6b6cx5+_0x6b6cx9[_0xb59f[236]],_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]]),_0x6b6cx3&&null!=this[_0xb59f[526]]&&(_0x6b6cx5=this[_0xb59f[526]][_0xb59f[159]],_0x6b6cx9=this[_0xb59f[526]][_0xb59f[157]],_0x6b6cx4[_0xb59f[235]]=_0x6b6cx4[_0xb59f[241]]()-_0x6b6cx5/2,_0x6b6cx4[_0xb59f[117]]=_0x6b6cx5,_0x6b6cx4[_0xb59f[236]]=_0x6b6cx4[_0xb59f[242]]()-_0x6b6cx9/2,_0x6b6cx4[_0xb59f[119]]=_0x6b6cx9),this[_0xb59f[2562]](_0x6b6cx4)&&this[_0xb59f[441]][_0xb59f[1147]](this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]],this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]))};mxGraph[_0xb59f[202]][_0xb59f[2562]]=function(_0x6b6cx2){var _0x6b6cx3=!1;if(null!=_0x6b6cx2){var _0x6b6cx4=this[_0xb59f[526]][_0xb59f[359]],_0x6b6cx5=this[_0xb59f[526]][_0xb59f[167]],_0x6b6cx9=Math[_0xb59f[243]](_0x6b6cx4,_0x6b6cx2[_0xb59f[117]]),_0x6b6cxa=Math[_0xb59f[243]](_0x6b6cx5,_0x6b6cx2[_0xb59f[119]]);if(mxUtils[_0xb59f[1134]](this[_0xb59f[526]])){_0x6b6cx4=this[_0xb59f[526]];_0x6b6cx2[_0xb59f[235]]+=this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]];_0x6b6cx2[_0xb59f[236]]+=this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]];var _0x6b6cx12=_0x6b6cx4[_0xb59f[360]]-_0x6b6cx2[_0xb59f[235]],_0x6b6cx5=Math[_0xb59f[160]](_0x6b6cx12-_0x6b6cx4[_0xb59f[360]],0);0<_0x6b6cx12?_0x6b6cx4[_0xb59f[360]]-=_0x6b6cx12+2:(_0x6b6cx12=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx9-_0x6b6cx4[_0xb59f[360]]-_0x6b6cx4[_0xb59f[159]],0<_0x6b6cx12&&(_0x6b6cx4[_0xb59f[360]]+=_0x6b6cx12+2));_0x6b6cx9=_0x6b6cx4[_0xb59f[190]]-_0x6b6cx2[_0xb59f[236]];_0x6b6cx12=Math[_0xb59f[160]](0,_0x6b6cx9-_0x6b6cx4[_0xb59f[190]]);0<_0x6b6cx9?_0x6b6cx4[_0xb59f[190]]-=_0x6b6cx9+2:(_0x6b6cx9=_0x6b6cx2[_0xb59f[236]]+_0x6b6cxa-_0x6b6cx4[_0xb59f[190]]-_0x6b6cx4[_0xb59f[157]],0<_0x6b6cx9&&(_0x6b6cx4[_0xb59f[190]]+=_0x6b6cx9+2));!this[_0xb59f[2365]]&&(0!=_0x6b6cx5||0!=_0x6b6cx12)&&this[_0xb59f[441]][_0xb59f[1147]](_0x6b6cx5,_0x6b6cx12)}else {var _0x6b6cx12=-this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]],_0x6b6cx13=-this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]],_0x6b6cx14=this[_0xb59f[441]][_0xb59f[255]];_0x6b6cx2[_0xb59f[235]]+_0x6b6cx9>_0x6b6cx12+_0x6b6cx4&&(this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]]-=(_0x6b6cx2[_0xb59f[235]]+_0x6b6cx9-_0x6b6cx4-_0x6b6cx12)/_0x6b6cx14,_0x6b6cx3= !0);_0x6b6cx2[_0xb59f[236]]+_0x6b6cxa>_0x6b6cx13+_0x6b6cx5&&(this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]-=(_0x6b6cx2[_0xb59f[236]]+_0x6b6cxa-_0x6b6cx5-_0x6b6cx13)/_0x6b6cx14,_0x6b6cx3= !0);_0x6b6cx2[_0xb59f[235]]<_0x6b6cx12&&(this[_0xb59f[441]][_0xb59f[513]][_0xb59f[235]]+=(_0x6b6cx12-_0x6b6cx2[_0xb59f[235]])/_0x6b6cx14,_0x6b6cx3= !0);_0x6b6cx2[_0xb59f[236]]<_0x6b6cx13&&(this[_0xb59f[441]][_0xb59f[513]][_0xb59f[236]]+=(_0x6b6cx13-_0x6b6cx2[_0xb59f[236]])/_0x6b6cx14,_0x6b6cx3= !0);_0x6b6cx3&&(this[_0xb59f[441]][_0xb59f[802]](),null!=this[_0xb59f[2432]]&&this[_0xb59f[2432]][_0xb59f[802]]())}};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[1198]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[1714]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[174]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[1742]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1971]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2565]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1965]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2298]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2566]]];if(null!=_0x6b6cx3){return _0x6b6cx3};_0x6b6cx2=this[_0xb59f[441]][_0xb59f[2291]](_0x6b6cx2);return _0x6b6cx2==mxEdgeStyle[_0xb59f[2567]]||_0x6b6cx2==mxEdgeStyle[_0xb59f[2568]]||_0x6b6cx2==mxEdgeStyle[_0xb59f[2569]]||_0x6b6cx2==mxEdgeStyle[_0xb59f[2570]]||_0x6b6cx2==mxEdgeStyle[_0xb59f[2571]]||_0x6b6cx2==mxEdgeStyle[_0xb59f[2572]]};mxGraph[_0xb59f[202]][_0xb59f[2573]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[2089]](!0);_0x6b6cx2=_0x6b6cx2[_0xb59f[2089]](!1);return null!=_0x6b6cx3&&_0x6b6cx3==_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2574]]=function(_0x6b6cx2){return mxEvent[_0xb59f[775]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2462]]=function(_0x6b6cx2){return mxClient[_0xb59f[2575]]?mxEvent[_0xb59f[2576]](_0x6b6cx2):mxEvent[_0xb59f[775]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[1018]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&!mxEvent[_0xb59f[2577]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2578]]=function(_0x6b6cx2){return mxEvent[_0xb59f[774]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2579]]=function(_0x6b6cx2){return mxEvent[_0xb59f[2577]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2580]]=function(_0x6b6cx2){mxUtils[_0xb59f[150]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2581]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return null==this[_0xb59f[2500]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)};mxGraph[_0xb59f[202]][_0xb59f[2500]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(null!=_0x6b6cx2&&!this[_0xb59f[2530]]()&&(null==_0x6b6cx3||null==_0x6b6cx4)){return _0xb59f[110]};if(null!=_0x6b6cx2&&null==this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!0)&&null==this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!1)){return null};if(!this[_0xb59f[2402]]&&_0x6b6cx3==_0x6b6cx4&&null!=_0x6b6cx3||!this[_0xb59f[2582]](_0x6b6cx3,_0x6b6cx4)){return _0xb59f[110]};if(null!=_0x6b6cx3&&null!=_0x6b6cx4){var _0x6b6cx5=_0xb59f[110];if(!this[_0xb59f[2404]]){var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[1781]](_0x6b6cx3,_0x6b6cx4,!0);if(1<_0x6b6cx9[_0xb59f[67]]||1==_0x6b6cx9[_0xb59f[67]]&&_0x6b6cx9[0]!=_0x6b6cx2){_0x6b6cx5+=(mxResources[_0xb59f[203]](this[_0xb59f[2421]])||this[_0xb59f[2421]])+_0xb59f[192]}};var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[1962]](_0x6b6cx3,!0,_0x6b6cx2),_0x6b6cxa=this[_0xb59f[251]][_0xb59f[1962]](_0x6b6cx4,!1,_0x6b6cx2);if(null!=this[_0xb59f[2335]]){for(var _0x6b6cx12=0;_0x6b6cx12<this[_0xb59f[2335]][_0xb59f[67]];_0x6b6cx12++){var _0x6b6cx13=this[_0xb59f[2335]][_0x6b6cx12][_0xb59f[2583]](this,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx9,_0x6b6cxa);null!=_0x6b6cx13&&(_0x6b6cx5+=_0x6b6cx13)}};_0x6b6cx13=this[_0xb59f[2584]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);null!=_0x6b6cx13&&(_0x6b6cx5+=_0x6b6cx13);return 0<_0x6b6cx5[_0xb59f[67]]?_0x6b6cx5:null};return this[_0xb59f[2406]]?null:_0xb59f[110]};mxGraph[_0xb59f[202]][_0xb59f[2584]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return null};mxGraph[_0xb59f[202]][_0xb59f[2585]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2:this[_0xb59f[251]][_0xb59f[501]]();_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:{};for(var _0x6b6cx4=!0,_0x6b6cx5=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,_0x6b6cx9),_0x6b6cx12=_0x6b6cx3;this[_0xb59f[2553]](_0x6b6cxa)&&(_0x6b6cx12={});_0x6b6cx12=this[_0xb59f[2585]](_0x6b6cxa,_0x6b6cx12);null!=_0x6b6cx12?this[_0xb59f[2447]](_0x6b6cxa,_0x6b6cx12[_0xb59f[230]](/\n/g,_0xb59f[545])):this[_0xb59f[2447]](_0x6b6cxa,null);_0x6b6cx4=_0x6b6cx4&&null==_0x6b6cx12};_0x6b6cx5=_0xb59f[110];this[_0xb59f[1742]](_0x6b6cx2)&&!_0x6b6cx4&&(_0x6b6cx5+=(mxResources[_0xb59f[203]](this[_0xb59f[2423]])||this[_0xb59f[2423]])+_0xb59f[192]);_0x6b6cx5=this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)?_0x6b6cx5+(this[_0xb59f[2500]](_0x6b6cx2,this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!0),this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!1))||_0xb59f[110]):_0x6b6cx5+(this[_0xb59f[2586]](_0x6b6cx2)||_0xb59f[110]);_0x6b6cx9=this[_0xb59f[2587]](_0x6b6cx2,_0x6b6cx3);null!=_0x6b6cx9&&(_0x6b6cx5+=_0x6b6cx9);null==this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2)&&this[_0xb59f[441]][_0xb59f[2264]]();return 0<_0x6b6cx5[_0xb59f[67]]||!_0x6b6cx4?_0x6b6cx5:null};mxGraph[_0xb59f[202]][_0xb59f[2586]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[1962]](_0x6b6cx2,!0),_0x6b6cx4=this[_0xb59f[251]][_0xb59f[1962]](_0x6b6cx2,!1);_0x6b6cx2=this[_0xb59f[251]][_0xb59f[433]](_0x6b6cx2);var _0x6b6cx5=_0xb59f[110];if(null!=this[_0xb59f[2335]]){for(var _0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[2335]][_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[2335]][_0x6b6cx9];if(_0x6b6cxa[_0xb59f[1097]]&&mxUtils[_0xb59f[1331]](_0x6b6cx2,_0x6b6cxa[_0xb59f[60]],_0x6b6cxa[_0xb59f[2588]],_0x6b6cxa[_0xb59f[131]])&&(0==_0x6b6cxa[_0xb59f[160]]&&0<_0x6b6cx3||1==_0x6b6cxa[_0xb59f[243]]&&0==_0x6b6cx3||1==_0x6b6cxa[_0xb59f[160]]&&1<_0x6b6cx3)){_0x6b6cx5+=_0x6b6cxa[_0xb59f[2589]]+_0xb59f[192]}else {if(!_0x6b6cxa[_0xb59f[1097]]&&mxUtils[_0xb59f[1331]](_0x6b6cx2,_0x6b6cxa[_0xb59f[60]],_0x6b6cxa[_0xb59f[2588]],_0x6b6cxa[_0xb59f[131]])&&(0==_0x6b6cxa[_0xb59f[160]]&&0<_0x6b6cx4||1==_0x6b6cxa[_0xb59f[243]]&&0==_0x6b6cx4||1==_0x6b6cxa[_0xb59f[160]]&&1<_0x6b6cx4)){_0x6b6cx5+=_0x6b6cxa[_0xb59f[2589]]+_0xb59f[192]}}}};return 0<_0x6b6cx5[_0xb59f[67]]?_0x6b6cx5:null};mxGraph[_0xb59f[202]][_0xb59f[2587]]=function(_0x6b6cx2,_0x6b6cx3){return null};mxGraph[_0xb59f[202]][_0xb59f[2271]]=function(){return this[_0xb59f[1617]]};mxGraph[_0xb59f[202]][_0xb59f[2590]]=function(_0x6b6cx2){this[_0xb59f[1617]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2205]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&this[_0xb59f[2206]]&&!this[_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]])){var _0x6b6cx3=this[_0xb59f[1742]](_0x6b6cx2[_0xb59f[246]]);if(this[_0xb59f[2516]](_0x6b6cx2[_0xb59f[246]],!_0x6b6cx3)){return _0x6b6cx3?this[_0xb59f[2415]]:this[_0xb59f[2417]]}};return null};mxGraph[_0xb59f[202]][_0xb59f[2454]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[251]][_0xb59f[433]](_0x6b6cx2);if(null!=_0x6b6cx2){if(mxUtils[_0xb59f[1331]](_0x6b6cx2)){return _0x6b6cx2[_0xb59f[301]]};if(_0xb59f[279]== typeof _0x6b6cx2[_0xb59f[2591]]){return _0x6b6cx2.toString()}};return _0xb59f[110]};mxGraph[_0xb59f[202]][_0xb59f[2183]]=function(_0x6b6cx2){var _0x6b6cx3=_0xb59f[110];if(this[_0xb59f[2409]]&&null!=_0x6b6cx2){var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);mxUtils[_0xb59f[433]](_0x6b6cx4,mxConstants.STYLE_NOLABEL,!1)||(_0x6b6cx3=this[_0xb59f[2454]](_0x6b6cx2))};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[2186]]=function(_0x6b6cx2){return this[_0xb59f[2592]]()};mxGraph[_0xb59f[202]][_0xb59f[2592]]=function(){return this[_0xb59f[2410]]};mxGraph[_0xb59f[202]][_0xb59f[2593]]=function(_0x6b6cx2){this[_0xb59f[2410]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2131]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return null!=_0x6b6cx2?_0xb59f[1333]==_0x6b6cx2[mxConstants[_0xb59f[2594]]]:!1};mxGraph[_0xb59f[202]][_0xb59f[2130]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return null!=_0x6b6cx2?_0xb59f[188]==_0x6b6cx2[mxConstants[_0xb59f[2193]]]:!1};mxGraph[_0xb59f[202]][_0xb59f[2595]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=null;if(null!=_0x6b6cx2){if(null!=_0x6b6cx2[_0xb59f[2207]]&&(_0x6b6cx3==_0x6b6cx2[_0xb59f[2207]][_0xb59f[252]]||_0x6b6cx3[_0xb59f[265]]==_0x6b6cx2[_0xb59f[2207]][_0xb59f[252]])){_0x6b6cx9=this[_0xb59f[2425]],_0x6b6cx9=mxResources[_0xb59f[203]](_0x6b6cx9)||_0x6b6cx9};null==_0x6b6cx9&&null!=_0x6b6cx2[_0xb59f[1211]]&&_0x6b6cx2[_0xb59f[1211]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx4){if(null==_0x6b6cx9&&(_0x6b6cx3==_0x6b6cx4[_0xb59f[252]]||_0x6b6cx3[_0xb59f[265]]==_0x6b6cx4[_0xb59f[252]])){_0x6b6cx9=_0x6b6cx4[_0xb59f[2201]].toString()}});null==_0x6b6cx9&&(_0x6b6cx4=this[_0xb59f[2432]][_0xb59f[2596]](_0x6b6cx2[_0xb59f[246]]),null!=_0x6b6cx4&&_0xb59f[279]== typeof _0x6b6cx4[_0xb59f[2597]]&&(_0x6b6cx9=_0x6b6cx4[_0xb59f[2597]](_0x6b6cx3)));null==_0x6b6cx9&&(_0x6b6cx9=this[_0xb59f[2598]](_0x6b6cx2[_0xb59f[246]]))};return _0x6b6cx9};mxGraph[_0xb59f[202]][_0xb59f[2598]]=function(_0x6b6cx2){var _0x6b6cx3=null;return _0x6b6cx3=null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[2595]]?_0x6b6cx2[_0xb59f[2595]]():this[_0xb59f[2454]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2599]]=function(_0x6b6cx2){return null};mxGraph[_0xb59f[202]][_0xb59f[1731]]=function(_0x6b6cx2){var _0x6b6cx3= new mxRectangle,_0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);null!=_0x6b6cx2&&(_0x6b6cx4=parseInt(mxUtils[_0xb59f[433]](_0x6b6cx2,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils[_0xb59f[433]](_0x6b6cx2,mxConstants.STYLE_HORIZONTAL,!0)?_0x6b6cx3[_0xb59f[119]]=_0x6b6cx4:_0x6b6cx3[_0xb59f[117]]=_0x6b6cx4);return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[1202]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[124]]?_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2484]]]:null};mxGraph[_0xb59f[202]][_0xb59f[2187]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[124]]?_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2063]]]||mxConstants[_0xb59f[481]]:null};mxGraph[_0xb59f[202]][_0xb59f[2173]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[124]]?_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2600]]]:null};mxGraph[_0xb59f[202]][_0xb59f[2174]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[124]]?_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2601]]]:null};mxGraph[_0xb59f[202]][_0xb59f[2172]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[124]]?_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2602]]]:null};mxGraph[_0xb59f[202]][_0xb59f[2176]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[124]]?_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2603]]]:null};mxGraph[_0xb59f[202]][_0xb59f[2476]]=function(){return this[_0xb59f[467]]};mxGraph[_0xb59f[202]][_0xb59f[2604]]=function(_0x6b6cx2){this[_0xb59f[467]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[1730]]=function(_0x6b6cx2){if(null!=_0x6b6cx2&&this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2)!=this[_0xb59f[251]][_0xb59f[501]]()){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);if(null!=_0x6b6cx3&&!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)){return _0x6b6cx3[mxConstants[_0xb59f[2059]]]==mxConstants[_0xb59f[2605]]}};return !1};mxGraph[_0xb59f[202]][_0xb59f[2606]]=function(){return this[_0xb59f[2389]]};mxGraph[_0xb59f[202]][_0xb59f[2607]]=function(_0x6b6cx2){this[_0xb59f[2389]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxGraph[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2608]]=function(){return this[_0xb59f[2362]]};mxGraph[_0xb59f[202]][_0xb59f[2609]]=function(_0x6b6cx2){this[_0xb59f[2362]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2134]]=function(){return this[_0xb59f[2363]]};mxGraph[_0xb59f[202]][_0xb59f[2610]]=function(_0x6b6cx2){this[_0xb59f[2363]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2125]]=function(){return this[_0xb59f[2364]]};mxGraph[_0xb59f[202]][_0xb59f[2611]]=function(_0x6b6cx2){this[_0xb59f[2364]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2612]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2);return this[_0xb59f[2613]]()||null!=_0x6b6cx3&&this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx2)&&_0x6b6cx3[_0xb59f[1500]]};mxGraph[_0xb59f[202]][_0xb59f[2613]]=function(){return this[_0xb59f[2368]]};mxGraph[_0xb59f[202]][_0xb59f[2614]]=function(_0x6b6cx2){this[_0xb59f[2368]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2615]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1938]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){return this[_0xb59f[2616]](_0x6b6cx2)}))};mxGraph[_0xb59f[202]][_0xb59f[2616]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return this[_0xb59f[2617]]()&&0!=_0x6b6cx2[mxConstants[_0xb59f[2618]]]};mxGraph[_0xb59f[202]][_0xb59f[2617]]=function(){return this[_0xb59f[2369]]};mxGraph[_0xb59f[202]][_0xb59f[2619]]=function(_0x6b6cx2){this[_0xb59f[2369]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[898]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1938]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){return this[_0xb59f[2620]](_0x6b6cx2)}))};mxGraph[_0xb59f[202]][_0xb59f[2620]]=function(_0x6b6cx2){return this[_0xb59f[2366]]};mxGraph[_0xb59f[202]][_0xb59f[900]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1938]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){return this[_0xb59f[2621]](_0x6b6cx2)}))};mxGraph[_0xb59f[202]][_0xb59f[2621]]=function(_0x6b6cx2){return this[_0xb59f[2367]]};mxGraph[_0xb59f[202]][_0xb59f[2102]]=function(_0x6b6cx2){return this[_0xb59f[2622]]()};mxGraph[_0xb59f[202]][_0xb59f[2622]]=function(){return this[_0xb59f[2379]]};mxGraph[_0xb59f[202]][_0xb59f[2623]]=function(_0x6b6cx2){this[_0xb59f[2379]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2510]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1938]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){return this[_0xb59f[2624]](_0x6b6cx2)}))};mxGraph[_0xb59f[202]][_0xb59f[2624]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return this[_0xb59f[2625]]()&&0!=_0x6b6cx2[mxConstants[_0xb59f[2626]]]};mxGraph[_0xb59f[202]][_0xb59f[2625]]=function(){return this[_0xb59f[2371]]};mxGraph[_0xb59f[202]][_0xb59f[2627]]=function(_0x6b6cx2){this[_0xb59f[2371]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2628]]=function(_0x6b6cx2){return !this[_0xb59f[2612]](_0x6b6cx2)&&(this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)&&this[_0xb59f[2373]]||this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx2)&&this[_0xb59f[2374]])};mxGraph[_0xb59f[202]][_0xb59f[2629]]=function(_0x6b6cx2){return this[_0xb59f[251]][_0xb59f[1938]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){return this[_0xb59f[1712]](_0x6b6cx2)}))};mxGraph[_0xb59f[202]][_0xb59f[1712]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return this[_0xb59f[2630]]()&&!this[_0xb59f[2612]](_0x6b6cx2)&&0!=_0x6b6cx3[mxConstants[_0xb59f[2631]]]};mxGraph[_0xb59f[202]][_0xb59f[2630]]=function(){return this[_0xb59f[2372]]};mxGraph[_0xb59f[202]][_0xb59f[2632]]=function(_0x6b6cx2){this[_0xb59f[2372]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[997]]=function(){return this[_0xb59f[991]]};mxGraph[_0xb59f[202]][_0xb59f[998]]=function(_0x6b6cx2){this[_0xb59f[991]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2549]]=function(){return this[_0xb59f[2348]]};mxGraph[_0xb59f[202]][_0xb59f[2633]]=function(_0x6b6cx2){this[_0xb59f[2348]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2634]]=function(){return this[_0xb59f[1020]]};mxGraph[_0xb59f[202]][_0xb59f[2635]]=function(_0x6b6cx2){this[_0xb59f[1020]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2636]]=function(){return this[_0xb59f[2353]]};mxGraph[_0xb59f[202]][_0xb59f[2637]]=function(_0x6b6cx2){this[_0xb59f[2353]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2638]]=function(){return this[_0xb59f[2374]]};mxGraph[_0xb59f[202]][_0xb59f[2639]]=function(_0x6b6cx2){this[_0xb59f[2374]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2640]]=function(){return this[_0xb59f[2373]]};mxGraph[_0xb59f[202]][_0xb59f[2641]]=function(_0x6b6cx2){this[_0xb59f[2373]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2642]]=function(){return this[_0xb59f[2412]]};mxGraph[_0xb59f[202]][_0xb59f[2643]]=function(_0x6b6cx2){this[_0xb59f[2412]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2460]]=function(){return this[_0xb59f[2411]]};mxGraph[_0xb59f[202]][_0xb59f[2644]]=function(_0x6b6cx2){this[_0xb59f[2411]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2645]]=function(){return this[_0xb59f[2404]]};mxGraph[_0xb59f[202]][_0xb59f[2646]]=function(_0x6b6cx2){this[_0xb59f[2404]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2647]]=function(){return this[_0xb59f[2402]]};mxGraph[_0xb59f[202]][_0xb59f[2648]]=function(_0x6b6cx2){this[_0xb59f[2406]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2530]]=function(){return this[_0xb59f[2406]]};mxGraph[_0xb59f[202]][_0xb59f[2649]]=function(_0x6b6cx2){this[_0xb59f[2405]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2650]]=function(){return this[_0xb59f[2405]]};mxGraph[_0xb59f[202]][_0xb59f[2651]]=function(_0x6b6cx2){this[_0xb59f[2407]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2527]]=function(){return this[_0xb59f[2407]]};mxGraph[_0xb59f[202]][_0xb59f[2652]]=function(_0x6b6cx2){this[_0xb59f[2402]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2529]]=function(){return this[_0xb59f[2408]]};mxGraph[_0xb59f[202]][_0xb59f[2653]]=function(_0x6b6cx2){this[_0xb59f[2408]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[1015]]=function(){return this[_0xb59f[2375]]};mxGraph[_0xb59f[202]][_0xb59f[2654]]=function(_0x6b6cx2){this[_0xb59f[2375]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2655]]=function(){return this[_0xb59f[2376]]};mxGraph[_0xb59f[202]][_0xb59f[2656]]=function(_0x6b6cx2){this[_0xb59f[2376]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2657]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return this[_0xb59f[2658]]()&&!this[_0xb59f[2612]](_0x6b6cx2)&&0!=_0x6b6cx3[mxConstants[_0xb59f[2659]]]};mxGraph[_0xb59f[202]][_0xb59f[2658]]=function(){return this[_0xb59f[2377]]};mxGraph[_0xb59f[202]][_0xb59f[2660]]=function(_0x6b6cx2){this[_0xb59f[2377]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2661]]=function(_0x6b6cx2,_0x6b6cx3){return !0};mxGraph[_0xb59f[202]][_0xb59f[2662]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return this[_0xb59f[2663]]()&&!this[_0xb59f[2612]](_0x6b6cx2)&&0!=_0x6b6cx3[mxConstants[_0xb59f[2664]]]};mxGraph[_0xb59f[202]][_0xb59f[2663]]=function(){return this[_0xb59f[2378]]};mxGraph[_0xb59f[202]][_0xb59f[2665]]=function(_0x6b6cx2){this[_0xb59f[2378]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2453]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return this[_0xb59f[2666]]()&&!this[_0xb59f[2612]](_0x6b6cx2)&&0!=_0x6b6cx3[mxConstants[_0xb59f[2667]]]};mxGraph[_0xb59f[202]][_0xb59f[2666]]=function(){return this[_0xb59f[2370]]};mxGraph[_0xb59f[202]][_0xb59f[2668]]=function(_0x6b6cx2){this[_0xb59f[2370]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2551]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return this[_0xb59f[2669]]()&&!this[_0xb59f[2612]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2669]]=function(){return this[_0xb59f[2380]]};mxGraph[_0xb59f[202]][_0xb59f[2670]]=function(_0x6b6cx2){this[_0xb59f[2380]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2671]]=function(_0x6b6cx2){return null==_0x6b6cx2&&this[_0xb59f[2406]]||null!=_0x6b6cx2&&(!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)||this[_0xb59f[2405]])&&this[_0xb59f[2565]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2672]]=function(_0x6b6cx2){return this[_0xb59f[2671]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2582]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[2671]](_0x6b6cx2)&&this[_0xb59f[2672]](_0x6b6cx3)};mxGraph[_0xb59f[202]][_0xb59f[1995]]=function(_0x6b6cx2){this[_0xb59f[2433]][_0xb59f[995]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[1965]]=function(_0x6b6cx2){return this[_0xb59f[2433]][_0xb59f[994]]()};mxGraph[_0xb59f[202]][_0xb59f[2673]]=function(_0x6b6cx2){this[_0xb59f[2276]][_0xb59f[995]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2674]]=function(_0x6b6cx2){this[_0xb59f[2316]][_0xb59f[2431]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2203]]=function(_0x6b6cx2){if(null!=this[_0xb59f[2347]]){var _0x6b6cx3=this[_0xb59f[2347]][_0xb59f[2148]]();return null==_0x6b6cx2?null!=_0x6b6cx3:_0x6b6cx2==_0x6b6cx3};return !1};mxGraph[_0xb59f[202]][_0xb59f[2455]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return this[_0xb59f[2675]]()||1==_0x6b6cx2[mxConstants[_0xb59f[2676]]]};mxGraph[_0xb59f[202]][_0xb59f[2675]]=function(){return this[_0xb59f[2381]]};mxGraph[_0xb59f[202]][_0xb59f[2677]]=function(_0x6b6cx2){this[_0xb59f[2381]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2507]]=function(_0x6b6cx2){return !this[_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2)&&this[_0xb59f[2678]]()};mxGraph[_0xb59f[202]][_0xb59f[2678]]=function(){return this[_0xb59f[2392]]};mxGraph[_0xb59f[202]][_0xb59f[2679]]=function(_0x6b6cx2){this[_0xb59f[2392]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2506]]=function(){return this[_0xb59f[2393]]};mxGraph[_0xb59f[202]][_0xb59f[2680]]=function(_0x6b6cx2){this[_0xb59f[2393]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2536]]=function(_0x6b6cx2){return this[_0xb59f[2681]]()&&!this[_0xb59f[502]]()[_0xb59f[250]](this[_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx2))};mxGraph[_0xb59f[202]][_0xb59f[2681]]=function(){return this[_0xb59f[2391]]};mxGraph[_0xb59f[202]][_0xb59f[2682]]=function(_0x6b6cx2){this[_0xb59f[2391]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2505]]=function(){return this[_0xb59f[2390]]};mxGraph[_0xb59f[202]][_0xb59f[2528]]=function(_0x6b6cx2){this[_0xb59f[2390]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2537]]=function(_0x6b6cx2){return this[_0xb59f[2683]](_0x6b6cx2)?this[_0xb59f[2354]]:0};mxGraph[_0xb59f[202]][_0xb59f[2683]]=function(_0x6b6cx2){return !1};mxGraph[_0xb59f[202]][_0xb59f[2513]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[251]][_0xb59f[1938]](_0x6b6cx2,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){return this[_0xb59f[2516]](_0x6b6cx2,_0x6b6cx3)}))};mxGraph[_0xb59f[202]][_0xb59f[2516]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2),_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[124]]:this[_0xb59f[1705]](_0x6b6cx2);return 0<this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2)&&0!=_0x6b6cx4[mxConstants[_0xb59f[2684]]]};mxGraph[_0xb59f[202]][_0xb59f[2685]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return null!=_0x6b6cx2&&(this[_0xb59f[2655]]()&&this[_0xb59f[2686]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)||!this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)&&(this[_0xb59f[1730]](_0x6b6cx2)||0<this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2)&&!this[_0xb59f[1742]](_0x6b6cx2)))};mxGraph[_0xb59f[202]][_0xb59f[2686]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2)&&null!=_0x6b6cx3&&1==_0x6b6cx3[_0xb59f[67]]&&this[_0xb59f[2565]](_0x6b6cx3[0])&&null==this[_0xb59f[2500]](_0x6b6cx2,this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!0),_0x6b6cx3[0])?(_0x6b6cx4=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!0),_0x6b6cx2=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,!1),!this[_0xb59f[251]][_0xb59f[1720]](_0x6b6cx3[0],_0x6b6cx4)&&!this[_0xb59f[251]][_0xb59f[1720]](_0x6b6cx3[0],_0x6b6cx2)):!1};mxGraph[_0xb59f[202]][_0xb59f[564]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(!this[_0xb59f[2642]]()){for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){if(this[_0xb59f[1730]](_0x6b6cx2[_0x6b6cx5])){return null}}};_0x6b6cx5=mxUtils[_0xb59f[2196]](this[_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx3),mxEvent[_0xb59f[733]](_0x6b6cx3));_0x6b6cx5[_0xb59f[235]]-=this[_0xb59f[1136]];_0x6b6cx5[_0xb59f[236]]-=this[_0xb59f[1137]];_0x6b6cx5=this[_0xb59f[2461]](_0x6b6cx5[_0xb59f[235]],_0x6b6cx5[_0xb59f[236]]);if(null==_0x6b6cx4){_0x6b6cx4=_0x6b6cx5}else {if(null!=_0x6b6cx5){for(var _0x6b6cx9=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx5);null!=_0x6b6cx9&&this[_0xb59f[1730]](_0x6b6cx9)&&_0x6b6cx9!=_0x6b6cx4;){_0x6b6cx9=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx9)};_0x6b6cx9==_0x6b6cx4&&(_0x6b6cx4=_0x6b6cx5)}};for(;null!=_0x6b6cx4&&!this[_0xb59f[2685]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx3)&&!this[_0xb59f[251]][_0xb59f[1740]](_0x6b6cx4);){_0x6b6cx4=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx4)};return !this[_0xb59f[251]][_0xb59f[1740]](_0x6b6cx4)&&0>mxUtils[_0xb59f[2]](_0x6b6cx2,_0x6b6cx4)?_0x6b6cx4:null};mxGraph[_0xb59f[202]][_0xb59f[902]]=function(){var _0x6b6cx2=this[_0xb59f[2355]];null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[2534]](),null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[251]][_0xb59f[501]](),_0x6b6cx2=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,0)));return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2687]]=function(_0x6b6cx2){this[_0xb59f[2355]]=_0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2179]]=function(_0x6b6cx2){for(;null!=_0x6b6cx2&&!this[_0xb59f[1730]](_0x6b6cx2);){_0x6b6cx2=this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2)};return _0x6b6cx2};mxGraph[_0xb59f[202]][_0xb59f[2461]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=_0x6b6cx4||this[_0xb59f[902]]();if(null!=_0x6b6cx4){for(var _0x6b6cx5=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx4),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx4,_0x6b6cx9),_0x6b6cx12=this[_0xb59f[2461]](_0x6b6cx2,_0x6b6cx3,_0x6b6cxa);if(null!=_0x6b6cx12){return _0x6b6cx12};if(this[_0xb59f[1730]](_0x6b6cxa)&&(_0x6b6cx12=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cxa),this[_0xb59f[1825]](_0x6b6cx12,_0x6b6cx2,_0x6b6cx3))){return _0x6b6cxa}}};return null};mxGraph[_0xb59f[202]][_0xb59f[999]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!0;_0x6b6cx9=null!=_0x6b6cx9?_0x6b6cx9:!0;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:this[_0xb59f[902]]();if(null!=_0x6b6cx4){for(var _0x6b6cxa=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx4)-1;0<=_0x6b6cxa;_0x6b6cxa--){var _0x6b6cx12=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx4,_0x6b6cxa),_0x6b6cx13=this[_0xb59f[999]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx12,_0x6b6cx5,_0x6b6cx9);if(null!=_0x6b6cx13){return _0x6b6cx13};if(this[_0xb59f[1714]](_0x6b6cx12)&&(_0x6b6cx9&&this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx12)||_0x6b6cx5&&this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx12))){if(_0x6b6cx13=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx12),this[_0xb59f[1825]](_0x6b6cx13,_0x6b6cx2,_0x6b6cx3)){return _0x6b6cx12}}}};return null};mxGraph[_0xb59f[202]][_0xb59f[1825]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(null!=_0x6b6cx2){var _0x6b6cx5=_0x6b6cx2[_0xb59f[439]];if(null!=_0x6b6cx5){_0x6b6cx2=this[_0xb59f[2353]]*this[_0xb59f[2353]];for(var _0x6b6cx9=_0x6b6cx5[0],_0x6b6cxa=1;_0x6b6cxa<_0x6b6cx5[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx5[_0x6b6cxa];if(mxUtils[_0xb59f[440]](_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]],_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]],_0x6b6cx3,_0x6b6cx4)<=_0x6b6cx2){return !0};_0x6b6cx9=_0x6b6cx12}}else {if(_0x6b6cx9=mxUtils[_0xb59f[431]](mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ROTATION)||0),0!=_0x6b6cx9&&(_0x6b6cx5=Math[_0xb59f[426]](-_0x6b6cx9),_0x6b6cx9=Math[_0xb59f[427]](-_0x6b6cx9),_0x6b6cxa= new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]()),_0x6b6cx9=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx3,_0x6b6cx4),_0x6b6cx5,_0x6b6cx9,_0x6b6cxa),_0x6b6cx3=_0x6b6cx9[_0xb59f[235]],_0x6b6cx4=_0x6b6cx9[_0xb59f[236]]),mxUtils[_0xb59f[442]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)){return !0}}};return !1};mxGraph[_0xb59f[202]][_0xb59f[2688]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=this[_0xb59f[1731]](_0x6b6cx2);if(null!=_0x6b6cx5){var _0x6b6cx9=this[_0xb59f[249]]()[_0xb59f[518]]();_0x6b6cx3-=_0x6b6cx5[_0xb59f[235]];_0x6b6cx4-=_0x6b6cx5[_0xb59f[236]];if(0<_0x6b6cx2[_0xb59f[117]]&&0<_0x6b6cx3&&_0x6b6cx3>_0x6b6cx2[_0xb59f[117]]*_0x6b6cx9||0<_0x6b6cx2[_0xb59f[119]]&&0<_0x6b6cx4&&_0x6b6cx4>_0x6b6cx2[_0xb59f[119]]*_0x6b6cx9){return !0}};return !1};mxGraph[_0xb59f[202]][_0xb59f[1728]]=function(_0x6b6cx2){return this[_0xb59f[1955]](_0x6b6cx2,!0,!1)};mxGraph[_0xb59f[202]][_0xb59f[1956]]=function(_0x6b6cx2){return this[_0xb59f[1955]](_0x6b6cx2,!1,!0)};mxGraph[_0xb59f[202]][_0xb59f[1955]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2:this[_0xb59f[902]]();_0x6b6cx2=this[_0xb59f[251]][_0xb59f[1955]](_0x6b6cx2,null!=_0x6b6cx3?_0x6b6cx3:!1,null!=_0x6b6cx4?_0x6b6cx4:!1);_0x6b6cx3=[];for(_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[1714]](_0x6b6cx2[_0x6b6cx4])&&_0x6b6cx3[_0xb59f[207]](_0x6b6cx2[_0x6b6cx4])};return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[1756]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[264]](_0x6b6cx2,_0x6b6cx3,!0,!0,!1)};mxGraph[_0xb59f[202]][_0xb59f[1867]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[264]](_0x6b6cx2,_0x6b6cx3,!0,!1,!1)};mxGraph[_0xb59f[202]][_0xb59f[1963]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[264]](_0x6b6cx2,_0x6b6cx3,!1,!0,!1)};mxGraph[_0xb59f[202]][_0xb59f[264]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!0;_0x6b6cx9=null!=_0x6b6cx9?_0x6b6cx9:!0;_0x6b6cxa=null!=_0x6b6cxa?_0x6b6cxa:!1;for(var _0x6b6cx12=[],_0x6b6cx13=this[_0xb59f[1742]](_0x6b6cx2),_0x6b6cx14=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx2),_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx14;_0x6b6cx15++){var _0x6b6cx16=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx2,_0x6b6cx15);if(_0x6b6cx13||!this[_0xb59f[1714]](_0x6b6cx16)){_0x6b6cx12=_0x6b6cx12[_0xb59f[1919]](this[_0xb59f[251]][_0xb59f[264]](_0x6b6cx16,_0x6b6cx4,_0x6b6cx5))}};_0x6b6cx12=_0x6b6cx12[_0xb59f[1919]](this[_0xb59f[251]][_0xb59f[264]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5));_0x6b6cx13=[];for(_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx12[_0xb59f[67]];_0x6b6cx15++){_0x6b6cx16=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx12[_0x6b6cx15]),_0x6b6cx14=null!=_0x6b6cx16?_0x6b6cx16[_0xb59f[1710]](!0):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx12[_0x6b6cx15],!0),_0x6b6cx16=null!=_0x6b6cx16?_0x6b6cx16[_0xb59f[1710]](!1):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx12[_0x6b6cx15],!1),(_0x6b6cx9&&_0x6b6cx14==_0x6b6cx16||_0x6b6cx14!=_0x6b6cx16&&(_0x6b6cx4&&_0x6b6cx16==_0x6b6cx2&&(null==_0x6b6cx3||this[_0xb59f[1920]](_0x6b6cx14,_0x6b6cx3,_0x6b6cxa))||_0x6b6cx5&&_0x6b6cx14==_0x6b6cx2&&(null==_0x6b6cx3||this[_0xb59f[1920]](_0x6b6cx16,_0x6b6cx3,_0x6b6cxa))))&&_0x6b6cx13[_0xb59f[207]](_0x6b6cx12[_0x6b6cx15])};return _0x6b6cx13};mxGraph[_0xb59f[202]][_0xb59f[1920]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx4?this[_0xb59f[251]][_0xb59f[1720]](_0x6b6cx3,_0x6b6cx2):this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx2)==_0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[1808]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!0;_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!0;var _0x6b6cx9=[],_0x6b6cxa={};if(null!=_0x6b6cx2){for(var _0x6b6cx12=0;_0x6b6cx12<_0x6b6cx2[_0xb59f[67]];_0x6b6cx12++){var _0x6b6cx13=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx2[_0x6b6cx12]),_0x6b6cx14=null!=_0x6b6cx13?_0x6b6cx13[_0xb59f[1710]](!0):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx2[_0x6b6cx12],!0),_0x6b6cx13=null!=_0x6b6cx13?_0x6b6cx13[_0xb59f[1710]](!1):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx2[_0x6b6cx12],!1);if(_0x6b6cx14==_0x6b6cx3&&null!=_0x6b6cx13&&_0x6b6cx13!=_0x6b6cx3&&_0x6b6cx5){var _0x6b6cx15=mxCellPath[_0xb59f[385]](_0x6b6cx13);null==_0x6b6cxa[_0x6b6cx15]&&(_0x6b6cxa[_0x6b6cx15]=_0x6b6cx13,_0x6b6cx9[_0xb59f[207]](_0x6b6cx13))}else {_0x6b6cx13==_0x6b6cx3&&(null!=_0x6b6cx14&&_0x6b6cx14!=_0x6b6cx3&&_0x6b6cx4)&&(_0x6b6cx15=mxCellPath[_0xb59f[385]](_0x6b6cx14),null==_0x6b6cxa[_0x6b6cx15]&&(_0x6b6cxa[_0x6b6cx15]=_0x6b6cx14,_0x6b6cx9[_0xb59f[207]](_0x6b6cx14)))}}};return _0x6b6cx9};mxGraph[_0xb59f[202]][_0xb59f[1781]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!1;for(var _0x6b6cx5=this[_0xb59f[264]](_0x6b6cx2),_0x6b6cx9=[],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx5[_0x6b6cxa]),_0x6b6cx13=null!=_0x6b6cx12?_0x6b6cx12[_0xb59f[1710]](!0):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx5[_0x6b6cxa],!0),_0x6b6cx12=null!=_0x6b6cx12?_0x6b6cx12[_0xb59f[1710]](!1):this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx5[_0x6b6cxa],!1);(_0x6b6cx13==_0x6b6cx2&&_0x6b6cx12==_0x6b6cx3||!_0x6b6cx4&&_0x6b6cx13==_0x6b6cx3&&_0x6b6cx12==_0x6b6cx2)&&_0x6b6cx9[_0xb59f[207]](_0x6b6cx5[_0x6b6cxa])};return _0x6b6cx9};mxGraph[_0xb59f[202]][_0xb59f[2689]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=mxUtils[_0xb59f[2196]](this[_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx2),mxEvent[_0xb59f[733]](_0x6b6cx2)),_0x6b6cx5=this[_0xb59f[441]][_0xb59f[255]],_0x6b6cx9=this[_0xb59f[441]][_0xb59f[513]],_0x6b6cxa=!1!=_0x6b6cx3?this[_0xb59f[1020]]/2:0;_0x6b6cx4[_0xb59f[235]]=this[_0xb59f[1021]](_0x6b6cx4[_0xb59f[235]]/_0x6b6cx5-_0x6b6cx9[_0xb59f[235]]-_0x6b6cxa);_0x6b6cx4[_0xb59f[236]]=this[_0xb59f[1021]](_0x6b6cx4[_0xb59f[236]]/_0x6b6cx5-_0x6b6cx9[_0xb59f[236]]-_0x6b6cxa);return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[2690]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cxa=null!=_0x6b6cxa?_0x6b6cxa:[];if(0<_0x6b6cx4||0<_0x6b6cx5){var _0x6b6cx12=_0x6b6cx2+_0x6b6cx4,_0x6b6cx13=_0x6b6cx3+_0x6b6cx5;_0x6b6cx9=_0x6b6cx9||this[_0xb59f[902]]();if(null!=_0x6b6cx9){for(var _0x6b6cx14=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx9),_0x6b6cx15=0;_0x6b6cx15<_0x6b6cx14;_0x6b6cx15++){var _0x6b6cx16=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx9,_0x6b6cx15),_0x6b6cx17=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx16);if(this[_0xb59f[1714]](_0x6b6cx16)&&null!=_0x6b6cx17){var _0x6b6cx18=_0x6b6cx17,_0x6b6cx17=mxUtils[_0xb59f[433]](_0x6b6cx17[_0xb59f[124]],mxConstants.STYLE_ROTATION)||0;0!=_0x6b6cx17&&(_0x6b6cx18=mxUtils[_0xb59f[1613]](_0x6b6cx18,_0x6b6cx17));_0x6b6cx18[_0xb59f[235]]>=_0x6b6cx2&&_0x6b6cx18[_0xb59f[236]]+_0x6b6cx18[_0xb59f[119]]<=_0x6b6cx13&&_0x6b6cx18[_0xb59f[236]]>=_0x6b6cx3&&_0x6b6cx18[_0xb59f[235]]+_0x6b6cx18[_0xb59f[117]]<=_0x6b6cx12?_0x6b6cxa[_0xb59f[207]](_0x6b6cx16):this[_0xb59f[2690]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx16,_0x6b6cxa)}}}};return _0x6b6cxa};mxGraph[_0xb59f[202]][_0xb59f[2691]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=[];if(_0x6b6cx5||_0x6b6cx9){if(null==_0x6b6cx4&&(_0x6b6cx4=this[_0xb59f[902]]()),null!=_0x6b6cx4){for(var _0x6b6cx12=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx4),_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx12;_0x6b6cx13++){var _0x6b6cx14=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx4,_0x6b6cx13),_0x6b6cx15=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx14);this[_0xb59f[1714]](_0x6b6cx14)&&null!=_0x6b6cx15&&(!_0x6b6cx5||_0x6b6cx15[_0xb59f[235]]>=_0x6b6cx2)&&(!_0x6b6cx9||_0x6b6cx15[_0xb59f[236]]>=_0x6b6cx3)&&_0x6b6cxa[_0xb59f[207]](_0x6b6cx14)}}};return _0x6b6cxa};mxGraph[_0xb59f[202]][_0xb59f[1757]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!1;_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4:!1;var _0x6b6cx5=[];if(null!=_0x6b6cx2){for(var _0x6b6cx9=this[_0xb59f[502]](),_0x6b6cxa=_0x6b6cx9[_0xb59f[262]](_0x6b6cx2),_0x6b6cx12=null,_0x6b6cx13=0,_0x6b6cx14=0;_0x6b6cx14<_0x6b6cxa;_0x6b6cx14++){var _0x6b6cx15=_0x6b6cx9[_0xb59f[263]](_0x6b6cx2,_0x6b6cx14);if(this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx15)&&this[_0xb59f[1714]](_0x6b6cx15)){for(var _0x6b6cx16=this[_0xb59f[1756]](_0x6b6cx15,_0x6b6cx3?_0x6b6cx2:null),_0x6b6cx17=0,_0x6b6cx18=0,_0x6b6cx19=0;_0x6b6cx19<_0x6b6cx16[_0xb59f[67]];_0x6b6cx19++){this[_0xb59f[441]][_0xb59f[1710]](_0x6b6cx16[_0x6b6cx19],!0)==_0x6b6cx15?_0x6b6cx17++:_0x6b6cx18++};(_0x6b6cx4&&0==_0x6b6cx17&&0<_0x6b6cx18||!_0x6b6cx4&&0==_0x6b6cx18&&0<_0x6b6cx17)&&_0x6b6cx5[_0xb59f[207]](_0x6b6cx15);_0x6b6cx16=_0x6b6cx4?_0x6b6cx18-_0x6b6cx17:_0x6b6cx17-_0x6b6cx18;_0x6b6cx16>_0x6b6cx13&&(_0x6b6cx13=_0x6b6cx16,_0x6b6cx12=_0x6b6cx15)}};0==_0x6b6cx5[_0xb59f[67]]&&null!=_0x6b6cx12&&_0x6b6cx5[_0xb59f[207]](_0x6b6cx12)};return _0x6b6cx5};mxGraph[_0xb59f[202]][_0xb59f[1706]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=_0x6b6cx4&&null!=_0x6b6cx2){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;_0x6b6cx9=_0x6b6cx9||[];var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2);if(null==_0x6b6cx9[_0x6b6cxa]&&(_0x6b6cx9[_0x6b6cxa]=_0x6b6cx2,_0x6b6cx5=_0x6b6cx4(_0x6b6cx2,_0x6b6cx5),null==_0x6b6cx5||_0x6b6cx5)){if(_0x6b6cx5=this[_0xb59f[251]][_0xb59f[1707]](_0x6b6cx2),0<_0x6b6cx5){for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5;_0x6b6cxa++){var _0x6b6cx12=this[_0xb59f[251]][_0xb59f[1708]](_0x6b6cx2,_0x6b6cxa),_0x6b6cx13=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx12,!0)==_0x6b6cx2;if(!_0x6b6cx3||_0x6b6cx13){_0x6b6cx13=this[_0xb59f[251]][_0xb59f[1709]](_0x6b6cx12,!_0x6b6cx13),this[_0xb59f[1706]](_0x6b6cx13,_0x6b6cx3,_0x6b6cx4,_0x6b6cx12,_0x6b6cx9)}}}}}};mxGraph[_0xb59f[202]][_0xb59f[2692]]=function(_0x6b6cx2){return this[_0xb59f[2435]]()[_0xb59f[2097]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2693]]=function(){return this[_0xb59f[2435]]()[_0xb59f[1107]]()};mxGraph[_0xb59f[202]][_0xb59f[2440]]=function(){return this[_0xb59f[2435]]()[_0xb59f[200]]()};mxGraph[_0xb59f[202]][_0xb59f[2694]]=function(){return this[_0xb59f[2435]]()[_0xb59f[895]][_0xb59f[67]]};mxGraph[_0xb59f[202]][_0xb59f[2452]]=function(){return this[_0xb59f[2435]]()[_0xb59f[895]][0]};mxGraph[_0xb59f[202]][_0xb59f[897]]=function(){return this[_0xb59f[2435]]()[_0xb59f[895]][_0xb59f[1853]]()};mxGraph[_0xb59f[202]][_0xb59f[2450]]=function(_0x6b6cx2){this[_0xb59f[2435]]()[_0xb59f[2099]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[904]]=function(_0x6b6cx2){this[_0xb59f[2435]]()[_0xb59f[2100]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2695]]=function(_0x6b6cx2){this[_0xb59f[2435]]()[_0xb59f[2103]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2696]]=function(_0x6b6cx2){this[_0xb59f[2435]]()[_0xb59f[832]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2697]]=function(_0x6b6cx2){this[_0xb59f[2435]]()[_0xb59f[2104]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2439]]=function(_0x6b6cx2){this[_0xb59f[2435]]()[_0xb59f[842]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2698]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[2690]](_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],_0x6b6cx2[_0xb59f[117]],_0x6b6cx2[_0xb59f[119]]);this[_0xb59f[2699]](_0x6b6cx4,_0x6b6cx3);return _0x6b6cx4};mxGraph[_0xb59f[202]][_0xb59f[2700]]=function(){this[_0xb59f[2701]](!0)};mxGraph[_0xb59f[202]][_0xb59f[2702]]=function(){this[_0xb59f[2701]]()};mxGraph[_0xb59f[202]][_0xb59f[2703]]=function(){this[_0xb59f[2701]](!1,!0)};mxGraph[_0xb59f[202]][_0xb59f[2704]]=function(){this[_0xb59f[2701]](!1,!1,!0)};mxGraph[_0xb59f[202]][_0xb59f[2701]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[2105]],_0x6b6cx9=0<_0x6b6cx5[_0xb59f[895]][_0xb59f[67]]?_0x6b6cx5[_0xb59f[895]][0]:null;1<_0x6b6cx5[_0xb59f[895]][_0xb59f[67]]&&_0x6b6cx5[_0xb59f[200]]();var _0x6b6cx5=null!=_0x6b6cx9?this[_0xb59f[251]][_0xb59f[1197]](_0x6b6cx9):this[_0xb59f[902]](),_0x6b6cxa=this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx5);null==_0x6b6cx9&&0<_0x6b6cxa?(_0x6b6cx2=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx5,0),this[_0xb59f[2450]](_0x6b6cx2)):(null==_0x6b6cx9||_0x6b6cx3)&&null!=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx5)&&null!=this[_0xb59f[251]][_0xb59f[1721]](_0x6b6cx5)?this[_0xb59f[2534]]()!=_0x6b6cx5&&this[_0xb59f[2450]](_0x6b6cx5):null!=_0x6b6cx9&&_0x6b6cx4?0<this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx9)&&(_0x6b6cx2=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx9,0),this[_0xb59f[2450]](_0x6b6cx2)):0<_0x6b6cxa&&(_0x6b6cx3=_0x6b6cx5[_0xb59f[1738]](_0x6b6cx9),_0x6b6cx2?(_0x6b6cx3++,_0x6b6cx2=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx5,_0x6b6cx3%_0x6b6cxa)):(_0x6b6cx3--,_0x6b6cx2=this[_0xb59f[251]][_0xb59f[263]](_0x6b6cx5,0>_0x6b6cx3?_0x6b6cxa-1:_0x6b6cx3)),this[_0xb59f[2450]](_0x6b6cx2))};mxGraph[_0xb59f[202]][_0xb59f[2705]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2||this[_0xb59f[902]]();_0x6b6cx2=this[_0xb59f[251]][_0xb59f[1953]](_0x6b6cx2);null!=_0x6b6cx2&&this[_0xb59f[904]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2706]]=function(_0x6b6cx2){this[_0xb59f[2707]](!0,!1,_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2708]]=function(_0x6b6cx2){this[_0xb59f[2707]](!1,!0,_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2707]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=_0x6b6cx4||this[_0xb59f[902]]();var _0x6b6cx5=mxUtils[_0xb59f[885]](this,function(_0x6b6cx4){return null!=this[_0xb59f[441]][_0xb59f[248]](_0x6b6cx4)&&0==this[_0xb59f[251]][_0xb59f[262]](_0x6b6cx4)&&(this[_0xb59f[251]][_0xb59f[1193]](_0x6b6cx4)&&_0x6b6cx2||this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx4)&&_0x6b6cx3)});_0x6b6cx4=this[_0xb59f[251]][_0xb59f[1921]](_0x6b6cx5,_0x6b6cx4);this[_0xb59f[904]](_0x6b6cx4)};mxGraph[_0xb59f[202]][_0xb59f[2459]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[2692]](_0x6b6cx2);this[_0xb59f[2462]](_0x6b6cx3)?_0x6b6cx4?this[_0xb59f[2697]](_0x6b6cx2):this[_0xb59f[2695]](_0x6b6cx2):(!_0x6b6cx4||1!=this[_0xb59f[2694]]())&&this[_0xb59f[2450]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2699]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2462]](_0x6b6cx3)?this[_0xb59f[2696]](_0x6b6cx2):this[_0xb59f[904]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[2709]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=_0x6b6cx2&&(this[_0xb59f[251]][_0xb59f[250]](_0x6b6cx2[_0xb59f[246]])?(_0x6b6cx3=this[_0xb59f[441]][_0xb59f[2291]](_0x6b6cx2),_0x6b6cx3=this[_0xb59f[2573]](_0x6b6cx2)||_0x6b6cx3==mxEdgeStyle[_0xb59f[2568]]||_0x6b6cx3==mxEdgeStyle[_0xb59f[2569]]||_0x6b6cx3==mxEdgeStyle[_0xb59f[2570]]? new mxElbowEdgeHandler(_0x6b6cx2):_0x6b6cx3==mxEdgeStyle[_0xb59f[2567]]||_0x6b6cx3==mxEdgeStyle[_0xb59f[2572]]? new mxEdgeSegmentHandler(_0x6b6cx2): new mxEdgeHandler(_0x6b6cx2)):_0x6b6cx3= new mxVertexHandler(_0x6b6cx2));return _0x6b6cx3};mxGraph[_0xb59f[202]][_0xb59f[1133]]=function(_0x6b6cx2){null==this[_0xb59f[2329]]&&(this[_0xb59f[2329]]=[]);this[_0xb59f[2329]][_0xb59f[207]](_0x6b6cx2)};mxGraph[_0xb59f[202]][_0xb59f[1148]]=function(_0x6b6cx2){if(null!=this[_0xb59f[2329]]){for(var _0x6b6cx3=0;_0x6b6cx3<this[_0xb59f[2329]][_0xb59f[67]];_0x6b6cx3++){if(this[_0xb59f[2329]][_0x6b6cx3]==_0x6b6cx2){this[_0xb59f[2329]][_0xb59f[300]](_0x6b6cx3,1);break}}}};mxGraph[_0xb59f[202]][_0xb59f[2710]]=function(_0x6b6cx2){if(null==_0x6b6cx2[_0xb59f[725]]||null==_0x6b6cx2[_0xb59f[726]]){var _0x6b6cx3=mxUtils[_0xb59f[2196]](this[_0xb59f[526]],_0x6b6cx2[_0xb59f[730]](),_0x6b6cx2[_0xb59f[732]]());_0x6b6cx2[_0xb59f[725]]=_0x6b6cx3[_0xb59f[235]]-this[_0xb59f[1136]];_0x6b6cx2[_0xb59f[726]]=_0x6b6cx3[_0xb59f[236]]-this[_0xb59f[1137]]}};mxGraph[_0xb59f[202]][_0xb59f[758]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null==_0x6b6cx4&&(_0x6b6cx4=this);this[_0xb59f[2710]](_0x6b6cx3);_0x6b6cx2==mxEvent[_0xb59f[2711]]&&(this[_0xb59f[1009]]= !0);if(mxClient[_0xb59f[754]]&&this[_0xb59f[2349]]&&_0x6b6cx2==mxEvent[_0xb59f[2711]]){var _0x6b6cx5=( new Date)[_0xb59f[178]]();_0x6b6cx5-this[_0xb59f[2213]]<this[_0xb59f[2350]]&&Math[_0xb59f[425]](this[_0xb59f[2712]]-_0x6b6cx3[_0xb59f[730]]())<this[_0xb59f[2351]]&&Math[_0xb59f[425]](this[_0xb59f[2352]]-_0x6b6cx3[_0xb59f[732]]())<this[_0xb59f[2351]]?(this[_0xb59f[2213]]=0,this[_0xb59f[761]](_0x6b6cx3[_0xb59f[727]](),_0x6b6cx3[_0xb59f[736]]()),_0x6b6cx3[_0xb59f[727]]()[_0xb59f[786]]= !0):(this[_0xb59f[2712]]=_0x6b6cx3[_0xb59f[730]](),this[_0xb59f[2352]]=_0x6b6cx3[_0xb59f[732]](),this[_0xb59f[2213]]=_0x6b6cx5)};_0x6b6cx5=2!=_0x6b6cx3[_0xb59f[727]]()[_0xb59f[764]];if(mxClient[_0xb59f[80]]&&_0xb59f[462]==document[_0xb59f[135]]){if(null!=this[_0xb59f[2713]]&&Math[_0xb59f[425]](this[_0xb59f[2713]]-_0x6b6cx3[_0xb59f[730]]())>this[_0xb59f[2351]]||null!=this[_0xb59f[2714]]&&Math[_0xb59f[425]](this[_0xb59f[2714]]-_0x6b6cx3[_0xb59f[732]]())>this[_0xb59f[2351]]){_0x6b6cx5= !0};_0x6b6cx2==mxEvent[_0xb59f[2715]]&&(this[_0xb59f[2713]]=_0x6b6cx3[_0xb59f[730]](),this[_0xb59f[2714]]=_0x6b6cx3[_0xb59f[732]]())};if((_0x6b6cx2!=mxEvent[_0xb59f[2715]]||this[_0xb59f[1009]])&&_0x6b6cx5){if(_0x6b6cx2==mxEvent[_0xb59f[2715]]&&(this[_0xb59f[1009]]= !1),!this[_0xb59f[2203]]()&&(mxClient[_0xb59f[71]]||mxClient[_0xb59f[75]]||mxClient[_0xb59f[76]]||mxClient[_0xb59f[80]]&&mxClient[_0xb59f[48]]||_0x6b6cx3[_0xb59f[727]]()[_0xb59f[772]]!=this[_0xb59f[526]])){_0x6b6cx2==mxEvent[_0xb59f[2716]]&&(this[_0xb59f[1009]]&&this[_0xb59f[1012]])&&this[_0xb59f[1014]](_0x6b6cx3[_0xb59f[734]](),_0x6b6cx3[_0xb59f[735]](),this[_0xb59f[1013]]);if(null!=this[_0xb59f[2329]]){_0x6b6cx4=[_0x6b6cx4,_0x6b6cx3];_0x6b6cx3[_0xb59f[727]]()[_0xb59f[739]]= !0;for(_0x6b6cx5=0;_0x6b6cx5<this[_0xb59f[2329]][_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[2329]][_0x6b6cx5];_0x6b6cx2==mxEvent[_0xb59f[2711]]?_0x6b6cx9[_0xb59f[787]][_0xb59f[183]](_0x6b6cx9,_0x6b6cx4):_0x6b6cx2==mxEvent[_0xb59f[2716]]?_0x6b6cx9[_0xb59f[788]][_0xb59f[183]](_0x6b6cx9,_0x6b6cx4):_0x6b6cx2==mxEvent[_0xb59f[2715]]&&_0x6b6cx9[_0xb59f[789]][_0xb59f[183]](_0x6b6cx9,_0x6b6cx4)}};_0x6b6cx2==mxEvent[_0xb59f[2715]]&&this[_0xb59f[173]](_0x6b6cx3)}}else {_0x6b6cx2==mxEvent[_0xb59f[2715]]&&(this[_0xb59f[1009]]= !1)}};mxGraph[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[2717]]||(this[_0xb59f[2717]]= !0,null!=this[_0xb59f[2276]]&&this[_0xb59f[2276]][_0xb59f[515]](),null!=this[_0xb59f[2432]]&&this[_0xb59f[2432]][_0xb59f[515]](),null!=this[_0xb59f[2316]]&&this[_0xb59f[2316]][_0xb59f[515]](),null!=this[_0xb59f[2433]]&&this[_0xb59f[2433]][_0xb59f[515]](),null!=this[_0xb59f[1011]]&&this[_0xb59f[1011]][_0xb59f[515]](),null!=this[_0xb59f[2347]]&&this[_0xb59f[2347]][_0xb59f[515]](),null!=this[_0xb59f[441]]&&this[_0xb59f[441]][_0xb59f[515]](),null!=this[_0xb59f[251]]&&null!=this[_0xb59f[2343]]&&(this[_0xb59f[251]][_0xb59f[745]](this[_0xb59f[2343]]),this[_0xb59f[2343]]=null),this[_0xb59f[526]]=null)};function mxCellOverlay(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){this[_0xb59f[618]]=_0x6b6cx2;this[_0xb59f[2718]]=_0x6b6cx3;this[_0xb59f[611]]=null!=_0x6b6cx4?_0x6b6cx4:this[_0xb59f[611]];this[_0xb59f[123]]=null!=_0x6b6cx5?_0x6b6cx5:this[_0xb59f[123]];this[_0xb59f[1368]]=null!=_0x6b6cx9?_0x6b6cx9: new mxPoint;this[_0xb59f[270]]=null!=_0x6b6cxa?_0x6b6cxa:_0xb59f[2719]}mxCellOverlay[_0xb59f[202]]= new mxEventSource;mxCellOverlay[_0xb59f[202]][_0xb59f[196]]=mxCellOverlay;mxCellOverlay[_0xb59f[202]][_0xb59f[618]]=null;mxCellOverlay[_0xb59f[202]][_0xb59f[2718]]=null;mxCellOverlay[_0xb59f[202]][_0xb59f[611]]=mxConstants[_0xb59f[480]];mxCellOverlay[_0xb59f[202]][_0xb59f[123]]=mxConstants[_0xb59f[482]];mxCellOverlay[_0xb59f[202]][_0xb59f[1368]]=null;mxCellOverlay[_0xb59f[202]][_0xb59f[270]]=null;mxCellOverlay[_0xb59f[202]][_0xb59f[2354]]=0.5;mxCellOverlay[_0xb59f[202]][_0xb59f[1799]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[441]][_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx4=_0x6b6cx2[_0xb59f[441]][_0xb59f[255]],_0x6b6cx5=null,_0x6b6cx9=this[_0xb59f[618]][_0xb59f[117]],_0x6b6cxa=this[_0xb59f[618]][_0xb59f[119]];_0x6b6cx3?(_0x6b6cx3=_0x6b6cx2[_0xb59f[439]],1==_0x6b6cx3[_0xb59f[67]]%2?_0x6b6cx5=_0x6b6cx3[Math[_0xb59f[519]](_0x6b6cx3[_0xb59f[67]]/2)]:(_0x6b6cx5=_0x6b6cx3[_0xb59f[67]]/2,_0x6b6cx2=_0x6b6cx3[_0x6b6cx5-1],_0x6b6cx3=_0x6b6cx3[_0x6b6cx5],_0x6b6cx5= new mxPoint(_0x6b6cx2[_0xb59f[235]]+(_0x6b6cx3[_0xb59f[235]]-_0x6b6cx2[_0xb59f[235]])/2,_0x6b6cx2[_0xb59f[236]]+(_0x6b6cx3[_0xb59f[236]]-_0x6b6cx2[_0xb59f[236]])/2))):(_0x6b6cx5= new mxPoint,_0x6b6cx5[_0xb59f[235]]=this[_0xb59f[611]]==mxConstants[_0xb59f[2132]]?_0x6b6cx2[_0xb59f[235]]:this[_0xb59f[611]]==mxConstants[_0xb59f[479]]?_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]/2:_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]],_0x6b6cx5[_0xb59f[236]]=this[_0xb59f[123]]==mxConstants[_0xb59f[1687]]?_0x6b6cx2[_0xb59f[236]]:this[_0xb59f[123]]==mxConstants[_0xb59f[481]]?_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]/2:_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]);return  new mxRectangle(Math[_0xb59f[488]](_0x6b6cx5[_0xb59f[235]]-(_0x6b6cx9*this[_0xb59f[2354]]-this[_0xb59f[1368]][_0xb59f[235]])*_0x6b6cx4),Math[_0xb59f[488]](_0x6b6cx5[_0xb59f[236]]-(_0x6b6cxa*this[_0xb59f[2354]]-this[_0xb59f[1368]][_0xb59f[236]])*_0x6b6cx4),_0x6b6cx9*_0x6b6cx4,_0x6b6cxa*_0x6b6cx4)};mxCellOverlay[_0xb59f[202]][_0xb59f[2591]]=function(){return this[_0xb59f[2718]]};function mxOutline(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1097]]=_0x6b6cx2;null!=_0x6b6cx3&&this[_0xb59f[176]](_0x6b6cx3)}mxOutline[_0xb59f[202]][_0xb59f[1097]]=null;mxOutline[_0xb59f[202]][_0xb59f[2136]]=null;mxOutline[_0xb59f[202]][_0xb59f[2720]]=mxConstants[_0xb59f[2333]];mxOutline[_0xb59f[202]][_0xb59f[984]]= !0;mxOutline[_0xb59f[202]][_0xb59f[2721]]= !0;mxOutline[_0xb59f[202]][_0xb59f[467]]=10;mxOutline[_0xb59f[202]][_0xb59f[2722]]=8;mxOutline[_0xb59f[202]][_0xb59f[2723]]= !1;mxOutline[_0xb59f[202]][_0xb59f[2724]]=null;mxOutline[_0xb59f[202]][_0xb59f[1063]]= !1;mxOutline[_0xb59f[202]][_0xb59f[176]]=function(_0x6b6cx2){this[_0xb59f[2136]]= new mxGraph(_0x6b6cx2,this[_0xb59f[1097]][_0xb59f[502]](),this[_0xb59f[2720]],this[_0xb59f[1097]][_0xb59f[2434]]());this[_0xb59f[2136]][_0xb59f[2206]]= !1;this[_0xb59f[2136]][_0xb59f[1012]]= !1;var _0x6b6cx3=this[_0xb59f[2136]][_0xb59f[1177]];this[_0xb59f[2136]][_0xb59f[1177]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){!this[_0xb59f[1063]]&&null!=this[_0xb59f[2136]]&&_0x6b6cx3[_0xb59f[183]](this[_0xb59f[2136]],arguments)});mxClient[_0xb59f[48]]&&(_0x6b6cx2=this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[2051]]()[_0xb59f[265]],_0x6b6cx2[_0xb59f[57]](_0xb59f[2725],_0xb59f[2726]),_0x6b6cx2[_0xb59f[57]](_0xb59f[2727],_0xb59f[2726]));this[_0xb59f[2136]][_0xb59f[2409]]= !1;this[_0xb59f[2136]][_0xb59f[995]](!1);this[_0xb59f[2728]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){!this[_0xb59f[1063]]&&!this[_0xb59f[1124]]&&this[_0xb59f[2729]]()});this[_0xb59f[1097]][_0xb59f[502]]()[_0xb59f[169]](mxEvent.CHANGE,this[_0xb59f[2728]]);this[_0xb59f[2136]][_0xb59f[1133]](this);_0x6b6cx2=this[_0xb59f[1097]][_0xb59f[249]]();_0x6b6cx2[_0xb59f[169]](mxEvent.SCALE,this[_0xb59f[2728]]);_0x6b6cx2[_0xb59f[169]](mxEvent.TRANSLATE,this[_0xb59f[2728]]);_0x6b6cx2[_0xb59f[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xb59f[2728]]);_0x6b6cx2[_0xb59f[169]](mxEvent.DOWN,this[_0xb59f[2728]]);_0x6b6cx2[_0xb59f[169]](mxEvent.UP,this[_0xb59f[2728]]);mxEvent[_0xb59f[169]](this[_0xb59f[1097]][_0xb59f[526]],_0xb59f[276],this[_0xb59f[2728]]);this[_0xb59f[2730]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2723]]&&this[_0xb59f[2728]][_0xb59f[183]](this,arguments)});this[_0xb59f[1097]][_0xb59f[169]](mxEvent.PAN,this[_0xb59f[2730]]);this[_0xb59f[2731]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2136]][_0xb59f[2341]](this[_0xb59f[1097]][_0xb59f[2434]]());this[_0xb59f[2136]][_0xb59f[802]]()});this[_0xb59f[1097]][_0xb59f[169]](mxEvent.REFRESH,this[_0xb59f[2731]]);this[_0xb59f[1562]]= new mxRectangle(0,0,0,0);this[_0xb59f[2732]]= new mxRectangleShape(this[_0xb59f[1562]],null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this[_0xb59f[2732]][_0xb59f[507]]=this[_0xb59f[2136]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]];this[_0xb59f[2732]][_0xb59f[176]](this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[1524]]());mxEvent[_0xb59f[2733]](this[_0xb59f[2732]][_0xb59f[252]],this[_0xb59f[2136]]);this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[1537]]=_0xb59f[110];this[_0xb59f[2734]]=this[_0xb59f[2735]]();this[_0xb59f[2734]][_0xb59f[176]](this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[1524]]());this[_0xb59f[984]]&&(this[_0xb59f[2734]][_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[356]);mxEvent[_0xb59f[169]](this[_0xb59f[2734]][_0xb59f[252]],mxClient[_0xb59f[754]]?_0xb59f[755]:_0xb59f[751],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2136]][_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx2))}));this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]]=this[_0xb59f[2721]]?_0xb59f[110]:_0xb59f[130];this[_0xb59f[2734]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]]=this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]];this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=_0xb59f[582];this[_0xb59f[2729]](!1)};mxOutline[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxOutline[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxOutline[_0xb59f[202]][_0xb59f[2736]]=function(_0x6b6cx2){this[_0xb59f[2734]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0x6b6cx2?_0xb59f[189]:_0xb59f[188]};mxOutline[_0xb59f[202]][_0xb59f[802]]=function(){this[_0xb59f[2729]](!0)};mxOutline[_0xb59f[202]][_0xb59f[2735]]=function(){var _0x6b6cx2=null!=this[_0xb59f[2724]]? new mxImageShape( new mxRectangle(0,0,this[_0xb59f[2724]][_0xb59f[117]],this[_0xb59f[2724]][_0xb59f[119]]),this[_0xb59f[2724]][_0xb59f[390]]): new mxRectangleShape( new mxRectangle(0,0,this[_0xb59f[2722]],this[_0xb59f[2722]]),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);_0x6b6cx2[_0xb59f[507]]=this[_0xb59f[2136]][_0xb59f[507]];return _0x6b6cx2};mxOutline[_0xb59f[202]][_0xb59f[2737]]=function(){return  new mxRectangle(0,0,this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[1526]],this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[191]])};mxOutline[_0xb59f[202]][_0xb59f[2738]]=function(_0x6b6cx2){return null};mxOutline[_0xb59f[202]][_0xb59f[2729]]=function(_0x6b6cx2){if(null!=this[_0xb59f[1097]]){var _0x6b6cx3=this[_0xb59f[1097]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx4=this[_0xb59f[1097]][_0xb59f[517]](),_0x6b6cx4= new mxRectangle(_0x6b6cx4[_0xb59f[235]]/_0x6b6cx3+this[_0xb59f[1097]][_0xb59f[1136]],_0x6b6cx4[_0xb59f[236]]/_0x6b6cx3+this[_0xb59f[1097]][_0xb59f[1137]],_0x6b6cx4[_0xb59f[117]]/_0x6b6cx3,_0x6b6cx4[_0xb59f[119]]/_0x6b6cx3),_0x6b6cx5= new mxRectangle(0,0,this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[159]]/_0x6b6cx3,this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[157]]/_0x6b6cx3),_0x6b6cx9=_0x6b6cx4[_0xb59f[238]]();_0x6b6cx9[_0xb59f[99]](_0x6b6cx5);var _0x6b6cxa=this[_0xb59f[2737]](),_0x6b6cx5=Math[_0xb59f[160]](_0x6b6cxa[_0xb59f[117]]/_0x6b6cx3,_0x6b6cx9[_0xb59f[117]]),_0x6b6cx3=Math[_0xb59f[160]](_0x6b6cxa[_0xb59f[119]]/_0x6b6cx3,_0x6b6cx9[_0xb59f[119]]),_0x6b6cx9=Math[_0xb59f[160]](0,this[_0xb59f[2136]][_0xb59f[526]][_0xb59f[159]]-this[_0xb59f[467]]),_0x6b6cxa=Math[_0xb59f[160]](0,this[_0xb59f[2136]][_0xb59f[526]][_0xb59f[157]]-this[_0xb59f[467]]),_0x6b6cx9=Math[_0xb59f[243]](_0x6b6cx9/_0x6b6cx5,_0x6b6cxa/_0x6b6cx3);if(0<_0x6b6cx9){this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[255]]!=_0x6b6cx9&&(this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[255]]=_0x6b6cx9,_0x6b6cx2= !0);_0x6b6cx5=this[_0xb59f[2136]][_0xb59f[249]]();_0x6b6cx5[_0xb59f[1741]]!=this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[1741]]&&_0x6b6cx5[_0xb59f[2257]](this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[1741]]);var _0x6b6cx3=this[_0xb59f[1097]][_0xb59f[441]][_0xb59f[513]],_0x6b6cxa=_0x6b6cx3[_0xb59f[235]]+this[_0xb59f[1097]][_0xb59f[1136]],_0x6b6cx12=_0x6b6cx3[_0xb59f[236]]+this[_0xb59f[1097]][_0xb59f[1137]],_0x6b6cx9=this[_0xb59f[2738]](_0x6b6cx9);null!=_0x6b6cx9&&(_0x6b6cxa+=_0x6b6cx9[_0xb59f[235]],_0x6b6cx12+=_0x6b6cx9[_0xb59f[236]]);0>_0x6b6cx4[_0xb59f[235]]&&(_0x6b6cxa-=_0x6b6cx4[_0xb59f[235]]);0>_0x6b6cx4[_0xb59f[236]]&&(_0x6b6cx12-=_0x6b6cx4[_0xb59f[236]]);if(_0x6b6cx5[_0xb59f[513]][_0xb59f[235]]!=_0x6b6cxa||_0x6b6cx5[_0xb59f[513]][_0xb59f[236]]!=_0x6b6cx12){_0x6b6cx5[_0xb59f[513]][_0xb59f[235]]=_0x6b6cxa,_0x6b6cx5[_0xb59f[513]][_0xb59f[236]]=_0x6b6cx12,_0x6b6cx2= !0};var _0x6b6cx4=_0x6b6cx5[_0xb59f[513]],_0x6b6cx9=this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cxa=_0x6b6cx9/_0x6b6cx5[_0xb59f[255]],_0x6b6cx12=1/_0x6b6cx5[_0xb59f[255]],_0x6b6cx13=this[_0xb59f[1097]][_0xb59f[526]];this[_0xb59f[1562]]= new mxRectangle((_0x6b6cx4[_0xb59f[235]]-_0x6b6cx3[_0xb59f[235]]-this[_0xb59f[1097]][_0xb59f[1136]])/_0x6b6cx12,(_0x6b6cx4[_0xb59f[236]]-_0x6b6cx3[_0xb59f[236]]-this[_0xb59f[1097]][_0xb59f[1137]])/_0x6b6cx12,_0x6b6cx13[_0xb59f[159]]/_0x6b6cxa,_0x6b6cx13[_0xb59f[157]]/_0x6b6cxa);this[_0xb59f[1562]][_0xb59f[235]]+=this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[360]]*_0x6b6cx5[_0xb59f[255]]/_0x6b6cx9;this[_0xb59f[1562]][_0xb59f[236]]+=this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[190]]*_0x6b6cx5[_0xb59f[255]]/_0x6b6cx9;_0x6b6cx4=this[_0xb59f[2732]][_0xb59f[1562]];if(_0x6b6cx4[_0xb59f[235]]!=this[_0xb59f[1562]][_0xb59f[235]]||_0x6b6cx4[_0xb59f[236]]!=this[_0xb59f[1562]][_0xb59f[236]]||_0x6b6cx4[_0xb59f[117]]!=this[_0xb59f[1562]][_0xb59f[117]]||_0x6b6cx4[_0xb59f[119]]!=this[_0xb59f[1562]][_0xb59f[119]]){this[_0xb59f[2732]][_0xb59f[1562]]=this[_0xb59f[1562]],this[_0xb59f[2732]][_0xb59f[258]]()};_0x6b6cx4=this[_0xb59f[2734]][_0xb59f[1562]];_0x6b6cx5= new mxRectangle(this[_0xb59f[1562]][_0xb59f[235]]+this[_0xb59f[1562]][_0xb59f[117]]-_0x6b6cx4[_0xb59f[117]]/2,this[_0xb59f[1562]][_0xb59f[236]]+this[_0xb59f[1562]][_0xb59f[119]]-_0x6b6cx4[_0xb59f[119]]/2,_0x6b6cx4[_0xb59f[117]],_0x6b6cx4[_0xb59f[119]]);if(_0x6b6cx4[_0xb59f[235]]!=_0x6b6cx5[_0xb59f[235]]||_0x6b6cx4[_0xb59f[236]]!=_0x6b6cx5[_0xb59f[236]]||_0x6b6cx4[_0xb59f[117]]!=_0x6b6cx5[_0xb59f[117]]||_0x6b6cx4[_0xb59f[119]]!=_0x6b6cx5[_0xb59f[119]]){this[_0xb59f[2734]][_0xb59f[1562]]=_0x6b6cx5,_0xb59f[188]!=this[_0xb59f[2734]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]&&this[_0xb59f[2734]][_0xb59f[258]]()};_0x6b6cx2&&this[_0xb59f[2136]][_0xb59f[441]][_0xb59f[2259]]()}}};mxOutline[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[984]]&&this[_0xb59f[2721]]&&(this[_0xb59f[499]]=_0x6b6cx3[_0xb59f[729]](this[_0xb59f[2734]]),this[_0xb59f[2739]]=_0x6b6cx3[_0xb59f[730]](),this[_0xb59f[2740]]=_0x6b6cx3[_0xb59f[732]](),this[_0xb59f[1124]]= !0,this[_0xb59f[1097]][_0xb59f[2365]]&&mxUtils[_0xb59f[1134]](this[_0xb59f[1097]][_0xb59f[526]])?(this[_0xb59f[2741]]=this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[360]],this[_0xb59f[2742]]=this[_0xb59f[1097]][_0xb59f[526]][_0xb59f[190]]):this[_0xb59f[2742]]=this[_0xb59f[2741]]=0);_0x6b6cx3[_0xb59f[722]]()};mxOutline[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1124]]){this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]]=this[_0xb59f[2721]]?_0xb59f[110]:_0xb59f[130];this[_0xb59f[2734]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]]=this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]];var _0x6b6cx4=_0x6b6cx3[_0xb59f[730]]()-this[_0xb59f[2739]],_0x6b6cx5=_0x6b6cx3[_0xb59f[732]]()-this[_0xb59f[2740]],_0x6b6cx9=null;if(this[_0xb59f[499]]){_0x6b6cx9=this[_0xb59f[1097]][_0xb59f[526]],_0x6b6cx5=_0x6b6cx4/(_0x6b6cx9[_0xb59f[159]]/_0x6b6cx9[_0xb59f[157]]),_0x6b6cx9= new mxRectangle(this[_0xb59f[1562]][_0xb59f[235]],this[_0xb59f[1562]][_0xb59f[236]],Math[_0xb59f[160]](1,this[_0xb59f[1562]][_0xb59f[117]]+_0x6b6cx4),Math[_0xb59f[160]](1,this[_0xb59f[1562]][_0xb59f[119]]+_0x6b6cx5)),this[_0xb59f[2732]][_0xb59f[1562]]=_0x6b6cx9,this[_0xb59f[2732]][_0xb59f[258]]()}else {var _0x6b6cxa=this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx9= new mxRectangle(this[_0xb59f[1562]][_0xb59f[235]]+_0x6b6cx4,this[_0xb59f[1562]][_0xb59f[236]]+_0x6b6cx5,this[_0xb59f[1562]][_0xb59f[117]],this[_0xb59f[1562]][_0xb59f[119]]);this[_0xb59f[2732]][_0xb59f[1562]]=_0x6b6cx9;this[_0xb59f[2732]][_0xb59f[258]]();_0x6b6cx4=_0x6b6cx4/_0x6b6cxa*this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[255]];_0x6b6cx5=_0x6b6cx5/_0x6b6cxa*this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[255]];this[_0xb59f[1097]][_0xb59f[1135]](-_0x6b6cx4-this[_0xb59f[2741]],-_0x6b6cx5-this[_0xb59f[2742]])};_0x6b6cx4=this[_0xb59f[2734]][_0xb59f[1562]];this[_0xb59f[2734]][_0xb59f[1562]]= new mxRectangle(_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]]-_0x6b6cx4[_0xb59f[117]]/2,_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]]-_0x6b6cx4[_0xb59f[119]]/2,_0x6b6cx4[_0xb59f[117]],_0x6b6cx4[_0xb59f[119]]);_0xb59f[188]!=this[_0xb59f[2734]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]&&this[_0xb59f[2734]][_0xb59f[258]]();_0x6b6cx3[_0xb59f[722]]()}};mxOutline[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1124]]){var _0x6b6cx4=_0x6b6cx3[_0xb59f[730]]()-this[_0xb59f[2739]],_0x6b6cx5=_0x6b6cx3[_0xb59f[732]]()-this[_0xb59f[2740]];if(0<Math[_0xb59f[425]](_0x6b6cx4)||0<Math[_0xb59f[425]](_0x6b6cx5)){if(this[_0xb59f[499]]){var _0x6b6cx5=this[_0xb59f[2732]][_0xb59f[1562]][_0xb59f[117]],_0x6b6cx9=this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[255]];this[_0xb59f[1097]][_0xb59f[2561]](_0x6b6cx9-_0x6b6cx4*_0x6b6cx9/_0x6b6cx5,!1)}else {if(!this[_0xb59f[1097]][_0xb59f[2365]]||!mxUtils[_0xb59f[1134]](this[_0xb59f[1097]][_0xb59f[526]])){this[_0xb59f[1097]][_0xb59f[1135]](0,0),_0x6b6cx4/=this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx5/=this[_0xb59f[2136]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx9=this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[513]],this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[1147]](_0x6b6cx9[_0xb59f[235]]-_0x6b6cx4,_0x6b6cx9[_0xb59f[236]]-_0x6b6cx5)}};this[_0xb59f[2729]]();_0x6b6cx3[_0xb59f[722]]()};this[_0xb59f[1983]]=null;this[_0xb59f[1124]]= !1}};mxOutline[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[1097]]&&(this[_0xb59f[1097]][_0xb59f[745]](this[_0xb59f[2730]]),this[_0xb59f[1097]][_0xb59f[745]](this[_0xb59f[2731]]),this[_0xb59f[1097]][_0xb59f[502]]()[_0xb59f[745]](this[_0xb59f[2728]]),this[_0xb59f[1097]][_0xb59f[249]]()[_0xb59f[745]](this[_0xb59f[2728]]),mxEvent[_0xb59f[169]](this[_0xb59f[1097]][_0xb59f[526]],_0xb59f[276],this[_0xb59f[2728]]),this[_0xb59f[1097]]=null);null!=this[_0xb59f[2136]]&&(this[_0xb59f[2136]][_0xb59f[1148]](this),this[_0xb59f[2136]][_0xb59f[515]](),this[_0xb59f[2136]]=null);null!=this[_0xb59f[2732]]&&(this[_0xb59f[2732]][_0xb59f[515]](),this[_0xb59f[2732]]=null);null!=this[_0xb59f[2734]]&&(this[_0xb59f[2734]][_0xb59f[515]](),this[_0xb59f[2734]]=null)};function mxMultiplicity(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15){this[_0xb59f[1097]]=_0x6b6cx2;this[_0xb59f[60]]=_0x6b6cx3;this[_0xb59f[2588]]=_0x6b6cx4;this[_0xb59f[131]]=_0x6b6cx5;this[_0xb59f[243]]=null!=_0x6b6cx9?_0x6b6cx9:0;this[_0xb59f[160]]=null!=_0x6b6cxa?_0x6b6cxa:_0xb59f[2743];this[_0xb59f[2744]]=_0x6b6cx12;this[_0xb59f[2589]]=mxResources[_0xb59f[203]](_0x6b6cx13)||_0x6b6cx13;this[_0xb59f[2745]]=mxResources[_0xb59f[203]](_0x6b6cx14)||_0x6b6cx14;this[_0xb59f[2746]]=null!=_0x6b6cx15?_0x6b6cx15:!0}mxMultiplicity[_0xb59f[202]][_0xb59f[60]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[2588]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[131]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[1097]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[243]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[160]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[2744]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[2746]]= !0;mxMultiplicity[_0xb59f[202]][_0xb59f[2589]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[2745]]=null;mxMultiplicity[_0xb59f[202]][_0xb59f[2583]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){var _0x6b6cx12=_0xb59f[110];if(this[_0xb59f[1097]]&&this[_0xb59f[2747]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx3)||!this[_0xb59f[1097]]&&this[_0xb59f[2747]](_0x6b6cx2,_0x6b6cx5,_0x6b6cx3)){if(null!=this[_0xb59f[2589]]&&(this[_0xb59f[1097]]&&(0==this[_0xb59f[160]]||_0x6b6cx9>=this[_0xb59f[160]])||!this[_0xb59f[1097]]&&(0==this[_0xb59f[160]]||_0x6b6cxa>=this[_0xb59f[160]]))){_0x6b6cx12+=this[_0xb59f[2589]]+_0xb59f[192]};null!=this[_0xb59f[2744]]&&(null!=this[_0xb59f[2745]]&&0<this[_0xb59f[2744]][_0xb59f[67]])&&(this[_0xb59f[2748]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5)||(_0x6b6cx12+=this[_0xb59f[2745]]+_0xb59f[192]))};return 0<_0x6b6cx12[_0xb59f[67]]?_0x6b6cx12:null};mxMultiplicity[_0xb59f[202]][_0xb59f[2748]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx3=_0x6b6cx2[_0xb59f[251]][_0xb59f[433]](_0x6b6cx4);_0x6b6cx5=_0x6b6cx2[_0xb59f[251]][_0xb59f[433]](_0x6b6cx5);_0x6b6cx4=!this[_0xb59f[2746]];for(var _0x6b6cx9=this[_0xb59f[2744]],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){if(this[_0xb59f[1097]]&&this[_0xb59f[2749]](_0x6b6cx2,_0x6b6cx5,_0x6b6cx9[_0x6b6cxa])){_0x6b6cx4=this[_0xb59f[2746]];break}else {if(!this[_0xb59f[1097]]&&this[_0xb59f[2749]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx9[_0x6b6cxa])){_0x6b6cx4=this[_0xb59f[2746]];break}}};return _0x6b6cx4};mxMultiplicity[_0xb59f[202]][_0xb59f[2747]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=_0x6b6cx2[_0xb59f[251]][_0xb59f[433]](_0x6b6cx3);return this[_0xb59f[2749]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[60]],this[_0xb59f[2588]],this[_0xb59f[131]])};mxMultiplicity[_0xb59f[202]][_0xb59f[2749]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return null!=_0x6b6cx3?isNaN(_0x6b6cx3[_0xb59f[288]])?_0x6b6cx3==_0x6b6cx4:mxUtils[_0xb59f[1331]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9):!1};function mxLayoutManager(_0x6b6cx2){this[_0xb59f[2750]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx4){this[_0xb59f[994]]()&&this[_0xb59f[823]](_0x6b6cx4[_0xb59f[720]](_0xb59f[1061]))});this[_0xb59f[2317]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx4){this[_0xb59f[994]]()&&this[_0xb59f[835]](_0x6b6cx4[_0xb59f[720]](_0xb59f[895]),_0x6b6cx4[_0xb59f[720]](_0xb59f[763]))});this[_0xb59f[1178]](_0x6b6cx2)}mxLayoutManager[_0xb59f[202]]= new mxEventSource;mxLayoutManager[_0xb59f[202]][_0xb59f[196]]=mxLayoutManager;mxLayoutManager[_0xb59f[202]][_0xb59f[1179]]=null;mxLayoutManager[_0xb59f[202]][_0xb59f[2751]]= !0;mxLayoutManager[_0xb59f[202]][_0xb59f[984]]= !0;mxLayoutManager[_0xb59f[202]][_0xb59f[2728]]=null;mxLayoutManager[_0xb59f[202]][_0xb59f[2317]]=null;mxLayoutManager[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxLayoutManager[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxLayoutManager[_0xb59f[202]][_0xb59f[2752]]=function(){return this[_0xb59f[2751]]};mxLayoutManager[_0xb59f[202]][_0xb59f[2753]]=function(_0x6b6cx2){this[_0xb59f[2751]]=_0x6b6cx2};mxLayoutManager[_0xb59f[202]][_0xb59f[1703]]=function(){return this[_0xb59f[1179]]};mxLayoutManager[_0xb59f[202]][_0xb59f[1178]]=function(_0x6b6cx2){if(null!=this[_0xb59f[1179]]){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]();_0x6b6cx3[_0xb59f[745]](this[_0xb59f[2750]]);this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2317]])};this[_0xb59f[1179]]=_0x6b6cx2;null!=this[_0xb59f[1179]]&&(_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx3[_0xb59f[169]](mxEvent.BEFORE_UNDO,this[_0xb59f[2750]]),this[_0xb59f[1179]][_0xb59f[169]](mxEvent.MOVE_CELLS,this[_0xb59f[2317]]))};mxLayoutManager[_0xb59f[202]][_0xb59f[2754]]=function(_0x6b6cx2){return null};mxLayoutManager[_0xb59f[202]][_0xb59f[823]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[2755]](_0x6b6cx2[_0xb59f[1065]]);var _0x6b6cx3=this[_0xb59f[1703]]()[_0xb59f[502]]();if(this[_0xb59f[2752]]()){for(var _0x6b6cx4=_0x6b6cx3[_0xb59f[1977]](_0x6b6cx2);0<_0x6b6cx4[_0xb59f[67]];){_0x6b6cx2=_0x6b6cx2[_0xb59f[1919]](_0x6b6cx4),_0x6b6cx4=_0x6b6cx3[_0xb59f[1977]](_0x6b6cx4)}};this[_0xb59f[828]](mxUtils[_0xb59f[1779]](_0x6b6cx2,!1))};mxLayoutManager[_0xb59f[202]][_0xb59f[835]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&null!=_0x6b6cx3){for(var _0x6b6cx4=mxUtils[_0xb59f[2196]](this[_0xb59f[1703]]()[_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx3),mxEvent[_0xb59f[733]](_0x6b6cx3)),_0x6b6cx5=this[_0xb59f[1703]]()[_0xb59f[502]](),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx2[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[2754]](_0x6b6cx5[_0xb59f[1197]](_0x6b6cx2[_0x6b6cx9]));null!=_0x6b6cxa&&_0x6b6cxa[_0xb59f[1702]](_0x6b6cx2[_0x6b6cx9],_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]])}}};mxLayoutManager[_0xb59f[202]][_0xb59f[2755]]=function(_0x6b6cx2){for(var _0x6b6cx3=[],_0x6b6cx4={},_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx9=_0x6b6cx2[_0x6b6cx5];if(_0x6b6cx9 instanceof mxRootChange){return []};for(var _0x6b6cx9=this[_0xb59f[2756]](_0x6b6cx9),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){if(null!=_0x6b6cx9[_0x6b6cxa]){var _0x6b6cx12=mxCellPath[_0xb59f[385]](_0x6b6cx9[_0x6b6cxa]);null==_0x6b6cx4[_0x6b6cx12]&&(_0x6b6cx4[_0x6b6cx12]=_0x6b6cx9[_0x6b6cxa],_0x6b6cx3[_0xb59f[207]](_0x6b6cx9[_0x6b6cxa]))}}};return _0x6b6cx3};mxLayoutManager[_0xb59f[202]][_0xb59f[2756]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1703]]()[_0xb59f[502]]();return _0x6b6cx2 instanceof mxChildChange?[_0x6b6cx2[_0xb59f[247]],_0x6b6cx2[_0xb59f[257]],_0x6b6cx3[_0xb59f[1197]](_0x6b6cx2[_0xb59f[247]])]:_0x6b6cx2 instanceof mxTerminalChange||_0x6b6cx2 instanceof mxGeometryChange?[_0x6b6cx2[_0xb59f[246]],_0x6b6cx3[_0xb59f[1197]](_0x6b6cx2[_0xb59f[246]])]:[]};mxLayoutManager[_0xb59f[202]][_0xb59f[828]]=function(_0x6b6cx2){if(0<_0x6b6cx2[_0xb59f[67]]){var _0x6b6cx3=this[_0xb59f[1703]]()[_0xb59f[502]]();_0x6b6cx3[_0xb59f[473]]();try{for(var _0x6b6cx4=null,_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx2[_0x6b6cx5]!=_0x6b6cx3[_0xb59f[501]]()&&_0x6b6cx2[_0x6b6cx5]!=_0x6b6cx4&&(_0x6b6cx4=_0x6b6cx2[_0x6b6cx5],this[_0xb59f[2757]](this[_0xb59f[2754]](_0x6b6cx4),_0x6b6cx4))};this[_0xb59f[746]]( new mxEventObject(mxEvent.LAYOUT_CELLS,_0xb59f[895],_0x6b6cx2))}finally{_0x6b6cx3[_0xb59f[476]]()}}};mxLayoutManager[_0xb59f[202]][_0xb59f[2757]]=function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2&&null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[350]](_0x6b6cx3)};mxLayoutManager[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1178]](null)};function mxSpaceManager(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[2758]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[994]]()&&this[_0xb59f[837]](_0x6b6cx3[_0xb59f[720]](_0xb59f[895]))});this[_0xb59f[2759]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[994]]()&&this[_0xb59f[837]](_0x6b6cx3[_0xb59f[720]](_0xb59f[895]))});this[_0xb59f[2760]]=null!=_0x6b6cx3?_0x6b6cx3:!0;this[_0xb59f[2761]]=null!=_0x6b6cx4?_0x6b6cx4:!0;this[_0xb59f[2392]]=null!=_0x6b6cx5?_0x6b6cx5:!0;this[_0xb59f[1178]](_0x6b6cx2)}mxSpaceManager[_0xb59f[202]]= new mxEventSource;mxSpaceManager[_0xb59f[202]][_0xb59f[196]]=mxSpaceManager;mxSpaceManager[_0xb59f[202]][_0xb59f[1179]]=null;mxSpaceManager[_0xb59f[202]][_0xb59f[984]]= !0;mxSpaceManager[_0xb59f[202]][_0xb59f[2760]]= !0;mxSpaceManager[_0xb59f[202]][_0xb59f[2761]]= !0;mxSpaceManager[_0xb59f[202]][_0xb59f[2392]]= !0;mxSpaceManager[_0xb59f[202]][_0xb59f[2758]]=null;mxSpaceManager[_0xb59f[202]][_0xb59f[2759]]=null;mxSpaceManager[_0xb59f[202]][_0xb59f[2762]]=function(_0x6b6cx2){return !this[_0xb59f[1703]]()[_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx2)};mxSpaceManager[_0xb59f[202]][_0xb59f[2763]]=function(_0x6b6cx2){return this[_0xb59f[1703]]()[_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx2)&&this[_0xb59f[1703]]()[_0xb59f[1712]](_0x6b6cx2)};mxSpaceManager[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxSpaceManager[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxSpaceManager[_0xb59f[202]][_0xb59f[2764]]=function(){return this[_0xb59f[2760]]};mxSpaceManager[_0xb59f[202]][_0xb59f[2765]]=function(_0x6b6cx2){this[_0xb59f[2760]]=_0x6b6cx2};mxSpaceManager[_0xb59f[202]][_0xb59f[2766]]=function(){return this[_0xb59f[2761]]};mxSpaceManager[_0xb59f[202]][_0xb59f[2767]]=function(_0x6b6cx2){this[_0xb59f[2761]]=_0x6b6cx2};mxSpaceManager[_0xb59f[202]][_0xb59f[2678]]=function(){return this[_0xb59f[2392]]};mxSpaceManager[_0xb59f[202]][_0xb59f[2679]]=function(_0x6b6cx2){this[_0xb59f[2392]]=_0x6b6cx2};mxSpaceManager[_0xb59f[202]][_0xb59f[1703]]=function(){return this[_0xb59f[1179]]};mxSpaceManager[_0xb59f[202]][_0xb59f[1178]]=function(_0x6b6cx2){null!=this[_0xb59f[1179]]&&(this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2758]]),this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2759]]));this[_0xb59f[1179]]=_0x6b6cx2;null!=this[_0xb59f[1179]]&&(this[_0xb59f[1179]][_0xb59f[169]](mxEvent.RESIZE_CELLS,this[_0xb59f[2758]]),this[_0xb59f[1179]][_0xb59f[169]](mxEvent.FOLD_CELLS,this[_0xb59f[2759]]))};mxSpaceManager[_0xb59f[202]][_0xb59f[837]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]();_0x6b6cx3[_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){if(!this[_0xb59f[2762]](_0x6b6cx2[_0x6b6cx4])){this[_0xb59f[2768]](_0x6b6cx2[_0x6b6cx4]);break}}}finally{_0x6b6cx3[_0xb59f[476]]()}}};mxSpaceManager[_0xb59f[202]][_0xb59f[2768]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1703]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[249]](),_0x6b6cx5=_0x6b6cx3[_0xb59f[502]](),_0x6b6cx9=_0x6b6cx4[_0xb59f[248]](_0x6b6cx2),_0x6b6cxa=_0x6b6cx4[_0xb59f[248]](_0x6b6cx5[_0xb59f[1197]](_0x6b6cx2));if(null!=_0x6b6cx9&&null!=_0x6b6cxa){var _0x6b6cx12=this[_0xb59f[2769]](_0x6b6cx9),_0x6b6cx13=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx2);if(null!=_0x6b6cx12&&null!=_0x6b6cx13){var _0x6b6cx14=_0x6b6cx4[_0xb59f[513]],_0x6b6cx15=_0x6b6cx4[_0xb59f[255]],_0x6b6cx4=_0x6b6cx9[_0xb59f[235]]-_0x6b6cxa[_0xb59f[2078]][_0xb59f[235]]-_0x6b6cx14[_0xb59f[235]]*_0x6b6cx15,_0x6b6cxa=_0x6b6cx9[_0xb59f[236]]-_0x6b6cxa[_0xb59f[2078]][_0xb59f[236]]-_0x6b6cx14[_0xb59f[236]]*_0x6b6cx15,_0x6b6cx14=_0x6b6cx9[_0xb59f[235]]+_0x6b6cx9[_0xb59f[117]],_0x6b6cx16=_0x6b6cx9[_0xb59f[236]]+_0x6b6cx9[_0xb59f[119]],_0x6b6cx17=_0x6b6cx9[_0xb59f[117]]-_0x6b6cx13[_0xb59f[117]]*_0x6b6cx15+_0x6b6cx4-_0x6b6cx13[_0xb59f[235]]*_0x6b6cx15,_0x6b6cx18=_0x6b6cx9[_0xb59f[119]]-_0x6b6cx13[_0xb59f[119]]*_0x6b6cx15+_0x6b6cxa-_0x6b6cx13[_0xb59f[236]]*_0x6b6cx15,_0x6b6cx19=1-_0x6b6cx13[_0xb59f[117]]*_0x6b6cx15/_0x6b6cx9[_0xb59f[117]],_0x6b6cx9=1-_0x6b6cx13[_0xb59f[119]]*_0x6b6cx15/_0x6b6cx9[_0xb59f[119]];_0x6b6cx5[_0xb59f[473]]();try{for(_0x6b6cx13=0;_0x6b6cx13<_0x6b6cx12[_0xb59f[67]];_0x6b6cx13++){_0x6b6cx12[_0x6b6cx13]!=_0x6b6cx2&&this[_0xb59f[2763]](_0x6b6cx12[_0x6b6cx13])&&this[_0xb59f[2770]](_0x6b6cx12[_0x6b6cx13],_0x6b6cx17,_0x6b6cx18,_0x6b6cx4,_0x6b6cxa,_0x6b6cx14,_0x6b6cx16,_0x6b6cx19,_0x6b6cx9,this[_0xb59f[2678]]()&&_0x6b6cx3[_0xb59f[2507]](_0x6b6cx12[_0x6b6cx13]))}}finally{_0x6b6cx5[_0xb59f[476]]()}}}};mxSpaceManager[_0xb59f[202]][_0xb59f[2770]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15){_0x6b6cx5=this[_0xb59f[1703]]();var _0x6b6cx16=_0x6b6cx5[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);if(null!=_0x6b6cx16){var _0x6b6cx17=_0x6b6cx5[_0xb59f[502]](),_0x6b6cx18=_0x6b6cx17[_0xb59f[1721]](_0x6b6cx2);if(null!=_0x6b6cx18){_0x6b6cx17[_0xb59f[473]]();try{if(this[_0xb59f[2764]]()){if(_0x6b6cx16[_0xb59f[235]]>=_0x6b6cxa){_0x6b6cx18=_0x6b6cx18[_0xb59f[238]](),_0x6b6cx18[_0xb59f[513]](-_0x6b6cx3,0)}else {var _0x6b6cx19=Math[_0xb59f[160]](0,_0x6b6cx16[_0xb59f[235]]-x0),_0x6b6cx18=_0x6b6cx18[_0xb59f[238]]();_0x6b6cx18[_0xb59f[513]](-_0x6b6cx13*_0x6b6cx19,0)}};if(this[_0xb59f[2766]]()){if(_0x6b6cx16[_0xb59f[236]]>=_0x6b6cx12){_0x6b6cx18=_0x6b6cx18[_0xb59f[238]](),_0x6b6cx18[_0xb59f[513]](0,-_0x6b6cx4)}else {var _0x6b6cx1a=Math[_0xb59f[160]](0,_0x6b6cx16[_0xb59f[236]]-_0x6b6cx9),_0x6b6cx18=_0x6b6cx18[_0xb59f[238]]();_0x6b6cx18[_0xb59f[513]](0,-_0x6b6cx14*_0x6b6cx1a)}};_0x6b6cx18!=_0x6b6cx17[_0xb59f[1721]](_0x6b6cx2)&&(_0x6b6cx17[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx18),_0x6b6cx15&&_0x6b6cx5[_0xb59f[2508]](_0x6b6cx2))}finally{_0x6b6cx17[_0xb59f[476]]()}}}};mxSpaceManager[_0xb59f[202]][_0xb59f[2769]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1703]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx5=this[_0xb59f[2766]](),_0x6b6cx9=this[_0xb59f[2764]]();return _0x6b6cx3[_0xb59f[2691]](_0x6b6cx2[_0xb59f[235]]+(_0x6b6cx5?0:_0x6b6cx2[_0xb59f[117]]),_0x6b6cx2[_0xb59f[236]]+(_0x6b6cx5&&_0x6b6cx9?0:_0x6b6cx2[_0xb59f[119]]),_0x6b6cx4,_0x6b6cx9,_0x6b6cx5)};mxSpaceManager[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1178]](null)};function mxSwimlaneManager(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[662]]=null!=_0x6b6cx3?_0x6b6cx3:!0;this[_0xb59f[2771]]=null!=_0x6b6cx4?_0x6b6cx4:!0;this[_0xb59f[2772]]=null!=_0x6b6cx5?_0x6b6cx5:!0;this[_0xb59f[2773]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[994]]()&&this[_0xb59f[2774]]()&&this[_0xb59f[833]](_0x6b6cx3[_0xb59f[720]](_0xb59f[895]))});this[_0xb59f[2758]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[994]]()&&this[_0xb59f[2775]]()&&this[_0xb59f[837]](_0x6b6cx3[_0xb59f[720]](_0xb59f[895]))});this[_0xb59f[1178]](_0x6b6cx2)}mxSwimlaneManager[_0xb59f[202]]= new mxEventSource;mxSwimlaneManager[_0xb59f[202]][_0xb59f[196]]=mxSwimlaneManager;mxSwimlaneManager[_0xb59f[202]][_0xb59f[1179]]=null;mxSwimlaneManager[_0xb59f[202]][_0xb59f[984]]= !0;mxSwimlaneManager[_0xb59f[202]][_0xb59f[662]]= !0;mxSwimlaneManager[_0xb59f[202]][_0xb59f[2771]]= !0;mxSwimlaneManager[_0xb59f[202]][_0xb59f[2772]]= !0;mxSwimlaneManager[_0xb59f[202]][_0xb59f[2773]]=null;mxSwimlaneManager[_0xb59f[202]][_0xb59f[2758]]=null;mxSwimlaneManager[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxSwimlaneManager[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxSwimlaneManager[_0xb59f[202]][_0xb59f[1737]]=function(){return this[_0xb59f[662]]};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2776]]=function(_0x6b6cx2){this[_0xb59f[662]]=_0x6b6cx2};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2774]]=function(){return this[_0xb59f[2771]]};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2777]]=function(_0x6b6cx2){this[_0xb59f[2771]]=_0x6b6cx2};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2775]]=function(){return this[_0xb59f[2772]]};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2778]]=function(_0x6b6cx2){this[_0xb59f[2772]]=_0x6b6cx2};mxSwimlaneManager[_0xb59f[202]][_0xb59f[1703]]=function(){return this[_0xb59f[1179]]};mxSwimlaneManager[_0xb59f[202]][_0xb59f[1178]]=function(_0x6b6cx2){null!=this[_0xb59f[1179]]&&(this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2773]]),this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2758]]));this[_0xb59f[1179]]=_0x6b6cx2;null!=this[_0xb59f[1179]]&&(this[_0xb59f[1179]][_0xb59f[169]](mxEvent.ADD_CELLS,this[_0xb59f[2773]]),this[_0xb59f[1179]][_0xb59f[169]](mxEvent.CELLS_RESIZED,this[_0xb59f[2758]]))};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2779]]=function(_0x6b6cx2){return !this[_0xb59f[1703]]()[_0xb59f[1730]](_0x6b6cx2)};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2780]]=function(_0x6b6cx2){if(this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx2)){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);_0x6b6cx2=null!=_0x6b6cx3?_0x6b6cx3[_0xb59f[124]]:this[_0xb59f[1179]][_0xb59f[1705]](_0x6b6cx2);return 1==mxUtils[_0xb59f[433]](_0x6b6cx2,mxConstants.STYLE_HORIZONTAL,1)};return !this[_0xb59f[1737]]()};mxSwimlaneManager[_0xb59f[202]][_0xb59f[833]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1703]]()[_0xb59f[502]]();_0x6b6cx3[_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){this[_0xb59f[2779]](_0x6b6cx2[_0x6b6cx4])||this[_0xb59f[2781]](_0x6b6cx2[_0x6b6cx4])}}finally{_0x6b6cx3[_0xb59f[476]]()}}};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2781]]=function(_0x6b6cx2){for(var _0x6b6cx3=this[_0xb59f[1703]]()[_0xb59f[502]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[1197]](_0x6b6cx2),_0x6b6cx5=_0x6b6cx3[_0xb59f[262]](_0x6b6cx4),_0x6b6cx9=null,_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx5;_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx3[_0xb59f[263]](_0x6b6cx4,_0x6b6cxa);if(_0x6b6cx12!=_0x6b6cx2&&!this[_0xb59f[2779]](_0x6b6cx12)&&(_0x6b6cx9=_0x6b6cx3[_0xb59f[1721]](_0x6b6cx12),null!=_0x6b6cx9)){break}};null!=_0x6b6cx9&&this[_0xb59f[2782]](_0x6b6cx2,_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]])};mxSwimlaneManager[_0xb59f[202]][_0xb59f[837]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1703]]()[_0xb59f[502]]();_0x6b6cx3[_0xb59f[473]]();try{for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx2[_0xb59f[67]];_0x6b6cx4++){if(!this[_0xb59f[2779]](_0x6b6cx2[_0x6b6cx4])){var _0x6b6cx5=_0x6b6cx3[_0xb59f[1721]](_0x6b6cx2[_0x6b6cx4]);if(null!=_0x6b6cx5){for(var _0x6b6cx9= new mxRectangle(0,0,_0x6b6cx5[_0xb59f[117]],_0x6b6cx5[_0xb59f[119]]),_0x6b6cxa=_0x6b6cx2[_0x6b6cx4],_0x6b6cx12=_0x6b6cxa;null!=_0x6b6cx12;){var _0x6b6cxa=_0x6b6cx12,_0x6b6cx12=_0x6b6cx3[_0xb59f[1197]](_0x6b6cx12),_0x6b6cx13=this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx12)?this[_0xb59f[1179]][_0xb59f[1731]](_0x6b6cx12): new mxRectangle;_0x6b6cx9[_0xb59f[117]]+=_0x6b6cx13[_0xb59f[117]];_0x6b6cx9[_0xb59f[119]]+=_0x6b6cx13[_0xb59f[119]]};this[_0xb59f[2782]](_0x6b6cxa,_0x6b6cx9[_0xb59f[117]],_0x6b6cx9[_0xb59f[119]])}}}}finally{_0x6b6cx3[_0xb59f[476]]()}}};mxSwimlaneManager[_0xb59f[202]][_0xb59f[2782]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1703]]()[_0xb59f[502]]();_0x6b6cx5[_0xb59f[473]]();try{if(!this[_0xb59f[2779]](_0x6b6cx2)){var _0x6b6cx9=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx2);if(null!=_0x6b6cx9){var _0x6b6cxa=this[_0xb59f[2780]](_0x6b6cx2);if(_0x6b6cxa&&_0x6b6cx9[_0xb59f[119]]!=_0x6b6cx4||!_0x6b6cxa&&_0x6b6cx9[_0xb59f[117]]!=_0x6b6cx3){_0x6b6cx9=_0x6b6cx9[_0xb59f[238]](),_0x6b6cxa?_0x6b6cx9[_0xb59f[119]]=_0x6b6cx4:_0x6b6cx9[_0xb59f[117]]=_0x6b6cx3,_0x6b6cx5[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx9)}}};var _0x6b6cx12=this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx2)?this[_0xb59f[1179]][_0xb59f[1731]](_0x6b6cx2): new mxRectangle;_0x6b6cx3-=_0x6b6cx12[_0xb59f[117]];_0x6b6cx4-=_0x6b6cx12[_0xb59f[119]];for(var _0x6b6cx13=_0x6b6cx5[_0xb59f[262]](_0x6b6cx2),_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx13;_0x6b6cx9++){var _0x6b6cx14=_0x6b6cx5[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9);this[_0xb59f[2782]](_0x6b6cx14,_0x6b6cx3,_0x6b6cx4)}}finally{_0x6b6cx5[_0xb59f[476]]()}};mxSwimlaneManager[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1178]](null)};function mxTemporaryCellStates(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[441]]=_0x6b6cx2;_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:1;this[_0xb59f[2783]]=_0x6b6cx2[_0xb59f[517]]();this[_0xb59f[2784]]=_0x6b6cx2[_0xb59f[2312]]();this[_0xb59f[2785]]=_0x6b6cx2[_0xb59f[518]]();_0x6b6cx2[_0xb59f[1517]]( new mxDictionary);_0x6b6cx2[_0xb59f[2262]](_0x6b6cx3);if(null!=_0x6b6cx4){_0x6b6cx3=_0x6b6cx2[_0xb59f[1230]]( new mxCell);for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]];_0x6b6cx5++){_0x6b6cx2[_0xb59f[2267]](_0x6b6cx3,_0x6b6cx4[_0x6b6cx5])};for(var _0x6b6cx9=null,_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cxa=_0x6b6cx2[_0xb59f[2268]](_0x6b6cx3,_0x6b6cx4[_0x6b6cx5]);null==_0x6b6cx9?_0x6b6cx9=_0x6b6cxa:_0x6b6cx9[_0xb59f[99]](_0x6b6cxa)};null==_0x6b6cx9&&(_0x6b6cx9= new mxRectangle);_0x6b6cx2[_0xb59f[2256]](_0x6b6cx9)}}mxTemporaryCellStates[_0xb59f[202]][_0xb59f[441]]=null;mxTemporaryCellStates[_0xb59f[202]][_0xb59f[2784]]=null;mxTemporaryCellStates[_0xb59f[202]][_0xb59f[2783]]=null;mxTemporaryCellStates[_0xb59f[202]][_0xb59f[2785]]=null;mxTemporaryCellStates[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[441]][_0xb59f[2262]](this[_0xb59f[2785]]);this[_0xb59f[441]][_0xb59f[1517]](this[_0xb59f[2784]]);this[_0xb59f[441]][_0xb59f[2256]](this[_0xb59f[2783]])};function mxCellStatePreview(_0x6b6cx2){this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[2786]]={}}mxCellStatePreview[_0xb59f[202]][_0xb59f[1179]]=null;mxCellStatePreview[_0xb59f[202]][_0xb59f[2786]]=null;mxCellStatePreview[_0xb59f[202]][_0xb59f[2787]]=0;mxCellStatePreview[_0xb59f[202]][_0xb59f[1107]]=function(){return 0==this[_0xb59f[2787]]};mxCellStatePreview[_0xb59f[202]][_0xb59f[1194]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5:!0;_0x6b6cx9=null!=_0x6b6cx9?_0x6b6cx9:!0;var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx12=this[_0xb59f[2786]][_0x6b6cxa];null==_0x6b6cx12?(_0x6b6cx12= new mxPoint(_0x6b6cx3,_0x6b6cx4),this[_0xb59f[2786]][_0x6b6cxa]=_0x6b6cx12,this[_0xb59f[2787]]++):_0x6b6cx5?(_0x6b6cx12[_0xb59f[2788]]+=_0x6b6cx3,_0x6b6cx12[_0xb59f[2789]]+=_0x6b6cx4):(_0x6b6cx12[_0xb59f[2788]]=_0x6b6cx3,_0x6b6cx12[_0xb59f[2789]]=_0x6b6cx4);_0x6b6cx9&&this[_0xb59f[2790]](_0x6b6cx2);return _0x6b6cx12};mxCellStatePreview[_0xb59f[202]][_0xb59f[539]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[501]](),_0x6b6cx5;for(_0x6b6cx5 in this[_0xb59f[2786]]){var _0x6b6cx9=mxCellPath[_0xb59f[2791]](_0x6b6cx4,_0x6b6cx5),_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx9),_0x6b6cx12=this[_0xb59f[2786]][_0x6b6cx5],_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx3[_0xb59f[1197]](_0x6b6cx9));this[_0xb59f[2792]](_0x6b6cx9,_0x6b6cxa,_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]])};for(_0x6b6cx5 in this[_0xb59f[2786]]){_0x6b6cx9=mxCellPath[_0xb59f[2791]](_0x6b6cx4,_0x6b6cx5),_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx9),_0x6b6cx12=this[_0xb59f[2786]][_0x6b6cx5],_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx3[_0xb59f[1197]](_0x6b6cx9)),this[_0xb59f[2793]](_0x6b6cx9,_0x6b6cxa,_0x6b6cx12[_0xb59f[235]],_0x6b6cx12[_0xb59f[236]],_0x6b6cx2)}};mxCellStatePreview[_0xb59f[202]][_0xb59f[2792]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx3){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[502]]();if(_0x6b6cx9[_0xb59f[1193]](_0x6b6cx3[_0xb59f[246]])){_0x6b6cx3[_0xb59f[2080]]= !0;this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2267]](_0x6b6cx2,_0x6b6cx3[_0xb59f[246]]);_0x6b6cx2=_0x6b6cx9[_0xb59f[1721]](_0x6b6cx3[_0xb59f[246]]);var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0xb59f[246]]);if((0!=_0x6b6cx4||0!=_0x6b6cx5)&&null!=_0x6b6cx2&&(!_0x6b6cx2[_0xb59f[1500]]||null!=this[_0xb59f[2786]][_0x6b6cxa])){_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx4,_0x6b6cx3[_0xb59f[236]]+=_0x6b6cx5}};_0x6b6cx2=_0x6b6cx9[_0xb59f[262]](_0x6b6cx3[_0xb59f[246]]);for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2;_0x6b6cxa++){this[_0xb59f[2792]](_0x6b6cx3,this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx9[_0xb59f[263]](_0x6b6cx3[_0xb59f[246]],_0x6b6cxa)),_0x6b6cx4,_0x6b6cx5)}}};mxCellStatePreview[_0xb59f[202]][_0xb59f[2793]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=_0x6b6cx3){_0x6b6cx3[_0xb59f[2080]]= !0;this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2268]](_0x6b6cx2,_0x6b6cx3[_0xb59f[246]]);var _0x6b6cxa=mxCellPath[_0xb59f[385]](_0x6b6cx3[_0xb59f[246]]),_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx13=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx3[_0xb59f[246]]);if((0!=_0x6b6cx4||0!=_0x6b6cx5)&&null!=_0x6b6cx13&&_0x6b6cx13[_0xb59f[1500]]&&_0x6b6cx12[_0xb59f[1193]](_0x6b6cx3[_0xb59f[246]])&&(null==_0x6b6cx2||_0x6b6cx12[_0xb59f[1193]](_0x6b6cx2[_0xb59f[246]])||null!=this[_0xb59f[2786]][_0x6b6cxa])){_0x6b6cx3[_0xb59f[235]]+=_0x6b6cx4,_0x6b6cx3[_0xb59f[236]]+=_0x6b6cx5,this[_0xb59f[1179]][_0xb59f[259]][_0xb59f[258]](_0x6b6cx3)};null!=_0x6b6cx9&&_0x6b6cx9(_0x6b6cx3);_0x6b6cx2=_0x6b6cx12[_0xb59f[262]](_0x6b6cx3[_0xb59f[246]]);for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx2;_0x6b6cxa++){this[_0xb59f[2793]](_0x6b6cx3,this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx12[_0xb59f[263]](_0x6b6cx3[_0xb59f[246]],_0x6b6cxa)),_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)}}};mxCellStatePreview[_0xb59f[202]][_0xb59f[2790]]=function(_0x6b6cx2){for(var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[1707]](_0x6b6cx2[_0xb59f[246]]),_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4;_0x6b6cx5++){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx3[_0xb59f[1708]](_0x6b6cx2[_0xb59f[246]],_0x6b6cx5));null!=_0x6b6cx9&&this[_0xb59f[1194]](_0x6b6cx9,0,0)}};function mxConnectionConstraint(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2546]]=_0x6b6cx2;this[_0xb59f[591]]=null!=_0x6b6cx3?_0x6b6cx3:!0}mxConnectionConstraint[_0xb59f[202]][_0xb59f[2546]]=null;mxConnectionConstraint[_0xb59f[202]][_0xb59f[591]]=null;function mxGraphHandler(_0x6b6cx2){this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[1179]][_0xb59f[1133]](this);this[_0xb59f[2730]]=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[2794]]()});this[_0xb59f[1179]][_0xb59f[169]](mxEvent.PAN,this[_0xb59f[2730]])}mxGraphHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxGraphHandler[_0xb59f[202]][_0xb59f[2795]]=mxClient[_0xb59f[80]]?20:50;mxGraphHandler[_0xb59f[202]][_0xb59f[984]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[2796]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[2797]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[2798]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[990]]= !1;mxGraphHandler[_0xb59f[202]][_0xb59f[2799]]=null;mxGraphHandler[_0xb59f[202]][_0xb59f[2800]]=null;mxGraphHandler[_0xb59f[202]][_0xb59f[2801]]=null;mxGraphHandler[_0xb59f[202]][_0xb59f[2802]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[2803]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[846]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[2804]]= !1;mxGraphHandler[_0xb59f[202]][_0xb59f[2805]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[923]]=6;mxGraphHandler[_0xb59f[202]][_0xb59f[2806]]=_0xb59f[586];mxGraphHandler[_0xb59f[202]][_0xb59f[2807]]= !1;mxGraphHandler[_0xb59f[202]][_0xb59f[253]]=null;mxGraphHandler[_0xb59f[202]][_0xb59f[2808]]= !1;mxGraphHandler[_0xb59f[202]][_0xb59f[2809]]= !0;mxGraphHandler[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxGraphHandler[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[2810]]=function(){return this[_0xb59f[2797]]};mxGraphHandler[_0xb59f[202]][_0xb59f[2811]]=function(_0x6b6cx2){this[_0xb59f[2797]]=_0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[2812]]=function(){return this[_0xb59f[2798]]};mxGraphHandler[_0xb59f[202]][_0xb59f[2813]]=function(_0x6b6cx2){this[_0xb59f[2798]]=_0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[2814]]=function(){return this[_0xb59f[2803]]};mxGraphHandler[_0xb59f[202]][_0xb59f[2815]]=function(_0x6b6cx2){this[_0xb59f[2803]]=_0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[2816]]=function(){return this[_0xb59f[846]]};mxGraphHandler[_0xb59f[202]][_0xb59f[2817]]=function(_0x6b6cx2){this[_0xb59f[846]]=_0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[2818]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[736]]()};mxGraphHandler[_0xb59f[202]][_0xb59f[2819]]=function(_0x6b6cx2){return this[_0xb59f[1179]][_0xb59f[2692]](_0x6b6cx2)};mxGraphHandler[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&this[_0xb59f[994]]()&&this[_0xb59f[1179]][_0xb59f[994]]()&&!this[_0xb59f[1179]][_0xb59f[2579]](_0x6b6cx3[_0xb59f[727]]())&&null!=_0x6b6cx3[_0xb59f[248]]()){var _0x6b6cx4=this[_0xb59f[2818]](_0x6b6cx3);this[_0xb59f[246]]=null;this[_0xb59f[2820]]=this[_0xb59f[2819]](_0x6b6cx4);this[_0xb59f[2814]]()&&!this[_0xb59f[2820]]&&this[_0xb59f[1179]][_0xb59f[2459]](_0x6b6cx4,_0x6b6cx3[_0xb59f[727]]());if(this[_0xb59f[2812]]()){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[251]],_0x6b6cx9=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx4);this[_0xb59f[1179]][_0xb59f[1712]](_0x6b6cx4)&&(!_0x6b6cx5[_0xb59f[250]](_0x6b6cx4)||1<this[_0xb59f[1179]][_0xb59f[2694]]()||null!=_0x6b6cx9[_0xb59f[1525]]&&0<_0x6b6cx9[_0xb59f[1525]][_0xb59f[67]]||null==_0x6b6cx5[_0xb59f[1709]](_0x6b6cx4,!0)||null==_0x6b6cx5[_0xb59f[1709]](_0x6b6cx4,!1)||this[_0xb59f[1179]][_0xb59f[2406]]||this[_0xb59f[1179]][_0xb59f[2574]](_0x6b6cx3[_0xb59f[727]]())&&this[_0xb59f[1179]][_0xb59f[2617]]())&&this[_0xb59f[861]](_0x6b6cx4,_0x6b6cx3[_0xb59f[730]](),_0x6b6cx3[_0xb59f[732]]());this[_0xb59f[2821]]= !0;!mxClient[_0xb59f[75]]&&!mxClient[_0xb59f[76]]||_0xb59f[2822]!=_0x6b6cx3[_0xb59f[728]]()[_0xb59f[301]]?_0x6b6cx3[_0xb59f[722]]():mxClient[_0xb59f[75]]&&_0xb59f[2822]==_0x6b6cx3[_0xb59f[728]]()[_0xb59f[301]]&&(this[_0xb59f[2821]]= !1,this[_0xb59f[2823]]=null)}}};mxGraphHandler[_0xb59f[202]][_0xb59f[1010]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[902]](),_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx4=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){return null!=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx2)&&_0x6b6cx3[_0xb59f[1193]](_0x6b6cx2)&&null!=_0x6b6cx3[_0xb59f[1721]](_0x6b6cx2)&&!_0x6b6cx3[_0xb59f[1721]](_0x6b6cx2)[_0xb59f[1500]]});return this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2313]](_0x6b6cx3[_0xb59f[1921]](_0x6b6cx4,_0x6b6cx2))};mxGraphHandler[_0xb59f[202]][_0xb59f[2690]]=function(_0x6b6cx2){return !this[_0xb59f[2820]]&&this[_0xb59f[1179]][_0xb59f[1712]](_0x6b6cx2)?[_0x6b6cx2]:this[_0xb59f[1179]][_0xb59f[2629]](this[_0xb59f[1179]][_0xb59f[897]]())};mxGraphHandler[_0xb59f[202]][_0xb59f[2824]]=function(_0x6b6cx2){_0x6b6cx2=this[_0xb59f[1613]](_0x6b6cx2);null!=_0x6b6cx2&&(_0x6b6cx2[_0xb59f[244]](-1,-1),_0x6b6cx2[_0xb59f[117]]<this[_0xb59f[923]]&&(_0x6b6cx2[_0xb59f[235]]-=(this[_0xb59f[923]]-_0x6b6cx2[_0xb59f[117]])/2,_0x6b6cx2[_0xb59f[117]]=this[_0xb59f[923]]),_0x6b6cx2[_0xb59f[119]]<this[_0xb59f[923]]&&(_0x6b6cx2[_0xb59f[236]]-=(this[_0xb59f[923]]-_0x6b6cx2[_0xb59f[119]])/2,_0x6b6cx2[_0xb59f[119]]=this[_0xb59f[923]]));return _0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[1613]]=function(_0x6b6cx2){var _0x6b6cx3=null;if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){for(var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx2[_0xb59f[67]];_0x6b6cx5++){if(_0x6b6cx4[_0xb59f[1193]](_0x6b6cx2[_0x6b6cx5])||_0x6b6cx4[_0xb59f[250]](_0x6b6cx2[_0x6b6cx5])){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx2[_0x6b6cx5]);if(null!=_0x6b6cx9){var _0x6b6cxa=_0x6b6cx9;_0x6b6cx4[_0xb59f[1193]](_0x6b6cx2[_0x6b6cx5])&&(null!=_0x6b6cx9[_0xb59f[253]]&&null!=_0x6b6cx9[_0xb59f[253]][_0xb59f[1563]])&&(_0x6b6cxa=_0x6b6cx9[_0xb59f[253]][_0xb59f[1563]]);null==_0x6b6cx3?_0x6b6cx3= new mxRectangle(_0x6b6cxa[_0xb59f[235]],_0x6b6cxa[_0xb59f[236]],_0x6b6cxa[_0xb59f[117]],_0x6b6cxa[_0xb59f[119]]):_0x6b6cx3[_0xb59f[99]](_0x6b6cxa)}}}};return _0x6b6cx3};mxGraphHandler[_0xb59f[202]][_0xb59f[2825]]=function(_0x6b6cx2){_0x6b6cx2= new mxRectangleShape(_0x6b6cx2,null,this[_0xb59f[2806]]);_0x6b6cx2[_0xb59f[1522]]= !0;this[_0xb59f[2807]]?(_0x6b6cx2[_0xb59f[507]]=mxConstants[_0xb59f[1656]],_0x6b6cx2[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[526]])):(_0x6b6cx2[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]],_0x6b6cx2[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]()),_0x6b6cx2[_0xb59f[1229]]= !1);return _0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[861]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[246]]=_0x6b6cx2;this[_0xb59f[2823]]=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],_0x6b6cx3,_0x6b6cx4);this[_0xb59f[895]]=this[_0xb59f[2690]](this[_0xb59f[246]]);this[_0xb59f[1562]]=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1799]](this[_0xb59f[895]]);this[_0xb59f[2826]]=this[_0xb59f[2824]](this[_0xb59f[895]]);this[_0xb59f[990]]&&(this[_0xb59f[2799]]= new mxGuide(this[_0xb59f[1179]],this[_0xb59f[1010]]()))};mxGraphHandler[_0xb59f[202]][_0xb59f[2827]]=function(_0x6b6cx2){return null!=this[_0xb59f[2799]]?this[_0xb59f[2799]][_0xb59f[1019]](_0x6b6cx2[_0xb59f[727]]()):!0};mxGraphHandler[_0xb59f[202]][_0xb59f[1021]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[2808]]?this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]]:1;_0x6b6cx2[_0xb59f[235]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[235]]/_0x6b6cx3)*_0x6b6cx3;_0x6b6cx2[_0xb59f[236]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[236]]/_0x6b6cx3)*_0x6b6cx3;return _0x6b6cx2};mxGraphHandler[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]];if(!_0x6b6cx3[_0xb59f[721]]()&&_0x6b6cx4[_0xb59f[1009]]&&null!=this[_0xb59f[246]]&&null!=this[_0xb59f[2823]]&&null!=this[_0xb59f[1562]]){var _0x6b6cx5=mxUtils[_0xb59f[2196]](_0x6b6cx4[_0xb59f[526]],_0x6b6cx3[_0xb59f[730]](),_0x6b6cx3[_0xb59f[732]]()),_0x6b6cx9=_0x6b6cx5[_0xb59f[235]]-this[_0xb59f[2823]][_0xb59f[235]],_0x6b6cxa=_0x6b6cx5[_0xb59f[236]]-this[_0xb59f[2823]][_0xb59f[236]],_0x6b6cx5=_0x6b6cx4[_0xb59f[2353]];if(null!=this[_0xb59f[253]]||Math[_0xb59f[425]](_0x6b6cx9)>_0x6b6cx5||Math[_0xb59f[425]](_0x6b6cxa)>_0x6b6cx5){null==this[_0xb59f[1016]]&&(this[_0xb59f[1016]]= new mxCellHighlight(this[_0xb59f[1179]],mxConstants.DROP_TARGET_COLOR,3));null==this[_0xb59f[253]]&&(this[_0xb59f[253]]=this[_0xb59f[2825]](this[_0xb59f[1562]]));var _0x6b6cx12=_0x6b6cx4[_0xb59f[1018]](_0x6b6cx3[_0xb59f[727]]()),_0x6b6cx5=!0;if(null!=this[_0xb59f[2799]]&&this[_0xb59f[2827]](_0x6b6cx3)){_0x6b6cxa=this[_0xb59f[2799]][_0xb59f[582]](this[_0xb59f[1562]], new mxPoint(_0x6b6cx9,_0x6b6cxa),_0x6b6cx12),_0x6b6cx5= !1,_0x6b6cx9=_0x6b6cxa[_0xb59f[235]],_0x6b6cxa=_0x6b6cxa[_0xb59f[236]]}else {if(_0x6b6cx12){var _0x6b6cx13=_0x6b6cx4[_0xb59f[249]]()[_0xb59f[513]],_0x6b6cx14=_0x6b6cx4[_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx12=this[_0xb59f[1562]][_0xb59f[235]]-(_0x6b6cx4[_0xb59f[1021]](this[_0xb59f[1562]][_0xb59f[235]]/_0x6b6cx14-_0x6b6cx13[_0xb59f[235]])+_0x6b6cx13[_0xb59f[235]])*_0x6b6cx14,_0x6b6cx13=this[_0xb59f[1562]][_0xb59f[236]]-(_0x6b6cx4[_0xb59f[1021]](this[_0xb59f[1562]][_0xb59f[236]]/_0x6b6cx14-_0x6b6cx13[_0xb59f[236]])+_0x6b6cx13[_0xb59f[236]])*_0x6b6cx14,_0x6b6cxa=this[_0xb59f[1021]]( new mxPoint(_0x6b6cx9,_0x6b6cxa)),_0x6b6cx9=_0x6b6cxa[_0xb59f[235]]-_0x6b6cx12,_0x6b6cxa=_0x6b6cxa[_0xb59f[236]]-_0x6b6cx13}};null!=this[_0xb59f[2799]]&&_0x6b6cx5&&this[_0xb59f[2799]][_0xb59f[801]]();_0x6b6cx4[_0xb59f[2578]](_0x6b6cx3[_0xb59f[727]]())&&(Math[_0xb59f[425]](_0x6b6cx9)>Math[_0xb59f[425]](_0x6b6cxa)?_0x6b6cxa=0:_0x6b6cx9=0);this[_0xb59f[2800]]=_0x6b6cx9;this[_0xb59f[2801]]=_0x6b6cxa;this[_0xb59f[2794]]();_0x6b6cx5=null;_0x6b6cxa=_0x6b6cx3[_0xb59f[736]]();_0x6b6cx4[_0xb59f[1015]]()&&this[_0xb59f[2796]]&&(_0x6b6cx5=_0x6b6cx4[_0xb59f[564]](this[_0xb59f[895]],_0x6b6cx3[_0xb59f[727]](),_0x6b6cxa));_0x6b6cx12=_0x6b6cx5;for(_0x6b6cx13=_0x6b6cx4[_0xb59f[502]]();null!=_0x6b6cx12&&_0x6b6cx12!=this[_0xb59f[895]][0];){_0x6b6cx12=_0x6b6cx13[_0xb59f[1197]](_0x6b6cx12)};var _0x6b6cx14=_0x6b6cx4[_0xb59f[2574]](_0x6b6cx3[_0xb59f[727]]())&&_0x6b6cx4[_0xb59f[2617]]()&&this[_0xb59f[2810]](),_0x6b6cx9=_0x6b6cx4[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx5),_0x6b6cx15=!1;null!=_0x6b6cx9&&null==_0x6b6cx12&&(_0x6b6cx13[_0xb59f[1197]](this[_0xb59f[246]])!=_0x6b6cx5||_0x6b6cx14)?(this[_0xb59f[772]]!=_0x6b6cx5&&(this[_0xb59f[772]]=_0x6b6cx5,this[_0xb59f[2828]](mxConstants.DROP_TARGET_COLOR)),_0x6b6cx15= !0):(this[_0xb59f[772]]=null,this[_0xb59f[2804]]&&(null!=_0x6b6cxa&&1==this[_0xb59f[895]][_0xb59f[67]]&&_0x6b6cx4[_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cxa)&&_0x6b6cx4[_0xb59f[2565]](_0x6b6cxa))&&(_0x6b6cx9=_0x6b6cx4[_0xb59f[249]]()[_0xb59f[248]](_0x6b6cxa),null!=_0x6b6cx9&&(_0x6b6cx4=null==_0x6b6cx4[_0xb59f[2500]](null,this[_0xb59f[246]],_0x6b6cxa)?mxConstants[_0xb59f[2829]]:mxConstants[_0xb59f[2830]],this[_0xb59f[2828]](_0x6b6cx4),_0x6b6cx15= !0)));null!=_0x6b6cx9&&_0x6b6cx15?this[_0xb59f[1016]][_0xb59f[1016]](_0x6b6cx9):this[_0xb59f[1016]][_0xb59f[801]]()};_0x6b6cx3[_0xb59f[722]]();mxEvent[_0xb59f[722]](_0x6b6cx3[_0xb59f[727]]())}else {if((this[_0xb59f[2812]]()||this[_0xb59f[2810]]())&&this[_0xb59f[2802]]&&!_0x6b6cx3[_0xb59f[721]]()&&null!=_0x6b6cx3[_0xb59f[248]]()&&!_0x6b6cx4[_0xb59f[1009]]){_0x6b6cx9=_0x6b6cx4[_0xb59f[2599]](_0x6b6cx3[_0xb59f[736]]()),null==_0x6b6cx9&&(_0x6b6cx4[_0xb59f[994]]()&&_0x6b6cx4[_0xb59f[1712]](_0x6b6cx3[_0xb59f[736]]()))&&(_0x6b6cx9=_0x6b6cx4[_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx3[_0xb59f[736]]())?mxConstants[_0xb59f[2831]]:mxConstants[_0xb59f[2832]]),_0x6b6cx3[_0xb59f[248]]()[_0xb59f[1609]](_0x6b6cx9),_0x6b6cx3[_0xb59f[722]]()}}};mxGraphHandler[_0xb59f[202]][_0xb59f[2794]]=function(){null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[1562]]= new mxRectangle(Math[_0xb59f[488]](this[_0xb59f[2826]][_0xb59f[235]]+this[_0xb59f[2800]]-this[_0xb59f[1179]][_0xb59f[1136]]),Math[_0xb59f[488]](this[_0xb59f[2826]][_0xb59f[236]]+this[_0xb59f[2801]]-this[_0xb59f[1179]][_0xb59f[1137]]),this[_0xb59f[2826]][_0xb59f[117]],this[_0xb59f[2826]][_0xb59f[119]]),this[_0xb59f[253]][_0xb59f[258]]())};mxGraphHandler[_0xb59f[202]][_0xb59f[2828]]=function(_0x6b6cx2){null!=this[_0xb59f[1016]]&&this[_0xb59f[1016]][_0xb59f[2828]](_0x6b6cx2)};mxGraphHandler[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()){var _0x6b6cx4=this[_0xb59f[1179]];if(null!=this[_0xb59f[246]]&&null!=this[_0xb59f[2823]]&&null!=this[_0xb59f[253]]&&null!=this[_0xb59f[2800]]&&null!=this[_0xb59f[2801]]){var _0x6b6cx5=_0x6b6cx4[_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx9=_0x6b6cx4[_0xb59f[2574]](_0x6b6cx3[_0xb59f[727]]())&&_0x6b6cx4[_0xb59f[2617]]()&&this[_0xb59f[2810]](),_0x6b6cxa=this[_0xb59f[2800]]/_0x6b6cx5,_0x6b6cx5=this[_0xb59f[2801]]/_0x6b6cx5,_0x6b6cx12=_0x6b6cx3[_0xb59f[736]]();this[_0xb59f[2804]]&&null==this[_0xb59f[772]]&&null!=_0x6b6cx12&&_0x6b6cx4[_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx12)&&_0x6b6cx4[_0xb59f[2565]](_0x6b6cx12)&&_0x6b6cx4[_0xb59f[2581]](null,this[_0xb59f[246]],_0x6b6cx12)?_0x6b6cx4[_0xb59f[2433]][_0xb59f[807]](this[_0xb59f[246]],_0x6b6cx12,_0x6b6cx3[_0xb59f[727]]()):(_0x6b6cx12=this[_0xb59f[772]],_0x6b6cx4[_0xb59f[2655]]()&&_0x6b6cx4[_0xb59f[2686]](_0x6b6cx12,this[_0xb59f[895]],_0x6b6cx3[_0xb59f[727]]())?_0x6b6cx4[_0xb59f[853]](_0x6b6cx12,this[_0xb59f[895]],null,_0x6b6cxa,_0x6b6cx5):this[_0xb59f[834]](this[_0xb59f[895]],_0x6b6cxa,_0x6b6cx5,_0x6b6cx9,this[_0xb59f[772]],_0x6b6cx3[_0xb59f[727]]()))}else {this[_0xb59f[2814]]()&&(this[_0xb59f[2820]]&&null!=this[_0xb59f[246]])&&this[_0xb59f[2833]](_0x6b6cx3)}};this[_0xb59f[2821]]&&_0x6b6cx3[_0xb59f[722]]();this[_0xb59f[862]]()};mxGraphHandler[_0xb59f[202]][_0xb59f[2833]]=function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[2459]](this[_0xb59f[246]],_0x6b6cx2[_0xb59f[727]]())};mxGraphHandler[_0xb59f[202]][_0xb59f[862]]=function(){this[_0xb59f[2834]]();this[_0xb59f[2820]]=this[_0xb59f[2821]]= !1;this[_0xb59f[772]]=this[_0xb59f[246]]=this[_0xb59f[2823]]=this[_0xb59f[2835]]=this[_0xb59f[2801]]=this[_0xb59f[2800]]=null};mxGraphHandler[_0xb59f[202]][_0xb59f[2836]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1193]](_0x6b6cx2)){_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);_0x6b6cx4=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx4),mxEvent[_0xb59f[733]](_0x6b6cx4));var _0x6b6cx5=mxUtils[_0xb59f[431]](mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ROTATION)||0);if(0!=_0x6b6cx5){_0x6b6cx3=Math[_0xb59f[426]](-_0x6b6cx5);var _0x6b6cx5=Math[_0xb59f[427]](-_0x6b6cx5),_0x6b6cx9= new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]());_0x6b6cx4=mxUtils[_0xb59f[432]](_0x6b6cx4,_0x6b6cx3,_0x6b6cx5,_0x6b6cx9)};return null!=_0x6b6cx2&&!mxUtils[_0xb59f[442]](_0x6b6cx2,_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]])};return !1};mxGraphHandler[_0xb59f[202]][_0xb59f[834]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){_0x6b6cx5&&(_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[2615]](_0x6b6cx2));null==_0x6b6cx9&&(this[_0xb59f[2816]]()&&this[_0xb59f[2836]](this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1197]](this[_0xb59f[246]]),_0x6b6cx2,_0x6b6cxa))&&(_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[902]]());_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[834]](_0x6b6cx2,_0x6b6cx3-this[_0xb59f[1179]][_0xb59f[1136]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx4-this[_0xb59f[1179]][_0xb59f[1137]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx5,_0x6b6cx9,_0x6b6cxa);this[_0xb59f[2814]]()&&this[_0xb59f[2805]]&&this[_0xb59f[1179]][_0xb59f[2564]](_0x6b6cx2[0]);_0x6b6cx5&&this[_0xb59f[1179]][_0xb59f[904]](_0x6b6cx2)};mxGraphHandler[_0xb59f[202]][_0xb59f[2834]]=function(){null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[515]](),this[_0xb59f[253]]=null);null!=this[_0xb59f[2799]]&&(this[_0xb59f[2799]][_0xb59f[515]](),this[_0xb59f[2799]]=null);null!=this[_0xb59f[1016]]&&(this[_0xb59f[1016]][_0xb59f[515]](),this[_0xb59f[1016]]=null)};mxGraphHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1179]][_0xb59f[1148]](this);this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2730]]);this[_0xb59f[2834]]()};function mxPanningHandler(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2&&(this[_0xb59f[1179]]=_0x6b6cx2,this[_0xb59f[1033]]=_0x6b6cx3,this[_0xb59f[1179]][_0xb59f[1133]](this),this[_0xb59f[176]]())}mxPanningHandler[_0xb59f[202]]= new mxPopupMenu;mxPanningHandler[_0xb59f[202]][_0xb59f[196]]=mxPanningHandler;mxPanningHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxPanningHandler[_0xb59f[202]][_0xb59f[2837]]=null;mxPanningHandler[_0xb59f[202]][_0xb59f[2838]]=null;mxPanningHandler[_0xb59f[202]][_0xb59f[2839]]= !0;mxPanningHandler[_0xb59f[202]][_0xb59f[2840]]= !1;mxPanningHandler[_0xb59f[202]][_0xb59f[2841]]= !0;mxPanningHandler[_0xb59f[202]][_0xb59f[2842]]= !0;mxPanningHandler[_0xb59f[202]][_0xb59f[2843]]= !1;mxPanningHandler[_0xb59f[202]][_0xb59f[2844]]= !0;mxPanningHandler[_0xb59f[202]][_0xb59f[2845]]= !1;mxPanningHandler[_0xb59f[202]][_0xb59f[2431]]= !0;mxPanningHandler[_0xb59f[202]][_0xb59f[2846]]=function(){return this[_0xb59f[2431]]};mxPanningHandler[_0xb59f[202]][_0xb59f[2847]]=function(_0x6b6cx2){this[_0xb59f[2431]]=_0x6b6cx2};mxPanningHandler[_0xb59f[202]][_0xb59f[176]]=function(){mxPopupMenu[_0xb59f[202]][_0xb59f[176]][_0xb59f[183]](this);mxEvent[_0xb59f[169]](this[_0xb59f[485]],mxClient[_0xb59f[754]]?_0xb59f[756]:_0xb59f[752],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[2276]][_0xb59f[801]]()}))};mxPanningHandler[_0xb59f[202]][_0xb59f[2848]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[727]]();return this[_0xb59f[2840]]&&(this[_0xb59f[2843]]||null==_0x6b6cx2[_0xb59f[248]]())&&mxEvent[_0xb59f[1158]](_0x6b6cx3)||mxEvent[_0xb59f[775]](_0x6b6cx3)&&mxEvent[_0xb59f[774]](_0x6b6cx3)||this[_0xb59f[2839]]&&mxEvent[_0xb59f[737]](_0x6b6cx3)};mxPanningHandler[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&this[_0xb59f[994]]()){this[_0xb59f[1032]]();this[_0xb59f[2741]]=-this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[360]];this[_0xb59f[2742]]=-this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[190]];var _0x6b6cx4=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],_0x6b6cx3[_0xb59f[730]](),_0x6b6cx3[_0xb59f[732]]());this[_0xb59f[2837]]=_0x6b6cx4[_0xb59f[235]];this[_0xb59f[2838]]=_0x6b6cx4[_0xb59f[236]];this[_0xb59f[2849]]=this[_0xb59f[737]](_0x6b6cx3);this[_0xb59f[2850]]=this[_0xb59f[2846]]()&&this[_0xb59f[2848]](_0x6b6cx3);this[_0xb59f[2739]]=_0x6b6cx3[_0xb59f[730]]();this[_0xb59f[2740]]=_0x6b6cx3[_0xb59f[732]]();this[_0xb59f[2850]]&&this[_0xb59f[2851]](_0x6b6cx3)}};mxPanningHandler[_0xb59f[202]][_0xb59f[2851]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[722]]()};mxPanningHandler[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx3[_0xb59f[730]]()-this[_0xb59f[2739]],_0x6b6cx5=_0x6b6cx3[_0xb59f[732]]()-this[_0xb59f[2740]];if(this[_0xb59f[1124]]){this[_0xb59f[2844]]&&(this[_0xb59f[2845]]&&(_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx4),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx5)),this[_0xb59f[1179]][_0xb59f[1135]](_0x6b6cx4+this[_0xb59f[2741]],_0x6b6cx5+this[_0xb59f[2742]])),this[_0xb59f[746]]( new mxEventObject(mxEvent.PAN,_0xb59f[763],_0x6b6cx3)),_0x6b6cx3[_0xb59f[722]]()}else {if(this[_0xb59f[2850]]){var _0x6b6cx9=this[_0xb59f[1124]];this[_0xb59f[1124]]=Math[_0xb59f[425]](_0x6b6cx4)>this[_0xb59f[1179]][_0xb59f[2353]]||Math[_0xb59f[425]](_0x6b6cx5)>this[_0xb59f[1179]][_0xb59f[2353]];!_0x6b6cx9&&this[_0xb59f[1124]]&&this[_0xb59f[746]]( new mxEventObject(mxEvent.PAN_START,_0xb59f[763],_0x6b6cx3))}}};mxPanningHandler[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=Math[_0xb59f[425]](_0x6b6cx3[_0xb59f[730]]()-this[_0xb59f[2739]]),_0x6b6cx5=Math[_0xb59f[425]](_0x6b6cx3[_0xb59f[732]]()-this[_0xb59f[2740]]);if(this[_0xb59f[1124]]){if(!this[_0xb59f[1179]][_0xb59f[2365]]||!mxUtils[_0xb59f[1134]](this[_0xb59f[1179]][_0xb59f[526]])){_0x6b6cx4=_0x6b6cx3[_0xb59f[730]]()-this[_0xb59f[2739]];_0x6b6cx5=_0x6b6cx3[_0xb59f[732]]()-this[_0xb59f[2740]];this[_0xb59f[2845]]&&(_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx4),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx5));var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[513]];this[_0xb59f[1179]][_0xb59f[1135]](0,0);this[_0xb59f[1135]](_0x6b6cxa[_0xb59f[235]]+_0x6b6cx4/_0x6b6cx9,_0x6b6cxa[_0xb59f[236]]+_0x6b6cx5/_0x6b6cx9)};this[_0xb59f[1124]]= !1;this[_0xb59f[746]]( new mxEventObject(mxEvent.PAN_END,_0xb59f[763],_0x6b6cx3));_0x6b6cx3[_0xb59f[722]]()}else {this[_0xb59f[2849]]&&(_0x6b6cx4<this[_0xb59f[1179]][_0xb59f[2353]]&&_0x6b6cx5<this[_0xb59f[1179]][_0xb59f[2353]])&&(_0x6b6cx4=this[_0xb59f[2852]](_0x6b6cx3),this[_0xb59f[1179]][_0xb59f[994]]()&&this[_0xb59f[2841]]&&null!=_0x6b6cx4&&!this[_0xb59f[1179]][_0xb59f[2692]](_0x6b6cx4)?this[_0xb59f[1179]][_0xb59f[2450]](_0x6b6cx4):this[_0xb59f[2842]]&&null==_0x6b6cx4&&this[_0xb59f[1179]][_0xb59f[2440]](),this[_0xb59f[1179]][_0xb59f[2276]][_0xb59f[801]](),_0x6b6cx5=mxUtils[_0xb59f[444]](),_0x6b6cx5= new mxPoint(_0x6b6cx3[_0xb59f[730]]()+_0x6b6cx5[_0xb59f[235]],_0x6b6cx3[_0xb59f[732]]()+_0x6b6cx5[_0xb59f[236]]),this[_0xb59f[152]](_0x6b6cx5[_0xb59f[235]]+1,_0x6b6cx5[_0xb59f[236]]+1,_0x6b6cx4,_0x6b6cx3[_0xb59f[727]]()),_0x6b6cx3[_0xb59f[722]]())};this[_0xb59f[2849]]=this[_0xb59f[2850]]= !1};mxPanningHandler[_0xb59f[202]][_0xb59f[2852]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[736]]()};mxPanningHandler[_0xb59f[202]][_0xb59f[1135]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1147]](_0x6b6cx2,_0x6b6cx3)};mxPanningHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1179]][_0xb59f[1148]](this);mxPopupMenu[_0xb59f[202]][_0xb59f[515]][_0xb59f[183]](this)};function mxCellMarker(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){mxEventSource[_0xb59f[239]](this);null!=_0x6b6cx2&&(this[_0xb59f[1179]]=_0x6b6cx2,this[_0xb59f[2853]]=null!=_0x6b6cx3?_0x6b6cx3:mxConstants[_0xb59f[2854]],this[_0xb59f[2855]]=null!=_0x6b6cx3?_0x6b6cx4:mxConstants[_0xb59f[2856]],this[_0xb59f[2857]]=null!=_0x6b6cx5?_0x6b6cx5:mxConstants[_0xb59f[2858]],this[_0xb59f[1016]]= new mxCellHighlight(_0x6b6cx2))}mxUtils[_0xb59f[1284]](mxCellMarker,mxEventSource);mxCellMarker[_0xb59f[202]][_0xb59f[1179]]=null;mxCellMarker[_0xb59f[202]][_0xb59f[984]]= !0;mxCellMarker[_0xb59f[202]][_0xb59f[2857]]=mxConstants[_0xb59f[2858]];mxCellMarker[_0xb59f[202]][_0xb59f[2859]]= !1;mxCellMarker[_0xb59f[202]][_0xb59f[2853]]=null;mxCellMarker[_0xb59f[202]][_0xb59f[2855]]=null;mxCellMarker[_0xb59f[202]][_0xb59f[2860]]=null;mxCellMarker[_0xb59f[202]][_0xb59f[2861]]=null;mxCellMarker[_0xb59f[202]][_0xb59f[2862]]=null;mxCellMarker[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxCellMarker[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxCellMarker[_0xb59f[202]][_0xb59f[2863]]=function(_0x6b6cx2){this[_0xb59f[2857]]=_0x6b6cx2};mxCellMarker[_0xb59f[202]][_0xb59f[2864]]=function(){return this[_0xb59f[2857]]};mxCellMarker[_0xb59f[202]][_0xb59f[2865]]=function(_0x6b6cx2){this[_0xb59f[2859]]=_0x6b6cx2};mxCellMarker[_0xb59f[202]][_0xb59f[2866]]=function(){return this[_0xb59f[2859]]};mxCellMarker[_0xb59f[202]][_0xb59f[2867]]=function(){return null!=this[_0xb59f[2861]]};mxCellMarker[_0xb59f[202]][_0xb59f[2868]]=function(){return this[_0xb59f[2861]]};mxCellMarker[_0xb59f[202]][_0xb59f[2869]]=function(){return this[_0xb59f[2862]]};mxCellMarker[_0xb59f[202]][_0xb59f[862]]=function(){this[_0xb59f[2861]]=null;null!=this[_0xb59f[2862]]&&(this[_0xb59f[2862]]=null,this[_0xb59f[2870]]())};mxCellMarker[_0xb59f[202]][_0xb59f[2871]]=function(_0x6b6cx2){var _0x6b6cx3=null;if(this[_0xb59f[994]]()){var _0x6b6cx3=this[_0xb59f[248]](_0x6b6cx2),_0x6b6cx4=null!=_0x6b6cx3?this[_0xb59f[2872]](_0x6b6cx3):!1;_0x6b6cx2=this[_0xb59f[2873]](_0x6b6cx2[_0xb59f[727]](),_0x6b6cx3,_0x6b6cx4);this[_0xb59f[2861]]=_0x6b6cx4?_0x6b6cx3:null;if(_0x6b6cx3!=this[_0xb59f[2862]]||_0x6b6cx2!=this[_0xb59f[2860]]){this[_0xb59f[2860]]=_0x6b6cx2,null!=_0x6b6cx3&&null!=this[_0xb59f[2860]]?(this[_0xb59f[2862]]=_0x6b6cx3,this[_0xb59f[811]]()):null!=this[_0xb59f[2862]]&&(this[_0xb59f[2862]]=null,this[_0xb59f[2870]]())}};return _0x6b6cx3};mxCellMarker[_0xb59f[202]][_0xb59f[2874]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);null!=_0x6b6cx4&&(this[_0xb59f[2860]]=null!=_0x6b6cx3?_0x6b6cx3:this[_0xb59f[2853]],this[_0xb59f[2862]]=_0x6b6cx4,this[_0xb59f[811]]())};mxCellMarker[_0xb59f[202]][_0xb59f[811]]=function(){this[_0xb59f[1016]][_0xb59f[2828]](this[_0xb59f[2860]]);this[_0xb59f[1016]][_0xb59f[1016]](this[_0xb59f[2862]]);this[_0xb59f[746]]( new mxEventObject(mxEvent.MARK,_0xb59f[724],this[_0xb59f[2862]]))};mxCellMarker[_0xb59f[202]][_0xb59f[2870]]=function(){this[_0xb59f[811]]()};mxCellMarker[_0xb59f[202]][_0xb59f[2872]]=function(_0x6b6cx2){return !0};mxCellMarker[_0xb59f[202]][_0xb59f[2873]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx4?this[_0xb59f[2853]]:this[_0xb59f[2855]]};mxCellMarker[_0xb59f[202]][_0xb59f[248]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[249]]();cell=this[_0xb59f[736]](_0x6b6cx2);_0x6b6cx3=this[_0xb59f[2875]](_0x6b6cx3[_0xb59f[248]](cell));return null!=_0x6b6cx3&&this[_0xb59f[1825]](_0x6b6cx3,_0x6b6cx2)?_0x6b6cx3:null};mxCellMarker[_0xb59f[202]][_0xb59f[736]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[736]]()};mxCellMarker[_0xb59f[202]][_0xb59f[2875]]=function(_0x6b6cx2){return _0x6b6cx2};mxCellMarker[_0xb59f[202]][_0xb59f[1825]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[2859]]?mxUtils[_0xb59f[2876]](_0x6b6cx2,_0x6b6cx3[_0xb59f[734]](),_0x6b6cx3[_0xb59f[735]](),this[_0xb59f[2857]],mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[745]](this[_0xb59f[2877]]);this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[745]](this[_0xb59f[2877]]);this[_0xb59f[1016]][_0xb59f[515]]()};function mxSelectionCellsHandler(_0x6b6cx2){mxEventSource[_0xb59f[239]](this);this[_0xb59f[1179]]=_0x6b6cx2;this[_0xb59f[2878]]= new mxDictionary;this[_0xb59f[1179]][_0xb59f[1133]](this);this[_0xb59f[2731]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx4){this[_0xb59f[994]]()&&this[_0xb59f[802]]()});this[_0xb59f[1179]][_0xb59f[2435]]()[_0xb59f[169]](mxEvent.CHANGE,this[_0xb59f[2731]]);this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[169]](mxEvent.CHANGE,this[_0xb59f[2731]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.SCALE,this[_0xb59f[2731]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.TRANSLATE,this[_0xb59f[2731]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xb59f[2731]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.DOWN,this[_0xb59f[2731]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.UP,this[_0xb59f[2731]])}mxUtils[_0xb59f[1284]](mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[984]]= !0;mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[2731]]=null;mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[2879]]=100;mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[2878]]=null;mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[2596]]=function(_0x6b6cx2){return this[_0xb59f[2878]][_0xb59f[203]](_0x6b6cx2)};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[862]]=function(){this[_0xb59f[2878]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3[_0xb59f[862]][_0xb59f[183]](_0x6b6cx3)})};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[802]]=function(){var _0x6b6cx2=this[_0xb59f[2878]];this[_0xb59f[2878]]= new mxDictionary;for(var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[897]](),_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx3[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx3[_0x6b6cx4]);if(null!=_0x6b6cx5){var _0x6b6cx9=_0x6b6cx2[_0xb59f[205]](_0x6b6cx3[_0x6b6cx4]);null!=_0x6b6cx9&&(_0x6b6cx9[_0xb59f[724]]!=_0x6b6cx5?(_0x6b6cx9[_0xb59f[515]](),_0x6b6cx9=null):_0x6b6cx9[_0xb59f[258]]());null==_0x6b6cx9&&(_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[2709]](_0x6b6cx5),this[_0xb59f[746]]( new mxEventObject(mxEvent.ADD,_0xb59f[724],_0x6b6cx5)));null!=_0x6b6cx9&&this[_0xb59f[2878]][_0xb59f[204]](_0x6b6cx3[_0x6b6cx4],_0x6b6cx9)}};_0x6b6cx2[_0xb59f[209]](mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[746]]( new mxEventObject(mxEvent.REMOVE,_0xb59f[724],_0x6b6cx3[_0xb59f[724]]));_0x6b6cx3[_0xb59f[515]]()}))};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1179]][_0xb59f[994]]()&&this[_0xb59f[994]]()){var _0x6b6cx4=[_0x6b6cx2,_0x6b6cx3];this[_0xb59f[2878]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3[_0xb59f[787]][_0xb59f[183]](_0x6b6cx3,_0x6b6cx4)})}};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1179]][_0xb59f[994]]()&&this[_0xb59f[994]]()){var _0x6b6cx4=[_0x6b6cx2,_0x6b6cx3];this[_0xb59f[2878]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3[_0xb59f[788]][_0xb59f[183]](_0x6b6cx3,_0x6b6cx4)})}};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1179]][_0xb59f[994]]()&&this[_0xb59f[994]]()){var _0x6b6cx4=[_0x6b6cx2,_0x6b6cx3];this[_0xb59f[2878]][_0xb59f[209]](function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3[_0xb59f[789]][_0xb59f[183]](_0x6b6cx3,_0x6b6cx4)})}};mxSelectionCellsHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1179]][_0xb59f[1148]](this);null!=this[_0xb59f[2731]]&&(this[_0xb59f[1179]][_0xb59f[2435]]()[_0xb59f[745]](this[_0xb59f[2731]]),this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[745]](this[_0xb59f[2731]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[745]](this[_0xb59f[2731]]),this[_0xb59f[2731]]=null)};function mxConnectionHandler(_0x6b6cx2,_0x6b6cx3){mxEventSource[_0xb59f[239]](this);null!=_0x6b6cx2&&(this[_0xb59f[1179]]=_0x6b6cx2,this[_0xb59f[1033]]=_0x6b6cx3,this[_0xb59f[176]]())}mxUtils[_0xb59f[1284]](mxConnectionHandler,mxEventSource);mxConnectionHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[1033]]= !0;mxConnectionHandler[_0xb59f[202]][_0xb59f[2880]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[2881]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[2882]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[2883]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[984]]= !0;mxConnectionHandler[_0xb59f[202]][_0xb59f[804]]= !0;mxConnectionHandler[_0xb59f[202]][_0xb59f[2884]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[2885]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[2886]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[267]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[2887]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[2888]]= !0;mxConnectionHandler[_0xb59f[202]][_0xb59f[2889]]=500;mxConnectionHandler[_0xb59f[202]][_0xb59f[2890]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[2891]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[2892]]=4;mxConnectionHandler[_0xb59f[202]][_0xb59f[2893]]=0;mxConnectionHandler[_0xb59f[202]][_0xb59f[2894]]=0;mxConnectionHandler[_0xb59f[202]][_0xb59f[2895]]= !1;mxConnectionHandler[_0xb59f[202]][_0xb59f[2823]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[2896]]= new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);mxConnectionHandler[_0xb59f[202]][_0xb59f[2897]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[1176]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[2898]]=null;mxConnectionHandler[_0xb59f[202]][_0xb59f[2899]]=0;mxConnectionHandler[_0xb59f[202]][_0xb59f[2900]]=mxClient[_0xb59f[47]];mxConnectionHandler[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxConnectionHandler[_0xb59f[202]][_0xb59f[2901]]=function(){return this[_0xb59f[2884]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[2902]]=function(_0x6b6cx2){this[_0xb59f[2884]]=_0x6b6cx2};mxConnectionHandler[_0xb59f[202]][_0xb59f[2156]]=function(){var _0x6b6cx2= new mxPolyline([],mxConstants.INVALID_COLOR);_0x6b6cx2[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]];_0x6b6cx2[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]());_0x6b6cx2[_0xb59f[1564]]=0;_0x6b6cx2[_0xb59f[1229]]= !1;_0x6b6cx2[_0xb59f[1522]]= !0;if(this[_0xb59f[1179]][_0xb59f[507]]==mxConstants[_0xb59f[508]]){_0x6b6cx2[_0xb59f[252]][_0xb59f[57]](_0xb59f[1377],_0xb59f[130])}else {var _0x6b6cx3=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){_0x6b6cx2=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx2),mxEvent[_0xb59f[733]](_0x6b6cx2));return this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](this[_0xb59f[1179]][_0xb59f[999]](_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]))});mxEvent[_0xb59f[2733]](_0x6b6cx2[_0xb59f[252]],this[_0xb59f[1179]],_0x6b6cx3)};return _0x6b6cx2};mxConnectionHandler[_0xb59f[202]][_0xb59f[176]]=function(){this[_0xb59f[1179]][_0xb59f[1133]](this);this[_0xb59f[2885]]=this[_0xb59f[1689]]();this[_0xb59f[2886]]= new mxConstraintHandler(this[_0xb59f[1179]]);this[_0xb59f[1176]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){null!=this[_0xb59f[2903]]&&(this[_0xb59f[2903]]=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](this[_0xb59f[2903]][_0xb59f[246]]));null!=this[_0xb59f[2903]]?this[_0xb59f[2905]](this[_0xb59f[2904]],this[_0xb59f[2903]]):(this[_0xb59f[2906]](this[_0xb59f[2904]]),this[_0xb59f[257]]=null);this[_0xb59f[2886]][_0xb59f[862]]()});this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[169]](mxEvent.CHANGE,this[_0xb59f[1176]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.SCALE,this[_0xb59f[1176]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.TRANSLATE,this[_0xb59f[1176]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xb59f[1176]]);this[_0xb59f[2898]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2906]](this[_0xb59f[2904]])});this[_0xb59f[1179]][_0xb59f[169]](mxEvent.START_EDITING,this[_0xb59f[2898]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.DOWN,this[_0xb59f[2898]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.UP,this[_0xb59f[2898]])};mxConnectionHandler[_0xb59f[202]][_0xb59f[2907]]=function(_0x6b6cx2){return !0};mxConnectionHandler[_0xb59f[202]][_0xb59f[1689]]=function(){var _0x6b6cx2= new mxCellMarker(this[_0xb59f[1179]]);_0x6b6cx2[_0xb59f[2859]]= !0;_0x6b6cx2[_0xb59f[736]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=mxCellMarker[_0xb59f[202]][_0xb59f[736]][_0xb59f[183]](_0x6b6cx2,arguments);this[_0xb59f[267]]=null;if(!this[_0xb59f[2907]](_0x6b6cx4)){return null};null!=_0x6b6cx4?this[_0xb59f[2908]]()?null!=this[_0xb59f[257]]&&(this[_0xb59f[267]]=this[_0xb59f[2909]](this[_0xb59f[257]][_0xb59f[246]],_0x6b6cx4),null!=this[_0xb59f[267]]&&0==this[_0xb59f[267]][_0xb59f[67]]&&(_0x6b6cx4=null,this[_0xb59f[2901]]()&&(this[_0xb59f[267]]=null))):this[_0xb59f[2671]](_0x6b6cx4)||(_0x6b6cx4=null):this[_0xb59f[2908]]()&&(!this[_0xb59f[2901]]()&&!this[_0xb59f[1179]][_0xb59f[2406]])&&(this[_0xb59f[267]]=_0xb59f[110]);return _0x6b6cx4});_0x6b6cx2[_0xb59f[2872]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){return this[_0xb59f[2908]]()?null==this[_0xb59f[267]]:mxCellMarker[_0xb59f[202]][_0xb59f[2872]][_0xb59f[183]](_0x6b6cx2,arguments)});_0x6b6cx2[_0xb59f[2873]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){return null==this[_0xb59f[2882]]||this[_0xb59f[2908]]()?mxCellMarker[_0xb59f[202]][_0xb59f[2873]][_0xb59f[183]](_0x6b6cx2,arguments):null});_0x6b6cx2[_0xb59f[1825]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3,_0x6b6cx4){return null!=this[_0xb59f[2882]]||this[_0xb59f[2908]]()?!0:mxCellMarker[_0xb59f[202]][_0xb59f[1825]][_0xb59f[183]](_0x6b6cx2,arguments)});return _0x6b6cx2};mxConnectionHandler[_0xb59f[202]][_0xb59f[861]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[257]]=_0x6b6cx2;this[_0xb59f[2823]]= new mxPoint(_0x6b6cx3,_0x6b6cx4);this[_0xb59f[2897]]=null!=_0x6b6cx5?_0x6b6cx5:this[_0xb59f[2910]](null);this[_0xb59f[2885]][_0xb59f[2860]]=this[_0xb59f[2885]][_0xb59f[2853]];this[_0xb59f[2885]][_0xb59f[2862]]=_0x6b6cx2;this[_0xb59f[2885]][_0xb59f[811]]();this[_0xb59f[746]]( new mxEventObject(mxEvent.START,_0xb59f[724],this[_0xb59f[257]]))};mxConnectionHandler[_0xb59f[202]][_0xb59f[2908]]=function(){return null!=this[_0xb59f[2823]]&&null!=this[_0xb59f[253]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[2671]]=function(_0x6b6cx2){return this[_0xb59f[1179]][_0xb59f[2671]](_0x6b6cx2)};mxConnectionHandler[_0xb59f[202]][_0xb59f[2672]]=function(_0x6b6cx2){return !0};mxConnectionHandler[_0xb59f[202]][_0xb59f[2909]]=function(_0x6b6cx2,_0x6b6cx3){return !this[_0xb59f[2672]](_0x6b6cx3)?_0xb59f[110]:this[_0xb59f[1179]][_0xb59f[2500]](null,_0x6b6cx2,_0x6b6cx3)};mxConnectionHandler[_0xb59f[202]][_0xb59f[2911]]=function(_0x6b6cx2){return this[_0xb59f[2882]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[2912]]=function(_0x6b6cx2){return null!=_0x6b6cx2[_0xb59f[963]]&&_0x6b6cx2[_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==this[_0xb59f[1179]][_0xb59f[526]]?!0:this[_0xb59f[2880]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[2913]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[2911]](_0x6b6cx2);if(null!=_0x6b6cx3&&null!=_0x6b6cx2){this[_0xb59f[2903]]=_0x6b6cx2;var _0x6b6cx4=[],_0x6b6cx5= new mxRectangle(0,0,_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]]),_0x6b6cx9= new mxImageShape(_0x6b6cx5,_0x6b6cx3[_0xb59f[390]],null,null,0);_0x6b6cx9[_0xb59f[1674]]= !1;this[_0xb59f[2912]](_0x6b6cx2)?(_0x6b6cx9[_0xb59f[507]]=mxConstants[_0xb59f[1656]],_0x6b6cx9[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[526]])):(_0x6b6cx9[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]==mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[508]]:mxConstants[_0xb59f[1523]],_0x6b6cx9[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]()),this[_0xb59f[2881]]&&null!=_0x6b6cx9[_0xb59f[252]][_0xb59f[328]]&&_0x6b6cx9[_0xb59f[252]][_0xb59f[265]][_0xb59f[950]](_0x6b6cx9[_0xb59f[252]],_0x6b6cx9[_0xb59f[252]][_0xb59f[265]][_0xb59f[285]]));_0x6b6cx9[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[2914]];var _0x6b6cxa=mxUtils[_0xb59f[885]](this,function(){return null!=this[_0xb59f[2915]]?this[_0xb59f[2915]]:_0x6b6cx2}),_0x6b6cx3=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){mxEvent[_0xb59f[721]](_0x6b6cx2)||(this[_0xb59f[2916]]=_0x6b6cx9,this[_0xb59f[1179]][_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx2,_0x6b6cxa())))});mxEvent[_0xb59f[2733]](_0x6b6cx9[_0xb59f[252]],this[_0xb59f[1179]],_0x6b6cxa,_0x6b6cx3);_0x6b6cx4[_0xb59f[207]](_0x6b6cx9);this[_0xb59f[2905]](_0x6b6cx4,this[_0xb59f[2903]]);return _0x6b6cx4};return null};mxConnectionHandler[_0xb59f[202]][_0xb59f[2905]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=_0x6b6cx2&&null!=_0x6b6cx2[0]&&null!=_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[2917]](_0x6b6cx2[0],_0x6b6cx3);_0x6b6cx2[0][_0xb59f[1562]][_0xb59f[235]]=_0x6b6cx4[_0xb59f[235]];_0x6b6cx2[0][_0xb59f[1562]][_0xb59f[236]]=_0x6b6cx4[_0xb59f[236]];_0x6b6cx2[0][_0xb59f[258]]()}};mxConnectionHandler[_0xb59f[202]][_0xb59f[2917]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx5=_0x6b6cx3[_0xb59f[241]](),_0x6b6cx9=_0x6b6cx3[_0xb59f[242]]();if(this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx3[_0xb59f[246]])){var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[1731]](_0x6b6cx3[_0xb59f[246]]),_0x6b6cx5=0!=_0x6b6cxa[_0xb59f[117]]?_0x6b6cx3[_0xb59f[235]]+_0x6b6cxa[_0xb59f[117]]*_0x6b6cx4/2:_0x6b6cx5,_0x6b6cx9=0!=_0x6b6cxa[_0xb59f[119]]?_0x6b6cx3[_0xb59f[236]]+_0x6b6cxa[_0xb59f[119]]*_0x6b6cx4/2:_0x6b6cx9,_0x6b6cxa=mxUtils[_0xb59f[431]](mxUtils[_0xb59f[433]](_0x6b6cx3[_0xb59f[124]],mxConstants.STYLE_ROTATION)||0);if(0!=_0x6b6cxa){var _0x6b6cx4=Math[_0xb59f[426]](_0x6b6cxa),_0x6b6cxa=Math[_0xb59f[427]](_0x6b6cxa),_0x6b6cx12= new mxPoint(_0x6b6cx3[_0xb59f[241]](),_0x6b6cx3[_0xb59f[242]]()),_0x6b6cx9=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx5,_0x6b6cx9),_0x6b6cx4,_0x6b6cxa,_0x6b6cx12),_0x6b6cx5=_0x6b6cx9[_0xb59f[235]],_0x6b6cx9=_0x6b6cx9[_0xb59f[236]]}};return  new mxPoint(_0x6b6cx5-_0x6b6cx2[_0xb59f[1562]][_0xb59f[117]]/2,_0x6b6cx9-_0x6b6cx2[_0xb59f[1562]][_0xb59f[119]]/2)};mxConnectionHandler[_0xb59f[202]][_0xb59f[2906]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){this[_0xb59f[2903]]=null;for(var _0x6b6cx3=0;_0x6b6cx3<_0x6b6cx2[_0xb59f[67]];_0x6b6cx3++){_0x6b6cx2[_0x6b6cx3][_0xb59f[515]]()}}};mxConnectionHandler[_0xb59f[202]][_0xb59f[2918]]=function(_0x6b6cx2){return !this[_0xb59f[1179]][_0xb59f[2579]](_0x6b6cx2[_0xb59f[727]]())&&(null!=this[_0xb59f[2886]][_0xb59f[2919]]&&null!=this[_0xb59f[2886]][_0xb59f[2920]]||null!=this[_0xb59f[257]]&&null==this[_0xb59f[267]]&&(null==this[_0xb59f[2904]]||null!=this[_0xb59f[2904]]&&null!=this[_0xb59f[2916]]))};mxConnectionHandler[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2899]]++;if(this[_0xb59f[994]]()&&this[_0xb59f[1179]][_0xb59f[994]]()&&!_0x6b6cx3[_0xb59f[721]]()&&!this[_0xb59f[2908]]()&&this[_0xb59f[2918]](_0x6b6cx3)){null!=this[_0xb59f[2886]][_0xb59f[2920]]&&null!=this[_0xb59f[2886]][_0xb59f[2919]]&&null!=this[_0xb59f[2886]][_0xb59f[987]]?(this[_0xb59f[2921]]=this[_0xb59f[2886]][_0xb59f[2920]],this[_0xb59f[257]]=this[_0xb59f[2886]][_0xb59f[2919]],this[_0xb59f[2823]]=this[_0xb59f[2886]][_0xb59f[987]][_0xb59f[238]]()):this[_0xb59f[2823]]= new mxPoint(_0x6b6cx3[_0xb59f[734]](),_0x6b6cx3[_0xb59f[735]]());this[_0xb59f[2897]]=this[_0xb59f[2910]](_0x6b6cx3);this[_0xb59f[2899]]=1;this[_0xb59f[2887]]&&null==this[_0xb59f[253]]&&(this[_0xb59f[2922]]=null,this[_0xb59f[253]]=this[_0xb59f[2156]]());if(null==this[_0xb59f[257]]&&null!=this[_0xb59f[2897]]){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[2689]](_0x6b6cx3[_0xb59f[727]]());this[_0xb59f[2897]][_0xb59f[246]][_0xb59f[256]][_0xb59f[2007]](_0x6b6cx4,!0)};this[_0xb59f[746]]( new mxEventObject(mxEvent.START,_0xb59f[724],this[_0xb59f[257]]));_0x6b6cx3[_0xb59f[722]]()}else {if(mxClient[_0xb59f[754]]&&this[_0xb59f[2888]]&&!this[_0xb59f[2890]]&&this[_0xb59f[994]]()&&this[_0xb59f[1179]][_0xb59f[994]]()&&!this[_0xb59f[2908]]()){this[_0xb59f[2890]]= !0;this[_0xb59f[2893]]=_0x6b6cx3[_0xb59f[730]]();this[_0xb59f[2894]]=_0x6b6cx3[_0xb59f[732]]();var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](this[_0xb59f[2885]][_0xb59f[736]](_0x6b6cx3));this[_0xb59f[2923]]&&window[_0xb59f[2924]](this[_0xb59f[2923]]);this[_0xb59f[2923]]=window[_0xb59f[261]](mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[2891]]&&this[_0xb59f[2925]](_0x6b6cx3,_0x6b6cx5);this[_0xb59f[2891]]=this[_0xb59f[2890]]= !1}),this[_0xb59f[2889]]);this[_0xb59f[2891]]= !0}};this[_0xb59f[2926]]=this[_0xb59f[2916]];this[_0xb59f[2916]]=null};mxConnectionHandler[_0xb59f[202]][_0xb59f[2925]]=function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx3&&(this[_0xb59f[2885]][_0xb59f[2860]]=this[_0xb59f[2885]][_0xb59f[2853]],this[_0xb59f[2885]][_0xb59f[2862]]=_0x6b6cx3,this[_0xb59f[2885]][_0xb59f[811]](),this[_0xb59f[2823]]= new mxPoint(_0x6b6cx2[_0xb59f[734]](),_0x6b6cx2[_0xb59f[735]]()),this[_0xb59f[2897]]=this[_0xb59f[2910]](_0x6b6cx2),this[_0xb59f[257]]=_0x6b6cx3,this[_0xb59f[746]]( new mxEventObject(mxEvent.START,_0xb59f[724],this[_0xb59f[257]])))};mxConnectionHandler[_0xb59f[202]][_0xb59f[2927]]=function(_0x6b6cx2){return !this[_0xb59f[1179]][_0xb59f[1712]](_0x6b6cx2[_0xb59f[246]])};mxConnectionHandler[_0xb59f[202]][_0xb59f[2910]]=function(_0x6b6cx2){return null};mxConnectionHandler[_0xb59f[202]][_0xb59f[2928]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[2885]][_0xb59f[2871]](_0x6b6cx2);this[_0xb59f[2886]][_0xb59f[2729]](_0x6b6cx2,null==this[_0xb59f[2823]]);this[_0xb59f[2915]]=_0x6b6cx3};mxConnectionHandler[_0xb59f[202]][_0xb59f[2929]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[518]](),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[512]]();_0x6b6cx2[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[235]];_0x6b6cx2[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]]/_0x6b6cx3-_0x6b6cx4[_0xb59f[236]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2891]]&&(this[_0xb59f[2891]]=Math[_0xb59f[425]](this[_0xb59f[2893]]-_0x6b6cx3[_0xb59f[730]]())<this[_0xb59f[2892]]&&Math[_0xb59f[425]](this[_0xb59f[2894]]-_0x6b6cx3[_0xb59f[732]]())<this[_0xb59f[2892]]);if(!_0x6b6cx3[_0xb59f[721]]()&&(this[_0xb59f[2895]]||null!=this[_0xb59f[2823]]||!this[_0xb59f[1179]][_0xb59f[1009]])){!this[_0xb59f[994]]()&&null!=this[_0xb59f[2915]]&&(this[_0xb59f[2906]](this[_0xb59f[2904]]),this[_0xb59f[2915]]=null);(null!=this[_0xb59f[2823]]||this[_0xb59f[994]]()&&this[_0xb59f[1179]][_0xb59f[994]]())&&this[_0xb59f[2928]](_0x6b6cx3);if(null!=this[_0xb59f[2823]]){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx4= new mxPoint(this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx3[_0xb59f[734]]()/_0x6b6cx4)*_0x6b6cx4,this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx3[_0xb59f[735]]()/_0x6b6cx4)*_0x6b6cx4),_0x6b6cx5=null,_0x6b6cx9=_0x6b6cx4;null!=this[_0xb59f[2886]][_0xb59f[2920]]&&(null!=this[_0xb59f[2886]][_0xb59f[2919]]&&null!=this[_0xb59f[2886]][_0xb59f[987]])&&(_0x6b6cx5=this[_0xb59f[2886]][_0xb59f[2920]],_0x6b6cx9=this[_0xb59f[2886]][_0xb59f[987]][_0xb59f[238]]());var _0x6b6cxa=this[_0xb59f[2823]];if(null!=this[_0xb59f[2926]]){var _0x6b6cx12=this[_0xb59f[2926]][_0xb59f[1562]][_0xb59f[117]],_0x6b6cx13=this[_0xb59f[2926]][_0xb59f[1562]][_0xb59f[119]];null!=this[_0xb59f[2915]]&&this[_0xb59f[2883]]?(_0x6b6cx12=this[_0xb59f[2917]](this[_0xb59f[2926]],this[_0xb59f[2915]]),this[_0xb59f[2926]][_0xb59f[1562]][_0xb59f[235]]=_0x6b6cx12[_0xb59f[235]],this[_0xb59f[2926]][_0xb59f[1562]][_0xb59f[236]]=_0x6b6cx12[_0xb59f[236]]):(_0x6b6cx12= new mxRectangle(_0x6b6cx3[_0xb59f[734]]()+this[_0xb59f[2896]][_0xb59f[235]],_0x6b6cx3[_0xb59f[735]]()+this[_0xb59f[2896]][_0xb59f[236]],_0x6b6cx12,_0x6b6cx13),this[_0xb59f[2926]][_0xb59f[1562]]=_0x6b6cx12);this[_0xb59f[2926]][_0xb59f[258]]()};if(null!=this[_0xb59f[2897]]){this[_0xb59f[2897]][_0xb59f[439]]=[null,null!=this[_0xb59f[2915]]?null:_0x6b6cx9];this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2289]](this[_0xb59f[2897]],this[_0xb59f[257]],!0,this[_0xb59f[2921]]);null!=this[_0xb59f[2915]]&&(null==_0x6b6cx5&&(_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[2288]](this[_0xb59f[2897]],this[_0xb59f[257]],!1)),this[_0xb59f[2897]][_0xb59f[2088]](null,!1),this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2289]](this[_0xb59f[2897]],this[_0xb59f[2915]],!1,_0x6b6cx5));_0x6b6cxa=null;if(null!=this[_0xb59f[2922]]){_0x6b6cxa=[];for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[2922]][_0xb59f[67]];_0x6b6cx9++){_0x6b6cx5=this[_0xb59f[2922]][_0x6b6cx9][_0xb59f[238]](),this[_0xb59f[2929]](_0x6b6cx5),_0x6b6cxa[_0x6b6cx9]=_0x6b6cx5}};this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2282]](this[_0xb59f[2897]],_0x6b6cxa,this[_0xb59f[257]],this[_0xb59f[2915]]);this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2283]](this[_0xb59f[2897]],this[_0xb59f[257]],this[_0xb59f[2915]]);_0x6b6cx9=this[_0xb59f[2897]][_0xb59f[439]][this[_0xb59f[2897]][_0xb59f[439]][_0xb59f[67]]-1];_0x6b6cxa=this[_0xb59f[2897]][_0xb59f[439]][0]}else {null!=this[_0xb59f[2915]]&&null==this[_0xb59f[2886]][_0xb59f[2920]]&&(_0x6b6cx12=this[_0xb59f[2930]](this[_0xb59f[2915]],_0x6b6cx3),null!=_0x6b6cx12&&(_0x6b6cx9=_0x6b6cx12)),null==this[_0xb59f[2921]]&&null!=this[_0xb59f[257]]&&(_0x6b6cx12=this[_0xb59f[2931]](this[_0xb59f[257]],null!=this[_0xb59f[2922]]&&0<this[_0xb59f[2922]][_0xb59f[67]]?this[_0xb59f[2922]][0]:_0x6b6cx9,_0x6b6cx3),null!=_0x6b6cx12&&(_0x6b6cxa=_0x6b6cx12))};if(null==this[_0xb59f[2915]]&&this[_0xb59f[2900]]){_0x6b6cx12=_0x6b6cxa;null!=this[_0xb59f[2897]]&&2<this[_0xb59f[2897]][_0xb59f[439]][_0xb59f[67]]&&(_0x6b6cx5=this[_0xb59f[2897]][_0xb59f[439]][this[_0xb59f[2897]][_0xb59f[439]][_0xb59f[67]]-2],null!=_0x6b6cx5&&(_0x6b6cx12=_0x6b6cx5));_0x6b6cx5=_0x6b6cx9[_0xb59f[235]]-_0x6b6cx12[_0xb59f[235]];_0x6b6cx12=_0x6b6cx9[_0xb59f[236]]-_0x6b6cx12[_0xb59f[236]];_0x6b6cx13=Math[_0xb59f[428]](_0x6b6cx5*_0x6b6cx5+_0x6b6cx12*_0x6b6cx12);if(0==_0x6b6cx13){return};_0x6b6cx9[_0xb59f[235]]-=4*_0x6b6cx5/_0x6b6cx13;_0x6b6cx9[_0xb59f[236]]-=4*_0x6b6cx12/_0x6b6cx13};if(null==this[_0xb59f[253]]&&(_0x6b6cx5=Math[_0xb59f[425]](_0x6b6cx4[_0xb59f[235]]-this[_0xb59f[2823]][_0xb59f[235]]),_0x6b6cx12=Math[_0xb59f[425]](_0x6b6cx4[_0xb59f[236]]-this[_0xb59f[2823]][_0xb59f[236]]),_0x6b6cx5>this[_0xb59f[1179]][_0xb59f[2353]]||_0x6b6cx12>this[_0xb59f[1179]][_0xb59f[2353]])){this[_0xb59f[253]]=this[_0xb59f[2156]](),this[_0xb59f[2928]](_0x6b6cx3)};null!=this[_0xb59f[253]]&&(null!=this[_0xb59f[2897]]?this[_0xb59f[253]][_0xb59f[1525]]=this[_0xb59f[2897]][_0xb59f[439]]:(_0x6b6cx4=[_0x6b6cxa],null!=this[_0xb59f[2922]]&&(_0x6b6cx4=_0x6b6cx4[_0xb59f[1919]](this[_0xb59f[2922]])),_0x6b6cx4[_0xb59f[207]](_0x6b6cx9),this[_0xb59f[253]][_0xb59f[1525]]=_0x6b6cx4),this[_0xb59f[2932]]());mxEvent[_0xb59f[722]](_0x6b6cx3[_0xb59f[727]]());_0x6b6cx3[_0xb59f[722]]()}else {!this[_0xb59f[994]]()||!this[_0xb59f[1179]][_0xb59f[994]]()?this[_0xb59f[2886]][_0xb59f[862]]():this[_0xb59f[257]]!=this[_0xb59f[2915]]&&null==this[_0xb59f[2897]]?(this[_0xb59f[2906]](this[_0xb59f[2904]]),this[_0xb59f[2904]]=null,null!=this[_0xb59f[2915]]&&null==this[_0xb59f[267]]&&(this[_0xb59f[2904]]=this[_0xb59f[2913]](this[_0xb59f[2915]]),null==this[_0xb59f[2904]]&&(this[_0xb59f[2915]][_0xb59f[1609]](mxConstants.CURSOR_CONNECT),_0x6b6cx3[_0xb59f[722]]())),this[_0xb59f[257]]=this[_0xb59f[2915]]):this[_0xb59f[257]]==this[_0xb59f[2915]]&&(null!=this[_0xb59f[2915]]&&null==this[_0xb59f[2904]]&&!this[_0xb59f[1179]][_0xb59f[1009]])&&_0x6b6cx3[_0xb59f[722]]()};null!=this[_0xb59f[2886]][_0xb59f[2920]]&&this[_0xb59f[2885]][_0xb59f[862]]();if(!this[_0xb59f[1179]][_0xb59f[1009]]&&null!=this[_0xb59f[2915]]&&null!=this[_0xb59f[2904]]){_0x6b6cx4= !1;_0x6b6cxa=_0x6b6cx3[_0xb59f[728]]();for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[2904]][_0xb59f[67]]&& !_0x6b6cx4;_0x6b6cx9++){_0x6b6cx4=_0x6b6cxa==this[_0xb59f[2904]][_0x6b6cx9][_0xb59f[252]]||_0x6b6cxa[_0xb59f[265]]==this[_0xb59f[2904]][_0x6b6cx9][_0xb59f[252]]};_0x6b6cx4||this[_0xb59f[2933]](this[_0xb59f[2915]],this[_0xb59f[2904]],_0x6b6cx3)}}else {this[_0xb59f[2886]][_0xb59f[862]]()}};mxConnectionHandler[_0xb59f[202]][_0xb59f[2930]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null,_0x6b6cx5=_0x6b6cx2[_0xb59f[441]],_0x6b6cx9=_0x6b6cx5[_0xb59f[2305]](_0x6b6cx2);if(null!=_0x6b6cx9){var _0x6b6cxa=null!=this[_0xb59f[2922]]&&0<this[_0xb59f[2922]][_0xb59f[67]]?this[_0xb59f[2922]][this[_0xb59f[2922]][_0xb59f[67]]-1]: new mxPoint(this[_0xb59f[257]][_0xb59f[241]](),this[_0xb59f[257]][_0xb59f[242]]()),_0x6b6cx5=_0x6b6cx9(_0x6b6cx5[_0xb59f[2087]](_0x6b6cx2),this[_0xb59f[2897]],_0x6b6cxa,!1);null!=_0x6b6cx5&&(_0x6b6cx4=_0x6b6cx5)}else {_0x6b6cx4= new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]())};return _0x6b6cx4};mxConnectionHandler[_0xb59f[202]][_0xb59f[2931]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx4=null;var _0x6b6cx5=_0x6b6cx2[_0xb59f[441]],_0x6b6cx9=_0x6b6cx5[_0xb59f[2305]](_0x6b6cx2),_0x6b6cxa= new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]());if(null!=_0x6b6cx9){var _0x6b6cx12=mxUtils[_0xb59f[433]](_0x6b6cx2[_0xb59f[124]],mxConstants.STYLE_ROTATION,0),_0x6b6cx13=-_0x6b6cx12*(Math[_0xb59f[424]]/180);0!=_0x6b6cx12&&(_0x6b6cx3=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx3[_0xb59f[235]],_0x6b6cx3[_0xb59f[236]]),Math[_0xb59f[426]](_0x6b6cx13),Math[_0xb59f[427]](_0x6b6cx13),_0x6b6cxa));_0x6b6cx2=_0x6b6cx9(_0x6b6cx5[_0xb59f[2087]](_0x6b6cx2),_0x6b6cx2,_0x6b6cx3,!1);null!=_0x6b6cx2&&(0!=_0x6b6cx12&&(_0x6b6cx2=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]),Math[_0xb59f[426]](-_0x6b6cx13),Math[_0xb59f[427]](-_0x6b6cx13),_0x6b6cxa)),_0x6b6cx4=_0x6b6cx2)}else {_0x6b6cx4=_0x6b6cxa};return _0x6b6cx4};mxConnectionHandler[_0xb59f[202]][_0xb59f[2933]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){};mxConnectionHandler[_0xb59f[202]][_0xb59f[2934]]=function(_0x6b6cx2){return null!=_0x6b6cx2[_0xb59f[248]]()};mxConnectionHandler[_0xb59f[202]][_0xb59f[2935]]=function(_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],_0x6b6cx2[_0xb59f[730]](),_0x6b6cx2[_0xb59f[732]]()),_0x6b6cx4=Math[_0xb59f[425]](_0x6b6cx3[_0xb59f[235]]-this[_0xb59f[2823]][_0xb59f[235]]),_0x6b6cx3=Math[_0xb59f[425]](_0x6b6cx3[_0xb59f[236]]-this[_0xb59f[2823]][_0xb59f[236]]);if(null!=this[_0xb59f[2922]]||1<this[_0xb59f[2899]]&&(_0x6b6cx4>this[_0xb59f[1179]][_0xb59f[2353]]||_0x6b6cx3>this[_0xb59f[1179]][_0xb59f[2353]])){null==this[_0xb59f[2922]]&&(this[_0xb59f[2922]]=[]),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx3= new mxPoint(this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[734]]()/_0x6b6cx4)*_0x6b6cx4,this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[735]]()/_0x6b6cx4)*_0x6b6cx4),this[_0xb59f[2922]][_0xb59f[207]](_0x6b6cx3)}};mxConnectionHandler[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&this[_0xb59f[2908]]()){if(this[_0xb59f[2887]]&&!this[_0xb59f[2934]](_0x6b6cx3)){this[_0xb59f[2935]](_0x6b6cx3);_0x6b6cx3[_0xb59f[722]]();return};if(null==this[_0xb59f[267]]){var _0x6b6cx4=null!=this[_0xb59f[257]]?this[_0xb59f[257]][_0xb59f[246]]:null,_0x6b6cx5=null;null!=this[_0xb59f[2886]][_0xb59f[2920]]&&null!=this[_0xb59f[2886]][_0xb59f[2919]]&&(_0x6b6cx5=this[_0xb59f[2886]][_0xb59f[2919]][_0xb59f[246]]);null==_0x6b6cx5&&this[_0xb59f[2885]][_0xb59f[2867]]()&&(_0x6b6cx5=this[_0xb59f[2885]][_0xb59f[2861]][_0xb59f[246]]);this[_0xb59f[807]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx3[_0xb59f[727]](),_0x6b6cx3[_0xb59f[736]]())}else {null!=this[_0xb59f[257]]&&(null!=this[_0xb59f[2885]][_0xb59f[2861]]&&this[_0xb59f[257]][_0xb59f[246]]==this[_0xb59f[2885]][_0xb59f[2861]][_0xb59f[246]])&&this[_0xb59f[1179]][_0xb59f[2459]](this[_0xb59f[2885]][_0xb59f[1097]],evt),0<this[_0xb59f[267]][_0xb59f[67]]&&this[_0xb59f[1179]][_0xb59f[2580]](this[_0xb59f[267]])};this[_0xb59f[2906]](this[_0xb59f[2904]]);_0x6b6cx3[_0xb59f[722]]()};null!=this[_0xb59f[2823]]&&this[_0xb59f[862]]();this[_0xb59f[2891]]=this[_0xb59f[2890]]= !1};mxConnectionHandler[_0xb59f[202]][_0xb59f[862]]=function(){null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[515]](),this[_0xb59f[253]]=null);this[_0xb59f[2906]](this[_0xb59f[2904]]);this[_0xb59f[2904]]=null;this[_0xb59f[2885]][_0xb59f[862]]();this[_0xb59f[2886]][_0xb59f[862]]();this[_0xb59f[2921]]=this[_0xb59f[267]]=this[_0xb59f[257]]=this[_0xb59f[2897]]=this[_0xb59f[2926]]=null;this[_0xb59f[2899]]=0;this[_0xb59f[2916]]=this[_0xb59f[2823]]=null;this[_0xb59f[746]]( new mxEventObject(mxEvent.RESET))};mxConnectionHandler[_0xb59f[202]][_0xb59f[2932]]=function(){var _0x6b6cx2=null==this[_0xb59f[267]];this[_0xb59f[253]][_0xb59f[1307]]=this[_0xb59f[2936]](_0x6b6cx2);_0x6b6cx2=this[_0xb59f[2937]](_0x6b6cx2);this[_0xb59f[253]][_0xb59f[1336]]=_0x6b6cx2;this[_0xb59f[253]][_0xb59f[258]]()};mxConnectionHandler[_0xb59f[202]][_0xb59f[2937]]=function(_0x6b6cx2){return _0x6b6cx2?mxConstants[_0xb59f[2829]]:mxConstants[_0xb59f[2938]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[2936]]=function(_0x6b6cx2){return _0x6b6cx2?3:1};mxConnectionHandler[_0xb59f[202]][_0xb59f[807]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx3||this[_0xb59f[2901]]()||this[_0xb59f[1179]][_0xb59f[2406]]){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cxa=null;_0x6b6cx9[_0xb59f[473]]();try{if(null!=_0x6b6cx2&&(null==_0x6b6cx3&&this[_0xb59f[2901]]())&&(_0x6b6cx3=this[_0xb59f[2939]](_0x6b6cx4,_0x6b6cx2),null!=_0x6b6cx3)){_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[564]]([_0x6b6cx3],_0x6b6cx4,_0x6b6cx5);if(null==_0x6b6cx5||!this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[250]](_0x6b6cx5)){var _0x6b6cx12=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx5);if(null!=_0x6b6cx12){var _0x6b6cx13=_0x6b6cx9[_0xb59f[1721]](_0x6b6cx3);_0x6b6cx13[_0xb59f[235]]-=_0x6b6cx12[_0xb59f[2078]][_0xb59f[235]];_0x6b6cx13[_0xb59f[236]]-=_0x6b6cx12[_0xb59f[2078]][_0xb59f[236]]}}else {_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[902]]()};this[_0xb59f[1179]][_0xb59f[2103]](_0x6b6cx3,_0x6b6cx5)};var _0x6b6cx14=this[_0xb59f[1179]][_0xb59f[902]]();null!=_0x6b6cx2&&(null!=_0x6b6cx3&&_0x6b6cx9[_0xb59f[1197]](_0x6b6cx2)==_0x6b6cx9[_0xb59f[1197]](_0x6b6cx3)&&_0x6b6cx9[_0xb59f[1197]](_0x6b6cx9[_0xb59f[1197]](_0x6b6cx2))!=_0x6b6cx9[_0xb59f[501]]())&&(_0x6b6cx14=_0x6b6cx9[_0xb59f[1197]](_0x6b6cx2),null!=_0x6b6cx2[_0xb59f[256]]&&_0x6b6cx2[_0xb59f[256]][_0xb59f[1500]]&&(null!=_0x6b6cx3[_0xb59f[256]]&&_0x6b6cx3[_0xb59f[256]][_0xb59f[1500]])&&(_0x6b6cx14=_0x6b6cx9[_0xb59f[1197]](_0x6b6cx14)));_0x6b6cx13=_0x6b6cx12=null;null!=this[_0xb59f[2897]]&&(_0x6b6cx12=this[_0xb59f[2897]][_0xb59f[246]][_0xb59f[131]],_0x6b6cx13=this[_0xb59f[2897]][_0xb59f[246]][_0xb59f[124]]);_0x6b6cxa=this[_0xb59f[1960]](_0x6b6cx14,null,_0x6b6cx12,_0x6b6cx2,_0x6b6cx3,_0x6b6cx13);if(null!=_0x6b6cxa){this[_0xb59f[1179]][_0xb59f[2545]](_0x6b6cxa,_0x6b6cx2,!0,this[_0xb59f[2921]]);this[_0xb59f[1179]][_0xb59f[2545]](_0x6b6cxa,_0x6b6cx3,!1,this[_0xb59f[2886]][_0xb59f[2920]]);null!=this[_0xb59f[2897]]&&_0x6b6cx9[_0xb59f[1724]](_0x6b6cxa,this[_0xb59f[2897]][_0xb59f[246]][_0xb59f[256]]);var _0x6b6cx15=_0x6b6cx9[_0xb59f[1721]](_0x6b6cxa);null==_0x6b6cx15&&(_0x6b6cx15= new mxGeometry,_0x6b6cx15[_0xb59f[1500]]= !0,_0x6b6cx9[_0xb59f[1724]](_0x6b6cxa,_0x6b6cx15));if(null!=this[_0xb59f[2922]]&&0<this[_0xb59f[2922]][_0xb59f[67]]){var _0x6b6cx16=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx17=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[513]];_0x6b6cx15[_0xb59f[1525]]=[];for(_0x6b6cx2=0;_0x6b6cx2<this[_0xb59f[2922]][_0xb59f[67]];_0x6b6cx2++){var _0x6b6cx18=this[_0xb59f[2922]][_0x6b6cx2];_0x6b6cx15[_0xb59f[1525]][_0xb59f[207]]( new mxPoint(_0x6b6cx18[_0xb59f[235]]/_0x6b6cx16-_0x6b6cx17[_0xb59f[235]],_0x6b6cx18[_0xb59f[236]]/_0x6b6cx16-_0x6b6cx17[_0xb59f[236]]))}};null==_0x6b6cx3&&(_0x6b6cx18=this[_0xb59f[1179]][_0xb59f[2689]](_0x6b6cx4,!1),_0x6b6cx18[_0xb59f[235]]-=this[_0xb59f[1179]][_0xb59f[1136]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx18[_0xb59f[236]]-=this[_0xb59f[1179]][_0xb59f[1137]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx15[_0xb59f[2007]](_0x6b6cx18,!1));this[_0xb59f[746]]( new mxEventObject(mxEvent.CONNECT,_0xb59f[246],_0x6b6cxa,_0xb59f[763],_0x6b6cx4,_0xb59f[772],_0x6b6cx5))}}catch(q){mxLog[_0xb59f[539]](),mxLog[_0xb59f[143]](q[_0xb59f[281]])}finally{_0x6b6cx9[_0xb59f[476]]()};this[_0xb59f[804]]&&this[_0xb59f[2707]](_0x6b6cxa,_0x6b6cx3)}};mxConnectionHandler[_0xb59f[202]][_0xb59f[2707]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1179]][_0xb59f[2450]](_0x6b6cx2)};mxConnectionHandler[_0xb59f[202]][_0xb59f[1960]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){if(null==this[_0xb59f[1033]]){return this[_0xb59f[1179]][_0xb59f[1960]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa)};_0x6b6cx3=this[_0xb59f[2503]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa);return _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[2504]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx5,_0x6b6cx9)};mxConnectionHandler[_0xb59f[202]][_0xb59f[2939]]=function(_0x6b6cx2,_0x6b6cx3){for(var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx3);null!=_0x6b6cx4&&_0x6b6cx4[_0xb59f[1500]];){_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx3),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx3)};var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[899]]([_0x6b6cx3])[0],_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1721]](_0x6b6cx5);if(null!=_0x6b6cx4){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[2689]](_0x6b6cx2);_0x6b6cx4[_0xb59f[235]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx9[_0xb59f[235]]-_0x6b6cx4[_0xb59f[117]]/2)-this[_0xb59f[1179]][_0xb59f[1136]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]];_0x6b6cx4[_0xb59f[236]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx9[_0xb59f[236]]-_0x6b6cx4[_0xb59f[119]]/2)-this[_0xb59f[1179]][_0xb59f[1137]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]];if(null!=this[_0xb59f[2823]]){var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx3);if(null!=_0x6b6cxa){var _0x6b6cx12=this[_0xb59f[2940]]();Math[_0xb59f[425]](this[_0xb59f[1179]][_0xb59f[1021]](this[_0xb59f[2823]][_0xb59f[235]])-this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx9[_0xb59f[235]]))<=_0x6b6cx12?_0x6b6cx4[_0xb59f[235]]=_0x6b6cxa[_0xb59f[235]]:Math[_0xb59f[425]](this[_0xb59f[1179]][_0xb59f[1021]](this[_0xb59f[2823]][_0xb59f[236]])-this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx9[_0xb59f[236]]))<=_0x6b6cx12&&(_0x6b6cx4[_0xb59f[236]]=_0x6b6cxa[_0xb59f[236]])}}};return _0x6b6cx5};mxConnectionHandler[_0xb59f[202]][_0xb59f[2940]]=function(){return this[_0xb59f[1179]][_0xb59f[997]]()?this[_0xb59f[1179]][_0xb59f[1020]]:this[_0xb59f[1179]][_0xb59f[2353]]};mxConnectionHandler[_0xb59f[202]][_0xb59f[2503]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=null;null!=this[_0xb59f[1033]]&&(_0x6b6cx9=this[_0xb59f[1033]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5));null==_0x6b6cx9&&(_0x6b6cx9= new mxCell(_0x6b6cx2||_0xb59f[110]),_0x6b6cx9[_0xb59f[1994]](!0),_0x6b6cx9[_0xb59f[475]](_0x6b6cx5),_0x6b6cx2= new mxGeometry,_0x6b6cx2[_0xb59f[1500]]= !0,_0x6b6cx9[_0xb59f[1724]](_0x6b6cx2));return _0x6b6cx9};mxConnectionHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1179]][_0xb59f[1148]](this);null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[515]](),this[_0xb59f[253]]=null);null!=this[_0xb59f[2885]]&&(this[_0xb59f[2885]][_0xb59f[515]](),this[_0xb59f[2885]]=null);null!=this[_0xb59f[2886]]&&(this[_0xb59f[2886]][_0xb59f[515]](),this[_0xb59f[2886]]=null);null!=this[_0xb59f[1176]]&&(this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[745]](this[_0xb59f[1176]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[745]](this[_0xb59f[1176]]),this[_0xb59f[1176]]=null);null!=this[_0xb59f[2898]]&&(this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2898]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[745]](this[_0xb59f[2898]]),this[_0xb59f[2898]]=null)};function mxConstraintHandler(_0x6b6cx2){this[_0xb59f[1179]]=_0x6b6cx2}mxConstraintHandler[_0xb59f[202]][_0xb59f[2941]]= new mxImage(mxClient[_0xb59f[88]]+_0xb59f[2942],5,5);mxConstraintHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxConstraintHandler[_0xb59f[202]][_0xb59f[984]]= !0;mxConstraintHandler[_0xb59f[202]][_0xb59f[2943]]=mxConstants[_0xb59f[2854]];mxConstraintHandler[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxConstraintHandler[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxConstraintHandler[_0xb59f[202]][_0xb59f[862]]=function(){if(null!=this[_0xb59f[2944]]){for(var _0x6b6cx2=0;_0x6b6cx2<this[_0xb59f[2944]][_0xb59f[67]];_0x6b6cx2++){this[_0xb59f[2944]][_0x6b6cx2][_0xb59f[515]]()};this[_0xb59f[2944]]=null};null!=this[_0xb59f[2945]]&&(this[_0xb59f[2945]][_0xb59f[515]](),this[_0xb59f[2945]]=null);this[_0xb59f[2946]]=this[_0xb59f[2919]]=this[_0xb59f[987]]=this[_0xb59f[2947]]=this[_0xb59f[2920]]=null};mxConstraintHandler[_0xb59f[202]][_0xb59f[2636]]=function(){return this[_0xb59f[1179]][_0xb59f[2636]]()};mxConstraintHandler[_0xb59f[202]][_0xb59f[2948]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return this[_0xb59f[2941]]};mxConstraintHandler[_0xb59f[202]][_0xb59f[2949]]=function(_0x6b6cx2,_0x6b6cx3){return !1};mxConstraintHandler[_0xb59f[202]][_0xb59f[2729]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[994]]()&&!this[_0xb59f[2949]](_0x6b6cx2)){var _0x6b6cx4=this[_0xb59f[2636]](),_0x6b6cx5= new mxRectangle(_0x6b6cx2[_0xb59f[734]]()-_0x6b6cx4,_0x6b6cx2[_0xb59f[735]]()-_0x6b6cx4,2*_0x6b6cx4,2*_0x6b6cx4),_0x6b6cx9=null!=_0x6b6cx2[_0xb59f[736]]()?this[_0xb59f[1179]][_0xb59f[2565]](_0x6b6cx2[_0xb59f[736]]()):!1;if(null==this[_0xb59f[2947]]||!mxUtils[_0xb59f[1825]](this[_0xb59f[2947]],_0x6b6cx5)||null!=_0x6b6cx2[_0xb59f[248]]()&&null!=this[_0xb59f[2919]]&&_0x6b6cx9){if(this[_0xb59f[2947]]=null,_0x6b6cx2[_0xb59f[248]]()!=this[_0xb59f[2919]]){if(this[_0xb59f[2919]]=null,this[_0xb59f[1531]]=null!=_0x6b6cx2[_0xb59f[248]]()&&_0x6b6cx9?this[_0xb59f[1179]][_0xb59f[2538]](_0x6b6cx2[_0xb59f[248]](),_0x6b6cx3):null,null!=this[_0xb59f[1531]]){this[_0xb59f[2919]]=_0x6b6cx2[_0xb59f[248]]();this[_0xb59f[2947]]= new mxRectangle(_0x6b6cx2[_0xb59f[248]]()[_0xb59f[235]],_0x6b6cx2[_0xb59f[248]]()[_0xb59f[236]],_0x6b6cx2[_0xb59f[248]]()[_0xb59f[117]],_0x6b6cx2[_0xb59f[248]]()[_0xb59f[119]]);if(null!=this[_0xb59f[2944]]){for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[2944]][_0xb59f[67]];_0x6b6cx9++){this[_0xb59f[2944]][_0x6b6cx9][_0xb59f[515]]()};this[_0xb59f[2946]]=this[_0xb59f[2944]]=null};this[_0xb59f[2944]]=[];this[_0xb59f[2946]]=[];for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[1531]][_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[2290]](_0x6b6cx2[_0xb59f[248]](),this[_0xb59f[1531]][_0x6b6cx9]),_0x6b6cx12=this[_0xb59f[2948]](_0x6b6cx2[_0xb59f[248]](),this[_0xb59f[1531]][_0x6b6cx9],_0x6b6cxa),_0x6b6cx13=_0x6b6cx12[_0xb59f[390]],_0x6b6cx12= new mxRectangle(_0x6b6cxa[_0xb59f[235]]-_0x6b6cx12[_0xb59f[117]]/2,_0x6b6cxa[_0xb59f[236]]-_0x6b6cx12[_0xb59f[119]]/2,_0x6b6cx12[_0xb59f[117]],_0x6b6cx12[_0xb59f[119]]),_0x6b6cx12= new mxImageShape(_0x6b6cx12,_0x6b6cx13);_0x6b6cx12[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[2334]]:mxConstants[_0xb59f[508]];_0x6b6cx12[_0xb59f[1674]]= !1;_0x6b6cx12[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]());null!=_0x6b6cx12[_0xb59f[252]][_0xb59f[328]]&&_0x6b6cx12[_0xb59f[252]][_0xb59f[265]][_0xb59f[950]](_0x6b6cx12[_0xb59f[252]],_0x6b6cx12[_0xb59f[252]][_0xb59f[265]][_0xb59f[285]]);_0x6b6cx13=mxUtils[_0xb59f[885]](this,function(){return null!=this[_0xb59f[2919]]?this[_0xb59f[2919]]:_0x6b6cx2[_0xb59f[248]]()});_0x6b6cx12[_0xb59f[258]]();mxEvent[_0xb59f[2733]](_0x6b6cx12[_0xb59f[252]],this[_0xb59f[1179]],_0x6b6cx13);this[_0xb59f[2947]][_0xb59f[99]](_0x6b6cx12[_0xb59f[1562]]);this[_0xb59f[2944]][_0xb59f[207]](_0x6b6cx12);this[_0xb59f[2946]][_0xb59f[207]](_0x6b6cxa)};this[_0xb59f[2947]][_0xb59f[244]](_0x6b6cx4)}else {if(null!=this[_0xb59f[2944]]){null!=this[_0xb59f[2945]]&&(this[_0xb59f[2945]][_0xb59f[515]](),this[_0xb59f[2945]]=null);for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[2944]][_0xb59f[67]];_0x6b6cx9++){this[_0xb59f[2944]][_0x6b6cx9][_0xb59f[515]]()};this[_0xb59f[2946]]=this[_0xb59f[2944]]=null}}}};this[_0xb59f[987]]=this[_0xb59f[2920]]=null;if(null!=this[_0xb59f[2944]]&&null!=this[_0xb59f[1531]]&&(null==_0x6b6cx2[_0xb59f[248]]()||this[_0xb59f[2919]]==_0x6b6cx2[_0xb59f[248]]())){for(_0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[2944]][_0xb59f[67]];_0x6b6cx9++){if(mxUtils[_0xb59f[1825]](this[_0xb59f[2944]][_0x6b6cx9][_0xb59f[1562]],_0x6b6cx5)){this[_0xb59f[2920]]=this[_0xb59f[1531]][_0x6b6cx9];this[_0xb59f[987]]=this[_0xb59f[2946]][_0x6b6cx9];_0x6b6cx4=this[_0xb59f[2944]][_0x6b6cx9][_0xb59f[1562]][_0xb59f[238]]();_0x6b6cx4[_0xb59f[244]](mxClient[_0xb59f[80]]?3:2);mxClient[_0xb59f[80]]&&(_0x6b6cx4[_0xb59f[117]]-=1,_0x6b6cx4[_0xb59f[119]]-=1);null==this[_0xb59f[2945]]?(_0x6b6cx4= new mxRectangleShape(_0x6b6cx4,null,this[_0xb59f[2943]],3),_0x6b6cx4[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]==mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[508]]:mxConstants[_0xb59f[1523]],_0x6b6cx4[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]()),this[_0xb59f[2945]]=_0x6b6cx4,_0x6b6cx13=mxUtils[_0xb59f[885]](this,function(){return null!=this[_0xb59f[2919]]?this[_0xb59f[2919]]:_0x6b6cx2[_0xb59f[248]]()}),mxEvent[_0xb59f[2733]](_0x6b6cx4[_0xb59f[252]],this[_0xb59f[1179]],_0x6b6cx13)):(this[_0xb59f[2945]][_0xb59f[1562]]=_0x6b6cx4,this[_0xb59f[2945]][_0xb59f[258]]());break}}};null==this[_0xb59f[2920]]&&null!=this[_0xb59f[2945]]&&(this[_0xb59f[2945]][_0xb59f[515]](),this[_0xb59f[2945]]=null)}};mxConstraintHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[862]]()};function mxRubberband(_0x6b6cx2){null!=_0x6b6cx2&&(this[_0xb59f[1179]]=_0x6b6cx2,this[_0xb59f[1179]][_0xb59f[1133]](this),this[_0xb59f[2730]]=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[2950]]()}),this[_0xb59f[1179]][_0xb59f[169]](mxEvent.PAN,this[_0xb59f[2730]]),mxClient[_0xb59f[80]]&&mxEvent[_0xb59f[169]](window,_0xb59f[2428],mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[515]]()})))}mxRubberband[_0xb59f[202]][_0xb59f[2951]]=20;mxRubberband[_0xb59f[202]][_0xb59f[984]]= !0;mxRubberband[_0xb59f[202]][_0xb59f[485]]=null;mxRubberband[_0xb59f[202]][_0xb59f[2952]]=null;mxRubberband[_0xb59f[202]][_0xb59f[2953]]=0;mxRubberband[_0xb59f[202]][_0xb59f[2954]]=0;mxRubberband[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxRubberband[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxRubberband[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&this[_0xb59f[994]]()&&this[_0xb59f[1179]][_0xb59f[994]]()&&(this[_0xb59f[1179]][_0xb59f[2579]](_0x6b6cx3[_0xb59f[727]]())||null==_0x6b6cx3[_0xb59f[248]]())){var _0x6b6cx4=mxUtils[_0xb59f[445]](this[_0xb59f[1179]][_0xb59f[526]]),_0x6b6cx5=mxUtils[_0xb59f[444]](this[_0xb59f[1179]][_0xb59f[526]]);_0x6b6cx5[_0xb59f[235]]-=_0x6b6cx4[_0xb59f[235]];_0x6b6cx5[_0xb59f[236]]-=_0x6b6cx4[_0xb59f[236]];this[_0xb59f[861]](_0x6b6cx3[_0xb59f[730]]()+_0x6b6cx5[_0xb59f[235]],_0x6b6cx3[_0xb59f[732]]()+_0x6b6cx5[_0xb59f[236]]);if(mxClient[_0xb59f[133]]&&!mxClient[_0xb59f[75]]&&!mxClient[_0xb59f[76]]){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[526]],_0x6b6cxa=function(_0x6b6cx2){_0x6b6cx2= new mxMouseEvent(_0x6b6cx2);var _0x6b6cx3=mxUtils[_0xb59f[2196]](_0x6b6cx9,_0x6b6cx2[_0xb59f[730]](),_0x6b6cx2[_0xb59f[732]]());_0x6b6cx2[_0xb59f[725]]=_0x6b6cx3[_0xb59f[235]];_0x6b6cx2[_0xb59f[726]]=_0x6b6cx3[_0xb59f[236]];return _0x6b6cx2};this[_0xb59f[2955]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[788]](this[_0xb59f[1179]],_0x6b6cxa(_0x6b6cx2))});this[_0xb59f[981]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[789]](this[_0xb59f[1179]],_0x6b6cxa(_0x6b6cx2))});mxEvent[_0xb59f[169]](document,_0xb59f[752],this[_0xb59f[2955]]);mxEvent[_0xb59f[169]](document,_0xb59f[753],this[_0xb59f[981]])};_0x6b6cx3[_0xb59f[722]](!1)}};mxRubberband[_0xb59f[202]][_0xb59f[861]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2823]]= new mxPoint(_0x6b6cx2,_0x6b6cx3)};mxRubberband[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&null!=this[_0xb59f[2823]]){var _0x6b6cx4=mxUtils[_0xb59f[444]](this[_0xb59f[1179]][_0xb59f[526]]),_0x6b6cx5=mxUtils[_0xb59f[445]](this[_0xb59f[1179]][_0xb59f[526]]);_0x6b6cx4[_0xb59f[235]]-=_0x6b6cx5[_0xb59f[235]];_0x6b6cx4[_0xb59f[236]]-=_0x6b6cx5[_0xb59f[236]];var _0x6b6cx5=_0x6b6cx3[_0xb59f[730]]()+_0x6b6cx4[_0xb59f[235]],_0x6b6cx4=_0x6b6cx3[_0xb59f[732]]()+_0x6b6cx4[_0xb59f[236]],_0x6b6cx9=this[_0xb59f[2823]][_0xb59f[235]]-_0x6b6cx5,_0x6b6cxa=this[_0xb59f[2823]][_0xb59f[236]]-_0x6b6cx4,_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[2353]];if(null!=this[_0xb59f[485]]||Math[_0xb59f[425]](_0x6b6cx9)>_0x6b6cx12||Math[_0xb59f[425]](_0x6b6cxa)>_0x6b6cx12){null==this[_0xb59f[485]]&&(this[_0xb59f[485]]=this[_0xb59f[2156]]()),mxUtils[_0xb59f[2440]](),this[_0xb59f[2729]](_0x6b6cx5,_0x6b6cx4),_0x6b6cx3[_0xb59f[722]]()}}};mxRubberband[_0xb59f[202]][_0xb59f[2156]]=function(){null==this[_0xb59f[2952]]&&(this[_0xb59f[2952]]=document[_0xb59f[55]](_0xb59f[485]),this[_0xb59f[2952]][_0xb59f[926]]=_0xb59f[2956],mxUtils[_0xb59f[254]](this[_0xb59f[2952]],this[_0xb59f[2951]]));this[_0xb59f[1179]][_0xb59f[526]][_0xb59f[62]](this[_0xb59f[2952]]);return this[_0xb59f[2952]]};mxRubberband[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null!=this[_0xb59f[485]];this[_0xb59f[862]]();_0x6b6cx4&&(_0x6b6cx4= new mxRectangle(this[_0xb59f[235]],this[_0xb59f[236]],this[_0xb59f[117]],this[_0xb59f[119]]),this[_0xb59f[1179]][_0xb59f[2698]](_0x6b6cx4,_0x6b6cx3[_0xb59f[727]]()),_0x6b6cx3[_0xb59f[722]]())};mxRubberband[_0xb59f[202]][_0xb59f[862]]=function(){null!=this[_0xb59f[485]]&&this[_0xb59f[485]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[485]]);null!=this[_0xb59f[2955]]&&(mxEvent[_0xb59f[745]](document,_0xb59f[752],this[_0xb59f[2955]]),this[_0xb59f[2955]]=null);null!=this[_0xb59f[981]]&&(mxEvent[_0xb59f[745]](document,_0xb59f[753],this[_0xb59f[981]]),this[_0xb59f[981]]=null);this[_0xb59f[2954]]=this[_0xb59f[2953]]=0;this[_0xb59f[485]]=this[_0xb59f[2823]]=null};mxRubberband[_0xb59f[202]][_0xb59f[2729]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[2953]]=_0x6b6cx2;this[_0xb59f[2954]]=_0x6b6cx3;this[_0xb59f[2950]]()};mxRubberband[_0xb59f[202]][_0xb59f[2950]]=function(){if(null!=this[_0xb59f[485]]){var _0x6b6cx2=this[_0xb59f[2953]]-this[_0xb59f[1179]][_0xb59f[1136]],_0x6b6cx3=this[_0xb59f[2954]]-this[_0xb59f[1179]][_0xb59f[1137]];this[_0xb59f[235]]=Math[_0xb59f[243]](this[_0xb59f[2823]][_0xb59f[235]],_0x6b6cx2);this[_0xb59f[236]]=Math[_0xb59f[243]](this[_0xb59f[2823]][_0xb59f[236]],_0x6b6cx3);this[_0xb59f[117]]=Math[_0xb59f[160]](this[_0xb59f[2823]][_0xb59f[235]],_0x6b6cx2)-this[_0xb59f[235]];this[_0xb59f[119]]=Math[_0xb59f[160]](this[_0xb59f[2823]][_0xb59f[236]],_0x6b6cx3)-this[_0xb59f[236]];_0x6b6cx2=mxClient[_0xb59f[47]]?this[_0xb59f[1179]][_0xb59f[1137]]:0;this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=this[_0xb59f[235]]+(mxClient[_0xb59f[47]]?this[_0xb59f[1179]][_0xb59f[1136]]:0)+_0xb59f[168];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=this[_0xb59f[236]]+_0x6b6cx2+_0xb59f[168];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[117]]=Math[_0xb59f[160]](1,this[_0xb59f[117]])+_0xb59f[168];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[119]]=Math[_0xb59f[160]](1,this[_0xb59f[119]])+_0xb59f[168]}};mxRubberband[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[2717]]||(this[_0xb59f[2717]]= !0,this[_0xb59f[1179]][_0xb59f[1148]](this),this[_0xb59f[1179]][_0xb59f[745]](this[_0xb59f[2730]]),this[_0xb59f[862]](),null!=this[_0xb59f[2952]]&&(this[_0xb59f[2952]]=null))};function mxVertexHandler(_0x6b6cx2){null!=_0x6b6cx2&&(this[_0xb59f[724]]=_0x6b6cx2,this[_0xb59f[176]]())}mxVertexHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxVertexHandler[_0xb59f[202]][_0xb59f[724]]=null;mxVertexHandler[_0xb59f[202]][_0xb59f[2957]]= !1;mxVertexHandler[_0xb59f[202]][_0xb59f[1983]]=null;mxVertexHandler[_0xb59f[202]][_0xb59f[2958]]= !0;mxVertexHandler[_0xb59f[202]][_0xb59f[2959]]=null;mxVertexHandler[_0xb59f[202]][_0xb59f[2353]]=0;mxVertexHandler[_0xb59f[202]][_0xb59f[2809]]= !1;mxVertexHandler[_0xb59f[202]][_0xb59f[2960]]= !0;mxVertexHandler[_0xb59f[202]][_0xb59f[176]]=function(){this[_0xb59f[1179]]=this[_0xb59f[724]][_0xb59f[441]][_0xb59f[1179]];this[_0xb59f[2961]]=this[_0xb59f[2962]](this[_0xb59f[724]]);this[_0xb59f[1562]]= new mxRectangle(this[_0xb59f[2961]][_0xb59f[235]],this[_0xb59f[2961]][_0xb59f[236]],this[_0xb59f[2961]][_0xb59f[117]],this[_0xb59f[2961]][_0xb59f[119]]);this[_0xb59f[2732]]=this[_0xb59f[2963]](this[_0xb59f[1562]]);this[_0xb59f[2732]][_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]];this[_0xb59f[2732]][_0xb59f[1229]]= !1;this[_0xb59f[2732]][_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]());this[_0xb59f[1179]][_0xb59f[1712]](this[_0xb59f[724]][_0xb59f[246]])&&(this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[2832]]);mxEvent[_0xb59f[2733]](this[_0xb59f[2732]][_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);if(0>=mxGraphHandler[_0xb59f[202]][_0xb59f[2795]]||this[_0xb59f[1179]][_0xb59f[2694]]()<mxGraphHandler[_0xb59f[202]][_0xb59f[2795]]){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[2657]](this[_0xb59f[724]][_0xb59f[246]]);this[_0xb59f[2964]]=[];if(_0x6b6cx2||this[_0xb59f[1179]][_0xb59f[2628]](this[_0xb59f[724]][_0xb59f[246]])&&2<=this[_0xb59f[724]][_0xb59f[117]]&&2<=this[_0xb59f[724]][_0xb59f[119]]){var _0x6b6cx3=0;_0x6b6cx2&&(this[_0xb59f[2957]]||(this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[936],_0x6b6cx3++)),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[2965],_0x6b6cx3++)),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[2966],_0x6b6cx3++)),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[2967],_0x6b6cx3++)),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[2968],_0x6b6cx3++)),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[2969],_0x6b6cx3++)),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[2970],_0x6b6cx3++))),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2735]](_0xb59f[2971],_0x6b6cx3++)));_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1721]](this[_0xb59f[724]][_0xb59f[246]]);null!=_0x6b6cx2&&(!_0x6b6cx2[_0xb59f[1500]]&&!this[_0xb59f[1179]][_0xb59f[1730]](this[_0xb59f[724]][_0xb59f[246]])&&this[_0xb59f[1179]][_0xb59f[2628]](this[_0xb59f[724]][_0xb59f[246]]))&&(this[_0xb59f[2972]]=this[_0xb59f[2735]](mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2972]]))}else {this[_0xb59f[1179]][_0xb59f[1712]](this[_0xb59f[724]][_0xb59f[246]])&&(!this[_0xb59f[1179]][_0xb59f[2657]](this[_0xb59f[724]][_0xb59f[246]])&&2>this[_0xb59f[724]][_0xb59f[117]]&&2>this[_0xb59f[724]][_0xb59f[119]])&&(this[_0xb59f[2972]]=this[_0xb59f[2735]](mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2972]]))}};if(this[_0xb59f[2809]]&&(0>=mxGraphHandler[_0xb59f[202]][_0xb59f[2795]]||this[_0xb59f[1179]][_0xb59f[2694]]()<mxGraphHandler[_0xb59f[202]][_0xb59f[2795]])){this[_0xb59f[2973]]=this[_0xb59f[2735]](_0xb59f[356],mxEvent.ROTATION_HANDLE,mxConstants[_0xb59f[2974]]+3,mxConstants.HANDLE_FILLCOLOR),this[_0xb59f[2964]][_0xb59f[207]](this[_0xb59f[2973]])};this[_0xb59f[258]]()};mxVertexHandler[_0xb59f[202]][_0xb59f[2962]]=function(_0x6b6cx2){return  new mxRectangle(Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[235]]),Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[236]]),Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[117]]),Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[119]]))};mxVertexHandler[_0xb59f[202]][_0xb59f[2963]]=function(_0x6b6cx2){_0x6b6cx2= new mxRectangleShape(_0x6b6cx2,null,this[_0xb59f[2975]]());_0x6b6cx2[_0xb59f[1307]]=this[_0xb59f[2976]]();_0x6b6cx2[_0xb59f[1522]]=this[_0xb59f[2977]]();return _0x6b6cx2};mxVertexHandler[_0xb59f[202]][_0xb59f[2975]]=function(){return mxConstants[_0xb59f[2978]]};mxVertexHandler[_0xb59f[202]][_0xb59f[2976]]=function(){return mxConstants[_0xb59f[2979]]};mxVertexHandler[_0xb59f[202]][_0xb59f[2977]]=function(){return mxConstants[_0xb59f[2980]]};mxVertexHandler[_0xb59f[202]][_0xb59f[2735]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){_0x6b6cx4=_0x6b6cx4||mxConstants[_0xb59f[2974]];_0x6b6cx4= new mxRectangle(0,0,_0x6b6cx4,_0x6b6cx4);_0x6b6cx5=this[_0xb59f[2981]](_0x6b6cx4,_0x6b6cx3,_0x6b6cx5);_0x6b6cx5[_0xb59f[1567]]()&&null!=this[_0xb59f[724]][_0xb59f[963]]&&this[_0xb59f[724]][_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==this[_0xb59f[1179]][_0xb59f[526]]?(_0x6b6cx5[_0xb59f[1562]][_0xb59f[119]]-=1,_0x6b6cx5[_0xb59f[1562]][_0xb59f[117]]-=1,_0x6b6cx5[_0xb59f[507]]=mxConstants[_0xb59f[1656]],_0x6b6cx5[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[526]])):(_0x6b6cx5[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[2334]]:mxConstants[_0xb59f[508]],_0x6b6cx5[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]()));mxEvent[_0xb59f[2733]](_0x6b6cx5[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);this[_0xb59f[1179]][_0xb59f[994]]()&&(_0x6b6cx5[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=_0x6b6cx2);this[_0xb59f[2982]](_0x6b6cx3)||(_0x6b6cx5[_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188]);return _0x6b6cx5};mxVertexHandler[_0xb59f[202]][_0xb59f[2982]]=function(_0x6b6cx2){return !0};mxVertexHandler[_0xb59f[202]][_0xb59f[2981]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return null!=this[_0xb59f[2959]]?(_0x6b6cx2[_0xb59f[117]]=this[_0xb59f[2959]][_0xb59f[117]],_0x6b6cx2[_0xb59f[119]]=this[_0xb59f[2959]][_0xb59f[119]], new mxImageShape(_0x6b6cx2,this[_0xb59f[2959]][_0xb59f[390]])):_0x6b6cx3==mxEvent[_0xb59f[2983]]? new mxEllipse(_0x6b6cx2,_0x6b6cx4||mxConstants[_0xb59f[2984]],mxConstants.HANDLE_STROKECOLOR): new mxRectangleShape(_0x6b6cx2,_0x6b6cx4||mxConstants[_0xb59f[2984]],mxConstants.HANDLE_STROKECOLOR)};mxVertexHandler[_0xb59f[202]][_0xb59f[2985]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null!=_0x6b6cx2&&(_0x6b6cx2[_0xb59f[1562]][_0xb59f[235]]=Math[_0xb59f[488]](_0x6b6cx3-_0x6b6cx2[_0xb59f[1562]][_0xb59f[117]]/2),_0x6b6cx2[_0xb59f[1562]][_0xb59f[236]]=Math[_0xb59f[488]](_0x6b6cx4-_0x6b6cx2[_0xb59f[1562]][_0xb59f[119]]/2),_0x6b6cx2[_0xb59f[258]]())};mxVertexHandler[_0xb59f[202]][_0xb59f[2986]]=function(_0x6b6cx2){if(_0x6b6cx2[_0xb59f[729]](this[_0xb59f[2973]])){return mxEvent[_0xb59f[2983]]};if(_0x6b6cx2[_0xb59f[729]](this[_0xb59f[2972]])){return mxEvent[_0xb59f[2987]]};if(null!=this[_0xb59f[2964]]){for(var _0x6b6cx3=this[_0xb59f[2353]],_0x6b6cx3=this[_0xb59f[2958]]&&(mxClient[_0xb59f[80]]||0<_0x6b6cx3)? new mxRectangle(_0x6b6cx2[_0xb59f[734]]()-_0x6b6cx3,_0x6b6cx2[_0xb59f[735]]()-_0x6b6cx3,2*_0x6b6cx3,2*_0x6b6cx3):null,_0x6b6cx4=0;_0x6b6cx4<this[_0xb59f[2964]][_0xb59f[67]];_0x6b6cx4++){if(_0x6b6cx2[_0xb59f[729]](this[_0xb59f[2964]][_0x6b6cx4])||null!=_0x6b6cx3&&mxUtils[_0xb59f[1825]](this[_0xb59f[2964]][_0x6b6cx4][_0xb59f[1562]],_0x6b6cx3)){return _0x6b6cx4}}};return null};mxVertexHandler[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&this[_0xb59f[1179]][_0xb59f[994]]()&&!this[_0xb59f[1179]][_0xb59f[2579]](_0x6b6cx3[_0xb59f[727]]())&&(0<this[_0xb59f[2353]]||_0x6b6cx3[_0xb59f[248]]()==this[_0xb59f[724]])){var _0x6b6cx4=this[_0xb59f[2986]](_0x6b6cx3);null!=_0x6b6cx4&&(this[_0xb59f[861]](_0x6b6cx3[_0xb59f[730]](),_0x6b6cx3[_0xb59f[732]](),_0x6b6cx4),_0x6b6cx3[_0xb59f[722]]())}};mxVertexHandler[_0xb59f[202]][_0xb59f[861]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],_0x6b6cx2,_0x6b6cx3);this[_0xb59f[2739]]=_0x6b6cx2[_0xb59f[235]];this[_0xb59f[2740]]=_0x6b6cx2[_0xb59f[236]];this[_0xb59f[1983]]=_0x6b6cx4;this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]]=_0x6b6cx4==mxEvent[_0xb59f[2983]]?_0xb59f[497]:_0xb59f[130];this[_0xb59f[2988]]=this[_0xb59f[2963]](this[_0xb59f[1562]]);!(mxClient[_0xb59f[48]]&&0!=Number(this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]))&&null!=this[_0xb59f[724]][_0xb59f[963]]&&this[_0xb59f[724]][_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==this[_0xb59f[1179]][_0xb59f[526]]?(this[_0xb59f[2988]][_0xb59f[507]]=mxConstants[_0xb59f[1656]],this[_0xb59f[2988]][_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[526]])):(this[_0xb59f[2988]][_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]],this[_0xb59f[2988]][_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[1524]]()))};mxVertexHandler[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&null!=this[_0xb59f[1983]]){var _0x6b6cx4= new mxPoint(_0x6b6cx3[_0xb59f[734]](),_0x6b6cx3[_0xb59f[735]]()),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1018]](_0x6b6cx3[_0xb59f[727]]()),_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]];if(this[_0xb59f[1983]]==mxEvent[_0xb59f[2987]]){_0x6b6cx5&&(_0x6b6cx4[_0xb59f[235]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx4[_0xb59f[235]]/_0x6b6cx9)*_0x6b6cx9,_0x6b6cx4[_0xb59f[236]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx4[_0xb59f[236]]/_0x6b6cx9)*_0x6b6cx9),this[_0xb59f[2985]](this[_0xb59f[2964]][this[_0xb59f[2964]][_0xb59f[67]]-1],_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]])}else {if(this[_0xb59f[1983]]==mxEvent[_0xb59f[2983]]){var _0x6b6cxa=this[_0xb59f[724]][_0xb59f[235]]+this[_0xb59f[724]][_0xb59f[117]]/2-_0x6b6cx4[_0xb59f[235]],_0x6b6cx12=this[_0xb59f[724]][_0xb59f[236]]+this[_0xb59f[724]][_0xb59f[119]]/2-_0x6b6cx4[_0xb59f[236]];this[_0xb59f[2989]]=0!=_0x6b6cxa?180*Math[_0xb59f[2990]](_0x6b6cx12/_0x6b6cxa)/Math[_0xb59f[424]]+90:0>_0x6b6cx12?180:0;0<_0x6b6cxa&&(this[_0xb59f[2989]]-=180);this[_0xb59f[2960]]&&(_0x6b6cxa=_0x6b6cx4[_0xb59f[235]]-this[_0xb59f[724]][_0xb59f[241]](),_0x6b6cx12=_0x6b6cx4[_0xb59f[236]]-this[_0xb59f[724]][_0xb59f[242]](),_0x6b6cxa=Math[_0xb59f[425]](Math[_0xb59f[428]](_0x6b6cxa*_0x6b6cxa+_0x6b6cx12*_0x6b6cx12)-this[_0xb59f[724]][_0xb59f[119]]/2-20),_0x6b6cxa=Math[_0xb59f[160]](1,5*Math[_0xb59f[243]](3,Math[_0xb59f[160]](0,Math[_0xb59f[488]](80/Math[_0xb59f[425]](_0x6b6cxa))))),this[_0xb59f[2989]]=Math[_0xb59f[488]](this[_0xb59f[2989]]/_0x6b6cxa)*_0x6b6cxa);this[_0xb59f[2732]][_0xb59f[603]]=this[_0xb59f[2989]];this[_0xb59f[2732]][_0xb59f[258]]()}else {var _0x6b6cx13=mxUtils[_0xb59f[431]](this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]),_0x6b6cx14=Math[_0xb59f[426]](-_0x6b6cx13),_0x6b6cx15=Math[_0xb59f[427]](-_0x6b6cx13),_0x6b6cx16= new mxPoint(this[_0xb59f[724]][_0xb59f[241]](),this[_0xb59f[724]][_0xb59f[242]]()),_0x6b6cxa=_0x6b6cx4[_0xb59f[235]]-this[_0xb59f[2739]],_0x6b6cx12=_0x6b6cx4[_0xb59f[236]]-this[_0xb59f[2740]],_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[513]],_0x6b6cx17=_0x6b6cx15*_0x6b6cxa+_0x6b6cx14*_0x6b6cx12,_0x6b6cxa=_0x6b6cx14*_0x6b6cxa-_0x6b6cx15*_0x6b6cx12;this[_0xb59f[1562]]=this[_0xb59f[2991]](this[_0xb59f[2961]],_0x6b6cxa,_0x6b6cx17,this[_0xb59f[1983]],_0x6b6cx5,_0x6b6cx9,_0x6b6cx4);_0x6b6cx14=Math[_0xb59f[426]](_0x6b6cx13);_0x6b6cx15=Math[_0xb59f[427]](_0x6b6cx13);_0x6b6cx12= new mxPoint(this[_0xb59f[1562]][_0xb59f[241]](),this[_0xb59f[1562]][_0xb59f[242]]());_0x6b6cxa=_0x6b6cx12[_0xb59f[235]]-_0x6b6cx16[_0xb59f[235]];_0x6b6cx12=_0x6b6cx12[_0xb59f[236]]-_0x6b6cx16[_0xb59f[236]];_0x6b6cx16=_0x6b6cx15*_0x6b6cxa+_0x6b6cx14*_0x6b6cx12-_0x6b6cx12;this[_0xb59f[1562]][_0xb59f[235]]+=_0x6b6cx14*_0x6b6cxa-_0x6b6cx15*_0x6b6cx12-_0x6b6cxa;this[_0xb59f[1562]][_0xb59f[236]]+=_0x6b6cx16;this[_0xb59f[2932]]()}};_0x6b6cx3[_0xb59f[722]]()}else {null!=this[_0xb59f[2986]](_0x6b6cx3)&&_0x6b6cx3[_0xb59f[722]](!1)}};mxVertexHandler[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){if(!_0x6b6cx3[_0xb59f[721]]()&&null!=this[_0xb59f[1983]]&&null!=this[_0xb59f[724]]){var _0x6b6cx4= new mxPoint(_0x6b6cx3[_0xb59f[734]](),_0x6b6cx3[_0xb59f[735]]());this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[473]]();try{if(this[_0xb59f[1983]]==mxEvent[_0xb59f[2983]]){null!=this[_0xb59f[2989]]&&this[_0xb59f[2992]](this[_0xb59f[724]][_0xb59f[246]],this[_0xb59f[2989]]-(this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||0))}else {var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1018]](_0x6b6cx3[_0xb59f[727]]()),_0x6b6cx9=mxUtils[_0xb59f[431]](this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]),_0x6b6cxa=Math[_0xb59f[426]](-_0x6b6cx9),_0x6b6cx12=Math[_0xb59f[427]](-_0x6b6cx9),_0x6b6cx13=_0x6b6cx4[_0xb59f[235]]-this[_0xb59f[2739]],_0x6b6cx14=_0x6b6cx4[_0xb59f[236]]-this[_0xb59f[2740]],_0x6b6cx4=_0x6b6cx12*_0x6b6cx13+_0x6b6cxa*_0x6b6cx14,_0x6b6cx13=_0x6b6cxa*_0x6b6cx13-_0x6b6cx12*_0x6b6cx14,_0x6b6cx14=_0x6b6cx4,_0x6b6cx15=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]];this[_0xb59f[2526]](this[_0xb59f[724]][_0xb59f[246]],_0x6b6cx13/_0x6b6cx15,_0x6b6cx14/_0x6b6cx15,this[_0xb59f[1983]],_0x6b6cx5)}}finally{this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[476]]()};this[_0xb59f[862]]();_0x6b6cx3[_0xb59f[722]]()}};mxVertexHandler[_0xb59f[202]][_0xb59f[2992]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]();if(_0x6b6cx4[_0xb59f[1193]](_0x6b6cx2)){var _0x6b6cx5=_0x6b6cx2==this[_0xb59f[724]]?this[_0xb59f[724]]:this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx2);null!=_0x6b6cx5&&this[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_ROTATION,(_0x6b6cx5[_0xb59f[124]][mxConstants[_0xb59f[2278]]]||0)+_0x6b6cx3,[_0x6b6cx2]);if(this[_0xb59f[724]][_0xb59f[246]]!=_0x6b6cx2&&(_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx2),null!=_0x6b6cx5&&!_0x6b6cx5[_0xb59f[1500]])){if(0!=_0x6b6cx3){var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx2),_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx9);if(!_0x6b6cx5[_0xb59f[1500]]&&null!=_0x6b6cxa){var _0x6b6cx12=mxUtils[_0xb59f[431]](_0x6b6cx3),_0x6b6cx9=Math[_0xb59f[426]](_0x6b6cx12),_0x6b6cx12=Math[_0xb59f[427]](_0x6b6cx12),_0x6b6cx13= new mxPoint(_0x6b6cx5[_0xb59f[241]](),_0x6b6cx5[_0xb59f[242]]()),_0x6b6cxa= new mxPoint(_0x6b6cxa[_0xb59f[117]]/2,_0x6b6cxa[_0xb59f[119]]/2),_0x6b6cx9=mxUtils[_0xb59f[432]](_0x6b6cx13,_0x6b6cx9,_0x6b6cx12,_0x6b6cxa),_0x6b6cx5=_0x6b6cx5[_0xb59f[238]]();_0x6b6cx5[_0xb59f[235]]=_0x6b6cx9[_0xb59f[235]]-_0x6b6cx5[_0xb59f[117]]/2;_0x6b6cx5[_0xb59f[236]]=_0x6b6cx9[_0xb59f[236]]-_0x6b6cx5[_0xb59f[119]]/2;_0x6b6cx4[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx5)}}else {_0x6b6cx5=_0x6b6cx5[_0xb59f[238]](),_0x6b6cx5[_0xb59f[235]]+=dx,_0x6b6cx5[_0xb59f[236]]+=dy,_0x6b6cx4[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx5)}};_0x6b6cx5=_0x6b6cx4[_0xb59f[262]](_0x6b6cx2);for(_0x6b6cx9=0;_0x6b6cx9<_0x6b6cx5;_0x6b6cx9++){this[_0xb59f[2992]](_0x6b6cx4[_0xb59f[263]](_0x6b6cx2,_0x6b6cx9),_0x6b6cx3)}}};mxVertexHandler[_0xb59f[202]][_0xb59f[862]]=function(){this[_0xb59f[1983]]=this[_0xb59f[2989]]=null;null!=this[_0xb59f[2988]]&&(this[_0xb59f[2988]][_0xb59f[515]](),this[_0xb59f[2988]]=null);null!=this[_0xb59f[2732]]&&(this[_0xb59f[2732]][_0xb59f[252]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[497],this[_0xb59f[2961]]=this[_0xb59f[2962]](this[_0xb59f[724]]),this[_0xb59f[1562]]= new mxRectangle(this[_0xb59f[2961]][_0xb59f[235]],this[_0xb59f[2961]][_0xb59f[236]],this[_0xb59f[2961]][_0xb59f[117]],this[_0xb59f[2961]][_0xb59f[119]]),this[_0xb59f[2932]]())};mxVertexHandler[_0xb59f[202]][_0xb59f[2526]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1721]](_0x6b6cx2);if(null!=_0x6b6cxa){if(_0x6b6cx5==mxEvent[_0xb59f[2987]]){_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]],_0x6b6cx3=(this[_0xb59f[2972]][_0xb59f[1562]][_0xb59f[241]]()-this[_0xb59f[2739]])/_0x6b6cx5,_0x6b6cx4=(this[_0xb59f[2972]][_0xb59f[1562]][_0xb59f[242]]()-this[_0xb59f[2740]])/_0x6b6cx5,_0x6b6cxa=_0x6b6cxa[_0xb59f[238]](),null==_0x6b6cxa[_0xb59f[1368]]?_0x6b6cxa[_0xb59f[1368]]= new mxPoint(_0x6b6cx3,_0x6b6cx4):(_0x6b6cxa[_0xb59f[1368]][_0xb59f[235]]+=_0x6b6cx3,_0x6b6cxa[_0xb59f[1368]][_0xb59f[236]]+=_0x6b6cx4),this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1724]](_0x6b6cx2,_0x6b6cxa)}else {_0x6b6cx5=this[_0xb59f[2991]](_0x6b6cxa,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,1, new mxPoint(0,0));var _0x6b6cx12=mxUtils[_0xb59f[431]](this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]);if(0!=_0x6b6cx12){_0x6b6cx3=_0x6b6cx5[_0xb59f[241]]()-_0x6b6cxa[_0xb59f[241]]();_0x6b6cx4=_0x6b6cx5[_0xb59f[242]]()-_0x6b6cxa[_0xb59f[242]]();_0x6b6cx9=Math[_0xb59f[426]](_0x6b6cx12);var _0x6b6cx13=Math[_0xb59f[427]](_0x6b6cx12),_0x6b6cx12=_0x6b6cx9*_0x6b6cx3-_0x6b6cx13*_0x6b6cx4-_0x6b6cx3;_0x6b6cx3=_0x6b6cx13*_0x6b6cx3+_0x6b6cx9*_0x6b6cx4-_0x6b6cx4;_0x6b6cx4=_0x6b6cx5[_0xb59f[235]]-_0x6b6cxa[_0xb59f[235]];var _0x6b6cx14=_0x6b6cx5[_0xb59f[236]]-_0x6b6cxa[_0xb59f[236]],_0x6b6cx15=_0x6b6cx9*_0x6b6cx4-_0x6b6cx13*_0x6b6cx14;_0x6b6cx9=_0x6b6cx13*_0x6b6cx4+_0x6b6cx9*_0x6b6cx14;_0x6b6cx5[_0xb59f[235]]+=_0x6b6cx12;_0x6b6cx5[_0xb59f[236]]+=_0x6b6cx3;if(!this[_0xb59f[1179]][_0xb59f[1742]](_0x6b6cx2)&&(0!=_0x6b6cx12||0!=_0x6b6cx3)){_0x6b6cx4=_0x6b6cxa[_0xb59f[235]]-_0x6b6cx5[_0xb59f[235]]+_0x6b6cx15,_0x6b6cx14=_0x6b6cxa[_0xb59f[236]]-_0x6b6cx5[_0xb59f[236]]+_0x6b6cx9,this[_0xb59f[2993]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx14)}};this[_0xb59f[1179]][_0xb59f[2526]](_0x6b6cx2,_0x6b6cx5)}}};mxVertexHandler[_0xb59f[202]][_0xb59f[2993]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){for(var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx9=_0x6b6cx5[_0xb59f[262]](_0x6b6cx2),_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9;_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx5[_0xb59f[263]](_0x6b6cx2,_0x6b6cxa);if(_0x6b6cx5[_0xb59f[1193]](_0x6b6cx12)){var _0x6b6cx13=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx12);null!=_0x6b6cx13&&!_0x6b6cx13[_0xb59f[1500]]&&(_0x6b6cx13=_0x6b6cx13[_0xb59f[238]](),_0x6b6cx13[_0xb59f[235]]+=_0x6b6cx3,_0x6b6cx13[_0xb59f[236]]+=_0x6b6cx4,_0x6b6cx5[_0xb59f[1724]](_0x6b6cx12,_0x6b6cx13))}}};mxVertexHandler[_0xb59f[202]][_0xb59f[2991]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){if(this[_0xb59f[2957]]){_0x6b6cx12=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]+_0x6b6cx3;var _0x6b6cx13=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]+_0x6b6cx4;_0x6b6cx9&&(_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx12/_0x6b6cxa)*_0x6b6cxa,_0x6b6cx13=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx13/_0x6b6cxa)*_0x6b6cxa);_0x6b6cxa= new mxRectangle(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]],0,0);_0x6b6cxa[_0xb59f[99]]( new mxRectangle(_0x6b6cx12,_0x6b6cx13,0,0));return _0x6b6cxa};var _0x6b6cx13=_0x6b6cx2[_0xb59f[235]]-_0x6b6cx12[_0xb59f[235]]*_0x6b6cxa,_0x6b6cx14=_0x6b6cx13+_0x6b6cx2[_0xb59f[117]],_0x6b6cx15=_0x6b6cx2[_0xb59f[236]]-_0x6b6cx12[_0xb59f[236]]*_0x6b6cxa;_0x6b6cx2=_0x6b6cx15+_0x6b6cx2[_0xb59f[119]];4<_0x6b6cx5?(_0x6b6cx2+=_0x6b6cx4,_0x6b6cx9&&(_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2/_0x6b6cxa)*_0x6b6cxa)):3>_0x6b6cx5&&(_0x6b6cx15+=_0x6b6cx4,_0x6b6cx9&&(_0x6b6cx15=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx15/_0x6b6cxa)*_0x6b6cxa));if(0==_0x6b6cx5||3==_0x6b6cx5||5==_0x6b6cx5){_0x6b6cx13+=_0x6b6cx3,_0x6b6cx9&&(_0x6b6cx13=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx13/_0x6b6cxa)*_0x6b6cxa)}else {if(2==_0x6b6cx5||4==_0x6b6cx5||7==_0x6b6cx5){_0x6b6cx14+=_0x6b6cx3,_0x6b6cx9&&(_0x6b6cx14=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx14/_0x6b6cxa)*_0x6b6cxa)}};_0x6b6cx9=_0x6b6cx14-_0x6b6cx13;_0x6b6cx2-=_0x6b6cx15;0>_0x6b6cx9&&(_0x6b6cx13+=_0x6b6cx9,_0x6b6cx9=Math[_0xb59f[425]](_0x6b6cx9));0>_0x6b6cx2&&(_0x6b6cx15+=_0x6b6cx2,_0x6b6cx2=Math[_0xb59f[425]](_0x6b6cx2));return  new mxRectangle(_0x6b6cx13+_0x6b6cx12[_0xb59f[235]]*_0x6b6cxa,_0x6b6cx15+_0x6b6cx12[_0xb59f[236]]*_0x6b6cxa,_0x6b6cx9,_0x6b6cx2)};mxVertexHandler[_0xb59f[202]][_0xb59f[258]]=function(){this[_0xb59f[2961]]=this[_0xb59f[2962]](this[_0xb59f[724]]);this[_0xb59f[1562]]= new mxRectangle(this[_0xb59f[724]][_0xb59f[235]],this[_0xb59f[724]][_0xb59f[236]],this[_0xb59f[724]][_0xb59f[117]],this[_0xb59f[724]][_0xb59f[119]]);var _0x6b6cx2=this[_0xb59f[724]];if(null!=this[_0xb59f[2964]]){var _0x6b6cx3=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]],_0x6b6cx4=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]];if(this[_0xb59f[2957]]){this[_0xb59f[2985]](this[_0xb59f[2964]][0],_0x6b6cx3,_0x6b6cx4)}else {var _0x6b6cx5=_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]/2,_0x6b6cx9=_0x6b6cx2[_0xb59f[236]]+_0x6b6cx2[_0xb59f[119]]/2;if(1<this[_0xb59f[2964]][_0xb59f[67]]){var _0x6b6cxa=mxUtils[_0xb59f[431]](_0x6b6cx2[_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]),_0x6b6cx12=Math[_0xb59f[426]](_0x6b6cxa),_0x6b6cxa=Math[_0xb59f[427]](_0x6b6cxa),_0x6b6cx13= new mxPoint(_0x6b6cx2[_0xb59f[241]](),_0x6b6cx2[_0xb59f[242]]()),_0x6b6cx14=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]),_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][0],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);_0x6b6cx14[_0xb59f[235]]=_0x6b6cx5;_0x6b6cx14[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]];_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][1],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);_0x6b6cx14[_0xb59f[235]]=_0x6b6cx3;_0x6b6cx14[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]];_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][2],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);_0x6b6cx14[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]];_0x6b6cx14[_0xb59f[236]]=_0x6b6cx9;_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][3],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);_0x6b6cx14[_0xb59f[235]]=_0x6b6cx3;_0x6b6cx14[_0xb59f[236]]=_0x6b6cx9;_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][4],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);_0x6b6cx14[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]];_0x6b6cx14[_0xb59f[236]]=_0x6b6cx4;_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][5],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);_0x6b6cx14[_0xb59f[235]]=_0x6b6cx5;_0x6b6cx14[_0xb59f[236]]=_0x6b6cx4;_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][6],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);_0x6b6cx14[_0xb59f[235]]=_0x6b6cx3;_0x6b6cx14[_0xb59f[236]]=_0x6b6cx4;_0x6b6cx14=mxUtils[_0xb59f[432]](_0x6b6cx14,_0x6b6cx12,_0x6b6cxa,_0x6b6cx13);this[_0xb59f[2985]](this[_0xb59f[2964]][7],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]);this[_0xb59f[2985]](this[_0xb59f[2964]][8],_0x6b6cx5+_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]],_0x6b6cx9+_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]])}else {2<=this[_0xb59f[724]][_0xb59f[117]]&&2<=this[_0xb59f[724]][_0xb59f[119]]?this[_0xb59f[2985]](this[_0xb59f[2964]][0],_0x6b6cx5+_0x6b6cx2[_0xb59f[2079]][_0xb59f[235]],_0x6b6cx9+_0x6b6cx2[_0xb59f[2079]][_0xb59f[236]]):this[_0xb59f[2985]](this[_0xb59f[2964]][0],_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]])}}};null!=this[_0xb59f[2973]]&&(_0x6b6cxa=mxUtils[_0xb59f[431]](this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]),_0x6b6cx12=Math[_0xb59f[426]](_0x6b6cxa),_0x6b6cxa=Math[_0xb59f[427]](_0x6b6cxa),_0x6b6cx13= new mxPoint(this[_0xb59f[724]][_0xb59f[241]](),this[_0xb59f[724]][_0xb59f[242]]()),_0x6b6cx14=mxUtils[_0xb59f[432]]( new mxPoint(_0x6b6cx2[_0xb59f[235]]+_0x6b6cx2[_0xb59f[117]]/2,_0x6b6cx2[_0xb59f[236]]-16),_0x6b6cx12,_0x6b6cxa,_0x6b6cx13),this[_0xb59f[2985]](this[_0xb59f[2973]],_0x6b6cx14[_0xb59f[235]],_0x6b6cx14[_0xb59f[236]]));this[_0xb59f[2732]][_0xb59f[603]]=Number(this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]);this[_0xb59f[2932]]()};mxVertexHandler[_0xb59f[202]][_0xb59f[2932]]=function(){null!=this[_0xb59f[2988]]&&(this[_0xb59f[2988]][_0xb59f[1562]]=this[_0xb59f[1562]],this[_0xb59f[2988]][_0xb59f[252]][_0xb59f[265]]==this[_0xb59f[1179]][_0xb59f[526]]&&(this[_0xb59f[2988]][_0xb59f[1562]][_0xb59f[117]]=Math[_0xb59f[160]](0,this[_0xb59f[2988]][_0xb59f[1562]][_0xb59f[117]]-1),this[_0xb59f[2988]][_0xb59f[1562]][_0xb59f[119]]=Math[_0xb59f[160]](0,this[_0xb59f[2988]][_0xb59f[1562]][_0xb59f[119]]-1)),this[_0xb59f[2988]][_0xb59f[603]]=Number(this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]),this[_0xb59f[2988]][_0xb59f[258]]());this[_0xb59f[2732]][_0xb59f[1562]]=this[_0xb59f[1562]];this[_0xb59f[2732]][_0xb59f[258]]()};mxVertexHandler[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[2988]]&&(this[_0xb59f[2988]][_0xb59f[515]](),this[_0xb59f[2988]]=null);this[_0xb59f[2732]][_0xb59f[515]]();this[_0xb59f[2972]]=this[_0xb59f[2732]]=null;if(null!=this[_0xb59f[2964]]){for(var _0x6b6cx2=0;_0x6b6cx2<this[_0xb59f[2964]][_0xb59f[67]];_0x6b6cx2++){this[_0xb59f[2964]][_0x6b6cx2][_0xb59f[515]](),this[_0xb59f[2964]][_0x6b6cx2]=null}}};function mxEdgeHandler(_0x6b6cx2){null!=_0x6b6cx2&&(this[_0xb59f[724]]=_0x6b6cx2,this[_0xb59f[176]]())}mxEdgeHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[724]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[2885]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[2886]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[267]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[253]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[2994]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[2972]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[2797]]= !0;mxEdgeHandler[_0xb59f[202]][_0xb59f[2771]]= !1;mxEdgeHandler[_0xb59f[202]][_0xb59f[2995]]= !1;mxEdgeHandler[_0xb59f[202]][_0xb59f[574]]= !1;mxEdgeHandler[_0xb59f[202]][_0xb59f[2958]]= !0;mxEdgeHandler[_0xb59f[202]][_0xb59f[2996]]= !1;mxEdgeHandler[_0xb59f[202]][_0xb59f[2959]]=null;mxEdgeHandler[_0xb59f[202]][_0xb59f[2353]]=0;mxEdgeHandler[_0xb59f[202]][_0xb59f[176]]=function(){this[_0xb59f[1179]]=this[_0xb59f[724]][_0xb59f[441]][_0xb59f[1179]];this[_0xb59f[2885]]=this[_0xb59f[1689]]();this[_0xb59f[2886]]= new mxConstraintHandler(this[_0xb59f[1179]]);this[_0xb59f[1525]]=[];this[_0xb59f[2997]]=this[_0xb59f[2998]](this[_0xb59f[724]]);this[_0xb59f[253]]=this[_0xb59f[2963]](this[_0xb59f[2997]]);this[_0xb59f[253]][_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[2334]]:mxConstants[_0xb59f[508]];this[_0xb59f[253]][_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]());this[_0xb59f[253]][_0xb59f[1564]]=0;this[_0xb59f[253]][_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[2831]];mxEvent[_0xb59f[169]](this[_0xb59f[253]][_0xb59f[252]],_0xb59f[760],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[761]](_0x6b6cx2,this[_0xb59f[724]][_0xb59f[246]])}));mxEvent[_0xb59f[759]](this[_0xb59f[253]][_0xb59f[252]],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[2771]]&&this[_0xb59f[2999]](_0x6b6cx2)?this[_0xb59f[3000]](this[_0xb59f[724]],_0x6b6cx2):this[_0xb59f[1179]][_0xb59f[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6b6cx2,this[_0xb59f[724]]))}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){var _0x6b6cx4=this[_0xb59f[724]][_0xb59f[246]];if(null!=this[_0xb59f[1983]]){var _0x6b6cx5=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx2),mxEvent[_0xb59f[733]](_0x6b6cx2)),_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[999]](_0x6b6cx5[_0xb59f[235]],_0x6b6cx5[_0xb59f[236]]);this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx4)&&this[_0xb59f[1179]][_0xb59f[2688]](_0x6b6cx4,_0x6b6cx5[_0xb59f[235]],_0x6b6cx5[_0xb59f[236]])&&(_0x6b6cx4=null)};this[_0xb59f[1179]][_0xb59f[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6b6cx2,this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx4)))}),mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6b6cx2,this[_0xb59f[724]]))}));this[_0xb59f[574]]=null!=this[_0xb59f[724]][_0xb59f[963]]&&this[_0xb59f[724]][_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==this[_0xb59f[1179]][_0xb59f[526]];if(!this[_0xb59f[574]]){var _0x6b6cx2=this[_0xb59f[724]][_0xb59f[2089]](!0);null!=_0x6b6cx2&&(this[_0xb59f[574]]=null!=_0x6b6cx2[_0xb59f[963]]&&_0x6b6cx2[_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==this[_0xb59f[1179]][_0xb59f[526]]);this[_0xb59f[574]]||(_0x6b6cx2=this[_0xb59f[724]][_0xb59f[2089]](!1),null!=_0x6b6cx2&&(this[_0xb59f[574]]=null!=_0x6b6cx2[_0xb59f[963]]&&_0x6b6cx2[_0xb59f[963]][_0xb59f[252]][_0xb59f[265]]==this[_0xb59f[1179]][_0xb59f[526]]))};if(this[_0xb59f[1179]][_0xb59f[2694]]()<mxGraphHandler[_0xb59f[202]][_0xb59f[2795]]||0>=mxGraphHandler[_0xb59f[202]][_0xb59f[2795]]){this[_0xb59f[2994]]=this[_0xb59f[3001]]()};this[_0xb59f[685]]= new mxPoint(this[_0xb59f[724]][_0xb59f[2079]][_0xb59f[235]],this[_0xb59f[724]][_0xb59f[2079]][_0xb59f[236]]);this[_0xb59f[2972]]= new mxRectangleShape( new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this[_0xb59f[2972]][_0xb59f[1229]]= !1;this[_0xb59f[3002]](this[_0xb59f[2972]]);this[_0xb59f[2972]][_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[3003]];mxEvent[_0xb59f[2733]](this[_0xb59f[2972]][_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);this[_0xb59f[258]]()};mxEdgeHandler[_0xb59f[202]][_0xb59f[2999]]=function(_0x6b6cx2){return mxEvent[_0xb59f[774]](_0x6b6cx2)};mxEdgeHandler[_0xb59f[202]][_0xb59f[3004]]=function(_0x6b6cx2){return mxEvent[_0xb59f[774]](_0x6b6cx2)};mxEdgeHandler[_0xb59f[202]][_0xb59f[2998]]=function(_0x6b6cx2){return _0x6b6cx2[_0xb59f[439]]};mxEdgeHandler[_0xb59f[202]][_0xb59f[2963]]=function(_0x6b6cx2){_0x6b6cx2= new mxPolyline(_0x6b6cx2,this[_0xb59f[2975]]());_0x6b6cx2[_0xb59f[1307]]=this[_0xb59f[2976]]();_0x6b6cx2[_0xb59f[1522]]=this[_0xb59f[2977]]();return _0x6b6cx2};mxEdgeHandler[_0xb59f[202]][_0xb59f[2975]]=function(){return mxConstants[_0xb59f[3005]]};mxEdgeHandler[_0xb59f[202]][_0xb59f[2976]]=function(){return mxConstants[_0xb59f[3006]]};mxEdgeHandler[_0xb59f[202]][_0xb59f[2977]]=function(){return mxConstants[_0xb59f[3007]]};mxEdgeHandler[_0xb59f[202]][_0xb59f[2907]]=function(_0x6b6cx2){return !0};mxEdgeHandler[_0xb59f[202]][_0xb59f[1689]]=function(){var _0x6b6cx2= new mxCellMarker(this[_0xb59f[1179]]),_0x6b6cx3=this;_0x6b6cx2[_0xb59f[736]]=function(_0x6b6cx2){var _0x6b6cx5=mxCellMarker[_0xb59f[202]][_0xb59f[736]][_0xb59f[183]](this,arguments);if(!_0x6b6cx3[_0xb59f[2907]](_0x6b6cx5)){return null};var _0x6b6cx9=_0x6b6cx3[_0xb59f[1179]][_0xb59f[502]]();if(_0x6b6cx5==_0x6b6cx3[_0xb59f[724]][_0xb59f[246]]||null!=_0x6b6cx5&&!_0x6b6cx3[_0xb59f[1179]][_0xb59f[2405]]&&_0x6b6cx9[_0xb59f[250]](_0x6b6cx5)){_0x6b6cx5=null};return _0x6b6cx5};_0x6b6cx2[_0xb59f[2872]]=function(_0x6b6cx2){var _0x6b6cx5=_0x6b6cx3[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=_0x6b6cx3[_0xb59f[1179]][_0xb59f[441]][_0xb59f[2292]](_0x6b6cx2,_0x6b6cx3[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](_0x6b6cx5[_0xb59f[1709]](_0x6b6cx3[_0xb59f[724]][_0xb59f[246]],!_0x6b6cx3[_0xb59f[729]])),!_0x6b6cx3[_0xb59f[729]]),_0x6b6cx5=null!=_0x6b6cx5?_0x6b6cx5[_0xb59f[246]]:null;_0x6b6cx3[_0xb59f[267]]=_0x6b6cx3[_0xb59f[2909]](_0x6b6cx3[_0xb59f[729]]?_0x6b6cx2[_0xb59f[246]]:_0x6b6cx5,_0x6b6cx3[_0xb59f[729]]?_0x6b6cx5:_0x6b6cx2[_0xb59f[246]]);return null==_0x6b6cx3[_0xb59f[267]]};return _0x6b6cx2};mxEdgeHandler[_0xb59f[202]][_0xb59f[2909]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[1179]][_0xb59f[2500]](this[_0xb59f[724]][_0xb59f[246]],_0x6b6cx2,_0x6b6cx3)};mxEdgeHandler[_0xb59f[202]][_0xb59f[3001]]=function(){for(var _0x6b6cx2=this[_0xb59f[724]][_0xb59f[246]],_0x6b6cx3=[],_0x6b6cx4=0;_0x6b6cx4<this[_0xb59f[2997]][_0xb59f[67]];_0x6b6cx4++){if(this[_0xb59f[3008]](_0x6b6cx4)){var _0x6b6cx5=_0x6b6cx4==this[_0xb59f[2997]][_0xb59f[67]]-1;if((_0x6b6cx5=0==_0x6b6cx4||_0x6b6cx5)||this[_0xb59f[1179]][_0xb59f[2662]](_0x6b6cx2)){var _0x6b6cx9=this[_0xb59f[3009]](_0x6b6cx4);this[_0xb59f[3002]](_0x6b6cx9);mxClient[_0xb59f[754]]&&_0x6b6cx9[_0xb59f[252]][_0xb59f[57]](_0xb59f[1377],_0xb59f[130]);if(this[_0xb59f[3010]](_0x6b6cx4)){if(mxClient[_0xb59f[754]]){var _0x6b6cxa=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){_0x6b6cx2=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx2),mxEvent[_0xb59f[733]](_0x6b6cx2));return this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[248]](this[_0xb59f[1179]][_0xb59f[999]](_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]))});mxEvent[_0xb59f[2733]](_0x6b6cx9[_0xb59f[252]],this[_0xb59f[1179]],_0x6b6cxa)}else {_0x6b6cx9[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[3011]],mxEvent[_0xb59f[2733]](_0x6b6cx9[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]])}};_0x6b6cx3[_0xb59f[207]](_0x6b6cx9);_0x6b6cx5||(this[_0xb59f[1525]][_0xb59f[207]]( new mxPoint(0,0)),_0x6b6cx9[_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188])}}};return _0x6b6cx3};mxEdgeHandler[_0xb59f[202]][_0xb59f[3010]]=function(_0x6b6cx2){return !0};mxEdgeHandler[_0xb59f[202]][_0xb59f[3008]]=function(_0x6b6cx2){return !0};mxEdgeHandler[_0xb59f[202]][_0xb59f[3009]]=function(_0x6b6cx2){if(null!=this[_0xb59f[2959]]){return  new mxImageShape( new mxRectangle(0,0,this[_0xb59f[2959]][_0xb59f[117]],this[_0xb59f[2959]][_0xb59f[119]]),this[_0xb59f[2959]][_0xb59f[390]])};_0x6b6cx2=mxConstants[_0xb59f[2974]];this[_0xb59f[574]]&&(_0x6b6cx2-=1);return  new mxRectangleShape( new mxRectangle(0,0,_0x6b6cx2,_0x6b6cx2),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};mxEdgeHandler[_0xb59f[202]][_0xb59f[3002]]=function(_0x6b6cx2){this[_0xb59f[574]]?(_0x6b6cx2[_0xb59f[507]]=mxConstants[_0xb59f[1656]],_0x6b6cx2[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[526]])):(_0x6b6cx2[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[2334]]:mxConstants[_0xb59f[508]],_0x6b6cx2[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]()))};mxEdgeHandler[_0xb59f[202]][_0xb59f[2986]]=function(_0x6b6cx2){if(null!=this[_0xb59f[2994]]){for(var _0x6b6cx3=this[_0xb59f[2353]],_0x6b6cx3=this[_0xb59f[2958]]&&(mxClient[_0xb59f[80]]||0<_0x6b6cx3)? new mxRectangle(_0x6b6cx2[_0xb59f[734]]()-_0x6b6cx3,_0x6b6cx2[_0xb59f[735]]()-_0x6b6cx3,2*_0x6b6cx3,2*_0x6b6cx3):null,_0x6b6cx4=0;_0x6b6cx4<this[_0xb59f[2994]][_0xb59f[67]];_0x6b6cx4++){if((_0x6b6cx2[_0xb59f[729]](this[_0xb59f[2994]][_0x6b6cx4])||null!=_0x6b6cx3&&mxUtils[_0xb59f[1825]](this[_0xb59f[2994]][_0x6b6cx4][_0xb59f[1562]],_0x6b6cx3))&&_0xb59f[188]!=this[_0xb59f[2994]][_0x6b6cx4][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]){return _0x6b6cx4}}};if(_0x6b6cx2[_0xb59f[729]](this[_0xb59f[2972]])&&_0xb59f[188]!=this[_0xb59f[2972]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]||_0x6b6cx2[_0xb59f[729]](this[_0xb59f[724]][_0xb59f[963]])){if(!mxClient[_0xb59f[75]]&&!mxClient[_0xb59f[76]]||_0xb59f[2822]!=_0x6b6cx2[_0xb59f[728]]()[_0xb59f[301]]){return mxEvent[_0xb59f[2987]]}};return null};mxEdgeHandler[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null,_0x6b6cx4=this[_0xb59f[2986]](_0x6b6cx3);null!=_0x6b6cx4&&(!_0x6b6cx3[_0xb59f[721]]()&&this[_0xb59f[1179]][_0xb59f[994]]()&&!this[_0xb59f[1179]][_0xb59f[2579]](_0x6b6cx3[_0xb59f[727]]()))&&(this[_0xb59f[2995]]&&this[_0xb59f[3004]](_0x6b6cx3[_0xb59f[727]]())?this[_0xb59f[3012]](this[_0xb59f[724]],_0x6b6cx4):(_0x6b6cx4!=mxEvent[_0xb59f[2987]]||this[_0xb59f[1179]][_0xb59f[2628]](_0x6b6cx3[_0xb59f[736]]()))&&this[_0xb59f[861]](_0x6b6cx3[_0xb59f[730]](),_0x6b6cx3[_0xb59f[732]](),_0x6b6cx4),_0x6b6cx3[_0xb59f[722]]())};mxEdgeHandler[_0xb59f[202]][_0xb59f[861]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[2739]]=_0x6b6cx2;this[_0xb59f[2740]]=_0x6b6cx3;this[_0xb59f[729]]=null==this[_0xb59f[2994]]?!1:0==_0x6b6cx4;this[_0xb59f[3013]]=null==this[_0xb59f[2994]]?!1:_0x6b6cx4==this[_0xb59f[2994]][_0xb59f[67]]-1;this[_0xb59f[3014]]=_0x6b6cx4==mxEvent[_0xb59f[2987]];if(this[_0xb59f[729]]||this[_0xb59f[3013]]){if(_0x6b6cx2=this[_0xb59f[724]][_0xb59f[246]],_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[1709]](_0x6b6cx2,this[_0xb59f[729]]),null==_0x6b6cx3&&this[_0xb59f[1179]][_0xb59f[2661]](_0x6b6cx2,this[_0xb59f[729]])||null!=_0x6b6cx3&&this[_0xb59f[1179]][_0xb59f[2551]](_0x6b6cx2,_0x6b6cx3,this[_0xb59f[729]])){this[_0xb59f[1983]]=_0x6b6cx4}}else {this[_0xb59f[1983]]=_0x6b6cx4}};mxEdgeHandler[_0xb59f[202]][_0xb59f[3015]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[724]][_0xb59f[238]]()};mxEdgeHandler[_0xb59f[202]][_0xb59f[3016]]=function(){return this[_0xb59f[1179]][_0xb59f[1020]]*this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]]/2};mxEdgeHandler[_0xb59f[202]][_0xb59f[2689]]=function(_0x6b6cx2){var _0x6b6cx3= new mxPoint(_0x6b6cx2[_0xb59f[734]](),_0x6b6cx2[_0xb59f[735]]()),_0x6b6cx4=this[_0xb59f[3016]](),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]](),_0x6b6cx9=!1,_0x6b6cxa=!1;if(this[_0xb59f[2996]]&&0<_0x6b6cx4){var _0x6b6cx12=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx5=_0x6b6cx2[_0xb59f[235]];Math[_0xb59f[425]](_0x6b6cx3[_0xb59f[235]]-_0x6b6cx5)<_0x6b6cx4&&(_0x6b6cx3[_0xb59f[235]]=_0x6b6cx5,_0x6b6cx9= !0);_0x6b6cx2=_0x6b6cx2[_0xb59f[236]];Math[_0xb59f[425]](_0x6b6cx3[_0xb59f[236]]-_0x6b6cx2)<_0x6b6cx4&&(_0x6b6cx3[_0xb59f[236]]=_0x6b6cx2,_0x6b6cxa= !0)}},_0x6b6cx13=function(_0x6b6cx2){null!=_0x6b6cx2&&_0x6b6cx12[_0xb59f[239]](this, new mxPoint(_0x6b6cx5[_0xb59f[2230]](_0x6b6cx2),_0x6b6cx5[_0xb59f[2228]](_0x6b6cx2)))};_0x6b6cx13[_0xb59f[239]](this,this[_0xb59f[724]][_0xb59f[2089]](!0));_0x6b6cx13[_0xb59f[239]](this,this[_0xb59f[724]][_0xb59f[2089]](!1));if(null!=this[_0xb59f[2997]]){for(_0x6b6cx13=0;_0x6b6cx13<this[_0xb59f[2997]];_0x6b6cx13++){_0x6b6cx13!=this[_0xb59f[1983]]&&_0x6b6cx12[_0xb59f[239]](this,this[_0xb59f[2997]][_0x6b6cx13])}}};this[_0xb59f[1179]][_0xb59f[1018]](_0x6b6cx2[_0xb59f[727]]())&&(_0x6b6cx2=_0x6b6cx5[_0xb59f[255]],_0x6b6cx13=_0x6b6cx5[_0xb59f[513]],_0x6b6cx9||(_0x6b6cx3[_0xb59f[235]]=(this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx3[_0xb59f[235]]/_0x6b6cx2-_0x6b6cx13[_0xb59f[235]])+_0x6b6cx13[_0xb59f[235]])*_0x6b6cx2),_0x6b6cxa||(_0x6b6cx3[_0xb59f[236]]=(this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx3[_0xb59f[236]]/_0x6b6cx2-_0x6b6cx13[_0xb59f[236]])+_0x6b6cx13[_0xb59f[236]])*_0x6b6cx2));return _0x6b6cx3};mxEdgeHandler[_0xb59f[202]][_0xb59f[3017]]=function(_0x6b6cx2){this[_0xb59f[2886]][_0xb59f[2729]](_0x6b6cx2,this[_0xb59f[729]]);this[_0xb59f[2885]][_0xb59f[2871]](_0x6b6cx2);_0x6b6cx2=this[_0xb59f[2885]][_0xb59f[2868]]();var _0x6b6cx3=null;null!=this[_0xb59f[2886]][_0xb59f[2919]]&&null!=this[_0xb59f[2886]][_0xb59f[2920]]&&this[_0xb59f[2885]][_0xb59f[862]]();null!=_0x6b6cx2?_0x6b6cx3=_0x6b6cx2:null!=this[_0xb59f[2886]][_0xb59f[2920]]&&null!=this[_0xb59f[2886]][_0xb59f[2919]]&&(_0x6b6cx3=this[_0xb59f[2886]][_0xb59f[2919]]);return _0x6b6cx3};mxEdgeHandler[_0xb59f[202]][_0xb59f[3018]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[1198]](this[_0xb59f[724]][_0xb59f[246]]),_0x6b6cx3=null!=_0x6b6cx3[_0xb59f[1525]]?_0x6b6cx3[_0xb59f[1525]][_0xb59f[1853]]():null;!this[_0xb59f[729]]&&!this[_0xb59f[3013]]?(this[_0xb59f[2196]](_0x6b6cx2,!1),null==_0x6b6cx3?_0x6b6cx3=[_0x6b6cx2]:_0x6b6cx3[this[_0xb59f[1983]]-1]=_0x6b6cx2):this[_0xb59f[1179]][_0xb59f[2401]]&&(_0x6b6cx3=null);return _0x6b6cx3};mxEdgeHandler[_0xb59f[202]][_0xb59f[3019]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[729]]?_0x6b6cx4:this[_0xb59f[724]][_0xb59f[2089]](!0),_0x6b6cx9=this[_0xb59f[3013]]?_0x6b6cx4:this[_0xb59f[724]][_0xb59f[2089]](!1),_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[2288]](_0x6b6cx2,_0x6b6cx5,!0),_0x6b6cx12=this[_0xb59f[1179]][_0xb59f[2288]](_0x6b6cx2,_0x6b6cx9,!1),_0x6b6cx13=this[_0xb59f[2886]][_0xb59f[2920]];null==_0x6b6cx13&&(_0x6b6cx13= new mxConnectionConstraint);this[_0xb59f[729]]?_0x6b6cxa=_0x6b6cx13:this[_0xb59f[3013]]&&(_0x6b6cx12=_0x6b6cx13);(!this[_0xb59f[729]]||null!=_0x6b6cx5)&&_0x6b6cx2[_0xb59f[441]][_0xb59f[2289]](_0x6b6cx2,_0x6b6cx5,!0,_0x6b6cxa);(!this[_0xb59f[3013]]||null!=_0x6b6cx9)&&_0x6b6cx2[_0xb59f[441]][_0xb59f[2289]](_0x6b6cx2,_0x6b6cx9,!1,_0x6b6cx12);if((this[_0xb59f[729]]||this[_0xb59f[3013]])&&null==_0x6b6cx4){_0x6b6cx2[_0xb59f[2088]](_0x6b6cx3,this[_0xb59f[729]]),null==this[_0xb59f[2885]][_0xb59f[2869]]()&&(this[_0xb59f[267]]=this[_0xb59f[1179]][_0xb59f[2406]]?null:_0xb59f[110])};_0x6b6cx2[_0xb59f[441]][_0xb59f[2282]](_0x6b6cx2,this[_0xb59f[1525]],_0x6b6cx5,_0x6b6cx9);_0x6b6cx2[_0xb59f[441]][_0xb59f[2283]](_0x6b6cx2,_0x6b6cx5,_0x6b6cx9)};mxEdgeHandler[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=this[_0xb59f[1983]]&&null!=this[_0xb59f[2885]]){var _0x6b6cx4=this[_0xb59f[2689]](_0x6b6cx3);if(this[_0xb59f[3014]]){this[_0xb59f[685]][_0xb59f[235]]=_0x6b6cx4[_0xb59f[235]],this[_0xb59f[685]][_0xb59f[236]]=_0x6b6cx4[_0xb59f[236]]}else {this[_0xb59f[1525]]=this[_0xb59f[3018]](_0x6b6cx4);var _0x6b6cx5=this[_0xb59f[729]]||this[_0xb59f[3013]]?this[_0xb59f[3017]](_0x6b6cx3):null,_0x6b6cx9=this[_0xb59f[3015]](_0x6b6cx4,null!=_0x6b6cx5?_0x6b6cx5[_0xb59f[246]]:null);this[_0xb59f[3019]](_0x6b6cx9,_0x6b6cx4,_0x6b6cx5);this[_0xb59f[3020]](null==this[_0xb59f[267]]?this[_0xb59f[2885]][_0xb59f[2853]]:this[_0xb59f[2885]][_0xb59f[2855]]);this[_0xb59f[2997]]=_0x6b6cx9[_0xb59f[439]];this[_0xb59f[1124]]= !0};this[_0xb59f[2932]]();mxEvent[_0xb59f[722]](_0x6b6cx3[_0xb59f[727]]());_0x6b6cx3[_0xb59f[722]]()}else {mxClient[_0xb59f[80]]&&null!=this[_0xb59f[2986]](_0x6b6cx3)&&_0x6b6cx3[_0xb59f[722]](!1)}};mxEdgeHandler[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){if(null!=this[_0xb59f[1983]]&&null!=this[_0xb59f[2885]]){var _0x6b6cx4=this[_0xb59f[724]][_0xb59f[246]];if(_0x6b6cx3[_0xb59f[730]]()!=this[_0xb59f[2739]]||_0x6b6cx3[_0xb59f[732]]()!=this[_0xb59f[2740]]){if(null!=this[_0xb59f[267]]){0<this[_0xb59f[267]][_0xb59f[67]]&&this[_0xb59f[1179]][_0xb59f[2580]](this[_0xb59f[267]])}else {if(this[_0xb59f[3014]]){this[_0xb59f[3021]](this[_0xb59f[724]],this[_0xb59f[685]][_0xb59f[235]],this[_0xb59f[685]][_0xb59f[236]])}else {if(this[_0xb59f[729]]||this[_0xb59f[3013]]){var _0x6b6cx5=null;null!=this[_0xb59f[2886]][_0xb59f[2920]]&&null!=this[_0xb59f[2886]][_0xb59f[2919]]&&(_0x6b6cx5=this[_0xb59f[2886]][_0xb59f[2919]][_0xb59f[246]]);null==_0x6b6cx5&&this[_0xb59f[2885]][_0xb59f[2867]]()&&(_0x6b6cx5=this[_0xb59f[2885]][_0xb59f[2861]][_0xb59f[246]]);if(null!=_0x6b6cx5){_0x6b6cx4=this[_0xb59f[807]](_0x6b6cx4,_0x6b6cx5,this[_0xb59f[729]],this[_0xb59f[1179]][_0xb59f[2574]](_0x6b6cx3[_0xb59f[727]]())&&this[_0xb59f[2797]]&&this[_0xb59f[1179]][_0xb59f[2617]](),_0x6b6cx3)}else {if(this[_0xb59f[1179]][_0xb59f[2530]]()){_0x6b6cx5=this[_0xb59f[2997]][this[_0xb59f[729]]?0:this[_0xb59f[2997]][_0xb59f[67]]-1];_0x6b6cx5[_0xb59f[235]]=_0x6b6cx5[_0xb59f[235]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]]-this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[513]][_0xb59f[235]];_0x6b6cx5[_0xb59f[236]]=_0x6b6cx5[_0xb59f[236]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]]-this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[513]][_0xb59f[236]];var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx4));null!=_0x6b6cx9&&(_0x6b6cx5[_0xb59f[235]]-=_0x6b6cx9[_0xb59f[2078]][_0xb59f[235]],_0x6b6cx5[_0xb59f[236]]-=_0x6b6cx9[_0xb59f[2078]][_0xb59f[236]]);_0x6b6cx5[_0xb59f[235]]-=this[_0xb59f[1179]][_0xb59f[1136]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]];_0x6b6cx5[_0xb59f[236]]-=this[_0xb59f[1179]][_0xb59f[1137]]/this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]];this[_0xb59f[3022]](_0x6b6cx4,_0x6b6cx5,this[_0xb59f[729]])}}}else {this[_0xb59f[1124]]?this[_0xb59f[3023]](_0x6b6cx4,this[_0xb59f[1525]]):(this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[2263]](this[_0xb59f[724]][_0xb59f[246]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[2259]](this[_0xb59f[724]][_0xb59f[246]]))}}}};null!=this[_0xb59f[2885]]&&(this[_0xb59f[862]](),_0x6b6cx4!=this[_0xb59f[724]][_0xb59f[246]]&&this[_0xb59f[1179]][_0xb59f[2450]](_0x6b6cx4));_0x6b6cx3[_0xb59f[722]]()}};mxEdgeHandler[_0xb59f[202]][_0xb59f[862]]=function(){this[_0xb59f[1525]]=this[_0xb59f[685]]=this[_0xb59f[1983]]=this[_0xb59f[267]]=null;this[_0xb59f[3013]]=this[_0xb59f[729]]=this[_0xb59f[3014]]=this[_0xb59f[1124]]= !1;this[_0xb59f[2885]][_0xb59f[862]]();this[_0xb59f[2886]][_0xb59f[862]]();this[_0xb59f[3020]](mxConstants.EDGE_SELECTION_COLOR);this[_0xb59f[258]]()};mxEdgeHandler[_0xb59f[202]][_0xb59f[3020]]=function(_0x6b6cx2){null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[1336]]=_0x6b6cx2)};mxEdgeHandler[_0xb59f[202]][_0xb59f[2196]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[518]](),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[512]]();_0x6b6cx3&&(_0x6b6cx2[_0xb59f[235]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[235]]),_0x6b6cx2[_0xb59f[236]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[236]]));_0x6b6cx2[_0xb59f[235]]=Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[235]]/_0x6b6cx4-_0x6b6cx5[_0xb59f[235]]);_0x6b6cx2[_0xb59f[236]]=Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[236]]/_0x6b6cx4-_0x6b6cx5[_0xb59f[236]]);_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1197]](this[_0xb59f[724]][_0xb59f[246]]));null!=_0x6b6cx4&&(_0x6b6cx2[_0xb59f[235]]-=_0x6b6cx4[_0xb59f[2078]][_0xb59f[235]],_0x6b6cx2[_0xb59f[236]]-=_0x6b6cx4[_0xb59f[2078]][_0xb59f[236]]);return _0x6b6cx2};mxEdgeHandler[_0xb59f[202]][_0xb59f[3021]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx9=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx2[_0xb59f[246]]);if(null!=_0x6b6cx9){var _0x6b6cx9=_0x6b6cx9[_0xb59f[238]](),_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[2308]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);_0x6b6cx9[_0xb59f[235]]=_0x6b6cxa[_0xb59f[235]];_0x6b6cx9[_0xb59f[236]]=_0x6b6cxa[_0xb59f[236]];var _0x6b6cx12=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]];_0x6b6cx9[_0xb59f[1368]]= new mxPoint(0,0);_0x6b6cxa=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[245]](_0x6b6cx2,_0x6b6cx9);_0x6b6cx9[_0xb59f[1368]]= new mxPoint((_0x6b6cx3-_0x6b6cxa[_0xb59f[235]])/_0x6b6cx12,(_0x6b6cx4-_0x6b6cxa[_0xb59f[236]])/_0x6b6cx12);_0x6b6cx5[_0xb59f[1724]](_0x6b6cx2[_0xb59f[246]],_0x6b6cx9)}};mxEdgeHandler[_0xb59f[202]][_0xb59f[807]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx9=this[_0xb59f[1179]][_0xb59f[502]]();var _0x6b6cxa=_0x6b6cx9[_0xb59f[1197]](_0x6b6cx2);_0x6b6cx9[_0xb59f[473]]();try{if(_0x6b6cx5){var _0x6b6cx12=_0x6b6cx2[_0xb59f[238]]();_0x6b6cx9[_0xb59f[99]](_0x6b6cxa,_0x6b6cx12,_0x6b6cx9[_0xb59f[262]](_0x6b6cxa));var _0x6b6cx13=_0x6b6cx9[_0xb59f[1709]](_0x6b6cx2,!_0x6b6cx4);this[_0xb59f[1179]][_0xb59f[851]](_0x6b6cx12,_0x6b6cx13,!_0x6b6cx4);_0x6b6cx2=_0x6b6cx12};var _0x6b6cx14=this[_0xb59f[2886]][_0xb59f[2920]];null==_0x6b6cx14&&(_0x6b6cx14= new mxConnectionConstraint);this[_0xb59f[1179]][_0xb59f[851]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx14)}finally{_0x6b6cx9[_0xb59f[476]]()};return _0x6b6cx2};mxEdgeHandler[_0xb59f[202]][_0xb59f[3022]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx9=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx2);if(null!=_0x6b6cx9){_0x6b6cx5[_0xb59f[473]]();try{_0x6b6cx9=_0x6b6cx9[_0xb59f[238]](),_0x6b6cx9[_0xb59f[2007]](_0x6b6cx3,_0x6b6cx4),_0x6b6cx5[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx9),this[_0xb59f[1179]][_0xb59f[851]](_0x6b6cx2,null,_0x6b6cx4, new mxConnectionConstraint)}finally{_0x6b6cx5[_0xb59f[476]]()}}};mxEdgeHandler[_0xb59f[202]][_0xb59f[3023]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx5=_0x6b6cx4[_0xb59f[1721]](_0x6b6cx2);null!=_0x6b6cx5&&(_0x6b6cx5=_0x6b6cx5[_0xb59f[238]](),_0x6b6cx5[_0xb59f[1525]]=_0x6b6cx3,_0x6b6cx4[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx5))};mxEdgeHandler[_0xb59f[202]][_0xb59f[3000]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=mxUtils[_0xb59f[2196]](this[_0xb59f[1179]][_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx3),mxEvent[_0xb59f[733]](_0x6b6cx3)),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1018]](_0x6b6cx3);this[_0xb59f[2196]](_0x6b6cx4,_0x6b6cx5);this[_0xb59f[3024]](_0x6b6cx2,_0x6b6cx4[_0xb59f[235]],_0x6b6cx4[_0xb59f[236]]);mxEvent[_0xb59f[722]](_0x6b6cx3)};mxEdgeHandler[_0xb59f[202]][_0xb59f[3024]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx2[_0xb59f[246]]);_0x6b6cx3= new mxPoint(_0x6b6cx3,_0x6b6cx4);if(null!=_0x6b6cx5){_0x6b6cx5=_0x6b6cx5[_0xb59f[238]]();_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[513]];var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[441]][_0xb59f[255]];_0x6b6cx4=mxUtils[_0xb59f[3025]](_0x6b6cx2,(_0x6b6cx3[_0xb59f[235]]+_0x6b6cx4[_0xb59f[235]])*_0x6b6cx9,(_0x6b6cx3[_0xb59f[236]]+_0x6b6cx4[_0xb59f[236]])*_0x6b6cx9);null==_0x6b6cx5[_0xb59f[1525]]?_0x6b6cx5[_0xb59f[1525]]=[_0x6b6cx3]:_0x6b6cx5[_0xb59f[1525]][_0xb59f[300]](_0x6b6cx4,0,_0x6b6cx3);this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1724]](_0x6b6cx2[_0xb59f[246]],_0x6b6cx5);this[_0xb59f[515]]();this[_0xb59f[176]]()}};mxEdgeHandler[_0xb59f[202]][_0xb59f[3012]]=function(_0x6b6cx2,_0x6b6cx3){if(0<_0x6b6cx3&&_0x6b6cx3<this[_0xb59f[2997]][_0xb59f[67]]-1){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[1198]](this[_0xb59f[724]][_0xb59f[246]]);null!=_0x6b6cx4&&null!=_0x6b6cx4[_0xb59f[1525]]&&(_0x6b6cx4=_0x6b6cx4[_0xb59f[238]](),_0x6b6cx4[_0xb59f[1525]][_0xb59f[300]](_0x6b6cx3-1,1),this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1724]](_0x6b6cx2[_0xb59f[246]],_0x6b6cx4),this[_0xb59f[515]](),this[_0xb59f[176]]())}};mxEdgeHandler[_0xb59f[202]][_0xb59f[3026]]=function(_0x6b6cx2){_0x6b6cx2=0==_0x6b6cx2;var _0x6b6cx3=this[_0xb59f[724]][_0xb59f[246]],_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1709]](_0x6b6cx3,_0x6b6cx2),_0x6b6cx5=mxConstants[_0xb59f[2984]];null!=_0x6b6cx4&&!this[_0xb59f[1179]][_0xb59f[2551]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx2)||null==_0x6b6cx4&&!this[_0xb59f[1179]][_0xb59f[2661]](_0x6b6cx3,_0x6b6cx2)?_0x6b6cx5=mxConstants[_0xb59f[3027]]:null!=_0x6b6cx4&&this[_0xb59f[1179]][_0xb59f[2551]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx2)&&(_0x6b6cx5=mxConstants[_0xb59f[3028]]);return _0x6b6cx5};mxEdgeHandler[_0xb59f[202]][_0xb59f[258]]=function(){this[_0xb59f[2997]]=this[_0xb59f[724]][_0xb59f[439]][_0xb59f[1853]]();var _0x6b6cx2=this[_0xb59f[724]][_0xb59f[246]],_0x6b6cx3=mxConstants[_0xb59f[3029]];this[_0xb59f[685]]= new mxPoint(this[_0xb59f[724]][_0xb59f[2079]][_0xb59f[235]],this[_0xb59f[724]][_0xb59f[2079]][_0xb59f[236]]);this[_0xb59f[2972]][_0xb59f[1562]]= new mxRectangle(Math[_0xb59f[488]](this[_0xb59f[685]][_0xb59f[235]]-_0x6b6cx3/2),Math[_0xb59f[488]](this[_0xb59f[685]][_0xb59f[236]]-_0x6b6cx3/2),_0x6b6cx3,_0x6b6cx3);this[_0xb59f[2972]][_0xb59f[258]]();_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[2183]](_0x6b6cx2);null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]&&this[_0xb59f[1179]][_0xb59f[2628]](_0x6b6cx2)?this[_0xb59f[2972]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189]:this[_0xb59f[2972]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188];if(null!=this[_0xb59f[2994]]&&0<this[_0xb59f[2994]][_0xb59f[67]]){var _0x6b6cx4=this[_0xb59f[2997]][_0xb59f[67]]-1,_0x6b6cx2=this[_0xb59f[2997]][0],_0x6b6cx5=this[_0xb59f[2997]][0][_0xb59f[236]],_0x6b6cx3=this[_0xb59f[2994]][0][_0xb59f[1562]];this[_0xb59f[2994]][0][_0xb59f[1562]]= new mxRectangle(Math[_0xb59f[488]](this[_0xb59f[2997]][0][_0xb59f[235]]-_0x6b6cx3[_0xb59f[117]]/2),Math[_0xb59f[488]](_0x6b6cx5-_0x6b6cx3[_0xb59f[119]]/2),_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]]);this[_0xb59f[2994]][0][_0xb59f[1334]]=this[_0xb59f[3026]](0);this[_0xb59f[2994]][0][_0xb59f[258]]();var _0x6b6cx5=this[_0xb59f[2997]][_0x6b6cx4],_0x6b6cx9=this[_0xb59f[2997]][_0x6b6cx4][_0xb59f[235]],_0x6b6cx4=this[_0xb59f[2997]][_0x6b6cx4][_0xb59f[236]],_0x6b6cxa=this[_0xb59f[2994]][_0xb59f[67]]-1,_0x6b6cx3=this[_0xb59f[2994]][_0x6b6cxa][_0xb59f[1562]];this[_0xb59f[2994]][_0x6b6cxa][_0xb59f[1562]]= new mxRectangle(Math[_0xb59f[488]](_0x6b6cx9-_0x6b6cx3[_0xb59f[117]]/2),Math[_0xb59f[488]](_0x6b6cx4-_0x6b6cx3[_0xb59f[119]]/2),_0x6b6cx3[_0xb59f[117]],_0x6b6cx3[_0xb59f[119]]);this[_0xb59f[2994]][_0x6b6cxa][_0xb59f[1334]]=this[_0xb59f[3026]](_0x6b6cxa);this[_0xb59f[2994]][_0x6b6cxa][_0xb59f[258]]();this[_0xb59f[3030]](_0x6b6cx2,_0x6b6cx5)};this[_0xb59f[2932]]()};mxEdgeHandler[_0xb59f[202]][_0xb59f[3030]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1721]](this[_0xb59f[724]][_0xb59f[246]])[_0xb59f[1525]];if(null!=_0x6b6cx4){null==this[_0xb59f[1525]]&&(this[_0xb59f[1525]]=[]);for(var _0x6b6cx5=1;_0x6b6cx5<this[_0xb59f[2994]][_0xb59f[67]]-1;_0x6b6cx5++){if(null!=this[_0xb59f[2994]][_0x6b6cx5]){if(null!=this[_0xb59f[2997]][_0x6b6cx5]){var _0x6b6cx9=this[_0xb59f[2997]][_0x6b6cx5][_0xb59f[235]],_0x6b6cxa=this[_0xb59f[2997]][_0x6b6cx5][_0xb59f[236]],_0x6b6cx12=this[_0xb59f[2994]][_0x6b6cx5][_0xb59f[1562]];this[_0xb59f[2994]][_0x6b6cx5][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[189];this[_0xb59f[2994]][_0x6b6cx5][_0xb59f[1562]]= new mxRectangle(Math[_0xb59f[488]](_0x6b6cx9-_0x6b6cx12[_0xb59f[117]]/2),Math[_0xb59f[488]](_0x6b6cxa-_0x6b6cx12[_0xb59f[119]]/2),_0x6b6cx12[_0xb59f[117]],_0x6b6cx12[_0xb59f[119]]);this[_0xb59f[2994]][_0x6b6cx5][_0xb59f[258]]();this[_0xb59f[1525]][_0x6b6cx5-1]=_0x6b6cx4[_0x6b6cx5-1]}else {this[_0xb59f[2994]][_0x6b6cx5][_0xb59f[515]](),this[_0xb59f[2994]][_0x6b6cx5]=null}}}}};mxEdgeHandler[_0xb59f[202]][_0xb59f[2932]]=function(){if(this[_0xb59f[3014]]){var _0x6b6cx2=mxConstants[_0xb59f[3029]],_0x6b6cx2= new mxRectangle(Math[_0xb59f[488]](this[_0xb59f[685]][_0xb59f[235]]-_0x6b6cx2/2),Math[_0xb59f[488]](this[_0xb59f[685]][_0xb59f[236]]-_0x6b6cx2/2),_0x6b6cx2,_0x6b6cx2);this[_0xb59f[2972]][_0xb59f[1562]]=_0x6b6cx2;this[_0xb59f[2972]][_0xb59f[258]]()}else {this[_0xb59f[253]][_0xb59f[1525]]=this[_0xb59f[2997]],this[_0xb59f[253]][_0xb59f[258]]()}};mxEdgeHandler[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[2885]]&&(this[_0xb59f[2885]][_0xb59f[515]](),this[_0xb59f[2885]]=null);null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[515]](),this[_0xb59f[253]]=null);null!=this[_0xb59f[2972]]&&(this[_0xb59f[2972]][_0xb59f[515]](),this[_0xb59f[2972]]=null);null!=this[_0xb59f[2886]]&&(this[_0xb59f[2886]][_0xb59f[515]](),this[_0xb59f[2886]]=null);if(null!=this[_0xb59f[2994]]){for(var _0x6b6cx2=0;_0x6b6cx2<this[_0xb59f[2994]][_0xb59f[67]];_0x6b6cx2++){null!=this[_0xb59f[2994]][_0x6b6cx2]&&(this[_0xb59f[2994]][_0x6b6cx2][_0xb59f[515]](),this[_0xb59f[2994]][_0x6b6cx2]=null)}}};function mxElbowEdgeHandler(_0x6b6cx2){mxEdgeHandler[_0xb59f[239]](this,_0x6b6cx2)}mxUtils[_0xb59f[1284]](mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler[_0xb59f[202]]= new mxEdgeHandler;mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[196]]=mxElbowEdgeHandler;mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3031]]= !0;mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3032]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[3033]:_0xb59f[110];mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3001]]=function(){var _0x6b6cx2=[],_0x6b6cx3=this[_0xb59f[3009]](0);this[_0xb59f[3002]](_0x6b6cx3);_0x6b6cx3[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[3011]];mxEvent[_0xb59f[2733]](_0x6b6cx3[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);_0x6b6cx2[_0xb59f[207]](_0x6b6cx3);mxClient[_0xb59f[754]]&&_0x6b6cx3[_0xb59f[252]][_0xb59f[57]](_0xb59f[1377],_0xb59f[130]);_0x6b6cx2[_0xb59f[207]](this[_0xb59f[3034]]());this[_0xb59f[1525]][_0xb59f[207]]( new mxPoint(0,0));_0x6b6cx3=this[_0xb59f[3009]](2);this[_0xb59f[3002]](_0x6b6cx3);_0x6b6cx3[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[3011]];mxEvent[_0xb59f[2733]](_0x6b6cx3[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);_0x6b6cx2[_0xb59f[207]](_0x6b6cx3);mxClient[_0xb59f[754]]&&_0x6b6cx3[_0xb59f[252]][_0xb59f[57]](_0xb59f[1377],_0xb59f[130]);return _0x6b6cx2};mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3034]]=function(){var _0x6b6cx2=this[_0xb59f[3009]]();this[_0xb59f[3002]](_0x6b6cx2);var _0x6b6cx3=this[_0xb59f[3035]]();_0x6b6cx2[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=_0x6b6cx3;_0x6b6cx3=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){!mxEvent[_0xb59f[721]](_0x6b6cx2)&&this[_0xb59f[3031]]&&(this[_0xb59f[1179]][_0xb59f[854]](this[_0xb59f[724]][_0xb59f[246]],_0x6b6cx2),mxEvent[_0xb59f[722]](_0x6b6cx2))});mxEvent[_0xb59f[2733]](_0x6b6cx2[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]],null,null,null,_0x6b6cx3);this[_0xb59f[1179]][_0xb59f[2662]](this[_0xb59f[724]][_0xb59f[246]])||(_0x6b6cx2[_0xb59f[252]][_0xb59f[124]][_0xb59f[495]]=_0xb59f[130]);return _0x6b6cx2};mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3035]]=function(){return this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2294]]]==mxEdgeStyle[_0xb59f[2570]]||this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2294]]]==mxConstants[_0xb59f[3036]]||(this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2294]]]==mxEdgeStyle[_0xb59f[2568]]||this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2294]]]==mxConstants[_0xb59f[3037]])&&this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2231]]]==mxConstants[_0xb59f[2232]]?_0xb59f[3038]:_0xb59f[3039]};mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[2597]]=function(_0x6b6cx2){var _0x6b6cx3=null;if(null!=this[_0xb59f[2994]]&&null!=this[_0xb59f[2994]][1]&&(_0x6b6cx2==this[_0xb59f[2994]][1][_0xb59f[252]]||_0x6b6cx2[_0xb59f[265]]==this[_0xb59f[2994]][1][_0xb59f[252]])){_0x6b6cx3=this[_0xb59f[3032]],_0x6b6cx3=mxResources[_0xb59f[203]](_0x6b6cx3)||_0x6b6cx3};return _0x6b6cx3};mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[2196]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[518]](),_0x6b6cx5=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[512]](),_0x6b6cx9=this[_0xb59f[724]][_0xb59f[2078]];_0x6b6cx3&&(_0x6b6cx2[_0xb59f[235]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[235]]),_0x6b6cx2[_0xb59f[236]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx2[_0xb59f[236]]));_0x6b6cx2[_0xb59f[235]]=Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[235]]/_0x6b6cx4-_0x6b6cx5[_0xb59f[235]]-_0x6b6cx9[_0xb59f[235]]);_0x6b6cx2[_0xb59f[236]]=Math[_0xb59f[488]](_0x6b6cx2[_0xb59f[236]]/_0x6b6cx4-_0x6b6cx5[_0xb59f[236]]-_0x6b6cx9[_0xb59f[236]])};mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3030]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1721]](this[_0xb59f[724]][_0xb59f[246]])[_0xb59f[1525]],_0x6b6cx4=null!=_0x6b6cx4?_0x6b6cx4[0]:null,_0x6b6cx4=null==_0x6b6cx4? new mxPoint(_0x6b6cx2[_0xb59f[235]]+(_0x6b6cx3[_0xb59f[235]]-_0x6b6cx2[_0xb59f[235]])/2,_0x6b6cx2[_0xb59f[236]]+(_0x6b6cx3[_0xb59f[236]]-_0x6b6cx2[_0xb59f[236]])/2): new mxPoint(this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]]*(_0x6b6cx4[_0xb59f[235]]+this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[513]][_0xb59f[235]]+this[_0xb59f[724]][_0xb59f[2078]][_0xb59f[235]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]]*(_0x6b6cx4[_0xb59f[236]]+this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[513]][_0xb59f[236]]+this[_0xb59f[724]][_0xb59f[2078]][_0xb59f[236]])),_0x6b6cx5=this[_0xb59f[2994]][1][_0xb59f[1562]],_0x6b6cx9=_0x6b6cx5[_0xb59f[117]],_0x6b6cx5=_0x6b6cx5[_0xb59f[119]];null==this[_0xb59f[2959]]&&(_0x6b6cx5=_0x6b6cx9=mxConstants[_0xb59f[2974]]);var _0x6b6cxa= new mxRectangle(Math[_0xb59f[488]](_0x6b6cx4[_0xb59f[235]]-_0x6b6cx9/2),Math[_0xb59f[488]](_0x6b6cx4[_0xb59f[236]]-_0x6b6cx5/2),_0x6b6cx9,_0x6b6cx5);null==this[_0xb59f[2959]]&&(_0xb59f[188]!=this[_0xb59f[2972]][_0xb59f[252]][_0xb59f[124]][_0xb59f[187]]&&mxUtils[_0xb59f[1825]](_0x6b6cxa,this[_0xb59f[2972]][_0xb59f[1562]]))&&(_0x6b6cx9+=3,_0x6b6cx5+=3,_0x6b6cxa= new mxRectangle(Math[_0xb59f[488]](_0x6b6cx4[_0xb59f[235]]-_0x6b6cx9/2),Math[_0xb59f[488]](_0x6b6cx4[_0xb59f[236]]-_0x6b6cx5/2),_0x6b6cx9,_0x6b6cx5));this[_0xb59f[2994]][1][_0xb59f[1562]]=_0x6b6cxa;this[_0xb59f[2994]][1][_0xb59f[258]]()};function mxEdgeSegmentHandler(_0x6b6cx2){mxEdgeHandler[_0xb59f[239]](this,_0x6b6cx2)}mxUtils[_0xb59f[1284]](mxEdgeSegmentHandler,mxEdgeHandler);mxEdgeSegmentHandler[_0xb59f[202]]= new mxElbowEdgeHandler;mxEdgeSegmentHandler[_0xb59f[202]][_0xb59f[196]]=mxEdgeSegmentHandler;mxEdgeSegmentHandler[_0xb59f[202]][_0xb59f[3018]]=function(_0x6b6cx2){if(this[_0xb59f[729]]||this[_0xb59f[3013]]){return mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3018]][_0xb59f[183]](this,arguments)};this[_0xb59f[2196]](_0x6b6cx2,!1);var _0x6b6cx3=this[_0xb59f[724]][_0xb59f[439]],_0x6b6cx4=_0x6b6cx3[0][_0xb59f[238]]();this[_0xb59f[2196]](_0x6b6cx4,!1);for(var _0x6b6cx5=[],_0x6b6cx9=1;_0x6b6cx9<_0x6b6cx3[_0xb59f[67]];_0x6b6cx9++){var _0x6b6cxa=_0x6b6cx3[_0x6b6cx9][_0xb59f[238]]();this[_0xb59f[2196]](_0x6b6cxa,!1);_0x6b6cx9==this[_0xb59f[1983]]&&(_0x6b6cx4[_0xb59f[235]]==_0x6b6cxa[_0xb59f[235]]?(_0x6b6cx4[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]],_0x6b6cxa[_0xb59f[235]]=_0x6b6cx2[_0xb59f[235]]):(_0x6b6cx4[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]],_0x6b6cxa[_0xb59f[236]]=_0x6b6cx2[_0xb59f[236]]));_0x6b6cx9<_0x6b6cx3[_0xb59f[67]]-1&&_0x6b6cx5[_0xb59f[207]](_0x6b6cxa);_0x6b6cx4=_0x6b6cxa};if(1==_0x6b6cx5[_0xb59f[67]]){if(_0x6b6cx4=this[_0xb59f[724]][_0xb59f[441]],_0x6b6cx9=this[_0xb59f[724]][_0xb59f[2089]](!0),_0x6b6cxa=this[_0xb59f[724]][_0xb59f[2089]](!1),null!=_0x6b6cxa&null!=_0x6b6cx9){var _0x6b6cx12=this[_0xb59f[724]][_0xb59f[2078]][_0xb59f[235]],_0x6b6cx13=this[_0xb59f[724]][_0xb59f[2078]][_0xb59f[236]];mxUtils[_0xb59f[442]](_0x6b6cxa,_0x6b6cx5[0][_0xb59f[235]]+_0x6b6cx12,_0x6b6cx5[0][_0xb59f[236]]+_0x6b6cx13)?_0x6b6cx3[1][_0xb59f[236]]==_0x6b6cx3[2][_0xb59f[236]]?_0x6b6cx5[0][_0xb59f[236]]=_0x6b6cx4[_0xb59f[2228]](_0x6b6cx9)-_0x6b6cx13:_0x6b6cx5[0][_0xb59f[235]]=_0x6b6cx4[_0xb59f[2230]](_0x6b6cx9)-_0x6b6cx12:mxUtils[_0xb59f[442]](_0x6b6cx9,_0x6b6cx5[0][_0xb59f[235]]+_0x6b6cx12,_0x6b6cx5[0][_0xb59f[236]]+_0x6b6cx13)&&(_0x6b6cx3[1][_0xb59f[236]]==_0x6b6cx3[0][_0xb59f[236]]?_0x6b6cx5[0][_0xb59f[236]]=_0x6b6cx4[_0xb59f[2228]](_0x6b6cxa)-_0x6b6cx13:_0x6b6cx5[0][_0xb59f[235]]=_0x6b6cx4[_0xb59f[2230]](_0x6b6cxa)-_0x6b6cx12)}}else {0==_0x6b6cx5[_0xb59f[67]]&&(_0x6b6cx5=[_0x6b6cx2])};return _0x6b6cx5};mxEdgeSegmentHandler[_0xb59f[202]][_0xb59f[3001]]=function(){var _0x6b6cx2=[],_0x6b6cx3=this[_0xb59f[3009]](0);this[_0xb59f[3002]](_0x6b6cx3);_0x6b6cx3[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[3011]];mxEvent[_0xb59f[2733]](_0x6b6cx3[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);_0x6b6cx2[_0xb59f[207]](_0x6b6cx3);mxClient[_0xb59f[754]]&&_0x6b6cx3[_0xb59f[252]][_0xb59f[57]](_0xb59f[1377],_0xb59f[130]);var _0x6b6cx4=this[_0xb59f[724]][_0xb59f[439]];if(this[_0xb59f[1179]][_0xb59f[2662]](this[_0xb59f[724]][_0xb59f[246]])){null==this[_0xb59f[1525]]&&(this[_0xb59f[1525]]=[]);for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4[_0xb59f[67]]-1;_0x6b6cx5++){_0x6b6cx3=this[_0xb59f[3034]](),_0x6b6cx2[_0xb59f[207]](_0x6b6cx3),_0x6b6cx3[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=0==_0x6b6cx4[_0x6b6cx5][_0xb59f[235]]-_0x6b6cx4[_0x6b6cx5+1][_0xb59f[235]]?_0xb59f[3039]:_0xb59f[3038],this[_0xb59f[1525]][_0xb59f[207]]( new mxPoint(0,0)),mxClient[_0xb59f[754]]&&_0x6b6cx3[_0xb59f[252]][_0xb59f[57]](_0xb59f[1377],_0xb59f[130])}};_0x6b6cx3=this[_0xb59f[3009]](_0x6b6cx4[_0xb59f[67]]);this[_0xb59f[3002]](_0x6b6cx3);_0x6b6cx3[_0xb59f[252]][_0xb59f[124]][_0xb59f[270]]=mxConstants[_0xb59f[3011]];mxEvent[_0xb59f[2733]](_0x6b6cx3[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);_0x6b6cx2[_0xb59f[207]](_0x6b6cx3);mxClient[_0xb59f[754]]&&_0x6b6cx3[_0xb59f[252]][_0xb59f[57]](_0xb59f[1377],_0xb59f[130]);return _0x6b6cx2};mxEdgeSegmentHandler[_0xb59f[202]][_0xb59f[258]]=function(){this[_0xb59f[802]]();mxEdgeHandler[_0xb59f[202]][_0xb59f[258]][_0xb59f[183]](this,arguments)};mxEdgeSegmentHandler[_0xb59f[202]][_0xb59f[802]]=function(){if(null!=this[_0xb59f[2994]]){for(var _0x6b6cx2=0;_0x6b6cx2<this[_0xb59f[2994]][_0xb59f[67]];_0x6b6cx2++){null!=this[_0xb59f[2994]][_0x6b6cx2]&&(this[_0xb59f[2994]][_0x6b6cx2][_0xb59f[515]](),this[_0xb59f[2994]][_0x6b6cx2]=null)};this[_0xb59f[2994]]=this[_0xb59f[3001]]()}};mxEdgeSegmentHandler[_0xb59f[202]][_0xb59f[3030]]=function(_0x6b6cx2,_0x6b6cx3){if(this[_0xb59f[1179]][_0xb59f[2662]](this[_0xb59f[724]][_0xb59f[246]])){var _0x6b6cx4=mxConstants[_0xb59f[2974]],_0x6b6cx5=this[_0xb59f[724]][_0xb59f[439]];if(null!=_0x6b6cx5&&1<_0x6b6cx5[_0xb59f[67]]){for(var _0x6b6cx9=0;_0x6b6cx9<this[_0xb59f[724]][_0xb59f[439]][_0xb59f[67]]-1;_0x6b6cx9++){if(null!=this[_0xb59f[2994]][_0x6b6cx9+1]){_0x6b6cx2=_0x6b6cx5[_0x6b6cx9];_0x6b6cx3=_0x6b6cx5[_0x6b6cx9+1];var _0x6b6cxa= new mxPoint(_0x6b6cx2[_0xb59f[235]]+(_0x6b6cx3[_0xb59f[235]]-_0x6b6cx2[_0xb59f[235]])/2,_0x6b6cx2[_0xb59f[236]]+(_0x6b6cx3[_0xb59f[236]]-_0x6b6cx2[_0xb59f[236]])/2);this[_0xb59f[2994]][_0x6b6cx9+1][_0xb59f[1562]]= new mxRectangle(Math[_0xb59f[488]](_0x6b6cxa[_0xb59f[235]]-_0x6b6cx4/2),Math[_0xb59f[488]](_0x6b6cxa[_0xb59f[236]]-_0x6b6cx4/2),_0x6b6cx4,_0x6b6cx4);this[_0xb59f[2994]][_0x6b6cx9+1][_0xb59f[258]]()}}}}};mxEdgeSegmentHandler[_0xb59f[202]][_0xb59f[3023]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=[];var _0x6b6cx4=this[_0xb59f[2997]];if(1<_0x6b6cx4[_0xb59f[67]]){for(var _0x6b6cx5=_0x6b6cx4[0],_0x6b6cx9=_0x6b6cx4[1],_0x6b6cxa=2;_0x6b6cxa<_0x6b6cx4[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx4[_0x6b6cxa];if((Math[_0xb59f[488]](_0x6b6cx5[_0xb59f[235]])!=Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[235]])||Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[235]])!=Math[_0xb59f[488]](_0x6b6cx12[_0xb59f[235]]))&&(Math[_0xb59f[488]](_0x6b6cx5[_0xb59f[236]])!=Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[236]])||Math[_0xb59f[488]](_0x6b6cx9[_0xb59f[236]])!=Math[_0xb59f[488]](_0x6b6cx12[_0xb59f[236]]))){_0x6b6cx5=_0x6b6cx9,_0x6b6cx9=_0x6b6cx9[_0xb59f[238]](),this[_0xb59f[2196]](_0x6b6cx9,!1),_0x6b6cx3[_0xb59f[207]](_0x6b6cx9)};_0x6b6cx9=_0x6b6cx12}};mxElbowEdgeHandler[_0xb59f[202]][_0xb59f[3023]][_0xb59f[183]](this,arguments)};function mxKeyHandler(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2&&(this[_0xb59f[1179]]=_0x6b6cx2,this[_0xb59f[772]]=_0x6b6cx3||document[_0xb59f[158]],this[_0xb59f[3040]]=[],this[_0xb59f[3041]]=[],this[_0xb59f[3042]]=[],this[_0xb59f[3043]]=[],mxEvent[_0xb59f[169]](this[_0xb59f[772]],_0xb59f[2123],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[3044]](_0x6b6cx2)})),mxClient[_0xb59f[80]]&&mxEvent[_0xb59f[169]](window,_0xb59f[2428],mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[515]]()})))}mxKeyHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxKeyHandler[_0xb59f[202]][_0xb59f[772]]=null;mxKeyHandler[_0xb59f[202]][_0xb59f[3040]]=null;mxKeyHandler[_0xb59f[202]][_0xb59f[3041]]=null;mxKeyHandler[_0xb59f[202]][_0xb59f[3042]]=null;mxKeyHandler[_0xb59f[202]][_0xb59f[3043]]=null;mxKeyHandler[_0xb59f[202]][_0xb59f[984]]= !0;mxKeyHandler[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxKeyHandler[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxKeyHandler[_0xb59f[202]][_0xb59f[3045]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3040]][_0x6b6cx2]=_0x6b6cx3};mxKeyHandler[_0xb59f[202]][_0xb59f[3046]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3041]][_0x6b6cx2]=_0x6b6cx3};mxKeyHandler[_0xb59f[202]][_0xb59f[3047]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3042]][_0x6b6cx2]=_0x6b6cx3};mxKeyHandler[_0xb59f[202]][_0xb59f[3048]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3043]][_0x6b6cx2]=_0x6b6cx3};mxKeyHandler[_0xb59f[202]][_0xb59f[775]]=function(_0x6b6cx2){return mxEvent[_0xb59f[775]](_0x6b6cx2)};mxKeyHandler[_0xb59f[202]][_0xb59f[3049]]=function(_0x6b6cx2){return null!=_0x6b6cx2?this[_0xb59f[775]](_0x6b6cx2)?mxEvent[_0xb59f[774]](_0x6b6cx2)?this[_0xb59f[3043]][_0x6b6cx2[_0xb59f[2124]]]:this[_0xb59f[3042]][_0x6b6cx2[_0xb59f[2124]]]:mxEvent[_0xb59f[774]](_0x6b6cx2)?this[_0xb59f[3041]][_0x6b6cx2[_0xb59f[2124]]]:this[_0xb59f[3040]][_0x6b6cx2[_0xb59f[2124]]]:null};mxKeyHandler[_0xb59f[202]][_0xb59f[3050]]=function(_0x6b6cx2){_0x6b6cx2=mxEvent[_0xb59f[728]](_0x6b6cx2);if(_0x6b6cx2==this[_0xb59f[772]]||_0x6b6cx2[_0xb59f[265]]==this[_0xb59f[772]]||null!=this[_0xb59f[1179]][_0xb59f[2347]]&&_0x6b6cx2==this[_0xb59f[1179]][_0xb59f[2347]][_0xb59f[126]]){return !0};for(;null!=_0x6b6cx2;){if(_0x6b6cx2==this[_0xb59f[1179]][_0xb59f[526]]){return !0};_0x6b6cx2=_0x6b6cx2[_0xb59f[265]]};return !1};mxKeyHandler[_0xb59f[202]][_0xb59f[3044]]=function(_0x6b6cx2){if(this[_0xb59f[1179]][_0xb59f[994]]()&&!mxEvent[_0xb59f[721]](_0x6b6cx2)&&this[_0xb59f[3050]](_0x6b6cx2)&&this[_0xb59f[994]]()){if(27==_0x6b6cx2[_0xb59f[2124]]){this[_0xb59f[859]](_0x6b6cx2)}else {if(!this[_0xb59f[1179]][_0xb59f[2203]]()){var _0x6b6cx3=this[_0xb59f[3049]](_0x6b6cx2);null!=_0x6b6cx3&&(_0x6b6cx3(_0x6b6cx2),mxEvent[_0xb59f[722]](_0x6b6cx2))}}}};mxKeyHandler[_0xb59f[202]][_0xb59f[859]]=function(_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[2608]]()&&this[_0xb59f[1179]][_0xb59f[859]](_0x6b6cx2)};mxKeyHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[772]]=null};function mxTooltipHandler(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2&&(this[_0xb59f[1179]]=_0x6b6cx2,this[_0xb59f[1140]]=_0x6b6cx3||500,this[_0xb59f[1179]][_0xb59f[1133]](this))}mxTooltipHandler[_0xb59f[202]][_0xb59f[931]]=10005;mxTooltipHandler[_0xb59f[202]][_0xb59f[1179]]=null;mxTooltipHandler[_0xb59f[202]][_0xb59f[1140]]=null;mxTooltipHandler[_0xb59f[202]][_0xb59f[3051]]= !1;mxTooltipHandler[_0xb59f[202]][_0xb59f[984]]= !0;mxTooltipHandler[_0xb59f[202]][_0xb59f[994]]=function(){return this[_0xb59f[984]]};mxTooltipHandler[_0xb59f[202]][_0xb59f[995]]=function(_0x6b6cx2){this[_0xb59f[984]]=_0x6b6cx2};mxTooltipHandler[_0xb59f[202]][_0xb59f[2277]]=function(){return this[_0xb59f[3051]]};mxTooltipHandler[_0xb59f[202]][_0xb59f[3052]]=function(_0x6b6cx2){this[_0xb59f[3051]]=_0x6b6cx2};mxTooltipHandler[_0xb59f[202]][_0xb59f[176]]=function(){null!=document[_0xb59f[112]]&&(this[_0xb59f[485]]=document[_0xb59f[55]](_0xb59f[485]),this[_0xb59f[485]][_0xb59f[926]]=_0xb59f[3053],this[_0xb59f[485]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188],this[_0xb59f[485]][_0xb59f[124]][_0xb59f[931]]=this[_0xb59f[931]],document[_0xb59f[112]][_0xb59f[62]](this[_0xb59f[485]]),mxEvent[_0xb59f[169]](this[_0xb59f[485]],_0xb59f[751],mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[3054]]()})))};mxTooltipHandler[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[862]](_0x6b6cx3,!1);this[_0xb59f[3054]]()};mxTooltipHandler[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){if(_0x6b6cx3[_0xb59f[730]]()!=this[_0xb59f[1217]]||_0x6b6cx3[_0xb59f[732]]()!=this[_0xb59f[1218]]){this[_0xb59f[862]](_0x6b6cx3,!0),(this[_0xb59f[2277]]()||_0x6b6cx3[_0xb59f[248]]()!=this[_0xb59f[724]]||_0x6b6cx3[_0xb59f[728]]()!=this[_0xb59f[252]]&&(!this[_0xb59f[3055]]||null!=_0x6b6cx3[_0xb59f[248]]()&&this[_0xb59f[3055]]==(_0x6b6cx3[_0xb59f[729]](_0x6b6cx3[_0xb59f[248]]()[_0xb59f[253]])||!_0x6b6cx3[_0xb59f[729]](_0x6b6cx3[_0xb59f[248]]()[_0xb59f[963]]))))&&this[_0xb59f[3054]]()};this[_0xb59f[1217]]=_0x6b6cx3[_0xb59f[730]]();this[_0xb59f[1218]]=_0x6b6cx3[_0xb59f[732]]()};mxTooltipHandler[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[862]](_0x6b6cx3,!0);this[_0xb59f[3054]]()};mxTooltipHandler[_0xb59f[202]][_0xb59f[3056]]=function(){null!=this[_0xb59f[1123]]&&(window[_0xb59f[2924]](this[_0xb59f[1123]]),this[_0xb59f[1123]]=null)};mxTooltipHandler[_0xb59f[202]][_0xb59f[862]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3056]]();if(_0x6b6cx3&&this[_0xb59f[994]]()&&null!=_0x6b6cx2[_0xb59f[248]]()&&(null==this[_0xb59f[485]]||_0xb59f[188]==this[_0xb59f[485]][_0xb59f[124]][_0xb59f[187]])){var _0x6b6cx4=_0x6b6cx2[_0xb59f[248]](),_0x6b6cx5=_0x6b6cx2[_0xb59f[728]](),_0x6b6cx9=_0x6b6cx2[_0xb59f[730]](),_0x6b6cxa=_0x6b6cx2[_0xb59f[732]](),_0x6b6cx12=_0x6b6cx2[_0xb59f[729]](_0x6b6cx4[_0xb59f[253]])||_0x6b6cx2[_0xb59f[729]](_0x6b6cx4[_0xb59f[963]]);this[_0xb59f[1123]]=window[_0xb59f[261]](mxUtils[_0xb59f[885]](this,function(){if(!this[_0xb59f[1179]][_0xb59f[2203]]()&&!this[_0xb59f[1179]][_0xb59f[2316]][_0xb59f[1031]]()){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[2595]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa);this[_0xb59f[539]](_0x6b6cx2,_0x6b6cx9,_0x6b6cxa);this[_0xb59f[724]]=_0x6b6cx4;this[_0xb59f[252]]=_0x6b6cx5;this[_0xb59f[3055]]=_0x6b6cx12}}),this[_0xb59f[1140]])}};mxTooltipHandler[_0xb59f[202]][_0xb59f[801]]=function(){this[_0xb59f[3056]]();this[_0xb59f[3054]]()};mxTooltipHandler[_0xb59f[202]][_0xb59f[3054]]=function(){null!=this[_0xb59f[485]]&&(this[_0xb59f[485]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[188])};mxTooltipHandler[_0xb59f[202]][_0xb59f[539]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){null==this[_0xb59f[485]]&&this[_0xb59f[176]]();var _0x6b6cx5=mxUtils[_0xb59f[444]]();this[_0xb59f[485]][_0xb59f[124]][_0xb59f[361]]=_0x6b6cx3+_0x6b6cx5[_0xb59f[235]]+_0xb59f[168];this[_0xb59f[485]][_0xb59f[124]][_0xb59f[125]]=_0x6b6cx4+mxConstants[_0xb59f[560]]+_0x6b6cx5[_0xb59f[236]]+_0xb59f[168];mxUtils[_0xb59f[1331]](_0x6b6cx2)?(this[_0xb59f[485]][_0xb59f[339]]=_0xb59f[110],this[_0xb59f[485]][_0xb59f[62]](_0x6b6cx2)):this[_0xb59f[485]][_0xb59f[339]]=_0x6b6cx2[_0xb59f[230]](/\n/g,_0xb59f[545]);this[_0xb59f[485]][_0xb59f[124]][_0xb59f[187]]=_0xb59f[110];mxUtils[_0xb59f[933]](this[_0xb59f[485]])}};mxTooltipHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1179]][_0xb59f[1148]](this);mxEvent[_0xb59f[762]](this[_0xb59f[485]]);null!=this[_0xb59f[485]]&&null!=this[_0xb59f[485]][_0xb59f[265]]&&this[_0xb59f[485]][_0xb59f[265]][_0xb59f[266]](this[_0xb59f[485]]);this[_0xb59f[485]]=null};function mxCellTracker(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){mxCellMarker[_0xb59f[239]](this,_0x6b6cx2,_0x6b6cx3);this[_0xb59f[1179]][_0xb59f[1133]](this);null!=_0x6b6cx4&&(this[_0xb59f[736]]=_0x6b6cx4);mxClient[_0xb59f[80]]&&mxEvent[_0xb59f[169]](window,_0xb59f[2428],mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[515]]()}))}mxUtils[_0xb59f[1284]](mxCellTracker,mxCellMarker);mxCellTracker[_0xb59f[202]][_0xb59f[787]]=function(_0x6b6cx2,_0x6b6cx3){};mxCellTracker[_0xb59f[202]][_0xb59f[788]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[994]]()&&this[_0xb59f[2871]](_0x6b6cx3)};mxCellTracker[_0xb59f[202]][_0xb59f[789]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[862]]()};mxCellTracker[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[2717]]||(this[_0xb59f[2717]]= !0,this[_0xb59f[1179]][_0xb59f[1148]](this),mxCellMarker[_0xb59f[202]][_0xb59f[515]][_0xb59f[183]](this))};function mxCellHighlight(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){null!=_0x6b6cx2&&(this[_0xb59f[1179]]=_0x6b6cx2,this[_0xb59f[2943]]=null!=_0x6b6cx3?_0x6b6cx3:mxConstants[_0xb59f[2854]],this[_0xb59f[610]]=null!=_0x6b6cx4?_0x6b6cx4:mxConstants[_0xb59f[3057]],this[_0xb59f[648]]=null!=_0x6b6cx5?_0x6b6cx5:!1,this[_0xb59f[3058]]=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[2950]]()}),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.SCALE,this[_0xb59f[3058]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.TRANSLATE,this[_0xb59f[3058]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xb59f[3058]]),this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[169]](mxEvent.CHANGE,this[_0xb59f[3058]]),this[_0xb59f[2877]]=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[801]]()}),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.DOWN,this[_0xb59f[2877]]),this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[169]](mxEvent.UP,this[_0xb59f[2877]]))}mxCellHighlight[_0xb59f[202]][_0xb59f[3059]]= !1;mxCellHighlight[_0xb59f[202]][_0xb59f[1179]]= !0;mxCellHighlight[_0xb59f[202]][_0xb59f[724]]=null;mxCellHighlight[_0xb59f[202]][_0xb59f[657]]=2;mxCellHighlight[_0xb59f[202]][_0xb59f[2877]]=null;mxCellHighlight[_0xb59f[202]][_0xb59f[2828]]=function(_0x6b6cx2){this[_0xb59f[2943]]=_0x6b6cx2;null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[1336]]=_0x6b6cx2)};mxCellHighlight[_0xb59f[202]][_0xb59f[3060]]=function(){this[_0xb59f[253]]=this[_0xb59f[2156]]();this[_0xb59f[2950]]();!this[_0xb59f[3059]]&&this[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]][_0xb59f[285]]!=this[_0xb59f[253]][_0xb59f[252]]&&this[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]][_0xb59f[950]](this[_0xb59f[253]][_0xb59f[252]],this[_0xb59f[253]][_0xb59f[252]][_0xb59f[265]][_0xb59f[285]])};mxCellHighlight[_0xb59f[202]][_0xb59f[2156]]=function(){var _0x6b6cx2=null,_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[250]](this[_0xb59f[724]][_0xb59f[246]])? new mxPolyline(this[_0xb59f[724]][_0xb59f[439]],this[_0xb59f[2943]],this[_0xb59f[610]]): new mxRectangleShape( new mxRectangle,null,this[_0xb59f[2943]],this[_0xb59f[610]]);_0x6b6cx2[_0xb59f[507]]=this[_0xb59f[1179]][_0xb59f[507]]!=mxConstants[_0xb59f[508]]?mxConstants[_0xb59f[1523]]:mxConstants[_0xb59f[508]];_0x6b6cx2[_0xb59f[176]](this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[1524]]());mxEvent[_0xb59f[2733]](_0x6b6cx2[_0xb59f[252]],this[_0xb59f[1179]],this[_0xb59f[724]]);_0x6b6cx2[_0xb59f[1564]]=0;_0x6b6cx2[_0xb59f[1229]]= !1;_0x6b6cx2[_0xb59f[1522]]=this[_0xb59f[648]];return _0x6b6cx2};mxCellHighlight[_0xb59f[202]][_0xb59f[2950]]=function(){if(null!=this[_0xb59f[724]]&&null!=this[_0xb59f[253]]){var _0x6b6cx2=0;this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[250]](this[_0xb59f[724]][_0xb59f[246]])?this[_0xb59f[253]][_0xb59f[1525]]=this[_0xb59f[724]][_0xb59f[439]]:(this[_0xb59f[253]][_0xb59f[1562]]= new mxRectangle(this[_0xb59f[724]][_0xb59f[235]]-this[_0xb59f[657]],this[_0xb59f[724]][_0xb59f[236]]-this[_0xb59f[657]],this[_0xb59f[724]][_0xb59f[117]]+2*this[_0xb59f[657]],this[_0xb59f[724]][_0xb59f[119]]+2*this[_0xb59f[657]]),_0x6b6cx2=Number(this[_0xb59f[724]][_0xb59f[124]][mxConstants[_0xb59f[2278]]]||_0xb59f[468]));null!=this[_0xb59f[724]][_0xb59f[253]]&&this[_0xb59f[253]][_0xb59f[1609]](this[_0xb59f[724]][_0xb59f[253]][_0xb59f[1610]]());0!=_0x6b6cx2&&(this[_0xb59f[253]][_0xb59f[603]]=_0x6b6cx2);this[_0xb59f[253]][_0xb59f[258]]()}};mxCellHighlight[_0xb59f[202]][_0xb59f[801]]=function(){this[_0xb59f[1016]](null)};mxCellHighlight[_0xb59f[202]][_0xb59f[1016]]=function(_0x6b6cx2){this[_0xb59f[724]]!=_0x6b6cx2&&(null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[515]](),this[_0xb59f[253]]=null),this[_0xb59f[724]]=_0x6b6cx2,null!=this[_0xb59f[724]]&&this[_0xb59f[3060]]())};mxCellHighlight[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[745]](this[_0xb59f[3058]]);this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[745]](this[_0xb59f[3058]]);this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[745]](this[_0xb59f[2877]]);this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[745]](this[_0xb59f[2877]]);null!=this[_0xb59f[253]]&&(this[_0xb59f[253]][_0xb59f[515]](),this[_0xb59f[253]]=null)};function mxDefaultKeyHandler(_0x6b6cx2){if(null!=_0x6b6cx2){this[_0xb59f[3061]]=_0x6b6cx2;this[_0xb59f[2458]]= new mxKeyHandler(_0x6b6cx2[_0xb59f[1179]]);var _0x6b6cx3=this[_0xb59f[2458]][_0xb59f[859]];this[_0xb59f[2458]][_0xb59f[859]]=function(_0x6b6cx4){_0x6b6cx3[_0xb59f[183]](this,arguments);_0x6b6cx2[_0xb59f[3062]]();_0x6b6cx2[_0xb59f[746]]( new mxEventObject(mxEvent.ESCAPE,_0xb59f[763],_0x6b6cx4))}}}mxDefaultKeyHandler[_0xb59f[202]][_0xb59f[3061]]=null;mxDefaultKeyHandler[_0xb59f[202]][_0xb59f[2458]]=null;mxDefaultKeyHandler[_0xb59f[202]][_0xb59f[3063]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[3061]][_0xb59f[350]](_0x6b6cx3)});_0x6b6cx4?this[_0xb59f[2458]][_0xb59f[3047]](_0x6b6cx2,_0x6b6cx5):this[_0xb59f[2458]][_0xb59f[3045]](_0x6b6cx2,_0x6b6cx5)};mxDefaultKeyHandler[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[2458]][_0xb59f[515]]();this[_0xb59f[2458]]=null};function mxDefaultPopupMenu(_0x6b6cx2){this[_0xb59f[3064]]=_0x6b6cx2}mxDefaultPopupMenu[_0xb59f[202]][_0xb59f[88]]=null;mxDefaultPopupMenu[_0xb59f[202]][_0xb59f[3064]]=null;mxDefaultPopupMenu[_0xb59f[202]][_0xb59f[3065]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){if(null!=this[_0xb59f[3064]]){var _0x6b6cx9=this[_0xb59f[3066]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5);this[_0xb59f[3067]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,this[_0xb59f[3064]][_0xb59f[285]],null)}};mxDefaultPopupMenu[_0xb59f[202]][_0xb59f[3067]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12){for(var _0x6b6cx13=!1;null!=_0x6b6cxa;){if(_0xb59f[99]==_0x6b6cxa[_0xb59f[301]]){var _0x6b6cx14=_0x6b6cxa[_0xb59f[284]](_0xb59f[3068]);if(null==_0x6b6cx14||_0x6b6cx9[_0x6b6cx14]){var _0x6b6cx14=_0x6b6cxa[_0xb59f[284]](_0xb59f[3069]),_0x6b6cx14=mxResources[_0xb59f[203]](_0x6b6cx14)||_0x6b6cx14,_0x6b6cx15=mxUtils[_0xb59f[1545]](mxUtils[_0xb59f[329]](_0x6b6cxa)),_0x6b6cx16=_0x6b6cxa[_0xb59f[284]](_0xb59f[892]),_0x6b6cx17=_0x6b6cxa[_0xb59f[284]](_0xb59f[2916]),_0x6b6cx18=_0x6b6cxa[_0xb59f[284]](_0xb59f[3070]);_0x6b6cx13&&(_0x6b6cx3[_0xb59f[1051]](_0x6b6cx12),_0x6b6cx13= !1);null!=_0x6b6cx17&&this[_0xb59f[88]]&&(_0x6b6cx17=this[_0xb59f[88]]+_0x6b6cx17);_0x6b6cx14=this[_0xb59f[3071]](_0x6b6cx3,_0x6b6cx2,_0x6b6cx14,_0x6b6cx17,_0x6b6cx15,_0x6b6cx16,_0x6b6cx4,_0x6b6cx12,_0x6b6cx18);this[_0xb59f[3067]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa[_0xb59f[285]],_0x6b6cx14)}}else {_0xb59f[3072]==_0x6b6cxa[_0xb59f[301]]&&(_0x6b6cx13= !0)};_0x6b6cxa=_0x6b6cxa[_0xb59f[287]]}};mxDefaultPopupMenu[_0xb59f[202]][_0xb59f[3071]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa,_0x6b6cx12,_0x6b6cx13,_0x6b6cx14){return _0x6b6cx2[_0xb59f[1025]](_0x6b6cx4,_0x6b6cx5,function(_0x6b6cx2){_0xb59f[279]== typeof _0x6b6cx9&&_0x6b6cx9[_0xb59f[239]](_0x6b6cx3,_0x6b6cx3,_0x6b6cx12,_0x6b6cx2);null!=_0x6b6cxa&&_0x6b6cx3[_0xb59f[350]](_0x6b6cxa,_0x6b6cx12,_0x6b6cx2)},_0x6b6cx13,_0x6b6cx14)};mxDefaultPopupMenu[_0xb59f[202]][_0xb59f[3066]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx9=_0x6b6cx5[_0xb59f[262]](_0x6b6cx3),_0x6b6cxa=[];_0x6b6cxa[_0xb59f[3073]]=null==_0x6b6cx3;_0x6b6cxa[_0xb59f[3074]]=1<_0x6b6cx2[_0xb59f[1179]][_0xb59f[2694]]();_0x6b6cxa[_0xb59f[3075]]=_0x6b6cx5[_0xb59f[501]]()!=_0x6b6cx5[_0xb59f[1197]](_0x6b6cx2[_0xb59f[1179]][_0xb59f[902]]());_0x6b6cxa[_0xb59f[246]]=null!=_0x6b6cx3;_0x6b6cx5=null!=_0x6b6cx3&&1==_0x6b6cx2[_0xb59f[1179]][_0xb59f[2694]]();_0x6b6cxa[_0xb59f[3076]]=_0x6b6cx5&&0<_0x6b6cx9;_0x6b6cxa[_0xb59f[3077]]=_0x6b6cx5&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2516]](_0x6b6cx3,!1);_0x6b6cxa[_0xb59f[3078]]=_0x6b6cx5&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2516]](_0x6b6cx3,!0);_0x6b6cxa[_0xb59f[3079]]=_0x6b6cx5&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2553]](_0x6b6cx3);_0x6b6cxa[_0xb59f[3080]]=_0x6b6cxa[_0xb59f[3079]]&&0==_0x6b6cx9;_0x6b6cxa[_0xb59f[687]]=_0x6b6cx5&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx3);_0x6b6cx9=this[_0xb59f[3064]][_0xb59f[64]](_0xb59f[3081]);for(_0x6b6cx5=0;_0x6b6cx5<_0x6b6cx9[_0xb59f[67]];_0x6b6cx5++){var _0x6b6cx12=mxUtils[_0xb59f[1545]](mxUtils[_0xb59f[329]](_0x6b6cx9[_0x6b6cx5])),_0x6b6cx13=_0x6b6cx9[_0x6b6cx5][_0xb59f[284]](_0xb59f[298]);null!=_0x6b6cx13&&_0xb59f[279]== typeof _0x6b6cx12&&(_0x6b6cxa[_0x6b6cx13]=_0x6b6cx12(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4))};return _0x6b6cxa};function mxDefaultToolbar(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3061]]=_0x6b6cx3;null!=_0x6b6cx2&&null!=_0x6b6cx3&&this[_0xb59f[176]](_0x6b6cx2)}mxDefaultToolbar[_0xb59f[202]][_0xb59f[3061]]=null;mxDefaultToolbar[_0xb59f[202]][_0xb59f[3082]]=null;mxDefaultToolbar[_0xb59f[202]][_0xb59f[2877]]=null;mxDefaultToolbar[_0xb59f[202]][_0xb59f[657]]=4;mxDefaultToolbar[_0xb59f[202]][_0xb59f[2804]]= !1;mxDefaultToolbar[_0xb59f[202]][_0xb59f[176]]=function(_0x6b6cx2){null!=_0x6b6cx2&&(this[_0xb59f[3082]]= new mxToolbar(_0x6b6cx2),this[_0xb59f[3082]][_0xb59f[169]](mxEvent.SELECT,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx4[_0xb59f[720]](_0xb59f[279]);this[_0xb59f[3061]][_0xb59f[3083]]=null!=_0x6b6cx5?mxUtils[_0xb59f[885]](this,function(){_0x6b6cx5[_0xb59f[183]](this,arguments);this[_0xb59f[3082]][_0xb59f[1050]]()}):null})),this[_0xb59f[2877]]=mxUtils[_0xb59f[885]](this,function(){null!=this[_0xb59f[3082]]&&this[_0xb59f[3082]][_0xb59f[1050]](!0)}),this[_0xb59f[3061]][_0xb59f[1179]][_0xb59f[169]](mxEvent.DOUBLE_CLICK,this[_0xb59f[2877]]),this[_0xb59f[3061]][_0xb59f[169]](mxEvent.ESCAPE,this[_0xb59f[2877]]))};mxDefaultToolbar[_0xb59f[202]][_0xb59f[1025]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=mxUtils[_0xb59f[885]](this,function(){null!=_0x6b6cx4&&0<_0x6b6cx4[_0xb59f[67]]&&this[_0xb59f[3061]][_0xb59f[350]](_0x6b6cx4)});return this[_0xb59f[3082]][_0xb59f[1025]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cx5)};mxDefaultToolbar[_0xb59f[202]][_0xb59f[1051]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2||mxClient[_0xb59f[88]]+_0xb59f[3084];this[_0xb59f[3082]][_0xb59f[1051]](_0x6b6cx2)};mxDefaultToolbar[_0xb59f[202]][_0xb59f[970]]=function(){return this[_0xb59f[3082]][_0xb59f[970]]()};mxDefaultToolbar[_0xb59f[202]][_0xb59f[1038]]=function(_0x6b6cx2){return this[_0xb59f[3082]][_0xb59f[1038]](_0x6b6cx2)};mxDefaultToolbar[_0xb59f[202]][_0xb59f[3085]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[3061]][_0xb59f[350]](_0x6b6cx4)});this[_0xb59f[972]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx5)};mxDefaultToolbar[_0xb59f[202]][_0xb59f[972]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return this[_0xb59f[3082]][_0xb59f[972]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)};mxDefaultToolbar[_0xb59f[202]][_0xb59f[1048]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){var _0x6b6cxa=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[3061]][_0xb59f[3086]](_0x6b6cx4);null!=_0x6b6cx9&&_0x6b6cx9(this[_0xb59f[3061]])});return this[_0xb59f[3082]][_0xb59f[1042]](_0x6b6cx2,_0x6b6cx3,_0x6b6cxa,_0x6b6cx5)};mxDefaultToolbar[_0xb59f[202]][_0xb59f[3087]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9,_0x6b6cxa){var _0x6b6cx12=function(){return _0xb59f[279]== typeof _0x6b6cx4?_0x6b6cx4():null!=_0x6b6cx4?_0x6b6cx4[_0xb59f[238]]():null},_0x6b6cx13=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){_0xb59f[279]== typeof _0x6b6cx9?_0x6b6cx9(this[_0xb59f[3061]],_0x6b6cx12(),_0x6b6cx2,_0x6b6cx3):this[_0xb59f[1008]](_0x6b6cx12(),_0x6b6cx2,_0x6b6cx3);this[_0xb59f[3082]][_0xb59f[1050]]();mxEvent[_0xb59f[722]](_0x6b6cx2)});_0x6b6cx2=this[_0xb59f[3082]][_0xb59f[1048]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx13,_0x6b6cx5,null,_0x6b6cxa);this[_0xb59f[3088]](_0x6b6cx2,function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx13(_0x6b6cx3,_0x6b6cx4)});return _0x6b6cx2};mxDefaultToolbar[_0xb59f[202]][_0xb59f[1008]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[3061]][_0xb59f[1179]],_0x6b6cx9=_0x6b6cx5[_0xb59f[502]]();if(null==_0x6b6cx4||_0x6b6cx9[_0xb59f[250]](_0x6b6cx4)||!this[_0xb59f[2804]]||!_0x6b6cx5[_0xb59f[2565]](_0x6b6cx4)){for(;null!=_0x6b6cx4&&!_0x6b6cx5[_0xb59f[2685]](_0x6b6cx4,[_0x6b6cx2],_0x6b6cx3);){_0x6b6cx4=_0x6b6cx9[_0xb59f[1197]](_0x6b6cx4)};this[_0xb59f[1937]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)}else {this[_0xb59f[807]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)}};mxDefaultToolbar[_0xb59f[202]][_0xb59f[1937]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[3061]][_0xb59f[1179]];if(_0x6b6cx5[_0xb59f[2621]](_0x6b6cx2)){var _0x6b6cx9=mxEvent[_0xb59f[731]](_0x6b6cx3),_0x6b6cxa=mxEvent[_0xb59f[733]](_0x6b6cx3),_0x6b6cx9=mxUtils[_0xb59f[2196]](_0x6b6cx5[_0xb59f[526]],_0x6b6cx9,_0x6b6cxa);return _0x6b6cx5[_0xb59f[2655]]()&&_0x6b6cx5[_0xb59f[2686]](_0x6b6cx4,[_0x6b6cx2],_0x6b6cx3)?_0x6b6cx5[_0xb59f[853]](_0x6b6cx4,[_0x6b6cx2],null,_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]]):this[_0xb59f[3061]][_0xb59f[817]](_0x6b6cx4,_0x6b6cx2,_0x6b6cx9[_0xb59f[235]],_0x6b6cx9[_0xb59f[236]])};return null};mxDefaultToolbar[_0xb59f[202]][_0xb59f[807]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=this[_0xb59f[3061]][_0xb59f[1179]];var _0x6b6cx5=_0x6b6cx3[_0xb59f[502]]();if(null!=_0x6b6cx4&&_0x6b6cx3[_0xb59f[2565]](_0x6b6cx2)&&_0x6b6cx3[_0xb59f[2581]](null,_0x6b6cx4,_0x6b6cx2)){var _0x6b6cx9=null;_0x6b6cx5[_0xb59f[473]]();try{var _0x6b6cxa=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx4),_0x6b6cx12=_0x6b6cx5[_0xb59f[1721]](_0x6b6cx2)[_0xb59f[238]]();_0x6b6cx12[_0xb59f[235]]=_0x6b6cxa[_0xb59f[235]]+(_0x6b6cxa[_0xb59f[117]]-_0x6b6cx12[_0xb59f[117]])/2;_0x6b6cx12[_0xb59f[236]]=_0x6b6cxa[_0xb59f[236]]+(_0x6b6cxa[_0xb59f[119]]-_0x6b6cx12[_0xb59f[119]])/2;var _0x6b6cx13=this[_0xb59f[657]]*_0x6b6cx3[_0xb59f[1020]],_0x6b6cx14=20*_0x6b6cx5[_0xb59f[1962]](_0x6b6cx4,!0);this[_0xb59f[3061]][_0xb59f[3089]]?_0x6b6cx12[_0xb59f[235]]+=(_0x6b6cx12[_0xb59f[117]]+_0x6b6cxa[_0xb59f[117]])/2+_0x6b6cx13+_0x6b6cx14:_0x6b6cx12[_0xb59f[236]]+=(_0x6b6cx12[_0xb59f[119]]+_0x6b6cxa[_0xb59f[119]])/2+_0x6b6cx13+_0x6b6cx14;_0x6b6cx2[_0xb59f[1724]](_0x6b6cx12);var _0x6b6cx15=_0x6b6cx5[_0xb59f[1197]](_0x6b6cx4);_0x6b6cx3[_0xb59f[2103]](_0x6b6cx2,_0x6b6cx15);_0x6b6cx3[_0xb59f[2509]](_0x6b6cx2);_0x6b6cx9=this[_0xb59f[3061]][_0xb59f[2503]](_0x6b6cx4,_0x6b6cx2);if(null==_0x6b6cx5[_0xb59f[1721]](_0x6b6cx9)){var _0x6b6cx16= new mxGeometry;_0x6b6cx16[_0xb59f[1500]]= !0;_0x6b6cx5[_0xb59f[1724]](_0x6b6cx9,_0x6b6cx16)};_0x6b6cx3[_0xb59f[2504]](_0x6b6cx9,_0x6b6cx15,_0x6b6cx4,_0x6b6cx2)}finally{_0x6b6cx5[_0xb59f[476]]()};_0x6b6cx3[_0xb59f[904]]([_0x6b6cx2,_0x6b6cx9]);_0x6b6cx3[_0xb59f[2564]](_0x6b6cx2)}};mxDefaultToolbar[_0xb59f[202]][_0xb59f[3088]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=document[_0xb59f[55]](_0xb59f[466]);_0x6b6cx4[_0xb59f[57]](_0xb59f[390],_0x6b6cx2[_0xb59f[284]](_0xb59f[390]));var _0x6b6cx5=mxUtils[_0xb59f[885]](this,function(_0x6b6cx9){_0x6b6cx4[_0xb59f[124]][_0xb59f[117]]=2*_0x6b6cx2[_0xb59f[359]]+_0xb59f[168];_0x6b6cx4[_0xb59f[124]][_0xb59f[119]]=2*_0x6b6cx2[_0xb59f[167]]+_0xb59f[168];mxUtils[_0xb59f[3090]](_0x6b6cx2,this[_0xb59f[3061]][_0xb59f[1179]],_0x6b6cx3,_0x6b6cx4);mxEvent[_0xb59f[745]](_0x6b6cx4,_0xb59f[219],_0x6b6cx5)});mxClient[_0xb59f[80]]?_0x6b6cx5():mxEvent[_0xb59f[169]](_0x6b6cx4,_0xb59f[219],_0x6b6cx5)};mxDefaultToolbar[_0xb59f[202]][_0xb59f[515]]=function(){null!=this[_0xb59f[2877]]&&(this[_0xb59f[3061]][_0xb59f[1179]][_0xb59f[745]](_0xb59f[760],this[_0xb59f[2877]]),this[_0xb59f[3061]][_0xb59f[745]](_0xb59f[859],this[_0xb59f[2877]]),this[_0xb59f[2877]]=null);null!=this[_0xb59f[3082]]&&(this[_0xb59f[3082]][_0xb59f[515]](),this[_0xb59f[3082]]=null)};function mxEditor(_0x6b6cx2){this[_0xb59f[3091]]=[];this[_0xb59f[3092]]();if(null!=document[_0xb59f[112]]){this[_0xb59f[3093]]=[];this[_0xb59f[3094]]= new mxDefaultPopupMenu;this[_0xb59f[3095]]= new mxUndoManager;this[_0xb59f[1179]]=this[_0xb59f[3096]]();this[_0xb59f[3082]]=this[_0xb59f[3097]]();this[_0xb59f[3098]]= new mxDefaultKeyHandler(this);this[_0xb59f[3099]](_0x6b6cx2);this[_0xb59f[1179]][_0xb59f[2180]]=this[_0xb59f[3100]];!mxClient[_0xb59f[3101]]&&null!=this[_0xb59f[1056]]&&(this[_0xb59f[812]]=this[_0xb59f[3102]]());if(null!=this[_0xb59f[1987]]){this[_0xb59f[1987]]()};mxClient[_0xb59f[80]]&&mxEvent[_0xb59f[169]](window,_0xb59f[2428],mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[515]]()}))}}mxLoadResources&&mxResources[_0xb59f[99]](mxClient[_0xb59f[86]]+_0xb59f[3103]);mxEditor[_0xb59f[202]]= new mxEventSource;mxEditor[_0xb59f[202]][_0xb59f[196]]=mxEditor;mxEditor[_0xb59f[202]][_0xb59f[3104]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[3105]:_0xb59f[110];mxEditor[_0xb59f[202]][_0xb59f[3106]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[3107]:_0xb59f[110];mxEditor[_0xb59f[202]][_0xb59f[3108]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[3109]:_0xb59f[110];mxEditor[_0xb59f[202]][_0xb59f[3110]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[716]:_0xb59f[110];mxEditor[_0xb59f[202]][_0xb59f[3111]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[3112]:_0xb59f[110];mxEditor[_0xb59f[202]][_0xb59f[3113]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[2719]:_0xb59f[110];mxEditor[_0xb59f[202]][_0xb59f[3114]]=_0xb59f[130]!=mxClient[_0xb59f[90]]?_0xb59f[2136]:_0xb59f[110];mxEditor[_0xb59f[202]][_0xb59f[2136]]=null;mxEditor[_0xb59f[202]][_0xb59f[1179]]=null;mxEditor[_0xb59f[202]][_0xb59f[2720]]=null;mxEditor[_0xb59f[202]][_0xb59f[3082]]=null;mxEditor[_0xb59f[202]][_0xb59f[812]]=null;mxEditor[_0xb59f[202]][_0xb59f[879]]=null;mxEditor[_0xb59f[202]][_0xb59f[3094]]=null;mxEditor[_0xb59f[202]][_0xb59f[3095]]=null;mxEditor[_0xb59f[202]][_0xb59f[3098]]=null;mxEditor[_0xb59f[202]][_0xb59f[3091]]=null;mxEditor[_0xb59f[202]][_0xb59f[3115]]=_0xb59f[1061];mxEditor[_0xb59f[202]][_0xb59f[3116]]= !1;mxEditor[_0xb59f[202]][_0xb59f[1157]]= !0;mxEditor[_0xb59f[202]][_0xb59f[3083]]=null;mxEditor[_0xb59f[202]][_0xb59f[3117]]= !1;mxEditor[_0xb59f[202]][_0xb59f[3118]]=null;mxEditor[_0xb59f[202]][_0xb59f[2075]]=null;mxEditor[_0xb59f[202]][_0xb59f[3119]]=null;mxEditor[_0xb59f[202]][_0xb59f[3120]]=null;mxEditor[_0xb59f[202]][_0xb59f[3121]]=null;mxEditor[_0xb59f[202]][_0xb59f[3122]]=null;mxEditor[_0xb59f[202]][_0xb59f[1069]]=_0xb59f[336];mxEditor[_0xb59f[202]][_0xb59f[3123]]=_0xb59f[338];mxEditor[_0xb59f[202]][_0xb59f[1070]]= !0;mxEditor[_0xb59f[202]][_0xb59f[3124]]=null;mxEditor[_0xb59f[202]][_0xb59f[3125]]=null;mxEditor[_0xb59f[202]][_0xb59f[1056]]=null;mxEditor[_0xb59f[202]][_0xb59f[1058]]=null;mxEditor[_0xb59f[202]][_0xb59f[1057]]=null;mxEditor[_0xb59f[202]][_0xb59f[3089]]= !1;mxEditor[_0xb59f[202]][_0xb59f[3126]]= !1;mxEditor[_0xb59f[202]][_0xb59f[3127]]=0;mxEditor[_0xb59f[202]][_0xb59f[3128]]= !1;mxEditor[_0xb59f[202]][_0xb59f[3129]]= !1;mxEditor[_0xb59f[202]][_0xb59f[3093]]=null;mxEditor[_0xb59f[202]][_0xb59f[3130]]=0;mxEditor[_0xb59f[202]][_0xb59f[3100]]=_0xb59f[604];mxEditor[_0xb59f[202]][_0xb59f[3112]]=null;mxEditor[_0xb59f[202]][_0xb59f[3131]]=null;mxEditor[_0xb59f[202]][_0xb59f[3132]]=20;mxEditor[_0xb59f[202]][_0xb59f[2719]]=null;mxEditor[_0xb59f[202]][_0xb59f[3133]]=null;mxEditor[_0xb59f[202]][_0xb59f[3134]]=null;mxEditor[_0xb59f[202]][_0xb59f[3135]]=300;mxEditor[_0xb59f[202]][_0xb59f[3136]]=260;mxEditor[_0xb59f[202]][_0xb59f[3137]]=240;mxEditor[_0xb59f[202]][_0xb59f[3138]]=null;mxEditor[_0xb59f[202]][_0xb59f[3139]]= !1;mxEditor[_0xb59f[202]][_0xb59f[3140]]= !1;mxEditor[_0xb59f[202]][_0xb59f[2113]]= !1;mxEditor[_0xb59f[202]][_0xb59f[2133]]=function(){return this[_0xb59f[2113]]};mxEditor[_0xb59f[202]][_0xb59f[2128]]=function(_0x6b6cx2){this[_0xb59f[2113]]=_0x6b6cx2};mxEditor[_0xb59f[202]][_0xb59f[3092]]=function(){this[_0xb59f[3071]](_0xb59f[815],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[815]]()});this[_0xb59f[3071]](_0xb59f[540],function(_0x6b6cx2){( new mxPrintPreview(_0x6b6cx2[_0xb59f[1179]],1))[_0xb59f[392]]()});this[_0xb59f[3071]](_0xb59f[539],function(_0x6b6cx2){mxUtils[_0xb59f[539]](_0x6b6cx2[_0xb59f[1179]],null,10,10)});this[_0xb59f[3071]](_0xb59f[3141],function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[3142]]();if(null==_0x6b6cx3||mxClient[_0xb59f[3101]]){_0x6b6cx2[_0xb59f[350]](_0xb59f[539])}else {var _0x6b6cx4=mxUtils[_0xb59f[3143]](_0x6b6cx2[_0xb59f[1179]],1),_0x6b6cx4=mxUtils[_0xb59f[875]](_0x6b6cx4,_0xb59f[192]);mxUtils[_0xb59f[894]](_0x6b6cx3,_0x6b6cx2[_0xb59f[3123]]+_0xb59f[226]+encodeURIComponent(_0x6b6cx4),document,_0xb59f[3144])}});this[_0xb59f[3071]](_0xb59f[802],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[802]]()});this[_0xb59f[3071]](_0xb59f[3145],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&mxClipboard[_0xb59f[3145]](_0x6b6cx2[_0xb59f[1179]])});this[_0xb59f[3071]](_0xb59f[149],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&mxClipboard[_0xb59f[149]](_0x6b6cx2[_0xb59f[1179]])});this[_0xb59f[3071]](_0xb59f[3146],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&mxClipboard[_0xb59f[3146]](_0x6b6cx2[_0xb59f[1179]])});this[_0xb59f[3071]](_0xb59f[3147],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[842]]()});this[_0xb59f[3071]](_0xb59f[1504],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2450]](_0x6b6cx2[_0xb59f[844]]())});this[_0xb59f[3071]](_0xb59f[3148],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[904]](_0x6b6cx2[_0xb59f[1179]][_0xb59f[845]]())});this[_0xb59f[3071]](_0xb59f[1997],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[846]]()});this[_0xb59f[3071]](_0xb59f[824],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[824]]()});this[_0xb59f[3071]](_0xb59f[825],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[825]]()});this[_0xb59f[3071]](_0xb59f[2558],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[2558]]()});this[_0xb59f[3071]](_0xb59f[2559],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[2559]]()});this[_0xb59f[3071]](_0xb59f[3149],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[2560]]()});this[_0xb59f[3071]](_0xb59f[933],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[933]]()});this[_0xb59f[3071]](_0xb59f[3150],function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[3150]](_0x6b6cx3)});this[_0xb59f[3071]](_0xb59f[2705],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2705]]()});this[_0xb59f[3071]](_0xb59f[3151],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2440]]()});this[_0xb59f[3071]](_0xb59f[2706],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2706]]()});this[_0xb59f[3071]](_0xb59f[2708],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2708]]()});this[_0xb59f[3071]](_0xb59f[1061],function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2453]](_0x6b6cx3)&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2451]](_0x6b6cx3)});this[_0xb59f[3071]](_0xb59f[3152],function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[840]](!0)});this[_0xb59f[3071]](_0xb59f[3153],function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[840]](!1)});this[_0xb59f[3071]](_0xb59f[2552],function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2[_0xb59f[1179]][_0xb59f[2552]](_0x6b6cx3)});this[_0xb59f[3071]](_0xb59f[2554],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[2554]]()});this[_0xb59f[3071]](_0xb59f[2442],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[2442]]()});this[_0xb59f[3071]](_0xb59f[3154],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2702]]()});this[_0xb59f[3071]](_0xb59f[3155],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2700]]()});this[_0xb59f[3071]](_0xb59f[3156],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2703]]()});this[_0xb59f[3071]](_0xb59f[3157],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2704]]()});this[_0xb59f[3071]](_0xb59f[2514],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[847]](!0)});this[_0xb59f[3071]](_0xb59f[3158],function(_0x6b6cx2){if(_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()){var _0x6b6cx3=_0x6b6cx2[_0xb59f[1179]][_0xb59f[1728]]();_0x6b6cx2[_0xb59f[1179]][_0xb59f[847]](!0,!1,_0x6b6cx3)}});this[_0xb59f[3071]](_0xb59f[3159],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[847]](!1)});this[_0xb59f[3071]](_0xb59f[3160],function(_0x6b6cx2){if(_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()){var _0x6b6cx3=_0x6b6cx2[_0xb59f[1179]][_0xb59f[1728]]();_0x6b6cx2[_0xb59f[1179]][_0xb59f[847]](!1,!1,_0x6b6cx3)}});this[_0xb59f[3071]](_0xb59f[1447],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this[_0xb59f[3071]](_0xb59f[1449],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this[_0xb59f[3071]](_0xb59f[355],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_UNDERLINE)});this[_0xb59f[3071]](_0xb59f[639],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this[_0xb59f[3071]](_0xb59f[3161],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[849]](mxConstants.ALIGN_LEFT)});this[_0xb59f[3071]](_0xb59f[3162],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[849]](mxConstants.ALIGN_CENTER)});this[_0xb59f[3071]](_0xb59f[3163],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[849]](mxConstants.ALIGN_RIGHT)});this[_0xb59f[3071]](_0xb59f[3164],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[849]](mxConstants.ALIGN_TOP)});this[_0xb59f[3071]](_0xb59f[3165],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[849]](mxConstants.ALIGN_MIDDLE)});this[_0xb59f[3071]](_0xb59f[3166],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[849]](mxConstants.ALIGN_BOTTOM)});this[_0xb59f[3071]](_0xb59f[3167],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this[_0xb59f[3071]](_0xb59f[3168],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this[_0xb59f[3071]](_0xb59f[3169],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this[_0xb59f[3071]](_0xb59f[3170],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this[_0xb59f[3071]](_0xb59f[3171],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});this[_0xb59f[3071]](_0xb59f[3172],function(_0x6b6cx2){_0x6b6cx2[_0xb59f[1179]][_0xb59f[994]]()&&_0x6b6cx2[_0xb59f[1179]][_0xb59f[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this[_0xb59f[3071]](_0xb59f[499],function(_0x6b6cx2){var _0x6b6cx3=100*_0x6b6cx2[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx3=parseFloat(mxUtils[_0xb59f[3173]](mxResources[_0xb59f[203]](_0x6b6cx2[_0xb59f[3104]])||_0x6b6cx2[_0xb59f[3104]],_0x6b6cx3))/100;isNaN(_0x6b6cx3)||_0x6b6cx2[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[2262]](_0x6b6cx3)});this[_0xb59f[3071]](_0xb59f[3174],function(_0x6b6cx2){null!=_0x6b6cx2[_0xb59f[3112]]?_0x6b6cx2[_0xb59f[3112]][_0xb59f[175]](!_0x6b6cx2[_0xb59f[3112]][_0xb59f[174]]()):_0x6b6cx2[_0xb59f[3175]]()});this[_0xb59f[3071]](_0xb59f[3176],function(_0x6b6cx2){null!=_0x6b6cx2[_0xb59f[2719]]?_0x6b6cx2[_0xb59f[2719]][_0xb59f[175]](!_0x6b6cx2[_0xb59f[2719]][_0xb59f[174]]()):_0x6b6cx2[_0xb59f[3177]]()});this[_0xb59f[3071]](_0xb59f[3178],function(_0x6b6cx2){null==_0x6b6cx2[_0xb59f[2136]]?_0x6b6cx2[_0xb59f[3179]]():_0x6b6cx2[_0xb59f[2136]][_0xb59f[175]](!_0x6b6cx2[_0xb59f[2136]][_0xb59f[174]]())});this[_0xb59f[3071]](_0xb59f[3180],function(_0x6b6cx2){mxLog[_0xb59f[175]](!mxLog[_0xb59f[174]]())})};mxEditor[_0xb59f[202]][_0xb59f[3102]]=function(){var _0x6b6cx2=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[746]]( new mxEventObject(mxEvent.SESSION,_0xb59f[812],_0x6b6cx2))});return this[_0xb59f[807]](this[_0xb59f[1056]],this[_0xb59f[1057]],this[_0xb59f[1058]],_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[3099]]=function(_0x6b6cx2){null!=_0x6b6cx2&&(( new mxCodec(_0x6b6cx2[_0xb59f[295]]))[_0xb59f[1093]](_0x6b6cx2,this),this[_0xb59f[3181]]())};mxEditor[_0xb59f[202]][_0xb59f[3182]]=function(){document[_0xb59f[3183]]=_0xb59f[3184]};mxEditor[_0xb59f[202]][_0xb59f[3181]]=function(){this[_0xb59f[1184]]=( new Date)[_0xb59f[178]]();this[_0xb59f[3095]][_0xb59f[200]]();this[_0xb59f[1183]]=0;this[_0xb59f[2128]](!1)};mxEditor[_0xb59f[202]][_0xb59f[3071]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3091]][_0x6b6cx2]=_0x6b6cx3};mxEditor[_0xb59f[202]][_0xb59f[350]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[3091]][_0x6b6cx2];if(null!=_0x6b6cx5){try{var _0x6b6cx9=arguments;_0x6b6cx9[0]=this;_0x6b6cx5[_0xb59f[183]](this,_0x6b6cx9)}catch(f){throw mxUtils[_0xb59f[267]](_0xb59f[3185]+_0x6b6cx2+_0xb59f[3186]+f[_0xb59f[281]],280,!0),f}}else {mxUtils[_0xb59f[267]](_0xb59f[3187]+_0x6b6cx2,280,!0)}};mxEditor[_0xb59f[202]][_0xb59f[3188]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[3118]][_0x6b6cx2]=_0x6b6cx3};mxEditor[_0xb59f[202]][_0xb59f[3189]]=function(_0x6b6cx2){return this[_0xb59f[3118]][_0x6b6cx2]};mxEditor[_0xb59f[202]][_0xb59f[3096]]=function(){var _0x6b6cx2= new mxGraph(null,null,this[_0xb59f[2720]]);_0x6b6cx2[_0xb59f[2673]](!0);_0x6b6cx2[_0xb59f[2674]](!0);this[_0xb59f[3190]](_0x6b6cx2);this[_0xb59f[3191]](_0x6b6cx2);this[_0xb59f[3192]](_0x6b6cx2);this[_0xb59f[3193]](_0x6b6cx2);this[_0xb59f[3194]](_0x6b6cx2);_0x6b6cx2[_0xb59f[2316]][_0xb59f[1033]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){return this[_0xb59f[3195]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5)});_0x6b6cx2[_0xb59f[2433]][_0xb59f[1033]]=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx4){return this[_0xb59f[2503]](_0x6b6cx2,_0x6b6cx4)});this[_0xb59f[3196]](_0x6b6cx2);this[_0xb59f[3197]](_0x6b6cx2);return _0x6b6cx2};mxEditor[_0xb59f[202]][_0xb59f[3196]]=function(_0x6b6cx2){_0x6b6cx2= new mxSwimlaneManager(_0x6b6cx2,!1);_0x6b6cx2[_0xb59f[1737]]=mxUtils[_0xb59f[885]](this,function(){return this[_0xb59f[3089]]});_0x6b6cx2[_0xb59f[994]]=mxUtils[_0xb59f[885]](this,function(){return this[_0xb59f[3128]]});return _0x6b6cx2};mxEditor[_0xb59f[202]][_0xb59f[3197]]=function(_0x6b6cx2){var _0x6b6cx3= new mxLayoutManager(_0x6b6cx2),_0x6b6cx4=this;_0x6b6cx3[_0xb59f[2754]]=function(_0x6b6cx3){var _0x6b6cx9=null,_0x6b6cxa=_0x6b6cx4[_0xb59f[1179]][_0xb59f[502]]();if(null!=_0x6b6cxa[_0xb59f[1197]](_0x6b6cx3)){if(_0x6b6cx4[_0xb59f[3129]]&&_0x6b6cx2[_0xb59f[1730]](_0x6b6cx3)){null==_0x6b6cx4[_0xb59f[3198]]&&(_0x6b6cx4[_0xb59f[3198]]=_0x6b6cx4[_0xb59f[3199]]()),_0x6b6cx9=_0x6b6cx4[_0xb59f[3198]]}else {if(_0x6b6cx4[_0xb59f[3126]]&&(_0x6b6cx2[_0xb59f[2553]](_0x6b6cx3)||null==_0x6b6cxa[_0xb59f[1197]](_0x6b6cxa[_0xb59f[1197]](_0x6b6cx3)))){null==_0x6b6cx4[_0xb59f[3200]]&&(_0x6b6cx4[_0xb59f[3200]]=_0x6b6cx4[_0xb59f[3201]]()),_0x6b6cx9=_0x6b6cx4[_0xb59f[3200]]}}};return _0x6b6cx9};return _0x6b6cx3};mxEditor[_0xb59f[202]][_0xb59f[3202]]=function(_0x6b6cx2){null==this[_0xb59f[1179]][_0xb59f[526]]&&(this[_0xb59f[1179]][_0xb59f[176]](_0x6b6cx2),this[_0xb59f[3203]]= new mxRubberband(this[_0xb59f[1179]]),this[_0xb59f[1157]]&&mxEvent[_0xb59f[1157]](_0x6b6cx2),mxClient[_0xb59f[496]]&& new mxDivResizer(_0x6b6cx2))};mxEditor[_0xb59f[202]][_0xb59f[3190]]=function(_0x6b6cx2){_0x6b6cx2[_0xb59f[169]](mxEvent.DOUBLE_CLICK,mxUtils[_0xb59f[885]](this,function(_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx4[_0xb59f[720]](_0xb59f[246]);null!=_0x6b6cx5&&(_0x6b6cx2[_0xb59f[994]]()&&null!=this[_0xb59f[3115]])&&(this[_0xb59f[350]](this[_0xb59f[3115]],_0x6b6cx5),_0x6b6cx4[_0xb59f[722]]())}))};mxEditor[_0xb59f[202]][_0xb59f[3191]]=function(_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx9=_0x6b6cx3[_0xb59f[720]](_0xb59f[1061]);this[_0xb59f[3095]][_0xb59f[1114]](_0x6b6cx9)});_0x6b6cx2[_0xb59f[502]]()[_0xb59f[169]](mxEvent.UNDO,_0x6b6cx3);_0x6b6cx2[_0xb59f[249]]()[_0xb59f[169]](mxEvent.UNDO,_0x6b6cx3);_0x6b6cx3=function(_0x6b6cx3,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx5[_0xb59f[720]](_0xb59f[1061])[_0xb59f[1065]];_0x6b6cx2[_0xb59f[904]](_0x6b6cx2[_0xb59f[2436]](_0x6b6cx9))};this[_0xb59f[3095]][_0xb59f[169]](mxEvent.UNDO,_0x6b6cx3);this[_0xb59f[3095]][_0xb59f[169]](mxEvent.REDO,_0x6b6cx3)};mxEditor[_0xb59f[202]][_0xb59f[3192]]=function(_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[885]](this,function(_0x6b6cx2){this[_0xb59f[746]]( new mxEventObject(mxEvent.ROOT))});_0x6b6cx2[_0xb59f[249]]()[_0xb59f[169]](mxEvent.DOWN,_0x6b6cx3);_0x6b6cx2[_0xb59f[249]]()[_0xb59f[169]](mxEvent.UP,_0x6b6cx3)};mxEditor[_0xb59f[202]][_0xb59f[3193]]=function(_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3,_0x6b6cx5){this[_0xb59f[2128]](!0);!0==this[_0xb59f[3140]]&&_0x6b6cx2[_0xb59f[2585]]();for(var _0x6b6cx9=_0x6b6cx5[_0xb59f[720]](_0xb59f[1061])[_0xb59f[1065]],_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx9[_0xb59f[67]];_0x6b6cxa++){var _0x6b6cx12=_0x6b6cx9[_0x6b6cxa];if(_0x6b6cx12 instanceof mxRootChange||_0x6b6cx12 instanceof mxValueChange&&_0x6b6cx12[_0xb59f[246]]==this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[813]]||_0x6b6cx12 instanceof mxCellAttributeChange&&_0x6b6cx12[_0xb59f[246]]==this[_0xb59f[1179]][_0xb59f[251]][_0xb59f[813]]){this[_0xb59f[746]]( new mxEventObject(mxEvent.ROOT));break}}});_0x6b6cx2[_0xb59f[502]]()[_0xb59f[169]](mxEvent.CHANGE,_0x6b6cx3)};mxEditor[_0xb59f[202]][_0xb59f[3194]]=function(_0x6b6cx2){var _0x6b6cx3=this;_0x6b6cx2[_0xb59f[1133]]({mouseDown:function(_0x6b6cx2,_0x6b6cx5){if(null!=_0x6b6cx3[_0xb59f[3083]]&&!_0x6b6cx5[_0xb59f[737]]()&&(_0x6b6cx3[_0xb59f[3117]]||null==_0x6b6cx5[_0xb59f[248]]())){_0x6b6cx3[_0xb59f[1179]][_0xb59f[2440]](),_0x6b6cx3[_0xb59f[3083]](_0x6b6cx5[_0xb59f[727]](),_0x6b6cx5[_0xb59f[736]]()),this[_0xb59f[1142]]= !0,_0x6b6cx5[_0xb59f[722]]()}},mouseMove:function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1142]]&&_0x6b6cx3[_0xb59f[722]]()},mouseUp:function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1142]]&&(this[_0xb59f[1142]]= !1,_0x6b6cx3[_0xb59f[722]]())}})};mxEditor[_0xb59f[202]][_0xb59f[3201]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[1020]],_0x6b6cx3= new mxStackLayout(this[_0xb59f[1179]],!this[_0xb59f[3089]],this[_0xb59f[3127]],2*_0x6b6cx2,2*_0x6b6cx2);_0x6b6cx3[_0xb59f[1713]]=function(_0x6b6cx2){return !_0x6b6cx3[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx2)};return _0x6b6cx3};mxEditor[_0xb59f[202]][_0xb59f[3199]]=function(){return  new mxCompactTreeLayout(this[_0xb59f[1179]],this[_0xb59f[3089]])};mxEditor[_0xb59f[202]][_0xb59f[3097]]=function(){return  new mxDefaultToolbar(null,this)};mxEditor[_0xb59f[202]][_0xb59f[3204]]=function(_0x6b6cx2){this[_0xb59f[3082]][_0xb59f[176]](_0x6b6cx2);mxClient[_0xb59f[496]]&& new mxDivResizer(_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[3205]]=function(_0x6b6cx2){null==this[_0xb59f[879]]&&(this[_0xb59f[879]]=_0x6b6cx2,this[_0xb59f[169]](mxEvent.SAVE,mxUtils[_0xb59f[885]](this,function(){var _0x6b6cx2=( new Date)[_0xb59f[3206]]();this[_0xb59f[3207]]((mxResources[_0xb59f[203]](this[_0xb59f[3106]])||this[_0xb59f[3106]])+_0xb59f[3186]+_0x6b6cx2)})),this[_0xb59f[169]](mxEvent.OPEN,mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[3207]]((mxResources[_0xb59f[203]](this[_0xb59f[3108]])||this[_0xb59f[3108]])+_0xb59f[3186]+this[_0xb59f[3122]])})),mxClient[_0xb59f[496]]&& new mxDivResizer(_0x6b6cx2))};mxEditor[_0xb59f[202]][_0xb59f[3207]]=function(_0x6b6cx2){null!=this[_0xb59f[879]]&&null!=_0x6b6cx2&&(this[_0xb59f[879]][_0xb59f[339]]=_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[3208]]=function(_0x6b6cx2){this[_0xb59f[169]](mxEvent.ROOT,mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){_0x6b6cx2[_0xb59f[339]]=this[_0xb59f[3209]]()}));mxClient[_0xb59f[496]]&& new mxDivResizer(_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[3210]]=function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx2&&( new mxCompactTreeLayout(this[_0xb59f[1179]],_0x6b6cx3))[_0xb59f[350]](_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[3209]]=function(){for(var _0x6b6cx2=_0xb59f[110],_0x6b6cx3=this[_0xb59f[1179]],_0x6b6cx4=_0x6b6cx3[_0xb59f[2534]]();null!=_0x6b6cx4&&null!=_0x6b6cx3[_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx3[_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx4));){_0x6b6cx3[_0xb59f[2553]](_0x6b6cx4)&&(_0x6b6cx2=_0xb59f[3211]+_0x6b6cx3[_0xb59f[2454]](_0x6b6cx4)+_0x6b6cx2),_0x6b6cx4=_0x6b6cx3[_0xb59f[502]]()[_0xb59f[1197]](_0x6b6cx4)};return this[_0xb59f[3212]]()+_0x6b6cx2};mxEditor[_0xb59f[202]][_0xb59f[3212]]=function(){var _0x6b6cx2=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[501]]();return this[_0xb59f[1179]][_0xb59f[2454]](_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[824]]=function(){this[_0xb59f[3095]][_0xb59f[824]]()};mxEditor[_0xb59f[202]][_0xb59f[825]]=function(){this[_0xb59f[3095]][_0xb59f[825]]()};mxEditor[_0xb59f[202]][_0xb59f[844]]=function(){var _0x6b6cx2=null!=this[_0xb59f[3121]]?this[_0xb59f[3121]]:this[_0xb59f[1179]][_0xb59f[1020]];return this[_0xb59f[1179]][_0xb59f[844]](this[_0xb59f[3213]](),_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[3213]]=function(){return this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1978]](this[_0xb59f[3120]])};mxEditor[_0xb59f[202]][_0xb59f[392]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[219]](_0x6b6cx2)[_0xb59f[875]]();this[_0xb59f[3214]](_0x6b6cx3[_0xb59f[158]]);this[_0xb59f[3122]]=_0x6b6cx2;this[_0xb59f[746]]( new mxEventObject(mxEvent.OPEN,_0xb59f[3122],_0x6b6cx2))}};mxEditor[_0xb59f[202]][_0xb59f[3214]]=function(_0x6b6cx2){( new mxCodec(_0x6b6cx2[_0xb59f[295]]))[_0xb59f[1093]](_0x6b6cx2,this[_0xb59f[1179]][_0xb59f[502]]());this[_0xb59f[3181]]()};mxEditor[_0xb59f[202]][_0xb59f[815]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx2=_0x6b6cx2||this[_0xb59f[3215]]();if(null!=_0x6b6cx2&&0<_0x6b6cx2[_0xb59f[67]]){var _0x6b6cx4=this[_0xb59f[3216]](_0x6b6cx3);this[_0xb59f[3217]](_0x6b6cx2,_0x6b6cx4);this[_0xb59f[2128]](!1)};this[_0xb59f[746]]( new mxEventObject(mxEvent.SAVE,_0xb59f[863],_0x6b6cx2))};mxEditor[_0xb59f[202]][_0xb59f[3217]]=function(_0x6b6cx2,_0x6b6cx3){this[_0xb59f[1070]]&&(_0x6b6cx3=encodeURIComponent(_0x6b6cx3));mxUtils[_0xb59f[814]](_0x6b6cx2,this[_0xb59f[3123]]+_0xb59f[226]+_0x6b6cx3,mxUtils[_0xb59f[885]](this,function(_0x6b6cx4){this[_0xb59f[746]]( new mxEventObject(mxEvent.POST,_0xb59f[870],_0x6b6cx4,_0xb59f[863],_0x6b6cx2,_0xb59f[410],_0x6b6cx3))}))};mxEditor[_0xb59f[202]][_0xb59f[3216]]=function(_0x6b6cx2){_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2:this[_0xb59f[1069]];var _0x6b6cx3=( new mxCodec)[_0xb59f[514]](this[_0xb59f[1179]][_0xb59f[502]]());return mxUtils[_0xb59f[875]](_0x6b6cx3,_0x6b6cx2)};mxEditor[_0xb59f[202]][_0xb59f[3215]]=function(){return this[_0xb59f[3124]]};mxEditor[_0xb59f[202]][_0xb59f[3142]]=function(){return this[_0xb59f[3125]]};mxEditor[_0xb59f[202]][_0xb59f[807]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=null;mxClient[_0xb59f[3101]]||(_0x6b6cx9= new mxSession(this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx2,_0x6b6cx3,_0x6b6cx4),_0x6b6cx9[_0xb59f[169]](mxEvent.RECEIVE,mxUtils[_0xb59f[885]](this,function(_0x6b6cx2,_0x6b6cx3){null!=_0x6b6cx3[_0xb59f[720]](_0xb59f[252])[_0xb59f[284]](_0xb59f[1088])&&this[_0xb59f[3181]]()})),_0x6b6cx9[_0xb59f[169]](mxEvent.DISCONNECT,_0x6b6cx5),_0x6b6cx9[_0xb59f[169]](mxEvent.CONNECT,_0x6b6cx5),_0x6b6cx9[_0xb59f[169]](mxEvent.NOTIFY,_0x6b6cx5),_0x6b6cx9[_0xb59f[169]](mxEvent.GET,_0x6b6cx5),_0x6b6cx9[_0xb59f[861]]());return _0x6b6cx9};mxEditor[_0xb59f[202]][_0xb59f[3218]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=this[_0xb59f[1179]][_0xb59f[2434]]()[_0xb59f[2054]][_0x6b6cx3];this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[2434]]()[_0xb59f[2074]](_0x6b6cx3,this[_0xb59f[1179]][_0xb59f[2434]]()[_0xb59f[2054]][_0x6b6cx2]);this[_0xb59f[1179]][_0xb59f[2434]]()[_0xb59f[2074]](_0x6b6cx2,_0x6b6cx4);this[_0xb59f[1179]][_0xb59f[802]]()};mxEditor[_0xb59f[202]][_0xb59f[3150]]=function(_0x6b6cx2){_0x6b6cx2=_0x6b6cx2||this[_0xb59f[1179]][_0xb59f[2452]]();null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[2534]](),null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[501]]()));if(null!=_0x6b6cx2){this[_0xb59f[1179]][_0xb59f[2126]](!0);var _0x6b6cx3=mxUtils[_0xb59f[445]](this[_0xb59f[1179]][_0xb59f[526]]),_0x6b6cx4=_0x6b6cx3[_0xb59f[235]]+10,_0x6b6cx3=_0x6b6cx3[_0xb59f[236]];if(null!=this[_0xb59f[716]]&&!this[_0xb59f[3139]]){_0x6b6cx4=this[_0xb59f[716]][_0xb59f[730]](),_0x6b6cx3=this[_0xb59f[716]][_0xb59f[732]]()}else {var _0x6b6cx5=this[_0xb59f[1179]][_0xb59f[2555]](_0x6b6cx2);null!=_0x6b6cx5&&(_0x6b6cx4+=_0x6b6cx5[_0xb59f[235]]+Math[_0xb59f[243]](200,_0x6b6cx5[_0xb59f[117]]),_0x6b6cx3+=_0x6b6cx5[_0xb59f[236]])};this[_0xb59f[3062]]();_0x6b6cx2=this[_0xb59f[3219]](_0x6b6cx2);null!=_0x6b6cx2&&(this[_0xb59f[716]]= new mxWindow(mxResources[_0xb59f[203]](this[_0xb59f[3110]])||this[_0xb59f[3110]],_0x6b6cx2,_0x6b6cx4,_0x6b6cx3,this[_0xb59f[3137]],this[_0xb59f[3138]],!1),this[_0xb59f[716]][_0xb59f[175]](!0))}};mxEditor[_0xb59f[202]][_0xb59f[3220]]=function(){return null!=this[_0xb59f[716]]};mxEditor[_0xb59f[202]][_0xb59f[3219]]=function(_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cx4=_0x6b6cx3[_0xb59f[433]](_0x6b6cx2);if(mxUtils[_0xb59f[1331]](_0x6b6cx4)){var _0x6b6cx5= new mxForm(_0xb59f[716]);_0x6b6cx5[_0xb59f[961]](_0xb59f[3222],_0x6b6cx2[_0xb59f[1103]]())[_0xb59f[57]](_0xb59f[3221],_0xb59f[128]);var _0x6b6cx9=null,_0x6b6cxa=null,_0x6b6cx12=null,_0x6b6cx13=null,_0x6b6cx14=null;_0x6b6cx3[_0xb59f[1193]](_0x6b6cx2)&&(_0x6b6cx9=_0x6b6cx3[_0xb59f[1721]](_0x6b6cx2),null!=_0x6b6cx9&&(_0x6b6cxa=_0x6b6cx5[_0xb59f[961]](_0xb59f[125],_0x6b6cx9[_0xb59f[236]]),_0x6b6cx12=_0x6b6cx5[_0xb59f[961]](_0xb59f[361],_0x6b6cx9[_0xb59f[235]]),_0x6b6cx13=_0x6b6cx5[_0xb59f[961]](_0xb59f[117],_0x6b6cx9[_0xb59f[117]]),_0x6b6cx14=_0x6b6cx5[_0xb59f[961]](_0xb59f[119],_0x6b6cx9[_0xb59f[119]])));for(var _0x6b6cx15=_0x6b6cx3[_0xb59f[474]](_0x6b6cx2),_0x6b6cx16=_0x6b6cx5[_0xb59f[961]](_0xb59f[3223],_0x6b6cx15||_0xb59f[110]),_0x6b6cx17=_0x6b6cx4[_0xb59f[320]],_0x6b6cx18=[],_0x6b6cx4=0;_0x6b6cx4<_0x6b6cx17[_0xb59f[67]];_0x6b6cx4++){_0x6b6cx18[_0x6b6cx4]=_0x6b6cx5[_0xb59f[968]](_0x6b6cx17[_0x6b6cx4][_0xb59f[301]],_0x6b6cx17[_0x6b6cx4][_0xb59f[318]],_0xb59f[685]==_0x6b6cx17[_0x6b6cx4][_0xb59f[301]]?4:2)};_0x6b6cx4=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[3062]]();_0x6b6cx3[_0xb59f[473]]();try{null!=_0x6b6cx9&&(_0x6b6cx9=_0x6b6cx9[_0xb59f[238]](),_0x6b6cx9[_0xb59f[235]]=parseFloat(_0x6b6cx12[_0xb59f[131]]),_0x6b6cx9[_0xb59f[236]]=parseFloat(_0x6b6cxa[_0xb59f[131]]),_0x6b6cx9[_0xb59f[117]]=parseFloat(_0x6b6cx13[_0xb59f[131]]),_0x6b6cx9[_0xb59f[119]]=parseFloat(_0x6b6cx14[_0xb59f[131]]),_0x6b6cx3[_0xb59f[1724]](_0x6b6cx2,_0x6b6cx9));0<_0x6b6cx16[_0xb59f[131]][_0xb59f[67]]?_0x6b6cx3[_0xb59f[475]](_0x6b6cx2,_0x6b6cx16[_0xb59f[131]]):_0x6b6cx3[_0xb59f[475]](_0x6b6cx2,null);for(var _0x6b6cx4=0;_0x6b6cx4<_0x6b6cx17[_0xb59f[67]];_0x6b6cx4++){var _0x6b6cx5= new mxCellAttributeChange(_0x6b6cx2,_0x6b6cx17[_0x6b6cx4][_0xb59f[301]],_0x6b6cx18[_0x6b6cx4][_0xb59f[131]]);_0x6b6cx3[_0xb59f[350]](_0x6b6cx5)};this[_0xb59f[1179]][_0xb59f[2455]](_0x6b6cx2)&&this[_0xb59f[1179]][_0xb59f[858]](_0x6b6cx2)}finally{_0x6b6cx3[_0xb59f[476]]()}});_0x6b6cx15=mxUtils[_0xb59f[885]](this,function(){this[_0xb59f[3062]]()});_0x6b6cx5[_0xb59f[956]](_0x6b6cx4,_0x6b6cx15);return _0x6b6cx5[_0xb59f[116]]};return null};mxEditor[_0xb59f[202]][_0xb59f[3062]]=function(){null!=this[_0xb59f[716]]&&(this[_0xb59f[716]][_0xb59f[515]](),this[_0xb59f[716]]=null)};mxEditor[_0xb59f[202]][_0xb59f[3175]]=function(){if(null==this[_0xb59f[3112]]){var _0x6b6cx2=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx2[_0xb59f[124]][_0xb59f[549]]=_0xb59f[952];_0x6b6cx2[_0xb59f[124]][_0xb59f[357]]=_0xb59f[550];var _0x6b6cx3=document[_0xb59f[112]][_0xb59f[159]],_0x6b6cx3= new mxWindow(mxResources[_0xb59f[203]](this[_0xb59f[3111]])||this[_0xb59f[3111]],_0x6b6cx2,_0x6b6cx3-220,this[_0xb59f[3132]],200);_0x6b6cx3[_0xb59f[164]](!0);_0x6b6cx3[_0xb59f[165]]= !1;var _0x6b6cx4=mxUtils[_0xb59f[885]](this,function(_0x6b6cx3){mxEvent[_0xb59f[762]](_0x6b6cx2);_0x6b6cx2[_0xb59f[339]]=_0xb59f[110];this[_0xb59f[3224]](_0x6b6cx2)});this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[169]](mxEvent.CHANGE,_0x6b6cx4);this[_0xb59f[1179]][_0xb59f[2435]]()[_0xb59f[169]](mxEvent.CHANGE,_0x6b6cx4);this[_0xb59f[1179]][_0xb59f[169]](mxEvent.ROOT,_0x6b6cx4);null!=this[_0xb59f[3131]]&&_0x6b6cx3[_0xb59f[951]](this[_0xb59f[3131]]);this[_0xb59f[3112]]=_0x6b6cx3;this[_0xb59f[3224]](_0x6b6cx2)};this[_0xb59f[3112]][_0xb59f[175]](!0)};mxEditor[_0xb59f[202]][_0xb59f[3225]]=function(_0x6b6cx2){null!=this[_0xb59f[3112]]&&(_0x6b6cx2=this[_0xb59f[3112]][_0xb59f[905]],mxEvent[_0xb59f[762]](_0x6b6cx2),_0x6b6cx2[_0xb59f[339]]=_0xb59f[110],this[_0xb59f[3224]](_0x6b6cx2))};mxEditor[_0xb59f[202]][_0xb59f[3224]]=function(_0x6b6cx2){};mxEditor[_0xb59f[202]][_0xb59f[3177]]=function(_0x6b6cx2){if(null==this[_0xb59f[2719]]){var _0x6b6cx3=document[_0xb59f[55]](_0xb59f[389]);_0x6b6cx3[_0xb59f[57]](_0xb59f[390],mxResources[_0xb59f[203]](_0xb59f[3134])||this[_0xb59f[3134]]);_0x6b6cx3[_0xb59f[57]](_0xb59f[119],_0xb59f[118]);_0x6b6cx3[_0xb59f[57]](_0xb59f[117],_0xb59f[118]);_0x6b6cx3[_0xb59f[57]](_0xb59f[3226],_0xb59f[468]);_0x6b6cx3[_0xb59f[124]][_0xb59f[1028]]=_0xb59f[1391];_0x6b6cx2=document[_0xb59f[112]][_0xb59f[159]];var _0x6b6cx4=document[_0xb59f[112]][_0xb59f[157]]||document[_0xb59f[158]][_0xb59f[157]],_0x6b6cx5= new mxWindow(mxResources[_0xb59f[203]](this[_0xb59f[3113]])||this[_0xb59f[3113]],_0x6b6cx3,(_0x6b6cx2-this[_0xb59f[3135]])/2,(_0x6b6cx4-this[_0xb59f[3136]])/3,this[_0xb59f[3135]],this[_0xb59f[3136]]);_0x6b6cx5[_0xb59f[161]](!0);_0x6b6cx5[_0xb59f[164]](!0);_0x6b6cx5[_0xb59f[165]]= !1;_0x6b6cx5[_0xb59f[163]](!0);null!=this[_0xb59f[3133]]&&_0x6b6cx5[_0xb59f[951]](this[_0xb59f[3133]]);mxClient[_0xb59f[133]]&&(_0x6b6cx2=function(_0x6b6cx2){_0x6b6cx3[_0xb59f[57]](_0xb59f[119],_0x6b6cx5[_0xb59f[485]][_0xb59f[167]]-26+_0xb59f[168])},_0x6b6cx5[_0xb59f[169]](mxEvent.RESIZE_END,_0x6b6cx2),_0x6b6cx5[_0xb59f[169]](mxEvent.MAXIMIZE,_0x6b6cx2),_0x6b6cx5[_0xb59f[169]](mxEvent.NORMALIZE,_0x6b6cx2),_0x6b6cx5[_0xb59f[169]](mxEvent.SHOW,_0x6b6cx2));this[_0xb59f[2719]]=_0x6b6cx5};this[_0xb59f[2719]][_0xb59f[175]](!0)};mxEditor[_0xb59f[202]][_0xb59f[3179]]=function(){if(null==this[_0xb59f[2136]]){var _0x6b6cx2=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx2[_0xb59f[124]][_0xb59f[277]]=_0xb59f[188];_0x6b6cx2[_0xb59f[124]][_0xb59f[117]]=_0xb59f[118];_0x6b6cx2[_0xb59f[124]][_0xb59f[119]]=_0xb59f[118];_0x6b6cx2[_0xb59f[124]][_0xb59f[1537]]=_0xb59f[1391];_0x6b6cx2[_0xb59f[124]][_0xb59f[270]]=_0xb59f[582];var _0x6b6cx3= new mxWindow(mxResources[_0xb59f[203]](this[_0xb59f[3114]])||this[_0xb59f[3114]],_0x6b6cx2,600,480,200,200,!1),_0x6b6cx4= new mxOutline(this[_0xb59f[1179]],_0x6b6cx2);_0x6b6cx3[_0xb59f[164]](!0);_0x6b6cx3[_0xb59f[163]](!0);_0x6b6cx3[_0xb59f[165]]= !1;_0x6b6cx3[_0xb59f[169]](mxEvent.RESIZE_END,function(){_0x6b6cx4[_0xb59f[2729]]()});this[_0xb59f[2136]]=_0x6b6cx3;this[_0xb59f[2136]][_0xb59f[2136]]=_0x6b6cx4};this[_0xb59f[2136]][_0xb59f[175]](!0);this[_0xb59f[2136]][_0xb59f[2136]][_0xb59f[2729]](!0)};mxEditor[_0xb59f[202]][_0xb59f[3086]]=function(_0x6b6cx2){_0xb59f[804]==_0x6b6cx2?(this[_0xb59f[1179]][_0xb59f[2316]][_0xb59f[2840]]= !1,this[_0xb59f[1179]][_0xb59f[1995]](!1)):_0xb59f[807]==_0x6b6cx2?(this[_0xb59f[1179]][_0xb59f[2316]][_0xb59f[2840]]= !1,this[_0xb59f[1179]][_0xb59f[1995]](!0)):_0xb59f[796]==_0x6b6cx2&&(this[_0xb59f[1179]][_0xb59f[2316]][_0xb59f[2840]]= !0,this[_0xb59f[1179]][_0xb59f[1995]](!1))};mxEditor[_0xb59f[202]][_0xb59f[3195]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){this[_0xb59f[3094]][_0xb59f[3065]](this,_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)};mxEditor[_0xb59f[202]][_0xb59f[2503]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null;if(null!=this[_0xb59f[2075]]){_0x6b6cx4=this[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[1978]](this[_0xb59f[2075]])}else {_0x6b6cx4= new mxCell(_0xb59f[110]);_0x6b6cx4[_0xb59f[1994]](!0);var _0x6b6cx5= new mxGeometry;_0x6b6cx5[_0xb59f[1500]]= !0;_0x6b6cx4[_0xb59f[1724]](_0x6b6cx5)};_0x6b6cx5=this[_0xb59f[2291]]();null!=_0x6b6cx5&&_0x6b6cx4[_0xb59f[475]](_0x6b6cx5);return _0x6b6cx4};mxEditor[_0xb59f[202]][_0xb59f[2291]]=function(){return this[_0xb59f[3119]]};mxEditor[_0xb59f[202]][_0xb59f[3227]]=function(_0x6b6cx2){return null!=this[_0xb59f[3093]]&&0<this[_0xb59f[3093]][_0xb59f[67]]&&this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx2)?this[_0xb59f[3093]][this[_0xb59f[3130]]++ %this[_0xb59f[3093]][_0xb59f[67]]]:null};mxEditor[_0xb59f[202]][_0xb59f[3228]]=function(_0x6b6cx2){if(null!=this[_0xb59f[3100]]){var _0x6b6cx3=this[_0xb59f[3227]](_0x6b6cx2);null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[475]](_0x6b6cx2[_0xb59f[474]]()+_0xb59f[471]+this[_0xb59f[3100]]+_0xb59f[226]+_0x6b6cx3)}};mxEditor[_0xb59f[202]][_0xb59f[817]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){for(var _0x6b6cx9=this[_0xb59f[1179]][_0xb59f[502]]();null!=_0x6b6cx2&&!this[_0xb59f[1179]][_0xb59f[2685]](_0x6b6cx2);){_0x6b6cx2=_0x6b6cx9[_0xb59f[1197]](_0x6b6cx2)};_0x6b6cx2=null!=_0x6b6cx2?_0x6b6cx2:this[_0xb59f[1179]][_0xb59f[2461]](_0x6b6cx4,_0x6b6cx5);var _0x6b6cxa=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[255]],_0x6b6cx12=_0x6b6cx9[_0xb59f[1721]](_0x6b6cx3),_0x6b6cx13=_0x6b6cx9[_0xb59f[1721]](_0x6b6cx2);if(this[_0xb59f[1179]][_0xb59f[1730]](_0x6b6cx3)&&!this[_0xb59f[1179]][_0xb59f[2412]]){_0x6b6cx2=null}else {if(null==_0x6b6cx2&&this[_0xb59f[3116]]){return null};if(null!=_0x6b6cx2&&null!=_0x6b6cx13){var _0x6b6cx14=this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[248]](_0x6b6cx2);if(null!=_0x6b6cx14){if(_0x6b6cx4-=_0x6b6cx14[_0xb59f[2078]][_0xb59f[235]]*_0x6b6cxa,_0x6b6cx5-=_0x6b6cx14[_0xb59f[2078]][_0xb59f[236]]*_0x6b6cxa,this[_0xb59f[1179]][_0xb59f[3229]]){var _0x6b6cx13=_0x6b6cx12[_0xb59f[117]],_0x6b6cx15=_0x6b6cx12[_0xb59f[119]],_0x6b6cx16=_0x6b6cx14[_0xb59f[235]]+_0x6b6cx14[_0xb59f[117]];_0x6b6cx4+_0x6b6cx13>_0x6b6cx16&&(_0x6b6cx4-=_0x6b6cx4+_0x6b6cx13-_0x6b6cx16);_0x6b6cx16=_0x6b6cx14[_0xb59f[236]]+_0x6b6cx14[_0xb59f[119]];_0x6b6cx5+_0x6b6cx15>_0x6b6cx16&&(_0x6b6cx5-=_0x6b6cx5+_0x6b6cx15-_0x6b6cx16)}}else {null!=_0x6b6cx13&&(_0x6b6cx4-=_0x6b6cx13[_0xb59f[235]]*_0x6b6cxa,_0x6b6cx5-=_0x6b6cx13[_0xb59f[236]]*_0x6b6cxa)}}};_0x6b6cx12=_0x6b6cx12[_0xb59f[238]]();_0x6b6cx12[_0xb59f[235]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx4/_0x6b6cxa-this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[513]][_0xb59f[235]]-this[_0xb59f[1179]][_0xb59f[1020]]/2);_0x6b6cx12[_0xb59f[236]]=this[_0xb59f[1179]][_0xb59f[1021]](_0x6b6cx5/_0x6b6cxa-this[_0xb59f[1179]][_0xb59f[249]]()[_0xb59f[513]][_0xb59f[236]]-this[_0xb59f[1179]][_0xb59f[1020]]/2);_0x6b6cx3[_0xb59f[1724]](_0x6b6cx12);null==_0x6b6cx2&&(_0x6b6cx2=this[_0xb59f[1179]][_0xb59f[902]]());this[_0xb59f[3228]](_0x6b6cx3);this[_0xb59f[746]]( new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,_0xb59f[1988],_0x6b6cx3,_0xb59f[1101],_0x6b6cx2));_0x6b6cx9[_0xb59f[473]]();try{_0x6b6cx3=this[_0xb59f[1179]][_0xb59f[2103]](_0x6b6cx3,_0x6b6cx2),null!=_0x6b6cx3&&(this[_0xb59f[1179]][_0xb59f[2509]](_0x6b6cx3),this[_0xb59f[746]]( new mxEventObject(mxEvent.ADD_VERTEX,_0xb59f[1988],_0x6b6cx3)))}finally{_0x6b6cx9[_0xb59f[476]]()};null!=_0x6b6cx3&&(this[_0xb59f[1179]][_0xb59f[2450]](_0x6b6cx3),this[_0xb59f[1179]][_0xb59f[2564]](_0x6b6cx3),this[_0xb59f[746]]( new mxEventObject(mxEvent.AFTER_ADD_VERTEX,_0xb59f[1988],_0x6b6cx3)));return _0x6b6cx3};mxEditor[_0xb59f[202]][_0xb59f[515]]=function(){this[_0xb59f[2717]]||(this[_0xb59f[2717]]= !0,null!=this[_0xb59f[3112]]&&this[_0xb59f[3112]][_0xb59f[515]](),null!=this[_0xb59f[2136]]&&this[_0xb59f[2136]][_0xb59f[515]](),null!=this[_0xb59f[716]]&&this[_0xb59f[716]][_0xb59f[515]](),null!=this[_0xb59f[3098]]&&this[_0xb59f[3098]][_0xb59f[515]](),null!=this[_0xb59f[3203]]&&this[_0xb59f[3203]][_0xb59f[515]](),null!=this[_0xb59f[3082]]&&this[_0xb59f[3082]][_0xb59f[515]](),null!=this[_0xb59f[1179]]&&this[_0xb59f[1179]][_0xb59f[515]](),this[_0xb59f[3118]]=this[_0xb59f[879]]=null)};var mxCodecRegistry={codecs:[],aliases:[],register:function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[718]]();mxCodecRegistry[_0xb59f[3230]][_0x6b6cx3]=_0x6b6cx2;var _0x6b6cx4=mxUtils[_0xb59f[197]](_0x6b6cx2[_0xb59f[3231]][_0xb59f[196]]);_0x6b6cx4!=_0x6b6cx3&&mxCodecRegistry[_0xb59f[3232]](_0x6b6cx4,_0x6b6cx3)};return _0x6b6cx2},addAlias:function(_0x6b6cx2,_0x6b6cx3){mxCodecRegistry[_0xb59f[3233]][_0x6b6cx2]=_0x6b6cx3},getCodec:function(_0x6b6cx2){var _0x6b6cx3=null;if(null!=_0x6b6cx2){var _0x6b6cx3=mxUtils[_0xb59f[197]](_0x6b6cx2),_0x6b6cx4=mxCodecRegistry[_0xb59f[3233]][_0x6b6cx3];null!=_0x6b6cx4&&(_0x6b6cx3=_0x6b6cx4);_0x6b6cx3=mxCodecRegistry[_0xb59f[3230]][_0x6b6cx3];if(null==_0x6b6cx3){try{_0x6b6cx3= new mxObjectCodec( new _0x6b6cx2),mxCodecRegistry[_0xb59f[3234]](_0x6b6cx3)}catch(d){}}};return _0x6b6cx3}};function mxCodec(_0x6b6cx2){this[_0xb59f[395]]=_0x6b6cx2||mxUtils[_0xb59f[306]]();this[_0xb59f[68]]=[]}mxCodec[_0xb59f[202]][_0xb59f[395]]=null;mxCodec[_0xb59f[202]][_0xb59f[68]]=null;mxCodec[_0xb59f[202]][_0xb59f[3235]]= !1;mxCodec[_0xb59f[202]][_0xb59f[1104]]=function(_0x6b6cx2,_0x6b6cx3){return this[_0xb59f[68]][_0x6b6cx2]=_0x6b6cx3};mxCodec[_0xb59f[202]][_0xb59f[3236]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=_0x6b6cx2&&(_0x6b6cx3=this[_0xb59f[68]][_0x6b6cx2],null==_0x6b6cx3&&(_0x6b6cx3=this[_0xb59f[1060]](_0x6b6cx2),null==_0x6b6cx3&&(_0x6b6cx2=this[_0xb59f[1362]](_0x6b6cx2),null!=_0x6b6cx2&&(_0x6b6cx3=this[_0xb59f[1093]](_0x6b6cx2)))));return _0x6b6cx3};mxCodec[_0xb59f[202]][_0xb59f[1060]]=function(_0x6b6cx2){return null};mxCodec[_0xb59f[202]][_0xb59f[1362]]=function(_0x6b6cx2,_0x6b6cx3){return mxUtils[_0xb59f[290]](this[_0xb59f[395]][_0xb59f[158]],null!=_0x6b6cx3?_0x6b6cx3:_0xb59f[1363],_0x6b6cx2)};mxCodec[_0xb59f[202]][_0xb59f[1103]]=function(_0x6b6cx2){var _0x6b6cx3=null;null!=_0x6b6cx2&&(_0x6b6cx3=this[_0xb59f[3237]](_0x6b6cx2),null==_0x6b6cx3&&_0x6b6cx2 instanceof mxCell&&(_0x6b6cx3=_0x6b6cx2[_0xb59f[1103]](),null==_0x6b6cx3&&(_0x6b6cx3=mxCellPath[_0xb59f[385]](_0x6b6cx2),0==_0x6b6cx3[_0xb59f[67]]&&(_0x6b6cx3=_0xb59f[813]))));return _0x6b6cx3};mxCodec[_0xb59f[202]][_0xb59f[3237]]=function(_0x6b6cx2){return null};mxCodec[_0xb59f[202]][_0xb59f[514]]=function(_0x6b6cx2){var _0x6b6cx3=null;if(null!=_0x6b6cx2&&null!=_0x6b6cx2[_0xb59f[196]]){var _0x6b6cx4=mxCodecRegistry[_0xb59f[3238]](_0x6b6cx2[_0xb59f[196]]);null!=_0x6b6cx4?_0x6b6cx3=_0x6b6cx4[_0xb59f[514]](this,_0x6b6cx2):mxUtils[_0xb59f[1331]](_0x6b6cx2)?_0x6b6cx3=mxClient[_0xb59f[80]]?_0x6b6cx2[_0xb59f[511]](!0):this[_0xb59f[395]][_0xb59f[3239]](_0x6b6cx2,!0):mxLog[_0xb59f[283]](_0xb59f[3240]+mxUtils[_0xb59f[197]](_0x6b6cx2[_0xb59f[196]]))};return _0x6b6cx3};mxCodec[_0xb59f[202]][_0xb59f[1093]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=null;if(null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[288]]==mxConstants[_0xb59f[289]]){var _0x6b6cx5=null;try{_0x6b6cx5=eval(_0x6b6cx2[_0xb59f[301]])}catch(e){};try{var _0x6b6cxa=mxCodecRegistry[_0xb59f[3238]](_0x6b6cx5);null!=_0x6b6cxa?_0x6b6cx4=_0x6b6cxa[_0xb59f[1093]](this,_0x6b6cx2,_0x6b6cx3):(_0x6b6cx4=_0x6b6cx2[_0xb59f[511]](!0),_0x6b6cx4[_0xb59f[1390]](_0xb59f[3069]))}catch(g){mxLog[_0xb59f[143]](_0xb59f[3241]+_0x6b6cx2[_0xb59f[301]]+_0xb59f[3186]+g[_0xb59f[281]])}};return _0x6b6cx4};mxCodec[_0xb59f[202]][_0xb59f[3242]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3[_0xb59f[62]](this[_0xb59f[514]](_0x6b6cx2));if(null==_0x6b6cx4||_0x6b6cx4){_0x6b6cx4=_0x6b6cx2[_0xb59f[262]]();for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx4;_0x6b6cx5++){this[_0xb59f[3242]](_0x6b6cx2[_0xb59f[263]](_0x6b6cx5),_0x6b6cx3)}}};mxCodec[_0xb59f[202]][_0xb59f[3243]]=function(_0x6b6cx2){return null!=_0x6b6cx2&&_0xb59f[279]== typeof _0x6b6cx2[_0xb59f[3243]]?_0x6b6cx2[_0xb59f[3243]]():!1};mxCodec[_0xb59f[202]][_0xb59f[3244]]=function(_0x6b6cx2,_0x6b6cx3){_0x6b6cx3=null!=_0x6b6cx3?_0x6b6cx3:!0;var _0x6b6cx4=null;if(null!=_0x6b6cx2&&_0x6b6cx2[_0xb59f[288]]==mxConstants[_0xb59f[289]]){_0x6b6cx4=mxCodecRegistry[_0xb59f[3238]](_0x6b6cx2[_0xb59f[301]]);if(!this[_0xb59f[3243]](_0x6b6cx4)){for(var _0x6b6cx5=_0x6b6cx2[_0xb59f[285]];null!=_0x6b6cx5&&!this[_0xb59f[3243]](_0x6b6cx4);){_0x6b6cx4=mxCodecRegistry[_0xb59f[3238]](_0x6b6cx5[_0xb59f[301]]),_0x6b6cx5=_0x6b6cx5[_0xb59f[287]]}};this[_0xb59f[3243]](_0x6b6cx4)||(_0x6b6cx4=mxCodecRegistry[_0xb59f[3238]](mxCell));_0x6b6cx4=_0x6b6cx4[_0xb59f[1093]](this,_0x6b6cx2);_0x6b6cx3&&this[_0xb59f[3245]](_0x6b6cx4)};return _0x6b6cx4};mxCodec[_0xb59f[202]][_0xb59f[3245]]=function(_0x6b6cx2){var _0x6b6cx3=_0x6b6cx2[_0xb59f[1101]],_0x6b6cx4=_0x6b6cx2[_0xb59f[1709]](!0),_0x6b6cx5=_0x6b6cx2[_0xb59f[1709]](!1);_0x6b6cx2[_0xb59f[1957]](null,!1);_0x6b6cx2[_0xb59f[1957]](null,!0);_0x6b6cx2[_0xb59f[1101]]=null;null!=_0x6b6cx3&&_0x6b6cx3[_0xb59f[1937]](_0x6b6cx2);null!=_0x6b6cx4&&_0x6b6cx4[_0xb59f[1960]](_0x6b6cx2,!0);null!=_0x6b6cx5&&_0x6b6cx5[_0xb59f[1960]](_0x6b6cx2,!1)};mxCodec[_0xb59f[202]][_0xb59f[57]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null!=_0x6b6cx3&&null!=_0x6b6cx4&&_0x6b6cx2[_0xb59f[57]](_0x6b6cx3,_0x6b6cx4)};function mxObjectCodec(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[3231]]=_0x6b6cx2;this[_0xb59f[3246]]=null!=_0x6b6cx3?_0x6b6cx3:[];this[_0xb59f[3247]]=null!=_0x6b6cx4?_0x6b6cx4:[];this[_0xb59f[3248]]=null!=_0x6b6cx5?_0x6b6cx5:[];this[_0xb59f[3249]]={};for(var _0x6b6cx9 in this[_0xb59f[3248]]){this[_0xb59f[3249]][this[_0xb59f[3248]][_0x6b6cx9]]=_0x6b6cx9}}mxObjectCodec[_0xb59f[202]][_0xb59f[3231]]=null;mxObjectCodec[_0xb59f[202]][_0xb59f[3246]]=null;mxObjectCodec[_0xb59f[202]][_0xb59f[3247]]=null;mxObjectCodec[_0xb59f[202]][_0xb59f[3248]]=null;mxObjectCodec[_0xb59f[202]][_0xb59f[3249]]=null;mxObjectCodec[_0xb59f[202]][_0xb59f[718]]=function(){return mxUtils[_0xb59f[197]](this[_0xb59f[3231]][_0xb59f[196]])};mxObjectCodec[_0xb59f[202]][_0xb59f[3250]]=function(){return  new this[_0xb59f[3231]][_0xb59f[196]]};mxObjectCodec[_0xb59f[202]][_0xb59f[3251]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[3249]][_0x6b6cx2];null!=_0x6b6cx3&&(_0x6b6cx2=_0x6b6cx3)};return _0x6b6cx2};mxObjectCodec[_0xb59f[202]][_0xb59f[3252]]=function(_0x6b6cx2){if(null!=_0x6b6cx2){var _0x6b6cx3=this[_0xb59f[3248]][_0x6b6cx2];null!=_0x6b6cx3&&(_0x6b6cx2=_0x6b6cx3)};return _0x6b6cx2};mxObjectCodec[_0xb59f[202]][_0xb59f[3253]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){return _0x6b6cx3==mxObjectIdentity[_0xb59f[195]]||0<=mxUtils[_0xb59f[2]](this[_0xb59f[3246]],_0x6b6cx3)};mxObjectCodec[_0xb59f[202]][_0xb59f[3254]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){return 0<=mxUtils[_0xb59f[2]](this[_0xb59f[3247]],_0x6b6cx3)};mxObjectCodec[_0xb59f[202]][_0xb59f[514]]=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4=_0x6b6cx2[_0xb59f[395]][_0xb59f[55]](this[_0xb59f[718]]());_0x6b6cx3=this[_0xb59f[3255]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);this[_0xb59f[3256]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);return this[_0xb59f[3257]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)};mxObjectCodec[_0xb59f[202]][_0xb59f[3256]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2[_0xb59f[57]](_0x6b6cx4,_0xb59f[1363],_0x6b6cx2[_0xb59f[1103]](_0x6b6cx3));for(var _0x6b6cx5 in _0x6b6cx3){var _0x6b6cx9=_0x6b6cx5,_0x6b6cxa=_0x6b6cx3[_0x6b6cx9];null!=_0x6b6cxa&&!this[_0xb59f[3253]](_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,!0)&&(mxUtils[_0xb59f[1946]](_0x6b6cx9)&&(_0x6b6cx9=null),this[_0xb59f[3258]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx9,_0x6b6cxa,_0x6b6cx4))}};mxObjectCodec[_0xb59f[202]][_0xb59f[3258]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){if(null!=_0x6b6cx5){if(this[_0xb59f[3254]](_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,!0)){var _0x6b6cxa=_0x6b6cx2[_0xb59f[1103]](_0x6b6cx5);if(null==_0x6b6cxa){mxLog[_0xb59f[283]](_0xb59f[3259]+this[_0xb59f[718]]()+_0xb59f[87]+_0x6b6cx4+_0xb59f[226]+_0x6b6cx5);return};_0x6b6cx5=_0x6b6cxa};_0x6b6cxa=this[_0xb59f[3231]][_0x6b6cx4];if(null==_0x6b6cx4||_0x6b6cx2[_0xb59f[3235]]||_0x6b6cxa!=_0x6b6cx5){_0x6b6cx4=this[_0xb59f[3252]](_0x6b6cx4),this[_0xb59f[3260]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)}}};mxObjectCodec[_0xb59f[202]][_0xb59f[3260]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0xb59f[194]!= typeof _0x6b6cx5?this[_0xb59f[3261]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9):this[_0xb59f[3262]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9)};mxObjectCodec[_0xb59f[202]][_0xb59f[3261]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx5=this[_0xb59f[3263]](_0x6b6cx5);null==_0x6b6cx4?(_0x6b6cx3=_0x6b6cx2[_0xb59f[395]][_0xb59f[55]](_0xb59f[99]),_0xb59f[279]== typeof _0x6b6cx5?_0x6b6cx3[_0xb59f[62]](_0x6b6cx2[_0xb59f[395]][_0xb59f[344]](_0x6b6cx5)):_0x6b6cx2[_0xb59f[57]](_0x6b6cx3,_0xb59f[131],_0x6b6cx5),_0x6b6cx9[_0xb59f[62]](_0x6b6cx3)):_0xb59f[279]!= typeof _0x6b6cx5&&_0x6b6cx2[_0xb59f[57]](_0x6b6cx9,_0x6b6cx4,_0x6b6cx5)};mxObjectCodec[_0xb59f[202]][_0xb59f[3262]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){_0x6b6cx2=_0x6b6cx2[_0xb59f[514]](_0x6b6cx5);null!=_0x6b6cx2?(null!=_0x6b6cx4&&_0x6b6cx2[_0xb59f[57]](_0xb59f[3069],_0x6b6cx4),_0x6b6cx9[_0xb59f[62]](_0x6b6cx2)):mxLog[_0xb59f[283]](_0xb59f[3264]+this[_0xb59f[718]]()+_0xb59f[87]+_0x6b6cx4+_0xb59f[3186]+_0x6b6cx5)};mxObjectCodec[_0xb59f[202]][_0xb59f[3263]]=function(_0x6b6cx2){if(_0xb59f[82]== typeof _0x6b6cx2[_0xb59f[67]]&&(!0==_0x6b6cx2||!1==_0x6b6cx2)){_0x6b6cx2=!0==_0x6b6cx2?_0xb59f[500]:_0xb59f[468]};return _0x6b6cx2};mxObjectCodec[_0xb59f[202]][_0xb59f[3265]]=function(_0x6b6cx2){mxUtils[_0xb59f[1946]](_0x6b6cx2)&&(_0x6b6cx2=parseFloat(_0x6b6cx2));return _0x6b6cx2};mxObjectCodec[_0xb59f[202]][_0xb59f[3255]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx3};mxObjectCodec[_0xb59f[202]][_0xb59f[3257]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx4};mxObjectCodec[_0xb59f[202]][_0xb59f[1093]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx3[_0xb59f[284]](_0xb59f[1363]),_0x6b6cx9=_0x6b6cx2[_0xb59f[68]][_0x6b6cx5];null==_0x6b6cx9&&(_0x6b6cx9=_0x6b6cx4||this[_0xb59f[3250]](),null!=_0x6b6cx5&&_0x6b6cx2[_0xb59f[1104]](_0x6b6cx5,_0x6b6cx9));_0x6b6cx3=this[_0xb59f[3266]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx9);this[_0xb59f[3267]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx9);return this[_0xb59f[3268]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx9)};mxObjectCodec[_0xb59f[202]][_0xb59f[3267]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){null!=_0x6b6cx3&&(this[_0xb59f[3269]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4),this[_0xb59f[3270]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4))};mxObjectCodec[_0xb59f[202]][_0xb59f[3269]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx3=_0x6b6cx3[_0xb59f[320]];if(null!=_0x6b6cx3){for(var _0x6b6cx5=0;_0x6b6cx5<_0x6b6cx3[_0xb59f[67]];_0x6b6cx5++){this[_0xb59f[3271]](_0x6b6cx2,_0x6b6cx3[_0x6b6cx5],_0x6b6cx4)}}};mxObjectCodec[_0xb59f[202]][_0xb59f[3271]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx3[_0xb59f[301]];if(_0xb59f[3069]!=_0x6b6cx5&&_0xb59f[1363]!=_0x6b6cx5){_0x6b6cx3=this[_0xb59f[3265]](_0x6b6cx3[_0xb59f[318]]);var _0x6b6cx9=this[_0xb59f[3251]](_0x6b6cx5);if(this[_0xb59f[3254]](_0x6b6cx4,_0x6b6cx9,_0x6b6cx3,!1)){_0x6b6cx2=_0x6b6cx2[_0xb59f[3236]](_0x6b6cx3);if(null==_0x6b6cx2){mxLog[_0xb59f[283]](_0xb59f[3272]+this[_0xb59f[718]]()+_0xb59f[87]+_0x6b6cx5+_0xb59f[226]+_0x6b6cx3);return};_0x6b6cx3=_0x6b6cx2};this[_0xb59f[3253]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx3,!1)||(_0x6b6cx4[_0x6b6cx5]=_0x6b6cx3)}};mxObjectCodec[_0xb59f[202]][_0xb59f[3270]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){for(_0x6b6cx3=_0x6b6cx3[_0xb59f[285]];null!=_0x6b6cx3;){var _0x6b6cx5=_0x6b6cx3[_0xb59f[287]];_0x6b6cx3[_0xb59f[288]]==mxConstants[_0xb59f[289]]&&!this[_0xb59f[3273]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4)&&this[_0xb59f[3274]](_0x6b6cx2,_0x6b6cx3,_0x6b6cx4);_0x6b6cx3=_0x6b6cx5}};mxObjectCodec[_0xb59f[202]][_0xb59f[3274]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){var _0x6b6cx5=this[_0xb59f[3251]](_0x6b6cx3[_0xb59f[284]](_0xb59f[3069]));if(null==_0x6b6cx5||!this[_0xb59f[3253]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx3,!1)){var _0x6b6cx9=this[_0xb59f[3275]](_0x6b6cx4,_0x6b6cx5,_0x6b6cx3),_0x6b6cxa=null;_0xb59f[99]==_0x6b6cx3[_0xb59f[301]]?(_0x6b6cxa=_0x6b6cx3[_0xb59f[284]](_0xb59f[131]),null==_0x6b6cxa&&(_0x6b6cxa=mxUtils[_0xb59f[1545]](mxUtils[_0xb59f[329]](_0x6b6cx3)))):_0x6b6cxa=_0x6b6cx2[_0xb59f[1093]](_0x6b6cx3,_0x6b6cx9);this[_0xb59f[3276]](_0x6b6cx4,_0x6b6cx5,_0x6b6cxa,_0x6b6cx9)}};mxObjectCodec[_0xb59f[202]][_0xb59f[3275]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){_0x6b6cx2=_0x6b6cx2[_0x6b6cx3];_0x6b6cx2 instanceof Array&&0<_0x6b6cx2[_0xb59f[67]]&&(_0x6b6cx2=null);return _0x6b6cx2};mxObjectCodec[_0xb59f[202]][_0xb59f[3276]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4,_0x6b6cx5){null!=_0x6b6cx4&&_0x6b6cx4!=_0x6b6cx5&&(null!=_0x6b6cx3&&0<_0x6b6cx3[_0xb59f[67]]?_0x6b6cx2[_0x6b6cx3]=_0x6b6cx4:_0x6b6cx2[_0xb59f[207]](_0x6b6cx4))};mxObjectCodec[_0xb59f[202]][_0xb59f[3273]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){if(_0xb59f[3277]==_0x6b6cx3[_0xb59f[301]]){_0x6b6cx3=_0x6b6cx3[_0xb59f[284]](_0xb59f[298]);if(null!=_0x6b6cx3){try{var _0x6b6cx5=mxUtils[_0xb59f[219]](_0x6b6cx3)[_0xb59f[874]]();null!=_0x6b6cx5&&_0x6b6cx2[_0xb59f[1093]](_0x6b6cx5,_0x6b6cx4)}catch(e){}};return !0};return !1};mxObjectCodec[_0xb59f[202]][_0xb59f[3266]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx3};mxObjectCodec[_0xb59f[202]][_0xb59f[3268]]=function(_0x6b6cx2,_0x6b6cx3,_0x6b6cx4){return _0x6b6cx4};mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxCell,[_0xb59f[1954],_0xb59f[1842],_0xb59f[1211],_0xb59f[1991]],[_0xb59f[1101],_0xb59f[1097],_0xb59f[772]]);_0x6b6cx2[_0xb59f[3243]]=function(){return !0};_0x6b6cx2[_0xb59f[3253]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return mxObjectCodec[_0xb59f[202]][_0xb59f[3253]][_0xb59f[183]](this,arguments)||_0x6b6cx9&&_0xb59f[131]==_0x6b6cx4&&_0x6b6cx5[_0xb59f[288]]==mxConstants[_0xb59f[289]]};_0x6b6cx2[_0xb59f[3257]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx4[_0xb59f[131]]&&_0x6b6cx4[_0xb59f[131]][_0xb59f[288]]==mxConstants[_0xb59f[289]]){var _0x6b6cx9=_0x6b6cx5;_0x6b6cx5=mxClient[_0xb59f[80]]?_0x6b6cx4[_0xb59f[131]][_0xb59f[511]](!0):_0x6b6cx2[_0xb59f[395]][_0xb59f[3239]](_0x6b6cx4[_0xb59f[131]],!0);_0x6b6cx5[_0xb59f[62]](_0x6b6cx9);_0x6b6cx2=_0x6b6cx9[_0xb59f[284]](_0xb59f[1363]);_0x6b6cx5[_0xb59f[57]](_0xb59f[1363],_0x6b6cx2);_0x6b6cx9[_0xb59f[1390]](_0xb59f[1363])};return _0x6b6cx5};_0x6b6cx2[_0xb59f[3266]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx4,_0x6b6cxa=this[_0xb59f[718]]();_0x6b6cx4[_0xb59f[301]]!=_0x6b6cxa?(_0x6b6cx9=_0x6b6cx4[_0xb59f[64]](_0x6b6cxa)[0],null!=_0x6b6cx9&&_0x6b6cx9[_0xb59f[265]]==_0x6b6cx4?(mxUtils[_0xb59f[3278]](_0x6b6cx9,!0),mxUtils[_0xb59f[3278]](_0x6b6cx9,!1),_0x6b6cx9[_0xb59f[265]][_0xb59f[266]](_0x6b6cx9)):_0x6b6cx9=null,_0x6b6cx5[_0xb59f[131]]=_0x6b6cx4[_0xb59f[511]](!0),_0x6b6cx4=_0x6b6cx5[_0xb59f[131]][_0xb59f[284]](_0xb59f[1363]),null!=_0x6b6cx4&&(_0x6b6cx5[_0xb59f[1945]](_0x6b6cx4),_0x6b6cx5[_0xb59f[131]][_0xb59f[1390]](_0xb59f[1363]))):_0x6b6cx5[_0xb59f[1945]](_0x6b6cx4[_0xb59f[284]](_0xb59f[1363]));if(null!=_0x6b6cx9){for(_0x6b6cx4=0;_0x6b6cx4<this[_0xb59f[3247]][_0xb59f[67]];_0x6b6cx4++){var _0x6b6cxa=this[_0xb59f[3247]][_0x6b6cx4],_0x6b6cx12=_0x6b6cx9[_0xb59f[284]](_0x6b6cxa);if(null!=_0x6b6cx12){_0x6b6cx9[_0xb59f[1390]](_0x6b6cxa);var _0x6b6cx13=_0x6b6cx2[_0xb59f[68]][_0x6b6cx12]||_0x6b6cx2[_0xb59f[1060]](_0x6b6cx12);null==_0x6b6cx13&&(_0x6b6cx12=_0x6b6cx2[_0xb59f[1362]](_0x6b6cx12),null!=_0x6b6cx12&&(_0x6b6cx13=(mxCodecRegistry[_0xb59f[3230]][_0x6b6cx12[_0xb59f[301]]]||this)[_0xb59f[1093]](_0x6b6cx2,_0x6b6cx12)));_0x6b6cx5[_0x6b6cxa]=_0x6b6cx13}}};return _0x6b6cx9};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxGraphModel);_0x6b6cx2[_0xb59f[3256]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx2[_0xb59f[395]][_0xb59f[55]](_0xb59f[813]);_0x6b6cx2[_0xb59f[3242]](_0x6b6cx4[_0xb59f[501]](),_0x6b6cx9);_0x6b6cx5[_0xb59f[62]](_0x6b6cx9)};_0x6b6cx2[_0xb59f[3274]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){_0xb59f[813]==_0x6b6cx4[_0xb59f[301]]?this[_0xb59f[3279]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5):mxObjectCodec[_0xb59f[202]][_0xb59f[3274]][_0xb59f[183]](this,arguments)};_0x6b6cx2[_0xb59f[3279]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=null;for(_0x6b6cx4=_0x6b6cx4[_0xb59f[285]];null!=_0x6b6cx4;){var _0x6b6cxa=_0x6b6cx2[_0xb59f[3244]](_0x6b6cx4);null!=_0x6b6cxa&&null==_0x6b6cxa[_0xb59f[1197]]()&&(_0x6b6cx9=_0x6b6cxa);_0x6b6cx4=_0x6b6cx4[_0xb59f[287]]};null!=_0x6b6cx9&&_0x6b6cx5[_0xb59f[1927]](_0x6b6cx9)};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxRootChange,[_0xb59f[251],_0xb59f[257],_0xb59f[813]]);_0x6b6cx2[_0xb59f[3257]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){_0x6b6cx2[_0xb59f[3242]](_0x6b6cx4[_0xb59f[813]],_0x6b6cx5);return _0x6b6cx5};_0x6b6cx2[_0xb59f[3266]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx4[_0xb59f[285]]&&_0x6b6cx4[_0xb59f[285]][_0xb59f[288]]==mxConstants[_0xb59f[289]]){_0x6b6cx4=_0x6b6cx4[_0xb59f[511]](!0);var _0x6b6cx9=_0x6b6cx4[_0xb59f[285]];_0x6b6cx5[_0xb59f[813]]=_0x6b6cx2[_0xb59f[3244]](_0x6b6cx9,!1);_0x6b6cx5=_0x6b6cx9[_0xb59f[287]];_0x6b6cx9[_0xb59f[265]][_0xb59f[266]](_0x6b6cx9);for(_0x6b6cx9=_0x6b6cx5;null!=_0x6b6cx9;){_0x6b6cx5=_0x6b6cx9[_0xb59f[287]],_0x6b6cx2[_0xb59f[3244]](_0x6b6cx9),_0x6b6cx9[_0xb59f[265]][_0xb59f[266]](_0x6b6cx9),_0x6b6cx9=_0x6b6cx5}};return _0x6b6cx4};_0x6b6cx2[_0xb59f[3268]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){_0x6b6cx5[_0xb59f[257]]=_0x6b6cx5[_0xb59f[813]];return _0x6b6cx5};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxChildChange,[_0xb59f[251],_0xb59f[247],_0xb59f[1982]],[_0xb59f[1101],_0xb59f[257]]);_0x6b6cx2[_0xb59f[3254]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5,_0x6b6cx9){return _0xb59f[247]==_0x6b6cx4&&(null!=_0x6b6cx2[_0xb59f[257]]|| !_0x6b6cx9)?!0:0<=mxUtils[_0xb59f[2]](this[_0xb59f[3247]],_0x6b6cx4)};_0x6b6cx2[_0xb59f[3257]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){this[_0xb59f[3254]](_0x6b6cx4,_0xb59f[247],_0x6b6cx4[_0xb59f[247]],!0)?_0x6b6cx5[_0xb59f[57]](_0xb59f[247],_0x6b6cx2[_0xb59f[1103]](_0x6b6cx4[_0xb59f[247]])):_0x6b6cx2[_0xb59f[3242]](_0x6b6cx4[_0xb59f[247]],_0x6b6cx5);return _0x6b6cx5};_0x6b6cx2[_0xb59f[3266]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx4[_0xb59f[285]]&&_0x6b6cx4[_0xb59f[285]][_0xb59f[288]]==mxConstants[_0xb59f[289]]){_0x6b6cx4=_0x6b6cx4[_0xb59f[511]](!0);var _0x6b6cx9=_0x6b6cx4[_0xb59f[285]];_0x6b6cx5[_0xb59f[247]]=_0x6b6cx2[_0xb59f[3244]](_0x6b6cx9,!1);_0x6b6cx5=_0x6b6cx9[_0xb59f[287]];_0x6b6cx9[_0xb59f[265]][_0xb59f[266]](_0x6b6cx9);for(_0x6b6cx9=_0x6b6cx5;null!=_0x6b6cx9;){_0x6b6cx5=_0x6b6cx9[_0xb59f[287]];if(_0x6b6cx9[_0xb59f[288]]==mxConstants[_0xb59f[289]]){var _0x6b6cxa=_0x6b6cx9[_0xb59f[284]](_0xb59f[1363]);null==_0x6b6cx2[_0xb59f[1060]](_0x6b6cxa)&&_0x6b6cx2[_0xb59f[3244]](_0x6b6cx9)};_0x6b6cx9[_0xb59f[265]][_0xb59f[266]](_0x6b6cx9);_0x6b6cx9=_0x6b6cx5}}else {_0x6b6cx9=_0x6b6cx4[_0xb59f[284]](_0xb59f[247]),_0x6b6cx5[_0xb59f[247]]=_0x6b6cx2[_0xb59f[3236]](_0x6b6cx9)};return _0x6b6cx4};_0x6b6cx2[_0xb59f[3268]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){_0x6b6cx5[_0xb59f[247]][_0xb59f[1101]]=_0x6b6cx5[_0xb59f[257]];_0x6b6cx5[_0xb59f[257]]=_0x6b6cx5[_0xb59f[1101]];_0x6b6cx5[_0xb59f[1982]]=_0x6b6cx5[_0xb59f[1983]];return _0x6b6cx5};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxTerminalChange,[_0xb59f[251],_0xb59f[257]],[_0xb59f[246],_0xb59f[1984]]);_0x6b6cx2[_0xb59f[3268]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){_0x6b6cx5[_0xb59f[257]]=_0x6b6cx5[_0xb59f[1984]];return _0x6b6cx5};return _0x6b6cx2}());var mxGenericChangeCodec=function(_0x6b6cx2,_0x6b6cx3){var _0x6b6cx4= new mxObjectCodec(_0x6b6cx2,[_0xb59f[251],_0xb59f[257]],[_0xb59f[246]]);_0x6b6cx4[_0xb59f[3268]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cxa){mxUtils[_0xb59f[1331]](_0x6b6cxa[_0xb59f[246]])&&(_0x6b6cxa[_0xb59f[246]]=_0x6b6cx2[_0xb59f[3244]](_0x6b6cxa[_0xb59f[246]],!1));_0x6b6cxa[_0xb59f[257]]=_0x6b6cxa[_0x6b6cx3];return _0x6b6cxa};return _0x6b6cx4};mxCodecRegistry[_0xb59f[3234]](mxGenericChangeCodec( new mxValueChange,_0xb59f[131]));mxCodecRegistry[_0xb59f[3234]](mxGenericChangeCodec( new mxStyleChange,_0xb59f[124]));mxCodecRegistry[_0xb59f[3234]](mxGenericChangeCodec( new mxGeometryChange,_0xb59f[256]));mxCodecRegistry[_0xb59f[3234]](mxGenericChangeCodec( new mxCollapseChange,_0xb59f[1985]));mxCodecRegistry[_0xb59f[3234]](mxGenericChangeCodec( new mxVisibleChange,_0xb59f[189]));mxCodecRegistry[_0xb59f[3234]](mxGenericChangeCodec( new mxCellAttributeChange,_0xb59f[131]));mxCodecRegistry[_0xb59f[3234]](function(){return  new mxObjectCodec( new mxGraph,_0xb59f[3280][_0xb59f[224]](_0xb59f[185]))}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxGraphView);_0x6b6cx2[_0xb59f[514]]=function(_0x6b6cx2,_0x6b6cx4){return this[_0xb59f[3242]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx4[_0xb59f[1179]][_0xb59f[502]]()[_0xb59f[501]]())};_0x6b6cx2[_0xb59f[3242]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx4[_0xb59f[1179]][_0xb59f[502]](),_0x6b6cxa=_0x6b6cx4[_0xb59f[248]](_0x6b6cx5),_0x6b6cx12=_0x6b6cx9[_0xb59f[1197]](_0x6b6cx5);if(null==_0x6b6cx12||null!=_0x6b6cxa){var _0x6b6cx13=_0x6b6cx9[_0xb59f[262]](_0x6b6cx5),_0x6b6cx14=_0x6b6cx4[_0xb59f[1179]][_0xb59f[1198]](_0x6b6cx5),_0x6b6cx15=null;_0x6b6cx12==_0x6b6cx9[_0xb59f[501]]()?_0x6b6cx15=_0xb59f[3281]:null==_0x6b6cx12?_0x6b6cx15=_0xb59f[1179]:_0x6b6cx9[_0xb59f[250]](_0x6b6cx5)?_0x6b6cx15=_0xb59f[1989]:0<_0x6b6cx13&&null!=_0x6b6cx14?_0x6b6cx15=_0xb59f[1504]:_0x6b6cx9[_0xb59f[1193]](_0x6b6cx5)&&(_0x6b6cx15=_0xb59f[1988]);if(null!=_0x6b6cx15){var _0x6b6cx16=_0x6b6cx2[_0xb59f[395]][_0xb59f[55]](_0x6b6cx15);null!=_0x6b6cx4[_0xb59f[1179]][_0xb59f[2183]](_0x6b6cx5)&&(_0x6b6cx16[_0xb59f[57]](_0xb59f[685],_0x6b6cx4[_0xb59f[1179]][_0xb59f[2183]](_0x6b6cx5)),_0x6b6cx4[_0xb59f[1179]][_0xb59f[2186]](_0x6b6cx5)&&_0x6b6cx16[_0xb59f[57]](_0xb59f[1428],!0));if(null==_0x6b6cx12){var _0x6b6cx17=_0x6b6cx4[_0xb59f[517]]();null!=_0x6b6cx17&&(_0x6b6cx16[_0xb59f[57]](_0xb59f[235],Math[_0xb59f[488]](_0x6b6cx17[_0xb59f[235]])),_0x6b6cx16[_0xb59f[57]](_0xb59f[236],Math[_0xb59f[488]](_0x6b6cx17[_0xb59f[236]])),_0x6b6cx16[_0xb59f[57]](_0xb59f[117],Math[_0xb59f[488]](_0x6b6cx17[_0xb59f[117]])),_0x6b6cx16[_0xb59f[57]](_0xb59f[119],Math[_0xb59f[488]](_0x6b6cx17[_0xb59f[119]])));_0x6b6cx16[_0xb59f[57]](_0xb59f[255],_0x6b6cx4[_0xb59f[255]])}else {if(null!=_0x6b6cxa&&null!=_0x6b6cx14){for(_0x6b6cx17 in _0x6b6cxa[_0xb59f[124]]){_0x6b6cx12=_0x6b6cxa[_0xb59f[124]][_0x6b6cx17],_0xb59f[279]== typeof _0x6b6cx12&&_0xb59f[194]== typeof _0x6b6cx12&&(_0x6b6cx12=mxStyleRegistry[_0xb59f[718]](_0x6b6cx12)),null!=_0x6b6cx12&&(_0xb59f[279]!= typeof _0x6b6cx12&&_0xb59f[194]!= typeof _0x6b6cx12)&&_0x6b6cx16[_0xb59f[57]](_0x6b6cx17,_0x6b6cx12)};_0x6b6cx12=_0x6b6cxa[_0xb59f[439]];if(null!=_0x6b6cx12&&0<_0x6b6cx12[_0xb59f[67]]){_0x6b6cx14=Math[_0xb59f[488]](_0x6b6cx12[0][_0xb59f[235]])+_0xb59f[537]+Math[_0xb59f[488]](_0x6b6cx12[0][_0xb59f[236]]);for(_0x6b6cx17=1;_0x6b6cx17<_0x6b6cx12[_0xb59f[67]];_0x6b6cx17++){_0x6b6cx14+=_0xb59f[185]+Math[_0xb59f[488]](_0x6b6cx12[_0x6b6cx17][_0xb59f[235]])+_0xb59f[537]+Math[_0xb59f[488]](_0x6b6cx12[_0x6b6cx17][_0xb59f[236]])};_0x6b6cx16[_0xb59f[57]](_0xb59f[1525],_0x6b6cx14)}else {_0x6b6cx16[_0xb59f[57]](_0xb59f[235],Math[_0xb59f[488]](_0x6b6cxa[_0xb59f[235]])),_0x6b6cx16[_0xb59f[57]](_0xb59f[236],Math[_0xb59f[488]](_0x6b6cxa[_0xb59f[236]])),_0x6b6cx16[_0xb59f[57]](_0xb59f[117],Math[_0xb59f[488]](_0x6b6cxa[_0xb59f[117]])),_0x6b6cx16[_0xb59f[57]](_0xb59f[119],Math[_0xb59f[488]](_0x6b6cxa[_0xb59f[119]]))};_0x6b6cx17=_0x6b6cxa[_0xb59f[2079]];null!=_0x6b6cx17&&(0!=_0x6b6cx17[_0xb59f[235]]&&_0x6b6cx16[_0xb59f[57]](_0xb59f[1126],Math[_0xb59f[488]](_0x6b6cx17[_0xb59f[235]])),0!=_0x6b6cx17[_0xb59f[236]]&&_0x6b6cx16[_0xb59f[57]](_0xb59f[1125],Math[_0xb59f[488]](_0x6b6cx17[_0xb59f[236]])))}};for(_0x6b6cx17=0;_0x6b6cx17<_0x6b6cx13;_0x6b6cx17++){_0x6b6cxa=this[_0xb59f[3242]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx9[_0xb59f[263]](_0x6b6cx5,_0x6b6cx17)),null!=_0x6b6cxa&&_0x6b6cx16[_0xb59f[62]](_0x6b6cxa)}}};return _0x6b6cx16};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxStylesheet);_0x6b6cx2[_0xb59f[514]]=function(_0x6b6cx2,_0x6b6cx4){var _0x6b6cx5=_0x6b6cx2[_0xb59f[395]][_0xb59f[55]](this[_0xb59f[718]]()),_0x6b6cx9;for(_0x6b6cx9 in _0x6b6cx4[_0xb59f[2054]]){var _0x6b6cxa=_0x6b6cx4[_0xb59f[2054]][_0x6b6cx9],_0x6b6cx12=_0x6b6cx2[_0xb59f[395]][_0xb59f[55]](_0xb59f[99]);if(null!=_0x6b6cx9){_0x6b6cx12[_0xb59f[57]](_0xb59f[3069],_0x6b6cx9);for(var _0x6b6cx13 in _0x6b6cxa){var _0x6b6cx14=this[_0xb59f[3282]](_0x6b6cx13,_0x6b6cxa[_0x6b6cx13]);if(null!=_0x6b6cx14){var _0x6b6cx15=_0x6b6cx2[_0xb59f[395]][_0xb59f[55]](_0xb59f[99]);_0x6b6cx15[_0xb59f[57]](_0xb59f[131],_0x6b6cx14);_0x6b6cx15[_0xb59f[57]](_0xb59f[3069],_0x6b6cx13);_0x6b6cx12[_0xb59f[62]](_0x6b6cx15)}};0<_0x6b6cx12[_0xb59f[271]][_0xb59f[67]]&&_0x6b6cx5[_0xb59f[62]](_0x6b6cx12)}};return _0x6b6cx5};_0x6b6cx2[_0xb59f[3282]]=function(_0x6b6cx2,_0x6b6cx4){var _0x6b6cx5= typeof _0x6b6cx4;_0xb59f[279]==_0x6b6cx5?_0x6b6cx4=mxStyleRegistry[_0xb59f[718]](style[j]):_0xb59f[194]==_0x6b6cx5&&(_0x6b6cx4=null);return _0x6b6cx4};_0x6b6cx2[_0xb59f[1093]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){_0x6b6cx5=_0x6b6cx5|| new this[_0xb59f[3231]][_0xb59f[196]];var _0x6b6cx9=_0x6b6cx4[_0xb59f[284]](_0xb59f[1363]);null!=_0x6b6cx9&&(_0x6b6cx2[_0xb59f[68]][_0x6b6cx9]=_0x6b6cx5);for(_0x6b6cx4=_0x6b6cx4[_0xb59f[285]];null!=_0x6b6cx4;){if(!this[_0xb59f[3273]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5)&&_0xb59f[99]==_0x6b6cx4[_0xb59f[301]]&&(_0x6b6cx9=_0x6b6cx4[_0xb59f[284]](_0xb59f[3069]),null!=_0x6b6cx9)){var _0x6b6cxa=_0x6b6cx4[_0xb59f[284]](_0xb59f[1284]),_0x6b6cx12=null!=_0x6b6cxa?mxUtils[_0xb59f[238]](_0x6b6cx5[_0xb59f[2054]][_0x6b6cxa]):null;null==_0x6b6cx12&&(null!=_0x6b6cxa&&mxLog[_0xb59f[283]](_0xb59f[3283]+_0x6b6cxa+_0xb59f[3284]),_0x6b6cx12={});for(_0x6b6cxa=_0x6b6cx4[_0xb59f[285]];null!=_0x6b6cxa;){if(_0x6b6cxa[_0xb59f[288]]==mxConstants[_0xb59f[289]]){var _0x6b6cx13=_0x6b6cxa[_0xb59f[284]](_0xb59f[3069]);if(_0xb59f[99]==_0x6b6cxa[_0xb59f[301]]){var _0x6b6cx14=mxUtils[_0xb59f[329]](_0x6b6cxa),_0x6b6cx15=null;null!=_0x6b6cx14&&0<_0x6b6cx14[_0xb59f[67]]?_0x6b6cx15=mxUtils[_0xb59f[1545]](_0x6b6cx14):(_0x6b6cx15=_0x6b6cxa[_0xb59f[284]](_0xb59f[131]),mxUtils[_0xb59f[1946]](_0x6b6cx15)&&(_0x6b6cx15=parseFloat(_0x6b6cx15)));null!=_0x6b6cx15&&(_0x6b6cx12[_0x6b6cx13]=_0x6b6cx15)}else {_0xb59f[205]==_0x6b6cxa[_0xb59f[301]]&& delete _0x6b6cx12[_0x6b6cx13]}};_0x6b6cxa=_0x6b6cxa[_0xb59f[287]]};_0x6b6cx5[_0xb59f[2074]](_0x6b6cx9,_0x6b6cx12)};_0x6b6cx4=_0x6b6cx4[_0xb59f[287]]};return _0x6b6cx5};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxDefaultKeyHandler);_0x6b6cx2[_0xb59f[514]]=function(_0x6b6cx2,_0x6b6cx4){return null};_0x6b6cx2[_0xb59f[1093]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx5){for(_0x6b6cx4=_0x6b6cx4[_0xb59f[285]];null!=_0x6b6cx4;){if(!this[_0xb59f[3273]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5)&&_0xb59f[99]==_0x6b6cx4[_0xb59f[301]]){var _0x6b6cx9=_0x6b6cx4[_0xb59f[284]](_0xb59f[3069]),_0x6b6cxa=_0x6b6cx4[_0xb59f[284]](_0xb59f[892]),_0x6b6cx12=_0x6b6cx4[_0xb59f[284]](_0xb59f[2207]);_0x6b6cx5[_0xb59f[3063]](_0x6b6cx9,_0x6b6cxa,_0x6b6cx12)};_0x6b6cx4=_0x6b6cx4[_0xb59f[287]]}};return _0x6b6cx5};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxDefaultToolbar);_0x6b6cx2[_0xb59f[514]]=function(_0x6b6cx2,_0x6b6cx4){return null};_0x6b6cx2[_0xb59f[1093]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){if(null!=_0x6b6cx5){var _0x6b6cx9=_0x6b6cx5[_0xb59f[3061]];for(_0x6b6cx4=_0x6b6cx4[_0xb59f[285]];null!=_0x6b6cx4;){if(_0x6b6cx4[_0xb59f[288]]==mxConstants[_0xb59f[289]]&&!this[_0xb59f[3273]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5)){if(_0xb59f[3072]==_0x6b6cx4[_0xb59f[301]]){_0x6b6cx5[_0xb59f[1051]]()}else {if(_0xb59f[345]==_0x6b6cx4[_0xb59f[301]]){_0x6b6cx5[_0xb59f[3082]][_0xb59f[1052]]()}else {if(_0xb59f[1054]==_0x6b6cx4[_0xb59f[301]]){_0x6b6cx5[_0xb59f[3082]][_0xb59f[1053]]()}else {if(_0xb59f[99]==_0x6b6cx4[_0xb59f[301]]){var _0x6b6cxa=_0x6b6cx4[_0xb59f[284]](_0xb59f[3069]),_0x6b6cxa=mxResources[_0xb59f[203]](_0x6b6cxa)||_0x6b6cxa,_0x6b6cx12=_0x6b6cx4[_0xb59f[284]](_0xb59f[2916]),_0x6b6cx13=_0x6b6cx4[_0xb59f[284]](_0xb59f[3285]),_0x6b6cx14=_0x6b6cx4[_0xb59f[284]](_0xb59f[892]),_0x6b6cx15=_0x6b6cx4[_0xb59f[284]](_0xb59f[3286]),_0x6b6cx16=_0x6b6cx4[_0xb59f[284]](_0xb59f[3231]),_0x6b6cx17=_0xb59f[468]!=_0x6b6cx4[_0xb59f[284]](_0xb59f[3287]),_0x6b6cx18=mxUtils[_0xb59f[329]](_0x6b6cx4),_0x6b6cx19=null;if(null!=_0x6b6cx14){_0x6b6cx19=_0x6b6cx5[_0xb59f[1025]](_0x6b6cxa,_0x6b6cx12,_0x6b6cx14,_0x6b6cx13)}else {if(null!=_0x6b6cx15){var _0x6b6cx1a=mxUtils[_0xb59f[1545]](_0x6b6cx18),_0x6b6cx19=_0x6b6cx5[_0xb59f[1048]](_0x6b6cxa,_0x6b6cx12,_0x6b6cx15,_0x6b6cx13,_0x6b6cx1a)}else {if(null!=_0x6b6cx16||null!=_0x6b6cx18&&0<_0x6b6cx18[_0xb59f[67]]){_0x6b6cx19=_0x6b6cx9[_0xb59f[3118]][_0x6b6cx16],_0x6b6cx16=_0x6b6cx4[_0xb59f[284]](_0xb59f[124]),null!=_0x6b6cx19&&null!=_0x6b6cx16&&(_0x6b6cx19=_0x6b6cx19[_0xb59f[238]](),_0x6b6cx19[_0xb59f[475]](_0x6b6cx16)),_0x6b6cx16=null,null!=_0x6b6cx18&&0<_0x6b6cx18[_0xb59f[67]]&&(_0x6b6cx16=mxUtils[_0xb59f[1545]](_0x6b6cx18)),_0x6b6cx19=_0x6b6cx5[_0xb59f[3087]](_0x6b6cxa,_0x6b6cx12,_0x6b6cx19,_0x6b6cx13,_0x6b6cx16,_0x6b6cx17)}else {if(_0x6b6cx13=mxUtils[_0xb59f[1540]](_0x6b6cx4),0<_0x6b6cx13[_0xb59f[67]]){if(null==_0x6b6cx12){_0x6b6cx16=_0x6b6cx5[_0xb59f[1038]](_0x6b6cxa);for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx13[_0xb59f[67]];_0x6b6cxa++){_0x6b6cx17=_0x6b6cx13[_0x6b6cxa],_0xb59f[3072]==_0x6b6cx17[_0xb59f[301]]?_0x6b6cx5[_0xb59f[972]](_0x6b6cx16,_0xb59f[3288]):_0xb59f[99]==_0x6b6cx17[_0xb59f[301]]&&(_0x6b6cx12=_0x6b6cx17[_0xb59f[284]](_0xb59f[3069]),_0x6b6cx17=_0x6b6cx17[_0xb59f[284]](_0xb59f[892]),_0x6b6cx5[_0xb59f[3085]](_0x6b6cx16,_0x6b6cx12,_0x6b6cx17))}}else {var _0x6b6cx1b=null,_0x6b6cx1c=_0x6b6cx5[_0xb59f[3087]](_0x6b6cxa,_0x6b6cx12,function(){var _0x6b6cx2=_0x6b6cx9[_0xb59f[3118]][_0x6b6cx1b[_0xb59f[131]]];if(null!=_0x6b6cx2){var _0x6b6cx2=_0x6b6cx2[_0xb59f[238]](),_0x6b6cx3=_0x6b6cx1b[_0xb59f[1040]][_0x6b6cx1b[_0xb59f[1039]]][_0xb59f[3289]];null!=_0x6b6cx3&&_0x6b6cx2[_0xb59f[475]](_0x6b6cx3);return _0x6b6cx2};mxLog[_0xb59f[283]](_0xb59f[3290]+_0x6b6cx2+_0xb59f[3291]);return null},null,null,_0x6b6cx17),_0x6b6cx1b=_0x6b6cx5[_0xb59f[970]]();mxEvent[_0xb59f[169]](_0x6b6cx1b,_0xb59f[826],function(){_0x6b6cx5[_0xb59f[3082]][_0xb59f[1047]](_0x6b6cx1c,function(_0x6b6cx2){_0x6b6cx2=mxUtils[_0xb59f[2196]](_0x6b6cx9[_0xb59f[1179]][_0xb59f[526]],mxEvent[_0xb59f[731]](_0x6b6cx2),mxEvent[_0xb59f[733]](_0x6b6cx2));return _0x6b6cx9[_0xb59f[817]](null,_0x6b6cx1a(),_0x6b6cx2[_0xb59f[235]],_0x6b6cx2[_0xb59f[236]])});_0x6b6cx5[_0xb59f[3082]][_0xb59f[1023]]= !1});for(_0x6b6cxa=0;_0x6b6cxa<_0x6b6cx13[_0xb59f[67]];_0x6b6cxa++){_0x6b6cx17=_0x6b6cx13[_0x6b6cxa],_0xb59f[3072]==_0x6b6cx17[_0xb59f[301]]?_0x6b6cx5[_0xb59f[972]](_0x6b6cx1b,_0xb59f[3288]):_0xb59f[99]==_0x6b6cx17[_0xb59f[301]]&&(_0x6b6cx12=_0x6b6cx17[_0xb59f[284]](_0xb59f[3069]),_0x6b6cx18=_0x6b6cx17[_0xb59f[284]](_0xb59f[3231]),_0x6b6cx5[_0xb59f[972]](_0x6b6cx1b,_0x6b6cx12,_0x6b6cx18||_0x6b6cx16)[_0xb59f[3289]]=_0x6b6cx17[_0xb59f[284]](_0xb59f[124]))}}}}}};null!=_0x6b6cx19&&(_0x6b6cx16=_0x6b6cx4[_0xb59f[284]](_0xb59f[1363]),null!=_0x6b6cx16&&0<_0x6b6cx16[_0xb59f[67]]&&_0x6b6cx19[_0xb59f[57]](_0xb59f[1363],_0x6b6cx16))}}}}};_0x6b6cx4=_0x6b6cx4[_0xb59f[287]]}};return _0x6b6cx5};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxDefaultPopupMenu);_0x6b6cx2[_0xb59f[514]]=function(_0x6b6cx2,_0x6b6cx4){return null};_0x6b6cx2[_0xb59f[1093]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){var _0x6b6cx9=_0x6b6cx4[_0xb59f[64]](_0xb59f[3277])[0];null!=_0x6b6cx9?this[_0xb59f[3273]](_0x6b6cx2,_0x6b6cx9,_0x6b6cx5):null!=_0x6b6cx5&&(_0x6b6cx5[_0xb59f[3064]]=_0x6b6cx4);return _0x6b6cx5};return _0x6b6cx2}());mxCodecRegistry[_0xb59f[3234]](function(){var _0x6b6cx2= new mxObjectCodec( new mxEditor,_0xb59f[3292][_0xb59f[224]](_0xb59f[185]));_0x6b6cx2[_0xb59f[3268]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){_0x6b6cx2=_0x6b6cx4[_0xb59f[284]](_0xb59f[2075]);null!=_0x6b6cx2&&(_0x6b6cx4[_0xb59f[1390]](_0xb59f[2075]),_0x6b6cx5[_0xb59f[2075]]=_0x6b6cx5[_0xb59f[3118]][_0x6b6cx2]);_0x6b6cx2=_0x6b6cx4[_0xb59f[284]](_0xb59f[3120]);null!=_0x6b6cx2&&(_0x6b6cx4[_0xb59f[1390]](_0xb59f[3120]),_0x6b6cx5[_0xb59f[3120]]=_0x6b6cx5[_0xb59f[3118]][_0x6b6cx2]);return _0x6b6cx5};_0x6b6cx2[_0xb59f[3274]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){if(_0xb59f[3293]==_0x6b6cx4[_0xb59f[301]]){if(_0xb59f[3118]==_0x6b6cx4[_0xb59f[284]](_0xb59f[3069])){this[_0xb59f[3294]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5);return}}else {if(_0xb59f[3295]==_0x6b6cx4[_0xb59f[301]]){this[_0xb59f[3296]](_0x6b6cx2,_0x6b6cx4,_0x6b6cx5);return}};mxObjectCodec[_0xb59f[202]][_0xb59f[3274]][_0xb59f[183]](this,arguments)};_0x6b6cx2[_0xb59f[3296]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){for(_0x6b6cx2=_0x6b6cx4[_0xb59f[285]];null!=_0x6b6cx2;){if(_0xb59f[99]==_0x6b6cx2[_0xb59f[301]]){_0x6b6cx4=_0x6b6cx2[_0xb59f[284]](_0xb59f[3069]);var _0x6b6cx9=_0x6b6cx2[_0xb59f[284]](_0xb59f[980]),_0x6b6cxa=_0x6b6cx2[_0xb59f[284]](_0xb59f[124]),_0x6b6cx12=null;if(null!=_0x6b6cx9){_0x6b6cx12=document[_0xb59f[1362]](_0x6b6cx9),null!=_0x6b6cx12&&null!=_0x6b6cxa&&(_0x6b6cx12[_0xb59f[124]][_0xb59f[103]]+=_0xb59f[471]+_0x6b6cxa)}else {var _0x6b6cx9=parseInt(_0x6b6cx2[_0xb59f[284]](_0xb59f[235])),_0x6b6cx13=parseInt(_0x6b6cx2[_0xb59f[284]](_0xb59f[236])),_0x6b6cx14=_0x6b6cx2[_0xb59f[284]](_0xb59f[117]),_0x6b6cx15=_0x6b6cx2[_0xb59f[284]](_0xb59f[119]),_0x6b6cx12=document[_0xb59f[55]](_0xb59f[485]);_0x6b6cx12[_0xb59f[124]][_0xb59f[103]]=_0x6b6cxa;( new mxWindow(mxResources[_0xb59f[203]](_0x6b6cx4)||_0x6b6cx4,_0x6b6cx12,_0x6b6cx9,_0x6b6cx13,_0x6b6cx14,_0x6b6cx15,!1,!0))[_0xb59f[175]](!0)};_0xb59f[1179]==_0x6b6cx4?_0x6b6cx5[_0xb59f[3202]](_0x6b6cx12):_0xb59f[3082]==_0x6b6cx4?_0x6b6cx5[_0xb59f[3204]](_0x6b6cx12):_0xb59f[924]==_0x6b6cx4?_0x6b6cx5[_0xb59f[3208]](_0x6b6cx12):_0xb59f[879]==_0x6b6cx4?_0x6b6cx5[_0xb59f[3205]](_0x6b6cx12):_0xb59f[201]==_0x6b6cx4&&_0x6b6cx5[_0xb59f[3297]](_0x6b6cx12)}else {_0xb59f[3298]==_0x6b6cx2[_0xb59f[301]]?mxResources[_0xb59f[99]](_0x6b6cx2[_0xb59f[284]](_0xb59f[3299])):_0xb59f[94]==_0x6b6cx2[_0xb59f[301]]&&mxClient[_0xb59f[54]](_0xb59f[94],_0x6b6cx2[_0xb59f[284]](_0xb59f[298]))};_0x6b6cx2=_0x6b6cx2[_0xb59f[287]]}};_0x6b6cx2[_0xb59f[3294]]=function(_0x6b6cx2,_0x6b6cx4,_0x6b6cx5){null==_0x6b6cx5[_0xb59f[3118]]&&(_0x6b6cx5[_0xb59f[3118]]=[]);_0x6b6cx4=mxUtils[_0xb59f[1540]](_0x6b6cx4);for(var _0x6b6cx9=0;_0x6b6cx9<_0x6b6cx4[_0xb59f[67]];_0x6b6cx9++){for(var _0x6b6cxa=_0x6b6cx4[_0x6b6cx9][_0xb59f[284]](_0xb59f[3069]),_0x6b6cx12=_0x6b6cx4[_0x6b6cx9][_0xb59f[285]];null!=_0x6b6cx12&&1!=_0x6b6cx12[_0xb59f[288]];){_0x6b6cx12=_0x6b6cx12[_0xb59f[287]]};null!=_0x6b6cx12&&(_0x6b6cx5[_0xb59f[3118]][_0x6b6cxa]=_0x6b6cx2[_0xb59f[3244]](_0x6b6cx12))}};return _0x6b6cx2}())
\ No newline at end of file
+var mxClient = {
+  VERSION: "2.0.0.0",
+  IS_IE: 0 <= navigator.userAgent.indexOf("MSIE"),
+  IS_IE6: 0 <= navigator.userAgent.indexOf("MSIE 6"),
+  IS_QUIRKS: 0 <= navigator.userAgent.indexOf("MSIE") && (null == document.documentMode || 5 == document.documentMode),
+  VML_PREFIX: "v",
+  OFFICE_PREFIX: "o",
+  IS_NS: 0 <= navigator.userAgent.indexOf("Mozilla/") && 0 > navigator.userAgent.indexOf("MSIE"),
+  IS_OP: 0 <= navigator.userAgent.indexOf("Opera/"),
+  IS_OT: 0 > navigator.userAgent.indexOf("Presto/2.4.") && 0 > navigator.userAgent.indexOf("Presto/2.3.") && 0 > navigator.userAgent.indexOf("Presto/2.2.") &&
+    0 > navigator.userAgent.indexOf("Presto/2.1.") && 0 > navigator.userAgent.indexOf("Presto/2.0.") && 0 > navigator.userAgent.indexOf("Presto/1."),
+  IS_SF: 0 <= navigator.userAgent.indexOf("AppleWebKit/") && 0 > navigator.userAgent.indexOf("Chrome/"),
+  IS_GC: 0 <= navigator.userAgent.indexOf("Chrome/"),
+  IS_MT: 0 <= navigator.userAgent.indexOf("Firefox/") && 0 > navigator.userAgent.indexOf("Firefox/1.") && 0 > navigator.userAgent.indexOf("Firefox/2.") || 0 <= navigator.userAgent.indexOf(
+      "Iceweasel/") && 0 > navigator.userAgent.indexOf("Iceweasel/1.") &&
+    0 > navigator.userAgent.indexOf("Iceweasel/2.") || 0 <= navigator.userAgent.indexOf("SeaMonkey/") && 0 > navigator.userAgent.indexOf("SeaMonkey/1.") || 0 <= navigator.userAgent.indexOf(
+      "Iceape/") && 0 > navigator.userAgent.indexOf("Iceape/1."),
+  IS_SVG: 0 <= navigator.userAgent.indexOf("Firefox/") || 0 <= navigator.userAgent.indexOf("Iceweasel/") || 0 <= navigator.userAgent.indexOf("Seamonkey/") || 0 <= navigator.userAgent.indexOf(
+      "Iceape/") || 0 <= navigator.userAgent.indexOf("Galeon/") || 0 <= navigator.userAgent.indexOf("Epiphany/") || 0 <=
+    navigator.userAgent.indexOf("AppleWebKit/") || 0 <= navigator.userAgent.indexOf("Gecko/") || 0 <= navigator.userAgent.indexOf("Opera/"),
+  NO_FO: 0 <= navigator.userAgent.indexOf("Firefox/1.") || 0 <= navigator.userAgent.indexOf("Iceweasel/1.") || 0 <= navigator.userAgent.indexOf("Firefox/2.") || 0 <= navigator.userAgent.indexOf(
+      "Iceweasel/2.") || 0 <= navigator.userAgent.indexOf("SeaMonkey/1.") || 0 <= navigator.userAgent.indexOf("Iceape/1.") || 0 <= navigator.userAgent.indexOf("Camino/1.") || 0 <= navigator.userAgent
+    .indexOf("Epiphany/2.") ||
+    0 <= navigator.userAgent.indexOf("Opera/") || 0 <= navigator.userAgent.indexOf("MSIE") || 0 <= navigator.userAgent.indexOf("Mozilla/2."),
+  IS_VML: "MICROSOFT INTERNET EXPLORER" == navigator.appName.toUpperCase(),
+  IS_MAC: 0 < navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),
+  IS_TOUCH: 0 < navigator.userAgent.toUpperCase().indexOf("IPAD") || 0 < navigator.userAgent.toUpperCase().indexOf("IPOD") || 0 < navigator.userAgent.toUpperCase().indexOf("IPHONE") || 0 <
+    navigator.userAgent.toUpperCase().indexOf("ANDROID"),
+  IS_LOCAL: 0 > document.location.href.indexOf("http://") &&
+    0 > document.location.href.indexOf("https://"),
+  isBrowserSupported: function() {
+    return mxClient.IS_VML || mxClient.IS_SVG
+  },
+  link: function(a, b, c) {
+    c = c || document;
+    if (mxClient.IS_IE6) c.write('\x3clink rel\x3d"' + a + '" href\x3d"' + b + '" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');
+    else {
+      var d = c.createElement("link");
+      d.setAttribute("rel", a);
+      d.setAttribute("href", b);
+      d.setAttribute("charset", "ISO-8859-1");
+      d.setAttribute("type", "text/css");
+      c.getElementsByTagName("head")[0].appendChild(d)
+    }
+  },
+  include: function(a) {
+    document.write('\x3cscript src\x3d"' +
+      a + '"\x3e\x3c/script\x3e')
+  },
+  dispose: function() {
+    for (var a = 0; a < mxEvent.objects.length; a++) null != mxEvent.objects[a].mxListenerList && mxEvent.removeAllListeners(mxEvent.objects[a])
+  }
+};
+mxClient.IS_OP && mxClient.IS_OT ? mxClient.CSS_PREFIX = "O" : mxClient.IS_SF || mxClient.IS_GC ? mxClient.CSS_PREFIX = "Webkit" : mxClient.IS_MT ? mxClient.CSS_PREFIX = "Moz" : mxClient.IS_IE && 9 <=
+  document.documentMode && (mxClient.CSS_PREFIX = "ms");
+"undefined" == typeof mxLoadResources && (mxLoadResources = !0);
+"undefined" == typeof mxResourceExtension && (mxResourceExtension = ".txt");
+"undefined" == typeof mxLoadStylesheets && (mxLoadStylesheets = !0);
+"undefined" != typeof mxBasePath && 0 < mxBasePath.length ? ("/" == mxBasePath.substring(mxBasePath.length - 1) && (mxBasePath = mxBasePath.substring(0, mxBasePath.length - 1)), mxClient.basePath =
+  mxBasePath) : mxClient.basePath = ".";
+"undefined" != typeof mxImageBasePath && 0 < mxImageBasePath.length ? ("/" == mxImageBasePath.substring(mxImageBasePath.length - 1) && (mxImageBasePath = mxImageBasePath.substring(0, mxImageBasePath.length -
+  1)), mxClient.imageBasePath = mxImageBasePath) : mxClient.imageBasePath = mxClient.basePath + "/images";
+mxClient.language = "undefined" != typeof mxLanguage ? mxLanguage : mxClient.IS_IE ? navigator.userLanguage : navigator.language;
+mxClient.defaultLanguage = "undefined" != typeof mxDefaultLanguage ? mxDefaultLanguage : "en";
+mxLoadStylesheets && mxClient.link("stylesheet", mxClient.basePath + "/css/common.css");
+"undefined" != typeof mxLanguages && (mxClient.languages = mxLanguages);
+if (mxClient.IS_IE) {
+  if (9 <= document.documentMode) mxClient.IS_VML = !1, mxClient.IS_SVG = !0;
+  else {
+    8 == document.documentMode ? (document.namespaces.add(mxClient.VML_PREFIX, "urn:schemas-microsoft-com:vml", "#default#VML"), document.namespaces.add(mxClient.OFFICE_PREFIX,
+      "urn:schemas-microsoft-com:office:office", "#default#VML")) : (document.namespaces.add(mxClient.VML_PREFIX, "urn:schemas-microsoft-com:vml"), document.namespaces.add(mxClient.OFFICE_PREFIX,
+      "urn:schemas-microsoft-com:office:office"));
+    var ss = document.createStyleSheet();
+    ss.cssText = "v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}";
+    mxLoadStylesheets && mxClient.link("stylesheet", mxClient.basePath + "/css/explorer.css")
+  }
+  window.attachEvent("onunload", mxClient.dispose)
+}
+var mxLog = {
+    consoleName: "Console",
+    TRACE: !1,
+    DEBUG: !0,
+    WARN: !0,
+    buffer: "",
+    init: function() {
+      if (null == mxLog.window && null != document.body) {
+        var a = mxLog.consoleName + " - mxGraph " + mxClient.VERSION,
+          b = document.createElement("table");
+        b.setAttribute("width", "100%");
+        b.setAttribute("height", "100%");
+        var c = document.createElement("tbody"),
+          d = document.createElement("tr"),
+          e = document.createElement("td");
+        e.style.verticalAlign = "top";
+        mxLog.textarea = document.createElement("textarea");
+        mxLog.textarea.setAttribute("readOnly", "true");
+        mxLog.textarea.style.height = "100%";
+        mxLog.textarea.style.resize = "none";
+        mxLog.textarea.value = mxLog.buffer;
+        mxLog.textarea.style.width = mxClient.IS_NS && "BackCompat" != document.compatMode ? "99%" : "100%";
+        e.appendChild(mxLog.textarea);
+        d.appendChild(e);
+        c.appendChild(d);
+        d = document.createElement("tr");
+        mxLog.td = document.createElement("td");
+        mxLog.td.style.verticalAlign = "top";
+        mxLog.td.setAttribute("height", "30px");
+        d.appendChild(mxLog.td);
+        c.appendChild(d);
+        b.appendChild(c);
+        mxLog.addButton("Info", function(a) {
+          mxLog.info()
+        });
+        mxLog.addButton("DOM", function(a) {
+          a = mxUtils.getInnerHtml(document.body);
+          mxLog.debug(a)
+        });
+        mxLog.addButton("Trace", function(a) {
+          mxLog.TRACE = !mxLog.TRACE;
+          mxLog.TRACE ? mxLog.debug("Tracing enabled") : mxLog.debug("Tracing disabled")
+        });
+        mxLog.addButton("Copy", function(a) {
+          try {
+            mxUtils.copy(mxLog.textarea.value)
+          } catch (b) {
+            mxUtils.alert(b)
+          }
+        });
+        mxLog.addButton("Show", function(a) {
+          try {
+            mxUtils.popup(mxLog.textarea.value)
+          } catch (b) {
+            mxUtils.alert(b)
+          }
+        });
+        mxLog.addButton("Clear", function(a) {
+          mxLog.textarea.value = ""
+        });
+        d = c = 0;
+        "number" === typeof window.innerWidth ? (c = window.innerHeight, d = window.innerWidth) : (c = document.documentElement.clientHeight || document.body.clientHeight, d = document.body.clientWidth);
+        mxLog.window = new mxWindow(a, b, Math.max(0, d - 320), Math.max(0, c - 210), 300, 160);
+        mxLog.window.setMaximizable(!0);
+        mxLog.window.setScrollable(!1);
+        mxLog.window.setResizable(!0);
+        mxLog.window.setClosable(!0);
+        mxLog.window.destroyOnClose = !1;
+        if ((mxClient.IS_NS || mxClient.IS_IE) && !mxClient.IS_GC && !mxClient.IS_SF && "BackCompat" != document.compatMode) {
+          var f =
+            mxLog.window.getElement(),
+            a = function(a, b) {
+              mxLog.textarea.style.height = Math.max(0, f.offsetHeight - 70) + "px"
+            };
+          mxLog.window.addListener(mxEvent.RESIZE_END, a);
+          mxLog.window.addListener(mxEvent.MAXIMIZE, a);
+          mxLog.window.addListener(mxEvent.NORMALIZE, a);
+          mxLog.textarea.style.height = "92px"
+        }
+      }
+    },
+    info: function() {
+      mxLog.writeln(mxUtils.toString(navigator))
+    },
+    addButton: function(a, b) {
+      var c = document.createElement("button");
+      mxUtils.write(c, a);
+      mxEvent.addListener(c, "click", b);
+      mxLog.td.appendChild(c)
+    },
+    isVisible: function() {
+      return null !=
+        mxLog.window ? mxLog.window.isVisible() : !1
+    },
+    show: function() {
+      mxLog.setVisible(!0)
+    },
+    setVisible: function(a) {
+      null == mxLog.window && mxLog.init();
+      null != mxLog.window && mxLog.window.setVisible(a)
+    },
+    enter: function(a) {
+      if (mxLog.TRACE) return mxLog.writeln("Entering " + a), (new Date).getTime()
+    },
+    leave: function(a, b) {
+      if (mxLog.TRACE) {
+        var c = 0 != b ? " (" + ((new Date).getTime() - b) + " ms)" : "";
+        mxLog.writeln("Leaving " + a + c)
+      }
+    },
+    debug: function() {
+      mxLog.DEBUG && mxLog.writeln.apply(this, arguments)
+    },
+    warn: function() {
+      mxLog.WARN && mxLog.writeln.apply(this,
+        arguments)
+    },
+    write: function() {
+      for (var a = "", b = 0; b < arguments.length; b++) a += arguments[b], b < arguments.length - 1 && (a += " ");
+      null != mxLog.textarea ? (mxLog.textarea.value += a, 0 <= navigator.userAgent.indexOf("Presto/2.5") && (mxLog.textarea.style.visibility = "hidden", mxLog.textarea.style.visibility = "visible"),
+        mxLog.textarea.scrollTop = mxLog.textarea.scrollHeight) : mxLog.buffer += a
+    },
+    writeln: function() {
+      for (var a = "", b = 0; b < arguments.length; b++) a += arguments[b], b < arguments.length - 1 && (a += " ");
+      mxLog.write(a + "\n")
+    }
+  },
+  mxObjectIdentity = {
+    FIELD_NAME: "mxObjectId",
+    counter: 0,
+    get: function(a) {
+      if ("object" == typeof a && null == a[mxObjectIdentity.FIELD_NAME]) {
+        var b = mxUtils.getFunctionName(a.constructor);
+        a[mxObjectIdentity.FIELD_NAME] = b + "#" + mxObjectIdentity.counter++
+      }
+      return a[mxObjectIdentity.FIELD_NAME]
+    },
+    clear: function(a) {
+      "object" == typeof a && delete a[mxObjectIdentity.FIELD_NAME]
+    }
+  };
+
+function mxDictionary() {
+  this.clear()
+}
+mxDictionary.prototype.map = null;
+mxDictionary.prototype.clear = function() {
+  this.map = {}
+};
+mxDictionary.prototype.get = function(a) {
+  a = mxObjectIdentity.get(a);
+  return this.map[a]
+};
+mxDictionary.prototype.put = function(a, b) {
+  var c = mxObjectIdentity.get(a),
+    d = this.map[c];
+  this.map[c] = b;
+  return d
+};
+mxDictionary.prototype.remove = function(a) {
+  a = mxObjectIdentity.get(a);
+  var b = this.map[a];
+  delete this.map[a];
+  return b
+};
+mxDictionary.prototype.getKeys = function() {
+  var a = [],
+    b;
+  for (b in this.map) a.push(b);
+  return a
+};
+mxDictionary.prototype.getValues = function() {
+  var a = [],
+    b;
+  for (b in this.map) a.push(this.map[b]);
+  return a
+};
+mxDictionary.prototype.visit = function(a) {
+  for (var b in this.map) a(b, this.map[b])
+};
+var mxResources = {
+  resources: [],
+  extension: mxResourceExtension,
+  resourcesEncoded: !1,
+  loadDefaultBundle: !0,
+  loadSpecialBundle: !0,
+  isLanguageSupported: function(a) {
+    return null != mxClient.languages ? 0 <= mxUtils.indexOf(mxClient.languages, a) : !0
+  },
+  getDefaultBundle: function(a, b) {
+    return mxResources.loadDefaultBundle || !mxResources.isLanguageSupported(b) ? a + mxResources.extension : null
+  },
+  getSpecialBundle: function(a, b) {
+    if (null == mxClient.languages || !this.isLanguageSupported(b)) {
+      var c = b.indexOf("-");
+      0 < c && (b = b.substring(0, c))
+    }
+    return mxResources.loadSpecialBundle &&
+      mxResources.isLanguageSupported(b) && b != mxClient.defaultLanguage ? a + "_" + b + mxResources.extension : null
+  },
+  add: function(a, b) {
+    b = null != b ? b : mxClient.language.toLowerCase();
+    if (b != mxConstants.NONE) {
+      var c = mxResources.getDefaultBundle(a, b);
+      if (null != c) try {
+        var d = mxUtils.load(c);
+        d.isReady() && mxResources.parse(d.getText())
+      } catch (e) {}
+      c = mxResources.getSpecialBundle(a, b);
+      if (null != c) try {
+        d = mxUtils.load(c), d.isReady() && mxResources.parse(d.getText())
+      } catch (f) {}
+    }
+  },
+  parse: function(a) {
+    if (null != a) {
+      a = a.split("\n");
+      for (var b = 0; b <
+        a.length; b++)
+        if ("#" != a[b].charAt(0)) {
+          var c = a[b].indexOf("\x3d");
+          if (0 < c) {
+            var d = a[b].substring(0, c),
+              e = a[b].length;
+            13 == a[b].charCodeAt(e - 1) && e--;
+            c = a[b].substring(c + 1, e);
+            this.resourcesEncoded ? (c = c.replace(/\\(?=u[a-fA-F\d]{4})/g, "%"), mxResources.resources[d] = unescape(c)) : mxResources.resources[d] = c
+          }
+        }
+    }
+  },
+  get: function(a, b, c) {
+    a = mxResources.resources[a];
+    null == a && (a = c);
+    if (null != a && null != b) {
+      c = [];
+      for (var d = null, e = 0; e < a.length; e++) {
+        var f = a.charAt(e);
+        "{" == f ? d = "" : null != d && "}" == f ? (d = parseInt(d) - 1, 0 <= d && d < b.length &&
+          c.push(b[d]), d = null) : null != d ? d += f : c.push(f)
+      }
+      a = c.join("")
+    }
+    return a
+  }
+};
+
+function mxPoint(a, b) {
+  this.x = null != a ? a : 0;
+  this.y = null != b ? b : 0
+}
+mxPoint.prototype.x = null;
+mxPoint.prototype.y = null;
+mxPoint.prototype.equals = function(a) {
+  return a.x == this.x && a.y == this.y
+};
+mxPoint.prototype.clone = function() {
+  return mxUtils.clone(this)
+};
+
+function mxRectangle(a, b, c, d) {
+  mxPoint.call(this, a, b);
+  this.width = null != c ? c : 0;
+  this.height = null != d ? d : 0
+}
+mxRectangle.prototype = new mxPoint;
+mxRectangle.prototype.constructor = mxRectangle;
+mxRectangle.prototype.width = null;
+mxRectangle.prototype.height = null;
+mxRectangle.prototype.setRect = function(a, b, c, d) {
+  this.x = a;
+  this.y = b;
+  this.width = c;
+  this.height = d
+};
+mxRectangle.prototype.getCenterX = function() {
+  return this.x + this.width / 2
+};
+mxRectangle.prototype.getCenterY = function() {
+  return this.y + this.height / 2
+};
+mxRectangle.prototype.add = function(a) {
+  if (null != a) {
+    var b = Math.min(this.x, a.x),
+      c = Math.min(this.y, a.y),
+      d = Math.max(this.x + this.width, a.x + a.width);
+    a = Math.max(this.y + this.height, a.y + a.height);
+    this.x = b;
+    this.y = c;
+    this.width = d - b;
+    this.height = a - c
+  }
+};
+mxRectangle.prototype.grow = function(a) {
+  this.x -= a;
+  this.y -= a;
+  this.width += 2 * a;
+  this.height += 2 * a
+};
+mxRectangle.prototype.getPoint = function() {
+  return new mxPoint(this.x, this.y)
+};
+mxRectangle.prototype.equals = function(a) {
+  return a.x == this.x && a.y == this.y && a.width == this.width && a.height == this.height
+};
+var mxEffects = {
+    animateChanges: function(a, b, c) {
+      var d = 0,
+        e = function() {
+          for (var g = !1, h = 0; h < b.length; h++) {
+            var k = b[h];
+            if (k instanceof mxGeometryChange || k instanceof mxTerminalChange || k instanceof mxValueChange || k instanceof mxChildChange || k instanceof mxStyleChange) {
+              var l = a.getView().getState(k.cell || k.child, !1);
+              if (null != l)
+                if (g = !0, k.constructor != mxGeometryChange || a.model.isEdge(k.cell)) mxUtils.setOpacity(l.shape.node, 100 * d / 10);
+                else {
+                  var m = a.getView().scale,
+                    n = (k.geometry.x - k.previous.x) * m,
+                    p = (k.geometry.y -
+                      k.previous.y) * m,
+                    q = (k.geometry.width - k.previous.width) * m,
+                    m = (k.geometry.height - k.previous.height) * m;
+                  0 == d ? (l.x -= n, l.y -= p, l.width -= q, l.height -= m) : (l.x += n / 10, l.y += p / 10, l.width += q / 10, l.height += m / 10);
+                  a.cellRenderer.redraw(l);
+                  mxEffects.cascadeOpacity(a, k.cell, 100 * d / 10)
+                }
+            }
+          }
+          10 > d && g ? (d++, window.setTimeout(e, f)) : null != c && c()
+        },
+        f = 30;
+      e()
+    },
+    cascadeOpacity: function(a, b, c) {
+      for (var d = a.model.getChildCount(b), e = 0; e < d; e++) {
+        var f = a.model.getChildAt(b, e),
+          g = a.getView().getState(f);
+        null != g && (mxUtils.setOpacity(g.shape.node,
+          c), mxEffects.cascadeOpacity(a, f, c))
+      }
+      b = a.model.getEdges(b);
+      if (null != b)
+        for (e = 0; e < b.length; e++) d = a.getView().getState(b[e]), null != d && mxUtils.setOpacity(d.shape.node, c)
+    },
+    fadeOut: function(a, b, c, d, e, f) {
+      d = d || 40;
+      e = e || 30;
+      var g = b || 100;
+      mxUtils.setOpacity(a, g);
+      if (f || null == f) {
+        var h = function() {
+          g = Math.max(g - d, 0);
+          mxUtils.setOpacity(a, g);
+          0 < g ? window.setTimeout(h, e) : (a.style.visibility = "hidden", c && a.parentNode && a.parentNode.removeChild(a))
+        };
+        window.setTimeout(h, e)
+      } else a.style.visibility = "hidden", c && a.parentNode && a.parentNode.removeChild(a)
+    }
+  },
+  mxUtils = {
+    errorResource: "none" != mxClient.language ? "error" : "",
+    closeResource: "none" != mxClient.language ? "close" : "",
+    errorImage: mxClient.imageBasePath + "/error.gif",
+    removeCursors: function(a) {
+      null != a.style && (a.style.cursor = "");
+      a = a.childNodes;
+      if (null != a)
+        for (var b = a.length, c = 0; c < b; c += 1) mxUtils.removeCursors(a[c])
+    },
+    getCurrentStyle: function() {
+      return mxClient.IS_IE ? function(a) {
+        return null != a ? a.currentStyle : null
+      } : function(a) {
+        return null != a ? window.getComputedStyle(a, "") : null
+      }
+    }(),
+    hasScrollbars: function(a) {
+      a = mxUtils.getCurrentStyle(a);
+      return null != a && ("scroll" == a.overflow || "auto" == a.overflow)
+    },
+    bind: function(a, b) {
+      return function() {
+        return b.apply(a, arguments)
+      }
+    },
+    eval: function(a) {
+      var b = null;
+      if (0 <= a.indexOf("function")) try {
+        eval("var _mxJavaScriptExpression\x3d" + a), b = _mxJavaScriptExpression, _mxJavaScriptExpression = null
+      } catch (c) {
+        mxLog.warn(c.message + " while evaluating " + a)
+      } else try {
+        b = eval(a)
+      } catch (d) {
+        mxLog.warn(d.message + " while evaluating " + a)
+      }
+      return b
+    },
+    findNode: function(a, b, c) {
+      var d = a.getAttribute(b);
+      if (null != d && d == c) return a;
+      for (a =
+        a.firstChild; null != a;) {
+        d = mxUtils.findNode(a, b, c);
+        if (null != d) return d;
+        a = a.nextSibling
+      }
+      return null
+    },
+    findNodeByAttribute: function() {
+      return 9 <= document.documentMode ? function(a, b, c) {
+        var d = null;
+        if (null != a)
+          if (a.nodeType == mxConstants.NODETYPE_ELEMENT && a.getAttribute(b) == c) d = a;
+          else
+            for (a = a.firstChild; null != a && null == d;) d = mxUtils.findNodeByAttribute(a, b, c), a = a.nextSibling;
+        return d
+      } : mxClient.IS_IE ? function(a, b, c) {
+        return null == a ? null : a.ownerDocument.selectSingleNode("//*[@" + b + "\x3d'" + c + "']")
+      } : function(a, b, c) {
+        return null ==
+          a ? null : a.ownerDocument.evaluate("//*[@" + b + "\x3d'" + c + "']", a.ownerDocument, null, XPathResult.ANY_TYPE, null).iterateNext()
+      }
+    }(),
+    getFunctionName: function(a) {
+      var b = null;
+      if (null != a)
+        if (null != a.name) b = a.name;
+        else {
+          a = a.toString();
+          for (b = 9;
+            " " == a.charAt(b);) b++;
+          var c = a.indexOf("(", b),
+            b = a.substring(b, c)
+        }
+      return b
+    },
+    indexOf: function(a, b) {
+      if (null != a && null != b)
+        for (var c = 0; c < a.length; c++)
+          if (a[c] == b) return c;
+      return -1
+    },
+    remove: function(a, b) {
+      var c = null;
+      if ("object" == typeof b)
+        for (var d = mxUtils.indexOf(b, a); 0 <= d;) b.splice(d,
+          1), c = a, d = mxUtils.indexOf(b, a);
+      for (var e in b) b[e] == a && (delete b[e], c = a);
+      return c
+    },
+    isNode: function(a, b, c, d) {
+      return null != a && !isNaN(a.nodeType) && (null == b || a.nodeName.toLowerCase() == b.toLowerCase()) ? null == c || a.getAttribute(c) == d : !1
+    },
+    getChildNodes: function(a, b) {
+      b = b || mxConstants.NODETYPE_ELEMENT;
+      for (var c = [], d = a.firstChild; null != d;) d.nodeType == b && c.push(d), d = d.nextSibling;
+      return c
+    },
+    createXmlDocument: function() {
+      var a = null;
+      document.implementation && document.implementation.createDocument ? a = document.implementation.createDocument("",
+        "", null) : window.ActiveXObject && (a = new ActiveXObject("Microsoft.XMLDOM"));
+      return a
+    },
+    parseXml: function() {
+      return mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? function(a) {
+        var b = mxUtils.createXmlDocument();
+        b.async = "false";
+        b.loadXML(a);
+        return b
+      } : function(a) {
+        return (new DOMParser).parseFromString(a, "text/xml")
+      }
+    }(),
+    clearSelection: function() {
+      if (document.selection) return function() {
+        document.selection.empty()
+      };
+      if (window.getSelection) return function() {
+        window.getSelection().removeAllRanges()
+      }
+    }(),
+    getPrettyXml: function(a, b, c) {
+      var d = [];
+      if (null != a)
+        if (b = b || "  ", c = c || "", a.nodeType == mxConstants.NODETYPE_TEXT) d.push(a.nodeValue);
+        else {
+          d.push(c + "\x3c" + a.nodeName);
+          var e = a.attributes;
+          if (null != e)
+            for (var f = 0; f < e.length; f++) {
+              var g = mxUtils.htmlEntities(e[f].nodeValue);
+              d.push(" " + e[f].nodeName + '\x3d"' + g + '"')
+            }
+          e = a.firstChild;
+          if (null != e) {
+            for (d.push("\x3e\n"); null != e;) d.push(mxUtils.getPrettyXml(e, b, c + b)), e = e.nextSibling;
+            d.push(c + "\x3c/" + a.nodeName + "\x3e\n")
+          } else d.push("/\x3e\n")
+        }
+      return d.join("")
+    },
+    removeWhitespace: function(a,
+      b) {
+      for (var c = b ? a.previousSibling : a.nextSibling; null != c && c.nodeType == mxConstants.NODETYPE_TEXT;) {
+        var d = b ? c.previousSibling : c.nextSibling,
+          e = mxUtils.getTextContent(c);
+        0 == mxUtils.trim(e).length && c.parentNode.removeChild(c);
+        c = d
+      }
+    },
+    htmlEntities: function(a, b) {
+      a = (a || "").replace(/&/g, "\x26amp;");
+      a = a.replace(/"/g, "\x26quot;");
+      a = a.replace(/\'/g, "\x26#39;");
+      a = a.replace(/</g, "\x26lt;");
+      a = a.replace(/>/g, "\x26gt;");
+      if (null == b || b) a = a.replace(/\n/g, "\x26#xa;");
+      return a
+    },
+    isVml: function(a) {
+      return null != a && "urn:schemas-microsoft-com:vml" ==
+        a.tagUrn
+    },
+    getXml: function(a, b) {
+      var c = "";
+      null != a && (c = a.xml, c = null == c ? a.innerHTML ? a.innerHTML : (new XMLSerializer).serializeToString(a) : c.replace(/\r\n\t[\t]*/g, "").replace(/>\r\n/g, "\x3e").replace(/\r\n/g, "\n"));
+      return c = c.replace(/\n/g, b || "\x26#xa;")
+    },
+    getTextContent: function(a) {
+      var b = "";
+      null != a && (null != a.firstChild && (a = a.firstChild), b = a.nodeValue || "");
+      return b
+    },
+    getInnerHtml: function() {
+      return mxClient.IS_IE ? function(a) {
+        return null != a ? a.innerHTML : ""
+      } : function(a) {
+        return null != a ? (new XMLSerializer).serializeToString(a) :
+          ""
+      }
+    }(),
+    getOuterHtml: function() {
+      return mxClient.IS_IE ? function(a) {
+        if (null != a) {
+          if (null != a.outerHTML) return a.outerHTML;
+          var b = [];
+          b.push("\x3c" + a.nodeName);
+          var c = a.attributes;
+          if (null != c)
+            for (var d = 0; d < c.length; d++) {
+              var e = c[d].nodeValue;
+              null != e && 0 < e.length && (b.push(" "), b.push(c[d].nodeName), b.push('\x3d"'), b.push(e), b.push('"'))
+            }
+          0 == a.innerHTML.length ? b.push("/\x3e") : (b.push("\x3e"), b.push(a.innerHTML), b.push("\x3c/" + a.nodeName + "\x3e"));
+          return b.join("")
+        }
+        return ""
+      } : function(a) {
+        return null != a ? (new XMLSerializer).serializeToString(a) :
+          ""
+      }
+    }(),
+    write: function(a, b) {
+      var c = a.ownerDocument.createTextNode(b);
+      null != a && a.appendChild(c);
+      return c
+    },
+    writeln: function(a, b) {
+      var c = a.ownerDocument.createTextNode(b);
+      null != a && (a.appendChild(c), a.appendChild(document.createElement("br")));
+      return c
+    },
+    br: function(a, b) {
+      b = b || 1;
+      for (var c = null, d = 0; d < b; d++) null != a && (c = a.ownerDocument.createElement("br"), a.appendChild(c));
+      return c
+    },
+    button: function(a, b, c) {
+      c = null != c ? c : document;
+      c = c.createElement("button");
+      mxUtils.write(c, a);
+      mxEvent.addListener(c, "click", function(a) {
+        b(a)
+      });
+      return c
+    },
+    para: function(a, b) {
+      var c = document.createElement("p");
+      mxUtils.write(c, b);
+      null != a && a.appendChild(c);
+      return c
+    },
+    addTransparentBackgroundFilter: function(a) {
+      a.style.filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'" + mxClient.imageBasePath + "/transparent.gif', sizingMethod\x3d'scale')"
+    },
+    linkAction: function(a, b, c, d, e) {
+      return mxUtils.link(a, b, function() {
+        c.execute(d)
+      }, e)
+    },
+    linkInvoke: function(a, b, c, d, e, f) {
+      return mxUtils.link(a, b, function() {
+        c[d](e)
+      }, f)
+    },
+    link: function(a, b, c, d) {
+      var e =
+        document.createElement("span");
+      e.style.color = "blue";
+      e.style.textDecoration = "underline";
+      e.style.cursor = "pointer";
+      null != d && (e.style.paddingLeft = d + "px");
+      mxEvent.addListener(e, "click", c);
+      mxUtils.write(e, b);
+      null != a && a.appendChild(e);
+      return e
+    },
+    fit: function(a) {
+      var b = parseInt(a.offsetLeft),
+        c = parseInt(a.offsetWidth),
+        d = document.body,
+        e = document.documentElement,
+        f = (d.scrollLeft || e.scrollLeft) + (d.clientWidth || e.clientWidth);
+      b + c > f && (a.style.left = Math.max(d.scrollLeft || e.scrollLeft, f - c) + "px");
+      b = parseInt(a.offsetTop);
+      c = parseInt(a.offsetHeight);
+      f = (d.scrollTop || e.scrollTop) + Math.max(d.clientHeight || 0, e.clientHeight);
+      b + c > f && (a.style.top = Math.max(d.scrollTop || e.scrollTop, f - c) + "px")
+    },
+    open: function(a) {
+      if (mxClient.IS_NS) {
+        try {
+          netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
+        } catch (b) {
+          return mxUtils.alert("Permission to read file denied."), ""
+        }
+        var c = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+        c.initWithPath(a);
+        if (!c.exists()) return mxUtils.alert("File not found."),
+          "";
+        a = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
+        a.init(c, 1, 4, null);
+        c = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
+        c.init(a);
+        return c.read(c.available())
+      }
+      c = (new ActiveXObject("Scripting.FileSystemObject")).OpenTextFile(a, 1);
+      a = c.readAll();
+      c.close();
+      return a
+    },
+    save: function(a, b) {
+      if (mxClient.IS_NS) {
+        try {
+          netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
+        } catch (c) {
+          mxUtils.alert("Permission to write file denied.");
+          return
+        }
+        var d = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+        d.initWithPath(a);
+        d.exists() || d.create(0, 420);
+        var e = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
+        e.init(d, 34, 4, null);
+        e.write(b, b.length);
+        e.flush();
+        e.close()
+      } else d = (new ActiveXObject("Scripting.FileSystemObject")).CreateTextFile(a, !0), d.Write(b), d.Close()
+    },
+    saveAs: function(a) {
+      var b = document.createElement("iframe");
+      b.setAttribute("src", "");
+      b.style.visibility = "hidden";
+      document.body.appendChild(b);
+      try {
+        if (mxClient.IS_NS) {
+          var c = b.contentDocument;
+          c.open();
+          c.write(a);
+          c.close();
+          try {
+            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), b.focus(), saveDocument(c)
+          } catch (d) {
+            mxUtils.alert("Permission to save document denied.")
+          }
+        } else c = b.contentWindow.document, c.write(a), c.execCommand("SaveAs", !1, document.location)
+      } finally {
+        document.body.removeChild(b)
+      }
+    },
+    copy: function(a) {
+      if (window.clipboardData) window.clipboardData.setData("Text",
+        a);
+      else {
+        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+        var b = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
+        if (b) {
+          var c = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
+          if (c) {
+            c.addDataFlavor("text/unicode");
+            var d = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
+            d.data = a;
+            c.setTransferData("text/unicode",
+              d, 2 * a.length);
+            b.setData(c, null, Components.interfaces.nsIClipboard.kGlobalClipboard)
+          }
+        }
+      }
+    },
+    load: function(a) {
+      a = new mxXmlRequest(a, null, "GET", !1);
+      a.send();
+      return a
+    },
+    get: function(a, b, c) {
+      return (new mxXmlRequest(a, null, "GET")).send(b, c)
+    },
+    post: function(a, b, c, d) {
+      return (new mxXmlRequest(a, b)).send(c, d)
+    },
+    submit: function(a, b, c, d) {
+      return (new mxXmlRequest(a, b)).simulate(c, d)
+    },
+    loadInto: function(a, b, c) {
+      mxClient.IS_IE ? b.onreadystatechange = function() {
+        4 == b.readyState && c()
+      } : b.addEventListener("load", c, !1);
+      b.load(a)
+    },
+    getValue: function(a, b, c) {
+      a = null != a ? a[b] : null;
+      null == a && (a = c);
+      return a
+    },
+    getNumber: function(a, b, c) {
+      a = null != a ? a[b] : null;
+      null == a && (a = c || 0);
+      return Number(a)
+    },
+    getColor: function(a, b, c) {
+      a = null != a ? a[b] : null;
+      null == a ? a = c : a == mxConstants.NONE && (a = null);
+      return a
+    },
+    clone: function(a, b, c) {
+      c = null != c ? c : !1;
+      var d = null;
+      if (null != a && "function" == typeof a.constructor) {
+        var d = new a.constructor,
+          e;
+        for (e in a)
+          if (e != mxObjectIdentity.FIELD_NAME && (null == b || 0 > mxUtils.indexOf(b, e))) d[e] = !c && "object" == typeof a[e] ? mxUtils.clone(a[e]) : a[e]
+      }
+      return d
+    },
+    equalPoints: function(a, b) {
+      if (null == a && null != b || null != a && null == b || null != a && null != b && a.length != b.length) return !1;
+      if (null != a && null != b)
+        for (var c = 0; c < a.length; c++)
+          if (a[c] == b[c] || null != a[c] && !a[c].equals(b[c])) return !1;
+      return !0
+    },
+    equalEntries: function(a, b) {
+      if (null == a && null != b || null != a && null == b || null != a && null != b && a.length != b.length) return !1;
+      if (null != a && null != b)
+        for (var c in a)
+          if (a[c] != b[c]) return !1;
+      return !0
+    },
+    extend: function(a, b) {
+      var c = function() {};
+      c.prototype = b.prototype;
+      a.prototype = new c;
+      a.prototype.constructor =
+        a
+    },
+    toString: function(a) {
+      var b = "",
+        c;
+      for (c in a) try {
+        if (null == a[c]) b += c + " \x3d [null]\n";
+        else if ("function" == typeof a[c]) b += c + " \x3d\x3e [Function]\n";
+        else if ("object" == typeof a[c]) var d = mxUtils.getFunctionName(a[c].constructor),
+          b = b + (c + " \x3d\x3e [" + d + "]\n");
+        else b += c + " \x3d " + a[c] + "\n"
+      } catch (e) {
+        b += c + "\x3d" + e.message
+      }
+      return b
+    },
+    toRadians: function(a) {
+      return Math.PI * a / 180
+    },
+    arcToCurves: function(a, b, c, d, e, f, g, h, k) {
+      h -= a;
+      k -= b;
+      if (0 === c || 0 === d) return p;
+      c = Math.abs(c);
+      d = Math.abs(d);
+      var l = -h / 2,
+        m = -k / 2,
+        n = Math.cos(e *
+          Math.PI / 180),
+        p = Math.sin(e * Math.PI / 180);
+      e = n * l + p * m;
+      var l = -1 * p * l + n * m,
+        m = e * e,
+        q = l * l,
+        s = c * c,
+        r = d * d,
+        t = m / s + q / r;
+      1 < t ? (c *= Math.sqrt(t), d *= Math.sqrt(t), f = 0) : (t = 1, f === g && (t = -1), f = t * Math.sqrt((s * r - s * q - r * m) / (s * q + r * m)));
+      m = f * c * l / d;
+      q = -1 * f * d * e / c;
+      h = n * m - p * q + h / 2;
+      k = p * m + n * q + k / 2;
+      s = Math.atan2((l - q) / d, (e - m) / c) - Math.atan2(0, 1);
+      f = 0 <= s ? s : 2 * Math.PI + s;
+      s = Math.atan2((-l - q) / d, (-e - m) / c) - Math.atan2((l - q) / d, (e - m) / c);
+      e = 0 <= s ? s : 2 * Math.PI + s;
+      0 == g && 0 < e ? e -= 2 * Math.PI : 0 != g && 0 > e && (e += 2 * Math.PI);
+      g = 2 * e / Math.PI;
+      g = Math.ceil(0 > g ? -1 * g : g);
+      e /= g;
+      l = 8 / 3 * Math.sin(e /
+        4) * Math.sin(e / 4) / Math.sin(e / 2);
+      m = n * c;
+      n *= d;
+      c *= p;
+      d *= p;
+      for (var v = Math.cos(f), w = Math.sin(f), q = -l * (m * w + d * v), s = -l * (c * w - n * v), t = r = 0, p = [], u = 0; u < g; ++u) {
+        f += e;
+        var v = Math.cos(f),
+          w = Math.sin(f),
+          r = m * v - d * w + h,
+          t = c * v + n * w + k,
+          y = -l * (m * w + d * v),
+          v = -l * (c * w - n * v),
+          w = 6 * u;
+        p[w] = Number(q + a);
+        p[w + 1] = Number(s + b);
+        p[w + 2] = Number(r - y + a);
+        p[w + 3] = Number(t - v + b);
+        p[w + 4] = Number(r + a);
+        p[w + 5] = Number(t + b);
+        q = r + y;
+        s = t + v
+      }
+      return p
+    },
+    getBoundingBox: function(a, b) {
+      var c = null;
+      if (null != a && null != b && 0 != b) {
+        var d = mxUtils.toRadians(b),
+          c = Math.cos(d),
+          e = Math.sin(d),
+          f =
+          new mxPoint(a.x + a.width / 2, a.y + a.height / 2),
+          g = new mxPoint(a.x, a.y),
+          d = new mxPoint(a.x + a.width, a.y),
+          h = new mxPoint(d.x, a.y + a.height),
+          k = new mxPoint(a.x, h.y),
+          g = mxUtils.getRotatedPoint(g, c, e, f),
+          d = mxUtils.getRotatedPoint(d, c, e, f),
+          h = mxUtils.getRotatedPoint(h, c, e, f),
+          k = mxUtils.getRotatedPoint(k, c, e, f),
+          c = new mxRectangle(g.x, g.y, 0, 0);
+        c.add(new mxRectangle(d.x, d.y, 0, 0));
+        c.add(new mxRectangle(h.x, h.y, 0, 0));
+        c.add(new mxRectangle(k.x, k.y, 0, 0))
+      }
+      return c
+    },
+    getRotatedPoint: function(a, b, c, d) {
+      d = null != d ? d : new mxPoint;
+      var e =
+        a.x - d.x;
+      a = a.y - d.y;
+      return new mxPoint(e * b - a * c + d.x, a * b + e * c + d.y)
+    },
+    getPortConstraints: function(a, b, c, d) {
+      a = mxUtils.getValue(a.style, mxConstants.STYLE_PORT_CONSTRAINT, null);
+      if (null == a) return d;
+      d = a.toString();
+      a = mxConstants.DIRECTION_MASK_NONE;
+      0 <= d.indexOf(mxConstants.DIRECTION_NORTH) && (a |= mxConstants.DIRECTION_MASK_NORTH);
+      0 <= d.indexOf(mxConstants.DIRECTION_WEST) && (a |= mxConstants.DIRECTION_MASK_WEST);
+      0 <= d.indexOf(mxConstants.DIRECTION_SOUTH) && (a |= mxConstants.DIRECTION_MASK_SOUTH);
+      0 <= d.indexOf(mxConstants.DIRECTION_EAST) &&
+        (a |= mxConstants.DIRECTION_MASK_EAST);
+      return a
+    },
+    reversePortConstraints: function(a) {
+      var b = 0,
+        b = (a & mxConstants.DIRECTION_MASK_WEST) << 3,
+        b = b | (a & mxConstants.DIRECTION_MASK_NORTH) << 1,
+        b = b | (a & mxConstants.DIRECTION_MASK_SOUTH) >> 1;
+      return b |= (a & mxConstants.DIRECTION_MASK_EAST) >> 3
+    },
+    findNearestSegment: function(a, b, c) {
+      var d = -1;
+      if (0 < a.absolutePoints.length)
+        for (var e = a.absolutePoints[0], f = null, g = 1; g < a.absolutePoints.length; g++) {
+          var h = a.absolutePoints[g],
+            e = mxUtils.ptSegDistSq(e.x, e.y, h.x, h.y, b, c);
+          if (null == f || e < f) f =
+            e, d = g - 1;
+          e = h
+        }
+      return d
+    },
+    rectangleIntersectsSegment: function(a, b, c) {
+      var d = a.y,
+        e = a.x,
+        f = d + a.height,
+        g = e + a.width;
+      a = b.x;
+      var h = c.x;
+      b.x > c.x && (a = c.x, h = b.x);
+      h > g && (h = g);
+      a < e && (a = e);
+      if (a > h) return !1;
+      var e = b.y,
+        g = c.y,
+        k = c.x - b.x;
+      1E-7 < Math.abs(k) && (c = (c.y - b.y) / k, b = b.y - c * b.x, e = c * a + b, g = c * h + b);
+      e > g && (b = g, g = e, e = b);
+      g > f && (g = f);
+      e < d && (e = d);
+      return e > g ? !1 : !0
+    },
+    contains: function(a, b, c) {
+      return a.x <= b && a.x + a.width >= b && a.y <= c && a.y + a.height >= c
+    },
+    intersects: function(a, b) {
+      var c = a.width,
+        d = a.height,
+        e = b.width,
+        f = b.height;
+      if (0 >= e || 0 >= f || 0 >= c ||
+        0 >= d) return !1;
+      var g = a.x,
+        h = a.y,
+        k = b.x,
+        l = b.y,
+        e = e + k,
+        f = f + l,
+        c = c + g,
+        d = d + h;
+      return (e < k || e > g) && (f < l || f > h) && (c < g || c > k) && (d < h || d > l)
+    },
+    intersectsHotspot: function(a, b, c, d, e, f) {
+      d = null != d ? d : 1;
+      e = null != e ? e : 0;
+      f = null != f ? f : 0;
+      if (0 < d) {
+        var g = a.getCenterX(),
+          h = a.getCenterY(),
+          k = a.width,
+          l = a.height,
+          m = mxUtils.getValue(a.style, mxConstants.STYLE_STARTSIZE) * a.view.scale;
+        0 < m && (mxUtils.getValue(a.style, mxConstants.STYLE_HORIZONTAL, !0) ? (h = a.y + m / 2, l = m) : (g = a.x + m / 2, k = m));
+        k = Math.max(e, k * d);
+        l = Math.max(e, l * d);
+        0 < f && (k = Math.min(k, f), l = Math.min(l,
+          f));
+        d = new mxRectangle(g - k / 2, h - l / 2, k, l);
+        g = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0);
+        0 != g && (e = Math.cos(-g), f = Math.sin(-g), g = new mxPoint(a.getCenterX(), a.getCenterY()), a = mxUtils.getRotatedPoint(new mxPoint(b, c), e, f, g), b = a.x, c = a.y);
+        return mxUtils.contains(d, b, c)
+      }
+      return !0
+    },
+    getOffset: function(a, b) {
+      var c = 0,
+        d = 0;
+      if (null != b && b) var e = document.body,
+        f = document.documentElement,
+        c = c + (e.scrollLeft || f.scrollLeft),
+        d = d + (e.scrollTop || f.scrollTop);
+      for (; a.offsetParent;) c += a.offsetLeft, d +=
+        a.offsetTop, a = a.offsetParent;
+      return new mxPoint(c, d)
+    },
+    getScrollOrigin: function(a) {
+      for (var b = document.body, c = document.documentElement, d = new mxPoint(b.scrollLeft || c.scrollLeft, b.scrollTop || c.scrollTop); null != a && a != b && a != c;) !isNaN(a.scrollLeft) && !
+        isNaN(a.scrollTop) && (d.x += a.scrollLeft, d.y += a.scrollTop), a = a.parentNode;
+      return d
+    },
+    convertPoint: function(a, b, c) {
+      var d = mxUtils.getScrollOrigin(a);
+      a = mxUtils.getOffset(a);
+      a.x -= d.x;
+      a.y -= d.y;
+      return new mxPoint(b - a.x, c - a.y)
+    },
+    ltrim: function(a, b) {
+      return a.replace(RegExp("^[" +
+        (b || "\\s") + "]+", "g"), "")
+    },
+    rtrim: function(a, b) {
+      return a.replace(RegExp("[" + (b || "\\s") + "]+$", "g"), "")
+    },
+    trim: function(a, b) {
+      return mxUtils.ltrim(mxUtils.rtrim(a, b), b)
+    },
+    isNumeric: function(a) {
+      return null != a && (null == a.length || 0 < a.length && 0 > a.indexOf("0x") && 0 > a.indexOf("0X")) && !isNaN(a)
+    },
+    mod: function(a, b) {
+      return (a % b + b) % b
+    },
+    intersection: function(a, b, c, d, e, f, g, h) {
+      var k = (h - f) * (c - a) - (g - e) * (d - b);
+      g = ((g - e) * (b - f) - (h - f) * (a - e)) / k;
+      e = ((c - a) * (b - f) - (d - b) * (a - e)) / k;
+      return 0 <= g && 1 >= g && 0 <= e && 1 >= e ? new mxPoint(a + g * (c - a), b + g *
+        (d - b)) : null
+    },
+    ptSegDistSq: function(a, b, c, d, e, f) {
+      c -= a;
+      d -= b;
+      e -= a;
+      f -= b;
+      0 >= e * c + f * d ? c = 0 : (e = c - e, f = d - f, a = e * c + f * d, c = 0 >= a ? 0 : a * a / (c * c + d * d));
+      e = e * e + f * f - c;
+      0 > e && (e = 0);
+      return e
+    },
+    relativeCcw: function(a, b, c, d, e, f) {
+      c -= a;
+      d -= b;
+      e -= a;
+      f -= b;
+      a = e * d - f * c;
+      0 == a && (a = e * c + f * d, 0 < a && (a = (e - c) * c + (f - d) * d, 0 > a && (a = 0)));
+      return 0 > a ? -1 : 0 < a ? 1 : 0
+    },
+    animateChanges: function(a, b) {
+      mxEffects.animateChanges.apply(this, arguments)
+    },
+    cascadeOpacity: function(a, b, c) {
+      mxEffects.cascadeOpacity.apply(this, arguments)
+    },
+    fadeOut: function(a, b, c, d, e, f) {
+      mxEffects.fadeOut.apply(this,
+        arguments)
+    },
+    setOpacity: function(a, b) {
+      mxUtils.isVml(a) ? a.style.filter = 100 <= b ? null : "alpha(opacity\x3d" + b / 5 + ")" : mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? a.style
+        .filter = 100 <= b ? null : "alpha(opacity\x3d" + b + ")" : a.style.opacity = b / 100
+    },
+    createImage: function(a) {
+      var b = null;
+      mxClient.IS_IE6 && "CSS1Compat" != document.compatMode ? (b = document.createElement(mxClient.VML_PREFIX + ":image"), b.setAttribute("src", a), b.style.borderStyle = "none") : (b = document.createElement(
+        "img"), b.setAttribute("src",
+        a), b.setAttribute("border", "0"));
+      return b
+    },
+    sortCells: function(a, b) {
+      b = null != b ? b : !0;
+      var c = new mxDictionary;
+      a.sort(function(a, e) {
+        var f = c.get(a);
+        null == f && (f = mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR), c.put(a, f));
+        var g = c.get(e);
+        null == g && (g = mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR), c.put(e, g));
+        f = mxCellPath.compare(f, g);
+        return 0 == f ? 0 : 0 < f == b ? 1 : -1
+      });
+      return a
+    },
+    getStylename: function(a) {
+      return null != a && (a = a.split(";")[0], 0 > a.indexOf("\x3d")) ? a : ""
+    },
+    getStylenames: function(a) {
+      var b = [];
+      if (null !=
+        a) {
+        a = a.split(";");
+        for (var c = 0; c < a.length; c++) 0 > a[c].indexOf("\x3d") && b.push(a[c])
+      }
+      return b
+    },
+    indexOfStylename: function(a, b) {
+      if (null != a && null != b)
+        for (var c = a.split(";"), d = 0, e = 0; e < c.length; e++) {
+          if (c[e] == b) return d;
+          d += c[e].length + 1
+        }
+      return -1
+    },
+    addStylename: function(a, b) {
+      0 > mxUtils.indexOfStylename(a, b) && (null == a ? a = "" : 0 < a.length && ";" != a.charAt(a.length - 1) && (a += ";"), a += b);
+      return a
+    },
+    removeStylename: function(a, b) {
+      var c = [];
+      if (null != a)
+        for (var d = a.split(";"), e = 0; e < d.length; e++) d[e] != b && c.push(d[e]);
+      return c.join(";")
+    },
+    removeAllStylenames: function(a) {
+      var b = [];
+      if (null != a) {
+        a = a.split(";");
+        for (var c = 0; c < a.length; c++) 0 <= a[c].indexOf("\x3d") && b.push(a[c])
+      }
+      return b.join(";")
+    },
+    setCellStyles: function(a, b, c, d) {
+      if (null != b && 0 < b.length) {
+        a.beginUpdate();
+        try {
+          for (var e = 0; e < b.length; e++)
+            if (null != b[e]) {
+              var f = mxUtils.setStyle(a.getStyle(b[e]), c, d);
+              a.setStyle(b[e], f)
+            }
+        } finally {
+          a.endUpdate()
+        }
+      }
+    },
+    setStyle: function(a, b, c) {
+      var d = null != c && ("undefined" == typeof c.length || 0 < c.length);
+      if (null == a || 0 == a.length) d && (a = b + "\x3d" + c);
+      else {
+        var e = a.indexOf(b +
+          "\x3d");
+        0 > e ? d && (d = ";" == a.charAt(a.length - 1) ? "" : ";", a = a + d + b + "\x3d" + c) : (b = d ? b + "\x3d" + c : "", c = a.indexOf(";", e), d || c++, a = a.substring(0, e) + b + (c > e ?
+          a.substring(c) : ""))
+      }
+      return a
+    },
+    setCellStyleFlags: function(a, b, c, d, e) {
+      if (null != b && 0 < b.length) {
+        a.beginUpdate();
+        try {
+          for (var f = 0; f < b.length; f++)
+            if (null != b[f]) {
+              var g = mxUtils.setStyleFlag(a.getStyle(b[f]), c, d, e);
+              a.setStyle(b[f], g)
+            }
+        } finally {
+          a.endUpdate()
+        }
+      }
+    },
+    setStyleFlag: function(a, b, c, d) {
+      if (null == a || 0 == a.length) a = d || null == d ? b + "\x3d" + c : b + "\x3d0";
+      else {
+        var e = a.indexOf(b +
+          "\x3d");
+        if (0 > e) e = ";" == a.charAt(a.length - 1) ? "" : ";", a = d || null == d ? a + e + b + "\x3d" + c : a + e + b + "\x3d0";
+        else {
+          var f = a.indexOf(";", e),
+            g = "",
+            g = 0 > f ? a.substring(e + b.length + 1) : a.substring(e + b.length + 1, f),
+            g = null == d ? parseInt(g) ^ c : d ? parseInt(g) | c : parseInt(g) & ~c;
+          a = a.substring(0, e) + b + "\x3d" + g + (0 <= f ? a.substring(f) : "")
+        }
+      }
+      return a
+    },
+    getAlignmentAsPoint: function(a, b) {
+      var c = 0,
+        d = 0;
+      a == mxConstants.ALIGN_CENTER ? c = -0.5 : a == mxConstants.ALIGN_RIGHT && (c = -1);
+      b == mxConstants.ALIGN_MIDDLE ? d = -0.5 : b == mxConstants.ALIGN_BOTTOM && (d = -1);
+      return new mxPoint(c,
+        d)
+    },
+    getSizeForString: function(a, b, c) {
+      b = null != b ? b : mxConstants.DEFAULT_FONTSIZE;
+      c = null != c ? c : mxConstants.DEFAULT_FONTFAMILY;
+      var d = document.createElement("div");
+      d.style.fontFamily = c;
+      d.style.fontSize = Math.round(b) + "px";
+      d.style.lineHeight = Math.round(b * mxConstants.LINE_HEIGHT) + "px";
+      d.style.position = "absolute";
+      d.style.whiteSpace = "nowrap";
+      d.style.visibility = "hidden";
+      d.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block";
+      d.style.zoom = "1";
+      d.innerHTML = a;
+      document.body.appendChild(d);
+      a = new mxRectangle(0, 0,
+        d.offsetWidth, d.offsetHeight);
+      document.body.removeChild(d);
+      return a
+    },
+    getViewXml: function(a, b, c, d, e) {
+      d = null != d ? d : 0;
+      e = null != e ? e : 0;
+      b = null != b ? b : 1;
+      null == c && (c = [a.getModel().getRoot()]);
+      var f = a.getView(),
+        g = null,
+        h = f.isEventsEnabled();
+      f.setEventsEnabled(!1);
+      var k = f.drawPane,
+        l = f.overlayPane;
+      a.dialect == mxConstants.DIALECT_SVG ? (f.drawPane = document.createElementNS(mxConstants.NS_SVG, "g"), f.canvas.appendChild(f.drawPane), f.overlayPane = document.createElementNS(mxConstants.NS_SVG,
+        "g")) : (f.drawPane = f.drawPane.cloneNode(!1),
+        f.canvas.appendChild(f.drawPane), f.overlayPane = f.overlayPane.cloneNode(!1));
+      f.canvas.appendChild(f.overlayPane);
+      var m = f.getTranslate();
+      f.translate = new mxPoint(d, e);
+      b = new mxTemporaryCellStates(a.getView(), b, c);
+      try {
+        g = (new mxCodec).encode(a.getView())
+      } finally {
+        b.destroy(), f.translate = m, f.canvas.removeChild(f.drawPane), f.canvas.removeChild(f.overlayPane), f.drawPane = k, f.overlayPane = l, f.setEventsEnabled(h)
+      }
+      return g
+    },
+    getScaleForPageCount: function(a, b, c, d) {
+      if (1 > a) return 1;
+      c = null != c ? c : mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+      d = null != d ? d : 0;
+      var e = c.width - 2 * d;
+      c = c.height - 2 * d;
+      d = b.getGraphBounds().clone();
+      b = b.getView().getScale();
+      d.width /= b;
+      d.height /= b;
+      b = d.width;
+      c = b / d.height / (e / c);
+      d = Math.sqrt(a);
+      var f = Math.sqrt(c);
+      c = d * f;
+      d /= f;
+      if (1 > c && d > a) {
+        var g = d / a;
+        d = a;
+        c /= g
+      }
+      1 > d && c > a && (g = c / a, c = a, d /= g);
+      g = Math.ceil(c) * Math.ceil(d);
+      for (f = 0; g > a;) {
+        var g = Math.floor(c) / c,
+          h = Math.floor(d) / d;
+        1 == g && (g = Math.floor(c - 1) / c);
+        1 == h && (h = Math.floor(d - 1) / d);
+        g = g > h ? g : h;
+        c *= g;
+        d *= g;
+        g = Math.ceil(c) * Math.ceil(d);
+        f++;
+        if (10 < f) break
+      }
+      return 0.99999 * (e * c / b)
+    },
+    show: function(a,
+      b, c, d) {
+      c = null != c ? c : 0;
+      d = null != d ? d : 0;
+      null == b ? b = window.open().document : b.open();
+      var e = a.getGraphBounds();
+      c = -e.x + c;
+      d = -e.y + d;
+      if (mxClient.IS_IE) {
+        for (var e = "\x3chtml\x3e\x3chead\x3e", f = document.getElementsByTagName("base"), g = 0; g < f.length; g++) e += f[g].outerHTML;
+        e += "\x3cstyle\x3e";
+        for (g = 0; g < document.styleSheets.length; g++) try {
+          e += document.styleSheets(g).cssText
+        } catch (h) {}
+        e += "\x3c/style\x3e\x3c/head\x3e";
+        e += "\x3cbody\x3e";
+        e += a.container.innerHTML;
+        e += "\x3c/body\x3e";
+        e += "\x3chtml\x3e";
+        b.writeln(e);
+        b.close();
+        a =
+          b.body.getElementsByTagName("DIV")[0];
+        null != a && (a.style.position = "absolute", a.style.left = c + "px", a.style.top = d + "px")
+      } else {
+        b.writeln("\x3chtml");
+        b.writeln("\x3chead\x3e");
+        f = document.getElementsByTagName("base");
+        for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g]));
+        f = document.getElementsByTagName("link");
+        for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g]));
+        f = document.getElementsByTagName("style");
+        for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g]));
+        b.writeln("\x3c/head\x3e");
+        b.writeln("\x3c/html\x3e");
+        b.close();
+        null == b.body && b.documentElement.appendChild(b.createElement("body"));
+        b.body.style.overflow = "auto";
+        for (a = a.container.firstChild; null != a;) g = a.cloneNode(!0), b.body.appendChild(g), a = a.nextSibling;
+        a = b.getElementsByTagName("g")[0];
+        null != a && (a.setAttribute("transform", "translate(" + c + "," + d + ")"), c = a.ownerSVGElement, c.setAttribute("width", e.width + Math.max(e.x, 0) + 3), c.setAttribute("height", e.height +
+          Math.max(e.y, 0) + 3))
+      }
+      mxUtils.removeCursors(b.body);
+      return b
+    },
+    printScreen: function(a) {
+      var b = window.open();
+      mxUtils.show(a, b.document);
+      a = function() {
+        b.focus();
+        b.print();
+        b.close()
+      };
+      mxClient.IS_GC ? b.setTimeout(a, 500) : a()
+    },
+    popup: function(a, b) {
+      if (b) {
+        var c = document.createElement("div");
+        c.style.overflow = "scroll";
+        c.style.width = "636px";
+        c.style.height = "460px";
+        var d = document.createElement("pre");
+        d.innerHTML = mxUtils.htmlEntities(a, !1).replace(/\n/g, "\x3cbr\x3e").replace(/ /g, "\x26nbsp;");
+        c.appendChild(d);
+        c = new mxWindow("Popup Window", c, document.body.clientWidth / 2 - 320, (document.body.clientHeight || document.documentElement.clientHeight) /
+          2 - 240, 640, 480, !1, !0);
+        c.setClosable(!0);
+        c.setVisible(!0)
+      } else mxClient.IS_NS ? (c = window.open(), c.document.writeln("\x3cpre\x3e" + mxUtils.htmlEntities(a) + "\x3c/pre"), c.document.close()) : (c = window.open(), d = c.document.createElement(
+        "pre"), d.innerHTML = mxUtils.htmlEntities(a, !1).replace(/\n/g, "\x3cbr\x3e").replace(/ /g, "\x26nbsp;"), c.document.body.appendChild(d))
+    },
+    alert: function(a) {
+      alert(a)
+    },
+    prompt: function(a, b) {
+      return prompt(a, b)
+    },
+    confirm: function(a) {
+      return confirm(a)
+    },
+    error: function(a, b, c, d) {
+      var e = document.createElement("div");
+      e.style.padding = "20px";
+      var f = document.createElement("img");
+      f.setAttribute("src", d || mxUtils.errorImage);
+      f.setAttribute("valign", "bottom");
+      f.style.verticalAlign = "middle";
+      e.appendChild(f);
+      e.appendChild(document.createTextNode("\u00a0"));
+      e.appendChild(document.createTextNode("\u00a0"));
+      e.appendChild(document.createTextNode("\u00a0"));
+      mxUtils.write(e, a);
+      a = document.body.clientWidth;
+      d = document.body.clientHeight || document.documentElement.clientHeight;
+      var g = new mxWindow(mxResources.get(mxUtils.errorResource) ||
+        mxUtils.errorResource, e, (a - b) / 2, d / 4, b, null, !1, !0);
+      c && (mxUtils.br(e), b = document.createElement("p"), c = document.createElement("button"), mxClient.IS_IE ? c.style.cssText = "float:right" : c.setAttribute("style", "float:right"), mxEvent.addListener(
+        c, "click",
+        function(a) {
+          g.destroy()
+        }), mxUtils.write(c, mxResources.get(mxUtils.closeResource) || mxUtils.closeResource), b.appendChild(c), e.appendChild(b), mxUtils.br(e), g.setClosable(!0));
+      g.setVisible(!0);
+      return g
+    },
+    makeDraggable: function(a, b, c, d, e, f, g, h, k, l) {
+      a = new mxDragSource(a,
+        c);
+      a.dragOffset = new mxPoint(null != e ? e : 0, null != f ? f : mxConstants.TOOLTIP_VERTICAL_OFFSET);
+      a.autoscroll = g;
+      a.setGuidesEnabled(!1);
+      null != k && (a.highlightDropTargets = k);
+      null != l && (a.getDropTarget = l);
+      a.getGraphForEvent = function(a) {
+        return "function" == typeof b ? b(a) : b
+      };
+      null != d && (a.createDragElement = function() {
+        return d.cloneNode(!0)
+      }, h && (a.createPreviewElement = function(a) {
+        var b = d.cloneNode(!0),
+          c = parseInt(b.style.width),
+          e = parseInt(b.style.height);
+        b.style.width = Math.round(c * a.view.scale) + "px";
+        b.style.height = Math.round(e *
+          a.view.scale) + "px";
+        return b
+      }));
+      return a
+    }
+  },
+  mxConstants = {
+    DEFAULT_HOTSPOT: 0.3,
+    MIN_HOTSPOT_SIZE: 8,
+    MAX_HOTSPOT_SIZE: 0,
+    RENDERING_HINT_EXACT: "exact",
+    RENDERING_HINT_FASTER: "faster",
+    RENDERING_HINT_FASTEST: "fastest",
+    DIALECT_SVG: "svg",
+    DIALECT_VML: "vml",
+    DIALECT_MIXEDHTML: "mixedHtml",
+    DIALECT_PREFERHTML: "preferHtml",
+    DIALECT_STRICTHTML: "strictHtml",
+    NS_SVG: "http://www.w3.org/2000/svg",
+    NS_XHTML: "http://www.w3.org/1999/xhtml",
+    NS_XLINK: "http://www.w3.org/1999/xlink",
+    SHADOWCOLOR: "gray",
+    SHADOW_OFFSET_X: 2,
+    SHADOW_OFFSET_Y: 3,
+    SHADOW_OPACITY: 1,
+    NODETYPE_ELEMENT: 1,
+    NODETYPE_ATTRIBUTE: 2,
+    NODETYPE_TEXT: 3,
+    NODETYPE_CDATA: 4,
+    NODETYPE_ENTITY_REFERENCE: 5,
+    NODETYPE_ENTITY: 6,
+    NODETYPE_PROCESSING_INSTRUCTION: 7,
+    NODETYPE_COMMENT: 8,
+    NODETYPE_DOCUMENT: 9,
+    NODETYPE_DOCUMENTTYPE: 10,
+    NODETYPE_DOCUMENT_FRAGMENT: 11,
+    NODETYPE_NOTATION: 12,
+    TOOLTIP_VERTICAL_OFFSET: 16,
+    DEFAULT_VALID_COLOR: "#00FF00",
+    DEFAULT_INVALID_COLOR: "#FF0000",
+    HIGHLIGHT_STROKEWIDTH: 3,
+    CURSOR_MOVABLE_VERTEX: "move",
+    CURSOR_MOVABLE_EDGE: "move",
+    CURSOR_LABEL_HANDLE: "default",
+    CURSOR_BEND_HANDLE: "pointer",
+    CURSOR_CONNECT: "pointer",
+    HIGHLIGHT_COLOR: "#00FF00",
+    CONNECT_TARGET_COLOR: "#0000FF",
+    INVALID_CONNECT_TARGET_COLOR: "#FF0000",
+    DROP_TARGET_COLOR: "#0000FF",
+    VALID_COLOR: "#00FF00",
+    INVALID_COLOR: "#FF0000",
+    EDGE_SELECTION_COLOR: "#00FF00",
+    VERTEX_SELECTION_COLOR: "#00FF00",
+    VERTEX_SELECTION_STROKEWIDTH: 1,
+    EDGE_SELECTION_STROKEWIDTH: 1,
+    VERTEX_SELECTION_DASHED: !0,
+    EDGE_SELECTION_DASHED: !0,
+    GUIDE_COLOR: "#FF0000",
+    GUIDE_STROKEWIDTH: 1,
+    OUTLINE_COLOR: "#0099FF",
+    OUTLINE_STROKEWIDTH: mxClient.IS_IE ? 2 : 3,
+    HANDLE_SIZE: 7,
+    LABEL_HANDLE_SIZE: 4,
+    HANDLE_FILLCOLOR: "#00FF00",
+    HANDLE_STROKECOLOR: "black",
+    LABEL_HANDLE_FILLCOLOR: "yellow",
+    CONNECT_HANDLE_FILLCOLOR: "#0000FF",
+    LOCKED_HANDLE_FILLCOLOR: "#FF0000",
+    OUTLINE_HANDLE_FILLCOLOR: "#00FFFF",
+    OUTLINE_HANDLE_STROKECOLOR: "#0033FF",
+    DEFAULT_FONTFAMILY: "Arial,Helvetica",
+    DEFAULT_FONTSIZE: 11,
+    LINE_HEIGHT: 1.2,
+    DEFAULT_FONTSTYLE: 0,
+    DEFAULT_STARTSIZE: 40,
+    DEFAULT_MARKERSIZE: 6,
+    DEFAULT_IMAGESIZE: 24,
+    ENTITY_SEGMENT: 30,
+    RECTANGLE_ROUNDING_FACTOR: 0.15,
+    LINE_ARCSIZE: 20,
+    ARROW_SPACING: 10,
+    ARROW_WIDTH: 30,
+    ARROW_SIZE: 30,
+    PAGE_FORMAT_A4_PORTRAIT: new mxRectangle(0,
+      0, 826, 1169),
+    PAGE_FORMAT_A4_LANDSCAPE: new mxRectangle(0, 0, 1169, 826),
+    PAGE_FORMAT_LETTER_PORTRAIT: new mxRectangle(0, 0, 850, 1100),
+    PAGE_FORMAT_LETTER_LANDSCAPE: new mxRectangle(0, 0, 1100, 850),
+    NONE: "none",
+    STYLE_PERIMETER: "perimeter",
+    STYLE_SOURCE_PORT: "sourcePort",
+    STYLE_TARGET_PORT: "targetPort",
+    STYLE_PORT_CONSTRAINT: "portConstraint",
+    STYLE_OPACITY: "opacity",
+    STYLE_TEXT_OPACITY: "textOpacity",
+    STYLE_OVERFLOW: "overflow",
+    STYLE_ORTHOGONAL: "orthogonal",
+    STYLE_EXIT_X: "exitX",
+    STYLE_EXIT_Y: "exitY",
+    STYLE_EXIT_PERIMETER: "exitPerimeter",
+    STYLE_ENTRY_X: "entryX",
+    STYLE_ENTRY_Y: "entryY",
+    STYLE_ENTRY_PERIMETER: "entryPerimeter",
+    STYLE_WHITE_SPACE: "whiteSpace",
+    STYLE_ROTATION: "rotation",
+    STYLE_FILLCOLOR: "fillColor",
+    STYLE_SWIMLANE_FILLCOLOR: "swimlaneFillColor",
+    STYLE_GRADIENTCOLOR: "gradientColor",
+    STYLE_GRADIENT_DIRECTION: "gradientDirection",
+    STYLE_STROKECOLOR: "strokeColor",
+    STYLE_SEPARATORCOLOR: "separatorColor",
+    STYLE_STROKEWIDTH: "strokeWidth",
+    STYLE_ALIGN: "align",
+    STYLE_VERTICAL_ALIGN: "verticalAlign",
+    STYLE_LABEL_POSITION: "labelPosition",
+    STYLE_VERTICAL_LABEL_POSITION: "verticalLabelPosition",
+    STYLE_IMAGE_ASPECT: "imageAspect",
+    STYLE_IMAGE_ALIGN: "imageAlign",
+    STYLE_IMAGE_VERTICAL_ALIGN: "imageVerticalAlign",
+    STYLE_GLASS: "glass",
+    STYLE_IMAGE: "image",
+    STYLE_IMAGE_WIDTH: "imageWidth",
+    STYLE_IMAGE_HEIGHT: "imageHeight",
+    STYLE_IMAGE_BACKGROUND: "imageBackground",
+    STYLE_IMAGE_BORDER: "imageBorder",
+    STYLE_FLIPH: "flipH",
+    STYLE_FLIPV: "flipV",
+    STYLE_NOLABEL: "noLabel",
+    STYLE_NOEDGESTYLE: "noEdgeStyle",
+    STYLE_LABEL_BACKGROUNDCOLOR: "labelBackgroundColor",
+    STYLE_LABEL_BORDERCOLOR: "labelBorderColor",
+    STYLE_LABEL_PADDING: "labelPadding",
+    STYLE_INDICATOR_SHAPE: "indicatorShape",
+    STYLE_INDICATOR_IMAGE: "indicatorImage",
+    STYLE_INDICATOR_COLOR: "indicatorColor",
+    STYLE_INDICATOR_STROKECOLOR: "indicatorStrokeColor",
+    STYLE_INDICATOR_GRADIENTCOLOR: "indicatorGradientColor",
+    STYLE_INDICATOR_SPACING: "indicatorSpacing",
+    STYLE_INDICATOR_WIDTH: "indicatorWidth",
+    STYLE_INDICATOR_HEIGHT: "indicatorHeight",
+    STYLE_INDICATOR_DIRECTION: "indicatorDirection",
+    STYLE_SHADOW: "shadow",
+    STYLE_SEGMENT: "segment",
+    STYLE_ENDARROW: "endArrow",
+    STYLE_STARTARROW: "startArrow",
+    STYLE_ENDSIZE: "endSize",
+    STYLE_STARTSIZE: "startSize",
+    STYLE_SWIMLANE_LINE: "swimlaneLine",
+    STYLE_ENDFILL: "endFill",
+    STYLE_STARTFILL: "startFill",
+    STYLE_DASHED: "dashed",
+    STYLE_DASH_PATTERN: "dashPattern",
+    STYLE_ROUNDED: "rounded",
+    STYLE_CURVED: "curved",
+    STYLE_ARCSIZE: "arcSize",
+    STYLE_SMOOTH: "smooth",
+    STYLE_SOURCE_PERIMETER_SPACING: "sourcePerimeterSpacing",
+    STYLE_TARGET_PERIMETER_SPACING: "targetPerimeterSpacing",
+    STYLE_PERIMETER_SPACING: "perimeterSpacing",
+    STYLE_SPACING: "spacing",
+    STYLE_SPACING_TOP: "spacingTop",
+    STYLE_SPACING_LEFT: "spacingLeft",
+    STYLE_SPACING_BOTTOM: "spacingBottom",
+    STYLE_SPACING_RIGHT: "spacingRight",
+    STYLE_HORIZONTAL: "horizontal",
+    STYLE_DIRECTION: "direction",
+    STYLE_ELBOW: "elbow",
+    STYLE_FONTCOLOR: "fontColor",
+    STYLE_FONTFAMILY: "fontFamily",
+    STYLE_FONTSIZE: "fontSize",
+    STYLE_FONTSTYLE: "fontStyle",
+    STYLE_AUTOSIZE: "autosize",
+    STYLE_FOLDABLE: "foldable",
+    STYLE_EDITABLE: "editable",
+    STYLE_BENDABLE: "bendable",
+    STYLE_MOVABLE: "movable",
+    STYLE_RESIZABLE: "resizable",
+    STYLE_CLONEABLE: "cloneable",
+    STYLE_DELETABLE: "deletable",
+    STYLE_SHAPE: "shape",
+    STYLE_EDGE: "edgeStyle",
+    STYLE_LOOP: "loopStyle",
+    STYLE_ROUTING_CENTER_X: "routingCenterX",
+    STYLE_ROUTING_CENTER_Y: "routingCenterY",
+    FONT_BOLD: 1,
+    FONT_ITALIC: 2,
+    FONT_UNDERLINE: 4,
+    FONT_SHADOW: 8,
+    SHAPE_RECTANGLE: "rectangle",
+    SHAPE_ELLIPSE: "ellipse",
+    SHAPE_DOUBLE_ELLIPSE: "doubleEllipse",
+    SHAPE_RHOMBUS: "rhombus",
+    SHAPE_LINE: "line",
+    SHAPE_IMAGE: "image",
+    SHAPE_ARROW: "arrow",
+    SHAPE_LABEL: "label",
+    SHAPE_CYLINDER: "cylinder",
+    SHAPE_SWIMLANE: "swimlane",
+    SHAPE_CONNECTOR: "connector",
+    SHAPE_ACTOR: "actor",
+    SHAPE_CLOUD: "cloud",
+    SHAPE_TRIANGLE: "triangle",
+    SHAPE_HEXAGON: "hexagon",
+    ARROW_CLASSIC: "classic",
+    ARROW_BLOCK: "block",
+    ARROW_OPEN: "open",
+    ARROW_OVAL: "oval",
+    ARROW_DIAMOND: "diamond",
+    ARROW_DIAMOND_THIN: "diamondThin",
+    ALIGN_LEFT: "left",
+    ALIGN_CENTER: "center",
+    ALIGN_RIGHT: "right",
+    ALIGN_TOP: "top",
+    ALIGN_MIDDLE: "middle",
+    ALIGN_BOTTOM: "bottom",
+    DIRECTION_NORTH: "north",
+    DIRECTION_SOUTH: "south",
+    DIRECTION_EAST: "east",
+    DIRECTION_WEST: "west",
+    DIRECTION_MASK_NONE: 0,
+    DIRECTION_MASK_WEST: 1,
+    DIRECTION_MASK_NORTH: 2,
+    DIRECTION_MASK_SOUTH: 4,
+    DIRECTION_MASK_EAST: 8,
+    DIRECTION_MASK_ALL: 15,
+    ELBOW_VERTICAL: "vertical",
+    ELBOW_HORIZONTAL: "horizontal",
+    EDGESTYLE_ELBOW: "elbowEdgeStyle",
+    EDGESTYLE_ENTITY_RELATION: "entityRelationEdgeStyle",
+    EDGESTYLE_LOOP: "loopEdgeStyle",
+    EDGESTYLE_SIDETOSIDE: "sideToSideEdgeStyle",
+    EDGESTYLE_TOPTOBOTTOM: "topToBottomEdgeStyle",
+    EDGESTYLE_ORTHOGONAL: "orthogonalEdgeStyle",
+    EDGESTYLE_SEGMENT: "segmentEdgeStyle",
+    PERIMETER_ELLIPSE: "ellipsePerimeter",
+    PERIMETER_RECTANGLE: "rectanglePerimeter",
+    PERIMETER_RHOMBUS: "rhombusPerimeter",
+    PERIMETER_TRIANGLE: "trianglePerimeter"
+  };
+
+function mxEventObject(a) {
+  this.name = a;
+  this.properties = [];
+  for (var b = 1; b < arguments.length; b += 2) null != arguments[b + 1] && (this.properties[arguments[b]] = arguments[b + 1])
+}
+mxEventObject.prototype.name = null;
+mxEventObject.prototype.properties = null;
+mxEventObject.prototype.consumed = !1;
+mxEventObject.prototype.getName = function() {
+  return this.name
+};
+mxEventObject.prototype.getProperties = function() {
+  return this.properties
+};
+mxEventObject.prototype.getProperty = function(a) {
+  return this.properties[a]
+};
+mxEventObject.prototype.isConsumed = function() {
+  return this.consumed
+};
+mxEventObject.prototype.consume = function() {
+  this.consumed = !0
+};
+
+function mxMouseEvent(a, b) {
+  this.evt = a;
+  this.state = b
+}
+mxMouseEvent.prototype.consumed = !1;
+mxMouseEvent.prototype.evt = null;
+mxMouseEvent.prototype.graphX = null;
+mxMouseEvent.prototype.graphY = null;
+mxMouseEvent.prototype.state = null;
+mxMouseEvent.prototype.getEvent = function() {
+  return this.evt
+};
+mxMouseEvent.prototype.getSource = function() {
+  return mxEvent.getSource(this.evt)
+};
+mxMouseEvent.prototype.isSource = function(a) {
+  if (null != a)
+    for (var b = this.getSource(); null != b;) {
+      if (b == a.node) return !0;
+      b = b.parentNode
+    }
+  return !1
+};
+mxMouseEvent.prototype.getX = function() {
+  return mxEvent.getClientX(this.getEvent())
+};
+mxMouseEvent.prototype.getY = function() {
+  return mxEvent.getClientY(this.getEvent())
+};
+mxMouseEvent.prototype.getGraphX = function() {
+  return this.graphX
+};
+mxMouseEvent.prototype.getGraphY = function() {
+  return this.graphY
+};
+mxMouseEvent.prototype.getState = function() {
+  return this.state
+};
+mxMouseEvent.prototype.getCell = function() {
+  var a = this.getState();
+  return null != a ? a.cell : null
+};
+mxMouseEvent.prototype.isPopupTrigger = function() {
+  return mxEvent.isPopupTrigger(this.getEvent())
+};
+mxMouseEvent.prototype.isConsumed = function() {
+  return this.consumed
+};
+mxMouseEvent.prototype.consume = function(a) {
+  (null != a ? a : 1) && this.evt.preventDefault && this.evt.preventDefault();
+  this.evt.returnValue = !1;
+  this.consumed = !0
+};
+
+function mxEventSource(a) {
+  this.setEventSource(a)
+}
+mxEventSource.prototype.eventListeners = null;
+mxEventSource.prototype.eventsEnabled = !0;
+mxEventSource.prototype.eventSource = null;
+mxEventSource.prototype.isEventsEnabled = function() {
+  return this.eventsEnabled
+};
+mxEventSource.prototype.setEventsEnabled = function(a) {
+  this.eventsEnabled = a
+};
+mxEventSource.prototype.getEventSource = function() {
+  return this.eventSource
+};
+mxEventSource.prototype.setEventSource = function(a) {
+  this.eventSource = a
+};
+mxEventSource.prototype.addListener = function(a, b) {
+  null == this.eventListeners && (this.eventListeners = []);
+  this.eventListeners.push(a);
+  this.eventListeners.push(b)
+};
+mxEventSource.prototype.removeListener = function(a) {
+  if (null != this.eventListeners)
+    for (var b = 0; b < this.eventListeners.length;) this.eventListeners[b + 1] == a ? this.eventListeners.splice(b, 2) : b += 2
+};
+mxEventSource.prototype.fireEvent = function(a, b) {
+  if (null != this.eventListeners && this.isEventsEnabled()) {
+    null == a && (a = new mxEventObject);
+    null == b && (b = this.getEventSource());
+    null == b && (b = this);
+    for (var c = [b, a], d = 0; d < this.eventListeners.length; d += 2) {
+      var e = this.eventListeners[d];
+      (null == e || e == a.getName()) && this.eventListeners[d + 1].apply(this, c)
+    }
+  }
+};
+var mxEvent = {
+  objects: [],
+  addListener: function() {
+    var a = function(a, c, d) {
+      null == a.mxListenerList && (a.mxListenerList = [], mxEvent.objects.push(a));
+      a.mxListenerList.push({
+        name: c,
+        f: d
+      })
+    };
+    return window.addEventListener ? function(b, c, d) {
+      b.addEventListener(c, d, !1);
+      a(b, c, d)
+    } : function(b, c, d) {
+      b.attachEvent("on" + c, d);
+      a(b, c, d)
+    }
+  }(),
+  removeListener: function() {
+    var a = function(a, c, d) {
+      if (null != a.mxListenerList) {
+        c = a.mxListenerList.length;
+        for (var e = 0; e < c; e++)
+          if (a.mxListenerList[e].f == d) {
+            a.mxListenerList.splice(e, 1);
+            break
+          }
+        0 ==
+          a.mxListenerList.length && (a.mxListenerList = null)
+      }
+    };
+    return window.removeEventListener ? function(b, c, d) {
+      b.removeEventListener(c, d, !1);
+      a(b, c, d)
+    } : function(b, c, d) {
+      b.detachEvent("on" + c, d);
+      a(b, c, d)
+    }
+  }(),
+  removeAllListeners: function(a) {
+    var b = a.mxListenerList;
+    if (null != b)
+      for (; 0 < b.length;) {
+        var c = b[0];
+        mxEvent.removeListener(a, c.name, c.f)
+      }
+  },
+  addGestureListeners: function(a, b, c, d) {
+    null != b && mxEvent.addListener(a, "mousedown", b);
+    null != c && mxEvent.addListener(a, "mousemove", c);
+    null != d && mxEvent.addListener(a, "mouseup", d);
+    mxClient.IS_TOUCH && (null != b && mxEvent.addListener(a, "touchstart", b), null != c && mxEvent.addListener(a, "touchmove", c), null != d && mxEvent.addListener(a, "touchend", d))
+  },
+  removeGestureListeners: function(a, b, c, d) {
+    null != b && mxEvent.removeListener(a, "mousedown", b);
+    null != c && mxEvent.removeListener(a, "mousemove", c);
+    null != d && mxEvent.removeListener(a, "mouseup", d);
+    mxClient.IS_TOUCH && (null != b && mxEvent.removeListener(a, "touchstart", b), null != c && mxEvent.removeListener(a, "touchmove", c), null != d && mxEvent.removeListener(a, "touchend",
+      d))
+  },
+  redirectMouseEvents: function(a, b, c, d, e, f, g) {
+    var h = function(a) {
+      return "function" == typeof c ? c(a) : c
+    };
+    mxEvent.addGestureListeners(a, function(a) {
+      null != d ? d(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, h(a)))
+    }, function(a) {
+      null != e ? e(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a, h(a)))
+    }, function(a) {
+      null != f ? f(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(a, h(a)))
+    });
+    mxEvent.addListener(a, "dblclick", function(a) {
+      if (null !=
+        g) g(a);
+      else if (!mxEvent.isConsumed(a)) {
+        var c = h(a);
+        b.dblClick(a, null != c ? c.cell : null)
+      }
+    })
+  },
+  release: function(a) {
+    if (null != a && (mxEvent.removeAllListeners(a), a = a.childNodes, null != a))
+      for (var b = a.length, c = 0; c < b; c += 1) mxEvent.release(a[c])
+  },
+  addMouseWheelListener: function(a) {
+    if (null != a) {
+      var b = function(b) {
+        null == b && (b = window.event);
+        var d = 0,
+          d = mxClient.IS_NS && !mxClient.IS_SF && !mxClient.IS_GC ? -b.detail / 2 : b.wheelDelta / 120;
+        0 != d && a(b, 0 < d)
+      };
+      mxClient.IS_NS ? mxEvent.addListener(window, mxClient.IS_SF || mxClient.IS_GC ? "mousewheel" :
+        "DOMMouseScroll", b) : mxEvent.addListener(document, "mousewheel", b)
+    }
+  },
+  disableContextMenu: function() {
+    return mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? function(a) {
+      mxEvent.addListener(a, "contextmenu", function() {
+        return !1
+      })
+    } : function(a) {
+      a.setAttribute("oncontextmenu", "return false;")
+    }
+  }(),
+  getSource: function(a) {
+    return null != a.srcElement ? a.srcElement : a.target
+  },
+  isConsumed: function(a) {
+    return null != a.isConsumed && a.isConsumed
+  },
+  isLeftMouseButton: function(a) {
+    return a.button ==
+      (mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? 1 : 0)
+  },
+  isRightMouseButton: function(a) {
+    return 2 == a.button
+  },
+  isPopupTrigger: function(a) {
+    return mxEvent.isRightMouseButton(a) || mxEvent.isShiftDown(a) && !mxEvent.isControlDown(a)
+  },
+  isShiftDown: function(a) {
+    return null != a ? a.shiftKey : !1
+  },
+  isAltDown: function(a) {
+    return null != a ? a.altKey : !1
+  },
+  isControlDown: function(a) {
+    return null != a ? a.ctrlKey : !1
+  },
+  isMetaDown: function(a) {
+    return null != a ? a.metaKey : !1
+  },
+  getMainEvent: function(a) {
+    ("touchstart" ==
+      a.type || "touchmove" == a.type) && null != a.touches && null != a.touches[0] ? a = a.touches[0] : "touchend" == a.type && (null != a.changedTouches && null != a.changedTouches[0]) && (a =
+      a.changedTouches[0]);
+    return a
+  },
+  getClientX: function(a) {
+    return mxEvent.getMainEvent(a).clientX
+  },
+  getClientY: function(a) {
+    return mxEvent.getMainEvent(a).clientY
+  },
+  consume: function(a, b, c) {
+    c = null != c ? c : !0;
+    if (null != b ? b : 1) a.preventDefault ? (c && a.stopPropagation(), a.preventDefault()) : c && (a.cancelBubble = !0);
+    a.isConsumed = !0;
+    a.returnValue = !1
+  },
+  LABEL_HANDLE: -1,
+  ROTATION_HANDLE: -2,
+  MOUSE_DOWN: "mouseDown",
+  MOUSE_MOVE: "mouseMove",
+  MOUSE_UP: "mouseUp",
+  ACTIVATE: "activate",
+  RESIZE_START: "resizeStart",
+  RESIZE: "resize",
+  RESIZE_END: "resizeEnd",
+  MOVE_START: "moveStart",
+  MOVE: "move",
+  MOVE_END: "moveEnd",
+  PAN_START: "panStart",
+  PAN: "pan",
+  PAN_END: "panEnd",
+  MINIMIZE: "minimize",
+  NORMALIZE: "normalize",
+  MAXIMIZE: "maximize",
+  HIDE: "hide",
+  SHOW: "show",
+  CLOSE: "close",
+  DESTROY: "destroy",
+  REFRESH: "refresh",
+  SIZE: "size",
+  SELECT: "select",
+  FIRED: "fired",
+  GET: "get",
+  RECEIVE: "receive",
+  CONNECT: "connect",
+  DISCONNECT: "disconnect",
+  SUSPEND: "suspend",
+  RESUME: "resume",
+  MARK: "mark",
+  SESSION: "session",
+  ROOT: "root",
+  POST: "post",
+  OPEN: "open",
+  SAVE: "save",
+  BEFORE_ADD_VERTEX: "beforeAddVertex",
+  ADD_VERTEX: "addVertex",
+  AFTER_ADD_VERTEX: "afterAddVertex",
+  DONE: "done",
+  EXECUTE: "execute",
+  EXECUTED: "executed",
+  BEGIN_UPDATE: "beginUpdate",
+  START_EDIT: "startEdit",
+  END_UPDATE: "endUpdate",
+  END_EDIT: "endEdit",
+  BEFORE_UNDO: "beforeUndo",
+  UNDO: "undo",
+  REDO: "redo",
+  CHANGE: "change",
+  NOTIFY: "notify",
+  LAYOUT_CELLS: "layoutCells",
+  CLICK: "click",
+  SCALE: "scale",
+  TRANSLATE: "translate",
+  SCALE_AND_TRANSLATE: "scaleAndTranslate",
+  UP: "up",
+  DOWN: "down",
+  ADD: "add",
+  REMOVE: "remove",
+  CLEAR: "clear",
+  ADD_CELLS: "addCells",
+  CELLS_ADDED: "cellsAdded",
+  MOVE_CELLS: "moveCells",
+  CELLS_MOVED: "cellsMoved",
+  RESIZE_CELLS: "resizeCells",
+  CELLS_RESIZED: "cellsResized",
+  TOGGLE_CELLS: "toggleCells",
+  CELLS_TOGGLED: "cellsToggled",
+  ORDER_CELLS: "orderCells",
+  CELLS_ORDERED: "cellsOrdered",
+  REMOVE_CELLS: "removeCells",
+  CELLS_REMOVED: "cellsRemoved",
+  GROUP_CELLS: "groupCells",
+  UNGROUP_CELLS: "ungroupCells",
+  REMOVE_CELLS_FROM_PARENT: "removeCellsFromParent",
+  FOLD_CELLS: "foldCells",
+  CELLS_FOLDED: "cellsFolded",
+  ALIGN_CELLS: "alignCells",
+  LABEL_CHANGED: "labelChanged",
+  CONNECT_CELL: "connectCell",
+  CELL_CONNECTED: "cellConnected",
+  SPLIT_EDGE: "splitEdge",
+  FLIP_EDGE: "flipEdge",
+  START_EDITING: "startEditing",
+  ADD_OVERLAY: "addOverlay",
+  REMOVE_OVERLAY: "removeOverlay",
+  UPDATE_CELL_SIZE: "updateCellSize",
+  ESCAPE: "escape",
+  CLICK: "click",
+  DOUBLE_CLICK: "doubleClick",
+  START: "start",
+  RESET: "reset"
+};
+
+function mxXmlRequest(a, b, c, d, e, f) {
+  this.url = a;
+  this.params = b;
+  this.method = c || "POST";
+  this.async = null != d ? d : !0;
+  this.username = e;
+  this.password = f
+}
+mxXmlRequest.prototype.url = null;
+mxXmlRequest.prototype.params = null;
+mxXmlRequest.prototype.method = null;
+mxXmlRequest.prototype.async = null;
+mxXmlRequest.prototype.binary = !1;
+mxXmlRequest.prototype.username = null;
+mxXmlRequest.prototype.password = null;
+mxXmlRequest.prototype.request = null;
+mxXmlRequest.prototype.isBinary = function() {
+  return this.binary
+};
+mxXmlRequest.prototype.setBinary = function(a) {
+  this.binary = a
+};
+mxXmlRequest.prototype.getText = function() {
+  return this.request.responseText
+};
+mxXmlRequest.prototype.isReady = function() {
+  return 4 == this.request.readyState
+};
+mxXmlRequest.prototype.getDocumentElement = function() {
+  var a = this.getXml();
+  return null != a ? a.documentElement : null
+};
+mxXmlRequest.prototype.getXml = function() {
+  var a = this.request.responseXML;
+  if (9 <= document.documentMode || null == a || null == a.documentElement) a = mxUtils.parseXml(this.request.responseText);
+  return a
+};
+mxXmlRequest.prototype.getText = function() {
+  return this.request.responseText
+};
+mxXmlRequest.prototype.getStatus = function() {
+  return this.request.status
+};
+mxXmlRequest.prototype.create = function() {
+  if (window.XMLHttpRequest) return function() {
+    var a = new XMLHttpRequest;
+    this.isBinary() && a.overrideMimeType && a.overrideMimeType("text/plain; charset\x3dx-user-defined");
+    return a
+  };
+  if ("undefined" != typeof ActiveXObject) return function() {
+    return new ActiveXObject("Microsoft.XMLHTTP")
+  }
+}();
+mxXmlRequest.prototype.send = function(a, b) {
+  this.request = this.create();
+  null != this.request && (null != a && (this.request.onreadystatechange = mxUtils.bind(this, function() {
+    this.isReady() && (a(this), this.onreadystatechaange = null)
+  })), this.request.open(this.method, this.url, this.async, this.username, this.password), this.setRequestHeaders(this.request, this.params), this.request.send(this.params))
+};
+mxXmlRequest.prototype.setRequestHeaders = function(a, b) {
+  null != b && a.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
+};
+mxXmlRequest.prototype.simulate = function(a, b) {
+  a = a || document;
+  var c = null;
+  a == document && (c = window.onbeforeunload, window.onbeforeunload = null);
+  var d = a.createElement("form");
+  d.setAttribute("method", this.method);
+  d.setAttribute("action", this.url);
+  null != b && d.setAttribute("target", b);
+  d.style.display = "none";
+  d.style.visibility = "hidden";
+  for (var e = 0 < this.params.indexOf("\x26") ? this.params.split("\x26") : this.params.split(), f = 0; f < e.length; f++) {
+    var g = e[f].indexOf("\x3d");
+    if (0 < g) {
+      var h = e[f].substring(0, g),
+        k = e[f].substring(g +
+          1),
+        g = a.createElement("textarea");
+      g.setAttribute("name", h);
+      k = k.replace(/\n/g, "\x26#xa;");
+      h = a.createTextNode(k);
+      g.appendChild(h);
+      d.appendChild(g)
+    }
+  }
+  a.body.appendChild(d);
+  d.submit();
+  a.body.removeChild(d);
+  null != c && (window.onbeforeunload = c)
+};
+var mxClipboard = {
+  STEPSIZE: 10,
+  insertCount: 1,
+  cells: null,
+  isEmpty: function() {
+    return null == mxClipboard.cells
+  },
+  cut: function(a, b) {
+    b = mxClipboard.copy(a, b);
+    mxClipboard.insertCount = 0;
+    mxClipboard.removeCells(a, b);
+    return b
+  },
+  removeCells: function(a, b) {
+    a.removeCells(b)
+  },
+  copy: function(a, b) {
+    b = b || a.getSelectionCells();
+    var c = a.getExportableCells(b);
+    mxClipboard.insertCount = 1;
+    mxClipboard.cells = a.cloneCells(c);
+    return c
+  },
+  paste: function(a) {
+    if (null != mxClipboard.cells) {
+      var b = a.getImportableCells(mxClipboard.cells),
+        c = mxClipboard.insertCount *
+        mxClipboard.STEPSIZE,
+        d = a.getDefaultParent(),
+        b = a.importCells(b, c, c, d);
+      mxClipboard.insertCount++;
+      a.setSelectionCells(b)
+    }
+  }
+};
+
+function mxWindow(a, b, c, d, e, f, g, h, k, l) {
+  null != b && (g = null != g ? g : !0, this.content = b, this.init(c, d, e, f, l), this.installMaximizeHandler(), this.installMinimizeHandler(), this.installCloseHandler(), this.setMinimizable(g),
+    this.setTitle(a), (null == h || h) && this.installMoveHandler(), null != k && null != k.parentNode ? k.parentNode.replaceChild(this.div, k) : document.body.appendChild(this.div))
+}
+mxWindow.prototype = new mxEventSource;
+mxWindow.prototype.constructor = mxWindow;
+mxWindow.prototype.closeImage = mxClient.imageBasePath + "/close.gif";
+mxWindow.prototype.minimizeImage = mxClient.imageBasePath + "/minimize.gif";
+mxWindow.prototype.normalizeImage = mxClient.imageBasePath + "/normalize.gif";
+mxWindow.prototype.maximizeImage = mxClient.imageBasePath + "/maximize.gif";
+mxWindow.prototype.resizeImage = mxClient.imageBasePath + "/resize.gif";
+mxWindow.prototype.visible = !1;
+mxWindow.prototype.content = !1;
+mxWindow.prototype.minimumSize = new mxRectangle(0, 0, 50, 40);
+mxWindow.prototype.title = !1;
+mxWindow.prototype.content = !1;
+mxWindow.prototype.destroyOnClose = !0;
+mxWindow.prototype.init = function(a, b, c, d, e) {
+  e = null != e ? e : "mxWindow";
+  this.div = document.createElement("div");
+  this.div.className = e;
+  this.div.style.left = a + "px";
+  this.div.style.top = b + "px";
+  this.table = document.createElement("table");
+  this.table.className = e;
+  null != c && (mxClient.IS_IE || (this.div.style.width = c + "px"), this.table.style.width = c + "px");
+  null != d && (mxClient.IS_IE || (this.div.style.height = d + "px"), this.table.style.height = d + "px");
+  a = document.createElement("tbody");
+  b = document.createElement("tr");
+  this.title = document.createElement("td");
+  this.title.className = e + "Title";
+  b.appendChild(this.title);
+  a.appendChild(b);
+  b = document.createElement("tr");
+  this.td = document.createElement("td");
+  this.td.className = e + "Pane";
+  this.contentWrapper = document.createElement("div");
+  this.contentWrapper.className = e + "Pane";
+  this.contentWrapper.style.width = "100%";
+  this.contentWrapper.appendChild(this.content);
+  if (mxClient.IS_IE || "DIV" != this.content.nodeName.toUpperCase()) this.contentWrapper.style.height = "100%";
+  this.td.appendChild(this.contentWrapper);
+  b.appendChild(this.td);
+  a.appendChild(b);
+  this.table.appendChild(a);
+  this.div.appendChild(this.table);
+  e = mxUtils.bind(this, function(a) {
+    this.activate()
+  });
+  mxEvent.addListener(this.title, "mousedown", e);
+  mxEvent.addListener(this.table, "mousedown", e);
+  mxClient.IS_TOUCH && (mxEvent.addListener(this.title, "touchstart", e), mxEvent.addListener(this.table, "touchstart", e));
+  this.hide()
+};
+mxWindow.prototype.setTitle = function(a) {
+  for (var b = this.title.firstChild; null != b;) {
+    var c = b.nextSibling;
+    b.nodeType == mxConstants.NODETYPE_TEXT && b.parentNode.removeChild(b);
+    b = c
+  }
+  mxUtils.write(this.title, a || "")
+};
+mxWindow.prototype.setScrollable = function(a) {
+  0 > navigator.userAgent.indexOf("Presto/2.5") && (this.contentWrapper.style.overflow = a ? "auto" : "hidden")
+};
+mxWindow.prototype.activate = function() {
+  if (mxWindow.activeWindow != this) {
+    var a = mxUtils.getCurrentStyle(this.getElement()),
+      a = null != a ? a.zIndex : 3;
+    if (mxWindow.activeWindow) {
+      var b = mxWindow.activeWindow.getElement();
+      null != b && null != b.style && (b.style.zIndex = a)
+    }
+    b = mxWindow.activeWindow;
+    this.getElement().style.zIndex = parseInt(a) + 1;
+    mxWindow.activeWindow = this;
+    this.fireEvent(new mxEventObject(mxEvent.ACTIVATE, "previousWindow", b))
+  }
+};
+mxWindow.prototype.getElement = function() {
+  return this.div
+};
+mxWindow.prototype.fit = function() {
+  mxUtils.fit(this.div)
+};
+mxWindow.prototype.isResizable = function() {
+  return null != this.resize ? "none" != this.resize.style.display : !1
+};
+mxWindow.prototype.setResizable = function(a) {
+  a ? null == this.resize ? (this.resize = document.createElement("img"), this.resize.style.position = "absolute", this.resize.style.bottom = "2px", this.resize.style.right = "2px", this.resize.setAttribute(
+      "src", mxClient.imageBasePath + "/resize.gif"), this.resize.style.cursor = "nw-resize", mxEvent.addGestureListeners(this.resize, mxUtils.bind(this, function(a) {
+      this.activate();
+      var c = mxEvent.getClientX(a),
+        d = mxEvent.getClientY(a),
+        e = this.div.offsetWidth,
+        f = this.div.offsetHeight,
+        g = mxUtils.bind(this,
+          function(a) {
+            var b = mxEvent.getClientX(a) - c,
+              g = mxEvent.getClientY(a) - d;
+            this.setSize(e + b, f + g);
+            this.fireEvent(new mxEventObject(mxEvent.RESIZE, "event", a));
+            mxEvent.consume(a)
+          }),
+        h = mxUtils.bind(this, function(a) {
+          mxEvent.removeGestureListeners(document, null, g, h);
+          this.fireEvent(new mxEventObject(mxEvent.RESIZE_END, "event", a));
+          mxEvent.consume(a)
+        });
+      mxEvent.addGestureListeners(document, null, g, h);
+      this.fireEvent(new mxEventObject(mxEvent.RESIZE_START, "event", a));
+      mxEvent.consume(a)
+    }), null, null), this.div.appendChild(this.resize)) :
+    this.resize.style.display = "inline" : null != this.resize && (this.resize.style.display = "none")
+};
+mxWindow.prototype.setSize = function(a, b) {
+  a = Math.max(this.minimumSize.width, a);
+  b = Math.max(this.minimumSize.height, b);
+  mxClient.IS_IE || (this.div.style.width = a + "px", this.div.style.height = b + "px");
+  this.table.style.width = a + "px";
+  this.table.style.height = b + "px";
+  mxClient.IS_IE || (this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight - 2 + "px")
+};
+mxWindow.prototype.setMinimizable = function(a) {
+  this.minimize.style.display = a ? "" : "none"
+};
+mxWindow.prototype.getMinimumSize = function() {
+  return new mxRectangle(0, 0, 0, this.title.offsetHeight)
+};
+mxWindow.prototype.installMinimizeHandler = function() {
+  this.minimize = document.createElement("img");
+  this.minimize.setAttribute("src", this.minimizeImage);
+  this.minimize.setAttribute("align", "right");
+  this.minimize.setAttribute("title", "Minimize");
+  this.minimize.style.cursor = "pointer";
+  this.minimize.style.marginRight = "1px";
+  this.minimize.style.display = "none";
+  this.title.appendChild(this.minimize);
+  var a = !1,
+    b = null,
+    c = null,
+    d = mxUtils.bind(this, function(d) {
+      this.activate();
+      if (a) a = !1, this.minimize.setAttribute("src",
+        this.minimizeImage), this.minimize.setAttribute("title", "Minimize"), this.contentWrapper.style.display = "", this.maximize.style.display = b, mxClient.IS_IE || (this.div.style.height =
+        c), this.table.style.height = c, null != this.resize && (this.resize.style.visibility = ""), this.fireEvent(new mxEventObject(mxEvent.NORMALIZE, "event", d));
+      else {
+        a = !0;
+        this.minimize.setAttribute("src", this.normalizeImage);
+        this.minimize.setAttribute("title", "Normalize");
+        this.contentWrapper.style.display = "none";
+        b = this.maximize.style.display;
+        this.maximize.style.display = "none";
+        c = this.table.style.height;
+        var f = this.getMinimumSize();
+        0 < f.height && (mxClient.IS_IE || (this.div.style.height = f.height + "px"), this.table.style.height = f.height + "px");
+        0 < f.width && (mxClient.IS_IE || (this.div.style.width = f.width + "px"), this.table.style.width = f.width + "px");
+        null != this.resize && (this.resize.style.visibility = "hidden");
+        this.fireEvent(new mxEventObject(mxEvent.MINIMIZE, "event", d))
+      }
+      mxEvent.consume(d)
+    });
+  mxEvent.addListener(this.minimize, "mousedown", d);
+  mxClient.IS_TOUCH &&
+    mxEvent.addListener(this.minimize, "touchstart", d)
+};
+mxWindow.prototype.setMaximizable = function(a) {
+  this.maximize.style.display = a ? "" : "none"
+};
+mxWindow.prototype.installMaximizeHandler = function() {
+  this.maximize = document.createElement("img");
+  this.maximize.setAttribute("src", this.maximizeImage);
+  this.maximize.setAttribute("align", "right");
+  this.maximize.setAttribute("title", "Maximize");
+  this.maximize.style.cursor = "default";
+  this.maximize.style.marginLeft = "1px";
+  this.maximize.style.cursor = "pointer";
+  this.maximize.style.display = "none";
+  this.title.appendChild(this.maximize);
+  var a = !1,
+    b = null,
+    c = null,
+    d = null,
+    e = null,
+    f = mxUtils.bind(this, function(f) {
+      this.activate();
+      if ("none" != this.maximize.style.display) {
+        if (a) {
+          a = !1;
+          this.maximize.setAttribute("src", this.maximizeImage);
+          this.maximize.setAttribute("title", "Maximize");
+          this.contentWrapper.style.display = "";
+          this.minimize.style.visibility = "";
+          this.div.style.left = b + "px";
+          this.div.style.top = c + "px";
+          if (!mxClient.IS_IE && (this.div.style.height = d, this.div.style.width = e, h = mxUtils.getCurrentStyle(this.contentWrapper), "auto" == h.overflow || null != this.resize)) this.contentWrapper
+            .style.height = this.div.offsetHeight - this.title.offsetHeight -
+            2 + "px";
+          this.table.style.height = d;
+          this.table.style.width = e;
+          null != this.resize && (this.resize.style.visibility = "");
+          this.fireEvent(new mxEventObject(mxEvent.NORMALIZE, "event", f))
+        } else {
+          a = !0;
+          this.maximize.setAttribute("src", this.normalizeImage);
+          this.maximize.setAttribute("title", "Normalize");
+          this.contentWrapper.style.display = "";
+          this.minimize.style.visibility = "hidden";
+          b = parseInt(this.div.style.left);
+          c = parseInt(this.div.style.top);
+          d = this.table.style.height;
+          e = this.table.style.width;
+          this.div.style.left = "0px";
+          this.div.style.top = "0px";
+          mxClient.IS_IE || (this.div.style.height = document.body.clientHeight - 2 + "px", this.div.style.width = document.body.clientWidth - 2 + "px");
+          this.table.style.width = document.body.clientWidth - 2 + "px";
+          this.table.style.height = document.body.clientHeight - 2 + "px";
+          null != this.resize && (this.resize.style.visibility = "hidden");
+          if (!mxClient.IS_IE) {
+            var h = mxUtils.getCurrentStyle(this.contentWrapper);
+            if ("auto" == h.overflow || null != this.resize) this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight -
+              2 + "px"
+          }
+          this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE, "event", f))
+        }
+        mxEvent.consume(f)
+      }
+    });
+  mxEvent.addGestureListeners(this.maximize, f);
+  mxEvent.addListener(this.title, "dblclick", f)
+};
+mxWindow.prototype.installMoveHandler = function() {
+  this.title.style.cursor = "move";
+  mxEvent.addGestureListeners(this.title, mxUtils.bind(this, function(a) {
+    var b = mxEvent.getClientX(a),
+      c = mxEvent.getClientY(a),
+      d = this.getX(),
+      e = this.getY(),
+      f = mxUtils.bind(this, function(a) {
+        var f = mxEvent.getClientX(a) - b,
+          g = mxEvent.getClientY(a) - c;
+        this.setLocation(d + f, e + g);
+        this.fireEvent(new mxEventObject(mxEvent.MOVE, "event", a));
+        mxEvent.consume(a)
+      }),
+      g = mxUtils.bind(this, function(a) {
+        mxEvent.removeGestureListeners(document, null, f,
+          g);
+        this.fireEvent(new mxEventObject(mxEvent.MOVE_END, "event", a));
+        mxEvent.consume(a)
+      });
+    mxEvent.addGestureListeners(document, null, f, g);
+    this.fireEvent(new mxEventObject(mxEvent.MOVE_START, "event", a));
+    mxEvent.consume(a)
+  }))
+};
+mxWindow.prototype.setLocation = function(a, b) {
+  this.div.style.left = a + "px";
+  this.div.style.top = b + "px"
+};
+mxWindow.prototype.getX = function() {
+  return parseInt(this.div.style.left)
+};
+mxWindow.prototype.getY = function() {
+  return parseInt(this.div.style.top)
+};
+mxWindow.prototype.installCloseHandler = function() {
+  this.closeImg = document.createElement("img");
+  this.closeImg.setAttribute("src", this.closeImage);
+  this.closeImg.setAttribute("align", "right");
+  this.closeImg.setAttribute("title", "Close");
+  this.closeImg.style.marginLeft = "2px";
+  this.closeImg.style.cursor = "pointer";
+  this.closeImg.style.display = "none";
+  this.title.insertBefore(this.closeImg, this.title.firstChild);
+  mxEvent.addGestureListeners(this.closeImg, mxUtils.bind(this, function(a) {
+    this.fireEvent(new mxEventObject(mxEvent.CLOSE,
+      "event", a));
+    this.destroyOnClose ? this.destroy() : this.setVisible(!1);
+    mxEvent.consume(a)
+  }))
+};
+mxWindow.prototype.setImage = function(a) {
+  this.image = document.createElement("img");
+  this.image.setAttribute("src", a);
+  this.image.setAttribute("align", "left");
+  this.image.style.marginRight = "4px";
+  this.image.style.marginLeft = "0px";
+  this.image.style.marginTop = "-2px";
+  this.title.insertBefore(this.image, this.title.firstChild)
+};
+mxWindow.prototype.setClosable = function(a) {
+  this.closeImg.style.display = a ? "" : "none"
+};
+mxWindow.prototype.isVisible = function() {
+  return null != this.div ? "hidden" != this.div.style.visibility : !1
+};
+mxWindow.prototype.setVisible = function(a) {
+  null != this.div && this.isVisible() != a && (a ? this.show() : this.hide())
+};
+mxWindow.prototype.show = function() {
+  this.div.style.visibility = "";
+  this.activate();
+  var a = mxUtils.getCurrentStyle(this.contentWrapper);
+  if (!mxClient.IS_IE && ("auto" == a.overflow || null != this.resize)) this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight - 2 + "px";
+  this.fireEvent(new mxEventObject(mxEvent.SHOW))
+};
+mxWindow.prototype.hide = function() {
+  this.div.style.visibility = "hidden";
+  this.fireEvent(new mxEventObject(mxEvent.HIDE))
+};
+mxWindow.prototype.destroy = function() {
+  this.fireEvent(new mxEventObject(mxEvent.DESTROY));
+  null != this.div && (mxEvent.release(this.div), this.div.parentNode.removeChild(this.div), this.div = null);
+  this.contentWrapper = this.content = this.title = null
+};
+
+function mxForm(a) {
+  this.table = document.createElement("table");
+  this.table.className = a;
+  this.body = document.createElement("tbody");
+  this.table.appendChild(this.body)
+}
+mxForm.prototype.table = null;
+mxForm.prototype.body = !1;
+mxForm.prototype.getTable = function() {
+  return this.table
+};
+mxForm.prototype.addButtons = function(a, b) {
+  var c = document.createElement("tr"),
+    d = document.createElement("td");
+  c.appendChild(d);
+  var d = document.createElement("td"),
+    e = document.createElement("button");
+  mxUtils.write(e, mxResources.get("ok") || "OK");
+  d.appendChild(e);
+  mxEvent.addListener(e, "click", function() {
+    a()
+  });
+  e = document.createElement("button");
+  mxUtils.write(e, mxResources.get("cancel") || "Cancel");
+  d.appendChild(e);
+  mxEvent.addListener(e, "click", function() {
+    b()
+  });
+  c.appendChild(d);
+  this.body.appendChild(c)
+};
+mxForm.prototype.addText = function(a, b) {
+  var c = document.createElement("input");
+  c.setAttribute("type", "text");
+  c.value = b;
+  return this.addField(a, c)
+};
+mxForm.prototype.addCheckbox = function(a, b) {
+  var c = document.createElement("input");
+  c.setAttribute("type", "checkbox");
+  this.addField(a, c);
+  b && (c.checked = !0);
+  return c
+};
+mxForm.prototype.addTextarea = function(a, b, c) {
+  var d = document.createElement("textarea");
+  mxClient.IS_NS && c--;
+  d.setAttribute("rows", c || 2);
+  d.value = b;
+  return this.addField(a, d)
+};
+mxForm.prototype.addCombo = function(a, b, c) {
+  var d = document.createElement("select");
+  null != c && d.setAttribute("size", c);
+  b && d.setAttribute("multiple", "true");
+  return this.addField(a, d)
+};
+mxForm.prototype.addOption = function(a, b, c, d) {
+  var e = document.createElement("option");
+  mxUtils.writeln(e, b);
+  e.setAttribute("value", c);
+  d && e.setAttribute("selected", d);
+  a.appendChild(e)
+};
+mxForm.prototype.addField = function(a, b) {
+  var c = document.createElement("tr"),
+    d = document.createElement("td");
+  mxUtils.write(d, a);
+  c.appendChild(d);
+  d = document.createElement("td");
+  d.appendChild(b);
+  c.appendChild(d);
+  this.body.appendChild(c);
+  return b
+};
+
+function mxImage(a, b, c) {
+  this.src = a;
+  this.width = b;
+  this.height = c
+}
+mxImage.prototype.src = null;
+mxImage.prototype.width = null;
+mxImage.prototype.height = null;
+
+function mxDivResizer(a, b) {
+  if ("div" == a.nodeName.toLowerCase()) {
+    null == b && (b = window);
+    this.div = a;
+    var c = mxUtils.getCurrentStyle(a);
+    null != c && (this.resizeWidth = "auto" == c.width, this.resizeHeight = "auto" == c.height);
+    mxEvent.addListener(b, "resize", mxUtils.bind(this, function(a) {
+      this.handlingResize || (this.handlingResize = !0, this.resize(), this.handlingResize = !1)
+    }));
+    this.resize()
+  }
+}
+mxDivResizer.prototype.resizeWidth = !0;
+mxDivResizer.prototype.resizeHeight = !0;
+mxDivResizer.prototype.handlingResize = !1;
+mxDivResizer.prototype.resize = function() {
+  var a = this.getDocumentWidth(),
+    b = this.getDocumentHeight(),
+    c = parseInt(this.div.style.left),
+    d = parseInt(this.div.style.right),
+    e = parseInt(this.div.style.top),
+    f = parseInt(this.div.style.bottom);
+  this.resizeWidth && (!isNaN(c) && !isNaN(d) && 0 <= c && 0 <= d && 0 < a - d - c) && (this.div.style.width = a - d - c + "px");
+  this.resizeHeight && (!isNaN(e) && !isNaN(f) && 0 <= e && 0 <= f && 0 < b - e - f) && (this.div.style.height = b - e - f + "px")
+};
+mxDivResizer.prototype.getDocumentWidth = function() {
+  return document.body.clientWidth
+};
+mxDivResizer.prototype.getDocumentHeight = function() {
+  return document.body.clientHeight
+};
+
+function mxDragSource(a, b) {
+  this.element = a;
+  this.dropHandler = b;
+  mxEvent.addGestureListeners(a, mxUtils.bind(this, this.mouseDown))
+}
+mxDragSource.prototype.element = null;
+mxDragSource.prototype.dropHandler = null;
+mxDragSource.prototype.dragOffset = null;
+mxDragSource.prototype.dragElement = null;
+mxDragSource.prototype.previewElement = null;
+mxDragSource.prototype.enabled = !0;
+mxDragSource.prototype.currentGraph = null;
+mxDragSource.prototype.currentDropTarget = null;
+mxDragSource.prototype.currentPoint = null;
+mxDragSource.prototype.currentGuide = null;
+mxDragSource.prototype.currentHighlight = null;
+mxDragSource.prototype.autoscroll = !0;
+mxDragSource.prototype.guidesEnabled = !0;
+mxDragSource.prototype.gridEnabled = !0;
+mxDragSource.prototype.highlightDropTargets = !0;
+mxDragSource.prototype.dragElementZIndex = 100;
+mxDragSource.prototype.dragElementOpacity = 70;
+mxDragSource.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxDragSource.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxDragSource.prototype.isGuidesEnabled = function() {
+  return this.guidesEnabled
+};
+mxDragSource.prototype.setGuidesEnabled = function(a) {
+  this.guidesEnabled = a
+};
+mxDragSource.prototype.isGridEnabled = function() {
+  return this.gridEnabled
+};
+mxDragSource.prototype.setGridEnabled = function(a) {
+  this.gridEnabled = a
+};
+mxDragSource.prototype.getGraphForEvent = function(a) {
+  return null
+};
+mxDragSource.prototype.getDropTarget = function(a, b, c) {
+  return a.getCellAt(b, c)
+};
+mxDragSource.prototype.createDragElement = function(a) {
+  return this.element.cloneNode(!0)
+};
+mxDragSource.prototype.createPreviewElement = function(a) {
+  return null
+};
+mxDragSource.prototype.mouseDown = function(a) {
+  this.enabled && (!mxEvent.isConsumed(a) && null == this.mouseMoveHandler) && (this.startDrag(a), this.mouseMoveHandler = mxUtils.bind(this, this.mouseMove), this.mouseUpHandler = mxUtils.bind(
+    this, this.mouseUp), mxEvent.addGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler), mxEvent.consume(a, !0, !1))
+};
+mxDragSource.prototype.startDrag = function(a) {
+  this.dragElement = this.createDragElement(a);
+  this.dragElement.style.position = "absolute";
+  this.dragElement.style.zIndex = this.dragElementZIndex;
+  mxUtils.setOpacity(this.dragElement, this.dragElementOpacity)
+};
+mxDragSource.prototype.stopDrag = function(a) {
+  null != this.dragElement && (null != this.dragElement.parentNode && this.dragElement.parentNode.removeChild(this.dragElement), this.dragElement = null)
+};
+mxDragSource.prototype.graphContainsEvent = function(a, b) {
+  var c = mxEvent.getClientX(b),
+    d = mxEvent.getClientY(b),
+    e = mxUtils.getOffset(a.container),
+    f = mxUtils.getScrollOrigin();
+  return c >= e.x - f.x && d >= e.y - f.y && c <= e.x - f.x + a.container.offsetWidth && d <= e.y - f.y + a.container.offsetHeight
+};
+mxDragSource.prototype.mouseMove = function(a) {
+  var b = this.getGraphForEvent(a);
+  null != b && !this.graphContainsEvent(b, a) && (b = null);
+  b != this.currentGraph && (null != this.currentGraph && this.dragExit(this.currentGraph), this.currentGraph = b, null != this.currentGraph && this.dragEnter(this.currentGraph));
+  null != this.currentGraph && this.dragOver(this.currentGraph, a);
+  if (null != this.dragElement && (null == this.previewElement || "visible" != this.previewElement.style.visibility)) {
+    var b = mxEvent.getClientX(a),
+      c = mxEvent.getClientY(a);
+    null == this.dragElement.parentNode && document.body.appendChild(this.dragElement);
+    this.dragElement.style.visibility = "visible";
+    null != this.dragOffset && (b += this.dragOffset.x, c += this.dragOffset.y);
+    b += document.body.scrollLeft || document.documentElement.scrollLeft;
+    c += document.body.scrollTop || document.documentElement.scrollTop;
+    this.dragElement.style.left = b + "px";
+    this.dragElement.style.top = c + "px"
+  } else null != this.dragElement && (this.dragElement.style.visibility = "hidden");
+  mxEvent.consume(a)
+};
+mxDragSource.prototype.mouseUp = function(a) {
+  if (null != this.currentGraph) {
+    if (null != this.currentPoint && (null == this.previewElement || "hidden" != this.previewElement.style.visibility)) {
+      var b = this.currentGraph.view.scale,
+        c = this.currentGraph.view.translate;
+      this.drop(this.currentGraph, a, this.currentDropTarget, this.currentPoint.x / b - c.x, this.currentPoint.y / b - c.y)
+    }
+    this.dragExit(this.currentGraph)
+  }
+  this.stopDrag(a);
+  mxEvent.removeGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler);
+  this.currentGraph =
+    this.mouseUpHandler = this.mouseMoveHandler = null;
+  mxEvent.consume(a)
+};
+mxDragSource.prototype.dragEnter = function(a) {
+  a.isMouseDown = !0;
+  this.previewElement = this.createPreviewElement(a);
+  this.isGuidesEnabled() && null != this.previewElement && (this.currentGuide = new mxGuide(a, a.graphHandler.getGuideStates()));
+  this.highlightDropTargets && (this.currentHighlight = new mxCellHighlight(a, mxConstants.DROP_TARGET_COLOR))
+};
+mxDragSource.prototype.dragExit = function(a) {
+  this.currentPoint = this.currentDropTarget = null;
+  a.isMouseDown = !1;
+  null != this.previewElement && (null != this.previewElement.parentNode && this.previewElement.parentNode.removeChild(this.previewElement), this.previewElement = null);
+  null != this.currentGuide && (this.currentGuide.destroy(), this.currentGuide = null);
+  null != this.currentHighlight && (this.currentHighlight.destroy(), this.currentHighlight = null)
+};
+mxDragSource.prototype.dragOver = function(a, b) {
+  var c = mxUtils.getOffset(a.container),
+    d = mxUtils.getScrollOrigin(a.container),
+    e = mxEvent.getClientX(b) - c.x + d.x,
+    c = mxEvent.getClientY(b) - c.y + d.y;
+  a.autoScroll && (null == this.autoscroll || this.autoscroll) && a.scrollPointToVisible(e, c, a.autoExtend);
+  null != this.currentHighlight && a.isDropEnabled() && (this.currentDropTarget = this.getDropTarget(a, e, c), d = a.getView().getState(this.currentDropTarget), this.currentHighlight.highlight(d));
+  if (null != this.previewElement) {
+    null == this.previewElement.parentNode &&
+      (a.container.appendChild(this.previewElement), this.previewElement.style.zIndex = "3", this.previewElement.style.position = "absolute");
+    var d = this.isGridEnabled() && a.isGridEnabledEvent(b),
+      f = !0;
+    if (null != this.currentGuide && this.currentGuide.isEnabledForEvent(b)) var f = parseInt(this.previewElement.style.width),
+      g = parseInt(this.previewElement.style.height),
+      f = new mxRectangle(0, 0, f, g),
+      c = new mxPoint(e, c),
+      c = this.currentGuide.move(f, c, d),
+      f = !1,
+      e = c.x,
+      c = c.y;
+    else if (d) var d = a.view.scale,
+      g = a.view.translate,
+      h = a.gridSize /
+      2,
+      e = (a.snap(e / d - g.x - h) + g.x) * d,
+      c = (a.snap(c / d - g.y - h) + g.y) * d;
+    null != this.currentGuide && f && this.currentGuide.hide();
+    null != this.previewOffset && (e += this.previewOffset.x, c += this.previewOffset.y);
+    this.previewElement.style.left = Math.round(e) + "px";
+    this.previewElement.style.top = Math.round(c) + "px";
+    this.previewElement.style.visibility = "visible"
+  }
+  this.currentPoint = new mxPoint(e, c)
+};
+mxDragSource.prototype.drop = function(a, b, c, d, e) {
+  this.dropHandler(a, b, c, d, e);
+  a.container.focus()
+};
+
+function mxToolbar(a) {
+  this.container = a
+}
+mxToolbar.prototype = new mxEventSource;
+mxToolbar.prototype.constructor = mxToolbar;
+mxToolbar.prototype.container = null;
+mxToolbar.prototype.enabled = !0;
+mxToolbar.prototype.noReset = !1;
+mxToolbar.prototype.updateDefaultMode = !0;
+mxToolbar.prototype.addItem = function(a, b, c, d, e, f) {
+  var g = document.createElement(null != b ? "img" : "button"),
+    h = e || (null != f ? "mxToolbarMode" : "mxToolbarItem");
+  g.className = h;
+  g.setAttribute("src", b);
+  null != a && (null != b ? g.setAttribute("title", a) : mxUtils.write(g, a));
+  this.container.appendChild(g);
+  null != c && (mxEvent.addListener(g, "click", c), mxClient.IS_TOUCH && mxEvent.addListener(g, "touchend", c));
+  a = mxUtils.bind(this, function(a) {
+    null != d ? g.setAttribute("src", b) : g.style.backgroundColor = ""
+  });
+  mxEvent.addGestureListeners(g,
+    mxUtils.bind(this, function(a) {
+      null != d ? g.setAttribute("src", d) : g.style.backgroundColor = "gray";
+      if (null != f) {
+        null == this.menu && (this.menu = new mxPopupMenu, this.menu.init());
+        var b = this.currentImg;
+        this.menu.isMenuShowing() && this.menu.hideMenu();
+        b != g && (this.currentImg = g, this.menu.factoryMethod = f, b = new mxPoint(g.offsetLeft, g.offsetTop + g.offsetHeight), this.menu.popup(b.x, b.y, null, a), this.menu.isMenuShowing() &&
+          (g.className = h + "Selected", this.menu.hideMenu = function() {
+            mxPopupMenu.prototype.hideMenu.apply(this);
+            g.className = h;
+            this.currentImg = null
+          }))
+      }
+    }), null, a);
+  mxEvent.addListener(g, "mouseout", a);
+  return g
+};
+mxToolbar.prototype.addCombo = function(a) {
+  var b = document.createElement("div");
+  b.style.display = "inline";
+  b.className = "mxToolbarComboContainer";
+  var c = document.createElement("select");
+  c.className = a || "mxToolbarCombo";
+  b.appendChild(c);
+  this.container.appendChild(b);
+  return c
+};
+mxToolbar.prototype.addActionCombo = function(a, b) {
+  var c = document.createElement("select");
+  c.className = b || "mxToolbarCombo";
+  this.addOption(c, a, null);
+  mxEvent.addListener(c, "change", function(a) {
+    var b = c.options[c.selectedIndex];
+    c.selectedIndex = 0;
+    null != b.funct && b.funct(a)
+  });
+  this.container.appendChild(c);
+  return c
+};
+mxToolbar.prototype.addOption = function(a, b, c) {
+  var d = document.createElement("option");
+  mxUtils.writeln(d, b);
+  "function" == typeof c ? d.funct = c : d.setAttribute("value", c);
+  a.appendChild(d);
+  return d
+};
+mxToolbar.prototype.addSwitchMode = function(a, b, c, d, e) {
+  var f = document.createElement("img");
+  f.initialClassName = e || "mxToolbarMode";
+  f.className = f.initialClassName;
+  f.setAttribute("src", b);
+  f.altIcon = d;
+  null != a && f.setAttribute("title", a);
+  mxEvent.addListener(f, "click", mxUtils.bind(this, function(a) {
+    a = this.selectedMode.altIcon;
+    null != a ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", a)) : this.selectedMode.className = this.selectedMode.initialClassName;
+    this.updateDefaultMode &&
+      (this.defaultMode = f);
+    this.selectedMode = f;
+    a = f.altIcon;
+    null != a ? (f.altIcon = f.getAttribute("src"), f.setAttribute("src", a)) : f.className = f.initialClassName + "Selected";
+    this.fireEvent(new mxEventObject(mxEvent.SELECT));
+    c()
+  }));
+  this.container.appendChild(f);
+  null == this.defaultMode && (this.defaultMode = f, this.selectMode(f), c());
+  return f
+};
+mxToolbar.prototype.addMode = function(a, b, c, d, e, f) {
+  f = null != f ? f : !0;
+  var g = document.createElement(null != b ? "img" : "button");
+  g.initialClassName = e || "mxToolbarMode";
+  g.className = g.initialClassName;
+  g.setAttribute("src", b);
+  g.altIcon = d;
+  null != a && g.setAttribute("title", a);
+  this.enabled && f && (mxEvent.addListener(g, "click", mxUtils.bind(this, function(a) {
+      this.selectMode(g, c);
+      this.noReset = !1
+    })), mxEvent.addListener(g, "dblclick", mxUtils.bind(this, function(a) {
+      this.selectMode(g, c);
+      this.noReset = !0
+    })), null == this.defaultMode &&
+    (this.defaultMode = g, this.defaultFunction = c, this.selectMode(g, c)));
+  this.container.appendChild(g);
+  return g
+};
+mxToolbar.prototype.selectMode = function(a, b) {
+  if (this.selectedMode != a) {
+    if (null != this.selectedMode) {
+      var c = this.selectedMode.altIcon;
+      null != c ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", c)) : this.selectedMode.className = this.selectedMode.initialClassName
+    }
+    this.selectedMode = a;
+    c = this.selectedMode.altIcon;
+    null != c ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", c)) : this.selectedMode.className = this.selectedMode.initialClassName +
+      "Selected";
+    this.fireEvent(new mxEventObject(mxEvent.SELECT, "function", b))
+  }
+};
+mxToolbar.prototype.resetMode = function(a) {
+  (a || !this.noReset) && this.selectedMode != this.defaultMode && this.selectMode(this.defaultMode, this.defaultFunction)
+};
+mxToolbar.prototype.addSeparator = function(a) {
+  return this.addItem(null, a, null)
+};
+mxToolbar.prototype.addBreak = function() {
+  mxUtils.br(this.container)
+};
+mxToolbar.prototype.addLine = function() {
+  var a = document.createElement("hr");
+  a.style.marginRight = "6px";
+  a.setAttribute("size", "1");
+  this.container.appendChild(a)
+};
+mxToolbar.prototype.destroy = function() {
+  mxEvent.release(this.container);
+  this.selectedMode = this.defaultFunction = this.defaultMode = this.container = null;
+  null != this.menu && this.menu.destroy()
+};
+
+function mxSession(a, b, c, d) {
+  this.model = a;
+  this.urlInit = b;
+  this.urlPoll = c;
+  this.urlNotify = d;
+  null != a && (this.codec = new mxCodec, this.codec.lookup = function(b) {
+    return a.getCell(b)
+  });
+  a.addListener(mxEvent.NOTIFY, mxUtils.bind(this, function(a, b) {
+    var c = b.getProperty("edit");
+    (null != c && this.debug || this.connected && !this.suspended) && this.notify("\x3cedit\x3e" + this.encodeChanges(c.changes, c.undone) + "\x3c/edit\x3e")
+  }))
+}
+mxSession.prototype = new mxEventSource;
+mxSession.prototype.constructor = mxSession;
+mxSession.prototype.model = null;
+mxSession.prototype.urlInit = null;
+mxSession.prototype.urlPoll = null;
+mxSession.prototype.urlNotify = null;
+mxSession.prototype.codec = null;
+mxSession.prototype.linefeed = "\x26#xa;";
+mxSession.prototype.escapePostData = !0;
+mxSession.prototype.significantRemoteChanges = !0;
+mxSession.prototype.sent = 0;
+mxSession.prototype.received = 0;
+mxSession.prototype.debug = !1;
+mxSession.prototype.connected = !1;
+mxSession.prototype.suspended = !1;
+mxSession.prototype.polling = !1;
+mxSession.prototype.start = function() {
+  this.debug ? (this.connected = !0, this.fireEvent(new mxEventObject(mxEvent.CONNECT))) : this.connected || this.get(this.urlInit, mxUtils.bind(this, function(a) {
+    this.connected = !0;
+    this.fireEvent(new mxEventObject(mxEvent.CONNECT));
+    this.poll()
+  }))
+};
+mxSession.prototype.suspend = function() {
+  this.connected && !this.suspended && (this.suspended = !0, this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))
+};
+mxSession.prototype.resume = function(a, b, c) {
+  this.connected && this.suspended && (this.suspended = !1, this.fireEvent(new mxEventObject(mxEvent.RESUME)), this.polling || this.poll())
+};
+mxSession.prototype.stop = function(a) {
+  this.connected && (this.connected = !1);
+  this.fireEvent(new mxEventObject(mxEvent.DISCONNECT, "reason", a))
+};
+mxSession.prototype.poll = function() {
+  this.connected && !this.suspended && null != this.urlPoll ? (this.polling = !0, this.get(this.urlPoll, mxUtils.bind(this, function() {
+    this.poll()
+  }))) : this.polling = !1
+};
+mxSession.prototype.notify = function(a, b, c) {
+  null != a && 0 < a.length && (null != this.urlNotify && (this.debug ? (mxLog.show(), mxLog.debug("mxSession.notify: " + this.urlNotify + " xml\x3d" + a)) : (a = "\x3cmessage\x3e\x3cdelta\x3e" + a +
+    "\x3c/delta\x3e\x3c/message\x3e", this.escapePostData && (a = encodeURIComponent(a)), mxUtils.post(this.urlNotify, "xml\x3d" + a, b, c))), this.sent += a.length, this.fireEvent(new mxEventObject(
+    mxEvent.NOTIFY, "url", this.urlNotify, "xml", a)))
+};
+mxSession.prototype.get = function(a, b, c) {
+  if ("undefined" != typeof mxUtils) {
+    var d = mxUtils.bind(this, function(a) {
+      null != c ? c(a) : this.stop(a)
+    });
+    mxUtils.get(a, mxUtils.bind(this, function(c) {
+        if ("undefined" != typeof mxUtils)
+          if (c.isReady() && 404 != c.getStatus()) {
+            if (this.received += c.getText().length, this.fireEvent(new mxEventObject(mxEvent.GET, "url", a, "request", c)), this.isValidResponse(c)) {
+              if (0 < c.getText().length) {
+                var f = c.getDocumentElement();
+                null == f ? d("Invalid response: " + c.getText()) : this.receive(f)
+              }
+              null != b && b(c)
+            }
+          } else d("Response not ready")
+      }),
+      function(a) {
+        d("Transmission error")
+      })
+  }
+};
+mxSession.prototype.isValidResponse = function(a) {
+  return 0 > a.getText().indexOf("\x3c?php")
+};
+mxSession.prototype.encodeChanges = function(a, b) {
+  for (var c = "", d = b ? -1 : 1, e = b ? a.length - 1 : 0; 0 <= e && e < a.length; e += d) var f = this.codec.encode(a[e]),
+    c = c + mxUtils.getXml(f, this.linefeed);
+  return c
+};
+mxSession.prototype.receive = function(a) {
+  if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) {
+    var b = a.getAttribute("namespace");
+    null != b && (this.model.prefix = b + "-");
+    for (b = a.firstChild; null != b;) {
+      var c = b.nodeName.toLowerCase();
+      "state" == c ? this.processState(b) : "delta" == c && this.processDelta(b);
+      b = b.nextSibling
+    }
+    this.fireEvent(new mxEventObject(mxEvent.RECEIVE, "node", a))
+  }
+};
+mxSession.prototype.processState = function(a) {
+  (new mxCodec(a.ownerDocument)).decode(a.firstChild, this.model)
+};
+mxSession.prototype.processDelta = function(a) {
+  for (a = a.firstChild; null != a;) "edit" == a.nodeName && this.processEdit(a), a = a.nextSibling
+};
+mxSession.prototype.processEdit = function(a) {
+  a = this.decodeChanges(a);
+  if (0 < a.length) {
+    var b = this.createUndoableEdit(a);
+    this.model.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", b, "changes", a));
+    this.model.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", b));
+    this.fireEvent(new mxEventObject(mxEvent.FIRED, "edit", b))
+  }
+};
+mxSession.prototype.createUndoableEdit = function(a) {
+  var b = new mxUndoableEdit(this.model, this.significantRemoteChanges);
+  b.changes = a;
+  b.notify = function() {
+    b.source.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", b, "changes", b.changes));
+    b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY, "edit", b, "changes", b.changes))
+  };
+  return b
+};
+mxSession.prototype.decodeChanges = function(a) {
+  this.codec.document = a.ownerDocument;
+  var b = [];
+  for (a = a.firstChild; null != a;) {
+    var c = this.decodeChange(a);
+    null != c && b.push(c);
+    a = a.nextSibling
+  }
+  return b
+};
+mxSession.prototype.decodeChange = function(a) {
+  var b = null;
+  a.nodeType == mxConstants.NODETYPE_ELEMENT && (b = "mxRootChange" == a.nodeName ? (new mxCodec(a.ownerDocument)).decode(a) : this.codec.decode(a), null != b && (b.model = this.model, b.execute(),
+    "mxChildChange" == a.nodeName && null == b.parent && this.cellRemoved(b.child)));
+  return b
+};
+mxSession.prototype.cellRemoved = function(a, b) {
+  this.codec.putObject(a.getId(), a);
+  for (var c = this.model.getChildCount(a), d = 0; d < c; d++) this.cellRemoved(this.model.getChildAt(a, d))
+};
+
+function mxUndoableEdit(a, b) {
+  this.source = a;
+  this.changes = [];
+  this.significant = null != b ? b : !0
+}
+mxUndoableEdit.prototype.source = null;
+mxUndoableEdit.prototype.changes = null;
+mxUndoableEdit.prototype.significant = null;
+mxUndoableEdit.prototype.undone = !1;
+mxUndoableEdit.prototype.redone = !1;
+mxUndoableEdit.prototype.isEmpty = function() {
+  return 0 == this.changes.length
+};
+mxUndoableEdit.prototype.isSignificant = function() {
+  return this.significant
+};
+mxUndoableEdit.prototype.add = function(a) {
+  this.changes.push(a)
+};
+mxUndoableEdit.prototype.notify = function() {};
+mxUndoableEdit.prototype.die = function() {};
+mxUndoableEdit.prototype.undo = function() {
+  if (!this.undone) {
+    this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));
+    for (var a = this.changes.length - 1; 0 <= a; a--) {
+      var b = this.changes[a];
+      null != b.execute ? b.execute() : null != b.undo && b.undo();
+      this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", b))
+    }
+    this.undone = !0;
+    this.redone = !1;
+    this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))
+  }
+  this.notify()
+};
+mxUndoableEdit.prototype.redo = function() {
+  if (!this.redone) {
+    this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));
+    for (var a = this.changes.length, b = 0; b < a; b++) {
+      var c = this.changes[b];
+      null != c.execute ? c.execute() : null != c.redo && c.redo();
+      this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", c))
+    }
+    this.undone = !1;
+    this.redone = !0;
+    this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))
+  }
+  this.notify()
+};
+
+function mxUndoManager(a) {
+  this.size = null != a ? a : 100;
+  this.clear()
+}
+mxUndoManager.prototype = new mxEventSource;
+mxUndoManager.prototype.constructor = mxUndoManager;
+mxUndoManager.prototype.size = null;
+mxUndoManager.prototype.history = null;
+mxUndoManager.prototype.indexOfNextAdd = 0;
+mxUndoManager.prototype.isEmpty = function() {
+  return 0 == this.history.length
+};
+mxUndoManager.prototype.clear = function() {
+  this.history = [];
+  this.indexOfNextAdd = 0;
+  this.fireEvent(new mxEventObject(mxEvent.CLEAR))
+};
+mxUndoManager.prototype.canUndo = function() {
+  return 0 < this.indexOfNextAdd
+};
+mxUndoManager.prototype.undo = function() {
+  for (; 0 < this.indexOfNextAdd;) {
+    var a = this.history[--this.indexOfNextAdd];
+    a.undo();
+    if (a.isSignificant()) {
+      this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", a));
+      break
+    }
+  }
+};
+mxUndoManager.prototype.canRedo = function() {
+  return this.indexOfNextAdd < this.history.length
+};
+mxUndoManager.prototype.redo = function() {
+  for (var a = this.history.length; this.indexOfNextAdd < a;) {
+    var b = this.history[this.indexOfNextAdd++];
+    b.redo();
+    if (b.isSignificant()) {
+      this.fireEvent(new mxEventObject(mxEvent.REDO, "edit", b));
+      break
+    }
+  }
+};
+mxUndoManager.prototype.undoableEditHappened = function(a) {
+  this.trim();
+  0 < this.size && this.size == this.history.length && this.history.shift();
+  this.history.push(a);
+  this.indexOfNextAdd = this.history.length;
+  this.fireEvent(new mxEventObject(mxEvent.ADD, "edit", a))
+};
+mxUndoManager.prototype.trim = function() {
+  if (this.history.length > this.indexOfNextAdd)
+    for (var a = this.history.splice(this.indexOfNextAdd, this.history.length - this.indexOfNextAdd), b = 0; b < a.length; b++) a[b].die()
+};
+var mxUrlConverter = function(a) {
+  var b = !0,
+    c = null,
+    d = null;
+  return {
+    isEnabled: function() {
+      return b
+    },
+    setEnabled: function(a) {
+      b = a
+    },
+    getBaseUrl: function() {
+      return c
+    },
+    setBaseUrl: function(a) {
+      c = a
+    },
+    getBaseDomain: function() {
+      return c
+    },
+    setBaseDomain: function(a) {
+      c = a
+    },
+    isRelativeUrl: function(a) {
+      return "http://" != a.substring(0, 7) && "https://" != a.substring(0, 8) && "data:image" != a.substring(0, 10)
+    },
+    convert: function(a) {
+      if (b && this.isRelativeUrl(a)) {
+        if (null == c) {
+          d = location.protocol + "//" + location.host;
+          c = d + location.pathname;
+          var f = c.lastIndexOf("/");
+          0 < f && (c = c.substring(0, f + 1))
+        }
+        a = "/" == a.charAt(0) ? d + a : c + a
+      }
+      return a
+    }
+  }
+};
+
+function mxPanningManager(a) {
+  this.thread = null;
+  this.active = !1;
+  this.dy = this.dx = this.t0y = this.t0x = this.tdy = this.tdx = 0;
+  this.scrollbars = !1;
+  this.scrollTop = this.scrollLeft = 0;
+  this.mouseListener = {
+    mouseDown: function(a, b) {},
+    mouseMove: function(a, b) {},
+    mouseUp: mxUtils.bind(this, function(a, b) {
+      this.active && this.stop()
+    })
+  };
+  a.addMouseListener(this.mouseListener);
+  mxEvent.addListener(document, "mouseup", mxUtils.bind(this, function() {
+    this.active && this.stop()
+  }));
+  var b = mxUtils.bind(this, function() {
+    this.scrollbars = mxUtils.hasScrollbars(a.container);
+    this.scrollLeft = a.container.scrollLeft;
+    this.scrollTop = a.container.scrollTop;
+    return window.setInterval(mxUtils.bind(this, function() {
+      this.tdx -= this.dx;
+      this.tdy -= this.dy;
+      if (this.scrollbars) {
+        var b = -a.container.scrollLeft - Math.ceil(this.dx),
+          d = -a.container.scrollTop - Math.ceil(this.dy);
+        a.panGraph(b, d);
+        a.panDx = this.scrollLeft - a.container.scrollLeft;
+        a.panDy = this.scrollTop - a.container.scrollTop;
+        a.fireEvent(new mxEventObject(mxEvent.PAN))
+      } else a.panGraph(this.getDx(), this.getDy())
+    }), this.delay)
+  });
+  this.isActive =
+    function() {
+      return active
+    };
+  this.getDx = function() {
+    return Math.round(this.tdx)
+  };
+  this.getDy = function() {
+    return Math.round(this.tdy)
+  };
+  this.start = function() {
+    this.t0x = a.view.translate.x;
+    this.t0y = a.view.translate.y;
+    this.active = !0
+  };
+  this.panTo = function(c, d, e, f) {
+    this.active || this.start();
+    this.scrollLeft = a.container.scrollLeft;
+    this.scrollTop = a.container.scrollTop;
+    f = null != f ? f : 0;
+    var g = a.container;
+    this.dx = c + (null != e ? e : 0) - g.scrollLeft - g.clientWidth;
+    0 > this.dx && Math.abs(this.dx) < this.border ? this.dx = this.border + this.dx :
+      this.dx = this.handleMouseOut ? Math.max(this.dx, 0) : 0;
+    0 == this.dx && (this.dx = c - g.scrollLeft, this.dx = 0 < this.dx && this.dx < this.border ? this.dx - this.border : this.handleMouseOut ? Math.min(0, this.dx) : 0);
+    this.dy = d + f - g.scrollTop - g.clientHeight;
+    0 > this.dy && Math.abs(this.dy) < this.border ? this.dy = this.border + this.dy : this.dy = this.handleMouseOut ? Math.max(this.dy, 0) : 0;
+    0 == this.dy && (this.dy = d - g.scrollTop, this.dy = 0 < this.dy && this.dy < this.border ? this.dy - this.border : this.handleMouseOut ? Math.min(0, this.dy) : 0);
+    0 != this.dx || 0 != this.dy ?
+      (this.dx *= this.damper, this.dy *= this.damper, null == this.thread && (this.thread = b())) : null != this.thread && (window.clearInterval(this.thread), this.thread = null)
+  };
+  this.stop = function() {
+    if (this.active)
+      if (this.active = !1, null != this.thread && (window.clearInterval(this.thread), this.thread = null), this.tdy = this.tdx = 0, this.scrollbars) a.panDx = 0, a.panDy = 0, a.fireEvent(new mxEventObject(
+        mxEvent.PAN));
+      else {
+        var b = a.panDx,
+          d = a.panDy;
+        if (0 != b || 0 != d) a.panGraph(0, 0), a.view.setTranslate(this.t0x + b / a.view.scale, this.t0y + d / a.view.scale)
+      }
+  };
+  this.destroy = function() {
+    a.removeMouseListener(this.mouseListener)
+  }
+}
+mxPanningManager.prototype.damper = 1 / 6;
+mxPanningManager.prototype.delay = 10;
+mxPanningManager.prototype.handleMouseOut = !0;
+mxPanningManager.prototype.border = 0;
+
+function mxPopupMenu(a) {
+  this.factoryMethod = a;
+  null != a && this.init()
+}
+mxPopupMenu.prototype = new mxEventSource;
+mxPopupMenu.prototype.constructor = mxPopupMenu;
+mxPopupMenu.prototype.submenuImage = mxClient.imageBasePath + "/submenu.gif";
+mxPopupMenu.prototype.zIndex = 10006;
+mxPopupMenu.prototype.factoryMethod = null;
+mxPopupMenu.prototype.useLeftButtonForPopup = !1;
+mxPopupMenu.prototype.enabled = !0;
+mxPopupMenu.prototype.itemCount = 0;
+mxPopupMenu.prototype.autoExpand = !1;
+mxPopupMenu.prototype.smartSeparators = !1;
+mxPopupMenu.prototype.labels = !0;
+mxPopupMenu.prototype.init = function() {
+  this.table = document.createElement("table");
+  this.table.className = "mxPopupMenu";
+  this.tbody = document.createElement("tbody");
+  this.table.appendChild(this.tbody);
+  this.div = document.createElement("div");
+  this.div.className = "mxPopupMenu";
+  this.div.style.display = "inline";
+  this.div.style.zIndex = this.zIndex;
+  this.div.appendChild(this.table);
+  mxEvent.disableContextMenu(this.div)
+};
+mxPopupMenu.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxPopupMenu.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxPopupMenu.prototype.isPopupTrigger = function(a) {
+  return a.isPopupTrigger() || this.useLeftButtonForPopup && mxEvent.isLeftMouseButton(a.getEvent())
+};
+mxPopupMenu.prototype.addItem = function(a, b, c, d, e, f) {
+  d = d || this;
+  this.itemCount++;
+  d.willAddSeparator && (d.containsItems && this.addSeparator(d, !0), d.willAddSeparator = !1);
+  d.containsItems = !0;
+  var g = document.createElement("tr");
+  g.className = "mxPopupMenuItem";
+  var h = document.createElement("td");
+  h.className = "mxPopupMenuIcon";
+  null != b ? (e = document.createElement("img"), e.src = b, h.appendChild(e)) : null != e && (b = document.createElement("div"), b.className = e, h.appendChild(b));
+  g.appendChild(h);
+  this.labels && (h = document.createElement("td"),
+    h.className = "mxPopupMenuItem" + (null != f && !f ? " disabled" : ""), mxUtils.write(h, a), h.align = "left", g.appendChild(h), a = document.createElement("td"), a.className =
+    "mxPopupMenuItem" + (null != f && !f ? " disabled" : ""), a.style.paddingRight = "6px", a.style.textAlign = "right", g.appendChild(a), null == d.div && this.createSubmenu(d));
+  d.tbody.appendChild(g);
+  if (null == f || f) mxEvent.addGestureListeners(g, mxUtils.bind(this, function(a) {
+    this.eventReceiver = g;
+    d.activeRow != g && d.activeRow != d && (null != d.activeRow && null != d.activeRow.div.parentNode &&
+      this.hideSubmenu(d), null != g.div && (this.showSubmenu(d, g), d.activeRow = g));
+    mxEvent.consume(a)
+  }), mxUtils.bind(this, function(a) {
+    d.activeRow != g && d.activeRow != d && (null != d.activeRow && null != d.activeRow.div.parentNode && this.hideSubmenu(d), this.autoExpand && null != g.div && (this.showSubmenu(d, g), d.activeRow =
+      g));
+    g.className = "mxPopupMenuItemHover"
+  }), mxUtils.bind(this, function(a) {
+    this.eventReceiver == g && (d.activeRow != g && this.hideMenu(), null != c && c(a));
+    this.eventReceiver = null;
+    mxEvent.consume(a)
+  })), mxEvent.addListener(g,
+    "mouseout", mxUtils.bind(this, function(a) {
+      g.className = "mxPopupMenuItem"
+    }));
+  return g
+};
+mxPopupMenu.prototype.createSubmenu = function(a) {
+  a.table = document.createElement("table");
+  a.table.className = "mxPopupMenu";
+  a.tbody = document.createElement("tbody");
+  a.table.appendChild(a.tbody);
+  a.div = document.createElement("div");
+  a.div.className = "mxPopupMenu";
+  a.div.style.position = "absolute";
+  a.div.style.display = "inline";
+  a.div.style.zIndex = this.zIndex;
+  a.div.appendChild(a.table);
+  var b = document.createElement("img");
+  b.setAttribute("src", this.submenuImage);
+  td = a.firstChild.nextSibling.nextSibling;
+  td.appendChild(b)
+};
+mxPopupMenu.prototype.showSubmenu = function(a, b) {
+  if (null != b.div) {
+    b.div.style.left = a.div.offsetLeft + b.offsetLeft + b.offsetWidth - 1 + "px";
+    b.div.style.top = a.div.offsetTop + b.offsetTop + "px";
+    document.body.appendChild(b.div);
+    var c = parseInt(b.div.offsetLeft),
+      d = parseInt(b.div.offsetWidth),
+      e = document.body,
+      f = document.documentElement;
+    if (c + d > (e.scrollLeft || f.scrollLeft) + (e.clientWidth || f.clientWidth)) b.div.style.left = a.div.offsetLeft - d + (mxClient.IS_IE ? 6 : -6) + "px";
+    mxUtils.fit(b.div)
+  }
+};
+mxPopupMenu.prototype.addSeparator = function(a, b) {
+  a = a || this;
+  if (this.smartSeparators && !b) a.willAddSeparator = !0;
+  else if (null != a.tbody) {
+    a.willAddSeparator = !1;
+    var c = document.createElement("tr"),
+      d = document.createElement("td");
+    d.className = "mxPopupMenuIcon";
+    d.style.padding = "0 0 0 0px";
+    c.appendChild(d);
+    d = document.createElement("td");
+    d.style.padding = "0 0 0 0px";
+    d.setAttribute("colSpan", "2");
+    var e = document.createElement("hr");
+    e.setAttribute("size", "1");
+    d.appendChild(e);
+    c.appendChild(d);
+    a.tbody.appendChild(c)
+  }
+};
+mxPopupMenu.prototype.popup = function(a, b, c, d) {
+  if (null != this.div && null != this.tbody && null != this.factoryMethod) {
+    this.div.style.left = a + "px";
+    for (this.div.style.top = b + "px"; null != this.tbody.firstChild;) mxEvent.release(this.tbody.firstChild), this.tbody.removeChild(this.tbody.firstChild);
+    this.itemCount = 0;
+    this.factoryMethod(this, c, d);
+    0 < this.itemCount && (this.showMenu(), this.fireEvent(new mxEventObject(mxEvent.SHOW)))
+  }
+};
+mxPopupMenu.prototype.isMenuShowing = function() {
+  return null != this.div && this.div.parentNode == document.body
+};
+mxPopupMenu.prototype.showMenu = function() {
+  9 <= document.documentMode && (this.div.style.filter = "none");
+  document.body.appendChild(this.div);
+  mxUtils.fit(this.div)
+};
+mxPopupMenu.prototype.hideMenu = function() {
+  null != this.div && (null != this.div.parentNode && this.div.parentNode.removeChild(this.div), this.hideSubmenu(this), this.containsItems = !1)
+};
+mxPopupMenu.prototype.hideSubmenu = function(a) {
+  null != a.activeRow && (this.hideSubmenu(a.activeRow), null != a.activeRow.div.parentNode && a.activeRow.div.parentNode.removeChild(a.activeRow.div), a.activeRow = null)
+};
+mxPopupMenu.prototype.destroy = function() {
+  null != this.div && (mxEvent.release(this.div), null != this.div.parentNode && this.div.parentNode.removeChild(this.div), this.div = null)
+};
+
+function mxAutoSaveManager(a) {
+  this.changeHandler = mxUtils.bind(this, function(a, c) {
+    this.isEnabled() && this.graphModelChanged(c.getProperty("edit").changes)
+  });
+  this.setGraph(a)
+}
+mxAutoSaveManager.prototype = new mxEventSource;
+mxAutoSaveManager.prototype.constructor = mxAutoSaveManager;
+mxAutoSaveManager.prototype.graph = null;
+mxAutoSaveManager.prototype.autoSaveDelay = 10;
+mxAutoSaveManager.prototype.autoSaveThrottle = 2;
+mxAutoSaveManager.prototype.autoSaveThreshold = 5;
+mxAutoSaveManager.prototype.ignoredChanges = 0;
+mxAutoSaveManager.prototype.lastSnapshot = 0;
+mxAutoSaveManager.prototype.enabled = !0;
+mxAutoSaveManager.prototype.changeHandler = null;
+mxAutoSaveManager.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxAutoSaveManager.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxAutoSaveManager.prototype.setGraph = function(a) {
+  null != this.graph && this.graph.getModel().removeListener(this.changeHandler);
+  this.graph = a;
+  null != this.graph && this.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler)
+};
+mxAutoSaveManager.prototype.save = function() {};
+mxAutoSaveManager.prototype.graphModelChanged = function(a) {
+  a = ((new Date).getTime() - this.lastSnapshot) / 1E3;
+  a > this.autoSaveDelay || this.ignoredChanges >= this.autoSaveThreshold && a > this.autoSaveThrottle ? (this.save(), this.reset()) : this.ignoredChanges++
+};
+mxAutoSaveManager.prototype.reset = function() {
+  this.lastSnapshot = (new Date).getTime();
+  this.ignoredChanges = 0
+};
+mxAutoSaveManager.prototype.destroy = function() {
+  this.setGraph(null)
+};
+
+function mxAnimation(a) {
+  this.delay = null != a ? a : 20
+}
+mxAnimation.prototype = new mxEventSource;
+mxAnimation.prototype.constructor = mxAnimation;
+mxAnimation.prototype.delay = null;
+mxAnimation.prototype.thread = null;
+mxAnimation.prototype.startAnimation = function() {
+  null == this.thread && (this.thread = window.setInterval(mxUtils.bind(this, this.updateAnimation), this.delay))
+};
+mxAnimation.prototype.updateAnimation = function() {
+  this.fireEvent(new mxEventObject(mxEvent.EXECUTE))
+};
+mxAnimation.prototype.stopAnimation = function() {
+  null != this.thread && (window.clearInterval(this.thread), this.thread = null, this.fireEvent(new mxEventObject(mxEvent.DONE)))
+};
+
+function mxMorphing(a, b, c, d) {
+  mxAnimation.call(this, d);
+  this.graph = a;
+  this.steps = null != b ? b : 6;
+  this.ease = null != c ? c : 1.5
+}
+mxMorphing.prototype = new mxAnimation;
+mxMorphing.prototype.constructor = mxMorphing;
+mxMorphing.prototype.graph = null;
+mxMorphing.prototype.steps = null;
+mxMorphing.prototype.step = 0;
+mxMorphing.prototype.ease = null;
+mxMorphing.prototype.cells = null;
+mxMorphing.prototype.updateAnimation = function() {
+  var a = new mxCellStatePreview(this.graph);
+  if (null != this.cells)
+    for (var b = 0; b < this.cells.length; b++) this.animateCell(cells[b], a, !1);
+  else this.animateCell(this.graph.getModel().getRoot(), a, !0);
+  this.show(a);
+  (a.isEmpty() || this.step++ >= this.steps) && this.stopAnimation()
+};
+mxMorphing.prototype.show = function(a) {
+  a.show()
+};
+mxMorphing.prototype.animateCell = function(a, b, c) {
+  var d = this.graph.getView().getState(a),
+    e = null;
+  if (null != d && (e = this.getDelta(d), this.graph.getModel().isVertex(a) && (0 != e.x || 0 != e.y))) {
+    var f = this.graph.view.getTranslate(),
+      g = this.graph.view.getScale();
+    e.x += f.x * g;
+    e.y += f.y * g;
+    b.moveState(d, -e.x / this.ease, -e.y / this.ease)
+  }
+  if (c && !this.stopRecursion(d, e)) {
+    d = this.graph.getModel().getChildCount(a);
+    for (e = 0; e < d; e++) this.animateCell(this.graph.getModel().getChildAt(a, e), b, c)
+  }
+};
+mxMorphing.prototype.stopRecursion = function(a, b) {
+  return null != b && (0 != b.x || 0 != b.y)
+};
+mxMorphing.prototype.getDelta = function(a) {
+  var b = this.getOriginForCell(a.cell),
+    c = this.graph.getView().getTranslate(),
+    d = this.graph.getView().getScale();
+  a = new mxPoint(a.x / d - c.x, a.y / d - c.y);
+  return new mxPoint((b.x - a.x) * d, (b.y - a.y) * d)
+};
+mxMorphing.prototype.getOriginForCell = function(a) {
+  var b = null;
+  null != a && (b = this.getOriginForCell(this.graph.getModel().getParent(a)), a = this.graph.getCellGeometry(a), null != a && (b.x += a.x, b.y += a.y));
+  null == b && (b = this.graph.view.getTranslate(), b = new mxPoint(-b.x, -b.y));
+  return b
+};
+
+function mxImageBundle(a) {
+  this.images = [];
+  this.alt = null != a ? a : !1
+}
+mxImageBundle.prototype.images = null;
+mxImageBundle.prototype.images = null;
+mxImageBundle.prototype.putImage = function(a, b, c) {
+  this.images[a] = {
+    value: b,
+    fallback: c
+  }
+};
+mxImageBundle.prototype.getImage = function(a) {
+  var b = null;
+  null != a && (a = this.images[a], null != a && (b = this.alt ? a.fallback : a.value));
+  return b
+};
+
+function mxImageExport() {}
+mxImageExport.prototype.includeOverlays = !1;
+mxImageExport.prototype.drawState = function(a, b) {
+  null != a && (this.visitStatesRecursive(a, b, this.drawCellState), this.includeOverlays && this.visitStatesRecursive(a, b, this.drawOverlays))
+};
+mxImageExport.prototype.visitStatesRecursive = function(a, b, c) {
+  if (null != a) {
+    c(a, b);
+    for (var d = a.view.graph, e = d.model.getChildCount(a.cell), f = 0; f < e; f++) {
+      var g = d.view.getState(d.model.getChildAt(a.cell, f));
+      this.visitStatesRecursive(g, b, c)
+    }
+  }
+};
+mxImageExport.prototype.drawCellState = function(a, b) {
+  a.shape instanceof mxShape && (b.save(), a.shape.paint(b), b.restore());
+  null != a.text && (b.save(), a.text.paint(b), b.restore())
+};
+mxImageExport.prototype.drawOverlays = function(a, b) {
+  null != a.overlays && a.overlays.visit(function(a, d) {
+    d instanceof mxShape && d.paint(b)
+  })
+};
+
+function mxAbstractCanvas2D() {
+  this.converter = this.createUrlConverter();
+  this.reset()
+}
+mxAbstractCanvas2D.prototype.state = null;
+mxAbstractCanvas2D.prototype.states = null;
+mxAbstractCanvas2D.prototype.path = null;
+mxAbstractCanvas2D.prototype.rotateHtml = !0;
+mxAbstractCanvas2D.prototype.lastX = 0;
+mxAbstractCanvas2D.prototype.lastY = 0;
+mxAbstractCanvas2D.prototype.moveOp = "M";
+mxAbstractCanvas2D.prototype.lineOp = "L";
+mxAbstractCanvas2D.prototype.quadOp = "Q";
+mxAbstractCanvas2D.prototype.curveOp = "C";
+mxAbstractCanvas2D.prototype.closeOp = "Z";
+mxAbstractCanvas2D.prototype.pointerEvents = !1;
+mxAbstractCanvas2D.prototype.createUrlConverter = function() {
+  return new mxUrlConverter
+};
+mxAbstractCanvas2D.prototype.reset = function() {
+  this.state = this.createState();
+  this.states = []
+};
+mxAbstractCanvas2D.prototype.createState = function() {
+  return {
+    dx: 0,
+    dy: 0,
+    scale: 1,
+    alpha: 1,
+    fillColor: null,
+    fillAlpha: 1,
+    gradientColor: null,
+    gradientAlpha: 1,
+    gradientDirection: null,
+    strokeColor: null,
+    strokeWidth: 1,
+    dashed: !1,
+    dashPattern: "3 3",
+    lineCap: "flat",
+    lineJoin: "miter",
+    miterLimit: 10,
+    fontColor: "#000000",
+    fontBackgroundColor: null,
+    fontBorderColor: null,
+    fontSize: mxConstants.DEFAULT_FONTSIZE,
+    fontFamily: mxConstants.DEFAULT_FONTFAMILY,
+    fontStyle: 0,
+    shadow: !1,
+    shadowColor: mxConstants.SHADOWCOLOR,
+    shadowAlpha: mxConstants.SHADOW_OPACITY,
+    shadowDx: mxConstants.SHADOW_OFFSET_X,
+    shadowDy: mxConstants.SHADOW_OFFSET_Y,
+    rotation: 0,
+    rotationCx: 0,
+    rotationCy: 0
+  }
+};
+mxAbstractCanvas2D.prototype.format = function(a) {
+  return Math.round(parseFloat(a))
+};
+mxAbstractCanvas2D.prototype.addOp = function() {
+  if (null != this.path && (this.path.push(arguments[0]), 2 < arguments.length))
+    for (var a = this.state, b = 2; b < arguments.length; b += 2) this.lastX = arguments[b - 1], this.lastY = arguments[b], this.path.push(this.format((this.lastX + a.dx) * a.scale)), this.path.push(
+      this.format((this.lastY + a.dy) * a.scale))
+};
+mxAbstractCanvas2D.prototype.rotatePoint = function(a, b, c, d, e) {
+  c *= Math.PI / 180;
+  return mxUtils.getRotatedPoint(new mxPoint(a, b), Math.cos(c), Math.sin(c), new mxPoint(d, e))
+};
+mxAbstractCanvas2D.prototype.save = function() {
+  this.states.push(this.state);
+  this.state = mxUtils.clone(this.state)
+};
+mxAbstractCanvas2D.prototype.restore = function() {
+  this.state = this.states.pop()
+};
+mxAbstractCanvas2D.prototype.scale = function(a) {
+  this.state.scale *= a;
+  this.state.strokeWidth *= a
+};
+mxAbstractCanvas2D.prototype.translate = function(a, b) {
+  this.state.dx += a;
+  this.state.dy += b
+};
+mxAbstractCanvas2D.prototype.setAlpha = function(a) {
+  this.state.alpha = a
+};
+mxAbstractCanvas2D.prototype.setFillColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  this.state.fillColor = a;
+  this.state.gradientColor = null
+};
+mxAbstractCanvas2D.prototype.setGradient = function(a, b, c, d, e, f, g, h, k) {
+  c = this.state;
+  c.fillColor = a;
+  c.fillAlpha = null != h ? h : 1;
+  c.gradientColor = b;
+  c.gradientAlpha = null != k ? k : 1;
+  c.gradientDirection = g
+};
+mxAbstractCanvas2D.prototype.setStrokeColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  this.state.strokeColor = a
+};
+mxAbstractCanvas2D.prototype.setStrokeWidth = function(a) {
+  this.state.strokeWidth = a
+};
+mxAbstractCanvas2D.prototype.setDashed = function(a) {
+  this.state.dashed = a
+};
+mxAbstractCanvas2D.prototype.setDashPattern = function(a) {
+  this.state.dashPattern = a
+};
+mxAbstractCanvas2D.prototype.setLineCap = function(a) {
+  this.state.lineCap = a
+};
+mxAbstractCanvas2D.prototype.setLineJoin = function(a) {
+  this.state.lineJoin = a
+};
+mxAbstractCanvas2D.prototype.setMiterLimit = function(a) {
+  this.state.miterLimit = a
+};
+mxAbstractCanvas2D.prototype.setFontColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  this.state.fontColor = a
+};
+mxAbstractCanvas2D.prototype.setFontBackgroundColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  this.state.fontBackgroundColor = a
+};
+mxAbstractCanvas2D.prototype.setFontBorderColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  this.state.fontBorderColor = a
+};
+mxAbstractCanvas2D.prototype.setFontSize = function(a) {
+  this.state.fontSize = a
+};
+mxAbstractCanvas2D.prototype.setFontFamily = function(a) {
+  this.state.fontFamily = a
+};
+mxAbstractCanvas2D.prototype.setFontStyle = function(a) {
+  null == a && (a = 0);
+  this.state.fontStyle = a
+};
+mxAbstractCanvas2D.prototype.setShadow = function(a) {
+  this.state.shadow = a
+};
+mxAbstractCanvas2D.prototype.setShadowColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  this.state.shadowColor = a
+};
+mxAbstractCanvas2D.prototype.setShadowAlpha = function(a) {
+  this.state.shadowAlpha = a
+};
+mxAbstractCanvas2D.prototype.setShadowOffset = function(a, b) {
+  this.state.shadowDx = a;
+  this.state.shadowDy = b
+};
+mxAbstractCanvas2D.prototype.begin = function() {
+  this.lastY = this.lastX = 0;
+  this.path = []
+};
+mxAbstractCanvas2D.prototype.moveTo = function(a, b) {
+  this.addOp(this.moveOp, a, b)
+};
+mxAbstractCanvas2D.prototype.lineTo = function(a, b) {
+  this.addOp(this.lineOp, a, b)
+};
+mxAbstractCanvas2D.prototype.quadTo = function(a, b, c, d) {
+  this.addOp(this.quadOp, a, b, c, d)
+};
+mxAbstractCanvas2D.prototype.curveTo = function(a, b, c, d, e, f) {
+  this.addOp(this.curveOp, a, b, c, d, e, f)
+};
+mxAbstractCanvas2D.prototype.arcTo = function(a, b, c, d, e, f, g) {
+  a = mxUtils.arcToCurves(this.lastX, this.lastY, a, b, c, d, e, f, g);
+  for (b = 0; b < a.length; b += 6) this.curveTo(a[b], a[b + 1], a[b + 2], a[b + 3], a[b + 4], a[b + 5])
+};
+mxAbstractCanvas2D.prototype.close = function(a, b, c, d, e, f) {
+  this.addOp(this.closeOp)
+};
+mxAbstractCanvas2D.prototype.end = function() {};
+
+function mxXmlCanvas2D(a) {
+  mxAbstractCanvas2D.call(this);
+  this.root = a;
+  this.writeDefaults()
+}
+mxUtils.extend(mxXmlCanvas2D, mxAbstractCanvas2D);
+mxXmlCanvas2D.prototype.textEnabled = !0;
+mxXmlCanvas2D.prototype.compressed = !0;
+mxXmlCanvas2D.prototype.writeDefaults = function() {
+  var a;
+  a = this.createElement("fontfamily");
+  a.setAttribute("family", mxConstants.DEFAULT_FONTFAMILY);
+  this.root.appendChild(a);
+  a = this.createElement("fontsize");
+  a.setAttribute("size", mxConstants.DEFAULT_FONTSIZE);
+  this.root.appendChild(a);
+  a = this.createElement("shadowcolor");
+  a.setAttribute("color", mxConstants.SHADOWCOLOR);
+  this.root.appendChild(a);
+  a = this.createElement("shadowalpha");
+  a.setAttribute("alpha", mxConstants.SHADOW_OPACITY);
+  this.root.appendChild(a);
+  a = this.createElement("shadowoffset");
+  a.setAttribute("dx", mxConstants.SHADOW_OFFSET_X);
+  a.setAttribute("dy", mxConstants.SHADOW_OFFSET_Y);
+  this.root.appendChild(a)
+};
+mxXmlCanvas2D.prototype.format = function(a) {
+  return parseFloat(parseFloat(a).toFixed(2))
+};
+mxXmlCanvas2D.prototype.createElement = function(a) {
+  return this.root.ownerDocument.createElement(a)
+};
+mxXmlCanvas2D.prototype.save = function() {
+  this.compressed && mxAbstractCanvas2D.prototype.save.apply(this, arguments);
+  this.root.appendChild(this.createElement("save"))
+};
+mxXmlCanvas2D.prototype.restore = function() {
+  this.compressed && mxAbstractCanvas2D.prototype.restore.apply(this, arguments);
+  this.root.appendChild(this.createElement("restore"))
+};
+mxXmlCanvas2D.prototype.scale = function(a) {
+  if (this.compressed) {
+    if (this.state.scale == a) return;
+    mxAbstractCanvas2D.prototype.setAlpha.apply(this, arguments)
+  }
+  var b = this.createElement("scale");
+  b.setAttribute("scale", a);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.translate = function(a, b) {
+  var c = this.createElement("translate");
+  c.setAttribute("dx", this.format(a));
+  c.setAttribute("dy", this.format(b));
+  this.root.appendChild(c)
+};
+mxXmlCanvas2D.prototype.rotate = function(a, b, c, d, e) {
+  var f = this.createElement("rotate");
+  if (0 != a || b || c) f.setAttribute("theta", this.format(a)), f.setAttribute("flipH", b ? "1" : "0"), f.setAttribute("flipV", c ? "1" : "0"), f.setAttribute("cx", this.format(d)), f.setAttribute(
+    "cy", this.format(e)), this.root.appendChild(f)
+};
+mxXmlCanvas2D.prototype.setAlpha = function(a) {
+  if (this.compressed) {
+    if (this.state.alpha == a) return;
+    mxAbstractCanvas2D.prototype.setAlpha.apply(this, arguments)
+  }
+  var b = this.createElement("alpha");
+  b.setAttribute("alpha", this.format(a));
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setFillColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  if (this.compressed) {
+    if (this.state.fillColor == a) return;
+    mxAbstractCanvas2D.prototype.setFillColor.apply(this, arguments)
+  }
+  var b = this.createElement("fillcolor");
+  b.setAttribute("color", null != a ? a : mxConstants.NONE);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setGradient = function(a, b, c, d, e, f, g, h, k) {
+  if (null != a && null != b) {
+    mxAbstractCanvas2D.prototype.setGradient.apply(this, arguments);
+    var l = this.createElement("gradient");
+    l.setAttribute("c1", a);
+    l.setAttribute("c2", b);
+    l.setAttribute("x", this.format(c));
+    l.setAttribute("y", this.format(d));
+    l.setAttribute("w", this.format(e));
+    l.setAttribute("h", this.format(f));
+    null != g && l.setAttribute("direction", g);
+    null != h && l.setAttribute("alpha1", h);
+    null != k && l.setAttribute("alpha2", k);
+    this.root.appendChild(l)
+  }
+};
+mxXmlCanvas2D.prototype.setStrokeColor = function(a) {
+  a == mxConstants.NONE && (a = null);
+  if (this.compressed) {
+    if (this.state.strokeColor == a) return;
+    mxAbstractCanvas2D.prototype.setStrokeColor.apply(this, arguments)
+  }
+  var b = this.createElement("strokecolor");
+  b.setAttribute("color", null != a ? a : mxConstants.NONE);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setStrokeWidth = function(a) {
+  if (this.compressed) {
+    if (this.state.strokeWidth == a) return;
+    mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this, arguments)
+  }
+  var b = this.createElement("strokewidth");
+  b.setAttribute("width", this.format(a));
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setDashed = function(a) {
+  if (this.compressed) {
+    if (this.state.dashed == a) return;
+    mxAbstractCanvas2D.prototype.setDashed.apply(this, arguments)
+  }
+  var b = this.createElement("dashed");
+  b.setAttribute("dashed", a ? "1" : "0");
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setDashPattern = function(a) {
+  if (this.compressed) {
+    if (this.state.dashPattern == a) return;
+    mxAbstractCanvas2D.prototype.setDashPattern.apply(this, arguments)
+  }
+  var b = this.createElement("dashpattern");
+  b.setAttribute("pattern", a);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setLineCap = function(a) {
+  if (this.compressed) {
+    if (this.state.lineCap == a) return;
+    mxAbstractCanvas2D.prototype.setLineCap.apply(this, arguments)
+  }
+  var b = this.createElement("linecap");
+  b.setAttribute("cap", a);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setLineJoin = function(a) {
+  if (this.compressed) {
+    if (this.state.lineJoin == a) return;
+    mxAbstractCanvas2D.prototype.setLineJoin.apply(this, arguments)
+  }
+  var b = this.createElement("linejoin");
+  b.setAttribute("join", a);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setMiterLimit = function(a) {
+  if (this.compressed) {
+    if (this.state.miterLimit == a) return;
+    mxAbstractCanvas2D.prototype.setMiterLimit.apply(this, arguments)
+  }
+  var b = this.createElement("miterlimit");
+  b.setAttribute("limit", a);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setFontColor = function(a) {
+  if (this.textEnabled) {
+    a == mxConstants.NONE && (a = null);
+    if (this.compressed) {
+      if (this.state.fontColor == a) return;
+      mxAbstractCanvas2D.prototype.setFontColor.apply(this, arguments)
+    }
+    var b = this.createElement("fontcolor");
+    b.setAttribute("color", null != a ? a : mxConstants.NONE);
+    this.root.appendChild(b)
+  }
+};
+mxXmlCanvas2D.prototype.setFontBackgroundColor = function(a) {
+  if (this.textEnabled) {
+    a == mxConstants.NONE && (a = null);
+    if (this.compressed) {
+      if (this.state.fontBackgroundColor == a) return;
+      mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this, arguments)
+    }
+    var b = this.createElement("fontbackgroundcolor");
+    b.setAttribute("color", null != a ? a : mxConstants.NONE);
+    this.root.appendChild(b)
+  }
+};
+mxXmlCanvas2D.prototype.setFontBorderColor = function(a) {
+  if (this.textEnabled) {
+    a == mxConstants.NONE && (a = null);
+    if (this.compressed) {
+      if (this.state.fontBorderColor == a) return;
+      mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this, arguments)
+    }
+    var b = this.createElement("fontbordercolor");
+    b.setAttribute("color", null != a ? a : mxConstants.NONE);
+    this.root.appendChild(b)
+  }
+};
+mxXmlCanvas2D.prototype.setFontSize = function(a) {
+  if (this.textEnabled) {
+    if (this.compressed) {
+      if (this.state.fontSize == a) return;
+      mxAbstractCanvas2D.prototype.setFontSize.apply(this, arguments)
+    }
+    var b = this.createElement("fontsize");
+    b.setAttribute("size", a);
+    this.root.appendChild(b)
+  }
+};
+mxXmlCanvas2D.prototype.setFontFamily = function(a) {
+  if (this.textEnabled) {
+    if (this.compressed) {
+      if (this.state.fontFamily == a) return;
+      mxAbstractCanvas2D.prototype.setFontFamily.apply(this, arguments)
+    }
+    var b = this.createElement("fontfamily");
+    b.setAttribute("family", a);
+    this.root.appendChild(b)
+  }
+};
+mxXmlCanvas2D.prototype.setFontStyle = function(a) {
+  if (this.textEnabled) {
+    null == a && (a = 0);
+    if (this.compressed) {
+      if (this.state.fontStyle == a) return;
+      mxAbstractCanvas2D.prototype.setFontStyle.apply(this, arguments)
+    }
+    var b = this.createElement("fontstyle");
+    b.setAttribute("style", a);
+    this.root.appendChild(b)
+  }
+};
+mxXmlCanvas2D.prototype.setShadow = function(a) {
+  if (this.compressed) {
+    if (this.state.shadow == a) return;
+    mxAbstractCanvas2D.prototype.setShadow.apply(this, arguments)
+  }
+  var b = this.createElement("shadow");
+  b.setAttribute("enabled", a ? "1" : "0");
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setShadowColor = function(a) {
+  if (this.compressed) {
+    a == mxConstants.NONE && (a = null);
+    if (this.state.shadowColor == a) return;
+    mxAbstractCanvas2D.prototype.setShadowColor.apply(this, arguments)
+  }
+  var b = this.createElement("shadowcolor");
+  b.setAttribute("color", null != a ? a : mxConstants.NONE);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setShadowAlpha = function(a) {
+  if (this.compressed) {
+    if (this.state.shadowAlpha == a) return;
+    mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this, arguments)
+  }
+  var b = this.createElement("shadowalpha");
+  b.setAttribute("alpha", a);
+  this.root.appendChild(b)
+};
+mxXmlCanvas2D.prototype.setShadowOffset = function(a, b) {
+  if (this.compressed) {
+    if (this.state.shadowDx == a && this.state.shadowDy == b) return;
+    mxAbstractCanvas2D.prototype.setShadowOffset.apply(this, arguments)
+  }
+  var c = this.createElement("shadowoffset");
+  c.setAttribute("dx", a);
+  c.setAttribute("dy", b);
+  this.root.appendChild(c)
+};
+mxXmlCanvas2D.prototype.rect = function(a, b, c, d) {
+  var e = this.createElement("rect");
+  e.setAttribute("x", this.format(a));
+  e.setAttribute("y", this.format(b));
+  e.setAttribute("w", this.format(c));
+  e.setAttribute("h", this.format(d));
+  this.root.appendChild(e)
+};
+mxXmlCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) {
+  var g = this.createElement("roundrect");
+  g.setAttribute("x", this.format(a));
+  g.setAttribute("y", this.format(b));
+  g.setAttribute("w", this.format(c));
+  g.setAttribute("h", this.format(d));
+  g.setAttribute("dx", this.format(e));
+  g.setAttribute("dy", this.format(f));
+  this.root.appendChild(g)
+};
+mxXmlCanvas2D.prototype.ellipse = function(a, b, c, d) {
+  var e = this.createElement("ellipse");
+  e.setAttribute("x", this.format(a));
+  e.setAttribute("y", this.format(b));
+  e.setAttribute("w", this.format(c));
+  e.setAttribute("h", this.format(d));
+  this.root.appendChild(e)
+};
+mxXmlCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) {
+  e = this.converter.convert(e);
+  var k = this.createElement("image");
+  k.setAttribute("x", this.format(a));
+  k.setAttribute("y", this.format(b));
+  k.setAttribute("w", this.format(c));
+  k.setAttribute("h", this.format(d));
+  k.setAttribute("src", e);
+  k.setAttribute("aspect", f ? "1" : "0");
+  k.setAttribute("flipH", g ? "1" : "0");
+  k.setAttribute("flipV", h ? "1" : "0");
+  this.root.appendChild(k)
+};
+mxXmlCanvas2D.prototype.begin = function() {
+  this.root.appendChild(this.createElement("begin"));
+  this.lastY = this.lastX = 0
+};
+mxXmlCanvas2D.prototype.moveTo = function(a, b) {
+  var c = this.createElement("move");
+  c.setAttribute("x", this.format(a));
+  c.setAttribute("y", this.format(b));
+  this.root.appendChild(c);
+  this.lastX = a;
+  this.lastY = b
+};
+mxXmlCanvas2D.prototype.lineTo = function(a, b) {
+  var c = this.createElement("line");
+  c.setAttribute("x", this.format(a));
+  c.setAttribute("y", this.format(b));
+  this.root.appendChild(c);
+  this.lastX = a;
+  this.lastY = b
+};
+mxXmlCanvas2D.prototype.quadTo = function(a, b, c, d) {
+  var e = this.createElement("quad");
+  e.setAttribute("x1", this.format(a));
+  e.setAttribute("y1", this.format(b));
+  e.setAttribute("x2", this.format(c));
+  e.setAttribute("y2", this.format(d));
+  this.root.appendChild(e);
+  this.lastX = c;
+  this.lastY = d
+};
+mxXmlCanvas2D.prototype.curveTo = function(a, b, c, d, e, f) {
+  var g = this.createElement("curve");
+  g.setAttribute("x1", this.format(a));
+  g.setAttribute("y1", this.format(b));
+  g.setAttribute("x2", this.format(c));
+  g.setAttribute("y2", this.format(d));
+  g.setAttribute("x3", this.format(e));
+  g.setAttribute("y3", this.format(f));
+  this.root.appendChild(g);
+  this.lastX = e;
+  this.lastY = f
+};
+mxXmlCanvas2D.prototype.close = function() {
+  this.root.appendChild(this.createElement("close"))
+};
+mxXmlCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) {
+  if (this.textEnabled && null != e) {
+    mxUtils.isNode(e) && (e = mxUtils.getOuterHtml(e));
+    var p = this.createElement("text");
+    p.setAttribute("x", this.format(a));
+    p.setAttribute("y", this.format(b));
+    p.setAttribute("w", this.format(c));
+    p.setAttribute("h", this.format(d));
+    p.setAttribute("str", e);
+    null != f && p.setAttribute("align", f);
+    null != g && p.setAttribute("valign", g);
+    p.setAttribute("wrap", h ? "1" : "0");
+    null == k && (k = "");
+    p.setAttribute("format", k);
+    null != l && p.setAttribute("fill",
+      l ? "1" : "0");
+    null != m && p.setAttribute("clip", m ? "1" : "0");
+    null != n && p.setAttribute("rotation", n);
+    this.root.appendChild(p)
+  }
+};
+mxXmlCanvas2D.prototype.stroke = function() {
+  this.root.appendChild(this.createElement("stroke"))
+};
+mxXmlCanvas2D.prototype.fill = function() {
+  this.root.appendChild(this.createElement("fill"))
+};
+mxXmlCanvas2D.prototype.fillAndStroke = function() {
+  this.root.appendChild(this.createElement("fillstroke"))
+};
+
+function mxSvgCanvas2D(a, b) {
+  mxAbstractCanvas2D.call(this);
+  this.root = a;
+  this.gradients = [];
+  this.defs = null;
+  this.styleEnabled = null != b ? b : !1;
+  var c = null;
+  if (a.ownerDocument != document)
+    for (c = a; null != c && "svg" != c.nodeName;) c = c.parentNode;
+  null != c && (0 < c.getElementsByTagName("defs").length && (this.defs = c.getElementsByTagName("defs")[0]), null == this.defs && (this.defs = this.createElement("defs"), null != c.firstChild ? c.insertBefore(
+    this.defs, c.firstChild) : c.appendChild(this.defs)), this.styleEnabled && this.defs.appendChild(this.createStyle()))
+}
+mxUtils.extend(mxSvgCanvas2D, mxAbstractCanvas2D);
+mxSvgCanvas2D.prototype.node = null;
+mxSvgCanvas2D.prototype.matchHtmlAlignment = !0;
+mxSvgCanvas2D.prototype.textEnabled = !0;
+mxSvgCanvas2D.prototype.foEnabled = !0;
+mxSvgCanvas2D.prototype.strokeTolerance = 0;
+mxSvgCanvas2D.prototype.refCount = 0;
+mxSvgCanvas2D.prototype.blockImagePointerEvents = !1;
+mxSvgCanvas2D.prototype.reset = function() {
+  mxAbstractCanvas2D.prototype.reset.apply(this, arguments);
+  this.gradients = []
+};
+mxSvgCanvas2D.prototype.createStyle = function(a) {
+  a = this.createElement("style");
+  a.setAttribute("type", "text/css");
+  mxUtils.write(a, "svg{font-family:" + mxConstants.DEFAULT_FONTFAMILY + ";font-size:" + mxConstants.DEFAULT_FONTSIZE + ";fill:none;stroke-miterlimit:10}");
+  return a
+};
+mxSvgCanvas2D.prototype.createElement = function(a, b) {
+  if (null != this.root.ownerDocument.createElementNS) return this.root.ownerDocument.createElementNS(b || mxConstants.NS_SVG, a);
+  var c = this.root.ownerDocument.createElement(a);
+  null != b && c.setAttribute("xmlns", b);
+  return c
+};
+mxSvgCanvas2D.prototype.createGradientId = function(a, b, c, d, e) {
+  "#" == a.charAt(0) && (a = a.substring(1));
+  "#" == b.charAt(0) && (b = b.substring(1));
+  a = a.toLowerCase() + "-" + c;
+  b = b.toLowerCase() + "-" + d;
+  c = null;
+  null == e || e == mxConstants.DIRECTION_SOUTH ? c = "s" : e == mxConstants.DIRECTION_EAST ? c = "e" : (d = a, a = b, b = d, e == mxConstants.DIRECTION_NORTH ? c = "s" : e == mxConstants.DIRECTION_WEST &&
+    (c = "e"));
+  return "mx-gradient-" + a + "-" + b + "-" + c
+};
+mxSvgCanvas2D.prototype.getSvgGradient = function(a, b, c, d, e) {
+  var f = this.createGradientId(a, b, c, d, e),
+    g = this.gradients[f];
+  if (null == g) {
+    var h = this.root.ownerSVGElement,
+      k = 0,
+      l = f + "-" + k;
+    if (null != h)
+      for (g = h.ownerDocument.getElementById(l); null != g && g.ownerSVGElement != h;) l = f + "-" + k++, g = h.ownerDocument.getElementById(l);
+    else l = "id" + ++this.refCount;
+    null == g && (g = this.createSvgGradient(a, b, c, d, e), g.setAttribute("id", l), null != this.defs ? this.defs.appendChild(g) : h.appendChild(g));
+    this.gradients[f] = g
+  }
+  return g.getAttribute("id")
+};
+mxSvgCanvas2D.prototype.createSvgGradient = function(a, b, c, d, e) {
+  var f = this.createElement("linearGradient");
+  f.setAttribute("x1", "0%");
+  f.setAttribute("y1", "0%");
+  f.setAttribute("x2", "0%");
+  f.setAttribute("y2", "0%");
+  null == e || e == mxConstants.DIRECTION_SOUTH ? f.setAttribute("y2", "100%") : e == mxConstants.DIRECTION_EAST ? f.setAttribute("x2", "100%") : e == mxConstants.DIRECTION_NORTH ? f.setAttribute(
+    "y1", "100%") : e == mxConstants.DIRECTION_WEST && f.setAttribute("x1", "100%");
+  c = 1 > c ? ";stop-opacity:" + c : "";
+  e = this.createElement("stop");
+  e.setAttribute("offset", "0%");
+  e.setAttribute("style", "stop-color:" + a + c);
+  f.appendChild(e);
+  c = 1 > d ? ";stop-opacity:" + d : "";
+  e = this.createElement("stop");
+  e.setAttribute("offset", "100%");
+  e.setAttribute("style", "stop-color:" + b + c);
+  f.appendChild(e);
+  return f
+};
+mxSvgCanvas2D.prototype.addNode = function(a, b) {
+  var c = this.node,
+    d = this.state;
+  if (null != c) {
+    if ("path" == c.nodeName)
+      if (null != this.path && 0 < this.path.length) c.setAttribute("d", this.path.join(" "));
+      else return;
+    a && null != d.fillColor ? this.updateFill() : this.styleEnabled || ("ellipse" == c.nodeName && mxClient.IS_NS && !mxClient.IS_GC && !mxClient.IS_SF ? c.setAttribute("fill", "transparent") : c.setAttribute(
+      "fill", "none"), a = !1);
+    b && null != d.strokeColor ? this.updateStroke() : this.styleEnabled || c.setAttribute("stroke", "none");
+    null !=
+      d.transform && 0 < d.transform.length && c.setAttribute("transform", d.transform);
+    d.shadow && this.root.appendChild(this.createShadow(c));
+    0 < this.strokeTolerance && !a && this.root.appendChild(this.createTolerance(c));
+    this.pointerEvents && ("path" != c.nodeName || this.path[this.path.length - 1] == this.closeOp) && c.setAttribute("pointer-events", "all");
+    this.root.appendChild(c)
+  }
+};
+mxSvgCanvas2D.prototype.updateFill = function() {
+  var a = this.state;
+  1 > a.alpha && this.node.setAttribute("fill-opacity", a.alpha);
+  null != a.fillColor && (null != a.gradientColor ? (a = this.getSvgGradient(a.fillColor, a.gradientColor, a.fillAlpha, a.gradientAlpha, a.gradientDirection), this.node.setAttribute("fill", "url(#" +
+    a + ")")) : this.node.setAttribute("fill", a.fillColor.toLowerCase()))
+};
+mxSvgCanvas2D.prototype.updateStroke = function() {
+  var a = this.state;
+  this.node.setAttribute("stroke", a.strokeColor.toLowerCase());
+  1 > a.alpha && this.node.setAttribute("stroke-opacity", a.alpha);
+  var b = Math.max(1, this.format(a.strokeWidth * a.scale));
+  1 != b && this.node.setAttribute("stroke-width", b);
+  "path" == this.node.nodeName && this.updateStrokeAttributes();
+  a.dashed && this.node.setAttribute("stroke-dasharray", this.createDashPattern(b))
+};
+mxSvgCanvas2D.prototype.updateStrokeAttributes = function() {
+  var a = this.state;
+  null != a.lineJoin && "miter" != a.lineJoin && this.node.setAttribute("stroke-linejoin", a.lineJoin);
+  if (null != a.lineCap) {
+    var b = a.lineCap;
+    "flat" == b && (b = "butt");
+    "butt" != b && this.node.setAttribute("stroke-linecap", b)
+  }
+  null != a.miterLimit && (!this.styleEnabled || 10 != a.miterLimit) && this.node.setAttribute("stroke-miterlimit", a.miterLimit)
+};
+mxSvgCanvas2D.prototype.createDashPattern = function(a) {
+  var b = this.state.dashPattern.split(" "),
+    c = [];
+  if (0 < b.length)
+    for (var d = 0; d < b.length; d++) c[d] = Number(b[d]) * a;
+  return c.join(" ")
+};
+mxSvgCanvas2D.prototype.createTolerance = function(a) {
+  a = a.cloneNode(!0);
+  var b = parseFloat(a.getAttribute("stroke-width") || 1) + this.strokeTolerance;
+  a.setAttribute("pointer-events", "stroke");
+  a.setAttribute("visibility", "hidden");
+  a.removeAttribute("stroke-dasharray");
+  a.setAttribute("stroke-width", b);
+  a.setAttribute("fill", "none");
+  a.setAttribute("stroke", mxClient.IS_OP ? "none" : "white");
+  return a
+};
+mxSvgCanvas2D.prototype.createShadow = function(a) {
+  a = a.cloneNode(!0);
+  var b = this.state;
+  "none" != a.getAttribute("fill") && a.setAttribute("fill", b.shadowColor);
+  "none" != a.getAttribute("stroke") && a.setAttribute("stroke", b.shadowColor);
+  a.setAttribute("transform", "translate(" + this.format(b.shadowDx * b.scale) + "," + this.format(b.shadowDy * b.scale) + ")" + (b.transform || ""));
+  a.setAttribute("opacity", b.shadowAlpha);
+  return a
+};
+mxSvgCanvas2D.prototype.rotate = function(a, b, c, d, e) {
+  if (0 != a || b || c) {
+    var f = this.state;
+    d += f.dx;
+    e += f.dy;
+    d *= f.scale;
+    e *= f.scale;
+    f.transform = f.transform || "";
+    if (b && c) a += 180;
+    else if (b ^ c) {
+      var g = b ? d : 0,
+        h = b ? -1 : 1,
+        k = c ? e : 0,
+        l = c ? -1 : 1;
+      f.transform += "translate(" + this.format(g) + "," + this.format(k) + ")scale(" + this.format(h) + "," + this.format(l) + ")translate(" + this.format(-g) + "," + this.format(-k) + ")"
+    }
+    if (b ? !c : c) a *= -1;
+    0 != a && (f.transform += "rotate(" + this.format(a) + "," + this.format(d) + "," + this.format(e) + ")");
+    f.rotation += a;
+    f.rotationCx =
+      d;
+    f.rotationCy = e
+  }
+};
+mxSvgCanvas2D.prototype.begin = function() {
+  mxAbstractCanvas2D.prototype.begin.apply(this, arguments);
+  this.node = this.createElement("path")
+};
+mxSvgCanvas2D.prototype.rect = function(a, b, c, d) {
+  var e = this.state,
+    f = this.createElement("rect");
+  f.setAttribute("x", this.format((a + e.dx) * e.scale));
+  f.setAttribute("y", this.format((b + e.dy) * e.scale));
+  f.setAttribute("width", this.format(c * e.scale));
+  f.setAttribute("height", this.format(d * e.scale));
+  this.node = f
+};
+mxSvgCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) {
+  this.rect(a, b, c, d);
+  0 < e && this.node.setAttribute("rx", this.format(e * this.state.scale));
+  0 < f && this.node.setAttribute("ry", this.format(f * this.state.scale))
+};
+mxSvgCanvas2D.prototype.ellipse = function(a, b, c, d) {
+  var e = this.state,
+    f = this.createElement("ellipse");
+  f.setAttribute("cx", Math.round((a + c / 2 + e.dx) * e.scale));
+  f.setAttribute("cy", Math.round((b + d / 2 + e.dy) * e.scale));
+  f.setAttribute("rx", c / 2 * e.scale);
+  f.setAttribute("ry", d / 2 * e.scale);
+  this.node = f
+};
+mxSvgCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) {
+  e = this.converter.convert(e);
+  f = null != f ? f : !0;
+  g = null != g ? g : !1;
+  h = null != h ? h : !1;
+  var k = this.state;
+  a += k.dx;
+  b += k.dy;
+  var l = this.createElement("image");
+  l.setAttribute("x", this.format(a * k.scale));
+  l.setAttribute("y", this.format(b * k.scale));
+  l.setAttribute("width", this.format(c * k.scale));
+  l.setAttribute("height", this.format(d * k.scale));
+  null == l.setAttributeNS ? l.setAttribute("xlink:href", e) : l.setAttributeNS(mxConstants.NS_XLINK, "href", e);
+  f || l.setAttribute("preserveAspectRatio",
+    "none");
+  1 > k.alpha && l.setAttribute("opacity", k.alpha);
+  e = this.state.transform || "";
+  if (g || h) {
+    var m = f = 1,
+      n = 0,
+      p = 0;
+    g && (f = -1, n = -c - 2 * a);
+    h && (m = -1, p = -d - 2 * b);
+    e += "scale(" + f + "," + m + ")translate(" + n + "," + p + ")"
+  }
+  0 < e.length && l.setAttribute("transform", e);
+  this.root.appendChild(l);
+  this.blockImagePointerEvents && (l.setAttribute("style", "pointer-events:none"), l = this.createElement("rect"), l.setAttribute("visibility", "hidden"), l.setAttribute("pointer-events", "fill"),
+    l.setAttribute("x", this.format(a * k.scale)), l.setAttribute("y",
+      this.format(b * k.scale)), l.setAttribute("width", this.format(c * k.scale)), l.setAttribute("height", this.format(d * k.scale)), this.root.appendChild(l))
+};
+mxSvgCanvas2D.prototype.createDiv = function(a, b, c, d, e) {
+  c = this.state;
+  d = "display:inline-block;font-size:" + Math.round(c.fontSize) + "px;font-family:" + c.fontFamily + ";color:" + c.fontColor + ";line-height:" + Math.round(c.fontSize * mxConstants.LINE_HEIGHT) +
+    "px;" + d;
+  (c.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (d += "font-weight:bold;");
+  (c.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (d += "font-style:italic;");
+  (c.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && (d += "font-decoration:underline;");
+  b == mxConstants.ALIGN_CENTER ? d += "text-align:center;" : b == mxConstants.ALIGN_RIGHT && (d += "text-align:right;");
+  b = "";
+  null != c.fontBackgroundColor && (b += "background-color:" + c.fontBackgroundColor + ";");
+  null != c.fontBorderColor && (b += "border:1px solid " + c.fontBorderColor + ";");
+  mxUtils.isNode(a) || (c = document.createElement("textarea"), c.innerHTML = a.replace(/&lt;/g, "\x26amp;lt;").replace(/&gt;/g, "\x26amp;gt;").replace(/</g, "\x26lt;").replace(/>/g, "\x26gt;"), a =
+    c.value, e ? d += b : 0 < b.length && (a = '\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;' +
+      b + '"\x3e' + a + "\x3c/div\x3e"));
+  if (!mxClient.IS_IE && document.createElementNS) return e = document.createElementNS("http://www.w3.org/1999/xhtml", "div"), e.setAttribute("style", d), mxUtils.isNode(a) ? this.root.ownerDocument !=
+    document ? e.appendChild(a.cloneNode(!0)) : e.appendChild(a) : e.innerHTML = a, e;
+  mxUtils.isNode(a) && this.root.ownerDocument != document && (a = a.outerHTML);
+  a = a.replace(/<br>/g, "\x3cbr /\x3e").replace(/<hr>/g, "\x3chr /\x3e");
+  return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"' +
+    d + '"\x3e' + a + "\x3c/div\x3e").documentElement
+};
+mxSvgCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) {
+  if (this.textEnabled && null != e) {
+    n = null != n ? n : 0;
+    var p = this.state;
+    a += p.dx;
+    b += p.dy;
+    if (this.foEnabled && "html" == k) {
+      var q = "vertical-align:top;";
+      m ? (q += "overflow:hidden;", 0 < d && (q += "max-height:" + Math.round(d) + "px;"), 0 < c && (q += "width:" + Math.round(c) + "px;")) : l && (q += "width:" + Math.round(c) + "px;", 0 < d &&
+        (q += "max-height:" + Math.round(d) + "px;"));
+      h ? (!m && 0 < c && (q += "width:" + Math.round(c) + "px;"), q += "white-space:normal;") : q += "white-space:nowrap;";
+      h = this.createElement("g");
+      1 > p.alpha && h.setAttribute("opacity", p.alpha);
+      k = this.createElement("foreignObject");
+      k.setAttribute("pointer-events", "all");
+      q = this.createDiv(e, f, g, q, l);
+      if (null != q) {
+        h.appendChild(k);
+        this.root.appendChild(h);
+        var s = 0;
+        if (mxClient.IS_IE && !mxClient.IS_SVG) {
+          var r = document.createElement("div");
+          r.style.cssText = q.getAttribute("style");
+          r.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block";
+          r.style.visibility = "hidden";
+          r.innerHTML = mxUtils.isNode(e) ? e.outerHTML : e;
+          document.body.appendChild(r);
+          s = r.offsetWidth;
+          d = mxClient.IS_QUIRKS && 0 < d && m ? Math.min(d, r.offsetHeight + 2) : r.offsetHeight;
+          r.parentNode.removeChild(r);
+          k.appendChild(q)
+        } else this.root.ownerDocument != document ? (q.style.visibility = "hidden", document.body.appendChild(q), s = q.offsetWidth, d = q.offsetHeight, k.appendChild(q), q.style.visibility = "") :
+          (k.appendChild(q), s = q.offsetWidth, d = q.offsetHeight);
+        c = l ? Math.max(c, s) : s;
+        1 > p.alpha && h.setAttribute("opacity", p.alpha);
+        l = e = 0;
+        f == mxConstants.ALIGN_CENTER ? e -= c / 2 : f == mxConstants.ALIGN_RIGHT && (e -= c);
+        a += e;
+        g == mxConstants.ALIGN_MIDDLE ?
+          l -= d / 2 : g == mxConstants.ALIGN_BOTTOM && (l -= d);
+        b += l;
+        f = 1 != p.scale ? "scale(" + p.scale + ")" : "";
+        0 != p.rotation && this.rotateHtml ? (f += "rotate(" + p.rotation + "," + c / 2 + "," + d / 2 + ")", b = this.rotatePoint((a + c / 2) * p.scale, (b + d / 2) * p.scale, p.rotation, p.rotationCx,
+          p.rotationCy), a = b.x - c * p.scale / 2, b = b.y - d * p.scale / 2) : (a *= p.scale, b *= p.scale);
+        0 != n && (f += "rotate(" + n + "," + -e + "," + -l + ")");
+        h.setAttribute("transform", "translate(" + Math.round(a) + "," + Math.round(b) + ")" + f);
+        k.setAttribute("width", Math.round(Math.max(1, c)));
+        k.setAttribute("height",
+          Math.round(Math.max(1, d)))
+      }
+    } else this.plainText(a, b, c, d, e, f, g, h, l, m, n)
+  }
+};
+mxSvgCanvas2D.prototype.createClip = function(a, b, c, d) {
+  a = Math.round(a);
+  b = Math.round(b);
+  c = Math.round(c);
+  d = Math.round(d);
+  for (var e = "mx-clip-" + a + "-" + b + "-" + c + "-" + d, f = 0, g = e + "-" + f; null != document.getElementById(g);) g = e + "-" + ++f;
+  clip = this.createElement("clipPath");
+  clip.setAttribute("id", g);
+  e = this.createElement("rect");
+  e.setAttribute("x", a);
+  e.setAttribute("y", b);
+  e.setAttribute("width", c);
+  e.setAttribute("height", d);
+  clip.appendChild(e);
+  return clip
+};
+mxSvgCanvas2D.prototype.plainText = function(a, b, c, d, e, f, g, h, k, l, m) {
+  m = null != m ? m : 0;
+  h = this.state;
+  var n = Math.round(h.fontSize),
+    p = this.createElement("g"),
+    q = h.transform || "";
+  0 != m && (q += "rotate(" + m + "," + this.format(a * h.scale) + "," + this.format(b * h.scale) + ")");
+  if (l && 0 < c && 0 < d) {
+    var s = a;
+    m = b;
+    f == mxConstants.ALIGN_CENTER ? s -= c / 2 : f == mxConstants.ALIGN_RIGHT && (s -= c);
+    g == mxConstants.ALIGN_MIDDLE ? m -= d / 2 : g == mxConstants.ALIGN_BOTTOM && (m -= d);
+    m = this.createClip(s * h.scale - 2, m * h.scale - 2, c * h.scale + 4, d * h.scale + 4);
+    null != this.defs ? this.defs.appendChild(m) :
+      this.root.appendChild(m);
+    p.setAttribute("clip-path", "url(#" + m.getAttribute("id") + ")")
+  }
+  this.updateFont(p, f);
+  m = f == mxConstants.ALIGN_RIGHT ? "end" : f == mxConstants.ALIGN_CENTER ? "middle" : "start";
+  "start" != m && p.setAttribute("text-anchor", m);
+  (!this.styleEnabled || n != mxConstants.DEFAULT_FONTSIZE) && p.setAttribute("font-size", Math.round(n * h.scale) + "px");
+  0 < q.length && p.setAttribute("transform", q);
+  1 > h.alpha && p.setAttribute("opacity", h.alpha);
+  var q = e.split("\n"),
+    s = Math.round(n * mxConstants.LINE_HEIGHT),
+    r = n + (q.length -
+      1) * s;
+  m = b + n - 1;
+  g == mxConstants.ALIGN_MIDDLE ? (d = (this.matchHtmlAlignment && l && 0 < d ? Math.min(r, d) : r) / 2, m -= d + 1) : g == mxConstants.ALIGN_BOTTOM && (d = this.matchHtmlAlignment && l && 0 < d ?
+    Math.min(r, d) : r, m -= d + 2);
+  for (d = 0; d < q.length; d++) 0 < q[d].length && 0 < mxUtils.trim(q[d]).length && (l = this.createElement("text"), l.setAttribute("x", this.format(a * h.scale)), l.setAttribute("y", this.format(
+    m * h.scale)), mxUtils.write(l, q[d]), p.appendChild(l)), m += s;
+  this.root.appendChild(p);
+  this.addTextBackground(p, e, a, b, c, r, f, g, k)
+};
+mxSvgCanvas2D.prototype.updateFont = function(a) {
+  var b = this.state;
+  a.setAttribute("fill", b.fontColor);
+  (!this.styleEnabled || b.fontFamily != mxConstants.DEFAULT_FONTFAMILY) && a.setAttribute("font-family", b.fontFamily);
+  (b.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && a.setAttribute("font-weight", "bold");
+  (b.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && a.setAttribute("font-style", "italic");
+  (b.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && a.setAttribute("text-decoration",
+    "underline")
+};
+mxSvgCanvas2D.prototype.addTextBackground = function(a, b, c, d, e, f, g, h, k) {
+  var l = this.state;
+  if (null != l.fontBackgroundColor || null != l.fontBorderColor) {
+    var m = null;
+    k ? (g == mxConstants.ALIGN_CENTER ? c -= e / 2 : g == mxConstants.ALIGN_RIGHT && (c -= e), h == mxConstants.ALIGN_MIDDLE ? d -= f / 2 : h == mxConstants.ALIGN_BOTTOM && (d -= f), m = new mxRectangle(
+      (c + 1) * l.scale, d * l.scale, (e - 2) * l.scale, (f + 2) * l.scale)) : null != a.getBBox && this.root.ownerDocument == document ? (m = a.getBBox(), b = mxClient.IS_IE && mxClient.IS_SVG,
+      m = new mxRectangle(m.x, m.y + (b ? 0 :
+        1), m.width, m.height + (b ? 1 : 0))) : (m = document.createElement("div"), m.style.lineHeight = Math.round(l.fontSize * mxConstants.LINE_HEIGHT) + "px", m.style.fontSize = Math.round(l.fontSize) +
+      "px", m.style.fontFamily = l.fontFamily, m.style.whiteSpace = "nowrap", m.style.position = "absolute", m.style.visibility = "hidden", m.style.display = mxClient.IS_QUIRKS ? "inline" :
+      "inline-block", m.style.zoom = "1", (l.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (m.style.fontWeight = "bold"), (l.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC &&
+      (m.style.fontStyle = "italic"), b = mxUtils.htmlEntities(b, !1), m.innerHTML = b.replace(/\n/g, "\x3cbr/\x3e"), document.body.appendChild(m), e = m.offsetWidth, f = m.offsetHeight, m.parentNode
+      .removeChild(m), g == mxConstants.ALIGN_CENTER ? c -= e / 2 : g == mxConstants.ALIGN_RIGHT && (c -= e), h == mxConstants.ALIGN_MIDDLE ? d -= f / 2 : h == mxConstants.ALIGN_BOTTOM && (d -= f),
+      m = new mxRectangle((c + 1) * l.scale, (d + 2) * l.scale, e * l.scale, (f + 1) * l.scale));
+    null != m && (b = this.createElement("rect"), b.setAttribute("fill", l.fontBackgroundColor || "none"), b.setAttribute("stroke",
+      l.fontBorderColor || "none"), b.setAttribute("x", Math.floor(m.x - 1)), b.setAttribute("y", Math.floor(m.y - 1)), b.setAttribute("width", Math.ceil(m.width + 2)), b.setAttribute("height",
+      Math.ceil(m.height)), l = null != l.fontBorderColor ? Math.max(1, this.format(l.scale)) : 0, b.setAttribute("stroke-width", l), this.root.ownerDocument == document && 1 == mxUtils.mod(l,
+      2) && b.setAttribute("transform", "translate(0.5, 0.5)"), a.insertBefore(b, a.firstChild))
+  }
+};
+mxSvgCanvas2D.prototype.stroke = function() {
+  this.addNode(!1, !0)
+};
+mxSvgCanvas2D.prototype.fill = function() {
+  this.addNode(!0, !1)
+};
+mxSvgCanvas2D.prototype.fillAndStroke = function() {
+  this.addNode(!0, !0)
+};
+var mxVmlCanvas2D = function(a) {
+  mxAbstractCanvas2D.call(this);
+  this.root = a
+};
+mxUtils.extend(mxVmlCanvas2D, mxAbstractCanvas2D);
+mxVmlCanvas2D.prototype.node = null;
+mxVmlCanvas2D.prototype.textEnabled = !0;
+mxVmlCanvas2D.prototype.moveOp = "m";
+mxVmlCanvas2D.prototype.lineOp = "l";
+mxVmlCanvas2D.prototype.curveOp = "c";
+mxVmlCanvas2D.prototype.closeOp = "x";
+mxVmlCanvas2D.prototype.rotatedHtmlBackground = "";
+mxVmlCanvas2D.prototype.vmlScale = 1;
+mxVmlCanvas2D.prototype.addNode = function(a, b) {
+  var c = this.node,
+    d = this.state;
+  if (null != c) {
+    if ("shape" == c.nodeName)
+      if (null != this.path && 0 < this.path.length) c.path = this.path.join(" ") + " e", c.style.width = this.root.style.width, c.style.height = this.root.style.height, c.coordsize = parseInt(c.style
+        .width) + " " + parseInt(c.style.height);
+      else return;
+    c.strokeweight = this.format(Math.max(1, d.strokeWidth * d.scale / this.vmlScale)) + "px";
+    d.shadow && this.root.appendChild(this.createShadow(c, a && null != d.fillColor, b && null != d.strokeColor));
+    b && null != d.strokeColor ? (c.stroked = "true", c.strokecolor = d.strokeColor) : c.stroked = "false";
+    c.appendChild(this.createStroke());
+    a && null != d.fillColor ? c.appendChild(this.createFill()) : this.pointerEvents && ("shape" != c.nodeName || this.path[this.path.length - 1] == this.closeOp) ? c.appendChild(this.createTransparentFill()) :
+      c.filled = "false";
+    this.root.appendChild(c)
+  }
+};
+mxVmlCanvas2D.prototype.createTransparentFill = function() {
+  var a = document.createElement(mxClient.VML_PREFIX + ":fill");
+  a.src = mxClient.imageBasePath + "/transparent.gif";
+  a.type = "tile";
+  return a
+};
+mxVmlCanvas2D.prototype.createFill = function() {
+  var a = this.state,
+    b = document.createElement(mxClient.VML_PREFIX + ":fill");
+  b.color = a.fillColor;
+  if (null != a.gradientColor) {
+    b.type = "gradient";
+    b.method = "none";
+    b.color2 = a.gradientColor;
+    var c = 180 - a.rotation,
+      c = a.gradientDirection == mxConstants.DIRECTION_WEST ? c - (90 + ("x" == this.root.style.flip ? 180 : 0)) : a.gradientDirection == mxConstants.DIRECTION_EAST ? c + (90 + ("x" == this.root.style
+        .flip ? 180 : 0)) : a.gradientDirection == mxConstants.DIRECTION_NORTH ? c - (180 + ("y" == this.root.style.flip ?
+        -180 : 0)) : c + ("y" == this.root.style.flip ? -180 : 0);
+    if ("x" == this.root.style.flip || "y" == this.root.style.flip) c *= -1;
+    b.angle = mxUtils.mod(c, 360);
+    b.opacity = 100 * a.alpha * a.fillAlpha + "%";
+    b.setAttribute(mxClient.OFFICE_PREFIX + ":opacity2", 100 * a.alpha * a.gradientAlpha + "%")
+  } else 1 > a.alpha && (b.opacity = 100 * a.alpha + "%");
+  return b
+};
+mxVmlCanvas2D.prototype.createStroke = function() {
+  var a = this.state,
+    b = document.createElement(mxClient.VML_PREFIX + ":stroke");
+  b.endcap = a.lineCap || "flat";
+  b.joinstyle = a.lineJoin || "miter";
+  b.miterlimit = a.miterLimit || "10";
+  1 > a.alpha && (b.opacity = 100 * a.alpha + "%");
+  a.dashed && (b.dashstyle = this.getVmlDashStyle());
+  return b
+};
+mxVmlCanvas2D.prototype.getVmlDashStyle = function() {
+  var a = "dash";
+  if (null != this.state.dashPattern) {
+    var b = this.state.dashPattern.split(" ");
+    0 < b.length && 1 == b[0] && (a = "0 2")
+  }
+  return a
+};
+mxVmlCanvas2D.prototype.createShadow = function(a, b, c) {
+  var d = this.state,
+    e = -d.rotation * (Math.PI / 180),
+    f = Math.cos(e),
+    e = Math.sin(e),
+    g = d.shadowDx * d.scale,
+    h = d.shadowDy * d.scale;
+  "x" == this.root.style.flip ? g *= -1 : "y" == this.root.style.flip && (h *= -1);
+  var k = a.cloneNode(!0);
+  k.style.marginLeft = Math.round(g * f - h * e) + "px";
+  k.style.marginTop = Math.round(g * e + h * f) + "px";
+  8 == document.documentMode && (k.strokeweight = a.strokeweight, "shape" == a.nodeName && (k.path = this.path.join(" ") + " e", k.style.width = this.root.style.width, k.style.height =
+    this.root.style.height, k.coordsize = parseInt(a.style.width) + " " + parseInt(a.style.height)));
+  c ? (k.strokecolor = d.shadowColor, k.appendChild(this.createShadowStroke())) : k.stroked = "false";
+  b ? k.appendChild(this.createShadowFill()) : k.filled = "false";
+  return k
+};
+mxVmlCanvas2D.prototype.createShadowFill = function() {
+  var a = document.createElement(mxClient.VML_PREFIX + ":fill");
+  a.color = this.state.shadowColor;
+  a.opacity = 100 * this.state.alpha * this.state.shadowAlpha + "%";
+  return a
+};
+mxVmlCanvas2D.prototype.createShadowStroke = function() {
+  var a = this.createStroke();
+  a.opacity = 100 * this.state.alpha * this.state.shadowAlpha + "%";
+  return a
+};
+mxVmlCanvas2D.prototype.rotate = function(a, b, c, d, e) {
+  b && c ? a += 180 : b ? this.root.style.flip = "x" : c && (this.root.style.flip = "y");
+  if (b ? !c : c) a *= -1;
+  this.root.style.rotation = a;
+  this.state.rotation += a;
+  this.state.rotationCx = d;
+  this.state.rotationCy = e
+};
+mxVmlCanvas2D.prototype.begin = function() {
+  mxAbstractCanvas2D.prototype.begin.apply(this, arguments);
+  this.node = document.createElement(mxClient.VML_PREFIX + ":shape");
+  this.node.style.position = "absolute"
+};
+mxVmlCanvas2D.prototype.quadTo = function(a, b, c, d) {
+  var e = this.state,
+    f = (this.lastX + e.dx) * e.scale,
+    g = (this.lastY + e.dy) * e.scale;
+  a = (a + e.dx) * e.scale;
+  b = (b + e.dy) * e.scale;
+  c = (c + e.dx) * e.scale;
+  d = (d + e.dy) * e.scale;
+  var g = g + 2 / 3 * (b - g),
+    h = c + 2 / 3 * (a - c);
+  b = d + 2 / 3 * (b - d);
+  this.path.push("c " + this.format(f + 2 / 3 * (a - f)) + " " + this.format(g) + " " + this.format(h) + " " + this.format(b) + " " + this.format(c) + " " + this.format(d));
+  this.lastX = c / e.scale - e.dx;
+  this.lastY = d / e.scale - e.dy
+};
+mxVmlCanvas2D.prototype.createRect = function(a, b, c, d, e) {
+  var f = this.state;
+  a = document.createElement(a);
+  a.style.position = "absolute";
+  a.style.left = this.format((b + f.dx) * f.scale) + "px";
+  a.style.top = this.format((c + f.dy) * f.scale) + "px";
+  a.style.width = this.format(d * f.scale) + "px";
+  a.style.height = this.format(e * f.scale) + "px";
+  return a
+};
+mxVmlCanvas2D.prototype.rect = function(a, b, c, d) {
+  this.node = this.createRect(mxClient.VML_PREFIX + ":rect", a, b, c, d)
+};
+mxVmlCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) {
+  this.node = this.createRect(mxClient.VML_PREFIX + ":roundrect", a, b, c, d);
+  this.node.setAttribute("arcsize", Math.max(100 * e / c, 100 * f / d) + "%")
+};
+mxVmlCanvas2D.prototype.ellipse = function(a, b, c, d) {
+  this.node = this.createRect(mxClient.VML_PREFIX + ":oval", a, b, c, d)
+};
+mxVmlCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) {
+  var k = null;
+  f ? (k = this.createRect(mxClient.VML_PREFIX + ":rect", a, b, c, d), k.stroked = "false", a = document.createElement(mxClient.VML_PREFIX + ":fill"), a.aspect = f ? "atmost" : "ignore", a.rotate =
+    "true", a.type = "frame", a.src = e, k.appendChild(a)) : (k = this.createRect(mxClient.VML_PREFIX + ":image", a, b, c, d), k.src = e);
+  g && h ? k.style.rotation = "180" : g ? k.style.flip = "x" : h && (k.style.flip = "y");
+  1 > this.state.alpha && (k.style.filter += "alpha(opacity\x3d" + 100 * this.state.alpha + ")");
+  this.root.appendChild(k)
+};
+mxVmlCanvas2D.prototype.createDiv = function(a, b, c, d) {
+  c = document.createElement("div");
+  var e = this.state,
+    f = "";
+  null != e.fontBackgroundColor && (f += "background-color:" + e.fontBackgroundColor + ";");
+  null != e.fontBorderColor && (f += "border:1px solid " + e.fontBorderColor + ";");
+  mxUtils.isNode(a) ? c.appendChild(a) : 0 < f.length && !d ? (d = document.createElement("div"), d.style.cssText = f, d.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block", d.style.zoom =
+    "1", d.innerHTML = a, c.appendChild(d)) : (c.style.cssText = f, c.innerHTML = a);
+  a = c.style;
+  a.fontSize = Math.round(e.fontSize / this.vmlScale) + "px";
+  a.fontFamily = e.fontFamily;
+  a.color = e.fontColor;
+  a.verticalAlign = "top";
+  a.textAlign = b || "left";
+  a.lineHeight = Math.round(e.fontSize * mxConstants.LINE_HEIGHT / this.vmlScale) + "px";
+  (e.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (a.fontWeight = "bold");
+  (e.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (a.fontStyle = "italic");
+  (e.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && (a.fontDecoration = "underline");
+  return c
+};
+mxVmlCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) {
+  if (this.textEnabled && null != e) {
+    var p = this.state;
+    if ("html" == k) {
+      null != p.rotation && (b = this.rotatePoint(a, b, p.rotation, p.rotationCx, p.rotationCy), a = b.x, b = b.y);
+      8 == document.documentMode ? (a += p.dx, b += p.dy) : (a *= p.scale, b *= p.scale);
+      k = 8 == document.documentMode ? document.createElement(mxClient.VML_PREFIX + ":group") : document.createElement("div");
+      k.style.position = "absolute";
+      k.style.display = "inline";
+      k.style.left = this.format(a) + "px";
+      k.style.top = this.format(b) +
+        "px";
+      k.style.zoom = p.scale;
+      var q = document.createElement("div");
+      q.style.position = "relative";
+      q.style.display = "inline";
+      var s = mxUtils.getAlignmentAsPoint(f, g),
+        r = s.x,
+        s = s.y;
+      e = this.createDiv(e, f, g, l);
+      f = document.createElement("div");
+      h ? (!m && 0 < c && (e.style.width = Math.round(c) + "px"), e.style.whiteSpace = "normal") : e.style.whiteSpace = "nowrap";
+      h = p.rotation + (n || 0);
+      this.rotateHtml && 0 != h ? (f.style.display = "inline", f.style.zoom = "1", f.appendChild(e), 8 == document.documentMode && "DIV" != this.root.nodeName ? (q.appendChild(f), k.appendChild(q)) :
+        k.appendChild(f)) : 8 == document.documentMode ? (q.appendChild(e), k.appendChild(q)) : (e.style.display = "inline", k.appendChild(e));
+      "DIV" != this.root.nodeName ? (n = document.createElement(mxClient.VML_PREFIX + ":rect"), n.stroked = "false", n.filled = "false", n.appendChild(k), this.root.appendChild(n)) : this.root.appendChild(
+        k);
+      m ? (e.style.overflow = "hidden", 0 < c && (e.style.width = Math.round(c) + "px"), 0 < d && 8 == document.documentMode && (e.style.maxHeight = Math.round(d) + "px")) : l && (e.style.width = c +
+        "px", 0 < d && (e.style.maxHeight = Math.round(d) +
+          "px"));
+      if (this.rotateHtml && 0 != h) {
+        c = h * (Math.PI / 180);
+        h = parseFloat(parseFloat(Math.cos(c)).toFixed(8));
+        n = parseFloat(parseFloat(Math.sin(-c)).toFixed(8));
+        c %= 2 * Math.PI;
+        0 > c && (c += 2 * Math.PI);
+        c %= Math.PI;
+        c > Math.PI / 2 && (c = Math.PI - c);
+        g = Math.cos(c);
+        var t = Math.sin(c);
+        8 == document.documentMode && (e.style.display = "inline-block", f.style.display = "inline-block", q.style.display = "inline-block");
+        e.style.visibility = "hidden";
+        document.body.appendChild(e);
+        c = e.offsetWidth;
+        q = e.offsetHeight;
+        if (mxClient.IS_QUIRKS && (m || l) && q > d) q =
+          d, e.style.height = q + "px";
+        d = q;
+        m = (d - d * g + c * -t) / 2 - n * c * (r + 0.5) + h * d * (s + 0.5);
+        l = (c - c * g + d * -t) / 2 + h * c * (r + 0.5) + n * d * (s + 0.5);
+        "group" == k.nodeName && "DIV" == this.root.nodeName ? (r = document.createElement("div"), r.style.display = "inline-block", r.style.position = "absolute", r.style.left = this.format(a + (l -
+          c / 2) * p.scale) + "px", r.style.top = this.format(b + (m - d / 2) * p.scale) + "px", k.parentNode.appendChild(r), r.appendChild(k)) : (p = 8 == document.documentMode ? 1 : p.scale, k.style
+          .left = this.format(a + (l - c / 2) * p) + "px", k.style.top = this.format(b + (m -
+            d / 2) * p) + "px");
+        f.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11\x3d" + h + ", M12\x3d" + n + ", M21\x3d" + -n + ", M22\x3d" + h + ", sizingMethod\x3d'auto expand')";
+        f.style.backgroundColor = this.rotatedHtmlBackground;
+        1 > this.state.alpha && (f.style.filter += "alpha(opacity\x3d" + 100 * this.state.alpha + ")");
+        e.style.visibility = "";
+        f.appendChild(e)
+      } else 8 != document.documentMode ? (e.style.verticalAlign = "top", 1 > this.state.alpha && (k.style.filter = "alpha(opacity\x3d" + 100 * this.state.alpha + ")"), p = e.parentNode, e.style.visibility =
+        "hidden", document.body.appendChild(e), c = e.offsetWidth, q = e.offsetHeight, mxClient.IS_QUIRKS && (m && q > d) && (q = d, e.style.height = q + "px"), d = q, e.style.visibility = "", p.appendChild(
+          e), k.style.left = this.format(a + c * r * this.state.scale) + "px", k.style.top = this.format(b + d * s * this.state.scale) + "px") : (1 > this.state.alpha && (e.style.filter =
+        "alpha(opacity\x3d" + 100 * this.state.alpha + ")"), q.style.left = 100 * r + "%", q.style.top = 100 * s + "%")
+    } else this.plainText(a, b, c, d, mxUtils.htmlEntities(e, !1), f, g, h, k, l, m, n)
+  }
+};
+mxVmlCanvas2D.prototype.plainText = function(a, b, c, d, e, f, g, h, k, l, m, n) {
+  d = this.state;
+  a = (a + d.dx) * d.scale;
+  b = (b + d.dy) * d.scale;
+  c = document.createElement(mxClient.VML_PREFIX + ":shape");
+  c.style.width = "1px";
+  c.style.height = "1px";
+  c.stroked = "false";
+  l = document.createElement(mxClient.VML_PREFIX + ":fill");
+  l.color = d.fontColor;
+  l.opacity = 100 * d.alpha + "%";
+  c.appendChild(l);
+  l = document.createElement(mxClient.VML_PREFIX + ":path");
+  l.textpathok = "true";
+  l.v = "m " + this.format(0) + " " + this.format(0) + " l " + this.format(1) + " " + this.format(0);
+  c.appendChild(l);
+  l = document.createElement(mxClient.VML_PREFIX + ":textpath");
+  l.style.cssText = "v-text-align:" + f;
+  l.style.align = f;
+  l.style.fontFamily = d.fontFamily;
+  l.string = e;
+  l.on = "true";
+  f = Math.round(d.fontSize * d.scale / this.vmlScale);
+  l.style.fontSize = f + "px";
+  (d.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (l.style.fontWeight = "bold");
+  (d.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (l.style.fontStyle = "italic");
+  (d.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE &&
+    (l.style.textDecoration = "underline");
+  e = e.split("\n");
+  d = f + (e.length - 1) * f * mxConstants.LINE_HEIGHT;
+  f = e = 0;
+  g == mxConstants.ALIGN_BOTTOM ? f = -d / 2 : g != mxConstants.ALIGN_MIDDLE && (f = d / 2);
+  null != n && (c.style.rotation = n, g = n * (Math.PI / 180), e = Math.sin(g) * f, f *= Math.cos(g));
+  c.appendChild(l);
+  c.style.left = this.format(a - e) + "px";
+  c.style.top = this.format(b + f) + "px";
+  this.root.appendChild(c)
+};
+mxVmlCanvas2D.prototype.stroke = function() {
+  this.addNode(!1, !0)
+};
+mxVmlCanvas2D.prototype.fill = function() {
+  this.addNode(!0, !1)
+};
+mxVmlCanvas2D.prototype.fillAndStroke = function() {
+  this.addNode(!0, !0)
+};
+
+function mxGuide(a, b) {
+  this.graph = a;
+  this.setStates(b)
+}
+mxGuide.prototype.graph = null;
+mxGuide.prototype.states = null;
+mxGuide.prototype.horizontal = !0;
+mxGuide.prototype.vertical = !0;
+mxGuide.prototype.guideX = null;
+mxGuide.prototype.guideY = null;
+mxGuide.prototype.setStates = function(a) {
+  this.states = a
+};
+mxGuide.prototype.isEnabledForEvent = function(a) {
+  return !0
+};
+mxGuide.prototype.getGuideTolerance = function() {
+  return this.graph.gridSize * this.graph.view.scale / 2
+};
+mxGuide.prototype.createGuideShape = function(a) {
+  a = new mxPolyline([], mxConstants.GUIDE_COLOR, mxConstants.GUIDE_STROKEWIDTH);
+  a.isDashed = !0;
+  return a
+};
+mxGuide.prototype.move = function(a, b, c) {
+  if (null != this.states && (this.horizontal || this.vertical) && null != a && null != b) {
+    var d = this.graph.getView().translate,
+      e = this.graph.getView().scale,
+      f = b.x,
+      g = b.y,
+      h = !1,
+      k = !1,
+      l = this.getGuideTolerance(),
+      m = l,
+      n = l,
+      l = a.clone();
+    l.x += b.x;
+    l.y += b.y;
+    var p = l.x,
+      q = l.x + l.width,
+      s = l.getCenterX(),
+      r = l.y,
+      t = l.y + l.height,
+      v = l.getCenterY();
+    b = function(b) {
+      b += this.graph.panDx;
+      var c = !1;
+      Math.abs(b - s) < m ? (f = b - a.getCenterX(), m = Math.abs(b - s), c = !0) : Math.abs(b - p) < m ? (f = b - a.x, m = Math.abs(b - p), c = !0) : Math.abs(b -
+        q) < m && (f = b - a.x - a.width, m = Math.abs(b - q), c = !0);
+      if (c) {
+        null == this.guideX && (this.guideX = this.createGuideShape(!0), this.guideX.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG,
+          this.guideX.pointerEvents = !1, this.guideX.init(this.graph.getView().getOverlayPane()));
+        var d = this.graph.container;
+        b -= this.graph.panDx;
+        this.guideX.points = [new mxPoint(b, -this.graph.panDy), new mxPoint(b, d.scrollHeight - 3 - this.graph.panDy)]
+      }
+      h = h || c
+    };
+    for (var l = function(b) {
+        b += this.graph.panDy;
+        var c = !1;
+        Math.abs(b - v) < n ? (g = b - a.getCenterY(), n = Math.abs(b - v), c = !0) : Math.abs(b - r) < n ? (g = b - a.y, n = Math.abs(b - r), c = !0) : Math.abs(b - t) < n && (g = b - a.y - a.height,
+          n = Math.abs(b - t), c = !0);
+        if (c) {
+          null == this.guideY && (this.guideY = this.createGuideShape(!1), this.guideY.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG,
+            this.guideY.pointerEvents = !1, this.guideY.init(this.graph.getView().getOverlayPane()));
+          var d = this.graph.container;
+          b -= this.graph.panDy;
+          this.guideY.points = [new mxPoint(-this.graph.panDx,
+            b), new mxPoint(d.scrollWidth - 3 - this.graph.panDx, b)]
+        }
+        k = k || c
+      }, w = 0; w < this.states.length; w++) {
+      var u = this.states[w];
+      null != u && (this.horizontal && (b.call(this, u.getCenterX()), b.call(this, u.x), b.call(this, u.x + u.width)), this.vertical && (l.call(this, u.getCenterY()), l.call(this, u.y), l.call(this,
+        u.y + u.height)))
+    }!h && null != this.guideX ? this.guideX.node.style.visibility = "hidden" : null != this.guideX && (this.guideX.node.style.visibility = "visible", this.guideX.redraw());
+    !k && null != this.guideY ? this.guideY.node.style.visibility =
+      "hidden" : null != this.guideY && (this.guideY.node.style.visibility = "visible", this.guideY.redraw());
+    c && (h || (c = a.x - (this.graph.snap(a.x / e - d.x) + d.x) * e, f = this.graph.snap(f / e) * e - c), k || (d = a.y - (this.graph.snap(a.y / e - d.y) + d.y) * e, g = this.graph.snap(g / e) * e -
+      d));
+    b = new mxPoint(f, g)
+  }
+  return b
+};
+mxGuide.prototype.hide = function() {
+  null != this.guideX && (this.guideX.node.style.visibility = "hidden");
+  null != this.guideY && (this.guideY.node.style.visibility = "hidden")
+};
+mxGuide.prototype.destroy = function() {
+  null != this.guideX && (this.guideX.destroy(), this.guideX = null);
+  null != this.guideY && (this.guideY.destroy(), this.guideY = null)
+};
+
+function mxStencil(a) {
+  this.desc = a;
+  this.parseDescription();
+  this.parseConstraints()
+}
+mxStencil.defaultLocalized = !1;
+mxStencil.prototype.desc = null;
+mxStencil.prototype.constraints = null;
+mxStencil.prototype.aspect = null;
+mxStencil.prototype.w0 = null;
+mxStencil.prototype.h0 = null;
+mxStencil.prototype.bgNode = null;
+mxStencil.prototype.fgNode = null;
+mxStencil.prototype.strokewidth = null;
+mxStencil.prototype.parseDescription = function() {
+  this.fgNode = this.desc.getElementsByTagName("foreground")[0];
+  this.bgNode = this.desc.getElementsByTagName("background")[0];
+  this.w0 = Number(this.desc.getAttribute("w") || 100);
+  this.h0 = Number(this.desc.getAttribute("h") || 100);
+  var a = this.desc.getAttribute("aspect");
+  this.aspect = null != a ? a : "variable";
+  a = this.desc.getAttribute("strokewidth");
+  this.strokewidth = null != a ? a : "1"
+};
+mxStencil.prototype.parseConstraints = function() {
+  var a = this.desc.getElementsByTagName("connections")[0];
+  if (null != a && (a = mxUtils.getChildNodes(a), null != a && 0 < a.length)) {
+    this.constraints = [];
+    for (var b = 0; b < a.length; b++) this.constraints.push(this.parseConstraint(a[b]))
+  }
+};
+mxStencil.prototype.parseConstraint = function(a) {
+  var b = Number(a.getAttribute("x")),
+    c = Number(a.getAttribute("y"));
+  a = "1" == a.getAttribute("perimeter");
+  return new mxConnectionConstraint(new mxPoint(b, c), a)
+};
+mxStencil.prototype.evaluateTextAttribute = function(a, b, c) {
+  b = this.evaluateAttribute(a, b, c);
+  a = a.getAttribute("localized");
+  if (mxStencil.defaultLocalized && null == a || "1" == a) b = mxResources.get(b);
+  return b
+};
+mxStencil.prototype.evaluateAttribute = function(a, b, c) {
+  b = a.getAttribute(b);
+  null == b && (a = mxUtils.getTextContent(a), null != a && (a = mxUtils.eval(a), "function" == typeof a && (b = a(c))));
+  return b
+};
+mxStencil.prototype.drawShape = function(a, b, c, d, e, f) {
+  this.drawChildren(a, b, c, d, e, f, this.bgNode, !1);
+  this.drawChildren(a, b, c, d, e, f, this.fgNode, !0)
+};
+mxStencil.prototype.drawChildren = function(a, b, c, d, e, f, g, h) {
+  if (null != g) {
+    var k = mxUtils.getValue(b.style, mxConstants.STYLE_DIRECTION, null);
+    c = this.computeAspect(b.style, c, d, e, f, k);
+    d = Math.min(c.width, c.height);
+    d = "inherit" == this.strokewidth ? Number(mxUtils.getNumber(b.style, mxConstants.STYLE_STROKEWIDTH, 1)) : Number(this.strokewidth) * d;
+    a.setStrokeWidth(d);
+    for (g = g.firstChild; null != g;) g.nodeType == mxConstants.NODETYPE_ELEMENT && this.drawNode(a, b, g, c, h), g = g.nextSibling
+  }
+};
+mxStencil.prototype.computeAspect = function(a, b, c, d, e, f) {
+  a = b;
+  b = d / this.w0;
+  var g = e / this.h0;
+  if (f = "north" == f || "south" == f) {
+    g = d / this.h0;
+    b = e / this.w0;
+    var h = (d - e) / 2;
+    a += h;
+    c -= h
+  }
+  "fixed" == this.aspect && (b = g = Math.min(b, g), f ? (a += (e - this.w0 * b) / 2, c += (d - this.h0 * g) / 2) : (a += (d - this.w0 * b) / 2, c += (e - this.h0 * g) / 2));
+  return new mxRectangle(a, c, b, g)
+};
+mxStencil.prototype.drawNode = function(a, b, c, d, e) {
+  var f = c.nodeName,
+    g = d.x,
+    h = d.y,
+    k = d.width,
+    l = d.height,
+    m = Math.min(k, l);
+  if ("save" == f) a.save();
+  else if ("restore" == f) a.restore();
+  else if ("path" == f) {
+    a.begin();
+    for (c = c.firstChild; null != c;) c.nodeType == mxConstants.NODETYPE_ELEMENT && this.drawNode(a, b, c, d, e), c = c.nextSibling
+  } else if ("close" == f) a.close();
+  else if ("move" == f) a.moveTo(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l);
+  else if ("line" == f) a.lineTo(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) *
+    l);
+  else if ("quad" == f) a.quadTo(g + Number(c.getAttribute("x1")) * k, h + Number(c.getAttribute("y1")) * l, g + Number(c.getAttribute("x2")) * k, h + Number(c.getAttribute("y2")) * l);
+  else if ("curve" == f) a.curveTo(g + Number(c.getAttribute("x1")) * k, h + Number(c.getAttribute("y1")) * l, g + Number(c.getAttribute("x2")) * k, h + Number(c.getAttribute("y2")) * l, g + Number(
+    c.getAttribute("x3")) * k, h + Number(c.getAttribute("y3")) * l);
+  else if ("arc" == f) a.arcTo(Number(c.getAttribute("rx")) * k, Number(c.getAttribute("ry")) * l, Number(c.getAttribute("x-axis-rotation")),
+    Number(c.getAttribute("large-arc-flag")), Number(c.getAttribute("sweep-flag")), g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l);
+  else if ("rect" == f) a.rect(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute("h")) * l);
+  else if ("roundrect" == f) b = c.getAttribute("arcsize"), 0 == b && (b = 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR), m = Number(c.getAttribute("w")) * k, d = Number(c.getAttribute("h")) * l, b =
+    Number(b) / 100, b = Math.min(m * b, d * b), a.roundrect(g +
+      Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, m, d, b, b);
+  else if ("ellipse" == f) a.ellipse(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute("h")) * l);
+  else if ("image" == f) b = this.evaluateAttribute(c, "src", b), a.image(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute(
+    "h")) * l, b, !1, "1" == c.getAttribute("flipH"), "1" == c.getAttribute("flipV"));
+  else if ("text" == f) {
+    m = this.evaluateTextAttribute(c,
+      "str", b);
+    d = "1" == c.getAttribute("vertical") ? -90 : 0;
+    if ("0" == c.getAttribute("align-shape")) {
+      var n = b.rotation,
+        p = 1 == mxUtils.getValue(b.style, mxConstants.STYLE_FLIPH, 0);
+      b = 1 == mxUtils.getValue(b.style, mxConstants.STYLE_FLIPV, 0);
+      d = p && b ? d - n : p || b ? d + n : d - n
+    }
+    d -= c.getAttribute("rotation");
+    a.text(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, 0, 0, m, c.getAttribute("align") || "left", c.getAttribute("valign") || "top", !1, "", !1, !1, d)
+  } else if ("include-shape" == f) n = mxStencilRegistry.getStencil(c.getAttribute("name")),
+    null != n && (g += Number(c.getAttribute("x")) * k, h += Number(c.getAttribute("y")) * l, m = Number(c.getAttribute("w")) * k, d = Number(c.getAttribute("h")) * l, n.drawShape(a, b, g, h, m, d));
+  else if ("fillstroke" == f) a.fillAndStroke();
+  else if ("fill" == f) a.fill();
+  else if ("stroke" == f) a.stroke();
+  else if ("strokewidth" == f) a.setStrokeWidth(Number(c.getAttribute("width")) * m);
+  else if ("dashed" == f) a.setDashed("1" == c.getAttribute("dashed"));
+  else if ("dashpattern" == f) {
+    if (c = c.getAttribute("pattern"), null != c) {
+      c = c.split(" ");
+      k = [];
+      for (l = 0; l <
+        c.length; l++) 0 < c[l].length && k.push(Number(c[l]) * m);
+      c = k.join(" ");
+      a.setDashPattern(c)
+    }
+  } else "strokecolor" == f ? a.setStrokeColor(c.getAttribute("color")) : "linecap" == f ? a.setLineCap(c.getAttribute("cap")) : "linejoin" == f ? a.setLineJoin(c.getAttribute("join")) :
+    "miterlimit" == f ? a.setMiterLimit(Number(c.getAttribute("limit"))) : "fillcolor" == f ? a.setFillColor(c.getAttribute("color")) : "alpha" == f ? a.setAlpha(c.getAttribute("alpha")) :
+    "fontcolor" == f ? a.setFontColor(c.getAttribute("color")) : "fontstyle" == f ? a.setFontStyle(c.getAttribute("style")) :
+    "fontfamily" == f ? a.setFontFamily(c.getAttribute("family")) : "fontsize" == f && a.setFontSize(Number(c.getAttribute("size")) * m);
+  e && ("fillstroke" == f || "fill" == f || "stroke" == f) && a.setShadow(!1)
+};
+
+function mxShape(a) {
+  this.stencil = a;
+  this.strokewidth = 1;
+  this.rotation = 0;
+  this.opacity = 100;
+  this.flipV = this.flipH = !1
+}
+mxShape.prototype.dialect = null;
+mxShape.prototype.scale = 1;
+mxShape.prototype.bounds = null;
+mxShape.prototype.points = null;
+mxShape.prototype.node = null;
+mxShape.prototype.style = null;
+mxShape.prototype.style = null;
+mxShape.prototype.boundingBox = null;
+mxShape.prototype.stencil = null;
+mxShape.prototype.svgStrokeTolerance = 6;
+mxShape.prototype.pointerEvents = !0;
+mxShape.prototype.stencilPointerEvents = !1;
+mxShape.prototype.vmlScale = 1;
+mxShape.prototype.init = function(a) {
+  null == this.node && (this.node = this.create(a), null != a && a.appendChild(this.node))
+};
+mxShape.prototype.isParseVml = function() {
+  return !0
+};
+mxShape.prototype.isHtmlAllowed = function() {
+  return !1
+};
+mxShape.prototype.getSvgScreenOffset = function() {
+  return 1 == mxUtils.mod(Math.max(1, Math.round(this.strokewidth * this.scale)), 2) ? 0.5 : 0
+};
+mxShape.prototype.create = function(a) {
+  var b = null;
+  return b = null != a.ownerSVGElement ? this.createSvg(a) : 8 == document.documentMode || this.dialect == mxConstants.DIALECT_SVG || this.dialect != mxConstants.DIALECT_VML && this.isHtmlAllowed() ?
+    this.createHtml(a) : this.createVml(a)
+};
+mxShape.prototype.createSvg = function() {
+  return document.createElementNS(mxConstants.NS_SVG, "g")
+};
+mxShape.prototype.createVml = function() {
+  var a = document.createElement(mxClient.VML_PREFIX + ":group");
+  a.style.position = "absolute";
+  return a
+};
+mxShape.prototype.createHtml = function() {
+  var a = document.createElement("div");
+  a.style.position = "absolute";
+  return a
+};
+mxShape.prototype.reconfigure = function() {
+  this.redraw()
+};
+mxShape.prototype.redraw = function() {
+  this.updateBoundsFromPoints();
+  this.checkBounds() ? (this.node.style.visibility = "", "DIV" == this.node.nodeName && this.isHtmlAllowed() ? this.redrawHtmlShape() : this.redrawShape(), this.updateBoundingBox()) : (this.node.style
+    .visibility = "hidden", this.boundingBox = null)
+};
+mxShape.prototype.updateBoundsFromPoints = function() {
+  var a = this.points;
+  if (null != a && 0 < a.length && null != a[0]) {
+    this.bounds = new mxRectangle(Number(a[0].x), Number(a[0].y), 1, 1);
+    for (var b = 1; b < this.points.length; b++) null != a[b] && this.bounds.add(new mxRectangle(Number(a[b].x), Number(a[b].y), 1, 1))
+  }
+};
+mxShape.prototype.checkBounds = function() {
+  return null != this.bounds && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) && !isNaN(this.bounds.width) && !isNaN(this.bounds.height) && 0 < this.bounds.width && 0 < this.bounds.height
+};
+mxShape.prototype.createVmlGroup = function() {
+  var a = document.createElement(mxClient.VML_PREFIX + ":group");
+  a.style.position = "absolute";
+  a.style.width = this.node.style.width;
+  a.style.height = this.node.style.height;
+  return a
+};
+mxShape.prototype.redrawShape = function() {
+  var a = this.createCanvas();
+  for (a.pointerEvents = this.pointerEvents; this.node.hasChildNodes();) this.node.removeChild(this.node.lastChild);
+  this.paint(a);
+  this.node != a.root && this.node.insertAdjacentHTML("beforeend", a.root.outerHTML);
+  "DIV" == this.node.nodeName && 8 == document.documentMode && (this.node.style.filter = "", (null == this.stencil || !this.stencilPointerEvents) && mxUtils.addTransparentBackgroundFilter(this.node));
+  this.destroyCanvas(a)
+};
+mxShape.prototype.createCanvas = function() {
+  var a = null,
+    b = null;
+  if (null != this.node.ownerSVGElement) a = new mxSvgCanvas2D(this.node, !1), a.strokeTolerance = this.svgStrokeTolerance, a.blockImagePointerEvents = mxClient.IS_NS && !mxClient.IS_SF && !
+    mxClient.IS_GC, b = this.getSvgScreenOffset(), 0 != b ? this.node.setAttribute("transform", "translate(" + b + "," + b + ")") : this.node.removeAttribute("transform");
+  else {
+    this.updateVmlContainer();
+    var c = Math.max(1, Math.round(this.bounds.width)),
+      d = Math.max(1, Math.round(this.bounds.height)),
+      b = 8 == document.documentMode && this.isParseVml() ? this.createVmlGroup() : this.node,
+      a = new mxVmlCanvas2D(b, !1);
+    "" != b.tagUrn && (b.coordsize = c * this.vmlScale + "," + d * this.vmlScale, a.scale(this.vmlScale), a.vmlScale = this.vmlScale);
+    b = this.scale;
+    a.translate(-Math.round(this.bounds.x / b), -Math.round(this.bounds.y / b))
+  }
+  return a
+};
+mxShape.prototype.updateVmlContainer = function() {
+  this.node.style.left = Math.round(this.bounds.x) + "px";
+  this.node.style.top = Math.round(this.bounds.y) + "px";
+  var a = Math.max(1, Math.round(this.bounds.width)),
+    b = Math.max(1, Math.round(this.bounds.height));
+  this.node.style.width = a + "px";
+  this.node.style.height = b + "px";
+  this.node.style.overflow = "visible"
+};
+mxShape.prototype.destroyCanvas = function(a) {
+  if (a instanceof mxSvgCanvas2D) {
+    for (var b in a.gradients) {
+      var c = a.gradients[b];
+      c.mxRefCount = (c.mxRefCount || 0) + 1
+    }
+    this.releaseSvgGradients(this.oldGradients);
+    this.oldGradients = a.gradients
+  }
+};
+mxShape.prototype.paint = function(a) {
+  var b = this.scale,
+    c = this.bounds.x / b,
+    d = this.bounds.y / b,
+    e = this.bounds.width / b,
+    f = this.bounds.height / b;
+  if (this.isPaintBoundsInverted()) var g = (e - f) / 2,
+    c = c + g,
+    d = d - g,
+    g = e,
+    e = f,
+    f = g;
+  this.updateTransform(a, c, d, e, f);
+  this.configureCanvas(a, c, d, e, f);
+  if (null != this.stencil) this.paintStencilShape(a, c, d, e, f);
+  else if (a.setStrokeWidth(this.strokewidth), null != this.points) {
+    c = [];
+    for (d = 0; d < this.points.length; d++) c.push(new mxPoint(this.points[d].x / b, this.points[d].y / b));
+    this.paintEdgeShape(a,
+      c)
+  } else this.paintVertexShape(a, c, d, e, f)
+};
+mxShape.prototype.configureCanvas = function(a, b, c, d, e) {
+  var f = null;
+  null != this.style && (f = this.style.dashPattern);
+  a.setAlpha(this.opacity / 100);
+  null != this.isShadow && a.setShadow(this.isShadow);
+  null != this.isDashed && a.setDashed(this.isDashed);
+  null != f && a.setDashPattern(f);
+  null != this.gradient ? (b = this.getGradientBounds(a, b, c, d, e), a.setGradient(this.fill, this.gradient, b.x, b.y, b.width, b.height, this.gradientDirection)) : a.setFillColor(this.fill);
+  a.setStrokeColor(this.stroke)
+};
+mxShape.prototype.getGradientBounds = function(a, b, c, d, e) {
+  return new mxRectangle(b, c, d, e)
+};
+mxShape.prototype.updateTransform = function(a, b, c, d, e) {
+  a.scale(this.scale);
+  a.rotate(this.getShapeRotation(), this.flipH, this.flipV, b + d / 2, c + e / 2)
+};
+mxShape.prototype.paintStencilShape = function(a, b, c, d, e) {
+  this.stencilPointerEvents && (this.dialect == mxConstants.DIALECT_SVG ? this.addTransparentBackgroundRectangle(this.node, b, c, d, e) : 8 != document.documentMode && this.setTransparentBackgroundImage(
+    this.node));
+  this.stencil.drawShape(a, this, b, c, d, e)
+};
+mxShape.prototype.paintVertexShape = function(a, b, c, d, e) {
+  this.paintBackground(a, b, c, d, e);
+  a.setShadow(!1);
+  this.paintForeground(a, b, c, d, e)
+};
+mxShape.prototype.paintBackground = function(a, b, c, d, e) {};
+mxShape.prototype.paintForeground = function(a, b, c, d, e) {};
+mxShape.prototype.paintEdgeShape = function(a, b) {};
+mxShape.prototype.getArcSize = function(a, b) {
+  var c = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100;
+  return Math.min(a * c, b * c)
+};
+mxShape.prototype.paintGlassEffect = function(a, b, c, d, e, f) {
+  var g = Math.ceil(this.strokewidth / 2);
+  a.setGradient("#ffffff", "#ffffff", b, c, d, 0.6 * e, "south", 0.9, 0.1);
+  a.begin();
+  f += 2 * g;
+  this.isRounded ? (a.moveTo(b - g + f, c - g), a.quadTo(b - g, c - g, b - g, c - g + f), a.lineTo(b - g, c + 0.4 * e), a.quadTo(b + 0.5 * d, c + 0.7 * e, b + d + g, c + 0.4 * e), a.lineTo(b + d +
+    g, c - g + f), a.quadTo(b + d + g, c - g, b + d + g - f, c - g)) : (a.moveTo(b - g, c - g), a.lineTo(b - g, c + 0.4 * e), a.quadTo(b + 0.5 * d, c + 0.7 * e, b + d + g, c + 0.4 * e), a.lineTo(
+    b + d + g, c - g));
+  a.close();
+  a.fill()
+};
+mxShape.prototype.apply = function(a) {
+  this.state = a;
+  this.style = a.style;
+  if (null != this.style) {
+    this.fill = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, this.fill);
+    this.gradient = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENTCOLOR, this.gradient);
+    this.gradientDirection = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENT_DIRECTION, this.gradientDirection);
+    this.opacity = mxUtils.getValue(this.style, mxConstants.STYLE_OPACITY, this.opacity);
+    this.stroke = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR,
+      this.stroke);
+    this.strokewidth = mxUtils.getNumber(this.style, mxConstants.STYLE_STROKEWIDTH, this.strokewidth);
+    this.spacing = mxUtils.getValue(this.style, mxConstants.STYLE_SPACING, this.spacing);
+    this.startSize = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, this.startSize);
+    this.endSize = mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, this.endSize);
+    this.startArrow = mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, this.startArrow);
+    this.endArrow = mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW,
+      this.endArrow);
+    this.rotation = mxUtils.getValue(this.style, mxConstants.STYLE_ROTATION, this.rotation);
+    this.direction = mxUtils.getValue(this.style, mxConstants.STYLE_DIRECTION, this.direction);
+    this.flipH = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_FLIPH, 0);
+    this.flipV = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_FLIPV, 0);
+    null != this.stencil && (this.flipH = 1 == mxUtils.getValue(this.style, "stencilFlipH", 0) || this.flipH, this.flipV = 1 == mxUtils.getValue(this.style, "stencilFlipV", 0) || this.flipV);
+    if ("north" ==
+      this.direction || "south" == this.direction) a = this.flipH, this.flipH = this.flipV, this.flipV = a;
+    this.isShadow = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_SHADOW, this.isShadow);
+    this.isDashed = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_DASHED, this.isDashed);
+    this.isRounded = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_ROUNDED, this.isRounded);
+    this.glass = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_GLASS, this.glass);
+    "none" == this.fill && (this.fill = null);
+    "none" == this.gradient && (this.gradient = null);
+    "none" == this.stroke && (this.stroke = null)
+  }
+};
+mxShape.prototype.setCursor = function(a) {
+  null == a && (a = "");
+  this.cursor = a;
+  null != this.node && (this.node.style.cursor = a)
+};
+mxShape.prototype.getCursor = function() {
+  return this.cursor
+};
+mxShape.prototype.updateBoundingBox = function() {
+  if (null != this.bounds) {
+    var a = this.createBoundingBox();
+    if (null != a) {
+      this.augmentBoundingBox(a);
+      var b = this.getShapeRotation();
+      0 != b && (a = mxUtils.getBoundingBox(a, b));
+      a.x = Math.floor(a.x);
+      a.y = Math.floor(a.y);
+      a.width = Math.ceil(a.width);
+      a.height = Math.ceil(a.height)
+    }
+    this.boundingBox = a
+  }
+};
+mxShape.prototype.createBoundingBox = function() {
+  var a = this.bounds.clone();
+  if (this.isPaintBoundsInverted()) {
+    var b = (a.width - a.height) / 2;
+    a.x += b;
+    a.y -= b;
+    b = a.width;
+    a.width = a.height;
+    a.height = b
+  }
+  return a
+};
+mxShape.prototype.augmentBoundingBox = function(a) {
+  this.isShadow && (a.width += Math.ceil(mxConstants.SHADOW_OFFSET_X * this.scale), a.height += Math.ceil(mxConstants.SHADOW_OFFSET_Y * this.scale));
+  var b = Math.ceil(this.strokewidth * this.scale);
+  a.grow(Math.ceil(b / 2))
+};
+mxShape.prototype.isPaintBoundsInverted = function() {
+  return null == this.stencil && ("north" == this.direction || "south" == this.direction)
+};
+mxShape.prototype.getRotation = function() {
+  return null != this.rotation ? this.rotation : 0
+};
+mxShape.prototype.getTextRotation = function() {
+  var a = this.getRotation();
+  1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) && (a += mxText.prototype.verticalTextRotation);
+  return a
+};
+mxShape.prototype.getShapeRotation = function() {
+  var a = this.getRotation();
+  null != this.direction && ("north" == this.direction ? a += 270 : "west" == this.direction ? a += 180 : "south" == this.direction && (a += 90));
+  return a
+};
+mxShape.prototype.addTransparentBackgroundRectangle = function(a, b, c, d, e) {
+  a = document.createElementNS(mxConstants.NS_SVG, "rect");
+  a.setAttribute("x", b);
+  a.setAttribute("y", c);
+  a.setAttribute("width", d);
+  a.setAttribute("height", e);
+  a.setAttribute("fill", "none");
+  a.setAttribute("stroke", "none");
+  a.setAttribute("pointer-events", "all");
+  this.node.appendChild(a)
+};
+mxShape.prototype.setTransparentBackgroundImage = function(a) {
+  a.style.backgroundImage = "url('" + mxClient.imageBasePath + "/transparent.gif')"
+};
+mxShape.prototype.releaseSvgGradients = function(a) {
+  if (null != a)
+    for (var b in a) {
+      var c = a[b];
+      c.mxRefCount = (c.mxRefCount || 0) - 1;
+      0 == c.mxRefCount && null != c.parentNode && c.parentNode.removeChild(c)
+    }
+};
+mxShape.prototype.destroy = function() {
+  null != this.node && (mxEvent.release(this.node), null != this.node.parentNode && this.node.parentNode.removeChild(this.node), this.node = null);
+  this.releaseSvgGradients(this.oldGradients);
+  this.oldGradients = null
+};
+var mxStencilRegistry = {
+    stencils: [],
+    addStencil: function(a, b) {
+      mxStencilRegistry.stencils[a] = b
+    },
+    getStencil: function(a) {
+      return mxStencilRegistry.stencils[a]
+    }
+  },
+  mxMarker = {
+    markers: [],
+    addMarker: function(a, b) {
+      mxMarker.markers[a] = b
+    },
+    createMarker: function(a, b, c, d, e, f, g, h, k, l) {
+      var m = mxMarker.markers[c];
+      return null != m ? m(a, b, c, d, e, f, g, h, k, l) : null
+    }
+  };
+(function() {
+  function a(a, b, e, f, g, h, k, l, m, n) {
+    b = 1.118 * g * m;
+    l = 1.118 * h * m;
+    g *= k + m;
+    h *= k + m;
+    var p = f.clone();
+    p.x -= b;
+    p.y -= l;
+    k = e != mxConstants.ARROW_CLASSIC ? 1 : 0.75;
+    f.x += -g * k - b;
+    f.y += -h * k - l;
+    return function() {
+      a.begin();
+      a.moveTo(p.x, p.y);
+      a.lineTo(p.x - g - h / 2, p.y - h + g / 2);
+      e == mxConstants.ARROW_CLASSIC && a.lineTo(p.x - 3 * g / 4, p.y - 3 * h / 4);
+      a.lineTo(p.x + h / 2 - g, p.y - h - g / 2);
+      a.close();
+      n ? a.fillAndStroke() : a.stroke()
+    }
+  }
+
+  function b(a, b, e, f, g, h, k, l, m, n) {
+    l = e == mxConstants.ARROW_DIAMOND ? 0.7071 : 0.9862;
+    b = g * m * l;
+    l *= h * m;
+    g *= k + m;
+    h *= k + m;
+    var p = f.clone();
+    p.x -= b;
+    p.y -= l;
+    f.x += -g - b;
+    f.y += -h - l;
+    var q = e == mxConstants.ARROW_DIAMOND ? 2 : 3.4;
+    return function() {
+      a.begin();
+      a.moveTo(p.x, p.y);
+      a.lineTo(p.x - g / 2 - h / q, p.y + g / q - h / 2);
+      a.lineTo(p.x - g, p.y - h);
+      a.lineTo(p.x - g / 2 + h / q, p.y - h / 2 - g / q);
+      a.close();
+      n ? a.fillAndStroke() : a.stroke()
+    }
+  }
+  mxMarker.addMarker("classic", a);
+  mxMarker.addMarker("block", a);
+  mxMarker.addMarker("open", function(a, b, e, f, g, h, k, l, m, n) {
+    b = 1.118 * g * m;
+    e = 1.118 * h * m;
+    g *= k + m;
+    h *= k + m;
+    var p = f.clone();
+    p.x -= b;
+    p.y -= e;
+    f.x += 2 * -b;
+    f.y += 2 * -e;
+    return function() {
+      a.begin();
+      a.moveTo(p.x - g -
+        h / 2, p.y - h + g / 2);
+      a.lineTo(p.x, p.y);
+      a.lineTo(p.x + h / 2 - g, p.y - h - g / 2);
+      a.stroke()
+    }
+  });
+  mxMarker.addMarker("oval", function(a, b, e, f, g, h, k, l, m, n) {
+    var p = k / 2,
+      q = f.clone();
+    f.x -= g * p;
+    f.y -= h * p;
+    return function() {
+      a.ellipse(q.x - p, q.y - p, k, k);
+      n ? a.fillAndStroke() : a.stroke()
+    }
+  });
+  mxMarker.addMarker("diamond", b);
+  mxMarker.addMarker("diamondThin", b)
+})();
+
+function mxActor(a, b, c, d) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxActor, mxShape);
+mxActor.prototype.paintVertexShape = function(a, b, c, d, e) {
+  a.translate(b, c);
+  a.begin();
+  this.redrawPath(a, b, c, d, e);
+  a.fillAndStroke()
+};
+mxActor.prototype.redrawPath = function(a, b, c, d, e) {
+  b = d / 3;
+  a.moveTo(0, e);
+  a.curveTo(0, 3 * e / 5, 0, 2 * e / 5, d / 2, 2 * e / 5);
+  a.curveTo(d / 2 - b, 2 * e / 5, d / 2 - b, 0, d / 2, 0);
+  a.curveTo(d / 2 + b, 0, d / 2 + b, 2 * e / 5, d / 2, 2 * e / 5);
+  a.curveTo(d, 2 * e / 5, d, 3 * e / 5, d, e);
+  a.close()
+};
+
+function mxCloud(a, b, c, d) {
+  mxActor.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxCloud, mxActor);
+mxCloud.prototype.redrawPath = function(a, b, c, d, e) {
+  a.moveTo(0.25 * d, 0.25 * e);
+  a.curveTo(0.05 * d, 0.25 * e, 0, 0.5 * e, 0.16 * d, 0.55 * e);
+  a.curveTo(0, 0.66 * e, 0.18 * d, 0.9 * e, 0.31 * d, 0.8 * e);
+  a.curveTo(0.4 * d, e, 0.7 * d, e, 0.8 * d, 0.8 * e);
+  a.curveTo(d, 0.8 * e, d, 0.6 * e, 0.875 * d, 0.5 * e);
+  a.curveTo(d, 0.3 * e, 0.8 * d, 0.1 * e, 0.625 * d, 0.2 * e);
+  a.curveTo(0.5 * d, 0.05 * e, 0.3 * d, 0.05 * e, 0.25 * d, 0.25 * e);
+  a.close()
+};
+
+function mxRectangleShape(a, b, c, d) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxRectangleShape, mxShape);
+mxRectangleShape.prototype.isHtmlAllowed = function() {
+  return !this.isRounded && !this.glass && 0 == this.rotation
+};
+mxRectangleShape.prototype.paintBackground = function(a, b, c, d, e) {
+  if (this.isRounded) {
+    var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100,
+      f = Math.min(d * f, e * f);
+    a.roundrect(b, c, d, e, f, f)
+  } else a.rect(b, c, d, e);
+  a.fillAndStroke()
+};
+mxRectangleShape.prototype.paintForeground = function(a, b, c, d, e) {
+  this.glass && this.paintGlassEffect(a, b, c, d, e, this.getArcSize(d + this.strokewidth, e + this.strokewidth))
+};
+mxRectangleShape.prototype.redrawHtmlShape = function() {
+  this.updateHtmlBounds(this.node);
+  this.updateHtmlFilters(this.node);
+  this.updateHtmlColors(this.node)
+};
+mxRectangleShape.prototype.updateHtmlBounds = function(a) {
+  var b = 9 <= document.documentMode ? 0 : Math.ceil(this.strokewidth * this.scale);
+  a.style.borderWidth = Math.max(1, b) + "px";
+  a.style.overflow = "hidden";
+  a.style.left = Math.round(this.bounds.x - b / 2) + "px";
+  a.style.top = Math.round(this.bounds.y - b / 2) + "px";
+  "CSS1Compat" == document.compatMode && (b = -b);
+  a.style.width = Math.round(Math.max(0, this.bounds.width + b)) + "px";
+  a.style.height = Math.round(Math.max(0, this.bounds.height + b)) + "px"
+};
+mxRectangleShape.prototype.updateHtmlColors = function(a) {
+  var b = this.stroke;
+  null != b && b != mxConstants.NONE ? (a.style.borderColor = b, this.isDashed ? a.style.borderStyle = "dashed" : 0 < this.strokewidth && (a.style.borderStyle = "solid"), a.style.borderWidth = Math
+    .max(1, Math.ceil(this.strokewidth * this.scale)) + "px") : a.style.borderWidth = "0px";
+  b = this.fill;
+  null != b && b != mxConstants.NONE ? (a.style.backgroundColor = b, a.style.backgroundImage = "none") : this.pointerEvents ? a.style.backgroundColor = "transparent" : 8 == document.documentMode ?
+    mxUtils.addTransparentBackgroundFilter(a) : this.setTransparentBackgroundImage(a)
+};
+mxRectangleShape.prototype.updateHtmlFilters = function(a) {
+  var b = "";
+  100 > this.opacity && (b += "alpha(opacity\x3d" + this.opacity + ")");
+  this.isShadow && (b += "progid:DXImageTransform.Microsoft.dropShadow (OffX\x3d'" + Math.round(mxConstants.SHADOW_OFFSET_X * this.scale) + "', OffY\x3d'" + Math.round(mxConstants.SHADOW_OFFSET_Y *
+    this.scale) + "', Color\x3d'" + mxConstants.SHADOWCOLOR + "')");
+  if (this.gradient) {
+    var c = this.fill,
+      d = this.gradient,
+      e = "0",
+      f = {
+        east: 0,
+        south: 1,
+        west: 2,
+        north: 3
+      },
+      g = null != this.direction ? f[this.direction] : 0;
+    null !=
+      this.gradientDirection && (g = mxUtils.mod(g + f[this.gradientDirection] - 1, 4));
+    1 == g ? (e = "1", f = c, c = d, d = f) : 2 == g ? (f = c, c = d, d = f) : 3 == g && (e = "1");
+    b += "progid:DXImageTransform.Microsoft.gradient(startColorStr\x3d'" + c + "', endColorStr\x3d'" + d + "', gradientType\x3d'" + e + "')"
+  }
+  a.style.filter = b
+};
+
+function mxEllipse(a, b, c, d) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxEllipse, mxShape);
+mxEllipse.prototype.paintVertexShape = function(a, b, c, d, e) {
+  a.ellipse(b, c, d, e);
+  a.fillAndStroke()
+};
+
+function mxDoubleEllipse(a, b, c, d) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxDoubleEllipse, mxShape);
+mxDoubleEllipse.prototype.vmlScale = 10;
+mxDoubleEllipse.prototype.paintBackground = function(a, b, c, d, e) {
+  a.ellipse(b, c, d, e);
+  a.fillAndStroke()
+};
+mxDoubleEllipse.prototype.paintForeground = function(a, b, c, d, e) {
+  var f = Math.min(4, Math.min(d / 5, e / 5));
+  d -= 2 * f;
+  e -= 2 * f;
+  0 < d && 0 < e && a.ellipse(b + f, c + f, d, e);
+  a.stroke()
+};
+
+function mxRhombus(a, b, c, d) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxRhombus, mxShape);
+mxRhombus.prototype.paintVertexShape = function(a, b, c, d, e) {
+  var f = d / 2,
+    g = e / 2;
+  a.begin();
+  a.moveTo(b + f, c);
+  a.lineTo(b + d, c + g);
+  a.lineTo(b + f, c + e);
+  a.lineTo(b, c + g);
+  a.close();
+  a.fillAndStroke()
+};
+
+function mxPolyline(a, b, c) {
+  mxShape.call(this);
+  this.points = a;
+  this.stroke = b;
+  this.strokewidth = null != c ? c : 1
+}
+mxUtils.extend(mxPolyline, mxShape);
+mxPolyline.prototype.getRotation = function() {
+  return 0
+};
+mxPolyline.prototype.paintEdgeShape = function(a, b) {
+  this.paintLine(a, b, this.isRounded)
+};
+mxPolyline.prototype.paintLine = function(a, b, c) {
+  var d = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2,
+    e = b[0],
+    f = b[b.length - 1];
+  a.begin();
+  a.moveTo(e.x, e.y);
+  for (var g = 1; g < b.length - 1; g++) {
+    var h = b[g],
+      k = e.x - h.x,
+      e = e.y - h.y;
+    if (c && g < b.length - 1 && (0 != k || 0 != e)) {
+      var l = Math.sqrt(k * k + e * e),
+        k = k * Math.min(d, l / 2) / l,
+        e = e * Math.min(d, l / 2) / l;
+      a.lineTo(h.x + k, h.y + e);
+      e = b[g + 1];
+      k = e.x - h.x;
+      e = e.y - h.y;
+      l = Math.max(1, Math.sqrt(k * k + e * e));
+      k = k * Math.min(d, l / 2) / l;
+      e = e * Math.min(d, l / 2) / l;
+      k = h.x + k;
+      e = h.y + e;
+      a.quadTo(h.x,
+        h.y, k, e);
+      h = new mxPoint(k, e)
+    } else a.lineTo(h.x, h.y);
+    e = h
+  }
+  a.lineTo(f.x, f.y);
+  a.stroke()
+};
+
+function mxArrow(a, b, c, d, e, f, g) {
+  mxShape.call(this);
+  this.points = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1;
+  this.arrowWidth = null != e ? e : mxConstants.ARROW_WIDTH;
+  this.spacing = null != f ? f : mxConstants.ARROW_SPACING;
+  this.endSize = null != g ? g : mxConstants.ARROW_SIZE
+}
+mxUtils.extend(mxArrow, mxShape);
+mxArrow.prototype.paintEdgeShape = function(a, b) {
+  var c = mxConstants.ARROW_SPACING,
+    d = mxConstants.ARROW_WIDTH,
+    e = mxConstants.ARROW_SIZE,
+    f = b[0],
+    g = b[b.length - 1],
+    h = g.x - f.x,
+    k = g.y - f.y,
+    l = Math.sqrt(h * h + k * k),
+    m = l - 2 * c - e,
+    h = h / l,
+    k = k / l,
+    l = d * k / 3,
+    d = -d * h / 3,
+    e = f.x - l / 2 + c * h,
+    f = f.y - d / 2 + c * k,
+    n = e + l,
+    p = f + d,
+    q = n + m * h,
+    m = p + m * k,
+    s = q + l,
+    r = m + d,
+    t = s - 3 * l,
+    v = r - 3 * d;
+  a.begin();
+  a.moveTo(e, f);
+  a.lineTo(n, p);
+  a.lineTo(q, m);
+  a.lineTo(s, r);
+  a.lineTo(g.x - c * h, g.y - c * k);
+  a.lineTo(t, v);
+  a.lineTo(t + l, v + d);
+  a.close();
+  a.fillAndStroke()
+};
+
+function mxText(a, b, c, d, e, f, g, h, k, l, m, n, p, q, s, r, t, v, w, u) {
+  mxShape.call(this);
+  this.value = a;
+  this.bounds = b;
+  this.color = null != e ? e : "black";
+  this.align = null != c ? c : "";
+  this.valign = null != d ? d : "";
+  this.family = null != f ? f : mxConstants.DEFAULT_FONTFAMILY;
+  this.size = null != g ? g : mxConstants.DEFAULT_FONTSIZE;
+  this.fontStyle = null != h ? h : mxConstants.DEFAULT_FONTSTYLE;
+  this.spacing = parseInt(k || 2);
+  this.spacingTop = this.spacing + parseInt(l || 0);
+  this.spacingRight = this.spacing + parseInt(m || 0);
+  this.spacingBottom = this.spacing + parseInt(n || 0);
+  this.spacingLeft = this.spacing + parseInt(p || 0);
+  this.horizontal = null != q ? q : !0;
+  this.background = s;
+  this.border = r;
+  this.wrap = null != t ? t : !1;
+  this.clipped = null != v ? v : !1;
+  this.overflow = null != w ? w : "visible";
+  this.labelPadding = null != u ? u : 0;
+  this.rotation = 0
+}
+mxUtils.extend(mxText, mxShape);
+mxText.prototype.baseSpacingTop = 0;
+mxText.prototype.baseSpacingBottom = 0;
+mxText.prototype.baseSpacingLeft = 0;
+mxText.prototype.baseSpacingRight = 0;
+mxText.prototype.replaceLinefeeds = !0;
+mxText.prototype.verticalTextRotation = -90;
+mxText.prototype.ignoreClippedStringSize = !0;
+mxText.prototype.ignoreStringSize = !1;
+mxText.prototype.isParseVml = function() {
+  return !1
+};
+mxText.prototype.isHtmlAllowed = function() {
+  return 8 != document.documentMode
+};
+mxText.prototype.getSvgScreenOffset = function() {
+  return 0
+};
+mxText.prototype.checkBounds = function() {
+  return null != this.bounds && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) && !isNaN(this.bounds.width) && !isNaN(this.bounds.height)
+};
+mxText.prototype.updateBoundingBox = function() {
+  var a = this.node;
+  8 == document.documentMode && null != a.firstChild && (a = a.firstChild, null != a.firstChild && (a = a.firstChild));
+  this.boundingBox = this.bounds.clone();
+  var b = this.getTextRotation();
+  if (!this.ignoreStringSize && null != a && "fill" != this.overflow && (!this.clipped || !this.ignoreClippedStringSize)) {
+    var c = null,
+      d = null;
+    if (null != a.ownerSVGElement)
+      if (null != a.firstChild && null != a.firstChild.firstChild && "foreignObject" == a.firstChild.firstChild.nodeName) a = a.firstChild.firstChild,
+        c = this.wrap ? this.bounds.width : parseInt(a.getAttribute("width")) * this.scale, d = parseInt(a.getAttribute("height")) * this.scale;
+      else {
+        b = a.getBBox();
+        if (0 == b.width && 0 == b.height) return;
+        this.boundingBox = new mxRectangle(b.x, b.y, b.width, b.height);
+        b = 0
+      } else d = this.state.view.textDiv, null != this.offsetWidth && null != this.offsetHeight ? (c = this.wrap ? this.bounds.width : this.offsetWidth * this.scale, d = this.offsetHeight * this.scale) :
+      null != d ? (this.updateFont(d), this.updateSize(d), mxUtils.isNode(this.value) ? d.innerHTML = this.value.outerHTML :
+        (c = this.replaceLinefeeds ? this.value.replace(/\n/g, "\x3cbr/\x3e") : this.value, d.innerHTML = c), c = this.wrap ? this.bounds.width : d.offsetWidth * this.scale, d = d.offsetHeight *
+        this.scale) : (c = this.wrap ? this.bounds.width : a.offsetWidth * this.scale, d = a.offsetHeight * this.scale);
+    null != c && null != d && (this.boundingBox = new mxRectangle(this.bounds.x + this.margin.x * c, this.bounds.y + this.margin.y * d, c, d))
+  } else this.boundingBox.x += this.margin.x * this.boundingBox.width, this.boundingBox.y += this.margin.y * this.boundingBox.height;
+  null !=
+    this.boundingBox && (0 != b && (b = mxUtils.getBoundingBox(this.boundingBox, b), this.boundingBox.x = b.x, this.boundingBox.y = b.y, mxClient.IS_QUIRKS || (this.boundingBox.width = b.width,
+      this.boundingBox.height = b.height)), this.boundingBox.x = Math.floor(this.boundingBox.x), this.boundingBox.y = Math.floor(this.boundingBox.y), this.boundingBox.width = Math.ceil(this.boundingBox
+      .width), this.boundingBox.height = Math.ceil(this.boundingBox.height))
+};
+mxText.prototype.getShapeRotation = function() {
+  return 0
+};
+mxText.prototype.getTextRotation = function() {
+  return null != this.state && null != this.state.shape ? this.state.shape.getTextRotation() : 0
+};
+mxText.prototype.isPaintBoundsInverted = function() {
+  return !this.horizontal && null != this.state && this.state.view.graph.model.isVertex(this.state.cell)
+};
+mxText.prototype.configureCanvas = function(a, b, c, d, e) {
+  mxShape.prototype.configureCanvas.apply(this, arguments);
+  a.setFontColor(this.color);
+  a.setFontBackgroundColor(this.background);
+  a.setFontBorderColor(this.border);
+  a.setFontFamily(this.family);
+  a.setFontSize(this.size);
+  a.setFontStyle(this.fontStyle)
+};
+mxText.prototype.updateVmlContainer = function() {
+  this.node.style.left = Math.round(this.bounds.x) + "px";
+  this.node.style.top = Math.round(this.bounds.y) + "px";
+  this.node.style.width = "1px";
+  this.node.style.height = "1px";
+  this.node.style.overflow = "visible"
+};
+mxText.prototype.paint = function(a) {
+  var b = this.scale,
+    c = this.bounds.x / b,
+    d = this.bounds.y / b,
+    e = this.bounds.width / b,
+    b = this.bounds.height / b;
+  this.updateTransform(a, c, d, e, b);
+  this.configureCanvas(a, c, d, e, b);
+  var f = mxUtils.isNode(this.value) || this.dialect == mxConstants.DIALECT_STRICTHTML,
+    g = f || a instanceof mxVmlCanvas2D ? "html" : "",
+    h = this.value;
+  !f && "html" == g && (h = mxUtils.htmlEntities(h, !1));
+  h = !mxUtils.isNode(this.value) && this.replaceLinefeeds && "html" == g ? h.replace(/\n/g, "\x3cbr/\x3e") : h;
+  a.text(c, d, e, b, h, this.align,
+    this.valign, this.wrap, g, "fill" == this.overflow, this.clipped, this.getTextRotation())
+};
+mxText.prototype.redrawHtmlShape = function() {
+  var a = this.node.style;
+  a.opacity = 1 > this.opacity ? this.opacity : "";
+  a.overflow = "";
+  a.width = "";
+  a.height = "";
+  this.updateFont(this.node);
+  this.updateSize(this.node);
+  this.updateValue();
+  this.offsetHeight = this.offsetWidth = null;
+  null != mxClient.CSS_PREFIX ? this.updateHtmlTransform() : this.updateHtmlFilter()
+};
+mxText.prototype.updateHtmlTransform = function() {
+  var a = this.getTextRotation(),
+    b = this.node.style,
+    c = this.margin.x,
+    d = this.margin.y;
+  0 != a ? (b[mxClient.CSS_PREFIX + "TransformOrigin"] = 100 * -c + "% " + 100 * -d + "%", b[mxClient.CSS_PREFIX + "Transform"] = "translate(" + 100 * c + "%," + 100 * d + "%)scale(" + this.scale +
+    ") rotate(" + a + "deg)") : (b[mxClient.CSS_PREFIX + "TransformOrigin"] = "0% 0%", b[mxClient.CSS_PREFIX + "Transform"] = "scale(" + this.scale + ")translate(" + 100 * c + "%," + 100 * d +
+    "%)");
+  b.left = Math.round(this.bounds.x) + "px";
+  b.top = Math.round(this.bounds.y) +
+    "px"
+};
+mxText.prototype.updateHtmlFilter = function() {
+  var a = this.node.style,
+    b = this.margin.x,
+    c = this.margin.y,
+    d = this.scale;
+  a.filter = "";
+  var e = 0,
+    f = 0,
+    g = null != this.state ? this.state.view.textDiv : null;
+  if (null != g) {
+    g.style.overflow = "";
+    g.style.height = "";
+    g.style.width = "";
+    this.updateFont(g);
+    this.updateSize(g);
+    if (mxUtils.isNode(this.value)) g.innerHTML = this.value.outerHTML;
+    else {
+      var h = this.value;
+      this.dialect != mxConstants.DIALECT_STRICTHTML && (h = mxUtils.htmlEntities(h, !1));
+      h = this.replaceLinefeeds ? h.replace(/\n/g, "\x3cbr/\x3e") : h;
+      g.innerHTML = h
+    }
+    e = g.offsetWidth + 2;
+    f = g.offsetHeight + 2
+  } else e = this.node.offsetWidth, f = this.node.offsetHeight + 1;
+  this.offsetWidth = e;
+  this.offsetHeight = f;
+  g = this.bounds.width / d;
+  h = this.bounds.height / d;
+  mxClient.IS_QUIRKS && (this.clipped || "fill" == this.overflow) && 0 < h ? (h = Math.min(h, f), a.height = Math.round(h + 1) + "px") : h = f;
+  "fill" != this.overflow && (mxClient.IS_QUIRKS && (this.clipped || this.wrap) && 0 < g ? (g = Math.min(g, e), a.width = Math.round(g) + "px") : g = e);
+  var h = h * d,
+    g = g * d,
+    e = this.getTextRotation() * (Math.PI / 180),
+    f = parseFloat(parseFloat(Math.cos(e)).toFixed(8)),
+    k = parseFloat(parseFloat(Math.sin(-e)).toFixed(8)),
+    e = e % (2 * Math.PI);
+  0 > e && (e += 2 * Math.PI);
+  e %= Math.PI;
+  e > Math.PI / 2 && (e = Math.PI - e);
+  var l = Math.cos(e),
+    m = Math.sin(-e),
+    b = g * -(b + 0.5),
+    c = h * -(c + 0.5),
+    n = (h - h * l + g * m) / 2 + k * b - f * c;
+  0 != e && (a.filter = "progid:DXImageTransform.Microsoft.Matrix(M11\x3d" + f + ", M12\x3d" + k + ", M21\x3d" + -k + ", M22\x3d" + f + ", sizingMethod\x3d'auto expand')");
+  a.zoom = d;
+  a.left = Math.round(this.bounds.x + ((g - g * l + h * m) / 2 - f * b - k * c) - g / 2) + "px";
+  a.top = Math.round(this.bounds.y + n - h / 2) + "px"
+};
+mxText.prototype.updateValue = function() {
+  if (mxUtils.isNode(this.value)) this.node.innerHTML = "", this.node.appendChild(this.value);
+  else {
+    var a = this.value;
+    this.dialect != mxConstants.DIALECT_STRICTHTML && (a = mxUtils.htmlEntities(a, !1));
+    var a = this.replaceLinefeeds ? a.replace(/\n/g, "\x3cbr/\x3e") : a,
+      b = null != this.background && this.background != mxConstants.NONE ? this.background : null,
+      c = null != this.border && this.border != mxConstants.NONE ? this.border : null;
+    if (null != b || null != c)
+      if ("fill" == this.overflow) null != b && (this.node.style.backgroundColor =
+        b), null != c && (this.node.style.border = "1px solid " + c);
+      else {
+        var d = "";
+        null != b && (d += "background-color:" + b + ";");
+        null != c && (d += "border:1px solid " + c + ";");
+        a = '\x3cdiv style\x3d"zoom:1;' + d + "display:inline-block;_display:inline;padding-bottom:1px;padding-right:1px;line-height:" + this.node.style.lineHeight + '"\x3e' + a + "\x3c/div\x3e";
+        this.node.style.lineHeight = ""
+      }
+    this.node.innerHTML = a
+  }
+};
+mxText.prototype.updateFont = function(a) {
+  a = a.style;
+  a.lineHeight = Math.round(this.size * mxConstants.LINE_HEIGHT) + "px";
+  a.fontSize = Math.round(this.size) + "px";
+  a.fontFamily = this.family;
+  a.verticalAlign = "top";
+  a.color = this.color;
+  a.fontWeight = (this.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD ? "bold" : "";
+  a.fontStyle = (this.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC ? "italic" : "";
+  a.fontDecoration = (this.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE ? "underline" : "";
+  a.textAlign =
+    this.align == mxConstants.ALIGN_CENTER ? "center" : this.align == mxConstants.ALIGN_RIGHT ? "right" : "left"
+};
+mxText.prototype.updateSize = function(a) {
+  var b = Math.round(this.bounds.width / this.scale),
+    c = Math.round(this.bounds.height / this.scale);
+  a = a.style;
+  this.clipped ? (a.overflow = "hidden", 0 < c && (a.maxHeight = c + "px"), 0 < b && (a.width = b + "px")) : "fill" == this.overflow && (a.width = b + "px", 0 < c && (a.maxHeight = c + "px"));
+  this.wrap ? (!this.clipped && 0 < b && (a.width = b + "px"), a.whiteSpace = "normal") : a.whiteSpace = "nowrap"
+};
+mxText.prototype.updateMargin = function() {
+  this.margin = mxUtils.getAlignmentAsPoint(this.align, this.valign)
+};
+mxText.prototype.getSpacing = function() {
+  var a = 0,
+    b = 0,
+    a = this.align == mxConstants.ALIGN_CENTER ? (this.spacingLeft - this.spacingRight) / 2 : this.align == mxConstants.ALIGN_RIGHT ? -this.spacingRight - this.baseSpacingRight : this.spacingLeft +
+    this.baseSpacingLeft,
+    b = this.valign == mxConstants.ALIGN_MIDDLE ? (this.spacingTop - this.spacingBottom) / 2 : this.valign == mxConstants.ALIGN_BOTTOM ? -this.spacingBottom - this.baseSpacingBottom : this.spacingTop +
+    this.baseSpacingTop;
+  return new mxPoint(a, b)
+};
+
+function mxTriangle() {
+  mxActor.call(this)
+}
+mxUtils.extend(mxTriangle, mxActor);
+mxTriangle.prototype.redrawPath = function(a, b, c, d, e) {
+  a.moveTo(0, 0);
+  a.lineTo(d, 0.5 * e);
+  a.lineTo(0, e);
+  a.close()
+};
+
+function mxHexagon() {
+  mxActor.call(this)
+}
+mxUtils.extend(mxHexagon, mxActor);
+mxHexagon.prototype.redrawPath = function(a, b, c, d, e) {
+  a.moveTo(0.25 * d, 0);
+  a.lineTo(0.75 * d, 0);
+  a.lineTo(d, 0.5 * e);
+  a.lineTo(0.75 * d, e);
+  a.lineTo(0.25 * d, e);
+  a.lineTo(0, 0.5 * e);
+  a.close()
+};
+
+function mxLine(a, b, c) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.stroke = b;
+  this.strokewidth = null != c ? c : 1
+}
+mxUtils.extend(mxLine, mxShape);
+mxLine.prototype.paintVertexShape = function(a, b, c, d, e) {
+  c += e / 2;
+  a.begin();
+  a.moveTo(b, c);
+  a.lineTo(b + d, c);
+  a.stroke()
+};
+
+function mxImageShape(a, b, c, d, e) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.image = b;
+  this.fill = c;
+  this.stroke = d;
+  this.strokewidth = null != e ? e : 1;
+  this.shadow = !1
+}
+mxUtils.extend(mxImageShape, mxRectangleShape);
+mxImageShape.prototype.preserveImageAspect = !0;
+mxImageShape.prototype.getSvgScreenOffset = function() {
+  return !mxClient.IS_IE ? 0.5 : 0
+};
+mxImageShape.prototype.apply = function(a) {
+  mxShape.prototype.apply.apply(this, arguments);
+  this.gradient = this.stroke = this.fill = null;
+  null != this.style && (this.fill = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND), this.stroke = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER), this.preserveImageAspect =
+    1 == mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_ASPECT, 1), this.flipH = this.flipH || 1 == mxUtils.getValue(this.style, "imageFlipH", 0), this.flipV = this.flipV || 1 == mxUtils.getValue(
+      this.style,
+      "imageFlipV", 0))
+};
+mxImageShape.prototype.isHtmlAllowed = function() {
+  return !this.preserveImageAspect
+};
+mxImageShape.prototype.createHtml = function() {
+  var a = document.createElement("div");
+  a.style.position = "absolute";
+  return a
+};
+mxImageShape.prototype.paintVertexShape = function(a, b, c, d, e) {
+  if (null != this.image) {
+    var f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND, null),
+      g = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER, null);
+    if (null != f || null != g) a.setFillColor(f), a.setStrokeColor(g), a.rect(b, c, d, e), a.fillAndStroke();
+    a.image(b, c, d, e, this.image, this.preserveImageAspect, !1, !1)
+  } else mxRectangleShape.prototype.paintBackground.apply(this, arguments)
+};
+mxImageShape.prototype.redrawHtmlShape = function() {
+  this.node.style.left = Math.round(this.bounds.x) + "px";
+  this.node.style.top = Math.round(this.bounds.y) + "px";
+  this.node.style.width = Math.max(0, Math.round(this.bounds.width)) + "px";
+  this.node.style.height = Math.max(0, Math.round(this.bounds.height)) + "px";
+  this.node.style.backgroundColor = this.fill || "";
+  this.node.style.borderColor = this.stroke || "";
+  this.node.innerHTML = "";
+  if (null != this.image) {
+    var a = document.createElement(mxClient.IS_IE6 || null == mxClient.CSS_PREFIX && 0 !=
+      this.rotation ? mxClient.VML_PREFIX + ":image" : "img");
+    a.style.position = "absolute";
+    a.src = this.image;
+    var b = 100 > this.opacity ? "alpha(opacity\x3d" + this.opacity + ")" : "";
+    this.node.style.filter = b;
+    this.flipH && this.flipV ? b += "progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2)" : this.flipH ? b += "progid:DXImageTransform.Microsoft.BasicImage(mirror\x3d1)" : this.flipV && (b +=
+      "progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2, mirror\x3d1)");
+    a.style.filter != b && (a.style.filter = b);
+    "image" == a.nodeName ? a.style.rotation =
+      this.rotation : a.style[mxClient.CSS_PREFIX + "Transform"] = "rotate(" + this.rotation + "deg)";
+    a.style.width = this.node.style.width;
+    a.style.height = this.node.style.height;
+    this.node.style.backgroundImage = "";
+    this.node.appendChild(a)
+  } else this.setTransparentBackgroundImage(this.node)
+};
+
+function mxLabel(a, b, c, d) {
+  mxRectangleShape.call(this, a, b, c, d)
+}
+mxUtils.extend(mxLabel, mxRectangleShape);
+mxLabel.prototype.imageSize = mxConstants.DEFAULT_IMAGESIZE;
+mxLabel.prototype.spacing = 2;
+mxLabel.prototype.indicatorSize = 10;
+mxLabel.prototype.indicatorSpacing = 2;
+mxLabel.prototype.init = function(a) {
+  mxShape.prototype.init.apply(this, arguments);
+  null != this.indicatorColor && null != this.indicatorShape && (this.indicator = new this.indicatorShape, this.indicator.dialect = this.dialect, this.indicator.bounds = this.bounds, this.indicator
+    .fill = this.indicatorColor, this.indicator.stroke = this.indicatorColor, this.indicator.gradient = this.indicatorGradientColor, this.indicator.direction = this.indicatorDirection, this.indicator
+    .init(this.node))
+};
+mxLabel.prototype.redraw = function() {
+  null != this.indicator && (this.indicator.fill = this.indicatorColor, this.indicator.stroke = this.indicatorColor, this.indicator.gradient = this.indicatorGradientColor, this.indicator.direction =
+    this.indicatorDirection);
+  mxShape.prototype.redraw.apply(this, arguments)
+};
+mxLabel.prototype.isHtmlAllowed = function() {
+  return mxRectangleShape.prototype.isHtmlAllowed.apply(this, arguments) && null == this.indicatorColor && null == this.indicatorShape
+};
+mxLabel.prototype.paintForeground = function(a, b, c, d, e) {
+  this.paintImage(a, b, c, d, e);
+  this.paintIndicator(a, b, c, d, e);
+  mxRectangleShape.prototype.paintForeground.apply(this, arguments)
+};
+mxLabel.prototype.paintImage = function(a, b, c, d, e) {
+  null != this.image && (b = this.getImageBounds(b, c, d, e), a.image(b.x, b.y, b.width, b.height, this.image, !1, !1, !1))
+};
+mxLabel.prototype.getImageBounds = function(a, b, c, d) {
+  var e = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT),
+    f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE),
+    g = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_WIDTH, mxConstants.DEFAULT_IMAGESIZE),
+    h = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_HEIGHT, mxConstants.DEFAULT_IMAGESIZE),
+    k = mxUtils.getNumber(this.style, mxConstants.STYLE_SPACING, this.spacing) + 5;
+  a = e == mxConstants.ALIGN_CENTER ?
+    a + (c - g) / 2 : e == mxConstants.ALIGN_RIGHT ? a + (c - g - k) : a + k;
+  b = f == mxConstants.ALIGN_TOP ? b + k : f == mxConstants.ALIGN_BOTTOM ? b + (d - h - k) : b + (d - h) / 2;
+  return new mxRectangle(a, b, g, h)
+};
+mxLabel.prototype.paintIndicator = function(a, b, c, d, e) {
+  null != this.indicator ? (this.indicator.bounds = this.getIndicatorBounds(b, c, d, e), this.indicator.paint(a)) : null != this.indicatorImage && (b = this.getIndicatorBounds(b, c, d, e), a.image(
+    b.x, b.y, b.width, b.height, this.indicatorImage, !1, !1, !1))
+};
+mxLabel.prototype.getIndicatorBounds = function(a, b, c, d) {
+  var e = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT),
+    f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE),
+    g = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_WIDTH, this.indicatorSize),
+    h = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_HEIGHT, this.indicatorSize),
+    k = this.spacing + 5;
+  a = e == mxConstants.ALIGN_RIGHT ? a + (c - g - k) : e == mxConstants.ALIGN_CENTER ? a + (c - g) /
+    2 : a + k;
+  b = f == mxConstants.ALIGN_BOTTOM ? b + (d - h - k) : f == mxConstants.ALIGN_TOP ? b + k : b + (d - h) / 2;
+  return new mxRectangle(a, b, g, h)
+};
+mxLabel.prototype.redrawHtmlShape = function() {
+  for (mxRectangleShape.prototype.redrawHtmlShape.apply(this, arguments); this.node.hasChildNodes();) this.node.removeChild(this.node.lastChild);
+  if (null != this.image) {
+    var a = document.createElement("img");
+    a.style.position = "relative";
+    a.setAttribute("border", "0");
+    var b = this.getImageBounds(this.bounds.x, this.bounds.y, this.bounds.width, this.bounds.height);
+    b.x -= this.bounds.x;
+    b.y -= this.bounds.y;
+    a.style.left = Math.round(b.x) + "px";
+    a.style.top = Math.round(b.y) + "px";
+    a.style.width =
+      Math.round(b.width) + "px";
+    a.style.height = Math.round(b.height) + "px";
+    a.src = this.image;
+    this.node.appendChild(a)
+  }
+};
+
+function mxCylinder(a, b, c, d) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxCylinder, mxShape);
+mxCylinder.prototype.maxHeight = 40;
+mxCylinder.prototype.svgStrokeTolerance = 0;
+mxCylinder.prototype.paintVertexShape = function(a, b, c, d, e) {
+  a.translate(b, c);
+  a.begin();
+  this.redrawPath(a, b, c, d, e, !1);
+  a.fillAndStroke();
+  a.setShadow(!1);
+  a.begin();
+  this.redrawPath(a, b, c, d, e, !0);
+  a.stroke()
+};
+mxCylinder.prototype.redrawPath = function(a, b, c, d, e, f) {
+  b = Math.min(this.maxHeight, Math.round(e / 5));
+  if (f && null != this.fill || !f && null == this.fill) a.moveTo(0, b), a.curveTo(0, 2 * b, d, 2 * b, d, b), f || (a.stroke(), a.begin());
+  f || (a.moveTo(0, b), a.curveTo(0, -b / 3, d, -b / 3, d, b), a.lineTo(d, e - b), a.curveTo(d, e + b / 3, 0, e + b / 3, 0, e - b), a.close())
+};
+
+function mxConnector(a, b, c) {
+  mxPolyline.call(this, a, b, c)
+}
+mxUtils.extend(mxConnector, mxPolyline);
+mxConnector.prototype.paintEdgeShape = function(a, b) {
+  var c = this.createMarker(a, b, !0),
+    d = this.createMarker(a, b, !1);
+  null == this.style || 1 != this.style[mxConstants.STYLE_CURVED] ? this.paintLine(a, b, this.isRounded) : this.paintCurvedLine(a, b);
+  a.setFillColor(this.stroke);
+  a.setShadow(!1);
+  a.setDashed(!1);
+  null != c && c();
+  null != d && d()
+};
+mxConnector.prototype.paintCurvedLine = function(a, b) {
+  a.begin();
+  var c = b[0],
+    d = b.length;
+  a.moveTo(c.x, c.y);
+  for (c = 1; c < d - 2; c++) {
+    var e = b[c],
+      f = b[c + 1];
+    a.quadTo(e.x, e.y, (e.x + f.x) / 2, (e.y + f.y) / 2)
+  }
+  e = b[d - 2];
+  f = b[d - 1];
+  a.quadTo(e.x, e.y, f.x, f.y);
+  a.stroke()
+};
+mxConnector.prototype.createMarker = function(a, b, c) {
+  var d = b.length,
+    e = c ? b[1] : b[d - 2];
+  b = c ? b[0] : b[d - 1];
+  var d = b.x - e.x,
+    f = b.y - e.y,
+    g = Math.max(1, Math.sqrt(d * d + f * f)),
+    e = d / g,
+    d = f / g,
+    f = mxUtils.getNumber(this.style, c ? mxConstants.STYLE_STARTSIZE : mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE),
+    g = mxUtils.getValue(this.style, c ? mxConstants.STYLE_STARTARROW : mxConstants.STYLE_ENDARROW);
+  return mxMarker.createMarker(a, this, g, b, e, d, f, c, this.strokewidth, 0 != this.style[c ? mxConstants.STYLE_STARTFILL : mxConstants.STYLE_ENDFILL])
+};
+mxConnector.prototype.augmentBoundingBox = function(a) {
+  mxShape.prototype.augmentBoundingBox.apply(this, arguments);
+  var b = 0;
+  mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, mxConstants.NONE) != mxConstants.NONE && (b = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_MARKERSIZE) +
+    1);
+  mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW, mxConstants.NONE) != mxConstants.NONE && (b = Math.max(b, mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE)) +
+    1);
+  a.grow(Math.ceil(b * this.scale))
+};
+
+function mxSwimlane(a, b, c, d) {
+  mxShape.call(this);
+  this.bounds = a;
+  this.fill = b;
+  this.stroke = c;
+  this.strokewidth = null != d ? d : 1
+}
+mxUtils.extend(mxSwimlane, mxShape);
+mxSwimlane.prototype.imageSize = 16;
+mxSwimlane.prototype.getGradientBounds = function(a, b, c, d, e) {
+  a = Math.min(e, mxUtils.getValue(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));
+  return new mxRectangle(b, c, d, a)
+};
+mxSwimlane.prototype.getRotation = function() {
+  var a = mxShape.prototype.getRotation.apply(this, arguments);
+  1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) && (a += mxText.prototype.verticalTextRotation);
+  return a
+};
+mxSwimlane.prototype.getTextRotation = function() {
+  return this.getRotation()
+};
+mxSwimlane.prototype.isPaintBoundsInverted = function() {
+  return mxShape.prototype.isPaintBoundsInverted.apply(this, arguments) || 1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1)
+};
+mxSwimlane.prototype.getArcSize = function(a, b, c) {
+  a = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100;
+  return 3 * c * a
+};
+mxSwimlane.prototype.paintVertexShape = function(a, b, c, d, e) {
+  var f = Math.min(e, mxUtils.getValue(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)),
+    g = mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_FILLCOLOR, mxConstants.NONE),
+    h = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_LINE, 1),
+    k = 0;
+  a.translate(b, c);
+  this.isRounded ? (k = this.getArcSize(d, e, f), this.paintRoundedSwimlane(a, b, c, d, e, f, k, g, h)) : this.paintSwimlane(a, b, c, d, e, f, g, h);
+  g = mxUtils.getValue(this.style, mxConstants.STYLE_SEPARATORCOLOR,
+    mxConstants.NONE);
+  this.paintSeparator(a, d, f, e, g);
+  null != this.image && (e = this.getImageBounds(b, f, d, e), a.image(e.x - b, e.y - c, e.width, e.height, this.image, !1, !1, !1));
+  this.glass && (a.setShadow(!1), this.paintGlassEffect(a, 0, 0, d, f, k))
+};
+mxSwimlane.prototype.paintSwimlane = function(a, b, c, d, e, f, g, h) {
+  g != mxConstants.NONE && (a.save(), a.setFillColor(g), a.rect(0, 0, d, e), a.fillAndStroke(), a.restore(), a.setShadow(!1));
+  a.begin();
+  a.moveTo(0, f);
+  a.lineTo(0, 0);
+  a.lineTo(d, 0);
+  a.lineTo(d, f);
+  h && a.close();
+  a.fillAndStroke();
+  f < e && g == mxConstants.NONE && (a.pointerEvents = !1, a.begin(), a.moveTo(0, f), a.lineTo(0, e), a.lineTo(d, e), a.lineTo(d, f), a.stroke())
+};
+mxSwimlane.prototype.paintRoundedSwimlane = function(a, b, c, d, e, f, g, h, k) {
+  h != mxConstants.NONE && (a.save(), a.setFillColor(h), a.roundrect(0, 0, d, e, g, g), a.fillAndStroke(), a.restore(), a.setShadow(!1));
+  a.begin();
+  a.moveTo(d, f);
+  a.lineTo(d, g);
+  a.quadTo(d, 0, d - Math.min(d / 2, g), 0);
+  a.lineTo(Math.min(d / 2, g), 0);
+  a.quadTo(0, 0, 0, g);
+  a.lineTo(0, f);
+  k && a.close();
+  a.fillAndStroke();
+  f < e && h == mxConstants.NONE && (a.pointerEvents = !1, a.begin(), a.moveTo(0, f), a.lineTo(0, e - g), a.quadTo(0, e, Math.min(d / 2, g), e), a.lineTo(d - Math.min(d / 2, g), e),
+    a.quadTo(d, e, d, e - g), a.lineTo(d, f), a.stroke())
+};
+mxSwimlane.prototype.paintSeparator = function(a, b, c, d, e) {
+  e != mxConstants.NONE && (a.setStrokeColor(e), a.setDashed(!0), a.begin(), a.moveTo(b, c), a.lineTo(b, d), a.stroke(), a.setDashed(!1))
+};
+mxSwimlane.prototype.getImageBounds = function(a, b, c, d) {
+  return new mxRectangle(a + c - this.imageSize, b, this.imageSize, this.imageSize)
+};
+
+function mxGraphLayout(a) {
+  this.graph = a
+}
+mxGraphLayout.prototype.graph = null;
+mxGraphLayout.prototype.useBoundingBox = !0;
+mxGraphLayout.prototype.parent = null;
+mxGraphLayout.prototype.moveCell = function(a, b, c) {};
+mxGraphLayout.prototype.execute = function(a) {};
+mxGraphLayout.prototype.getGraph = function() {
+  return this.graph
+};
+mxGraphLayout.prototype.getConstraint = function(a, b, c, d) {
+  c = this.graph.view.getState(b);
+  b = null != c ? c.style : this.graph.getCellStyle(b);
+  return null != b ? b[a] : null
+};
+mxGraphLayout.traverse = function(a, b, c, d, e) {
+  if (null != c && null != a) {
+    b = null != b ? b : !0;
+    e = e || [];
+    var f = mxCellPath.create(a);
+    if (null == e[f] && (e[f] = a, d = c(a, d), null == d || d))
+      if (d = this.graph.model.getEdgeCount(a), 0 < d)
+        for (f = 0; f < d; f++) {
+          var g = this.graph.model.getEdgeAt(a, f),
+            h = this.graph.model.getTerminal(g, !0) == a;
+          if (!b || h) h = this.graph.view.getVisibleTerminal(g, !h), this.traverse(h, b, c, g, e)
+        }
+  }
+};
+mxGraphLayout.prototype.isVertexMovable = function(a) {
+  return this.graph.isCellMovable(a)
+};
+mxGraphLayout.prototype.isVertexIgnored = function(a) {
+  return !this.graph.getModel().isVertex(a) || !this.graph.isCellVisible(a)
+};
+mxGraphLayout.prototype.isEdgeIgnored = function(a) {
+  var b = this.graph.getModel();
+  return !b.isEdge(a) || !this.graph.isCellVisible(a) || null == b.getTerminal(a, !0) || null == b.getTerminal(a, !1)
+};
+mxGraphLayout.prototype.setEdgeStyleEnabled = function(a, b) {
+  this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE, b ? "0" : "1", [a])
+};
+mxGraphLayout.prototype.setOrthogonalEdge = function(a, b) {
+  this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL, b ? "1" : "0", [a])
+};
+mxGraphLayout.prototype.getParentOffset = function(a) {
+  var b = new mxPoint;
+  if (null != a && a != this.parent) {
+    var c = this.graph.getModel();
+    if (c.isAncestor(this.parent, a))
+      for (var d = c.getGeometry(a); a != this.parent;) b.x += d.x, b.y += d.y, a = c.getParent(a), d = c.getGeometry(a)
+  }
+  return b
+};
+mxGraphLayout.prototype.setEdgePoints = function(a, b) {
+  if (null != a) {
+    var c = this.graph.model,
+      d = c.getGeometry(a);
+    null == d ? (d = new mxGeometry, d.setRelative(!0)) : d = d.clone();
+    if (null != this.parent && null != b)
+      for (var e = c.getParent(a), e = this.getParentOffset(e), f = 0; f < b.length; f++) b[f].x -= e.x, b[f].y -= e.y;
+    d.points = b;
+    c.setGeometry(a, d)
+  }
+};
+mxGraphLayout.prototype.setVertexLocation = function(a, b, c) {
+  var d = this.graph.getModel(),
+    e = d.getGeometry(a),
+    f = null;
+  if (null != e) {
+    f = new mxRectangle(b, c, e.width, e.height);
+    if (this.useBoundingBox) {
+      var g = this.graph.getView().getState(a);
+      if (null != g && null != g.text && null != g.text.boundingBox) {
+        var h = this.graph.getView().scale,
+          k = g.text.boundingBox;
+        g.text.boundingBox.x < g.x && (b += (g.x - k.x) / h, f.width = k.width);
+        g.text.boundingBox.y < g.y && (c += (g.y - k.y) / h, f.height = k.height)
+      }
+    }
+    null != this.parent && (g = d.getParent(a), null != g && g !=
+      this.parent && (g = this.getParentOffset(g), b -= g.x, c -= g.y));
+    if (e.x != b || e.y != c) e = e.clone(), e.x = b, e.y = c, d.setGeometry(a, e)
+  }
+  return f
+};
+mxGraphLayout.prototype.getVertexBounds = function(a) {
+  var b = this.graph.getModel().getGeometry(a);
+  if (this.useBoundingBox) {
+    var c = this.graph.getView().getState(a);
+    if (null != c && null != c.text && null != c.text.boundingBox) var d = this.graph.getView().scale,
+      e = c.text.boundingBox,
+      f = Math.max(c.x - e.x, 0) / d,
+      g = Math.max(c.y - e.y, 0) / d,
+      h = Math.max(e.x + e.width - (c.x + c.width), 0) / d,
+      c = Math.max(e.y + e.height - (c.y + c.height), 0) / d,
+      b = new mxRectangle(b.x - f, b.y - g, b.width + f + h, b.height + g + c)
+  }
+  null != this.parent && (a = this.graph.getModel().getParent(a),
+    b = b.clone(), null != a && a != this.parent && (a = this.getParentOffset(a), b.x += a.x, b.y += a.y));
+  return new mxRectangle(b.x, b.y, b.width, b.height)
+};
+mxGraphLayout.prototype.arrangeGroups = function(a, b) {
+  this.graph.getModel().beginUpdate();
+  try {
+    for (var c = a.length - 1; 0 <= c; c--) {
+      var d = a[c],
+        e = this.graph.getChildVertices(d),
+        f = this.graph.getBoundingBoxFromGeometry(e),
+        g = this.graph.getCellGeometry(d),
+        h = 0,
+        k = 0;
+      if (this.graph.isSwimlane(d)) var l = this.graph.getStartSize(d),
+        h = l.width,
+        k = l.height;
+      null != f && null != g && (g = g.clone(), g.x = g.x + f.x - b - h, g.y = g.y + f.y - b - k, g.width = f.width + 2 * b + h, g.height = f.height + 2 * b + k, this.graph.getModel().setGeometry(d,
+        g), this.graph.moveCells(e,
+        b + h - f.x, b + k - f.y))
+    }
+  } finally {
+    this.graph.getModel().endUpdate()
+  }
+};
+
+function mxStackLayout(a, b, c, d, e, f) {
+  mxGraphLayout.call(this, a);
+  this.horizontal = null != b ? b : !0;
+  this.spacing = null != c ? c : 0;
+  this.x0 = null != d ? d : 0;
+  this.y0 = null != e ? e : 0;
+  this.border = null != f ? f : 0
+}
+mxStackLayout.prototype = new mxGraphLayout;
+mxStackLayout.prototype.constructor = mxStackLayout;
+mxStackLayout.prototype.horizontal = null;
+mxStackLayout.prototype.spacing = null;
+mxStackLayout.prototype.x0 = null;
+mxStackLayout.prototype.y0 = null;
+mxStackLayout.prototype.border = 0;
+mxStackLayout.prototype.keepFirstLocation = !1;
+mxStackLayout.prototype.fill = !1;
+mxStackLayout.prototype.resizeParent = !1;
+mxStackLayout.prototype.resizeLast = !1;
+mxStackLayout.prototype.wrap = null;
+mxStackLayout.prototype.isHorizontal = function() {
+  return this.horizontal
+};
+mxStackLayout.prototype.moveCell = function(a, b, c) {
+  var d = this.graph.getModel(),
+    e = d.getParent(a),
+    f = this.isHorizontal();
+  if (null != a && null != e) {
+    var g = 0,
+      h = 0,
+      k = d.getChildCount(e);
+    b = f ? b : c;
+    g = this.graph.getView().getState(e);
+    null != g && (b -= f ? g.x : g.y);
+    for (g = 0; g < k; g++)
+      if (c = d.getChildAt(e, g), c != a && (c = d.getGeometry(c), null != c)) {
+        c = f ? c.x + c.width / 2 : c.y + c.height / 2;
+        if (h < b && c > b) break;
+        h = c
+      }
+    f = e.getIndex(a);
+    f = Math.max(0, g - (g > f ? 1 : 0));
+    d.add(e, a, f)
+  }
+};
+mxStackLayout.prototype.getParentSize = function(a) {
+  var b = this.graph.getModel(),
+    c = b.getGeometry(a);
+  if (null != this.graph.container && (null == c && b.isLayer(a) || a == this.graph.getView().currentRoot)) c = new mxRectangle(0, 0, this.graph.container.offsetWidth - 1, this.graph.container.offsetHeight -
+    1);
+  return c
+};
+mxStackLayout.prototype.execute = function(a) {
+  if (null != a) {
+    var b = this.isHorizontal(),
+      c = this.graph.getModel(),
+      d = this.getParentSize(a),
+      e = 0;
+    null != d && (e = b ? d.height : d.width);
+    var e = e - (2 * this.spacing + 2 * this.border),
+      f = this.x0 + this.border,
+      g = this.y0 + this.border;
+    if (this.graph.isSwimlane(a)) {
+      var h = this.graph.getCellStyle(a),
+        k = mxUtils.getValue(h, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE),
+        h = mxUtils.getValue(h, mxConstants.STYLE_HORIZONTAL, !0);
+      b == h && (e -= k);
+      b ? g += k : f += k
+    }
+    c.beginUpdate();
+    try {
+      for (var k = 0,
+          h = null, l = c.getChildCount(a), m = 0; m < l; m++) {
+        var n = c.getChildAt(a, m);
+        if (!this.isVertexIgnored(n) && this.isVertexMovable(n)) {
+          var p = c.getGeometry(n);
+          if (null != p) {
+            p = p.clone();
+            if (null != this.wrap && null != h && (b && h.x + h.width + p.width + 2 * this.spacing > this.wrap || !b && h.y + h.height + p.height + 2 * this.spacing > this.wrap)) h = null, b ? g +=
+              k + this.spacing : f += k + this.spacing, k = 0;
+            k = Math.max(k, b ? p.height : p.width);
+            null != h ? b ? p.x = h.x + h.width + this.spacing : p.y = h.y + h.height + this.spacing : this.keepFirstLocation || (b ? p.x = f : p.y = g);
+            b ? p.y = g : p.x = f;
+            this.fill && 0 < e && (b ? p.height = e : p.width = e);
+            c.setGeometry(n, p);
+            h = p
+          }
+        }
+      }
+      this.resizeParent && null != d && null != h && !this.graph.isCellCollapsed(a) ? (d = d.clone(), b ? d.width = h.x + h.width + this.spacing : d.height = h.y + h.height + this.spacing, c.setGeometry(
+        a, d)) : this.resizeLast && (null != d && null != h) && (b ? h.width = d.width - h.x - this.spacing : h.height = d.height - h.y - this.spacing)
+    } finally {
+      c.endUpdate()
+    }
+  }
+};
+
+function mxPartitionLayout(a, b, c, d) {
+  mxGraphLayout.call(this, a);
+  this.horizontal = null != b ? b : !0;
+  this.spacing = c || 0;
+  this.border = d || 0
+}
+mxPartitionLayout.prototype = new mxGraphLayout;
+mxPartitionLayout.prototype.constructor = mxPartitionLayout;
+mxPartitionLayout.prototype.horizontal = null;
+mxPartitionLayout.prototype.spacing = null;
+mxPartitionLayout.prototype.border = null;
+mxPartitionLayout.prototype.resizeVertices = !0;
+mxPartitionLayout.prototype.isHorizontal = function() {
+  return this.horizontal
+};
+mxPartitionLayout.prototype.moveCell = function(a, b, c) {
+  c = this.graph.getModel();
+  var d = c.getParent(a);
+  if (null != a && null != d) {
+    for (var e = 0, f = 0, g = c.getChildCount(d), e = 0; e < g; e++) {
+      var h = c.getChildAt(d, e),
+        h = this.getVertexBounds(h);
+      if (null != h) {
+        h = h.x + h.width / 2;
+        if (f < b && h > b) break;
+        f = h
+      }
+    }
+    b = d.getIndex(a);
+    b = Math.max(0, e - (e > b ? 1 : 0));
+    c.add(d, a, b)
+  }
+};
+mxPartitionLayout.prototype.execute = function(a) {
+  var b = this.isHorizontal(),
+    c = this.graph.getModel(),
+    d = c.getGeometry(a);
+  if (null != this.graph.container && (null == d && c.isLayer(a) || a == this.graph.getView().currentRoot)) d = new mxRectangle(0, 0, this.graph.container.offsetWidth - 1, this.graph.container.offsetHeight -
+    1);
+  if (null != d) {
+    for (var e = [], f = c.getChildCount(a), g = 0; g < f; g++) {
+      var h = c.getChildAt(a, g);
+      !this.isVertexIgnored(h) && this.isVertexMovable(h) && e.push(h)
+    }
+    f = e.length;
+    if (0 < f) {
+      var k = this.border,
+        l = this.border,
+        m = b ?
+        d.height : d.width,
+        m = m - 2 * this.border;
+      a = this.graph.isSwimlane(a) ? this.graph.getStartSize(a) : new mxRectangle;
+      m -= b ? a.height : a.width;
+      k += a.width;
+      l += a.height;
+      a = this.border + (f - 1) * this.spacing;
+      d = b ? (d.width - k - a) / f : (d.height - l - a) / f;
+      if (0 < d) {
+        c.beginUpdate();
+        try {
+          for (g = 0; g < f; g++) {
+            var h = e[g],
+              n = c.getGeometry(h);
+            null != n && (n = n.clone(), n.x = k, n.y = l, b ? (this.resizeVertices && (n.width = d, n.height = m), k += d + this.spacing) : (this.resizeVertices && (n.height = d, n.width = m), l +=
+              d + this.spacing), c.setGeometry(h, n))
+          }
+        } finally {
+          c.endUpdate()
+        }
+      }
+    }
+  }
+};
+
+function mxCompactTreeLayout(a, b, c) {
+  mxGraphLayout.call(this, a);
+  this.horizontal = null != b ? b : !0;
+  this.invert = null != c ? c : !1
+}
+mxCompactTreeLayout.prototype = new mxGraphLayout;
+mxCompactTreeLayout.prototype.constructor = mxCompactTreeLayout;
+mxCompactTreeLayout.prototype.horizontal = null;
+mxCompactTreeLayout.prototype.invert = null;
+mxCompactTreeLayout.prototype.resizeParent = !0;
+mxCompactTreeLayout.prototype.groupPadding = 10;
+mxCompactTreeLayout.prototype.parentsChanged = null;
+mxCompactTreeLayout.prototype.moveTree = !1;
+mxCompactTreeLayout.prototype.levelDistance = 10;
+mxCompactTreeLayout.prototype.nodeDistance = 20;
+mxCompactTreeLayout.prototype.resetEdges = !0;
+mxCompactTreeLayout.prototype.prefHozEdgeSep = 5;
+mxCompactTreeLayout.prototype.prefVertEdgeOff = 4;
+mxCompactTreeLayout.prototype.minEdgeJetty = 8;
+mxCompactTreeLayout.prototype.channelBuffer = 4;
+mxCompactTreeLayout.prototype.edgeRouting = !0;
+mxCompactTreeLayout.prototype.isVertexIgnored = function(a) {
+  return mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) || 0 == this.graph.getConnections(a).length
+};
+mxCompactTreeLayout.prototype.isHorizontal = function() {
+  return this.horizontal
+};
+mxCompactTreeLayout.prototype.execute = function(a, b) {
+  this.parent = a;
+  var c = this.graph.getModel();
+  if (null == b)
+    if (0 < this.graph.getEdges(a, c.getParent(a), this.invert, !this.invert, !1).length) b = a;
+    else {
+      var d = this.graph.findTreeRoots(a, !0, this.invert);
+      if (0 < d.length)
+        for (var e = 0; e < d.length; e++)
+          if (!this.isVertexIgnored(d[e]) && 0 < this.graph.getEdges(d[e], null, this.invert, !this.invert, !1).length) {
+            b = d[e];
+            break
+          }
+    }
+  if (null != b) {
+    this.parentsChanged = this.resizeParent ? {} : null;
+    c.beginUpdate();
+    try {
+      var f = this.dfs(b, a);
+      if (null !=
+        f) {
+        this.layout(f);
+        var g = this.graph.gridSize,
+          d = g;
+        if (!this.moveTree) {
+          var h = this.getVertexBounds(b);
+          null != h && (g = h.x, d = h.y)
+        }
+        h = null;
+        h = this.isHorizontal() ? this.horizontalLayout(f, g, d) : this.verticalLayout(f, null, g, d);
+        if (null != h) {
+          var k = e = 0;
+          0 > h.x && (e = Math.abs(g - h.x));
+          0 > h.y && (k = Math.abs(d - h.y));
+          (0 != e || 0 != k) && this.moveNode(f, e, k);
+          this.resizeParent && this.adjustParents();
+          this.edgeRouting && this.localEdgeProcessing(f)
+        }
+      }
+    } finally {
+      c.endUpdate()
+    }
+  }
+};
+mxCompactTreeLayout.prototype.moveNode = function(a, b, c) {
+  a.x += b;
+  a.y += c;
+  this.apply(a);
+  for (a = a.child; null != a;) this.moveNode(a, b, c), a = a.next
+};
+mxCompactTreeLayout.prototype.dfs = function(a, b, c) {
+  c = null != c ? c : [];
+  var d = mxCellPath.create(a),
+    e = null;
+  if (null != a && null == c[d] && !this.isVertexIgnored(a)) {
+    c[d] = a;
+    var e = this.createNode(a),
+      d = this.graph.getModel(),
+      f = null;
+    a = this.graph.getEdges(a, b, this.invert, !this.invert, !1, !0);
+    for (var g = this.graph.getView(), h = 0; h < a.length; h++) {
+      var k = a[h];
+      if (!this.isEdgeIgnored(k)) {
+        this.resetEdges && this.setEdgePoints(k, null);
+        this.edgeRouting && (this.setEdgeStyleEnabled(k, !1), this.setEdgePoints(k, null));
+        var l = g.getState(k),
+          k = null != l ? l.getVisibleTerminal(this.invert) : g.getVisibleTerminal(k, this.invert),
+          l = this.dfs(k, b, c);
+        null != l && null != d.getGeometry(k) && (null == f ? e.child = l : f.next = l, f = l)
+      }
+    }
+  }
+  return e
+};
+mxCompactTreeLayout.prototype.layout = function(a) {
+  if (null != a) {
+    for (var b = a.child; null != b;) this.layout(b), b = b.next;
+    null != a.child ? this.attachParent(a, this.join(a)) : this.layoutLeaf(a)
+  }
+};
+mxCompactTreeLayout.prototype.horizontalLayout = function(a, b, c, d) {
+  a.x += b + a.offsetX;
+  a.y += c + a.offsetY;
+  d = this.apply(a, d);
+  b = a.child;
+  if (null != b) {
+    d = this.horizontalLayout(b, a.x, a.y, d);
+    c = a.y + b.offsetY;
+    for (var e = b.next; null != e;) d = this.horizontalLayout(e, a.x + b.offsetX, c, d), c += e.offsetY, e = e.next
+  }
+  return d
+};
+mxCompactTreeLayout.prototype.verticalLayout = function(a, b, c, d, e) {
+  a.x += c + a.offsetY;
+  a.y += d + a.offsetX;
+  e = this.apply(a, e);
+  b = a.child;
+  if (null != b) {
+    e = this.verticalLayout(b, a, a.x, a.y, e);
+    c = a.x + b.offsetY;
+    for (d = b.next; null != d;) e = this.verticalLayout(d, a, c, a.y + b.offsetX, e), c += d.offsetY, d = d.next
+  }
+  return e
+};
+mxCompactTreeLayout.prototype.attachParent = function(a, b) {
+  var c = this.nodeDistance + this.levelDistance,
+    d = (b - a.width) / 2 - this.nodeDistance,
+    e = d + a.width + 2 * this.nodeDistance - b;
+  a.child.offsetX = c + a.height;
+  a.child.offsetY = e;
+  a.contour.upperHead = this.createLine(a.height, 0, this.createLine(c, e, a.contour.upperHead));
+  a.contour.lowerHead = this.createLine(a.height, 0, this.createLine(c, d, a.contour.lowerHead))
+};
+mxCompactTreeLayout.prototype.layoutLeaf = function(a) {
+  var b = 2 * this.nodeDistance;
+  a.contour.upperTail = this.createLine(a.height + b, 0);
+  a.contour.upperHead = a.contour.upperTail;
+  a.contour.lowerTail = this.createLine(0, -a.width - b);
+  a.contour.lowerHead = this.createLine(a.height + b, 0, a.contour.lowerTail)
+};
+mxCompactTreeLayout.prototype.join = function(a) {
+  var b = 2 * this.nodeDistance,
+    c = a.child;
+  a.contour = c.contour;
+  for (var d = c.width + b, e = d, c = c.next; null != c;) {
+    var f = this.merge(a.contour, c.contour);
+    c.offsetY = f + d;
+    c.offsetX = 0;
+    d = c.width + b;
+    e += f + d;
+    c = c.next
+  }
+  return e
+};
+mxCompactTreeLayout.prototype.merge = function(a, b) {
+  for (var c = 0, d = 0, e = 0, f = a.lowerHead, g = b.upperHead; null != g && null != f;) {
+    var h = this.offset(c, d, g.dx, g.dy, f.dx, f.dy),
+      d = d + h,
+      e = e + h;
+    c + g.dx <= f.dx ? (c += g.dx, d += g.dy, g = g.next) : (c -= f.dx, d -= f.dy, f = f.next)
+  }
+  null != g ? (c = this.bridge(a.upperTail, 0, 0, g, c, d), a.upperTail = null != c.next ? b.upperTail : c, a.lowerTail = b.lowerTail) : (c = this.bridge(b.lowerTail, c, d, f, 0, 0), null == c.next &&
+    (a.lowerTail = c));
+  a.lowerHead = b.lowerHead;
+  return e
+};
+mxCompactTreeLayout.prototype.offset = function(a, b, c, d, e, f) {
+  var g = 0;
+  if (e <= a || 0 >= a + c) return 0;
+  g = 0 < e * d - c * f ? 0 > a ? a * d / c - b : 0 < a ? a * f / e - b : -b : e < a + c ? f - (b + (e - a) * d / c) : e > a + c ? (c + a) * f / e - (b + d) : f - (b + d);
+  return 0 < g ? g : 0
+};
+mxCompactTreeLayout.prototype.bridge = function(a, b, c, d, e, f) {
+  b = e + d.dx - b;
+  e = e = 0;
+  0 == d.dx ? e = d.dy : (e = b * d.dy, e /= d.dx);
+  b = this.createLine(b, e, d.next);
+  a.next = this.createLine(0, f + d.dy - e - c, b);
+  return b
+};
+mxCompactTreeLayout.prototype.createNode = function(a) {
+  var b = {};
+  b.cell = a;
+  b.x = 0;
+  b.y = 0;
+  b.width = 0;
+  b.height = 0;
+  a = this.getVertexBounds(a);
+  null != a && (this.isHorizontal() ? (b.width = a.height, b.height = a.width) : (b.width = a.width, b.height = a.height));
+  b.offsetX = 0;
+  b.offsetY = 0;
+  b.contour = {};
+  return b
+};
+mxCompactTreeLayout.prototype.apply = function(a, b) {
+  var c = this.graph.getModel(),
+    d = a.cell,
+    e = c.getGeometry(d);
+  null != d && null != e && (this.isVertexMovable(d) && (e = this.setVertexLocation(d, a.x, a.y), this.resizeParent && (c = c.getParent(d), d = mxCellPath.create(c), null == this.parentsChanged[d] &&
+    (this.parentsChanged[d] = c))), b = null == b ? new mxRectangle(e.x, e.y, e.width, e.height) : new mxRectangle(Math.min(b.x, e.x), Math.min(b.y, e.y), Math.max(b.x + b.width, e.x + e.width),
+    Math.max(b.y + b.height, e.y + e.height)));
+  return b
+};
+mxCompactTreeLayout.prototype.createLine = function(a, b, c) {
+  var d = {};
+  d.dx = a;
+  d.dy = b;
+  d.next = c;
+  return d
+};
+mxCompactTreeLayout.prototype.adjustParents = function() {
+  var a = [],
+    b;
+  for (b in this.parentsChanged) a.push(this.parentsChanged[b]);
+  this.arrangeGroups(mxUtils.sortCells(a, !0), this.groupPadding)
+};
+mxCompactTreeLayout.prototype.localEdgeProcessing = function(a) {
+  this.processNodeOutgoing(a);
+  for (a = a.child; null != a;) this.localEdgeProcessing(a), a = a.next
+};
+mxCompactTreeLayout.prototype.processNodeOutgoing = function(a) {
+  for (var b = a.child, c = a.cell, d = 0, e = []; null != b;) {
+    d++;
+    var f = b.x;
+    this.horizontal && (f = b.y);
+    e.push(new WeightedCellSorter(b, f));
+    b = b.next
+  }
+  e.sort(WeightedCellSorter.prototype.compare);
+  var f = a.width,
+    g = (d + 1) * this.prefHozEdgeSep;
+  f > g + 2 * this.prefHozEdgeSep && (f -= 2 * this.prefHozEdgeSep);
+  a = f / d;
+  b = a / 2;
+  f > g + 2 * this.prefHozEdgeSep && (b += this.prefHozEdgeSep);
+  for (var f = this.minEdgeJetty - this.prefVertEdgeOff, g = 0, h = this.getVertexBounds(c), k = 0; k < e.length; k++) {
+    for (var l =
+        e[k].cell.cell, m = this.getVertexBounds(l), l = this.graph.getEdgesBetween(c, l, !1), n = [], p = 0, q = 0, s = 0; s < l.length; s++) this.horizontal ? (p = h.x + h.width, q = h.y + b, n.push(
+      new mxPoint(p, q)), p = h.x + h.width + f, n.push(new mxPoint(p, q)), q = m.y + m.height / 2) : (p = h.x + b, q = h.y + h.height, n.push(new mxPoint(p, q)), q = h.y + h.height + f, n.push(
+      new mxPoint(p, q)), p = m.x + m.width / 2), n.push(new mxPoint(p, q)), this.setEdgePoints(l[s], n);
+    k < d / 2 ? f += this.prefVertEdgeOff : k > d / 2 && (f -= this.prefVertEdgeOff);
+    b += a;
+    g = Math.max(g, f)
+  }
+};
+
+function WeightedCellSorter(a, b) {
+  this.cell = a;
+  this.weightedValue = b
+}
+WeightedCellSorter.prototype.weightedValue = 0;
+WeightedCellSorter.prototype.nudge = !1;
+WeightedCellSorter.prototype.visited = !1;
+WeightedCellSorter.prototype.rankIndex = null;
+WeightedCellSorter.prototype.cell = null;
+WeightedCellSorter.prototype.compare = function(a, b) {
+  return null != a && null != b ? b.weightedValue > a.weightedValue ? 1 : b.weightedValue < a.weightedValue ? -1 : b.nudge ? 1 : -1 : 0
+};
+
+function mxFastOrganicLayout(a) {
+  mxGraphLayout.call(this, a)
+}
+mxFastOrganicLayout.prototype = new mxGraphLayout;
+mxFastOrganicLayout.prototype.constructor = mxFastOrganicLayout;
+mxFastOrganicLayout.prototype.useInputOrigin = !0;
+mxFastOrganicLayout.prototype.resetEdges = !0;
+mxFastOrganicLayout.prototype.disableEdgeStyle = !0;
+mxFastOrganicLayout.prototype.forceConstant = 50;
+mxFastOrganicLayout.prototype.forceConstantSquared = 0;
+mxFastOrganicLayout.prototype.minDistanceLimit = 2;
+mxFastOrganicLayout.prototype.maxDistanceLimit = 500;
+mxFastOrganicLayout.prototype.minDistanceLimitSquared = 4;
+mxFastOrganicLayout.prototype.initialTemp = 200;
+mxFastOrganicLayout.prototype.temperature = 0;
+mxFastOrganicLayout.prototype.maxIterations = 0;
+mxFastOrganicLayout.prototype.iteration = 0;
+mxFastOrganicLayout.prototype.allowedToRun = !0;
+mxFastOrganicLayout.prototype.isVertexIgnored = function(a) {
+  return mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) || 0 == this.graph.getConnections(a).length
+};
+mxFastOrganicLayout.prototype.execute = function(a) {
+  var b = this.graph.getModel();
+  this.vertexArray = [];
+  for (var c = this.graph.getChildVertices(a), d = 0; d < c.length; d++) this.isVertexIgnored(c[d]) || this.vertexArray.push(c[d]);
+  var e = this.useInputOrigin ? this.graph.view.getBounds(this.vertexArray) : null,
+    f = this.vertexArray.length;
+  this.indices = [];
+  this.dispX = [];
+  this.dispY = [];
+  this.cellLocation = [];
+  this.isMoveable = [];
+  this.neighbours = [];
+  this.radius = [];
+  this.radiusSquared = [];
+  0.0010 > this.forceConstant && (this.forceConstant =
+    0.0010);
+  this.forceConstantSquared = this.forceConstant * this.forceConstant;
+  for (d = 0; d < this.vertexArray.length; d++) {
+    var g = this.vertexArray[d];
+    this.cellLocation[d] = [];
+    var h = mxCellPath.create(g);
+    this.indices[h] = d;
+    var k = this.getVertexBounds(g),
+      l = k.width,
+      m = k.height,
+      n = k.x,
+      p = k.y;
+    this.cellLocation[d][0] = n + l / 2;
+    this.cellLocation[d][1] = p + m / 2;
+    this.radius[d] = Math.min(l, m);
+    this.radiusSquared[d] = this.radius[d] * this.radius[d]
+  }
+  b.beginUpdate();
+  try {
+    for (d = 0; d < f; d++) {
+      this.dispX[d] = 0;
+      this.dispY[d] = 0;
+      this.isMoveable[d] = this.isVertexMovable(this.vertexArray[d]);
+      var q = this.graph.getConnections(this.vertexArray[d], a),
+        c = this.graph.getOpposites(q, this.vertexArray[d]);
+      this.neighbours[d] = [];
+      for (l = 0; l < c.length; l++) {
+        this.resetEdges && this.graph.resetEdge(q[l]);
+        this.disableEdgeStyle && this.setEdgeStyleEnabled(q[l], !1);
+        var h = mxCellPath.create(c[l]),
+          s = this.indices[h];
+        this.neighbours[d][l] = null != s ? s : d
+      }
+    }
+    this.temperature = this.initialTemp;
+    0 == this.maxIterations && (this.maxIterations = 20 * Math.sqrt(f));
+    for (this.iteration = 0; this.iteration < this.maxIterations; this.iteration++) {
+      if (!this.allowedToRun) return;
+      this.calcRepulsion();
+      this.calcAttraction();
+      this.calcPositions();
+      this.reduceTemperature()
+    }
+    a = c = null;
+    for (d = 0; d < this.vertexArray.length; d++) g = this.vertexArray[d], this.isVertexMovable(g) && (k = this.getVertexBounds(g), null != k && (this.cellLocation[d][0] -= k.width / 2, this.cellLocation[
+        d][1] -= k.height / 2, n = this.graph.snap(this.cellLocation[d][0]), p = this.graph.snap(this.cellLocation[d][1]), this.setVertexLocation(g, n, p), c = null == c ? n : Math.min(c, n), a =
+      null == a ? p : Math.min(a, p)));
+    d = -(c || 0) + 1;
+    g = -(a || 0) + 1;
+    null != e && (d += e.x,
+      g += e.y);
+    this.graph.moveCells(this.vertexArray, d, g)
+  } finally {
+    b.endUpdate()
+  }
+};
+mxFastOrganicLayout.prototype.calcPositions = function() {
+  for (var a = 0; a < this.vertexArray.length; a++)
+    if (this.isMoveable[a]) {
+      var b = Math.sqrt(this.dispX[a] * this.dispX[a] + this.dispY[a] * this.dispY[a]);
+      0.0010 > b && (b = 0.0010);
+      var c = this.dispX[a] / b * Math.min(b, this.temperature),
+        b = this.dispY[a] / b * Math.min(b, this.temperature);
+      this.dispX[a] = 0;
+      this.dispY[a] = 0;
+      this.cellLocation[a][0] += c;
+      this.cellLocation[a][1] += b
+    }
+};
+mxFastOrganicLayout.prototype.calcAttraction = function() {
+  for (var a = 0; a < this.vertexArray.length; a++)
+    for (var b = 0; b < this.neighbours[a].length; b++) {
+      var c = this.neighbours[a][b];
+      if (a != c && this.isMoveable[a] && this.isMoveable[c]) {
+        var d = this.cellLocation[a][0] - this.cellLocation[c][0],
+          e = this.cellLocation[a][1] - this.cellLocation[c][1],
+          f = d * d + e * e - this.radiusSquared[a] - this.radiusSquared[c];
+        f < this.minDistanceLimitSquared && (f = this.minDistanceLimitSquared);
+        var g = Math.sqrt(f),
+          f = f / this.forceConstant,
+          d = d / g * f,
+          e = e / g * f;
+        this.dispX[a] -= d;
+        this.dispY[a] -= e;
+        this.dispX[c] += d;
+        this.dispY[c] += e
+      }
+    }
+};
+mxFastOrganicLayout.prototype.calcRepulsion = function() {
+  for (var a = this.vertexArray.length, b = 0; b < a; b++)
+    for (var c = b; c < a; c++) {
+      if (!this.allowedToRun) return;
+      if (c != b && this.isMoveable[b] && this.isMoveable[c]) {
+        var d = this.cellLocation[b][0] - this.cellLocation[c][0],
+          e = this.cellLocation[b][1] - this.cellLocation[c][1];
+        0 == d && (d = 0.01 + Math.random());
+        0 == e && (e = 0.01 + Math.random());
+        var f = Math.sqrt(d * d + e * e),
+          g = f - this.radius[b] - this.radius[c];
+        g > this.maxDistanceLimit || (g < this.minDistanceLimit && (g = this.minDistanceLimit), g = this.forceConstantSquared /
+          g, d = d / f * g, e = e / f * g, this.dispX[b] += d, this.dispY[b] += e, this.dispX[c] -= d, this.dispY[c] -= e)
+      }
+    }
+};
+mxFastOrganicLayout.prototype.reduceTemperature = function() {
+  this.temperature = this.initialTemp * (1 - this.iteration / this.maxIterations)
+};
+
+function mxCircleLayout(a, b) {
+  mxGraphLayout.call(this, a);
+  this.radius = null != b ? b : 100
+}
+mxCircleLayout.prototype = new mxGraphLayout;
+mxCircleLayout.prototype.constructor = mxCircleLayout;
+mxCircleLayout.prototype.radius = null;
+mxCircleLayout.prototype.moveCircle = !1;
+mxCircleLayout.prototype.x0 = 0;
+mxCircleLayout.prototype.y0 = 0;
+mxCircleLayout.prototype.resetEdges = !0;
+mxCircleLayout.prototype.disableEdgeStyle = !0;
+mxCircleLayout.prototype.execute = function(a) {
+  var b = this.graph.getModel();
+  b.beginUpdate();
+  try {
+    for (var c = 0, d = null, e = null, f = [], g = b.getChildCount(a), h = 0; h < g; h++) {
+      var k = b.getChildAt(a, h);
+      if (this.isVertexIgnored(k)) this.isEdgeIgnored(k) || (this.resetEdges && this.graph.resetEdge(k), this.disableEdgeStyle && this.setEdgeStyleEnabled(k, !1));
+      else {
+        f.push(k);
+        var l = this.getVertexBounds(k),
+          d = null == d ? l.y : Math.min(d, l.y),
+          e = null == e ? l.x : Math.min(e, l.x),
+          c = Math.max(c, Math.max(l.width, l.height))
+      }
+    }
+    var m = this.getRadius(f.length,
+      c);
+    this.moveCircle && (e = this.x0, d = this.y0);
+    this.circle(f, m, e, d)
+  } finally {
+    b.endUpdate()
+  }
+};
+mxCircleLayout.prototype.getRadius = function(a, b) {
+  return Math.max(a * b / Math.PI, this.radius)
+};
+mxCircleLayout.prototype.circle = function(a, b, c, d) {
+  for (var e = a.length, f = 2 * Math.PI / e, g = 0; g < e; g++) this.isVertexMovable(a[g]) && this.setVertexLocation(a[g], c + b + b * Math.sin(g * f), d + b + b * Math.cos(g * f))
+};
+
+function mxParallelEdgeLayout(a) {
+  mxGraphLayout.call(this, a)
+}
+mxParallelEdgeLayout.prototype = new mxGraphLayout;
+mxParallelEdgeLayout.prototype.constructor = mxParallelEdgeLayout;
+mxParallelEdgeLayout.prototype.spacing = 20;
+mxParallelEdgeLayout.prototype.execute = function(a) {
+  a = this.findParallels(a);
+  this.graph.model.beginUpdate();
+  try {
+    for (var b in a) {
+      var c = a[b];
+      1 < c.length && this.layout(c)
+    }
+  } finally {
+    this.graph.model.endUpdate()
+  }
+};
+mxParallelEdgeLayout.prototype.findParallels = function(a) {
+  for (var b = this.graph.getModel(), c = [], d = b.getChildCount(a), e = 0; e < d; e++) {
+    var f = b.getChildAt(a, e);
+    if (!this.isEdgeIgnored(f)) {
+      var g = this.getEdgeId(f);
+      null != g && (null == c[g] && (c[g] = []), c[g].push(f))
+    }
+  }
+  return c
+};
+mxParallelEdgeLayout.prototype.getEdgeId = function(a) {
+  var b = this.graph.getView(),
+    c = b.getState(a),
+    d = null != c ? c.getVisibleTerminal(!0) : b.getVisibleTerminal(a, !0);
+  a = null != c ? c.getVisibleTerminal(!1) : b.getVisibleTerminal(a, !1);
+  return null != d && null != a ? (d = mxCellPath.create(d), a = mxCellPath.create(a), d > a ? a + "-" + d : d + "-" + a) : null
+};
+mxParallelEdgeLayout.prototype.layout = function(a) {
+  var b = a[0],
+    c = this.graph.getModel(),
+    d = c.getGeometry(c.getTerminal(b, !0)),
+    e = c.getGeometry(c.getTerminal(b, !1));
+  if (d == e)
+    for (var b = d.x + d.width + this.spacing, c = d.y + d.height / 2, f = 0; f < a.length; f++) this.route(a[f], b, c), b += this.spacing;
+  else if (null != d && null != e)
+    for (var b = d.x + d.width / 2, c = d.y + d.height / 2, f = e.x + e.width / 2 - b, g = e.y + e.height / 2 - c, e = Math.sqrt(f * f + g * g), d = g * this.spacing / e, e = f * this.spacing / e,
+        b = b + f / 2 + d * (a.length - 1) / 2, c = c + g / 2 - e * (a.length - 1) / 2, f = 0; f < a.length; f++) this.route(a[f],
+      b, c), b -= d, c += e
+};
+mxParallelEdgeLayout.prototype.route = function(a, b, c) {
+  this.graph.isCellMovable(a) && this.setEdgePoints(a, [new mxPoint(b, c)])
+};
+
+function mxCompositeLayout(a, b, c) {
+  mxGraphLayout.call(this, a);
+  this.layouts = b;
+  this.master = c
+}
+mxCompositeLayout.prototype = new mxGraphLayout;
+mxCompositeLayout.prototype.constructor = mxCompositeLayout;
+mxCompositeLayout.prototype.layouts = null;
+mxCompositeLayout.prototype.master = null;
+mxCompositeLayout.prototype.moveCell = function(a, b, c) {
+  null != this.master ? this.master.move.apply(this.master, arguments) : this.layouts[0].move.apply(this.layouts[0], arguments)
+};
+mxCompositeLayout.prototype.execute = function(a) {
+  var b = this.graph.getModel();
+  b.beginUpdate();
+  try {
+    for (var c = 0; c < this.layouts.length; c++) this.layouts[c].execute.apply(this.layouts[c], arguments)
+  } finally {
+    b.endUpdate()
+  }
+};
+
+function mxEdgeLabelLayout(a, b) {
+  mxGraphLayout.call(this, a)
+}
+mxEdgeLabelLayout.prototype = new mxGraphLayout;
+mxEdgeLabelLayout.prototype.constructor = mxEdgeLabelLayout;
+mxEdgeLabelLayout.prototype.execute = function(a) {
+  for (var b = this.graph.view, c = this.graph.getModel(), d = [], e = [], f = c.getChildCount(a), g = 0; g < f; g++) {
+    var h = c.getChildAt(a, g),
+      k = b.getState(h);
+    null != k && (this.isVertexIgnored(h) ? this.isEdgeIgnored(h) || d.push(k) : e.push(k))
+  }
+  this.placeLabels(e, d)
+};
+mxEdgeLabelLayout.prototype.placeLabels = function(a, b) {
+  var c = this.graph.getModel();
+  c.beginUpdate();
+  try {
+    for (var d = 0; d < b.length; d++) {
+      var e = b[d];
+      if (null != e && null != e.text && null != e.text.boundingBox)
+        for (var f = 0; f < a.length; f++) {
+          var g = a[f];
+          null != g && this.avoid(e, g)
+        }
+    }
+  } finally {
+    c.endUpdate()
+  }
+};
+mxEdgeLabelLayout.prototype.avoid = function(a, b) {
+  var c = this.graph.getModel(),
+    d = a.text.boundingBox;
+  if (mxUtils.intersects(d, b)) {
+    var e = -d.y - d.height + b.y,
+      f = -d.y + b.y + b.height,
+      e = Math.abs(e) < Math.abs(f) ? e : f,
+      f = -d.x - d.width + b.x,
+      d = -d.x + b.x + b.width,
+      d = Math.abs(f) < Math.abs(d) ? f : d;
+    Math.abs(d) < Math.abs(e) ? e = 0 : d = 0;
+    f = c.getGeometry(a.cell);
+    null != f && (f = f.clone(), null != f.offset ? (f.offset.x += d, f.offset.y += e) : f.offset = new mxPoint(d, e), c.setGeometry(a.cell, f))
+  }
+};
+
+function mxGraphAbstractHierarchyCell() {
+  this.x = [];
+  this.y = [];
+  this.temp = []
+}
+mxGraphAbstractHierarchyCell.prototype.maxRank = -1;
+mxGraphAbstractHierarchyCell.prototype.minRank = -1;
+mxGraphAbstractHierarchyCell.prototype.x = null;
+mxGraphAbstractHierarchyCell.prototype.y = null;
+mxGraphAbstractHierarchyCell.prototype.width = 0;
+mxGraphAbstractHierarchyCell.prototype.height = 0;
+mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells = null;
+mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells = null;
+mxGraphAbstractHierarchyCell.prototype.temp = null;
+mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells = function(a) {
+  return null
+};
+mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells = function(a) {
+  return null
+};
+mxGraphAbstractHierarchyCell.prototype.isEdge = function() {
+  return !1
+};
+mxGraphAbstractHierarchyCell.prototype.isVertex = function() {
+  return !1
+};
+mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable = function(a) {
+  return null
+};
+mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable = function(a, b) {
+  return null
+};
+mxGraphAbstractHierarchyCell.prototype.setX = function(a, b) {
+  this.isVertex() ? this.x[0] = b : this.isEdge() && (this.x[a - this.minRank - 1] = b)
+};
+mxGraphAbstractHierarchyCell.prototype.getX = function(a) {
+  return this.isVertex() ? this.x[0] : this.isEdge() ? this.x[a - this.minRank - 1] : 0
+};
+mxGraphAbstractHierarchyCell.prototype.setY = function(a, b) {
+  this.isVertex() ? this.y[0] = b : this.isEdge() && (this.y[a - this.minRank - 1] = b)
+};
+
+function mxGraphHierarchyNode(a) {
+  mxGraphAbstractHierarchyCell.apply(this, arguments);
+  this.cell = a
+}
+mxGraphHierarchyNode.prototype = new mxGraphAbstractHierarchyCell;
+mxGraphHierarchyNode.prototype.constructor = mxGraphHierarchyNode;
+mxGraphHierarchyNode.prototype.cell = null;
+mxGraphHierarchyNode.prototype.connectsAsTarget = [];
+mxGraphHierarchyNode.prototype.connectsAsSource = [];
+mxGraphHierarchyNode.prototype.hashCode = !1;
+mxGraphHierarchyNode.prototype.getRankValue = function(a) {
+  return this.maxRank
+};
+mxGraphHierarchyNode.prototype.getNextLayerConnectedCells = function(a) {
+  if (null == this.nextLayerConnectedCells) {
+    this.nextLayerConnectedCells = [];
+    this.nextLayerConnectedCells[0] = [];
+    for (var b = 0; b < this.connectsAsTarget.length; b++) {
+      var c = this.connectsAsTarget[b]; - 1 == c.maxRank || c.maxRank == a + 1 ? this.nextLayerConnectedCells[0].push(c.source) : this.nextLayerConnectedCells[0].push(c)
+    }
+  }
+  return this.nextLayerConnectedCells[0]
+};
+mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells = function(a) {
+  if (null == this.previousLayerConnectedCells) {
+    this.previousLayerConnectedCells = [];
+    this.previousLayerConnectedCells[0] = [];
+    for (var b = 0; b < this.connectsAsSource.length; b++) {
+      var c = this.connectsAsSource[b]; - 1 == c.minRank || c.minRank == a - 1 ? this.previousLayerConnectedCells[0].push(c.target) : this.previousLayerConnectedCells[0].push(c)
+    }
+  }
+  return this.previousLayerConnectedCells[0]
+};
+mxGraphHierarchyNode.prototype.isVertex = function() {
+  return !0
+};
+mxGraphHierarchyNode.prototype.getGeneralPurposeVariable = function(a) {
+  return this.temp[0]
+};
+mxGraphHierarchyNode.prototype.setGeneralPurposeVariable = function(a, b) {
+  this.temp[0] = b
+};
+mxGraphHierarchyNode.prototype.isAncestor = function(a) {
+  if (null != a && null != this.hashCode && null != a.hashCode && this.hashCode.length < a.hashCode.length) {
+    if (this.hashCode == a.hashCode) return !0;
+    if (null == this.hashCode || null == this.hashCode) return !1;
+    for (var b = 0; b < this.hashCode.length; b++)
+      if (this.hashCode[b] != a.hashCode[b]) return !1;
+    return !0
+  }
+  return !1
+};
+mxGraphHierarchyNode.prototype.getCoreCell = function() {
+  return this.cell
+};
+
+function mxGraphHierarchyEdge(a) {
+  mxGraphAbstractHierarchyCell.apply(this, arguments);
+  this.edges = a
+}
+mxGraphHierarchyEdge.prototype = new mxGraphAbstractHierarchyCell;
+mxGraphHierarchyEdge.prototype.constructor = mxGraphHierarchyEdge;
+mxGraphHierarchyEdge.prototype.edges = null;
+mxGraphHierarchyEdge.prototype.source = null;
+mxGraphHierarchyEdge.prototype.target = null;
+mxGraphHierarchyEdge.prototype.isReversed = !1;
+mxGraphHierarchyEdge.prototype.invert = function(a) {
+  a = this.source;
+  this.source = this.target;
+  this.target = a;
+  this.isReversed = !this.isReversed
+};
+mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells = function(a) {
+  if (null == this.nextLayerConnectedCells) {
+    this.nextLayerConnectedCells = [];
+    for (var b = 0; b < this.temp.length; b++) this.nextLayerConnectedCells[b] = [], b == this.temp.length - 1 ? this.nextLayerConnectedCells[b].push(this.source) : this.nextLayerConnectedCells[b].push(
+      this)
+  }
+  return this.nextLayerConnectedCells[a - this.minRank - 1]
+};
+mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells = function(a) {
+  if (null == this.previousLayerConnectedCells) {
+    this.previousLayerConnectedCells = [];
+    for (var b = 0; b < this.temp.length; b++) this.previousLayerConnectedCells[b] = [], 0 == b ? this.previousLayerConnectedCells[b].push(this.target) : this.previousLayerConnectedCells[b].push(
+      this)
+  }
+  return this.previousLayerConnectedCells[a - this.minRank - 1]
+};
+mxGraphHierarchyEdge.prototype.isEdge = function() {
+  return !0
+};
+mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable = function(a) {
+  return this.temp[a - this.minRank - 1]
+};
+mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable = function(a, b) {
+  this.temp[a - this.minRank - 1] = b
+};
+mxGraphHierarchyEdge.prototype.getCoreCell = function() {
+  return null != this.edges && 0 < this.edges.length ? this.edges[0] : null
+};
+
+function mxGraphHierarchyModel(a, b, c, d, e) {
+  a.getGraph();
+  this.tightenToSource = e;
+  this.roots = c;
+  this.parent = d;
+  this.vertexMapper = {};
+  this.edgeMapper = {};
+  this.maxRank = 0;
+  c = [];
+  null == b && (b = this.graph.getChildVertices(d));
+  this.maxRank = this.SOURCESCANSTARTRANK;
+  this.createInternalCells(a, b, c);
+  for (d = 0; d < b.length; d++) {
+    e = c[d].connectsAsSource;
+    for (var f = 0; f < e.length; f++) {
+      var g = e[f],
+        h = g.edges;
+      if (null != h && 0 < h.length) {
+        var h = h[0],
+          k = a.getVisibleTerminal(h, !1),
+          k = mxCellPath.create(k),
+          k = this.vertexMapper[k];
+        c[d] == k && (k = a.getVisibleTerminal(h, !0), k = mxCellPath.create(k), k = this.vertexMapper[k]);
+        null != k && c[d] != k && (g.target = k, 0 == k.connectsAsTarget.length && (k.connectsAsTarget = []), 0 > mxUtils.indexOf(k.connectsAsTarget, g) && k.connectsAsTarget.push(g))
+      }
+    }
+    c[d].temp[0] = 1
+  }
+}
+mxGraphHierarchyModel.prototype.maxRank = null;
+mxGraphHierarchyModel.prototype.vertexMapper = null;
+mxGraphHierarchyModel.prototype.edgeMapper = null;
+mxGraphHierarchyModel.prototype.ranks = null;
+mxGraphHierarchyModel.prototype.roots = null;
+mxGraphHierarchyModel.prototype.parent = null;
+mxGraphHierarchyModel.prototype.dfsCount = 0;
+mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK = 1E8;
+mxGraphHierarchyModel.prototype.tightenToSource = !1;
+mxGraphHierarchyModel.prototype.createInternalCells = function(a, b, c) {
+  for (var d = a.getGraph(), e = 0; e < b.length; e++) {
+    c[e] = new mxGraphHierarchyNode(b[e]);
+    var f = mxCellPath.create(b[e]);
+    this.vertexMapper[f] = c[e];
+    f = a.getEdges(b[e]);
+    c[e].connectsAsSource = [];
+    for (var g = 0; g < f.length; g++) {
+      var h = a.getVisibleTerminal(f[g], !1);
+      if (h != b[e] && h != b[e] && a.graph.model.isVertex(h) && !a.isVertexIgnored(h)) {
+        var k = a.getEdgesBetween(b[e], h, !1),
+          l = a.getEdgesBetween(b[e], h, !0),
+          h = mxCellPath.create(k[0]);
+        if (null != k && 0 < k.length && null ==
+          this.edgeMapper[h] && 2 * l.length >= k.length) {
+          for (var l = new mxGraphHierarchyEdge(k), m = 0; m < k.length; m++) {
+            var n = k[m],
+              h = mxCellPath.create(n);
+            this.edgeMapper[h] = l;
+            d.resetEdge(n);
+            a.disableEdgeStyle && (a.setEdgeStyleEnabled(n, !1), a.setOrthogonalEdge(n, !0))
+          }
+          l.source = c[e];
+          0 > mxUtils.indexOf(c[e].connectsAsSource, l) && c[e].connectsAsSource.push(l)
+        }
+      }
+    }
+    c[e].temp[0] = 0
+  }
+};
+mxGraphHierarchyModel.prototype.initialRank = function() {
+  var a = [];
+  if (null != this.roots)
+    for (var b = 0; b < this.roots.length; b++) {
+      var c = mxCellPath.create(this.roots[b]),
+        c = this.vertexMapper[c];
+      null != c && a.push(c)
+    }
+  for (var d in this.vertexMapper) c = this.vertexMapper[d], c.temp[0] = -1;
+  for (var e = a.slice(); 0 < a.length;) {
+    var c = a[0],
+      f, g;
+    f = c.connectsAsTarget;
+    g = c.connectsAsSource;
+    for (var h = !0, k = this.SOURCESCANSTARTRANK, b = 0; b < f.length; b++) {
+      var l = f[b];
+      if (5270620 == l.temp[0]) l = l.source, k = Math.min(k, l.temp[0] - 1);
+      else {
+        h = !1;
+        break
+      }
+    }
+    if (h) {
+      c.temp[0] =
+        k;
+      this.maxRank = Math.min(this.maxRank, k);
+      if (null != g)
+        for (b = 0; b < g.length; b++) l = g[b], l.temp[0] = 5270620, l = l.target, -1 == l.temp[0] && (a.push(l), l.temp[0] = -2);
+      a.shift()
+    } else if (b = a.shift(), a.push(c), b == c && 1 == a.length) break
+  }
+  for (d in this.vertexMapper) c = this.vertexMapper[d], c.temp[0] -= this.maxRank;
+  for (b = 0; b < e.length; b++) {
+    c = e[b];
+    a = 0;
+    f = c.connectsAsSource;
+    for (d = 0; d < f.length; d++) l = f[d], l = l.target, c.temp[0] = Math.max(a, l.temp[0] + 1), a = c.temp[0]
+  }
+  this.maxRank = this.SOURCESCANSTARTRANK - this.maxRank
+};
+mxGraphHierarchyModel.prototype.fixRanks = function() {
+  var a = [];
+  this.ranks = [];
+  for (var b = 0; b < this.maxRank + 1; b++) a[b] = [], this.ranks[b] = a[b];
+  var c = null;
+  if (null != this.roots)
+    for (var d = this.roots, c = [], b = 0; b < d.length; b++) {
+      var e = mxCellPath.create(d[b]);
+      c[b] = this.vertexMapper[e]
+    }
+  this.visit(function(b, c, d, e, l) {
+    0 == l && (0 > c.maxRank && 0 > c.minRank) && (a[c.temp[0]].push(c), c.maxRank = c.temp[0], c.minRank = c.temp[0], c.temp[0] = a[c.maxRank].length - 1);
+    if (null != b && null != d && 1 < b.maxRank - c.maxRank) {
+      d.maxRank = b.maxRank;
+      d.minRank =
+        c.maxRank;
+      d.temp = [];
+      d.x = [];
+      d.y = [];
+      for (b = d.minRank + 1; b < d.maxRank; b++) a[b].push(d), d.setGeneralPurposeVariable(b, a[b].length - 1)
+    }
+  }, c, !1, null)
+};
+mxGraphHierarchyModel.prototype.visit = function(a, b, c, d) {
+  if (null != b) {
+    for (var e = 0; e < b.length; e++) {
+      var f = b[e];
+      null != f && (null == d && (d = {}), c ? (f.hashCode = [], f.hashCode[0] = this.dfsCount, f.hashCode[1] = e, this.extendedDfs(null, f, null, a, d, f.hashCode, e, 0)) : this.dfs(null, f, null,
+        a, d, 0))
+    }
+    this.dfsCount++
+  }
+};
+mxGraphHierarchyModel.prototype.dfs = function(a, b, c, d, e, f) {
+  if (null != b) {
+    var g = mxCellPath.create(b.cell);
+    if (null == e[g]) {
+      e[g] = b;
+      d(a, b, c, f, 0);
+      a = b.connectsAsSource.slice();
+      for (c = 0; c < a.length; c++) g = a[c], this.dfs(b, g.target, g, d, e, f + 1)
+    } else d(a, b, c, f, 1)
+  }
+};
+mxGraphHierarchyModel.prototype.extendedDfs = function(a, b, c, d, e, f, g, h) {
+  if (null != b) {
+    if (null != a && (null == b.hashCode || b.hashCode[0] != a.hashCode[0])) f = a.hashCode.length + 1, b.hashCode = a.hashCode.slice(), b.hashCode[f - 1] = g;
+    g = mxCellPath.create(b.cell);
+    if (null == e[g]) {
+      e[g] = b;
+      d(a, b, c, h, 0);
+      a = b.connectsAsSource.slice();
+      for (c = 0; c < a.length; c++) g = a[c], this.extendedDfs(b, g.target, g, d, e, b.hashCode, c, h + 1)
+    } else d(a, b, c, h, 1)
+  }
+};
+
+function mxHierarchicalLayoutStage() {}
+mxHierarchicalLayoutStage.prototype.execute = function(a) {};
+
+function mxMedianHybridCrossingReduction(a) {
+  this.layout = a
+}
+mxMedianHybridCrossingReduction.prototype = new mxHierarchicalLayoutStage;
+mxMedianHybridCrossingReduction.prototype.constructor = mxMedianHybridCrossingReduction;
+mxMedianHybridCrossingReduction.prototype.layout = null;
+mxMedianHybridCrossingReduction.prototype.maxIterations = 24;
+mxMedianHybridCrossingReduction.prototype.nestedBestRanks = null;
+mxMedianHybridCrossingReduction.prototype.currentBestCrossings = 0;
+mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement = 0;
+mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations = 2;
+mxMedianHybridCrossingReduction.prototype.execute = function(a) {
+  a = this.layout.getModel();
+  this.nestedBestRanks = [];
+  for (var b = 0; b < a.ranks.length; b++) this.nestedBestRanks[b] = a.ranks[b].slice();
+  for (var c = 0, d = this.calculateCrossings(a), b = 0; b < this.maxIterations && c < this.maxNoImprovementIterations; b++) {
+    this.weightedMedian(b, a);
+    this.transpose(b, a);
+    var e = this.calculateCrossings(a);
+    if (e < d) {
+      d = e;
+      for (e = c = 0; e < this.nestedBestRanks.length; e++)
+        for (var f = a.ranks[e], g = 0; g < f.length; g++) {
+          var h = f[g];
+          this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)] =
+            h
+        }
+    } else {
+      c++;
+      for (e = 0; e < this.nestedBestRanks.length; e++) {
+        f = a.ranks[e];
+        for (g = 0; g < f.length; g++) h = f[g], h.setGeneralPurposeVariable(e, g)
+      }
+    }
+    if (0 == d) break
+  }
+  c = [];
+  d = [];
+  for (b = 0; b < a.maxRank + 1; b++) d[b] = [], c[b] = d[b];
+  for (b = 0; b < this.nestedBestRanks.length; b++)
+    for (e = 0; e < this.nestedBestRanks[b].length; e++) d[b].push(this.nestedBestRanks[b][e]);
+  a.ranks = c
+};
+mxMedianHybridCrossingReduction.prototype.calculateCrossings = function(a) {
+  for (var b = a.ranks.length, c = 0, d = 1; d < b; d++) c += this.calculateRankCrossing(d, a);
+  return c
+};
+mxMedianHybridCrossingReduction.prototype.calculateRankCrossing = function(a, b) {
+  for (var c = 0, d = b.ranks[a], e = d.length, f = b.ranks[a - 1].length, g = [], h = 0; h < e; h++) g[h] = [];
+  for (h = 0; h < d.length; h++)
+    for (var k = d[h], l = k.getGeneralPurposeVariable(a), m = k.getPreviousLayerConnectedCells(a), k = 0; k < m.length; k++) {
+      var n = m[k].getGeneralPurposeVariable(a - 1);
+      g[l][n] = 201207
+    }
+  for (h = 0; h < e; h++)
+    for (k = 0; k < f; k++)
+      if (201207 == g[h][k]) {
+        for (d = h + 1; d < e; d++)
+          for (l = 0; l < k; l++) 201207 == g[d][l] && c++;
+        for (d = 0; d < h; d++)
+          for (l = k + 1; l < f; l++) 201207 == g[d][l] &&
+            c++
+      }
+  return c / 2
+};
+mxMedianHybridCrossingReduction.prototype.transpose = function(a, b) {
+  for (var c = !0, d = 0; c && 10 > d++;)
+    for (var e = 1 == a % 2 && 1 == d % 2, c = !1, f = 0; f < b.ranks.length; f++) {
+      for (var g = b.ranks[f], h = [], k = 0; k < g.length; k++) {
+        var l = g[k],
+          m = l.getGeneralPurposeVariable(f);
+        0 > m && (m = k);
+        h[m] = l
+      }
+      for (var n = m = l = null, p = null, q = null, s = null, r = null, t = null, v = null, w = null, k = 0; k < g.length - 1; k++) {
+        if (0 == k) {
+          for (var v = h[k], l = v.getNextLayerConnectedCells(f), m = v.getPreviousLayerConnectedCells(f), q = [], s = [], u = 0; u < l.length; u++) q[u] = l[u].getGeneralPurposeVariable(f + 1);
+          for (u = 0; u < m.length; u++) s[u] = m[u].getGeneralPurposeVariable(f - 1)
+        } else l = n, m = p, q = r, s = t, v = w;
+        w = h[k + 1];
+        n = w.getNextLayerConnectedCells(f);
+        p = w.getPreviousLayerConnectedCells(f);
+        r = [];
+        t = [];
+        for (u = 0; u < n.length; u++) r[u] = n[u].getGeneralPurposeVariable(f + 1);
+        for (u = 0; u < p.length; u++) t[u] = p[u].getGeneralPurposeVariable(f - 1);
+        for (var y = 0, z = 0, u = 0; u < q.length; u++)
+          for (var x = 0; x < r.length; x++) q[u] > r[x] && y++, q[u] < r[x] && z++;
+        for (u = 0; u < s.length; u++)
+          for (x = 0; x < t.length; x++) s[u] > t[x] && y++, s[u] < t[x] && z++;
+        if (z < y || z == y && e) n = v.getGeneralPurposeVariable(f),
+          v.setGeneralPurposeVariable(f, w.getGeneralPurposeVariable(f)), w.setGeneralPurposeVariable(f, n), n = l, p = m, r = q, t = s, w = v, e || (c = !0)
+      }
+    }
+};
+mxMedianHybridCrossingReduction.prototype.weightedMedian = function(a, b) {
+  var c = 0 == a % 2;
+  if (c)
+    for (var d = b.maxRank - 1; 0 <= d; d--) this.medianRank(d, c);
+  else
+    for (d = 1; d < b.maxRank; d++) this.medianRank(d, c)
+};
+mxMedianHybridCrossingReduction.prototype.medianRank = function(a, b) {
+  for (var c = this.nestedBestRanks[a].length, d = [], e = [], f = 0; f < c; f++) {
+    var g = this.nestedBestRanks[a][f],
+      h = new MedianCellSorter;
+    h.cell = g;
+    var k;
+    k = b ? g.getNextLayerConnectedCells(a) : g.getPreviousLayerConnectedCells(a);
+    var l;
+    l = b ? a + 1 : a - 1;
+    null != k && 0 != k.length ? (h.medianValue = this.medianValue(k, l), d.push(h)) : e[g.getGeneralPurposeVariable(a)] = !0
+  }
+  d.sort(MedianCellSorter.prototype.compare);
+  for (f = 0; f < c; f++) null == e[f] && (g = d.shift().cell, g.setGeneralPurposeVariable(a,
+    f))
+};
+mxMedianHybridCrossingReduction.prototype.medianValue = function(a, b) {
+  for (var c = [], d = 0, e = 0; e < a.length; e++) {
+    var f = a[e];
+    c[d++] = f.getGeneralPurposeVariable(b)
+  }
+  c.sort(function(a, b) {
+    return a - b
+  });
+  if (1 == d % 2) return c[Math.floor(d / 2)];
+  if (2 == d) return (c[0] + c[1]) / 2;
+  e = d / 2;
+  f = c[e - 1] - c[0];
+  d = c[d - 1] - c[e];
+  return (c[e - 1] * d + c[e] * f) / (f + d)
+};
+
+function MedianCellSorter() {}
+MedianCellSorter.prototype.medianValue = 0;
+MedianCellSorter.prototype.cell = !1;
+MedianCellSorter.prototype.compare = function(a, b) {
+  return null != a && null != b ? b.medianValue > a.medianValue ? -1 : b.medianValue < a.medianValue ? 1 : 0 : 0
+};
+
+function mxMinimumCycleRemover(a) {
+  this.layout = a
+}
+mxMinimumCycleRemover.prototype = new mxHierarchicalLayoutStage;
+mxMinimumCycleRemover.prototype.constructor = mxMinimumCycleRemover;
+mxMinimumCycleRemover.prototype.layout = null;
+mxMinimumCycleRemover.prototype.execute = function(a) {
+  var b = this.layout.getModel(),
+    c = {},
+    d = mxUtils.clone(b.vertexMapper, null, !0),
+    e = null;
+  if (null != b.roots) {
+    var f = b.roots,
+      e = [];
+    for (a = 0; a < f.length; a++) {
+      var g = mxCellPath.create(f[a]);
+      e[a] = b.vertexMapper[g]
+    }
+  }
+  b.visit(function(a, b, e, f, g) {
+    b.isAncestor(a) && (e.invert(), mxUtils.remove(e, a.connectsAsSource), a.connectsAsTarget.push(e), mxUtils.remove(e, b.connectsAsTarget), b.connectsAsSource.push(e));
+    a = mxCellPath.create(b.cell);
+    c[a] = b;
+    delete d[a]
+  }, e, !0, null);
+  e = null;
+  0 <
+    d.lenth && (e = mxUtils.clone(d, null, !0));
+  a = mxUtils.clone(c, null, !0);
+  b.visit(function(a, b, e, f, g) {
+    b.isAncestor(a) && (e.invert(), mxUtils.remove(e, a.connectsAsSource), b.connectsAsSource.push(e), a.connectsAsTarget.push(e), mxUtils.remove(e, b.connectsAsTarget));
+    a = mxCellPath.create(b.cell);
+    c[a] = b;
+    delete d[a]
+  }, d, !0, a);
+  f = this.layout.getGraph();
+  if (null != e && 0 < e.length) {
+    b = b.roots;
+    for (a = 0; a < e.length; a++) g = e[a].cell, 0 == f.getIncomingEdges(g).length && b.push(g)
+  }
+};
+
+function mxCoordinateAssignment(a, b, c, d, e, f) {
+  this.layout = a;
+  this.intraCellSpacing = b;
+  this.interRankCellSpacing = c;
+  this.orientation = d;
+  this.initialX = e;
+  this.parallelEdgeSpacing = f
+}
+var mxHierarchicalEdgeStyle = {
+  ORTHOGONAL: 1,
+  POLYLINE: 2,
+  STRAIGHT: 3,
+  CURVE: 4
+};
+mxCoordinateAssignment.prototype = new mxHierarchicalLayoutStage;
+mxCoordinateAssignment.prototype.constructor = mxCoordinateAssignment;
+mxCoordinateAssignment.prototype.layout = null;
+mxCoordinateAssignment.prototype.intraCellSpacing = 30;
+mxCoordinateAssignment.prototype.interRankCellSpacing = 100;
+mxCoordinateAssignment.prototype.parallelEdgeSpacing = 10;
+mxCoordinateAssignment.prototype.maxIterations = 8;
+mxCoordinateAssignment.prototype.prefHozEdgeSep = 5;
+mxCoordinateAssignment.prototype.prefVertEdgeOff = 2;
+mxCoordinateAssignment.prototype.minEdgeJetty = 12;
+mxCoordinateAssignment.prototype.channelBuffer = 4;
+mxCoordinateAssignment.prototype.jettyPositions = null;
+mxCoordinateAssignment.prototype.orientation = mxConstants.DIRECTION_NORTH;
+mxCoordinateAssignment.prototype.initialX = null;
+mxCoordinateAssignment.prototype.limitX = null;
+mxCoordinateAssignment.prototype.currentXDelta = null;
+mxCoordinateAssignment.prototype.widestRank = null;
+mxCoordinateAssignment.prototype.rankTopY = null;
+mxCoordinateAssignment.prototype.rankBottomY = null;
+mxCoordinateAssignment.prototype.widestRankValue = null;
+mxCoordinateAssignment.prototype.rankWidths = null;
+mxCoordinateAssignment.prototype.rankY = null;
+mxCoordinateAssignment.prototype.fineTuning = !0;
+mxCoordinateAssignment.prototype.edgeStyle = mxHierarchicalEdgeStyle.POLYLINE;
+mxCoordinateAssignment.prototype.nextLayerConnectedCache = null;
+mxCoordinateAssignment.prototype.previousLayerConnectedCache = null;
+mxCoordinateAssignment.prototype.groupPadding = 10;
+mxCoordinateAssignment.prototype.printStatus = function() {
+  var a = this.layout.getModel();
+  mxLog.show();
+  mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3dCoord assignment debug\x3d\x3d\x3d\x3d\x3d\x3d\x3d");
+  for (var b = 0; b < a.ranks.length; b++) {
+    mxLog.write("Rank ", b, " : ");
+    for (var c = a.ranks[b], d = 0; d < c.length; d++) mxLog.write(c[d].getGeneralPurposeVariable(b), "  ");
+    mxLog.writeln()
+  }
+  mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d")
+};
+mxCoordinateAssignment.prototype.execute = function(a) {
+  this.jettyPositions = [];
+  a = this.layout.getModel();
+  this.currentXDelta = 0;
+  this.initialCoords(this.layout.getGraph(), a);
+  this.fineTuning && this.minNode(a);
+  var b = 1E8;
+  if (this.fineTuning)
+    for (var c = 0; c < this.maxIterations; c++) {
+      0 != c && (this.medianPos(c, a), this.minNode(a));
+      if (this.currentXDelta < b) {
+        for (var d = 0; d < a.ranks.length; d++)
+          for (var e = a.ranks[d], f = 0; f < e.length; f++) {
+            var g = e[f];
+            g.setX(d, g.getGeneralPurposeVariable(d))
+          }
+        b = this.currentXDelta
+      } else
+        for (d = 0; d < a.ranks.length; d++) {
+          e =
+            a.ranks[d];
+          for (f = 0; f < e.length; f++) g = e[f], g.setGeneralPurposeVariable(d, g.getX(d))
+        }
+      this.minPath(this.layout.getGraph(), a);
+      this.currentXDelta = 0
+    }
+  this.setCellLocations(this.layout.getGraph(), a)
+};
+mxCoordinateAssignment.prototype.minNode = function(a) {
+  for (var b = [], c = [], d = [], e = 0; e <= a.maxRank; e++) {
+    d[e] = a.ranks[e];
+    for (var f = 0; f < d[e].length; f++) {
+      var g = d[e][f],
+        h = new WeightedCellSorter(g, e);
+      h.rankIndex = f;
+      h.visited = !0;
+      b.push(h);
+      g = mxCellPath.create(g.getCoreCell());
+      c[g] = h
+    }
+  }
+  a = 10 * b.length;
+  for (f = 0; 0 < b.length && f <= a;) {
+    var h = b.shift(),
+      e = h.cell,
+      k = h.weightedValue,
+      l = parseInt(h.rankIndex),
+      g = e.getNextLayerConnectedCells(k),
+      m = e.getPreviousLayerConnectedCells(k),
+      n = g.length,
+      p = m.length,
+      q = this.medianXValue(g, k + 1),
+      s =
+      this.medianXValue(m, k - 1),
+      r = n + p,
+      t = e.getGeneralPurposeVariable(k),
+      v = t;
+    0 < r && (v = (q * n + s * p) / r);
+    n = !1;
+    v < t - 1 ? 0 == l ? (e.setGeneralPurposeVariable(k, v), n = !0) : (l = d[k][l - 1], t = l.getGeneralPurposeVariable(k), t = t + l.width / 2 + this.intraCellSpacing + e.width / 2, t < v ? (e.setGeneralPurposeVariable(
+      k, v), n = !0) : t < e.getGeneralPurposeVariable(k) - 1 && (e.setGeneralPurposeVariable(k, t), n = !0)) : v > t + 1 && (l == d[k].length - 1 ? (e.setGeneralPurposeVariable(k, v), n = !0) :
+      (l = d[k][l + 1], t = l.getGeneralPurposeVariable(k), t = t - l.width / 2 - this.intraCellSpacing -
+        e.width / 2, t > v ? (e.setGeneralPurposeVariable(k, v), n = !0) : t > e.getGeneralPurposeVariable(k) + 1 && (e.setGeneralPurposeVariable(k, t), n = !0)));
+    if (n) {
+      for (e = 0; e < g.length; e++) k = g[e], k = mxCellPath.create(k.getCoreCell()), k = c[k], null != k && !1 == k.visited && (k.visited = !0, b.push(k));
+      for (e = 0; e < m.length; e++) k = m[e], k = mxCellPath.create(k.getCoreCell()), k = c[k], null != k && !1 == k.visited && (k.visited = !0, b.push(k))
+    }
+    h.visited = !1;
+    f++
+  }
+};
+mxCoordinateAssignment.prototype.medianPos = function(a, b) {
+  if (0 == a % 2)
+    for (var c = b.maxRank; 0 < c; c--) this.rankMedianPosition(c - 1, b, c);
+  else
+    for (c = 0; c < b.maxRank - 1; c++) this.rankMedianPosition(c + 1, b, c)
+};
+mxCoordinateAssignment.prototype.rankMedianPosition = function(a, b, c) {
+  b = b.ranks[a];
+  for (var d = [], e = [], f = 0; f < b.length; f++) {
+    var g = b[f];
+    d[f] = new WeightedCellSorter;
+    d[f].cell = g;
+    d[f].rankIndex = f;
+    var h = mxCellPath.create(g.getCoreCell());
+    e[h] = d[f];
+    var k = null,
+      k = c < a ? g.getPreviousLayerConnectedCells(a) : g.getNextLayerConnectedCells(a);
+    d[f].weightedValue = this.calculatedWeightedValue(g, k)
+  }
+  d.sort(WeightedCellSorter.prototype.compare);
+  for (f = 0; f < d.length; f++) {
+    h = 0;
+    g = d[f].cell;
+    h = 0;
+    k = c < a ? g.getPreviousLayerConnectedCells(a).slice() :
+      g.getNextLayerConnectedCells(a).slice();
+    null != k && (h = k.length, h = 0 < h ? this.medianXValue(k, c) : g.getGeneralPurposeVariable(a));
+    for (var l = 0, k = -1E8, m = d[f].rankIndex - 1; 0 <= m;) {
+      var n = mxCellPath.create(b[m].getCoreCell()),
+        n = e[n];
+      if (null != n) {
+        var p = n.cell;
+        n.visited ? (k = p.getGeneralPurposeVariable(a) + p.width / 2 + this.intraCellSpacing + l + g.width / 2, m = -1) : (l += p.width + this.intraCellSpacing, m--)
+      }
+    }
+    l = 0;
+    p = 1E8;
+    for (m = d[f].rankIndex + 1; m < d.length;)
+      if (n = mxCellPath.create(b[m].getCoreCell()), n = e[n], null != n) {
+        var q = n.cell;
+        n.visited ?
+          (p = q.getGeneralPurposeVariable(a) - q.width / 2 - this.intraCellSpacing - l - g.width / 2, m = d.length) : (l += q.width + this.intraCellSpacing, m++)
+      }
+    h >= k && h <= p ? g.setGeneralPurposeVariable(a, h) : h < k ? (g.setGeneralPurposeVariable(a, k), this.currentXDelta += k - h) : h > p && (g.setGeneralPurposeVariable(a, p), this.currentXDelta +=
+      h - p);
+    d[f].visited = !0
+  }
+};
+mxCoordinateAssignment.prototype.calculatedWeightedValue = function(a, b) {
+  for (var c = 0, d = 0; d < b.length; d++) {
+    var e = b[d];
+    a.isVertex() && e.isVertex() ? c++ : c = a.isEdge() && e.isEdge() ? c + 8 : c + 2
+  }
+  return c
+};
+mxCoordinateAssignment.prototype.medianXValue = function(a, b) {
+  if (0 == a.length) return 0;
+  for (var c = [], d = 0; d < a.length; d++) c[d] = a[d].getGeneralPurposeVariable(b);
+  c.sort(function(a, b) {
+    return a - b
+  });
+  if (1 == a.length % 2) return c[Math.floor(a.length / 2)];
+  d = a.length / 2;
+  return (c[d - 1] + c[d]) / 2
+};
+mxCoordinateAssignment.prototype.initialCoords = function(a, b) {
+  this.calculateWidestRank(a, b);
+  for (var c = this.widestRank; 0 <= c; c--) c < b.maxRank && this.rankCoordinates(c, a, b);
+  for (c = this.widestRank + 1; c <= b.maxRank; c++) 0 < c && this.rankCoordinates(c, a, b)
+};
+mxCoordinateAssignment.prototype.rankCoordinates = function(a, b, c) {
+  b = c.ranks[a];
+  c = 0;
+  for (var d = this.initialX + (this.widestRankValue - this.rankWidths[a]) / 2, e = !1, f = 0; f < b.length; f++) {
+    var g = b[f];
+    if (g.isVertex()) {
+      var h = this.layout.getVertexBounds(g.cell);
+      null != h ? this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (g.width = h.width, g.height = h.height) : (g.width = h.height, g.height = h.width) :
+        e = !0;
+      c = Math.max(c, g.height)
+    } else g.isEdge() && (h = 1, null != g.edges ? h = g.edges.length : mxLog.warn("edge.edges is null"),
+      g.width = (h - 1) * this.parallelEdgeSpacing);
+    d += g.width / 2;
+    g.setX(a, d);
+    g.setGeneralPurposeVariable(a, d);
+    d += g.width / 2;
+    d += this.intraCellSpacing
+  }!0 == e && mxLog.warn("At least one cell has no bounds")
+};
+mxCoordinateAssignment.prototype.calculateWidestRank = function(a, b) {
+  var c = -this.interRankCellSpacing,
+    d = 0;
+  this.rankWidths = [];
+  this.rankY = [];
+  for (var e = b.maxRank; 0 <= e; e--) {
+    for (var f = 0, g = b.ranks[e], h = this.initialX, k = !1, l = 0; l < g.length; l++) {
+      var m = g[l];
+      if (m.isVertex()) {
+        var n = this.layout.getVertexBounds(m.cell);
+        null != n ? this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (m.width = n.width, m.height = n.height) : (m.width = n.height, m.height = n
+          .width) : k = !0;
+        f = Math.max(f, m.height)
+      } else m.isEdge() &&
+        (n = 1, null != m.edges ? n = m.edges.length : mxLog.warn("edge.edges is null"), m.width = (n - 1) * this.parallelEdgeSpacing);
+      h += m.width / 2;
+      m.setX(e, h);
+      m.setGeneralPurposeVariable(e, h);
+      h += m.width / 2;
+      h += this.intraCellSpacing;
+      h > this.widestRankValue && (this.widestRankValue = h, this.widestRank = e);
+      this.rankWidths[e] = h
+    }!0 == k && mxLog.warn("At least one cell has no bounds");
+    this.rankY[e] = c;
+    h = f / 2 + d / 2 + this.interRankCellSpacing;
+    d = f;
+    c = this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_WEST ? c + h : c -
+      h;
+    for (l = 0; l < g.length; l++) g[l].setY(e, c)
+  }
+};
+mxCoordinateAssignment.prototype.minPath = function(a, b) {
+  var c = b.edgeMapper,
+    d;
+  for (d in c) {
+    var e = c[d];
+    if (!(1 > e.maxRank - e.minRank - 1)) {
+      for (var f = e.getGeneralPurposeVariable(e.minRank + 1), g = !0, h = 0, k = e.minRank + 2; k < e.maxRank; k++) {
+        var l = e.getGeneralPurposeVariable(k);
+        f != l ? (g = !1, f = l) : h++
+      }
+      if (!g) {
+        for (var g = f = 0, l = [], m = [], n = e.getGeneralPurposeVariable(e.minRank + 1), k = e.minRank + 1; k < e.maxRank - 1; k++) {
+          var p = e.getX(k + 1);
+          n == p ? (l[k - e.minRank - 1] = n, f++) : this.repositionValid(b, e, k + 1, n) ? (l[k - e.minRank - 1] = n, f++) : n = l[k - e.minRank -
+            1] = p
+        }
+        n = e.getX(k);
+        for (k = e.maxRank - 1; k > e.minRank + 1; k--) p = e.getX(k - 1), n == p ? (m[k - e.minRank - 2] = n, g++) : this.repositionValid(b, e, k - 1, n) ? (m[k - e.minRank - 2] = n, g++) : (m[k -
+          e.minRank - 2] = e.getX(k - 1), n = p);
+        if (g > h || f > h)
+          if (g >= f)
+            for (k = e.maxRank - 2; k > e.minRank; k--) e.setX(k, m[k - e.minRank - 1]);
+          else if (f > g)
+          for (k = e.minRank + 2; k < e.maxRank; k++) e.setX(k, l[k - e.minRank - 2])
+      }
+    }
+  }
+};
+mxCoordinateAssignment.prototype.repositionValid = function(a, b, c, d) {
+  a = a.ranks[c];
+  for (var e = -1, f = 0; f < a.length; f++)
+    if (b == a[f]) {
+      e = f;
+      break
+    }
+  if (0 > e) return !1;
+  f = b.getGeneralPurposeVariable(c);
+  if (d < f) {
+    if (0 == e) return !0;
+    a = a[e - 1];
+    c = a.getGeneralPurposeVariable(c);
+    c = c + a.width / 2 + this.intraCellSpacing + b.width / 2;
+    if (!(c <= d)) return !1
+  } else if (d > f) {
+    if (e == a.length - 1) return !0;
+    a = a[e + 1];
+    c = a.getGeneralPurposeVariable(c);
+    c = c - a.width / 2 - this.intraCellSpacing - b.width / 2;
+    if (!(c >= d)) return !1
+  }
+  return !0
+};
+mxCoordinateAssignment.prototype.setCellLocations = function(a, b) {
+  this.rankTopY = [];
+  this.rankBottomY = [];
+  for (var c = 0; c < b.ranks.length; c++) this.rankTopY[c] = Number.MAX_VALUE, this.rankBottomY[c] = 0;
+  c = null;
+  this.layout.resizeParent && (c = {});
+  var d = b.edgeMapper,
+    e = b.vertexMapper,
+    f;
+  for (f in e) {
+    var g = e[f];
+    this.setVertexLocation(g);
+    if (this.layout.resizeParent) {
+      var g = a.model.getParent(g.cell),
+        h = mxCellPath.create(g);
+      null == c[h] && (c[h] = g)
+    }
+  }
+  this.layout.resizeParent && null != c && this.adjustParents(c);
+  (this.edgeStyle == mxHierarchicalEdgeStyle.ORTHOGONAL ||
+    this.edgeStyle == mxHierarchicalEdgeStyle.POLYLINE || this.edgeStyle == mxHierarchicalEdgeStyle.CURVE) && this.localEdgeProcessing(b);
+  for (f in d) this.setEdgePosition(d[f])
+};
+mxCoordinateAssignment.prototype.adjustParents = function(a) {
+  var b = [],
+    c;
+  for (c in a) b.push(a[c]);
+  this.layout.arrangeGroups(mxUtils.sortCells(b, !0), this.groupPadding)
+};
+mxCoordinateAssignment.prototype.localEdgeProcessing = function(a) {
+  for (var b = 0; b < a.ranks.length; b++)
+    for (var c = a.ranks[b], d = 0; d < c.length; d++) {
+      var e = c[d];
+      if (e.isVertex())
+        for (var f = e.getPreviousLayerConnectedCells(b), g = b - 1, h = 0; 2 > h; h++) {
+          if (-1 < g && g < a.ranks.length && null != f && 0 < f.length) {
+            for (var k = [], l = 0; l < f.length; l++) {
+              var m = new WeightedCellSorter(f[l], f[l].getX(g));
+              k.push(m)
+            }
+            k.sort(WeightedCellSorter.prototype.compare);
+            for (var m = e.x[0] - e.width / 2, n = m + e.width, p = f = 0, g = [], l = 0; l < k.length; l++) {
+              var q = k[l].cell,
+                s;
+              if (q.isVertex()) {
+                s = 0 == h ? e.connectsAsSource : e.connectsAsTarget;
+                for (var r = 0; r < s.length; r++)
+                  if (s[r].source == q || s[r].target == q) f += s[r].edges.length, p++, g.push(s[r])
+              } else f += q.edges.length, p++, g.push(q)
+            }
+            e.width > (f + 1) * this.prefHozEdgeSep + 2 * this.prefHozEdgeSep && (m += this.prefHozEdgeSep, n -= this.prefHozEdgeSep);
+            k = (n - m) / f;
+            m += k / 2;
+            n = this.minEdgeJetty - this.prefVertEdgeOff;
+            for (l = p = 0; l < g.length; l++) {
+              q = g[l].edges.length;
+              r = mxCellPath.create(g[l].edges[0]);
+              s = this.jettyPositions[r];
+              null == s && (s = [], this.jettyPositions[r] =
+                s);
+              l < f / 2 ? n += this.prefVertEdgeOff : l > f / 2 && (n -= this.prefVertEdgeOff);
+              for (r = 0; r < q; r++) s[4 * r + 2 * h] = m, m += k, s[4 * r + 2 * h + 1] = n;
+              p = Math.max(p, n)
+            }
+          }
+          f = e.getNextLayerConnectedCells(b);
+          g = b + 1
+        }
+    }
+};
+mxCoordinateAssignment.prototype.setEdgePosition = function(a) {
+  var b = 0;
+  if (101207 != a.temp[0]) {
+    var c = a.maxRank,
+      d = a.minRank;
+    c == d && (c = a.source.maxRank, d = a.target.minRank);
+    for (var e = 0, f = mxCellPath.create(a.edges[0]), f = this.jettyPositions[f], g = a.isReversed ? a.target.cell : a.source.cell, h = this.layout.graph, k = 0; k < a.edges.length; k++) {
+      var l = a.edges[k],
+        m = this.layout.getVisibleTerminal(l, !0),
+        n = h.model.getTerminal(l, !0),
+        p = [],
+        q = a.isReversed;
+      m != g && (q = !q);
+      if (null != f) {
+        var s = q ? 2 : 0,
+          r = q ? this.rankTopY[d] : this.rankBottomY[c],
+          t = f[4 * e + 1 + s];
+        q && (t = -t);
+        r += t;
+        s = f[4 * e + s];
+        n = h.model.getTerminal(l, !0);
+        this.layout.isPort(n) && h.model.getParent(n) == m && (s = h.view.getState(n), s = null != s ? s.x : m.geometry.x + a.source.width * n.geometry.x);
+        this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (p.push(new mxPoint(s, r)), this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(
+          new mxPoint(s, r + t))) : (p.push(new mxPoint(r, s)), this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(new mxPoint(r + t, s)))
+      }
+      s = a.x.length -
+        1;
+      r = t = -1;
+      m = a.maxRank - 1;
+      q && (s = 0, t = a.x.length, r = 1, m = a.minRank + 1);
+      for (; a.maxRank != a.minRank && s != t; s += r) {
+        var n = a.x[s] + b,
+          v = (this.rankTopY[m] + this.rankBottomY[m + 1]) / 2,
+          w = (this.rankTopY[m - 1] + this.rankBottomY[m]) / 2;
+        if (q) var u = v,
+          v = w,
+          w = u;
+        this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (p.push(new mxPoint(n, v)), p.push(new mxPoint(n, w))) : (p.push(new mxPoint(v, n)), p.push(
+          new mxPoint(w, n)));
+        this.limitX = Math.max(this.limitX, n);
+        m += r
+      }
+      null != f && (s = q ? 2 : 0, r = q ? this.rankBottomY[c] :
+        this.rankTopY[d], t = f[4 * e + 3 - s], q && (t = -t), r -= t, s = f[4 * e + 2 - s], q = h.model.getTerminal(l, !1), m = this.layout.getVisibleTerminal(l, !1), this.layout.isPort(q) && h.model
+        .getParent(q) == m && (s = h.view.getState(q), s = null != s ? s.x : m.geometry.x + a.target.width * q.geometry.x), this.orientation == mxConstants.DIRECTION_NORTH || this.orientation ==
+        mxConstants.DIRECTION_SOUTH ? (this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(new mxPoint(s, r - t)), p.push(new mxPoint(s, r))) : (this.edgeStyle == mxHierarchicalEdgeStyle.CURVE &&
+          p.push(new mxPoint(r -
+            t, s)), p.push(new mxPoint(r, s))));
+      a.isReversed && this.processReversedEdge(a, l);
+      this.layout.setEdgePoints(l, p);
+      b = 0 == b ? this.parallelEdgeSpacing : 0 < b ? -b : -b + this.parallelEdgeSpacing;
+      e++
+    }
+    a.temp[0] = 101207
+  }
+};
+mxCoordinateAssignment.prototype.setVertexLocation = function(a) {
+  var b = a.cell,
+    c = a.x[0] - a.width / 2,
+    d = a.y[0] - a.height / 2;
+  this.rankTopY[a.minRank] = Math.min(this.rankTopY[a.minRank], d);
+  this.rankBottomY[a.minRank] = Math.max(this.rankBottomY[a.minRank], d + a.height);
+  this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? this.layout.setVertexLocation(b, c, d) : this.layout.setVertexLocation(b, d, c);
+  this.limitX = Math.max(this.limitX, c + a.width)
+};
+mxCoordinateAssignment.prototype.processReversedEdge = function(a, b) {};
+
+function WeightedCellSorter(a, b) {
+  this.cell = a;
+  this.weightedValue = b
+}
+WeightedCellSorter.prototype.weightedValue = 0;
+WeightedCellSorter.prototype.nudge = !1;
+WeightedCellSorter.prototype.visited = !1;
+WeightedCellSorter.prototype.rankIndex = null;
+WeightedCellSorter.prototype.cell = null;
+WeightedCellSorter.prototype.compare = function(a, b) {
+  return null != a && null != b ? b.weightedValue > a.weightedValue ? -1 : b.weightedValue < a.weightedValue ? 1 : b.nudge ? -1 : 1 : 0
+};
+
+function mxHierarchicalLayout(a, b, c) {
+  mxGraphLayout.call(this, a);
+  this.orientation = null != b ? b : mxConstants.DIRECTION_NORTH;
+  this.deterministic = null != c ? c : !0
+}
+mxHierarchicalLayout.prototype = new mxGraphLayout;
+mxHierarchicalLayout.prototype.constructor = mxHierarchicalLayout;
+mxHierarchicalLayout.prototype.roots = null;
+mxHierarchicalLayout.prototype.resizeParent = !1;
+mxHierarchicalLayout.prototype.moveParent = !1;
+mxHierarchicalLayout.prototype.parentBorder = 0;
+mxHierarchicalLayout.prototype.intraCellSpacing = 30;
+mxHierarchicalLayout.prototype.interRankCellSpacing = 100;
+mxHierarchicalLayout.prototype.interHierarchySpacing = 60;
+mxHierarchicalLayout.prototype.parallelEdgeSpacing = 10;
+mxHierarchicalLayout.prototype.orientation = mxConstants.DIRECTION_NORTH;
+mxHierarchicalLayout.prototype.fineTuning = !0;
+mxHierarchicalLayout.prototype.tightenToSource = !0;
+mxHierarchicalLayout.prototype.disableEdgeStyle = !0;
+mxHierarchicalLayout.prototype.traverseAncestors = !0;
+mxHierarchicalLayout.prototype.model = null;
+mxHierarchicalLayout.prototype.edgesCache = null;
+mxHierarchicalLayout.prototype.getModel = function() {
+  return this.model
+};
+mxHierarchicalLayout.prototype.execute = function(a, b) {
+  this.parent = a;
+  var c = this.graph.model;
+  this.edgesCache = {};
+  if (!(null == b && null == a)) {
+    if (null != b && null != a) {
+      for (var d = [], e = 0; e < b.length; e++) c.isAncestor(a, b[e]) && d.push(b[e]);
+      this.roots = d
+    } else this.roots = b;
+    c.beginUpdate();
+    try {
+      this.run(a), this.resizeParent && !this.graph.isCellCollapsed(a) && this.graph.updateGroupBounds([a], this.parentBorder, this.moveParent)
+    } finally {
+      c.endUpdate()
+    }
+  }
+};
+mxHierarchicalLayout.prototype.findRoots = function(a, b) {
+  var c = [];
+  if (null != a && null != b) {
+    var d = this.graph.model,
+      e = null,
+      f = -1E5,
+      g;
+    for (g in b) {
+      var h = b[g];
+      if (d.isVertex(h) && this.graph.isCellVisible(h)) {
+        for (var k = this.getEdges(h), l = 0, m = 0, n = 0; n < k.length; n++) this.getVisibleTerminal(k[n], !0) == h ? l++ : m++;
+        0 == m && 0 < l && c.push(h);
+        k = l - m;
+        k > f && (f = k, e = h)
+      }
+    }
+    0 == c.length && null != e && c.push(e)
+  }
+  return c
+};
+mxHierarchicalLayout.prototype.getEdges = function(a) {
+  var b = mxCellPath.create(a);
+  if (null != this.edgesCache[b]) return this.edgesCache[b];
+  for (var c = this.graph.model, d = [], e = this.graph.isCellCollapsed(a), f = c.getChildCount(a), g = 0; g < f; g++) {
+    var h = c.getChildAt(a, g);
+    if (this.isPort(h)) d = d.concat(c.getEdges(h, !0, !0));
+    else if (e || !this.graph.isCellVisible(h)) d = d.concat(c.getEdges(h, !0, !0))
+  }
+  d = d.concat(c.getEdges(a, !0, !0));
+  c = [];
+  for (g = 0; g < d.length; g++) e = this.getVisibleTerminal(d[g], !0), f = this.getVisibleTerminal(d[g], !1), (e == f || e != f && (f == a && (null == this.parent || this.graph.isValidAncestor(e,
+    this.parent, this.traverseAncestors)) || e == a && (null == this.parent || this.graph.isValidAncestor(f, this.parent, this.traverseAncestors)))) && c.push(d[g]);
+  return this.edgesCache[b] = c
+};
+mxHierarchicalLayout.prototype.getVisibleTerminal = function(a, b) {
+  var c = this.graph.view.getState(a),
+    c = null != c ? c.getVisibleTerminal(b) : this.graph.view.getVisibleTerminal(a, b);
+  this.isPort(c) && (c = this.graph.model.getParent(c));
+  return c
+};
+mxHierarchicalLayout.prototype.run = function(a) {
+  var b = [],
+    c = [];
+  if (null == this.roots && null != a) {
+    var d = {};
+    this.filterDescendants(a, d);
+    this.roots = [];
+    var e = !0,
+      f;
+    for (f in d)
+      if (null != d[f]) {
+        e = !1;
+        break
+      }
+    for (; !e;) {
+      for (var g = this.findRoots(a, d), e = 0; e < g.length; e++) {
+        var h = [];
+        b.push(h);
+        this.traverse(g[e], !0, null, c, h, b, d)
+      }
+      for (e = 0; e < g.length; e++) this.roots.push(g[e]);
+      e = !0;
+      for (f in d)
+        if (null != d[f]) {
+          e = !1;
+          break
+        }
+    }
+  } else
+    for (e = 0; e < roots.length; e++) h = [], b.push(h), traverse(roots.get(e), !0, null, c, h, b, null);
+  for (e = c = 0; e < b.length; e++) {
+    h =
+      b[e];
+    d = [];
+    for (f in h) d.push(h[f]);
+    this.model = new mxGraphHierarchyModel(this, d, this.roots, a, this.tightenToSource);
+    this.cycleStage(a);
+    this.layeringStage();
+    this.crossingStage(a);
+    c = this.placementStage(c, a)
+  }
+};
+mxHierarchicalLayout.prototype.filterDescendants = function(a, b) {
+  var c = this.graph.model;
+  c.isVertex(a) && (a != this.parent && this.graph.isCellVisible(a)) && (b[mxCellPath.create(a)] = a);
+  if (this.traverseAncestors || a == this.parent && this.graph.isCellVisible(a))
+    for (var d = c.getChildCount(a), e = 0; e < d; e++) {
+      var f = c.getChildAt(a, e);
+      this.isPort(f) || this.filterDescendants(f, b)
+    }
+};
+mxHierarchicalLayout.prototype.isPort = function(a) {
+  return a.geometry.relative ? !0 : !1
+};
+mxHierarchicalLayout.prototype.getEdgesBetween = function(a, b, c) {
+  c = null != c ? c : !1;
+  for (var d = this.getEdges(a), e = [], f = 0; f < d.length; f++) {
+    var g = this.getVisibleTerminal(d[f], !0),
+      h = this.getVisibleTerminal(d[f], !1);
+    (g == a && h == b || !c && g == b && h == a) && e.push(d[f])
+  }
+  return e
+};
+mxHierarchicalLayout.prototype.traverse = function(a, b, c, d, e, f, g) {
+  if (null != a && null != d) {
+    var h = mxCellPath.create(a);
+    if (null == d[h] && (null == g || null != g[h])) {
+      null == e[h] && (e[h] = a);
+      null == d[h] && (d[h] = a);
+      delete g[h];
+      var k = this.getEdges(a);
+      for (c = 0; c < k.length; c++)
+        if (h = this.getVisibleTerminal(k[c], !0) == a, !b || h) h = this.getVisibleTerminal(k[c], !h), e = this.traverse(h, b, k[c], d, e, f, g)
+    } else if (null == e[h])
+      for (c = 0; c < f.length; c++)
+        if (a = f[c], null != a[h]) {
+          for (k in e) a[k] = e[k];
+          f.pop();
+          return a
+        }
+  }
+  return e
+};
+mxHierarchicalLayout.prototype.cycleStage = function(a) {
+  (new mxMinimumCycleRemover(this)).execute(a)
+};
+mxHierarchicalLayout.prototype.layeringStage = function() {
+  this.model.initialRank();
+  this.model.fixRanks()
+};
+mxHierarchicalLayout.prototype.crossingStage = function(a) {
+  (new mxMedianHybridCrossingReduction(this)).execute(a)
+};
+mxHierarchicalLayout.prototype.placementStage = function(a, b) {
+  var c = new mxCoordinateAssignment(this, this.intraCellSpacing, this.interRankCellSpacing, this.orientation, a, this.parallelEdgeSpacing);
+  c.fineTuning = this.fineTuning;
+  c.execute(b);
+  return c.limitX + this.interHierarchySpacing
+};
+
+function mxGraphModel(a) {
+  this.currentEdit = this.createUndoableEdit();
+  null != a ? this.setRoot(a) : this.clear()
+}
+mxGraphModel.prototype = new mxEventSource;
+mxGraphModel.prototype.constructor = mxGraphModel;
+mxGraphModel.prototype.root = null;
+mxGraphModel.prototype.cells = null;
+mxGraphModel.prototype.maintainEdgeParent = !0;
+mxGraphModel.prototype.createIds = !0;
+mxGraphModel.prototype.prefix = "";
+mxGraphModel.prototype.postfix = "";
+mxGraphModel.prototype.nextId = 0;
+mxGraphModel.prototype.currentEdit = null;
+mxGraphModel.prototype.updateLevel = 0;
+mxGraphModel.prototype.endingUpdate = !1;
+mxGraphModel.prototype.clear = function() {
+  this.setRoot(this.createRoot())
+};
+mxGraphModel.prototype.isCreateIds = function() {
+  return this.createIds
+};
+mxGraphModel.prototype.setCreateIds = function(a) {
+  this.createIds = a
+};
+mxGraphModel.prototype.createRoot = function() {
+  var a = new mxCell;
+  a.insert(new mxCell);
+  return a
+};
+mxGraphModel.prototype.getCell = function(a) {
+  return null != this.cells ? this.cells[a] : null
+};
+mxGraphModel.prototype.filterCells = function(a, b) {
+  var c = null;
+  if (null != a)
+    for (var c = [], d = 0; d < a.length; d++) b(a[d]) && c.push(a[d]);
+  return c
+};
+mxGraphModel.prototype.getDescendants = function(a) {
+  return this.filterDescendants(null, a)
+};
+mxGraphModel.prototype.filterDescendants = function(a, b) {
+  var c = [];
+  b = b || this.getRoot();
+  (null == a || a(b)) && c.push(b);
+  for (var d = this.getChildCount(b), e = 0; e < d; e++) var f = this.getChildAt(b, e),
+    c = c.concat(this.filterDescendants(a, f));
+  return c
+};
+mxGraphModel.prototype.getRoot = function(a) {
+  var b = a || this.root;
+  if (null != a)
+    for (; null != a;) b = a, a = this.getParent(a);
+  return b
+};
+mxGraphModel.prototype.setRoot = function(a) {
+  this.execute(new mxRootChange(this, a));
+  return a
+};
+mxGraphModel.prototype.rootChanged = function(a) {
+  var b = this.root;
+  this.root = a;
+  this.nextId = 0;
+  this.cells = null;
+  this.cellAdded(a);
+  return b
+};
+mxGraphModel.prototype.isRoot = function(a) {
+  return null != a && this.root == a
+};
+mxGraphModel.prototype.isLayer = function(a) {
+  return this.isRoot(this.getParent(a))
+};
+mxGraphModel.prototype.isAncestor = function(a, b) {
+  for (; null != b && b != a;) b = this.getParent(b);
+  return b == a
+};
+mxGraphModel.prototype.contains = function(a) {
+  return this.isAncestor(this.root, a)
+};
+mxGraphModel.prototype.getParent = function(a) {
+  return null != a ? a.getParent() : null
+};
+mxGraphModel.prototype.add = function(a, b, c) {
+  if (b != a && null != a && null != b) {
+    null == c && (c = this.getChildCount(a));
+    var d = a != this.getParent(b);
+    this.execute(new mxChildChange(this, a, b, c));
+    this.maintainEdgeParent && d && this.updateEdgeParents(b)
+  }
+  return b
+};
+mxGraphModel.prototype.cellAdded = function(a) {
+  if (null != a) {
+    null == a.getId() && this.createIds && a.setId(this.createId(a));
+    if (null != a.getId()) {
+      var b = this.getCell(a.getId());
+      if (b != a) {
+        for (; null != b;) a.setId(this.createId(a)), b = this.getCell(a.getId());
+        null == this.cells && (this.cells = {});
+        this.cells[a.getId()] = a
+      }
+    }
+    mxUtils.isNumeric(a.getId()) && (this.nextId = Math.max(this.nextId, a.getId()));
+    for (var b = this.getChildCount(a), c = 0; c < b; c++) this.cellAdded(this.getChildAt(a, c))
+  }
+};
+mxGraphModel.prototype.createId = function(a) {
+  a = this.nextId;
+  this.nextId++;
+  return this.prefix + a + this.postfix
+};
+mxGraphModel.prototype.updateEdgeParents = function(a, b) {
+  b = b || this.getRoot(a);
+  for (var c = this.getChildCount(a), d = 0; d < c; d++) {
+    var e = this.getChildAt(a, d);
+    this.updateEdgeParents(e, b)
+  }
+  e = this.getEdgeCount(a);
+  c = [];
+  for (d = 0; d < e; d++) c.push(this.getEdgeAt(a, d));
+  for (d = 0; d < c.length; d++) e = c[d], this.isAncestor(b, e) && this.updateEdgeParent(e, b)
+};
+mxGraphModel.prototype.updateEdgeParent = function(a, b) {
+  for (var c = this.getTerminal(a, !0), d = this.getTerminal(a, !1), e = null; null != c && !this.isEdge(c) && null != c.geometry && c.geometry.relative;) c = this.getParent(c);
+  for (; null != d && !this.isEdge(d) && null != d.geometry && d.geometry.relative;) d = this.getParent(d);
+  if (this.isAncestor(b, c) && this.isAncestor(b, d) && (e = c == d ? this.getParent(c) : this.getNearestCommonAncestor(c, d), null != e && (this.getParent(e) != this.root || this.isAncestor(e, a)) &&
+      this.getParent(a) != e)) {
+    c = this.getGeometry(a);
+    if (null != c) {
+      var f = this.getOrigin(this.getParent(a)),
+        g = this.getOrigin(e),
+        d = g.x - f.x,
+        f = g.y - f.y,
+        c = c.clone();
+      c.translate(-d, -f);
+      this.setGeometry(a, c)
+    }
+    this.add(e, a, this.getChildCount(e))
+  }
+};
+mxGraphModel.prototype.getOrigin = function(a) {
+  var b = null;
+  null != a ? (b = this.getOrigin(this.getParent(a)), this.isEdge(a) || (a = this.getGeometry(a), null != a && (b.x += a.x, b.y += a.y))) : b = new mxPoint;
+  return b
+};
+mxGraphModel.prototype.getNearestCommonAncestor = function(a, b) {
+  if (null != a && null != b) {
+    var c = mxCellPath.create(b);
+    if (null != c && 0 < c.length) {
+      var d = a,
+        e = mxCellPath.create(d);
+      if (c.length < e.length) var d = b,
+        f = e,
+        e = c,
+        c = f;
+      for (; null != d;) {
+        f = this.getParent(d);
+        if (0 == c.indexOf(e + mxCellPath.PATH_SEPARATOR) && null != f) return d;
+        e = mxCellPath.getParentPath(e);
+        d = f
+      }
+    }
+  }
+  return null
+};
+mxGraphModel.prototype.remove = function(a) {
+  a == this.root ? this.setRoot(null) : null != this.getParent(a) && this.execute(new mxChildChange(this, null, a));
+  return a
+};
+mxGraphModel.prototype.cellRemoved = function(a) {
+  if (null != a && null != this.cells) {
+    for (var b = this.getChildCount(a) - 1; 0 <= b; b--) this.cellRemoved(this.getChildAt(a, b));
+    null != this.cells && null != a.getId() && delete this.cells[a.getId()]
+  }
+};
+mxGraphModel.prototype.parentForCellChanged = function(a, b, c) {
+  var d = this.getParent(a);
+  null != b ? (b != d || d.getIndex(a) != c) && b.insert(a, c) : null != d && (c = d.getIndex(a), d.remove(c));
+  !this.contains(d) && null != b ? this.cellAdded(a) : null == b && this.cellRemoved(a);
+  return d
+};
+mxGraphModel.prototype.getChildCount = function(a) {
+  return null != a ? a.getChildCount() : 0
+};
+mxGraphModel.prototype.getChildAt = function(a, b) {
+  return null != a ? a.getChildAt(b) : null
+};
+mxGraphModel.prototype.getChildren = function(a) {
+  return null != a ? a.children : null
+};
+mxGraphModel.prototype.getChildVertices = function(a) {
+  return this.getChildCells(a, !0, !1)
+};
+mxGraphModel.prototype.getChildEdges = function(a) {
+  return this.getChildCells(a, !1, !0)
+};
+mxGraphModel.prototype.getChildCells = function(a, b, c) {
+  b = null != b ? b : !1;
+  c = null != c ? c : !1;
+  for (var d = this.getChildCount(a), e = [], f = 0; f < d; f++) {
+    var g = this.getChildAt(a, f);
+    (!c && !b || c && this.isEdge(g) || b && this.isVertex(g)) && e.push(g)
+  }
+  return e
+};
+mxGraphModel.prototype.getTerminal = function(a, b) {
+  return null != a ? a.getTerminal(b) : null
+};
+mxGraphModel.prototype.setTerminal = function(a, b, c) {
+  var d = b != this.getTerminal(a, c);
+  this.execute(new mxTerminalChange(this, a, b, c));
+  this.maintainEdgeParent && d && this.updateEdgeParent(a, this.getRoot());
+  return b
+};
+mxGraphModel.prototype.setTerminals = function(a, b, c) {
+  this.beginUpdate();
+  try {
+    this.setTerminal(a, b, !0), this.setTerminal(a, c, !1)
+  } finally {
+    this.endUpdate()
+  }
+};
+mxGraphModel.prototype.terminalForCellChanged = function(a, b, c) {
+  var d = this.getTerminal(a, c);
+  null != b ? b.insertEdge(a, c) : null != d && d.removeEdge(a, c);
+  return d
+};
+mxGraphModel.prototype.getEdgeCount = function(a) {
+  return null != a ? a.getEdgeCount() : 0
+};
+mxGraphModel.prototype.getEdgeAt = function(a, b) {
+  return null != a ? a.getEdgeAt(b) : null
+};
+mxGraphModel.prototype.getDirectedEdgeCount = function(a, b, c) {
+  for (var d = 0, e = this.getEdgeCount(a), f = 0; f < e; f++) {
+    var g = this.getEdgeAt(a, f);
+    g != c && this.getTerminal(g, b) == a && d++
+  }
+  return d
+};
+mxGraphModel.prototype.getConnections = function(a) {
+  return this.getEdges(a, !0, !0, !1)
+};
+mxGraphModel.prototype.getIncomingEdges = function(a) {
+  return this.getEdges(a, !0, !1, !1)
+};
+mxGraphModel.prototype.getOutgoingEdges = function(a) {
+  return this.getEdges(a, !1, !0, !1)
+};
+mxGraphModel.prototype.getEdges = function(a, b, c, d) {
+  b = null != b ? b : !0;
+  c = null != c ? c : !0;
+  d = null != d ? d : !0;
+  for (var e = this.getEdgeCount(a), f = [], g = 0; g < e; g++) {
+    var h = this.getEdgeAt(a, g),
+      k = this.getTerminal(h, !0),
+      l = this.getTerminal(h, !1);
+    (d && k == l || k != l && (b && l == a || c && k == a)) && f.push(h)
+  }
+  return f
+};
+mxGraphModel.prototype.getEdgesBetween = function(a, b, c) {
+  c = null != c ? c : !1;
+  var d = this.getEdgeCount(a),
+    e = this.getEdgeCount(b),
+    f = a,
+    g = d;
+  e < d && (g = e, f = b);
+  d = [];
+  for (e = 0; e < g; e++) {
+    var h = this.getEdgeAt(f, e),
+      k = this.getTerminal(h, !0),
+      l = this.getTerminal(h, !1),
+      m = l == a && k == b;
+    (k == a && l == b || !c && m) && d.push(h)
+  }
+  return d
+};
+mxGraphModel.prototype.getOpposites = function(a, b, c, d) {
+  c = null != c ? c : !0;
+  d = null != d ? d : !0;
+  var e = [];
+  if (null != a)
+    for (var f = 0; f < a.length; f++) {
+      var g = this.getTerminal(a[f], !0),
+        h = this.getTerminal(a[f], !1);
+      g == b && null != h && h != b && d ? e.push(h) : h == b && (null != g && g != b && c) && e.push(g)
+    }
+  return e
+};
+mxGraphModel.prototype.getTopmostCells = function(a) {
+  for (var b = [], c = 0; c < a.length; c++) {
+    for (var d = a[c], e = !0, f = this.getParent(d); null != f;) {
+      if (0 <= mxUtils.indexOf(a, f)) {
+        e = !1;
+        break
+      }
+      f = this.getParent(f)
+    }
+    e && b.push(d)
+  }
+  return b
+};
+mxGraphModel.prototype.isVertex = function(a) {
+  return null != a ? a.isVertex() : !1
+};
+mxGraphModel.prototype.isEdge = function(a) {
+  return null != a ? a.isEdge() : !1
+};
+mxGraphModel.prototype.isConnectable = function(a) {
+  return null != a ? a.isConnectable() : !1
+};
+mxGraphModel.prototype.getValue = function(a) {
+  return null != a ? a.getValue() : null
+};
+mxGraphModel.prototype.setValue = function(a, b) {
+  this.execute(new mxValueChange(this, a, b));
+  return b
+};
+mxGraphModel.prototype.valueForCellChanged = function(a, b) {
+  return a.valueChanged(b)
+};
+mxGraphModel.prototype.getGeometry = function(a, b) {
+  return null != a ? a.getGeometry() : null
+};
+mxGraphModel.prototype.setGeometry = function(a, b) {
+  b != this.getGeometry(a) && this.execute(new mxGeometryChange(this, a, b));
+  return b
+};
+mxGraphModel.prototype.geometryForCellChanged = function(a, b) {
+  var c = this.getGeometry(a);
+  a.setGeometry(b);
+  return c
+};
+mxGraphModel.prototype.getStyle = function(a) {
+  return null != a ? a.getStyle() : null
+};
+mxGraphModel.prototype.setStyle = function(a, b) {
+  b != this.getStyle(a) && this.execute(new mxStyleChange(this, a, b));
+  return b
+};
+mxGraphModel.prototype.styleForCellChanged = function(a, b) {
+  var c = this.getStyle(a);
+  a.setStyle(b);
+  return c
+};
+mxGraphModel.prototype.isCollapsed = function(a) {
+  return null != a ? a.isCollapsed() : !1
+};
+mxGraphModel.prototype.setCollapsed = function(a, b) {
+  b != this.isCollapsed(a) && this.execute(new mxCollapseChange(this, a, b));
+  return b
+};
+mxGraphModel.prototype.collapsedStateForCellChanged = function(a, b) {
+  var c = this.isCollapsed(a);
+  a.setCollapsed(b);
+  return c
+};
+mxGraphModel.prototype.isVisible = function(a) {
+  return null != a ? a.isVisible() : !1
+};
+mxGraphModel.prototype.setVisible = function(a, b) {
+  b != this.isVisible(a) && this.execute(new mxVisibleChange(this, a, b));
+  return b
+};
+mxGraphModel.prototype.visibleStateForCellChanged = function(a, b) {
+  var c = this.isVisible(a);
+  a.setVisible(b);
+  return c
+};
+mxGraphModel.prototype.execute = function(a) {
+  a.execute();
+  this.beginUpdate();
+  this.currentEdit.add(a);
+  this.fireEvent(new mxEventObject(mxEvent.EXECUTE, "change", a));
+  this.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", a));
+  this.endUpdate()
+};
+mxGraphModel.prototype.beginUpdate = function() {
+  this.updateLevel++;
+  this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));
+  1 == this.updateLevel && this.fireEvent(new mxEventObject(mxEvent.START_EDIT))
+};
+mxGraphModel.prototype.endUpdate = function() {
+  this.updateLevel--;
+  0 == this.updateLevel && this.fireEvent(new mxEventObject(mxEvent.END_EDIT));
+  if (!this.endingUpdate) {
+    this.endingUpdate = 0 == this.updateLevel;
+    this.fireEvent(new mxEventObject(mxEvent.END_UPDATE, "edit", this.currentEdit));
+    try {
+      if (this.endingUpdate && !this.currentEdit.isEmpty()) {
+        this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO, "edit", this.currentEdit));
+        var a = this.currentEdit;
+        this.currentEdit = this.createUndoableEdit();
+        a.notify();
+        this.fireEvent(new mxEventObject(mxEvent.UNDO,
+          "edit", a))
+      }
+    } finally {
+      this.endingUpdate = !1
+    }
+  }
+};
+mxGraphModel.prototype.createUndoableEdit = function() {
+  var a = new mxUndoableEdit(this, !0);
+  a.notify = function() {
+    a.source.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", a, "changes", a.changes));
+    a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY, "edit", a, "changes", a.changes))
+  };
+  return a
+};
+mxGraphModel.prototype.mergeChildren = function(a, b, c) {
+  c = null != c ? c : !0;
+  this.beginUpdate();
+  try {
+    var d = {};
+    this.mergeChildrenImpl(a, b, c, d);
+    for (var e in d) {
+      var f = d[e],
+        g = this.getTerminal(f, !0);
+      null != g && (g = d[mxCellPath.create(g)], this.setTerminal(f, g, !0));
+      g = this.getTerminal(f, !1);
+      null != g && (g = d[mxCellPath.create(g)], this.setTerminal(f, g, !1))
+    }
+  } finally {
+    this.endUpdate()
+  }
+};
+mxGraphModel.prototype.mergeChildrenImpl = function(a, b, c, d) {
+  this.beginUpdate();
+  try {
+    for (var e = a.getChildCount(), f = 0; f < e; f++) {
+      var g = a.getChildAt(f);
+      if ("function" == typeof g.getId) {
+        var h = g.getId(),
+          k = null != h && (!this.isEdge(g) || !c) ? this.getCell(h) : null;
+        if (null == k) {
+          var l = g.clone();
+          l.setId(h);
+          l.setTerminal(g.getTerminal(!0), !0);
+          l.setTerminal(g.getTerminal(!1), !1);
+          k = b.insert(l);
+          this.cellAdded(k)
+        }
+        d[mxCellPath.create(g)] = k;
+        this.mergeChildrenImpl(g, k, c, d)
+      }
+    }
+  } finally {
+    this.endUpdate()
+  }
+};
+mxGraphModel.prototype.getParents = function(a) {
+  var b = [];
+  if (null != a)
+    for (var c = {}, d = 0; d < a.length; d++) {
+      var e = this.getParent(a[d]);
+      if (null != e) {
+        var f = mxCellPath.create(e);
+        null == c[f] && (c[f] = e, b.push(e))
+      }
+    }
+  return b
+};
+mxGraphModel.prototype.cloneCell = function(a) {
+  return null != a ? this.cloneCells([a], !0)[0] : null
+};
+mxGraphModel.prototype.cloneCells = function(a, b) {
+  for (var c = {}, d = [], e = 0; e < a.length; e++) null != a[e] ? d.push(this.cloneCellImpl(a[e], c, b)) : d.push(null);
+  for (e = 0; e < d.length; e++) null != d[e] && this.restoreClone(d[e], a[e], c);
+  return d
+};
+mxGraphModel.prototype.cloneCellImpl = function(a, b, c) {
+  var d = this.cellCloned(a);
+  b[mxObjectIdentity.get(a)] = d;
+  if (c) {
+    c = this.getChildCount(a);
+    for (var e = 0; e < c; e++) {
+      var f = this.cloneCellImpl(this.getChildAt(a, e), b, !0);
+      d.insert(f)
+    }
+  }
+  return d
+};
+mxGraphModel.prototype.cellCloned = function(a) {
+  return a.clone()
+};
+mxGraphModel.prototype.restoreClone = function(a, b, c) {
+  var d = this.getTerminal(b, !0);
+  null != d && (d = c[mxObjectIdentity.get(d)], null != d && d.insertEdge(a, !0));
+  d = this.getTerminal(b, !1);
+  null != d && (d = c[mxObjectIdentity.get(d)], null != d && d.insertEdge(a, !1));
+  for (var d = this.getChildCount(a), e = 0; e < d; e++) this.restoreClone(this.getChildAt(a, e), this.getChildAt(b, e), c)
+};
+
+function mxRootChange(a, b) {
+  this.model = a;
+  this.previous = this.root = b
+}
+mxRootChange.prototype.execute = function() {
+  this.root = this.previous;
+  this.previous = this.model.rootChanged(this.previous)
+};
+
+function mxChildChange(a, b, c, d) {
+  this.model = a;
+  this.previous = this.parent = b;
+  this.child = c;
+  this.previousIndex = this.index = d
+}
+mxChildChange.prototype.execute = function() {
+  var a = this.model.getParent(this.child),
+    b = null != a ? a.getIndex(this.child) : 0;
+  null == this.previous && this.connect(this.child, !1);
+  a = this.model.parentForCellChanged(this.child, this.previous, this.previousIndex);
+  null != this.previous && this.connect(this.child, !0);
+  this.parent = this.previous;
+  this.previous = a;
+  this.index = this.previousIndex;
+  this.previousIndex = b
+};
+mxChildChange.prototype.connect = function(a, b) {
+  b = null != b ? b : !0;
+  var c = a.getTerminal(!0),
+    d = a.getTerminal(!1);
+  null != c && (b ? this.model.terminalForCellChanged(a, c, !0) : this.model.terminalForCellChanged(a, null, !0));
+  null != d && (b ? this.model.terminalForCellChanged(a, d, !1) : this.model.terminalForCellChanged(a, null, !1));
+  a.setTerminal(c, !0);
+  a.setTerminal(d, !1);
+  c = this.model.getChildCount(a);
+  for (d = 0; d < c; d++) this.connect(this.model.getChildAt(a, d), b)
+};
+
+function mxTerminalChange(a, b, c, d) {
+  this.model = a;
+  this.cell = b;
+  this.previous = this.terminal = c;
+  this.source = d
+}
+mxTerminalChange.prototype.execute = function() {
+  this.terminal = this.previous;
+  this.previous = this.model.terminalForCellChanged(this.cell, this.previous, this.source)
+};
+
+function mxValueChange(a, b, c) {
+  this.model = a;
+  this.cell = b;
+  this.previous = this.value = c
+}
+mxValueChange.prototype.execute = function() {
+  this.value = this.previous;
+  this.previous = this.model.valueForCellChanged(this.cell, this.previous)
+};
+
+function mxStyleChange(a, b, c) {
+  this.model = a;
+  this.cell = b;
+  this.previous = this.style = c
+}
+mxStyleChange.prototype.execute = function() {
+  this.style = this.previous;
+  this.previous = this.model.styleForCellChanged(this.cell, this.previous)
+};
+
+function mxGeometryChange(a, b, c) {
+  this.model = a;
+  this.cell = b;
+  this.previous = this.geometry = c
+}
+mxGeometryChange.prototype.execute = function() {
+  this.geometry = this.previous;
+  this.previous = this.model.geometryForCellChanged(this.cell, this.previous)
+};
+
+function mxCollapseChange(a, b, c) {
+  this.model = a;
+  this.cell = b;
+  this.previous = this.collapsed = c
+}
+mxCollapseChange.prototype.execute = function() {
+  this.collapsed = this.previous;
+  this.previous = this.model.collapsedStateForCellChanged(this.cell, this.previous)
+};
+
+function mxVisibleChange(a, b, c) {
+  this.model = a;
+  this.cell = b;
+  this.previous = this.visible = c
+}
+mxVisibleChange.prototype.execute = function() {
+  this.visible = this.previous;
+  this.previous = this.model.visibleStateForCellChanged(this.cell, this.previous)
+};
+
+function mxCellAttributeChange(a, b, c) {
+  this.cell = a;
+  this.attribute = b;
+  this.previous = this.value = c
+}
+mxCellAttributeChange.prototype.execute = function() {
+  var a = this.cell.getAttribute(this.attribute);
+  null == this.previous ? this.cell.value.removeAttribute(this.attribute) : this.cell.setAttribute(this.attribute, this.previous);
+  this.previous = a
+};
+
+function mxCell(a, b, c) {
+  this.value = a;
+  this.setGeometry(b);
+  this.setStyle(c);
+  if (null != this.onInit) this.onInit()
+}
+mxCell.prototype.id = null;
+mxCell.prototype.value = null;
+mxCell.prototype.geometry = null;
+mxCell.prototype.style = null;
+mxCell.prototype.vertex = !1;
+mxCell.prototype.edge = !1;
+mxCell.prototype.connectable = !0;
+mxCell.prototype.visible = !0;
+mxCell.prototype.collapsed = !1;
+mxCell.prototype.parent = null;
+mxCell.prototype.source = null;
+mxCell.prototype.target = null;
+mxCell.prototype.children = null;
+mxCell.prototype.edges = null;
+mxCell.prototype.mxTransient = "id value parent source target children edges".split(" ");
+mxCell.prototype.getId = function() {
+  return this.id
+};
+mxCell.prototype.setId = function(a) {
+  this.id = a
+};
+mxCell.prototype.getValue = function() {
+  return this.value
+};
+mxCell.prototype.setValue = function(a) {
+  this.value = a
+};
+mxCell.prototype.valueChanged = function(a) {
+  var b = this.getValue();
+  this.setValue(a);
+  return b
+};
+mxCell.prototype.getGeometry = function() {
+  return this.geometry
+};
+mxCell.prototype.setGeometry = function(a) {
+  this.geometry = a
+};
+mxCell.prototype.getStyle = function() {
+  return this.style
+};
+mxCell.prototype.setStyle = function(a) {
+  this.style = a
+};
+mxCell.prototype.isVertex = function() {
+  return this.vertex
+};
+mxCell.prototype.setVertex = function(a) {
+  this.vertex = a
+};
+mxCell.prototype.isEdge = function() {
+  return this.edge
+};
+mxCell.prototype.setEdge = function(a) {
+  this.edge = a
+};
+mxCell.prototype.isConnectable = function() {
+  return this.connectable
+};
+mxCell.prototype.setConnectable = function(a) {
+  this.connectable = a
+};
+mxCell.prototype.isVisible = function() {
+  return this.visible
+};
+mxCell.prototype.setVisible = function(a) {
+  this.visible = a
+};
+mxCell.prototype.isCollapsed = function() {
+  return this.collapsed
+};
+mxCell.prototype.setCollapsed = function(a) {
+  this.collapsed = a
+};
+mxCell.prototype.getParent = function() {
+  return this.parent
+};
+mxCell.prototype.setParent = function(a) {
+  this.parent = a
+};
+mxCell.prototype.getTerminal = function(a) {
+  return a ? this.source : this.target
+};
+mxCell.prototype.setTerminal = function(a, b) {
+  b ? this.source = a : this.target = a;
+  return a
+};
+mxCell.prototype.getChildCount = function() {
+  return null == this.children ? 0 : this.children.length
+};
+mxCell.prototype.getIndex = function(a) {
+  return mxUtils.indexOf(this.children, a)
+};
+mxCell.prototype.getChildAt = function(a) {
+  return null == this.children ? null : this.children[a]
+};
+mxCell.prototype.insert = function(a, b) {
+  null != a && (null == b && (b = this.getChildCount(), a.getParent() == this && b--), a.removeFromParent(), a.setParent(this), null == this.children ? (this.children = [], this.children.push(a)) :
+    this.children.splice(b, 0, a));
+  return a
+};
+mxCell.prototype.remove = function(a) {
+  var b = null;
+  null != this.children && 0 <= a && (b = this.getChildAt(a), null != b && (this.children.splice(a, 1), b.setParent(null)));
+  return b
+};
+mxCell.prototype.removeFromParent = function() {
+  if (null != this.parent) {
+    var a = this.parent.getIndex(this);
+    this.parent.remove(a)
+  }
+};
+mxCell.prototype.getEdgeCount = function() {
+  return null == this.edges ? 0 : this.edges.length
+};
+mxCell.prototype.getEdgeIndex = function(a) {
+  return mxUtils.indexOf(this.edges, a)
+};
+mxCell.prototype.getEdgeAt = function(a) {
+  return null == this.edges ? null : this.edges[a]
+};
+mxCell.prototype.insertEdge = function(a, b) {
+  if (null != a && (a.removeFromTerminal(b), a.setTerminal(this, b), null == this.edges || a.getTerminal(!b) != this || 0 > mxUtils.indexOf(this.edges, a))) null == this.edges && (this.edges = []),
+    this.edges.push(a);
+  return a
+};
+mxCell.prototype.removeEdge = function(a, b) {
+  if (null != a) {
+    if (a.getTerminal(!b) != this && null != this.edges) {
+      var c = this.getEdgeIndex(a);
+      0 <= c && this.edges.splice(c, 1)
+    }
+    a.setTerminal(null, b)
+  }
+  return a
+};
+mxCell.prototype.removeFromTerminal = function(a) {
+  var b = this.getTerminal(a);
+  null != b && b.removeEdge(this, a)
+};
+mxCell.prototype.getAttribute = function(a, b) {
+  var c = this.getValue();
+  return (null != c && c.nodeType == mxConstants.NODETYPE_ELEMENT ? c.getAttribute(a) : null) || b
+};
+mxCell.prototype.setAttribute = function(a, b) {
+  var c = this.getValue();
+  null != c && c.nodeType == mxConstants.NODETYPE_ELEMENT && c.setAttribute(a, b)
+};
+mxCell.prototype.clone = function() {
+  var a = mxUtils.clone(this, this.mxTransient);
+  a.setValue(this.cloneValue());
+  return a
+};
+mxCell.prototype.cloneValue = function() {
+  var a = this.getValue();
+  null != a && ("function" == typeof a.clone ? a = a.clone() : isNaN(a.nodeType) || (a = a.cloneNode(!0)));
+  return a
+};
+
+function mxGeometry(a, b, c, d) {
+  mxRectangle.call(this, a, b, c, d)
+}
+mxGeometry.prototype = new mxRectangle;
+mxGeometry.prototype.constructor = mxGeometry;
+mxGeometry.prototype.TRANSLATE_CONTROL_POINTS = !0;
+mxGeometry.prototype.alternateBounds = null;
+mxGeometry.prototype.sourcePoint = null;
+mxGeometry.prototype.targetPoint = null;
+mxGeometry.prototype.points = null;
+mxGeometry.prototype.offset = null;
+mxGeometry.prototype.relative = !1;
+mxGeometry.prototype.swap = function() {
+  if (null != this.alternateBounds) {
+    var a = new mxRectangle(this.x, this.y, this.width, this.height);
+    this.x = this.alternateBounds.x;
+    this.y = this.alternateBounds.y;
+    this.width = this.alternateBounds.width;
+    this.height = this.alternateBounds.height;
+    this.alternateBounds = a
+  }
+};
+mxGeometry.prototype.getTerminalPoint = function(a) {
+  return a ? this.sourcePoint : this.targetPoint
+};
+mxGeometry.prototype.setTerminalPoint = function(a, b) {
+  b ? this.sourcePoint = a : this.targetPoint = a;
+  return a
+};
+mxGeometry.prototype.translate = function(a, b) {
+  this.clone();
+  this.relative || (this.x += a, this.y += b);
+  null != this.sourcePoint && (this.sourcePoint.x += a, this.sourcePoint.y += b);
+  null != this.targetPoint && (this.targetPoint.x += a, this.targetPoint.y += b);
+  if (this.TRANSLATE_CONTROL_POINTS && null != this.points)
+    for (var c = this.points.length, d = 0; d < c; d++) {
+      var e = this.points[d];
+      null != e && (e.x += a, e.y += b)
+    }
+};
+var mxCellPath = {
+    PATH_SEPARATOR: ".",
+    create: function(a) {
+      var b = "";
+      if (null != a)
+        for (var c = a.getParent(); null != c;) b = c.getIndex(a) + mxCellPath.PATH_SEPARATOR + b, a = c, c = a.getParent();
+      a = b.length;
+      1 < a && (b = b.substring(0, a - 1));
+      return b
+    },
+    getParentPath: function(a) {
+      if (null != a) {
+        var b = a.lastIndexOf(mxCellPath.PATH_SEPARATOR);
+        if (0 <= b) return a.substring(0, b);
+        if (0 < a.length) return ""
+      }
+      return null
+    },
+    resolve: function(a, b) {
+      var c = a;
+      if (null != b)
+        for (var d = b.split(mxCellPath.PATH_SEPARATOR), e = 0; e < d.length; e++) c = c.getChildAt(parseInt(d[e]));
+      return c
+    },
+    compare: function(a, b) {
+      for (var c = Math.min(a.length, b.length), d = 0, e = 0; e < c; e++)
+        if (a[e] != b[e]) {
+          0 == a[e].length || 0 == b[e].length ? d = a[e] == b[e] ? 0 : a[e] > b[e] ? 1 : -1 : (c = parseInt(a[e]), e = parseInt(b[e]), d = c == e ? 0 : c > e ? 1 : -1);
+          break
+        }
+      0 == d && (c = a.length, e = b.length, c != e && (d = c > e ? 1 : -1));
+      return d
+    }
+  },
+  mxPerimeter = {
+    RectanglePerimeter: function(a, b, c, d) {
+      b = a.getCenterX();
+      var e = a.getCenterY(),
+        f = Math.atan2(c.y - e, c.x - b),
+        g = new mxPoint(0, 0),
+        h = Math.PI,
+        k = Math.PI / 2 - f,
+        l = Math.atan2(a.height, a.width);
+      f < -h + l || f > h - l ? (g.x = a.x, g.y = e - a.width *
+        Math.tan(f) / 2) : f < -l ? (g.y = a.y, g.x = b - a.height * Math.tan(k) / 2) : f < l ? (g.x = a.x + a.width, g.y = e + a.width * Math.tan(f) / 2) : (g.y = a.y + a.height, g.x = b + a.height *
+        Math.tan(k) / 2);
+      d && (c.x >= a.x && c.x <= a.x + a.width ? g.x = c.x : c.y >= a.y && c.y <= a.y + a.height && (g.y = c.y), c.x < a.x ? g.x = a.x : c.x > a.x + a.width && (g.x = a.x + a.width), c.y < a.y ? g.y =
+        a.y : c.y > a.y + a.height && (g.y = a.y + a.height));
+      return g
+    },
+    EllipsePerimeter: function(a, b, c, d) {
+      var e = a.x,
+        f = a.y,
+        g = a.width / 2,
+        h = a.height / 2,
+        k = e + g,
+        l = f + h;
+      b = c.x;
+      c = c.y;
+      var m = parseInt(b - k),
+        n = parseInt(c - l);
+      if (0 == m && 0 != n) return new mxPoint(k,
+        l + h * n / Math.abs(n));
+      if (0 == m && 0 == n) return new mxPoint(b, c);
+      if (d) {
+        if (c >= f && c <= f + a.height) return a = c - l, a = Math.sqrt(g * g * (1 - a * a / (h * h))) || 0, b <= e && (a = -a), new mxPoint(k + a, c);
+        if (b >= e && b <= e + a.width) return a = b - k, a = Math.sqrt(h * h * (1 - a * a / (g * g))) || 0, c <= f && (a = -a), new mxPoint(b, l + a)
+      }
+      e = n / m;
+      l -= e * k;
+      f = g * g * e * e + h * h;
+      a = -2 * k * f;
+      h = Math.sqrt(a * a - 4 * f * (g * g * e * e * k * k + h * h * k * k - g * g * h * h));
+      g = (-a + h) / (2 * f);
+      h = (-a - h) / (2 * f);
+      k = e * g + l;
+      l = e * h + l;
+      e = Math.sqrt(Math.pow(g - b, 2) + Math.pow(k - c, 2));
+      b = Math.sqrt(Math.pow(h - b, 2) + Math.pow(l - c, 2));
+      f = c = 0;
+      e < b ? (c =
+        g, f = k) : (c = h, f = l);
+      return new mxPoint(c, f)
+    },
+    RhombusPerimeter: function(a, b, c, d) {
+      b = a.x;
+      var e = a.y,
+        f = a.width;
+      a = a.height;
+      var g = b + f / 2,
+        h = e + a / 2,
+        k = c.x;
+      c = c.y;
+      if (g == k) return h > c ? new mxPoint(g, e) : new mxPoint(g, e + a);
+      if (h == c) return g > k ? new mxPoint(b, h) : new mxPoint(b + f, h);
+      var l = g,
+        m = h;
+      d && (k >= b && k <= b + f ? l = k : c >= e && c <= e + a && (m = c));
+      return k < g ? c < h ? mxUtils.intersection(k, c, l, m, g, e, b, h) : mxUtils.intersection(k, c, l, m, g, e + a, b, h) : c < h ? mxUtils.intersection(k, c, l, m, g, e, b + f, h) : mxUtils.intersection(
+        k, c, l, m, g, e + a, b + f, h)
+    },
+    TrianglePerimeter: function(a,
+      b, c, d) {
+      b = null != b ? b.style[mxConstants.STYLE_DIRECTION] : null;
+      var e = b == mxConstants.DIRECTION_NORTH || b == mxConstants.DIRECTION_SOUTH,
+        f = a.x,
+        g = a.y,
+        h = a.width;
+      a = a.height;
+      var k = f + h / 2,
+        l = g + a / 2,
+        m = new mxPoint(f, g),
+        n = new mxPoint(f + h, l),
+        p = new mxPoint(f, g + a);
+      b == mxConstants.DIRECTION_NORTH ? (m = p, n = new mxPoint(k, g), p = new mxPoint(f + h, g + a)) : b == mxConstants.DIRECTION_SOUTH ? (n = new mxPoint(k, g + a), p = new mxPoint(f + h, g)) :
+        b == mxConstants.DIRECTION_WEST && (m = new mxPoint(f + h, g), n = new mxPoint(f, l), p = new mxPoint(f + h, g + a));
+      var q = c.x -
+        k,
+        s = c.y - l,
+        q = e ? Math.atan2(q, s) : Math.atan2(s, q),
+        r = e ? Math.atan2(h, a) : Math.atan2(a, h),
+        s = !1,
+        s = b == mxConstants.DIRECTION_NORTH || b == mxConstants.DIRECTION_WEST ? q > -r && q < r : q < -Math.PI + r || q > Math.PI - r,
+        r = null;
+      s ? r = d && (e && c.x >= m.x && c.x <= p.x || !e && c.y >= m.y && c.y <= p.y) ? e ? new mxPoint(c.x, m.y) : new mxPoint(m.x, c.y) : b == mxConstants.DIRECTION_NORTH ? new mxPoint(f + h / 2 +
+        a * Math.tan(q) / 2, g + a) : b == mxConstants.DIRECTION_SOUTH ? new mxPoint(f + h / 2 - a * Math.tan(q) / 2, g) : b == mxConstants.DIRECTION_WEST ? new mxPoint(f + h, g + a / 2 + h *
+        Math.tan(q) / 2) : new mxPoint(f,
+        g + a / 2 - h * Math.tan(q) / 2) : (d && (d = new mxPoint(k, l), c.y >= g && c.y <= g + a ? (d.x = e ? k : b == mxConstants.DIRECTION_WEST ? f + h : f, d.y = c.y) : c.x >= f && c.x <= f +
+        h && (d.x = c.x, d.y = !e ? l : b == mxConstants.DIRECTION_NORTH ? g + a : g), k = d.x, l = d.y), r = e && c.x <= f + h / 2 || !e && c.y <= g + a / 2 ? mxUtils.intersection(c.x, c.y, k,
+        l, m.x, m.y, n.x, n.y) : mxUtils.intersection(c.x, c.y, k, l, n.x, n.y, p.x, p.y));
+      null == r && (r = new mxPoint(k, l));
+      return r
+    }
+  };
+
+function mxPrintPreview(a, b, c, d, e, f, g, h, k) {
+  this.graph = a;
+  this.scale = null != b ? b : 1 / a.pageScale;
+  this.border = null != d ? d : 0;
+  this.pageFormat = null != c ? c : a.pageFormat;
+  this.title = null != h ? h : "Printer-friendly version";
+  this.x0 = null != e ? e : 0;
+  this.y0 = null != f ? f : 0;
+  this.borderColor = g;
+  this.pageSelector = null != k ? k : !0
+}
+mxPrintPreview.prototype.graph = null;
+mxPrintPreview.prototype.pageFormat = null;
+mxPrintPreview.prototype.scale = null;
+mxPrintPreview.prototype.border = 0;
+mxPrintPreview.prototype.x0 = 0;
+mxPrintPreview.prototype.y0 = 0;
+mxPrintPreview.prototype.autoOrigin = !0;
+mxPrintPreview.prototype.printOverlays = !1;
+mxPrintPreview.prototype.borderColor = null;
+mxPrintPreview.prototype.title = null;
+mxPrintPreview.prototype.pageSelector = null;
+mxPrintPreview.prototype.wnd = null;
+mxPrintPreview.prototype.pageCount = 0;
+mxPrintPreview.prototype.getWindow = function() {
+  return this.wnd
+};
+mxPrintPreview.prototype.getDoctype = function() {
+  var a = "";
+  8 == document.documentMode && (a = '\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d8"\x3e');
+  return a
+};
+mxPrintPreview.prototype.open = function(a) {
+  var b = this.graph.cellRenderer.initializeOverlay,
+    c = null;
+  try {
+    this.printOverlays && (this.graph.cellRenderer.initializeOverlay = function(a, b) {
+      b.init(a.view.getDrawPane())
+    });
+    if (null == this.wnd) {
+      this.wnd = window.open();
+      var d = this.wnd.document,
+        e = this.getDoctype();
+      null != e && 0 < e.length && d.writeln(e);
+      d.writeln("\x3chtml\x3e");
+      d.writeln("\x3chead\x3e");
+      this.writeHead(d, a);
+      d.writeln("\x3c/head\x3e");
+      d.writeln('\x3cbody class\x3d"mxPage"\x3e');
+      mxClient.link("stylesheet", mxClient.basePath +
+        "/css/common.css", d);
+      mxClient.IS_VML && (d.namespaces.add("v", "urn:schemas-microsoft-com:vml"), d.namespaces.add("o", "urn:schemas-microsoft-com:office:office"), d.createStyleSheet().cssText =
+        "v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}", mxClient.link("stylesheet", mxClient.basePath + "/css/explorer.css", d));
+      var f = this.graph.getGraphBounds().clone(),
+        g = this.graph.getView().getScale(),
+        h = g / this.scale,
+        k = this.graph.getView().getTranslate();
+      this.autoOrigin || (this.x0 = -k.x * this.scale, this.y0 = -k.y * this.scale, f.width += f.x, f.height += f.y, f.x = 0, this.border = f.y = 0);
+      f.width /= h;
+      f.height /= h;
+      var l = this.pageFormat.width - 2 * this.border,
+        m = this.pageFormat.height - 2 * this.border,
+        n = Math.max(1, Math.ceil((f.width + this.x0) / l)),
+        p = Math.max(1, Math.ceil((f.height + this.y0) / m));
+      this.pageCount = n * p;
+      var q = mxUtils.bind(this, function() {
+        if (this.pageSelector && (1 < p || 1 < n)) {
+          var a = this.createPageSelector(p, n);
+          d.body.appendChild(a);
+          if (mxClient.IS_IE) {
+            a.style.position = "absolute";
+            var b = function() {
+              a.style.top = d.body.scrollTop +
+                10 + "px"
+            };
+            mxEvent.addListener(this.wnd, "scroll", function(a) {
+              b()
+            });
+            mxEvent.addListener(this.wnd, "resize", function(a) {
+              b()
+            })
+          }
+        }
+      });
+      a = function(a, b) {
+        null != this.borderColor && (a.style.borderColor = this.borderColor, a.style.borderStyle = "solid", a.style.borderWidth = "1px");
+        a.style.background = "white";
+        b && (a.style.pageBreakAfter = "always");
+        mxClient.IS_IE ? (d.writeln(a.outerHTML), a.parentNode.removeChild(a)) : (a.parentNode.removeChild(a), d.body.appendChild(a));
+        if (b) {
+          var c = d.createElement("hr");
+          c.className = "mxPageBreak";
+          d.body.appendChild(c)
+        }
+      };
+      var s = this.getCoverPages(this.pageFormat.width, this.pageFormat.height);
+      if (null != s)
+        for (var r = 0; r < s.length; r++) a(s[r], !0);
+      for (var t = this.getAppendices(this.pageFormat.width, this.pageFormat.height), r = 0; r < p; r++)
+        for (var v = r * m / this.scale - this.y0 / this.scale + (f.y - k.y * g) / g, s = 0; s < n; s++) {
+          if (null == this.wnd) return null;
+          var w = s * l / this.scale - this.x0 / this.scale + (f.x - k.x * g) / g,
+            u = r * n + s + 1,
+            c = this.renderPage(this.pageFormat.width, this.pageFormat.height, mxUtils.bind(this, function(a) {
+              this.addGraphFragment(-w, -v, this.scale, u, a)
+            }));
+          c.setAttribute("id", "mxPage-" + u);
+          a(c, null != t || r < p - 1 || s < n - 1)
+        }
+      if (null != t)
+        for (r = 0; r < t.length; r++) a(t[r], r < t.length);
+      d.writeln("\x3c/body\x3e");
+      d.writeln("\x3c/html\x3e");
+      d.close();
+      q();
+      mxEvent.release(d.body)
+    }
+    this.wnd.focus()
+  } catch (y) {
+    null != c && null != c.parentNode && c.parentNode.removeChild(c)
+  } finally {
+    this.graph.cellRenderer.initializeOverlay = b
+  }
+  return this.wnd
+};
+mxPrintPreview.prototype.writeHead = function(a, b) {
+  null != this.title && a.writeln("\x3ctitle\x3e" + this.title + "\x3c/title\x3e");
+  a.writeln('\x3cstyle type\x3d"text/css"\x3e');
+  a.writeln("@media print {");
+  a.writeln("  table.mxPageSelector { display: none; }");
+  a.writeln("  hr.mxPageBreak { display: none; }");
+  a.writeln("}");
+  a.writeln("@media screen {");
+  a.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");
+  a.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }");
+  a.writeln("  body.mxPage { background: gray; }");
+  a.writeln("}");
+  null != b && a.writeln(b);
+  a.writeln("\x3c/style\x3e")
+};
+mxPrintPreview.prototype.createPageSelector = function(a, b) {
+  var c = this.wnd.document,
+    d = c.createElement("table");
+  d.className = "mxPageSelector";
+  d.setAttribute("border", "0");
+  for (var e = c.createElement("tbody"), f = 0; f < a; f++) {
+    for (var g = c.createElement("tr"), h = 0; h < b; h++) {
+      var k = f * b + h + 1,
+        l = c.createElement("td");
+      if (!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC) {
+        var m = c.createElement("a");
+        m.setAttribute("href", "#mxPage-" + k);
+        mxUtils.write(m, k, c);
+        l.appendChild(m)
+      } else mxUtils.write(l, k, c);
+      g.appendChild(l)
+    }
+    e.appendChild(g)
+  }
+  d.appendChild(e);
+  return d
+};
+mxPrintPreview.prototype.renderPage = function(a, b, c) {
+  var d = document.createElement("div");
+  try {
+    d.style.width = a + "px";
+    d.style.height = b + "px";
+    d.style.overflow = "hidden";
+    d.style.pageBreakInside = "avoid";
+    d.style.position = "relative";
+    var e = document.createElement("div");
+    e.style.top = this.border + "px";
+    e.style.left = this.border + "px";
+    e.style.width = a - 2 * this.border + "px";
+    e.style.height = b - 2 * this.border + "px";
+    e.style.overflow = "hidden";
+    this.graph.dialect == mxConstants.DIALECT_VML && (e.style.position = "absolute");
+    d.appendChild(e);
+    document.body.appendChild(d);
+    c(e)
+  } catch (f) {
+    throw d.parentNode.removeChild(d), f;
+  }
+  return d
+};
+mxPrintPreview.prototype.addGraphFragment = function(a, b, c, d, e) {
+  d = this.graph.getView();
+  var f = this.graph.container;
+  this.graph.container = e;
+  var g = d.getCanvas(),
+    h = d.getBackgroundPane(),
+    k = d.getDrawPane(),
+    l = d.getOverlayPane();
+  this.graph.dialect == mxConstants.DIALECT_SVG ? d.createSvg() : this.graph.dialect == mxConstants.DIALECT_VML ? d.createVml() : d.createHtml();
+  var m = d.isEventsEnabled();
+  d.setEventsEnabled(!1);
+  var n = this.graph.isEnabled();
+  this.graph.setEnabled(!1);
+  var p = d.getTranslate();
+  d.translate = new mxPoint(a,
+    b);
+  a = null;
+  try {
+    var q = [this.graph.getModel().getRoot()];
+    a = new mxTemporaryCellStates(d, c, q)
+  } finally {
+    if (mxClient.IS_IE) d.overlayPane.innerHTML = "";
+    else
+      for (c = e.firstChild; null != c;) q = c.nextSibling, b = c.nodeName.toLowerCase(), "svg" == b ? (c.setAttribute("width", parseInt(e.style.width)), c.setAttribute("height", parseInt(e.style.height))) :
+        "default" != c.style.cursor && "table" != b && c.parentNode.removeChild(c), c = q;
+    d.overlayPane.parentNode.removeChild(d.overlayPane);
+    this.graph.setEnabled(n);
+    this.graph.container = f;
+    d.canvas =
+      g;
+    d.backgroundPane = h;
+    d.drawPane = k;
+    d.overlayPane = l;
+    d.translate = p;
+    a.destroy();
+    d.setEventsEnabled(m)
+  }
+};
+mxPrintPreview.prototype.getCoverPages = function() {
+  return null
+};
+mxPrintPreview.prototype.getAppendices = function() {
+  return null
+};
+mxPrintPreview.prototype.print = function() {
+  var a = this.open();
+  null != a && a.print()
+};
+mxPrintPreview.prototype.close = function() {
+  null != this.wnd && (this.wnd.close(), this.wnd = null)
+};
+
+function mxStylesheet() {
+  this.styles = {};
+  this.putDefaultVertexStyle(this.createDefaultVertexStyle());
+  this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())
+}
+mxStylesheet.prototype.createDefaultVertexStyle = function() {
+  var a = {};
+  a[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_RECTANGLE;
+  a[mxConstants.STYLE_PERIMETER] = mxPerimeter.RectanglePerimeter;
+  a[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE;
+  a[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER;
+  a[mxConstants.STYLE_FILLCOLOR] = "#C3D9FF";
+  a[mxConstants.STYLE_STROKECOLOR] = "#6482B9";
+  a[mxConstants.STYLE_FONTCOLOR] = "#774400";
+  return a
+};
+mxStylesheet.prototype.createDefaultEdgeStyle = function() {
+  var a = {};
+  a[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_CONNECTOR;
+  a[mxConstants.STYLE_ENDARROW] = mxConstants.ARROW_CLASSIC;
+  a[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE;
+  a[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER;
+  a[mxConstants.STYLE_STROKECOLOR] = "#6482B9";
+  a[mxConstants.STYLE_FONTCOLOR] = "#446299";
+  return a
+};
+mxStylesheet.prototype.putDefaultVertexStyle = function(a) {
+  this.putCellStyle("defaultVertex", a)
+};
+mxStylesheet.prototype.putDefaultEdgeStyle = function(a) {
+  this.putCellStyle("defaultEdge", a)
+};
+mxStylesheet.prototype.getDefaultVertexStyle = function() {
+  return this.styles.defaultVertex
+};
+mxStylesheet.prototype.getDefaultEdgeStyle = function() {
+  return this.styles.defaultEdge
+};
+mxStylesheet.prototype.putCellStyle = function(a, b) {
+  this.styles[a] = b
+};
+mxStylesheet.prototype.getCellStyle = function(a, b) {
+  var c = b;
+  if (null != a && 0 < a.length)
+    for (var d = a.split(";"), c = null != c && ";" != a.charAt(0) ? mxUtils.clone(c) : {}, e = 0; e < d.length; e++) {
+      var f = d[e],
+        g = f.indexOf("\x3d");
+      if (0 <= g) {
+        var h = f.substring(0, g),
+          f = f.substring(g + 1);
+        f == mxConstants.NONE ? delete c[h] : mxUtils.isNumeric(f) ? c[h] = parseFloat(f) : c[h] = f
+      } else if (f = this.styles[f], null != f)
+        for (h in f) c[h] = f[h]
+    }
+  return c
+};
+
+function mxCellState(a, b, c) {
+  this.view = a;
+  this.cell = b;
+  this.style = c;
+  this.origin = new mxPoint;
+  this.absoluteOffset = new mxPoint
+}
+mxCellState.prototype = new mxRectangle;
+mxCellState.prototype.constructor = mxCellState;
+mxCellState.prototype.view = null;
+mxCellState.prototype.cell = null;
+mxCellState.prototype.style = null;
+mxCellState.prototype.invalid = !0;
+mxCellState.prototype.invalidOrder = !1;
+mxCellState.prototype.orderChanged = !1;
+mxCellState.prototype.origin = null;
+mxCellState.prototype.absolutePoints = null;
+mxCellState.prototype.absoluteOffset = null;
+mxCellState.prototype.visibleSourceState = null;
+mxCellState.prototype.visibleTargetState = null;
+mxCellState.prototype.terminalDistance = 0;
+mxCellState.prototype.length = 0;
+mxCellState.prototype.segments = null;
+mxCellState.prototype.shape = null;
+mxCellState.prototype.text = null;
+mxCellState.prototype.getPerimeterBounds = function(a, b) {
+  a = a || 0;
+  b = null != b ? b : new mxRectangle(this.x, this.y, this.width, this.height);
+  if (null != this.shape && null != this.shape.stencil) {
+    var c = this.shape.stencil.computeAspect(this.style, b.x, b.y, b.width, b.height);
+    b.x = c.x;
+    b.y = c.y;
+    b.width = this.shape.stencil.w0 * c.width;
+    b.height = this.shape.stencil.h0 * c.height
+  }
+  0 != a && b.grow(a);
+  return b
+};
+mxCellState.prototype.setAbsoluteTerminalPoint = function(a, b) {
+  b ? (null == this.absolutePoints && (this.absolutePoints = []), 0 == this.absolutePoints.length ? this.absolutePoints.push(a) : this.absolutePoints[0] = a) : null == this.absolutePoints ? (this.absolutePoints = [],
+    this.absolutePoints.push(null), this.absolutePoints.push(a)) : 1 == this.absolutePoints.length ? this.absolutePoints.push(a) : this.absolutePoints[this.absolutePoints.length - 1] = a
+};
+mxCellState.prototype.setCursor = function(a) {
+  null != this.shape && this.shape.setCursor(a);
+  null != this.text && this.text.setCursor(a)
+};
+mxCellState.prototype.getVisibleTerminal = function(a) {
+  a = this.getVisibleTerminalState(a);
+  return null != a ? a.cell : null
+};
+mxCellState.prototype.getVisibleTerminalState = function(a) {
+  return a ? this.visibleSourceState : this.visibleTargetState
+};
+mxCellState.prototype.setVisibleTerminalState = function(a, b) {
+  b ? this.visibleSourceState = a : this.visibleTargetState = a
+};
+mxCellState.prototype.destroy = function() {
+  this.view.graph.cellRenderer.destroy(this)
+};
+mxCellState.prototype.clone = function() {
+  var a = new mxCellState(this.view, this.cell, this.style);
+  if (null != this.absolutePoints) {
+    a.absolutePoints = [];
+    for (var b = 0; b < this.absolutePoints.length; b++) a.absolutePoints[b] = this.absolutePoints[b].clone()
+  }
+  null != this.origin && (a.origin = this.origin.clone());
+  null != this.absoluteOffset && (a.absoluteOffset = this.absoluteOffset.clone());
+  null != this.boundingBox && (a.boundingBox = this.boundingBox.clone());
+  a.terminalDistance = this.terminalDistance;
+  a.segments = this.segments;
+  a.length =
+    this.length;
+  a.x = this.x;
+  a.y = this.y;
+  a.width = this.width;
+  a.height = this.height;
+  return a
+};
+
+function mxGraphSelectionModel(a) {
+  this.graph = a;
+  this.cells = []
+}
+mxGraphSelectionModel.prototype = new mxEventSource;
+mxGraphSelectionModel.prototype.constructor = mxGraphSelectionModel;
+mxGraphSelectionModel.prototype.doneResource = "none" != mxClient.language ? "done" : "";
+mxGraphSelectionModel.prototype.updatingSelectionResource = "none" != mxClient.language ? "updatingSelection" : "";
+mxGraphSelectionModel.prototype.graph = null;
+mxGraphSelectionModel.prototype.singleSelection = !1;
+mxGraphSelectionModel.prototype.isSingleSelection = function() {
+  return this.singleSelection
+};
+mxGraphSelectionModel.prototype.setSingleSelection = function(a) {
+  this.singleSelection = a
+};
+mxGraphSelectionModel.prototype.isSelected = function(a) {
+  return null != a ? 0 <= mxUtils.indexOf(this.cells, a) : !1
+};
+mxGraphSelectionModel.prototype.isEmpty = function() {
+  return 0 == this.cells.length
+};
+mxGraphSelectionModel.prototype.clear = function() {
+  this.changeSelection(null, this.cells)
+};
+mxGraphSelectionModel.prototype.setCell = function(a) {
+  null != a && this.setCells([a])
+};
+mxGraphSelectionModel.prototype.setCells = function(a) {
+  if (null != a) {
+    this.singleSelection && (a = [this.getFirstSelectableCell(a)]);
+    for (var b = [], c = 0; c < a.length; c++) this.graph.isCellSelectable(a[c]) && b.push(a[c]);
+    this.changeSelection(b, this.cells)
+  }
+};
+mxGraphSelectionModel.prototype.getFirstSelectableCell = function(a) {
+  if (null != a)
+    for (var b = 0; b < a.length; b++)
+      if (this.graph.isCellSelectable(a[b])) return a[b];
+  return null
+};
+mxGraphSelectionModel.prototype.addCell = function(a) {
+  null != a && this.addCells([a])
+};
+mxGraphSelectionModel.prototype.addCells = function(a) {
+  if (null != a) {
+    var b = null;
+    this.singleSelection && (b = this.cells, a = [this.getFirstSelectableCell(a)]);
+    for (var c = [], d = 0; d < a.length; d++) !this.isSelected(a[d]) && this.graph.isCellSelectable(a[d]) && c.push(a[d]);
+    this.changeSelection(c, b)
+  }
+};
+mxGraphSelectionModel.prototype.removeCell = function(a) {
+  null != a && this.removeCells([a])
+};
+mxGraphSelectionModel.prototype.removeCells = function(a) {
+  if (null != a) {
+    for (var b = [], c = 0; c < a.length; c++) this.isSelected(a[c]) && b.push(a[c]);
+    this.changeSelection(null, b)
+  }
+};
+mxGraphSelectionModel.prototype.changeSelection = function(a, b) {
+  if (null != a && 0 < a.length && null != a[0] || null != b && 0 < b.length && null != b[0]) {
+    var c = new mxSelectionChange(this, a, b);
+    c.execute();
+    var d = new mxUndoableEdit(this, !1);
+    d.add(c);
+    this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", d))
+  }
+};
+mxGraphSelectionModel.prototype.cellAdded = function(a) {
+  null != a && !this.isSelected(a) && this.cells.push(a)
+};
+mxGraphSelectionModel.prototype.cellRemoved = function(a) {
+  null != a && (a = mxUtils.indexOf(this.cells, a), 0 <= a && this.cells.splice(a, 1))
+};
+
+function mxSelectionChange(a, b, c) {
+  this.selectionModel = a;
+  this.added = null != b ? b.slice() : null;
+  this.removed = null != c ? c.slice() : null
+}
+mxSelectionChange.prototype.execute = function() {
+  var a = mxLog.enter("mxSelectionChange.execute");
+  window.status = mxResources.get(this.selectionModel.updatingSelectionResource) || this.selectionModel.updatingSelectionResource;
+  if (null != this.removed)
+    for (var b = 0; b < this.removed.length; b++) this.selectionModel.cellRemoved(this.removed[b]);
+  if (null != this.added)
+    for (b = 0; b < this.added.length; b++) this.selectionModel.cellAdded(this.added[b]);
+  b = this.added;
+  this.added = this.removed;
+  this.removed = b;
+  window.status = mxResources.get(this.selectionModel.doneResource) ||
+    this.selectionModel.doneResource;
+  mxLog.leave("mxSelectionChange.execute", a);
+  this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE, "added", this.added, "removed", this.removed))
+};
+
+function mxCellEditor(a) {
+  this.graph = a
+}
+mxCellEditor.prototype.graph = null;
+mxCellEditor.prototype.textarea = null;
+mxCellEditor.prototype.editingCell = null;
+mxCellEditor.prototype.trigger = null;
+mxCellEditor.prototype.modified = !1;
+mxCellEditor.prototype.autoSize = !0;
+mxCellEditor.prototype.emptyLabelText = "";
+mxCellEditor.prototype.textNode = "";
+mxCellEditor.prototype.init = function() {
+  this.textarea = document.createElement("textarea");
+  this.textarea.className = "mxCellEditor";
+  this.textarea.style.position = "absolute";
+  this.textarea.style.overflow = "visible";
+  this.textarea.setAttribute("cols", "20");
+  this.textarea.setAttribute("rows", "4");
+  mxClient.IS_NS && (this.textarea.style.resize = "none");
+  mxEvent.addListener(this.textarea, "blur", mxUtils.bind(this, function(a) {
+    this.focusLost()
+  }));
+  mxEvent.addListener(this.textarea, "keydown", mxUtils.bind(this, function(a) {
+    mxEvent.isConsumed(a) ||
+      (113 == a.keyCode || this.graph.isEnterStopsCellEditing() && 13 == a.keyCode && !mxEvent.isControlDown(a) && !mxEvent.isShiftDown(a) ? (this.graph.stopEditing(!1), mxEvent.consume(a)) :
+        27 == a.keyCode ? (this.graph.stopEditing(!0), mxEvent.consume(a)) : (this.clearOnChange && (this.clearOnChange = !1, this.textarea.value = ""), this.setModified(!0)))
+  }));
+  mxEvent.addListener(this.textarea, "keypress", mxUtils.bind(this, function(a) {
+    this.autoSize && !mxEvent.isConsumed(a) && setTimeout(mxUtils.bind(this, function() {
+      this.resize()
+    }), 0)
+  }))
+};
+mxCellEditor.prototype.resize = function() {
+  if (null != this.textDiv) {
+    var a = this.graph.getView().getState(this.editingCell),
+      b = this.graph.isLabelClipped(a.cell),
+      c = this.graph.isWrapping(a.cell);
+    if (this.graph.getModel().isEdge(a.cell)) this.bounds.x = a.absoluteOffset.x, this.bounds.y = a.absoluteOffset.y, this.bounds.width = 0, this.bounds.height = 0;
+    else if (null != this.bounds) {
+      this.bounds.x = a.x;
+      this.bounds.y = a.y;
+      this.bounds.width = a.width;
+      this.bounds.height = a.height;
+      var d = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION,
+        mxConstants.ALIGN_CENTER);
+      d == mxConstants.ALIGN_LEFT ? this.bounds.x -= a.width : d == mxConstants.ALIGN_RIGHT && (this.bounds.x += a.width);
+      d = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);
+      d == mxConstants.ALIGN_TOP ? this.bounds.y -= a.height : d == mxConstants.ALIGN_BOTTOM && (this.bounds.y += a.height)
+    }
+    d = this.textarea.value;
+    if ("\n" == d.charAt(d.length - 1) || "" == d) d += "\x26nbsp;";
+    d = mxUtils.htmlEntities(d, !1);
+    c ? (this.textDiv.style.whiteSpace = "normal", this.textDiv.style.width = this.bounds.width +
+      "px") : d = d.replace(/ /g, "\x26nbsp;");
+    d = d.replace(/\n/g, "\x3cbr/\x3e");
+    this.textDiv.innerHTML = d;
+    var d = this.textDiv.offsetWidth + 30,
+      e = this.textDiv.offsetHeight + 16,
+      d = Math.max(d, 40),
+      e = Math.max(e, 20);
+    b && (d = Math.min(this.bounds.width - 4, d), e = Math.min(this.bounds.height, e));
+    var f = null != a.text ? a.text.margin : null;
+    null == f && (f = mxUtils.getValue(a.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER), a = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE), f =
+      mxUtils.getAlignmentAsPoint(f,
+        a));
+    if (null != f) {
+      if (b || !c) this.textarea.style.left = Math.max(0, Math.round(this.bounds.x - f.x * this.bounds.width + f.x * d) - 3) + "px";
+      this.textarea.style.top = Math.max(0, Math.round(this.bounds.y - f.y * this.bounds.height + f.y * e) + 4) + "px"
+    }
+    if (b || !c) this.textarea.style.width = d + "px";
+    this.textarea.style.height = e + "px"
+  }
+};
+mxCellEditor.prototype.isModified = function() {
+  return this.modified
+};
+mxCellEditor.prototype.setModified = function(a) {
+  this.modified = a
+};
+mxCellEditor.prototype.focusLost = function() {
+  this.stopEditing(!this.graph.isInvokesStopCellEditing())
+};
+mxCellEditor.prototype.startEditing = function(a, b) {
+  null == this.textarea && this.init();
+  this.stopEditing(!0);
+  var c = this.graph.getView().getState(a);
+  if (null != c) {
+    this.editingCell = a;
+    this.trigger = b;
+    this.textNode = null;
+    null != c.text && this.isHideLabel(c) && (this.textNode = c.text.node, this.textNode.style.visibility = "hidden");
+    var d = this.graph.getView().scale,
+      d = mxUtils.getValue(c.style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE) * d,
+      e = mxUtils.getValue(c.style, mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY),
+      f = mxUtils.getValue(c.style, mxConstants.STYLE_FONTCOLOR, "black"),
+      g = mxUtils.getValue(c.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT),
+      h = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD,
+      k = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC,
+      l = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE;
+    this.textarea.style.fontSize = Math.round(d) +
+      "px";
+    this.textarea.style.lineHeight = Math.round(d * mxConstants.LINE_HEIGHT) + "px";
+    this.textarea.style.fontFamily = e;
+    this.textarea.style.textAlign = g;
+    this.textarea.style.color = f;
+    this.textarea.style.fontWeight = h ? "bold" : "normal";
+    this.textarea.style.fontStyle = k ? "italic" : "";
+    this.textarea.style.textDecoration = l ? "underline" : "";
+    this.textarea.style.overflow = "auto";
+    this.textarea.style.outline = "none";
+    this.bounds = d = this.getEditorBounds(c);
+    this.textarea.style.left = d.x + "px";
+    this.textarea.style.top = d.y + "px";
+    this.textarea.style.width =
+      d.width + "px";
+    this.textarea.style.height = d.height + "px";
+    this.textarea.style.zIndex = 5;
+    c = this.getInitialValue(c, b);
+    null == c || 0 == c.length ? (c = this.getEmptyLabelText(), this.clearOnChange = !0) : this.clearOnChange = !1;
+    this.setModified(!1);
+    this.textarea.value = c;
+    this.graph.container.appendChild(this.textarea);
+    "none" != this.textarea.style.display && (this.autoSize && (this.textDiv = this.createTextDiv(), document.body.appendChild(this.textDiv), this.resize()), this.textarea.focus(), this.textarea.select())
+  }
+};
+mxCellEditor.prototype.createTextDiv = function() {
+  var a = document.createElement("div"),
+    b = a.style;
+  b.position = "absolute";
+  b.whiteSpace = "nowrap";
+  b.visibility = "hidden";
+  b.display = mxClient.IS_QUIRKS ? "inline" : "inline-block";
+  b.zoom = "1";
+  b.verticalAlign = "top";
+  b.lineHeight = this.textarea.style.lineHeight;
+  b.fontSize = this.textarea.style.fontSize;
+  b.fontFamily = this.textarea.style.fontFamily;
+  b.fontWeight = this.textarea.style.fontWeight;
+  b.textAlign = this.textarea.style.textAlign;
+  b.fontStyle = this.textarea.style.fontStyle;
+  b.textDecoration = this.textarea.style.textDecoration;
+  return a
+};
+mxCellEditor.prototype.stopEditing = function(a) {
+  null != this.editingCell && (null != this.textNode && (this.textNode.style.visibility = "visible", this.textNode = null), !a && this.isModified() && this.graph.labelChanged(this.editingCell, this
+      .getCurrentValue(), this.trigger), null != this.textDiv && (document.body.removeChild(this.textDiv), this.textDiv = null), this.bounds = this.trigger = this.editingCell = null, this.textarea
+    .blur(), this.textarea.parentNode.removeChild(this.textarea))
+};
+mxCellEditor.prototype.getInitialValue = function(a, b) {
+  return this.graph.getEditingValue(a.cell, b)
+};
+mxCellEditor.prototype.getCurrentValue = function() {
+  return this.textarea.value.replace(/\r/g, "")
+};
+mxCellEditor.prototype.isHideLabel = function(a) {
+  return !0
+};
+mxCellEditor.prototype.getMinimumSize = function(a) {
+  var b = this.graph.getView().scale;
+  return new mxRectangle(0, 0, null == a.text ? 30 : a.text.size * b + 20, "left" == this.textarea.style.textAlign ? 120 : 40)
+};
+mxCellEditor.prototype.getEditorBounds = function(a) {
+  var b = this.graph.getModel().isEdge(a.cell),
+    c = this.graph.getView().scale,
+    d = this.getMinimumSize(a),
+    e = d.width,
+    d = d.height,
+    f = parseInt(a.style[mxConstants.STYLE_SPACING] || 2) * c,
+    g = parseInt(a.style[mxConstants.STYLE_SPACING_TOP] || 0) * c + f,
+    h = parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT] || 0) * c + f,
+    k = parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM] || 0) * c + f,
+    c = parseInt(a.style[mxConstants.STYLE_SPACING_LEFT] || 0) * c + f,
+    h = new mxRectangle(a.x, a.y, Math.max(e, a.width -
+      c - h), Math.max(d, a.height - g - k));
+  b ? (h.x = a.absoluteOffset.x, h.y = a.absoluteOffset.y, null != a.text && null != a.text.boundingBox && (0 < a.text.boundingBox.x && (h.x = a.text.boundingBox.x), 0 < a.text.boundingBox.y && (h.y =
+    a.text.boundingBox.y))) : null != a.text && null != a.text.boundingBox && (h.x = Math.min(h.x, a.text.boundingBox.x), h.y = Math.min(h.y, a.text.boundingBox.y));
+  h.x += c;
+  h.y += g;
+  null != a.text && null != a.text.boundingBox && (b ? (h.width = Math.max(e, a.text.boundingBox.width), h.height = Math.max(d, a.text.boundingBox.height)) : (h.width =
+    Math.max(h.width, a.text.boundingBox.width), h.height = Math.max(h.height, a.text.boundingBox.height)));
+  this.graph.getModel().isVertex(a.cell) && (b = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER), b == mxConstants.ALIGN_LEFT ? h.x -= a.width : b ==
+    mxConstants.ALIGN_RIGHT && (h.x += a.width), b = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE), b == mxConstants.ALIGN_TOP ? h.y -= a.height :
+    b == mxConstants.ALIGN_BOTTOM && (h.y += a.height));
+  return h
+};
+mxCellEditor.prototype.getEmptyLabelText = function(a) {
+  return this.emptyLabelText
+};
+mxCellEditor.prototype.getEditingCell = function() {
+  return this.editingCell
+};
+mxCellEditor.prototype.destroy = function() {
+  null != this.textarea && (mxEvent.release(this.textarea), null != this.textarea.parentNode && this.textarea.parentNode.removeChild(this.textarea), this.textarea = null)
+};
+
+function mxCellRenderer() {}
+mxCellRenderer.prototype.defaultEdgeShape = mxConnector;
+mxCellRenderer.prototype.defaultVertexShape = mxRectangleShape;
+mxCellRenderer.prototype.defaultTextShape = mxText;
+mxCellRenderer.prototype.legacyControlPosition = !0;
+mxCellRenderer.prototype.defaultShapes = {};
+mxCellRenderer.registerShape = function(a, b) {
+  mxCellRenderer.prototype.defaultShapes[a] = b
+};
+mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE, mxRectangleShape);
+mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE, mxEllipse);
+mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS, mxRhombus);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER, mxCylinder);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR, mxConnector);
+mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR, mxActor);
+mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE, mxTriangle);
+mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON, mxHexagon);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD, mxCloud);
+mxCellRenderer.registerShape(mxConstants.SHAPE_LINE, mxLine);
+mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW, mxArrow);
+mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE, mxDoubleEllipse);
+mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE, mxSwimlane);
+mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE, mxImageShape);
+mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL, mxLabel);
+mxCellRenderer.prototype.initialize = function(a, b) {
+  var c = a.view.graph.getModel();
+  if (null != a.view.graph.container && null == a.shape && a.cell != a.view.currentRoot && (c.isVertex(a.cell) || c.isEdge(a.cell)))
+    if (this.createShape(a), null != a.shape && (null == b || b)) this.initializeShape(a), a.view.graph.ordered || c.isEdge(a.cell) ? a.invalidOrder = !0 : a.view.graph.keepEdgesInForeground &&
+      null != this.firstEdge && (this.firstEdge.parentNode == a.shape.node.parentNode ? this.insertState(a, this.firstEdge) : this.firstEdge = null), a.shape.scale =
+      a.view.scale, this.createCellOverlays(a), this.installListeners(a)
+};
+mxCellRenderer.prototype.initializeShape = function(a) {
+  a.shape.init(a.view.getDrawPane())
+};
+mxCellRenderer.prototype.getPreviousStateInContainer = function(a, b) {
+  for (var c = null, d = a.view.graph, e = d.getModel(), f = a.cell, g = e.getParent(f); null != g && null == c;) c = this.findPreviousStateInContainer(d, g, f, b), f = g, g = e.getParent(f);
+  return c
+};
+mxCellRenderer.prototype.findPreviousStateInContainer = function(a, b, c, d) {
+  var e = null,
+    f = a.getModel();
+  for (c = null != c ? b.getIndex(c) - 1 : f.getChildCount(b) - 1; 0 <= c && null == e; c--) e = this.findPreviousStateInContainer(a, f.getChildAt(b, c), null, d);
+  if (null == e && (e = a.view.getState(b), null != e && (null == e.shape || null == e.shape.node || e.shape.node.parentNode != d))) e = null;
+  return e
+};
+mxCellRenderer.prototype.order = function(a) {
+  var b = a.shape.node.parentNode,
+    c = this.getPreviousStateInContainer(a, b),
+    d = b.firstChild;
+  null != c && (d = c.shape.node, null != c.text && (null != c.text.node && c.text.node.parentNode == b) && (d = c.text.node), d = d.nextSibling);
+  this.insertState(a, d)
+};
+mxCellRenderer.prototype.orderEdge = function(a) {
+  var b = a.view,
+    c = b.graph.getModel();
+  if (b.graph.keepEdgesInForeground) {
+    if (null == this.firstEdge || null == this.firstEdge.parentNode || this.firstEdge.parentNode != a.shape.node.parentNode) this.firstEdge = a.shape.node
+  } else if (b.graph.keepEdgesInBackground) {
+    var d = a.shape.node,
+      e = d.parentNode,
+      c = c.getParent(a.cell),
+      b = b.getState(c),
+      e = null != b && null != b.shape && null != b.shape.node ? b.shape.node.nextSibling : e.firstChild;
+    null != e && e != d && this.insertState(a, e)
+  }
+};
+mxCellRenderer.prototype.insertState = function(a, b) {
+  a.shape.node.parentNode.insertBefore(a.shape.node, b);
+  null != a.text && (null != a.text.node && a.text.node.parentNode == a.shape.node.parentNode) && a.shape.node.parentNode.insertBefore(a.text.node, a.shape.node.nextSibling)
+};
+mxCellRenderer.prototype.createShape = function(a) {
+  if (null != a.style) {
+    var b = mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]);
+    null != b ? a.shape = new mxShape(b) : (b = this.getShapeConstructor(a), a.shape = new b);
+    a.shape.points = a.absolutePoints;
+    a.shape.bounds = new mxRectangle(a.x, a.y, a.width, a.height);
+    a.shape.dialect = a.view.graph.dialect;
+    this.configureShape(a)
+  }
+};
+mxCellRenderer.prototype.getShape = function(a) {
+  return null != a ? mxCellRenderer.prototype.defaultShapes[a] : null
+};
+mxCellRenderer.prototype.getShapeConstructor = function(a) {
+  var b = this.getShape(a.style[mxConstants.STYLE_SHAPE]);
+  null == b && (b = a.view.graph.getModel().isEdge(a.cell) ? this.defaultEdgeShape : this.defaultVertexShape);
+  return b
+};
+mxCellRenderer.prototype.configureShape = function(a) {
+  a.shape.apply(a);
+  a.shape.image = a.view.graph.getImage(a);
+  a.shape.indicatorShape = this.getShape(a.view.graph.getIndicatorShape(a));
+  a.shape.indicatorColor = a.view.graph.getIndicatorColor(a);
+  a.shape.indicatorGradientColor = a.view.graph.getIndicatorGradientColor(a);
+  a.shape.indicatorDirection = a.style[mxConstants.STYLE_INDICATOR_DIRECTION];
+  a.shape.indicatorImage = a.view.graph.getIndicatorImage(a);
+  this.postConfigureShape(a)
+};
+mxCellRenderer.prototype.postConfigureShape = function(a) {
+  null != a.shape && (this.resolveColor(a, "indicatorColor", mxConstants.STYLE_FILLCOLOR), this.resolveColor(a, "indicatorGradientColor", mxConstants.STYLE_GRADIENTCOLOR), this.resolveColor(a,
+    "fill", mxConstants.STYLE_FILLCOLOR), this.resolveColor(a, "stroke", mxConstants.STYLE_STROKECOLOR), this.resolveColor(a, "gradient", mxConstants.STYLE_GRADIENTCOLOR))
+};
+mxCellRenderer.prototype.resolveColor = function(a, b, c) {
+  var d = a.shape[b],
+    e = a.view.graph,
+    f = null;
+  "inherit" == d ? f = e.model.getParent(a.cell) : "swimlane" == d ? (f = null != e.model.getTerminal(a.cell, !1) ? e.model.getTerminal(a.cell, !1) : a.cell, f = e.getSwimlane(f), c = e.swimlaneIndicatorColorAttribute) :
+    "indicated" == d && (a.shape[b] = a.shape.indicatorColor);
+  null != f && (d = e.getView().getState(f), a.shape[b] = null, null != d && (a.shape[b] = null != d.shape && "indicatorColor" != b ? d.shape[b] : d.style[c]))
+};
+mxCellRenderer.prototype.getLabelValue = function(a) {
+  return a.view.graph.getLabel(a.cell)
+};
+mxCellRenderer.prototype.createLabel = function(a, b) {
+  var c = a.view.graph;
+  c.getModel().isEdge(a.cell);
+  if (0 < a.style[mxConstants.STYLE_FONTSIZE] || null == a.style[mxConstants.STYLE_FONTSIZE]) {
+    var d = c.isHtmlLabel(a.cell) || null != b && mxUtils.isNode(b);
+    a.text = new this.defaultTextShape(b, new mxRectangle, a.style[mxConstants.STYLE_ALIGN] || mxConstants.ALIGN_CENTER, c.getVerticalAlign(a), a.style[mxConstants.STYLE_FONTCOLOR], a.style[
+        mxConstants.STYLE_FONTFAMILY], a.style[mxConstants.STYLE_FONTSIZE], a.style[mxConstants.STYLE_FONTSTYLE],
+      a.style[mxConstants.STYLE_SPACING], a.style[mxConstants.STYLE_SPACING_TOP], a.style[mxConstants.STYLE_SPACING_RIGHT], a.style[mxConstants.STYLE_SPACING_BOTTOM], a.style[mxConstants.STYLE_SPACING_LEFT],
+      a.style[mxConstants.STYLE_HORIZONTAL], a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR], a.style[mxConstants.STYLE_LABEL_BORDERCOLOR], c.isWrapping(a.cell) && c.isHtmlLabel(a.cell), c.isLabelClipped(
+        a.cell), a.style[mxConstants.STYLE_OVERFLOW], a.style[mxConstants.STYLE_LABEL_PADDING]);
+    a.text.opacity = mxUtils.getValue(a.style,
+      mxConstants.STYLE_TEXT_OPACITY, 100);
+    a.text.dialect = d ? mxConstants.DIALECT_STRICTHTML : a.view.graph.dialect;
+    a.text.state = a;
+    this.initializeLabel(a);
+    var e = !1,
+      f = function(b) {
+        var d = a;
+        if (mxClient.IS_TOUCH || e) d = mxEvent.getClientX(b), b = mxEvent.getClientY(b), b = mxUtils.convertPoint(c.container, d, b), d = c.view.getState(c.getCellAt(b.x, b.y));
+        return d
+      };
+    mxEvent.addGestureListeners(a.text.node, mxUtils.bind(this, function(b) {
+      this.isLabelEvent(a, b) && (c.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(b, a)), e = c.dialect !=
+        mxConstants.DIALECT_SVG && "IMG" == mxEvent.getSource(b).nodeName)
+    }), mxUtils.bind(this, function(b) {
+      this.isLabelEvent(a, b) && c.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, f(b)))
+    }), mxUtils.bind(this, function(b) {
+      this.isLabelEvent(a, b) && (c.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b, f(b))), e = !1)
+    }));
+    mxEvent.addListener(a.text.node, "dblclick", mxUtils.bind(this, function(b) {
+      this.isLabelEvent(a, b) && (c.dblClick(b, a.cell), mxEvent.consume(b))
+    }))
+  }
+};
+mxCellRenderer.prototype.initializeLabel = function(a) {
+  var b = a.view.graph;
+  a.text.dialect != mxConstants.DIALECT_SVG && (mxClient.IS_SVG && mxClient.NO_FO ? a.text.init(b.container) : mxUtils.isVml(a.view.getDrawPane()) && (null != a.shape.label ? a.text.init(a.shape.label) :
+    a.text.init(a.shape.node)));
+  null == a.text.node && (a.text.init(a.view.getDrawPane()), null != a.shape && null != a.text && a.shape.node.parentNode.insertBefore(a.text.node, a.shape.node.nextSibling))
+};
+mxCellRenderer.prototype.createCellOverlays = function(a) {
+  var b = a.view.graph.getCellOverlays(a.cell),
+    c = null;
+  if (null != b)
+    for (var c = new mxDictionary, d = 0; d < b.length; d++) {
+      var e = null != a.overlays ? a.overlays.remove(b[d]) : null;
+      null == e && (e = new mxImageShape(new mxRectangle, b[d].image.src), e.dialect = a.view.graph.dialect, e.preserveImageAspect = !1, e.overlay = b[d], this.initializeOverlay(a, e), this.installCellOverlayListeners(
+        a, b[d], e), null != b[d].cursor && (e.node.style.cursor = b[d].cursor));
+      c.put(b[d], e)
+    }
+  null != a.overlays &&
+    a.overlays.visit(function(a, b) {
+      b.destroy()
+    });
+  a.overlays = c
+};
+mxCellRenderer.prototype.initializeOverlay = function(a, b) {
+  b.init(a.view.getOverlayPane())
+};
+mxCellRenderer.prototype.installCellOverlayListeners = function(a, b, c) {
+  var d = a.view.graph;
+  mxEvent.addListener(c.node, "click", function(c) {
+    d.isEditing() && d.stopEditing(!d.isInvokesStopCellEditing());
+    b.fireEvent(new mxEventObject(mxEvent.CLICK, "event", c, "cell", a.cell))
+  });
+  mxEvent.addGestureListeners(c.node, function(a) {
+    mxEvent.consume(a)
+  }, function(b) {
+    d.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, a))
+  });
+  mxClient.IS_TOUCH && mxEvent.addListener(c.node, "touchend", function(c) {
+    b.fireEvent(new mxEventObject(mxEvent.CLICK,
+      "event", c, "cell", a.cell))
+  })
+};
+mxCellRenderer.prototype.createControl = function(a) {
+  var b = a.view.graph,
+    c = b.getFoldingImage(a);
+  if (b.foldingEnabled && null != c) {
+    if (null == a.control) {
+      var d = new mxRectangle(0, 0, c.width, c.height);
+      a.control = new mxImageShape(d, c.src);
+      a.control.preserveImageAspect = !1;
+      a.control.dialect = b.dialect;
+      this.initControl(a, a.control, !0, function(c) {
+        if (b.isEnabled()) {
+          var d = !b.isCellCollapsed(a.cell);
+          b.foldCells(d, !1, [a.cell]);
+          mxEvent.consume(c)
+        }
+      })
+    }
+  } else null != a.control && (a.control.destroy(), a.control = null)
+};
+mxCellRenderer.prototype.initControl = function(a, b, c, d) {
+  var e = a.view.graph;
+  e.isHtmlLabel(a.cell) && mxClient.NO_FO && e.dialect == mxConstants.DIALECT_SVG ? (b.dialect = mxConstants.DIALECT_PREFERHTML, b.init(e.container), b.node.style.zIndex = 1) : b.init(a.view.getOverlayPane());
+  b = b.innerNode || b.node;
+  d && (e.isEnabled() && (b.style.cursor = "pointer"), mxEvent.addListener(b, "click", d));
+  c && mxEvent.addGestureListeners(b, function(b) {
+    e.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(b, a));
+    mxEvent.consume(b)
+  }, function(b) {
+    e.fireMouseEvent(mxEvent.MOUSE_MOVE,
+      new mxMouseEvent(b, a))
+  });
+  return b
+};
+mxCellRenderer.prototype.isShapeEvent = function(a, b) {
+  return !0
+};
+mxCellRenderer.prototype.isLabelEvent = function(a, b) {
+  return !0
+};
+mxCellRenderer.prototype.installListeners = function(a) {
+  var b = a.view.graph,
+    c = function(c) {
+      var d = a;
+      if (b.dialect != mxConstants.DIALECT_SVG && "IMG" == mxEvent.getSource(c).nodeName || mxClient.IS_TOUCH) d = mxEvent.getClientX(c), c = mxEvent.getClientY(c), c = mxUtils.convertPoint(b.container,
+        d, c), d = b.view.getState(b.getCellAt(c.x, c.y));
+      return d
+    },
+    d = !1;
+  mxEvent.addListener(a.shape.node, "gesturestart", mxUtils.bind(this, function(a) {
+    b.lastTouchTime = 0;
+    d = !0;
+    mxEvent.consume(a)
+  }));
+  mxEvent.addGestureListeners(a.shape.node, mxUtils.bind(this,
+    function(c) {
+      this.isShapeEvent(a, c) && !d ? b.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(c, null != a.shape && mxEvent.getSource(c) == a.shape.content ? null : a)) : d && mxEvent.consume(c)
+    }), mxUtils.bind(this, function(e) {
+    this.isShapeEvent(a, e) && !d ? b.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(e, null != a.shape && mxEvent.getSource(e) == a.shape.content ? null : c(e))) : d && mxEvent.consume(
+      e)
+  }), mxUtils.bind(this, function(e) {
+    this.isShapeEvent(a, e) && !d ? b.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(e, null != a.shape &&
+      mxEvent.getSource(e) == a.shape.content ? null : c(e))) : d && mxEvent.consume(e)
+  }));
+  var e = mxClient.IS_TOUCH ? "gestureend" : "dblclick";
+  mxEvent.addListener(a.shape.node, e, mxUtils.bind(this, function(c) {
+    d = !1;
+    "gestureend" == e ? (b.lastTouchTime = 0, b.gestureEnabled && (b.handleGesture(a, c), mxEvent.consume(c))) : this.isShapeEvent(a, c) && (b.dblClick(c, null != a.shape && mxEvent.getSource(
+      c) == a.shape.content ? null : a.cell), mxEvent.consume(c))
+  }))
+};
+mxCellRenderer.prototype.redrawLabel = function(a, b) {
+  var c = this.getLabelValue(a);
+  if (null == a.text && null != c && (mxUtils.isNode(c) || 0 < c.length)) this.createLabel(a, c);
+  else if (null != a.text && (null == c || 0 == c.length)) a.text.destroy(), a.text = null;
+  if (null != a.text) {
+    var d = a.view.graph,
+      e = d.isWrapping(a.cell),
+      d = d.isLabelClipped(a.cell),
+      f = this.getLabelBounds(a);
+    if (b || a.text.value != c || a.text.isWrapping != e || a.text.isClipping != d || a.text.scale != a.view.scale || !a.text.bounds.equals(f)) a.text.value = c, a.text.bounds = f, a.text.scale =
+      this.getTextScale(a), a.text.isWrapping = e, a.text.isClipping = d, a.text.redraw()
+  }
+};
+mxCellRenderer.prototype.getTextScale = function(a) {
+  return a.view.scale
+};
+mxCellRenderer.prototype.getLabelBounds = function(a) {
+  var b = a.view.graph,
+    c = a.view.scale,
+    d = b.getModel().isEdge(a.cell),
+    e = new mxRectangle(a.absoluteOffset.x, a.absoluteOffset.y);
+  a.text.updateMargin();
+  d ? (d = a.text.getSpacing(), e.x += d.x * c, e.y += d.y * c, b = b.getCellGeometry(a.cell), null != b && (e.width = Math.max(0, a.text.margin.x * b.width * c - a.text.spacingLeft * c - a.text.spacingRight *
+    c), e.height = Math.max(0, a.text.margin.y * b.height * c - a.text.spacingTop * c - a.text.spacingBottom * c))) : (a.text.isPaintBoundsInverted() && (d = e.x,
+      e.x = e.y, e.y = d), e.x += a.x, e.y += a.y, e.width = Math.max(1, a.width), e.height = Math.max(1, a.height), b.isSwimlane(a.cell) && (b = b.getStartSize(a.cell), 0 < b.width ? (d = Math.min(
+      e.width, b.width * c), a.shape.flipH && (e.x += e.width - d), e.width = d) : 0 < b.height && (d = Math.min(e.height, b.height * c), a.shape.flipV && (e.y += e.height - d), e.height = d)),
+    this.rotateLabelBounds(a, e));
+  return e
+};
+mxCellRenderer.prototype.rotateLabelBounds = function(a, b) {
+  if (a.text.isPaintBoundsInverted()) {
+    var c = (a.width - a.height) / 2;
+    b.x += c;
+    b.y -= c;
+    c = b.width;
+    b.width = b.height;
+    b.height = c
+  }
+  b.x -= a.text.margin.x * b.width;
+  b.y -= a.text.margin.y * b.height;
+  if ("fill" != a.style[mxConstants.STYLE_OVERFLOW]) {
+    var c = a.view.scale,
+      d = a.text.getSpacing();
+    b.x += d.x * c;
+    b.y += d.y * c;
+    b.width = Math.max(0, b.width - a.text.spacingLeft * c - a.text.spacingRight * c);
+    b.height = Math.max(0, b.height - a.text.spacingTop * c - a.text.spacingBottom * c)
+  }
+  var e = a.text.getTextRotation();
+  if (0 != e && (null != a && a.view.graph.model.isVertex(a.cell)) && (c = a.getCenterX(), d = a.getCenterY(), b.x != c || b.y != d)) e *= Math.PI / 180, pt = mxUtils.getRotatedPoint(new mxPoint(b.x,
+    b.y), Math.cos(e), Math.sin(e), new mxPoint(c, d)), b.x = pt.x, b.y = pt.y
+};
+mxCellRenderer.prototype.redrawCellOverlays = function(a, b) {
+  this.createCellOverlays(a);
+  if (null != a.overlays) {
+    var c = mxUtils.mod(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0), 90),
+      d = mxUtils.toRadians(c),
+      e = Math.cos(d),
+      f = Math.sin(d);
+    a.overlays.visit(function(d, h) {
+      var k = h.overlay.getBounds(a);
+      if (!a.view.graph.getModel().isEdge(a.cell) && null != a.shape && 0 != c) {
+        var l = k.getCenterX(),
+          m = k.getCenterY(),
+          m = mxUtils.getRotatedPoint(new mxPoint(l, m), e, f, new mxPoint(a.getCenterX(), a.getCenterY())),
+          l = m.x,
+          m = m.y;
+        k.x =
+          Math.round(l - k.width / 2);
+        k.y = Math.round(m - k.height / 2)
+      }
+      if (b || null == h.bounds || h.scale != a.view.scale || !h.bounds.equals(k)) h.bounds = k, h.scale = a.view.scale, h.redraw()
+    })
+  }
+};
+mxCellRenderer.prototype.redrawControl = function(a, b) {
+  if (null != a.control) {
+    var c = this.getControlBounds(a),
+      d = this.legacyControlPosition ? mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0) : a.shape.getTextRotation(),
+      e = a.view.scale;
+    if (b || a.control.scale != e || !a.control.bounds.equals(c) || a.control.rotation != d) a.control.rotation = d, a.control.bounds = c, a.control.scale = e, a.control.redraw()
+  }
+};
+mxCellRenderer.prototype.getControlBounds = function(a) {
+  if (null != a.control) {
+    var b = a.control.scale,
+      c = a.control.bounds.width / b,
+      b = a.control.bounds.height / b,
+      d = a.view.scale,
+      e = a.getCenterX(),
+      f = a.getCenterY();
+    if (!a.view.graph.getModel().isEdge(a.cell) && (e = a.x + c * d, f = a.y + b * d, null != a.shape)) {
+      var g = a.shape.getShapeRotation();
+      if (this.legacyControlPosition) g = mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0);
+      else if (a.shape.isPaintBoundsInverted()) var h = (a.width - a.height) / 2,
+        e = e + h,
+        f = f - h;
+      0 != g && (h = mxUtils.toRadians(g),
+        g = Math.cos(h), h = Math.sin(h), f = mxUtils.getRotatedPoint(new mxPoint(e, f), g, h, new mxPoint(a.getCenterX(), a.getCenterY())), e = f.x, f = f.y)
+    }
+    return a.view.graph.getModel().isEdge(a.cell), new mxRectangle(Math.round(e - c / 2 * d), Math.round(f - b / 2 * d), Math.round(c * d), Math.round(b * d))
+  }
+  return null
+};
+mxCellRenderer.prototype.redraw = function(a, b, c) {
+  if (null != a.shape) {
+    var d = !1;
+    a.view.graph.getModel().isEdge(a.cell);
+    reconfigure = null != b ? b : !1;
+    this.createControl(a);
+    if (a.orderChanged || a.invalidOrder) a.view.graph.ordered ? this.order(a) : this.orderEdge(a);
+    if (a.orderChanged || !mxUtils.equalEntries(a.shape.style, a.style)) this.configureShape(a), b = !0;
+    delete a.invalidOrder;
+    delete a.orderChanged;
+    if (b || null == a.shape.bounds || a.shape.scale != a.view.scale || !a.shape.bounds.equals(a) || !mxUtils.equalPoints(a.shape.points,
+        a.absolutePoints)) d = !0, a.shape.points = null != a.absolutePoints ? a.absolutePoints.slice() : null, a.shape.bounds = new mxRectangle(a.x, a.y, a.width, a.height), a.shape.scale = a.view
+      .scale, null == c || c ? a.shape.redraw() : a.shape.updateBoundingBox();
+    if (null == c || c) this.redrawLabel(a, d), this.redrawCellOverlays(a, d), this.redrawControl(a, d)
+  }
+};
+mxCellRenderer.prototype.destroy = function(a) {
+  null != a.shape && (null != a.text && (a.text.destroy(), a.text = null), null != a.overlays && (a.overlays.visit(function(a, c) {
+    c.destroy()
+  }), a.overlays = null), null != a.control && (a.control.destroy(), a.control = null), a.shape.destroy(), a.shape = null)
+};
+var mxEdgeStyle = {
+    EntityRelation: function(a, b, c, d, e) {
+      var f = a.view,
+        g = f.graph;
+      d = mxUtils.getValue(a.style, mxConstants.STYLE_SEGMENT, mxConstants.ENTITY_SEGMENT) * f.scale;
+      var h = a.absolutePoints,
+        k = h[0],
+        l = h[h.length - 1],
+        h = !1;
+      if (null != k) b = new mxCellState, b.x = k.x, b.y = k.y;
+      else if (null != b) {
+        var m = mxUtils.getPortConstraints(b, a, !0, mxConstants.DIRECTION_MASK_NONE);
+        m != mxConstants.DIRECTION_MASK_NONE ? h = m == mxConstants.DIRECTION_MASK_WEST : (k = g.getCellGeometry(b.cell), k.relative ? h = 0.5 >= k.x : null != c && (h = c.x + c.width < b.x))
+      } else return;
+      k = !0;
+      null != l ? (c = new mxCellState, c.x = l.x, c.y = l.y) : null != c && (m = mxUtils.getPortConstraints(c, a, !1, mxConstants.DIRECTION_MASK_NONE), m != mxConstants.DIRECTION_MASK_NONE ? k = m ==
+        mxConstants.DIRECTION_MASK_WEST : (a = g.getCellGeometry(c.cell), a.relative ? k = 0.5 >= a.x : null != b && (k = b.x + b.width < c.x)));
+      null != b && null != c && (a = h ? b.x : b.x + b.width, b = f.getRoutingCenterY(b), g = k ? c.x : c.x + c.width, c = f.getRoutingCenterY(c), f = new mxPoint(a + (h ? -d : d), b), l = new mxPoint(
+        g + (k ? -d : d), c), h == k ? (d = h ? Math.min(a, g) - d : Math.max(a, g) + d, e.push(new mxPoint(d,
+        b)), e.push(new mxPoint(d, c))) : (f.x < l.x == h ? (d = b + (c - b) / 2, e.push(f), e.push(new mxPoint(f.x, d)), e.push(new mxPoint(l.x, d))) : e.push(f), e.push(l)))
+    },
+    Loop: function(a, b, c, d, e) {
+      if (null != b) {
+        c = a.view;
+        var f = c.graph;
+        d = null != d && 0 < d.length ? d[0] : null;
+        null != d && (d = c.transformControlPoint(a, d), mxUtils.contains(b, d.x, d.y) && (d = null));
+        var g = 0,
+          h = 0,
+          k = 0,
+          l = 0,
+          f = mxUtils.getValue(a.style, mxConstants.STYLE_SEGMENT, f.gridSize) * c.scale;
+        a = mxUtils.getValue(a.style, mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_WEST);
+        a == mxConstants.DIRECTION_NORTH ||
+          a == mxConstants.DIRECTION_SOUTH ? (g = c.getRoutingCenterX(b), h = f) : (k = c.getRoutingCenterY(b), l = f);
+        null == d || d.x < b.x || d.x > b.x + b.width ? null != d ? (g = d.x, l = Math.max(Math.abs(k - d.y), l)) : a == mxConstants.DIRECTION_NORTH ? k = b.y - 2 * h : a == mxConstants.DIRECTION_SOUTH ?
+          k = b.y + b.height + 2 * h : g = a == mxConstants.DIRECTION_EAST ? b.x - 2 * l : b.x + b.width + 2 * l : null != d && (g = c.getRoutingCenterX(b), h = Math.max(Math.abs(g - d.x), l), k =
+            d.y, l = 0);
+        e.push(new mxPoint(g - h, k - l));
+        e.push(new mxPoint(g + h, k + l))
+      }
+    },
+    ElbowConnector: function(a, b, c, d, e) {
+      var f = null !=
+        d && 0 < d.length ? d[0] : null,
+        g = !1,
+        h = !1;
+      if (null != b && null != c)
+        if (null != f) var k = Math.min(b.x, c.x),
+          l = Math.max(b.x + b.width, c.x + c.width),
+          h = Math.min(b.y, c.y),
+          m = Math.max(b.y + b.height, c.y + c.height),
+          f = a.view.transformControlPoint(a, f),
+          g = f.y < h || f.y > m,
+          h = f.x < k || f.x > l;
+        else k = Math.max(b.x, c.x), l = Math.min(b.x + b.width, c.x + c.width), g = k == l, g || (h = Math.max(b.y, c.y), m = Math.min(b.y + b.height, c.y + c.height), h = h == m);
+        !h && (g || a.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL) ? mxEdgeStyle.TopToBottom(a, b, c, d, e) : mxEdgeStyle.SideToSide(a,
+        b, c, d, e)
+    },
+    SideToSide: function(a, b, c, d, e) {
+      var f = a.view;
+      d = null != d && 0 < d.length ? d[0] : null;
+      var g = a.absolutePoints,
+        h = g[0],
+        g = g[g.length - 1];
+      null != d && (d = f.transformControlPoint(a, d));
+      null != h && (b = new mxCellState, b.x = h.x, b.y = h.y);
+      null != g && (c = new mxCellState, c.x = g.x, c.y = g.y);
+      null != b && null != c && (a = Math.max(b.x, c.x), h = Math.min(b.x + b.width, c.x + c.width), a = null != d ? d.x : h + (a - h) / 2, h = f.getRoutingCenterY(b), f = f.getRoutingCenterY(c),
+        null != d && (d.y >= b.y && d.y <= b.y + b.height && (h = d.y), d.y >= c.y && d.y <= c.y + c.height && (f = d.y)), !mxUtils.contains(c,
+          a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), !mxUtils.contains(c, a, f) && !mxUtils.contains(b, a, f) && e.push(new mxPoint(a, f)), 1 == e.length && (null != d ? !
+          mxUtils.contains(c, a, d.y) && !mxUtils.contains(b, a, d.y) && e.push(new mxPoint(a, d.y)) : (f = Math.max(b.y, c.y), b = Math.min(b.y + b.height, c.y + c.height), e.push(new mxPoint(a,
+            f + (b - f) / 2)))))
+    },
+    TopToBottom: function(a, b, c, d, e) {
+      var f = a.view;
+      d = null != d && 0 < d.length ? d[0] : null;
+      var g = a.absolutePoints,
+        h = g[0],
+        g = g[g.length - 1];
+      null != d && (d = f.transformControlPoint(a, d));
+      null !=
+        h && (b = new mxCellState, b.x = h.x, b.y = h.y);
+      null != g && (c = new mxCellState, c.x = g.x, c.y = g.y);
+      null != b && null != c && (h = Math.max(b.y, c.y), g = Math.min(b.y + b.height, c.y + c.height), a = f.getRoutingCenterX(b), null != d && (d.x >= b.x && d.x <= b.x + b.width) && (a = d.x), h =
+        null != d ? d.y : g + (h - g) / 2, !mxUtils.contains(c, a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), a = null != d && d.x >= c.x && d.x <= c.x + c.width ? d.x : f.getRoutingCenterX(
+          c), !mxUtils.contains(c, a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), 1 == e.length && (null != d && 1 ==
+          e.length ? !mxUtils.contains(c, d.x, h) && !mxUtils.contains(b, d.x, h) && e.push(new mxPoint(d.x, h)) : (f = Math.max(b.x, c.x), b = Math.min(b.x + b.width, c.x + c.width), e.push(new mxPoint(
+            f + (b - f) / 2, h)))))
+    },
+    SegmentConnector: function(a, b, c, d, e) {
+      var f = a.absolutePoints,
+        g = !0,
+        h = null,
+        k = f[0];
+      null == k && null != b ? k = new mxPoint(a.view.getRoutingCenterX(b), a.view.getRoutingCenterY(b)) : null != k && (k = k.clone());
+      var l = f.length - 1;
+      if (null != d && 0 < d.length) {
+        for (var h = a.view.transformControlPoint(a, d[0]), m = b, n = f[0], p = !1, q = !1, p = h, s = d.length, r =
+            0; 2 > r; r++) {
+          var t = null != n && n.x == p.x,
+            v = null != n && n.y == p.y,
+            w = null != m && p.y >= m.y && p.y <= m.y + m.height,
+            m = null != m && p.x >= m.x && p.x <= m.x + m.width,
+            p = v || null == n && w,
+            q = t || null == n && m;
+          if (null != n && !v && !t && (w || m)) {
+            g = w ? !1 : !0;
+            break
+          }
+          if (q || p) {
+            g = p;
+            1 == r && (g = 0 == d.length % 2 ? p : q);
+            break
+          }
+          m = c;
+          n = f[l];
+          p = a.view.transformControlPoint(a, d[s - 1])
+        }
+        g && (null != f[0] && f[0].y != h.y || null == f[0] && null != b && (h.y < b.y || h.y > b.y + b.height)) ? e.push(new mxPoint(k.x, h.y)) : !g && (null != f[0] && f[0].x != h.x || null == f[
+          0] && null != b && (h.x < b.x || h.x > b.x + b.width)) && e.push(new mxPoint(h.x,
+          k.y));
+        g ? k.y = h.y : k.x = h.x;
+        for (r = 0; r < d.length; r++) g = !g, h = a.view.transformControlPoint(a, d[r]), g ? k.y = h.y : k.x = h.x, e.push(k.clone())
+      } else h = k, g = !0;
+      k = f[l];
+      null == k && null != c && (k = new mxPoint(a.view.getRoutingCenterX(c), a.view.getRoutingCenterY(c)));
+      g && (null != f[l] && f[l].y != h.y || null == f[l] && null != c && (h.y < c.y || h.y > c.y + c.height)) ? e.push(new mxPoint(k.x, h.y)) : !g && (null != f[l] && f[l].x != h.x || null == f[l] &&
+        null != c && (h.x < c.x || h.x > c.x + c.width)) && e.push(new mxPoint(h.x, k.y));
+      if (null == f[0] && null != b)
+        for (; 1 < e.length && mxUtils.contains(b,
+            e[1].x, e[1].y);) e = e.splice(1, 1);
+      if (null == f[l] && null != c)
+        for (; 1 < e.length && mxUtils.contains(c, e[e.length - 1].x, e[e.length - 1].y);) e = e.splice(e.length - 1, 1)
+    },
+    orthBuffer: 10,
+    dirVectors: [
+      [-1, 0],
+      [0, -1],
+      [1, 0],
+      [0, 1],
+      [-1, 0],
+      [0, -1],
+      [1, 0]
+    ],
+    wayPoints1: [
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0],
+      [0, 0]
+    ],
+    routePatterns: [
+      [
+        [513, 2308, 2081, 2562],
+        [513, 1090, 514, 2184, 2114, 2561],
+        [513, 1090, 514, 2564, 2184, 2562],
+        [513, 2308, 2561, 1090, 514, 2568, 2308]
+      ],
+      [
+        [514, 1057, 513, 2308, 2081, 2562],
+        [514, 2184, 2114, 2561],
+        [514, 2184,
+          2562, 1057, 513, 2564, 2184
+        ],
+        [514, 1057, 513, 2568, 2308, 2561]
+      ],
+      [
+        [1090, 514, 1057, 513, 2308, 2081, 2562],
+        [2114, 2561],
+        [1090, 2562, 1057, 513, 2564, 2184],
+        [1090, 514, 1057, 513, 2308, 2561, 2568]
+      ],
+      [
+        [2081, 2562],
+        [1057, 513, 1090, 514, 2184, 2114, 2561],
+        [1057, 513, 1090, 514, 2184, 2562, 2564],
+        [1057, 2561, 1090, 514, 2568, 2308]
+      ]
+    ],
+    inlineRoutePatterns: [
+      [null, [2114, 2568], null, null],
+      [null, [514, 2081, 2114, 2568], null, null],
+      [null, [2114, 2561], null, null],
+      [
+        [2081, 2562],
+        [1057, 2114, 2568],
+        [2184, 2562], null
+      ]
+    ],
+    vertexSeperations: [],
+    limits: [
+      [0, 0, 0, 0, 0, 0, 0, 0, 0],
+      [0, 0, 0, 0, 0, 0, 0, 0, 0]
+    ],
+    LEFT_MASK: 32,
+    TOP_MASK: 64,
+    RIGHT_MASK: 128,
+    BOTTOM_MASK: 256,
+    LEFT: 1,
+    TOP: 2,
+    RIGHT: 4,
+    BOTTOM: 8,
+    SIDE_MASK: 480,
+    CENTER_MASK: 512,
+    SOURCE_MASK: 1024,
+    TARGET_MASK: 2048,
+    VERTEX_MASK: 3072,
+    OrthConnector: function(a, b, c, d, e) {
+      var f = a.view.graph,
+        g = null == b ? !1 : f.getModel().isEdge(b.cell),
+        f = null == c ? !1 : f.getModel().isEdge(c.cell);
+      if (null != d && 0 < d.length || g || f) mxEdgeStyle.SegmentConnector(a, b, c, d, e);
+      else {
+        d = a.absolutePoints;
+        var h = d[0],
+          k = d[d.length - 1];
+        d = null != b ? b.x : h.x;
+        var g = null != b ? b.y : h.y,
+          l = null != b ? b.width :
+          1,
+          m = null != b ? b.height : 1,
+          n = null != c ? c.x : k.x,
+          p = null != c ? c.y : k.y,
+          q = null != c ? c.width : 1,
+          s = null != c ? c.height : 1,
+          f = a.view.scale * mxEdgeStyle.orthBuffer,
+          r = [mxConstants.DIRECTION_MASK_ALL, mxConstants.DIRECTION_MASK_ALL];
+        null != b && (r[0] = mxUtils.getPortConstraints(b, a, !0, mxConstants.DIRECTION_MASK_ALL));
+        null != c && (r[1] = mxUtils.getPortConstraints(c, a, !1, mxConstants.DIRECTION_MASK_ALL));
+        a = [0, 0];
+        d = [
+          [d, g, l, m],
+          [n, p, q, s]
+        ];
+        for (l = 0; 2 > l; l++) mxEdgeStyle.limits[l][1] = d[l][0] - f, mxEdgeStyle.limits[l][2] = d[l][1] - f, mxEdgeStyle.limits[l][4] =
+          d[l][0] + d[l][2] + f, mxEdgeStyle.limits[l][8] = d[l][1] + d[l][3] + f;
+        l = d[0][0] + d[0][2] / 2 - (d[1][0] + d[1][2] / 2);
+        m = d[0][1] + d[0][3] / 2 - (d[1][1] + d[1][3] / 2);
+        g = 0;
+        0 > l ? g = 0 > m ? 2 : 1 : 0 >= m && (g = 3, 0 == l && (g = 2));
+        m = null;
+        null != b && (m = h);
+        b = [
+          [0.5, 0.5],
+          [0.5, 0.5]
+        ];
+        for (l = 0; 2 > l; l++) null != m && (b[l][0] = (m.x - d[l][0]) / d[l][2], 0.01 > b[l][0] ? a[l] = mxConstants.DIRECTION_MASK_WEST : 0.99 < b[l][0] && (a[l] = mxConstants.DIRECTION_MASK_EAST),
+            b[l][1] = (m.y - d[l][1]) / d[l][3], 0.01 > b[l][1] ? a[l] = mxConstants.DIRECTION_MASK_NORTH : 0.99 < b[l][1] && (a[l] = mxConstants.DIRECTION_MASK_SOUTH)),
+          m = null, null != c && (m = k);
+        l = d[0][1] - (d[1][1] + d[1][3]);
+        m = d[0][0] - (d[1][0] + d[1][2]);
+        n = d[1][1] - (d[0][1] + d[0][3]);
+        p = d[1][0] - (d[0][0] + d[0][2]);
+        mxEdgeStyle.vertexSeperations[1] = Math.max(m - 2 * f, 0);
+        mxEdgeStyle.vertexSeperations[2] = Math.max(l - 2 * f, 0);
+        mxEdgeStyle.vertexSeperations[4] = Math.max(n - 2 * f, 0);
+        mxEdgeStyle.vertexSeperations[3] = Math.max(p - 2 * f, 0);
+        c = [];
+        h = [];
+        k = [];
+        h[0] = m >= p ? mxConstants.DIRECTION_MASK_WEST : mxConstants.DIRECTION_MASK_EAST;
+        k[0] = l >= n ? mxConstants.DIRECTION_MASK_NORTH : mxConstants.DIRECTION_MASK_SOUTH;
+        h[1] = mxUtils.reversePortConstraints(h[0]);
+        k[1] = mxUtils.reversePortConstraints(k[0]);
+        m = m >= p ? m : p;
+        n = l >= n ? l : n;
+        p = [
+          [0, 0],
+          [0, 0]
+        ];
+        q = !1;
+        for (l = 0; 2 > l; l++) 0 == a[l] && (0 == (h[l] & r[l]) && (h[l] = mxUtils.reversePortConstraints(h[l])), 0 == (k[l] & r[l]) && (k[l] = mxUtils.reversePortConstraints(k[l])), p[l][0] = k[l],
+          p[l][1] = h[l]);
+        n > 2 * f && m > 2 * f && (0 < (h[0] & r[0]) && 0 < (k[1] & r[1]) ? (p[0][0] = h[0], p[0][1] = k[0], p[1][0] = k[1], p[1][1] = h[1], q = !0) : 0 < (k[0] & r[0]) && 0 < (h[1] & r[1]) && (p[0]
+          [0] = k[0], p[0][1] = h[0], p[1][0] = h[1], p[1][1] = k[1], q = !0));
+        n > 2 * f && !q &&
+          (p[0][0] = k[0], p[0][1] = h[0], p[1][0] = k[1], p[1][1] = h[1], q = !0);
+        m > 2 * f && !q && (p[0][0] = h[0], p[0][1] = k[0], p[1][0] = h[1], p[1][1] = k[1]);
+        for (l = 0; 2 > l; l++)
+          if (0 == a[l] && (0 == (p[l][0] & r[l]) && (p[l][0] = p[l][1]), c[l] = p[l][0] & r[l], c[l] |= (p[l][1] & r[l]) << 8, c[l] |= (p[1 - l][l] & r[l]) << 16, c[l] |= (p[1 - l][1 - l] & r[l]) <<
+              24, 0 == (c[l] & 15) && (c[l] <<= 8), 0 == (c[l] & 3840) && (c[l] = c[l] & 15 | c[l] >> 8), 0 == (c[l] & 983040) && (c[l] = c[l] & 65535 | (c[l] & 251658240) >> 8), a[l] = c[l] & 15,
+              r[l] == mxConstants.DIRECTION_MASK_WEST || r[l] == mxConstants.DIRECTION_MASK_NORTH || r[l] ==
+              mxConstants.DIRECTION_MASK_EAST || r[l] == mxConstants.DIRECTION_MASK_SOUTH)) a[l] = r[l];
+        l = a[0] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[0];
+        r = a[1] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[1];
+        l -= g;
+        r -= g;
+        1 > l && (l += 4);
+        1 > r && (r += 4);
+        r = mxEdgeStyle.routePatterns[l - 1][r - 1];
+        mxEdgeStyle.wayPoints1[0][0] = d[0][0];
+        mxEdgeStyle.wayPoints1[0][1] = d[0][1];
+        switch (a[0]) {
+          case mxConstants.DIRECTION_MASK_WEST:
+            mxEdgeStyle.wayPoints1[0][0] -= f;
+            mxEdgeStyle.wayPoints1[0][1] += b[0][1] * d[0][3];
+            break;
+          case mxConstants.DIRECTION_MASK_SOUTH:
+            mxEdgeStyle.wayPoints1[0][0] +=
+              b[0][0] * d[0][2];
+            mxEdgeStyle.wayPoints1[0][1] += d[0][3] + f;
+            break;
+          case mxConstants.DIRECTION_MASK_EAST:
+            mxEdgeStyle.wayPoints1[0][0] += d[0][2] + f;
+            mxEdgeStyle.wayPoints1[0][1] += b[0][1] * d[0][3];
+            break;
+          case mxConstants.DIRECTION_MASK_NORTH:
+            mxEdgeStyle.wayPoints1[0][0] += b[0][0] * d[0][2], mxEdgeStyle.wayPoints1[0][1] -= f
+        }
+        f = 0;
+        h = c = 0 < (a[0] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) ? 0 : 1;
+        for (l = k = 0; l < r.length; l++) {
+          k = r[l] & 15;
+          s = k == mxConstants.DIRECTION_MASK_EAST ? 3 : k;
+          s += g;
+          4 < s && (s -= 4);
+          m = mxEdgeStyle.dirVectors[s -
+            1];
+          k = 0 < s % 2 ? 0 : 1;
+          k != c && (f++, mxEdgeStyle.wayPoints1[f][0] = mxEdgeStyle.wayPoints1[f - 1][0], mxEdgeStyle.wayPoints1[f][1] = mxEdgeStyle.wayPoints1[f - 1][1]);
+          var t = 0 < (r[l] & mxEdgeStyle.TARGET_MASK),
+            q = 0 < (r[l] & mxEdgeStyle.SOURCE_MASK),
+            n = (r[l] & mxEdgeStyle.SIDE_MASK) >> 5,
+            n = n << g;
+          15 < n && (n >>= 4);
+          p = 0 < (r[l] & mxEdgeStyle.CENTER_MASK);
+          (q || t) && 9 > n ? (s = 0, q = q ? 0 : 1, s = p && 0 == k ? d[q][0] + b[q][0] * d[q][2] : p ? d[q][1] + b[q][1] * d[q][3] : mxEdgeStyle.limits[q][n], 0 == k ? (n = (s - mxEdgeStyle.wayPoints1[
+            f][0]) * m[0], 0 < n && (mxEdgeStyle.wayPoints1[f][0] +=
+            m[0] * n)) : (n = (s - mxEdgeStyle.wayPoints1[f][1]) * m[1], 0 < n && (mxEdgeStyle.wayPoints1[f][1] += m[1] * n))) : p && (mxEdgeStyle.wayPoints1[f][0] += m[0] * Math.abs(mxEdgeStyle.vertexSeperations[
+            s] / 2), mxEdgeStyle.wayPoints1[f][1] += m[1] * Math.abs(mxEdgeStyle.vertexSeperations[s] / 2));
+          0 < f && mxEdgeStyle.wayPoints1[f][k] == mxEdgeStyle.wayPoints1[f - 1][k] ? f-- : c = k
+        }
+        for (l = 0; l <= f && !(l == f && ((0 < (a[1] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) ? 0 : 1) == h ? 0 : 1) != (f + 1) % 2); l++) e.push(new mxPoint(
+          mxEdgeStyle.wayPoints1[l][0],
+          mxEdgeStyle.wayPoints1[l][1]))
+      }
+    },
+    getRoutePattern: function(a, b, c, d) {
+      var e = a[0] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[0];
+      a = a[1] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[1];
+      e -= b;
+      a -= b;
+      1 > e && (e += 4);
+      1 > a && (a += 4);
+      b = routePatterns[e - 1][a - 1];
+      if (0 == c || 0 == d) null != inlineRoutePatterns[e - 1][a - 1] && (b = inlineRoutePatterns[e - 1][a - 1]);
+      return b
+    }
+  },
+  mxStyleRegistry = {
+    values: [],
+    putValue: function(a, b) {
+      mxStyleRegistry.values[a] = b
+    },
+    getValue: function(a) {
+      return mxStyleRegistry.values[a]
+    },
+    getName: function(a) {
+      for (var b in mxStyleRegistry.values)
+        if (mxStyleRegistry.values[b] ==
+          a) return b;
+      return null
+    }
+  };
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW, mxEdgeStyle.ElbowConnector);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION, mxEdgeStyle.EntityRelation);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP, mxEdgeStyle.Loop);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE, mxEdgeStyle.SideToSide);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM, mxEdgeStyle.TopToBottom);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL, mxEdgeStyle.OrthConnector);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT, mxEdgeStyle.SegmentConnector);
+mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE, mxPerimeter.EllipsePerimeter);
+mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE, mxPerimeter.RectanglePerimeter);
+mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS, mxPerimeter.RhombusPerimeter);
+mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE, mxPerimeter.TrianglePerimeter);
+
+function mxGraphView(a) {
+  this.graph = a;
+  this.translate = new mxPoint;
+  this.graphBounds = new mxRectangle;
+  this.states = new mxDictionary
+}
+mxGraphView.prototype = new mxEventSource;
+mxGraphView.prototype.constructor = mxGraphView;
+mxGraphView.prototype.EMPTY_POINT = new mxPoint;
+mxGraphView.prototype.doneResource = "none" != mxClient.language ? "done" : "";
+mxGraphView.prototype.updatingDocumentResource = "none" != mxClient.language ? "updatingDocument" : "";
+mxGraphView.prototype.allowEval = !1;
+mxGraphView.prototype.captureDocumentGesture = !0;
+mxGraphView.prototype.optimizeVmlReflows = !0;
+mxGraphView.prototype.rendering = !0;
+mxGraphView.prototype.graph = null;
+mxGraphView.prototype.currentRoot = null;
+mxGraphView.prototype.graphBounds = null;
+mxGraphView.prototype.scale = 1;
+mxGraphView.prototype.translate = null;
+mxGraphView.prototype.updateStyle = !1;
+mxGraphView.prototype.getGraphBounds = function() {
+  return this.graphBounds
+};
+mxGraphView.prototype.setGraphBounds = function(a) {
+  this.graphBounds = a
+};
+mxGraphView.prototype.getBounds = function(a) {
+  var b = null;
+  if (null != a && 0 < a.length)
+    for (var c = this.graph.getModel(), d = 0; d < a.length; d++)
+      if (c.isVertex(a[d]) || c.isEdge(a[d])) {
+        var e = this.getState(a[d]);
+        null != e && (null == b ? b = new mxRectangle(e.x, e.y, e.width, e.height) : b.add(e))
+      }
+  return b
+};
+mxGraphView.prototype.setCurrentRoot = function(a) {
+  if (this.currentRoot != a) {
+    var b = new mxCurrentRootChange(this, a);
+    b.execute();
+    var c = new mxUndoableEdit(this, !1);
+    c.add(b);
+    this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", c));
+    this.graph.sizeDidChange()
+  }
+  return a
+};
+mxGraphView.prototype.scaleAndTranslate = function(a, b, c) {
+  var d = this.scale,
+    e = new mxPoint(this.translate.x, this.translate.y);
+  if (this.scale != a || this.translate.x != b || this.translate.y != c) this.scale = a, this.translate.x = b, this.translate.y = c, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange());
+  this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE, "scale", a, "previousScale", d, "translate", this.translate, "previousTranslate", e))
+};
+mxGraphView.prototype.getScale = function() {
+  return this.scale
+};
+mxGraphView.prototype.setScale = function(a) {
+  var b = this.scale;
+  this.scale != a && (this.scale = a, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange()));
+  this.fireEvent(new mxEventObject(mxEvent.SCALE, "scale", a, "previousScale", b))
+};
+mxGraphView.prototype.getTranslate = function() {
+  return this.translate
+};
+mxGraphView.prototype.setTranslate = function(a, b) {
+  var c = new mxPoint(this.translate.x, this.translate.y);
+  if (this.translate.x != a || this.translate.y != b) this.translate.x = a, this.translate.y = b, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange());
+  this.fireEvent(new mxEventObject(mxEvent.TRANSLATE, "translate", this.translate, "previousTranslate", c))
+};
+mxGraphView.prototype.refresh = function() {
+  null != this.currentRoot && this.clear();
+  this.revalidate()
+};
+mxGraphView.prototype.revalidate = function() {
+  this.invalidate();
+  this.validate()
+};
+mxGraphView.prototype.clear = function(a, b, c) {
+  var d = this.graph.getModel();
+  a = a || d.getRoot();
+  b = null != b ? b : !1;
+  c = null != c ? c : !0;
+  this.removeState(a);
+  if (c && (b || a != this.currentRoot)) {
+    c = d.getChildCount(a);
+    for (var e = 0; e < c; e++) this.clear(d.getChildAt(a, e), b)
+  } else this.invalidate(a)
+};
+mxGraphView.prototype.invalidate = function(a, b, c, d) {
+  var e = this.graph.getModel();
+  a = a || e.getRoot();
+  b = null != b ? b : !0;
+  c = null != c ? c : !0;
+  d = null != d ? d : !1;
+  var f = this.getState(a);
+  null != f && (f.invalid = !0, d && (f.orderChanged = !0));
+  if (b)
+    for (var g = e.getChildCount(a), f = 0; f < g; f++) {
+      var h = e.getChildAt(a, f);
+      this.invalidate(h, b, c, d)
+    }
+  if (c) {
+    d = e.getEdgeCount(a);
+    for (f = 0; f < d; f++) this.invalidate(e.getEdgeAt(a, f), b, c)
+  }
+};
+mxGraphView.prototype.validate = function(a) {
+  var b = mxLog.enter("mxGraphView.validate");
+  window.status = mxResources.get(this.updatingDocumentResource) || this.updatingDocumentResource;
+  var c = null;
+  if (this.optimizeVmlReflows && null != this.canvas && null == this.textDiv && (8 == document.documentMode || mxClient.IS_QUIRKS)) {
+    c = this.canvas.style.display;
+    this.canvas.style.display = "none";
+    var d = document.createElement("div");
+    d.style.position = "absolute";
+    d.style.whiteSpace = "nowrap";
+    d.style.visibility = "hidden";
+    d.style.display = mxClient.IS_QUIRKS ?
+      "inline" : "inline-block";
+    d.style.zoom = "1";
+    document.body.appendChild(d);
+    this.textDiv = d
+  }
+  a = a || (null != this.currentRoot ? this.currentRoot : this.graph.getModel().getRoot());
+  this.validateBounds(null, a);
+  a = this.validatePoints(null, a);
+  null == a && (a = new mxRectangle);
+  this.setGraphBounds(a);
+  this.validateBackground();
+  null != c && (this.canvas.style.display = c, document.body.removeChild(this.textDiv), this.textDiv = null);
+  window.status = mxResources.get(this.doneResource) || this.doneResource;
+  mxLog.leave("mxGraphView.validate", b)
+};
+mxGraphView.prototype.createBackgroundPageShape = function(a) {
+  return new mxRectangleShape(a, "white", "black")
+};
+mxGraphView.prototype.validateBackground = function() {
+  var a = this.graph.getBackgroundImage();
+  if (null != a) {
+    if (null == this.backgroundImage || this.backgroundImage.image != a.src) {
+      null != this.backgroundImage && this.backgroundImage.destroy();
+      var b = new mxRectangle(0, 0, 1, 1);
+      this.backgroundImage = new mxImageShape(b, a.src);
+      this.backgroundImage.dialect = this.graph.dialect;
+      this.backgroundImage.init(this.backgroundPane);
+      this.backgroundImage.redraw()
+    }
+    this.redrawBackgroundImage(this.backgroundImage, a)
+  } else null != this.backgroundImage &&
+    (this.backgroundImage.destroy(), this.backgroundImage = null);
+  this.graph.pageVisible ? (b = this.getBackgroundPageBounds(), null == this.backgroundPageShape ? (this.backgroundPageShape = this.createBackgroundPageShape(b), this.backgroundPageShape.scale =
+    this.scale, this.backgroundPageShape.isShadow = !0, this.backgroundPageShape.dialect = this.graph.dialect, this.backgroundPageShape.init(this.backgroundPane), this.backgroundPageShape.redraw(),
+    mxEvent.addListener(this.backgroundPageShape.node, "dblclick", mxUtils.bind(this,
+      function(a) {
+        this.graph.dblClick(a)
+      })), mxEvent.addGestureListeners(this.backgroundPageShape.node, mxUtils.bind(this, function(a) {
+      this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a))
+    }), mxUtils.bind(this, function(a) {
+      null != this.graph.tooltipHandler && this.graph.tooltipHandler.isHideOnHover() && this.graph.tooltipHandler.hide();
+      this.graph.isMouseDown && !mxEvent.isConsumed(a) && this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a))
+    }), mxUtils.bind(this, function(a) {
+      this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+        new mxMouseEvent(a))
+    }))) : (this.backgroundPageShape.scale = this.scale, this.backgroundPageShape.bounds = b, this.backgroundPageShape.redraw())) : null != this.backgroundPageShape && (this.backgroundPageShape.destroy(),
+    this.backgroundPageShape = null)
+};
+mxGraphView.prototype.getBackgroundPageBounds = function() {
+  var a = this.graph.pageFormat,
+    b = this.scale * this.graph.pageScale;
+  return new mxRectangle(this.scale * this.translate.x, this.scale * this.translate.y, a.width * b, a.height * b)
+};
+mxGraphView.prototype.redrawBackgroundImage = function(a, b) {
+  a.scale = this.scale;
+  a.bounds.x = this.scale * this.translate.x;
+  a.bounds.y = this.scale * this.translate.y;
+  a.bounds.width = this.scale * b.width;
+  a.bounds.height = this.scale * b.height;
+  a.redraw()
+};
+mxGraphView.prototype.validateBounds = function(a, b) {
+  var c = this.graph.getModel(),
+    d = this.getState(b, !0);
+  if (null != d && d.invalid) {
+    if (this.graph.isCellVisible(b)) {
+      if (b != this.currentRoot && null != a) {
+        d.absoluteOffset.x = 0;
+        d.absoluteOffset.y = 0;
+        d.origin.x = a.origin.x;
+        d.origin.y = a.origin.y;
+        var e = this.graph.getCellGeometry(b);
+        if (null != e) {
+          if (!c.isEdge(b)) {
+            var f = e.offset || this.EMPTY_POINT;
+            e.relative ? (d.origin.x += e.x * a.width / this.scale + f.x, d.origin.y += e.y * a.height / this.scale + f.y) : (d.absoluteOffset.x = this.scale * f.x, d.absoluteOffset.y =
+              this.scale * f.y, d.origin.x += e.x, d.origin.y += e.y)
+          }
+          d.x = this.scale * (this.translate.x + d.origin.x);
+          d.y = this.scale * (this.translate.y + d.origin.y);
+          d.width = this.scale * e.width;
+          d.height = this.scale * e.height;
+          if (c.isVertex(b)) {
+            if (e.relative && (f = mxUtils.toRadians(a.style[mxConstants.STYLE_ROTATION] || "0"), 0 != f)) {
+              var e = Math.cos(f),
+                f = Math.sin(f),
+                g = new mxPoint(d.getCenterX(), d.getCenterY()),
+                h = new mxPoint(a.getCenterX(), a.getCenterY()),
+                e = mxUtils.getRotatedPoint(g, e, f, h);
+              d.x = e.x - d.width / 2;
+              d.y = e.y - d.height / 2
+            }
+            this.updateVertexLabelOffset(d)
+          }
+        }
+      }
+    } else this.removeState(b);
+    f = this.graph.getChildOffsetForCell(b);
+    null != f && (d.origin.x += f.x, d.origin.y += f.y)
+  }
+  if (null != d && (!this.graph.isCellCollapsed(b) || b == this.currentRoot)) {
+    e = c.getChildCount(b);
+    for (f = 0; f < e; f++) g = c.getChildAt(b, f), this.validateBounds(d, g)
+  }
+};
+mxGraphView.prototype.updateVertexLabelOffset = function(a) {
+  var b = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);
+  b == mxConstants.ALIGN_LEFT ? a.absoluteOffset.x -= a.width : b == mxConstants.ALIGN_RIGHT && (a.absoluteOffset.x += a.width);
+  b = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);
+  b == mxConstants.ALIGN_TOP ? a.absoluteOffset.y -= a.height : b == mxConstants.ALIGN_BOTTOM && (a.absoluteOffset.y += a.height)
+};
+mxGraphView.prototype.validatePoints = function(a, b) {
+  var c = this.graph.getModel(),
+    d = this.getState(b),
+    e = null;
+  if (null != d) {
+    if (d.invalid) {
+      var f = this.graph.getCellGeometry(b);
+      if (null != f && c.isEdge(b)) {
+        var g = this.getState(this.getVisibleTerminal(b, !0));
+        d.setVisibleTerminalState(g, !0);
+        if (null != g && c.isEdge(g.cell) && !c.isAncestor(g.cell, b)) {
+          var h = this.getState(c.getParent(g.cell));
+          this.validatePoints(h, g.cell)
+        }
+        var k = this.getState(this.getVisibleTerminal(b, !1));
+        d.setVisibleTerminalState(k, !1);
+        null != k && (c.isEdge(k.cell) &&
+          !c.isAncestor(k.cell, b)) && (h = this.getState(c.getParent(k.cell)), this.validatePoints(h, k.cell));
+        this.updateFixedTerminalPoints(d, g, k);
+        this.updatePoints(d, f.points, g, k);
+        this.updateFloatingTerminalPoints(d, g, k);
+        this.updateEdgeBounds(d);
+        this.updateEdgeLabelOffset(d)
+      } else null != f && (f.relative && null != a && c.isEdge(a.cell)) && (f = this.getPoint(a, f), null != f && (d.x = f.x, d.y = f.y, f.x = f.x / this.scale - this.translate.x, f.y = f.y / this.scale -
+        this.translate.y, d.origin = f, this.childMoved(a, d)));
+      d.invalid = !1;
+      b != this.currentRoot &&
+        this.graph.cellRenderer.redraw(d, !1, this.isRendering())
+    }
+    if (c.isEdge(b) || c.isVertex(b)) null != d.shape && null != d.shape.boundingBox && (e = d.shape.boundingBox.clone()), null != d.text && !this.graph.isLabelClipped(d.cell) && null != d.text.boundingBox &&
+      (null != e ? e.add(d.text.boundingBox) : e = d.text.boundingBox.clone())
+  }
+  if (null != d && (!this.graph.isCellCollapsed(b) || b == this.currentRoot)) {
+    f = c.getChildCount(b);
+    for (g = 0; g < f; g++) h = c.getChildAt(b, g), h = this.validatePoints(d, h), null != h && (null == e ? e = h : e.add(h))
+  }
+  return e
+};
+mxGraphView.prototype.childMoved = function(a, b) {
+  var c = b.cell;
+  if (!this.graph.isCellCollapsed(c) || c == this.currentRoot)
+    for (var d = this.graph.getModel(), e = d.getChildCount(c), f = 0; f < e; f++) this.validateBounds(b, d.getChildAt(c, f))
+};
+mxGraphView.prototype.updateFixedTerminalPoints = function(a, b, c) {
+  this.updateFixedTerminalPoint(a, b, !0, this.graph.getConnectionConstraint(a, b, !0));
+  this.updateFixedTerminalPoint(a, c, !1, this.graph.getConnectionConstraint(a, c, !1))
+};
+mxGraphView.prototype.updateFixedTerminalPoint = function(a, b, c, d) {
+  var e = null;
+  null != d && (e = this.graph.getConnectionPoint(b, d));
+  if (null == e && null == b) {
+    b = this.scale;
+    d = this.translate;
+    var f = a.origin,
+      e = this.graph.getCellGeometry(a.cell).getTerminalPoint(c);
+    null != e && (e = new mxPoint(b * (d.x + e.x + f.x), b * (d.y + e.y + f.y)))
+  }
+  a.setAbsoluteTerminalPoint(e, c)
+};
+mxGraphView.prototype.updatePoints = function(a, b, c, d) {
+  if (null != a) {
+    var e = [];
+    e.push(a.absolutePoints[0]);
+    var f = this.getEdgeStyle(a, b, c, d);
+    if (null != f) c = this.getTerminalPort(a, c, !0), d = this.getTerminalPort(a, d, !1), f(a, c, d, b, e);
+    else if (null != b)
+      for (f = 0; f < b.length; f++) null != b[f] && (d = mxUtils.clone(b[f]), e.push(this.transformControlPoint(a, d)));
+    b = a.absolutePoints;
+    e.push(b[b.length - 1]);
+    a.absolutePoints = e
+  }
+};
+mxGraphView.prototype.transformControlPoint = function(a, b) {
+  var c = a.origin;
+  return new mxPoint(this.scale * (b.x + this.translate.x + c.x), this.scale * (b.y + this.translate.y + c.y))
+};
+mxGraphView.prototype.getEdgeStyle = function(a, b, c, d) {
+  a = null != c && c == d ? mxUtils.getValue(a.style, mxConstants.STYLE_LOOP, this.graph.defaultLoopStyle) : !mxUtils.getValue(a.style, mxConstants.STYLE_NOEDGESTYLE, !1) ? a.style[mxConstants.STYLE_EDGE] :
+    null;
+  "string" == typeof a && (b = mxStyleRegistry.getValue(a), null == b && this.isAllowEval() && (b = mxUtils.eval(a)), a = b);
+  return "function" == typeof a ? a : null
+};
+mxGraphView.prototype.updateFloatingTerminalPoints = function(a, b, c) {
+  var d = a.absolutePoints,
+    e = d[0];
+  null == d[d.length - 1] && null != c && this.updateFloatingTerminalPoint(a, c, b, !1);
+  null == e && null != b && this.updateFloatingTerminalPoint(a, b, c, !0)
+};
+mxGraphView.prototype.updateFloatingTerminalPoint = function(a, b, c, d) {
+  b = this.getTerminalPort(a, b, d);
+  var e = this.getNextPoint(a, c, d),
+    f = this.graph.isOrthogonal(a);
+  c = mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION] || "0"));
+  var g = new mxPoint(b.getCenterX(), b.getCenterY());
+  if (0 != c) var h = Math.cos(-c),
+    k = Math.sin(-c),
+    e = mxUtils.getRotatedPoint(e, h, k, g);
+  h = parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING] || 0);
+  h += parseFloat(a.style[d ? mxConstants.STYLE_SOURCE_PERIMETER_SPACING : mxConstants.STYLE_TARGET_PERIMETER_SPACING] ||
+    0);
+  b = this.getPerimeterPoint(b, e, 0 == c && f, h);
+  0 != c && (h = Math.cos(c), k = Math.sin(c), b = mxUtils.getRotatedPoint(b, h, k, g));
+  a.setAbsoluteTerminalPoint(b, d)
+};
+mxGraphView.prototype.getTerminalPort = function(a, b, c) {
+  a = mxUtils.getValue(a.style, c ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT);
+  null != a && (a = this.getState(this.graph.getModel().getCell(a)), null != a && (b = a));
+  return b
+};
+mxGraphView.prototype.getPerimeterPoint = function(a, b, c, d) {
+  var e = null;
+  if (null != a) {
+    var f = this.getPerimeterFunction(a);
+    if (null != f && null != b && (d = this.getPerimeterBounds(a, d), 0 < d.width || 0 < d.height)) e = f(d, a, b, c);
+    null == e && (e = this.getPoint(a))
+  }
+  return e
+};
+mxGraphView.prototype.getRoutingCenterX = function(a) {
+  var b = null != a.style ? parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X]) || 0 : 0;
+  return a.getCenterX() + b * a.width
+};
+mxGraphView.prototype.getRoutingCenterY = function(a) {
+  var b = null != a.style ? parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y]) || 0 : 0;
+  return a.getCenterY() + b * a.height
+};
+mxGraphView.prototype.getPerimeterBounds = function(a, b) {
+  b = null != b ? b : 0;
+  null != a && (b += parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING] || 0));
+  return a.getPerimeterBounds(b * this.scale)
+};
+mxGraphView.prototype.getPerimeterFunction = function(a) {
+  a = a.style[mxConstants.STYLE_PERIMETER];
+  if ("string" == typeof a) {
+    var b = mxStyleRegistry.getValue(a);
+    null == b && this.isAllowEval() && (b = mxUtils.eval(a));
+    a = b
+  }
+  return "function" == typeof a ? a : null
+};
+mxGraphView.prototype.getNextPoint = function(a, b, c) {
+  a = a.absolutePoints;
+  var d = null;
+  if (null != a && (c || 2 < a.length || null == b)) d = a.length, d = a[c ? Math.min(1, d - 1) : Math.max(0, d - 2)];
+  null == d && null != b && (d = new mxPoint(b.getCenterX(), b.getCenterY()));
+  return d
+};
+mxGraphView.prototype.getVisibleTerminal = function(a, b) {
+  for (var c = this.graph.getModel(), d = c.getTerminal(a, b), e = d; null != d && d != this.currentRoot;) {
+    if (!this.graph.isCellVisible(e) || this.graph.isCellCollapsed(d)) e = d;
+    d = c.getParent(d)
+  }
+  c.getParent(e) == c.getRoot() && (e = null);
+  return e
+};
+mxGraphView.prototype.updateEdgeBounds = function(a) {
+  var b = a.absolutePoints;
+  a.length = 0;
+  if (null != b && 0 < b.length) {
+    var c = b[0],
+      d = b[b.length - 1];
+    if (null == c || null == d) a.cell != this.currentRoot && this.clear(a.cell, !0);
+    else {
+      if (c.x != d.x || c.y != d.y) {
+        var e = d.x - c.x,
+          f = d.y - c.y;
+        a.terminalDistance = Math.sqrt(e * e + f * f)
+      } else a.terminalDistance = 0;
+      var d = 0,
+        g = [],
+        f = c;
+      if (null != f) {
+        for (var c = f.x, h = f.y, k = c, l = h, m = 1; m < b.length; m++) {
+          var n = b[m];
+          null != n && (e = f.x - n.x, f = f.y - n.y, e = Math.sqrt(e * e + f * f), g.push(e), d += e, f = n, c = Math.min(f.x, c), h = Math.min(f.y,
+            h), k = Math.max(f.x, k), l = Math.max(f.y, l))
+        }
+        a.length = d;
+        a.segments = g;
+        a.x = c;
+        a.y = h;
+        a.width = Math.max(1, k - c);
+        a.height = Math.max(1, l - h)
+      }
+    }
+  }
+};
+mxGraphView.prototype.getPoint = function(a, b) {
+  var c = a.getCenterX(),
+    d = a.getCenterY();
+  if (null != a.segments && (null == b || b.relative)) {
+    for (var e = a.absolutePoints.length, f = ((null != b ? b.x / 2 : 0) + 0.5) * a.length, g = a.segments[0], h = 0, k = 1; f > h + g && k < e - 1;) h += g, g = a.segments[k++];
+    e = 0 == g ? 0 : (f - h) / g;
+    f = a.absolutePoints[k - 1];
+    k = a.absolutePoints[k];
+    if (null != f && null != k) {
+      h = c = d = 0;
+      if (null != b) {
+        var d = b.y,
+          l = b.offset;
+        null != l && (c = l.x, h = l.y)
+      }
+      l = k.x - f.x;
+      k = k.y - f.y;
+      c = f.x + l * e + ((0 == g ? 0 : k / g) * d + c) * this.scale;
+      d = f.y + k * e - ((0 == g ? 0 : l / g) * d - h) * this.scale
+    }
+  } else null !=
+    b && (l = b.offset, null != l && (c += l.x, d += l.y));
+  return new mxPoint(c, d)
+};
+mxGraphView.prototype.getRelativePoint = function(a, b, c) {
+  var d = this.graph.getModel().getGeometry(a.cell);
+  if (null != d) {
+    var e = a.absolutePoints.length;
+    if (d.relative && 1 < e) {
+      for (var d = a.length, f = a.segments, g = a.absolutePoints[0], h = a.absolutePoints[1], k = mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c), l = 0, m = 0, n = 0, p = 2; p < e; p++) m += f[p -
+        2], h = a.absolutePoints[p], g = mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c), g <= k && (k = g, l = p - 1, n = m), g = h;
+      e = f[l];
+      g = a.absolutePoints[l];
+      h = a.absolutePoints[l + 1];
+      k = h.x;
+      f = h.y;
+      a = g.x - k;
+      l = g.y - f;
+      k = b - k;
+      f = c - f;
+      k = a - k;
+      f = l - f;
+      f = k * a + f * l;
+      a = Math.sqrt(0 >= f ? 0 : f * f / (a * a + l * l));
+      a > e && (a = e);
+      e = Math.sqrt(mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c)); - 1 == mxUtils.relativeCcw(g.x, g.y, h.x, h.y, b, c) && (e = -e);
+      return new mxPoint(-2 * ((d / 2 - n - a) / d), e / this.scale)
+    }
+  }
+  return new mxPoint
+};
+mxGraphView.prototype.updateEdgeLabelOffset = function(a) {
+  var b = a.absolutePoints;
+  a.absoluteOffset.x = a.getCenterX();
+  a.absoluteOffset.y = a.getCenterY();
+  if (null != b && 0 < b.length && null != a.segments) {
+    var c = this.graph.getCellGeometry(a.cell);
+    if (c.relative) {
+      var d = this.getPoint(a, c);
+      null != d && (a.absoluteOffset = d)
+    } else {
+      var d = b[0],
+        e = b[b.length - 1];
+      if (null != d && null != e) {
+        var b = e.x - d.x,
+          f = e.y - d.y,
+          g = e = 0,
+          c = c.offset;
+        null != c && (e = c.x, g = c.y);
+        c = d.y + f / 2 + g * this.scale;
+        a.absoluteOffset.x = d.x + b / 2 + e * this.scale;
+        a.absoluteOffset.y = c
+      }
+    }
+  }
+};
+mxGraphView.prototype.getState = function(a, b) {
+  b = b || !1;
+  var c = null;
+  null != a && (c = this.states.get(a), this.graph.isCellVisible(a) && (null == c && b && this.graph.isCellVisible(a) ? (c = this.createState(a), this.states.put(a, c)) : b && (null != c && this.updateStyle) &&
+    (c.style = this.graph.getCellStyle(a))));
+  return c
+};
+mxGraphView.prototype.isRendering = function() {
+  return this.rendering
+};
+mxGraphView.prototype.setRendering = function(a) {
+  this.rendering = a
+};
+mxGraphView.prototype.isAllowEval = function() {
+  return this.allowEval
+};
+mxGraphView.prototype.setAllowEval = function(a) {
+  this.allowEval = a
+};
+mxGraphView.prototype.getStates = function() {
+  return this.states
+};
+mxGraphView.prototype.setStates = function(a) {
+  this.states = a
+};
+mxGraphView.prototype.getCellStates = function(a) {
+  if (null == a) return this.states;
+  for (var b = [], c = 0; c < a.length; c++) {
+    var d = this.getState(a[c]);
+    null != d && b.push(d)
+  }
+  return b
+};
+mxGraphView.prototype.removeState = function(a) {
+  var b = null;
+  null != a && (b = this.states.remove(a), null != b && (this.graph.cellRenderer.destroy(b), b.destroy()));
+  return b
+};
+mxGraphView.prototype.createState = function(a) {
+  var b = this.graph.getCellStyle(a);
+  a = new mxCellState(this, a, b);
+  this.graph.cellRenderer.initialize(a, this.isRendering());
+  return a
+};
+mxGraphView.prototype.getCanvas = function() {
+  return this.canvas
+};
+mxGraphView.prototype.getBackgroundPane = function() {
+  return this.backgroundPane
+};
+mxGraphView.prototype.getDrawPane = function() {
+  return this.drawPane
+};
+mxGraphView.prototype.getOverlayPane = function() {
+  return this.overlayPane
+};
+mxGraphView.prototype.isContainerEvent = function(a) {
+  a = mxEvent.getSource(a);
+  return a == this.graph.container || a.parentNode == this.backgroundPane || null != a.parentNode && a.parentNode.parentNode == this.backgroundPane || a == this.canvas.parentNode || a == this.canvas ||
+    a == this.backgroundPane || a == this.drawPane || a == this.overlayPane
+};
+mxGraphView.prototype.isScrollEvent = function(a) {
+  var b = mxUtils.getOffset(this.graph.container);
+  a = new mxPoint(a.clientX - b.x, a.clientY - b.y);
+  var b = this.graph.container.offsetWidth,
+    c = this.graph.container.clientWidth;
+  if (b > c && a.x > c + 2 && a.x <= b) return !0;
+  b = this.graph.container.offsetHeight;
+  c = this.graph.container.clientHeight;
+  return b > c && a.y > c + 2 && a.y <= b ? !0 : !1
+};
+mxGraphView.prototype.init = function() {
+  this.installListeners();
+  var a = this.graph;
+  a.dialect == mxConstants.DIALECT_SVG ? this.createSvg() : a.dialect == mxConstants.DIALECT_VML ? this.createVml() : this.createHtml()
+};
+mxGraphView.prototype.installListeners = function() {
+  var a = this.graph,
+    b = a.container;
+  if (null != b) {
+    mxEvent.addGestureListeners(b, mxUtils.bind(this, function(b) {
+      mxClient.IS_TOUCH && a.isEditing() && a.stopEditing(!a.isInvokesStopCellEditing());
+      this.isContainerEvent(b) && (!mxClient.IS_IE && !mxClient.IS_GC && !mxClient.IS_OP && !mxClient.IS_SF || !this.isScrollEvent(b)) && a.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(
+        b))
+    }), mxUtils.bind(this, function(b) {
+      this.isContainerEvent(b) && a.fireMouseEvent(mxEvent.MOUSE_MOVE,
+        new mxMouseEvent(b))
+    }), mxUtils.bind(this, function(b) {
+      this.isContainerEvent(b) && a.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b))
+    }));
+    mxEvent.addListener(b, "dblclick", mxUtils.bind(this, function(b) {
+      a.dblClick(b)
+    }));
+    var c = function(c) {
+      var e = null;
+      mxClient.IS_TOUCH && (e = mxEvent.getClientX(c), c = mxEvent.getClientY(c), c = mxUtils.convertPoint(b, e, c), e = a.view.getState(a.getCellAt(c.x, c.y)));
+      return e
+    };
+    a.addMouseListener({
+      mouseDown: function(b, c) {
+        a.panningHandler.hideMenu()
+      },
+      mouseMove: function() {},
+      mouseUp: function() {}
+    });
+    this.moveHandler = mxUtils.bind(this, function(b) {
+      null != a.tooltipHandler && a.tooltipHandler.isHideOnHover() && a.tooltipHandler.hide();
+      this.captureDocumentGesture && (a.isMouseDown && !mxEvent.isConsumed(b)) && a.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, c(b)))
+    });
+    this.endHandler = mxUtils.bind(this, function(b) {
+      this.captureDocumentGesture && a.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b))
+    });
+    mxEvent.addGestureListeners(document, null, this.moveHandler, this.endHandler)
+  }
+};
+mxGraphView.prototype.createHtml = function() {
+  var a = this.graph.container;
+  null != a && (this.canvas = this.createHtmlPane("100%", "100%"), this.backgroundPane = this.createHtmlPane("1px", "1px"), this.drawPane = this.createHtmlPane("1px", "1px"), this.overlayPane =
+    this.createHtmlPane("1px", "1px"), this.canvas.appendChild(this.backgroundPane), this.canvas.appendChild(this.drawPane), this.canvas.appendChild(this.overlayPane), a.appendChild(this.canvas),
+    mxClient.IS_QUIRKS && (a = mxUtils.bind(this, function(a) {
+      a = this.getGraphBounds();
+      this.updateHtmlCanvasSize(a.x + a.width + this.graph.border, a.y + a.height + this.graph.border)
+    }), mxEvent.addListener(window, "resize", a)))
+};
+mxGraphView.prototype.updateHtmlCanvasSize = function(a, b) {
+  if (null != this.graph.container) {
+    var c = this.graph.container.offsetHeight;
+    this.canvas.style.width = this.graph.container.offsetWidth < a ? a + "px" : "100%";
+    this.canvas.style.height = c < b ? b + "px" : "100%"
+  }
+};
+mxGraphView.prototype.createHtmlPane = function(a, b) {
+  var c = document.createElement("DIV");
+  null != a && null != b ? (c.style.position = "absolute", c.style.left = "0px", c.style.top = "0px", c.style.width = a, c.style.height = b) : c.style.position = "relative";
+  return c
+};
+mxGraphView.prototype.createVml = function() {
+  var a = this.graph.container;
+  if (null != a) {
+    var b = a.offsetWidth,
+      c = a.offsetHeight;
+    this.canvas = this.createVmlPane(b, c);
+    this.backgroundPane = this.createVmlPane(b, c);
+    this.drawPane = this.createVmlPane(b, c);
+    this.overlayPane = this.createVmlPane(b, c);
+    this.canvas.appendChild(this.backgroundPane);
+    this.canvas.appendChild(this.drawPane);
+    this.canvas.appendChild(this.overlayPane);
+    a.appendChild(this.canvas)
+  }
+};
+mxGraphView.prototype.createVmlPane = function(a, b) {
+  var c = document.createElement(mxClient.VML_PREFIX + ":group");
+  c.style.position = "absolute";
+  c.style.left = "0px";
+  c.style.top = "0px";
+  c.style.width = a + "px";
+  c.style.height = b + "px";
+  c.setAttribute("coordsize", a + "," + b);
+  c.setAttribute("coordorigin", "0,0");
+  return c
+};
+mxGraphView.prototype.createSvg = function() {
+  var a = this.graph.container;
+  this.canvas = document.createElementNS(mxConstants.NS_SVG, "g");
+  this.backgroundPane = document.createElementNS(mxConstants.NS_SVG, "g");
+  this.canvas.appendChild(this.backgroundPane);
+  this.drawPane = document.createElementNS(mxConstants.NS_SVG, "g");
+  this.canvas.appendChild(this.drawPane);
+  this.overlayPane = document.createElementNS(mxConstants.NS_SVG, "g");
+  this.canvas.appendChild(this.overlayPane);
+  var b = document.createElementNS(mxConstants.NS_SVG,
+    "svg");
+  b.style.width = "100%";
+  b.style.height = "100%";
+  b.style.display = "block";
+  b.appendChild(this.canvas);
+  null != a && (a.appendChild(b), "static" == mxUtils.getCurrentStyle(a).position && (a.style.position = "relative"))
+};
+mxGraphView.prototype.destroy = function() {
+  var a = null != this.canvas ? this.canvas.ownerSVGElement : null;
+  null == a && (a = this.canvas);
+  null != a && null != a.parentNode && (this.clear(this.currentRoot, !0), mxEvent.removeGestureListeners(document, null, this.moveHandler, this.endHandler), mxEvent.release(this.graph.container), a
+    .parentNode.removeChild(a), this.overlayPane = this.drawPane = this.backgroundPane = this.canvas = this.endHandler = this.moveHandler = null)
+};
+
+function mxCurrentRootChange(a, b) {
+  this.view = a;
+  this.previous = this.root = b;
+  this.isUp = null == b;
+  if (!this.isUp)
+    for (var c = this.view.currentRoot, d = this.view.graph.getModel(); null != c;) {
+      if (c == b) {
+        this.isUp = !0;
+        break
+      }
+      c = d.getParent(c)
+    }
+}
+mxCurrentRootChange.prototype.execute = function() {
+  var a = this.view.currentRoot;
+  this.view.currentRoot = this.previous;
+  this.previous = a;
+  a = this.view.graph.getTranslateForRoot(this.view.currentRoot);
+  null != a && (this.view.translate = new mxPoint(-a.x, -a.y));
+  this.view.fireEvent(new mxEventObject(this.isUp ? mxEvent.UP : mxEvent.DOWN, "root", this.view.currentRoot, "previous", this.previous));
+  this.isUp ? (this.view.clear(this.view.currentRoot, !0), this.view.validate()) : this.view.refresh();
+  this.isUp = !this.isUp
+};
+
+function mxGraph(a, b, c, d) {
+  this.mouseListeners = null;
+  this.renderHint = c;
+  this.dialect = mxClient.IS_SVG ? mxConstants.DIALECT_SVG : c == mxConstants.RENDERING_HINT_EXACT && mxClient.IS_VML ? mxConstants.DIALECT_VML : c == mxConstants.RENDERING_HINT_FASTEST ? mxConstants
+    .DIALECT_STRICTHTML : c == mxConstants.RENDERING_HINT_FASTER ? mxConstants.DIALECT_PREFERHTML : mxConstants.DIALECT_MIXEDHTML;
+  this.model = null != b ? b : new mxGraphModel;
+  this.multiplicities = [];
+  this.imageBundles = [];
+  this.cellRenderer = this.createCellRenderer();
+  this.setSelectionModel(this.createSelectionModel());
+  this.setStylesheet(null != d ? d : this.createStylesheet());
+  this.view = this.createGraphView();
+  this.graphModelChangeListener = mxUtils.bind(this, function(a, b) {
+    this.graphModelChanged(b.getProperty("edit").changes)
+  });
+  this.model.addListener(mxEvent.CHANGE, this.graphModelChangeListener);
+  this.createHandlers();
+  null != a && this.init(a);
+  this.view.revalidate()
+}
+mxLoadResources && mxResources.add(mxClient.basePath + "/resources/graph");
+mxGraph.prototype = new mxEventSource;
+mxGraph.prototype.constructor = mxGraph;
+mxGraph.prototype.EMPTY_ARRAY = [];
+mxGraph.prototype.mouseListeners = null;
+mxGraph.prototype.isMouseDown = !1;
+mxGraph.prototype.model = null;
+mxGraph.prototype.view = null;
+mxGraph.prototype.stylesheet = null;
+mxGraph.prototype.selectionModel = null;
+mxGraph.prototype.cellEditor = null;
+mxGraph.prototype.cellRenderer = null;
+mxGraph.prototype.multiplicities = null;
+mxGraph.prototype.renderHint = null;
+mxGraph.prototype.dialect = null;
+mxGraph.prototype.gridSize = 10;
+mxGraph.prototype.gridEnabled = !0;
+mxGraph.prototype.portsEnabled = !0;
+mxGraph.prototype.doubleTapEnabled = !0;
+mxGraph.prototype.doubleTapTimeout = 700;
+mxGraph.prototype.doubleTapTolerance = 25;
+mxGraph.prototype.lastTouchY = 0;
+mxGraph.prototype.lastTouchY = 0;
+mxGraph.prototype.lastTouchTime = 0;
+mxGraph.prototype.gestureEnabled = !0;
+mxGraph.prototype.tolerance = 4;
+mxGraph.prototype.defaultOverlap = 0.5;
+mxGraph.prototype.defaultParent = null;
+mxGraph.prototype.alternateEdgeStyle = null;
+mxGraph.prototype.backgroundImage = null;
+mxGraph.prototype.pageVisible = !1;
+mxGraph.prototype.pageBreaksVisible = !1;
+mxGraph.prototype.pageBreakColor = "gray";
+mxGraph.prototype.pageBreakDashed = !0;
+mxGraph.prototype.minPageBreakDist = 20;
+mxGraph.prototype.preferPageSize = !1;
+mxGraph.prototype.pageFormat = mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+mxGraph.prototype.pageScale = 1.5;
+mxGraph.prototype.enabled = !0;
+mxGraph.prototype.escapeEnabled = !0;
+mxGraph.prototype.invokesStopCellEditing = !0;
+mxGraph.prototype.enterStopsCellEditing = !1;
+mxGraph.prototype.useScrollbarsForPanning = !0;
+mxGraph.prototype.exportEnabled = !0;
+mxGraph.prototype.importEnabled = !0;
+mxGraph.prototype.cellsLocked = !1;
+mxGraph.prototype.cellsCloneable = !0;
+mxGraph.prototype.foldingEnabled = !0;
+mxGraph.prototype.cellsEditable = !0;
+mxGraph.prototype.cellsDeletable = !0;
+mxGraph.prototype.cellsMovable = !0;
+mxGraph.prototype.edgeLabelsMovable = !0;
+mxGraph.prototype.vertexLabelsMovable = !1;
+mxGraph.prototype.dropEnabled = !1;
+mxGraph.prototype.splitEnabled = !0;
+mxGraph.prototype.cellsResizable = !0;
+mxGraph.prototype.cellsBendable = !0;
+mxGraph.prototype.cellsSelectable = !0;
+mxGraph.prototype.cellsDisconnectable = !0;
+mxGraph.prototype.autoSizeCells = !1;
+mxGraph.prototype.autoScroll = !0;
+mxGraph.prototype.timerAutoScroll = !1;
+mxGraph.prototype.allowAutoPanning = !1;
+mxGraph.prototype.ignoreScrollbars = !1;
+mxGraph.prototype.autoExtend = !0;
+mxGraph.prototype.maximumGraphBounds = null;
+mxGraph.prototype.minimumGraphSize = null;
+mxGraph.prototype.minimumContainerSize = null;
+mxGraph.prototype.maximumContainerSize = null;
+mxGraph.prototype.resizeContainer = !1;
+mxGraph.prototype.border = 0;
+mxGraph.prototype.ordered = !0;
+mxGraph.prototype.keepEdgesInForeground = !1;
+mxGraph.prototype.keepEdgesInBackground = !0;
+mxGraph.prototype.allowNegativeCoordinates = !0;
+mxGraph.prototype.constrainChildren = !0;
+mxGraph.prototype.extendParents = !0;
+mxGraph.prototype.extendParentsOnAdd = !0;
+mxGraph.prototype.collapseToPreferredSize = !0;
+mxGraph.prototype.zoomFactor = 1.2;
+mxGraph.prototype.keepSelectionVisibleOnZoom = !1;
+mxGraph.prototype.centerZoom = !0;
+mxGraph.prototype.resetViewOnRootChange = !0;
+mxGraph.prototype.resetEdgesOnResize = !1;
+mxGraph.prototype.resetEdgesOnMove = !1;
+mxGraph.prototype.resetEdgesOnConnect = !0;
+mxGraph.prototype.allowLoops = !1;
+mxGraph.prototype.defaultLoopStyle = mxEdgeStyle.Loop;
+mxGraph.prototype.multigraph = !0;
+mxGraph.prototype.connectableEdges = !1;
+mxGraph.prototype.allowDanglingEdges = !0;
+mxGraph.prototype.cloneInvalidEdges = !1;
+mxGraph.prototype.disconnectOnMove = !0;
+mxGraph.prototype.labelsVisible = !0;
+mxGraph.prototype.htmlLabels = !1;
+mxGraph.prototype.swimlaneSelectionEnabled = !0;
+mxGraph.prototype.swimlaneNesting = !0;
+mxGraph.prototype.swimlaneIndicatorColorAttribute = mxConstants.STYLE_FILLCOLOR;
+mxGraph.prototype.imageBundles = null;
+mxGraph.prototype.minFitScale = 0.1;
+mxGraph.prototype.maxFitScale = 8;
+mxGraph.prototype.panDx = 0;
+mxGraph.prototype.panDy = 0;
+mxGraph.prototype.collapsedImage = new mxImage(mxClient.imageBasePath + "/collapsed.gif", 9, 9);
+mxGraph.prototype.expandedImage = new mxImage(mxClient.imageBasePath + "/expanded.gif", 9, 9);
+// mxGraph.prototype.warningImage = new mxImage(mxClient.imageBasePath + "/warning" + (mxClient.IS_MAC ? ".png" : ".gif"), 16, 16);
+mxGraph.prototype.warningImage = new mxImage("/assets/plugins/mxgraph/images/warning.gif", 16, 16);
+
+
+mxGraph.prototype.alreadyConnectedResource = "none" != mxClient.language ? "alreadyConnected" : "";
+mxGraph.prototype.containsValidationErrorsResource = "none" != mxClient.language ? "containsValidationErrors" : "";
+mxGraph.prototype.collapseExpandResource = "none" != mxClient.language ? "collapse-expand" : "";
+mxGraph.prototype.init = function(a) {
+  this.container = a;
+  this.cellEditor = this.createCellEditor();
+  this.view.init();
+  this.sizeDidChange();
+  mxClient.IS_IE && (mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
+    this.destroy()
+  })), mxEvent.addListener(a, "selectstart", mxUtils.bind(this, function() {
+    return this.isEditing()
+  })));
+  8 == document.documentMode && a.insertAdjacentHTML("beforeend", '\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e')
+};
+mxGraph.prototype.createHandlers = function(a) {
+  this.tooltipHandler = new mxTooltipHandler(this);
+  this.tooltipHandler.setEnabled(!1);
+  this.panningHandler = new mxPanningHandler(this);
+  this.panningHandler.panningEnabled = !1;
+  this.selectionCellsHandler = new mxSelectionCellsHandler(this);
+  this.connectionHandler = new mxConnectionHandler(this);
+  this.connectionHandler.setEnabled(!1);
+  this.graphHandler = new mxGraphHandler(this)
+};
+mxGraph.prototype.createSelectionModel = function() {
+  return new mxGraphSelectionModel(this)
+};
+mxGraph.prototype.createStylesheet = function() {
+  return new mxStylesheet
+};
+mxGraph.prototype.createGraphView = function() {
+  return new mxGraphView(this)
+};
+mxGraph.prototype.createCellRenderer = function() {
+  return new mxCellRenderer
+};
+mxGraph.prototype.createCellEditor = function() {
+  return new mxCellEditor(this)
+};
+mxGraph.prototype.getModel = function() {
+  return this.model
+};
+mxGraph.prototype.getView = function() {
+  return this.view
+};
+mxGraph.prototype.getStylesheet = function() {
+  return this.stylesheet
+};
+mxGraph.prototype.setStylesheet = function(a) {
+  this.stylesheet = a
+};
+mxGraph.prototype.getSelectionModel = function() {
+  return this.selectionModel
+};
+mxGraph.prototype.setSelectionModel = function(a) {
+  this.selectionModel = a
+};
+mxGraph.prototype.getSelectionCellsForChanges = function(a) {
+  for (var b = [], c = 0; c < a.length; c++) {
+    var d = a[c];
+    if (d.constructor != mxRootChange) {
+      var e = null;
+      d instanceof mxChildChange && null == d.previous ? e = d.child : null != d.cell && d.cell instanceof mxCell && (e = d.cell);
+      null != e && 0 > mxUtils.indexOf(b, e) && b.push(e)
+    }
+  }
+  return this.getModel().getTopmostCells(b)
+};
+mxGraph.prototype.graphModelChanged = function(a) {
+  for (var b = 0; b < a.length; b++) this.processChange(a[b]);
+  this.removeSelectionCells(this.getRemovedCellsForChanges(a));
+  this.view.validate();
+  this.sizeDidChange()
+};
+mxGraph.prototype.getRemovedCellsForChanges = function(a) {
+  for (var b = [], c = 0; c < a.length; c++) {
+    var d = a[c];
+    if (d instanceof mxRootChange) break;
+    else d instanceof mxChildChange ? null != d.previous && null == d.parent && (b = b.concat(this.model.getDescendants(d.child))) : d instanceof mxVisibleChange && (b = b.concat(this.model.getDescendants(
+      d.cell)))
+  }
+  return b
+};
+mxGraph.prototype.processChange = function(a) {
+  if (a instanceof mxRootChange) this.clearSelection(), this.removeStateForCell(a.previous), this.resetViewOnRootChange && (this.view.scale = 1, this.view.translate.x = 0, this.view.translate.y = 0),
+    this.fireEvent(new mxEventObject(mxEvent.ROOT));
+  else if (a instanceof mxChildChange) {
+    var b = this.model.getParent(a.child);
+    null != b ? this.view.invalidate(a.child, !0, !1, null != a.previous) : (this.removeStateForCell(a.child), this.view.currentRoot == a.child && this.home());
+    b != a.previous &&
+      (null != b && this.view.invalidate(b, !1, !1), null != a.previous && this.view.invalidate(a.previous, !1, !1))
+  } else a instanceof mxTerminalChange || a instanceof mxGeometryChange ? this.view.invalidate(a.cell) : a instanceof mxValueChange ? this.view.invalidate(a.cell, !1, !1) : a instanceof mxStyleChange ?
+    (this.view.invalidate(a.cell, !0, !0, !1), this.view.removeState(a.cell)) : null != a.cell && a.cell instanceof mxCell && this.removeStateForCell(a.cell)
+};
+mxGraph.prototype.removeStateForCell = function(a) {
+  for (var b = this.model.getChildCount(a), c = 0; c < b; c++) this.removeStateForCell(this.model.getChildAt(a, c));
+  this.view.removeState(a)
+};
+mxGraph.prototype.addCellOverlay = function(a, b) {
+  null == a.overlays && (a.overlays = []);
+  a.overlays.push(b);
+  var c = this.view.getState(a);
+  null != c && this.cellRenderer.redraw(c);
+  this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY, "cell", a, "overlay", b));
+  return b
+};
+mxGraph.prototype.getCellOverlays = function(a) {
+  return a.overlays
+};
+mxGraph.prototype.removeCellOverlay = function(a, b) {
+  if (null == b) this.removeCellOverlays(a);
+  else {
+    var c = mxUtils.indexOf(a.overlays, b);
+    0 <= c ? (a.overlays.splice(c, 1), 0 == a.overlays.length && (a.overlays = null), c = this.view.getState(a), null != c && this.cellRenderer.redraw(c), this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,
+      "cell", a, "overlay", b))) : b = null
+  }
+  return b
+};
+mxGraph.prototype.removeCellOverlays = function(a) {
+  var b = a.overlays;
+  if (null != b) {
+    a.overlays = null;
+    var c = this.view.getState(a);
+    null != c && this.cellRenderer.redraw(c);
+    for (c = 0; c < b.length; c++) this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY, "cell", a, "overlay", b[c]))
+  }
+  return b
+};
+mxGraph.prototype.clearCellOverlays = function(a) {
+  a = null != a ? a : this.model.getRoot();
+  this.removeCellOverlays(a);
+  for (var b = this.model.getChildCount(a), c = 0; c < b; c++) {
+    var d = this.model.getChildAt(a, c);
+    this.clearCellOverlays(d)
+  }
+};
+mxGraph.prototype.setCellWarning = function(a, b, c, d) {
+  if (null != b && 0 < b.length) return c = null != c ? c : this.warningImage, b = new mxCellOverlay(c, "\x3cfont color\x3dred\x3e" + b + "\x3c/font\x3e"), d && b.addListener(mxEvent.CLICK, mxUtils
+    .bind(this, function(b, c) {
+      this.isEnabled() && this.setSelectionCell(a)
+    })), this.addCellOverlay(a, b);
+  this.removeCellOverlays(a);
+  return null
+};
+mxGraph.prototype.startEditing = function(a) {
+  this.startEditingAtCell(null, a)
+};
+mxGraph.prototype.startEditingAtCell = function(a, b) {
+  null == a && (a = this.getSelectionCell(), null != a && !this.isCellEditable(a) && (a = null));
+  null != a && (this.fireEvent(new mxEventObject(mxEvent.START_EDITING, "cell", a, "event", b)), this.cellEditor.startEditing(a, b))
+};
+mxGraph.prototype.getEditingValue = function(a, b) {
+  return this.convertValueToString(a)
+};
+mxGraph.prototype.stopEditing = function(a) {
+  this.cellEditor.stopEditing(a)
+};
+mxGraph.prototype.labelChanged = function(a, b, c) {
+  this.model.beginUpdate();
+  try {
+    this.cellLabelChanged(a, b, this.isAutoSizeCell(a)), this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED, "cell", a, "value", b, "event", c))
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.cellLabelChanged = function(a, b, c) {
+  this.model.beginUpdate();
+  try {
+    this.model.setValue(a, b), c && this.cellSizeUpdated(a, !1)
+  } finally {
+    this.model.endUpdate()
+  }
+};
+mxGraph.prototype.escape = function(a) {
+  this.stopEditing(!0);
+  this.connectionHandler.reset();
+  this.graphHandler.reset();
+  a = this.getSelectionCells();
+  for (var b = 0; b < a.length; b++) {
+    var c = this.view.getState(a[b]);
+    null != c && null != c.handler && c.handler.reset()
+  }
+};
+mxGraph.prototype.click = function(a) {
+  var b = a.getEvent(),
+    c = a.getCell(),
+    d = new mxEventObject(mxEvent.CLICK, "event", b, "cell", c);
+  a.isConsumed() && d.consume();
+  this.fireEvent(d);
+  this.isEnabled() && (!mxEvent.isConsumed(b) && !d.isConsumed()) && (null != c ? this.selectCellForEvent(c, b) : (c = null, this.isSwimlaneSelectionEnabled() && (c = this.getSwimlaneAt(a.getGraphX(),
+    a.getGraphY())), null != c ? this.selectCellForEvent(c, b) : this.isToggleEvent(b) || this.clearSelection()))
+};
+mxGraph.prototype.dblClick = function(a, b) {
+  var c = new mxEventObject(mxEvent.DOUBLE_CLICK, "event", a, "cell", b);
+  this.fireEvent(c);
+  this.isEnabled() && (!mxEvent.isConsumed(a) && !c.isConsumed() && null != b && this.isCellEditable(b)) && this.startEditingAtCell(b, a)
+};
+mxGraph.prototype.scrollPointToVisible = function(a, b, c, d) {
+  if (!this.timerAutoScroll && (this.ignoreScrollbars || mxUtils.hasScrollbars(this.container))) {
+    var e = this.container;
+    d = null != d ? d : 20;
+    if (a >= e.scrollLeft && b >= e.scrollTop && a <= e.scrollLeft + e.clientWidth && b <= e.scrollTop + e.clientHeight) {
+      var f = e.scrollLeft + e.clientWidth - a;
+      if (f < d) {
+        if (a = e.scrollLeft, e.scrollLeft += d - f, c && a == e.scrollLeft) {
+          if (this.dialect == mxConstants.DIALECT_SVG) {
+            a = this.view.getDrawPane().ownerSVGElement;
+            var g = this.container.scrollWidth + d - f
+          } else g =
+            Math.max(e.clientWidth, e.scrollWidth) + d - f, a = this.view.getCanvas();
+          a.style.width = g + "px";
+          e.scrollLeft += d - f
+        }
+      } else f = a - e.scrollLeft, f < d && (e.scrollLeft -= d - f);
+      f = e.scrollTop + e.clientHeight - b;
+      f < d ? (a = e.scrollTop, e.scrollTop += d - f, a == e.scrollTop && c && (this.dialect == mxConstants.DIALECT_SVG ? (a = this.view.getDrawPane().ownerSVGElement, b = this.container.scrollHeight +
+        d - f) : (b = Math.max(e.clientHeight, e.scrollHeight) + d - f, a = this.view.getCanvas()), a.style.height = b + "px", e.scrollTop += d - f)) : (f = b - e.scrollTop, f < d && (e.scrollTop -=
+        d - f))
+    }
+  } else this.allowAutoPanning && !this.panningHandler.active && (null == this.panningManager && (this.panningManager = this.createPanningManager()), this.panningManager.panTo(a + this.panDx, b +
+    this.panDy))
+};
+mxGraph.prototype.createPanningManager = function() {
+  return new mxPanningManager(this)
+};
+mxGraph.prototype.getBorderSizes = function() {
+  function a(a) {
+    var b = 0,
+      b = "thin" == a ? 2 : "medium" == a ? 4 : "thick" == a ? 6 : parseInt(a);
+    isNaN(b) && (b = 0);
+    return b
+  }
+  var b = mxUtils.getCurrentStyle(this.container),
+    c = new mxRectangle;
+  c.x = a(b.borderLeftWidth) + parseInt(b.paddingLeft || 0);
+  c.y = a(b.borderTopWidth) + parseInt(b.paddingTop || 0);
+  c.width = a(b.borderRightWidth) + parseInt(b.paddingRight || 0);
+  c.height = a(b.borderBottomWidth) + parseInt(b.paddingBottom || 0);
+  return c
+};
+mxGraph.prototype.getPreferredPageSize = function(a, b, c) {
+  a = this.view.scale;
+  var d = this.view.translate,
+    e = this.pageFormat,
+    f = a * this.pageScale,
+    e = new mxRectangle(0, 0, e.width * f, e.height * f);
+  b = this.pageBreaksVisible ? Math.ceil(b / e.width) : 1;
+  c = this.pageBreaksVisible ? Math.ceil(c / e.height) : 1;
+  return new mxRectangle(0, 0, b * e.width + 2 + d.x / a, c * e.height + 2 + d.y / a)
+};
+mxGraph.prototype.sizeDidChange = function() {
+  var a = this.getGraphBounds();
+  if (null != this.container) {
+    var b = this.getBorder(),
+      c = Math.max(0, a.x + a.width + 1 + b),
+      b = Math.max(0, a.y + a.height + 1 + b);
+    null != this.minimumContainerSize && (c = Math.max(c, this.minimumContainerSize.width), b = Math.max(b, this.minimumContainerSize.height));
+    this.resizeContainer && this.doResizeContainer(c, b);
+    if (this.preferPageSize || !mxClient.IS_IE && this.pageVisible) {
+      var d = this.getPreferredPageSize(a, c, b);
+      null != d && (c = d.width, b = d.height)
+    }
+    null != this.minimumGraphSize &&
+      (c = Math.max(c, this.minimumGraphSize.width * this.view.scale), b = Math.max(b, this.minimumGraphSize.height * this.view.scale));
+    c = Math.ceil(c - 1);
+    b = Math.ceil(b - 1);
+    this.dialect == mxConstants.DIALECT_SVG ? (d = this.view.getDrawPane().ownerSVGElement, d.style.minWidth = Math.max(1, c) + "px", d.style.minHeight = Math.max(1, b) + "px", d.style.width =
+      "100%", d.style.height = "100%") : mxClient.IS_QUIRKS ? this.view.updateHtmlCanvasSize(Math.max(1, c), Math.max(1, b)) : (this.view.canvas.style.minWidth = Math.max(1, c) + "px", this.view.canvas
+      .style.minHeight =
+      Math.max(1, b) + "px");
+    this.updatePageBreaks(this.pageBreaksVisible, c - 1, b - 1)
+  }
+  this.fireEvent(new mxEventObject(mxEvent.SIZE, "bounds", a))
+};
+mxGraph.prototype.doResizeContainer = function(a, b) {
+  if (mxClient.IS_IE)
+    if (mxClient.IS_QUIRKS) {
+      var c = this.getBorderSizes();
+      a += Math.max(2, c.x + c.width + 1);
+      b += Math.max(2, c.y + c.height + 1)
+    } else 9 <= document.documentMode ? (a += 3, b += 5) : (a += 1, b += 1);
+  else b += 1;
+  null != this.maximumContainerSize && (a = Math.min(this.maximumContainerSize.width, a), b = Math.min(this.maximumContainerSize.height, b));
+  this.container.style.width = Math.ceil(a) + "px";
+  this.container.style.height = Math.ceil(b) + "px"
+};
+mxGraph.prototype.updatePageBreaks = function(a, b, c) {
+  var d = this.view.scale,
+    e = this.view.translate,
+    f = this.pageFormat,
+    g = d * this.pageScale,
+    e = new mxRectangle(d * e.x, d * e.y, f.width * g, f.height * g);
+  a = a && Math.min(e.width, e.height) > this.minPageBreakDist;
+  e.x = mxUtils.mod(e.x, e.width);
+  e.y = mxUtils.mod(e.y, e.height);
+  f = a ? Math.ceil((b - e.x) / e.width) : 0;
+  a = a ? Math.ceil((c - e.y) / e.height) : 0;
+  null == this.horizontalPageBreaks && 0 < f && (this.horizontalPageBreaks = []);
+  if (null != this.horizontalPageBreaks) {
+    for (g = 0; g <= f; g++) {
+      var h = [new mxPoint(e.x +
+        g * e.width, 1), new mxPoint(e.x + g * e.width, c)];
+      null != this.horizontalPageBreaks[g] ? (this.horizontalPageBreaks[g].scale = 1, this.horizontalPageBreaks[g].points = h, this.horizontalPageBreaks[g].redraw()) : (h = new mxPolyline(h, this.pageBreakColor,
+        this.scale), h.dialect = this.dialect, h.isDashed = this.pageBreakDashed, h.scale = d, h.init(this.view.backgroundPane), h.redraw(), this.horizontalPageBreaks[g] = h)
+    }
+    for (g = f; g < this.horizontalPageBreaks.length; g++) this.horizontalPageBreaks[g].destroy();
+    this.horizontalPageBreaks.splice(f,
+      this.horizontalPageBreaks.length - f)
+  }
+  null == this.verticalPageBreaks && 0 < a && (this.verticalPageBreaks = []);
+  if (null != this.verticalPageBreaks) {
+    for (g = 0; g <= a; g++) h = [new mxPoint(1, e.y + g * e.height), new mxPoint(b, e.y + g * e.height)], null != this.verticalPageBreaks[g] ? (this.verticalPageBreaks[g].scale = 1, this.verticalPageBreaks[
+      g].points = h, this.verticalPageBreaks[g].redraw()) : (h = new mxPolyline(h, this.pageBreakColor, d), h.dialect = this.dialect, h.isDashed = this.pageBreakDashed, h.scale = d, h.init(this.view
+        .backgroundPane), h.redraw(),
+      this.verticalPageBreaks[g] = h);
+    for (g = a; g < this.verticalPageBreaks.length; g++) this.verticalPageBreaks[g].destroy();
+    this.verticalPageBreaks.splice(a, this.verticalPageBreaks.length - a)
+  }
+};
+mxGraph.prototype.getCellStyle = function(a) {
+  var b = this.model.getStyle(a),
+    c = null,
+    c = this.model.isEdge(a) ? this.stylesheet.getDefaultEdgeStyle() : this.stylesheet.getDefaultVertexStyle();
+  null != b && (c = this.postProcessCellStyle(this.stylesheet.getCellStyle(b, c)));
+  null == c && (c = mxGraph.prototype.EMPTY_ARRAY);
+  return c
+};
+mxGraph.prototype.postProcessCellStyle = function(a) {
+  if (null != a) {
+    var b = a[mxConstants.STYLE_IMAGE],
+      c = this.getImageFromBundles(b);
+    null != c ? a[mxConstants.STYLE_IMAGE] = c : c = b;
+    null != c && "data:image/" == c.substring(0, 11) && (b = c.indexOf(","), 0 < b && (c = c.substring(0, b) + ";base64," + c.substring(b + 1)), a[mxConstants.STYLE_IMAGE] = c)
+  }
+  return a
+};
+mxGraph.prototype.setCellStyle = function(a, b) {
+  b = b || this.getSelectionCells();
+  if (null != b) {
+    this.model.beginUpdate();
+    try {
+      for (var c = 0; c < b.length; c++) this.model.setStyle(b[c], a)
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.toggleCellStyle = function(a, b, c) {
+  c = c || this.getSelectionCell();
+  this.toggleCellStyles(a, b, [c])
+};
+mxGraph.prototype.toggleCellStyles = function(a, b, c) {
+  b = null != b ? b : !1;
+  c = c || this.getSelectionCells();
+  if (null != c && 0 < c.length) {
+    var d = this.view.getState(c[0]),
+      d = null != d ? d.style : this.getCellStyle(c[0]);
+    null != d && (b = mxUtils.getValue(d, a, b) ? 0 : 1, this.setCellStyles(a, b, c))
+  }
+};
+mxGraph.prototype.setCellStyles = function(a, b, c) {
+  c = c || this.getSelectionCells();
+  mxUtils.setCellStyles(this.model, c, a, b)
+};
+mxGraph.prototype.toggleCellStyleFlags = function(a, b, c) {
+  this.setCellStyleFlags(a, b, null, c)
+};
+mxGraph.prototype.setCellStyleFlags = function(a, b, c, d) {
+  d = d || this.getSelectionCells();
+  if (null != d && 0 < d.length) {
+    if (null == c) {
+      var e = this.view.getState(d[0]),
+        e = null != e ? e.style : this.getCellStyle(d[0]);
+      null != e && (c = (parseInt(e[a] || 0) & b) != b)
+    }
+    mxUtils.setCellStyleFlags(this.model, d, a, b, c)
+  }
+};
+mxGraph.prototype.alignCells = function(a, b, c) {
+  null == b && (b = this.getSelectionCells());
+  if (null != b && 1 < b.length) {
+    if (null == c)
+      for (var d = 0; d < b.length; d++) {
+        var e = this.getCellGeometry(b[d]);
+        if (null != e && !this.model.isEdge(b[d]))
+          if (null == c)
+            if (a == mxConstants.ALIGN_CENTER) {
+              c = e.x + e.width / 2;
+              break
+            } else if (a == mxConstants.ALIGN_RIGHT) c = e.x + e.width;
+        else if (a == mxConstants.ALIGN_TOP) c = e.y;
+        else if (a == mxConstants.ALIGN_MIDDLE) {
+          c = e.y + e.height / 2;
+          break
+        } else c = a == mxConstants.ALIGN_BOTTOM ? e.y + e.height : e.x;
+        else c = a == mxConstants.ALIGN_RIGHT ?
+          Math.max(c, e.x + e.width) : a == mxConstants.ALIGN_TOP ? Math.min(c, e.y) : a == mxConstants.ALIGN_BOTTOM ? Math.max(c, e.y + e.height) : Math.min(c, e.x)
+      }
+    if (null != c) {
+      this.model.beginUpdate();
+      try {
+        for (d = 0; d < b.length; d++) e = this.getCellGeometry(b[d]), null != e && !this.model.isEdge(b[d]) && (e = e.clone(), a == mxConstants.ALIGN_CENTER ? e.x = c - e.width / 2 : a ==
+          mxConstants.ALIGN_RIGHT ? e.x = c - e.width : a == mxConstants.ALIGN_TOP ? e.y = c : a == mxConstants.ALIGN_MIDDLE ? e.y = c - e.height / 2 : a == mxConstants.ALIGN_BOTTOM ? e.y = c - e
+          .height : e.x = c, this.model.setGeometry(b[d],
+            e));
+        this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS, "align", a, "cells", b))
+      } finally {
+        this.model.endUpdate()
+      }
+    }
+  }
+  return b
+};
+mxGraph.prototype.flipEdge = function(a) {
+  if (null != a && null != this.alternateEdgeStyle) {
+    this.model.beginUpdate();
+    try {
+      var b = this.model.getStyle(a);
+      null == b || 0 == b.length ? this.model.setStyle(a, this.alternateEdgeStyle) : this.model.setStyle(a, null);
+      this.resetEdge(a);
+      this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE, "edge", a))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+  return a
+};
+mxGraph.prototype.addImageBundle = function(a) {
+  this.imageBundles.push(a)
+};
+mxGraph.prototype.removeImageBundle = function(a) {
+  for (var b = [], c = 0; c < this.imageBundles.length; c++) this.imageBundles[c] != a && b.push(this.imageBundles[c]);
+  this.imageBundles = b
+};
+mxGraph.prototype.getImageFromBundles = function(a) {
+  if (null != a)
+    for (var b = 0; b < this.imageBundles.length; b++) {
+      var c = this.imageBundles[b].getImage(a);
+      if (null != c) return c
+    }
+  return null
+};
+mxGraph.prototype.orderCells = function(a, b) {
+  null == b && (b = mxUtils.sortCells(this.getSelectionCells(), !0));
+  this.model.beginUpdate();
+  try {
+    this.cellsOrdered(b, a), this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS, "back", a, "cells", b))
+  } finally {
+    this.model.endUpdate()
+  }
+  return b
+};
+mxGraph.prototype.cellsOrdered = function(a, b) {
+  if (null != a) {
+    this.model.beginUpdate();
+    try {
+      for (var c = 0; c < a.length; c++) {
+        var d = this.model.getParent(a[c]);
+        b ? this.model.add(d, a[c], c) : this.model.add(d, a[c], this.model.getChildCount(d) - 1)
+      }
+      this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED, "back", b, "cells", a))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.groupCells = function(a, b, c) {
+  null == c && (c = mxUtils.sortCells(this.getSelectionCells(), !0));
+  c = this.getCellsForGroup(c);
+  null == a && (a = this.createGroupCell(c));
+  var d = this.getBoundsForGroup(a, c, b);
+  if (0 < c.length && null != d) {
+    var e = this.model.getParent(a);
+    null == e && (e = this.model.getParent(c[0]));
+    this.model.beginUpdate();
+    try {
+      null == this.getCellGeometry(a) && this.model.setGeometry(a, new mxGeometry);
+      var f = this.model.getChildCount(e);
+      this.cellsAdded([a], e, f, null, null, !1);
+      f = this.model.getChildCount(a);
+      this.cellsAdded(c, a, f, null, null, !1, !1);
+      this.cellsMoved(c, -d.x, -d.y, !1, !0);
+      this.cellsResized([a], [d]);
+      this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS, "group", a, "border", b, "cells", c))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+  return a
+};
+mxGraph.prototype.getCellsForGroup = function(a) {
+  var b = [];
+  if (null != a && 0 < a.length) {
+    var c = this.model.getParent(a[0]);
+    b.push(a[0]);
+    for (var d = 1; d < a.length; d++) this.model.getParent(a[d]) == c && b.push(a[d])
+  }
+  return b
+};
+mxGraph.prototype.getBoundsForGroup = function(a, b, c) {
+  b = this.getBoundingBoxFromGeometry(b);
+  null != b && (this.isSwimlane(a) && (a = this.getStartSize(a), b.x -= a.width, b.y -= a.height, b.width += a.width, b.height += a.height), b.x -= c, b.y -= c, b.width += 2 * c, b.height += 2 * c);
+  return b
+};
+mxGraph.prototype.createGroupCell = function(a) {
+  a = new mxCell("");
+  a.setVertex(!0);
+  a.setConnectable(!1);
+  return a
+};
+mxGraph.prototype.ungroupCells = function(a) {
+  var b = [];
+  if (null == a) {
+    a = this.getSelectionCells();
+    for (var c = [], d = 0; d < a.length; d++) 0 < this.model.getChildCount(a[d]) && c.push(a[d]);
+    a = c
+  }
+  if (null != a && 0 < a.length) {
+    this.model.beginUpdate();
+    try {
+      for (d = 0; d < a.length; d++) {
+        var e = this.model.getChildren(a[d]);
+        if (null != e && 0 < e.length) {
+          var e = e.slice(),
+            f = this.model.getParent(a[d]),
+            g = this.model.getChildCount(f);
+          this.cellsAdded(e, f, g, null, null, !0);
+          b = b.concat(e)
+        }
+      }
+      this.cellsRemoved(this.addAllEdges(a));
+      this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
+        "cells", a))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+  return b
+};
+mxGraph.prototype.removeCellsFromParent = function(a) {
+  null == a && (a = this.getSelectionCells());
+  this.model.beginUpdate();
+  try {
+    var b = this.getDefaultParent(),
+      c = this.model.getChildCount(b);
+    this.cellsAdded(a, b, c, null, null, !0);
+    this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT, "cells", a))
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.updateGroupBounds = function(a, b, c) {
+  null == a && (a = this.getSelectionCells());
+  b = null != b ? b : 0;
+  c = null != c ? c : !1;
+  this.model.beginUpdate();
+  try {
+    for (var d = 0; d < a.length; d++) {
+      var e = this.getCellGeometry(a[d]);
+      if (null != e) {
+        var f = this.getChildCells(a[d]);
+        if (null != f && 0 < f.length) {
+          var g = this.getBoundingBoxFromGeometry(f);
+          if (0 < g.width && 0 < g.height) {
+            var h = this.isSwimlane(a[d]) ? this.getStartSize(a[d]) : new mxRectangle,
+              e = e.clone();
+            c && (e.x += g.x - h.width - b, e.y += g.y - h.height - b);
+            e.width = g.width + h.width + 2 * b;
+            e.height =
+              g.height + h.height + 2 * b;
+            this.model.setGeometry(a[d], e);
+            this.moveCells(f, -g.x + h.width + b, -g.y + h.height + b)
+          }
+        }
+      }
+    }
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.cloneCells = function(a, b) {
+  b = null != b ? b : !0;
+  var c = null;
+  if (null != a) {
+    for (var d = {}, c = [], e = 0; e < a.length; e++) {
+      var f = mxCellPath.create(a[e]);
+      d[f] = a[e];
+      c.push(a[e])
+    }
+    if (0 < c.length)
+      for (var f = this.view.scale, g = this.view.translate, c = this.model.cloneCells(a, !0), e = 0; e < a.length; e++)
+        if (!b && this.model.isEdge(c[e]) && null != this.getEdgeValidationError(c[e], this.model.getTerminal(c[e], !0), this.model.getTerminal(c[e], !1))) c[e] = null;
+        else {
+          var h = this.model.getGeometry(c[e]);
+          if (null != h) {
+            var k = this.view.getState(a[e]),
+              l = this.view.getState(this.model.getParent(a[e]));
+            if (null != k && null != l) {
+              var m = l.origin.x,
+                l = l.origin.y;
+              if (this.model.isEdge(c[e])) {
+                for (var k = k.absolutePoints, n = this.model.getTerminal(a[e], !0), p = mxCellPath.create(n); null != n && null == d[p];) n = this.model.getParent(n), p = mxCellPath.create(n);
+                null == n && h.setTerminalPoint(new mxPoint(k[0].x / f - g.x, k[0].y / f - g.y), !0);
+                n = this.model.getTerminal(a[e], !1);
+                for (p = mxCellPath.create(n); null != n && null == d[p];) n = this.model.getParent(n), p = mxCellPath.create(n);
+                null == n && (n = k.length -
+                  1, h.setTerminalPoint(new mxPoint(k[n].x / f - g.x, k[n].y / f - g.y), !1));
+                h = h.points;
+                if (null != h)
+                  for (k = 0; k < h.length; k++) h[k].x += m, h[k].y += l
+              } else h.x += m, h.y += l
+            }
+          }
+        } else c = []
+  }
+  return c
+};
+mxGraph.prototype.insertVertex = function(a, b, c, d, e, f, g, h, k) {
+  b = this.createVertex(a, b, c, d, e, f, g, h, k);
+  return this.addCell(b, a)
+};
+mxGraph.prototype.createVertex = function(a, b, c, d, e, f, g, h, k) {
+  a = new mxGeometry(d, e, f, g);
+  a.relative = null != k ? k : !1;
+  c = new mxCell(c, a, h);
+  c.setId(b);
+  c.setVertex(!0);
+  c.setConnectable(!0);
+  return c
+};
+mxGraph.prototype.insertEdge = function(a, b, c, d, e, f) {
+  b = this.createEdge(a, b, c, d, e, f);
+  return this.addEdge(b, a, d, e)
+};
+mxGraph.prototype.createEdge = function(a, b, c, d, e, f) {
+  a = new mxCell(c, new mxGeometry, f);
+  a.setId(b);
+  a.setEdge(!0);
+  a.geometry.relative = !0;
+  return a
+};
+mxGraph.prototype.addEdge = function(a, b, c, d, e) {
+  return this.addCell(a, b, e, c, d)
+};
+mxGraph.prototype.addCell = function(a, b, c, d, e) {
+  return this.addCells([a], b, c, d, e)[0]
+};
+mxGraph.prototype.addCells = function(a, b, c, d, e) {
+  null == b && (b = this.getDefaultParent());
+  null == c && (c = this.model.getChildCount(b));
+  this.model.beginUpdate();
+  try {
+    this.cellsAdded(a, b, c, d, e, !1, !0), this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS, "cells", a, "parent", b, "index", c, "source", d, "target", e))
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.cellsAdded = function(a, b, c, d, e, f, g) {
+  if (null != a && null != b && null != c) {
+    this.model.beginUpdate();
+    try {
+      for (var h = f ? this.view.getState(b) : null, k = null != h ? h.origin : null, l = new mxPoint(0, 0), h = 0; h < a.length; h++)
+        if (null == a[h]) c--;
+        else {
+          var m = this.model.getParent(a[h]);
+          if (null != k && a[h] != b && b != m) {
+            var n = this.view.getState(m),
+              p = null != n ? n.origin : l,
+              q = this.model.getGeometry(a[h]);
+            if (null != q) {
+              var s = p.x - k.x,
+                r = p.y - k.y,
+                q = q.clone();
+              q.translate(s, r);
+              !q.relative && (this.model.isVertex(a[h]) && !this.isAllowNegativeCoordinates()) &&
+                (q.x = Math.max(0, q.x), q.y = Math.max(0, q.y));
+              this.model.setGeometry(a[h], q)
+            }
+          }
+          b == m && c + h > this.model.getChildCount(b) && c--;
+          this.model.add(b, a[h], c + h);
+          this.isExtendParentsOnAdd() && this.isExtendParent(a[h]) && this.extendParent(a[h]);
+          (null == g || g) && this.constrainChild(a[h]);
+          null != d && this.cellConnected(a[h], d, !0);
+          null != e && this.cellConnected(a[h], e, !1)
+        }
+      this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, "cells", a, "parent", b, "index", c, "source", d, "target", e, "absolute", f))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.removeCells = function(a, b) {
+  b = null != b ? b : !0;
+  null == a && (a = this.getDeletableCells(this.getSelectionCells()));
+  b && (a = this.getDeletableCells(this.addAllEdges(a)));
+  this.model.beginUpdate();
+  try {
+    this.cellsRemoved(a), this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS, "cells", a, "includeEdges", b))
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.cellsRemoved = function(a) {
+  if (null != a && 0 < a.length) {
+    var b = this.view.scale,
+      c = this.view.translate;
+    this.model.beginUpdate();
+    try {
+      for (var d = {}, e = 0; e < a.length; e++) {
+        var f = mxCellPath.create(a[e]);
+        d[f] = a[e]
+      }
+      for (e = 0; e < a.length; e++) {
+        for (var g = this.getConnections(a[e]), h = 0; h < g.length; h++)
+          if (f = mxCellPath.create(g[h]), null == d[f]) {
+            var k = this.model.getGeometry(g[h]);
+            if (null != k) {
+              var l = this.view.getState(g[h]);
+              if (null != l) {
+                var k = k.clone(),
+                  m = l.getVisibleTerminal(!0) == a[e],
+                  n = l.absolutePoints,
+                  p = m ? 0 : n.length -
+                  1;
+                k.setTerminalPoint(new mxPoint(n[p].x / b - c.x, n[p].y / b - c.y), m);
+                this.model.setTerminal(g[h], null, m);
+                this.model.setGeometry(g[h], k)
+              }
+            }
+          }
+        this.model.remove(a[e])
+      }
+      this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED, "cells", a))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.splitEdge = function(a, b, c, d, e) {
+  d = d || 0;
+  e = e || 0;
+  null == c && (c = this.cloneCells([a])[0]);
+  var f = this.model.getParent(a),
+    g = this.model.getTerminal(a, !0);
+  this.model.beginUpdate();
+  try {
+    this.cellsMoved(b, d, e, !1, !1), this.cellsAdded(b, f, this.model.getChildCount(f), null, null, !0), this.cellsAdded([c], f, this.model.getChildCount(f), g, b[0], !1), this.cellConnected(a, b[
+      0], !0), this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE, "edge", a, "cells", b, "newEdge", c, "dx", d, "dy", e))
+  } finally {
+    this.model.endUpdate()
+  }
+  return c
+};
+mxGraph.prototype.toggleCells = function(a, b, c) {
+  null == b && (b = this.getSelectionCells());
+  c && (b = this.addAllEdges(b));
+  this.model.beginUpdate();
+  try {
+    this.cellsToggled(b, a), this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS, "show", a, "cells", b, "includeEdges", c))
+  } finally {
+    this.model.endUpdate()
+  }
+  return b
+};
+mxGraph.prototype.cellsToggled = function(a, b) {
+  if (null != a && 0 < a.length) {
+    this.model.beginUpdate();
+    try {
+      for (var c = 0; c < a.length; c++) this.model.setVisible(a[c], b)
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.foldCells = function(a, b, c, d) {
+  b = null != b ? b : !1;
+  null == c && (c = this.getFoldableCells(this.getSelectionCells(), a));
+  this.stopEditing(!1);
+  this.model.beginUpdate();
+  try {
+    this.cellsFolded(c, a, b, d), this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS, "collapse", a, "recurse", b, "cells", c))
+  } finally {
+    this.model.endUpdate()
+  }
+  return c
+};
+mxGraph.prototype.cellsFolded = function(a, b, c, d) {
+  if (null != a && 0 < a.length) {
+    this.model.beginUpdate();
+    try {
+      for (var e = 0; e < a.length; e++)
+        if ((!d || this.isCellFoldable(a[e], b)) && b != this.isCellCollapsed(a[e]))
+          if (this.model.setCollapsed(a[e], b), this.swapBounds(a[e], b), this.isExtendParent(a[e]) && this.extendParent(a[e]), c) {
+            var f = this.model.getChildren(a[e]);
+            this.foldCells(f, b, c)
+          }
+      this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED, "cells", a, "collapse", b, "recurse", c))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.swapBounds = function(a, b) {
+  if (null != a) {
+    var c = this.model.getGeometry(a);
+    null != c && (c = c.clone(), this.updateAlternateBounds(a, c, b), c.swap(), this.model.setGeometry(a, c))
+  }
+};
+mxGraph.prototype.updateAlternateBounds = function(a, b, c) {
+  if (null != a && null != b) {
+    c = this.view.getState(a);
+    c = null != c ? c.style : this.getCellStyle(a);
+    if (null == b.alternateBounds) {
+      var d = b;
+      this.collapseToPreferredSize && (a = this.getPreferredSizeForCell(a), null != a && (d = a, a = mxUtils.getValue(c, mxConstants.STYLE_STARTSIZE), 0 < a && (d.height = Math.max(d.height, a))));
+      b.alternateBounds = new mxRectangle(0, 0, d.width, d.height)
+    }
+    if (null != b.alternateBounds) {
+      b.alternateBounds.x = b.x;
+      b.alternateBounds.y = b.y;
+      var e = mxUtils.toRadians(c[mxConstants.STYLE_ROTATION] ||
+        "0");
+      0 != e && (a = b.alternateBounds.getCenterX() - b.getCenterX(), c = b.alternateBounds.getCenterY() - b.getCenterY(), d = Math.cos(e), e = Math.sin(e), b.alternateBounds.x += d * a - e * c - a,
+        b.alternateBounds.y += e * a + d * c - c)
+    }
+  }
+};
+mxGraph.prototype.addAllEdges = function(a) {
+  var b = a.slice();
+  return b = b.concat(this.getAllEdges(a))
+};
+mxGraph.prototype.getAllEdges = function(a) {
+  var b = [];
+  if (null != a)
+    for (var c = 0; c < a.length; c++) {
+      for (var d = this.model.getEdgeCount(a[c]), e = 0; e < d; e++) b.push(this.model.getEdgeAt(a[c], e));
+      d = this.model.getChildren(a[c]);
+      b = b.concat(this.getAllEdges(d))
+    }
+  return b
+};
+mxGraph.prototype.updateCellSize = function(a, b) {
+  b = null != b ? b : !1;
+  this.model.beginUpdate();
+  try {
+    this.cellSizeUpdated(a, b), this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE, "cell", a, "ignoreChildren", b))
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.cellSizeUpdated = function(a, b) {
+  if (null != a) {
+    this.model.beginUpdate();
+    try {
+      var c = this.getPreferredSizeForCell(a),
+        d = this.model.getGeometry(a);
+      if (null != c && null != d) {
+        var e = this.isCellCollapsed(a),
+          d = d.clone();
+        if (this.isSwimlane(a)) {
+          var f = this.view.getState(a),
+            g = null != f ? f.style : this.getCellStyle(a),
+            h = this.model.getStyle(a);
+          null == h && (h = "");
+          mxUtils.getValue(g, mxConstants.STYLE_HORIZONTAL, !0) ? (h = mxUtils.setStyle(h, mxConstants.STYLE_STARTSIZE, c.height + 8), e && (d.height = c.height + 8), d.width = c.width) :
+            (h = mxUtils.setStyle(h, mxConstants.STYLE_STARTSIZE, c.width + 8), e && (d.width = c.width + 8), d.height = c.height);
+          this.model.setStyle(a, h)
+        } else d.width = c.width, d.height = c.height;
+        if (!b && !e) {
+          var k = this.view.getBounds(this.model.getChildren(a));
+          if (null != k) {
+            var l = this.view.translate,
+              m = this.view.scale,
+              n = (k.y + k.height) / m - d.y - l.y;
+            d.width = Math.max(d.width, (k.x + k.width) / m - d.x - l.x);
+            d.height = Math.max(d.height, n)
+          }
+        }
+        this.cellsResized([a], [d])
+      }
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.getPreferredSizeForCell = function(a) {
+  var b = null;
+  if (null != a) {
+    var c = this.view.getState(a),
+      d = null != c ? c.style : this.getCellStyle(a);
+    if (null != d && !this.model.isEdge(a)) {
+      var e = d[mxConstants.STYLE_FONTSIZE] || mxConstants.DEFAULT_FONTSIZE,
+        f = 0,
+        b = 0;
+      if ((null != this.getImage(c) || null != d[mxConstants.STYLE_IMAGE]) && d[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_LABEL) d[mxConstants.STYLE_VERTICAL_ALIGN] == mxConstants.ALIGN_MIDDLE &&
+        (f += parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH]) || mxLabel.prototype.imageSize),
+        d[mxConstants.STYLE_ALIGN] != mxConstants.ALIGN_CENTER && (b += parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT]) || mxLabel.prototype.imageSize);
+      f += 2 * (d[mxConstants.STYLE_SPACING] || 0);
+      f += d[mxConstants.STYLE_SPACING_LEFT] || 0;
+      f += d[mxConstants.STYLE_SPACING_RIGHT] || 0;
+      b += 2 * (d[mxConstants.STYLE_SPACING] || 0);
+      b += d[mxConstants.STYLE_SPACING_TOP] || 0;
+      b += d[mxConstants.STYLE_SPACING_BOTTOM] || 0;
+      c = this.getFoldingImage(c);
+      null != c && (f += c.width + 8);
+      c = this.getLabel(a);
+      null != c && 0 < c.length ? (this.isHtmlLabel(a) || (c = c.replace(/\n/g,
+        "\x3cbr\x3e")), e = mxUtils.getSizeForString(c, e, d[mxConstants.STYLE_FONTFAMILY]), a = e.width + f, b = e.height + b, mxUtils.getValue(d, mxConstants.STYLE_HORIZONTAL, !0) || (d = b,
+        b = a, a = d), this.gridEnabled && (a = this.snap(a + this.gridSize / 2), b = this.snap(b + this.gridSize / 2)), b = new mxRectangle(0, 0, a, b)) : (d = 4 * this.gridSize, b = new mxRectangle(
+        0, 0, d, d))
+    }
+  }
+  return b
+};
+mxGraph.prototype.handleGesture = function(a, b) {
+  if (0.2 < Math.abs(1 - b.scale)) {
+    var c = this.view.scale,
+      d = this.view.translate,
+      e = a.width * b.scale,
+      f = a.height * b.scale,
+      g = a.y - (f - a.height) / 2,
+      c = new mxRectangle(this.snap((a.x - (e - a.width) / 2) / c) - d.x, this.snap(g / c) - d.y, this.snap(e / c), this.snap(f / c));
+    this.resizeCell(a.cell, c)
+  }
+};
+mxGraph.prototype.resizeCell = function(a, b) {
+  return this.resizeCells([a], [b])[0]
+};
+mxGraph.prototype.resizeCells = function(a, b) {
+  this.model.beginUpdate();
+  try {
+    this.cellsResized(a, b), this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS, "cells", a, "bounds", b))
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.cellsResized = function(a, b) {
+  if (null != a && null != b && a.length == b.length) {
+    this.model.beginUpdate();
+    try {
+      for (var c = 0; c < a.length; c++) {
+        var d = b[c],
+          e = this.model.getGeometry(a[c]);
+        if (null != e && (e.x != d.x || e.y != d.y || e.width != d.width || e.height != d.height)) {
+          e = e.clone();
+          if (e.relative) {
+            var f = e.offset;
+            null != f && (f.x += d.x - e.x, f.y += d.y - e.y)
+          } else e.x = d.x, e.y = d.y;
+          e.width = d.width;
+          e.height = d.height;
+          !e.relative && (this.model.isVertex(a[c]) && !this.isAllowNegativeCoordinates()) && (e.x = Math.max(0, e.x), e.y = Math.max(0,
+            e.y));
+          this.model.setGeometry(a[c], e);
+          this.isExtendParent(a[c]) && this.extendParent(a[c])
+        }
+      }
+      this.resetEdgesOnResize && this.resetEdges(a);
+      this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED, "cells", a, "bounds", b))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.extendParent = function(a) {
+  if (null != a) {
+    var b = this.model.getParent(a),
+      c = this.model.getGeometry(b);
+    if (null != b && (null != c && !this.isCellCollapsed(b)) && (a = this.model.getGeometry(a), null != a && (c.width < a.x + a.width || c.height < a.y + a.height))) c = c.clone(), c.width = Math.max(
+      c.width, a.x + a.width), c.height = Math.max(c.height, a.y + a.height), this.cellsResized([b], [c])
+  }
+};
+mxGraph.prototype.importCells = function(a, b, c, d, e) {
+  return this.moveCells(a, b, c, !0, d, e)
+};
+mxGraph.prototype.moveCells = function(a, b, c, d, e, f) {
+  b = null != b ? b : 0;
+  c = null != c ? c : 0;
+  d = null != d ? d : !1;
+  if (null != a && (0 != b || 0 != c || d || null != e)) {
+    this.model.beginUpdate();
+    try {
+      d && (a = this.cloneCells(a, this.isCloneInvalidEdges()), null == e && (e = this.getDefaultParent()));
+      var g = this.isAllowNegativeCoordinates();
+      null != e && this.setAllowNegativeCoordinates(!0);
+      this.cellsMoved(a, b, c, !d && this.isDisconnectOnMove() && this.isAllowDanglingEdges(), null == e);
+      this.setAllowNegativeCoordinates(g);
+      if (null != e) {
+        var h = this.model.getChildCount(e);
+        this.cellsAdded(a, e, h, null, null, !0)
+      }
+      this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS, "cells", a, "dx", b, "dy", c, "clone", d, "target", e, "event", f))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+  return a
+};
+mxGraph.prototype.cellsMoved = function(a, b, c, d, e) {
+  if (null != a && (0 != b || 0 != c)) {
+    this.model.beginUpdate();
+    try {
+      d && this.disconnectGraph(a);
+      for (var f = 0; f < a.length; f++) this.translateCell(a[f], b, c), e && this.constrainChild(a[f]);
+      this.resetEdgesOnMove && this.resetEdges(a);
+      this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED, "cells", a, "dx", c, "dy", c, "disconnect", d))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.translateCell = function(a, b, c) {
+  var d = this.model.getGeometry(a);
+  null != d && (d = d.clone(), d.translate(b, c), !d.relative && (this.model.isVertex(a) && !this.isAllowNegativeCoordinates()) && (d.x = Math.max(0, d.x), d.y = Math.max(0, d.y)), d.relative && !
+    this.model.isEdge(a) && (null == d.offset ? d.offset = new mxPoint(b, c) : (d.offset.x += b, d.offset.y += c)), this.model.setGeometry(a, d))
+};
+mxGraph.prototype.getCellContainmentArea = function(a) {
+  if (null != a && !this.model.isEdge(a)) {
+    var b = this.model.getParent(a);
+    if (b == this.getDefaultParent() || b == this.getCurrentRoot()) return this.getMaximumGraphBounds();
+    if (null != b && b != this.getDefaultParent()) {
+      var c = this.model.getGeometry(b);
+      if (null != c) {
+        var d = a = 0,
+          e = c.width,
+          c = c.height;
+        this.isSwimlane(b) && (b = this.getStartSize(b), a = b.width, e -= b.width, d = b.height, c -= b.height);
+        return new mxRectangle(a, d, e, c)
+      }
+    }
+  }
+  return null
+};
+mxGraph.prototype.getMaximumGraphBounds = function() {
+  return this.maximumGraphBounds
+};
+mxGraph.prototype.constrainChild = function(a) {
+  if (null != a) {
+    var b = this.model.getGeometry(a),
+      c = this.isConstrainChild(a) ? this.getCellContainmentArea(a) : this.getMaximumGraphBounds();
+    if (null != b && null != c && !b.relative && (b.x < c.x || b.y < c.y || c.width < b.x + b.width || c.height < b.y + b.height)) a = this.getOverlap(a), 0 < c.width && (b.x = Math.min(b.x, c.x +
+      c.width - (1 - a) * b.width)), 0 < c.height && (b.y = Math.min(b.y, c.y + c.height - (1 - a) * b.height)), b.x = Math.max(b.x, c.x - b.width * a), b.y = Math.max(b.y, c.y - b.height * a)
+  }
+};
+mxGraph.prototype.resetEdges = function(a) {
+  if (null != a) {
+    for (var b = {}, c = 0; c < a.length; c++) {
+      var d = mxCellPath.create(a[c]);
+      b[d] = a[c]
+    }
+    this.model.beginUpdate();
+    try {
+      for (c = 0; c < a.length; c++) {
+        var e = this.model.getEdges(a[c]);
+        if (null != e)
+          for (d = 0; d < e.length; d++) {
+            var f = this.view.getState(e[d]),
+              g = null != f ? f.getVisibleTerminal(!0) : this.view.getVisibleTerminal(e[d], !0),
+              h = null != f ? f.getVisibleTerminal(!1) : this.view.getVisibleTerminal(e[d], !1),
+              k = mxCellPath.create(g),
+              l = mxCellPath.create(h);
+            (null == b[k] || null == b[l]) && this.resetEdge(e[d])
+          }
+        this.resetEdges(this.model.getChildren(a[c]))
+      }
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.resetEdge = function(a) {
+  var b = this.model.getGeometry(a);
+  null != b && (null != b.points && 0 < b.points.length) && (b = b.clone(), b.points = [], this.model.setGeometry(a, b));
+  return a
+};
+mxGraph.prototype.getAllConnectionConstraints = function(a, b) {
+  return null != a && null != a.shape && null != a.shape.stencil ? a.shape.stencil.constraints : null
+};
+mxGraph.prototype.getConnectionConstraint = function(a, b, c) {
+  b = null;
+  var d = a.style[c ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X];
+  if (null != d) {
+    var e = a.style[c ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y];
+    null != e && (b = new mxPoint(parseFloat(d), parseFloat(e)))
+  }
+  d = !1;
+  null != b && (d = mxUtils.getValue(a.style, c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, !0));
+  return new mxConnectionConstraint(b, d)
+};
+mxGraph.prototype.setConnectionConstraint = function(a, b, c, d) {
+  if (null != d) {
+    this.model.beginUpdate();
+    try {
+      null == d || null == d.point ? (this.setCellStyles(c ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X, null, [a]), this.setCellStyles(c ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y,
+        null, [a]), this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, null, [a])) : null != d.point && (this.setCellStyles(c ? mxConstants.STYLE_EXIT_X :
+        mxConstants.STYLE_ENTRY_X, d.point.x, [a]), this.setCellStyles(c ?
+        mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y, d.point.y, [a]), d.perimeter ? this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, null, [
+        a
+      ]) : this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, "0", [a]))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.getConnectionPoint = function(a, b) {
+  var c = null;
+  if (null != a) {
+    var d = this.view.getPerimeterBounds(a),
+      e = new mxPoint(d.getCenterX(), d.getCenterY()),
+      f = a.style[mxConstants.STYLE_DIRECTION],
+      g = 0;
+    if (null != f && ("north" == f ? g += 270 : "west" == f ? g += 180 : "south" == f && (g += 90), "north" == f || "south" == f)) {
+      d.x += d.width / 2 - d.height / 2;
+      d.y += d.height / 2 - d.width / 2;
+      var h = d.width;
+      d.width = d.height;
+      d.height = h
+    }
+    if (null != b.point) {
+      var k = c = 1,
+        l = 0,
+        m = 0;
+      if (this.getModel().isVertex(a.cell)) {
+        var n = a.style[mxConstants.STYLE_FLIPH],
+          p =
+          a.style[mxConstants.STYLE_FLIPV];
+        null != a.shape.stencil && (n = 1 == mxUtils.getValue(a.style, "stencilFlipH", 0) || n, p = 1 == mxUtils.getValue(a.style, "stencilFlipV", 0) || p);
+        if ("north" == f || "south" == f) h = n, n = p, p = h;
+        n && (c = -1, l = -d.width);
+        p && (k = -1, m = -d.height)
+      }
+      c = new mxPoint(d.x + b.point.x * d.width * c - l, d.y + b.point.y * d.height * k - m)
+    }
+    f = a.style[mxConstants.STYLE_ROTATION] || 0;
+    b.perimeter ? (0 != g && null != c && (h = d = 0, 90 == g ? h = 1 : 180 == g ? d = -1 : 270 == f && (h = -1), c = mxUtils.getRotatedPoint(c, d, h, e)), null != c && b.perimeter && (c = this.view
+      .getPerimeterPoint(a,
+        c, !1))) : f += g;
+    0 != f && null != c && (g = mxUtils.toRadians(f), d = Math.cos(g), h = Math.sin(g), c = mxUtils.getRotatedPoint(c, d, h, e))
+  }
+  return c
+};
+mxGraph.prototype.connectCell = function(a, b, c, d) {
+  this.model.beginUpdate();
+  try {
+    var e = this.model.getTerminal(a, c);
+    this.cellConnected(a, b, c, d);
+    this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL, "edge", a, "terminal", b, "source", c, "previous", e))
+  } finally {
+    this.model.endUpdate()
+  }
+  return a
+};
+mxGraph.prototype.cellConnected = function(a, b, c, d) {
+  if (null != a) {
+    this.model.beginUpdate();
+    try {
+      var e = this.model.getTerminal(a, c);
+      this.setConnectionConstraint(a, b, c, d);
+      this.isPortsEnabled() && (d = null, this.isPort(b) && (d = b.getId(), b = this.getTerminalForPort(b, c)), this.setCellStyles(c ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT,
+        d, [a]));
+      this.model.setTerminal(a, b, c);
+      this.resetEdgesOnConnect && this.resetEdge(a);
+      this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED, "edge", a, "terminal", b, "source",
+        c, "previous", e))
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.disconnectGraph = function(a) {
+  if (null != a) {
+    this.model.beginUpdate();
+    try {
+      for (var b = this.view.scale, c = this.view.translate, d = {}, e = 0; e < a.length; e++) {
+        var f = mxCellPath.create(a[e]);
+        d[f] = a[e]
+      }
+      for (e = 0; e < a.length; e++)
+        if (this.model.isEdge(a[e])) {
+          var g = this.model.getGeometry(a[e]);
+          if (null != g) {
+            var h = this.view.getState(a[e]),
+              k = this.view.getState(this.model.getParent(a[e]));
+            if (null != h && null != k) {
+              var g = g.clone(),
+                l = -k.origin.x,
+                m = -k.origin.y,
+                n = h.absolutePoints,
+                p = this.model.getTerminal(a[e], !0);
+              if (null !=
+                p && this.isCellDisconnectable(a[e], p, !0)) {
+                for (var q = mxCellPath.create(p); null != p && null == d[q];) p = this.model.getParent(p), q = mxCellPath.create(p);
+                null == p && (g.setTerminalPoint(new mxPoint(n[0].x / b - c.x + l, n[0].y / b - c.y + m), !0), this.model.setTerminal(a[e], null, !0))
+              }
+              var s = this.model.getTerminal(a[e], !1);
+              if (null != s && this.isCellDisconnectable(a[e], s, !1)) {
+                for (var r = mxCellPath.create(s); null != s && null == d[r];) s = this.model.getParent(s), r = mxCellPath.create(s);
+                if (null == s) {
+                  var t = n.length - 1;
+                  g.setTerminalPoint(new mxPoint(n[t].x /
+                    b - c.x + l, n[t].y / b - c.y + m), !1);
+                  this.model.setTerminal(a[e], null, !1)
+                }
+              }
+              this.model.setGeometry(a[e], g)
+            }
+          }
+        }
+    } finally {
+      this.model.endUpdate()
+    }
+  }
+};
+mxGraph.prototype.getCurrentRoot = function() {
+  return this.view.currentRoot
+};
+mxGraph.prototype.getTranslateForRoot = function(a) {
+  return null
+};
+mxGraph.prototype.isPort = function(a) {
+  return !1
+};
+mxGraph.prototype.getTerminalForPort = function(a, b) {
+  return this.model.getParent(a)
+};
+mxGraph.prototype.getChildOffsetForCell = function(a) {
+  return null
+};
+mxGraph.prototype.enterGroup = function(a) {
+  a = a || this.getSelectionCell();
+  null != a && this.isValidRoot(a) && (this.view.setCurrentRoot(a), this.clearSelection())
+};
+mxGraph.prototype.exitGroup = function() {
+  var a = this.model.getRoot(),
+    b = this.getCurrentRoot();
+  if (null != b) {
+    for (var c = this.model.getParent(b); c != a && !this.isValidRoot(c) && this.model.getParent(c) != a;) c = this.model.getParent(c);
+    c == a || this.model.getParent(c) == a ? this.view.setCurrentRoot(null) : this.view.setCurrentRoot(c);
+    null != this.view.getState(b) && this.setSelectionCell(b)
+  }
+};
+mxGraph.prototype.home = function() {
+  var a = this.getCurrentRoot();
+  null != a && (this.view.setCurrentRoot(null), null != this.view.getState(a) && this.setSelectionCell(a))
+};
+mxGraph.prototype.isValidRoot = function(a) {
+  return null != a
+};
+mxGraph.prototype.getGraphBounds = function() {
+  return this.view.getGraphBounds()
+};
+mxGraph.prototype.getCellBounds = function(a, b, c) {
+  var d = [a];
+  b && (d = d.concat(this.model.getEdges(a)));
+  d = this.view.getBounds(d);
+  if (c) {
+    c = this.model.getChildCount(a);
+    for (var e = 0; e < c; e++) {
+      var f = this.getCellBounds(this.model.getChildAt(a, e), b, !0);
+      null != d ? d.add(f) : d = f
+    }
+  }
+  return d
+};
+mxGraph.prototype.getBoundingBoxFromGeometry = function(a, b) {
+  b = null != b ? b : !1;
+  var c = null;
+  if (null != a)
+    for (var d = 0; d < a.length; d++)
+      if (b || this.model.isVertex(a[d])) {
+        var e = this.getCellGeometry(a[d]);
+        if (null != e) {
+          var f = e.points;
+          if (null != f && 0 < f.length) {
+            for (var g = new mxRectangle(f[0].x, f[0].y, 0, 0), h = function(a) {
+                null != a && g.add(new mxRectangle(a.x, a.y, 0, 0))
+              }, k = 1; k < f.length; k++) h(f[k]);
+            h(e.getTerminalPoint(!0));
+            h(e.getTerminalPoint(!1))
+          }
+          null == c ? c = new mxRectangle(e.x, e.y, e.width, e.height) : c.add(e)
+        }
+      }
+  return c
+};
+mxGraph.prototype.refresh = function(a) {
+  this.view.clear(a, null == a);
+  this.view.validate();
+  this.sizeDidChange();
+  this.fireEvent(new mxEventObject(mxEvent.REFRESH))
+};
+mxGraph.prototype.snap = function(a) {
+  this.gridEnabled && (a = Math.round(a / this.gridSize) * this.gridSize);
+  return a
+};
+mxGraph.prototype.panGraph = function(a, b) {
+  if (this.useScrollbarsForPanning && mxUtils.hasScrollbars(this.container)) this.container.scrollLeft = -a, this.container.scrollTop = -b;
+  else {
+    var c = this.view.getCanvas();
+    if (this.dialect == mxConstants.DIALECT_SVG)
+      if (0 == a && 0 == b) {
+        if (mxClient.IS_IE ? c.setAttribute("transform", "translate(" + a + "," + b + ")") : c.removeAttribute("transform"), null != this.shiftPreview1) {
+          for (var d = this.shiftPreview1.firstChild; null != d;) {
+            var e = d.nextSibling;
+            this.container.appendChild(d);
+            d = e
+          }
+          this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);
+          this.shiftPreview1 = null;
+          this.container.appendChild(c.parentNode);
+          for (d = this.shiftPreview2.firstChild; null != d;) e = d.nextSibling, this.container.appendChild(d), d = e;
+          this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);
+          this.shiftPreview2 = null
+        }
+      } else {
+        c.setAttribute("transform", "translate(" + a + "," + b + ")");
+        if (null == this.shiftPreview1) {
+          this.shiftPreview1 = document.createElement("div");
+          this.shiftPreview1.style.position = "absolute";
+          this.shiftPreview1.style.overflow = "visible";
+          this.shiftPreview2 = document.createElement("div");
+          this.shiftPreview2.style.position = "absolute";
+          this.shiftPreview2.style.overflow = "visible";
+          for (var f = this.shiftPreview1, d = this.container.firstChild; null != d;) e = d.nextSibling, d != c.parentNode ? f.appendChild(d) : f = this.shiftPreview2, d = e;
+          this.container.insertBefore(this.shiftPreview1, c.parentNode);
+          this.container.appendChild(this.shiftPreview2)
+        }
+        this.shiftPreview1.style.left = a + "px";
+        this.shiftPreview1.style.top = b + "px";
+        this.shiftPreview2.style.left = a + "px";
+        this.shiftPreview2.style.top = b + "px"
+      } else c.style.left =
+      a + "px", c.style.top = b + "px";
+    this.panDx = a;
+    this.panDy = b;
+    this.fireEvent(new mxEventObject(mxEvent.PAN))
+  }
+};
+mxGraph.prototype.zoomIn = function() {
+  this.zoom(this.zoomFactor)
+};
+mxGraph.prototype.zoomOut = function() {
+  this.zoom(1 / this.zoomFactor)
+};
+mxGraph.prototype.zoomActual = function() {
+  1 == this.view.scale ? this.view.setTranslate(0, 0) : (this.view.translate.x = 0, this.view.translate.y = 0, this.view.setScale(1))
+};
+mxGraph.prototype.zoomTo = function(a, b) {
+  this.zoom(a / this.view.scale, b)
+};
+mxGraph.prototype.zoom = function(a, b) {
+  b = null != b ? b : this.centerZoom;
+  var c = this.view.scale * a,
+    d = this.view.getState(this.getSelectionCell());
+  if (this.keepSelectionVisibleOnZoom && null != d) d = new mxRectangle(d.x * a, d.y * a, d.width * a, d.height * a), this.view.scale = c, this.scrollRectToVisible(d) || (this.view.revalidate(),
+    this.view.setScale(c));
+  else if (b && !mxUtils.hasScrollbars(this.container)) {
+    var d = this.container.offsetWidth,
+      e = this.container.offsetHeight;
+    if (1 < a) var f = (a - 1) / (2 * c),
+      d = d * -f,
+      e = e * -f;
+    else f = (1 / a - 1) / (2 * this.view.scale),
+      d *= f, e *= f;
+    this.view.scaleAndTranslate(c, this.view.translate.x + d, this.view.translate.y + e)
+  } else this.view.setScale(c), mxUtils.hasScrollbars(this.container) && (e = d = 0, b && (d = this.container.offsetWidth * (a - 1) / 2, e = this.container.offsetHeight * (a - 1) / 2), this.container
+    .scrollLeft = Math.round(this.container.scrollLeft * a + d), this.container.scrollTop = Math.round(this.container.scrollTop * a + e))
+};
+mxGraph.prototype.zoomToRect = function(a) {
+  var b = this.container.clientWidth / a.width / (this.container.clientHeight / a.height);
+  a.x = Math.max(0, a.x);
+  a.y = Math.max(0, a.y);
+  var c = Math.min(this.container.scrollWidth, a.x + a.width),
+    d = Math.min(this.container.scrollHeight, a.y + a.height);
+  a.width = c - a.x;
+  a.height = d - a.y;
+  1 > b ? (b = a.height / b, c = (b - a.height) / 2, a.height = b, b = Math.min(a.y, c), a.y -= b, d = Math.min(this.container.scrollHeight, a.y + a.height), a.height = d - a.y) : (b *= a.width, c =
+    (b - a.width) / 2, a.width = b, b = Math.min(a.x, c), a.x -= b,
+    c = Math.min(this.container.scrollWidth, a.x + a.width), a.width = c - a.x);
+  b = this.container.clientWidth / a.width;
+  c = this.view.scale * b;
+  mxUtils.hasScrollbars(this.container) ? (this.view.setScale(c), this.container.scrollLeft = Math.round(a.x * b), this.container.scrollTop = Math.round(a.y * b)) : this.view.scaleAndTranslate(c,
+    this.view.translate.x - a.x / this.view.scale, this.view.translate.y - a.y / this.view.scale)
+};
+mxGraph.prototype.fit = function(a, b) {
+  if (null != this.container) {
+    a = null != a ? a : 0;
+    b = null != b ? b : !1;
+    var c = this.container.clientWidth,
+      d = this.container.clientHeight,
+      e = this.view.getGraphBounds();
+    b && (null != e.x && null != e.y) && (e.width += e.x, e.height += e.y, e.x = 0, e.y = 0);
+    var f = this.view.scale,
+      g = e.width / f,
+      h = e.height / f;
+    null != this.backgroundImage && (g = Math.max(g, this.backgroundImage.width - e.x / f), h = Math.max(h, this.backgroundImage.height - e.y / f));
+    var k = b ? a : 2 * a,
+      c = Math.floor(100 * Math.min(c / (g + k), d / (h + k))) / 100;
+    null != this.minFitScale &&
+      (c = Math.max(c, this.minFitScale));
+    null != this.maxFitScale && (c = Math.min(c, this.maxFitScale));
+    b ? this.view.scale != c && this.view.setScale(c) : mxUtils.hasScrollbars(this.container) ? (this.view.setScale(c), null != e.x && (this.container.scrollLeft = Math.round(e.x / f) * c - a -
+        Math.max(0, (this.container.clientWidth - g * c) / 2)), null != e.y && (this.container.scrollTop = Math.round(e.y / f) * c - a - Math.max(0, (this.container.clientHeight - h * c) / 2))) :
+      this.view.scaleAndTranslate(c, null != e.x ? Math.floor(this.view.translate.x - e.x / f + a + 1) : a, null !=
+        e.y ? Math.floor(this.view.translate.y - e.y / f + a + 1) : a)
+  }
+  return this.view.scale
+};
+mxGraph.prototype.scrollCellToVisible = function(a, b) {
+  var c = -this.view.translate.x,
+    d = -this.view.translate.y,
+    e = this.view.getState(a);
+  null != e && (c = new mxRectangle(c + e.x, d + e.y, e.width, e.height), b && null != this.container && (d = this.container.clientWidth, e = this.container.clientHeight, c.x = c.getCenterX() - d /
+    2, c.width = d, c.y = c.getCenterY() - e / 2, c.height = e), this.scrollRectToVisible(c) && this.view.setTranslate(this.view.translate.x, this.view.translate.y))
+};
+mxGraph.prototype.scrollRectToVisible = function(a) {
+  var b = !1;
+  if (null != a) {
+    var c = this.container.offsetWidth,
+      d = this.container.offsetHeight,
+      e = Math.min(c, a.width),
+      f = Math.min(d, a.height);
+    if (mxUtils.hasScrollbars(this.container)) {
+      c = this.container;
+      a.x += this.view.translate.x;
+      a.y += this.view.translate.y;
+      var g = c.scrollLeft - a.x,
+        d = Math.max(g - c.scrollLeft, 0);
+      0 < g ? c.scrollLeft -= g + 2 : (g = a.x + e - c.scrollLeft - c.clientWidth, 0 < g && (c.scrollLeft += g + 2));
+      e = c.scrollTop - a.y;
+      g = Math.max(0, e - c.scrollTop);
+      0 < e ? c.scrollTop -= e + 2 : (e = a.y +
+        f - c.scrollTop - c.clientHeight, 0 < e && (c.scrollTop += e + 2));
+      !this.useScrollbarsForPanning && (0 != d || 0 != g) && this.view.setTranslate(d, g)
+    } else {
+      var g = -this.view.translate.x,
+        h = -this.view.translate.y,
+        k = this.view.scale;
+      a.x + e > g + c && (this.view.translate.x -= (a.x + e - c - g) / k, b = !0);
+      a.y + f > h + d && (this.view.translate.y -= (a.y + f - d - h) / k, b = !0);
+      a.x < g && (this.view.translate.x += (g - a.x) / k, b = !0);
+      a.y < h && (this.view.translate.y += (h - a.y) / k, b = !0);
+      b && (this.view.refresh(), null != this.selectionCellsHandler && this.selectionCellsHandler.refresh())
+    }
+  }
+  return b
+};
+mxGraph.prototype.getCellGeometry = function(a) {
+  return this.model.getGeometry(a)
+};
+mxGraph.prototype.isCellVisible = function(a) {
+  return this.model.isVisible(a)
+};
+mxGraph.prototype.isCellCollapsed = function(a) {
+  return this.model.isCollapsed(a)
+};
+mxGraph.prototype.isCellConnectable = function(a) {
+  return this.model.isConnectable(a)
+};
+mxGraph.prototype.isOrthogonal = function(a) {
+  var b = a.style[mxConstants.STYLE_ORTHOGONAL];
+  if (null != b) return b;
+  a = this.view.getEdgeStyle(a);
+  return a == mxEdgeStyle.SegmentConnector || a == mxEdgeStyle.ElbowConnector || a == mxEdgeStyle.SideToSide || a == mxEdgeStyle.TopToBottom || a == mxEdgeStyle.EntityRelation || a == mxEdgeStyle.OrthConnector
+};
+mxGraph.prototype.isLoop = function(a) {
+  var b = a.getVisibleTerminalState(!0);
+  a = a.getVisibleTerminalState(!1);
+  return null != b && b == a
+};
+mxGraph.prototype.isCloneEvent = function(a) {
+  return mxEvent.isControlDown(a)
+};
+mxGraph.prototype.isToggleEvent = function(a) {
+  return mxClient.IS_MAC ? mxEvent.isMetaDown(a) : mxEvent.isControlDown(a)
+};
+mxGraph.prototype.isGridEnabledEvent = function(a) {
+  return null != a && !mxEvent.isAltDown(a)
+};
+mxGraph.prototype.isConstrainedEvent = function(a) {
+  return mxEvent.isShiftDown(a)
+};
+mxGraph.prototype.isForceMarqueeEvent = function(a) {
+  return mxEvent.isAltDown(a)
+};
+mxGraph.prototype.validationAlert = function(a) {
+  mxUtils.alert(a)
+};
+mxGraph.prototype.isEdgeValid = function(a, b, c) {
+  return null == this.getEdgeValidationError(a, b, c)
+};
+mxGraph.prototype.getEdgeValidationError = function(a, b, c) {
+  if (null != a && !this.isAllowDanglingEdges() && (null == b || null == c)) return "";
+  if (null != a && null == this.model.getTerminal(a, !0) && null == this.model.getTerminal(a, !1)) return null;
+  if (!this.allowLoops && b == c && null != b || !this.isValidConnection(b, c)) return "";
+  if (null != b && null != c) {
+    var d = "";
+    if (!this.multigraph) {
+      var e = this.model.getEdgesBetween(b, c, !0);
+      if (1 < e.length || 1 == e.length && e[0] != a) d += (mxResources.get(this.alreadyConnectedResource) || this.alreadyConnectedResource) +
+        "\n"
+    }
+    var e = this.model.getDirectedEdgeCount(b, !0, a),
+      f = this.model.getDirectedEdgeCount(c, !1, a);
+    if (null != this.multiplicities)
+      for (var g = 0; g < this.multiplicities.length; g++) {
+        var h = this.multiplicities[g].check(this, a, b, c, e, f);
+        null != h && (d += h)
+      }
+    h = this.validateEdge(a, b, c);
+    null != h && (d += h);
+    return 0 < d.length ? d : null
+  }
+  return this.allowDanglingEdges ? null : ""
+};
+mxGraph.prototype.validateEdge = function(a, b, c) {
+  return null
+};
+mxGraph.prototype.validateGraph = function(a, b) {
+  a = null != a ? a : this.model.getRoot();
+  b = null != b ? b : {};
+  for (var c = !0, d = this.model.getChildCount(a), e = 0; e < d; e++) {
+    var f = this.model.getChildAt(a, e),
+      g = b;
+    this.isValidRoot(f) && (g = {});
+    g = this.validateGraph(f, g);
+    null != g ? this.setCellWarning(f, g.replace(/\n/g, "\x3cbr\x3e")) : this.setCellWarning(f, null);
+    c = c && null == g
+  }
+  d = "";
+  this.isCellCollapsed(a) && !c && (d += (mxResources.get(this.containsValidationErrorsResource) || this.containsValidationErrorsResource) + "\n");
+  d = this.model.isEdge(a) ?
+    d + (this.getEdgeValidationError(a, this.model.getTerminal(a, !0), this.model.getTerminal(a, !1)) || "") : d + (this.getCellValidationError(a) || "");
+  e = this.validateCell(a, b);
+  null != e && (d += e);
+  null == this.model.getParent(a) && this.view.validate();
+  return 0 < d.length || !c ? d : null
+};
+mxGraph.prototype.getCellValidationError = function(a) {
+  var b = this.model.getDirectedEdgeCount(a, !0),
+    c = this.model.getDirectedEdgeCount(a, !1);
+  a = this.model.getValue(a);
+  var d = "";
+  if (null != this.multiplicities)
+    for (var e = 0; e < this.multiplicities.length; e++) {
+      var f = this.multiplicities[e];
+      if (f.source && mxUtils.isNode(a, f.type, f.attr, f.value) && (0 == f.max && 0 < b || 1 == f.min && 0 == b || 1 == f.max && 1 < b)) d += f.countError + "\n";
+      else if (!f.source && mxUtils.isNode(a, f.type, f.attr, f.value) && (0 == f.max && 0 < c || 1 == f.min && 0 == c || 1 == f.max && 1 <
+          c)) d += f.countError + "\n"
+    }
+  return 0 < d.length ? d : null
+};
+mxGraph.prototype.validateCell = function(a, b) {
+  return null
+};
+mxGraph.prototype.getBackgroundImage = function() {
+  return this.backgroundImage
+};
+mxGraph.prototype.setBackgroundImage = function(a) {
+  this.backgroundImage = a
+};
+mxGraph.prototype.getFoldingImage = function(a) {
+  if (null != a && this.foldingEnabled && !this.getModel().isEdge(a.cell)) {
+    var b = this.isCellCollapsed(a.cell);
+    if (this.isCellFoldable(a.cell, !b)) return b ? this.collapsedImage : this.expandedImage
+  }
+  return null
+};
+mxGraph.prototype.convertValueToString = function(a) {
+  a = this.model.getValue(a);
+  if (null != a) {
+    if (mxUtils.isNode(a)) return a.nodeName;
+    if ("function" == typeof a.toString) return a.toString()
+  }
+  return ""
+};
+mxGraph.prototype.getLabel = function(a) {
+  var b = "";
+  if (this.labelsVisible && null != a) {
+    var c = this.view.getState(a),
+      c = null != c ? c.style : this.getCellStyle(a);
+    mxUtils.getValue(c, mxConstants.STYLE_NOLABEL, !1) || (b = this.convertValueToString(a))
+  }
+  return b
+};
+mxGraph.prototype.isHtmlLabel = function(a) {
+  return this.isHtmlLabels()
+};
+mxGraph.prototype.isHtmlLabels = function() {
+  return this.htmlLabels
+};
+mxGraph.prototype.setHtmlLabels = function(a) {
+  this.htmlLabels = a
+};
+mxGraph.prototype.isWrapping = function(a) {
+  var b = this.view.getState(a);
+  a = null != b ? b.style : this.getCellStyle(a);
+  return null != a ? "wrap" == a[mxConstants.STYLE_WHITE_SPACE] : !1
+};
+mxGraph.prototype.isLabelClipped = function(a) {
+  var b = this.view.getState(a);
+  a = null != b ? b.style : this.getCellStyle(a);
+  return null != a ? "hidden" == a[mxConstants.STYLE_OVERFLOW] : !1
+};
+mxGraph.prototype.getTooltip = function(a, b, c, d) {
+  var e = null;
+  if (null != a) {
+    if (null != a.control && (b == a.control.node || b.parentNode == a.control.node)) e = this.collapseExpandResource, e = mxResources.get(e) || e;
+    null == e && null != a.overlays && a.overlays.visit(function(a, c) {
+      if (null == e && (b == c.node || b.parentNode == c.node)) e = c.overlay.toString()
+    });
+    null == e && (c = this.selectionCellsHandler.getHandler(a.cell), null != c && "function" == typeof c.getTooltipForNode && (e = c.getTooltipForNode(b)));
+    null == e && (e = this.getTooltipForCell(a.cell))
+  }
+  return e
+};
+mxGraph.prototype.getTooltipForCell = function(a) {
+  var b = null;
+  return b = null != a && null != a.getTooltip ? a.getTooltip() : this.convertValueToString(a)
+};
+mxGraph.prototype.getCursorForCell = function(a) {
+  return null
+};
+mxGraph.prototype.getStartSize = function(a) {
+  var b = new mxRectangle,
+    c = this.view.getState(a);
+  a = null != c ? c.style : this.getCellStyle(a);
+  null != a && (c = parseInt(mxUtils.getValue(a, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)), mxUtils.getValue(a, mxConstants.STYLE_HORIZONTAL, !0) ? b.height = c : b.width = c);
+  return b
+};
+mxGraph.prototype.getImage = function(a) {
+  return null != a && null != a.style ? a.style[mxConstants.STYLE_IMAGE] : null
+};
+mxGraph.prototype.getVerticalAlign = function(a) {
+  return null != a && null != a.style ? a.style[mxConstants.STYLE_VERTICAL_ALIGN] || mxConstants.ALIGN_MIDDLE : null
+};
+mxGraph.prototype.getIndicatorColor = function(a) {
+  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_COLOR] : null
+};
+mxGraph.prototype.getIndicatorGradientColor = function(a) {
+  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR] : null
+};
+mxGraph.prototype.getIndicatorShape = function(a) {
+  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_SHAPE] : null
+};
+mxGraph.prototype.getIndicatorImage = function(a) {
+  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_IMAGE] : null
+};
+mxGraph.prototype.getBorder = function() {
+  return this.border
+};
+mxGraph.prototype.setBorder = function(a) {
+  this.border = a
+};
+mxGraph.prototype.isSwimlane = function(a) {
+  if (null != a && this.model.getParent(a) != this.model.getRoot()) {
+    var b = this.view.getState(a),
+      b = null != b ? b.style : this.getCellStyle(a);
+    if (null != b && !this.model.isEdge(a)) return b[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_SWIMLANE
+  }
+  return !1
+};
+mxGraph.prototype.isResizeContainer = function() {
+  return this.resizeContainer
+};
+mxGraph.prototype.setResizeContainer = function(a) {
+  this.resizeContainer = a
+};
+mxGraph.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxGraph.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxGraph.prototype.isEscapeEnabled = function() {
+  return this.escapeEnabled
+};
+mxGraph.prototype.setEscapeEnabled = function(a) {
+  this.escapeEnabled = a
+};
+mxGraph.prototype.isInvokesStopCellEditing = function() {
+  return this.invokesStopCellEditing
+};
+mxGraph.prototype.setInvokesStopCellEditing = function(a) {
+  this.invokesStopCellEditing = a
+};
+mxGraph.prototype.isEnterStopsCellEditing = function() {
+  return this.enterStopsCellEditing
+};
+mxGraph.prototype.setEnterStopsCellEditing = function(a) {
+  this.enterStopsCellEditing = a
+};
+mxGraph.prototype.isCellLocked = function(a) {
+  var b = this.model.getGeometry(a);
+  return this.isCellsLocked() || null != b && this.model.isVertex(a) && b.relative
+};
+mxGraph.prototype.isCellsLocked = function() {
+  return this.cellsLocked
+};
+mxGraph.prototype.setCellsLocked = function(a) {
+  this.cellsLocked = a
+};
+mxGraph.prototype.getCloneableCells = function(a) {
+  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
+    return this.isCellCloneable(a)
+  }))
+};
+mxGraph.prototype.isCellCloneable = function(a) {
+  var b = this.view.getState(a);
+  a = null != b ? b.style : this.getCellStyle(a);
+  return this.isCellsCloneable() && 0 != a[mxConstants.STYLE_CLONEABLE]
+};
+mxGraph.prototype.isCellsCloneable = function() {
+  return this.cellsCloneable
+};
+mxGraph.prototype.setCellsCloneable = function(a) {
+  this.cellsCloneable = a
+};
+mxGraph.prototype.getExportableCells = function(a) {
+  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
+    return this.canExportCell(a)
+  }))
+};
+mxGraph.prototype.canExportCell = function(a) {
+  return this.exportEnabled
+};
+mxGraph.prototype.getImportableCells = function(a) {
+  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
+    return this.canImportCell(a)
+  }))
+};
+mxGraph.prototype.canImportCell = function(a) {
+  return this.importEnabled
+};
+mxGraph.prototype.isCellSelectable = function(a) {
+  return this.isCellsSelectable()
+};
+mxGraph.prototype.isCellsSelectable = function() {
+  return this.cellsSelectable
+};
+mxGraph.prototype.setCellsSelectable = function(a) {
+  this.cellsSelectable = a
+};
+mxGraph.prototype.getDeletableCells = function(a) {
+  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
+    return this.isCellDeletable(a)
+  }))
+};
+mxGraph.prototype.isCellDeletable = function(a) {
+  var b = this.view.getState(a);
+  a = null != b ? b.style : this.getCellStyle(a);
+  return this.isCellsDeletable() && 0 != a[mxConstants.STYLE_DELETABLE]
+};
+mxGraph.prototype.isCellsDeletable = function() {
+  return this.cellsDeletable
+};
+mxGraph.prototype.setCellsDeletable = function(a) {
+  this.cellsDeletable = a
+};
+mxGraph.prototype.isLabelMovable = function(a) {
+  return !this.isCellLocked(a) && (this.model.isEdge(a) && this.edgeLabelsMovable || this.model.isVertex(a) && this.vertexLabelsMovable)
+};
+mxGraph.prototype.getMovableCells = function(a) {
+  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
+    return this.isCellMovable(a)
+  }))
+};
+mxGraph.prototype.isCellMovable = function(a) {
+  var b = this.view.getState(a),
+    b = null != b ? b.style : this.getCellStyle(a);
+  return this.isCellsMovable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_MOVABLE]
+};
+mxGraph.prototype.isCellsMovable = function() {
+  return this.cellsMovable
+};
+mxGraph.prototype.setCellsMovable = function(a) {
+  this.cellsMovable = a
+};
+mxGraph.prototype.isGridEnabled = function() {
+  return this.gridEnabled
+};
+mxGraph.prototype.setGridEnabled = function(a) {
+  this.gridEnabled = a
+};
+mxGraph.prototype.isPortsEnabled = function() {
+  return this.portsEnabled
+};
+mxGraph.prototype.setPortsEnabled = function(a) {
+  this.portsEnabled = a
+};
+mxGraph.prototype.getGridSize = function() {
+  return this.gridSize
+};
+mxGraph.prototype.setGridSize = function(a) {
+  this.gridSize = a
+};
+mxGraph.prototype.getTolerance = function() {
+  return this.tolerance
+};
+mxGraph.prototype.setTolerance = function(a) {
+  this.tolerance = a
+};
+mxGraph.prototype.isVertexLabelsMovable = function() {
+  return this.vertexLabelsMovable
+};
+mxGraph.prototype.setVertexLabelsMovable = function(a) {
+  this.vertexLabelsMovable = a
+};
+mxGraph.prototype.isEdgeLabelsMovable = function() {
+  return this.edgeLabelsMovable
+};
+mxGraph.prototype.setEdgeLabelsMovable = function(a) {
+  this.edgeLabelsMovable = a
+};
+mxGraph.prototype.isSwimlaneNesting = function() {
+  return this.swimlaneNesting
+};
+mxGraph.prototype.setSwimlaneNesting = function(a) {
+  this.swimlaneNesting = a
+};
+mxGraph.prototype.isSwimlaneSelectionEnabled = function() {
+  return this.swimlaneSelectionEnabled
+};
+mxGraph.prototype.setSwimlaneSelectionEnabled = function(a) {
+  this.swimlaneSelectionEnabled = a
+};
+mxGraph.prototype.isMultigraph = function() {
+  return this.multigraph
+};
+mxGraph.prototype.setMultigraph = function(a) {
+  this.multigraph = a
+};
+mxGraph.prototype.isAllowLoops = function() {
+  return this.allowLoops
+};
+mxGraph.prototype.setAllowDanglingEdges = function(a) {
+  this.allowDanglingEdges = a
+};
+mxGraph.prototype.isAllowDanglingEdges = function() {
+  return this.allowDanglingEdges
+};
+mxGraph.prototype.setConnectableEdges = function(a) {
+  this.connectableEdges = a
+};
+mxGraph.prototype.isConnectableEdges = function() {
+  return this.connectableEdges
+};
+mxGraph.prototype.setCloneInvalidEdges = function(a) {
+  this.cloneInvalidEdges = a
+};
+mxGraph.prototype.isCloneInvalidEdges = function() {
+  return this.cloneInvalidEdges
+};
+mxGraph.prototype.setAllowLoops = function(a) {
+  this.allowLoops = a
+};
+mxGraph.prototype.isDisconnectOnMove = function() {
+  return this.disconnectOnMove
+};
+mxGraph.prototype.setDisconnectOnMove = function(a) {
+  this.disconnectOnMove = a
+};
+mxGraph.prototype.isDropEnabled = function() {
+  return this.dropEnabled
+};
+mxGraph.prototype.setDropEnabled = function(a) {
+  this.dropEnabled = a
+};
+mxGraph.prototype.isSplitEnabled = function() {
+  return this.splitEnabled
+};
+mxGraph.prototype.setSplitEnabled = function(a) {
+  this.splitEnabled = a
+};
+mxGraph.prototype.isCellResizable = function(a) {
+  var b = this.view.getState(a),
+    b = null != b ? b.style : this.getCellStyle(a);
+  return this.isCellsResizable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_RESIZABLE]
+};
+mxGraph.prototype.isCellsResizable = function() {
+  return this.cellsResizable
+};
+mxGraph.prototype.setCellsResizable = function(a) {
+  this.cellsResizable = a
+};
+mxGraph.prototype.isTerminalPointMovable = function(a, b) {
+  return !0
+};
+mxGraph.prototype.isCellBendable = function(a) {
+  var b = this.view.getState(a),
+    b = null != b ? b.style : this.getCellStyle(a);
+  return this.isCellsBendable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_BENDABLE]
+};
+mxGraph.prototype.isCellsBendable = function() {
+  return this.cellsBendable
+};
+mxGraph.prototype.setCellsBendable = function(a) {
+  this.cellsBendable = a
+};
+mxGraph.prototype.isCellEditable = function(a) {
+  var b = this.view.getState(a),
+    b = null != b ? b.style : this.getCellStyle(a);
+  return this.isCellsEditable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_EDITABLE]
+};
+mxGraph.prototype.isCellsEditable = function() {
+  return this.cellsEditable
+};
+mxGraph.prototype.setCellsEditable = function(a) {
+  this.cellsEditable = a
+};
+mxGraph.prototype.isCellDisconnectable = function(a, b, c) {
+  return this.isCellsDisconnectable() && !this.isCellLocked(a)
+};
+mxGraph.prototype.isCellsDisconnectable = function() {
+  return this.cellsDisconnectable
+};
+mxGraph.prototype.setCellsDisconnectable = function(a) {
+  this.cellsDisconnectable = a
+};
+mxGraph.prototype.isValidSource = function(a) {
+  return null == a && this.allowDanglingEdges || null != a && (!this.model.isEdge(a) || this.connectableEdges) && this.isCellConnectable(a)
+};
+mxGraph.prototype.isValidTarget = function(a) {
+  return this.isValidSource(a)
+};
+mxGraph.prototype.isValidConnection = function(a, b) {
+  return this.isValidSource(a) && this.isValidTarget(b)
+};
+mxGraph.prototype.setConnectable = function(a) {
+  this.connectionHandler.setEnabled(a)
+};
+mxGraph.prototype.isConnectable = function(a) {
+  return this.connectionHandler.isEnabled()
+};
+mxGraph.prototype.setTooltips = function(a) {
+  this.tooltipHandler.setEnabled(a)
+};
+mxGraph.prototype.setPanning = function(a) {
+  this.panningHandler.panningEnabled = a
+};
+mxGraph.prototype.isEditing = function(a) {
+  if (null != this.cellEditor) {
+    var b = this.cellEditor.getEditingCell();
+    return null == a ? null != b : a == b
+  }
+  return !1
+};
+mxGraph.prototype.isAutoSizeCell = function(a) {
+  var b = this.view.getState(a);
+  a = null != b ? b.style : this.getCellStyle(a);
+  return this.isAutoSizeCells() || 1 == a[mxConstants.STYLE_AUTOSIZE]
+};
+mxGraph.prototype.isAutoSizeCells = function() {
+  return this.autoSizeCells
+};
+mxGraph.prototype.setAutoSizeCells = function(a) {
+  this.autoSizeCells = a
+};
+mxGraph.prototype.isExtendParent = function(a) {
+  return !this.getModel().isEdge(a) && this.isExtendParents()
+};
+mxGraph.prototype.isExtendParents = function() {
+  return this.extendParents
+};
+mxGraph.prototype.setExtendParents = function(a) {
+  this.extendParents = a
+};
+mxGraph.prototype.isExtendParentsOnAdd = function() {
+  return this.extendParentsOnAdd
+};
+mxGraph.prototype.setExtendParentsOnAdd = function(a) {
+  this.extendParentsOnAdd = a
+};
+mxGraph.prototype.isConstrainChild = function(a) {
+  return this.isConstrainChildren() && !this.getModel().isEdge(this.getModel().getParent(a))
+};
+mxGraph.prototype.isConstrainChildren = function() {
+  return this.constrainChildren
+};
+mxGraph.prototype.setConstrainChildren = function(a) {
+  this.constrainChildren = a
+};
+mxGraph.prototype.isAllowNegativeCoordinates = function() {
+  return this.allowNegativeCoordinates
+};
+mxGraph.prototype.setAllowNegativeCoordinates = function(a) {
+  this.allowNegativeCoordinates = a
+};
+mxGraph.prototype.getOverlap = function(a) {
+  return this.isAllowOverlapParent(a) ? this.defaultOverlap : 0
+};
+mxGraph.prototype.isAllowOverlapParent = function(a) {
+  return !1
+};
+mxGraph.prototype.getFoldableCells = function(a, b) {
+  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
+    return this.isCellFoldable(a, b)
+  }))
+};
+mxGraph.prototype.isCellFoldable = function(a, b) {
+  var c = this.view.getState(a),
+    c = null != c ? c.style : this.getCellStyle(a);
+  return 0 < this.model.getChildCount(a) && 0 != c[mxConstants.STYLE_FOLDABLE]
+};
+mxGraph.prototype.isValidDropTarget = function(a, b, c) {
+  return null != a && (this.isSplitEnabled() && this.isSplitTarget(a, b, c) || !this.model.isEdge(a) && (this.isSwimlane(a) || 0 < this.model.getChildCount(a) && !this.isCellCollapsed(a)))
+};
+mxGraph.prototype.isSplitTarget = function(a, b, c) {
+  return this.model.isEdge(a) && null != b && 1 == b.length && this.isCellConnectable(b[0]) && null == this.getEdgeValidationError(a, this.model.getTerminal(a, !0), b[0]) ? (c = this.model.getTerminal(
+    a, !0), a = this.model.getTerminal(a, !1), !this.model.isAncestor(b[0], c) && !this.model.isAncestor(b[0], a)) : !1
+};
+mxGraph.prototype.getDropTarget = function(a, b, c) {
+  if (!this.isSwimlaneNesting())
+    for (var d = 0; d < a.length; d++)
+      if (this.isSwimlane(a[d])) return null;
+  d = mxUtils.convertPoint(this.container, mxEvent.getClientX(b), mxEvent.getClientY(b));
+  d.x -= this.panDx;
+  d.y -= this.panDy;
+  d = this.getSwimlaneAt(d.x, d.y);
+  if (null == c) c = d;
+  else if (null != d) {
+    for (var e = this.model.getParent(d); null != e && this.isSwimlane(e) && e != c;) e = this.model.getParent(e);
+    e == c && (c = d)
+  }
+  for (; null != c && !this.isValidDropTarget(c, a, b) && !this.model.isLayer(c);) c = this.model.getParent(c);
+  return !this.model.isLayer(c) && 0 > mxUtils.indexOf(a, c) ? c : null
+};
+mxGraph.prototype.getDefaultParent = function() {
+  var a = this.defaultParent;
+  null == a && (a = this.getCurrentRoot(), null == a && (a = this.model.getRoot(), a = this.model.getChildAt(a, 0)));
+  return a
+};
+mxGraph.prototype.setDefaultParent = function(a) {
+  this.defaultParent = a
+};
+mxGraph.prototype.getSwimlane = function(a) {
+  for (; null != a && !this.isSwimlane(a);) a = this.model.getParent(a);
+  return a
+};
+mxGraph.prototype.getSwimlaneAt = function(a, b, c) {
+  c = c || this.getDefaultParent();
+  if (null != c)
+    for (var d = this.model.getChildCount(c), e = 0; e < d; e++) {
+      var f = this.model.getChildAt(c, e),
+        g = this.getSwimlaneAt(a, b, f);
+      if (null != g) return g;
+      if (this.isSwimlane(f) && (g = this.view.getState(f), this.intersects(g, a, b))) return f
+    }
+  return null
+};
+mxGraph.prototype.getCellAt = function(a, b, c, d, e) {
+  d = null != d ? d : !0;
+  e = null != e ? e : !0;
+  c = null != c ? c : this.getDefaultParent();
+  if (null != c)
+    for (var f = this.model.getChildCount(c) - 1; 0 <= f; f--) {
+      var g = this.model.getChildAt(c, f),
+        h = this.getCellAt(a, b, g, d, e);
+      if (null != h) return h;
+      if (this.isCellVisible(g) && (e && this.model.isEdge(g) || d && this.model.isVertex(g)))
+        if (h = this.view.getState(g), this.intersects(h, a, b)) return g
+    }
+  return null
+};
+mxGraph.prototype.intersects = function(a, b, c) {
+  if (null != a) {
+    var d = a.absolutePoints;
+    if (null != d) {
+      a = this.tolerance * this.tolerance;
+      for (var e = d[0], f = 1; f < d.length; f++) {
+        var g = d[f];
+        if (mxUtils.ptSegDistSq(e.x, e.y, g.x, g.y, b, c) <= a) return !0;
+        e = g
+      }
+    } else if (e = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0), 0 != e && (d = Math.cos(-e), e = Math.sin(-e), f = new mxPoint(a.getCenterX(), a.getCenterY()), e =
+        mxUtils.getRotatedPoint(new mxPoint(b, c), d, e, f), b = e.x, c = e.y), mxUtils.contains(a, b, c)) return !0
+  }
+  return !1
+};
+mxGraph.prototype.hitsSwimlaneContent = function(a, b, c) {
+  var d = this.getView().getState(a);
+  a = this.getStartSize(a);
+  if (null != d) {
+    var e = this.getView().getScale();
+    b -= d.x;
+    c -= d.y;
+    if (0 < a.width && 0 < b && b > a.width * e || 0 < a.height && 0 < c && c > a.height * e) return !0
+  }
+  return !1
+};
+mxGraph.prototype.getChildVertices = function(a) {
+  return this.getChildCells(a, !0, !1)
+};
+mxGraph.prototype.getChildEdges = function(a) {
+  return this.getChildCells(a, !1, !0)
+};
+mxGraph.prototype.getChildCells = function(a, b, c) {
+  a = null != a ? a : this.getDefaultParent();
+  a = this.model.getChildCells(a, null != b ? b : !1, null != c ? c : !1);
+  b = [];
+  for (c = 0; c < a.length; c++) this.isCellVisible(a[c]) && b.push(a[c]);
+  return b
+};
+mxGraph.prototype.getConnections = function(a, b) {
+  return this.getEdges(a, b, !0, !0, !1)
+};
+mxGraph.prototype.getIncomingEdges = function(a, b) {
+  return this.getEdges(a, b, !0, !1, !1)
+};
+mxGraph.prototype.getOutgoingEdges = function(a, b) {
+  return this.getEdges(a, b, !1, !0, !1)
+};
+mxGraph.prototype.getEdges = function(a, b, c, d, e, f) {
+  c = null != c ? c : !0;
+  d = null != d ? d : !0;
+  e = null != e ? e : !0;
+  f = null != f ? f : !1;
+  for (var g = [], h = this.isCellCollapsed(a), k = this.model.getChildCount(a), l = 0; l < k; l++) {
+    var m = this.model.getChildAt(a, l);
+    if (h || !this.isCellVisible(m)) g = g.concat(this.model.getEdges(m, c, d))
+  }
+  g = g.concat(this.model.getEdges(a, c, d));
+  h = [];
+  for (l = 0; l < g.length; l++) m = this.view.getState(g[l]), k = null != m ? m.getVisibleTerminal(!0) : this.view.getVisibleTerminal(g[l], !0), m = null != m ? m.getVisibleTerminal(!1) : this.view
+    .getVisibleTerminal(g[l], !1), (e && k == m || k != m && (c && m == a && (null == b || this.isValidAncestor(k, b, f)) || d && k == a && (null == b || this.isValidAncestor(m, b, f)))) && h.push(
+      g[l]);
+  return h
+};
+mxGraph.prototype.isValidAncestor = function(a, b, c) {
+  return c ? this.model.isAncestor(b, a) : this.model.getParent(a) == b
+};
+mxGraph.prototype.getOpposites = function(a, b, c, d) {
+  c = null != c ? c : !0;
+  d = null != d ? d : !0;
+  var e = [],
+    f = {};
+  if (null != a)
+    for (var g = 0; g < a.length; g++) {
+      var h = this.view.getState(a[g]),
+        k = null != h ? h.getVisibleTerminal(!0) : this.view.getVisibleTerminal(a[g], !0),
+        h = null != h ? h.getVisibleTerminal(!1) : this.view.getVisibleTerminal(a[g], !1);
+      if (k == b && null != h && h != b && d) {
+        var l = mxCellPath.create(h);
+        null == f[l] && (f[l] = h, e.push(h))
+      } else h == b && (null != k && k != b && c) && (l = mxCellPath.create(k), null == f[l] && (f[l] = k, e.push(k)))
+    }
+  return e
+};
+mxGraph.prototype.getEdgesBetween = function(a, b, c) {
+  c = null != c ? c : !1;
+  for (var d = this.getEdges(a), e = [], f = 0; f < d.length; f++) {
+    var g = this.view.getState(d[f]),
+      h = null != g ? g.getVisibleTerminal(!0) : this.view.getVisibleTerminal(d[f], !0),
+      g = null != g ? g.getVisibleTerminal(!1) : this.view.getVisibleTerminal(d[f], !1);
+    (h == a && g == b || !c && h == b && g == a) && e.push(d[f])
+  }
+  return e
+};
+mxGraph.prototype.getPointForEvent = function(a, b) {
+  var c = mxUtils.convertPoint(this.container, mxEvent.getClientX(a), mxEvent.getClientY(a)),
+    d = this.view.scale,
+    e = this.view.translate,
+    f = !1 != b ? this.gridSize / 2 : 0;
+  c.x = this.snap(c.x / d - e.x - f);
+  c.y = this.snap(c.y / d - e.y - f);
+  return c
+};
+mxGraph.prototype.getCells = function(a, b, c, d, e, f) {
+  f = null != f ? f : [];
+  if (0 < c || 0 < d) {
+    var g = a + c,
+      h = b + d;
+    e = e || this.getDefaultParent();
+    if (null != e)
+      for (var k = this.model.getChildCount(e), l = 0; l < k; l++) {
+        var m = this.model.getChildAt(e, l),
+          n = this.view.getState(m);
+        if (this.isCellVisible(m) && null != n) {
+          var p = n,
+            n = mxUtils.getValue(n.style, mxConstants.STYLE_ROTATION) || 0;
+          0 != n && (p = mxUtils.getBoundingBox(p, n));
+          p.x >= a && p.y + p.height <= h && p.y >= b && p.x + p.width <= g ? f.push(m) : this.getCells(a, b, c, d, m, f)
+        }
+      }
+  }
+  return f
+};
+mxGraph.prototype.getCellsBeyond = function(a, b, c, d, e) {
+  var f = [];
+  if (d || e)
+    if (null == c && (c = this.getDefaultParent()), null != c)
+      for (var g = this.model.getChildCount(c), h = 0; h < g; h++) {
+        var k = this.model.getChildAt(c, h),
+          l = this.view.getState(k);
+        this.isCellVisible(k) && null != l && (!d || l.x >= a) && (!e || l.y >= b) && f.push(k)
+      }
+  return f
+};
+mxGraph.prototype.findTreeRoots = function(a, b, c) {
+  b = null != b ? b : !1;
+  c = null != c ? c : !1;
+  var d = [];
+  if (null != a) {
+    for (var e = this.getModel(), f = e.getChildCount(a), g = null, h = 0, k = 0; k < f; k++) {
+      var l = e.getChildAt(a, k);
+      if (this.model.isVertex(l) && this.isCellVisible(l)) {
+        for (var m = this.getConnections(l, b ? a : null), n = 0, p = 0, q = 0; q < m.length; q++) this.view.getVisibleTerminal(m[q], !0) == l ? n++ : p++;
+        (c && 0 == n && 0 < p || !c && 0 == p && 0 < n) && d.push(l);
+        m = c ? p - n : n - p;
+        m > h && (h = m, g = l)
+      }
+    }
+    0 == d.length && null != g && d.push(g)
+  }
+  return d
+};
+mxGraph.prototype.traverse = function(a, b, c, d, e) {
+  if (null != c && null != a) {
+    b = null != b ? b : !0;
+    e = e || [];
+    var f = mxCellPath.create(a);
+    if (null == e[f] && (e[f] = a, d = c(a, d), null == d || d))
+      if (d = this.model.getEdgeCount(a), 0 < d)
+        for (f = 0; f < d; f++) {
+          var g = this.model.getEdgeAt(a, f),
+            h = this.model.getTerminal(g, !0) == a;
+          if (!b || h) h = this.model.getTerminal(g, !h), this.traverse(h, b, c, g, e)
+        }
+  }
+};
+mxGraph.prototype.isCellSelected = function(a) {
+  return this.getSelectionModel().isSelected(a)
+};
+mxGraph.prototype.isSelectionEmpty = function() {
+  return this.getSelectionModel().isEmpty()
+};
+mxGraph.prototype.clearSelection = function() {
+  return this.getSelectionModel().clear()
+};
+mxGraph.prototype.getSelectionCount = function() {
+  return this.getSelectionModel().cells.length
+};
+mxGraph.prototype.getSelectionCell = function() {
+  return this.getSelectionModel().cells[0]
+};
+mxGraph.prototype.getSelectionCells = function() {
+  return this.getSelectionModel().cells.slice()
+};
+mxGraph.prototype.setSelectionCell = function(a) {
+  this.getSelectionModel().setCell(a)
+};
+mxGraph.prototype.setSelectionCells = function(a) {
+  this.getSelectionModel().setCells(a)
+};
+mxGraph.prototype.addSelectionCell = function(a) {
+  this.getSelectionModel().addCell(a)
+};
+mxGraph.prototype.addSelectionCells = function(a) {
+  this.getSelectionModel().addCells(a)
+};
+mxGraph.prototype.removeSelectionCell = function(a) {
+  this.getSelectionModel().removeCell(a)
+};
+mxGraph.prototype.removeSelectionCells = function(a) {
+  this.getSelectionModel().removeCells(a)
+};
+mxGraph.prototype.selectRegion = function(a, b) {
+  var c = this.getCells(a.x, a.y, a.width, a.height);
+  this.selectCellsForEvent(c, b);
+  return c
+};
+mxGraph.prototype.selectNextCell = function() {
+  this.selectCell(!0)
+};
+mxGraph.prototype.selectPreviousCell = function() {
+  this.selectCell()
+};
+mxGraph.prototype.selectParentCell = function() {
+  this.selectCell(!1, !0)
+};
+mxGraph.prototype.selectChildCell = function() {
+  this.selectCell(!1, !1, !0)
+};
+mxGraph.prototype.selectCell = function(a, b, c) {
+  var d = this.selectionModel,
+    e = 0 < d.cells.length ? d.cells[0] : null;
+  1 < d.cells.length && d.clear();
+  var d = null != e ? this.model.getParent(e) : this.getDefaultParent(),
+    f = this.model.getChildCount(d);
+  null == e && 0 < f ? (a = this.model.getChildAt(d, 0), this.setSelectionCell(a)) : (null == e || b) && null != this.view.getState(d) && null != this.model.getGeometry(d) ? this.getCurrentRoot() !=
+    d && this.setSelectionCell(d) : null != e && c ? 0 < this.model.getChildCount(e) && (a = this.model.getChildAt(e, 0), this.setSelectionCell(a)) :
+    0 < f && (b = d.getIndex(e), a ? (b++, a = this.model.getChildAt(d, b % f)) : (b--, a = this.model.getChildAt(d, 0 > b ? f - 1 : b)), this.setSelectionCell(a))
+};
+mxGraph.prototype.selectAll = function(a) {
+  a = a || this.getDefaultParent();
+  a = this.model.getChildren(a);
+  null != a && this.setSelectionCells(a)
+};
+mxGraph.prototype.selectVertices = function(a) {
+  this.selectCells(!0, !1, a)
+};
+mxGraph.prototype.selectEdges = function(a) {
+  this.selectCells(!1, !0, a)
+};
+mxGraph.prototype.selectCells = function(a, b, c) {
+  c = c || this.getDefaultParent();
+  var d = mxUtils.bind(this, function(c) {
+    return null != this.view.getState(c) && 0 == this.model.getChildCount(c) && (this.model.isVertex(c) && a || this.model.isEdge(c) && b)
+  });
+  c = this.model.filterDescendants(d, c);
+  this.setSelectionCells(c)
+};
+mxGraph.prototype.selectCellForEvent = function(a, b) {
+  var c = this.isCellSelected(a);
+  this.isToggleEvent(b) ? c ? this.removeSelectionCell(a) : this.addSelectionCell(a) : (!c || 1 != this.getSelectionCount()) && this.setSelectionCell(a)
+};
+mxGraph.prototype.selectCellsForEvent = function(a, b) {
+  this.isToggleEvent(b) ? this.addSelectionCells(a) : this.setSelectionCells(a)
+};
+mxGraph.prototype.createHandler = function(a) {
+  var b = null;
+  null != a && (this.model.isEdge(a.cell) ? (b = this.view.getEdgeStyle(a), b = this.isLoop(a) || b == mxEdgeStyle.ElbowConnector || b == mxEdgeStyle.SideToSide || b == mxEdgeStyle.TopToBottom ?
+    new mxElbowEdgeHandler(a) : b == mxEdgeStyle.SegmentConnector || b == mxEdgeStyle.OrthConnector ? new mxEdgeSegmentHandler(a) : new mxEdgeHandler(a)) : b = new mxVertexHandler(a));
+  return b
+};
+mxGraph.prototype.addMouseListener = function(a) {
+  null == this.mouseListeners && (this.mouseListeners = []);
+  this.mouseListeners.push(a)
+};
+mxGraph.prototype.removeMouseListener = function(a) {
+  if (null != this.mouseListeners)
+    for (var b = 0; b < this.mouseListeners.length; b++)
+      if (this.mouseListeners[b] == a) {
+        this.mouseListeners.splice(b, 1);
+        break
+      }
+};
+mxGraph.prototype.updateMouseEvent = function(a) {
+  if (null == a.graphX || null == a.graphY) {
+    var b = mxUtils.convertPoint(this.container, a.getX(), a.getY());
+    a.graphX = b.x - this.panDx;
+    a.graphY = b.y - this.panDy
+  }
+};
+mxGraph.prototype.fireMouseEvent = function(a, b, c) {
+  null == c && (c = this);
+  this.updateMouseEvent(b);
+  a == mxEvent.MOUSE_DOWN && (this.isMouseDown = !0);
+  if (mxClient.IS_TOUCH && this.doubleTapEnabled && a == mxEvent.MOUSE_DOWN) {
+    var d = (new Date).getTime();
+    d - this.lastTouchTime < this.doubleTapTimeout && Math.abs(this.lastTouchX - b.getX()) < this.doubleTapTolerance && Math.abs(this.lastTouchY - b.getY()) < this.doubleTapTolerance ? (this.lastTouchTime =
+      0, this.dblClick(b.getEvent(), b.getCell()), b.getEvent().cancelBubble = !0) : (this.lastTouchX =
+      b.getX(), this.lastTouchY = b.getY(), this.lastTouchTime = d)
+  }
+  d = 2 != b.getEvent().detail;
+  if (mxClient.IS_IE && "CSS1Compat" == document.compatMode) {
+    if (null != this.lastMouseX && Math.abs(this.lastMouseX - b.getX()) > this.doubleTapTolerance || null != this.lastMouseY && Math.abs(this.lastMouseY - b.getY()) > this.doubleTapTolerance) d = !
+      0;
+    a == mxEvent.MOUSE_UP && (this.lastMouseX = b.getX(), this.lastMouseY = b.getY())
+  }
+  if ((a != mxEvent.MOUSE_UP || this.isMouseDown) && d) {
+    if (a == mxEvent.MOUSE_UP && (this.isMouseDown = !1), !this.isEditing() && (mxClient.IS_OP ||
+        mxClient.IS_SF || mxClient.IS_GC || mxClient.IS_IE && mxClient.IS_SVG || b.getEvent().target != this.container)) {
+      a == mxEvent.MOUSE_MOVE && (this.isMouseDown && this.autoScroll) && this.scrollPointToVisible(b.getGraphX(), b.getGraphY(), this.autoExtend);
+      if (null != this.mouseListeners) {
+        c = [c, b];
+        b.getEvent().returnValue = !0;
+        for (d = 0; d < this.mouseListeners.length; d++) {
+          var e = this.mouseListeners[d];
+          a == mxEvent.MOUSE_DOWN ? e.mouseDown.apply(e, c) : a == mxEvent.MOUSE_MOVE ? e.mouseMove.apply(e, c) : a == mxEvent.MOUSE_UP && e.mouseUp.apply(e, c)
+        }
+      }
+      a ==
+        mxEvent.MOUSE_UP && this.click(b)
+    }
+  } else a == mxEvent.MOUSE_UP && (this.isMouseDown = !1)
+};
+mxGraph.prototype.destroy = function() {
+  this.destroyed || (this.destroyed = !0, null != this.tooltipHandler && this.tooltipHandler.destroy(), null != this.selectionCellsHandler && this.selectionCellsHandler.destroy(), null != this.panningHandler &&
+    this.panningHandler.destroy(), null != this.connectionHandler && this.connectionHandler.destroy(), null != this.graphHandler && this.graphHandler.destroy(), null != this.cellEditor && this.cellEditor
+    .destroy(), null != this.view && this.view.destroy(), null != this.model && null != this.graphModelChangeListener &&
+    (this.model.removeListener(this.graphModelChangeListener), this.graphModelChangeListener = null), this.container = null)
+};
+
+function mxCellOverlay(a, b, c, d, e, f) {
+  this.image = a;
+  this.tooltip = b;
+  this.align = null != c ? c : this.align;
+  this.verticalAlign = null != d ? d : this.verticalAlign;
+  this.offset = null != e ? e : new mxPoint;
+  this.cursor = null != f ? f : "help"
+}
+mxCellOverlay.prototype = new mxEventSource;
+mxCellOverlay.prototype.constructor = mxCellOverlay;
+mxCellOverlay.prototype.image = null;
+mxCellOverlay.prototype.tooltip = null;
+mxCellOverlay.prototype.align = mxConstants.ALIGN_RIGHT;
+mxCellOverlay.prototype.verticalAlign = mxConstants.ALIGN_BOTTOM;
+mxCellOverlay.prototype.offset = null;
+mxCellOverlay.prototype.cursor = null;
+mxCellOverlay.prototype.defaultOverlap = 0.5;
+mxCellOverlay.prototype.getBounds = function(a) {
+  var b = a.view.graph.getModel().isEdge(a.cell),
+    c = a.view.scale,
+    d = null,
+    e = this.image.width,
+    f = this.image.height;
+  b ? (b = a.absolutePoints, 1 == b.length % 2 ? d = b[Math.floor(b.length / 2)] : (d = b.length / 2, a = b[d - 1], b = b[d], d = new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2))) : (d =
+    new mxPoint, d.x = this.align == mxConstants.ALIGN_LEFT ? a.x : this.align == mxConstants.ALIGN_CENTER ? a.x + a.width / 2 : a.x + a.width, d.y = this.verticalAlign == mxConstants.ALIGN_TOP ?
+    a.y : this.verticalAlign == mxConstants.ALIGN_MIDDLE ?
+    a.y + a.height / 2 : a.y + a.height);
+  return new mxRectangle(Math.round(d.x - (e * this.defaultOverlap - this.offset.x) * c), Math.round(d.y - (f * this.defaultOverlap - this.offset.y) * c), e * c, f * c)
+};
+mxCellOverlay.prototype.toString = function() {
+  return this.tooltip
+};
+
+function mxOutline(a, b) {
+  this.source = a;
+  null != b && this.init(b)
+}
+mxOutline.prototype.source = null;
+mxOutline.prototype.outline = null;
+mxOutline.prototype.graphRenderHint = mxConstants.RENDERING_HINT_FASTER;
+mxOutline.prototype.enabled = !0;
+mxOutline.prototype.showViewport = !0;
+mxOutline.prototype.border = 10;
+mxOutline.prototype.sizerSize = 8;
+mxOutline.prototype.updateOnPan = !1;
+mxOutline.prototype.sizerImage = null;
+mxOutline.prototype.suspended = !1;
+mxOutline.prototype.init = function(a) {
+  this.outline = new mxGraph(a, this.source.getModel(), this.graphRenderHint, this.source.getStylesheet());
+  this.outline.foldingEnabled = !1;
+  this.outline.autoScroll = !1;
+  var b = this.outline.graphModelChanged;
+  this.outline.graphModelChanged = mxUtils.bind(this, function(a) {
+    !this.suspended && null != this.outline && b.apply(this.outline, arguments)
+  });
+  mxClient.IS_SVG && (a = this.outline.getView().getCanvas().parentNode, a.setAttribute("shape-rendering", "optimizeSpeed"), a.setAttribute("image-rendering",
+    "optimizeSpeed"));
+  this.outline.labelsVisible = !1;
+  this.outline.setEnabled(!1);
+  this.updateHandler = mxUtils.bind(this, function(a, b) {
+    !this.suspended && !this.active && this.update()
+  });
+  this.source.getModel().addListener(mxEvent.CHANGE, this.updateHandler);
+  this.outline.addMouseListener(this);
+  a = this.source.getView();
+  a.addListener(mxEvent.SCALE, this.updateHandler);
+  a.addListener(mxEvent.TRANSLATE, this.updateHandler);
+  a.addListener(mxEvent.SCALE_AND_TRANSLATE, this.updateHandler);
+  a.addListener(mxEvent.DOWN, this.updateHandler);
+  a.addListener(mxEvent.UP, this.updateHandler);
+  mxEvent.addListener(this.source.container, "scroll", this.updateHandler);
+  this.panHandler = mxUtils.bind(this, function(a) {
+    this.updateOnPan && this.updateHandler.apply(this, arguments)
+  });
+  this.source.addListener(mxEvent.PAN, this.panHandler);
+  this.refreshHandler = mxUtils.bind(this, function(a) {
+    this.outline.setStylesheet(this.source.getStylesheet());
+    this.outline.refresh()
+  });
+  this.source.addListener(mxEvent.REFRESH, this.refreshHandler);
+  this.bounds = new mxRectangle(0, 0, 0,
+    0);
+  this.selectionBorder = new mxRectangleShape(this.bounds, null, mxConstants.OUTLINE_COLOR, mxConstants.OUTLINE_STROKEWIDTH);
+  this.selectionBorder.dialect = this.outline.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
+  this.selectionBorder.init(this.outline.getView().getOverlayPane());
+  mxEvent.redirectMouseEvents(this.selectionBorder.node, this.outline);
+  this.selectionBorder.node.style.background = "";
+  this.sizer = this.createSizer();
+  this.sizer.init(this.outline.getView().getOverlayPane());
+  this.enabled && (this.sizer.node.style.cursor = "pointer");
+  mxEvent.addListener(this.sizer.node, mxClient.IS_TOUCH ? "touchstart" : "mousedown", mxUtils.bind(this, function(a) {
+    this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a))
+  }));
+  this.selectionBorder.node.style.display = this.showViewport ? "" : "none";
+  this.sizer.node.style.display = this.selectionBorder.node.style.display;
+  this.selectionBorder.node.style.cursor = "move";
+  this.update(!1)
+};
+mxOutline.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxOutline.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxOutline.prototype.setZoomEnabled = function(a) {
+  this.sizer.node.style.visibility = a ? "visible" : "hidden"
+};
+mxOutline.prototype.refresh = function() {
+  this.update(!0)
+};
+mxOutline.prototype.createSizer = function() {
+  var a = null != this.sizerImage ? new mxImageShape(new mxRectangle(0, 0, this.sizerImage.width, this.sizerImage.height), this.sizerImage.src) : new mxRectangleShape(new mxRectangle(0, 0, this.sizerSize,
+    this.sizerSize), mxConstants.OUTLINE_HANDLE_FILLCOLOR, mxConstants.OUTLINE_HANDLE_STROKECOLOR);
+  a.dialect = this.outline.dialect;
+  return a
+};
+mxOutline.prototype.getSourceContainerSize = function() {
+  return new mxRectangle(0, 0, this.source.container.scrollWidth, this.source.container.scrollHeight)
+};
+mxOutline.prototype.getOutlineOffset = function(a) {
+  return null
+};
+mxOutline.prototype.update = function(a) {
+  if (null != this.source) {
+    var b = this.source.view.scale,
+      c = this.source.getGraphBounds(),
+      c = new mxRectangle(c.x / b + this.source.panDx, c.y / b + this.source.panDy, c.width / b, c.height / b),
+      d = new mxRectangle(0, 0, this.source.container.clientWidth / b, this.source.container.clientHeight / b),
+      e = c.clone();
+    e.add(d);
+    var f = this.getSourceContainerSize(),
+      d = Math.max(f.width / b, e.width),
+      b = Math.max(f.height / b, e.height),
+      e = Math.max(0, this.outline.container.clientWidth - this.border),
+      f = Math.max(0, this.outline.container.clientHeight -
+        this.border),
+      e = Math.min(e / d, f / b);
+    if (0 < e) {
+      this.outline.getView().scale != e && (this.outline.getView().scale = e, a = !0);
+      d = this.outline.getView();
+      d.currentRoot != this.source.getView().currentRoot && d.setCurrentRoot(this.source.getView().currentRoot);
+      var b = this.source.view.translate,
+        f = b.x + this.source.panDx,
+        g = b.y + this.source.panDy,
+        e = this.getOutlineOffset(e);
+      null != e && (f += e.x, g += e.y);
+      0 > c.x && (f -= c.x);
+      0 > c.y && (g -= c.y);
+      if (d.translate.x != f || d.translate.y != g) d.translate.x = f, d.translate.y = g, a = !0;
+      var c = d.translate,
+        e = this.source.getView().scale,
+        f = e / d.scale,
+        g = 1 / d.scale,
+        h = this.source.container;
+      this.bounds = new mxRectangle((c.x - b.x - this.source.panDx) / g, (c.y - b.y - this.source.panDy) / g, h.clientWidth / f, h.clientHeight / f);
+      this.bounds.x += this.source.container.scrollLeft * d.scale / e;
+      this.bounds.y += this.source.container.scrollTop * d.scale / e;
+      c = this.selectionBorder.bounds;
+      if (c.x != this.bounds.x || c.y != this.bounds.y || c.width != this.bounds.width || c.height != this.bounds.height) this.selectionBorder.bounds = this.bounds, this.selectionBorder.redraw();
+      c = this.sizer.bounds;
+      d = new mxRectangle(this.bounds.x + this.bounds.width - c.width / 2, this.bounds.y + this.bounds.height - c.height / 2, c.width, c.height);
+      if (c.x != d.x || c.y != d.y || c.width != d.width || c.height != d.height) this.sizer.bounds = d, "hidden" != this.sizer.node.style.visibility && this.sizer.redraw();
+      a && this.outline.view.revalidate()
+    }
+  }
+};
+mxOutline.prototype.mouseDown = function(a, b) {
+  this.enabled && this.showViewport && (this.zoom = b.isSource(this.sizer), this.startX = b.getX(), this.startY = b.getY(), this.active = !0, this.source.useScrollbarsForPanning && mxUtils.hasScrollbars(
+    this.source.container) ? (this.dx0 = this.source.container.scrollLeft, this.dy0 = this.source.container.scrollTop) : this.dy0 = this.dx0 = 0);
+  b.consume()
+};
+mxOutline.prototype.mouseMove = function(a, b) {
+  if (this.active) {
+    this.selectionBorder.node.style.display = this.showViewport ? "" : "none";
+    this.sizer.node.style.display = this.selectionBorder.node.style.display;
+    var c = b.getX() - this.startX,
+      d = b.getY() - this.startY,
+      e = null;
+    if (this.zoom) e = this.source.container, d = c / (e.clientWidth / e.clientHeight), e = new mxRectangle(this.bounds.x, this.bounds.y, Math.max(1, this.bounds.width + c), Math.max(1, this.bounds
+      .height + d)), this.selectionBorder.bounds = e, this.selectionBorder.redraw();
+    else {
+      var f =
+        this.outline.getView().scale,
+        e = new mxRectangle(this.bounds.x + c, this.bounds.y + d, this.bounds.width, this.bounds.height);
+      this.selectionBorder.bounds = e;
+      this.selectionBorder.redraw();
+      c = c / f * this.source.getView().scale;
+      d = d / f * this.source.getView().scale;
+      this.source.panGraph(-c - this.dx0, -d - this.dy0)
+    }
+    c = this.sizer.bounds;
+    this.sizer.bounds = new mxRectangle(e.x + e.width - c.width / 2, e.y + e.height - c.height / 2, c.width, c.height);
+    "hidden" != this.sizer.node.style.visibility && this.sizer.redraw();
+    b.consume()
+  }
+};
+mxOutline.prototype.mouseUp = function(a, b) {
+  if (this.active) {
+    var c = b.getX() - this.startX,
+      d = b.getY() - this.startY;
+    if (0 < Math.abs(c) || 0 < Math.abs(d)) {
+      if (this.zoom) {
+        var d = this.selectionBorder.bounds.width,
+          e = this.source.getView().scale;
+        this.source.zoomTo(e - c * e / d, !1)
+      } else if (!this.source.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.source.container)) this.source.panGraph(0, 0), c /= this.outline.getView().scale, d /= this.outline.getView().scale,
+        e = this.source.getView().translate, this.source.getView().setTranslate(e.x -
+          c, e.y - d);
+      this.update();
+      b.consume()
+    }
+    this.index = null;
+    this.active = !1
+  }
+};
+mxOutline.prototype.destroy = function() {
+  null != this.source && (this.source.removeListener(this.panHandler), this.source.removeListener(this.refreshHandler), this.source.getModel().removeListener(this.updateHandler), this.source.getView()
+    .removeListener(this.updateHandler), mxEvent.addListener(this.source.container, "scroll", this.updateHandler), this.source = null);
+  null != this.outline && (this.outline.removeMouseListener(this), this.outline.destroy(), this.outline = null);
+  null != this.selectionBorder && (this.selectionBorder.destroy(),
+    this.selectionBorder = null);
+  null != this.sizer && (this.sizer.destroy(), this.sizer = null)
+};
+
+function mxMultiplicity(a, b, c, d, e, f, g, h, k, l) {
+  this.source = a;
+  this.type = b;
+  this.attr = c;
+  this.value = d;
+  this.min = null != e ? e : 0;
+  this.max = null != f ? f : "n";
+  this.validNeighbors = g;
+  this.countError = mxResources.get(h) || h;
+  this.typeError = mxResources.get(k) || k;
+  this.validNeighborsAllowed = null != l ? l : !0
+}
+mxMultiplicity.prototype.type = null;
+mxMultiplicity.prototype.attr = null;
+mxMultiplicity.prototype.value = null;
+mxMultiplicity.prototype.source = null;
+mxMultiplicity.prototype.min = null;
+mxMultiplicity.prototype.max = null;
+mxMultiplicity.prototype.validNeighbors = null;
+mxMultiplicity.prototype.validNeighborsAllowed = !0;
+mxMultiplicity.prototype.countError = null;
+mxMultiplicity.prototype.typeError = null;
+mxMultiplicity.prototype.check = function(a, b, c, d, e, f) {
+  var g = "";
+  if (this.source && this.checkTerminal(a, c, b) || !this.source && this.checkTerminal(a, d, b)) {
+    if (null != this.countError && (this.source && (0 == this.max || e >= this.max) || !this.source && (0 == this.max || f >= this.max))) g += this.countError + "\n";
+    null != this.validNeighbors && (null != this.typeError && 0 < this.validNeighbors.length) && (this.checkNeighbors(a, b, c, d) || (g += this.typeError + "\n"))
+  }
+  return 0 < g.length ? g : null
+};
+mxMultiplicity.prototype.checkNeighbors = function(a, b, c, d) {
+  b = a.model.getValue(c);
+  d = a.model.getValue(d);
+  c = !this.validNeighborsAllowed;
+  for (var e = this.validNeighbors, f = 0; f < e.length; f++)
+    if (this.source && this.checkType(a, d, e[f])) {
+      c = this.validNeighborsAllowed;
+      break
+    } else if (!this.source && this.checkType(a, b, e[f])) {
+    c = this.validNeighborsAllowed;
+    break
+  }
+  return c
+};
+mxMultiplicity.prototype.checkTerminal = function(a, b, c) {
+  b = a.model.getValue(b);
+  return this.checkType(a, b, this.type, this.attr, this.value)
+};
+mxMultiplicity.prototype.checkType = function(a, b, c, d, e) {
+  return null != b ? isNaN(b.nodeType) ? b == c : mxUtils.isNode(b, c, d, e) : !1
+};
+
+function mxLayoutManager(a) {
+  this.undoHandler = mxUtils.bind(this, function(a, c) {
+    this.isEnabled() && this.beforeUndo(c.getProperty("edit"))
+  });
+  this.moveHandler = mxUtils.bind(this, function(a, c) {
+    this.isEnabled() && this.cellsMoved(c.getProperty("cells"), c.getProperty("event"))
+  });
+  this.setGraph(a)
+}
+mxLayoutManager.prototype = new mxEventSource;
+mxLayoutManager.prototype.constructor = mxLayoutManager;
+mxLayoutManager.prototype.graph = null;
+mxLayoutManager.prototype.bubbling = !0;
+mxLayoutManager.prototype.enabled = !0;
+mxLayoutManager.prototype.updateHandler = null;
+mxLayoutManager.prototype.moveHandler = null;
+mxLayoutManager.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxLayoutManager.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxLayoutManager.prototype.isBubbling = function() {
+  return this.bubbling
+};
+mxLayoutManager.prototype.setBubbling = function(a) {
+  this.bubbling = a
+};
+mxLayoutManager.prototype.getGraph = function() {
+  return this.graph
+};
+mxLayoutManager.prototype.setGraph = function(a) {
+  if (null != this.graph) {
+    var b = this.graph.getModel();
+    b.removeListener(this.undoHandler);
+    this.graph.removeListener(this.moveHandler)
+  }
+  this.graph = a;
+  null != this.graph && (b = this.graph.getModel(), b.addListener(mxEvent.BEFORE_UNDO, this.undoHandler), this.graph.addListener(mxEvent.MOVE_CELLS, this.moveHandler))
+};
+mxLayoutManager.prototype.getLayout = function(a) {
+  return null
+};
+mxLayoutManager.prototype.beforeUndo = function(a) {
+  a = this.getCellsForChanges(a.changes);
+  var b = this.getGraph().getModel();
+  if (this.isBubbling())
+    for (var c = b.getParents(a); 0 < c.length;) a = a.concat(c), c = b.getParents(c);
+  this.layoutCells(mxUtils.sortCells(a, !1))
+};
+mxLayoutManager.prototype.cellsMoved = function(a, b) {
+  if (null != a && null != b)
+    for (var c = mxUtils.convertPoint(this.getGraph().container, mxEvent.getClientX(b), mxEvent.getClientY(b)), d = this.getGraph().getModel(), e = 0; e < a.length; e++) {
+      var f = this.getLayout(d.getParent(a[e]));
+      null != f && f.moveCell(a[e], c.x, c.y)
+    }
+};
+mxLayoutManager.prototype.getCellsForChanges = function(a) {
+  for (var b = [], c = {}, d = 0; d < a.length; d++) {
+    var e = a[d];
+    if (e instanceof mxRootChange) return [];
+    for (var e = this.getCellsForChange(e), f = 0; f < e.length; f++)
+      if (null != e[f]) {
+        var g = mxCellPath.create(e[f]);
+        null == c[g] && (c[g] = e[f], b.push(e[f]))
+      }
+  }
+  return b
+};
+mxLayoutManager.prototype.getCellsForChange = function(a) {
+  var b = this.getGraph().getModel();
+  return a instanceof mxChildChange ? [a.child, a.previous, b.getParent(a.child)] : a instanceof mxTerminalChange || a instanceof mxGeometryChange ? [a.cell, b.getParent(a.cell)] : []
+};
+mxLayoutManager.prototype.layoutCells = function(a) {
+  if (0 < a.length) {
+    var b = this.getGraph().getModel();
+    b.beginUpdate();
+    try {
+      for (var c = null, d = 0; d < a.length; d++) a[d] != b.getRoot() && a[d] != c && (c = a[d], this.executeLayout(this.getLayout(c), c));
+      this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS, "cells", a))
+    } finally {
+      b.endUpdate()
+    }
+  }
+};
+mxLayoutManager.prototype.executeLayout = function(a, b) {
+  null != a && null != b && a.execute(b)
+};
+mxLayoutManager.prototype.destroy = function() {
+  this.setGraph(null)
+};
+
+function mxSpaceManager(a, b, c, d) {
+  this.resizeHandler = mxUtils.bind(this, function(a, b) {
+    this.isEnabled() && this.cellsResized(b.getProperty("cells"))
+  });
+  this.foldHandler = mxUtils.bind(this, function(a, b) {
+    this.isEnabled() && this.cellsResized(b.getProperty("cells"))
+  });
+  this.shiftRightwards = null != b ? b : !0;
+  this.shiftDownwards = null != c ? c : !0;
+  this.extendParents = null != d ? d : !0;
+  this.setGraph(a)
+}
+mxSpaceManager.prototype = new mxEventSource;
+mxSpaceManager.prototype.constructor = mxSpaceManager;
+mxSpaceManager.prototype.graph = null;
+mxSpaceManager.prototype.enabled = !0;
+mxSpaceManager.prototype.shiftRightwards = !0;
+mxSpaceManager.prototype.shiftDownwards = !0;
+mxSpaceManager.prototype.extendParents = !0;
+mxSpaceManager.prototype.resizeHandler = null;
+mxSpaceManager.prototype.foldHandler = null;
+mxSpaceManager.prototype.isCellIgnored = function(a) {
+  return !this.getGraph().getModel().isVertex(a)
+};
+mxSpaceManager.prototype.isCellShiftable = function(a) {
+  return this.getGraph().getModel().isVertex(a) && this.getGraph().isCellMovable(a)
+};
+mxSpaceManager.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxSpaceManager.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxSpaceManager.prototype.isShiftRightwards = function() {
+  return this.shiftRightwards
+};
+mxSpaceManager.prototype.setShiftRightwards = function(a) {
+  this.shiftRightwards = a
+};
+mxSpaceManager.prototype.isShiftDownwards = function() {
+  return this.shiftDownwards
+};
+mxSpaceManager.prototype.setShiftDownwards = function(a) {
+  this.shiftDownwards = a
+};
+mxSpaceManager.prototype.isExtendParents = function() {
+  return this.extendParents
+};
+mxSpaceManager.prototype.setExtendParents = function(a) {
+  this.extendParents = a
+};
+mxSpaceManager.prototype.getGraph = function() {
+  return this.graph
+};
+mxSpaceManager.prototype.setGraph = function(a) {
+  null != this.graph && (this.graph.removeListener(this.resizeHandler), this.graph.removeListener(this.foldHandler));
+  this.graph = a;
+  null != this.graph && (this.graph.addListener(mxEvent.RESIZE_CELLS, this.resizeHandler), this.graph.addListener(mxEvent.FOLD_CELLS, this.foldHandler))
+};
+mxSpaceManager.prototype.cellsResized = function(a) {
+  if (null != a) {
+    var b = this.graph.getModel();
+    b.beginUpdate();
+    try {
+      for (var c = 0; c < a.length; c++)
+        if (!this.isCellIgnored(a[c])) {
+          this.cellResized(a[c]);
+          break
+        }
+    } finally {
+      b.endUpdate()
+    }
+  }
+};
+mxSpaceManager.prototype.cellResized = function(a) {
+  var b = this.getGraph(),
+    c = b.getView(),
+    d = b.getModel(),
+    e = c.getState(a),
+    f = c.getState(d.getParent(a));
+  if (null != e && null != f) {
+    var g = this.getCellsToShift(e),
+      h = d.getGeometry(a);
+    if (null != g && null != h) {
+      var k = c.translate,
+        l = c.scale,
+        c = e.x - f.origin.x - k.x * l,
+        f = e.y - f.origin.y - k.y * l,
+        k = e.x + e.width,
+        m = e.y + e.height,
+        n = e.width - h.width * l + c - h.x * l,
+        p = e.height - h.height * l + f - h.y * l,
+        q = 1 - h.width * l / e.width,
+        e = 1 - h.height * l / e.height;
+      d.beginUpdate();
+      try {
+        for (h = 0; h < g.length; h++) g[h] != a && this.isCellShiftable(g[h]) &&
+          this.shiftCell(g[h], n, p, c, f, k, m, q, e, this.isExtendParents() && b.isExtendParent(g[h]))
+      } finally {
+        d.endUpdate()
+      }
+    }
+  }
+};
+mxSpaceManager.prototype.shiftCell = function(a, b, c, d, e, f, g, h, k, l) {
+  d = this.getGraph();
+  var m = d.getView().getState(a);
+  if (null != m) {
+    var n = d.getModel(),
+      p = n.getGeometry(a);
+    if (null != p) {
+      n.beginUpdate();
+      try {
+        if (this.isShiftRightwards())
+          if (m.x >= f) p = p.clone(), p.translate(-b, 0);
+          else {
+            var q = Math.max(0, m.x - x0),
+              p = p.clone();
+            p.translate(-h * q, 0)
+          }
+        if (this.isShiftDownwards())
+          if (m.y >= g) p = p.clone(), p.translate(0, -c);
+          else {
+            var s = Math.max(0, m.y - e),
+              p = p.clone();
+            p.translate(0, -k * s)
+          }
+        p != n.getGeometry(a) && (n.setGeometry(a, p), l && d.extendParent(a))
+      } finally {
+        n.endUpdate()
+      }
+    }
+  }
+};
+mxSpaceManager.prototype.getCellsToShift = function(a) {
+  var b = this.getGraph(),
+    c = b.getModel().getParent(a.cell),
+    d = this.isShiftDownwards(),
+    e = this.isShiftRightwards();
+  return b.getCellsBeyond(a.x + (d ? 0 : a.width), a.y + (d && e ? 0 : a.height), c, e, d)
+};
+mxSpaceManager.prototype.destroy = function() {
+  this.setGraph(null)
+};
+
+function mxSwimlaneManager(a, b, c, d) {
+  this.horizontal = null != b ? b : !0;
+  this.addEnabled = null != c ? c : !0;
+  this.resizeEnabled = null != d ? d : !0;
+  this.addHandler = mxUtils.bind(this, function(a, b) {
+    this.isEnabled() && this.isAddEnabled() && this.cellsAdded(b.getProperty("cells"))
+  });
+  this.resizeHandler = mxUtils.bind(this, function(a, b) {
+    this.isEnabled() && this.isResizeEnabled() && this.cellsResized(b.getProperty("cells"))
+  });
+  this.setGraph(a)
+}
+mxSwimlaneManager.prototype = new mxEventSource;
+mxSwimlaneManager.prototype.constructor = mxSwimlaneManager;
+mxSwimlaneManager.prototype.graph = null;
+mxSwimlaneManager.prototype.enabled = !0;
+mxSwimlaneManager.prototype.horizontal = !0;
+mxSwimlaneManager.prototype.addEnabled = !0;
+mxSwimlaneManager.prototype.resizeEnabled = !0;
+mxSwimlaneManager.prototype.addHandler = null;
+mxSwimlaneManager.prototype.resizeHandler = null;
+mxSwimlaneManager.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxSwimlaneManager.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxSwimlaneManager.prototype.isHorizontal = function() {
+  return this.horizontal
+};
+mxSwimlaneManager.prototype.setHorizontal = function(a) {
+  this.horizontal = a
+};
+mxSwimlaneManager.prototype.isAddEnabled = function() {
+  return this.addEnabled
+};
+mxSwimlaneManager.prototype.setAddEnabled = function(a) {
+  this.addEnabled = a
+};
+mxSwimlaneManager.prototype.isResizeEnabled = function() {
+  return this.resizeEnabled
+};
+mxSwimlaneManager.prototype.setResizeEnabled = function(a) {
+  this.resizeEnabled = a
+};
+mxSwimlaneManager.prototype.getGraph = function() {
+  return this.graph
+};
+mxSwimlaneManager.prototype.setGraph = function(a) {
+  null != this.graph && (this.graph.removeListener(this.addHandler), this.graph.removeListener(this.resizeHandler));
+  this.graph = a;
+  null != this.graph && (this.graph.addListener(mxEvent.ADD_CELLS, this.addHandler), this.graph.addListener(mxEvent.CELLS_RESIZED, this.resizeHandler))
+};
+mxSwimlaneManager.prototype.isSwimlaneIgnored = function(a) {
+  return !this.getGraph().isSwimlane(a)
+};
+mxSwimlaneManager.prototype.isCellHorizontal = function(a) {
+  if (this.graph.isSwimlane(a)) {
+    var b = this.graph.view.getState(a);
+    a = null != b ? b.style : this.graph.getCellStyle(a);
+    return 1 == mxUtils.getValue(a, mxConstants.STYLE_HORIZONTAL, 1)
+  }
+  return !this.isHorizontal()
+};
+mxSwimlaneManager.prototype.cellsAdded = function(a) {
+  if (null != a) {
+    var b = this.getGraph().getModel();
+    b.beginUpdate();
+    try {
+      for (var c = 0; c < a.length; c++) this.isSwimlaneIgnored(a[c]) || this.swimlaneAdded(a[c])
+    } finally {
+      b.endUpdate()
+    }
+  }
+};
+mxSwimlaneManager.prototype.swimlaneAdded = function(a) {
+  for (var b = this.getGraph().getModel(), c = b.getParent(a), d = b.getChildCount(c), e = null, f = 0; f < d; f++) {
+    var g = b.getChildAt(c, f);
+    if (g != a && !this.isSwimlaneIgnored(g) && (e = b.getGeometry(g), null != e)) break
+  }
+  null != e && this.resizeSwimlane(a, e.width, e.height)
+};
+mxSwimlaneManager.prototype.cellsResized = function(a) {
+  if (null != a) {
+    var b = this.getGraph().getModel();
+    b.beginUpdate();
+    try {
+      for (var c = 0; c < a.length; c++)
+        if (!this.isSwimlaneIgnored(a[c])) {
+          var d = b.getGeometry(a[c]);
+          if (null != d) {
+            for (var e = new mxRectangle(0, 0, d.width, d.height), f = a[c], g = f; null != g;) {
+              var f = g,
+                g = b.getParent(g),
+                h = this.graph.isSwimlane(g) ? this.graph.getStartSize(g) : new mxRectangle;
+              e.width += h.width;
+              e.height += h.height
+            }
+            this.resizeSwimlane(f, e.width, e.height)
+          }
+        }
+    } finally {
+      b.endUpdate()
+    }
+  }
+};
+mxSwimlaneManager.prototype.resizeSwimlane = function(a, b, c) {
+  var d = this.getGraph().getModel();
+  d.beginUpdate();
+  try {
+    if (!this.isSwimlaneIgnored(a)) {
+      var e = d.getGeometry(a);
+      if (null != e) {
+        var f = this.isCellHorizontal(a);
+        if (f && e.height != c || !f && e.width != b) e = e.clone(), f ? e.height = c : e.width = b, d.setGeometry(a, e)
+      }
+    }
+    var g = this.graph.isSwimlane(a) ? this.graph.getStartSize(a) : new mxRectangle;
+    b -= g.width;
+    c -= g.height;
+    for (var h = d.getChildCount(a), e = 0; e < h; e++) {
+      var k = d.getChildAt(a, e);
+      this.resizeSwimlane(k, b, c)
+    }
+  } finally {
+    d.endUpdate()
+  }
+};
+mxSwimlaneManager.prototype.destroy = function() {
+  this.setGraph(null)
+};
+
+function mxTemporaryCellStates(a, b, c) {
+  this.view = a;
+  b = null != b ? b : 1;
+  this.oldBounds = a.getGraphBounds();
+  this.oldStates = a.getStates();
+  this.oldScale = a.getScale();
+  a.setStates(new mxDictionary);
+  a.setScale(b);
+  if (null != c) {
+    b = a.createState(new mxCell);
+    for (var d = 0; d < c.length; d++) a.validateBounds(b, c[d]);
+    for (var e = null, d = 0; d < c.length; d++) {
+      var f = a.validatePoints(b, c[d]);
+      null == e ? e = f : e.add(f)
+    }
+    null == e && (e = new mxRectangle);
+    a.setGraphBounds(e)
+  }
+}
+mxTemporaryCellStates.prototype.view = null;
+mxTemporaryCellStates.prototype.oldStates = null;
+mxTemporaryCellStates.prototype.oldBounds = null;
+mxTemporaryCellStates.prototype.oldScale = null;
+mxTemporaryCellStates.prototype.destroy = function() {
+  this.view.setScale(this.oldScale);
+  this.view.setStates(this.oldStates);
+  this.view.setGraphBounds(this.oldBounds)
+};
+
+function mxCellStatePreview(a) {
+  this.graph = a;
+  this.deltas = {}
+}
+mxCellStatePreview.prototype.graph = null;
+mxCellStatePreview.prototype.deltas = null;
+mxCellStatePreview.prototype.count = 0;
+mxCellStatePreview.prototype.isEmpty = function() {
+  return 0 == this.count
+};
+mxCellStatePreview.prototype.moveState = function(a, b, c, d, e) {
+  d = null != d ? d : !0;
+  e = null != e ? e : !0;
+  var f = mxCellPath.create(a.cell),
+    g = this.deltas[f];
+  null == g ? (g = new mxPoint(b, c), this.deltas[f] = g, this.count++) : d ? (g.X += b, g.Y += c) : (g.X = b, g.Y = c);
+  e && this.addEdges(a);
+  return g
+};
+mxCellStatePreview.prototype.show = function(a) {
+  var b = this.graph.getModel(),
+    c = b.getRoot(),
+    d;
+  for (d in this.deltas) {
+    var e = mxCellPath.resolve(c, d),
+      f = this.graph.view.getState(e),
+      g = this.deltas[d],
+      e = this.graph.view.getState(b.getParent(e));
+    this.translateState(e, f, g.x, g.y)
+  }
+  for (d in this.deltas) e = mxCellPath.resolve(c, d), f = this.graph.view.getState(e), g = this.deltas[d], e = this.graph.view.getState(b.getParent(e)), this.revalidateState(e, f, g.x, g.y, a)
+};
+mxCellStatePreview.prototype.translateState = function(a, b, c, d) {
+  if (null != b) {
+    var e = this.graph.getModel();
+    if (e.isVertex(b.cell)) {
+      b.invalid = !0;
+      this.graph.view.validateBounds(a, b.cell);
+      a = e.getGeometry(b.cell);
+      var f = mxCellPath.create(b.cell);
+      if ((0 != c || 0 != d) && null != a && (!a.relative || null != this.deltas[f])) b.x += c, b.y += d
+    }
+    a = e.getChildCount(b.cell);
+    for (f = 0; f < a; f++) this.translateState(b, this.graph.view.getState(e.getChildAt(b.cell, f)), c, d)
+  }
+};
+mxCellStatePreview.prototype.revalidateState = function(a, b, c, d, e) {
+  if (null != b) {
+    b.invalid = !0;
+    this.graph.view.validatePoints(a, b.cell);
+    var f = mxCellPath.create(b.cell),
+      g = this.graph.getModel(),
+      h = this.graph.getCellGeometry(b.cell);
+    if ((0 != c || 0 != d) && null != h && h.relative && g.isVertex(b.cell) && (null == a || g.isVertex(a.cell) || null != this.deltas[f])) b.x += c, b.y += d, this.graph.cellRenderer.redraw(b);
+    null != e && e(b);
+    a = g.getChildCount(b.cell);
+    for (f = 0; f < a; f++) this.revalidateState(b, this.graph.view.getState(g.getChildAt(b.cell,
+      f)), c, d, e)
+  }
+};
+mxCellStatePreview.prototype.addEdges = function(a) {
+  for (var b = this.graph.getModel(), c = b.getEdgeCount(a.cell), d = 0; d < c; d++) {
+    var e = this.graph.view.getState(b.getEdgeAt(a.cell, d));
+    null != e && this.moveState(e, 0, 0)
+  }
+};
+
+function mxConnectionConstraint(a, b) {
+  this.point = a;
+  this.perimeter = null != b ? b : !0
+}
+mxConnectionConstraint.prototype.point = null;
+mxConnectionConstraint.prototype.perimeter = null;
+
+function mxGraphHandler(a) {
+  this.graph = a;
+  this.graph.addMouseListener(this);
+  this.panHandler = mxUtils.bind(this, function() {
+    this.updatePreviewShape()
+  });
+  this.graph.addListener(mxEvent.PAN, this.panHandler)
+}
+mxGraphHandler.prototype.graph = null;
+mxGraphHandler.prototype.maxCells = mxClient.IS_IE ? 20 : 50;
+mxGraphHandler.prototype.enabled = !0;
+mxGraphHandler.prototype.highlightEnabled = !0;
+mxGraphHandler.prototype.cloneEnabled = !0;
+mxGraphHandler.prototype.moveEnabled = !0;
+mxGraphHandler.prototype.guidesEnabled = !1;
+mxGraphHandler.prototype.guide = null;
+mxGraphHandler.prototype.currentDx = null;
+mxGraphHandler.prototype.currentDy = null;
+mxGraphHandler.prototype.updateCursor = !0;
+mxGraphHandler.prototype.selectEnabled = !0;
+mxGraphHandler.prototype.removeCellsFromParent = !0;
+mxGraphHandler.prototype.connectOnDrop = !1;
+mxGraphHandler.prototype.scrollOnMove = !0;
+mxGraphHandler.prototype.minimumSize = 6;
+mxGraphHandler.prototype.previewColor = "black";
+mxGraphHandler.prototype.htmlPreview = !1;
+mxGraphHandler.prototype.shape = null;
+mxGraphHandler.prototype.scaleGrid = !1;
+mxGraphHandler.prototype.rotationEnabled = !0;
+mxGraphHandler.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxGraphHandler.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxGraphHandler.prototype.isCloneEnabled = function() {
+  return this.cloneEnabled
+};
+mxGraphHandler.prototype.setCloneEnabled = function(a) {
+  this.cloneEnabled = a
+};
+mxGraphHandler.prototype.isMoveEnabled = function() {
+  return this.moveEnabled
+};
+mxGraphHandler.prototype.setMoveEnabled = function(a) {
+  this.moveEnabled = a
+};
+mxGraphHandler.prototype.isSelectEnabled = function() {
+  return this.selectEnabled
+};
+mxGraphHandler.prototype.setSelectEnabled = function(a) {
+  this.selectEnabled = a
+};
+mxGraphHandler.prototype.isRemoveCellsFromParent = function() {
+  return this.removeCellsFromParent
+};
+mxGraphHandler.prototype.setRemoveCellsFromParent = function(a) {
+  this.removeCellsFromParent = a
+};
+mxGraphHandler.prototype.getInitialCellForEvent = function(a) {
+  return a.getCell()
+};
+mxGraphHandler.prototype.isDelayedSelection = function(a) {
+  return this.graph.isCellSelected(a)
+};
+mxGraphHandler.prototype.mouseDown = function(a, b) {
+  if (!b.isConsumed() && this.isEnabled() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent()) && null != b.getState()) {
+    var c = this.getInitialCellForEvent(b);
+    this.cell = null;
+    this.delayedSelection = this.isDelayedSelection(c);
+    this.isSelectEnabled() && !this.delayedSelection && this.graph.selectCellForEvent(c, b.getEvent());
+    if (this.isMoveEnabled()) {
+      var d = this.graph.model,
+        e = d.getGeometry(c);
+      this.graph.isCellMovable(c) && (!d.isEdge(c) || 1 < this.graph.getSelectionCount() ||
+        null != e.points && 0 < e.points.length || null == d.getTerminal(c, !0) || null == d.getTerminal(c, !1) || this.graph.allowDanglingEdges || this.graph.isCloneEvent(b.getEvent()) && this.graph
+        .isCellsCloneable()) && this.start(c, b.getX(), b.getY());
+      this.cellWasClicked = !0;
+      !mxClient.IS_SF && !mxClient.IS_GC || "SELECT" != b.getSource().nodeName ? b.consume() : mxClient.IS_SF && "SELECT" == b.getSource().nodeName && (this.cellWasClicked = !1, this.first = null)
+    }
+  }
+};
+mxGraphHandler.prototype.getGuideStates = function() {
+  var a = this.graph.getDefaultParent(),
+    b = this.graph.getModel(),
+    c = mxUtils.bind(this, function(a) {
+      return null != this.graph.view.getState(a) && b.isVertex(a) && null != b.getGeometry(a) && !b.getGeometry(a).relative
+    });
+  return this.graph.view.getCellStates(b.filterDescendants(c, a))
+};
+mxGraphHandler.prototype.getCells = function(a) {
+  return !this.delayedSelection && this.graph.isCellMovable(a) ? [a] : this.graph.getMovableCells(this.graph.getSelectionCells())
+};
+mxGraphHandler.prototype.getPreviewBounds = function(a) {
+  a = this.getBoundingBox(a);
+  null != a && (a.grow(-1, -1), a.width < this.minimumSize && (a.x -= (this.minimumSize - a.width) / 2, a.width = this.minimumSize), a.height < this.minimumSize && (a.y -= (this.minimumSize - a.height) /
+    2, a.height = this.minimumSize));
+  return a
+};
+mxGraphHandler.prototype.getBoundingBox = function(a) {
+  var b = null;
+  if (null != a && 0 < a.length)
+    for (var c = this.graph.getModel(), d = 0; d < a.length; d++)
+      if (c.isVertex(a[d]) || c.isEdge(a[d])) {
+        var e = this.graph.view.getState(a[d]);
+        if (null != e) {
+          var f = e;
+          c.isVertex(a[d]) && (null != e.shape && null != e.shape.boundingBox) && (f = e.shape.boundingBox);
+          null == b ? b = new mxRectangle(f.x, f.y, f.width, f.height) : b.add(f)
+        }
+      }
+  return b
+};
+mxGraphHandler.prototype.createPreviewShape = function(a) {
+  a = new mxRectangleShape(a, null, this.previewColor);
+  a.isDashed = !0;
+  this.htmlPreview ? (a.dialect = mxConstants.DIALECT_STRICTHTML, a.init(this.graph.container)) : (a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG,
+    a.init(this.graph.getView().getOverlayPane()), a.pointerEvents = !1);
+  return a
+};
+mxGraphHandler.prototype.start = function(a, b, c) {
+  this.cell = a;
+  this.first = mxUtils.convertPoint(this.graph.container, b, c);
+  this.cells = this.getCells(this.cell);
+  this.bounds = this.graph.getView().getBounds(this.cells);
+  this.pBounds = this.getPreviewBounds(this.cells);
+  this.guidesEnabled && (this.guide = new mxGuide(this.graph, this.getGuideStates()))
+};
+mxGraphHandler.prototype.useGuidesForEvent = function(a) {
+  return null != this.guide ? this.guide.isEnabledForEvent(a.getEvent()) : !0
+};
+mxGraphHandler.prototype.snap = function(a) {
+  var b = this.scaleGrid ? this.graph.view.scale : 1;
+  a.x = this.graph.snap(a.x / b) * b;
+  a.y = this.graph.snap(a.y / b) * b;
+  return a
+};
+mxGraphHandler.prototype.mouseMove = function(a, b) {
+  var c = this.graph;
+  if (!b.isConsumed() && c.isMouseDown && null != this.cell && null != this.first && null != this.bounds) {
+    var d = mxUtils.convertPoint(c.container, b.getX(), b.getY()),
+      e = d.x - this.first.x,
+      f = d.y - this.first.y,
+      d = c.tolerance;
+    if (null != this.shape || Math.abs(e) > d || Math.abs(f) > d) {
+      null == this.highlight && (this.highlight = new mxCellHighlight(this.graph, mxConstants.DROP_TARGET_COLOR, 3));
+      null == this.shape && (this.shape = this.createPreviewShape(this.bounds));
+      var g = c.isGridEnabledEvent(b.getEvent()),
+        d = !0;
+      if (null != this.guide && this.useGuidesForEvent(b)) f = this.guide.move(this.bounds, new mxPoint(e, f), g), d = !1, e = f.x, f = f.y;
+      else if (g) var h = c.getView().translate,
+        k = c.getView().scale,
+        g = this.bounds.x - (c.snap(this.bounds.x / k - h.x) + h.x) * k,
+        h = this.bounds.y - (c.snap(this.bounds.y / k - h.y) + h.y) * k,
+        f = this.snap(new mxPoint(e, f)),
+        e = f.x - g,
+        f = f.y - h;
+      null != this.guide && d && this.guide.hide();
+      c.isConstrainedEvent(b.getEvent()) && (Math.abs(e) > Math.abs(f) ? f = 0 : e = 0);
+      this.currentDx = e;
+      this.currentDy = f;
+      this.updatePreviewShape();
+      d = null;
+      f = b.getCell();
+      c.isDropEnabled() && this.highlightEnabled && (d = c.getDropTarget(this.cells, b.getEvent(), f));
+      g = d;
+      for (h = c.getModel(); null != g && g != this.cells[0];) g = h.getParent(g);
+      var k = c.isCloneEvent(b.getEvent()) && c.isCellsCloneable() && this.isCloneEnabled(),
+        e = c.getView().getState(d),
+        l = !1;
+      null != e && null == g && (h.getParent(this.cell) != d || k) ? (this.target != d && (this.target = d, this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)), l = !0) : (this.target = null,
+        this.connectOnDrop && (null != f && 1 == this.cells.length && c.getModel().isVertex(f) &&
+          c.isCellConnectable(f)) && (e = c.getView().getState(f), null != e && (c = null == c.getEdgeValidationError(null, this.cell, f) ? mxConstants.VALID_COLOR : mxConstants.INVALID_CONNECT_TARGET_COLOR,
+          this.setHighlightColor(c), l = !0)));
+      null != e && l ? this.highlight.highlight(e) : this.highlight.hide()
+    }
+    b.consume();
+    mxEvent.consume(b.getEvent())
+  } else if ((this.isMoveEnabled() || this.isCloneEnabled()) && this.updateCursor && !b.isConsumed() && null != b.getState() && !c.isMouseDown) e = c.getCursorForCell(b.getCell()), null == e && (c.isEnabled() &&
+      c.isCellMovable(b.getCell())) &&
+    (e = c.getModel().isEdge(b.getCell()) ? mxConstants.CURSOR_MOVABLE_EDGE : mxConstants.CURSOR_MOVABLE_VERTEX), b.getState().setCursor(e), b.consume()
+};
+mxGraphHandler.prototype.updatePreviewShape = function() {
+  null != this.shape && (this.shape.bounds = new mxRectangle(Math.round(this.pBounds.x + this.currentDx - this.graph.panDx), Math.round(this.pBounds.y + this.currentDy - this.graph.panDy), this.pBounds
+    .width, this.pBounds.height), this.shape.redraw())
+};
+mxGraphHandler.prototype.setHighlightColor = function(a) {
+  null != this.highlight && this.highlight.setHighlightColor(a)
+};
+mxGraphHandler.prototype.mouseUp = function(a, b) {
+  if (!b.isConsumed()) {
+    var c = this.graph;
+    if (null != this.cell && null != this.first && null != this.shape && null != this.currentDx && null != this.currentDy) {
+      var d = c.getView().scale,
+        e = c.isCloneEvent(b.getEvent()) && c.isCellsCloneable() && this.isCloneEnabled(),
+        f = this.currentDx / d,
+        d = this.currentDy / d,
+        g = b.getCell();
+      this.connectOnDrop && null == this.target && null != g && c.getModel().isVertex(g) && c.isCellConnectable(g) && c.isEdgeValid(null, this.cell, g) ? c.connectionHandler.connect(this.cell,
+        g, b.getEvent()) : (g = this.target, c.isSplitEnabled() && c.isSplitTarget(g, this.cells, b.getEvent()) ? c.splitEdge(g, this.cells, null, f, d) : this.moveCells(this.cells, f, d, e, this
+        .target, b.getEvent()))
+    } else this.isSelectEnabled() && (this.delayedSelection && null != this.cell) && this.selectDelayed(b)
+  }
+  this.cellWasClicked && b.consume();
+  this.reset()
+};
+mxGraphHandler.prototype.selectDelayed = function(a) {
+  this.graph.selectCellForEvent(this.cell, a.getEvent())
+};
+mxGraphHandler.prototype.reset = function() {
+  this.destroyShapes();
+  this.delayedSelection = this.cellWasClicked = !1;
+  this.target = this.cell = this.first = this.guides = this.currentDy = this.currentDx = null
+};
+mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(a, b, c) {
+  if (this.graph.getModel().isVertex(a)) {
+    a = this.graph.getView().getState(a);
+    c = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(c), mxEvent.getClientY(c));
+    var d = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0);
+    if (0 != d) {
+      b = Math.cos(-d);
+      var d = Math.sin(-d),
+        e = new mxPoint(a.getCenterX(), a.getCenterY());
+      c = mxUtils.getRotatedPoint(c, b, d, e)
+    }
+    return null != a && !mxUtils.contains(a, c.x, c.y)
+  }
+  return !1
+};
+mxGraphHandler.prototype.moveCells = function(a, b, c, d, e, f) {
+  d && (a = this.graph.getCloneableCells(a));
+  null == e && (this.isRemoveCellsFromParent() && this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell), a, f)) && (e = this.graph.getDefaultParent());
+  a = this.graph.moveCells(a, b - this.graph.panDx / this.graph.view.scale, c - this.graph.panDy / this.graph.view.scale, d, e, f);
+  this.isSelectEnabled() && this.scrollOnMove && this.graph.scrollCellToVisible(a[0]);
+  d && this.graph.setSelectionCells(a)
+};
+mxGraphHandler.prototype.destroyShapes = function() {
+  null != this.shape && (this.shape.destroy(), this.shape = null);
+  null != this.guide && (this.guide.destroy(), this.guide = null);
+  null != this.highlight && (this.highlight.destroy(), this.highlight = null)
+};
+mxGraphHandler.prototype.destroy = function() {
+  this.graph.removeMouseListener(this);
+  this.graph.removeListener(this.panHandler);
+  this.destroyShapes()
+};
+
+function mxPanningHandler(a, b) {
+  null != a && (this.graph = a, this.factoryMethod = b, this.graph.addMouseListener(this), this.init())
+}
+mxPanningHandler.prototype = new mxPopupMenu;
+mxPanningHandler.prototype.constructor = mxPanningHandler;
+mxPanningHandler.prototype.graph = null;
+mxPanningHandler.prototype.triggerX = null;
+mxPanningHandler.prototype.triggerY = null;
+mxPanningHandler.prototype.usePopupTrigger = !0;
+mxPanningHandler.prototype.useLeftButtonForPanning = !1;
+mxPanningHandler.prototype.selectOnPopup = !0;
+mxPanningHandler.prototype.clearSelectionOnBackground = !0;
+mxPanningHandler.prototype.ignoreCell = !1;
+mxPanningHandler.prototype.previewEnabled = !0;
+mxPanningHandler.prototype.useGrid = !1;
+mxPanningHandler.prototype.panningEnabled = !0;
+mxPanningHandler.prototype.isPanningEnabled = function() {
+  return this.panningEnabled
+};
+mxPanningHandler.prototype.setPanningEnabled = function(a) {
+  this.panningEnabled = a
+};
+mxPanningHandler.prototype.init = function() {
+  mxPopupMenu.prototype.init.apply(this);
+  mxEvent.addListener(this.div, mxClient.IS_TOUCH ? "touchmove" : "mousemove", mxUtils.bind(this, function(a) {
+    this.graph.tooltipHandler.hide()
+  }))
+};
+mxPanningHandler.prototype.isPanningTrigger = function(a) {
+  var b = a.getEvent();
+  return this.useLeftButtonForPanning && (this.ignoreCell || null == a.getState()) && mxEvent.isLeftMouseButton(b) || mxEvent.isControlDown(b) && mxEvent.isShiftDown(b) || this.usePopupTrigger &&
+    mxEvent.isPopupTrigger(b)
+};
+mxPanningHandler.prototype.mouseDown = function(a, b) {
+  if (!b.isConsumed() && this.isEnabled()) {
+    this.hideMenu();
+    this.dx0 = -this.graph.container.scrollLeft;
+    this.dy0 = -this.graph.container.scrollTop;
+    var c = mxUtils.convertPoint(this.graph.container, b.getX(), b.getY());
+    this.triggerX = c.x;
+    this.triggerY = c.y;
+    this.popupTrigger = this.isPopupTrigger(b);
+    this.panningTrigger = this.isPanningEnabled() && this.isPanningTrigger(b);
+    this.startX = b.getX();
+    this.startY = b.getY();
+    this.panningTrigger && this.consumePanningTrigger(b)
+  }
+};
+mxPanningHandler.prototype.consumePanningTrigger = function(a) {
+  a.consume()
+};
+mxPanningHandler.prototype.mouseMove = function(a, b) {
+  var c = b.getX() - this.startX,
+    d = b.getY() - this.startY;
+  if (this.active) this.previewEnabled && (this.useGrid && (c = this.graph.snap(c), d = this.graph.snap(d)), this.graph.panGraph(c + this.dx0, d + this.dy0)), this.fireEvent(new mxEventObject(
+    mxEvent.PAN, "event", b)), b.consume();
+  else if (this.panningTrigger) {
+    var e = this.active;
+    this.active = Math.abs(c) > this.graph.tolerance || Math.abs(d) > this.graph.tolerance;
+    !e && this.active && this.fireEvent(new mxEventObject(mxEvent.PAN_START,
+      "event", b))
+  }
+};
+mxPanningHandler.prototype.mouseUp = function(a, b) {
+  var c = Math.abs(b.getX() - this.startX),
+    d = Math.abs(b.getY() - this.startY);
+  if (this.active) {
+    if (!this.graph.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.graph.container)) {
+      c = b.getX() - this.startX;
+      d = b.getY() - this.startY;
+      this.useGrid && (c = this.graph.snap(c), d = this.graph.snap(d));
+      var e = this.graph.getView().scale,
+        f = this.graph.getView().translate;
+      this.graph.panGraph(0, 0);
+      this.panGraph(f.x + c / e, f.y + d / e)
+    }
+    this.active = !1;
+    this.fireEvent(new mxEventObject(mxEvent.PAN_END, "event",
+      b));
+    b.consume()
+  } else this.popupTrigger && (c < this.graph.tolerance && d < this.graph.tolerance) && (c = this.getCellForPopupEvent(b), this.graph.isEnabled() && this.selectOnPopup && null != c && !this.graph.isCellSelected(
+    c) ? this.graph.setSelectionCell(c) : this.clearSelectionOnBackground && null == c && this.graph.clearSelection(), this.graph.tooltipHandler.hide(), d = mxUtils.getScrollOrigin(), d = new mxPoint(
+    b.getX() + d.x, b.getY() + d.y), this.popup(d.x + 1, d.y + 1, c, b.getEvent()), b.consume());
+  this.popupTrigger = this.panningTrigger = !1
+};
+mxPanningHandler.prototype.getCellForPopupEvent = function(a) {
+  return a.getCell()
+};
+mxPanningHandler.prototype.panGraph = function(a, b) {
+  this.graph.getView().setTranslate(a, b)
+};
+mxPanningHandler.prototype.destroy = function() {
+  this.graph.removeMouseListener(this);
+  mxPopupMenu.prototype.destroy.apply(this)
+};
+
+function mxCellMarker(a, b, c, d) {
+  mxEventSource.call(this);
+  null != a && (this.graph = a, this.validColor = null != b ? b : mxConstants.DEFAULT_VALID_COLOR, this.invalidColor = null != b ? c : mxConstants.DEFAULT_INVALID_COLOR, this.hotspot = null != d ? d :
+    mxConstants.DEFAULT_HOTSPOT, this.highlight = new mxCellHighlight(a))
+}
+mxUtils.extend(mxCellMarker, mxEventSource);
+mxCellMarker.prototype.graph = null;
+mxCellMarker.prototype.enabled = !0;
+mxCellMarker.prototype.hotspot = mxConstants.DEFAULT_HOTSPOT;
+mxCellMarker.prototype.hotspotEnabled = !1;
+mxCellMarker.prototype.validColor = null;
+mxCellMarker.prototype.invalidColor = null;
+mxCellMarker.prototype.currentColor = null;
+mxCellMarker.prototype.validState = null;
+mxCellMarker.prototype.markedState = null;
+mxCellMarker.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxCellMarker.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxCellMarker.prototype.setHotspot = function(a) {
+  this.hotspot = a
+};
+mxCellMarker.prototype.getHotspot = function() {
+  return this.hotspot
+};
+mxCellMarker.prototype.setHotspotEnabled = function(a) {
+  this.hotspotEnabled = a
+};
+mxCellMarker.prototype.isHotspotEnabled = function() {
+  return this.hotspotEnabled
+};
+mxCellMarker.prototype.hasValidState = function() {
+  return null != this.validState
+};
+mxCellMarker.prototype.getValidState = function() {
+  return this.validState
+};
+mxCellMarker.prototype.getMarkedState = function() {
+  return this.markedState
+};
+mxCellMarker.prototype.reset = function() {
+  this.validState = null;
+  null != this.markedState && (this.markedState = null, this.unmark())
+};
+mxCellMarker.prototype.process = function(a) {
+  var b = null;
+  if (this.isEnabled()) {
+    var b = this.getState(a),
+      c = null != b ? this.isValidState(b) : !1;
+    a = this.getMarkerColor(a.getEvent(), b, c);
+    this.validState = c ? b : null;
+    if (b != this.markedState || a != this.currentColor) this.currentColor = a, null != b && null != this.currentColor ? (this.markedState = b, this.mark()) : null != this.markedState && (this.markedState =
+      null, this.unmark())
+  }
+  return b
+};
+mxCellMarker.prototype.markCell = function(a, b) {
+  var c = this.graph.getView().getState(a);
+  null != c && (this.currentColor = null != b ? b : this.validColor, this.markedState = c, this.mark())
+};
+mxCellMarker.prototype.mark = function() {
+  this.highlight.setHighlightColor(this.currentColor);
+  this.highlight.highlight(this.markedState);
+  this.fireEvent(new mxEventObject(mxEvent.MARK, "state", this.markedState))
+};
+mxCellMarker.prototype.unmark = function() {
+  this.mark()
+};
+mxCellMarker.prototype.isValidState = function(a) {
+  return !0
+};
+mxCellMarker.prototype.getMarkerColor = function(a, b, c) {
+  return c ? this.validColor : this.invalidColor
+};
+mxCellMarker.prototype.getState = function(a) {
+  var b = this.graph.getView();
+  cell = this.getCell(a);
+  b = this.getStateToMark(b.getState(cell));
+  return null != b && this.intersects(b, a) ? b : null
+};
+mxCellMarker.prototype.getCell = function(a) {
+  return a.getCell()
+};
+mxCellMarker.prototype.getStateToMark = function(a) {
+  return a
+};
+mxCellMarker.prototype.intersects = function(a, b) {
+  return this.hotspotEnabled ? mxUtils.intersectsHotspot(a, b.getGraphX(), b.getGraphY(), this.hotspot, mxConstants.MIN_HOTSPOT_SIZE, mxConstants.MAX_HOTSPOT_SIZE) : !0
+};
+mxCellMarker.prototype.destroy = function() {
+  this.graph.getView().removeListener(this.resetHandler);
+  this.graph.getModel().removeListener(this.resetHandler);
+  this.highlight.destroy()
+};
+
+function mxSelectionCellsHandler(a) {
+  mxEventSource.call(this);
+  this.graph = a;
+  this.handlers = new mxDictionary;
+  this.graph.addMouseListener(this);
+  this.refreshHandler = mxUtils.bind(this, function(a, c) {
+    this.isEnabled() && this.refresh()
+  });
+  this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.refreshHandler);
+  this.graph.getModel().addListener(mxEvent.CHANGE, this.refreshHandler);
+  this.graph.getView().addListener(mxEvent.SCALE, this.refreshHandler);
+  this.graph.getView().addListener(mxEvent.TRANSLATE, this.refreshHandler);
+  this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.refreshHandler);
+  this.graph.getView().addListener(mxEvent.DOWN, this.refreshHandler);
+  this.graph.getView().addListener(mxEvent.UP, this.refreshHandler)
+}
+mxUtils.extend(mxSelectionCellsHandler, mxEventSource);
+mxSelectionCellsHandler.prototype.graph = null;
+mxSelectionCellsHandler.prototype.enabled = !0;
+mxSelectionCellsHandler.prototype.refreshHandler = null;
+mxSelectionCellsHandler.prototype.maxHandlers = 100;
+mxSelectionCellsHandler.prototype.handlers = null;
+mxSelectionCellsHandler.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxSelectionCellsHandler.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxSelectionCellsHandler.prototype.getHandler = function(a) {
+  return this.handlers.get(a)
+};
+mxSelectionCellsHandler.prototype.reset = function() {
+  this.handlers.visit(function(a, b) {
+    b.reset.apply(b)
+  })
+};
+mxSelectionCellsHandler.prototype.refresh = function() {
+  var a = this.handlers;
+  this.handlers = new mxDictionary;
+  for (var b = this.graph.getSelectionCells(), c = 0; c < b.length; c++) {
+    var d = this.graph.view.getState(b[c]);
+    if (null != d) {
+      var e = a.remove(b[c]);
+      null != e && (e.state != d ? (e.destroy(), e = null) : e.redraw());
+      null == e && (e = this.graph.createHandler(d), this.fireEvent(new mxEventObject(mxEvent.ADD, "state", d)));
+      null != e && this.handlers.put(b[c], e)
+    }
+  }
+  a.visit(mxUtils.bind(this, function(a, b) {
+    this.fireEvent(new mxEventObject(mxEvent.REMOVE,
+      "state", b.state));
+    b.destroy()
+  }))
+};
+mxSelectionCellsHandler.prototype.mouseDown = function(a, b) {
+  if (this.graph.isEnabled() && this.isEnabled()) {
+    var c = [a, b];
+    this.handlers.visit(function(a, b) {
+      b.mouseDown.apply(b, c)
+    })
+  }
+};
+mxSelectionCellsHandler.prototype.mouseMove = function(a, b) {
+  if (this.graph.isEnabled() && this.isEnabled()) {
+    var c = [a, b];
+    this.handlers.visit(function(a, b) {
+      b.mouseMove.apply(b, c)
+    })
+  }
+};
+mxSelectionCellsHandler.prototype.mouseUp = function(a, b) {
+  if (this.graph.isEnabled() && this.isEnabled()) {
+    var c = [a, b];
+    this.handlers.visit(function(a, b) {
+      b.mouseUp.apply(b, c)
+    })
+  }
+};
+mxSelectionCellsHandler.prototype.destroy = function() {
+  this.graph.removeMouseListener(this);
+  null != this.refreshHandler && (this.graph.getSelectionModel().removeListener(this.refreshHandler), this.graph.getModel().removeListener(this.refreshHandler), this.graph.getView().removeListener(
+    this.refreshHandler), this.refreshHandler = null)
+};
+
+function mxConnectionHandler(a, b) {
+  mxEventSource.call(this);
+  null != a && (this.graph = a, this.factoryMethod = b, this.init())
+}
+mxUtils.extend(mxConnectionHandler, mxEventSource);
+mxConnectionHandler.prototype.graph = null;
+mxConnectionHandler.prototype.factoryMethod = !0;
+mxConnectionHandler.prototype.moveIconFront = !1;
+mxConnectionHandler.prototype.moveIconBack = !1;
+mxConnectionHandler.prototype.connectImage = null;
+mxConnectionHandler.prototype.targetConnectImage = !1;
+mxConnectionHandler.prototype.enabled = !0;
+mxConnectionHandler.prototype.select = !0;
+mxConnectionHandler.prototype.createTarget = !1;
+mxConnectionHandler.prototype.marker = null;
+mxConnectionHandler.prototype.constraintHandler = null;
+mxConnectionHandler.prototype.error = null;
+mxConnectionHandler.prototype.waypointsEnabled = !1;
+mxConnectionHandler.prototype.tapAndHoldEnabled = !0;
+mxConnectionHandler.prototype.tapAndHoldDelay = 500;
+mxConnectionHandler.prototype.tapAndHoldInProgress = !1;
+mxConnectionHandler.prototype.tapAndHoldValid = !1;
+mxConnectionHandler.prototype.tapAndHoldTolerance = 4;
+mxConnectionHandler.prototype.initialTouchX = 0;
+mxConnectionHandler.prototype.initialTouchY = 0;
+mxConnectionHandler.prototype.ignoreMouseDown = !1;
+mxConnectionHandler.prototype.first = null;
+mxConnectionHandler.prototype.connectIconOffset = new mxPoint(0, mxConstants.TOOLTIP_VERTICAL_OFFSET);
+mxConnectionHandler.prototype.edgeState = null;
+mxConnectionHandler.prototype.changeHandler = null;
+mxConnectionHandler.prototype.drillHandler = null;
+mxConnectionHandler.prototype.mouseDownCounter = 0;
+mxConnectionHandler.prototype.movePreviewAway = mxClient.IS_VML;
+mxConnectionHandler.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxConnectionHandler.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxConnectionHandler.prototype.isCreateTarget = function() {
+  return this.createTarget
+};
+mxConnectionHandler.prototype.setCreateTarget = function(a) {
+  this.createTarget = a
+};
+mxConnectionHandler.prototype.createShape = function() {
+  var a = new mxPolyline([], mxConstants.INVALID_COLOR);
+  a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
+  a.init(this.graph.getView().getOverlayPane());
+  a.svgStrokeTolerance = 0;
+  a.pointerEvents = !1;
+  a.isDashed = !0;
+  if (this.graph.dialect == mxConstants.DIALECT_SVG) a.node.setAttribute("pointer-events", "none");
+  else {
+    var b = mxUtils.bind(this, function(a) {
+      a = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a),
+        mxEvent.getClientY(a));
+      return this.graph.view.getState(this.graph.getCellAt(a.x, a.y))
+    });
+    mxEvent.redirectMouseEvents(a.node, this.graph, b)
+  }
+  return a
+};
+mxConnectionHandler.prototype.init = function() {
+  this.graph.addMouseListener(this);
+  this.marker = this.createMarker();
+  this.constraintHandler = new mxConstraintHandler(this.graph);
+  this.changeHandler = mxUtils.bind(this, function(a) {
+    null != this.iconState && (this.iconState = this.graph.getView().getState(this.iconState.cell));
+    null != this.iconState ? this.redrawIcons(this.icons, this.iconState) : (this.destroyIcons(this.icons), this.previous = null);
+    this.constraintHandler.reset()
+  });
+  this.graph.getModel().addListener(mxEvent.CHANGE,
+    this.changeHandler);
+  this.graph.getView().addListener(mxEvent.SCALE, this.changeHandler);
+  this.graph.getView().addListener(mxEvent.TRANSLATE, this.changeHandler);
+  this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.changeHandler);
+  this.drillHandler = mxUtils.bind(this, function(a) {
+    this.destroyIcons(this.icons)
+  });
+  this.graph.addListener(mxEvent.START_EDITING, this.drillHandler);
+  this.graph.getView().addListener(mxEvent.DOWN, this.drillHandler);
+  this.graph.getView().addListener(mxEvent.UP, this.drillHandler)
+};
+mxConnectionHandler.prototype.isConnectableCell = function(a) {
+  return !0
+};
+mxConnectionHandler.prototype.createMarker = function() {
+  var a = new mxCellMarker(this.graph);
+  a.hotspotEnabled = !0;
+  a.getCell = mxUtils.bind(this, function(b, c) {
+    c = mxCellMarker.prototype.getCell.apply(a, arguments);
+    this.error = null;
+    if (!this.isConnectableCell(c)) return null;
+    null != c ? this.isConnecting() ? null != this.previous && (this.error = this.validateConnection(this.previous.cell, c), null != this.error && 0 == this.error.length && (c = null, this.isCreateTarget() &&
+        (this.error = null))) : this.isValidSource(c) || (c = null) : this.isConnecting() &&
+      (!this.isCreateTarget() && !this.graph.allowDanglingEdges) && (this.error = "");
+    return c
+  });
+  a.isValidState = mxUtils.bind(this, function(b) {
+    return this.isConnecting() ? null == this.error : mxCellMarker.prototype.isValidState.apply(a, arguments)
+  });
+  a.getMarkerColor = mxUtils.bind(this, function(b, c, d) {
+    return null == this.connectImage || this.isConnecting() ? mxCellMarker.prototype.getMarkerColor.apply(a, arguments) : null
+  });
+  a.intersects = mxUtils.bind(this, function(b, c) {
+    return null != this.connectImage || this.isConnecting() ? !0 : mxCellMarker.prototype.intersects.apply(a,
+      arguments)
+  });
+  return a
+};
+mxConnectionHandler.prototype.start = function(a, b, c, d) {
+  this.previous = a;
+  this.first = new mxPoint(b, c);
+  this.edgeState = null != d ? d : this.createEdgeState(null);
+  this.marker.currentColor = this.marker.validColor;
+  this.marker.markedState = a;
+  this.marker.mark();
+  this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous))
+};
+mxConnectionHandler.prototype.isConnecting = function() {
+  return null != this.first && null != this.shape
+};
+mxConnectionHandler.prototype.isValidSource = function(a) {
+  return this.graph.isValidSource(a)
+};
+mxConnectionHandler.prototype.isValidTarget = function(a) {
+  return !0
+};
+mxConnectionHandler.prototype.validateConnection = function(a, b) {
+  return !this.isValidTarget(b) ? "" : this.graph.getEdgeValidationError(null, a, b)
+};
+mxConnectionHandler.prototype.getConnectImage = function(a) {
+  return this.connectImage
+};
+mxConnectionHandler.prototype.isMoveIconToFrontForState = function(a) {
+  return null != a.text && a.text.node.parentNode == this.graph.container ? !0 : this.moveIconFront
+};
+mxConnectionHandler.prototype.createIcons = function(a) {
+  var b = this.getConnectImage(a);
+  if (null != b && null != a) {
+    this.iconState = a;
+    var c = [],
+      d = new mxRectangle(0, 0, b.width, b.height),
+      e = new mxImageShape(d, b.src, null, null, 0);
+    e.preserveImageAspect = !1;
+    this.isMoveIconToFrontForState(a) ? (e.dialect = mxConstants.DIALECT_STRICTHTML, e.init(this.graph.container)) : (e.dialect = this.graph.dialect == mxConstants.DIALECT_SVG ? mxConstants.DIALECT_SVG :
+      mxConstants.DIALECT_VML, e.init(this.graph.getView().getOverlayPane()), this.moveIconBack &&
+      null != e.node.previousSibling && e.node.parentNode.insertBefore(e.node, e.node.parentNode.firstChild));
+    e.node.style.cursor = mxConstants.CURSOR_CONNECT;
+    var f = mxUtils.bind(this, function() {
+        return null != this.currentState ? this.currentState : a
+      }),
+      b = mxUtils.bind(this, function(a) {
+        mxEvent.isConsumed(a) || (this.icon = e, this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, f())))
+      });
+    mxEvent.redirectMouseEvents(e.node, this.graph, f, b);
+    c.push(e);
+    this.redrawIcons(c, this.iconState);
+    return c
+  }
+  return null
+};
+mxConnectionHandler.prototype.redrawIcons = function(a, b) {
+  if (null != a && null != a[0] && null != b) {
+    var c = this.getIconPosition(a[0], b);
+    a[0].bounds.x = c.x;
+    a[0].bounds.y = c.y;
+    a[0].redraw()
+  }
+};
+mxConnectionHandler.prototype.getIconPosition = function(a, b) {
+  var c = this.graph.getView().scale,
+    d = b.getCenterX(),
+    e = b.getCenterY();
+  if (this.graph.isSwimlane(b.cell)) {
+    var f = this.graph.getStartSize(b.cell),
+      d = 0 != f.width ? b.x + f.width * c / 2 : d,
+      e = 0 != f.height ? b.y + f.height * c / 2 : e,
+      f = mxUtils.toRadians(mxUtils.getValue(b.style, mxConstants.STYLE_ROTATION) || 0);
+    if (0 != f) var c = Math.cos(f),
+      f = Math.sin(f),
+      g = new mxPoint(b.getCenterX(), b.getCenterY()),
+      e = mxUtils.getRotatedPoint(new mxPoint(d, e), c, f, g),
+      d = e.x,
+      e = e.y
+  }
+  return new mxPoint(d -
+    a.bounds.width / 2, e - a.bounds.height / 2)
+};
+mxConnectionHandler.prototype.destroyIcons = function(a) {
+  if (null != a) {
+    this.iconState = null;
+    for (var b = 0; b < a.length; b++) a[b].destroy()
+  }
+};
+mxConnectionHandler.prototype.isStartEvent = function(a) {
+  return !this.graph.isForceMarqueeEvent(a.getEvent()) && (null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentConstraint || null != this.previous && null == this.error &&
+    (null == this.icons || null != this.icons && null != this.icon))
+};
+mxConnectionHandler.prototype.mouseDown = function(a, b) {
+  this.mouseDownCounter++;
+  if (this.isEnabled() && this.graph.isEnabled() && !b.isConsumed() && !this.isConnecting() && this.isStartEvent(b)) {
+    null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentPoint ? (this.sourceConstraint = this.constraintHandler.currentConstraint,
+      this.previous = this.constraintHandler.currentFocus, this.first = this.constraintHandler.currentPoint.clone()) : this.first = new mxPoint(b.getGraphX(),
+      b.getGraphY());
+    this.edgeState = this.createEdgeState(b);
+    this.mouseDownCounter = 1;
+    this.waypointsEnabled && null == this.shape && (this.waypoints = null, this.shape = this.createShape());
+    if (null == this.previous && null != this.edgeState) {
+      var c = this.graph.getPointForEvent(b.getEvent());
+      this.edgeState.cell.geometry.setTerminalPoint(c, !0)
+    }
+    this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous));
+    b.consume()
+  } else if (mxClient.IS_TOUCH && this.tapAndHoldEnabled && !this.tapAndHoldInProgress && this.isEnabled() && this.graph.isEnabled() &&
+    !this.isConnecting()) {
+    this.tapAndHoldInProgress = !0;
+    this.initialTouchX = b.getX();
+    this.initialTouchY = b.getY();
+    var d = this.graph.view.getState(this.marker.getCell(b));
+    this.tapAndHoldThread && window.clearTimeout(this.tapAndHoldThread);
+    this.tapAndHoldThread = window.setTimeout(mxUtils.bind(this, function() {
+      this.tapAndHoldValid && this.tapAndHold(b, d);
+      this.tapAndHoldValid = this.tapAndHoldInProgress = !1
+    }), this.tapAndHoldDelay);
+    this.tapAndHoldValid = !0
+  }
+  this.selectedIcon = this.icon;
+  this.icon = null
+};
+mxConnectionHandler.prototype.tapAndHold = function(a, b) {
+  null != b && (this.marker.currentColor = this.marker.validColor, this.marker.markedState = b, this.marker.mark(), this.first = new mxPoint(a.getGraphX(), a.getGraphY()), this.edgeState = this.createEdgeState(
+    a), this.previous = b, this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous)))
+};
+mxConnectionHandler.prototype.isImmediateConnectSource = function(a) {
+  return !this.graph.isCellMovable(a.cell)
+};
+mxConnectionHandler.prototype.createEdgeState = function(a) {
+  return null
+};
+mxConnectionHandler.prototype.updateCurrentState = function(a) {
+  var b = this.marker.process(a);
+  this.constraintHandler.update(a, null == this.first);
+  this.currentState = b
+};
+mxConnectionHandler.prototype.convertWaypoint = function(a) {
+  var b = this.graph.getView().getScale(),
+    c = this.graph.getView().getTranslate();
+  a.x = a.x / b - c.x;
+  a.y = a.y / b - c.y
+};
+mxConnectionHandler.prototype.mouseMove = function(a, b) {
+  this.tapAndHoldValid && (this.tapAndHoldValid = Math.abs(this.initialTouchX - b.getX()) < this.tapAndHoldTolerance && Math.abs(this.initialTouchY - b.getY()) < this.tapAndHoldTolerance);
+  if (!b.isConsumed() && (this.ignoreMouseDown || null != this.first || !this.graph.isMouseDown)) {
+    !this.isEnabled() && null != this.currentState && (this.destroyIcons(this.icons), this.currentState = null);
+    (null != this.first || this.isEnabled() && this.graph.isEnabled()) && this.updateCurrentState(b);
+    if (null != this.first) {
+      var c = this.graph.getView().scale,
+        c = new mxPoint(this.graph.snap(b.getGraphX() / c) * c, this.graph.snap(b.getGraphY() / c) * c),
+        d = null,
+        e = c;
+      null != this.constraintHandler.currentConstraint && (null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentPoint) && (d = this.constraintHandler.currentConstraint,
+        e = this.constraintHandler.currentPoint.clone());
+      var f = this.first;
+      if (null != this.selectedIcon) {
+        var g = this.selectedIcon.bounds.width,
+          h = this.selectedIcon.bounds.height;
+        null != this.currentState &&
+          this.targetConnectImage ? (g = this.getIconPosition(this.selectedIcon, this.currentState), this.selectedIcon.bounds.x = g.x, this.selectedIcon.bounds.y = g.y) : (g = new mxRectangle(b.getGraphX() +
+            this.connectIconOffset.x, b.getGraphY() + this.connectIconOffset.y, g, h), this.selectedIcon.bounds = g);
+        this.selectedIcon.redraw()
+      }
+      if (null != this.edgeState) {
+        this.edgeState.absolutePoints = [null, null != this.currentState ? null : e];
+        this.graph.view.updateFixedTerminalPoint(this.edgeState, this.previous, !0, this.sourceConstraint);
+        null != this.currentState &&
+          (null == d && (d = this.graph.getConnectionConstraint(this.edgeState, this.previous, !1)), this.edgeState.setAbsoluteTerminalPoint(null, !1), this.graph.view.updateFixedTerminalPoint(this
+            .edgeState, this.currentState, !1, d));
+        f = null;
+        if (null != this.waypoints) {
+          f = [];
+          for (e = 0; e < this.waypoints.length; e++) d = this.waypoints[e].clone(), this.convertWaypoint(d), f[e] = d
+        }
+        this.graph.view.updatePoints(this.edgeState, f, this.previous, this.currentState);
+        this.graph.view.updateFloatingTerminalPoints(this.edgeState, this.previous, this.currentState);
+        e = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 1];
+        f = this.edgeState.absolutePoints[0]
+      } else null != this.currentState && null == this.constraintHandler.currentConstraint && (g = this.getTargetPerimeterPoint(this.currentState, b), null != g && (e = g)), null == this.sourceConstraint &&
+        null != this.previous && (g = this.getSourcePerimeterPoint(this.previous, null != this.waypoints && 0 < this.waypoints.length ? this.waypoints[0] : e, b), null != g && (f = g));
+      if (null == this.currentState && this.movePreviewAway) {
+        g = f;
+        null != this.edgeState &&
+          2 < this.edgeState.absolutePoints.length && (d = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 2], null != d && (g = d));
+        d = e.x - g.x;
+        g = e.y - g.y;
+        h = Math.sqrt(d * d + g * g);
+        if (0 == h) return;
+        e.x -= 4 * d / h;
+        e.y -= 4 * g / h
+      }
+      if (null == this.shape && (d = Math.abs(c.x - this.first.x), g = Math.abs(c.y - this.first.y), d > this.graph.tolerance || g > this.graph.tolerance)) this.shape = this.createShape(), this.updateCurrentState(
+        b);
+      null != this.shape && (null != this.edgeState ? this.shape.points = this.edgeState.absolutePoints : (c = [f], null != this.waypoints &&
+        (c = c.concat(this.waypoints)), c.push(e), this.shape.points = c), this.drawPreview());
+      mxEvent.consume(b.getEvent());
+      b.consume()
+    } else !this.isEnabled() || !this.graph.isEnabled() ? this.constraintHandler.reset() : this.previous != this.currentState && null == this.edgeState ? (this.destroyIcons(this.icons), this.icons =
+        null, null != this.currentState && null == this.error && (this.icons = this.createIcons(this.currentState), null == this.icons && (this.currentState.setCursor(mxConstants.CURSOR_CONNECT), b
+          .consume())), this.previous = this.currentState) :
+      this.previous == this.currentState && (null != this.currentState && null == this.icons && !this.graph.isMouseDown) && b.consume();
+    null != this.constraintHandler.currentConstraint && this.marker.reset();
+    if (!this.graph.isMouseDown && null != this.currentState && null != this.icons) {
+      c = !1;
+      f = b.getSource();
+      for (e = 0; e < this.icons.length && !c; e++) c = f == this.icons[e].node || f.parentNode == this.icons[e].node;
+      c || this.updateIcons(this.currentState, this.icons, b)
+    }
+  } else this.constraintHandler.reset()
+};
+mxConnectionHandler.prototype.getTargetPerimeterPoint = function(a, b) {
+  var c = null,
+    d = a.view,
+    e = d.getPerimeterFunction(a);
+  if (null != e) {
+    var f = null != this.waypoints && 0 < this.waypoints.length ? this.waypoints[this.waypoints.length - 1] : new mxPoint(this.previous.getCenterX(), this.previous.getCenterY()),
+      d = e(d.getPerimeterBounds(a), this.edgeState, f, !1);
+    null != d && (c = d)
+  } else c = new mxPoint(a.getCenterX(), a.getCenterY());
+  return c
+};
+mxConnectionHandler.prototype.getSourcePerimeterPoint = function(a, b, c) {
+  c = null;
+  var d = a.view,
+    e = d.getPerimeterFunction(a),
+    f = new mxPoint(a.getCenterX(), a.getCenterY());
+  if (null != e) {
+    var g = mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0),
+      h = -g * (Math.PI / 180);
+    0 != g && (b = mxUtils.getRotatedPoint(new mxPoint(b.x, b.y), Math.cos(h), Math.sin(h), f));
+    a = e(d.getPerimeterBounds(a), a, b, !1);
+    null != a && (0 != g && (a = mxUtils.getRotatedPoint(new mxPoint(a.x, a.y), Math.cos(-h), Math.sin(-h), f)), c = a)
+  } else c = f;
+  return c
+};
+mxConnectionHandler.prototype.updateIcons = function(a, b, c) {};
+mxConnectionHandler.prototype.isStopEvent = function(a) {
+  return null != a.getState()
+};
+mxConnectionHandler.prototype.addWaypointForEvent = function(a) {
+  var b = mxUtils.convertPoint(this.graph.container, a.getX(), a.getY()),
+    c = Math.abs(b.x - this.first.x),
+    b = Math.abs(b.y - this.first.y);
+  if (null != this.waypoints || 1 < this.mouseDownCounter && (c > this.graph.tolerance || b > this.graph.tolerance)) null == this.waypoints && (this.waypoints = []), c = this.graph.view.scale, b =
+    new mxPoint(this.graph.snap(a.getGraphX() / c) * c, this.graph.snap(a.getGraphY() / c) * c), this.waypoints.push(b)
+};
+mxConnectionHandler.prototype.mouseUp = function(a, b) {
+  if (!b.isConsumed() && this.isConnecting()) {
+    if (this.waypointsEnabled && !this.isStopEvent(b)) {
+      this.addWaypointForEvent(b);
+      b.consume();
+      return
+    }
+    if (null == this.error) {
+      var c = null != this.previous ? this.previous.cell : null,
+        d = null;
+      null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (d = this.constraintHandler.currentFocus.cell);
+      null == d && this.marker.hasValidState() && (d = this.marker.validState.cell);
+      this.connect(c, d, b.getEvent(),
+        b.getCell())
+    } else null != this.previous && (null != this.marker.validState && this.previous.cell == this.marker.validState.cell) && this.graph.selectCellForEvent(this.marker.source, evt), 0 < this.error.length &&
+      this.graph.validationAlert(this.error);
+    this.destroyIcons(this.icons);
+    b.consume()
+  }
+  null != this.first && this.reset();
+  this.tapAndHoldValid = this.tapAndHoldInProgress = !1
+};
+mxConnectionHandler.prototype.reset = function() {
+  null != this.shape && (this.shape.destroy(), this.shape = null);
+  this.destroyIcons(this.icons);
+  this.icons = null;
+  this.marker.reset();
+  this.constraintHandler.reset();
+  this.sourceConstraint = this.error = this.previous = this.edgeState = this.selectedIcon = null;
+  this.mouseDownCounter = 0;
+  this.icon = this.first = null;
+  this.fireEvent(new mxEventObject(mxEvent.RESET))
+};
+mxConnectionHandler.prototype.drawPreview = function() {
+  var a = null == this.error;
+  this.shape.strokewidth = this.getEdgeWidth(a);
+  a = this.getEdgeColor(a);
+  this.shape.stroke = a;
+  this.shape.redraw()
+};
+mxConnectionHandler.prototype.getEdgeColor = function(a) {
+  return a ? mxConstants.VALID_COLOR : mxConstants.INVALID_COLOR
+};
+mxConnectionHandler.prototype.getEdgeWidth = function(a) {
+  return a ? 3 : 1
+};
+mxConnectionHandler.prototype.connect = function(a, b, c, d) {
+  if (null != b || this.isCreateTarget() || this.graph.allowDanglingEdges) {
+    var e = this.graph.getModel(),
+      f = null;
+    e.beginUpdate();
+    try {
+      if (null != a && (null == b && this.isCreateTarget()) && (b = this.createTargetVertex(c, a), null != b)) {
+        d = this.graph.getDropTarget([b], c, d);
+        if (null == d || !this.graph.getModel().isEdge(d)) {
+          var g = this.graph.getView().getState(d);
+          if (null != g) {
+            var h = e.getGeometry(b);
+            h.x -= g.origin.x;
+            h.y -= g.origin.y
+          }
+        } else d = this.graph.getDefaultParent();
+        this.graph.addCell(b,
+          d)
+      }
+      var k = this.graph.getDefaultParent();
+      null != a && (null != b && e.getParent(a) == e.getParent(b) && e.getParent(e.getParent(a)) != e.getRoot()) && (k = e.getParent(a), null != a.geometry && a.geometry.relative && (null != b.geometry &&
+        b.geometry.relative) && (k = e.getParent(k)));
+      h = g = null;
+      null != this.edgeState && (g = this.edgeState.cell.value, h = this.edgeState.cell.style);
+      f = this.insertEdge(k, null, g, a, b, h);
+      if (null != f) {
+        this.graph.setConnectionConstraint(f, a, !0, this.sourceConstraint);
+        this.graph.setConnectionConstraint(f, b, !1, this.constraintHandler.currentConstraint);
+        null != this.edgeState && e.setGeometry(f, this.edgeState.cell.geometry);
+        var l = e.getGeometry(f);
+        null == l && (l = new mxGeometry, l.relative = !0, e.setGeometry(f, l));
+        if (null != this.waypoints && 0 < this.waypoints.length) {
+          var m = this.graph.view.scale,
+            n = this.graph.view.translate;
+          l.points = [];
+          for (a = 0; a < this.waypoints.length; a++) {
+            var p = this.waypoints[a];
+            l.points.push(new mxPoint(p.x / m - n.x, p.y / m - n.y))
+          }
+        }
+        null == b && (p = this.graph.getPointForEvent(c, !1), p.x -= this.graph.panDx / this.graph.view.scale, p.y -= this.graph.panDy / this.graph.view.scale,
+          l.setTerminalPoint(p, !1));
+        this.fireEvent(new mxEventObject(mxEvent.CONNECT, "cell", f, "event", c, "target", d))
+      }
+    } catch (q) {
+      mxLog.show(), mxLog.debug(q.message)
+    } finally {
+      e.endUpdate()
+    }
+    this.select && this.selectCells(f, b)
+  }
+};
+mxConnectionHandler.prototype.selectCells = function(a, b) {
+  this.graph.setSelectionCell(a)
+};
+mxConnectionHandler.prototype.insertEdge = function(a, b, c, d, e, f) {
+  if (null == this.factoryMethod) return this.graph.insertEdge(a, b, c, d, e, f);
+  b = this.createEdge(c, d, e, f);
+  return b = this.graph.addEdge(b, a, d, e)
+};
+mxConnectionHandler.prototype.createTargetVertex = function(a, b) {
+  for (var c = this.graph.getCellGeometry(b); null != c && c.relative;) b = this.graph.getModel().getParent(b), c = this.graph.getCellGeometry(b);
+  var d = this.graph.cloneCells([b])[0],
+    c = this.graph.getModel().getGeometry(d);
+  if (null != c) {
+    var e = this.graph.getPointForEvent(a);
+    c.x = this.graph.snap(e.x - c.width / 2) - this.graph.panDx / this.graph.view.scale;
+    c.y = this.graph.snap(e.y - c.height / 2) - this.graph.panDy / this.graph.view.scale;
+    if (null != this.first) {
+      var f = this.graph.view.getState(b);
+      if (null != f) {
+        var g = this.getAlignmentTolerance();
+        Math.abs(this.graph.snap(this.first.x) - this.graph.snap(e.x)) <= g ? c.x = f.x : Math.abs(this.graph.snap(this.first.y) - this.graph.snap(e.y)) <= g && (c.y = f.y)
+      }
+    }
+  }
+  return d
+};
+mxConnectionHandler.prototype.getAlignmentTolerance = function() {
+  return this.graph.isGridEnabled() ? this.graph.gridSize : this.graph.tolerance
+};
+mxConnectionHandler.prototype.createEdge = function(a, b, c, d) {
+  var e = null;
+  null != this.factoryMethod && (e = this.factoryMethod(b, c, d));
+  null == e && (e = new mxCell(a || ""), e.setEdge(!0), e.setStyle(d), a = new mxGeometry, a.relative = !0, e.setGeometry(a));
+  return e
+};
+mxConnectionHandler.prototype.destroy = function() {
+  this.graph.removeMouseListener(this);
+  null != this.shape && (this.shape.destroy(), this.shape = null);
+  null != this.marker && (this.marker.destroy(), this.marker = null);
+  null != this.constraintHandler && (this.constraintHandler.destroy(), this.constraintHandler = null);
+  null != this.changeHandler && (this.graph.getModel().removeListener(this.changeHandler), this.graph.getView().removeListener(this.changeHandler), this.changeHandler = null);
+  null != this.drillHandler && (this.graph.removeListener(this.drillHandler),
+    this.graph.getView().removeListener(this.drillHandler), this.drillHandler = null)
+};
+
+function mxConstraintHandler(a) {
+  this.graph = a
+}
+mxConstraintHandler.prototype.pointImage = new mxImage(mxClient.imageBasePath + "/point.gif", 5, 5);
+mxConstraintHandler.prototype.graph = null;
+mxConstraintHandler.prototype.enabled = !0;
+mxConstraintHandler.prototype.highlightColor = mxConstants.DEFAULT_VALID_COLOR;
+mxConstraintHandler.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxConstraintHandler.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxConstraintHandler.prototype.reset = function() {
+  if (null != this.focusIcons) {
+    for (var a = 0; a < this.focusIcons.length; a++) this.focusIcons[a].destroy();
+    this.focusIcons = null
+  }
+  null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null);
+  this.focusPoints = this.currentFocus = this.currentPoint = this.currentFocusArea = this.currentConstraint = null
+};
+mxConstraintHandler.prototype.getTolerance = function() {
+  return this.graph.getTolerance()
+};
+mxConstraintHandler.prototype.getImageForConstraint = function(a, b, c) {
+  return this.pointImage
+};
+mxConstraintHandler.prototype.isEventIgnored = function(a, b) {
+  return !1
+};
+mxConstraintHandler.prototype.update = function(a, b) {
+  if (this.isEnabled() && !this.isEventIgnored(a)) {
+    var c = this.getTolerance(),
+      d = new mxRectangle(a.getGraphX() - c, a.getGraphY() - c, 2 * c, 2 * c),
+      e = null != a.getCell() ? this.graph.isCellConnectable(a.getCell()) : !1;
+    if (null == this.currentFocusArea || !mxUtils.intersects(this.currentFocusArea, d) || null != a.getState() && null != this.currentFocus && e)
+      if (this.currentFocusArea = null, a.getState() != this.currentFocus)
+        if (this.currentFocus = null, this.constraints = null != a.getState() && e ? this.graph.getAllConnectionConstraints(a.getState(),
+            b) : null, null != this.constraints) {
+          this.currentFocus = a.getState();
+          this.currentFocusArea = new mxRectangle(a.getState().x, a.getState().y, a.getState().width, a.getState().height);
+          if (null != this.focusIcons) {
+            for (e = 0; e < this.focusIcons.length; e++) this.focusIcons[e].destroy();
+            this.focusPoints = this.focusIcons = null
+          }
+          this.focusIcons = [];
+          this.focusPoints = [];
+          for (e = 0; e < this.constraints.length; e++) {
+            var f = this.graph.getConnectionPoint(a.getState(), this.constraints[e]),
+              g = this.getImageForConstraint(a.getState(), this.constraints[e],
+                f),
+              h = g.src,
+              g = new mxRectangle(f.x - g.width / 2, f.y - g.height / 2, g.width, g.height),
+              g = new mxImageShape(g, h);
+            g.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
+            g.preserveImageAspect = !1;
+            g.init(this.graph.getView().getOverlayPane());
+            null != g.node.previousSibling && g.node.parentNode.insertBefore(g.node, g.node.parentNode.firstChild);
+            h = mxUtils.bind(this, function() {
+              return null != this.currentFocus ? this.currentFocus : a.getState()
+            });
+            g.redraw();
+            mxEvent.redirectMouseEvents(g.node,
+              this.graph, h);
+            this.currentFocusArea.add(g.bounds);
+            this.focusIcons.push(g);
+            this.focusPoints.push(f)
+          }
+          this.currentFocusArea.grow(c)
+        } else if (null != this.focusIcons) {
+      null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null);
+      for (e = 0; e < this.focusIcons.length; e++) this.focusIcons[e].destroy();
+      this.focusPoints = this.focusIcons = null
+    }
+    this.currentPoint = this.currentConstraint = null;
+    if (null != this.focusIcons && null != this.constraints && (null == a.getState() || this.currentFocus == a.getState()))
+      for (e =
+        0; e < this.focusIcons.length; e++)
+        if (mxUtils.intersects(this.focusIcons[e].bounds, d)) {
+          this.currentConstraint = this.constraints[e];
+          this.currentPoint = this.focusPoints[e];
+          c = this.focusIcons[e].bounds.clone();
+          c.grow(mxClient.IS_IE ? 3 : 2);
+          mxClient.IS_IE && (c.width -= 1, c.height -= 1);
+          null == this.focusHighlight ? (c = new mxRectangleShape(c, null, this.highlightColor, 3), c.dialect = this.graph.dialect == mxConstants.DIALECT_SVG ? mxConstants.DIALECT_SVG : mxConstants
+            .DIALECT_VML, c.init(this.graph.getView().getOverlayPane()), this.focusHighlight =
+            c, h = mxUtils.bind(this, function() {
+              return null != this.currentFocus ? this.currentFocus : a.getState()
+            }), mxEvent.redirectMouseEvents(c.node, this.graph, h)) : (this.focusHighlight.bounds = c, this.focusHighlight.redraw());
+          break
+        }
+    null == this.currentConstraint && null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null)
+  }
+};
+mxConstraintHandler.prototype.destroy = function() {
+  this.reset()
+};
+
+function mxRubberband(a) {
+  null != a && (this.graph = a, this.graph.addMouseListener(this), this.panHandler = mxUtils.bind(this, function() {
+    this.repaint()
+  }), this.graph.addListener(mxEvent.PAN, this.panHandler), mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
+    this.destroy()
+  })))
+}
+mxRubberband.prototype.defaultOpacity = 20;
+mxRubberband.prototype.enabled = !0;
+mxRubberband.prototype.div = null;
+mxRubberband.prototype.sharedDiv = null;
+mxRubberband.prototype.currentX = 0;
+mxRubberband.prototype.currentY = 0;
+mxRubberband.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxRubberband.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxRubberband.prototype.mouseDown = function(a, b) {
+  if (!b.isConsumed() && this.isEnabled() && this.graph.isEnabled() && (this.graph.isForceMarqueeEvent(b.getEvent()) || null == b.getState())) {
+    var c = mxUtils.getOffset(this.graph.container),
+      d = mxUtils.getScrollOrigin(this.graph.container);
+    d.x -= c.x;
+    d.y -= c.y;
+    this.start(b.getX() + d.x, b.getY() + d.y);
+    if (mxClient.IS_NS && !mxClient.IS_SF && !mxClient.IS_GC) {
+      var e = this.graph.container,
+        f = function(a) {
+          a = new mxMouseEvent(a);
+          var b = mxUtils.convertPoint(e, a.getX(), a.getY());
+          a.graphX = b.x;
+          a.graphY = b.y;
+          return a
+        };
+      this.dragHandler = mxUtils.bind(this, function(a) {
+        this.mouseMove(this.graph, f(a))
+      });
+      this.dropHandler = mxUtils.bind(this, function(a) {
+        this.mouseUp(this.graph, f(a))
+      });
+      mxEvent.addListener(document, "mousemove", this.dragHandler);
+      mxEvent.addListener(document, "mouseup", this.dropHandler)
+    }
+    b.consume(!1)
+  }
+};
+mxRubberband.prototype.start = function(a, b) {
+  this.first = new mxPoint(a, b)
+};
+mxRubberband.prototype.mouseMove = function(a, b) {
+  if (!b.isConsumed() && null != this.first) {
+    var c = mxUtils.getScrollOrigin(this.graph.container),
+      d = mxUtils.getOffset(this.graph.container);
+    c.x -= d.x;
+    c.y -= d.y;
+    var d = b.getX() + c.x,
+      c = b.getY() + c.y,
+      e = this.first.x - d,
+      f = this.first.y - c,
+      g = this.graph.tolerance;
+    if (null != this.div || Math.abs(e) > g || Math.abs(f) > g) null == this.div && (this.div = this.createShape()), mxUtils.clearSelection(), this.update(d, c), b.consume()
+  }
+};
+mxRubberband.prototype.createShape = function() {
+  null == this.sharedDiv && (this.sharedDiv = document.createElement("div"), this.sharedDiv.className = "mxRubberband", mxUtils.setOpacity(this.sharedDiv, this.defaultOpacity));
+  this.graph.container.appendChild(this.sharedDiv);
+  return this.sharedDiv
+};
+mxRubberband.prototype.mouseUp = function(a, b) {
+  var c = null != this.div;
+  this.reset();
+  c && (c = new mxRectangle(this.x, this.y, this.width, this.height), this.graph.selectRegion(c, b.getEvent()), b.consume())
+};
+mxRubberband.prototype.reset = function() {
+  null != this.div && this.div.parentNode.removeChild(this.div);
+  null != this.dragHandler && (mxEvent.removeListener(document, "mousemove", this.dragHandler), this.dragHandler = null);
+  null != this.dropHandler && (mxEvent.removeListener(document, "mouseup", this.dropHandler), this.dropHandler = null);
+  this.currentY = this.currentX = 0;
+  this.div = this.first = null
+};
+mxRubberband.prototype.update = function(a, b) {
+  this.currentX = a;
+  this.currentY = b;
+  this.repaint()
+};
+mxRubberband.prototype.repaint = function() {
+  if (null != this.div) {
+    var a = this.currentX - this.graph.panDx,
+      b = this.currentY - this.graph.panDy;
+    this.x = Math.min(this.first.x, a);
+    this.y = Math.min(this.first.y, b);
+    this.width = Math.max(this.first.x, a) - this.x;
+    this.height = Math.max(this.first.y, b) - this.y;
+    a = mxClient.IS_VML ? this.graph.panDy : 0;
+    this.div.style.left = this.x + (mxClient.IS_VML ? this.graph.panDx : 0) + "px";
+    this.div.style.top = this.y + a + "px";
+    this.div.style.width = Math.max(1, this.width) + "px";
+    this.div.style.height = Math.max(1,
+      this.height) + "px"
+  }
+};
+mxRubberband.prototype.destroy = function() {
+  this.destroyed || (this.destroyed = !0, this.graph.removeMouseListener(this), this.graph.removeListener(this.panHandler), this.reset(), null != this.sharedDiv && (this.sharedDiv = null))
+};
+
+function mxVertexHandler(a) {
+  null != a && (this.state = a, this.init())
+}
+mxVertexHandler.prototype.graph = null;
+mxVertexHandler.prototype.state = null;
+mxVertexHandler.prototype.singleSizer = !1;
+mxVertexHandler.prototype.index = null;
+mxVertexHandler.prototype.allowHandleBoundsCheck = !0;
+mxVertexHandler.prototype.handleImage = null;
+mxVertexHandler.prototype.tolerance = 0;
+mxVertexHandler.prototype.rotationEnabled = !1;
+mxVertexHandler.prototype.rotationRaster = !0;
+mxVertexHandler.prototype.init = function() {
+  this.graph = this.state.view.graph;
+  this.selectionBounds = this.getSelectionBounds(this.state);
+  this.bounds = new mxRectangle(this.selectionBounds.x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height);
+  this.selectionBorder = this.createSelectionShape(this.bounds);
+  this.selectionBorder.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
+  this.selectionBorder.pointerEvents = !1;
+  this.selectionBorder.init(this.graph.getView().getOverlayPane());
+  this.graph.isCellMovable(this.state.cell) && (this.selectionBorder.node.style.cursor = mxConstants.CURSOR_MOVABLE_VERTEX);
+  mxEvent.redirectMouseEvents(this.selectionBorder.node, this.graph, this.state);
+  if (0 >= mxGraphHandler.prototype.maxCells || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells) {
+    var a = this.graph.isCellResizable(this.state.cell);
+    this.sizers = [];
+    if (a || this.graph.isLabelMovable(this.state.cell) && 2 <= this.state.width && 2 <= this.state.height) {
+      var b = 0;
+      a && (this.singleSizer || (this.sizers.push(this.createSizer("nw-resize",
+        b++)), this.sizers.push(this.createSizer("n-resize", b++)), this.sizers.push(this.createSizer("ne-resize", b++)), this.sizers.push(this.createSizer("w-resize", b++)), this.sizers.push(
+        this.createSizer("e-resize", b++)), this.sizers.push(this.createSizer("sw-resize", b++)), this.sizers.push(this.createSizer("s-resize", b++))), this.sizers.push(this.createSizer(
+        "se-resize", b++)));
+      a = this.graph.model.getGeometry(this.state.cell);
+      null != a && (!a.relative && !this.graph.isSwimlane(this.state.cell) && this.graph.isLabelMovable(this.state.cell)) &&
+        (this.labelShape = this.createSizer(mxConstants.CURSOR_LABEL_HANDLE, mxEvent.LABEL_HANDLE, mxConstants.LABEL_HANDLE_SIZE, mxConstants.LABEL_HANDLE_FILLCOLOR), this.sizers.push(this.labelShape))
+    } else this.graph.isCellMovable(this.state.cell) && (!this.graph.isCellResizable(this.state.cell) && 2 > this.state.width && 2 > this.state.height) && (this.labelShape = this.createSizer(
+      mxConstants.CURSOR_MOVABLE_VERTEX, null, null, mxConstants.LABEL_HANDLE_FILLCOLOR), this.sizers.push(this.labelShape))
+  }
+  if (this.rotationEnabled && (0 >=
+      mxGraphHandler.prototype.maxCells || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells)) this.rotationShape = this.createSizer("pointer", mxEvent.ROTATION_HANDLE, mxConstants
+    .HANDLE_SIZE + 3, mxConstants.HANDLE_FILLCOLOR), this.sizers.push(this.rotationShape);
+  this.redraw()
+};
+mxVertexHandler.prototype.getSelectionBounds = function(a) {
+  return new mxRectangle(Math.round(a.x), Math.round(a.y), Math.round(a.width), Math.round(a.height))
+};
+mxVertexHandler.prototype.createSelectionShape = function(a) {
+  a = new mxRectangleShape(a, null, this.getSelectionColor());
+  a.strokewidth = this.getSelectionStrokeWidth();
+  a.isDashed = this.isSelectionDashed();
+  return a
+};
+mxVertexHandler.prototype.getSelectionColor = function() {
+  return mxConstants.VERTEX_SELECTION_COLOR
+};
+mxVertexHandler.prototype.getSelectionStrokeWidth = function() {
+  return mxConstants.VERTEX_SELECTION_STROKEWIDTH
+};
+mxVertexHandler.prototype.isSelectionDashed = function() {
+  return mxConstants.VERTEX_SELECTION_DASHED
+};
+mxVertexHandler.prototype.createSizer = function(a, b, c, d) {
+  c = c || mxConstants.HANDLE_SIZE;
+  c = new mxRectangle(0, 0, c, c);
+  d = this.createSizerShape(c, b, d);
+  d.isHtmlAllowed() && null != this.state.text && this.state.text.node.parentNode == this.graph.container ? (d.bounds.height -= 1, d.bounds.width -= 1, d.dialect = mxConstants.DIALECT_STRICTHTML, d
+    .init(this.graph.container)) : (d.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG, d.init(this.graph.getView().getOverlayPane()));
+  mxEvent.redirectMouseEvents(d.node, this.graph, this.state);
+  this.graph.isEnabled() && (d.node.style.cursor = a);
+  this.isSizerVisible(b) || (d.node.style.visibility = "hidden");
+  return d
+};
+mxVertexHandler.prototype.isSizerVisible = function(a) {
+  return !0
+};
+mxVertexHandler.prototype.createSizerShape = function(a, b, c) {
+  return null != this.handleImage ? (a.width = this.handleImage.width, a.height = this.handleImage.height, new mxImageShape(a, this.handleImage.src)) : b == mxEvent.ROTATION_HANDLE ? new mxEllipse(
+    a, c || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR) : new mxRectangleShape(a, c || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR)
+};
+mxVertexHandler.prototype.moveSizerTo = function(a, b, c) {
+  null != a && (a.bounds.x = Math.round(b - a.bounds.width / 2), a.bounds.y = Math.round(c - a.bounds.height / 2), a.redraw())
+};
+mxVertexHandler.prototype.getHandleForEvent = function(a) {
+  if (a.isSource(this.rotationShape)) return mxEvent.ROTATION_HANDLE;
+  if (a.isSource(this.labelShape)) return mxEvent.LABEL_HANDLE;
+  if (null != this.sizers)
+    for (var b = this.tolerance, b = this.allowHandleBoundsCheck && (mxClient.IS_IE || 0 < b) ? new mxRectangle(a.getGraphX() - b, a.getGraphY() - b, 2 * b, 2 * b) : null, c = 0; c < this.sizers.length; c++)
+      if (a.isSource(this.sizers[c]) || null != b && mxUtils.intersects(this.sizers[c].bounds, b)) return c;
+  return null
+};
+mxVertexHandler.prototype.mouseDown = function(a, b) {
+  if (!b.isConsumed() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent()) && (0 < this.tolerance || b.getState() == this.state)) {
+    var c = this.getHandleForEvent(b);
+    null != c && (this.start(b.getX(), b.getY(), c), b.consume())
+  }
+};
+mxVertexHandler.prototype.start = function(a, b, c) {
+  a = mxUtils.convertPoint(this.graph.container, a, b);
+  this.startX = a.x;
+  this.startY = a.y;
+  this.index = c;
+  this.selectionBorder.node.style.display = c == mxEvent.ROTATION_HANDLE ? "inline" : "none";
+  this.preview = this.createSelectionShape(this.bounds);
+  !(mxClient.IS_SVG && 0 != Number(this.state.style[mxConstants.STYLE_ROTATION] || "0")) && null != this.state.text && this.state.text.node.parentNode == this.graph.container ? (this.preview.dialect =
+      mxConstants.DIALECT_STRICTHTML, this.preview.init(this.graph.container)) :
+    (this.preview.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG, this.preview.init(this.graph.view.getOverlayPane()))
+};
+mxVertexHandler.prototype.mouseMove = function(a, b) {
+  if (!b.isConsumed() && null != this.index) {
+    var c = new mxPoint(b.getGraphX(), b.getGraphY()),
+      d = this.graph.isGridEnabledEvent(b.getEvent()),
+      e = this.graph.getView().scale;
+    if (this.index == mxEvent.LABEL_HANDLE) d && (c.x = this.graph.snap(c.x / e) * e, c.y = this.graph.snap(c.y / e) * e), this.moveSizerTo(this.sizers[this.sizers.length - 1], c.x, c.y);
+    else if (this.index == mxEvent.ROTATION_HANDLE) {
+      var f = this.state.x + this.state.width / 2 - c.x,
+        g = this.state.y + this.state.height / 2 - c.y;
+      this.currentAlpha =
+        0 != f ? 180 * Math.atan(g / f) / Math.PI + 90 : 0 > g ? 180 : 0;
+      0 < f && (this.currentAlpha -= 180);
+      this.rotationRaster && (f = c.x - this.state.getCenterX(), g = c.y - this.state.getCenterY(), f = Math.abs(Math.sqrt(f * f + g * g) - this.state.height / 2 - 20), f = Math.max(1, 5 * Math.min(
+        3, Math.max(0, Math.round(80 / Math.abs(f))))), this.currentAlpha = Math.round(this.currentAlpha / f) * f);
+      this.selectionBorder.rotation = this.currentAlpha;
+      this.selectionBorder.redraw()
+    } else {
+      var h = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0"),
+        k = Math.cos(-h),
+        l = Math.sin(-h),
+        m = new mxPoint(this.state.getCenterX(), this.state.getCenterY()),
+        f = c.x - this.startX,
+        g = c.y - this.startY,
+        c = this.graph.view.translate,
+        n = l * f + k * g,
+        f = k * f - l * g;
+      this.bounds = this.union(this.selectionBounds, f, n, this.index, d, e, c);
+      k = Math.cos(h);
+      l = Math.sin(h);
+      g = new mxPoint(this.bounds.getCenterX(), this.bounds.getCenterY());
+      f = g.x - m.x;
+      g = g.y - m.y;
+      m = l * f + k * g - g;
+      this.bounds.x += k * f - l * g - f;
+      this.bounds.y += m;
+      this.drawPreview()
+    }
+    b.consume()
+  } else null != this.getHandleForEvent(b) && b.consume(!1)
+};
+mxVertexHandler.prototype.mouseUp = function(a, b) {
+  if (!b.isConsumed() && null != this.index && null != this.state) {
+    var c = new mxPoint(b.getGraphX(), b.getGraphY());
+    this.graph.getModel().beginUpdate();
+    try {
+      if (this.index == mxEvent.ROTATION_HANDLE) null != this.currentAlpha && this.rotateCell(this.state.cell, this.currentAlpha - (this.state.style[mxConstants.STYLE_ROTATION] || 0));
+      else {
+        var d = this.graph.isGridEnabledEvent(b.getEvent()),
+          e = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0"),
+          f = Math.cos(-e),
+          g = Math.sin(-e),
+          h = c.x - this.startX,
+          k = c.y - this.startY,
+          c = g * h + f * k,
+          h = f * h - g * k,
+          k = c,
+          l = this.graph.view.scale;
+        this.resizeCell(this.state.cell, h / l, k / l, this.index, d)
+      }
+    } finally {
+      this.graph.getModel().endUpdate()
+    }
+    this.reset();
+    b.consume()
+  }
+};
+mxVertexHandler.prototype.rotateCell = function(a, b) {
+  var c = this.graph.getModel();
+  if (c.isVertex(a)) {
+    var d = a == this.state ? this.state : this.graph.view.getState(a);
+    null != d && this.graph.setCellStyles(mxConstants.STYLE_ROTATION, (d.style[mxConstants.STYLE_ROTATION] || 0) + b, [a]);
+    if (this.state.cell != a && (d = this.graph.getCellGeometry(a), null != d && !d.relative))
+      if (0 != b) {
+        var e = this.graph.getModel().getParent(a),
+          f = this.graph.getCellGeometry(e);
+        if (!d.relative && null != f) {
+          var g = mxUtils.toRadians(b),
+            e = Math.cos(g),
+            g = Math.sin(g),
+            h = new mxPoint(d.getCenterX(), d.getCenterY()),
+            f = new mxPoint(f.width / 2, f.height / 2),
+            e = mxUtils.getRotatedPoint(h, e, g, f),
+            d = d.clone();
+          d.x = e.x - d.width / 2;
+          d.y = e.y - d.height / 2;
+          c.setGeometry(a, d)
+        }
+      } else d = d.clone(), d.x += dx, d.y += dy, c.setGeometry(a, d);
+    d = c.getChildCount(a);
+    for (e = 0; e < d; e++) this.rotateCell(c.getChildAt(a, e), b)
+  }
+};
+mxVertexHandler.prototype.reset = function() {
+  this.index = this.currentAlpha = null;
+  null != this.preview && (this.preview.destroy(), this.preview = null);
+  null != this.selectionBorder && (this.selectionBorder.node.style.display = "inline", this.selectionBounds = this.getSelectionBounds(this.state), this.bounds = new mxRectangle(this.selectionBounds
+    .x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height), this.drawPreview())
+};
+mxVertexHandler.prototype.resizeCell = function(a, b, c, d, e) {
+  var f = this.graph.model.getGeometry(a);
+  if (null != f)
+    if (d == mxEvent.LABEL_HANDLE) d = this.graph.view.scale, b = (this.labelShape.bounds.getCenterX() - this.startX) / d, c = (this.labelShape.bounds.getCenterY() - this.startY) / d, f = f.clone(),
+      null == f.offset ? f.offset = new mxPoint(b, c) : (f.offset.x += b, f.offset.y += c), this.graph.model.setGeometry(a, f);
+    else {
+      d = this.union(f, b, c, d, e, 1, new mxPoint(0, 0));
+      var g = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0");
+      if (0 != g) {
+        b = d.getCenterX() - f.getCenterX();
+        c = d.getCenterY() - f.getCenterY();
+        e = Math.cos(g);
+        var h = Math.sin(g),
+          g = e * b - h * c - b;
+        b = h * b + e * c - c;
+        c = d.x - f.x;
+        var k = d.y - f.y,
+          l = e * c - h * k;
+        e = h * c + e * k;
+        d.x += g;
+        d.y += b;
+        if (!this.graph.isCellCollapsed(a) && (0 != g || 0 != b)) c = f.x - d.x + l, k = f.y - d.y + e, this.moveChildren(a, c, k)
+      }
+      this.graph.resizeCell(a, d)
+    }
+};
+mxVertexHandler.prototype.moveChildren = function(a, b, c) {
+  for (var d = this.graph.getModel(), e = d.getChildCount(a), f = 0; f < e; f++) {
+    var g = d.getChildAt(a, f);
+    if (d.isVertex(g)) {
+      var h = this.graph.getCellGeometry(g);
+      null != h && !h.relative && (h = h.clone(), h.x += b, h.y += c, d.setGeometry(g, h))
+    }
+  }
+};
+mxVertexHandler.prototype.union = function(a, b, c, d, e, f, g) {
+  if (this.singleSizer) {
+    g = a.x + a.width + b;
+    var h = a.y + a.height + c;
+    e && (g = this.graph.snap(g / f) * f, h = this.graph.snap(h / f) * f);
+    f = new mxRectangle(a.x, a.y, 0, 0);
+    f.add(new mxRectangle(g, h, 0, 0));
+    return f
+  }
+  var h = a.x - g.x * f,
+    k = h + a.width,
+    l = a.y - g.y * f;
+  a = l + a.height;
+  4 < d ? (a += c, e && (a = this.graph.snap(a / f) * f)) : 3 > d && (l += c, e && (l = this.graph.snap(l / f) * f));
+  if (0 == d || 3 == d || 5 == d) h += b, e && (h = this.graph.snap(h / f) * f);
+  else if (2 == d || 4 == d || 7 == d) k += b, e && (k = this.graph.snap(k / f) * f);
+  e = k - h;
+  a -=
+    l;
+  0 > e && (h += e, e = Math.abs(e));
+  0 > a && (l += a, a = Math.abs(a));
+  return new mxRectangle(h + g.x * f, l + g.y * f, e, a)
+};
+mxVertexHandler.prototype.redraw = function() {
+  this.selectionBounds = this.getSelectionBounds(this.state);
+  this.bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+  var a = this.state;
+  if (null != this.sizers) {
+    var b = a.x + a.width,
+      c = a.y + a.height;
+    if (this.singleSizer) this.moveSizerTo(this.sizers[0], b, c);
+    else {
+      var d = a.x + a.width / 2,
+        e = a.y + a.height / 2;
+      if (1 < this.sizers.length) {
+        var f = mxUtils.toRadians(a.style[mxConstants.STYLE_ROTATION] || "0"),
+          g = Math.cos(f),
+          f = Math.sin(f),
+          h = new mxPoint(a.getCenterX(),
+            a.getCenterY()),
+          k = mxUtils.getRotatedPoint(new mxPoint(a.x, a.y), g, f, h);
+        this.moveSizerTo(this.sizers[0], k.x, k.y);
+        k.x = d;
+        k.y = a.y;
+        k = mxUtils.getRotatedPoint(k, g, f, h);
+        this.moveSizerTo(this.sizers[1], k.x, k.y);
+        k.x = b;
+        k.y = a.y;
+        k = mxUtils.getRotatedPoint(k, g, f, h);
+        this.moveSizerTo(this.sizers[2], k.x, k.y);
+        k.x = a.x;
+        k.y = e;
+        k = mxUtils.getRotatedPoint(k, g, f, h);
+        this.moveSizerTo(this.sizers[3], k.x, k.y);
+        k.x = b;
+        k.y = e;
+        k = mxUtils.getRotatedPoint(k, g, f, h);
+        this.moveSizerTo(this.sizers[4], k.x, k.y);
+        k.x = a.x;
+        k.y = c;
+        k = mxUtils.getRotatedPoint(k,
+          g, f, h);
+        this.moveSizerTo(this.sizers[5], k.x, k.y);
+        k.x = d;
+        k.y = c;
+        k = mxUtils.getRotatedPoint(k, g, f, h);
+        this.moveSizerTo(this.sizers[6], k.x, k.y);
+        k.x = b;
+        k.y = c;
+        k = mxUtils.getRotatedPoint(k, g, f, h);
+        this.moveSizerTo(this.sizers[7], k.x, k.y);
+        this.moveSizerTo(this.sizers[8], d + a.absoluteOffset.x, e + a.absoluteOffset.y)
+      } else 2 <= this.state.width && 2 <= this.state.height ? this.moveSizerTo(this.sizers[0], d + a.absoluteOffset.x, e + a.absoluteOffset.y) : this.moveSizerTo(this.sizers[0], a.x, a.y)
+    }
+  }
+  null != this.rotationShape && (f = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] ||
+      "0"), g = Math.cos(f), f = Math.sin(f), h = new mxPoint(this.state.getCenterX(), this.state.getCenterY()), k = mxUtils.getRotatedPoint(new mxPoint(a.x + a.width / 2, a.y - 16), g, f, h),
+    this.moveSizerTo(this.rotationShape, k.x, k.y));
+  this.selectionBorder.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0");
+  this.drawPreview()
+};
+mxVertexHandler.prototype.drawPreview = function() {
+  null != this.preview && (this.preview.bounds = this.bounds, this.preview.node.parentNode == this.graph.container && (this.preview.bounds.width = Math.max(0, this.preview.bounds.width - 1), this.preview
+    .bounds.height = Math.max(0, this.preview.bounds.height - 1)), this.preview.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0"), this.preview.redraw());
+  this.selectionBorder.bounds = this.bounds;
+  this.selectionBorder.redraw()
+};
+mxVertexHandler.prototype.destroy = function() {
+  null != this.preview && (this.preview.destroy(), this.preview = null);
+  this.selectionBorder.destroy();
+  this.labelShape = this.selectionBorder = null;
+  if (null != this.sizers)
+    for (var a = 0; a < this.sizers.length; a++) this.sizers[a].destroy(), this.sizers[a] = null
+};
+
+function mxEdgeHandler(a) {
+  null != a && (this.state = a, this.init())
+}
+mxEdgeHandler.prototype.graph = null;
+mxEdgeHandler.prototype.state = null;
+mxEdgeHandler.prototype.marker = null;
+mxEdgeHandler.prototype.constraintHandler = null;
+mxEdgeHandler.prototype.error = null;
+mxEdgeHandler.prototype.shape = null;
+mxEdgeHandler.prototype.bends = null;
+mxEdgeHandler.prototype.labelShape = null;
+mxEdgeHandler.prototype.cloneEnabled = !0;
+mxEdgeHandler.prototype.addEnabled = !1;
+mxEdgeHandler.prototype.removeEnabled = !1;
+mxEdgeHandler.prototype.preferHtml = !1;
+mxEdgeHandler.prototype.allowHandleBoundsCheck = !0;
+mxEdgeHandler.prototype.snapToTerminals = !1;
+mxEdgeHandler.prototype.handleImage = null;
+mxEdgeHandler.prototype.tolerance = 0;
+mxEdgeHandler.prototype.init = function() {
+  this.graph = this.state.view.graph;
+  this.marker = this.createMarker();
+  this.constraintHandler = new mxConstraintHandler(this.graph);
+  this.points = [];
+  this.abspoints = this.getSelectionPoints(this.state);
+  this.shape = this.createSelectionShape(this.abspoints);
+  this.shape.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
+  this.shape.init(this.graph.getView().getOverlayPane());
+  this.shape.svgStrokeTolerance = 0;
+  this.shape.node.style.cursor =
+    mxConstants.CURSOR_MOVABLE_EDGE;
+  mxEvent.addListener(this.shape.node, "dblclick", mxUtils.bind(this, function(a) {
+    this.graph.dblClick(a, this.state.cell)
+  }));
+  mxEvent.addGestureListeners(this.shape.node, mxUtils.bind(this, function(a) {
+    this.addEnabled && this.isAddPointEvent(a) ? this.addPoint(this.state, a) : this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, this.state))
+  }), mxUtils.bind(this, function(a) {
+    var c = this.state.cell;
+    if (null != this.index) {
+      var d = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a),
+          mxEvent.getClientY(a)),
+        c = this.graph.getCellAt(d.x, d.y);
+      this.graph.isSwimlane(c) && this.graph.hitsSwimlaneContent(c, d.x, d.y) && (c = null)
+    }
+    this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a, this.graph.getView().getState(c)))
+  }), mxUtils.bind(this, function(a) {
+    this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(a, this.state))
+  }));
+  this.preferHtml = null != this.state.text && this.state.text.node.parentNode == this.graph.container;
+  if (!this.preferHtml) {
+    var a = this.state.getVisibleTerminalState(!0);
+    null != a && (this.preferHtml = null != a.text && a.text.node.parentNode == this.graph.container);
+    this.preferHtml || (a = this.state.getVisibleTerminalState(!1), null != a && (this.preferHtml = null != a.text && a.text.node.parentNode == this.graph.container))
+  }
+  if (this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells || 0 >= mxGraphHandler.prototype.maxCells) this.bends = this.createBends();
+  this.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y);
+  this.labelShape = new mxRectangleShape(new mxRectangle,
+    mxConstants.LABEL_HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+  this.labelShape.pointerEvents = !1;
+  this.initBend(this.labelShape);
+  this.labelShape.node.style.cursor = mxConstants.CURSOR_LABEL_HANDLE;
+  mxEvent.redirectMouseEvents(this.labelShape.node, this.graph, this.state);
+  this.redraw()
+};
+mxEdgeHandler.prototype.isAddPointEvent = function(a) {
+  return mxEvent.isShiftDown(a)
+};
+mxEdgeHandler.prototype.isRemovePointEvent = function(a) {
+  return mxEvent.isShiftDown(a)
+};
+mxEdgeHandler.prototype.getSelectionPoints = function(a) {
+  return a.absolutePoints
+};
+mxEdgeHandler.prototype.createSelectionShape = function(a) {
+  a = new mxPolyline(a, this.getSelectionColor());
+  a.strokewidth = this.getSelectionStrokeWidth();
+  a.isDashed = this.isSelectionDashed();
+  return a
+};
+mxEdgeHandler.prototype.getSelectionColor = function() {
+  return mxConstants.EDGE_SELECTION_COLOR
+};
+mxEdgeHandler.prototype.getSelectionStrokeWidth = function() {
+  return mxConstants.EDGE_SELECTION_STROKEWIDTH
+};
+mxEdgeHandler.prototype.isSelectionDashed = function() {
+  return mxConstants.EDGE_SELECTION_DASHED
+};
+mxEdgeHandler.prototype.isConnectableCell = function(a) {
+  return !0
+};
+mxEdgeHandler.prototype.createMarker = function() {
+  var a = new mxCellMarker(this.graph),
+    b = this;
+  a.getCell = function(a) {
+    var d = mxCellMarker.prototype.getCell.apply(this, arguments);
+    if (!b.isConnectableCell(d)) return null;
+    var e = b.graph.getModel();
+    if (d == b.state.cell || null != d && !b.graph.connectableEdges && e.isEdge(d)) d = null;
+    return d
+  };
+  a.isValidState = function(a) {
+    var d = b.graph.getModel(),
+      d = b.graph.view.getTerminalPort(a, b.graph.view.getState(d.getTerminal(b.state.cell, !b.isSource)), !b.isSource),
+      d = null != d ? d.cell : null;
+    b.error = b.validateConnection(b.isSource ? a.cell : d, b.isSource ? d : a.cell);
+    return null == b.error
+  };
+  return a
+};
+mxEdgeHandler.prototype.validateConnection = function(a, b) {
+  return this.graph.getEdgeValidationError(this.state.cell, a, b)
+};
+mxEdgeHandler.prototype.createBends = function() {
+  for (var a = this.state.cell, b = [], c = 0; c < this.abspoints.length; c++)
+    if (this.isHandleVisible(c)) {
+      var d = c == this.abspoints.length - 1;
+      if ((d = 0 == c || d) || this.graph.isCellBendable(a)) {
+        var e = this.createHandleShape(c);
+        this.initBend(e);
+        mxClient.IS_TOUCH && e.node.setAttribute("pointer-events", "none");
+        if (this.isHandleEnabled(c))
+          if (mxClient.IS_TOUCH) {
+            var f = mxUtils.bind(this, function(a) {
+              a = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a), mxEvent.getClientY(a));
+              return this.graph.view.getState(this.graph.getCellAt(a.x, a.y))
+            });
+            mxEvent.redirectMouseEvents(e.node, this.graph, f)
+          } else e.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE, mxEvent.redirectMouseEvents(e.node, this.graph, this.state);
+        b.push(e);
+        d || (this.points.push(new mxPoint(0, 0)), e.node.style.visibility = "hidden")
+      }
+    }
+  return b
+};
+mxEdgeHandler.prototype.isHandleEnabled = function(a) {
+  return !0
+};
+mxEdgeHandler.prototype.isHandleVisible = function(a) {
+  return !0
+};
+mxEdgeHandler.prototype.createHandleShape = function(a) {
+  if (null != this.handleImage) return new mxImageShape(new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height), this.handleImage.src);
+  a = mxConstants.HANDLE_SIZE;
+  this.preferHtml && (a -= 1);
+  return new mxRectangleShape(new mxRectangle(0, 0, a, a), mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR)
+};
+mxEdgeHandler.prototype.initBend = function(a) {
+  this.preferHtml ? (a.dialect = mxConstants.DIALECT_STRICTHTML, a.init(this.graph.container)) : (a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML :
+    mxConstants.DIALECT_SVG, a.init(this.graph.getView().getOverlayPane()))
+};
+mxEdgeHandler.prototype.getHandleForEvent = function(a) {
+  if (null != this.bends)
+    for (var b = this.tolerance, b = this.allowHandleBoundsCheck && (mxClient.IS_IE || 0 < b) ? new mxRectangle(a.getGraphX() - b, a.getGraphY() - b, 2 * b, 2 * b) : null, c = 0; c < this.bends.length; c++)
+      if ((a.isSource(this.bends[c]) || null != b && mxUtils.intersects(this.bends[c].bounds, b)) && "hidden" != this.bends[c].node.style.visibility) return c;
+  if (a.isSource(this.labelShape) && "hidden" != this.labelShape.node.style.visibility || a.isSource(this.state.text))
+    if (!mxClient.IS_SF &&
+      !mxClient.IS_GC || "SELECT" != a.getSource().nodeName) return mxEvent.LABEL_HANDLE;
+  return null
+};
+mxEdgeHandler.prototype.mouseDown = function(a, b) {
+  var c = null,
+    c = this.getHandleForEvent(b);
+  null != c && (!b.isConsumed() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent())) && (this.removeEnabled && this.isRemovePointEvent(b.getEvent()) ? this.removePoint(this.state,
+    c) : (c != mxEvent.LABEL_HANDLE || this.graph.isLabelMovable(b.getCell())) && this.start(b.getX(), b.getY(), c), b.consume())
+};
+mxEdgeHandler.prototype.start = function(a, b, c) {
+  this.startX = a;
+  this.startY = b;
+  this.isSource = null == this.bends ? !1 : 0 == c;
+  this.isTarget = null == this.bends ? !1 : c == this.bends.length - 1;
+  this.isLabel = c == mxEvent.LABEL_HANDLE;
+  if (this.isSource || this.isTarget) {
+    if (a = this.state.cell, b = this.graph.model.getTerminal(a, this.isSource), null == b && this.graph.isTerminalPointMovable(a, this.isSource) || null != b && this.graph.isCellDisconnectable(a,
+        b, this.isSource)) this.index = c
+  } else this.index = c
+};
+mxEdgeHandler.prototype.clonePreviewState = function(a, b) {
+  return this.state.clone()
+};
+mxEdgeHandler.prototype.getSnapToTerminalTolerance = function() {
+  return this.graph.gridSize * this.graph.view.scale / 2
+};
+mxEdgeHandler.prototype.getPointForEvent = function(a) {
+  var b = new mxPoint(a.getGraphX(), a.getGraphY()),
+    c = this.getSnapToTerminalTolerance(),
+    d = this.graph.getView(),
+    e = !1,
+    f = !1;
+  if (this.snapToTerminals && 0 < c) {
+    var g = function(a) {
+        if (null != a) {
+          var d = a.x;
+          Math.abs(b.x - d) < c && (b.x = d, e = !0);
+          a = a.y;
+          Math.abs(b.y - a) < c && (b.y = a, f = !0)
+        }
+      },
+      h = function(a) {
+        null != a && g.call(this, new mxPoint(d.getRoutingCenterX(a), d.getRoutingCenterY(a)))
+      };
+    h.call(this, this.state.getVisibleTerminalState(!0));
+    h.call(this, this.state.getVisibleTerminalState(!1));
+    if (null != this.abspoints)
+      for (h = 0; h < this.abspoints; h++) h != this.index && g.call(this, this.abspoints[h])
+  }
+  this.graph.isGridEnabledEvent(a.getEvent()) && (a = d.scale, h = d.translate, e || (b.x = (this.graph.snap(b.x / a - h.x) + h.x) * a), f || (b.y = (this.graph.snap(b.y / a - h.y) + h.y) * a));
+  return b
+};
+mxEdgeHandler.prototype.getPreviewTerminalState = function(a) {
+  this.constraintHandler.update(a, this.isSource);
+  this.marker.process(a);
+  a = this.marker.getValidState();
+  var b = null;
+  null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentConstraint && this.marker.reset();
+  null != a ? b = a : null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (b = this.constraintHandler.currentFocus);
+  return b
+};
+mxEdgeHandler.prototype.getPreviewPoints = function(a) {
+  var b = this.graph.getCellGeometry(this.state.cell),
+    b = null != b.points ? b.points.slice() : null;
+  !this.isSource && !this.isTarget ? (this.convertPoint(a, !1), null == b ? b = [a] : b[this.index - 1] = a) : this.graph.resetEdgesOnConnect && (b = null);
+  return b
+};
+mxEdgeHandler.prototype.updatePreviewState = function(a, b, c) {
+  var d = this.isSource ? c : this.state.getVisibleTerminalState(!0),
+    e = this.isTarget ? c : this.state.getVisibleTerminalState(!1),
+    f = this.graph.getConnectionConstraint(a, d, !0),
+    g = this.graph.getConnectionConstraint(a, e, !1),
+    h = this.constraintHandler.currentConstraint;
+  null == h && (h = new mxConnectionConstraint);
+  this.isSource ? f = h : this.isTarget && (g = h);
+  (!this.isSource || null != d) && a.view.updateFixedTerminalPoint(a, d, !0, f);
+  (!this.isTarget || null != e) && a.view.updateFixedTerminalPoint(a,
+    e, !1, g);
+  if ((this.isSource || this.isTarget) && null == c) a.setAbsoluteTerminalPoint(b, this.isSource), null == this.marker.getMarkedState() && (this.error = this.graph.allowDanglingEdges ? null : "");
+  a.view.updatePoints(a, this.points, d, e);
+  a.view.updateFloatingTerminalPoints(a, d, e)
+};
+mxEdgeHandler.prototype.mouseMove = function(a, b) {
+  if (null != this.index && null != this.marker) {
+    var c = this.getPointForEvent(b);
+    if (this.isLabel) this.label.x = c.x, this.label.y = c.y;
+    else {
+      this.points = this.getPreviewPoints(c);
+      var d = this.isSource || this.isTarget ? this.getPreviewTerminalState(b) : null,
+        e = this.clonePreviewState(c, null != d ? d.cell : null);
+      this.updatePreviewState(e, c, d);
+      this.setPreviewColor(null == this.error ? this.marker.validColor : this.marker.invalidColor);
+      this.abspoints = e.absolutePoints;
+      this.active = !0
+    }
+    this.drawPreview();
+    mxEvent.consume(b.getEvent());
+    b.consume()
+  } else mxClient.IS_IE && null != this.getHandleForEvent(b) && b.consume(!1)
+};
+mxEdgeHandler.prototype.mouseUp = function(a, b) {
+  if (null != this.index && null != this.marker) {
+    var c = this.state.cell;
+    if (b.getX() != this.startX || b.getY() != this.startY)
+      if (null != this.error) 0 < this.error.length && this.graph.validationAlert(this.error);
+      else if (this.isLabel) this.moveLabel(this.state, this.label.x, this.label.y);
+    else if (this.isSource || this.isTarget) {
+      var d = null;
+      null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (d = this.constraintHandler.currentFocus.cell);
+      null ==
+        d && this.marker.hasValidState() && (d = this.marker.validState.cell);
+      if (null != d) c = this.connect(c, d, this.isSource, this.graph.isCloneEvent(b.getEvent()) && this.cloneEnabled && this.graph.isCellsCloneable(), b);
+      else if (this.graph.isAllowDanglingEdges()) {
+        d = this.abspoints[this.isSource ? 0 : this.abspoints.length - 1];
+        d.x = d.x / this.graph.view.scale - this.graph.view.translate.x;
+        d.y = d.y / this.graph.view.scale - this.graph.view.translate.y;
+        var e = this.graph.getView().getState(this.graph.getModel().getParent(c));
+        null != e && (d.x -=
+          e.origin.x, d.y -= e.origin.y);
+        d.x -= this.graph.panDx / this.graph.view.scale;
+        d.y -= this.graph.panDy / this.graph.view.scale;
+        this.changeTerminalPoint(c, d, this.isSource)
+      }
+    } else this.active ? this.changePoints(c, this.points) : (this.graph.getView().invalidate(this.state.cell), this.graph.getView().revalidate(this.state.cell));
+    null != this.marker && (this.reset(), c != this.state.cell && this.graph.setSelectionCell(c));
+    b.consume()
+  }
+};
+mxEdgeHandler.prototype.reset = function() {
+  this.points = this.label = this.index = this.error = null;
+  this.isTarget = this.isSource = this.isLabel = this.active = !1;
+  this.marker.reset();
+  this.constraintHandler.reset();
+  this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);
+  this.redraw()
+};
+mxEdgeHandler.prototype.setPreviewColor = function(a) {
+  null != this.shape && (this.shape.stroke = a)
+};
+mxEdgeHandler.prototype.convertPoint = function(a, b) {
+  var c = this.graph.getView().getScale(),
+    d = this.graph.getView().getTranslate();
+  b && (a.x = this.graph.snap(a.x), a.y = this.graph.snap(a.y));
+  a.x = Math.round(a.x / c - d.x);
+  a.y = Math.round(a.y / c - d.y);
+  c = this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));
+  null != c && (a.x -= c.origin.x, a.y -= c.origin.y);
+  return a
+};
+mxEdgeHandler.prototype.moveLabel = function(a, b, c) {
+  var d = this.graph.getModel(),
+    e = d.getGeometry(a.cell);
+  if (null != e) {
+    var e = e.clone(),
+      f = this.graph.getView().getRelativePoint(a, b, c);
+    e.x = f.x;
+    e.y = f.y;
+    var g = this.graph.getView().scale;
+    e.offset = new mxPoint(0, 0);
+    f = this.graph.view.getPoint(a, e);
+    e.offset = new mxPoint((b - f.x) / g, (c - f.y) / g);
+    d.setGeometry(a.cell, e)
+  }
+};
+mxEdgeHandler.prototype.connect = function(a, b, c, d, e) {
+  e = this.graph.getModel();
+  var f = e.getParent(a);
+  e.beginUpdate();
+  try {
+    if (d) {
+      var g = a.clone();
+      e.add(f, g, e.getChildCount(f));
+      var h = e.getTerminal(a, !c);
+      this.graph.connectCell(g, h, !c);
+      a = g
+    }
+    var k = this.constraintHandler.currentConstraint;
+    null == k && (k = new mxConnectionConstraint);
+    this.graph.connectCell(a, b, c, k)
+  } finally {
+    e.endUpdate()
+  }
+  return a
+};
+mxEdgeHandler.prototype.changeTerminalPoint = function(a, b, c) {
+  var d = this.graph.getModel(),
+    e = d.getGeometry(a);
+  if (null != e) {
+    d.beginUpdate();
+    try {
+      e = e.clone(), e.setTerminalPoint(b, c), d.setGeometry(a, e), this.graph.connectCell(a, null, c, new mxConnectionConstraint)
+    } finally {
+      d.endUpdate()
+    }
+  }
+};
+mxEdgeHandler.prototype.changePoints = function(a, b) {
+  var c = this.graph.getModel(),
+    d = c.getGeometry(a);
+  null != d && (d = d.clone(), d.points = b, c.setGeometry(a, d))
+};
+mxEdgeHandler.prototype.addPoint = function(a, b) {
+  var c = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(b), mxEvent.getClientY(b)),
+    d = this.graph.isGridEnabledEvent(b);
+  this.convertPoint(c, d);
+  this.addPointAt(a, c.x, c.y);
+  mxEvent.consume(b)
+};
+mxEdgeHandler.prototype.addPointAt = function(a, b, c) {
+  var d = this.graph.getCellGeometry(a.cell);
+  b = new mxPoint(b, c);
+  if (null != d) {
+    d = d.clone();
+    c = this.graph.view.translate;
+    var e = this.graph.view.scale;
+    c = mxUtils.findNearestSegment(a, (b.x + c.x) * e, (b.y + c.y) * e);
+    null == d.points ? d.points = [b] : d.points.splice(c, 0, b);
+    this.graph.getModel().setGeometry(a.cell, d);
+    this.destroy();
+    this.init()
+  }
+};
+mxEdgeHandler.prototype.removePoint = function(a, b) {
+  if (0 < b && b < this.abspoints.length - 1) {
+    var c = this.graph.getCellGeometry(this.state.cell);
+    null != c && null != c.points && (c = c.clone(), c.points.splice(b - 1, 1), this.graph.getModel().setGeometry(a.cell, c), this.destroy(), this.init())
+  }
+};
+mxEdgeHandler.prototype.getHandleFillColor = function(a) {
+  a = 0 == a;
+  var b = this.state.cell,
+    c = this.graph.getModel().getTerminal(b, a),
+    d = mxConstants.HANDLE_FILLCOLOR;
+  null != c && !this.graph.isCellDisconnectable(b, c, a) || null == c && !this.graph.isTerminalPointMovable(b, a) ? d = mxConstants.LOCKED_HANDLE_FILLCOLOR : null != c && this.graph.isCellDisconnectable(
+    b, c, a) && (d = mxConstants.CONNECT_HANDLE_FILLCOLOR);
+  return d
+};
+mxEdgeHandler.prototype.redraw = function() {
+  this.abspoints = this.state.absolutePoints.slice();
+  var a = this.state.cell,
+    b = mxConstants.LABEL_HANDLE_SIZE;
+  this.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y);
+  this.labelShape.bounds = new mxRectangle(Math.round(this.label.x - b / 2), Math.round(this.label.y - b / 2), b, b);
+  this.labelShape.redraw();
+  b = this.graph.getLabel(a);
+  null != b && 0 < b.length && this.graph.isLabelMovable(a) ? this.labelShape.node.style.visibility = "visible" : this.labelShape.node.style.visibility =
+    "hidden";
+  if (null != this.bends && 0 < this.bends.length) {
+    var c = this.abspoints.length - 1,
+      a = this.abspoints[0],
+      d = this.abspoints[0].y,
+      b = this.bends[0].bounds;
+    this.bends[0].bounds = new mxRectangle(Math.round(this.abspoints[0].x - b.width / 2), Math.round(d - b.height / 2), b.width, b.height);
+    this.bends[0].fill = this.getHandleFillColor(0);
+    this.bends[0].redraw();
+    var d = this.abspoints[c],
+      e = this.abspoints[c].x,
+      c = this.abspoints[c].y,
+      f = this.bends.length - 1,
+      b = this.bends[f].bounds;
+    this.bends[f].bounds = new mxRectangle(Math.round(e - b.width /
+      2), Math.round(c - b.height / 2), b.width, b.height);
+    this.bends[f].fill = this.getHandleFillColor(f);
+    this.bends[f].redraw();
+    this.redrawInnerBends(a, d)
+  }
+  this.drawPreview()
+};
+mxEdgeHandler.prototype.redrawInnerBends = function(a, b) {
+  var c = this.graph.getModel().getGeometry(this.state.cell).points;
+  if (null != c) {
+    null == this.points && (this.points = []);
+    for (var d = 1; d < this.bends.length - 1; d++)
+      if (null != this.bends[d])
+        if (null != this.abspoints[d]) {
+          var e = this.abspoints[d].x,
+            f = this.abspoints[d].y,
+            g = this.bends[d].bounds;
+          this.bends[d].node.style.visibility = "visible";
+          this.bends[d].bounds = new mxRectangle(Math.round(e - g.width / 2), Math.round(f - g.height / 2), g.width, g.height);
+          this.bends[d].redraw();
+          this.points[d -
+            1] = c[d - 1]
+        } else this.bends[d].destroy(), this.bends[d] = null
+  }
+};
+mxEdgeHandler.prototype.drawPreview = function() {
+  if (this.isLabel) {
+    var a = mxConstants.LABEL_HANDLE_SIZE,
+      a = new mxRectangle(Math.round(this.label.x - a / 2), Math.round(this.label.y - a / 2), a, a);
+    this.labelShape.bounds = a;
+    this.labelShape.redraw()
+  } else this.shape.points = this.abspoints, this.shape.redraw()
+};
+mxEdgeHandler.prototype.destroy = function() {
+  null != this.marker && (this.marker.destroy(), this.marker = null);
+  null != this.shape && (this.shape.destroy(), this.shape = null);
+  null != this.labelShape && (this.labelShape.destroy(), this.labelShape = null);
+  null != this.constraintHandler && (this.constraintHandler.destroy(), this.constraintHandler = null);
+  if (null != this.bends)
+    for (var a = 0; a < this.bends.length; a++) null != this.bends[a] && (this.bends[a].destroy(), this.bends[a] = null)
+};
+
+function mxElbowEdgeHandler(a) {
+  mxEdgeHandler.call(this, a)
+}
+mxUtils.extend(mxElbowEdgeHandler, mxEdgeHandler);
+mxElbowEdgeHandler.prototype = new mxEdgeHandler;
+mxElbowEdgeHandler.prototype.constructor = mxElbowEdgeHandler;
+mxElbowEdgeHandler.prototype.flipEnabled = !0;
+mxElbowEdgeHandler.prototype.doubleClickOrientationResource = "none" != mxClient.language ? "doubleClickOrientation" : "";
+mxElbowEdgeHandler.prototype.createBends = function() {
+  var a = [],
+    b = this.createHandleShape(0);
+  this.initBend(b);
+  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
+  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
+  a.push(b);
+  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
+  a.push(this.createVirtualBend());
+  this.points.push(new mxPoint(0, 0));
+  b = this.createHandleShape(2);
+  this.initBend(b);
+  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
+  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
+  a.push(b);
+  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
+  return a
+};
+mxElbowEdgeHandler.prototype.createVirtualBend = function() {
+  var a = this.createHandleShape();
+  this.initBend(a);
+  var b = this.getCursorForBend();
+  a.node.style.cursor = b;
+  b = mxUtils.bind(this, function(a) {
+    !mxEvent.isConsumed(a) && this.flipEnabled && (this.graph.flipEdge(this.state.cell, a), mxEvent.consume(a))
+  });
+  mxEvent.redirectMouseEvents(a.node, this.graph, this.state, null, null, null, b);
+  this.graph.isCellBendable(this.state.cell) || (a.node.style.display = "none");
+  return a
+};
+mxElbowEdgeHandler.prototype.getCursorForBend = function() {
+  return this.state.style[mxConstants.STYLE_EDGE] == mxEdgeStyle.TopToBottom || this.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_TOPTOBOTTOM || (this.state.style[mxConstants.STYLE_EDGE] ==
+      mxEdgeStyle.ElbowConnector || this.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_ELBOW) && this.state.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL ?
+    "row-resize" : "col-resize"
+};
+mxElbowEdgeHandler.prototype.getTooltipForNode = function(a) {
+  var b = null;
+  if (null != this.bends && null != this.bends[1] && (a == this.bends[1].node || a.parentNode == this.bends[1].node)) b = this.doubleClickOrientationResource, b = mxResources.get(b) || b;
+  return b
+};
+mxElbowEdgeHandler.prototype.convertPoint = function(a, b) {
+  var c = this.graph.getView().getScale(),
+    d = this.graph.getView().getTranslate(),
+    e = this.state.origin;
+  b && (a.x = this.graph.snap(a.x), a.y = this.graph.snap(a.y));
+  a.x = Math.round(a.x / c - d.x - e.x);
+  a.y = Math.round(a.y / c - d.y - e.y)
+};
+mxElbowEdgeHandler.prototype.redrawInnerBends = function(a, b) {
+  var c = this.graph.getModel().getGeometry(this.state.cell).points,
+    c = null != c ? c[0] : null,
+    c = null == c ? new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2) : new mxPoint(this.graph.getView().scale * (c.x + this.graph.getView().translate.x + this.state.origin.x), this.graph.getView()
+      .scale * (c.y + this.graph.getView().translate.y + this.state.origin.y)),
+    d = this.bends[1].bounds,
+    e = d.width,
+    d = d.height;
+  null == this.handleImage && (d = e = mxConstants.HANDLE_SIZE);
+  var f = new mxRectangle(Math.round(c.x -
+    e / 2), Math.round(c.y - d / 2), e, d);
+  null == this.handleImage && ("hidden" != this.labelShape.node.style.visibility && mxUtils.intersects(f, this.labelShape.bounds)) && (e += 3, d += 3, f = new mxRectangle(Math.round(c.x - e / 2),
+    Math.round(c.y - d / 2), e, d));
+  this.bends[1].bounds = f;
+  this.bends[1].redraw()
+};
+
+function mxEdgeSegmentHandler(a) {
+  mxEdgeHandler.call(this, a)
+}
+mxUtils.extend(mxEdgeSegmentHandler, mxEdgeHandler);
+mxEdgeSegmentHandler.prototype = new mxElbowEdgeHandler;
+mxEdgeSegmentHandler.prototype.constructor = mxEdgeSegmentHandler;
+mxEdgeSegmentHandler.prototype.getPreviewPoints = function(a) {
+  if (this.isSource || this.isTarget) return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this, arguments);
+  this.convertPoint(a, !1);
+  var b = this.state.absolutePoints,
+    c = b[0].clone();
+  this.convertPoint(c, !1);
+  for (var d = [], e = 1; e < b.length; e++) {
+    var f = b[e].clone();
+    this.convertPoint(f, !1);
+    e == this.index && (c.x == f.x ? (c.x = a.x, f.x = a.x) : (c.y = a.y, f.y = a.y));
+    e < b.length - 1 && d.push(f);
+    c = f
+  }
+  if (1 == d.length) {
+    if (c = this.state.view, e = this.state.getVisibleTerminalState(!0),
+      f = this.state.getVisibleTerminalState(!1), null != f & null != e) {
+      var g = this.state.origin.x,
+        h = this.state.origin.y;
+      mxUtils.contains(f, d[0].x + g, d[0].y + h) ? b[1].y == b[2].y ? d[0].y = c.getRoutingCenterY(e) - h : d[0].x = c.getRoutingCenterX(e) - g : mxUtils.contains(e, d[0].x + g, d[0].y + h) && (b[
+        1].y == b[0].y ? d[0].y = c.getRoutingCenterY(f) - h : d[0].x = c.getRoutingCenterX(f) - g)
+    }
+  } else 0 == d.length && (d = [a]);
+  return d
+};
+mxEdgeSegmentHandler.prototype.createBends = function() {
+  var a = [],
+    b = this.createHandleShape(0);
+  this.initBend(b);
+  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
+  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
+  a.push(b);
+  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
+  var c = this.state.absolutePoints;
+  if (this.graph.isCellBendable(this.state.cell)) {
+    null == this.points && (this.points = []);
+    for (var d = 0; d < c.length - 1; d++) b = this.createVirtualBend(), a.push(b), b.node.style.cursor = 0 == c[d].x -
+      c[d + 1].x ? "col-resize" : "row-resize", this.points.push(new mxPoint(0, 0)), mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none")
+  }
+  b = this.createHandleShape(c.length);
+  this.initBend(b);
+  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
+  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
+  a.push(b);
+  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
+  return a
+};
+mxEdgeSegmentHandler.prototype.redraw = function() {
+  this.refresh();
+  mxEdgeHandler.prototype.redraw.apply(this, arguments)
+};
+mxEdgeSegmentHandler.prototype.refresh = function() {
+  if (null != this.bends) {
+    for (var a = 0; a < this.bends.length; a++) null != this.bends[a] && (this.bends[a].destroy(), this.bends[a] = null);
+    this.bends = this.createBends()
+  }
+};
+mxEdgeSegmentHandler.prototype.redrawInnerBends = function(a, b) {
+  if (this.graph.isCellBendable(this.state.cell)) {
+    var c = mxConstants.HANDLE_SIZE,
+      d = this.state.absolutePoints;
+    if (null != d && 1 < d.length)
+      for (var e = 0; e < this.state.absolutePoints.length - 1; e++)
+        if (null != this.bends[e + 1]) {
+          a = d[e];
+          b = d[e + 1];
+          var f = new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2);
+          this.bends[e + 1].bounds = new mxRectangle(Math.round(f.x - c / 2), Math.round(f.y - c / 2), c, c);
+          this.bends[e + 1].redraw()
+        }
+  }
+};
+mxEdgeSegmentHandler.prototype.changePoints = function(a, b) {
+  b = [];
+  var c = this.abspoints;
+  if (1 < c.length)
+    for (var d = c[0], e = c[1], f = 2; f < c.length; f++) {
+      var g = c[f];
+      if ((Math.round(d.x) != Math.round(e.x) || Math.round(e.x) != Math.round(g.x)) && (Math.round(d.y) != Math.round(e.y) || Math.round(e.y) != Math.round(g.y))) d = e, e = e.clone(), this.convertPoint(
+        e, !1), b.push(e);
+      e = g
+    }
+  mxElbowEdgeHandler.prototype.changePoints.apply(this, arguments)
+};
+
+function mxKeyHandler(a, b) {
+  null != a && (this.graph = a, this.target = b || document.documentElement, this.normalKeys = [], this.shiftKeys = [], this.controlKeys = [], this.controlShiftKeys = [], mxEvent.addListener(this.target,
+    "keydown", mxUtils.bind(this, function(a) {
+      this.keyDown(a)
+    })), mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
+    this.destroy()
+  })))
+}
+mxKeyHandler.prototype.graph = null;
+mxKeyHandler.prototype.target = null;
+mxKeyHandler.prototype.normalKeys = null;
+mxKeyHandler.prototype.shiftKeys = null;
+mxKeyHandler.prototype.controlKeys = null;
+mxKeyHandler.prototype.controlShiftKeys = null;
+mxKeyHandler.prototype.enabled = !0;
+mxKeyHandler.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxKeyHandler.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxKeyHandler.prototype.bindKey = function(a, b) {
+  this.normalKeys[a] = b
+};
+mxKeyHandler.prototype.bindShiftKey = function(a, b) {
+  this.shiftKeys[a] = b
+};
+mxKeyHandler.prototype.bindControlKey = function(a, b) {
+  this.controlKeys[a] = b
+};
+mxKeyHandler.prototype.bindControlShiftKey = function(a, b) {
+  this.controlShiftKeys[a] = b
+};
+mxKeyHandler.prototype.isControlDown = function(a) {
+  return mxEvent.isControlDown(a)
+};
+mxKeyHandler.prototype.getFunction = function(a) {
+  return null != a ? this.isControlDown(a) ? mxEvent.isShiftDown(a) ? this.controlShiftKeys[a.keyCode] : this.controlKeys[a.keyCode] : mxEvent.isShiftDown(a) ? this.shiftKeys[a.keyCode] : this.normalKeys[
+    a.keyCode] : null
+};
+mxKeyHandler.prototype.isGraphEvent = function(a) {
+  a = mxEvent.getSource(a);
+  if (a == this.target || a.parentNode == this.target || null != this.graph.cellEditor && a == this.graph.cellEditor.textarea) return !0;
+  for (; null != a;) {
+    if (a == this.graph.container) return !0;
+    a = a.parentNode
+  }
+  return !1
+};
+mxKeyHandler.prototype.keyDown = function(a) {
+  if (this.graph.isEnabled() && !mxEvent.isConsumed(a) && this.isGraphEvent(a) && this.isEnabled())
+    if (27 == a.keyCode) this.escape(a);
+    else if (!this.graph.isEditing()) {
+    var b = this.getFunction(a);
+    null != b && (b(a), mxEvent.consume(a))
+  }
+};
+mxKeyHandler.prototype.escape = function(a) {
+  this.graph.isEscapeEnabled() && this.graph.escape(a)
+};
+mxKeyHandler.prototype.destroy = function() {
+  this.target = null
+};
+
+function mxTooltipHandler(a, b) {
+  null != a && (this.graph = a, this.delay = b || 500, this.graph.addMouseListener(this))
+}
+mxTooltipHandler.prototype.zIndex = 10005;
+mxTooltipHandler.prototype.graph = null;
+mxTooltipHandler.prototype.delay = null;
+mxTooltipHandler.prototype.hideOnHover = !1;
+mxTooltipHandler.prototype.enabled = !0;
+mxTooltipHandler.prototype.isEnabled = function() {
+  return this.enabled
+};
+mxTooltipHandler.prototype.setEnabled = function(a) {
+  this.enabled = a
+};
+mxTooltipHandler.prototype.isHideOnHover = function() {
+  return this.hideOnHover
+};
+mxTooltipHandler.prototype.setHideOnHover = function(a) {
+  this.hideOnHover = a
+};
+mxTooltipHandler.prototype.init = function() {
+  null != document.body && (this.div = document.createElement("div"), this.div.className = "mxTooltip", this.div.style.visibility = "hidden", this.div.style.zIndex = this.zIndex, document.body.appendChild(
+    this.div), mxEvent.addListener(this.div, "mousedown", mxUtils.bind(this, function(a) {
+    this.hideTooltip()
+  })))
+};
+mxTooltipHandler.prototype.mouseDown = function(a, b) {
+  this.reset(b, !1);
+  this.hideTooltip()
+};
+mxTooltipHandler.prototype.mouseMove = function(a, b) {
+  if (b.getX() != this.lastX || b.getY() != this.lastY) this.reset(b, !0), (this.isHideOnHover() || b.getState() != this.state || b.getSource() != this.node && (!this.stateSource || null != b.getState() &&
+    this.stateSource == (b.isSource(b.getState().shape) || !b.isSource(b.getState().text)))) && this.hideTooltip();
+  this.lastX = b.getX();
+  this.lastY = b.getY()
+};
+mxTooltipHandler.prototype.mouseUp = function(a, b) {
+  this.reset(b, !0);
+  this.hideTooltip()
+};
+mxTooltipHandler.prototype.resetTimer = function() {
+  null != this.thread && (window.clearTimeout(this.thread), this.thread = null)
+};
+mxTooltipHandler.prototype.reset = function(a, b) {
+  this.resetTimer();
+  if (b && this.isEnabled() && null != a.getState() && (null == this.div || "hidden" == this.div.style.visibility)) {
+    var c = a.getState(),
+      d = a.getSource(),
+      e = a.getX(),
+      f = a.getY(),
+      g = a.isSource(c.shape) || a.isSource(c.text);
+    this.thread = window.setTimeout(mxUtils.bind(this, function() {
+      if (!this.graph.isEditing() && !this.graph.panningHandler.isMenuShowing()) {
+        var a = this.graph.getTooltip(c, d, e, f);
+        this.show(a, e, f);
+        this.state = c;
+        this.node = d;
+        this.stateSource = g
+      }
+    }), this.delay)
+  }
+};
+mxTooltipHandler.prototype.hide = function() {
+  this.resetTimer();
+  this.hideTooltip()
+};
+mxTooltipHandler.prototype.hideTooltip = function() {
+  null != this.div && (this.div.style.visibility = "hidden")
+};
+mxTooltipHandler.prototype.show = function(a, b, c) {
+  if (null != a && 0 < a.length) {
+    null == this.div && this.init();
+    var d = mxUtils.getScrollOrigin();
+    this.div.style.left = b + d.x + "px";
+    this.div.style.top = c + mxConstants.TOOLTIP_VERTICAL_OFFSET + d.y + "px";
+    mxUtils.isNode(a) ? (this.div.innerHTML = "", this.div.appendChild(a)) : this.div.innerHTML = a.replace(/\n/g, "\x3cbr\x3e");
+    this.div.style.visibility = "";
+    mxUtils.fit(this.div)
+  }
+};
+mxTooltipHandler.prototype.destroy = function() {
+  this.graph.removeMouseListener(this);
+  mxEvent.release(this.div);
+  null != this.div && null != this.div.parentNode && this.div.parentNode.removeChild(this.div);
+  this.div = null
+};
+
+function mxCellTracker(a, b, c) {
+  mxCellMarker.call(this, a, b);
+  this.graph.addMouseListener(this);
+  null != c && (this.getCell = c);
+  mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
+    this.destroy()
+  }))
+}
+mxUtils.extend(mxCellTracker, mxCellMarker);
+mxCellTracker.prototype.mouseDown = function(a, b) {};
+mxCellTracker.prototype.mouseMove = function(a, b) {
+  this.isEnabled() && this.process(b)
+};
+mxCellTracker.prototype.mouseUp = function(a, b) {
+  this.reset()
+};
+mxCellTracker.prototype.destroy = function() {
+  this.destroyed || (this.destroyed = !0, this.graph.removeMouseListener(this), mxCellMarker.prototype.destroy.apply(this))
+};
+
+function mxCellHighlight(a, b, c, d) {
+  null != a && (this.graph = a, this.highlightColor = null != b ? b : mxConstants.DEFAULT_VALID_COLOR, this.strokeWidth = null != c ? c : mxConstants.HIGHLIGHT_STROKEWIDTH, this.dashed = null != d ?
+    d : !1, this.repaintHandler = mxUtils.bind(this, function() {
+      this.repaint()
+    }), this.graph.getView().addListener(mxEvent.SCALE, this.repaintHandler), this.graph.getView().addListener(mxEvent.TRANSLATE, this.repaintHandler), this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,
+      this.repaintHandler), this.graph.getModel().addListener(mxEvent.CHANGE,
+      this.repaintHandler), this.resetHandler = mxUtils.bind(this, function() {
+      this.hide()
+    }), this.graph.getView().addListener(mxEvent.DOWN, this.resetHandler), this.graph.getView().addListener(mxEvent.UP, this.resetHandler))
+}
+mxCellHighlight.prototype.keepOnTop = !1;
+mxCellHighlight.prototype.graph = !0;
+mxCellHighlight.prototype.state = null;
+mxCellHighlight.prototype.spacing = 2;
+mxCellHighlight.prototype.resetHandler = null;
+mxCellHighlight.prototype.setHighlightColor = function(a) {
+  this.highlightColor = a;
+  null != this.shape && (this.shape.stroke = a)
+};
+mxCellHighlight.prototype.drawHighlight = function() {
+  this.shape = this.createShape();
+  this.repaint();
+  !this.keepOnTop && this.shape.node.parentNode.firstChild != this.shape.node && this.shape.node.parentNode.insertBefore(this.shape.node, this.shape.node.parentNode.firstChild)
+};
+mxCellHighlight.prototype.createShape = function() {
+  var a = null,
+    a = this.graph.model.isEdge(this.state.cell) ? new mxPolyline(this.state.absolutePoints, this.highlightColor, this.strokeWidth) : new mxRectangleShape(new mxRectangle, null, this.highlightColor,
+      this.strokeWidth);
+  a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
+  a.init(this.graph.getView().getOverlayPane());
+  mxEvent.redirectMouseEvents(a.node, this.graph, this.state);
+  a.svgStrokeTolerance = 0;
+  a.pointerEvents = !1;
+  a.isDashed = this.dashed;
+  return a
+};
+mxCellHighlight.prototype.repaint = function() {
+  if (null != this.state && null != this.shape) {
+    var a = 0;
+    this.graph.model.isEdge(this.state.cell) ? this.shape.points = this.state.absolutePoints : (this.shape.bounds = new mxRectangle(this.state.x - this.spacing, this.state.y - this.spacing, this.state
+      .width + 2 * this.spacing, this.state.height + 2 * this.spacing), a = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0"));
+    null != this.state.shape && this.shape.setCursor(this.state.shape.getCursor());
+    0 != a && (this.shape.rotation = a);
+    this.shape.redraw()
+  }
+};
+mxCellHighlight.prototype.hide = function() {
+  this.highlight(null)
+};
+mxCellHighlight.prototype.highlight = function(a) {
+  this.state != a && (null != this.shape && (this.shape.destroy(), this.shape = null), this.state = a, null != this.state && this.drawHighlight())
+};
+mxCellHighlight.prototype.destroy = function() {
+  this.graph.getView().removeListener(this.repaintHandler);
+  this.graph.getModel().removeListener(this.repaintHandler);
+  this.graph.getView().removeListener(this.resetHandler);
+  this.graph.getModel().removeListener(this.resetHandler);
+  null != this.shape && (this.shape.destroy(), this.shape = null)
+};
+
+function mxDefaultKeyHandler(a) {
+  if (null != a) {
+    this.editor = a;
+    this.handler = new mxKeyHandler(a.graph);
+    var b = this.handler.escape;
+    this.handler.escape = function(c) {
+      b.apply(this, arguments);
+      a.hideProperties();
+      a.fireEvent(new mxEventObject(mxEvent.ESCAPE, "event", c))
+    }
+  }
+}
+mxDefaultKeyHandler.prototype.editor = null;
+mxDefaultKeyHandler.prototype.handler = null;
+mxDefaultKeyHandler.prototype.bindAction = function(a, b, c) {
+  var d = mxUtils.bind(this, function() {
+    this.editor.execute(b)
+  });
+  c ? this.handler.bindControlKey(a, d) : this.handler.bindKey(a, d)
+};
+mxDefaultKeyHandler.prototype.destroy = function() {
+  this.handler.destroy();
+  this.handler = null
+};
+
+function mxDefaultPopupMenu(a) {
+  this.config = a
+}
+mxDefaultPopupMenu.prototype.imageBasePath = null;
+mxDefaultPopupMenu.prototype.config = null;
+mxDefaultPopupMenu.prototype.createMenu = function(a, b, c, d) {
+  if (null != this.config) {
+    var e = this.createConditions(a, c, d);
+    this.addItems(a, b, c, d, e, this.config.firstChild, null)
+  }
+};
+mxDefaultPopupMenu.prototype.addItems = function(a, b, c, d, e, f, g) {
+  for (var h = !1; null != f;) {
+    if ("add" == f.nodeName) {
+      var k = f.getAttribute("if");
+      if (null == k || e[k]) {
+        var k = f.getAttribute("as"),
+          k = mxResources.get(k) || k,
+          l = mxUtils.eval(mxUtils.getTextContent(f)),
+          m = f.getAttribute("action"),
+          n = f.getAttribute("icon"),
+          p = f.getAttribute("iconCls");
+        h && (b.addSeparator(g), h = !1);
+        null != n && this.imageBasePath && (n = this.imageBasePath + n);
+        k = this.addAction(b, a, k, n, l, m, c, g, p);
+        this.addItems(a, b, c, d, e, f.firstChild, k)
+      }
+    } else "separator" ==
+      f.nodeName && (h = !0);
+    f = f.nextSibling
+  }
+};
+mxDefaultPopupMenu.prototype.addAction = function(a, b, c, d, e, f, g, h, k) {
+  return a.addItem(c, d, function(a) {
+    "function" == typeof e && e.call(b, b, g, a);
+    null != f && b.execute(f, g, a)
+  }, h, k)
+};
+mxDefaultPopupMenu.prototype.createConditions = function(a, b, c) {
+  var d = a.graph.getModel(),
+    e = d.getChildCount(b),
+    f = [];
+  f.nocell = null == b;
+  f.ncells = 1 < a.graph.getSelectionCount();
+  f.notRoot = d.getRoot() != d.getParent(a.graph.getDefaultParent());
+  f.cell = null != b;
+  d = null != b && 1 == a.graph.getSelectionCount();
+  f.nonEmpty = d && 0 < e;
+  f.expandable = d && a.graph.isCellFoldable(b, !1);
+  f.collapsable = d && a.graph.isCellFoldable(b, !0);
+  f.validRoot = d && a.graph.isValidRoot(b);
+  f.emptyValidRoot = f.validRoot && 0 == e;
+  f.swimlane = d && a.graph.isSwimlane(b);
+  e = this.config.getElementsByTagName("condition");
+  for (d = 0; d < e.length; d++) {
+    var g = mxUtils.eval(mxUtils.getTextContent(e[d])),
+      h = e[d].getAttribute("name");
+    null != h && "function" == typeof g && (f[h] = g(a, b, c))
+  }
+  return f
+};
+
+function mxDefaultToolbar(a, b) {
+  this.editor = b;
+  null != a && null != b && this.init(a)
+}
+mxDefaultToolbar.prototype.editor = null;
+mxDefaultToolbar.prototype.toolbar = null;
+mxDefaultToolbar.prototype.resetHandler = null;
+mxDefaultToolbar.prototype.spacing = 4;
+mxDefaultToolbar.prototype.connectOnDrop = !1;
+mxDefaultToolbar.prototype.init = function(a) {
+  null != a && (this.toolbar = new mxToolbar(a), this.toolbar.addListener(mxEvent.SELECT, mxUtils.bind(this, function(a, c) {
+    var d = c.getProperty("function");
+    this.editor.insertFunction = null != d ? mxUtils.bind(this, function() {
+      d.apply(this, arguments);
+      this.toolbar.resetMode()
+    }) : null
+  })), this.resetHandler = mxUtils.bind(this, function() {
+    null != this.toolbar && this.toolbar.resetMode(!0)
+  }), this.editor.graph.addListener(mxEvent.DOUBLE_CLICK, this.resetHandler), this.editor.addListener(mxEvent.ESCAPE,
+    this.resetHandler))
+};
+mxDefaultToolbar.prototype.addItem = function(a, b, c, d) {
+  var e = mxUtils.bind(this, function() {
+    null != c && 0 < c.length && this.editor.execute(c)
+  });
+  return this.toolbar.addItem(a, b, e, d)
+};
+mxDefaultToolbar.prototype.addSeparator = function(a) {
+  a = a || mxClient.imageBasePath + "/separator.gif";
+  this.toolbar.addSeparator(a)
+};
+mxDefaultToolbar.prototype.addCombo = function() {
+  return this.toolbar.addCombo()
+};
+mxDefaultToolbar.prototype.addActionCombo = function(a) {
+  return this.toolbar.addActionCombo(a)
+};
+mxDefaultToolbar.prototype.addActionOption = function(a, b, c) {
+  var d = mxUtils.bind(this, function() {
+    this.editor.execute(c)
+  });
+  this.addOption(a, b, d)
+};
+mxDefaultToolbar.prototype.addOption = function(a, b, c) {
+  return this.toolbar.addOption(a, b, c)
+};
+mxDefaultToolbar.prototype.addMode = function(a, b, c, d, e) {
+  var f = mxUtils.bind(this, function() {
+    this.editor.setMode(c);
+    null != e && e(this.editor)
+  });
+  return this.toolbar.addSwitchMode(a, b, f, d)
+};
+mxDefaultToolbar.prototype.addPrototype = function(a, b, c, d, e, f) {
+  var g = function() {
+      return "function" == typeof c ? c() : null != c ? c.clone() : null
+    },
+    h = mxUtils.bind(this, function(a, b) {
+      "function" == typeof e ? e(this.editor, g(), a, b) : this.drop(g(), a, b);
+      this.toolbar.resetMode();
+      mxEvent.consume(a)
+    });
+  a = this.toolbar.addMode(a, b, h, d, null, f);
+  this.installDropHandler(a, function(a, b, c) {
+    h(b, c)
+  });
+  return a
+};
+mxDefaultToolbar.prototype.drop = function(a, b, c) {
+  var d = this.editor.graph,
+    e = d.getModel();
+  if (null == c || e.isEdge(c) || !this.connectOnDrop || !d.isCellConnectable(c)) {
+    for (; null != c && !d.isValidDropTarget(c, [a], b);) c = e.getParent(c);
+    this.insert(a, b, c)
+  } else this.connect(a, b, c)
+};
+mxDefaultToolbar.prototype.insert = function(a, b, c) {
+  var d = this.editor.graph;
+  if (d.canImportCell(a)) {
+    var e = mxEvent.getClientX(b),
+      f = mxEvent.getClientY(b),
+      e = mxUtils.convertPoint(d.container, e, f);
+    return d.isSplitEnabled() && d.isSplitTarget(c, [a], b) ? d.splitEdge(c, [a], null, e.x, e.y) : this.editor.addVertex(c, a, e.x, e.y)
+  }
+  return null
+};
+mxDefaultToolbar.prototype.connect = function(a, b, c) {
+  b = this.editor.graph;
+  var d = b.getModel();
+  if (null != c && b.isCellConnectable(a) && b.isEdgeValid(null, c, a)) {
+    var e = null;
+    d.beginUpdate();
+    try {
+      var f = d.getGeometry(c),
+        g = d.getGeometry(a).clone();
+      g.x = f.x + (f.width - g.width) / 2;
+      g.y = f.y + (f.height - g.height) / 2;
+      var h = this.spacing * b.gridSize,
+        k = 20 * d.getDirectedEdgeCount(c, !0);
+      this.editor.horizontalFlow ? g.x += (g.width + f.width) / 2 + h + k : g.y += (g.height + f.height) / 2 + h + k;
+      a.setGeometry(g);
+      var l = d.getParent(c);
+      b.addCell(a, l);
+      b.constrainChild(a);
+      e = this.editor.createEdge(c, a);
+      if (null == d.getGeometry(e)) {
+        var m = new mxGeometry;
+        m.relative = !0;
+        d.setGeometry(e, m)
+      }
+      b.addEdge(e, l, c, a)
+    } finally {
+      d.endUpdate()
+    }
+    b.setSelectionCells([a, e]);
+    b.scrollCellToVisible(a)
+  }
+};
+mxDefaultToolbar.prototype.installDropHandler = function(a, b) {
+  var c = document.createElement("img");
+  c.setAttribute("src", a.getAttribute("src"));
+  var d = mxUtils.bind(this, function(e) {
+    c.style.width = 2 * a.offsetWidth + "px";
+    c.style.height = 2 * a.offsetHeight + "px";
+    mxUtils.makeDraggable(a, this.editor.graph, b, c);
+    mxEvent.removeListener(c, "load", d)
+  });
+  mxClient.IS_IE ? d() : mxEvent.addListener(c, "load", d)
+};
+mxDefaultToolbar.prototype.destroy = function() {
+  null != this.resetHandler && (this.editor.graph.removeListener("dblclick", this.resetHandler), this.editor.removeListener("escape", this.resetHandler), this.resetHandler = null);
+  null != this.toolbar && (this.toolbar.destroy(), this.toolbar = null)
+};
+
+function mxEditor(a) {
+  this.actions = [];
+  this.addActions();
+  if (null != document.body) {
+    this.cycleAttributeValues = [];
+    this.popupHandler = new mxDefaultPopupMenu;
+    this.undoManager = new mxUndoManager;
+    this.graph = this.createGraph();
+    this.toolbar = this.createToolbar();
+    this.keyHandler = new mxDefaultKeyHandler(this);
+    this.configure(a);
+    this.graph.swimlaneIndicatorColorAttribute = this.cycleAttributeName;
+    !mxClient.IS_LOCAL && null != this.urlInit && (this.session = this.createSession());
+    if (null != this.onInit) this.onInit();
+    mxClient.IS_IE &&
+      mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
+        this.destroy()
+      }))
+  }
+}
+mxLoadResources && mxResources.add(mxClient.basePath + "/resources/editor");
+mxEditor.prototype = new mxEventSource;
+mxEditor.prototype.constructor = mxEditor;
+mxEditor.prototype.askZoomResource = "none" != mxClient.language ? "askZoom" : "";
+mxEditor.prototype.lastSavedResource = "none" != mxClient.language ? "lastSaved" : "";
+mxEditor.prototype.currentFileResource = "none" != mxClient.language ? "currentFile" : "";
+mxEditor.prototype.propertiesResource = "none" != mxClient.language ? "properties" : "";
+mxEditor.prototype.tasksResource = "none" != mxClient.language ? "tasks" : "";
+mxEditor.prototype.helpResource = "none" != mxClient.language ? "help" : "";
+mxEditor.prototype.outlineResource = "none" != mxClient.language ? "outline" : "";
+mxEditor.prototype.outline = null;
+mxEditor.prototype.graph = null;
+mxEditor.prototype.graphRenderHint = null;
+mxEditor.prototype.toolbar = null;
+mxEditor.prototype.session = null;
+mxEditor.prototype.status = null;
+mxEditor.prototype.popupHandler = null;
+mxEditor.prototype.undoManager = null;
+mxEditor.prototype.keyHandler = null;
+mxEditor.prototype.actions = null;
+mxEditor.prototype.dblClickAction = "edit";
+mxEditor.prototype.swimlaneRequired = !1;
+mxEditor.prototype.disableContextMenu = !0;
+mxEditor.prototype.insertFunction = null;
+mxEditor.prototype.forcedInserting = !1;
+mxEditor.prototype.templates = null;
+mxEditor.prototype.defaultEdge = null;
+mxEditor.prototype.defaultEdgeStyle = null;
+mxEditor.prototype.defaultGroup = null;
+mxEditor.prototype.groupBorderSize = null;
+mxEditor.prototype.filename = null;
+mxEditor.prototype.linefeed = "\x26#xa;";
+mxEditor.prototype.postParameterName = "xml";
+mxEditor.prototype.escapePostData = !0;
+mxEditor.prototype.urlPost = null;
+mxEditor.prototype.urlImage = null;
+mxEditor.prototype.urlInit = null;
+mxEditor.prototype.urlNotify = null;
+mxEditor.prototype.urlPoll = null;
+mxEditor.prototype.horizontalFlow = !1;
+mxEditor.prototype.layoutDiagram = !1;
+mxEditor.prototype.swimlaneSpacing = 0;
+mxEditor.prototype.maintainSwimlanes = !1;
+mxEditor.prototype.layoutSwimlanes = !1;
+mxEditor.prototype.cycleAttributeValues = null;
+mxEditor.prototype.cycleAttributeIndex = 0;
+mxEditor.prototype.cycleAttributeName = "fillColor";
+mxEditor.prototype.tasks = null;
+mxEditor.prototype.tasksWindowImage = null;
+mxEditor.prototype.tasksTop = 20;
+mxEditor.prototype.help = null;
+mxEditor.prototype.helpWindowImage = null;
+mxEditor.prototype.urlHelp = null;
+mxEditor.prototype.helpWidth = 300;
+mxEditor.prototype.helpHeight = 260;
+mxEditor.prototype.propertiesWidth = 240;
+mxEditor.prototype.propertiesHeight = null;
+mxEditor.prototype.movePropertiesDialog = !1;
+mxEditor.prototype.validating = !1;
+mxEditor.prototype.modified = !1;
+mxEditor.prototype.isModified = function() {
+  return this.modified
+};
+mxEditor.prototype.setModified = function(a) {
+  this.modified = a
+};
+mxEditor.prototype.addActions = function() {
+  this.addAction("save", function(a) {
+    a.save()
+  });
+  this.addAction("print", function(a) {
+    (new mxPrintPreview(a.graph, 1)).open()
+  });
+  this.addAction("show", function(a) {
+    mxUtils.show(a.graph, null, 10, 10)
+  });
+  this.addAction("exportImage", function(a) {
+    var b = a.getUrlImage();
+    if (null == b || mxClient.IS_LOCAL) a.execute("show");
+    else {
+      var c = mxUtils.getViewXml(a.graph, 1),
+        c = mxUtils.getXml(c, "\n");
+      mxUtils.submit(b, a.postParameterName + "\x3d" + encodeURIComponent(c), document, "_blank")
+    }
+  });
+  this.addAction("refresh",
+    function(a) {
+      a.graph.refresh()
+    });
+  this.addAction("cut", function(a) {
+    a.graph.isEnabled() && mxClipboard.cut(a.graph)
+  });
+  this.addAction("copy", function(a) {
+    a.graph.isEnabled() && mxClipboard.copy(a.graph)
+  });
+  this.addAction("paste", function(a) {
+    a.graph.isEnabled() && mxClipboard.paste(a.graph)
+  });
+  this.addAction("delete", function(a) {
+    a.graph.isEnabled() && a.graph.removeCells()
+  });
+  this.addAction("group", function(a) {
+    a.graph.isEnabled() && a.graph.setSelectionCell(a.groupCells())
+  });
+  this.addAction("ungroup", function(a) {
+    a.graph.isEnabled() &&
+      a.graph.setSelectionCells(a.graph.ungroupCells())
+  });
+  this.addAction("removeFromParent", function(a) {
+    a.graph.isEnabled() && a.graph.removeCellsFromParent()
+  });
+  this.addAction("undo", function(a) {
+    a.graph.isEnabled() && a.undo()
+  });
+  this.addAction("redo", function(a) {
+    a.graph.isEnabled() && a.redo()
+  });
+  this.addAction("zoomIn", function(a) {
+    a.graph.zoomIn()
+  });
+  this.addAction("zoomOut", function(a) {
+    a.graph.zoomOut()
+  });
+  this.addAction("actualSize", function(a) {
+    a.graph.zoomActual()
+  });
+  this.addAction("fit", function(a) {
+    a.graph.fit()
+  });
+  this.addAction("showProperties", function(a, b) {
+    a.showProperties(b)
+  });
+  this.addAction("selectAll", function(a) {
+    a.graph.isEnabled() && a.graph.selectAll()
+  });
+  this.addAction("selectNone", function(a) {
+    a.graph.isEnabled() && a.graph.clearSelection()
+  });
+  this.addAction("selectVertices", function(a) {
+    a.graph.isEnabled() && a.graph.selectVertices()
+  });
+  this.addAction("selectEdges", function(a) {
+    a.graph.isEnabled() && a.graph.selectEdges()
+  });
+  this.addAction("edit", function(a, b) {
+    a.graph.isEnabled() && a.graph.isCellEditable(b) && a.graph.startEditingAtCell(b)
+  });
+  this.addAction("toBack", function(a, b) {
+    a.graph.isEnabled() && a.graph.orderCells(!0)
+  });
+  this.addAction("toFront", function(a, b) {
+    a.graph.isEnabled() && a.graph.orderCells(!1)
+  });
+  this.addAction("enterGroup", function(a, b) {
+    a.graph.enterGroup(b)
+  });
+  this.addAction("exitGroup", function(a) {
+    a.graph.exitGroup()
+  });
+  this.addAction("home", function(a) {
+    a.graph.home()
+  });
+  this.addAction("selectPrevious", function(a) {
+    a.graph.isEnabled() && a.graph.selectPreviousCell()
+  });
+  this.addAction("selectNext", function(a) {
+    a.graph.isEnabled() &&
+      a.graph.selectNextCell()
+  });
+  this.addAction("selectParent", function(a) {
+    a.graph.isEnabled() && a.graph.selectParentCell()
+  });
+  this.addAction("selectChild", function(a) {
+    a.graph.isEnabled() && a.graph.selectChildCell()
+  });
+  this.addAction("collapse", function(a) {
+    a.graph.isEnabled() && a.graph.foldCells(!0)
+  });
+  this.addAction("collapseAll", function(a) {
+    if (a.graph.isEnabled()) {
+      var b = a.graph.getChildVertices();
+      a.graph.foldCells(!0, !1, b)
+    }
+  });
+  this.addAction("expand", function(a) {
+    a.graph.isEnabled() && a.graph.foldCells(!1)
+  });
+  this.addAction("expandAll", function(a) {
+    if (a.graph.isEnabled()) {
+      var b = a.graph.getChildVertices();
+      a.graph.foldCells(!1, !1, b)
+    }
+  });
+  this.addAction("bold", function(a) {
+    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_BOLD)
+  });
+  this.addAction("italic", function(a) {
+    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_ITALIC)
+  });
+  this.addAction("underline", function(a) {
+    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+      mxConstants.FONT_UNDERLINE)
+  });
+  this.addAction("shadow", function(a) {
+    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_SHADOW)
+  });
+  this.addAction("alignCellsLeft", function(a) {
+    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_LEFT)
+  });
+  this.addAction("alignCellsCenter", function(a) {
+    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_CENTER)
+  });
+  this.addAction("alignCellsRight", function(a) {
+    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_RIGHT)
+  });
+  this.addAction("alignCellsTop", function(a) {
+    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_TOP)
+  });
+  this.addAction("alignCellsMiddle", function(a) {
+    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_MIDDLE)
+  });
+  this.addAction("alignCellsBottom", function(a) {
+    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_BOTTOM)
+  });
+  this.addAction("alignFontLeft", function(a) {
+    a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT)
+  });
+  this.addAction("alignFontCenter", function(a) {
+    a.graph.isEnabled() &&
+      a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER)
+  });
+  this.addAction("alignFontRight", function(a) {
+    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_RIGHT)
+  });
+  this.addAction("alignFontTop", function(a) {
+    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_TOP)
+  });
+  this.addAction("alignFontMiddle", function(a) {
+    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE)
+  });
+  this.addAction("alignFontBottom", function(a) {
+    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_BOTTOM)
+  });
+  this.addAction("zoom", function(a) {
+    var b = 100 * a.graph.getView().scale,
+      b = parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource) || a.askZoomResource, b)) / 100;
+    isNaN(b) || a.graph.getView().setScale(b)
+  });
+  this.addAction("toggleTasks", function(a) {
+    null != a.tasks ? a.tasks.setVisible(!a.tasks.isVisible()) : a.showTasks()
+  });
+  this.addAction("toggleHelp", function(a) {
+    null !=
+      a.help ? a.help.setVisible(!a.help.isVisible()) : a.showHelp()
+  });
+  this.addAction("toggleOutline", function(a) {
+    null == a.outline ? a.showOutline() : a.outline.setVisible(!a.outline.isVisible())
+  });
+  this.addAction("toggleConsole", function(a) {
+    mxLog.setVisible(!mxLog.isVisible())
+  })
+};
+mxEditor.prototype.createSession = function() {
+  var a = mxUtils.bind(this, function(a) {
+    this.fireEvent(new mxEventObject(mxEvent.SESSION, "session", a))
+  });
+  return this.connect(this.urlInit, this.urlPoll, this.urlNotify, a)
+};
+mxEditor.prototype.configure = function(a) {
+  null != a && ((new mxCodec(a.ownerDocument)).decode(a, this), this.resetHistory())
+};
+mxEditor.prototype.resetFirstTime = function() {
+  document.cookie = "mxgraph\x3dseen; expires\x3dFri, 27 Jul 2001 02:47:11 UTC; path\x3d/"
+};
+mxEditor.prototype.resetHistory = function() {
+  this.lastSnapshot = (new Date).getTime();
+  this.undoManager.clear();
+  this.ignoredChanges = 0;
+  this.setModified(!1)
+};
+mxEditor.prototype.addAction = function(a, b) {
+  this.actions[a] = b
+};
+mxEditor.prototype.execute = function(a, b, c) {
+  var d = this.actions[a];
+  if (null != d) try {
+    var e = arguments;
+    e[0] = this;
+    d.apply(this, e)
+  } catch (f) {
+    throw mxUtils.error("Cannot execute " + a + ": " + f.message, 280, !0), f;
+  } else mxUtils.error("Cannot find action " + a, 280, !0)
+};
+mxEditor.prototype.addTemplate = function(a, b) {
+  this.templates[a] = b
+};
+mxEditor.prototype.getTemplate = function(a) {
+  return this.templates[a]
+};
+mxEditor.prototype.createGraph = function() {
+  var a = new mxGraph(null, null, this.graphRenderHint);
+  a.setTooltips(!0);
+  a.setPanning(!0);
+  this.installDblClickHandler(a);
+  this.installUndoHandler(a);
+  this.installDrillHandler(a);
+  this.installChangeHandler(a);
+  this.installInsertHandler(a);
+  a.panningHandler.factoryMethod = mxUtils.bind(this, function(a, c, d) {
+    return this.createPopupMenu(a, c, d)
+  });
+  a.connectionHandler.factoryMethod = mxUtils.bind(this, function(a, c) {
+    return this.createEdge(a, c)
+  });
+  this.createSwimlaneManager(a);
+  this.createLayoutManager(a);
+  return a
+};
+mxEditor.prototype.createSwimlaneManager = function(a) {
+  a = new mxSwimlaneManager(a, !1);
+  a.isHorizontal = mxUtils.bind(this, function() {
+    return this.horizontalFlow
+  });
+  a.isEnabled = mxUtils.bind(this, function() {
+    return this.maintainSwimlanes
+  });
+  return a
+};
+mxEditor.prototype.createLayoutManager = function(a) {
+  var b = new mxLayoutManager(a),
+    c = this;
+  b.getLayout = function(b) {
+    var e = null,
+      f = c.graph.getModel();
+    if (null != f.getParent(b))
+      if (c.layoutSwimlanes && a.isSwimlane(b)) null == c.swimlaneLayout && (c.swimlaneLayout = c.createSwimlaneLayout()), e = c.swimlaneLayout;
+      else if (c.layoutDiagram && (a.isValidRoot(b) || null == f.getParent(f.getParent(b)))) null == c.diagramLayout && (c.diagramLayout = c.createDiagramLayout()), e = c.diagramLayout;
+    return e
+  };
+  return b
+};
+mxEditor.prototype.setGraphContainer = function(a) {
+  null == this.graph.container && (this.graph.init(a), this.rubberband = new mxRubberband(this.graph), this.disableContextMenu && mxEvent.disableContextMenu(a), mxClient.IS_QUIRKS && new mxDivResizer(
+    a))
+};
+mxEditor.prototype.installDblClickHandler = function(a) {
+  a.addListener(mxEvent.DOUBLE_CLICK, mxUtils.bind(this, function(b, c) {
+    var d = c.getProperty("cell");
+    null != d && (a.isEnabled() && null != this.dblClickAction) && (this.execute(this.dblClickAction, d), c.consume())
+  }))
+};
+mxEditor.prototype.installUndoHandler = function(a) {
+  var b = mxUtils.bind(this, function(a, b) {
+    var e = b.getProperty("edit");
+    this.undoManager.undoableEditHappened(e)
+  });
+  a.getModel().addListener(mxEvent.UNDO, b);
+  a.getView().addListener(mxEvent.UNDO, b);
+  b = function(b, d) {
+    var e = d.getProperty("edit").changes;
+    a.setSelectionCells(a.getSelectionCellsForChanges(e))
+  };
+  this.undoManager.addListener(mxEvent.UNDO, b);
+  this.undoManager.addListener(mxEvent.REDO, b)
+};
+mxEditor.prototype.installDrillHandler = function(a) {
+  var b = mxUtils.bind(this, function(a) {
+    this.fireEvent(new mxEventObject(mxEvent.ROOT))
+  });
+  a.getView().addListener(mxEvent.DOWN, b);
+  a.getView().addListener(mxEvent.UP, b)
+};
+mxEditor.prototype.installChangeHandler = function(a) {
+  var b = mxUtils.bind(this, function(b, d) {
+    this.setModified(!0);
+    !0 == this.validating && a.validateGraph();
+    for (var e = d.getProperty("edit").changes, f = 0; f < e.length; f++) {
+      var g = e[f];
+      if (g instanceof mxRootChange || g instanceof mxValueChange && g.cell == this.graph.model.root || g instanceof mxCellAttributeChange && g.cell == this.graph.model.root) {
+        this.fireEvent(new mxEventObject(mxEvent.ROOT));
+        break
+      }
+    }
+  });
+  a.getModel().addListener(mxEvent.CHANGE, b)
+};
+mxEditor.prototype.installInsertHandler = function(a) {
+  var b = this;
+  a.addMouseListener({
+    mouseDown: function(a, d) {
+      if (null != b.insertFunction && !d.isPopupTrigger() && (b.forcedInserting || null == d.getState())) b.graph.clearSelection(), b.insertFunction(d.getEvent(), d.getCell()), this.isActive = !
+        0, d.consume()
+    },
+    mouseMove: function(a, b) {
+      this.isActive && b.consume()
+    },
+    mouseUp: function(a, b) {
+      this.isActive && (this.isActive = !1, b.consume())
+    }
+  })
+};
+mxEditor.prototype.createDiagramLayout = function() {
+  var a = this.graph.gridSize,
+    b = new mxStackLayout(this.graph, !this.horizontalFlow, this.swimlaneSpacing, 2 * a, 2 * a);
+  b.isVertexIgnored = function(a) {
+    return !b.graph.isSwimlane(a)
+  };
+  return b
+};
+mxEditor.prototype.createSwimlaneLayout = function() {
+  return new mxCompactTreeLayout(this.graph, this.horizontalFlow)
+};
+mxEditor.prototype.createToolbar = function() {
+  return new mxDefaultToolbar(null, this)
+};
+mxEditor.prototype.setToolbarContainer = function(a) {
+  this.toolbar.init(a);
+  mxClient.IS_QUIRKS && new mxDivResizer(a)
+};
+mxEditor.prototype.setStatusContainer = function(a) {
+  null == this.status && (this.status = a, this.addListener(mxEvent.SAVE, mxUtils.bind(this, function() {
+    var a = (new Date).toLocaleString();
+    this.setStatus((mxResources.get(this.lastSavedResource) || this.lastSavedResource) + ": " + a)
+  })), this.addListener(mxEvent.OPEN, mxUtils.bind(this, function() {
+    this.setStatus((mxResources.get(this.currentFileResource) || this.currentFileResource) + ": " + this.filename)
+  })), mxClient.IS_QUIRKS && new mxDivResizer(a))
+};
+mxEditor.prototype.setStatus = function(a) {
+  null != this.status && null != a && (this.status.innerHTML = a)
+};
+mxEditor.prototype.setTitleContainer = function(a) {
+  this.addListener(mxEvent.ROOT, mxUtils.bind(this, function(b) {
+    a.innerHTML = this.getTitle()
+  }));
+  mxClient.IS_QUIRKS && new mxDivResizer(a)
+};
+mxEditor.prototype.treeLayout = function(a, b) {
+  null != a && (new mxCompactTreeLayout(this.graph, b)).execute(a)
+};
+mxEditor.prototype.getTitle = function() {
+  for (var a = "", b = this.graph, c = b.getCurrentRoot(); null != c && null != b.getModel().getParent(b.getModel().getParent(c));) b.isValidRoot(c) && (a = " \x3e " + b.convertValueToString(c) + a),
+    c = b.getModel().getParent(c);
+  return this.getRootTitle() + a
+};
+mxEditor.prototype.getRootTitle = function() {
+  var a = this.graph.getModel().getRoot();
+  return this.graph.convertValueToString(a)
+};
+mxEditor.prototype.undo = function() {
+  this.undoManager.undo()
+};
+mxEditor.prototype.redo = function() {
+  this.undoManager.redo()
+};
+mxEditor.prototype.groupCells = function() {
+  var a = null != this.groupBorderSize ? this.groupBorderSize : this.graph.gridSize;
+  return this.graph.groupCells(this.createGroup(), a)
+};
+mxEditor.prototype.createGroup = function() {
+  return this.graph.getModel().cloneCell(this.defaultGroup)
+};
+mxEditor.prototype.open = function(a) {
+  if (null != a) {
+    var b = mxUtils.load(a).getXml();
+    this.readGraphModel(b.documentElement);
+    this.filename = a;
+    this.fireEvent(new mxEventObject(mxEvent.OPEN, "filename", a))
+  }
+};
+mxEditor.prototype.readGraphModel = function(a) {
+  (new mxCodec(a.ownerDocument)).decode(a, this.graph.getModel());
+  this.resetHistory()
+};
+mxEditor.prototype.save = function(a, b) {
+  a = a || this.getUrlPost();
+  if (null != a && 0 < a.length) {
+    var c = this.writeGraphModel(b);
+    this.postDiagram(a, c);
+    this.setModified(!1)
+  }
+  this.fireEvent(new mxEventObject(mxEvent.SAVE, "url", a))
+};
+mxEditor.prototype.postDiagram = function(a, b) {
+  this.escapePostData && (b = encodeURIComponent(b));
+  mxUtils.post(a, this.postParameterName + "\x3d" + b, mxUtils.bind(this, function(c) {
+    this.fireEvent(new mxEventObject(mxEvent.POST, "request", c, "url", a, "data", b))
+  }))
+};
+mxEditor.prototype.writeGraphModel = function(a) {
+  a = null != a ? a : this.linefeed;
+  var b = (new mxCodec).encode(this.graph.getModel());
+  return mxUtils.getXml(b, a)
+};
+mxEditor.prototype.getUrlPost = function() {
+  return this.urlPost
+};
+mxEditor.prototype.getUrlImage = function() {
+  return this.urlImage
+};
+mxEditor.prototype.connect = function(a, b, c, d) {
+  var e = null;
+  mxClient.IS_LOCAL || (e = new mxSession(this.graph.getModel(), a, b, c), e.addListener(mxEvent.RECEIVE, mxUtils.bind(this, function(a, b) {
+    null != b.getProperty("node").getAttribute("namespace") && this.resetHistory()
+  })), e.addListener(mxEvent.DISCONNECT, d), e.addListener(mxEvent.CONNECT, d), e.addListener(mxEvent.NOTIFY, d), e.addListener(mxEvent.GET, d), e.start());
+  return e
+};
+mxEditor.prototype.swapStyles = function(a, b) {
+  var c = this.graph.getStylesheet().styles[b];
+  this.graph.getView().getStylesheet().putCellStyle(b, this.graph.getStylesheet().styles[a]);
+  this.graph.getStylesheet().putCellStyle(a, c);
+  this.graph.refresh()
+};
+mxEditor.prototype.showProperties = function(a) {
+  a = a || this.graph.getSelectionCell();
+  null == a && (a = this.graph.getCurrentRoot(), null == a && (a = this.graph.getModel().getRoot()));
+  if (null != a) {
+    this.graph.stopEditing(!0);
+    var b = mxUtils.getOffset(this.graph.container),
+      c = b.x + 10,
+      b = b.y;
+    if (null != this.properties && !this.movePropertiesDialog) c = this.properties.getX(), b = this.properties.getY();
+    else {
+      var d = this.graph.getCellBounds(a);
+      null != d && (c += d.x + Math.min(200, d.width), b += d.y)
+    }
+    this.hideProperties();
+    a = this.createProperties(a);
+    null != a && (this.properties = new mxWindow(mxResources.get(this.propertiesResource) || this.propertiesResource, a, c, b, this.propertiesWidth, this.propertiesHeight, !1), this.properties.setVisible(!
+      0))
+  }
+};
+mxEditor.prototype.isPropertiesVisible = function() {
+  return null != this.properties
+};
+mxEditor.prototype.createProperties = function(a) {
+  var b = this.graph.getModel(),
+    c = b.getValue(a);
+  if (mxUtils.isNode(c)) {
+    var d = new mxForm("properties");
+    d.addText("ID", a.getId()).setAttribute("readonly", "true");
+    var e = null,
+      f = null,
+      g = null,
+      h = null,
+      k = null;
+    b.isVertex(a) && (e = b.getGeometry(a), null != e && (f = d.addText("top", e.y), g = d.addText("left", e.x), h = d.addText("width", e.width), k = d.addText("height", e.height)));
+    for (var l = b.getStyle(a), m = d.addText("Style", l || ""), n = c.attributes, p = [], c = 0; c < n.length; c++) p[c] = d.addTextarea(n[c].nodeName,
+      n[c].nodeValue, "label" == n[c].nodeName ? 4 : 2);
+    c = mxUtils.bind(this, function() {
+      this.hideProperties();
+      b.beginUpdate();
+      try {
+        null != e && (e = e.clone(), e.x = parseFloat(g.value), e.y = parseFloat(f.value), e.width = parseFloat(h.value), e.height = parseFloat(k.value), b.setGeometry(a, e));
+        0 < m.value.length ? b.setStyle(a, m.value) : b.setStyle(a, null);
+        for (var c = 0; c < n.length; c++) {
+          var d = new mxCellAttributeChange(a, n[c].nodeName, p[c].value);
+          b.execute(d)
+        }
+        this.graph.isAutoSizeCell(a) && this.graph.updateCellSize(a)
+      } finally {
+        b.endUpdate()
+      }
+    });
+    l = mxUtils.bind(this, function() {
+      this.hideProperties()
+    });
+    d.addButtons(c, l);
+    return d.table
+  }
+  return null
+};
+mxEditor.prototype.hideProperties = function() {
+  null != this.properties && (this.properties.destroy(), this.properties = null)
+};
+mxEditor.prototype.showTasks = function() {
+  if (null == this.tasks) {
+    var a = document.createElement("div");
+    a.style.padding = "4px";
+    a.style.paddingLeft = "20px";
+    var b = document.body.clientWidth,
+      b = new mxWindow(mxResources.get(this.tasksResource) || this.tasksResource, a, b - 220, this.tasksTop, 200);
+    b.setClosable(!0);
+    b.destroyOnClose = !1;
+    var c = mxUtils.bind(this, function(b) {
+      mxEvent.release(a);
+      a.innerHTML = "";
+      this.createTasks(a)
+    });
+    this.graph.getModel().addListener(mxEvent.CHANGE, c);
+    this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+      c);
+    this.graph.addListener(mxEvent.ROOT, c);
+    null != this.tasksWindowImage && b.setImage(this.tasksWindowImage);
+    this.tasks = b;
+    this.createTasks(a)
+  }
+  this.tasks.setVisible(!0)
+};
+mxEditor.prototype.refreshTasks = function(a) {
+  null != this.tasks && (a = this.tasks.content, mxEvent.release(a), a.innerHTML = "", this.createTasks(a))
+};
+mxEditor.prototype.createTasks = function(a) {};
+mxEditor.prototype.showHelp = function(a) {
+  if (null == this.help) {
+    var b = document.createElement("iframe");
+    b.setAttribute("src", mxResources.get("urlHelp") || this.urlHelp);
+    b.setAttribute("height", "100%");
+    b.setAttribute("width", "100%");
+    b.setAttribute("frameBorder", "0");
+    b.style.backgroundColor = "white";
+    a = document.body.clientWidth;
+    var c = document.body.clientHeight || document.documentElement.clientHeight,
+      d = new mxWindow(mxResources.get(this.helpResource) || this.helpResource, b, (a - this.helpWidth) / 2, (c - this.helpHeight) /
+        3, this.helpWidth, this.helpHeight);
+    d.setMaximizable(!0);
+    d.setClosable(!0);
+    d.destroyOnClose = !1;
+    d.setResizable(!0);
+    null != this.helpWindowImage && d.setImage(this.helpWindowImage);
+    mxClient.IS_NS && (a = function(a) {
+      b.setAttribute("height", d.div.offsetHeight - 26 + "px")
+    }, d.addListener(mxEvent.RESIZE_END, a), d.addListener(mxEvent.MAXIMIZE, a), d.addListener(mxEvent.NORMALIZE, a), d.addListener(mxEvent.SHOW, a));
+    this.help = d
+  }
+  this.help.setVisible(!0)
+};
+mxEditor.prototype.showOutline = function() {
+  if (null == this.outline) {
+    var a = document.createElement("div");
+    a.style.overflow = "hidden";
+    a.style.width = "100%";
+    a.style.height = "100%";
+    a.style.background = "white";
+    a.style.cursor = "move";
+    var b = new mxWindow(mxResources.get(this.outlineResource) || this.outlineResource, a, 600, 480, 200, 200, !1),
+      c = new mxOutline(this.graph, a);
+    b.setClosable(!0);
+    b.setResizable(!0);
+    b.destroyOnClose = !1;
+    b.addListener(mxEvent.RESIZE_END, function() {
+      c.update()
+    });
+    this.outline = b;
+    this.outline.outline = c
+  }
+  this.outline.setVisible(!0);
+  this.outline.outline.update(!0)
+};
+mxEditor.prototype.setMode = function(a) {
+  "select" == a ? (this.graph.panningHandler.useLeftButtonForPanning = !1, this.graph.setConnectable(!1)) : "connect" == a ? (this.graph.panningHandler.useLeftButtonForPanning = !1, this.graph.setConnectable(!
+    0)) : "pan" == a && (this.graph.panningHandler.useLeftButtonForPanning = !0, this.graph.setConnectable(!1))
+};
+mxEditor.prototype.createPopupMenu = function(a, b, c) {
+  this.popupHandler.createMenu(this, a, b, c)
+};
+mxEditor.prototype.createEdge = function(a, b) {
+  var c = null;
+  if (null != this.defaultEdge) c = this.graph.getModel().cloneCell(this.defaultEdge);
+  else {
+    c = new mxCell("");
+    c.setEdge(!0);
+    var d = new mxGeometry;
+    d.relative = !0;
+    c.setGeometry(d)
+  }
+  d = this.getEdgeStyle();
+  null != d && c.setStyle(d);
+  return c
+};
+mxEditor.prototype.getEdgeStyle = function() {
+  return this.defaultEdgeStyle
+};
+mxEditor.prototype.consumeCycleAttribute = function(a) {
+  return null != this.cycleAttributeValues && 0 < this.cycleAttributeValues.length && this.graph.isSwimlane(a) ? this.cycleAttributeValues[this.cycleAttributeIndex++ % this.cycleAttributeValues.length] :
+    null
+};
+mxEditor.prototype.cycleAttribute = function(a) {
+  if (null != this.cycleAttributeName) {
+    var b = this.consumeCycleAttribute(a);
+    null != b && a.setStyle(a.getStyle() + ";" + this.cycleAttributeName + "\x3d" + b)
+  }
+};
+mxEditor.prototype.addVertex = function(a, b, c, d) {
+  for (var e = this.graph.getModel(); null != a && !this.graph.isValidDropTarget(a);) a = e.getParent(a);
+  a = null != a ? a : this.graph.getSwimlaneAt(c, d);
+  var f = this.graph.getView().scale,
+    g = e.getGeometry(b),
+    h = e.getGeometry(a);
+  if (this.graph.isSwimlane(b) && !this.graph.swimlaneNesting) a = null;
+  else {
+    if (null == a && this.swimlaneRequired) return null;
+    if (null != a && null != h) {
+      var k = this.graph.getView().getState(a);
+      if (null != k) {
+        if (c -= k.origin.x * f, d -= k.origin.y * f, this.graph.isConstrainedMoving) {
+          var h =
+            g.width,
+            l = g.height,
+            m = k.x + k.width;
+          c + h > m && (c -= c + h - m);
+          m = k.y + k.height;
+          d + l > m && (d -= d + l - m)
+        }
+      } else null != h && (c -= h.x * f, d -= h.y * f)
+    }
+  }
+  g = g.clone();
+  g.x = this.graph.snap(c / f - this.graph.getView().translate.x - this.graph.gridSize / 2);
+  g.y = this.graph.snap(d / f - this.graph.getView().translate.y - this.graph.gridSize / 2);
+  b.setGeometry(g);
+  null == a && (a = this.graph.getDefaultParent());
+  this.cycleAttribute(b);
+  this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX, "vertex", b, "parent", a));
+  e.beginUpdate();
+  try {
+    b = this.graph.addCell(b,
+      a), null != b && (this.graph.constrainChild(b), this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX, "vertex", b)))
+  } finally {
+    e.endUpdate()
+  }
+  null != b && (this.graph.setSelectionCell(b), this.graph.scrollCellToVisible(b), this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX, "vertex", b)));
+  return b
+};
+mxEditor.prototype.destroy = function() {
+  this.destroyed || (this.destroyed = !0, null != this.tasks && this.tasks.destroy(), null != this.outline && this.outline.destroy(), null != this.properties && this.properties.destroy(), null !=
+    this.keyHandler && this.keyHandler.destroy(), null != this.rubberband && this.rubberband.destroy(), null != this.toolbar && this.toolbar.destroy(), null != this.graph && this.graph.destroy(),
+    this.templates = this.status = null)
+};
+var mxCodecRegistry = {
+  codecs: [],
+  aliases: [],
+  register: function(a) {
+    if (null != a) {
+      var b = a.getName();
+      mxCodecRegistry.codecs[b] = a;
+      var c = mxUtils.getFunctionName(a.template.constructor);
+      c != b && mxCodecRegistry.addAlias(c, b)
+    }
+    return a
+  },
+  addAlias: function(a, b) {
+    mxCodecRegistry.aliases[a] = b
+  },
+  getCodec: function(a) {
+    var b = null;
+    if (null != a) {
+      var b = mxUtils.getFunctionName(a),
+        c = mxCodecRegistry.aliases[b];
+      null != c && (b = c);
+      b = mxCodecRegistry.codecs[b];
+      if (null == b) try {
+        b = new mxObjectCodec(new a), mxCodecRegistry.register(b)
+      } catch (d) {}
+    }
+    return b
+  }
+};
+
+function mxCodec(a) {
+  this.document = a || mxUtils.createXmlDocument();
+  this.objects = []
+}
+mxCodec.prototype.document = null;
+mxCodec.prototype.objects = null;
+mxCodec.prototype.encodeDefaults = !1;
+mxCodec.prototype.putObject = function(a, b) {
+  return this.objects[a] = b
+};
+mxCodec.prototype.getObject = function(a) {
+  var b = null;
+  null != a && (b = this.objects[a], null == b && (b = this.lookup(a), null == b && (a = this.getElementById(a), null != a && (b = this.decode(a)))));
+  return b
+};
+mxCodec.prototype.lookup = function(a) {
+  return null
+};
+mxCodec.prototype.getElementById = function(a, b) {
+  return mxUtils.findNodeByAttribute(this.document.documentElement, null != b ? b : "id", a)
+};
+mxCodec.prototype.getId = function(a) {
+  var b = null;
+  null != a && (b = this.reference(a), null == b && a instanceof mxCell && (b = a.getId(), null == b && (b = mxCellPath.create(a), 0 == b.length && (b = "root"))));
+  return b
+};
+mxCodec.prototype.reference = function(a) {
+  return null
+};
+mxCodec.prototype.encode = function(a) {
+  var b = null;
+  if (null != a && null != a.constructor) {
+    var c = mxCodecRegistry.getCodec(a.constructor);
+    null != c ? b = c.encode(this, a) : mxUtils.isNode(a) ? b = mxClient.IS_IE ? a.cloneNode(!0) : this.document.importNode(a, !0) : mxLog.warn("mxCodec.encode: No codec for " + mxUtils.getFunctionName(
+      a.constructor))
+  }
+  return b
+};
+mxCodec.prototype.decode = function(a, b) {
+  var c = null;
+  if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) {
+    var d = null;
+    try {
+      d = eval(a.nodeName)
+    } catch (e) {}
+    try {
+      var f = mxCodecRegistry.getCodec(d);
+      null != f ? c = f.decode(this, a, b) : (c = a.cloneNode(!0), c.removeAttribute("as"))
+    } catch (g) {
+      mxLog.debug("Cannot decode " + a.nodeName + ": " + g.message)
+    }
+  }
+  return c
+};
+mxCodec.prototype.encodeCell = function(a, b, c) {
+  b.appendChild(this.encode(a));
+  if (null == c || c) {
+    c = a.getChildCount();
+    for (var d = 0; d < c; d++) this.encodeCell(a.getChildAt(d), b)
+  }
+};
+mxCodec.prototype.isCellCodec = function(a) {
+  return null != a && "function" == typeof a.isCellCodec ? a.isCellCodec() : !1
+};
+mxCodec.prototype.decodeCell = function(a, b) {
+  b = null != b ? b : !0;
+  var c = null;
+  if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) {
+    c = mxCodecRegistry.getCodec(a.nodeName);
+    if (!this.isCellCodec(c))
+      for (var d = a.firstChild; null != d && !this.isCellCodec(c);) c = mxCodecRegistry.getCodec(d.nodeName), d = d.nextSibling;
+    this.isCellCodec(c) || (c = mxCodecRegistry.getCodec(mxCell));
+    c = c.decode(this, a);
+    b && this.insertIntoGraph(c)
+  }
+  return c
+};
+mxCodec.prototype.insertIntoGraph = function(a) {
+  var b = a.parent,
+    c = a.getTerminal(!0),
+    d = a.getTerminal(!1);
+  a.setTerminal(null, !1);
+  a.setTerminal(null, !0);
+  a.parent = null;
+  null != b && b.insert(a);
+  null != c && c.insertEdge(a, !0);
+  null != d && d.insertEdge(a, !1)
+};
+mxCodec.prototype.setAttribute = function(a, b, c) {
+  null != b && null != c && a.setAttribute(b, c)
+};
+
+function mxObjectCodec(a, b, c, d) {
+  this.template = a;
+  this.exclude = null != b ? b : [];
+  this.idrefs = null != c ? c : [];
+  this.mapping = null != d ? d : [];
+  this.reverse = {};
+  for (var e in this.mapping) this.reverse[this.mapping[e]] = e
+}
+mxObjectCodec.prototype.template = null;
+mxObjectCodec.prototype.exclude = null;
+mxObjectCodec.prototype.idrefs = null;
+mxObjectCodec.prototype.mapping = null;
+mxObjectCodec.prototype.reverse = null;
+mxObjectCodec.prototype.getName = function() {
+  return mxUtils.getFunctionName(this.template.constructor)
+};
+mxObjectCodec.prototype.cloneTemplate = function() {
+  return new this.template.constructor
+};
+mxObjectCodec.prototype.getFieldName = function(a) {
+  if (null != a) {
+    var b = this.reverse[a];
+    null != b && (a = b)
+  }
+  return a
+};
+mxObjectCodec.prototype.getAttributeName = function(a) {
+  if (null != a) {
+    var b = this.mapping[a];
+    null != b && (a = b)
+  }
+  return a
+};
+mxObjectCodec.prototype.isExcluded = function(a, b, c, d) {
+  return b == mxObjectIdentity.FIELD_NAME || 0 <= mxUtils.indexOf(this.exclude, b)
+};
+mxObjectCodec.prototype.isReference = function(a, b, c, d) {
+  return 0 <= mxUtils.indexOf(this.idrefs, b)
+};
+mxObjectCodec.prototype.encode = function(a, b) {
+  var c = a.document.createElement(this.getName());
+  b = this.beforeEncode(a, b, c);
+  this.encodeObject(a, b, c);
+  return this.afterEncode(a, b, c)
+};
+mxObjectCodec.prototype.encodeObject = function(a, b, c) {
+  a.setAttribute(c, "id", a.getId(b));
+  for (var d in b) {
+    var e = d,
+      f = b[e];
+    null != f && !this.isExcluded(b, e, f, !0) && (mxUtils.isNumeric(e) && (e = null), this.encodeValue(a, b, e, f, c))
+  }
+};
+mxObjectCodec.prototype.encodeValue = function(a, b, c, d, e) {
+  if (null != d) {
+    if (this.isReference(b, c, d, !0)) {
+      var f = a.getId(d);
+      if (null == f) {
+        mxLog.warn("mxObjectCodec.encode: No ID for " + this.getName() + "." + c + "\x3d" + d);
+        return
+      }
+      d = f
+    }
+    f = this.template[c];
+    if (null == c || a.encodeDefaults || f != d) c = this.getAttributeName(c), this.writeAttribute(a, b, c, d, e)
+  }
+};
+mxObjectCodec.prototype.writeAttribute = function(a, b, c, d, e) {
+  "object" != typeof d ? this.writePrimitiveAttribute(a, b, c, d, e) : this.writeComplexAttribute(a, b, c, d, e)
+};
+mxObjectCodec.prototype.writePrimitiveAttribute = function(a, b, c, d, e) {
+  d = this.convertValueToXml(d);
+  null == c ? (b = a.document.createElement("add"), "function" == typeof d ? b.appendChild(a.document.createTextNode(d)) : a.setAttribute(b, "value", d), e.appendChild(b)) : "function" != typeof d &&
+    a.setAttribute(e, c, d)
+};
+mxObjectCodec.prototype.writeComplexAttribute = function(a, b, c, d, e) {
+  a = a.encode(d);
+  null != a ? (null != c && a.setAttribute("as", c), e.appendChild(a)) : mxLog.warn("mxObjectCodec.encode: No node for " + this.getName() + "." + c + ": " + d)
+};
+mxObjectCodec.prototype.convertValueToXml = function(a) {
+  if ("undefined" == typeof a.length && (!0 == a || !1 == a)) a = !0 == a ? "1" : "0";
+  return a
+};
+mxObjectCodec.prototype.convertValueFromXml = function(a) {
+  mxUtils.isNumeric(a) && (a = parseFloat(a));
+  //
+  // Marco (marco.murdocca@xenialab.it) + Andrea Bianco (andrea.bianco@xcally.com)
+  // 2016-02-24
+  //
+  // mxUtils.isNumeric(a) && (a = ((Number(a) === a) && (a % 1 !== 0)) ? parseFloat(a) : a);
+  return a
+};
+mxObjectCodec.prototype.beforeEncode = function(a, b, c) {
+  return b
+};
+mxObjectCodec.prototype.afterEncode = function(a, b, c) {
+  return c
+};
+mxObjectCodec.prototype.decode = function(a, b, c) {
+  var d = b.getAttribute("id"),
+    e = a.objects[d];
+  null == e && (e = c || this.cloneTemplate(), null != d && a.putObject(d, e));
+  b = this.beforeDecode(a, b, e);
+  this.decodeNode(a, b, e);
+  return this.afterDecode(a, b, e)
+};
+mxObjectCodec.prototype.decodeNode = function(a, b, c) {
+  null != b && (this.decodeAttributes(a, b, c), this.decodeChildren(a, b, c))
+};
+mxObjectCodec.prototype.decodeAttributes = function(a, b, c) {
+  b = b.attributes;
+  if (null != b)
+    for (var d = 0; d < b.length; d++) this.decodeAttribute(a, b[d], c)
+};
+mxObjectCodec.prototype.decodeAttribute = function(a, b, c) {
+  var d = b.nodeName;
+  if ("as" != d && "id" != d) {
+    b = this.convertValueFromXml(b.nodeValue);
+    var e = this.getFieldName(d);
+    if (this.isReference(c, e, b, !1)) {
+      a = a.getObject(b);
+      if (null == a) {
+        mxLog.warn("mxObjectCodec.decode: No object for " + this.getName() + "." + d + "\x3d" + b);
+        return
+      }
+      b = a
+    }
+    this.isExcluded(c, d, b, !1) || (c[d] = b)
+  }
+};
+mxObjectCodec.prototype.decodeChildren = function(a, b, c) {
+  for (b = b.firstChild; null != b;) {
+    var d = b.nextSibling;
+    b.nodeType == mxConstants.NODETYPE_ELEMENT && !this.processInclude(a, b, c) && this.decodeChild(a, b, c);
+    b = d
+  }
+};
+mxObjectCodec.prototype.decodeChild = function(a, b, c) {
+  var d = this.getFieldName(b.getAttribute("as"));
+  if (null == d || !this.isExcluded(c, d, b, !1)) {
+    var e = this.getFieldTemplate(c, d, b),
+      f = null;
+    "add" == b.nodeName ? (f = b.getAttribute("value"), null == f && (f = mxUtils.eval(mxUtils.getTextContent(b)))) : f = a.decode(b, e);
+    this.addObjectValue(c, d, f, e)
+  }
+};
+mxObjectCodec.prototype.getFieldTemplate = function(a, b, c) {
+  a = a[b];
+  a instanceof Array && 0 < a.length && (a = null);
+  return a
+};
+mxObjectCodec.prototype.addObjectValue = function(a, b, c, d) {
+  null != c && c != d && (null != b && 0 < b.length ? a[b] = c : a.push(c))
+};
+mxObjectCodec.prototype.processInclude = function(a, b, c) {
+  if ("include" == b.nodeName) {
+    b = b.getAttribute("name");
+    if (null != b) try {
+      var d = mxUtils.load(b).getDocumentElement();
+      null != d && a.decode(d, c)
+    } catch (e) {}
+    return !0
+  }
+  return !1
+};
+mxObjectCodec.prototype.beforeDecode = function(a, b, c) {
+  return b
+};
+mxObjectCodec.prototype.afterDecode = function(a, b, c) {
+  return c
+};
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxCell, ["children", "edges", "overlays", "mxTransient"], ["parent", "source", "target"]);
+  a.isCellCodec = function() {
+    return !0
+  };
+  a.isExcluded = function(a, c, d, e) {
+    return mxObjectCodec.prototype.isExcluded.apply(this, arguments) || e && "value" == c && d.nodeType == mxConstants.NODETYPE_ELEMENT
+  };
+  a.afterEncode = function(a, c, d) {
+    if (null != c.value && c.value.nodeType == mxConstants.NODETYPE_ELEMENT) {
+      var e = d;
+      d = mxClient.IS_IE ? c.value.cloneNode(!0) : a.document.importNode(c.value, !0);
+      d.appendChild(e);
+      a = e.getAttribute("id");
+      d.setAttribute("id", a);
+      e.removeAttribute("id")
+    }
+    return d
+  };
+  a.beforeDecode = function(a, c, d) {
+    var e = c,
+      f = this.getName();
+    c.nodeName != f ? (e = c.getElementsByTagName(f)[0], null != e && e.parentNode == c ? (mxUtils.removeWhitespace(e, !0), mxUtils.removeWhitespace(e, !1), e.parentNode.removeChild(e)) : e =
+      null, d.value = c.cloneNode(!0), c = d.value.getAttribute("id"), null != c && (d.setId(c), d.value.removeAttribute("id"))) : d.setId(c.getAttribute("id"));
+    if (null != e)
+      for (c = 0; c < this.idrefs.length; c++) {
+        var f =
+          this.idrefs[c],
+          g = e.getAttribute(f);
+        if (null != g) {
+          e.removeAttribute(f);
+          var h = a.objects[g] || a.lookup(g);
+          null == h && (g = a.getElementById(g), null != g && (h = (mxCodecRegistry.codecs[g.nodeName] || this).decode(a, g)));
+          d[f] = h
+        }
+      }
+    return e
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxGraphModel);
+  a.encodeObject = function(a, c, d) {
+    var e = a.document.createElement("root");
+    a.encodeCell(c.getRoot(), e);
+    d.appendChild(e)
+  };
+  a.decodeChild = function(a, c, d) {
+    "root" == c.nodeName ? this.decodeRoot(a, c, d) : mxObjectCodec.prototype.decodeChild.apply(this, arguments)
+  };
+  a.decodeRoot = function(a, c, d) {
+    var e = null;
+    for (c = c.firstChild; null != c;) {
+      var f = a.decodeCell(c);
+      null != f && null == f.getParent() && (e = f);
+      c = c.nextSibling
+    }
+    null != e && d.setRoot(e)
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxRootChange, ["model", "previous", "root"]);
+  a.afterEncode = function(a, c, d) {
+    a.encodeCell(c.root, d);
+    return d
+  };
+  a.beforeDecode = function(a, c, d) {
+    if (null != c.firstChild && c.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT) {
+      c = c.cloneNode(!0);
+      var e = c.firstChild;
+      d.root = a.decodeCell(e, !1);
+      d = e.nextSibling;
+      e.parentNode.removeChild(e);
+      for (e = d; null != e;) d = e.nextSibling, a.decodeCell(e), e.parentNode.removeChild(e), e = d
+    }
+    return c
+  };
+  a.afterDecode = function(a, c,
+    d) {
+    d.previous = d.root;
+    return d
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxChildChange, ["model", "child", "previousIndex"], ["parent", "previous"]);
+  a.isReference = function(a, c, d, e) {
+    return "child" == c && (null != a.previous || !e) ? !0 : 0 <= mxUtils.indexOf(this.idrefs, c)
+  };
+  a.afterEncode = function(a, c, d) {
+    this.isReference(c, "child", c.child, !0) ? d.setAttribute("child", a.getId(c.child)) : a.encodeCell(c.child, d);
+    return d
+  };
+  a.beforeDecode = function(a, c, d) {
+    if (null != c.firstChild && c.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT) {
+      c = c.cloneNode(!0);
+      var e = c.firstChild;
+      d.child = a.decodeCell(e, !1);
+      d = e.nextSibling;
+      e.parentNode.removeChild(e);
+      for (e = d; null != e;) {
+        d = e.nextSibling;
+        if (e.nodeType == mxConstants.NODETYPE_ELEMENT) {
+          var f = e.getAttribute("id");
+          null == a.lookup(f) && a.decodeCell(e)
+        }
+        e.parentNode.removeChild(e);
+        e = d
+      }
+    } else e = c.getAttribute("child"), d.child = a.getObject(e);
+    return c
+  };
+  a.afterDecode = function(a, c, d) {
+    d.child.parent = d.previous;
+    d.previous = d.parent;
+    d.previousIndex = d.index;
+    return d
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxTerminalChange, ["model", "previous"], ["cell", "terminal"]);
+  a.afterDecode = function(a, c, d) {
+    d.previous = d.terminal;
+    return d
+  };
+  return a
+}());
+var mxGenericChangeCodec = function(a, b) {
+  var c = new mxObjectCodec(a, ["model", "previous"], ["cell"]);
+  c.afterDecode = function(a, c, f) {
+    mxUtils.isNode(f.cell) && (f.cell = a.decodeCell(f.cell, !1));
+    f.previous = f[b];
+    return f
+  };
+  return c
+};
+mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange, "value"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange, "style"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange, "geometry"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange, "collapsed"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange, "visible"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange, "value"));
+mxCodecRegistry.register(function() {
+  return new mxObjectCodec(new mxGraph, "graphListeners eventListeners view container cellRenderer editor selection".split(" "))
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxGraphView);
+  a.encode = function(a, c) {
+    return this.encodeCell(a, c, c.graph.getModel().getRoot())
+  };
+  a.encodeCell = function(a, c, d) {
+    var e = c.graph.getModel(),
+      f = c.getState(d),
+      g = e.getParent(d);
+    if (null == g || null != f) {
+      var h = e.getChildCount(d),
+        k = c.graph.getCellGeometry(d),
+        l = null;
+      g == e.getRoot() ? l = "layer" : null == g ? l = "graph" : e.isEdge(d) ? l = "edge" : 0 < h && null != k ? l = "group" : e.isVertex(d) && (l = "vertex");
+      if (null != l) {
+        var m = a.document.createElement(l);
+        null != c.graph.getLabel(d) &&
+          (m.setAttribute("label", c.graph.getLabel(d)), c.graph.isHtmlLabel(d) && m.setAttribute("html", !0));
+        if (null == g) {
+          var n = c.getGraphBounds();
+          null != n && (m.setAttribute("x", Math.round(n.x)), m.setAttribute("y", Math.round(n.y)), m.setAttribute("width", Math.round(n.width)), m.setAttribute("height", Math.round(n.height)));
+          m.setAttribute("scale", c.scale)
+        } else if (null != f && null != k) {
+          for (n in f.style) g = f.style[n], "function" == typeof g && "object" == typeof g && (g = mxStyleRegistry.getName(g)), null != g && ("function" != typeof g && "object" !=
+            typeof g) && m.setAttribute(n, g);
+          g = f.absolutePoints;
+          if (null != g && 0 < g.length) {
+            k = Math.round(g[0].x) + "," + Math.round(g[0].y);
+            for (n = 1; n < g.length; n++) k += " " + Math.round(g[n].x) + "," + Math.round(g[n].y);
+            m.setAttribute("points", k)
+          } else m.setAttribute("x", Math.round(f.x)), m.setAttribute("y", Math.round(f.y)), m.setAttribute("width", Math.round(f.width)), m.setAttribute("height", Math.round(f.height));
+          n = f.absoluteOffset;
+          null != n && (0 != n.x && m.setAttribute("dx", Math.round(n.x)), 0 != n.y && m.setAttribute("dy", Math.round(n.y)))
+        }
+        for (n =
+          0; n < h; n++) f = this.encodeCell(a, c, e.getChildAt(d, n)), null != f && m.appendChild(f)
+      }
+    }
+    return m
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxStylesheet);
+  a.encode = function(a, c) {
+    var d = a.document.createElement(this.getName()),
+      e;
+    for (e in c.styles) {
+      var f = c.styles[e],
+        g = a.document.createElement("add");
+      if (null != e) {
+        g.setAttribute("as", e);
+        for (var h in f) {
+          var k = this.getStringValue(h, f[h]);
+          if (null != k) {
+            var l = a.document.createElement("add");
+            l.setAttribute("value", k);
+            l.setAttribute("as", h);
+            g.appendChild(l)
+          }
+        }
+        0 < g.childNodes.length && d.appendChild(g)
+      }
+    }
+    return d
+  };
+  a.getStringValue = function(a,
+    c) {
+    var d = typeof c;
+    "function" == d ? c = mxStyleRegistry.getName(style[j]) : "object" == d && (c = null);
+    return c
+  };
+  a.decode = function(a, c, d) {
+    d = d || new this.template.constructor;
+    var e = c.getAttribute("id");
+    null != e && (a.objects[e] = d);
+    for (c = c.firstChild; null != c;) {
+      if (!this.processInclude(a, c, d) && "add" == c.nodeName && (e = c.getAttribute("as"), null != e)) {
+        var f = c.getAttribute("extend"),
+          g = null != f ? mxUtils.clone(d.styles[f]) : null;
+        null == g && (null != f && mxLog.warn("mxStylesheetCodec.decode: stylesheet " + f + " not found to extend"), g = {});
+        for (f = c.firstChild; null != f;) {
+          if (f.nodeType == mxConstants.NODETYPE_ELEMENT) {
+            var h = f.getAttribute("as");
+            if ("add" == f.nodeName) {
+              var k = mxUtils.getTextContent(f),
+                l = null;
+              null != k && 0 < k.length ? l = mxUtils.eval(k) : (l = f.getAttribute("value"), mxUtils.isNumeric(l) && (l = parseFloat(l)));
+              null != l && (g[h] = l)
+            } else "remove" == f.nodeName && delete g[h]
+          }
+          f = f.nextSibling
+        }
+        d.putCellStyle(e, g)
+      }
+      c = c.nextSibling
+    }
+    return d
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxDefaultKeyHandler);
+  a.encode = function(a, c) {
+    return null
+  };
+  a.decode = function(a, c, d) {
+    if (null != d)
+      for (c = c.firstChild; null != c;) {
+        if (!this.processInclude(a, c, d) && "add" == c.nodeName) {
+          var e = c.getAttribute("as"),
+            f = c.getAttribute("action"),
+            g = c.getAttribute("control");
+          d.bindAction(e, f, g)
+        }
+        c = c.nextSibling
+      }
+    return d
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxDefaultToolbar);
+  a.encode = function(a, c) {
+    return null
+  };
+  a.decode = function(a, c, d) {
+    if (null != d) {
+      var e = d.editor;
+      for (c = c.firstChild; null != c;) {
+        if (c.nodeType == mxConstants.NODETYPE_ELEMENT && !this.processInclude(a, c, d))
+          if ("separator" == c.nodeName) d.addSeparator();
+          else if ("br" == c.nodeName) d.toolbar.addBreak();
+        else if ("hr" == c.nodeName) d.toolbar.addLine();
+        else if ("add" == c.nodeName) {
+          var f = c.getAttribute("as"),
+            f = mxResources.get(f) || f,
+            g = c.getAttribute("icon"),
+            h = c.getAttribute("pressedIcon"),
+            k = c.getAttribute("action"),
+            l = c.getAttribute("mode"),
+            m = c.getAttribute("template"),
+            n = "0" != c.getAttribute("toggle"),
+            p = mxUtils.getTextContent(c),
+            q = null;
+          if (null != k) q = d.addItem(f, g, k, h);
+          else if (null != l) var s = mxUtils.eval(p),
+            q = d.addMode(f, g, l, h, s);
+          else if (null != m || null != p && 0 < p.length) q = e.templates[m], m = c.getAttribute("style"), null != q && null != m && (q = q.clone(), q.setStyle(m)), m = null, null != p && 0 <
+            p.length && (m = mxUtils.eval(p)), q = d.addPrototype(f, g, q, h, m, n);
+          else if (h = mxUtils.getChildNodes(c),
+            0 < h.length)
+            if (null == g) {
+              m = d.addActionCombo(f);
+              for (f = 0; f < h.length; f++) n = h[f], "separator" == n.nodeName ? d.addOption(m, "---") : "add" == n.nodeName && (g = n.getAttribute("as"), n = n.getAttribute("action"), d.addActionOption(
+                m, g, n))
+            } else {
+              var r = null,
+                t = d.addPrototype(f, g, function() {
+                  var a = e.templates[r.value];
+                  if (null != a) {
+                    var a = a.clone(),
+                      b = r.options[r.selectedIndex].cellStyle;
+                    null != b && a.setStyle(b);
+                    return a
+                  }
+                  mxLog.warn("Template " + a + " not found");
+                  return null
+                }, null, null, n),
+                r = d.addCombo();
+              mxEvent.addListener(r, "change",
+                function() {
+                  d.toolbar.selectMode(t, function(a) {
+                    a = mxUtils.convertPoint(e.graph.container, mxEvent.getClientX(a), mxEvent.getClientY(a));
+                    return e.addVertex(null, s(), a.x, a.y)
+                  });
+                  d.toolbar.noReset = !1
+                });
+              for (f = 0; f < h.length; f++) n = h[f], "separator" == n.nodeName ? d.addOption(r, "---") : "add" == n.nodeName && (g = n.getAttribute("as"), p = n.getAttribute("template"), d.addOption(
+                r, g, p || m).cellStyle = n.getAttribute("style"))
+            }
+          null != q && (m = c.getAttribute("id"), null != m && 0 < m.length && q.setAttribute("id", m))
+        }
+        c = c.nextSibling
+      }
+    }
+    return d
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxDefaultPopupMenu);
+  a.encode = function(a, c) {
+    return null
+  };
+  a.decode = function(a, c, d) {
+    var e = c.getElementsByTagName("include")[0];
+    null != e ? this.processInclude(a, e, d) : null != d && (d.config = c);
+    return d
+  };
+  return a
+}());
+mxCodecRegistry.register(function() {
+  var a = new mxObjectCodec(new mxEditor, "modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));
+  a.afterDecode = function(a, c, d) {
+    a = c.getAttribute("defaultEdge");
+    null != a && (c.removeAttribute("defaultEdge"), d.defaultEdge = d.templates[a]);
+    a = c.getAttribute("defaultGroup");
+    null != a && (c.removeAttribute("defaultGroup"), d.defaultGroup = d.templates[a]);
+    return d
+  };
+  a.decodeChild = function(a, c, d) {
+    if ("Array" == c.nodeName) {
+      if ("templates" == c.getAttribute("as")) {
+        this.decodeTemplates(a,
+          c, d);
+        return
+      }
+    } else if ("ui" == c.nodeName) {
+      this.decodeUi(a, c, d);
+      return
+    }
+    mxObjectCodec.prototype.decodeChild.apply(this, arguments)
+  };
+  a.decodeUi = function(a, c, d) {
+    for (a = c.firstChild; null != a;) {
+      if ("add" == a.nodeName) {
+        c = a.getAttribute("as");
+        var e = a.getAttribute("element"),
+          f = a.getAttribute("style"),
+          g = null;
+        if (null != e) g = document.getElementById(e), null != g && null != f && (g.style.cssText += ";" + f);
+        else {
+          var e = parseInt(a.getAttribute("x")),
+            h = parseInt(a.getAttribute("y")),
+            k = a.getAttribute("width"),
+            l = a.getAttribute("height"),
+            g = document.createElement("div");
+          g.style.cssText = f;
+          (new mxWindow(mxResources.get(c) || c, g, e, h, k, l, !1, !0)).setVisible(!0)
+        }
+        "graph" == c ? d.setGraphContainer(g) : "toolbar" == c ? d.setToolbarContainer(g) : "title" == c ? d.setTitleContainer(g) : "status" == c ? d.setStatusContainer(g) : "map" == c && d.setMapContainer(
+          g)
+      } else "resource" == a.nodeName ? mxResources.add(a.getAttribute("basename")) : "stylesheet" == a.nodeName && mxClient.link("stylesheet", a.getAttribute("name"));
+      a = a.nextSibling
+    }
+  };
+  a.decodeTemplates = function(a, c, d) {
+    null == d.templates &&
+      (d.templates = []);
+    c = mxUtils.getChildNodes(c);
+    for (var e = 0; e < c.length; e++) {
+      for (var f = c[e].getAttribute("as"), g = c[e].firstChild; null != g && 1 != g.nodeType;) g = g.nextSibling;
+      null != g && (d.templates[f] = a.decodeCell(g))
+    }
+  };
+  return a
+}());
index 05bfb69..aeaa420 100644 (file)
@@ -1 +1,634 @@
-var _0x7fd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x61\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x64\x69\x74\x6F\x72","\x67\x72\x61\x70\x68","\x6E\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53","\x73\x61\x76\x65\x41\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2D\x53","\x70\x75\x62\x6C\x69\x73\x68","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x50","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x43\x74\x72\x6C\x2B\x45","\x65\x64\x69\x74\x46\x69\x6C\x65","\x65\x64\x69\x74","\x67\x65\x74","\x62\x69\x6E\x64","\x70\x75\x74","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x70\x72\x69\x6E\x74\x53\x63\x72\x65\x65\x6E","\x73\x70\x72\x69\x74\x65\x2D\x70\x72\x69\x6E\x74","\x43\x74\x72\x6C\x2B\x50","\x70\x72\x65\x76\x69\x65\x77","\x73\x68\x6F\x77","\x75\x6E\x64\x6F","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x70\x72\x69\x74\x65\x2D\x75\x6E\x64\x6F","\x43\x74\x72\x6C\x2B\x5A","\x72\x65\x64\x6F","\x73\x70\x72\x69\x74\x65\x2D\x72\x65\x64\x6F","\x43\x74\x72\x6C\x2B\x59","\x63\x75\x74","\x73\x70\x72\x69\x74\x65\x2D\x63\x75\x74","\x43\x74\x72\x6C\x2B\x58","\x63\x6F\x70\x79","\x73\x70\x72\x69\x74\x65\x2D\x63\x6F\x70\x79","\x43\x74\x72\x6C\x2B\x43","\x70\x61\x73\x74\x65","\x73\x70\x72\x69\x74\x65\x2D\x70\x61\x73\x74\x65","\x43\x74\x72\x6C\x2B\x56","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x44\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x44","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x56","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x45","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x43\x74\x72\x6C\x2B\x41","\x68\x6F\x6D\x65","\x48\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x55\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x44\x6F\x77\x6E","\x65\x78\x70\x61\x6E\x64","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x45\x6E\x74\x65\x72","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x42\x61\x63\x6B\x73\x70\x61\x63\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x46","\x74\x6F\x42\x61\x63\x6B","\x43\x74\x72\x6C\x2B\x42","\x67\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x43\x74\x72\x6C\x2B\x47","\x75\x6E\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x55","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x70\x72\x6F\x6D\x70\x74","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x77\x72\x61\x70","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x73\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x30","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x20\x28","\x20\x30\x2D\x33\x36\x30\x29","\x74\x69\x6C\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65","\x78","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x79","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x76\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x65\x61\x73\x74","\x73\x6F\x75\x74\x68","\x77\x65\x73\x74","\x6E\x6F\x72\x74\x68","\x43\x74\x72\x6C\x2B\x52","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x41\x64\x64","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x53\x75\x62\x74\x72\x61\x63\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x66\x69\x74\x50\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x66\x75\x6E\x63\x74","\x70\x61\x67\x65\x56\x69\x65\x77","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x6D\x61\x78","\x72\x6F\x75\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x63\x75\x73\x74\x6F\x6D","\x20\x28\x25\x29","\x67\x65\x74\x53\x63\x61\x6C\x65","\x67\x72\x69\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x47","\x73\x65\x74\x54\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x75\x69\x64\x65\x73","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x73\x63\x61\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x43\x74\x72\x6C\x2B\x51","\x63\x6F\x70\x79\x43\x6F\x6E\x6E\x65\x63\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x68\x65\x6C\x70","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x5F","\x2F\x68\x65\x6C\x70","\x2E\x68\x74\x6D\x6C","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x46\x31","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x73\x68\x61\x64\x6F\x77","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x29","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x73\x74\x61\x74\x65","\x74\x72\x69\x67\x67\x65\x72\x58","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x59","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x6D\x61\x67\x65","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x75\x72\x6C","\x6F\x6E\x6C\x6F\x61\x64","\x6F\x6E\x65\x72\x72\x6F\x72","\x66\x69\x6C\x65\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x61\x6C\x65\x72\x74","\x73\x72\x63","\x63\x61\x6C\x6C","\x6C\x61\x62\x65\x6C","\x65\x6E\x61\x62\x6C\x65\x64","\x69\x63\x6F\x6E\x43\x6C\x73","\x73\x68\x6F\x72\x74\x63\x75\x74","\x65\x78\x74\x65\x6E\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64"];_0x7fd3[0];function Actions(_0xee96x2){this[_0x7fd3[1]]=_0xee96x2;this[_0x7fd3[2]]= new Object();this[_0x7fd3[3]]()}Actions[_0x7fd3[4]][_0x7fd3[3]]=function(){var _0xee96x3=this[_0x7fd3[1]];var _0xee96x4=_0xee96x3[_0x7fd3[5]];var _0xee96x5=_0xee96x4[_0x7fd3[6]];this[_0x7fd3[10]](_0x7fd3[7],function(){_0xee96x3[_0x7fd3[9]]( new NewDialog(_0xee96x3)[_0x7fd3[8]],300,180,true,true)});this[_0x7fd3[10]](_0x7fd3[11],function(){_0xee96x3[_0x7fd3[9]]( new OpenDialog(_0xee96x3)[_0x7fd3[8]],300,180,true,true)});this[_0x7fd3[10]](_0x7fd3[12],function(){_0xee96x3[_0x7fd3[13]](false)},null,null,_0x7fd3[14]);this[_0x7fd3[10]](_0x7fd3[15],function(){_0xee96x3[_0x7fd3[13]](true)},null,null,_0x7fd3[16]);this[_0x7fd3[10]](_0x7fd3[17],function(){_0xee96x3[_0x7fd3[18]](false)},null,null,_0x7fd3[19]);this[_0x7fd3[10]](_0x7fd3[20],function(){_0xee96x3[_0x7fd3[9]]( new VariableDialog(_0xee96x3)[_0x7fd3[8]],300,180,true,true)});this[_0x7fd3[10]](_0x7fd3[21],function(){_0xee96x3[_0x7fd3[9]]( new ImportDialog(_0xee96x3)[_0x7fd3[8]],300,200,true,true)});this[_0x7fd3[10]](_0x7fd3[22],function(){_0xee96x3[_0x7fd3[9]]( new ExportDialog(_0xee96x3)[_0x7fd3[8]],300,200,true,true)},null,null,_0x7fd3[23]);this[_0x7fd3[28]](_0x7fd3[24], new Action(mxResources[_0x7fd3[26]](_0x7fd3[25]),mxUtils[_0x7fd3[27]](this,function(){this[_0x7fd3[1]][_0x7fd3[9]]( new EditFileDialog(_0xee96x3)[_0x7fd3[8]],620,420,true,true)})));this[_0x7fd3[10]](_0x7fd3[29],function(){_0xee96x3[_0x7fd3[9]]( new RenameDialog(_0xee96x3)[_0x7fd3[8]],300,180,true,true)});this[_0x7fd3[10]](_0x7fd3[30],function(){mxUtils[_0x7fd3[31]](_0xee96x5)},null,_0x7fd3[32],_0x7fd3[33]);this[_0x7fd3[10]](_0x7fd3[34],function(){mxUtils[_0x7fd3[35]](_0xee96x5,null,10,10)});this[_0x7fd3[10]](_0x7fd3[36],function(){_0xee96x4[_0x7fd3[37]][_0x7fd3[36]]()},null,_0x7fd3[38],_0x7fd3[39]);this[_0x7fd3[10]](_0x7fd3[40],function(){_0xee96x4[_0x7fd3[37]][_0x7fd3[40]]()},null,_0x7fd3[41],_0x7fd3[42]);this[_0x7fd3[10]](_0x7fd3[43],function(){mxClipboard[_0x7fd3[43]](_0xee96x5)},null,_0x7fd3[44],_0x7fd3[45]);this[_0x7fd3[10]](_0x7fd3[46],function(){mxClipboard[_0x7fd3[46]](_0xee96x5)},null,_0x7fd3[47],_0x7fd3[48]);this[_0x7fd3[10]](_0x7fd3[49],function(){mxClipboard[_0x7fd3[49]](_0xee96x5)},false,_0x7fd3[50],_0x7fd3[51]);this[_0x7fd3[10]](_0x7fd3[52],function(){_0xee96x5[_0x7fd3[53]]()},null,null,_0x7fd3[54]);this[_0x7fd3[10]](_0x7fd3[55],function(){var _0xee96x6=_0xee96x5[_0x7fd3[56]];_0xee96x5[_0x7fd3[59]](_0xee96x5[_0x7fd3[58]](_0xee96x5[_0x7fd3[57]](),_0xee96x6,_0xee96x6,true))},null,null,_0x7fd3[60]);this[_0x7fd3[10]](_0x7fd3[61],function(){_0xee96x5[_0x7fd3[61]]()},null,null,_0x7fd3[62]);this[_0x7fd3[10]](_0x7fd3[63],function(){_0xee96x5[_0x7fd3[63]]()},null,null,_0x7fd3[64]);this[_0x7fd3[10]](_0x7fd3[65],function(){_0xee96x5[_0x7fd3[65]]()},null,null,_0x7fd3[66]);this[_0x7fd3[10]](_0x7fd3[67],function(){_0xee96x5[_0x7fd3[67]]()},null,null,_0x7fd3[68]);this[_0x7fd3[10]](_0x7fd3[69],function(){_0xee96x5[_0x7fd3[69]]()},null,null,_0x7fd3[70]);this[_0x7fd3[10]](_0x7fd3[71],function(){_0xee96x5[_0x7fd3[71]]()},null,null,_0x7fd3[72]);this[_0x7fd3[10]](_0x7fd3[73],function(){_0xee96x5[_0x7fd3[74]](false)},null,null,_0x7fd3[75]);this[_0x7fd3[10]](_0x7fd3[76],function(){_0xee96x5[_0x7fd3[74]](true)},null,null,_0x7fd3[77]);this[_0x7fd3[10]](_0x7fd3[78],function(){_0xee96x5[_0x7fd3[79]](false)},null,null,_0x7fd3[80]);this[_0x7fd3[10]](_0x7fd3[81],function(){_0xee96x5[_0x7fd3[79]](true)},null,null,_0x7fd3[82]);this[_0x7fd3[10]](_0x7fd3[83],function(){_0xee96x5[_0x7fd3[85]](_0xee96x5[_0x7fd3[84]](null,0))},null,null,_0x7fd3[86]);this[_0x7fd3[10]](_0x7fd3[87],function(){_0xee96x5[_0x7fd3[59]](_0xee96x5[_0x7fd3[88]]())},null,null,_0x7fd3[89]);this[_0x7fd3[10]](_0x7fd3[90],function(){_0xee96x5[_0x7fd3[91]]()});this[_0x7fd3[10]](_0x7fd3[92],function(){var _0xee96x7=_0xee96x5[_0x7fd3[93]]();var _0xee96x8=_0xee96x5[_0x7fd3[94]](_0xee96x7);if(_0xee96x8==null){_0xee96x8=_0x7fd3[95]};_0xee96x8=mxUtils[_0x7fd3[97]](mxResources[_0x7fd3[26]](_0x7fd3[96]),_0xee96x8);if(_0xee96x8!=null){_0xee96x5[_0x7fd3[98]](_0xee96x7,_0xee96x8)}});this[_0x7fd3[10]](_0x7fd3[99],function(){var _0xee96x7=_0xee96x5[_0x7fd3[93]]();var _0xee96x8=_0xee96x5[_0x7fd3[94]](_0xee96x7);if(_0xee96x8!=null){window[_0x7fd3[11]](_0xee96x8)}});this[_0x7fd3[10]](_0x7fd3[100],function(){var _0xee96x9=_0xee96x5[_0x7fd3[57]]();if(_0xee96x9!=null){_0xee96x5[_0x7fd3[102]]()[_0x7fd3[101]]();try{for(var _0xee96xa=0;_0xee96xa<_0xee96x9[_0x7fd3[103]];_0xee96xa++){var _0xee96x7=_0xee96x9[_0xee96xa];if(_0xee96x5[_0x7fd3[102]]()[_0x7fd3[104]](_0xee96x7)){_0xee96x5[_0x7fd3[105]]([_0xee96x7],20)}else {_0xee96x5[_0x7fd3[106]](_0xee96x7)}}}finally{_0xee96x5[_0x7fd3[102]]()[_0x7fd3[107]]()}}});this[_0x7fd3[10]](_0x7fd3[108],function(){var _0xee96xb=_0xee96x5[_0x7fd3[110]]()[_0x7fd3[109]](_0xee96x5[_0x7fd3[93]]());var _0xee96xc=_0x7fd3[111];if(_0xee96xb!=null&&_0xee96xb[_0x7fd3[113]][mxConstants[_0x7fd3[112]]]==_0x7fd3[111]){_0xee96xc=null};_0xee96x5[_0x7fd3[114]](mxConstants.STYLE_WHITE_SPACE,_0xee96xc)});this[_0x7fd3[10]](_0x7fd3[115],function(){var _0xee96xc=_0x7fd3[116];var _0xee96xb=_0xee96x5[_0x7fd3[110]]()[_0x7fd3[109]](_0xee96x5[_0x7fd3[93]]());if(_0xee96xb!=null){_0xee96xc=_0xee96xb[_0x7fd3[113]][mxConstants[_0x7fd3[117]]]||_0xee96xc};_0xee96xc=mxUtils[_0x7fd3[97]](mxResources[_0x7fd3[26]](_0x7fd3[96])+_0x7fd3[118]+mxResources[_0x7fd3[26]](_0x7fd3[115])+_0x7fd3[119],_0xee96xc);if(_0xee96xc!=null){_0xee96x5[_0x7fd3[114]](mxConstants.STYLE_ROTATION,_0xee96xc)}});this[_0x7fd3[10]](_0x7fd3[120],function(){var _0xee96x9=_0xee96x5[_0x7fd3[57]]();if(_0xee96x9!=null){_0xee96x5[_0x7fd3[102]]()[_0x7fd3[101]]();try{for(var _0xee96xa=0;_0xee96xa<_0xee96x9[_0x7fd3[103]];_0xee96xa++){var _0xee96x7=_0xee96x9[_0xee96xa];if(_0xee96x5[_0x7fd3[102]]()[_0x7fd3[121]](_0xee96x7)&&_0xee96x5[_0x7fd3[102]]()[_0x7fd3[104]](_0xee96x7)==0){var _0xee96xd=_0xee96x5[_0x7fd3[122]](_0xee96x7);if(_0xee96xd!=null){_0xee96xd=_0xee96xd[_0x7fd3[123]]();_0xee96xd[_0x7fd3[124]]+=_0xee96xd[_0x7fd3[125]]/2-_0xee96xd[_0x7fd3[126]]/2;_0xee96xd[_0x7fd3[127]]+=_0xee96xd[_0x7fd3[126]]/2-_0xee96xd[_0x7fd3[125]]/2;var _0xee96xe=_0xee96xd[_0x7fd3[125]];_0xee96xd[_0x7fd3[125]]=_0xee96xd[_0x7fd3[126]];_0xee96xd[_0x7fd3[126]]=_0xee96xe;_0xee96x5[_0x7fd3[102]]()[_0x7fd3[128]](_0xee96x7,_0xee96xd);var _0xee96xb=_0xee96x5[_0x7fd3[129]][_0x7fd3[109]](_0xee96x7);if(_0xee96xb!=null){var _0xee96xf=_0xee96xb[_0x7fd3[113]][mxConstants[_0x7fd3[130]]]||_0x7fd3[131];if(_0xee96xf==_0x7fd3[131]){_0xee96xf=_0x7fd3[132]}else {if(_0xee96xf==_0x7fd3[132]){_0xee96xf=_0x7fd3[133]}else {if(_0xee96xf==_0x7fd3[133]){_0xee96xf=_0x7fd3[134]}else {if(_0xee96xf==_0x7fd3[134]){_0xee96xf=_0x7fd3[131]}}}};_0xee96x5[_0x7fd3[114]](mxConstants.STYLE_DIRECTION,_0xee96xf,[_0xee96x7])}}}}}finally{_0xee96x5[_0x7fd3[102]]()[_0x7fd3[107]]()}}},null,null,_0x7fd3[135]);this[_0x7fd3[10]](_0x7fd3[136],function(){_0xee96x5[_0x7fd3[137]](1)});this[_0x7fd3[10]](_0x7fd3[138],function(){_0xee96x5[_0x7fd3[138]]()},null,null,_0x7fd3[139]);this[_0x7fd3[10]](_0x7fd3[140],function(){_0xee96x5[_0x7fd3[140]]()},null,null,_0x7fd3[141]);this[_0x7fd3[10]](_0x7fd3[142],function(){_0xee96x5[_0x7fd3[143]]()});this[_0x7fd3[10]](_0x7fd3[144],mxUtils[_0x7fd3[27]](this,function(){if(!_0xee96x5[_0x7fd3[145]]){this[_0x7fd3[26]](_0x7fd3[147])[_0x7fd3[146]]()};var _0xee96x10=_0xee96x5[_0x7fd3[148]];var _0xee96x11=_0xee96x5[_0x7fd3[149]];var _0xee96x12=_0xee96x5[_0x7fd3[8]][_0x7fd3[150]]-20;var _0xee96x13=_0xee96x5[_0x7fd3[8]][_0x7fd3[151]]-20;var _0xee96x14=Math[_0x7fd3[153]](100*Math[_0x7fd3[152]](_0xee96x12/_0xee96x10[_0x7fd3[125]]/_0xee96x11,_0xee96x13/_0xee96x10[_0x7fd3[126]]/_0xee96x11))/100;_0xee96x5[_0x7fd3[137]](_0xee96x14);_0xee96x5[_0x7fd3[8]][_0x7fd3[154]]=Math[_0x7fd3[157]](_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[124]]*_0xee96x14-Math[_0x7fd3[156]](10,(_0xee96x5[_0x7fd3[8]][_0x7fd3[150]]-_0xee96x10[_0x7fd3[125]]*_0xee96x11*_0xee96x14)/2));_0xee96x5[_0x7fd3[8]][_0x7fd3[158]]=Math[_0x7fd3[157]](_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[127]]*_0xee96x14-Math[_0x7fd3[156]](10,(_0xee96x5[_0x7fd3[8]][_0x7fd3[151]]-_0xee96x10[_0x7fd3[126]]*_0xee96x11*_0xee96x14)/2))}));this[_0x7fd3[10]](_0x7fd3[159],mxUtils[_0x7fd3[27]](this,function(){if(!_0xee96x5[_0x7fd3[145]]){this[_0x7fd3[26]](_0x7fd3[147])[_0x7fd3[146]]()};var _0xee96x10=_0xee96x5[_0x7fd3[148]];var _0xee96x11=_0xee96x5[_0x7fd3[149]];var _0xee96x12=_0xee96x5[_0x7fd3[8]][_0x7fd3[150]]-20;var _0xee96x14=Math[_0x7fd3[153]](100*_0xee96x12/_0xee96x10[_0x7fd3[125]]/_0xee96x11)/100;_0xee96x5[_0x7fd3[137]](_0xee96x14);_0xee96x5[_0x7fd3[8]][_0x7fd3[154]]=Math[_0x7fd3[157]](_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[124]]*_0xee96x14-Math[_0x7fd3[156]](10,(_0xee96x5[_0x7fd3[8]][_0x7fd3[150]]-_0xee96x10[_0x7fd3[125]]*_0xee96x11*_0xee96x14)/2));_0xee96x5[_0x7fd3[8]][_0x7fd3[158]]=Math[_0x7fd3[157]](_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[127]]*_0xee96x14-Math[_0x7fd3[156]](10,(_0xee96x5[_0x7fd3[8]][_0x7fd3[151]]-_0xee96x10[_0x7fd3[126]]*_0xee96x11*_0xee96x14)/2))}));this[_0x7fd3[28]](_0x7fd3[160], new Action(mxResources[_0x7fd3[26]](_0x7fd3[161]),function(){var _0xee96xc=mxUtils[_0x7fd3[97]](mxResources[_0x7fd3[26]](_0x7fd3[96])+_0x7fd3[162],parseInt(_0xee96x5[_0x7fd3[110]]()[_0x7fd3[163]]()*100));if(_0xee96xc!=null&&_0xee96xc[_0x7fd3[103]]>0&&!isNaN(parseInt(_0xee96xc))){_0xee96x5[_0x7fd3[137]](parseInt(_0xee96xc)/100)}}));var _0xee96x15=null;_0xee96x15=this[_0x7fd3[10]](_0x7fd3[164],function(){_0xee96x5[_0x7fd3[166]](!_0xee96x5[_0x7fd3[165]]());_0xee96x4[_0x7fd3[167]]()},null,null,_0x7fd3[168]);_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[165]]()});_0xee96x15=this[_0x7fd3[10]](_0x7fd3[171],function(){_0xee96x5[_0x7fd3[173]][_0x7fd3[172]]=!_0xee96x5[_0x7fd3[173]][_0x7fd3[172]]});_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[173]][_0x7fd3[172]]});_0xee96x15=this[_0x7fd3[10]](_0x7fd3[174],function(){_0xee96x5[_0x7fd3[176]][_0x7fd3[177]](!_0xee96x5[_0x7fd3[176]][_0x7fd3[175]]())});_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[176]][_0x7fd3[175]]()});_0xee96x15=this[_0x7fd3[10]](_0x7fd3[178],function(){_0xee96x5[_0x7fd3[179]]=!_0xee96x5[_0x7fd3[179]];_0xee96x5[_0x7fd3[129]][_0x7fd3[180]]()});_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[179]]});_0xee96x15=this[_0x7fd3[10]](_0x7fd3[181],function(){_0xee96x5[_0x7fd3[181]]=!_0xee96x5[_0x7fd3[181]];_0xee96x4[_0x7fd3[167]]();if(!_0xee96x5[_0x7fd3[181]]){var _0xee96x16=_0xee96x5[_0x7fd3[129]][_0x7fd3[155]];_0xee96x5[_0x7fd3[129]][_0x7fd3[183]](_0xee96x16[_0x7fd3[124]]-_0xee96x5[_0x7fd3[8]][_0x7fd3[154]]/_0xee96x5[_0x7fd3[129]][_0x7fd3[182]],_0xee96x16[_0x7fd3[127]]-_0xee96x5[_0x7fd3[8]][_0x7fd3[158]]/_0xee96x5[_0x7fd3[129]][_0x7fd3[182]]);_0xee96x5[_0x7fd3[8]][_0x7fd3[154]]=0;_0xee96x5[_0x7fd3[8]][_0x7fd3[158]]=0;_0xee96x5[_0x7fd3[184]]()}else {var _0xee96x17=_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[124]];var _0xee96x18=_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[127]];_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[124]]=0;_0xee96x5[_0x7fd3[129]][_0x7fd3[155]][_0x7fd3[127]]=0;_0xee96x5[_0x7fd3[184]]();_0xee96x5[_0x7fd3[8]][_0x7fd3[154]]-=Math[_0x7fd3[157]](_0xee96x17*_0xee96x5[_0x7fd3[129]][_0x7fd3[182]]);_0xee96x5[_0x7fd3[8]][_0x7fd3[158]]-=Math[_0x7fd3[157]](_0xee96x18*_0xee96x5[_0x7fd3[129]][_0x7fd3[182]])}},!mxClient.IS_TOUCH);_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[8]][_0x7fd3[113]][_0x7fd3[185]]==_0x7fd3[186]});_0xee96x15=this[_0x7fd3[10]](_0x7fd3[147],mxUtils[_0x7fd3[27]](this,function(){_0xee96x5[_0x7fd3[145]]=!_0xee96x5[_0x7fd3[145]];_0xee96x5[_0x7fd3[187]]=_0xee96x5[_0x7fd3[145]];_0xee96x5[_0x7fd3[188]]=_0xee96x5[_0x7fd3[187]];_0xee96x5[_0x7fd3[129]][_0x7fd3[189]]();_0xee96x5[_0x7fd3[184]]();_0xee96x4[_0x7fd3[167]]();_0xee96x4[_0x7fd3[191]][_0x7fd3[190]]();if(mxUtils[_0x7fd3[192]](_0xee96x5[_0x7fd3[8]])){if(_0xee96x5[_0x7fd3[145]]){_0xee96x5[_0x7fd3[8]][_0x7fd3[154]]-=20;_0xee96x5[_0x7fd3[8]][_0x7fd3[158]]-=20}else {_0xee96x5[_0x7fd3[8]][_0x7fd3[154]]+=20;_0xee96x5[_0x7fd3[8]][_0x7fd3[158]]+=20}}}));_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[145]]});_0xee96x15=this[_0x7fd3[10]](_0x7fd3[193],function(){_0xee96x5[_0x7fd3[195]](!_0xee96x5[_0x7fd3[194]][_0x7fd3[175]]())},null,null,_0x7fd3[196]);_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[194]][_0x7fd3[175]]()});_0xee96x15=this[_0x7fd3[10]](_0x7fd3[197],function(){_0xee96x5[_0x7fd3[194]][_0x7fd3[199]](!_0xee96x5[_0x7fd3[194]][_0x7fd3[198]]())});_0xee96x15[_0x7fd3[169]](true);_0xee96x15[_0x7fd3[170]](function(){return _0xee96x5[_0x7fd3[194]][_0x7fd3[198]]()});this[_0x7fd3[10]](_0x7fd3[200],function(){var _0xee96x19=_0x7fd3[95];if(mxResources[_0x7fd3[202]](mxClient[_0x7fd3[201]])){_0xee96x19=_0x7fd3[203]+mxClient[_0x7fd3[201]]};window[_0x7fd3[11]](RESOURCES_PATH+_0x7fd3[204]+_0xee96x19+_0x7fd3[205])});this[_0x7fd3[28]](_0x7fd3[206], new Action(mxResources[_0x7fd3[26]](_0x7fd3[206])+_0x7fd3[207],function(){_0xee96x3[_0x7fd3[9]]( new AboutDialog(_0xee96x3)[_0x7fd3[8]],320,280,true,true)},null,null,_0x7fd3[208]));var _0xee96x1a=mxUtils[_0x7fd3[27]](this,function(_0xee96x1b,_0xee96x1c){this[_0x7fd3[10]](_0xee96x1b,function(){_0xee96x5[_0x7fd3[209]](mxConstants.STYLE_FONTSTYLE,_0xee96x1c)})});_0xee96x1a(_0x7fd3[210],mxConstants.FONT_BOLD);_0xee96x1a(_0x7fd3[211],mxConstants.FONT_ITALIC);_0xee96x1a(_0x7fd3[212],mxConstants.FONT_UNDERLINE);this[_0x7fd3[10]](_0x7fd3[213],function(){_0xee96x5[_0x7fd3[214]](mxConstants.STYLE_SHADOW)});this[_0x7fd3[10]](_0x7fd3[215],function(){_0xee96x5[_0x7fd3[214]](mxConstants.STYLE_DASHED)});this[_0x7fd3[10]](_0x7fd3[216],function(){_0xee96x5[_0x7fd3[214]](mxConstants.STYLE_ROUNDED)});this[_0x7fd3[10]](_0x7fd3[217],function(){_0xee96x5[_0x7fd3[214]](mxConstants.STYLE_CURVED)});this[_0x7fd3[10]](_0x7fd3[113],function(){var _0xee96x9=_0xee96x5[_0x7fd3[57]]();if(_0xee96x9!=null&&_0xee96x9[_0x7fd3[103]]>0){var _0xee96x1d=_0xee96x5[_0x7fd3[102]]();var _0xee96x1c=mxUtils[_0x7fd3[97]](mxResources[_0x7fd3[26]](_0x7fd3[96])+_0x7fd3[118]+mxResources[_0x7fd3[26]](_0x7fd3[113])+_0x7fd3[218],_0xee96x1d[_0x7fd3[219]](_0xee96x9[0])||_0x7fd3[95]);if(_0xee96x1c!=null){_0xee96x5[_0x7fd3[220]](_0xee96x1c,_0xee96x9)}}});this[_0x7fd3[10]](_0x7fd3[221],function(){_0xee96x5[_0x7fd3[222]](_0xee96x5[_0x7fd3[93]]())});this[_0x7fd3[10]](_0x7fd3[223],function(){var _0xee96x7=_0xee96x5[_0x7fd3[93]]();if(_0xee96x7!=null&&_0xee96x5[_0x7fd3[102]]()[_0x7fd3[224]](_0xee96x7)){var _0xee96x1e=_0xee96x4[_0x7fd3[6]][_0x7fd3[226]][_0x7fd3[225]](_0xee96x7);if(_0xee96x1e instanceof mxEdgeHandler){var _0xee96x16=_0xee96x5[_0x7fd3[129]][_0x7fd3[155]];var _0xee96x6=_0xee96x5[_0x7fd3[129]][_0x7fd3[182]];var _0xee96x17=_0xee96x16[_0x7fd3[124]];var _0xee96x18=_0xee96x16[_0x7fd3[127]];var _0xee96x1f=_0xee96x5[_0x7fd3[102]]()[_0x7fd3[227]](_0xee96x7);var _0xee96x20=_0xee96x5[_0x7fd3[122]](_0xee96x1f);if(_0xee96x5[_0x7fd3[102]]()[_0x7fd3[121]](_0xee96x1f)&&_0xee96x20!=null){_0xee96x17+=_0xee96x20[_0x7fd3[124]];_0xee96x18+=_0xee96x20[_0x7fd3[127]]};_0xee96x1e[_0x7fd3[232]](_0xee96x1e[_0x7fd3[228]],_0xee96x5[_0x7fd3[230]][_0x7fd3[229]]/_0xee96x6-_0xee96x17,_0xee96x5[_0x7fd3[230]][_0x7fd3[231]]/_0xee96x6-_0xee96x18)}}});this[_0x7fd3[10]](_0x7fd3[233],function(){var _0xee96x21=_0xee96x3[_0x7fd3[2]][_0x7fd3[26]](_0x7fd3[233]);if(_0xee96x21[_0x7fd3[234]]!=null){_0xee96x21[_0x7fd3[234]][_0x7fd3[236]](_0xee96x21[_0x7fd3[234]][_0x7fd3[228]],_0xee96x21[_0x7fd3[235]])}});this[_0x7fd3[10]](_0x7fd3[237],function(){function _0xee96x22(_0xee96xc,_0xee96x23,_0xee96x24){var _0xee96x25=null;var _0xee96x9=_0xee96x5[_0x7fd3[57]]();_0xee96x5[_0x7fd3[102]]()[_0x7fd3[101]]();try{if(_0xee96x9[_0x7fd3[103]]==0){var _0xee96x26=_0xee96x5[_0x7fd3[238]]();_0xee96x9=[_0xee96x5[_0x7fd3[240]](_0xee96x5[_0x7fd3[239]](),null,_0x7fd3[95],_0xee96x26,_0xee96x26,_0xee96x23,_0xee96x24)];_0xee96x25=_0xee96x9};_0xee96x5[_0x7fd3[114]](mxConstants.STYLE_IMAGE,_0xee96xc,_0xee96x9);_0xee96x5[_0x7fd3[114]](mxConstants.STYLE_SHAPE,_0x7fd3[237],_0xee96x9);if(_0xee96x5[_0x7fd3[241]]()==1){if(_0xee96x23!=null&&_0xee96x24!=null){var _0xee96x7=_0xee96x9[0];var _0xee96xd=_0xee96x5[_0x7fd3[102]]()[_0x7fd3[242]](_0xee96x7);if(_0xee96xd!=null){_0xee96xd=_0xee96xd[_0x7fd3[123]]();_0xee96xd[_0x7fd3[125]]=_0xee96x23;_0xee96xd[_0x7fd3[126]]=_0xee96x24;_0xee96x5[_0x7fd3[102]]()[_0x7fd3[128]](_0xee96x7,_0xee96xd)}}}}finally{_0xee96x5[_0x7fd3[102]]()[_0x7fd3[107]]()};if(_0xee96x25!=null){_0xee96x5[_0x7fd3[59]](_0xee96x25);_0xee96x5[_0x7fd3[243]](_0xee96x25[0])}}var _0xee96xc=_0x7fd3[95];var _0xee96xb=_0xee96x5[_0x7fd3[110]]()[_0x7fd3[109]](_0xee96x5[_0x7fd3[93]]());if(_0xee96xb!=null){_0xee96xc=_0xee96xb[_0x7fd3[113]][mxConstants[_0x7fd3[244]]]||_0xee96xc};_0xee96xc=mxUtils[_0x7fd3[97]](mxResources[_0x7fd3[26]](_0x7fd3[96])+_0x7fd3[118]+mxResources[_0x7fd3[26]](_0x7fd3[245])+_0x7fd3[218],_0xee96xc);if(_0xee96xc!=null){if(_0xee96xc[_0x7fd3[103]]>0){var _0xee96x27= new Image();_0xee96x27[_0x7fd3[246]]=function(){_0xee96x22(_0xee96xc,_0xee96x27[_0x7fd3[125]],_0xee96x27[_0x7fd3[126]])};_0xee96x27[_0x7fd3[247]]=function(){mxUtils[_0x7fd3[249]](mxResources[_0x7fd3[26]](_0x7fd3[248]))};_0xee96x27[_0x7fd3[250]]=_0xee96xc}}})};Actions[_0x7fd3[4]][_0x7fd3[10]]=function(_0xee96x1b,_0xee96x28,_0xee96x29,_0xee96x2a,_0xee96x2b){return this[_0x7fd3[28]](_0xee96x1b, new Action(mxResources[_0x7fd3[26]](_0xee96x1b),_0xee96x28,_0xee96x29,_0xee96x2a,_0xee96x2b))};Actions[_0x7fd3[4]][_0x7fd3[28]]=function(_0xee96x2c,_0xee96x15){this[_0x7fd3[2]][_0xee96x2c]=_0xee96x15;return _0xee96x15};Actions[_0x7fd3[4]][_0x7fd3[26]]=function(_0xee96x2c){return this[_0x7fd3[2]][_0xee96x2c]};function Action(_0xee96x2e,_0xee96x28,_0xee96x29,_0xee96x2a,_0xee96x2b){mxEventSource[_0x7fd3[251]](this);this[_0x7fd3[252]]=_0xee96x2e;this[_0x7fd3[146]]=_0xee96x28;this[_0x7fd3[253]]=(_0xee96x29!=null)?_0xee96x29:true;this[_0x7fd3[254]]=_0xee96x2a;this[_0x7fd3[255]]=_0xee96x2b}mxUtils[_0x7fd3[256]](Action,mxEventSource);Action[_0x7fd3[4]][_0x7fd3[177]]=function(_0xee96xc){if(this[_0x7fd3[253]]!=_0xee96xc){this[_0x7fd3[253]]=_0xee96xc;this[_0x7fd3[258]]( new mxEventObject(_0x7fd3[257]))}};Action[_0x7fd3[4]][_0x7fd3[169]]=function(_0xee96xc){this[_0x7fd3[259]]=_0xee96xc};Action[_0x7fd3[4]][_0x7fd3[170]]=function(_0xee96x28){this[_0x7fd3[260]]=_0xee96x28};Action[_0x7fd3[4]][_0x7fd3[261]]=function(){return this[_0x7fd3[260]]()}
\ No newline at end of file
+'use strict';
+/**
+ * $Id: Actions.js,v 1.7 2013-02-14 07:48:01 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs the actions object for the given UI.
+ */
+function Actions(editorUi) {
+       this.editorUi = editorUi;
+       this.actions = new Object();
+       this.init();
+};
+
+/**
+ * Adds the default actions.
+ */
+Actions.prototype.init = function() {
+       var ui = this.editorUi;
+       var editor = ui.editor;
+       var graph = editor.graph;
+
+       // File actions
+       this.addAction('new', function() {
+               ui.showDialog(new NewDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('open', function() {
+               ui.showDialog(new OpenDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('save', function() {
+               ui.saveFile(false);
+       }, null, null, 'Ctrl+S');
+       this.addAction('saveAs', function() {
+               ui.saveFile(true);
+       }, null, null, 'Ctrl+Shift-S');
+       this.addAction('publish', function() {
+               ui.publishFile(false);
+       }, null, null, 'Ctrl+Shift+P');
+       this.addAction('variable', function() {
+               ui.showDialog(new VariableDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('import', function() {
+               ui.showDialog(new ImportDialog(ui).container, 300, 200, true, true);
+       });
+       this.addAction('export', function() {
+               ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true);
+       }, null, null, 'Ctrl+E');
+       this.put('editFile', new Action(mxResources.get('edit'), mxUtils.bind(this,
+               function() {
+                       this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420,
+                               true, true);
+               })));
+       this.addAction('rename', function() {
+               ui.showDialog(new RenameDialog(ui).container, 300, 180, true, true);
+       });
+       this.addAction('print', function() {
+               mxUtils.printScreen(graph);
+       }, null, 'sprite-print', 'Ctrl+P');
+       this.addAction('preview', function() {
+               mxUtils.show(graph, null, 10, 10);
+       });
+
+       // Edit actions
+       this.addAction('undo', function() {
+               editor.undoManager.undo();
+       }, null, 'sprite-undo', 'Ctrl+Z');
+       this.addAction('redo', function() {
+               editor.undoManager.redo();
+       }, null, 'sprite-redo', 'Ctrl+Y');
+       this.addAction('cut', function() {
+               mxClipboard.cut(graph);
+       }, null, 'sprite-cut', 'Ctrl+X');
+       this.addAction('copy', function() {
+               mxClipboard.copy(graph);
+       }, null, 'sprite-copy', 'Ctrl+C');
+       this.addAction('paste', function() {
+               mxClipboard.paste(graph);
+       }, false, 'sprite-paste', 'Ctrl+V');
+       this.addAction('delete', function() {
+               graph.removeCells();
+       }, null, null, 'Delete');
+       this.addAction('duplicate', function() {
+               var s = graph.gridSize;
+               graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s,
+                       true));
+       }, null, null, 'Ctrl+D');
+       this.addAction('selectVertices', function() {
+               graph.selectVertices();
+       }, null, null, 'Ctrl+Shift+V');
+       this.addAction('selectEdges', function() {
+               graph.selectEdges();
+       }, null, null, 'Ctrl+Shift+E');
+       this.addAction('selectAll', function() {
+               graph.selectAll();
+       }, null, null, 'Ctrl+A');
+
+       // Navigation actions
+       this.addAction('home', function() {
+               graph.home();
+       }, null, null, 'Home');
+       this.addAction('exitGroup', function() {
+               graph.exitGroup();
+       }, null, null, 'Page Up');
+       this.addAction('enterGroup', function() {
+               graph.enterGroup();
+       }, null, null, 'Page Down');
+       this.addAction('expand', function() {
+               graph.foldCells(false);
+       }, null, null, 'Enter');
+       this.addAction('collapse', function() {
+               graph.foldCells(true);
+       }, null, null, 'Backspace');
+
+       // Arrange actions
+       this.addAction('toFront', function() {
+               graph.orderCells(false);
+       }, null, null, 'Ctrl+F');
+       this.addAction('toBack', function() {
+               graph.orderCells(true);
+       }, null, null, 'Ctrl+B');
+       this.addAction('group', function() {
+               graph.setSelectionCell(graph.groupCells(null, 0));
+       }, null, null, 'Ctrl+G');
+       this.addAction('ungroup', function() {
+               graph.setSelectionCells(graph.ungroupCells());
+       }, null, null, 'Ctrl+U');
+       this.addAction('removeFromGroup', function() {
+               graph.removeCellsFromParent();
+       });
+       this.addAction('editLink', function() {
+               var cell = graph.getSelectionCell();
+               var link = graph.getLinkForCell(cell);
+
+               if (link == null) {
+                       link = '';
+               }
+
+               link = mxUtils.prompt(mxResources.get('enterValue'), link);
+
+               if (link != null) {
+                       graph.setLinkForCell(cell, link);
+               }
+       });
+       this.addAction('openLink', function() {
+               var cell = graph.getSelectionCell();
+               var link = graph.getLinkForCell(cell);
+
+               if (link != null) {
+                       window.open(link);
+               }
+       });
+       this.addAction('autosize', function() {
+               var cells = graph.getSelectionCells();
+
+               if (cells != null) {
+                       graph.getModel().beginUpdate();
+                       try {
+                               for (var i = 0; i < cells.length; i++) {
+                                       var cell = cells[i];
+
+                                       if (graph.getModel().getChildCount(cell)) {
+                                               graph.updateGroupBounds([cell], 20);
+                                       } else {
+                                               graph.updateCellSize(cell);
+                                       }
+                               }
+                       } finally {
+                               graph.getModel().endUpdate();
+                       }
+               }
+       });
+       this.addAction('wordWrap', function() {
+               var state = graph.getView().getState(graph.getSelectionCell());
+               var value = 'wrap';
+
+               if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap') {
+                       value = null;
+               }
+
+               graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
+       });
+       this.addAction('rotation', function() {
+               var value = '0';
+               var state = graph.getView().getState(graph.getSelectionCell());
+
+               if (state != null) {
+                       value = state.style[mxConstants.STYLE_ROTATION] || value;
+               }
+
+               value = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
+                       mxResources.get('rotation') + ' 0-360)', value);
+
+               if (value != null) {
+                       graph.setCellStyles(mxConstants.STYLE_ROTATION, value);
+               }
+       });
+       this.addAction('tilt', function() {
+               var cells = graph.getSelectionCells();
+
+               if (cells != null) {
+                       graph.getModel().beginUpdate();
+                       try {
+                               for (var i = 0; i < cells.length; i++) {
+                                       var cell = cells[i];
+
+                                       if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(
+                                                       cell) == 0) {
+                                               var geo = graph.getCellGeometry(cell);
+
+                                               if (geo != null) {
+                                                       // Rotates the size and position in the geometry
+                                                       geo = geo.clone();
+                                                       geo.x += geo.width / 2 - geo.height / 2;
+                                                       geo.y += geo.height / 2 - geo.width / 2;
+                                                       var tmp = geo.width;
+                                                       geo.width = geo.height;
+                                                       geo.height = tmp;
+                                                       graph.getModel().setGeometry(cell, geo);
+
+                                                       // Reads the current direction and advances by 90 degrees
+                                                       var state = graph.view.getState(cell);
+
+                                                       if (state != null) {
+                                                               var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east' /*default*/ ;
+
+                                                               if (dir == 'east') {
+                                                                       dir = 'south';
+                                                               } else if (dir == 'south') {
+                                                                       dir = 'west';
+                                                               } else if (dir == 'west') {
+                                                                       dir = 'north';
+                                                               } else if (dir == 'north') {
+                                                                       dir = 'east';
+                                                               }
+
+                                                               graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
+                                                       }
+                                               }
+                                       }
+                               }
+                       } finally {
+                               graph.getModel().endUpdate();
+                       }
+               }
+       }, null, null, 'Ctrl+R');
+
+       // View actions
+       this.addAction('actualSize', function() {
+               graph.zoomTo(1);
+       });
+       this.addAction('zoomIn', function() {
+               graph.zoomIn();
+       }, null, null, 'Add');
+       this.addAction('zoomOut', function() {
+               graph.zoomOut();
+       }, null, null, 'Subtract');
+       this.addAction('fitWindow', function() {
+               graph.fit();
+       });
+
+       this.addAction('fitPage', mxUtils.bind(this, function() {
+               if (!graph.pageVisible) {
+                       this.get('pageView').funct();
+               }
+
+               var fmt = graph.pageFormat;
+               var ps = graph.pageScale;
+               var cw = graph.container.clientWidth - 20;
+               var ch = graph.container.clientHeight - 20;
+
+               var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height /
+                       ps)) / 100;
+               graph.zoomTo(scale);
+
+               graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
+                       Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
+               );
+               graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
+                       Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
+                               2));
+       }));
+       this.addAction('fitPageWidth', mxUtils.bind(this, function() {
+               if (!graph.pageVisible) {
+                       this.get('pageView').funct();
+               }
+
+               var fmt = graph.pageFormat;
+               var ps = graph.pageScale;
+               var cw = graph.container.clientWidth - 20;
+
+               var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
+               graph.zoomTo(scale);
+
+               graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
+                       Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
+               );
+               graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
+                       Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
+                               2));
+       }));
+       this.put('customZoom', new Action(mxResources.get('custom'), function() {
+               var value = mxUtils.prompt(mxResources.get('enterValue') + ' (%)',
+                       parseInt(graph.getView().getScale() * 100));
+
+               if (value != null && value.length > 0 && !isNaN(parseInt(value))) {
+                       graph.zoomTo(parseInt(value) / 100);
+               }
+       }));
+
+       // Option actions
+       var action = null;
+       action = this.addAction('grid', function() {
+               graph.setGridEnabled(!graph.isGridEnabled());
+               editor.updateGraphComponents();
+       }, null, null, 'Ctrl+Shift+G');
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.isGridEnabled();
+       });
+       action = this.addAction('guides', function() {
+               graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled;
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.graphHandler.guidesEnabled;
+       });
+       action = this.addAction('tooltips', function() {
+               graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.tooltipHandler.isEnabled();
+       });
+       action = this.addAction('navigation', function() {
+               graph.foldingEnabled = !graph.foldingEnabled;
+               graph.view.revalidate();
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.foldingEnabled;
+       });
+       action = this.addAction('scrollbars', function() {
+               graph.scrollbars = !graph.scrollbars;
+               editor.updateGraphComponents();
+
+               if (!graph.scrollbars) {
+                       var t = graph.view.translate;
+                       graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale,
+                               t.y - graph.container.scrollTop / graph.view.scale);
+                       graph.container.scrollLeft = 0;
+                       graph.container.scrollTop = 0;
+                       graph.sizeDidChange();
+               } else {
+                       var dx = graph.view.translate.x;
+                       var dy = graph.view.translate.y;
+
+                       graph.view.translate.x = 0;
+                       graph.view.translate.y = 0;
+                       graph.sizeDidChange();
+                       graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
+                       graph.container.scrollTop -= Math.round(dy * graph.view.scale);
+               }
+       }, !mxClient.IS_TOUCH);
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.container.style.overflow == 'auto';
+       });
+       action = this.addAction('pageView', mxUtils.bind(this, function() {
+               graph.pageVisible = !graph.pageVisible;
+               graph.pageBreaksVisible = graph.pageVisible;
+               graph.preferPageSize = graph.pageBreaksVisible;
+               graph.view.validate();
+               graph.sizeDidChange();
+
+               editor.updateGraphComponents();
+               editor.outline.update();
+
+               if (mxUtils.hasScrollbars(graph.container)) {
+                       if (graph.pageVisible) {
+                               graph.container.scrollLeft -= 20;
+                               graph.container.scrollTop -= 20;
+                       } else {
+                               graph.container.scrollLeft += 20;
+                               graph.container.scrollTop += 20;
+                       }
+               }
+       }));
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.pageVisible;
+       });
+       action = this.addAction('connect', function() {
+               graph.setConnectable(!graph.connectionHandler.isEnabled());
+       }, null, null, 'Ctrl+Q');
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.connectionHandler.isEnabled();
+       });
+       action = this.addAction('copyConnect', function() {
+               graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
+       });
+       action.setToggleAction(true);
+       action.setSelectedCallback(function() {
+               return graph.connectionHandler.isCreateTarget();
+       });
+
+       // Help actions
+       this.addAction('help', function() {
+               var ext = '';
+
+               if (mxResources.isLanguageSupported(mxClient.language)) {
+                       ext = '_' + mxClient.language;
+               }
+
+               window.open(RESOURCES_PATH + '/help' + ext + '.html');
+       });
+       this.put('about', new Action(mxResources.get('about') + ' Cally Square',
+               function() {
+                       ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
+               }, null, null, 'F1'));
+
+       // Font style actions
+       var toggleFontStyle = mxUtils.bind(this, function(key, style) {
+               this.addAction(key, function() {
+                       graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
+               });
+       });
+
+       toggleFontStyle('bold', mxConstants.FONT_BOLD);
+       toggleFontStyle('italic', mxConstants.FONT_ITALIC);
+       toggleFontStyle('underline', mxConstants.FONT_UNDERLINE);
+
+       // Format actions
+       this.addAction('shadow', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
+       });
+       this.addAction('dashed', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_DASHED);
+       });
+       this.addAction('rounded', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
+       });
+       this.addAction('curved', function() {
+               graph.toggleCellStyles(mxConstants.STYLE_CURVED);
+       });
+       this.addAction('style', function() {
+               var cells = graph.getSelectionCells();
+
+               if (cells != null && cells.length > 0) {
+                       var model = graph.getModel();
+                       var style = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
+                               mxResources.get('style') + ')',
+                               model.getStyle(cells[0]) || '');
+
+                       if (style != null) {
+                               graph.setCellStyle(style, cells);
+                       }
+               }
+       });
+       this.addAction('setAsDefaultEdge', function() {
+               graph.setDefaultEdge(graph.getSelectionCell());
+       });
+       this.addAction('addWaypoint', function() {
+               var cell = graph.getSelectionCell();
+
+               if (cell != null && graph.getModel().isEdge(cell)) {
+                       var handler = editor.graph.selectionCellsHandler.getHandler(cell);
+
+                       if (handler instanceof mxEdgeHandler) {
+                               var t = graph.view.translate;
+                               var s = graph.view.scale;
+                               var dx = t.x;
+                               var dy = t.y;
+
+                               var parent = graph.getModel().getParent(cell);
+                               var pgeo = graph.getCellGeometry(parent);
+
+                               if (graph.getModel().isVertex(parent) && pgeo != null) {
+                                       dx += pgeo.x;
+                                       dy += pgeo.y;
+                               }
+
+                               handler.addPointAt(handler.state, graph.panningHandler.triggerX / s - dx,
+                                       graph.panningHandler.triggerY / s - dy);
+                       }
+               }
+       });
+       this.addAction('removeWaypoint', function() {
+               // TODO: Action should run with "this" set to action
+               var rmWaypointAction = ui.actions.get('removeWaypoint');
+
+               if (rmWaypointAction.handler != null) {
+                       // NOTE: Popupevent handled and action updated in Menus.createPopupMenu
+                       rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state,
+                               rmWaypointAction.index);
+               }
+       });
+       this.addAction('image', function() {
+               function updateImage(value, w, h) {
+                       var select = null;
+                       var cells = graph.getSelectionCells();
+
+                       graph.getModel().beginUpdate();
+                       try {
+                               // Inserts new cell if no cell is selected
+                               if (cells.length == 0) {
+                                       var gs = graph.getGridSize();
+                                       cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs,
+                                               w, h)];
+                                       select = cells;
+                               }
+
+                               graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
+                               graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
+
+                               if (graph.getSelectionCount() == 1) {
+                                       if (w != null && h != null) {
+                                               var cell = cells[0];
+                                               var geo = graph.getModel().getGeometry(cell);
+
+                                               if (geo != null) {
+                                                       geo = geo.clone();
+                                                       geo.width = w;
+                                                       geo.height = h;
+                                                       graph.getModel().setGeometry(cell, geo);
+                                               }
+                                       }
+                               }
+                       } finally {
+                               graph.getModel().endUpdate();
+                       }
+
+                       if (select != null) {
+                               graph.setSelectionCells(select);
+                               graph.scrollCellToVisible(select[0]);
+                       }
+               };
+
+               var value = '';
+               var state = graph.getView().getState(graph.getSelectionCell());
+
+               if (state != null) {
+                       value = state.style[mxConstants.STYLE_IMAGE] || value;
+               }
+
+               value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get(
+                       'url') + ')', value);
+
+               if (value != null) {
+                       if (value.length > 0) {
+                               var img = new Image();
+
+                               img.onload = function() {
+                                       updateImage(value, img.width, img.height);
+                               };
+                               img.onerror = function() {
+                                       mxUtils.alert(mxResources.get('fileNotFound'));
+                               };
+
+                               img.src = value;
+                       }
+               }
+       });
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut) {
+       return this.put(key, new Action(mxResources.get(key), funct, enabled, iconCls,
+               shortcut));
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.put = function(name, action) {
+       this.actions[name] = action;
+
+       return action;
+};
+
+/**
+ * Returns the action for the given name or null if no such action exists.
+ */
+Actions.prototype.get = function(name) {
+       return this.actions[name];
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Action(label, funct, enabled, iconCls, shortcut) {
+       mxEventSource.call(this);
+       this.label = label;
+       this.funct = funct;
+       this.enabled = (enabled != null) ? enabled : true;
+       this.iconCls = iconCls;
+       this.shortcut = shortcut;
+};
+
+// Action inherits from mxEventSource
+mxUtils.extend(Action, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setEnabled = function(value) {
+       if (this.enabled != value) {
+               this.enabled = value;
+               this.fireEvent(new mxEventObject('stateChanged'));
+       }
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setToggleAction = function(value) {
+       this.toggleAction = value;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setSelectedCallback = function(funct) {
+       this.selectedCallback = funct;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isSelected = function() {
+       return this.selectedCallback();
+};
index 318d624..c78d34e 100644 (file)
@@ -1 +1,1048 @@
-var _0x5fb5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x6E\x70\x75\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x65\x63\x6B\x65\x64","\x47\x45\x54","\x6F\x70\x65\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x64\x61\x74\x61","\x65\x64\x69\x74\x6F\x72","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x73\x65\x6C\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x2D\x2D\x20\x4E\x6F\x6E\x65\x20\x2D\x2D","\x76\x61\x6C\x75\x65","\x2D\x31","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x6F\x77\x73","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x73\x65\x6C\x65\x63\x74\x32","\x30","\x66\x69\x6C\x74\x65\x72","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x66\x61\x74\x68\x65\x72","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6F\x6E","\x2D","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x62\x6F\x64\x79","\x72\x6F\x75\x6E\x64","\x6D\x61\x78","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x44\x69\x61\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x20\x63\x65\x6E\x74\x65\x72","\x64\x69\x73\x70\x6C\x61\x79","\x73\x74\x79\x6C\x65","\x62\x6C\x6F\x63\x6B","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x31\x32\x70\x78","\x67\x65\x4D\x6F\x64\x61\x6C\x44\x69\x61\x6C\x6F\x67","\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x62\x67","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x6E\x44\x69\x61\x6C\x6F\x67\x43\x6C\x6F\x73\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x6C\x6F\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74","\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79","\x6D\x6F\x64\x61\x6C\x2D\x66\x6F\x6F\x74\x65\x72","\x68\x34","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x69\x6D\x70\x6F\x72\x74","\x67\x65\x74","\x20\x58\x4D\x4C","\x77\x72\x69\x74\x65","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x62\x75\x74\x74\x6F\x6E","\x72\x6F\x77","\x63\x6F\x6C\x2D\x6D\x64\x2D\x31\x32","\x74\x65\x78\x74\x61\x72\x65\x61","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x33\x37\x34\x70\x78","\x66\x69\x6C\x65","\x61\x63\x63\x65\x70\x74","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x63\x68\x61\x6E\x67\x65","\x66\x69\x6C\x65\x73","\x74\x61\x72\x67\x65\x74","\x6C\x6F\x67","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x73\x75\x6C\x74","\x72\x65\x61\x64\x41\x73\x54\x65\x78\x74","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x6F\x72\x6D\x61\x74\x20\x66\x69\x6C\x65","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x62\x69\x6E\x64","\x62\x74\x6E\x20\x62\x6C\x75\x65","\x63\x61\x6E\x63\x65\x6C","\x62\x74\x6E\x20\x64\x65\x66\x61\x75\x6C\x74","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30\x70\x78","\x31\x37\x36","\x31\x35\x31","\x73\x72\x63","\x2F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x62\x72","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x6C\x61\x62\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x61","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D\x2F","\x5F\x62\x6C\x61\x6E\x6B","\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D","\x73\x61\x76\x65\x41\x73","\x6E\x61\x6D\x65","\x5F","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x6C\x61\x62\x65\x6C","\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C\x20\x70\x75\x6C\x6C\x2D\x72\x69\x67\x68\x74","\x5F\x63\x6F\x70\x79","\x69\x64","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C","\x73\x61\x76\x65","\x6E\x65\x77","\x5F\x6E\x65\x77","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x72\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x50\x55\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6E\x61\x6D\x65\x3D","\x50\x72\x6F\x6A\x65\x63\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6E\x61\x6D\x65\x64","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x6C\x65\x72\x74","\x65\x64\x69\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x64\x61\x74\x61\x54\x72\x61\x6E\x73\x66\x65\x72","\x64\x72\x61\x67\x6F\x76\x65\x72","\x64\x72\x6F\x70","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D","\x65\x78\x70\x6F\x72\x74","\x66\x6F\x72\x6D\x2D\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x20\x66\x6F\x72\x6D\x2D\x72\x6F\x77\x2D\x73\x65\x70\x65\x72\x61\x74\x65\x64","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70\x20\x6C\x61\x73\x74","\x63\x6F\x6C\x2D\x73\x6D\x2D\x34\x20\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C","\x63\x6F\x6C\x2D\x73\x6D\x2D\x38","\x67\x65\x74\x58\x6D\x6C","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x67\x72\x61\x70\x68","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x20\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x2D\x73\x63\x72\x6F\x6C\x6C","\x20","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70","\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74\x73","\x73\x69\x70\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x74\x72\x75\x6E\x6B\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x63\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x6D\x61\x69\x6C\x62\x6F\x78","\x25\x6D\x61\x69\x6C\x62\x6F\x78\x25\x40\x25\x63\x6F\x6E\x74\x65\x78\x74\x25","\x6D\x6F\x64\x65\x6C","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x6F\x64\x62\x63\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x5F\x69\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x64\x69\x67\x69\x74","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x6E\x75\x6D\x62\x65\x72","\x6D\x69\x6E","\x72\x65\x74\x72\x79","\x6B\x65\x79","\x71\x75\x65\x72\x79","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x63\x6F\x6D\x6D\x61\x6E\x64","\x68\x65\x6C\x70\x5F","\x70","\x68\x65\x6C\x70\x2D\x62\x6C\x6F\x63\x6B","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x72\x65\x66\x72\x65\x73\x68"];_0x5fb5[0];function createCheckbox(_0x750ax2){var _0x750ax3=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax3[_0x5fb5[5]](_0x5fb5[3],_0x5fb5[4]);if(_0x750ax2){_0x750ax3[_0x5fb5[5]](_0x5fb5[6],true)};return _0x750ax3}function createDropdownFromApi(_0x750ax5,_0x750ax2,_0x750ax6,_0x750ax7,_0x750ax8,_0x750ax9,_0x750axa){var _0x750axb= new XMLHttpRequest();_0x750axb[_0x5fb5[8]](_0x5fb5[7],_0x750ax5,false);_0x750axb[_0x5fb5[14]](_0x5fb5[9],_0x5fb5[10]+_0x750ax8[_0x5fb5[13]][_0x5fb5[12]][_0x5fb5[11]]);_0x750axb[_0x5fb5[15]](null);var _0x750axc=[];if(_0x750axb[_0x5fb5[16]]===200){_0x750axc=JSON[_0x5fb5[18]](_0x750axb[_0x5fb5[17]])};var _0x750ax3=document[_0x5fb5[2]](_0x5fb5[19]);var _0x750axd=document[_0x5fb5[2]](_0x5fb5[20]);_0x750axd[_0x5fb5[21]]=_0x5fb5[22];_0x750axd[_0x5fb5[23]]=_0x5fb5[24];_0x750ax3[_0x5fb5[25]](_0x750axd);_0x750axc[_0x5fb5[30]][_0x5fb5[28]](function(_0x750axe){_0x750axd=document[_0x5fb5[2]](_0x5fb5[20]);_0x750axd[_0x5fb5[21]]=_0x750axe[_0x750ax6];if(_0x750ax9&&_0x750axa){_0x750ax9[_0x5fb5[28]](function(_0x750axf){_0x750axa=_0x750axa[_0x5fb5[27]](_0x5fb5[26]+_0x750axf+_0x5fb5[26],_0x750axe[_0x750axf])});_0x750axd[_0x5fb5[23]]=_0x750axa;_0x750axd[_0x5fb5[29]]=(_0x750axa==_0x750ax2)}else {_0x750axd[_0x5fb5[23]]=_0x750axe[_0x750ax7];_0x750axd[_0x5fb5[29]]=(_0x750axe[_0x750ax7]==_0x750ax2)};_0x750ax3[_0x5fb5[25]](_0x750axd)});_0x750ax3[_0x5fb5[31]]=_0x5fb5[32];return _0x750ax3}function createGroupedDropdownFromApi(_0x750ax5,_0x750ax2,_0x750ax6,_0x750ax7,_0x750ax8,_0x750ax11){var _0x750axb= new XMLHttpRequest();_0x750axb[_0x5fb5[8]](_0x5fb5[7],_0x750ax5,false);_0x750axb[_0x5fb5[14]](_0x5fb5[9],_0x5fb5[10]+_0x750ax8[_0x5fb5[13]][_0x5fb5[12]][_0x5fb5[11]]);_0x750axb[_0x5fb5[15]](null);var _0x750axc=[];if(_0x750axb[_0x5fb5[16]]===200){_0x750axc=JSON[_0x5fb5[18]](_0x750axb[_0x5fb5[17]])};var _0x750ax3=document[_0x5fb5[2]](_0x5fb5[19]);var _0x750axd=document[_0x5fb5[2]](_0x5fb5[20]);_0x750axd[_0x5fb5[21]]=_0x5fb5[22];_0x750axd[_0x5fb5[23]]=_0x5fb5[33];_0x750ax3[_0x5fb5[25]](_0x750axd);var _0x750ax12={};var _0x750ax13={};_0x750ax12[_0x750ax11]=null;var _0x750ax14=_[_0x5fb5[34]](_0x750axc[_0x5fb5[30]],_0x750ax12);var _0x750ax15={};_0x750ax14[_0x5fb5[28]](function(_0x750axe){_0x750axd=document[_0x5fb5[2]](_0x5fb5[20]);_0x750axd[_0x5fb5[31]]=_0x5fb5[35];_0x750axd[_0x5fb5[21]]=_0x750axe[_0x750ax6][_0x5fb5[36]]();_0x750axd[_0x5fb5[23]]=_0x750axe[_0x750ax7];_0x750axd[_0x5fb5[29]]=(_0x750axe[_0x750ax7]==_0x750ax2);_0x750ax3[_0x5fb5[25]](_0x750axd);_0x750ax13[_0x750ax11]=_0x750axe[_0x750ax7];_0x750ax15=_[_0x5fb5[34]](_0x750axc[_0x5fb5[30]],_0x750ax13);_0x750ax15[_0x5fb5[28]](function(_0x750axe){_0x750axd=document[_0x5fb5[2]](_0x5fb5[20]);_0x750axd[_0x5fb5[31]]=_0x5fb5[37];_0x750axd[_0x5fb5[21]]=_0x5fb5[38]+_[_0x5fb5[39]](_0x750axe[_0x750ax6]);_0x750axd[_0x5fb5[23]]=_0x750axe[_0x750ax7];_0x750axd[_0x5fb5[29]]=(_0x750axe[_0x750ax7]==_0x750ax2);_0x750ax3[_0x5fb5[25]](_0x750axd)})});_0x750ax3[_0x5fb5[31]]=_0x5fb5[32];return _0x750ax3}function createDropdownFromArray(_0x750ax17,_0x750ax2){var _0x750ax3=document[_0x5fb5[2]](_0x5fb5[19]);for(var _0x750ax18 in _0x750ax17){var _0x750axd=document[_0x5fb5[2]](_0x5fb5[20]);_0x750axd[_0x5fb5[21]]=_0x750ax17[_0x750ax18];_0x750axd[_0x5fb5[23]]=_0x750ax18;if(_0x750ax2>0||_0x750ax2!=_0x5fb5[40]){_0x750axd[_0x5fb5[29]]=(_0x750ax2===_0x750ax18)?true:false};_0x750ax3[_0x5fb5[25]](_0x750axd)};_0x750ax3[_0x5fb5[31]]=_0x5fb5[32];return _0x750ax3}function Dialog(_0x750ax8,_0x750ax1a,_0x750ax1b,_0x750ax1c,_0x750ax1d,_0x750ax1e,_0x750ax1f){var _0x750ax20=0;if(mxClient[_0x5fb5[41]]&&document[_0x5fb5[42]]!=9){_0x750ax20=60};_0x750ax1b+=_0x750ax20;_0x750ax1c+=_0x750ax20;var _0x750ax21=Math[_0x5fb5[46]](0,Math[_0x5fb5[45]]((document[_0x5fb5[44]][_0x5fb5[43]]-_0x750ax1b)/2));var _0x750ax22=Math[_0x5fb5[46]](0,Math[_0x5fb5[45]]((Math[_0x5fb5[46]](document[_0x5fb5[44]][_0x5fb5[47]],document[_0x5fb5[48]][_0x5fb5[47]])-_0x750ax1c)/3));var _0x750ax23=_0x750ax8[_0x5fb5[50]](_0x5fb5[49]);_0x750ax23[_0x5fb5[31]]=_0x5fb5[51];_0x750ax23[_0x5fb5[53]][_0x5fb5[52]]=_0x5fb5[54];_0x750ax23[_0x5fb5[53]][_0x5fb5[55]]=_0x5fb5[56];var _0x750ax24=_0x750ax8[_0x5fb5[50]](_0x5fb5[57]);_0x750ax24[_0x5fb5[31]]=_0x5fb5[58];_0x750ax24[_0x5fb5[25]](_0x750ax1a);_0x750ax23[_0x5fb5[25]](_0x750ax24);if(this[_0x5fb5[59]]==null){this[_0x5fb5[59]]=_0x750ax8[_0x5fb5[50]](_0x5fb5[60]);this[_0x5fb5[59]][_0x5fb5[31]]=_0x5fb5[61];if(mxClient[_0x5fb5[62]]){ new mxDivResizer(this[_0x5fb5[59]])}};if(_0x750ax1d){document[_0x5fb5[44]][_0x5fb5[25]](this[_0x5fb5[59]])};document[_0x5fb5[44]][_0x5fb5[25]](_0x750ax23);this[_0x5fb5[63]]=_0x750ax1f;this[_0x5fb5[64]]=_0x750ax23}Dialog[_0x5fb5[66]][_0x5fb5[65]]=function(){if(this[_0x5fb5[63]]!=null){this[_0x5fb5[63]]();this[_0x5fb5[63]]=null};this[_0x5fb5[64]][_0x5fb5[68]][_0x5fb5[67]](this[_0x5fb5[64]]);this[_0x5fb5[59]][_0x5fb5[68]][_0x5fb5[67]](this[_0x5fb5[59]])};function ImportDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[75])+_0x5fb5[77]);var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax2c=_0x750ax8[_0x5fb5[50]](_0x5fb5[81]);var _0x750ax2d=_0x750ax8[_0x5fb5[50]](_0x5fb5[82]);var _0x750ax2e=document[_0x5fb5[2]](_0x5fb5[83]);_0x750ax2e[_0x5fb5[53]][_0x5fb5[84]]=_0x5fb5[85];_0x750ax2e[_0x5fb5[53]][_0x5fb5[86]]=_0x5fb5[87];var _0x750ax3=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax3[_0x5fb5[3]]=_0x5fb5[88];_0x750ax3[_0x5fb5[5]](_0x5fb5[89],_0x5fb5[90]);_0x750ax3[_0x5fb5[100]](_0x5fb5[91],function _0x750ax2f(_0x750ax30){var _0x750ax31=_0x750ax30[_0x5fb5[93]][_0x5fb5[92]][0];console[_0x5fb5[94]](_0x750ax31);if(_0x750ax31){if(_0x750ax31[_0x5fb5[3]]===_0x5fb5[90]){var _0x750ax32= new FileReader();_0x750ax32[_0x5fb5[95]]=function(_0x750ax33){var _0x750ax34=_0x750ax33[_0x5fb5[93]][_0x5fb5[96]];mxUtils[_0x5fb5[78]](_0x750ax2e,_0x750ax34)};_0x750ax32[_0x5fb5[97]](_0x750ax31)}else {alert(_0x5fb5[98])}}else {alert(_0x5fb5[99])}},false);_0x750ax2d[_0x5fb5[25]](_0x750ax3);_0x750ax2d[_0x5fb5[25]](_0x750ax2e);_0x750ax2c[_0x5fb5[25]](_0x750ax2d);_0x750ax28[_0x5fb5[25]](_0x750ax2c);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[75]),mxUtils[_0x5fb5[103]](this,function(_0x750ax36){var _0x750ax37=mxUtils[_0x5fb5[101]](_0x750ax2e[_0x5fb5[23]]);_0x750ax8[_0x5fb5[13]][_0x5fb5[102]](_0x750ax37[_0x5fb5[48]]);_0x750ax8[_0x5fb5[79]]()}));_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function AboutDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[107])+_0x5fb5[108]);var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax3a=document[_0x5fb5[2]](_0x5fb5[109]);_0x750ax3a[_0x5fb5[53]][_0x5fb5[110]]=_0x5fb5[111];_0x750ax3a[_0x5fb5[5]](_0x5fb5[84],_0x5fb5[112]);_0x750ax3a[_0x5fb5[5]](_0x5fb5[84],_0x5fb5[113]);_0x750ax3a[_0x5fb5[5]](_0x5fb5[114],IMAGE_PATH+_0x5fb5[115]);_0x750ax28[_0x5fb5[25]](_0x750ax3a);mxUtils[_0x5fb5[116]](_0x750ax28);mxUtils[_0x5fb5[78]](_0x750ax28,_0x5fb5[117]+mxClient[_0x5fb5[118]]);mxUtils[_0x5fb5[116]](_0x750ax28);var _0x750ax3b=document[_0x5fb5[2]](_0x5fb5[119]);_0x750ax3b[_0x5fb5[5]](_0x5fb5[120],_0x5fb5[121]);_0x750ax3b[_0x5fb5[5]](_0x5fb5[93],_0x5fb5[122]);mxUtils[_0x5fb5[78]](_0x750ax3b,_0x5fb5[123]);_0x750ax28[_0x5fb5[25]](_0x750ax3b);mxUtils[_0x5fb5[116]](_0x750ax28);mxUtils[_0x5fb5[116]](_0x750ax28);var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[65]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function SaveDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[124]));var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax3d=_0x5fb5[125];var _0x750ax3e=_0x5fb5[126]+_0x750ax3d;var _0x750ax2=_0x750ax8[_0x5fb5[13]][_0x5fb5[127]]();var _0x750ax2c=_0x750ax8[_0x5fb5[50]](_0x5fb5[81]);var _0x750ax2d=_0x750ax8[_0x5fb5[50]](_0x5fb5[128]);var _0x750ax3f=_0x750ax8[_0x5fb5[50]](_0x5fb5[129]);var _0x750ax40=document[_0x5fb5[2]](_0x5fb5[130]);_0x750ax40[_0x5fb5[31]]=_0x5fb5[131];mxUtils[_0x5fb5[78]](_0x750ax40,mxResources[_0x5fb5[76]](_0x750ax3d));_0x750ax2d[_0x5fb5[25]](_0x750ax40);var _0x750ax41=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax41[_0x5fb5[5]](_0x5fb5[23],_0x750ax2+_0x5fb5[132]);_0x750ax41[_0x5fb5[5]](_0x5fb5[133],_0x750ax3e);_0x750ax41[_0x5fb5[31]]=_0x5fb5[134];_0x750ax3f[_0x5fb5[25]](_0x750ax41);_0x750ax2c[_0x5fb5[25]](_0x750ax2d);_0x750ax2c[_0x5fb5[25]](_0x750ax3f);_0x750ax28[_0x5fb5[25]](_0x750ax2c);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[135]),function(){_0x750ax8[_0x5fb5[124]](_0x750ax41[_0x5fb5[23]]);_0x750ax8[_0x5fb5[79]]()});_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function NewDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[136]));var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax3d=_0x5fb5[125];var _0x750ax3e=_0x5fb5[126]+_0x750ax3d;var _0x750ax2=_0x750ax8[_0x5fb5[13]][_0x5fb5[127]]();var _0x750ax2c=_0x750ax8[_0x5fb5[50]](_0x5fb5[81]);var _0x750ax2d=_0x750ax8[_0x5fb5[50]](_0x5fb5[128]);var _0x750ax3f=_0x750ax8[_0x5fb5[50]](_0x5fb5[129]);var _0x750ax40=document[_0x5fb5[2]](_0x5fb5[130]);_0x750ax40[_0x5fb5[31]]=_0x5fb5[131];mxUtils[_0x5fb5[78]](_0x750ax40,mxResources[_0x5fb5[76]](_0x750ax3d));_0x750ax2d[_0x5fb5[25]](_0x750ax40);var _0x750ax41=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax41[_0x5fb5[5]](_0x5fb5[23],_0x750ax2+_0x5fb5[137]);_0x750ax41[_0x5fb5[5]](_0x5fb5[133],_0x750ax3e);_0x750ax41[_0x5fb5[31]]=_0x5fb5[134];_0x750ax3f[_0x5fb5[25]](_0x750ax41);_0x750ax2c[_0x5fb5[25]](_0x750ax2d);_0x750ax2c[_0x5fb5[25]](_0x750ax3f);_0x750ax28[_0x5fb5[25]](_0x750ax2c);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[136]),function(){_0x750ax8[_0x5fb5[136]](_0x750ax41[_0x5fb5[23]]);_0x750ax8[_0x5fb5[79]]()});_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function VariableDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[138]));var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax3d=_0x5fb5[125];var _0x750ax3e=_0x5fb5[126]+_0x750ax3d;var _0x750ax2=_0x750ax8[_0x5fb5[13]][_0x5fb5[127]]();var _0x750ax2c=_0x750ax8[_0x5fb5[50]](_0x5fb5[81]);var _0x750ax2d=_0x750ax8[_0x5fb5[50]](_0x5fb5[128]);var _0x750ax3f=_0x750ax8[_0x5fb5[50]](_0x5fb5[129]);var _0x750ax40=document[_0x5fb5[2]](_0x5fb5[130]);_0x750ax40[_0x5fb5[31]]=_0x5fb5[131];mxUtils[_0x5fb5[78]](_0x750ax40,mxResources[_0x5fb5[76]](_0x750ax3d));_0x750ax2d[_0x5fb5[25]](_0x750ax40);var _0x750ax41=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax41[_0x5fb5[5]](_0x5fb5[23],_0x5fb5[139]);_0x750ax41[_0x5fb5[5]](_0x5fb5[133],_0x750ax3e);_0x750ax41[_0x5fb5[31]]=_0x5fb5[134];_0x750ax3f[_0x5fb5[25]](_0x750ax41);_0x750ax2c[_0x5fb5[25]](_0x750ax2d);_0x750ax2c[_0x5fb5[25]](_0x750ax3f);_0x750ax28[_0x5fb5[25]](_0x750ax2c);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[136]),function(){_0x750ax8[_0x5fb5[138]](_0x750ax41[_0x5fb5[23]]);_0x750ax8[_0x5fb5[79]]()});_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function OpenDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[8]));var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax2c=_0x750ax8[_0x5fb5[50]](_0x5fb5[81]);var _0x750ax2d=_0x750ax8[_0x5fb5[50]](_0x5fb5[128]);var _0x750ax3f=_0x750ax8[_0x5fb5[50]](_0x5fb5[129]);var _0x750ax40=document[_0x5fb5[2]](_0x5fb5[130]);_0x750ax40[_0x5fb5[31]]=_0x5fb5[131];mxUtils[_0x5fb5[78]](_0x750ax40,mxResources[_0x5fb5[76]](_0x5fb5[125]));_0x750ax2d[_0x5fb5[25]](_0x750ax40);var _0x750axb= new XMLHttpRequest();_0x750axb[_0x5fb5[8]](_0x5fb5[7],_0x5fb5[140],false);_0x750axb[_0x5fb5[14]](_0x5fb5[9],_0x5fb5[10]+_0x750ax8[_0x5fb5[13]][_0x5fb5[12]][_0x5fb5[11]]);_0x750axb[_0x5fb5[15]](null);var _0x750axc=[];if(_0x750axb[_0x5fb5[16]]===200){_0x750axc=JSON[_0x5fb5[18]](_0x750axb[_0x5fb5[17]])};var _0x750ax41=document[_0x5fb5[2]](_0x5fb5[19]);for(var _0x750ax45=0;_0x750ax45<_0x750axc[_0x5fb5[141]];_0x750ax45++){var _0x750axd=document[_0x5fb5[2]](_0x5fb5[20]);_0x750axd[_0x5fb5[21]]=_0x750axc[_0x750ax45][_0x5fb5[125]];_0x750axd[_0x5fb5[23]]=_0x750axc[_0x750ax45][_0x5fb5[133]];_0x750ax41[_0x5fb5[25]](_0x750axd)};_0x750ax41[_0x5fb5[31]]=_0x5fb5[134];_0x750ax3f[_0x5fb5[25]](_0x750ax41);_0x750ax2c[_0x5fb5[25]](_0x750ax2d);_0x750ax2c[_0x5fb5[25]](_0x750ax3f);_0x750ax28[_0x5fb5[25]](_0x750ax2c);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[8]),function(){console[_0x5fb5[94]](_0x750ax41);console[_0x5fb5[94]](_0x750ax41[_0x5fb5[23]]);window[_0x5fb5[8]](_0x5fb5[142]+_0x750ax41[_0x5fb5[23]],_0x5fb5[122]);_0x750ax8[_0x5fb5[79]]()});_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function RenameDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[143]));var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax2c=_0x750ax8[_0x5fb5[50]](_0x5fb5[81]);var _0x750ax2d=_0x750ax8[_0x5fb5[50]](_0x5fb5[128]);var _0x750ax3f=_0x750ax8[_0x5fb5[50]](_0x5fb5[129]);var _0x750ax40=document[_0x5fb5[2]](_0x5fb5[130]);_0x750ax40[_0x5fb5[31]]=_0x5fb5[131];mxUtils[_0x5fb5[78]](_0x750ax40,mxResources[_0x5fb5[76]](_0x5fb5[125]));_0x750ax2d[_0x5fb5[25]](_0x750ax40);var _0x750ax3d=_0x750ax8[_0x5fb5[13]][_0x5fb5[144]];var _0x750ax3=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax3[_0x5fb5[5]](_0x5fb5[23],_0x750ax3d);_0x750ax3[_0x5fb5[31]]=_0x5fb5[134];_0x750ax3f[_0x5fb5[25]](_0x750ax3);_0x750ax2c[_0x5fb5[25]](_0x750ax2d);_0x750ax2c[_0x5fb5[25]](_0x750ax3f);_0x750ax28[_0x5fb5[25]](_0x750ax2c);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[135]),function(){var _0x750axb= new XMLHttpRequest();_0x750axb[_0x5fb5[8]](_0x5fb5[145],SAVE_URL+_0x750ax8[_0x5fb5[13]][_0x5fb5[12]][_0x5fb5[133]],true);_0x750axb[_0x5fb5[14]](_0x5fb5[146],_0x5fb5[147]);_0x750axb[_0x5fb5[14]](_0x5fb5[9],_0x5fb5[10]+_0x750ax8[_0x5fb5[13]][_0x5fb5[12]][_0x5fb5[11]]);_0x750axb[_0x5fb5[15]](_0x5fb5[148]+_0x750ax3[_0x5fb5[23]]);_0x750axb[_0x5fb5[95]]=function(_0x750ax33){if(_0x750axb[_0x5fb5[16]]===200){_0x750ax8[_0x5fb5[13]][_0x5fb5[150]](_0x5fb5[149]);_0x750ax8[_0x5fb5[13]][_0x5fb5[144]]=_0x750ax3[_0x5fb5[23]]}else {console[_0x5fb5[94]](_0x750axb[_0x5fb5[17]]);_0x750ax8[_0x5fb5[13]][_0x5fb5[150]](JSON[_0x5fb5[18]](_0x750axb[_0x5fb5[17]])[_0x5fb5[152]][0][_0x5fb5[151]])}};_0x750axb[_0x5fb5[153]]=function(_0x750ax33){mxUtils[_0x5fb5[155]](_0x750axb[_0x5fb5[154]])};_0x750ax8[_0x5fb5[79]]()});_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function EditFileDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[71]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[156]));var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax2c=_0x750ax8[_0x5fb5[50]](_0x5fb5[81]);var _0x750ax2d=_0x750ax8[_0x5fb5[50]](_0x5fb5[82]);var _0x750ax2e=document[_0x5fb5[2]](_0x5fb5[83]);_0x750ax2e[_0x5fb5[53]][_0x5fb5[84]]=_0x5fb5[85];_0x750ax2e[_0x5fb5[53]][_0x5fb5[86]]=_0x5fb5[87];_0x750ax2e[_0x5fb5[23]]=mxUtils[_0x5fb5[158]](_0x750ax8[_0x5fb5[13]][_0x5fb5[157]]());if(fileSupport){function _0x750ax48(_0x750ax30){_0x750ax30[_0x5fb5[159]]();_0x750ax30[_0x5fb5[160]]();if(_0x750ax30[_0x5fb5[161]][_0x5fb5[92]][_0x5fb5[141]]>0){var _0x750ax49=_0x750ax30[_0x5fb5[161]][_0x5fb5[92]][0];var _0x750ax4a= new FileReader();_0x750ax4a[_0x5fb5[95]]=function(_0x750ax33){_0x750ax2e[_0x5fb5[23]]=_0x750ax33[_0x5fb5[93]][_0x5fb5[96]]};_0x750ax4a[_0x5fb5[97]](_0x750ax49)}}function _0x750ax4b(_0x750ax30){_0x750ax30[_0x5fb5[159]]();_0x750ax30[_0x5fb5[160]]()}_0x750ax2e[_0x5fb5[100]](_0x5fb5[162],_0x750ax4b,false);_0x750ax2e[_0x5fb5[100]](_0x5fb5[163],_0x750ax48,false)};_0x750ax2d[_0x5fb5[25]](_0x750ax2e);_0x750ax2c[_0x5fb5[25]](_0x750ax2d);_0x750ax28[_0x5fb5[25]](_0x750ax2c);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[135]),function(){var _0x750ax37=mxUtils[_0x5fb5[101]](_0x750ax2e[_0x5fb5[23]]);_0x750ax8[_0x5fb5[13]][_0x5fb5[102]](_0x750ax37[_0x5fb5[48]]);_0x750ax8[_0x5fb5[79]]()});_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function ExportDialog(_0x750ax8){var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[164]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[165])+_0x5fb5[77]);var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax4d=_0x750ax8[_0x5fb5[50]](_0x5fb5[166]);var _0x750ax4e=_0x750ax8[_0x5fb5[50]](_0x5fb5[167]);var _0x750ax40=document[_0x5fb5[2]](_0x5fb5[130]);_0x750ax40[_0x5fb5[31]]=_0x5fb5[168];mxUtils[_0x5fb5[78]](_0x750ax40,mxResources[_0x5fb5[76]](_0x5fb5[144]));var _0x750ax3=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax3[_0x5fb5[5]](_0x5fb5[23],_0x750ax8[_0x5fb5[13]][_0x5fb5[127]]());_0x750ax3[_0x5fb5[31]]=_0x5fb5[134];var _0x750ax23=_0x750ax8[_0x5fb5[50]](_0x5fb5[169]);_0x750ax23[_0x5fb5[25]](_0x750ax3);_0x750ax4e[_0x5fb5[25]](_0x750ax40);_0x750ax4e[_0x5fb5[25]](_0x750ax23);_0x750ax4d[_0x5fb5[25]](_0x750ax4e);_0x750ax28[_0x5fb5[25]](_0x750ax4d);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[165]),mxUtils[_0x5fb5[103]](this,function(_0x750ax36){_0x750ax8[_0x5fb5[135]](false);var _0x750ax4f=encodeURIComponent(mxUtils[_0x5fb5[170]](_0x750ax8[_0x5fb5[13]][_0x5fb5[157]]())); new mxXmlRequest(SAVE_URL+_0x750ax8[_0x5fb5[13]][_0x5fb5[12]][_0x5fb5[133]]+_0x5fb5[172],_0x5fb5[173]+_0x750ax3[_0x5fb5[23]],_0x5fb5[7])[_0x5fb5[171]](document,_0x5fb5[122]);_0x750ax8[_0x5fb5[79]]()}));_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}function GeneralDialog(_0x750ax8,_0x750ax51){var _0x750ax52=_0x750ax8[_0x5fb5[13]][_0x5fb5[174]];var _0x750ax26=_0x750ax8[_0x5fb5[50]](_0x5fb5[69]);var _0x750ax27=_0x750ax8[_0x5fb5[50]](_0x5fb5[70]);var _0x750ax28=_0x750ax8[_0x5fb5[50]](_0x5fb5[175]);var _0x750ax29=_0x750ax8[_0x5fb5[50]](_0x5fb5[72]);var _0x750ax2a=_0x750ax8[_0x5fb5[74]](_0x5fb5[73]);mxUtils[_0x5fb5[78]](_0x750ax2a,mxResources[_0x5fb5[76]](_0x5fb5[156])+_0x5fb5[176]+mxResources[_0x5fb5[76]](_0x750ax51[_0x5fb5[23]][_0x5fb5[177]]));var _0x750ax2b=mxUtils[_0x5fb5[80]](_0x5fb5[40],function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax2b[_0x5fb5[31]]=_0x5fb5[65];_0x750ax27[_0x5fb5[25]](_0x750ax2b);_0x750ax27[_0x5fb5[25]](_0x750ax2a);var _0x750ax53=_0x750ax51[_0x5fb5[23]][_0x5fb5[178]][_0x5fb5[141]];var _0x750ax4d=_0x750ax8[_0x5fb5[50]](_0x5fb5[166]);for(var _0x750ax54=0;_0x750ax54<_0x750ax53;_0x750ax54++){var _0x750ax3d=_0x750ax51[_0x5fb5[23]][_0x5fb5[178]][_0x750ax54][_0x5fb5[125]];var _0x750ax3e=_0x5fb5[126]+_0x750ax3d;var _0x750ax2=_0x750ax51[_0x5fb5[23]][_0x5fb5[178]][_0x750ax54][_0x5fb5[23]];var _0x750ax4e=_0x750ax8[_0x5fb5[50]]((_0x750ax54==_0x750ax53-1)?_0x5fb5[167]:_0x5fb5[179]);var _0x750ax40=document[_0x5fb5[2]](_0x5fb5[130]);_0x750ax40[_0x5fb5[31]]=_0x5fb5[168];mxUtils[_0x5fb5[78]](_0x750ax40,mxResources[_0x5fb5[76]](_0x750ax3d));_0x750ax4e[_0x5fb5[25]](_0x750ax40);var _0x750ax3;switch(_0x750ax3d){case _0x5fb5[181]:_0x750ax3=createDropdownFromApi(_0x5fb5[180],_0x750ax2,_0x5fb5[125],_0x5fb5[133],_0x750ax8);break;case _0x5fb5[183]:_0x750ax3=createDropdownFromApi(_0x5fb5[182],_0x750ax2,_0x5fb5[125],_0x5fb5[125],_0x750ax8);break;case _0x5fb5[185]:_0x750ax3=createDropdownFromApi(_0x5fb5[184],_0x750ax2,_0x5fb5[125],_0x5fb5[133],_0x750ax8);break;case _0x5fb5[187]:_0x750ax3=createDropdownFromApi(_0x5fb5[186],_0x750ax2,_0x5fb5[125],_0x5fb5[133],_0x750ax8);break;case _0x5fb5[189]:_0x750ax3=createDropdownFromApi(_0x5fb5[188],_0x750ax2,_0x5fb5[125],_0x5fb5[125],_0x750ax8);break;case _0x5fb5[191]:_0x750ax3=createDropdownFromApi(_0x5fb5[190],_0x750ax2,_0x5fb5[191],_0x5fb5[133],_0x750ax8,[_0x5fb5[191],_0x5fb5[189]],_0x5fb5[192]);break;case _0x5fb5[193]:_0x750ax3=createDropdownFromArray(ISPEECHASRMODEL,_0x750ax2);break;case _0x5fb5[194]:_0x750ax3=createDropdownFromArray(ISPEECHASRLANG,_0x750ax2);break;case _0x5fb5[195]:_0x750ax3=createDropdownFromArray(ISPEECHLANG,_0x750ax2);break;case _0x5fb5[196]:_0x750ax3=createDropdownFromArray(GOOGLETTSLANG,_0x750ax2);break;case _0x5fb5[199]:_0x750ax3=createGroupedDropdownFromApi(_0x5fb5[197],_0x750ax2,_0x5fb5[125],_0x5fb5[133],_0x750ax8,_0x5fb5[198]);break;case _0x5fb5[200]:_0x750ax3=createDropdownFromApi(_0x5fb5[140],_0x750ax2,_0x5fb5[125],_0x5fb5[133],_0x750ax8);break;case _0x5fb5[202]:_0x750ax3=createDropdownFromApi(_0x5fb5[201],_0x750ax2,_0x5fb5[125],_0x5fb5[133],_0x750ax8);break;case _0x5fb5[205]:_0x750ax3=createDropdownFromApi(_0x5fb5[203],_0x750ax2,_0x5fb5[204],_0x5fb5[133],_0x750ax8);break;case _0x5fb5[206]:;case _0x5fb5[207]:;case _0x5fb5[208]:;case _0x5fb5[209]:;case _0x5fb5[17]:;case _0x5fb5[212]:_0x750ax3=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax3[_0x5fb5[5]](_0x5fb5[3],_0x5fb5[210]);_0x750ax3[_0x5fb5[5]](_0x5fb5[211],0);_0x750ax3[_0x5fb5[5]](_0x5fb5[46],1000);_0x750ax3[_0x5fb5[5]](_0x5fb5[23],_0x750ax2);_0x750ax3[_0x5fb5[31]]=_0x5fb5[134];break;case _0x5fb5[21]:;case _0x5fb5[213]:;case _0x5fb5[214]:;case _0x5fb5[215]:;case _0x5fb5[217]:_0x750ax3=document[_0x5fb5[2]](_0x5fb5[83]);_0x750ax3[_0x5fb5[216]]=_0x750ax2;_0x750ax3[_0x5fb5[31]]=_0x5fb5[134];break;default:_0x750ax3=document[_0x5fb5[2]](_0x5fb5[1]);_0x750ax3[_0x5fb5[5]](_0x5fb5[23],_0x750ax2);_0x750ax3[_0x5fb5[31]]=_0x5fb5[134];break};_0x750ax3[_0x5fb5[5]](_0x5fb5[133],_0x750ax3e);var _0x750ax23=_0x750ax8[_0x5fb5[50]](_0x5fb5[169]);_0x750ax23[_0x5fb5[25]](_0x750ax3);if(mxResources[_0x5fb5[76]](_0x5fb5[218]+_0x750ax3d)){var _0x750ax55=_0x750ax8[_0x5fb5[50]](_0x5fb5[219]);_0x750ax55[_0x5fb5[31]]=_0x5fb5[220];mxUtils[_0x5fb5[78]](_0x750ax55,mxResources[_0x5fb5[76]](_0x5fb5[218]+_0x750ax3d));_0x750ax23[_0x5fb5[25]](_0x750ax55)};_0x750ax4e[_0x5fb5[25]](_0x750ax23);_0x750ax4d[_0x5fb5[25]](_0x750ax4e)};_0x750ax28[_0x5fb5[25]](_0x750ax4d);var _0x750ax35=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[135]),mxUtils[_0x5fb5[103]](this,function(_0x750ax36){for(var _0x750ax54=0;_0x750ax54<_0x750ax51[_0x5fb5[23]][_0x5fb5[178]][_0x5fb5[141]];_0x750ax54++){var _0x750ax3e=_0x5fb5[126]+_0x750ax51[_0x5fb5[23]][_0x5fb5[178]][_0x750ax54][_0x5fb5[125]];var _0x750ax3d=_0x750ax51[_0x5fb5[23]][_0x5fb5[178]][_0x750ax54][_0x5fb5[125]];console[_0x5fb5[94]](_0x750ax3d,document[_0x5fb5[221]](_0x750ax3e)[_0x5fb5[23]]);_0x750ax51[_0x5fb5[5]](_0x750ax3d,document[_0x5fb5[221]](_0x750ax3e)[_0x5fb5[23]])};_0x750ax52[_0x5fb5[222]](_0x750ax51);_0x750ax8[_0x5fb5[79]]()}));_0x750ax35[_0x5fb5[31]]=_0x5fb5[104];var _0x750ax38=mxUtils[_0x5fb5[80]](mxResources[_0x5fb5[76]](_0x5fb5[105]),function(){_0x750ax8[_0x5fb5[79]]()});_0x750ax38[_0x5fb5[31]]=_0x5fb5[106];_0x750ax29[_0x5fb5[25]](_0x750ax35);_0x750ax29[_0x5fb5[25]](_0x750ax38);_0x750ax26[_0x5fb5[25]](_0x750ax27);_0x750ax26[_0x5fb5[25]](_0x750ax28);_0x750ax26[_0x5fb5[25]](_0x750ax29);this[_0x5fb5[64]]=_0x750ax26}
\ No newline at end of file
+'use strict';
+/**
+ * $Id: Dialogs.js,v 1.5 2013-01-29 17:23:31 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new dialog.
+ */
+
+function createCheckbox(value) {
+       var input = document.createElement('input');
+       input.setAttribute('type', 'checkbox');
+       if (value) {
+               input.setAttribute('checked', true);
+       }
+       return input;
+}
+
+function createDropdownFromApi(path, value, option_name, option_value, editorUi, keys, pattern) {
+       var req = new XMLHttpRequest();
+       req.open('GET', path, false); // `false` makes the request synchronous
+       req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+       req.send(null);
+       var res = [];
+       if (req.status === 200) {
+               res = JSON.parse(req.response);
+       }
+       var input = document.createElement('select');
+       var option = document.createElement('option');
+       option.text = '-- None --';
+       option.value = '-1';
+       input.appendChild(option);
+       res.rows.forEach(function(elem) {
+               option = document.createElement('option');
+               option.text = elem[option_name];
+               if (keys && pattern) {
+                       keys.forEach(function(key) {
+                               pattern = pattern.replace('%' + key + '%', elem[key]);
+                       });
+                       option.value = pattern;
+                       option.selected = (pattern == value);
+               } else {
+                       option.value = elem[option_value];
+                       option.selected = (elem[option_value] == value);
+               }
+               input.appendChild(option);
+       });
+       input.className = 'form-control select2';
+
+       return input;
+}
+
+function createGroupedDropdownFromApi(path, value, option_name, option_value, editorUi, associationField) {
+       var req = new XMLHttpRequest();
+       req.open('GET', path, false); // `false` makes the request synchronous
+       req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+       req.send(null);
+       var res = [];
+       if (req.status === 200) {
+               res = JSON.parse(req.response);
+       }
+       var input = document.createElement('select');
+       var option = document.createElement('option');
+       option.text = '-- None --';
+       option.value = '0';
+       input.appendChild(option);
+       var mainFilter = {};
+       var groupFilter = {};
+       mainFilter[associationField] = null;
+       var mainValues = _.filter(res.rows, mainFilter);
+       var groupValues = {};
+       mainValues.forEach(function(elem) {
+               option = document.createElement('option');
+               option.className = 'select-group-father';
+               option.text = elem[option_name].toUpperCase();
+               option.value = elem[option_value];
+               option.selected = (elem[option_value] == value);
+               input.appendChild(option);
+               groupFilter[associationField] = elem[option_value];
+               groupValues = _.filter(res.rows, groupFilter);
+               groupValues.forEach(function(elem) {
+                       option = document.createElement('option');
+                       option.className = 'select-group-son';
+                       option.text = '-' + _.capitalize(elem[option_name]);
+                       option.value = elem[option_value];
+                       option.selected = (elem[option_value] == value);
+                       input.appendChild(option);
+               });
+       })
+       input.className = 'form-control select2';
+
+       return input;
+}
+
+function createDropdownFromArray(array, value) {
+       var input = document.createElement('select');
+
+       for (var item in array) {
+               var option = document.createElement('option');
+               option.text = array[item];
+               option.value = item;
+               if (value > 0 || value != '')
+                       option.selected = (value === item) ? true : false;
+
+               input.appendChild(option);
+       }
+
+       input.className = 'form-control select2';
+
+       return input;
+}
+
+function Dialog(editorUi, elt, w, h, modal, closable, onClose) {
+       var dx = 0;
+
+       if (mxClient.IS_IE && document.documentMode != 9) {
+               dx = 60;
+       }
+
+       w += dx;
+       h += dx;
+
+       var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
+       var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight,
+               document.documentElement.scrollHeight) - h) / 3));
+
+       var div = editorUi.createDiv('geDialog');
+       div.className = 'modal fade in center';
+       div.style.display = 'block';
+       div.style.paddingRight = '12px';
+       // div.style.width = w + 'px';
+       // div.style.height = h + 'px';
+       // div.style.left = left + 'px';
+       // div.style.top = top + 'px';
+
+       var divModalDialog = editorUi.createDiv('geModalDialog');
+       divModalDialog.className = 'modal-dialog';
+
+       divModalDialog.appendChild(elt);
+       div.appendChild(divModalDialog);
+
+       if (this.bg == null) {
+               this.bg = editorUi.createDiv('background');
+               this.bg.className = 'modal-backdrop fade in';
+
+               if (mxClient.IS_QUIRKS) {
+                       new mxDivResizer(this.bg);
+               }
+       }
+
+       if (modal) {
+               document.body.appendChild(this.bg);
+       }
+
+       document.body.appendChild(div);
+
+       this.onDialogClose = onClose;
+       this.container = div;
+};
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function() {
+       if (this.onDialogClose != null) {
+               this.onDialogClose();
+               this.onDialogClose = null;
+       }
+
+       this.container.parentNode.removeChild(this.container);
+       this.bg.parentNode.removeChild(this.bg);
+};
+
+/**
+ * Constructs a new open dialog.
+ */
+function ImportDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('import') + ' XML');
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-12');
+
+       var textarea = document.createElement('textarea');
+       textarea.style.width = '100%';
+       textarea.style.height = '374px';
+
+       var input = document.createElement('input');
+       input.type = 'file';
+       input.setAttribute('accept', 'text/xml');
+
+       input.addEventListener('change', function readSingleFile(evt) {
+               //Retrieve the first (and only!) File from the FileList object
+               var f = evt.target.files[0];
+               console.log(f);
+               if (f) {
+                       if (f.type === 'text/xml') {
+                               var r = new FileReader();
+                               r.onload = function(e) {
+                                       var contents = e.target.result;
+                                       mxUtils.write(textarea, contents);
+                               };
+                               r.readAsText(f);
+                       } else {
+                               alert('Failed to load format file');
+                       }
+               } else {
+                       alert('Failed to load file');
+               }
+       }, false);
+
+       col1.appendChild(input);
+       col1.appendChild(textarea);
+
+       row.appendChild(col1);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('import'), mxUtils.bind(this,
+               function(data) {
+                       var doc = mxUtils.parseXml(textarea.value);
+                       editorUi.editor.setGraphXml(doc.documentElement);
+                       editorUi.hideDialog();
+               }));
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+
+};
+
+/**
+ * Constructs a new about dialog.
+ */
+function AboutDialog(editorUi) {
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('about') + ' Cally Square');
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var img = document.createElement('img');
+       img.style.border = '0px';
+       img.setAttribute('width', '176');
+       img.setAttribute('width', '151');
+       img.setAttribute('src', IMAGE_PATH + '/logo.png');
+       body.appendChild(img);
+       mxUtils.br(body);
+       mxUtils.write(body, 'Powered by Xenialab ' + mxClient.VERSION);
+       mxUtils.br(body);
+       var link = document.createElement('a');
+       link.setAttribute('href', 'http://www.callysquare.com/');
+       link.setAttribute('target', '_blank');
+       mxUtils.write(link, 'www.callysquare.com');
+       body.appendChild(link);
+       mxUtils.br(body);
+       mxUtils.br(body);
+       //--- END BODY
+
+       var close = mxUtils.button(mxResources.get('close'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function SaveDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('saveAs'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var name = 'name';
+       var id = '_' + name;
+       var value = editorUi.editor.getOrCreateFilename();
+
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get(name));
+       col1.appendChild(label);
+
+       var select = document.createElement('input');
+       select.setAttribute('value', value + '_copy');
+       select.setAttribute('id', id)
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), function() {
+               editorUi.saveAs(select.value);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function NewDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('new'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var name = 'name';
+       var id = '_' + name;
+       var value = editorUi.editor.getOrCreateFilename();
+
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get(name));
+       col1.appendChild(label);
+
+       var select = document.createElement('input');
+       select.setAttribute('value', value + '_new');
+       select.setAttribute('id', id)
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('new'), function() {
+               editorUi.new(select.value);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function VariableDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('variable'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var name = 'name';
+       var id = '_' + name;
+       var value = editorUi.editor.getOrCreateFilename();
+
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get(name));
+       col1.appendChild(label);
+
+       var select = document.createElement('input');
+       select.setAttribute('value', 'variable name');
+       select.setAttribute('id', id)
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('new'), function() {
+               editorUi.variable(select.value);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new save dialog.
+ */
+function OpenDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('open'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get('name'));
+       col1.appendChild(label);
+
+       var req = new XMLHttpRequest();
+       req.open('GET', '/api/square/projects', false); // `false` makes the request synchronous
+       req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+       req.send(null);
+       var res = [];
+       if (req.status === 200) {
+               res = JSON.parse(req.response);
+       }
+
+       var select = document.createElement('select');
+
+       for (var j = 0; j < res.length; j++) {
+               var option = document.createElement('option');
+               option.text = res[j].name;
+               option.value = res[j].id;
+               select.appendChild(option);
+       }
+       select.className = 'form-control';
+       col2.appendChild(select);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('open'), function() {
+               console.log(select);
+               console.log(select.value);
+               window.open('square/project/' + select.value, '_blank');
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+/**
+ * Constructs a new rename dialog.
+ */
+function RenameDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('rename'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-4');
+       var col2 = editorUi.createDiv('col-md-8');
+
+       var label = document.createElement('label');
+       label.className = 'control-label pull-right';
+       mxUtils.write(label, mxResources.get('name'));
+       col1.appendChild(label);
+       var name = editorUi.editor.filename;
+       var input = document.createElement('input');
+       input.setAttribute('value', name);
+       input.className = 'form-control';
+
+       col2.appendChild(input);
+
+       row.appendChild(col1);
+       row.appendChild(col2);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), function() {
+               var req = new XMLHttpRequest();
+
+               req.open("PUT", SAVE_URL + editorUi.editor.data.id, true);
+               req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+               req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
+               req.send('name=' + input.value);
+
+               req.onload = function(e) {
+                       if (req.status === 200) {
+                               editorUi.editor.setStatus('Project successfully renamed');
+                               editorUi.editor.filename = input.value;
+
+                       } else {
+                               console.log(req.response);
+                               editorUi.editor.setStatus(JSON.parse(req.response).errors[0].message);
+                       }
+               }
+               req.onerror = function(e) {
+                       mxUtils.alert(req.statusText);
+               };
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+       //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+};
+
+/**
+ * Constructs a new edit file dialog.
+ */
+function EditFileDialog(editorUi) {
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('edit'));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var row = editorUi.createDiv('row');
+       var col1 = editorUi.createDiv('col-md-12');
+
+       var textarea = document.createElement('textarea');
+       textarea.style.width = '100%';
+       textarea.style.height = '374px';
+       textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
+
+       // Enables dropping files
+       if (fileSupport) {
+               function handleDrop(evt) {
+                       evt.stopPropagation();
+                       evt.preventDefault();
+
+                       if (evt.dataTransfer.files.length > 0) {
+                               var file = evt.dataTransfer.files[0];
+
+                               var reader = new FileReader();
+                               reader.onload = function(e) {
+                                       textarea.value = e.target.result;
+                               };
+                               reader.readAsText(file);
+                       }
+               };
+
+               function handleDragOver(evt) {
+                       evt.stopPropagation();
+                       evt.preventDefault();
+               };
+
+               // Setup the dnd listeners.
+               textarea.addEventListener('dragover', handleDragOver, false);
+               textarea.addEventListener('drop', handleDrop, false);
+       }
+       col1.appendChild(textarea);
+
+       row.appendChild(col1);
+       body.appendChild(row);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), function() {
+               var doc = mxUtils.parseXml(textarea.value);
+               editorUi.editor.setGraphXml(doc.documentElement);
+               editorUi.hideDialog();
+       });
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
+
+/**
+ * Constructs a new export dialog.
+ */
+function ExportDialog(editorUi) {
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body form');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('export') + ' XML');
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var form = editorUi.createDiv('form-horizontal form-row-seperated');
+       var group = editorUi.createDiv('form-group last');
+
+       var label = document.createElement('label');
+       label.className = 'col-sm-4 control-label';
+       mxUtils.write(label, mxResources.get('filename'));
+
+       var input = document.createElement('input');
+       input.setAttribute('value', editorUi.editor.getOrCreateFilename());
+       input.className = 'form-control';
+
+       var div = editorUi.createDiv('col-sm-8');
+       div.appendChild(input);
+
+       group.appendChild(label);
+       group.appendChild(div);
+       form.appendChild(group);
+
+       body.appendChild(form);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('export'), mxUtils.bind(this,
+               function(data) {
+                       editorUi.save(false);
+
+                       var xml = encodeURIComponent(mxUtils.getXml(editorUi.editor.getGraphXml()));
+                       new mxXmlRequest(SAVE_URL + editorUi.editor.data.id + '/download',
+                               'filename=' + input.value, 'GET').simulate(document, "_blank");
+                       editorUi.hideDialog();
+               }));
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
+
+/**
+ * Giuseppe Careri
+ * Constructs a new general dialog.
+ */
+function GeneralDialog(editorUi, cell) {
+       var graph = editorUi.editor.graph;
+
+       var content = editorUi.createDiv('modal-content');
+       var header = editorUi.createDiv('modal-header');
+       var body = editorUi.createDiv('modal-body form modal-body-scroll');
+       var footer = editorUi.createDiv('modal-footer');
+
+       //--- START HEADER
+       var title = editorUi.createHeader('h4');
+       mxUtils.write(title, mxResources.get('edit') + ' ' + mxResources.get(cell.value
+               .nodeName));
+
+       var x = mxUtils.button('', function() {
+               editorUi.hideDialog();
+       });
+       x.className = 'close';
+
+       header.appendChild(x);
+       header.appendChild(title);
+       //--- END HEADER
+
+       //--- START BODY
+       var length = cell.value.attributes.length;
+       var form = editorUi.createDiv('form-horizontal form-row-seperated');
+
+       for (var i = 0; i < length; i++) {
+               var name = cell.value.attributes[i].name;
+               var id = '_' + name;
+               var value = cell.value.attributes[i].value;
+
+               var group = editorUi.createDiv((i == length - 1) ? 'form-group last' :
+                       'form-group');
+
+               var label = document.createElement('label');
+               label.className = 'col-sm-4 control-label';
+               mxUtils.write(label, mxResources.get(name));
+               group.appendChild(label);
+
+               var input;
+
+               switch (name) {
+                       case 'sip_id':
+                               input = createDropdownFromApi('/api/agents', value, 'name', 'id', editorUi);
+                               break;
+                       case 'queue_id':
+                               input = createDropdownFromApi('/api/voice/queues', value, 'name', 'name', editorUi);
+                               break;
+                       case 'trunk_id':
+                               input = createDropdownFromApi('/api/trunks', value, 'name', 'id', editorUi);
+                               break;
+                       case 'variable_id':
+                               input = createDropdownFromApi('/api/variables', value, 'name', 'id', editorUi);
+                               break;
+                       case 'context':
+                               input = createDropdownFromApi('/api/voice/contexts', value, 'name', 'name', editorUi);
+                               break;
+                       case 'mailbox':
+                               input = createDropdownFromApi('/api/voice/voicemails', value, 'mailbox', 'id', editorUi, ['mailbox', 'context'], '%mailbox%@%context%');
+                               break;
+                       case 'model':
+                               input = createDropdownFromArray(ISPEECHASRMODEL, value);
+                               break;
+                       case 'ispeech_asr_language':
+                               input = createDropdownFromArray(ISPEECHASRLANG, value);
+                               break;
+                       case 'ispeech_tts_language':
+                               input = createDropdownFromArray(ISPEECHLANG, value);
+                               break;
+                       case 'google_tts_language':
+                               input = createDropdownFromArray(GOOGLETTSLANG, value);
+                               break;
+                       case 'interval_id':
+                               input = createGroupedDropdownFromApi('/api/intervals', value, 'name', 'id', editorUi, 'IntervalId');
+                               break;
+                       case 'project_id':
+                               input = createDropdownFromApi('/api/square/projects', value, 'name', 'id', editorUi);
+                               break;
+                       case 'odbc_id':
+                               input = createDropdownFromApi('/api/square/odbc', value, 'name', 'id', editorUi);
+                               break;
+                       case 'file_id':
+                               input = createDropdownFromApi('/api/sounds', value, 'display_name', 'id', editorUi);
+                               break;
+                       case 'timeout':
+                       case 'digit':
+                       case 'mindigit':
+                       case 'maxdigit':
+                       case 'response':
+                       case 'retry':
+                               input = document.createElement('input');
+                               input.setAttribute('type', 'number');
+                               input.setAttribute('min', 0);
+                               input.setAttribute('max', 1000);
+                               input.setAttribute('value', value);
+                               input.className = 'form-control';
+                               break;
+                       case 'text':
+                       case 'key':
+                       case 'query':
+                       case 'condition':
+                       case 'command':
+                               input = document.createElement('textarea');
+                               input.innerHTML = value;
+                               input.className = 'form-control';
+                               break;
+                       default:
+                               input = document.createElement('input');
+                               input.setAttribute('value', value);
+                               input.className = 'form-control';
+                               break;
+               }
+
+               input.setAttribute('id', id)
+
+               var div = editorUi.createDiv('col-sm-8');
+               div.appendChild(input);
+
+               // Help
+               if (mxResources.get('help_' + name)) {
+                       var help = editorUi.createDiv('p');
+                       help.className = 'help-block';
+                       mxUtils.write(help, mxResources.get('help_' + name));
+                       div.appendChild(help);
+               }
+
+               group.appendChild(div);
+               form.appendChild(group);
+       }
+       body.appendChild(form);
+       //--- END BODY
+
+       //--- START FOOTER
+       var save = mxUtils.button(mxResources.get('save'), mxUtils.bind(this,
+               function(data) {
+                       for (var i = 0; i < cell.value.attributes.length; i++) {
+                               var id = '_' + cell.value.attributes[i].name;
+                               var name = cell.value.attributes[i].name;
+                               console.log(name, document.getElementById(id).value);
+                               cell.setAttribute(name, document.getElementById(id).value);
+                       };
+                       graph.refresh(cell);
+                       editorUi.hideDialog();
+               }));
+       save.className = 'btn blue';
+
+       var close = mxUtils.button(mxResources.get('cancel'), function() {
+               editorUi.hideDialog();
+       });
+       close.className = 'btn default';
+
+       footer.appendChild(save);
+       footer.appendChild(close);
+       //--- END FOOTER
+
+       //--- START CONTENT
+       content.appendChild(header);
+       content.appendChild(body);
+       content.appendChild(footer);
+       //--- END CONTENT
+
+       this.container = content;
+};
index 8c6106c..9858989 100644 (file)
@@ -1 +1,888 @@
-var _0x1a9a=["\x49\x53\x5F\x54\x4F\x55\x43\x48","\x73\x74\x6F\x72\x61\x67\x65","\x6C\x6F\x63\x61\x6C","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x46\x69\x6C\x65","\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72","\x46\x69\x6C\x65\x4C\x69\x73\x74","\x74\x6F\x75\x63\x68","\x31","\x6F\x70\x65\x6E\x65\x72","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x61\x6C\x6C","\x69\x6E\x69\x74","\x69\x6E\x69\x74\x53\x74\x65\x6E\x63\x69\x6C\x52\x65\x67\x69\x73\x74\x72\x79","\x67\x72\x61\x70\x68","\x6F\x75\x74\x6C\x69\x6E\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x74\x61\x74\x75\x73","","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x64\x72\x61\x77\x69\x6E\x67","\x67\x65\x74","\x2E\x78\x6D\x6C","\x67\x65\x74\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x67\x72\x61\x70\x68\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x70\x70\x6C\x79","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x73\x4C\x6F\x73\x74","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E\x64","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x2F\x67\x72\x69\x64\x2E\x67\x69\x66","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x73\x63\x61\x6C\x65","\x76\x69\x65\x77","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x30","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x67\x75\x69\x64\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x66\x6F\x6C\x64","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x78","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x64\x78","\x79","\x64\x79","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x63\x6F\x64\x65","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x65\x6E\x63\x6F\x64\x65","\x72\x6F\x75\x6E\x64","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x6E\x6F\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x66\x69\x6C\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x23\x65\x62\x65\x62\x65\x62","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x73\x6F\x6C\x69\x64","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x23\x65\x35\x65\x35\x65\x35","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x31\x70\x78","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x30\x70\x78","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x61\x75\x74\x6F","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x6E\x6F\x64\x65","\x49\x53\x5F\x49\x45\x36","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x67\x72\x61\x70\x68\x65\x64\x69\x74\x6F\x72\x2D\x69\x65\x36\x2E\x63\x73\x73","\x6C\x69\x6E\x6B","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x61\x64\x64","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x23\x64\x30\x64\x30\x64\x30","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x39\x39\x63\x63\x66\x66","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x38\x38\x63\x66","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x61\x38\x66\x66","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x63\x65\x65\x37\x66\x66","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x47\x55\x49\x44\x45\x5F\x43\x4F\x4C\x4F\x52","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x23\x63\x30\x63\x30\x63\x30","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x77\x68\x69\x74\x65","\x23\x63\x61\x63\x61\x63\x61","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x6D\x61\x78","\x63\x65\x69\x6C","\x70\x61\x6E\x47\x72\x61\x70\x68","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65","\x73\x72\x63","\x64\x65\x73\x74\x72\x6F\x79","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x72\x65\x64\x72\x61\x77","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x68\x69\x64\x65","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x62\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x69\x6E\x74\x73","\x69\x73\x44\x61\x73\x68\x65\x64","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x61\x64\x64\x50\x69\x70\x65","\x73\x70\x6C\x69\x63\x65","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x72\x65\x6C\x61\x74\x69\x76\x65","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6F\x6E\x73\x75\x6D\x65","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C","\x67\x65\x74\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x65\x64\x69\x74","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x67\x65\x74\x56\x69\x65\x77","\x63\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x74\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x6C\x69\x62\x72\x61\x72\x69\x65\x73","\x70\x61\x63\x6B\x61\x67\x65\x73","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x67\x65\x74\x42\x61\x73\x65\x6E\x61\x6D\x65\x46\x6F\x72\x53\x74\x65\x6E\x63\x69\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x2E\x6A\x73","\x6C\x6F\x61\x64","\x67\x65\x74\x54\x65\x78\x74","\x2F","\x2E","\x73\x70\x6C\x69\x74","\x6D\x78\x67\x72\x61\x70\x68","\x67\x65\x74\x58\x6D\x6C","\x70\x61\x72\x73\x65\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6E\x61\x6D\x65","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x5F","\x72\x65\x70\x6C\x61\x63\x65","\x61\x64\x64\x53\x74\x65\x6E\x63\x69\x6C","\x77","\x68","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x70\x72\x6F\x64\x75\x63\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x72","\x64\x6F\x6E\x65","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x65\x78\x65\x63\x75\x74\x65","\x73\x65\x74\x44\x61\x74\x61","\x64\x61\x74\x61","\x65\x72\x72\x6F\x72","\x63\x61\x6E\x63\x65\x6C","\x61\x6C\x65\x72\x74"];var useLocalStorage=(mxClient[_0x1a9a[0]]||urlParams[_0x1a9a[1]]==_0x1a9a[2])&& typeof (localStorage)!=_0x1a9a[3];var fileSupport=window[_0x1a9a[4]]!=null&&window[_0x1a9a[5]]!=null&&window[_0x1a9a[6]]!=null;var touchStyle=mxClient[_0x1a9a[0]]||urlParams[_0x1a9a[7]]==_0x1a9a[8];var counter=0;try{var op=window;while(op[_0x1a9a[9]]!=null&&!isNaN(op[_0x1a9a[9]][_0x1a9a[10]])){op=op[_0x1a9a[9]]};if(op!=null){op[_0x1a9a[10]]++;counter=op[_0x1a9a[10]]}}catch(e){};Editor=function(){mxEventSource[_0x1a9a[11]](this);this[_0x1a9a[12]]();this[_0x1a9a[13]]();this[_0x1a9a[14]]= new Graph();this[_0x1a9a[15]]= new mxOutline(this[_0x1a9a[14]]);this[_0x1a9a[15]][_0x1a9a[16]]=true;this[_0x1a9a[17]]=this[_0x1a9a[18]]();this[_0x1a9a[19]]=_0x1a9a[20];this[_0x1a9a[21]]=null;this[_0x1a9a[22]]=function(){return this[_0x1a9a[21]]||mxResources[_0x1a9a[24]](_0x1a9a[23],[counter])+_0x1a9a[25]};this[_0x1a9a[26]]=function(){return this[_0x1a9a[21]]};this[_0x1a9a[27]]=function(_0x6bbcx6){this[_0x1a9a[19]]=_0x6bbcx6;this[_0x1a9a[29]]( new mxEventObject(_0x1a9a[28]))};this[_0x1a9a[30]]=function(){return this[_0x1a9a[19]]};this[_0x1a9a[31]]=false;this[_0x1a9a[32]]=function(){this[_0x1a9a[31]]=true};this[_0x1a9a[14]][_0x1a9a[36]]()[_0x1a9a[35]](mxEvent.CHANGE,mxUtils[_0x1a9a[34]](this,function(){this[_0x1a9a[32]][_0x1a9a[33]](this,arguments)}));window[_0x1a9a[37]]=mxUtils[_0x1a9a[34]](this,function(){if(this[_0x1a9a[31]]){return mxResources[_0x1a9a[24]](_0x1a9a[38])}});this[_0x1a9a[14]][_0x1a9a[39]]=false;this[_0x1a9a[14]][_0x1a9a[40]]=true;this[_0x1a9a[14]][_0x1a9a[41]]=null};mxUtils[_0x1a9a[42]](Editor,mxEventSource);Editor[_0x1a9a[44]][_0x1a9a[43]]=IMAGE_PATH+_0x1a9a[45];Editor[_0x1a9a[44]][_0x1a9a[46]]=IMAGE_PATH+_0x1a9a[47];Editor[_0x1a9a[44]][_0x1a9a[48]]=function(_0x6bbcx7){var _0x6bbcx8= new mxCodec(_0x6bbcx7[_0x1a9a[49]]);if(_0x6bbcx7[_0x1a9a[50]]==_0x1a9a[51]){this[_0x1a9a[14]][_0x1a9a[53]][_0x1a9a[52]]=1;this[_0x1a9a[14]][_0x1a9a[54]]=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[55])!=_0x1a9a[57];this[_0x1a9a[14]][_0x1a9a[59]][_0x1a9a[58]]=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[60])!=_0x1a9a[57];this[_0x1a9a[14]][_0x1a9a[62]](_0x6bbcx7[_0x1a9a[56]](_0x1a9a[61])!=_0x1a9a[57]);this[_0x1a9a[14]][_0x1a9a[64]](_0x6bbcx7[_0x1a9a[56]](_0x1a9a[63])!=_0x1a9a[57]);this[_0x1a9a[14]][_0x1a9a[65]]=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[66])!=_0x1a9a[57];this[_0x1a9a[14]][_0x1a9a[40]]=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[40])!=_0x1a9a[57];if(!this[_0x1a9a[14]][_0x1a9a[40]]){this[_0x1a9a[14]][_0x1a9a[68]][_0x1a9a[67]]=0;this[_0x1a9a[14]][_0x1a9a[68]][_0x1a9a[69]]=0;this[_0x1a9a[14]][_0x1a9a[53]][_0x1a9a[71]][_0x1a9a[70]]=Number(_0x6bbcx7[_0x1a9a[56]](_0x1a9a[72])||0);this[_0x1a9a[14]][_0x1a9a[53]][_0x1a9a[71]][_0x1a9a[73]]=Number(_0x6bbcx7[_0x1a9a[56]](_0x1a9a[74])||0)};this[_0x1a9a[14]][_0x1a9a[75]]=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[76])==_0x1a9a[8];this[_0x1a9a[14]][_0x1a9a[77]]=this[_0x1a9a[14]][_0x1a9a[75]];this[_0x1a9a[14]][_0x1a9a[78]]=this[_0x1a9a[14]][_0x1a9a[77]];var _0x6bbcx9=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[79]);if(_0x6bbcx9!=null){this[_0x1a9a[14]][_0x1a9a[79]]=_0x6bbcx9}else {this[_0x1a9a[14]][_0x1a9a[79]]=1.5};var _0x6bbcxa=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[80]);var _0x6bbcxb=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[81]);if(_0x6bbcxa!=null&&_0x6bbcxb!=null){this[_0x1a9a[14]][_0x1a9a[82]]= new mxRectangle(0,0,parseFloat(_0x6bbcxa),parseFloat(_0x6bbcxb));this[_0x1a9a[15]][_0x1a9a[15]][_0x1a9a[82]]=this[_0x1a9a[14]][_0x1a9a[82]]};var _0x6bbcxc=_0x6bbcx7[_0x1a9a[56]](_0x1a9a[41]);if(_0x6bbcxc!=null&&_0x6bbcxc[_0x1a9a[83]]>0){this[_0x1a9a[14]][_0x1a9a[41]]=_0x6bbcxc};_0x6bbcx8[_0x1a9a[84]](_0x6bbcx7,this[_0x1a9a[14]][_0x1a9a[36]]());this[_0x1a9a[85]]()}};Editor[_0x1a9a[44]][_0x1a9a[86]]=function(){var _0x6bbcxd= new mxCodec(mxUtils[_0x1a9a[87]]());var _0x6bbcx7=_0x6bbcxd[_0x1a9a[88]](this[_0x1a9a[14]][_0x1a9a[36]]());if(this[_0x1a9a[14]][_0x1a9a[53]][_0x1a9a[71]][_0x1a9a[70]]!=0||this[_0x1a9a[14]][_0x1a9a[53]][_0x1a9a[71]][_0x1a9a[73]]!=0){_0x6bbcx7[_0x1a9a[90]](_0x1a9a[72],Math[_0x1a9a[89]](this[_0x1a9a[14]][_0x1a9a[53]][_0x1a9a[71]][_0x1a9a[70]]*100)/100);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[74],Math[_0x1a9a[89]](this[_0x1a9a[14]][_0x1a9a[53]][_0x1a9a[71]][_0x1a9a[73]]*100)/100)};_0x6bbcx7[_0x1a9a[90]](_0x1a9a[55],(this[_0x1a9a[14]][_0x1a9a[91]]())?_0x1a9a[8]:_0x1a9a[57]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[60],(this[_0x1a9a[14]][_0x1a9a[59]][_0x1a9a[58]])?_0x1a9a[8]:_0x1a9a[57]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[60],(this[_0x1a9a[14]][_0x1a9a[59]][_0x1a9a[58]])?_0x1a9a[8]:_0x1a9a[57]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[61],(this[_0x1a9a[14]][_0x1a9a[93]][_0x1a9a[92]]())?_0x1a9a[8]:_0x1a9a[57]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[63],(this[_0x1a9a[14]][_0x1a9a[94]][_0x1a9a[92]]())?_0x1a9a[8]:_0x1a9a[57]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[66],(this[_0x1a9a[14]][_0x1a9a[65]])?_0x1a9a[8]:_0x1a9a[57]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[76],(this[_0x1a9a[14]][_0x1a9a[75]])?_0x1a9a[8]:_0x1a9a[57]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[79],this[_0x1a9a[14]][_0x1a9a[79]]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[80],this[_0x1a9a[14]][_0x1a9a[82]][_0x1a9a[95]]);_0x6bbcx7[_0x1a9a[90]](_0x1a9a[81],this[_0x1a9a[14]][_0x1a9a[82]][_0x1a9a[96]]);if(!this[_0x1a9a[14]][_0x1a9a[40]]){_0x6bbcx7[_0x1a9a[90]](_0x1a9a[40],_0x1a9a[57])};if(this[_0x1a9a[14]][_0x1a9a[41]]!=null){_0x6bbcx7[_0x1a9a[90]](_0x1a9a[41],this[_0x1a9a[14]][_0x1a9a[41]])};return _0x6bbcx7};Editor[_0x1a9a[44]][_0x1a9a[85]]=function(){var _0x6bbcxe=this[_0x1a9a[14]];var _0x6bbcxf=this[_0x1a9a[15]];if(_0x6bbcxe[_0x1a9a[68]]!=null&&_0x6bbcxf[_0x1a9a[15]][_0x1a9a[68]]!=null){if(_0x6bbcxe[_0x1a9a[41]]!=null){if(_0x6bbcxe[_0x1a9a[41]]==_0x1a9a[97]){_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[98]]=_0x1a9a[100]}else {if(_0x6bbcxe[_0x1a9a[53]][_0x1a9a[101]]!=null){_0x6bbcxe[_0x1a9a[53]][_0x1a9a[101]][_0x1a9a[102]]=_0x6bbcxe[_0x1a9a[41]];_0x6bbcxe[_0x1a9a[53]][_0x1a9a[101]][_0x1a9a[103]]()};_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[98]]=_0x6bbcxe[_0x1a9a[41]]}}else {_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[98]]=_0x1a9a[20]};if(_0x6bbcxe[_0x1a9a[75]]){_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[98]]=_0x1a9a[104];_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[105]]=_0x1a9a[106];_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[107]]=_0x1a9a[108];_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[109]]=_0x1a9a[110];_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[111]]=_0x1a9a[110];_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[112]]=_0x1a9a[113];_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[114]]=_0x1a9a[113]}else {_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[115]]=_0x1a9a[20]};_0x6bbcxf[_0x1a9a[15]][_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[98]]=_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[98]];if(_0x6bbcxf[_0x1a9a[15]][_0x1a9a[75]]!=_0x6bbcxe[_0x1a9a[75]]||_0x6bbcxf[_0x1a9a[15]][_0x1a9a[79]]!=_0x6bbcxe[_0x1a9a[79]]){_0x6bbcxf[_0x1a9a[15]][_0x1a9a[79]]=_0x6bbcxe[_0x1a9a[79]];_0x6bbcxf[_0x1a9a[15]][_0x1a9a[75]]=_0x6bbcxe[_0x1a9a[75]];_0x6bbcxf[_0x1a9a[15]][_0x1a9a[53]][_0x1a9a[116]]()};if(_0x6bbcxe[_0x1a9a[40]]&&_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[117]]==_0x1a9a[118]&& !touchStyle){_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[117]]=_0x1a9a[119]}else {if(!_0x6bbcxe[_0x1a9a[40]]||touchStyle){_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[117]]=_0x1a9a[118]}};var _0x6bbcx10=(mxClient[_0x1a9a[120]]&&document[_0x1a9a[121]]>=9)?_0x1a9a[122]+this[_0x1a9a[46]]+_0x1a9a[123]:_0x1a9a[97];_0x6bbcxe[_0x1a9a[68]][_0x1a9a[99]][_0x1a9a[124]]=(!_0x6bbcxe[_0x1a9a[75]]&&_0x6bbcxe[_0x1a9a[91]]())?_0x1a9a[122]+this[_0x1a9a[43]]+_0x1a9a[123]:_0x6bbcx10;if(_0x6bbcxe[_0x1a9a[53]][_0x1a9a[101]]!=null){_0x6bbcxe[_0x1a9a[53]][_0x1a9a[101]][_0x1a9a[125]][_0x1a9a[99]][_0x1a9a[124]]=(this[_0x1a9a[14]][_0x1a9a[91]]())?_0x1a9a[122]+this[_0x1a9a[43]]+_0x1a9a[123]:_0x1a9a[97]}}};Editor[_0x1a9a[44]][_0x1a9a[12]]=function(){if(mxClient[_0x1a9a[126]]){mxClient[_0x1a9a[129]](_0x1a9a[127],CSS_PATH+_0x1a9a[128])};mxResources[_0x1a9a[130]]=false;mxResources[_0x1a9a[131]](RESOURCE_BASE);mxConstants[_0x1a9a[132]]=0.3;var _0x6bbcx11=mxConnectionHandler[_0x1a9a[44]][_0x1a9a[133]];mxConnectionHandler[_0x1a9a[44]][_0x1a9a[133]]=function(){var _0x6bbcx12=_0x6bbcx11[_0x1a9a[33]](this,arguments);_0x6bbcx12[_0x1a9a[134]]=mxUtils[_0x1a9a[34]](this,function(_0x6bbcx13,_0x6bbcx14){if(this[_0x1a9a[135]]()){return true};return mxCellMarker[_0x1a9a[44]][_0x1a9a[134]][_0x1a9a[33]](_0x6bbcx12,arguments)});return _0x6bbcx12};mxConstants[_0x1a9a[136]]=_0x1a9a[137];mxConstants[_0x1a9a[138]]=_0x1a9a[139];mxConstants[_0x1a9a[140]]=_0x1a9a[141];mxConstants[_0x1a9a[142]]=_0x1a9a[143];mxConstants[_0x1a9a[144]]=_0x1a9a[143];mxConstants[_0x1a9a[145]]=_0x1a9a[139];mxConstants[_0x1a9a[146]]=_0x1a9a[143];mxConstants[_0x1a9a[147]]=_0x1a9a[148];mxConstants[_0x1a9a[149]]=_0x1a9a[143];mxConstants[_0x1a9a[150]]=_0x1a9a[143];mxConstants[_0x1a9a[151]]=_0x1a9a[148];mxConstants[_0x1a9a[152]]=_0x1a9a[141];mxGraph[_0x1a9a[44]][_0x1a9a[153]]=_0x1a9a[154];mxGraph[_0x1a9a[44]][_0x1a9a[79]]=1;mxRubberband[_0x1a9a[44]][_0x1a9a[155]]=30;mxGraphView[_0x1a9a[44]][_0x1a9a[156]]=function(_0x6bbcx15){return  new mxRectangleShape(_0x6bbcx15,this[_0x1a9a[14]][_0x1a9a[41]]||_0x1a9a[157],_0x1a9a[158])};mxGraphView[_0x1a9a[44]][_0x1a9a[159]]=function(){var _0x6bbcx16=this[_0x1a9a[160]]();var _0x6bbcx17=(_0x6bbcx16[_0x1a9a[95]]>0)?_0x6bbcx16[_0x1a9a[70]]/this[_0x1a9a[52]]-this[_0x1a9a[71]][_0x1a9a[70]]:0;var _0x6bbcx18=(_0x6bbcx16[_0x1a9a[96]]>0)?_0x6bbcx16[_0x1a9a[73]]/this[_0x1a9a[52]]-this[_0x1a9a[71]][_0x1a9a[73]]:0;var _0x6bbcx19=_0x6bbcx16[_0x1a9a[95]]/this[_0x1a9a[52]];var _0x6bbcx1a=_0x6bbcx16[_0x1a9a[96]]/this[_0x1a9a[52]];var _0x6bbcx1b=this[_0x1a9a[14]][_0x1a9a[82]];var _0x6bbcx9=this[_0x1a9a[14]][_0x1a9a[79]];var _0x6bbcxa=_0x6bbcx1b[_0x1a9a[95]]*_0x6bbcx9;var _0x6bbcxb=_0x6bbcx1b[_0x1a9a[96]]*_0x6bbcx9;var _0x6bbcx1c=Math[_0x1a9a[162]](Math[_0x1a9a[161]](0,_0x6bbcx17)/_0x6bbcxa);var _0x6bbcx1d=Math[_0x1a9a[162]](Math[_0x1a9a[161]](0,_0x6bbcx18)/_0x6bbcxb);var _0x6bbcx1e=Math[_0x1a9a[164]](Math[_0x1a9a[163]](1,_0x6bbcx17+_0x6bbcx19)/_0x6bbcxa);var _0x6bbcx1f=Math[_0x1a9a[164]](Math[_0x1a9a[163]](1,_0x6bbcx18+_0x6bbcx1a)/_0x6bbcxb);var _0x6bbcx20=_0x6bbcx1e-_0x6bbcx1c;var _0x6bbcx21=_0x6bbcx1f-_0x6bbcx1d;var _0x6bbcx15= new mxRectangle(this[_0x1a9a[52]]*(this[_0x1a9a[71]][_0x1a9a[70]]+_0x6bbcx1c*_0x6bbcxa),this[_0x1a9a[52]]*(this[_0x1a9a[71]][_0x1a9a[73]]+_0x6bbcx1d*_0x6bbcxb),this[_0x1a9a[52]]*_0x6bbcx20*_0x6bbcxa,this[_0x1a9a[52]]*_0x6bbcx21*_0x6bbcxb);return _0x6bbcx15};var _0x6bbcx22=mxGraph[_0x1a9a[44]][_0x1a9a[165]];mxGraph[_0x1a9a[44]][_0x1a9a[165]]=function(_0x6bbcx23,_0x6bbcx24){_0x6bbcx22[_0x1a9a[33]](this,arguments);if((this[_0x1a9a[166]]!=mxConstants[_0x1a9a[167]]&&this[_0x1a9a[53]][_0x1a9a[101]]!=null)&&(!this[_0x1a9a[168]]||!mxUtils[_0x1a9a[169]](this[_0x1a9a[68]]))){this[_0x1a9a[53]][_0x1a9a[101]][_0x1a9a[125]][_0x1a9a[99]][_0x1a9a[170]]=_0x6bbcx23+_0x1a9a[171];this[_0x1a9a[53]][_0x1a9a[101]][_0x1a9a[125]][_0x1a9a[99]][_0x1a9a[172]]=_0x6bbcx24+_0x1a9a[171]}};var _0x6bbcx25=this;mxGraphView[_0x1a9a[44]][_0x1a9a[173]]=function(){var _0x6bbcxc=this[_0x1a9a[14]][_0x1a9a[174]]();if(_0x6bbcxc!=null){if(this[_0x1a9a[124]]==null||this[_0x1a9a[124]][_0x1a9a[175]]!=_0x6bbcxc[_0x1a9a[176]]){if(this[_0x1a9a[124]]!=null){this[_0x1a9a[124]][_0x1a9a[177]]()};var _0x6bbcx15= new mxRectangle(0,0,1,1);this[_0x1a9a[124]]= new mxImageShape(_0x6bbcx15,_0x6bbcxc[_0x1a9a[176]]);this[_0x1a9a[124]][_0x1a9a[166]]=this[_0x1a9a[14]][_0x1a9a[166]];this[_0x1a9a[124]][_0x1a9a[12]](this[_0x1a9a[178]]);this[_0x1a9a[124]][_0x1a9a[179]]()};this[_0x1a9a[180]](this[_0x1a9a[124]],_0x6bbcxc)}else {if(this[_0x1a9a[124]]!=null){this[_0x1a9a[124]][_0x1a9a[177]]();this[_0x1a9a[124]]=null}};if(this[_0x1a9a[14]][_0x1a9a[75]]){var _0x6bbcx15=this[_0x1a9a[159]]();if(this[_0x1a9a[101]]==null){this[_0x1a9a[101]]=this[_0x1a9a[156]](_0x6bbcx15);this[_0x1a9a[101]][_0x1a9a[52]]=1;this[_0x1a9a[101]][_0x1a9a[181]]=true;this[_0x1a9a[101]][_0x1a9a[166]]=mxConstants[_0x1a9a[182]];this[_0x1a9a[101]][_0x1a9a[12]](this[_0x1a9a[14]][_0x1a9a[68]]);this[_0x1a9a[14]][_0x1a9a[68]][_0x1a9a[184]][_0x1a9a[99]][_0x1a9a[183]]=_0x1a9a[185];this[_0x1a9a[14]][_0x1a9a[68]][_0x1a9a[186]](this[_0x1a9a[101]][_0x1a9a[125]],this[_0x1a9a[14]][_0x1a9a[68]][_0x1a9a[184]]);this[_0x1a9a[101]][_0x1a9a[179]]();this[_0x1a9a[101]][_0x1a9a[125]][_0x1a9a[187]]=_0x1a9a[188];this[_0x1a9a[101]][_0x1a9a[125]][_0x1a9a[99]][_0x1a9a[189]]=_0x1a9a[190];mxEvent[_0x1a9a[35]](this[_0x1a9a[101]][_0x1a9a[125]],_0x1a9a[191],mxUtils[_0x1a9a[34]](this,function(_0x6bbcx14){this[_0x1a9a[14]][_0x1a9a[192]](_0x6bbcx14)}));mxEvent[_0x1a9a[198]](this[_0x1a9a[101]][_0x1a9a[125]],mxUtils[_0x1a9a[34]](this,function(_0x6bbcx14){this[_0x1a9a[14]][_0x1a9a[193]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x6bbcx14))}),mxUtils[_0x1a9a[34]](this,function(_0x6bbcx14){if(this[_0x1a9a[14]][_0x1a9a[93]]!=null&&this[_0x1a9a[14]][_0x1a9a[93]][_0x1a9a[194]]()){this[_0x1a9a[14]][_0x1a9a[93]][_0x1a9a[195]]()};if(this[_0x1a9a[14]][_0x1a9a[196]]&&!mxEvent[_0x1a9a[197]](_0x6bbcx14)){this[_0x1a9a[14]][_0x1a9a[193]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x6bbcx14))}}),mxUtils[_0x1a9a[34]](this,function(_0x6bbcx14){this[_0x1a9a[14]][_0x1a9a[193]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x6bbcx14))}))}else {this[_0x1a9a[101]][_0x1a9a[52]]=1;this[_0x1a9a[101]][_0x1a9a[199]]=_0x6bbcx15;this[_0x1a9a[101]][_0x1a9a[179]]()};this[_0x1a9a[101]][_0x1a9a[125]][_0x1a9a[99]][_0x1a9a[124]]=(this[_0x1a9a[14]][_0x1a9a[91]]())?_0x1a9a[122]+_0x6bbcx25[_0x1a9a[43]]+_0x1a9a[123]:_0x1a9a[97]}else {if(this[_0x1a9a[101]]!=null){this[_0x1a9a[101]][_0x1a9a[177]]();this[_0x1a9a[101]]=null}}};mxGraph[_0x1a9a[44]][_0x1a9a[200]]=function(_0x6bbcx26,_0x6bbcx27,_0x6bbcx28){var _0x6bbcx29=this[_0x1a9a[53]][_0x1a9a[52]];var _0x6bbcx2a=this[_0x1a9a[53]][_0x1a9a[71]];var _0x6bbcx1b=this[_0x1a9a[82]];var _0x6bbcx9=_0x6bbcx29*this[_0x1a9a[79]];var _0x6bbcx2b=this[_0x1a9a[53]][_0x1a9a[159]]();_0x6bbcx27=_0x6bbcx2b[_0x1a9a[95]];_0x6bbcx28=_0x6bbcx2b[_0x1a9a[96]];var _0x6bbcx15= new mxRectangle(_0x6bbcx29*_0x6bbcx2a[_0x1a9a[70]],_0x6bbcx29*_0x6bbcx2a[_0x1a9a[73]],_0x6bbcx1b[_0x1a9a[95]]*_0x6bbcx9,_0x6bbcx1b[_0x1a9a[96]]*_0x6bbcx9);_0x6bbcx26=_0x6bbcx26&&Math[_0x1a9a[161]](_0x6bbcx15[_0x1a9a[95]],_0x6bbcx15[_0x1a9a[96]])>this[_0x1a9a[201]];var _0x6bbcx2c=(_0x6bbcx26)?Math[_0x1a9a[164]](_0x6bbcx27/_0x6bbcx15[_0x1a9a[95]])-1:0;var _0x6bbcx2d=(_0x6bbcx26)?Math[_0x1a9a[164]](_0x6bbcx28/_0x6bbcx15[_0x1a9a[96]])-1:0;var _0x6bbcx2e=_0x6bbcx2b[_0x1a9a[70]]+_0x6bbcx27;var _0x6bbcx2f=_0x6bbcx2b[_0x1a9a[73]]+_0x6bbcx28;if(this[_0x1a9a[202]]==null&&_0x6bbcx2c>0){this[_0x1a9a[202]]=[]};if(this[_0x1a9a[202]]!=null){for(var _0x6bbcx30=0;_0x6bbcx30<=_0x6bbcx2c;_0x6bbcx30++){var _0x6bbcx31=[ new mxPoint(_0x6bbcx2b[_0x1a9a[70]]+(_0x6bbcx30+1)*_0x6bbcx15[_0x1a9a[95]],_0x6bbcx2b[_0x1a9a[73]]), new mxPoint(_0x6bbcx2b[_0x1a9a[70]]+(_0x6bbcx30+1)*_0x6bbcx15[_0x1a9a[95]],_0x6bbcx2f)];if(this[_0x1a9a[202]][_0x6bbcx30]!=null){this[_0x1a9a[202]][_0x6bbcx30][_0x1a9a[52]]=1;this[_0x1a9a[202]][_0x6bbcx30][_0x1a9a[203]]=_0x6bbcx31;this[_0x1a9a[202]][_0x6bbcx30][_0x1a9a[179]]()}else {var _0x6bbcx32= new mxPolyline(_0x6bbcx31,this[_0x1a9a[153]],this[_0x1a9a[52]]);_0x6bbcx32[_0x1a9a[166]]=this[_0x1a9a[166]];_0x6bbcx32[_0x1a9a[204]]=this[_0x1a9a[205]];_0x6bbcx32[_0x1a9a[206]]=false;_0x6bbcx32[_0x1a9a[52]]=_0x6bbcx29;_0x6bbcx32[_0x1a9a[12]](this[_0x1a9a[53]][_0x1a9a[178]]);_0x6bbcx32[_0x1a9a[179]]();this[_0x1a9a[202]][_0x6bbcx30]=_0x6bbcx32}};for(var _0x6bbcx30=_0x6bbcx2c;_0x6bbcx30<this[_0x1a9a[202]][_0x1a9a[83]];_0x6bbcx30++){this[_0x1a9a[202]][_0x6bbcx30][_0x1a9a[177]]()};this[_0x1a9a[202]][_0x1a9a[207]](_0x6bbcx2c,this[_0x1a9a[202]][_0x1a9a[83]]-_0x6bbcx2c)};if(this[_0x1a9a[208]]==null&&_0x6bbcx2d>0){this[_0x1a9a[208]]=[]};if(this[_0x1a9a[208]]!=null){for(var _0x6bbcx30=0;_0x6bbcx30<=_0x6bbcx2d;_0x6bbcx30++){var _0x6bbcx31=[ new mxPoint(_0x6bbcx2b[_0x1a9a[70]],_0x6bbcx2b[_0x1a9a[73]]+(_0x6bbcx30+1)*_0x6bbcx15[_0x1a9a[96]]), new mxPoint(_0x6bbcx2e,_0x6bbcx2b[_0x1a9a[73]]+(_0x6bbcx30+1)*_0x6bbcx15[_0x1a9a[96]])];if(this[_0x1a9a[208]][_0x6bbcx30]!=null){this[_0x1a9a[208]][_0x6bbcx30][_0x1a9a[52]]=1;this[_0x1a9a[208]][_0x6bbcx30][_0x1a9a[203]]=_0x6bbcx31;this[_0x1a9a[208]][_0x6bbcx30][_0x1a9a[179]]()}else {var _0x6bbcx32= new mxPolyline(_0x6bbcx31,this[_0x1a9a[153]],_0x6bbcx29);_0x6bbcx32[_0x1a9a[166]]=this[_0x1a9a[166]];_0x6bbcx32[_0x1a9a[204]]=this[_0x1a9a[205]];_0x6bbcx32[_0x1a9a[206]]=false;_0x6bbcx32[_0x1a9a[52]]=_0x6bbcx29;_0x6bbcx32[_0x1a9a[12]](this[_0x1a9a[53]][_0x1a9a[178]]);_0x6bbcx32[_0x1a9a[179]]();this[_0x1a9a[208]][_0x6bbcx30]=_0x6bbcx32}};for(var _0x6bbcx30=_0x6bbcx2d;_0x6bbcx30<this[_0x1a9a[208]][_0x1a9a[83]];_0x6bbcx30++){this[_0x1a9a[208]][_0x6bbcx30][_0x1a9a[177]]()};this[_0x1a9a[208]][_0x1a9a[207]](_0x6bbcx2d,this[_0x1a9a[208]][_0x1a9a[83]]-_0x6bbcx2d)}};mxEdgeHandler[_0x1a9a[44]][_0x1a9a[209]]=true;mxGraphHandler[_0x1a9a[44]][_0x1a9a[58]]=true;var _0x6bbcx33=mxGraphHandler[_0x1a9a[44]][_0x1a9a[210]];mxGraphHandler[_0x1a9a[44]][_0x1a9a[210]]=function(_0x6bbcx34,_0x6bbcx35,_0x6bbcx14){for(var _0x6bbcx30=0;_0x6bbcx30<_0x6bbcx35[_0x1a9a[83]];_0x6bbcx30++){if(this[_0x1a9a[14]][_0x1a9a[36]]()[_0x1a9a[211]](_0x6bbcx35[_0x6bbcx30])){var _0x6bbcx36=this[_0x1a9a[14]][_0x1a9a[212]](_0x6bbcx35[_0x6bbcx30]);if(_0x6bbcx36!=null&&_0x6bbcx36[_0x1a9a[213]]){return false}}};return _0x6bbcx33[_0x1a9a[33]](this,arguments)};mxGuide[_0x1a9a[44]][_0x1a9a[214]]=function(_0x6bbcx14){return !mxEvent[_0x1a9a[215]](_0x6bbcx14)};mxPopupMenuAddItem=mxPopupMenu[_0x1a9a[44]][_0x1a9a[216]];mxPopupMenu[_0x1a9a[44]][_0x1a9a[216]]=function(_0x6bbcx37,_0x6bbcx38,_0x6bbcx39,_0x6bbcx34,_0x6bbcx3a,_0x6bbcx3b){var _0x6bbcx3c=mxPopupMenuAddItem[_0x1a9a[33]](this,arguments);if(_0x6bbcx3b!=null&& !_0x6bbcx3b){mxEvent[_0x1a9a[35]](_0x6bbcx3c,_0x1a9a[217],function(_0x6bbcx14){mxEvent[_0x1a9a[218]](_0x6bbcx14)})};return _0x6bbcx3c};var _0x6bbcx3d=mxGraphHandler[_0x1a9a[44]][_0x1a9a[219]];mxGraphHandler[_0x1a9a[44]][_0x1a9a[219]]=function(_0x6bbcx3e){var _0x6bbcx3f=this[_0x1a9a[14]][_0x1a9a[36]]();var _0x6bbcx40=_0x6bbcx3f[_0x1a9a[221]](this[_0x1a9a[14]][_0x1a9a[220]]());var _0x6bbcx41=_0x6bbcx3d[_0x1a9a[33]](this,arguments);var _0x6bbcx34=_0x6bbcx3f[_0x1a9a[221]](_0x6bbcx41);if(_0x6bbcx40==null||(_0x6bbcx40!=_0x6bbcx41&&_0x6bbcx40!=_0x6bbcx34)){while(!this[_0x1a9a[14]][_0x1a9a[222]](_0x6bbcx41)&&!this[_0x1a9a[14]][_0x1a9a[222]](_0x6bbcx34)&&_0x6bbcx3f[_0x1a9a[211]](_0x6bbcx34)&&!this[_0x1a9a[14]][_0x1a9a[223]](_0x6bbcx34)){_0x6bbcx41=_0x6bbcx34;_0x6bbcx34=this[_0x1a9a[14]][_0x1a9a[36]]()[_0x1a9a[221]](_0x6bbcx41)}};return _0x6bbcx41};var _0x6bbcx42=mxGraphHandler[_0x1a9a[44]][_0x1a9a[224]];mxGraphHandler[_0x1a9a[44]][_0x1a9a[224]]=function(_0x6bbcx41){var _0x6bbcx3c=_0x6bbcx42[_0x1a9a[33]](this,arguments);var _0x6bbcx3f=this[_0x1a9a[14]][_0x1a9a[36]]();var _0x6bbcx40=_0x6bbcx3f[_0x1a9a[221]](this[_0x1a9a[14]][_0x1a9a[220]]());var _0x6bbcx34=_0x6bbcx3f[_0x1a9a[221]](_0x6bbcx41);if(_0x6bbcx40==null||(_0x6bbcx40!=_0x6bbcx41&&_0x6bbcx40!=_0x6bbcx34)){if(!this[_0x1a9a[14]][_0x1a9a[222]](_0x6bbcx41)&&_0x6bbcx3f[_0x1a9a[211]](_0x6bbcx34)&&!this[_0x1a9a[14]][_0x1a9a[223]](_0x6bbcx34)){_0x6bbcx3c=true}};return _0x6bbcx3c};mxGraphHandler[_0x1a9a[44]][_0x1a9a[225]]=function(_0x6bbcx3e){var _0x6bbcx41=_0x6bbcx3e[_0x1a9a[226]]();if(_0x6bbcx41==null){_0x6bbcx41=this[_0x1a9a[227]]};var _0x6bbcx3f=this[_0x1a9a[14]][_0x1a9a[36]]();var _0x6bbcx34=_0x6bbcx3f[_0x1a9a[221]](_0x6bbcx41);while(this[_0x1a9a[14]][_0x1a9a[222]](_0x6bbcx41)&&_0x6bbcx3f[_0x1a9a[211]](_0x6bbcx34)&&!this[_0x1a9a[14]][_0x1a9a[223]](_0x6bbcx34)){_0x6bbcx41=_0x6bbcx34;_0x6bbcx34=_0x6bbcx3f[_0x1a9a[221]](_0x6bbcx41)};this[_0x1a9a[14]][_0x1a9a[229]](_0x6bbcx41,_0x6bbcx3e[_0x1a9a[228]]())};mxPanningHandler[_0x1a9a[44]][_0x1a9a[230]]=function(_0x6bbcx3e){var _0x6bbcx41=_0x6bbcx3e[_0x1a9a[226]]();var _0x6bbcx3f=this[_0x1a9a[14]][_0x1a9a[36]]();var _0x6bbcx34=_0x6bbcx3f[_0x1a9a[221]](_0x6bbcx41);while(_0x6bbcx3f[_0x1a9a[211]](_0x6bbcx34)&&!this[_0x1a9a[14]][_0x1a9a[223]](_0x6bbcx34)){if(this[_0x1a9a[14]][_0x1a9a[222]](_0x6bbcx34)){_0x6bbcx41=_0x6bbcx34};_0x6bbcx34=_0x6bbcx3f[_0x1a9a[221]](_0x6bbcx34)};return _0x6bbcx41}};Editor[_0x1a9a[44]][_0x1a9a[18]]=function(){var _0x6bbcxe=this[_0x1a9a[14]];var _0x6bbcx43= new mxUndoManager();var _0x6bbcx44=function(_0x6bbcx45,_0x6bbcx14){_0x6bbcx43[_0x1a9a[233]](_0x6bbcx14[_0x1a9a[232]](_0x1a9a[231]))};_0x6bbcxe[_0x1a9a[36]]()[_0x1a9a[35]](mxEvent.UNDO,_0x6bbcx44);_0x6bbcxe[_0x1a9a[234]]()[_0x1a9a[35]](mxEvent.UNDO,_0x6bbcx44);var _0x6bbcx46=function(_0x6bbcx45,_0x6bbcx14){var _0x6bbcx47=_0x6bbcxe[_0x1a9a[236]](_0x6bbcx14[_0x1a9a[232]](_0x1a9a[231])[_0x1a9a[235]]);var _0x6bbcx35=[];for(var _0x6bbcx30=1;_0x6bbcx30<_0x6bbcx47[_0x1a9a[83]];_0x6bbcx30++){if(_0x6bbcxe[_0x1a9a[53]][_0x1a9a[237]](_0x6bbcx47[_0x6bbcx30])!=null){_0x6bbcx35[_0x1a9a[238]](_0x6bbcx47[_0x6bbcx30])}};_0x6bbcxe[_0x1a9a[239]](_0x6bbcx35)};_0x6bbcx43[_0x1a9a[35]](mxEvent.UNDO,_0x6bbcx46);_0x6bbcx43[_0x1a9a[35]](mxEvent.REDO,_0x6bbcx46);return _0x6bbcx43};Editor[_0x1a9a[44]][_0x1a9a[13]]=function(){mxStencilRegistry[_0x1a9a[241]](STENCIL_PATH+_0x1a9a[240])};(function(){mxStencilRegistry[_0x1a9a[242]]={};mxStencilRegistry[_0x1a9a[243]]=[];mxStencilRegistry[_0x1a9a[244]]=function(_0x6bbcx48){var _0x6bbcx3c=mxStencilRegistry[_0x1a9a[245]][_0x6bbcx48];if(_0x6bbcx3c==null){var _0x6bbcx49=mxStencilRegistry[_0x1a9a[246]](_0x6bbcx48);if(_0x6bbcx49!=null){var _0x6bbcx4a=mxStencilRegistry[_0x1a9a[242]][_0x6bbcx49];if(_0x6bbcx4a!=null){if(mxStencilRegistry[_0x1a9a[243]][_0x6bbcx49]==null){mxStencilRegistry[_0x1a9a[243]][_0x6bbcx49]=1;for(var _0x6bbcx30=0;_0x6bbcx30<_0x6bbcx4a[_0x1a9a[83]];_0x6bbcx30++){var _0x6bbcx4b=_0x6bbcx4a[_0x6bbcx30];if(_0x6bbcx4b[_0x1a9a[248]]()[_0x1a9a[247]](_0x6bbcx4b[_0x1a9a[83]]-4,_0x6bbcx4b[_0x1a9a[83]])==_0x1a9a[25]){mxStencilRegistry[_0x1a9a[241]](_0x6bbcx4b,null)}else {if(_0x6bbcx4b[_0x1a9a[248]]()[_0x1a9a[247]](_0x6bbcx4b[_0x1a9a[83]]-3,_0x6bbcx4b[_0x1a9a[83]])==_0x1a9a[249]){var _0x6bbcx4c=mxUtils[_0x1a9a[250]](_0x6bbcx4b);if(_0x6bbcx4c!=null){eval[_0x1a9a[11]](window,_0x6bbcx4c[_0x1a9a[251]]())}}else {}}}}}else {mxStencilRegistry[_0x1a9a[241]](STENCIL_PATH+_0x1a9a[252]+_0x6bbcx49+_0x1a9a[25],null)};_0x6bbcx3c=mxStencilRegistry[_0x1a9a[245]][_0x6bbcx48]}};return _0x6bbcx3c};mxStencilRegistry[_0x1a9a[246]]=function(_0x6bbcx48){var _0x6bbcx4d=_0x6bbcx48[_0x1a9a[254]](_0x1a9a[253]);var _0x6bbcx4e=null;if(_0x6bbcx4d[_0x1a9a[83]]>0&&_0x6bbcx4d[0]==_0x1a9a[255]){_0x6bbcx4e=_0x6bbcx4d[1];for(var _0x6bbcx30=2;_0x6bbcx30<_0x6bbcx4d[_0x1a9a[83]]-1;_0x6bbcx30++){_0x6bbcx4e+=_0x1a9a[252]+_0x6bbcx4d[_0x6bbcx30]}};return _0x6bbcx4e};mxStencilRegistry[_0x1a9a[241]]=function(_0x6bbcx4f,_0x6bbcx50,_0x6bbcx51){_0x6bbcx51=(_0x6bbcx51!=null)?_0x6bbcx51:false;var _0x6bbcx52=mxStencilRegistry[_0x1a9a[243]][_0x6bbcx4f];if(_0x6bbcx51||_0x6bbcx52==null){var _0x6bbcx53=false;if(_0x6bbcx52==null){var _0x6bbcx4c=mxUtils[_0x1a9a[250]](_0x6bbcx4f);_0x6bbcx52=_0x6bbcx4c[_0x1a9a[256]]();mxStencilRegistry[_0x1a9a[243]][_0x6bbcx4f]=_0x6bbcx52;_0x6bbcx53=true};mxStencilRegistry[_0x1a9a[257]](_0x6bbcx52,_0x6bbcx50,_0x6bbcx53)}};mxStencilRegistry[_0x1a9a[257]]=function(_0x6bbcx54,_0x6bbcx50,_0x6bbcx53){_0x6bbcx53=(_0x6bbcx53!=null)?_0x6bbcx53:true;var _0x6bbcx55=_0x6bbcx54[_0x1a9a[258]];var _0x6bbcx56=_0x6bbcx55[_0x1a9a[184]];var _0x6bbcx57=_0x1a9a[20];var _0x6bbcx48=_0x6bbcx55[_0x1a9a[56]](_0x1a9a[259]);if(_0x6bbcx48!=null){_0x6bbcx57=_0x6bbcx48+_0x1a9a[253]};while(_0x6bbcx56!=null){if(_0x6bbcx56[_0x1a9a[260]]==mxConstants[_0x1a9a[261]]){_0x6bbcx48=_0x6bbcx56[_0x1a9a[56]](_0x1a9a[259]);if(_0x6bbcx48!=null){_0x6bbcx57=_0x6bbcx57[_0x1a9a[248]]();var _0x6bbcx58=_0x6bbcx48[_0x1a9a[263]](/ /g,_0x1a9a[262]);if(_0x6bbcx53){mxStencilRegistry[_0x1a9a[264]](_0x6bbcx57+_0x6bbcx58[_0x1a9a[248]](), new mxStencil(_0x6bbcx56))};if(_0x6bbcx50!=null){var _0x6bbcx19=_0x6bbcx56[_0x1a9a[56]](_0x1a9a[265]);var _0x6bbcx1a=_0x6bbcx56[_0x1a9a[56]](_0x1a9a[266]);_0x6bbcx19=(_0x6bbcx19==null)?80:parseInt(_0x6bbcx19,10);_0x6bbcx1a=(_0x6bbcx1a==null)?80:parseInt(_0x6bbcx1a,10);_0x6bbcx50(_0x6bbcx57,_0x6bbcx58,_0x6bbcx48,_0x6bbcx19,_0x6bbcx1a)}}};_0x6bbcx56=_0x6bbcx56[_0x1a9a[267]]}}})();OpenFile=function(_0x6bbcx59){this[_0x1a9a[268]]=null;this[_0x1a9a[269]]=null;this[_0x1a9a[270]]=_0x6bbcx59};OpenFile[_0x1a9a[44]][_0x1a9a[271]]=function(_0x6bbcx6){this[_0x1a9a[269]]=_0x6bbcx6;this[_0x1a9a[272]]()};OpenFile[_0x1a9a[44]][_0x1a9a[273]]=function(_0x6bbcx6,_0x6bbcx5a){this[_0x1a9a[274]]=_0x6bbcx6;this[_0x1a9a[21]]=_0x6bbcx5a;this[_0x1a9a[272]]()};OpenFile[_0x1a9a[44]][_0x1a9a[275]]=function(_0x6bbcx5b){this[_0x1a9a[276]]();mxUtils[_0x1a9a[277]](_0x6bbcx5b)};OpenFile[_0x1a9a[44]][_0x1a9a[272]]=function(){if(this[_0x1a9a[269]]!=null&&this[_0x1a9a[274]]!=null){this[_0x1a9a[269]](this[_0x1a9a[274]],this[_0x1a9a[21]]);this[_0x1a9a[276]]()}};OpenFile[_0x1a9a[44]][_0x1a9a[276]]=function(){if(this[_0x1a9a[270]]!=null){this[_0x1a9a[270]]()}}
\ No newline at end of file
+/**
+ * $Id: Editor.js,v 1.14 2013/03/06 17:57:10 boris Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+var useLocalStorage = (mxClient.IS_TOUCH || urlParams['storage'] == 'local') && typeof(localStorage) != 'undefined';
+var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
+
+// Specifies if connector should be shown on selected cells
+var touchStyle = mxClient.IS_TOUCH || urlParams['touch'] == '1';
+
+// Counts open editor tabs (must be global for cross-window access)
+var counter = 0;
+
+// Cross-domain window access is not allowed in FF, so if we
+// were opened from another domain then this will fail.
+try {
+       var op = window;
+
+       while (op.opener != null && !isNaN(op.opener.counter)) {
+               op = op.opener;
+       }
+
+       // Increments the counter in the first opener in the chain
+       if (op != null) {
+               op.counter++;
+               counter = op.counter;
+       }
+} catch (e) {
+       // ignore
+}
+
+/**
+ * Editor constructor executed on page load.
+ */
+Editor = function() {
+       mxEventSource.call(this);
+       this.init();
+       this.initStencilRegistry();
+       this.graph = new Graph();
+       this.outline = new mxOutline(this.graph);
+       this.outline.updateOnPan = true;
+       this.undoManager = this.createUndoManager();
+       this.status = '';
+
+       // Contains the name which was used for the last save. Default value is null.
+       this.filename = null;
+
+       this.getOrCreateFilename = function() {
+               return this.filename || mxResources.get('drawing', [counter]) + '.xml';
+       };
+
+       this.getFilename = function() {
+               return this.filename;
+       };
+
+       // Sets the status and fires a statusChanged event
+       this.setStatus = function(value) {
+               this.status = value;
+               this.fireEvent(new mxEventObject('statusChanged'));
+       };
+
+       // Returns the current status
+       this.getStatus = function() {
+               return this.status;
+       };
+
+       // Contains the current modified state of the diagram. This is false for
+       // new diagrams and after the diagram was saved.
+       this.modified = false;
+
+       // Updates modified state if graph changes
+       this.graphChangeListener = function() {
+               this.modified = true;
+       };
+       this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function() {
+               this.graphChangeListener.apply(this, arguments);
+       }));
+
+       // Installs dialog if browser window is closed without saving
+       // This must be disabled during save and image export
+       window.onbeforeunload = mxUtils.bind(this, function() {
+               if (this.modified) {
+                       return mxResources.get('allChangesLost');
+               }
+       });
+
+       // Sets persistent graph state defaults
+       this.graph.resetViewOnRootChange = false;
+       this.graph.scrollbars = true;
+       this.graph.background = null;
+};
+
+// Editor inherits from mxEventSource
+mxUtils.extend(Editor, mxEventSource);
+
+/**
+ * Specifies the image URL to be used for the grid.
+ */
+Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
+Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.setGraphXml = function(node) {
+       var dec = new mxCodec(node.ownerDocument);
+
+       if (node.nodeName == 'mxGraphModel') {
+               this.graph.view.scale = 1;
+               this.graph.gridEnabled = node.getAttribute('grid') != '0';
+               this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
+               this.graph.setTooltips(node.getAttribute('tooltips') != '0');
+               this.graph.setConnectable(node.getAttribute('connect') != '0');
+               this.graph.foldingEnabled = node.getAttribute('fold') != '0';
+               this.graph.scrollbars = node.getAttribute('scrollbars') != '0';
+
+               if (!this.graph.scrollbars) {
+                       this.graph.container.scrollLeft = 0;
+                       this.graph.container.scrollTop = 0;
+                       this.graph.view.translate.x = Number(node.getAttribute('dx') || 0);
+                       this.graph.view.translate.y = Number(node.getAttribute('dy') || 0);
+               }
+
+               this.graph.pageVisible = node.getAttribute('page') == '1';
+               this.graph.pageBreaksVisible = this.graph.pageVisible;
+               this.graph.preferPageSize = this.graph.pageBreaksVisible;
+
+               // Loads the persistent state settings
+               var ps = node.getAttribute('pageScale');
+
+               if (ps != null) {
+                       this.graph.pageScale = ps;
+               } else {
+                       this.graph.pageScale = 1.5;
+               }
+
+               var pw = node.getAttribute('pageWidth');
+               var ph = node.getAttribute('pageHeight');
+
+               if (pw != null && ph != null) {
+                       this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
+                       this.outline.outline.pageFormat = this.graph.pageFormat;
+               }
+
+               // Loads the persistent state settings
+               var bg = node.getAttribute('background');
+
+               if (bg != null && bg.length > 0) {
+                       this.graph.background = bg;
+               }
+
+               dec.decode(node, this.graph.getModel());
+               this.updateGraphComponents();
+       }
+};
+
+/**
+ * Returns the XML node that represents the current diagram.
+ */
+Editor.prototype.getGraphXml = function() {
+       var enc = new mxCodec(mxUtils.createXmlDocument());
+       var node = enc.encode(this.graph.getModel());
+
+       if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0) {
+               node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
+               node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
+       }
+
+       node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
+       node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+       node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+       node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
+       node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');
+       node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
+       node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
+       node.setAttribute('pageScale', this.graph.pageScale);
+       node.setAttribute('pageWidth', this.graph.pageFormat.width);
+       node.setAttribute('pageHeight', this.graph.pageFormat.height);
+
+       if (!this.graph.scrollbars) {
+               node.setAttribute('scrollbars', '0');
+       }
+
+       if (this.graph.background != null) {
+               node.setAttribute('background', this.graph.background);
+       }
+
+       return node;
+};
+
+/**
+ * Keeps the graph container in sync with the persistent graph state
+ */
+Editor.prototype.updateGraphComponents = function() {
+       var graph = this.graph;
+       var outline = this.outline;
+
+       if (graph.container != null && outline.outline.container != null) {
+               if (graph.background != null) {
+                       if (graph.background == 'none') {
+                               graph.container.style.backgroundColor = 'transparent';
+                       } else {
+                               if (graph.view.backgroundPageShape != null) {
+                                       graph.view.backgroundPageShape.fill = graph.background;
+                                       graph.view.backgroundPageShape.reconfigure();
+                               }
+
+                               graph.container.style.backgroundColor = graph.background;
+                       }
+               } else {
+                       graph.container.style.backgroundColor = '';
+               }
+
+               if (graph.pageVisible) {
+                       graph.container.style.backgroundColor = '#ebebeb';
+                       graph.container.style.borderStyle = 'solid';
+                       graph.container.style.borderColor = '#e5e5e5';
+                       graph.container.style.borderTopWidth = '1px';
+                       graph.container.style.borderLeftWidth = '1px';
+                       graph.container.style.borderRightWidth = '0px';
+                       graph.container.style.borderBottomWidth = '0px';
+               } else {
+                       graph.container.style.border = '';
+               }
+
+               outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
+
+               if (outline.outline.pageVisible != graph.pageVisible ||
+                       outline.outline.pageScale != graph.pageScale) {
+                       outline.outline.pageScale = graph.pageScale;
+                       outline.outline.pageVisible = graph.pageVisible;
+                       outline.outline.view.validate();
+               }
+
+               if (graph.scrollbars && graph.container.style.overflow == 'hidden' && !touchStyle) {
+                       graph.container.style.overflow = 'auto';
+               } else if (!graph.scrollbars || touchStyle) {
+                       graph.container.style.overflow = 'hidden';
+               }
+
+               // Transparent.gif is a workaround for focus repaint problems in IE
+               var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
+               graph.container.style.backgroundImage = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
+
+               if (graph.view.backgroundPageShape != null) {
+                       graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
+               }
+       }
+};
+
+/**
+ * Initializes the environment.
+ */
+Editor.prototype.init = function() {
+       // Adds stylesheet for IE6
+       if (mxClient.IS_IE6) {
+               mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
+       }
+
+       // Adds required resources (disables loading of fallback properties, this can only
+       // be used if we know that all keys are defined in the language specific file)
+       mxResources.loadDefaultBundle = false;
+       mxResources.add(RESOURCE_BASE);
+
+       // Makes the connection hotspot smaller
+       mxConstants.DEFAULT_HOTSPOT = 0.3;
+
+       var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
+       mxConnectionHandler.prototype.createMarker = function() {
+               var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
+
+               // Overrides to ignore hotspot only for target terminal
+               marker.intersects = mxUtils.bind(this, function(state, evt) {
+                       if (this.isConnecting()) {
+                               return true;
+                       }
+
+                       return mxCellMarker.prototype.intersects.apply(marker, arguments);
+               });
+
+               return marker;
+       };
+
+       // Makes the shadow brighter
+       mxConstants.SHADOWCOLOR = '#d0d0d0';
+
+       // Changes some default colors
+       mxConstants.HANDLE_FILLCOLOR = '#99ccff';
+       mxConstants.HANDLE_STROKECOLOR = '#0088cf';
+       mxConstants.VERTEX_SELECTION_COLOR = '#00a8ff';
+       mxConstants.OUTLINE_COLOR = '#00a8ff';
+       mxConstants.OUTLINE_HANDLE_FILLCOLOR = '#99ccff';
+       mxConstants.OUTLINE_HANDLE_STROKECOLOR = '#00a8ff';
+       mxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff';
+       mxConstants.EDGE_SELECTION_COLOR = '#00a8ff';
+       mxConstants.DEFAULT_VALID_COLOR = '#00a8ff';
+       mxConstants.LABEL_HANDLE_FILLCOLOR = '#cee7ff';
+       mxConstants.GUIDE_COLOR = '#0088cf';
+
+       mxGraph.prototype.pageBreakColor = '#c0c0c0';
+       mxGraph.prototype.pageScale = 1;
+
+       // Increases default rubberband opacity (default is 20)
+       mxRubberband.prototype.defaultOpacity = 30;
+
+       // Changes border color of background page shape
+       mxGraphView.prototype.createBackgroundPageShape = function(bounds) {
+               return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
+       };
+
+       // Fits the number of background pages to the graph
+       mxGraphView.prototype.getBackgroundPageBounds = function() {
+               var gb = this.getGraphBounds();
+
+               // Computes unscaled, untranslated graph bounds
+               var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
+               var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
+               var w = gb.width / this.scale;
+               var h = gb.height / this.scale;
+
+               var fmt = this.graph.pageFormat;
+               var ps = this.graph.pageScale;
+
+               var pw = fmt.width * ps;
+               var ph = fmt.height * ps;
+
+               var x0 = Math.floor(Math.min(0, x) / pw);
+               var y0 = Math.floor(Math.min(0, y) / ph);
+               var xe = Math.ceil(Math.max(1, x + w) / pw);
+               var ye = Math.ceil(Math.max(1, y + h) / ph);
+
+               var rows = xe - x0;
+               var cols = ye - y0;
+
+               var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
+                       (this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
+
+               return bounds;
+       };
+
+       // Add panning for background page in VML
+       var graphPanGraph = mxGraph.prototype.panGraph;
+       mxGraph.prototype.panGraph = function(dx, dy) {
+               graphPanGraph.apply(this, arguments);
+
+               if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
+                       (!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container))) {
+                       this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
+                       this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
+               }
+       };
+
+       var editor = this;
+
+       // Uses HTML for background pages (to support grid background image)
+       mxGraphView.prototype.validateBackground = function() {
+               var bg = this.graph.getBackgroundImage();
+
+               if (bg != null) {
+                       if (this.backgroundImage == null || this.backgroundImage.image != bg.src) {
+                               if (this.backgroundImage != null) {
+                                       this.backgroundImage.destroy();
+                               }
+
+                               var bounds = new mxRectangle(0, 0, 1, 1);
+
+                               this.backgroundImage = new mxImageShape(bounds, bg.src);
+                               this.backgroundImage.dialect = this.graph.dialect;
+                               this.backgroundImage.init(this.backgroundPane);
+                               this.backgroundImage.redraw();
+                       }
+
+                       this.redrawBackgroundImage(this.backgroundImage, bg);
+               } else if (this.backgroundImage != null) {
+                       this.backgroundImage.destroy();
+                       this.backgroundImage = null;
+               }
+
+               if (this.graph.pageVisible) {
+                       var bounds = this.getBackgroundPageBounds();
+
+                       if (this.backgroundPageShape == null) {
+                               this.backgroundPageShape = this.createBackgroundPageShape(bounds);
+                               this.backgroundPageShape.scale = 1;
+                               this.backgroundPageShape.isShadow = true;
+                               this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
+                               this.backgroundPageShape.init(this.graph.container);
+                               // Required for the browser to render the background page in correct order
+                               this.graph.container.firstChild.style.position = 'absolute';
+                               this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
+                               this.backgroundPageShape.redraw();
+
+                               this.backgroundPageShape.node.className = 'geBackgroundPage';
+                               this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
+
+                               // Adds listener for double click handling on background
+                               mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
+                                       mxUtils.bind(this, function(evt) {
+                                               this.graph.dblClick(evt);
+                                       })
+                               );
+
+                               // Adds basic listeners for graph event dispatching outside of the
+                               // container and finishing the handling of a single gesture
+                               mxEvent.addGestureListeners(this.backgroundPageShape.node,
+                                       mxUtils.bind(this, function(evt) {
+                                               this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
+                                       }),
+                                       mxUtils.bind(this, function(evt) {
+                                               // Hides the tooltip if mouse is outside container
+                                               if (this.graph.tooltipHandler != null &&
+                                                       this.graph.tooltipHandler.isHideOnHover()) {
+                                                       this.graph.tooltipHandler.hide();
+                                               }
+
+                                               if (this.graph.isMouseDown &&
+                                                       !mxEvent.isConsumed(evt)) {
+                                                       this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,
+                                                               new mxMouseEvent(evt));
+                                               }
+                                       }),
+                                       mxUtils.bind(this, function(evt) {
+                                               this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+                                                       new mxMouseEvent(evt));
+                                       }));
+                       } else {
+                               this.backgroundPageShape.scale = 1;
+                               this.backgroundPageShape.bounds = bounds;
+                               this.backgroundPageShape.redraw();
+                       }
+
+                       this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
+                               'url(' + editor.gridImage + ')' : 'none';
+               } else if (this.backgroundPageShape != null) {
+                       this.backgroundPageShape.destroy();
+                       this.backgroundPageShape = null;
+               }
+       };
+
+       // Draws page breaks only within the page
+       mxGraph.prototype.updatePageBreaks = function(visible, width, height) {
+               var scale = this.view.scale;
+               var tr = this.view.translate;
+               var fmt = this.pageFormat;
+               var ps = scale * this.pageScale;
+
+               var bounds2 = this.view.getBackgroundPageBounds();
+
+               width = bounds2.width;
+               height = bounds2.height;
+               var bounds = new mxRectangle(scale * tr.x, scale * tr.y,
+                       fmt.width * ps, fmt.height * ps);
+
+               // Does not show page breaks if the scale is too small
+               visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
+
+               var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
+               var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
+               var right = bounds2.x + width;
+               var bottom = bounds2.y + height;
+
+               if (this.horizontalPageBreaks == null && horizontalCount > 0) {
+                       this.horizontalPageBreaks = [];
+               }
+
+               if (this.horizontalPageBreaks != null) {
+                       for (var i = 0; i <= horizontalCount; i++) {
+                               var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
+                                       new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)
+                               ];
+
+                               if (this.horizontalPageBreaks[i] != null) {
+                                       this.horizontalPageBreaks[i].scale = 1;
+                                       this.horizontalPageBreaks[i].points = pts;
+                                       this.horizontalPageBreaks[i].redraw();
+                               } else {
+                                       var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
+                                       pageBreak.dialect = this.dialect;
+                                       pageBreak.isDashed = this.pageBreakDashed;
+                                       pageBreak.addPipe = false;
+                                       pageBreak.scale = scale;
+                                       pageBreak.init(this.view.backgroundPane);
+                                       pageBreak.redraw();
+
+                                       this.horizontalPageBreaks[i] = pageBreak;
+                               }
+                       }
+
+                       for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++) {
+                               this.horizontalPageBreaks[i].destroy();
+                       }
+
+                       this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
+               }
+
+               if (this.verticalPageBreaks == null && verticalCount > 0) {
+                       this.verticalPageBreaks = [];
+               }
+
+               if (this.verticalPageBreaks != null) {
+                       for (var i = 0; i <= verticalCount; i++) {
+                               var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
+                                       new mxPoint(right, bounds2.y + (i + 1) * bounds.height)
+                               ];
+
+                               if (this.verticalPageBreaks[i] != null) {
+                                       this.verticalPageBreaks[i].scale = 1; //scale;
+                                       this.verticalPageBreaks[i].points = pts;
+                                       this.verticalPageBreaks[i].redraw();
+                               } else {
+                                       var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
+                                       pageBreak.dialect = this.dialect;
+                                       pageBreak.isDashed = this.pageBreakDashed;
+                                       pageBreak.addPipe = false;
+                                       pageBreak.scale = scale;
+                                       pageBreak.init(this.view.backgroundPane);
+                                       pageBreak.redraw();
+
+                                       this.verticalPageBreaks[i] = pageBreak;
+                               }
+                       }
+
+                       for (var i = verticalCount; i < this.verticalPageBreaks.length; i++) {
+                               this.verticalPageBreaks[i].destroy();
+                       }
+
+                       this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
+               }
+       };
+
+       // Enables snapping to off-grid terminals for edge waypoints
+       mxEdgeHandler.prototype.snapToTerminals = true;
+
+       // Enables guides
+       mxGraphHandler.prototype.guidesEnabled = true;
+
+       // Disables removing relative children from parents
+       var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+       mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt) {
+               for (var i = 0; i < cells.length; i++) {
+                       if (this.graph.getModel().isVertex(cells[i])) {
+                               var geo = this.graph.getCellGeometry(cells[i]);
+
+                               if (geo != null && geo.relative) {
+                                       return false;
+                               }
+                       }
+               }
+
+               return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
+       };
+
+       // Alt-move disables guides
+       mxGuide.prototype.isEnabledForEvent = function(evt) {
+               return !mxEvent.isAltDown(evt);
+       };
+
+       // Consumes click events for disabled menu items
+       mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
+       mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled) {
+               var result = mxPopupMenuAddItem.apply(this, arguments);
+
+               if (enabled != null && !enabled) {
+                       mxEvent.addListener(result, 'mousedown', function(evt) {
+                               mxEvent.consume(evt);
+                       });
+               }
+
+               return result;
+       };
+
+       // Selects descendants before children selection mode
+       var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
+       mxGraphHandler.prototype.getInitialCellForEvent = function(me) {
+               var model = this.graph.getModel();
+               var psel = model.getParent(this.graph.getSelectionCell());
+               var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
+               var parent = model.getParent(cell);
+
+               if (psel == null || (psel != cell && psel != parent)) {
+                       while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
+                               model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                               cell = parent;
+                               parent = this.graph.getModel().getParent(cell);
+                       }
+               }
+
+               return cell;
+       };
+
+       // Selection is delayed to mouseup if child selected
+       var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
+       mxGraphHandler.prototype.isDelayedSelection = function(cell) {
+               var result = graphHandlerIsDelayedSelection.apply(this, arguments);
+               var model = this.graph.getModel();
+               var psel = model.getParent(this.graph.getSelectionCell());
+               var parent = model.getParent(cell);
+
+               if (psel == null || (psel != cell && psel != parent)) {
+                       if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                               result = true;
+                       }
+               }
+
+               return result;
+       };
+
+       // Delayed selection of parent group
+       mxGraphHandler.prototype.selectDelayed = function(me) {
+               var cell = me.getCell();
+
+               if (cell == null) {
+                       cell = this.cell;
+               }
+
+               var model = this.graph.getModel();
+               var parent = model.getParent(cell);
+
+               while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                       cell = parent;
+                       parent = model.getParent(cell);
+               }
+
+               this.graph.selectCellForEvent(cell, me.getEvent());
+       };
+
+       // Returns last selected ancestor
+       mxPanningHandler.prototype.getCellForPopupEvent = function(me) {
+               var cell = me.getCell();
+               var model = this.graph.getModel();
+               var parent = model.getParent(cell);
+
+               while (model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
+                       if (this.graph.isCellSelected(parent)) {
+                               cell = parent;
+                       }
+
+                       parent = model.getParent(parent);
+               }
+
+               return cell;
+       };
+};
+
+/**
+ * Creates and returns a new undo manager.
+ */
+Editor.prototype.createUndoManager = function() {
+       var graph = this.graph;
+       var undoMgr = new mxUndoManager();
+
+       // Installs the command history
+       var listener = function(sender, evt) {
+               undoMgr.undoableEditHappened(evt.getProperty('edit'));
+       };
+
+       graph.getModel().addListener(mxEvent.UNDO, listener);
+       graph.getView().addListener(mxEvent.UNDO, listener);
+
+       // Keeps the selection in sync with the history
+       var undoHandler = function(sender, evt) {
+               var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
+               var cells = [];
+
+               for (var i = 1; i < cand.length; i++) {
+                       if (graph.view.getState(cand[i]) != null) {
+                               cells.push(cand[i]);
+                       }
+               }
+
+               graph.setSelectionCells(cells);
+       };
+
+       undoMgr.addListener(mxEvent.UNDO, undoHandler);
+       undoMgr.addListener(mxEvent.REDO, undoHandler);
+
+       return undoMgr;
+};
+
+/**
+ * Adds basic stencil set (no namespace).
+ */
+Editor.prototype.initStencilRegistry = function() {
+       // Loads default stencils
+       mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
+};
+
+/**
+ * Overrides stencil registry for dynamic loading of stencils.
+ */
+(function() {
+       /**
+        * Maps from library names to an array of Javascript filenames,
+        * which are synchronously loaded. Currently only stencil files
+        * (.xml) and JS files (.js) are supported.
+        * IMPORTANT: For embedded diagrams to work entries must also
+        * be added in EmbedServlet.java.
+        */
+       mxStencilRegistry.libraries = {};
+
+       /**
+        * Stores all package names that have been dynamically loaded.
+        * Each package is only loaded once.
+        */
+       mxStencilRegistry.packages = [];
+
+       // Extends the default stencil registry to add dynamic loading
+       mxStencilRegistry.getStencil = function(name) {
+               var result = mxStencilRegistry.stencils[name];
+
+               if (result == null) {
+                       var basename = mxStencilRegistry.getBasenameForStencil(name);
+
+                       // Loads stencil files and tries again
+                       if (basename != null) {
+                               var libs = mxStencilRegistry.libraries[basename];
+
+                               if (libs != null) {
+                                       if (mxStencilRegistry.packages[basename] == null) {
+                                               mxStencilRegistry.packages[basename] = 1;
+
+                                               for (var i = 0; i < libs.length; i++) {
+                                                       var fname = libs[i];
+
+                                                       if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml') {
+                                                               mxStencilRegistry.loadStencilSet(fname, null);
+                                                       } else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js') {
+                                                               var req = mxUtils.load(fname);
+
+                                                               if (req != null) {
+                                                                       eval.call(window, req.getText());
+                                                               }
+                                                       } else {
+                                                               // FIXME: This does not yet work as the loading is triggered after
+                                                               // the shape was used in the graph, at which point the keys have
+                                                               // typically been translated in the calling method.
+                                                               //mxResources.add(fname);
+                                                       }
+                                               }
+                                       }
+                               } else {
+                                       mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
+                               }
+
+                               result = mxStencilRegistry.stencils[name];
+                       }
+               }
+
+               return result;
+       };
+
+       // Returns the basename for the given stencil or null if no file must be
+       // loaded to render the given stencil.
+       mxStencilRegistry.getBasenameForStencil = function(name) {
+               var parts = name.split('.');
+               var tmp = null;
+
+               if (parts.length > 0 && parts[0] == 'mxgraph') {
+                       tmp = parts[1];
+
+                       for (var i = 2; i < parts.length - 1; i++) {
+                               tmp += '/' + parts[i];
+                       }
+               }
+
+               return tmp;
+       };
+
+       // Loads the given stencil set
+       mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force) {
+               force = (force != null) ? force : false;
+
+               // Uses additional cache for detecting previous load attempts
+               var xmlDoc = mxStencilRegistry.packages[stencilFile];
+
+               if (force || xmlDoc == null) {
+                       var install = false;
+
+                       if (xmlDoc == null) {
+                               var req = mxUtils.load(stencilFile);
+                               xmlDoc = req.getXml();
+                               mxStencilRegistry.packages[stencilFile] = xmlDoc;
+                               install = true;
+                       }
+
+                       mxStencilRegistry.parseStencilSet(xmlDoc, postStencilLoad, install);
+               }
+       };
+
+       // Parses the given stencil set
+       mxStencilRegistry.parseStencilSet = function(xmlDocument, postStencilLoad, install) {
+               install = (install != null) ? install : true;
+               var root = xmlDocument.documentElement;
+               var shape = root.firstChild;
+               var packageName = '';
+               var name = root.getAttribute('name');
+
+               if (name != null) {
+                       packageName = name + '.';
+               }
+
+               while (shape != null) {
+                       if (shape.nodeType == mxConstants.NODETYPE_ELEMENT) {
+                               name = shape.getAttribute('name');
+
+                               if (name != null) {
+                                       packageName = packageName.toLowerCase();
+                                       var stencilName = name.replace(/ /g, "_");
+
+                                       if (install) {
+                                               mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
+                                       }
+
+                                       if (postStencilLoad != null) {
+                                               var w = shape.getAttribute('w');
+                                               var h = shape.getAttribute('h');
+
+                                               w = (w == null) ? 80 : parseInt(w, 10);
+                                               h = (h == null) ? 80 : parseInt(h, 10);
+
+                                               postStencilLoad(packageName, stencilName, name, w, h);
+                                       }
+                               }
+                       }
+
+                       shape = shape.nextSibling;
+               }
+       };
+})();
+
+/**
+ * Class for asynchronously opening a new window and loading a file at the same
+ * time. This acts as a bridge between the open dialog and the new editor.
+ */
+OpenFile = function(done) {
+       this.producer = null;
+       this.consumer = null;
+       this.done = done;
+};
+
+/**
+ * Registers the editor from the new window.
+ */
+OpenFile.prototype.setConsumer = function(value) {
+       this.consumer = value;
+       this.execute();
+};
+
+/**
+ * Sets the data from the loaded file.
+ */
+OpenFile.prototype.setData = function(value, filename) {
+       this.data = value;
+       this.filename = filename;
+       this.execute();
+};
+
+/**
+ * Displays an error message.
+ */
+OpenFile.prototype.error = function(msg) {
+       this.cancel();
+       mxUtils.alert(msg);
+};
+
+/**
+ * Consumes the data.
+ */
+OpenFile.prototype.execute = function() {
+       if (this.consumer != null && this.data != null) {
+               this.consumer(this.data, this.filename);
+               this.cancel();
+       }
+};
+
+/**
+ * Cancels the operation.
+ */
+OpenFile.prototype.cancel = function() {
+       if (this.done != null) {
+               this.done();
+       }
+};
index 11c177b..4104913 100644 (file)
@@ -1 +1,1484 @@
-var _0xafd2=["\x65\x64\x69\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x45\x64\x69\x74\x6F\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x72\x61\x70\x68","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x73\x72\x63","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x65\x6E\x75\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x76\x73","\x72\x65\x66\x72\x65\x73\x68","\x63\x72\x65\x61\x74\x65\x55\x69","\x65\x76\x65\x6E\x74","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x41\x6C\x6C\x6F\x77\x65\x64","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x62\x69\x6E\x64","\x62\x6F\x64\x79","\x6F\x6E\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x6D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x6E\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x64\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x69\x6E\x69\x74","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x75\x72\x73\x6F\x72","\x64\x65\x66\x61\x75\x6C\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x66\x6F\x63\x75\x73","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x61\x70\x70\x6C\x79","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x73\x74\x61\x72\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x65\x6E\x64","\x6E","\x63\x72\x65\x61\x74\x65\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x61\x6E\x73\x77\x65\x72","\x68\x61\x6E\x67\x75\x70","\x64\x69\x61\x6C","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x71\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x73\x65\x74","\x6D\x61\x74\x68","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x6D\x65\x6E\x75","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x74\x74\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x72\x65\x63\x6F\x72\x64","\x64\x61\x74\x61\x62\x61\x73\x65","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x69\x66","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x67\x6F\x74\x6F\x69\x66\x6D\x75\x6C\x74\x69\x74\x69\x6D\x65","\x76\x73\x77\x69\x74\x63\x68","\x71\x75\x65\x75\x65\x6C\x6F\x67","\x67\x6F\x61\x6C","\x6E\x6F\x6F\x70","\x73\x79\x73\x74\x65\x6D","\x61\x67\x69","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x65\x6C\x6C","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x74\x61\x67\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x73\x6F\x75\x72\x63\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x69\x73\x56\x65\x72\x74\x65\x78","\x6C\x6F\x67","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x63\x6F\x6E\x73\x75\x6D\x65","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x6F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x67\x65\x73\x74\x75\x72\x65\x63\x68\x61\x6E\x67\x65","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x63\x61\x6C\x65\x28","\x73\x63\x61\x6C\x65","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x76\x69\x65\x77","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x7A\x6F\x6F\x6D\x54\x6F\x43\x65\x6E\x74\x65\x72","\x7A\x6F\x6F\x6D","\x76\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x73\x69\x7A\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6D\x65\x6E\x75\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x74\x6F\x6F\x6C\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x66\x6F\x6F\x74\x65\x72\x48\x65\x69\x67\x68\x74","\x68\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x55\x6E\x64\x6F\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x73\x74\x65","\x67\x65\x74","\x69\x73\x45\x6D\x70\x74\x79","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x74","\x63\x6F\x70\x79","\x6F\x70\x65\x6E\x65\x72","\x6F\x70\x65\x6E\x46\x69\x6C\x65","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x63\x6C\x65\x61\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x4D\x69\x73\x73\x69\x6E\x67\x46\x69\x6C\x65","\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x61\x6C\x65\x72\x74","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x6F\x70\x65\x6E\x53\x74\x72\x69\x6E\x67","\x64\x61\x74\x61","\x6E\x65\x77","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x67\x65\x74\x49\x74\x65\x6D","\x72\x65\x70\x6C\x61\x63\x65","\x63\x6F\x6E\x66\x69\x72\x6D","\x73\x65\x74\x49\x74\x65\x6D","\x73\x61\x76\x65\x64","\x20","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x50\x4F\x53\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x50\x72\x6F\x6A\x65\x63\x74\x20","\x6E\x61\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x20\x69\x73\x20\x6F\x70\x65\x6E\x69\x6E\x67\x20\x69\x6E\x20\x6E\x65\x77\x20\x77\x69\x6E\x64\x6F\x77\x21","\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x69\x64","\x5F\x62\x6C\x61\x6E\x6B","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x65\x77\x26\x6E\x61\x6D\x65\x3D","\x73\x65\x6E\x64","\x64\x72\x61\x77\x69\x6E\x67\x54\x6F\x6F\x4C\x61\x72\x67\x65","\x70\x6F\x70\x75\x70","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x73\x61\x76\x65","\x50\x55\x54","\x55\x70\x64\x61\x74\x65\x64\x20\x61\x74\x20","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x20\x28","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x66\x69\x6C\x65","\x73\x61\x76\x65\x41\x73","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x63\x6C\x6F\x6E\x65\x64\x26\x6E\x61\x6D\x65\x3D","\x26\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x26\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x76\x61\x6C\x69\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x74","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x3C\x62\x72\x3E","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6C\x6F\x63\x6B","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x53\x74\x61\x72\x74\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x0A","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x46\x69\x6E\x61\x6C\x6C\x79\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x66\x69\x6C\x65\x5F\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6E\x6F\x41\x75\x64\x69\x6F\x53\x65\x6C\x65\x63\x74\x65\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6E\x6F\x56\x61\x72\x69\x61\x62\x6C\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6F\x64\x62\x63\x5F\x69\x64","\x6E\x6F\x44\x61\x74\x61\x62\x61\x73\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6E\x6F\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x6F\x6D\x6D\x61\x6E\x64","\x6E\x6F\x43\x6F\x6D\x6D\x61\x6E\x64\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6E\x6F\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x53\x65\x6C\x65\x63\x74\x65\x64","\x64\x69\x67\x69\x74\x73","\x6E\x6F\x44\x69\x67\x69\x74\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x6E\x6F\x4E\x75\x6D\x62\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x74\x65\x78\x74","\x6E\x6F\x54\x65\x78\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x46\x69\x6C\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x6E\x6F\x47\x6F\x61\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x70\x68\x6F\x6E\x65","\x6E\x6F\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x73\x69\x70\x5F\x69\x64","\x71\x75\x65\x75\x65\x5F\x69\x64","\x2D\x31","\x6E\x6F\x51\x75\x65\x75\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x6C\x69\x73\x74\x5F\x69\x64","\x6E\x6F\x4C\x69\x73\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x6E\x6F\x49\x6E\x74\x65\x72\x76\x61\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x61\x69\x6C\x62\x6F\x78","\x6E\x6F\x42\x6F\x78\x4E\x75\x6D\x62\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6E\x6F\x50\x72\x6F\x6A\x65\x63\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x6B\x65\x79","\x6E\x6F\x4B\x65\x79\x53\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x67\x65\x74\x49\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x67\x65\x74\x56\x61\x6C\x75\x65","\x74\x65\x73\x74","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x49\x6E\x76\x61\x6C\x69\x64\x4F\x72\x54\x69\x6D\x65\x6F\x75\x74","\x2C","\x73\x70\x6C\x69\x74","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x41\x6C\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x49\x6E\x76\x61\x6C\x69\x64\x4F\x72\x44\x65\x66\x61\x75\x6C\x74","\x74\x72\x75\x65\x4F\x72\x46\x61\x6C\x73\x65","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x70\x75\x62\x6C\x69\x73\x68","\x50\x75\x62\x6C\x69\x73\x68\x65\x64\x20\x61\x74\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x66\x69\x6C\x65","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x74\x20","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x20","\x6E\x61\x6D\x65\x3D","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x67\x65\x74\x55\x72\x6C","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x26","\x3D","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x68\x61\x64\x6F\x77","\x74\x69\x6C\x74","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x63\x75\x72\x76\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x72\x6F\x75\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x72\x61\x6E\x67\x65","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x73\x70\x61\x63\x69\x6E\x67","\x6C\x69\x6E\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x6C\x69\x67\x6E","\x67\x65\x74\x53\x74\x61\x74\x65","\x69\x73\x4C\x6F\x6F\x70","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x6D\x61\x78","\x68\x65\x69\x67\x68\x74","\x70\x78","\x74\x6F\x70","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x77\x69\x64\x74\x68","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x68\x73\x70\x6C\x69\x74","\x76\x73\x70\x6C\x69\x74","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x4F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x44\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x46\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x48\x73\x70\x6C\x69\x74","\x67\x65\x56\x73\x70\x6C\x69\x74","\x30\x70\x78","\x72\x69\x67\x68\x74","\x6D\x65\x6E\x75\x62\x61\x72","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x74\x6F\x6F\x6C\x62\x61\x72","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x73\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x6F\x74\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x64\x64\x53\x70\x6C\x69\x74\x48\x61\x6E\x64\x6C\x65\x72","\x61","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D\x20\x67\x65\x53\x74\x61\x74\x75\x73","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x67\x65\x46\x6F\x6F\x74\x65\x72","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x72\x6D","\x66\x6F\x72\x6D","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x78","\x79","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x64\x69\x61\x6C\x6F\x67","\x49\x53\x5F\x56\x4D\x4C","\x63\x6C\x6F\x73\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x65\x78\x65\x63\x75\x74\x65","\x43\x61\x6D\x69\x6E\x6F","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x49\x53\x5F\x4D\x41\x43","\x6D\x65\x74\x61\x4B\x65\x79","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x65\x6E\x61\x62\x6C\x65\x64","\x66\x75\x6E\x63\x74","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x4B\x65\x79","\x65\x73\x63\x61\x70\x65","\x65\x6E\x74\x65\x72","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x67\x72\x69\x64","\x61\x62\x6F\x75\x74","\x6D\x75\x73\x74\x68\x61\x76\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67\x65\x64\x67\x65","\x70\x75\x73\x68","\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x65\x64\x67\x65"];EditorUi=function(_0xdf90x1,_0xdf90x2){this[_0xafd2[0]]=_0xdf90x1|| new Editor();this[_0xafd2[1]]=_0xdf90x2||document[_0xafd2[3]](_0xafd2[2]);var _0xdf90x3=_0xdf90x1[_0xafd2[4]];var _0xdf90x4=this;this[_0xafd2[1]][_0xafd2[6]][_0xafd2[5]]=_0xafd2[7]; new Image()[_0xafd2[8]]=mxPopupMenu[_0xafd2[10]][_0xafd2[9]];if(mxConnectionHandler[_0xafd2[10]][_0xafd2[11]]!=null){ new Image()[_0xafd2[8]]=mxConnectionHandler[_0xafd2[10]][_0xafd2[11]][_0xafd2[8]]};this[_0xafd2[12]]= new Actions(this);this[_0xafd2[13]]= new Menus(this);this[_0xafd2[14]]();this[_0xafd2[15]]();this[_0xafd2[16]]();var _0xdf90x5=mxUtils[_0xafd2[20]](this,function(_0xdf90x6){if(_0xdf90x6==null){_0xdf90x6=window[_0xafd2[17]]};if(this[_0xafd2[18]](_0xdf90x6)){return true};return _0xdf90x3[_0xafd2[19]]()});if(this[_0xafd2[1]]==document[_0xafd2[21]]){this[_0xafd2[23]][_0xafd2[22]]=_0xdf90x5;this[_0xafd2[23]][_0xafd2[24]]=_0xdf90x5;this[_0xafd2[25]][_0xafd2[22]]=_0xdf90x5;this[_0xafd2[25]][_0xafd2[24]]=_0xdf90x5;this[_0xafd2[26]][_0xafd2[22]]=_0xdf90x5;this[_0xafd2[26]][_0xafd2[24]]=_0xdf90x5;this[_0xafd2[27]][_0xafd2[22]]=_0xdf90x5;this[_0xafd2[27]][_0xafd2[24]]=_0xdf90x5;this[_0xafd2[28]][_0xafd2[22]]=_0xdf90x5;this[_0xafd2[28]][_0xafd2[24]]=_0xdf90x5};if(mxClient[_0xafd2[29]]&&( typeof (document[_0xafd2[30]])===_0xafd2[31]||document[_0xafd2[30]]<9)){mxEvent[_0xafd2[33]](this[_0xafd2[26]],_0xafd2[32],_0xdf90x5);mxEvent[_0xafd2[33]](this[_0xafd2[27]],_0xafd2[32],_0xdf90x5)}else {this[_0xafd2[26]][_0xafd2[34]]=_0xdf90x5;this[_0xafd2[27]][_0xafd2[34]]=_0xdf90x5};_0xdf90x3[_0xafd2[35]](this[_0xafd2[26]]);_0xdf90x3[_0xafd2[15]]();_0xdf90x3[_0xafd2[1]][_0xafd2[38]](_0xafd2[36],_0xafd2[37]);_0xdf90x3[_0xafd2[1]][_0xafd2[6]][_0xafd2[39]]=_0xafd2[40];_0xdf90x3[_0xafd2[1]][_0xafd2[6]][_0xafd2[41]]=_0xafd2[42]+_0xdf90x1[_0xafd2[43]]+_0xafd2[44];_0xdf90x3[_0xafd2[1]][_0xafd2[6]][_0xafd2[45]]=_0xafd2[46];_0xdf90x3[_0xafd2[1]][_0xafd2[47]]();var _0xdf90x7=_0xdf90x3[_0xafd2[48]];_0xdf90x3[_0xafd2[48]]=function(_0xdf90x8,_0xdf90x9,_0xdf90xa){if(_0xdf90x8==mxEvent[_0xafd2[49]]){this[_0xafd2[1]][_0xafd2[47]]()};_0xdf90x7[_0xafd2[50]](this,arguments)};this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[52],_0xafd2[53],_0xafd2[54]],[[1,1],[1,1],[0,0]],[[0,0],[0,0],[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[57],_0xafd2[58],_0xafd2[59],_0xafd2[60],_0xafd2[61],_0xafd2[62],_0xafd2[63]],[[1,1],[0,0],[0,1],[0,1],[0,1],[1,1],[0,1]],[[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[64],_0xafd2[65]],[[1,1],[1,1]],[[1,_0xafd2[55]],[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[66],_0xafd2[67],_0xafd2[68],_0xafd2[69],_0xafd2[70],_0xafd2[71],_0xafd2[72],_0xafd2[73],_0xafd2[74]],[[1,_0xafd2[55]],[1,1],[1,_0xafd2[55]],[1,1],[1,1],[1,1],[1,1],[1,1],[1,_0xafd2[55]]],[[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[75]],[[1,1]],[[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[76],_0xafd2[77]],[[1,1],[1,1]],[[1,_0xafd2[55]],[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[78],_0xafd2[79],_0xafd2[80],_0xafd2[81],_0xafd2[82]],[[0,0],[1,2],[1,2],[1,2],[1,_0xafd2[55]]],[[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[83],_0xafd2[84]],[[1,1],[1,1]],[[1,_0xafd2[55]],[1,_0xafd2[55]]]);this[_0xafd2[56]](_0xdf90x3[_0xafd2[51]],[_0xafd2[85],_0xafd2[86],_0xafd2[87],_0xafd2[88],_0xafd2[89]],[[1,1],[1,1],[0,1],[0,1],[0,1]],[[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]],[1,_0xafd2[55]]]);_0xdf90x3[_0xafd2[90]]=function(_0xdf90x6,_0xdf90xb){var _0xdf90xc=[_0xafd2[66],_0xafd2[79],_0xafd2[80],_0xafd2[68],_0xafd2[74],_0xafd2[82]];var _0xdf90xd= new mxEventObject(mxEvent.DOUBLE_CLICK,_0xafd2[17],_0xdf90x6,_0xafd2[91],_0xdf90xb);this[_0xafd2[92]](_0xdf90xd);if(this[_0xafd2[93]]()&&!mxEvent[_0xafd2[94]](_0xdf90x6)&&!_0xdf90xd[_0xafd2[94]]()){if(this[_0xafd2[96]]()[_0xafd2[95]](_0xdf90xb)){if(_0xdf90xc[_0xafd2[100]](_0xdf90xb[_0xafd2[99]][_0xafd2[98]][_0xafd2[97]])>=0){this[_0xafd2[101]](_0xdf90xb)}}else {if(this[_0xafd2[96]]()[_0xafd2[102]](_0xdf90xb)){console[_0xafd2[103]](_0xdf90x4);console[_0xafd2[103]](_0xdf90xb);_0xdf90x4[_0xafd2[104]]( new GeneralDialog(_0xdf90x4,_0xdf90xb)[_0xafd2[1]],320,280,true,true)}};_0xdf90xd[_0xafd2[105]]()}};_0xdf90x3[_0xafd2[107]][_0xafd2[106]]=true;_0xdf90x3[_0xafd2[107]][_0xafd2[108]]=mxUtils[_0xafd2[20]](this,function(_0xdf90xe,_0xdf90xb,_0xdf90x6){this[_0xafd2[13]][_0xafd2[109]](_0xdf90xe,_0xdf90xb,_0xdf90x6)});_0xdf90x1[_0xafd2[111]][_0xafd2[35]](this[_0xafd2[110]]);mxEvent[_0xafd2[113]](document,mxUtils[_0xafd2[20]](this,function(_0xdf90x6){_0xdf90x3[_0xafd2[107]][_0xafd2[112]]()}));if(mxClient[_0xafd2[114]]){mxEvent[_0xafd2[33]](_0xdf90x3[_0xafd2[1]],_0xafd2[115],mxUtils[_0xafd2[20]](this,function(_0xdf90x6){_0xdf90x3[_0xafd2[120]][_0xafd2[119]]()[_0xafd2[38]](_0xafd2[116],_0xafd2[117]+_0xdf90x6[_0xafd2[118]]+_0xafd2[44]);_0xdf90x3[_0xafd2[120]][_0xafd2[122]]()[_0xafd2[6]][_0xafd2[121]]=_0xafd2[7]}));mxEvent[_0xafd2[33]](_0xdf90x3[_0xafd2[1]],_0xafd2[123],mxUtils[_0xafd2[20]](this,function(_0xdf90x6){_0xdf90x3[_0xafd2[120]][_0xafd2[119]]()[_0xafd2[124]](_0xafd2[116]);_0xdf90x3[_0xafd2[125]]=true;_0xdf90x3[_0xafd2[126]](_0xdf90x6[_0xafd2[118]]);_0xdf90x3[_0xafd2[120]][_0xafd2[122]]()[_0xafd2[6]][_0xafd2[121]]=_0xafd2[127]}))};var _0xdf90xf=this[_0xafd2[128]](_0xdf90x1);this[_0xafd2[129]]=function(){return _0xdf90xf};mxEvent[_0xafd2[33]](window,_0xafd2[130],mxUtils[_0xafd2[20]](this,function(){this[_0xafd2[15]]();_0xdf90x3[_0xafd2[131]]();this[_0xafd2[0]][_0xafd2[111]][_0xafd2[132]](false);this[_0xafd2[0]][_0xafd2[111]][_0xafd2[111]][_0xafd2[131]]()}));this[_0xafd2[35]]();this[_0xafd2[133]]()};EditorUi[_0xafd2[10]][_0xafd2[134]]=(mxClient[_0xafd2[114]])?16:8;EditorUi[_0xafd2[10]][_0xafd2[135]]=33;EditorUi[_0xafd2[10]][_0xafd2[136]]=36;EditorUi[_0xafd2[10]][_0xafd2[137]]=28;EditorUi[_0xafd2[10]][_0xafd2[138]]=204;EditorUi[_0xafd2[10]][_0xafd2[139]]=190;EditorUi[_0xafd2[10]][_0xafd2[35]]=function(){this[_0xafd2[140]]();this[_0xafd2[141]]();var _0xdf90x10=this[_0xafd2[12]][_0xafd2[143]](_0xafd2[142]);var _0xdf90x11=function(){_0xdf90x10[_0xafd2[145]](!mxClipboard[_0xafd2[144]]())};var _0xdf90x12=mxClipboard[_0xafd2[146]];mxClipboard[_0xafd2[146]]=function(){_0xdf90x12[_0xafd2[50]](this,arguments);_0xdf90x11()};var _0xdf90x13=mxClipboard[_0xafd2[147]];mxClipboard[_0xafd2[147]]=function(){_0xdf90x13[_0xafd2[50]](this,arguments);_0xdf90x11()}};EditorUi[_0xafd2[10]][_0xafd2[18]]=function(_0xdf90x6){return false};EditorUi[_0xafd2[10]][_0xafd2[133]]=function(){try{if(window[_0xafd2[148]]!=null&&window[_0xafd2[148]][_0xafd2[149]]!=null){window[_0xafd2[148]][_0xafd2[149]][_0xafd2[161]](mxUtils[_0xafd2[20]](this,function(_0xdf90x14,_0xdf90x15){try{var _0xdf90x16=mxUtils[_0xafd2[150]](_0xdf90x14);this[_0xafd2[0]][_0xafd2[152]](_0xdf90x16[_0xafd2[151]]);this[_0xafd2[0]][_0xafd2[153]]=false;this[_0xafd2[0]][_0xafd2[155]][_0xafd2[154]]();if(_0xdf90x15!=null){this[_0xafd2[0]][_0xafd2[156]]=_0xdf90x15}}catch(e){mxUtils[_0xafd2[160]](mxResources[_0xafd2[143]](_0xafd2[157])+_0xafd2[158]+e[_0xafd2[159]])}}))}}catch(e){}};EditorUi[_0xafd2[10]][_0xafd2[162]]=function(_0xdf90x14,_0xdf90x15,_0xdf90x17){try{var _0xdf90x16=mxUtils[_0xafd2[150]](_0xdf90x14);this[_0xafd2[0]][_0xafd2[152]](_0xdf90x16[_0xafd2[151]]);this[_0xafd2[0]][_0xafd2[153]]=false;this[_0xafd2[0]][_0xafd2[155]][_0xafd2[154]]();if(_0xdf90x15!=null){this[_0xafd2[0]][_0xafd2[156]]=_0xdf90x15};if(_0xdf90x17!=null){this[_0xafd2[0]][_0xafd2[163]]=_0xdf90x17}}catch(e){mxUtils[_0xafd2[160]](mxResources[_0xafd2[143]](_0xafd2[157])+_0xafd2[158]+e[_0xafd2[159]])}};EditorUi[_0xafd2[10]][_0xafd2[164]]=function(_0xdf90x18){var _0xdf90x1=this[_0xafd2[0]];if(_0xdf90x18!=null){var _0xdf90x14=mxUtils[_0xafd2[166]](this[_0xafd2[0]][_0xafd2[165]]());try{if(useLocalStorage){if(localStorage[_0xafd2[167]](_0xdf90x18)!=null&&!mxUtils[_0xafd2[169]](mxResources[_0xafd2[143]](_0xafd2[168],[_0xdf90x18]))){return};localStorage[_0xafd2[170]](_0xdf90x18,_0xdf90x14);this[_0xafd2[0]][_0xafd2[173]](mxResources[_0xafd2[143]](_0xafd2[171])+_0xafd2[172]+ new Date())}else {console[_0xafd2[103]](_0xdf90x14[_0xafd2[174]]);console[_0xafd2[103]](MAX_REQUEST_SIZE);if(_0xdf90x14[_0xafd2[174]]<MAX_REQUEST_SIZE){_0xdf90x14=encodeURIComponent(_0xdf90x14);_0xdf90x18=encodeURIComponent(_0xdf90x18);var _0xdf90x19= new XMLHttpRequest();_0xdf90x19[_0xafd2[133]](_0xafd2[175],SAVE_URL,true);_0xdf90x19[_0xafd2[178]](_0xafd2[176],_0xafd2[177]);_0xdf90x19[_0xafd2[178]](_0xafd2[179],_0xafd2[180]+_0xdf90x1[_0xafd2[163]][_0xafd2[181]]);_0xdf90x19[_0xafd2[182]]=function(_0xdf90x1a){if(_0xdf90x19[_0xafd2[183]]===4){if(_0xdf90x19[_0xafd2[184]]===201){_0xdf90x1[_0xafd2[173]](_0xafd2[185]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[186]]+_0xafd2[189]);setTimeout(function(){window[_0xafd2[133]](_0xafd2[190]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[191]],_0xafd2[192])},1500)}else {_0xdf90x1[_0xafd2[173]](_0xafd2[193]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[194]][0][_0xafd2[159]])}}};_0xdf90x19[_0xafd2[195]]=function(_0xdf90x1a){mxUtils[_0xafd2[160]](_0xdf90x19[_0xafd2[196]])};_0xdf90x19[_0xafd2[198]](_0xafd2[197]+_0xdf90x18)}else {mxUtils[_0xafd2[160]](mxResources[_0xafd2[143]](_0xafd2[199]));mxUtils[_0xafd2[200]](_0xdf90x14);return}};this[_0xafd2[0]][_0xafd2[156]]=_0xdf90x18;this[_0xafd2[0]][_0xafd2[153]]=false}catch(e){this[_0xafd2[0]][_0xafd2[173]](_0xafd2[201])}}else {this[_0xafd2[0]][_0xafd2[173]](_0xafd2[201])}};EditorUi[_0xafd2[10]][_0xafd2[202]]=function(_0xdf90x18){var _0xdf90x1=this[_0xafd2[0]];if(_0xdf90x18!=null){var _0xdf90x14=mxUtils[_0xafd2[166]](this[_0xafd2[0]][_0xafd2[165]]());try{if(useLocalStorage){if(localStorage[_0xafd2[167]](_0xdf90x18)!=null&&!mxUtils[_0xafd2[169]](mxResources[_0xafd2[143]](_0xafd2[168],[_0xdf90x18]))){return};localStorage[_0xafd2[170]](_0xdf90x18,_0xdf90x14);this[_0xafd2[0]][_0xafd2[173]](mxResources[_0xafd2[143]](_0xafd2[171])+_0xafd2[172]+ new Date())}else {console[_0xafd2[103]](_0xdf90x14[_0xafd2[174]]);console[_0xafd2[103]](MAX_REQUEST_SIZE);if(_0xdf90x14[_0xafd2[174]]<MAX_REQUEST_SIZE){_0xdf90x14=encodeURIComponent(_0xdf90x14);var _0xdf90x19= new XMLHttpRequest();_0xdf90x19[_0xafd2[133]](_0xafd2[203],SAVE_URL+this[_0xafd2[0]][_0xafd2[163]][_0xafd2[191]],true);_0xdf90x19[_0xafd2[178]](_0xafd2[176],_0xafd2[177]);_0xdf90x19[_0xafd2[178]](_0xafd2[179],_0xafd2[180]+_0xdf90x1[_0xafd2[163]][_0xafd2[181]]);_0xdf90x19[_0xafd2[182]]=function(_0xdf90x1a){if(_0xdf90x19[_0xafd2[183]]===4){if(_0xdf90x19[_0xafd2[184]]===200){_0xdf90x1[_0xafd2[173]](_0xafd2[204]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[205]]+_0xafd2[206]+_0xdf90x19[_0xafd2[184]]+_0xafd2[172]+_0xdf90x19[_0xafd2[196]]+_0xafd2[44])}else {_0xdf90x1[_0xafd2[173]](_0xafd2[207]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[194]][0][_0xafd2[159]])}}};_0xdf90x19[_0xafd2[195]]=function(_0xdf90x1a){mxUtils[_0xafd2[160]](_0xdf90x19[_0xafd2[196]])};_0xdf90x19[_0xafd2[198]](_0xafd2[208]+_0xdf90x14)}else {mxUtils[_0xafd2[160]](mxResources[_0xafd2[143]](_0xafd2[199]));mxUtils[_0xafd2[200]](_0xdf90x14);return}};this[_0xafd2[0]][_0xafd2[156]]=_0xdf90x18;this[_0xafd2[0]][_0xafd2[153]]=false}catch(e){this[_0xafd2[0]][_0xafd2[173]](_0xafd2[209])}}else {this[_0xafd2[0]][_0xafd2[173]](_0xafd2[209])}};EditorUi[_0xafd2[10]][_0xafd2[210]]=function(_0xdf90x18){var _0xdf90x1=this[_0xafd2[0]];if(_0xdf90x18!=null){var _0xdf90x14=mxUtils[_0xafd2[166]](this[_0xafd2[0]][_0xafd2[165]]());try{if(useLocalStorage){if(localStorage[_0xafd2[167]](_0xdf90x18)!=null&&!mxUtils[_0xafd2[169]](mxResources[_0xafd2[143]](_0xafd2[168],[_0xdf90x18]))){return};localStorage[_0xafd2[170]](_0xdf90x18,_0xdf90x14);this[_0xafd2[0]][_0xafd2[173]](mxResources[_0xafd2[143]](_0xafd2[171])+_0xafd2[172]+ new Date())}else {console[_0xafd2[103]](_0xdf90x14[_0xafd2[174]]);console[_0xafd2[103]](MAX_REQUEST_SIZE);if(_0xdf90x14[_0xafd2[174]]<MAX_REQUEST_SIZE){_0xdf90x14=encodeURIComponent(_0xdf90x14);_0xdf90x18=encodeURIComponent(_0xdf90x18);var _0xdf90x19= new XMLHttpRequest();_0xdf90x19[_0xafd2[133]](_0xafd2[175],SAVE_URL,true);_0xdf90x19[_0xafd2[178]](_0xafd2[176],_0xafd2[177]);_0xdf90x19[_0xafd2[178]](_0xafd2[179],_0xafd2[180]+_0xdf90x1[_0xafd2[163]][_0xafd2[181]]);_0xdf90x19[_0xafd2[182]]=function(_0xdf90x1a){if(_0xdf90x19[_0xafd2[183]]===4){if(_0xdf90x19[_0xafd2[184]]===201){_0xdf90x1[_0xafd2[173]](_0xafd2[185]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[186]]+_0xafd2[189]);setTimeout(function(){window[_0xafd2[133]](_0xafd2[190]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[191]],_0xafd2[192])},1500)}else {_0xdf90x1[_0xafd2[173]](_0xafd2[211]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[194]][0][_0xafd2[159]])}}};_0xdf90x19[_0xafd2[195]]=function(_0xdf90x1a){mxUtils[_0xafd2[160]](_0xdf90x19[_0xafd2[196]])};_0xdf90x19[_0xafd2[198]](_0xafd2[212]+_0xdf90x18+_0xafd2[213]+_0xdf90x14+_0xafd2[214]+_0xdf90x14)}else {mxUtils[_0xafd2[160]](mxResources[_0xafd2[143]](_0xafd2[199]));mxUtils[_0xafd2[200]](_0xdf90x14);return}};this[_0xafd2[0]][_0xafd2[156]]=_0xdf90x18;this[_0xafd2[0]][_0xafd2[153]]=false}catch(e){this[_0xafd2[0]][_0xafd2[173]](_0xafd2[209])}}else {this[_0xafd2[0]][_0xafd2[173]](_0xafd2[209])}};EditorUi[_0xafd2[10]][_0xafd2[215]]=function(_0xdf90x1b,_0xdf90x1c){var _0xdf90x3=this[_0xafd2[0]][_0xafd2[4]];for(var _0xdf90x1b=_0xdf90x1b!=null?_0xdf90x1b:_0xdf90x3[_0xafd2[217]][_0xafd2[216]](),_0xdf90x1c=_0xdf90x1c!=null?_0xdf90x1c:{},_0xdf90x1d=true,_0xdf90x1e=_0xdf90x3[_0xafd2[217]][_0xafd2[218]](_0xdf90x1b),_0xdf90x1a=0;_0xdf90x1a<_0xdf90x1e;_0xdf90x1a++){var _0xdf90x1f=_0xdf90x3[_0xafd2[217]][_0xafd2[219]](_0xdf90x1b,_0xdf90x1a),_0xdf90x20=_0xdf90x1c;_0xdf90x3[_0xafd2[220]](_0xdf90x1f)&&(_0xdf90x20={});_0xdf90x20=this[_0xafd2[215]](_0xdf90x1f,_0xdf90x20);_0xdf90x20!=null?_0xdf90x3[_0xafd2[222]](_0xdf90x1f,_0xdf90x20[_0xafd2[168]](/\n/g,_0xafd2[221])):_0xdf90x3[_0xafd2[222]](_0xdf90x1f,null);_0xdf90x1d=_0xdf90x1d&&_0xdf90x20==null};_0xdf90x1e=_0xafd2[223];if(_0xdf90x3[_0xafd2[217]][_0xafd2[102]](_0xdf90x1b)){switch(_0xdf90x1b[_0xafd2[98]][_0xafd2[267]]){case _0xafd2[52]:_0xdf90x1e=this[_0xafd2[224]](_0xafd2[52])?_0xafd2[223]:_0xafd2[225]+_0xafd2[226];break;case _0xafd2[53]:_0xdf90x1e=this[_0xafd2[224]](_0xafd2[53])?_0xafd2[223]:_0xafd2[227]+_0xafd2[226];break;case _0xafd2[67]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[228])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[230])+_0xafd2[226];break;case _0xafd2[66]:;case _0xafd2[68]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[228])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[230])+_0xafd2[226];_0xdf90x1e+=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[231])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[232])+_0xafd2[226];break;case _0xafd2[74]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[228])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[230])+_0xafd2[226];_0xdf90x1e+=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[231])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[232])+_0xafd2[226];break;case _0xafd2[82]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[233])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[232])+_0xafd2[226];break;case _0xafd2[76]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[234])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[235])+_0xafd2[226];break;case _0xafd2[64]:;case _0xafd2[65]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[231])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[232])+_0xafd2[226];break;case _0xafd2[78]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[236])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[237])+_0xafd2[226];break;case _0xafd2[86]:;case _0xafd2[87]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[238])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[239])+_0xafd2[226];break;case _0xafd2[79]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[240])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[241])+_0xafd2[226];break;case _0xafd2[69]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[242])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[243])+_0xafd2[226];break;case _0xafd2[70]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[244])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[245])+_0xafd2[226];break;case _0xafd2[71]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[246])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[247])+_0xafd2[226];break;case _0xafd2[75]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[156])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[248])+_0xafd2[226];break;case _0xafd2[84]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[249])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[250])+_0xafd2[226];break;case _0xafd2[60]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[251])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[252])+_0xafd2[226];break;case _0xafd2[59]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[253])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[252])+_0xafd2[226];break;case _0xafd2[61]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[254])!==_0xafd2[255])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[256])+_0xafd2[226];break;case _0xafd2[63]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[257])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[258])+_0xafd2[226];break;case _0xafd2[80]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[259])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[260])+_0xafd2[226];break;case _0xafd2[81]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[259])!=_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[260])+_0xafd2[226];break;case _0xafd2[62]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[261])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[262])+_0xafd2[226];break;case _0xafd2[88]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[263])>0)?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[264])+_0xafd2[226];break;case _0xafd2[72]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[246])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[247])+_0xafd2[226];break;case _0xafd2[73]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[246])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[247])+_0xafd2[226];_0xdf90x1e+=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[265])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[266])+_0xafd2[226];break;case _0xafd2[77]:_0xdf90x1e=(_0xdf90x1b[_0xafd2[98]][_0xafd2[229]](_0xafd2[265])!==_0xafd2[223])?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[266])+_0xafd2[226];break}};if(_0xdf90x3[_0xafd2[217]][_0xafd2[95]](_0xdf90x1b)){var _0xdf90x21=_0xdf90x3[_0xafd2[217]][_0xafd2[269]](_0xdf90x1b[_0xafd2[99]][_0xafd2[268]]());switch(_0xdf90x21[_0xafd2[98]][_0xafd2[267]]){case _0xafd2[66]:var _0xdf90x22=/^[0-9]{1,45}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;_0xdf90x1e=_0xdf90x1e+((_0xdf90x22[_0xafd2[271]](String(_0xdf90x1b[_0xafd2[270]]())))?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[272])+_0xafd2[226]);break;case _0xafd2[68]:var _0xdf90x22=/^[0-9]{1,45}$|^[-]{1}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;var _0xdf90x23=String(_0xdf90x1b[_0xafd2[270]]());var _0xdf90x24=_0xdf90x23[_0xafd2[274]](_0xafd2[273]);_0xdf90x24[_0xafd2[276]](function(_0xdf90x25){_0xdf90x1e=_0xdf90x1e+((_0xdf90x22[_0xafd2[271]](_0xdf90x25))?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[275])+_0xafd2[226])});break;case _0xafd2[74]:var _0xdf90x22=/^(x|i|-)$/;var _0xdf90x23=String(_0xdf90x1b[_0xafd2[270]]());_0xdf90x1e=_0xdf90x1e+((_0xdf90x22[_0xafd2[271]](_0xdf90x23))?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[277])+_0xafd2[226]);break;case _0xafd2[79]:;case _0xafd2[80]:;case _0xafd2[81]:var _0xdf90x22=/^(true){1}$|^(false){1}$/;_0xdf90x1e=_0xdf90x1e+((_0xdf90x22[_0xafd2[271]](String(_0xdf90x1b[_0xafd2[270]]())))?_0xafd2[223]:mxResources[_0xafd2[143]](_0xafd2[278])+_0xafd2[226]);break}};_0xdf90x3[_0xafd2[279]](_0xdf90x1b)&&!_0xdf90x1d&&(_0xdf90x1e=_0xdf90x1e+((mxResources[_0xafd2[143]](_0xdf90x3[_0xafd2[280]])||_0xdf90x3[_0xafd2[280]])+_0xafd2[226]));_0xdf90x1e=_0xdf90x3[_0xafd2[217]][_0xafd2[95]](_0xdf90x1b)?_0xdf90x1e+(_0xdf90x3[_0xafd2[282]](_0xdf90x1b,_0xdf90x3[_0xafd2[217]][_0xafd2[281]](_0xdf90x1b,true),_0xdf90x3[_0xafd2[217]][_0xafd2[281]](_0xdf90x1b,false))||_0xafd2[223]):_0xdf90x1e+(_0xdf90x3[_0xafd2[283]](_0xdf90x1b)||_0xafd2[223]);_0xdf90x1a=_0xdf90x3[_0xafd2[284]](_0xdf90x1b,_0xdf90x1c);_0xdf90x1a!=null&&(_0xdf90x1e=_0xdf90x1e+_0xdf90x1a);_0xdf90x3[_0xafd2[217]][_0xafd2[285]](_0xdf90x1b)==null&&_0xdf90x3[_0xafd2[120]][_0xafd2[215]]();return _0xdf90x1e[_0xafd2[174]]>0||!_0xdf90x1d?_0xdf90x1e:null};EditorUi[_0xafd2[10]][_0xafd2[224]]=function(_0xdf90x26){var _0xdf90x3=this[_0xafd2[0]][_0xafd2[4]];var _0xdf90x27=_0xdf90x3[_0xafd2[286]]();var _0xdf90x28=0;_0xdf90x27[_0xafd2[287]][_0xafd2[276]](function(_0xdf90x29){if(_0xdf90x3[_0xafd2[217]][_0xafd2[102]](_0xdf90x29)&&_0xdf90x29[_0xafd2[98]][_0xafd2[267]]==_0xdf90x26){_0xdf90x28++}});return _0xdf90x28>1?false:true};EditorUi[_0xafd2[10]][_0xafd2[288]]=function(_0xdf90x18){var _0xdf90x1=this[_0xafd2[0]];if(_0xdf90x18!=null){var _0xdf90x2a=this[_0xafd2[215]]();if(_0xdf90x2a===null){var _0xdf90x14=mxUtils[_0xafd2[166]](this[_0xafd2[0]][_0xafd2[165]]());try{if(useLocalStorage){if(localStorage[_0xafd2[167]](_0xdf90x18)!=null&&!mxUtils[_0xafd2[169]](mxResources[_0xafd2[143]](_0xafd2[168],[_0xdf90x18]))){return};localStorage[_0xafd2[170]](_0xdf90x18,_0xdf90x14);this[_0xafd2[0]][_0xafd2[173]](mxResources[_0xafd2[143]](_0xafd2[171])+_0xafd2[172]+ new Date())}else {console[_0xafd2[103]](_0xdf90x14[_0xafd2[174]]);console[_0xafd2[103]](MAX_REQUEST_SIZE);if(_0xdf90x14[_0xafd2[174]]<MAX_REQUEST_SIZE){_0xdf90x14=encodeURIComponent(_0xdf90x14);var _0xdf90x19= new XMLHttpRequest();_0xdf90x19[_0xafd2[133]](_0xafd2[203],SAVE_URL+this[_0xafd2[0]][_0xafd2[163]][_0xafd2[191]],true);_0xdf90x19[_0xafd2[178]](_0xafd2[176],_0xafd2[177]);_0xdf90x19[_0xafd2[178]](_0xafd2[179],_0xafd2[180]+_0xdf90x1[_0xafd2[163]][_0xafd2[181]]);_0xdf90x19[_0xafd2[182]]=function(_0xdf90x1a){if(_0xdf90x19[_0xafd2[183]]===4){if(_0xdf90x19[_0xafd2[184]]===200){_0xdf90x1[_0xafd2[173]](_0xafd2[289]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[205]]+_0xafd2[206]+_0xdf90x19[_0xafd2[184]]+_0xafd2[172]+_0xdf90x19[_0xafd2[196]]+_0xafd2[44])}else {_0xdf90x1[_0xafd2[173]](_0xafd2[207]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[194]][0][_0xafd2[159]])}}};_0xdf90x19[_0xafd2[195]]=function(_0xdf90x1a){mxUtils[_0xafd2[160]](_0xdf90x19[_0xafd2[196]])};_0xdf90x19[_0xafd2[198]](_0xafd2[208]+_0xdf90x14+_0xafd2[214]+_0xdf90x14)}else {mxUtils[_0xafd2[160]](mxResources[_0xafd2[143]](_0xafd2[199]));mxUtils[_0xafd2[200]](_0xdf90x14);return}};this[_0xafd2[0]][_0xafd2[156]]=_0xdf90x18;this[_0xafd2[0]][_0xafd2[153]]=false}catch(e){this[_0xafd2[0]][_0xafd2[173]](_0xafd2[290])}}else {_0xdf90x1[_0xafd2[173]](_0xafd2[291])}}else {this[_0xafd2[0]][_0xafd2[173]](_0xafd2[290])}};EditorUi[_0xafd2[10]][_0xafd2[233]]=function(_0xdf90x18){var _0xdf90x1=this[_0xafd2[0]];if(_0xdf90x18!=null){try{var _0xdf90x19= new XMLHttpRequest();_0xdf90x19[_0xafd2[133]](_0xafd2[175],VARIABLE_URL,true);_0xdf90x19[_0xafd2[178]](_0xafd2[176],_0xafd2[177]);_0xdf90x19[_0xafd2[178]](_0xafd2[179],_0xafd2[180]+_0xdf90x1[_0xafd2[163]][_0xafd2[181]]);_0xdf90x19[_0xafd2[182]]=function(_0xdf90x1a){if(_0xdf90x19[_0xafd2[183]]===4){if(_0xdf90x19[_0xafd2[184]]===201){_0xdf90x1[_0xafd2[173]](_0xafd2[292]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[293]]+_0xafd2[206]+_0xdf90x19[_0xafd2[184]]+_0xafd2[172]+_0xdf90x19[_0xafd2[196]]+_0xafd2[44])}else {_0xdf90x1[_0xafd2[173]](_0xafd2[294]+JSON[_0xafd2[188]](_0xdf90x19[_0xafd2[187]])[_0xafd2[194]][0][_0xafd2[159]])}}};_0xdf90x19[_0xafd2[195]]=function(_0xdf90x1a){mxUtils[_0xafd2[160]](_0xdf90x19[_0xafd2[196]])};_0xdf90x19[_0xafd2[198]](_0xafd2[295]+_0xdf90x18)}catch(e){this[_0xafd2[0]][_0xafd2[173]](_0xafd2[296])}}else {this[_0xafd2[0]][_0xafd2[173]](_0xafd2[296])}};EditorUi[_0xafd2[10]][_0xafd2[297]]=function(_0xdf90x2b){var _0xdf90x2c=(_0xdf90x2b!=null)?_0xdf90x2b:window[_0xafd2[299]][_0xafd2[298]];var _0xdf90x2d=(_0xdf90x2c[_0xafd2[100]](_0xafd2[300])>0)?1:0;for(var _0xdf90x2e in urlParams){if(_0xdf90x2d==0){_0xdf90x2c+=_0xafd2[300]}else {_0xdf90x2c+=_0xafd2[301]};_0xdf90x2c+=_0xdf90x2e+_0xafd2[302]+urlParams[_0xdf90x2e];_0xdf90x2d++};return _0xdf90x2c};EditorUi[_0xafd2[10]][_0xafd2[140]]=function(){var _0xdf90x2f=this[_0xafd2[12]][_0xafd2[143]](_0xafd2[303]);var _0xdf90x30=this[_0xafd2[12]][_0xafd2[143]](_0xafd2[304]);var _0xdf90x31=this[_0xafd2[0]][_0xafd2[155]];var _0xdf90x32=function(){_0xdf90x2f[_0xafd2[145]](_0xdf90x31[_0xafd2[305]]());_0xdf90x30[_0xafd2[145]](_0xdf90x31[_0xafd2[306]]())};_0xdf90x31[_0xafd2[33]](mxEvent.ADD,_0xdf90x32);_0xdf90x31[_0xafd2[33]](mxEvent.UNDO,_0xdf90x32);_0xdf90x31[_0xafd2[33]](mxEvent.REDO,_0xdf90x32);_0xdf90x31[_0xafd2[33]](mxEvent.CLEAR,_0xdf90x32);_0xdf90x32()};EditorUi[_0xafd2[10]][_0xafd2[141]]=function(){var _0xdf90x33=mxUtils[_0xafd2[20]](this,function(){var _0xdf90x3=this[_0xafd2[0]][_0xafd2[4]];var _0xdf90x34=!_0xdf90x3[_0xafd2[307]]();var _0xdf90x35=false;var _0xdf90x36=false;var _0xdf90x37=_0xdf90x3[_0xafd2[308]]();if(_0xdf90x37!=null){for(var _0xdf90x38=0;_0xdf90x38<_0xdf90x37[_0xafd2[174]];_0xdf90x38++){var _0xdf90xb=_0xdf90x37[_0xdf90x38];if(_0xdf90x3[_0xafd2[96]]()[_0xafd2[95]](_0xdf90xb)){_0xdf90x36=true};if(_0xdf90x3[_0xafd2[96]]()[_0xafd2[102]](_0xdf90xb)){_0xdf90x35=true};if(_0xdf90x36&&_0xdf90x35){break}}};var _0xdf90x39=[_0xafd2[146],_0xafd2[147],_0xafd2[309],_0xafd2[310],_0xafd2[311],_0xafd2[312],_0xafd2[6],_0xafd2[313],_0xafd2[314],_0xafd2[315],_0xafd2[316],_0xafd2[317],_0xafd2[318],_0xafd2[319],_0xafd2[320]];for(var _0xdf90x38=0;_0xdf90x38<_0xdf90x39[_0xafd2[174]];_0xdf90x38++){this[_0xafd2[12]][_0xafd2[143]](_0xdf90x39[_0xdf90x38])[_0xafd2[145]](_0xdf90x34)};this[_0xafd2[12]][_0xafd2[143]](_0xafd2[321])[_0xafd2[145]](_0xdf90x36);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[322])[_0xafd2[145]](_0xdf90x35);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[323])[_0xafd2[145]](_0xdf90x35);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[325])[_0xafd2[145]](_0xdf90x3[_0xafd2[324]]()>1);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[327])[_0xafd2[145]](_0xdf90x3[_0xafd2[324]]()==1&&_0xdf90x3[_0xafd2[96]]()[_0xafd2[218]](_0xdf90x3[_0xafd2[326]]())>0);var _0xdf90x3a=_0xdf90x35&&_0xdf90x3[_0xafd2[324]]()==1;this[_0xafd2[12]][_0xafd2[143]](_0xafd2[328])[_0xafd2[145]](_0xdf90x3a&&_0xdf90x3[_0xafd2[96]]()[_0xafd2[102]](_0xdf90x3[_0xafd2[96]]()[_0xafd2[285]](_0xdf90x3[_0xafd2[326]]())));var _0xdf90x3b=[_0xafd2[329],_0xafd2[330],_0xafd2[331],_0xafd2[332],_0xafd2[246],_0xafd2[333],_0xafd2[334],_0xafd2[335],_0xafd2[336]];for(var _0xdf90x38=0;_0xdf90x38<_0xdf90x3b[_0xafd2[174]];_0xdf90x38++){this[_0xafd2[13]][_0xafd2[143]](_0xdf90x3b[_0xdf90x38])[_0xafd2[145]](_0xdf90x34)};_0xdf90x3b=[_0xafd2[337],_0xafd2[338],_0xafd2[339]];for(var _0xdf90x38=0;_0xdf90x38<_0xdf90x3b[_0xafd2[174]];_0xdf90x38++){this[_0xafd2[13]][_0xafd2[143]](_0xdf90x3b[_0xdf90x38])[_0xafd2[145]](_0xdf90x36)};this[_0xafd2[12]][_0xafd2[143]](_0xafd2[340])[_0xafd2[145]](_0xdf90x36);this[_0xafd2[13]][_0xafd2[143]](_0xafd2[341])[_0xafd2[145]](_0xdf90x3[_0xafd2[324]]()>1);this[_0xafd2[13]][_0xafd2[143]](_0xafd2[344])[_0xafd2[145]](_0xdf90x35||(_0xdf90x36&&_0xdf90x3[_0xafd2[343]](_0xdf90x3[_0xafd2[120]][_0xafd2[342]](_0xdf90x3[_0xafd2[326]]()))));this[_0xafd2[13]][_0xafd2[143]](_0xafd2[347])[_0xafd2[145]](_0xdf90x3[_0xafd2[345]]&&((_0xdf90x3[_0xafd2[120]][_0xafd2[346]]!=null)||(_0xdf90x3[_0xafd2[324]]()==1&&_0xdf90x3[_0xafd2[220]](_0xdf90x3[_0xafd2[326]]()))));this[_0xafd2[12]][_0xafd2[143]](_0xafd2[348])[_0xafd2[145]](_0xdf90x3[_0xafd2[120]][_0xafd2[346]]!=null);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[349])[_0xafd2[145]](_0xdf90x3[_0xafd2[120]][_0xafd2[346]]!=null);var _0xdf90x3c=_0xdf90x3[_0xafd2[324]]()==1&&_0xdf90x3[_0xafd2[220]](_0xdf90x3[_0xafd2[326]]());this[_0xafd2[12]][_0xafd2[143]](_0xafd2[350])[_0xafd2[145]](_0xdf90x3c);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[351])[_0xafd2[145]](_0xdf90x3c);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[352])[_0xafd2[145]](_0xdf90x3c);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[353])[_0xafd2[145]](_0xdf90x3[_0xafd2[324]]()==1);this[_0xafd2[12]][_0xafd2[143]](_0xafd2[355])[_0xafd2[145]](_0xdf90x3[_0xafd2[324]]()==1&&_0xdf90x3[_0xafd2[354]](_0xdf90x3[_0xafd2[326]]())!=null)});this[_0xafd2[0]][_0xafd2[4]][_0xafd2[356]]()[_0xafd2[33]](mxEvent.CHANGE,_0xdf90x33);_0xdf90x33()};EditorUi[_0xafd2[10]][_0xafd2[15]]=function(){var _0xdf90x3d=mxClient[_0xafd2[29]]&&(document[_0xafd2[30]]==null||document[_0xafd2[30]]==5);var _0xdf90x3e=this[_0xafd2[1]][_0xafd2[357]];var _0xdf90x3f=this[_0xafd2[1]][_0xafd2[358]];if(this[_0xafd2[1]]==document[_0xafd2[21]]){_0xdf90x3e=document[_0xafd2[21]][_0xafd2[357]]||document[_0xafd2[151]][_0xafd2[357]];_0xdf90x3f=(_0xdf90x3d)?document[_0xafd2[21]][_0xafd2[358]]||document[_0xafd2[151]][_0xafd2[358]]:document[_0xafd2[151]][_0xafd2[358]]};var _0xdf90x40=Math[_0xafd2[360]](0,Math[_0xafd2[359]](this[_0xafd2[138]],_0xdf90x3e-this[_0xafd2[134]]-20));var _0xdf90x41=Math[_0xafd2[360]](0,Math[_0xafd2[359]](this[_0xafd2[139]],_0xdf90x3f-this[_0xafd2[135]]-this[_0xafd2[136]]-this[_0xafd2[137]]-this[_0xafd2[134]]-1));this[_0xafd2[23]][_0xafd2[6]][_0xafd2[361]]=this[_0xafd2[135]]+_0xafd2[362];this[_0xafd2[25]][_0xafd2[6]][_0xafd2[363]]=this[_0xafd2[135]]+_0xafd2[362];this[_0xafd2[25]][_0xafd2[6]][_0xafd2[361]]=this[_0xafd2[136]]+_0xafd2[362];var _0xdf90x42=this[_0xafd2[135]]+this[_0xafd2[136]];if(!mxClient[_0xafd2[364]]){_0xdf90x42+=1};this[_0xafd2[27]][_0xafd2[6]][_0xafd2[363]]=_0xdf90x42+_0xafd2[362];this[_0xafd2[27]][_0xafd2[6]][_0xafd2[365]]=_0xdf90x40+_0xafd2[362];this[_0xafd2[110]][_0xafd2[6]][_0xafd2[365]]=_0xdf90x40+_0xafd2[362];this[_0xafd2[110]][_0xafd2[6]][_0xafd2[361]]=_0xdf90x41+_0xafd2[362];this[_0xafd2[110]][_0xafd2[6]][_0xafd2[366]]=this[_0xafd2[137]]+_0xafd2[362];this[_0xafd2[26]][_0xafd2[6]][_0xafd2[367]]=(_0xdf90x40+this[_0xafd2[134]])+_0xafd2[362];this[_0xafd2[26]][_0xafd2[6]][_0xafd2[363]]=this[_0xafd2[27]][_0xafd2[6]][_0xafd2[363]];this[_0xafd2[28]][_0xafd2[6]][_0xafd2[361]]=this[_0xafd2[137]]+_0xafd2[362];this[_0xafd2[28]][_0xafd2[6]][_0xafd2[368]]=_0xafd2[369];this[_0xafd2[370]][_0xafd2[6]][_0xafd2[363]]=this[_0xafd2[27]][_0xafd2[6]][_0xafd2[363]];this[_0xafd2[370]][_0xafd2[6]][_0xafd2[366]]=this[_0xafd2[110]][_0xafd2[6]][_0xafd2[366]];this[_0xafd2[370]][_0xafd2[6]][_0xafd2[367]]=_0xdf90x40+_0xafd2[362];this[_0xafd2[371]][_0xafd2[6]][_0xafd2[365]]=this[_0xafd2[27]][_0xafd2[6]][_0xafd2[365]];this[_0xafd2[371]][_0xafd2[6]][_0xafd2[366]]=(_0xdf90x41+this[_0xafd2[137]])+_0xafd2[362];if(_0xdf90x3d){this[_0xafd2[23]][_0xafd2[6]][_0xafd2[365]]=_0xdf90x3e+_0xafd2[362];this[_0xafd2[25]][_0xafd2[6]][_0xafd2[365]]=this[_0xafd2[23]][_0xafd2[6]][_0xafd2[365]];var _0xdf90x43=(_0xdf90x3f-_0xdf90x41-this[_0xafd2[134]]-this[_0xafd2[137]]-this[_0xafd2[135]]-this[_0xafd2[136]]);this[_0xafd2[27]][_0xafd2[6]][_0xafd2[361]]=_0xdf90x43+_0xafd2[362];this[_0xafd2[26]][_0xafd2[6]][_0xafd2[365]]=(_0xdf90x3e-_0xdf90x40-this[_0xafd2[134]])+_0xafd2[362];var _0xdf90x44=(_0xdf90x3f-this[_0xafd2[137]]-this[_0xafd2[135]]-this[_0xafd2[136]]);this[_0xafd2[26]][_0xafd2[6]][_0xafd2[361]]=_0xdf90x44+_0xafd2[362];this[_0xafd2[28]][_0xafd2[6]][_0xafd2[365]]=this[_0xafd2[23]][_0xafd2[6]][_0xafd2[365]];this[_0xafd2[370]][_0xafd2[6]][_0xafd2[361]]=_0xdf90x44+_0xafd2[362]}else {this[_0xafd2[27]][_0xafd2[6]][_0xafd2[366]]=(_0xdf90x41+this[_0xafd2[134]]+this[_0xafd2[137]])+_0xafd2[362];this[_0xafd2[26]][_0xafd2[6]][_0xafd2[366]]=this[_0xafd2[110]][_0xafd2[6]][_0xafd2[366]]}};EditorUi[_0xafd2[10]][_0xafd2[14]]=function(){this[_0xafd2[23]]=this[_0xafd2[373]](_0xafd2[372]);this[_0xafd2[25]]=this[_0xafd2[373]](_0xafd2[374]);this[_0xafd2[27]]=this[_0xafd2[373]](_0xafd2[375]);this[_0xafd2[110]]=this[_0xafd2[373]](_0xafd2[376]);this[_0xafd2[26]]=this[_0xafd2[373]](_0xafd2[377]);this[_0xafd2[28]]=this[_0xafd2[373]](_0xafd2[378]);this[_0xafd2[370]]=this[_0xafd2[373]](_0xafd2[379]);this[_0xafd2[371]]=this[_0xafd2[373]](_0xafd2[380]);this[_0xafd2[23]][_0xafd2[6]][_0xafd2[363]]=_0xafd2[381];this[_0xafd2[23]][_0xafd2[6]][_0xafd2[367]]=_0xafd2[381];this[_0xafd2[23]][_0xafd2[6]][_0xafd2[382]]=_0xafd2[381];this[_0xafd2[25]][_0xafd2[6]][_0xafd2[367]]=_0xafd2[381];this[_0xafd2[25]][_0xafd2[6]][_0xafd2[382]]=_0xafd2[381];this[_0xafd2[27]][_0xafd2[6]][_0xafd2[367]]=_0xafd2[381];this[_0xafd2[110]][_0xafd2[6]][_0xafd2[367]]=_0xafd2[381];this[_0xafd2[26]][_0xafd2[6]][_0xafd2[382]]=_0xafd2[381];this[_0xafd2[28]][_0xafd2[6]][_0xafd2[367]]=_0xafd2[381];this[_0xafd2[28]][_0xafd2[6]][_0xafd2[382]]=_0xafd2[381];this[_0xafd2[28]][_0xafd2[6]][_0xafd2[366]]=_0xafd2[381];this[_0xafd2[371]][_0xafd2[6]][_0xafd2[367]]=_0xafd2[381];this[_0xafd2[371]][_0xafd2[6]][_0xafd2[361]]=this[_0xafd2[134]]+_0xafd2[362];this[_0xafd2[370]][_0xafd2[6]][_0xafd2[365]]=this[_0xafd2[134]]+_0xafd2[362]};EditorUi[_0xafd2[10]][_0xafd2[16]]=function(){this[_0xafd2[383]]=this[_0xafd2[13]][_0xafd2[385]](this[_0xafd2[373]](_0xafd2[384]));this[_0xafd2[23]][_0xafd2[386]](this[_0xafd2[383]][_0xafd2[1]]);this[_0xafd2[387]]=this[_0xafd2[389]](this[_0xafd2[373]](_0xafd2[388]));this[_0xafd2[25]][_0xafd2[386]](this[_0xafd2[387]][_0xafd2[1]]);this[_0xafd2[390]]=this[_0xafd2[391]](this[_0xafd2[27]]);this[_0xafd2[28]][_0xafd2[386]](this[_0xafd2[392]]());this[_0xafd2[393]]=this[_0xafd2[394]]();this[_0xafd2[0]][_0xafd2[33]](_0xafd2[395],mxUtils[_0xafd2[20]](this,function(){this[_0xafd2[397]](this[_0xafd2[0]][_0xafd2[396]]())}));this[_0xafd2[397]](this[_0xafd2[0]][_0xafd2[396]]());this[_0xafd2[383]][_0xafd2[1]][_0xafd2[386]](this[_0xafd2[393]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[23]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[25]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[27]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[110]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[26]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[28]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[370]]);this[_0xafd2[1]][_0xafd2[386]](this[_0xafd2[371]]);this[_0xafd2[398]](this[_0xafd2[370]],true,0,mxUtils[_0xafd2[20]](this,function(_0xdf90x45){this[_0xafd2[138]]=_0xdf90x45;this[_0xafd2[15]]();this[_0xafd2[0]][_0xafd2[4]][_0xafd2[131]]();this[_0xafd2[0]][_0xafd2[111]][_0xafd2[132]](false);this[_0xafd2[0]][_0xafd2[111]][_0xafd2[111]][_0xafd2[131]]()}));this[_0xafd2[398]](this[_0xafd2[371]],false,this[_0xafd2[137]],mxUtils[_0xafd2[20]](this,function(_0xdf90x45){this[_0xafd2[139]]=_0xdf90x45;this[_0xafd2[15]]();this[_0xafd2[0]][_0xafd2[111]][_0xafd2[132]](false);this[_0xafd2[0]][_0xafd2[111]][_0xafd2[111]][_0xafd2[131]]()}))};EditorUi[_0xafd2[10]][_0xafd2[394]]=function(){var _0xdf90x2=document[_0xafd2[400]](_0xafd2[399]);_0xdf90x2[_0xafd2[401]]=_0xafd2[402];return _0xdf90x2};EditorUi[_0xafd2[10]][_0xafd2[394]]=function(){var _0xdf90x2=document[_0xafd2[400]](_0xafd2[399]);_0xdf90x2[_0xafd2[401]]=_0xafd2[402];return _0xdf90x2};EditorUi[_0xafd2[10]][_0xafd2[397]]=function(_0xdf90x45){this[_0xafd2[393]][_0xafd2[403]]=_0xdf90x45};EditorUi[_0xafd2[10]][_0xafd2[389]]=function(_0xdf90x2){return  new Toolbar(this,_0xdf90x2)};EditorUi[_0xafd2[10]][_0xafd2[391]]=function(_0xdf90x2){return  new Sidebar(this,_0xdf90x2)};EditorUi[_0xafd2[10]][_0xafd2[392]]=function(){return this[_0xafd2[373]](_0xafd2[404])};EditorUi[_0xafd2[10]][_0xafd2[373]]=function(_0xdf90x46){var _0xdf90x47=document[_0xafd2[400]](_0xafd2[405]);_0xdf90x47[_0xafd2[401]]=_0xdf90x46;return _0xdf90x47};EditorUi[_0xafd2[10]][_0xafd2[406]]=function(_0xdf90x46){var _0xdf90x47=document[_0xafd2[400]](_0xdf90x46);return _0xdf90x47};EditorUi[_0xafd2[10]][_0xafd2[407]]=function(_0xdf90x46){var _0xdf90x47=document[_0xafd2[400]](_0xafd2[408]);_0xdf90x47[_0xafd2[401]]=_0xdf90x46;return _0xdf90x47};EditorUi[_0xafd2[10]][_0xafd2[398]]=function(_0xdf90x47,_0xdf90x48,_0xdf90x49,_0xdf90x4a){var _0xdf90x4b=null;var _0xdf90x4c=null;function _0xdf90x4d(){return parseInt(((_0xdf90x48)?_0xdf90x47[_0xafd2[6]][_0xafd2[367]]:_0xdf90x47[_0xafd2[6]][_0xafd2[366]]))}function _0xdf90x4e(_0xdf90x6){if(_0xdf90x4b!=null){var _0xdf90x4f= new mxPoint(mxEvent[_0xafd2[409]](_0xdf90x6),mxEvent[_0xafd2[410]](_0xdf90x6));_0xdf90x4a(Math[_0xafd2[360]](0,_0xdf90x4c+((_0xdf90x48)?(_0xdf90x4f[_0xafd2[411]]-_0xdf90x4b[_0xafd2[411]]):(_0xdf90x4b[_0xafd2[412]]-_0xdf90x4f[_0xafd2[412]]))-_0xdf90x49));mxEvent[_0xafd2[105]](_0xdf90x6)}}function _0xdf90x50(_0xdf90x6){_0xdf90x4e(_0xdf90x6);_0xdf90x4b=null;_0xdf90x4c=null}mxEvent[_0xafd2[113]](_0xdf90x47,function(_0xdf90x6){_0xdf90x4b= new mxPoint(mxEvent[_0xafd2[409]](_0xdf90x6),mxEvent[_0xafd2[410]](_0xdf90x6));_0xdf90x4c=_0xdf90x4d();mxEvent[_0xafd2[105]](_0xdf90x6)});mxEvent[_0xafd2[33]](document,_0xafd2[413],_0xdf90x4e);mxEvent[_0xafd2[33]](document,_0xafd2[414],_0xdf90x4e);mxEvent[_0xafd2[33]](document,_0xafd2[415],_0xdf90x50);mxEvent[_0xafd2[33]](document,_0xafd2[416],_0xdf90x50)};EditorUi[_0xafd2[10]][_0xafd2[104]]=function(_0xdf90x47,_0xdf90x3e,_0xdf90x3f,_0xdf90x51,_0xdf90x52,_0xdf90x53){this[_0xafd2[417]]();this[_0xafd2[418]]= new Dialog(this,_0xdf90x47,_0xdf90x3e,(mxClient[_0xafd2[419]])?_0xdf90x3f-12:_0xdf90x3f,_0xdf90x51,_0xdf90x52,_0xdf90x53)};EditorUi[_0xafd2[10]][_0xafd2[417]]=function(){if(this[_0xafd2[418]]!=null){this[_0xafd2[418]][_0xafd2[420]]();this[_0xafd2[418]]=null;this[_0xafd2[0]][_0xafd2[4]][_0xafd2[1]][_0xafd2[47]]()}};EditorUi[_0xafd2[10]][_0xafd2[421]]=function(_0xdf90x54){if(!_0xdf90x54&&this[_0xafd2[0]][_0xafd2[156]]!=null){this[_0xafd2[202]](this[_0xafd2[0]][_0xafd2[422]]())}else {this[_0xafd2[104]]( new SaveDialog(this)[_0xafd2[1]],300,100,true,true)}};EditorUi[_0xafd2[10]][_0xafd2[423]]=function(_0xdf90x54){if(!_0xdf90x54&&this[_0xafd2[0]][_0xafd2[156]]!=null){this[_0xafd2[288]](this[_0xafd2[0]][_0xafd2[422]]())}else {}};EditorUi[_0xafd2[10]][_0xafd2[424]]=function(_0xdf90x55,_0xdf90x56,_0xdf90x57){var _0xdf90x3=this[_0xafd2[0]][_0xafd2[4]];var _0xdf90xb=_0xdf90x3[_0xafd2[326]]();_0xdf90x56=this[_0xafd2[425]]!=null?this[_0xafd2[425]]:_0xdf90x56;_0xdf90x3[_0xafd2[96]]()[_0xafd2[426]]();try{_0xdf90x55[_0xafd2[427]](_0xdf90x3[_0xafd2[286]](),_0xdf90xb)}catch(e){throw e}finally{if(_0xdf90x56&&navigator[_0xafd2[429]][_0xafd2[100]](_0xafd2[428])<0){var _0xdf90x58= new mxMorphing(_0xdf90x3);_0xdf90x58[_0xafd2[33]](mxEvent.DONE,mxUtils[_0xafd2[20]](this,function(){_0xdf90x3[_0xafd2[96]]()[_0xafd2[430]]()}));_0xdf90x58[_0xafd2[431]]()}else {_0xdf90x3[_0xafd2[96]]()[_0xafd2[430]]()}}};EditorUi[_0xafd2[10]][_0xafd2[128]]=function(_0xdf90x1){var _0xdf90x3=this[_0xafd2[0]][_0xafd2[4]];var _0xdf90xf= new mxKeyHandler(_0xdf90x3);_0xdf90xf[_0xafd2[432]]=function(_0xdf90x6){return mxEvent[_0xafd2[432]](_0xdf90x6)||(mxClient[_0xafd2[433]]&&_0xdf90x6[_0xafd2[434]])};function _0xdf90x59(_0xdf90x5a){if(!_0xdf90x3[_0xafd2[307]]()){var _0xdf90x49=0;var _0xdf90x5b=0;if(_0xdf90x5a==37){_0xdf90x49= -1}else {if(_0xdf90x5a==38){_0xdf90x5b= -1}else {if(_0xdf90x5a==39){_0xdf90x49=1}else {if(_0xdf90x5a==40){_0xdf90x5b=1}}}};_0xdf90x3[_0xafd2[435]](_0xdf90x3[_0xafd2[308]](),_0xdf90x49,_0xdf90x5b);_0xdf90x3[_0xafd2[436]](_0xdf90x3[_0xafd2[326]]())}}var _0xdf90x5c=mxUtils[_0xafd2[20]](this,function(_0xdf90x5d,_0xdf90x5e,_0xdf90x2e,_0xdf90x5f){var _0xdf90x60=this[_0xafd2[12]][_0xafd2[143]](_0xdf90x2e);if(_0xdf90x60!=null){var _0xdf90x1f=function(){if(_0xdf90x60[_0xafd2[437]]){_0xdf90x60[_0xafd2[438]]()}};if(_0xdf90x5e){if(_0xdf90x5f){_0xdf90xf[_0xafd2[439]](_0xdf90x5d,_0xdf90x1f)}else {_0xdf90xf[_0xafd2[440]](_0xdf90x5d,_0xdf90x1f)}}else {if(_0xdf90x5f){_0xdf90xf[_0xafd2[441]](_0xdf90x5d,_0xdf90x1f)}else {_0xdf90xf[_0xafd2[442]](_0xdf90x5d,_0xdf90x1f)}}}});var _0xdf90x61=this;var _0xdf90x62=_0xdf90xf[_0xafd2[443]];_0xdf90xf[_0xafd2[443]]=function(_0xdf90x6){_0xdf90x61[_0xafd2[417]]();_0xdf90x62[_0xafd2[50]](this,arguments)};_0xdf90xf[_0xafd2[444]]=function(){};_0xdf90xf[_0xafd2[442]](8,function(){_0xdf90x3[_0xafd2[445]](true)});_0xdf90xf[_0xafd2[442]](13,function(){_0xdf90x3[_0xafd2[445]](false)});_0xdf90xf[_0xafd2[442]](33,function(){_0xdf90x3[_0xafd2[349]]()});_0xdf90xf[_0xafd2[442]](34,function(){_0xdf90x3[_0xafd2[350]]()});_0xdf90xf[_0xafd2[442]](36,function(){_0xdf90x3[_0xafd2[348]]()});_0xdf90xf[_0xafd2[442]](35,function(){_0xdf90x3[_0xafd2[15]]()});_0xdf90xf[_0xafd2[442]](37,function(){_0xdf90x59(37)});_0xdf90xf[_0xafd2[442]](38,function(){_0xdf90x59(38)});_0xdf90xf[_0xafd2[442]](39,function(){_0xdf90x59(39)});_0xdf90xf[_0xafd2[442]](40,function(){_0xdf90x59(40)});_0xdf90xf[_0xafd2[442]](113,function(){_0xdf90x3[_0xafd2[101]]()});_0xdf90x5c(46,false,_0xafd2[309]);_0xdf90x5c(82,true,_0xafd2[319]);_0xdf90x5c(83,true,_0xafd2[202]);_0xdf90x5c(83,true,_0xafd2[210],true);_0xdf90x5c(107,false,_0xafd2[446]);_0xdf90x5c(109,false,_0xafd2[447]);_0xdf90x5c(65,true,_0xafd2[448]);_0xdf90x5c(86,true,_0xafd2[449],true);_0xdf90x5c(69,true,_0xafd2[450],true);_0xdf90x5c(69,true,_0xafd2[451]);_0xdf90x5c(66,true,_0xafd2[315]);_0xdf90x5c(70,true,_0xafd2[314]);_0xdf90x5c(68,true,_0xafd2[310]);_0xdf90x5c(90,true,_0xafd2[303]);_0xdf90x5c(89,true,_0xafd2[304]);_0xdf90x5c(88,true,_0xafd2[146]);_0xdf90x5c(67,true,_0xafd2[147]);_0xdf90x5c(81,true,_0xafd2[452]);_0xdf90x5c(86,true,_0xafd2[142]);_0xdf90x5c(71,true,_0xafd2[325]);_0xdf90x5c(71,true,_0xafd2[453],true);_0xdf90x5c(85,true,_0xafd2[327]);_0xdf90x5c(112,false,_0xafd2[454]);_0xdf90x5c(80,true,_0xafd2[288],true);return _0xdf90xf};EditorUi[_0xafd2[10]][_0xafd2[56]]=function(_0xdf90x3,_0xdf90x37,_0xdf90x63,_0xdf90x64){for(var _0xdf90x38=0;_0xdf90x38<_0xdf90x37[_0xafd2[174]];_0xdf90x38++){_0xdf90x3[_0xafd2[457]]( new mxMultiplicity(true,_0xdf90x37[_0xdf90x38],null,null,_0xdf90x63[_0xdf90x38][0],_0xdf90x63[_0xdf90x38][1],null,mxResources[_0xafd2[143]](_0xdf90x37[_0xdf90x38])+mxResources[_0xafd2[143]](_0xafd2[455])+_0xdf90x63[_0xdf90x38][0]+mxResources[_0xafd2[143]](_0xafd2[456]),null));_0xdf90x3[_0xafd2[457]]( new mxMultiplicity(false,_0xdf90x37[_0xdf90x38],null,null,_0xdf90x64[_0xdf90x38][0],_0xdf90x64[_0xdf90x38][1],null,mxResources[_0xafd2[143]](_0xdf90x37[_0xdf90x38])+mxResources[_0xafd2[143]](_0xafd2[455])+_0xdf90x64[_0xdf90x38][0]+mxResources[_0xafd2[143]](_0xafd2[458]),null))}}
\ No newline at end of file
+/**
+ * $Id: EditorUi.js,v 1.21 2013/03/14 20:46:36 david Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+EditorUi = function(editor, container) {
+       this.editor = editor || new Editor();
+       this.container = container || document.getElementById('geEditor');
+       var graph = editor.graph;
+       var self = this;
+
+       // Disables scrollbars
+       this.container.style.overflow = 'hidden';
+
+       // Pre-fetches submenu image
+       new Image().src = mxPopupMenu.prototype.submenuImage;
+
+       // Pre-fetches connect image
+       if (mxConnectionHandler.prototype.connectImage != null) {
+               new Image().src = mxConnectionHandler.prototype.connectImage.src;
+       }
+
+       // Creates the user interface
+       this.actions = new Actions(this);
+       this.menus = new Menus(this);
+       this.createDivs();
+       this.refresh();
+       this.createUi();
+
+       // Disables HTML and text selection
+       var textEditing = mxUtils.bind(this, function(evt) {
+               if (evt == null) {
+                       evt = window.event;
+               }
+
+               if (this.isSelectionAllowed(evt)) {
+                       return true;
+               }
+
+               return graph.isEditing();
+       });
+
+       // Disables text selection while not editing and no dialog visible
+       if (this.container == document.body) {
+               this.menubarContainer.onselectstart = textEditing;
+               this.menubarContainer.onmousedown = textEditing;
+               this.toolbarContainer.onselectstart = textEditing;
+               this.toolbarContainer.onmousedown = textEditing;
+               this.diagramContainer.onselectstart = textEditing;
+               this.diagramContainer.onmousedown = textEditing;
+               this.sidebarContainer.onselectstart = textEditing;
+               this.sidebarContainer.onmousedown = textEditing;
+               this.footerContainer.onselectstart = textEditing;
+               this.footerContainer.onmousedown = textEditing;
+       }
+
+       // And uses built-in context menu while editing
+       if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' ||
+                       document.documentMode < 9)) {
+               mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
+               mxEvent.addListener(this.sidebarContainer, 'contextmenu', textEditing);
+       } else {
+               // Allows browser context menu outside of diagram and sidebar
+               this.diagramContainer.oncontextmenu = textEditing;
+               this.sidebarContainer.oncontextmenu = textEditing;
+       }
+
+       // Contains the main graph instance inside the given panel
+       graph.init(this.diagramContainer);
+       graph.refresh();
+
+       // Enables scrollbars and sets cursor style for the container
+       graph.container.setAttribute('tabindex', '0');
+       // graph.container.style.overflow = (touchStyle) ? 'hidden' : 'auto';
+       graph.container.style.cursor = 'default';
+       graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
+       graph.container.style.backgroundPosition = '-1px -1px';
+       graph.container.focus();
+
+       // Keeps graph container focused on mouse down
+       var graphFireMouseEvent = graph.fireMouseEvent;
+       graph.fireMouseEvent = function(evtName, me, sender) {
+               if (evtName == mxEvent.MOUSE_DOWN) {
+                       this.container.focus();
+               }
+
+               graphFireMouseEvent.apply(this, arguments);
+       };
+
+       // Giuseppe Careri
+       // Defines invalid connections along with the error messages that they produce.
+       this.createMultiplicities(graph.multiplicities, ['start', 'finally', 'end'], [
+               [1, 1],
+               [1, 1],
+               [0, 0]
+       ], [
+               [0, 0],
+               [0, 0],
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['answer', 'hangup', 'dial',
+               'ext_dial', 'queue', 'voicemail', 'callback'
+       ], [
+               [1, 1],
+               [0, 0],
+               [0, 1],
+               [0, 1],
+               [0, 1],
+               [1, 1],
+               [0, 1]
+       ], [
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['set', 'math'], [
+               [1, 1],
+               [1, 1]
+       ], [
+               [1, 'n'],
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['background', 'playback',
+               'menu', 'saydigits', 'saynumber', 'sayphonetic', 'tts', 'ispeechtts', 'getdigits'
+       ], [
+               [1, 'n'],
+               [1, 1],
+               [1, 'n'],
+               [1, 1],
+               [1, 1],
+               [1, 1],
+               [1, 1],
+               [1, 1],
+               [1, 'n']
+       ], [
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['record'], [
+               [1, 1]
+       ], [
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['database', 'ispeechasr'], [
+               [1, 1],
+               [1, 1]
+       ], [
+               [1, 'n'],
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['gotoc', 'gotoif',
+               'gotoiftime', 'gotoifmultitime', 'vswitch'
+       ], [
+               [0, 0],
+               [1, 2],
+               [1, 2],
+               [1, 2],
+               [1, 'n']
+       ], [
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['queuelog', 'goal'], [
+               [1, 1],
+               [1, 1]
+       ], [
+               [1, 'n'],
+               [1, 'n']
+       ]);
+       this.createMultiplicities(graph.multiplicities, ['noop', 'system', 'agi',
+               'subproject', 'custom_app'
+       ], [
+               [1, 1],
+               [1, 1],
+               [0, 1],
+               [0, 1],
+               [0, 1]
+       ], [
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n'],
+               [1, 'n']
+       ]);
+
+       // Giuseppe Careri
+       // Processes a doubleclick on an optional cell and fires a <dblclick> event.
+       // The event is fired initially.
+       // If the graph is enabled and the event has not been consumed, then <edit> is called with the given cell.
+       // The event is ignored if no cell was specified.
+       graph.dblClick = function(evt, cell) {
+               var edges = ['background', 'gotoif', 'gotoiftime', 'menu', 'getdigits', 'vswitch'];
+               var mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell',
+                       cell);
+               this.fireEvent(mxe);
+
+               if (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed()) {
+                       // Override dblClick Vertices and Edges
+                       if (this.getModel().isEdge(cell)) {
+                               if (edges.indexOf(cell.source.value.tagName) >= 0)
+                                       this.startEditingAtCell(cell);
+                       } else if (this.getModel().isVertex(cell)) {
+                               console.log(self);
+                               console.log(cell);
+                               self.showDialog(new GeneralDialog(self, cell).container, 320, 280, true,
+                                       true);
+                       }
+                       mxe.consume();
+               }
+       }
+
+       // Configures automatic expand on mouseover
+       graph.panningHandler.autoExpand = true;
+
+       // Installs context menu
+       graph.panningHandler.factoryMethod = mxUtils.bind(this, function(menu, cell,
+               evt) {
+               this.menus.createPopupMenu(menu, cell, evt);
+       });
+
+       // Initializes the outline
+       editor.outline.init(this.outlineContainer);
+
+       // Hides context menu
+       mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
+               graph.panningHandler.hideMenu();
+       }));
+
+       // Adds gesture handling (pinch to zoom)
+       if (mxClient.IS_TOUCH) {
+               mxEvent.addListener(graph.container, 'gesturechange',
+                       mxUtils.bind(this, function(evt) {
+                               graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale +
+                                       ')');
+                               graph.view.getOverlayPane().style.visibility = 'hidden';
+                       })
+               );
+
+               mxEvent.addListener(graph.container, 'gestureend',
+                       mxUtils.bind(this, function(evt) {
+                               graph.view.getDrawPane().removeAttribute('transform');
+                               graph.zoomToCenter = true;
+                               graph.zoom(evt.scale);
+                               graph.view.getOverlayPane().style.visibility = 'visible';
+                       })
+               );
+       }
+
+       // Create handler for key events
+       var keyHandler = this.createKeyHandler(editor);
+
+       // Getter for key handler
+       this.getKeyHandler = function() {
+               return keyHandler;
+       };
+
+       // Updates the editor UI after the window has been resized
+       mxEvent.addListener(window, 'resize', mxUtils.bind(this, function() {
+               this.refresh();
+               graph.sizeDidChange();
+               this.editor.outline.update(false);
+               this.editor.outline.outline.sizeDidChange();
+       }));
+
+       // Updates action and menu states
+       this.init();
+       this.open();
+};
+
+/**
+ * Specifies the size of the split bar.
+ */
+EditorUi.prototype.splitSize = (mxClient.IS_TOUCH) ? 16 : 8;
+
+/**
+ * Specifies the height of the menubar. Default is 34.
+ */
+EditorUi.prototype.menubarHeight = 33;
+
+/**
+ * Specifies the height of the toolbar. Default is 36.
+ */
+EditorUi.prototype.toolbarHeight = 36;
+
+/**
+ * Specifies the height of the footer. Default is 28.
+ */
+EditorUi.prototype.footerHeight = 28;
+
+/**
+ * Specifies the position of the horizontal split bar. Default is 212.
+ */
+EditorUi.prototype.hsplitPosition = 204;
+
+/**
+ * Specifies the position of the vertical split bar. Default is 190.
+ */
+EditorUi.prototype.vsplitPosition = 190;
+
+/**
+ * Installs the listeners to update the action states.
+ */
+EditorUi.prototype.init = function() {
+       // Updates action states
+       this.addUndoListener();
+       this.addSelectionListener();
+
+       // Overrides clipboard to update paste action state
+       var paste = this.actions.get('paste');
+
+       var updatePaste = function() {
+               paste.setEnabled(!mxClipboard.isEmpty());
+       };
+
+       var mxClipboardCut = mxClipboard.cut;
+       mxClipboard.cut = function() {
+               mxClipboardCut.apply(this, arguments);
+               updatePaste();
+       };
+
+       var mxClipboardCopy = mxClipboard.copy;
+       mxClipboard.copy = function() {
+               mxClipboardCopy.apply(this, arguments);
+               updatePaste();
+       };
+};
+
+/**
+ * Hook for allowing selection and context menu for certain events.
+ */
+EditorUi.prototype.isSelectionAllowed = function(evt) {
+       return false;
+};
+
+/**
+ * Opens the current diagram via the window.opener if one exists.
+ */
+EditorUi.prototype.open = function() {
+       // Cross-domain window access is not allowed in FF, so if we
+       // were opened from another domain then this will fail.
+       try {
+               if (window.opener != null && window.opener.openFile != null) {
+                       window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml,
+                               filename) {
+                               try {
+                                       var doc = mxUtils.parseXml(xml);
+                                       this.editor.setGraphXml(doc.documentElement);
+                                       this.editor.modified = false;
+                                       this.editor.undoManager.clear();
+
+                                       if (filename != null) {
+                                               this.editor.filename = filename;
+                                       }
+                               } catch (e) {
+                                       mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+                               }
+                       }));
+               }
+       } catch (e) {
+               // ignore
+       }
+};
+
+/**
+ * Giuseppe Careri
+ * Opens the current diagram via string.
+ */
+EditorUi.prototype.openString = function(xml, filename, data) {
+       try {
+               var doc = mxUtils.parseXml(xml);
+               this.editor.setGraphXml(doc.documentElement);
+               this.editor.modified = false;
+               this.editor.undoManager.clear();
+
+               if (filename != null) {
+                       this.editor.filename = filename;
+               }
+
+               if (data != null) {
+                       this.editor.data = data;
+               }
+       } catch (e) {
+               mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+       }
+};
+
+/**
+ * Saves As the current graph under the given project name.
+ */
+EditorUi.prototype.new = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+               try {
+                       if (useLocalStorage) {
+                               if (localStorage.getItem(name) != null &&
+                                       !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                       return;
+                               }
+
+                               localStorage.setItem(name, xml);
+                               this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                       } else {
+                               console.log(xml.length);
+                               console.log(MAX_REQUEST_SIZE);
+                               if (xml.length < MAX_REQUEST_SIZE) {
+                                       xml = encodeURIComponent(xml);
+                                       name = encodeURIComponent(name);
+
+                                       var xhr = new XMLHttpRequest();
+                                       xhr.open("POST", SAVE_URL, true);
+                                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                       xhr.onload = function(e) {
+                                               if (xhr.readyState === 4) {
+                                                       if (xhr.status === 201) {
+                                                               editor.setStatus('Project ' + JSON.parse(xhr.response).name +
+                                                                       ' is opening in new window!');
+                                                               setTimeout(function() {
+                                                                       window.open('square/project/' + JSON.parse(xhr.response).id,
+                                                                               '_blank');
+                                                               }, 1500);
+                                                       } else {
+                                                               editor.setStatus('Error creating project: ' +
+                                                                       JSON.parse(xhr.response).errors[0].message);
+                                                       }
+                                               }
+                                       };
+                                       xhr.onerror = function(e) {
+                                               mxUtils.alert(xhr.statusText);
+                                       };
+                                       xhr.send('description=project_new&name=' + name);
+                               } else {
+                                       mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                       mxUtils.popup(xml);
+
+                                       return;
+                               }
+                       }
+
+                       this.editor.filename = name;
+                       this.editor.modified = false;
+               } catch (e) {
+                       this.editor.setStatus('Error creating project');
+               }
+       } else {
+               this.editor.setStatus('Error creating project');
+       }
+};
+
+
+/**
+ * Saves the current graph under the given project name.
+ */
+EditorUi.prototype.save = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+               try {
+                       if (useLocalStorage) {
+                               if (localStorage.getItem(name) != null &&
+                                       !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                       return;
+                               }
+
+                               localStorage.setItem(name, xml);
+                               this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                       } else {
+                               console.log(xml.length);
+                               console.log(MAX_REQUEST_SIZE);
+                               if (xml.length < MAX_REQUEST_SIZE) {
+                                       xml = encodeURIComponent(xml);
+
+                                       var xhr = new XMLHttpRequest();
+                                       xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
+                                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                       xhr.onload = function(e) {
+                                               if (xhr.readyState === 4) {
+                                                       if (xhr.status === 200) {
+                                                               editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt +
+                                                                       ' (' + xhr.status + ' ' + xhr.statusText + ')');
+                                                       } else {
+                                                               editor.setStatus('Error saving project: ' +
+                                                                       JSON.parse(xhr.response).errors[0].message);
+                                                       }
+                                               }
+                                       };
+                                       xhr.onerror = function(e) {
+                                               mxUtils.alert(xhr.statusText);
+                                       };
+                                       xhr.send('preproduction=' + xml);
+                               } else {
+                                       mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                       mxUtils.popup(xml);
+
+                                       return;
+                               }
+                       }
+
+                       this.editor.filename = name;
+                       this.editor.modified = false;
+               } catch (e) {
+                       this.editor.setStatus('Error saving file');
+               }
+       } else {
+               this.editor.setStatus('Error saving file');
+       }
+};
+
+/**
+ * Saves As the current graph under the given project name.
+ */
+EditorUi.prototype.saveAs = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+               try {
+                       if (useLocalStorage) {
+                               if (localStorage.getItem(name) != null &&
+                                       !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                       return;
+                               }
+
+                               localStorage.setItem(name, xml);
+                               this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                       } else {
+                               console.log(xml.length);
+                               console.log(MAX_REQUEST_SIZE);
+                               if (xml.length < MAX_REQUEST_SIZE) {
+                                       xml = encodeURIComponent(xml);
+                                       name = encodeURIComponent(name);
+
+                                       var xhr = new XMLHttpRequest();
+                                       xhr.open("POST", SAVE_URL, true);
+                                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                       xhr.onload = function(e) {
+                                               if (xhr.readyState === 4) {
+                                                       if (xhr.status === 201) {
+                                                               editor.setStatus('Project ' + JSON.parse(xhr.response).name +
+                                                                       ' is opening in new window!');
+                                                               setTimeout(function() {
+                                                                       window.open('square/project/' + JSON.parse(xhr.response).id,
+                                                                               '_blank');
+                                                               }, 1500);
+                                                       } else {
+                                                               editor.setStatus('Error cloning project: ' +
+                                                                       JSON.parse(xhr.response).errors[0].message);
+                                                       }
+                                               }
+                                       };
+                                       xhr.onerror = function(e) {
+                                               mxUtils.alert(xhr.statusText);
+                                       };
+                                       xhr.send('description=project_cloned&name=' + name +
+                                               '&preproduction=' + xml + '&production=' + xml);
+                               } else {
+                                       mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                       mxUtils.popup(xml);
+
+                                       return;
+                               }
+                       }
+
+                       this.editor.filename = name;
+                       this.editor.modified = false;
+               } catch (e) {
+                       this.editor.setStatus('Error saving file');
+               }
+       } else {
+               this.editor.setStatus('Error saving file');
+       }
+};
+
+/**
+ * Plush the current graph under the given project name.
+ */
+EditorUi.prototype.validate = function(a, b) {
+       var graph = this.editor.graph;
+       for (var a = a != null ? a : graph.model.getRoot(), b = b != null ? b : {}, c = true, d = graph.model.getChildCount(a), e = 0; e < d; e++) {
+               var f = graph.model.getChildAt(a, e),
+                       g = b;
+               graph.isValidRoot(f) && (g = {});
+               g = this.validate(f, g);
+               g != null ? graph.setCellWarning(f, g.replace(/\n/g, "<br>")) : graph.setCellWarning(f, null);
+               c = c && g == null
+       }
+
+       d = "";
+
+       //--- Giuseppe Careri - Modify 12/12/2013 - giuseppe.careri@gmail.com
+       if (graph.model.isVertex(a)) {
+               switch (a.value.nodeName) {
+                       case 'start':
+                               d = this.validateBlock('start') ? '' : "Only one Start block is allowed" + "\n";
+                               break;
+                       case 'finally':
+                               d = this.validateBlock('finally') ? '' : "Only one Finally block is allowed" + "\n";
+                               break;
+                       case 'playback':
+                               d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get('noAudioSelected') + "\n";
+                               break;
+                       case 'background':
+                       case 'menu':
+                               d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get('noAudioSelected') + "\n";
+                               d += (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get('noVariableSelected') + "\n";
+                               break;
+                       case 'getdigits':
+                               d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get('noAudioSelected') + "\n";
+                               d += (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get('noVariableSelected') + "\n";
+                               break;
+                       case 'vswitch':
+                               d = (a.value.getAttribute('variable') !== "") ? "" : mxResources.get('noVariableSelected') + "\n";
+                               break;
+                       case 'database':
+                               d = (a.value.getAttribute('odbc_id') > 0) ? "" : mxResources.get('noDatabaseSelected') + "\n";
+                               break;
+                       case 'set':
+                       case 'math':
+                               d = (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get('noVariableSelected') + "\n";
+                               break;
+                       case 'gotoc':
+                               d = (a.value.getAttribute('extension') !== "") ? "" : mxResources.get('noExtensionSelected') + "\n";
+                               break;
+                       case 'system':
+                       case 'agi':
+                               d = (a.value.getAttribute('command') !== "") ? "" : mxResources.get('noCommandSelected') + "\n";
+                               break;
+                       case 'gotoif':
+                               d = (a.value.getAttribute('condition') !== "") ? "" : mxResources.get('noConditionSelected') + "\n";
+                               break;
+                       case 'saydigits':
+                               d = (a.value.getAttribute('digits') !== "") ? "" : mxResources.get('noDigitsSelected') + "\n";
+                               break;
+                       case 'saynumber':
+                               d = (a.value.getAttribute('number') !== "") ? "" : mxResources.get('noNumberSelected') + "\n";
+                               break;
+                       case 'sayphonetic':
+                               d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get('noTextSelected') + "\n";
+                               break;
+                       case 'record':
+                               d = (a.value.getAttribute('filename') !== "") ? "" : mxResources.get('noFileSelected') + "\n";
+                               break;
+                       case 'goal':
+                               d = (a.value.getAttribute('goalname') !== "") ? "" : mxResources.get('noGoalSelected') + "\n";
+                               break;
+                       case 'ext_dial':
+                               d = (a.value.getAttribute('phone') !== "") ? "" : mxResources.get('noIdentifierSelected') + "\n";
+                               break;
+                       case 'dial':
+                               d = (a.value.getAttribute('sip_id') > 0) ? "" : mxResources.get('noIdentifierSelected') + "\n";
+                               break;
+                       case 'queue':
+                               d = (a.value.getAttribute('queue_id') !== "-1") ? "" : mxResources.get('noQueueSelected') + "\n";
+                               break;
+                       case 'callback':
+                               d = (a.value.getAttribute('list_id') > 0) ? "" : mxResources.get('noListSelected') + "\n";
+                               break;
+                       case 'gotoiftime':
+                               d = (a.value.getAttribute('interval_id') > 0) ? "" : mxResources.get('noIntervalSelected') + "\n";
+                               break;
+                       case 'gotoifmultitime':
+                               d = (a.value.getAttribute('interval_id') != "") ? "" : mxResources.get('noIntervalSelected') + "\n";
+                               break;
+                       case 'voicemail':
+                               d = (a.value.getAttribute('mailbox') !== "") ? "" : mxResources.get('noBoxNumberSelected') + "\n";
+                               break;
+                       case 'subproject':
+                               d = (a.value.getAttribute('project_id') > 0) ? "" : mxResources.get('noProjectSelected') + "\n";
+                               break;
+                       case 'tts':
+                               d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get('noTextSelected') + "\n";
+                               break;
+                       case 'ispeechtts':
+                               d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get('noTextSelected') + "\n";
+                               d += (a.value.getAttribute('key') !== "") ? "" : mxResources.get('noKeySelected') + "\n";
+                               break;
+                       case 'ispeechasr':
+                               d = (a.value.getAttribute('key') !== "") ? "" : mxResources.get('noKeySelected') + "\n";
+                               break;
+               }
+       }
+
+       if (graph.model.isEdge(a)) {
+               var z = graph.model.getCell(a.source.getId());
+               switch (z.value.nodeName) {
+                       case 'background':
+                               var patt = /^[0-9]{1,45}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;
+                               d = d + ((patt.test(String(a.getValue()))) ? "" : mxResources.get('numberOrInvalidOrTimeout') + "\n");
+                               break;
+                       case 'menu':
+                               var patt = /^[0-9]{1,45}$|^[-]{1}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;
+                               var str = String(a.getValue());
+                               var res = str.split(",");
+                               res.forEach(function(entry) {
+                                       d = d + ((patt.test(entry)) ? "" : mxResources.get('numberOrAll') + "\n");
+                               });
+                               break;
+                       case 'getdigits':
+                               var patt = /^(x|i|-)$/;
+                               var str = String(a.getValue());
+                               d = d + ((patt.test(str)) ? "" : mxResources.get('numberOrInvalidOrDefault') + "\n");
+                               break;
+                       case 'gotoif':
+                       case 'gotoiftime':
+                       case 'gotoifmultitime':
+                               var patt = /^(true){1}$|^(false){1}$/;
+                               d = d + ((patt.test(String(a.getValue()))) ? "" : mxResources.get('trueOrFalse') + "\n");
+                               break;
+
+               }
+       }
+       // -----------------------------------------------------------------
+
+
+       graph.isCellCollapsed(a) && !c && (d = d + ((mxResources.get(graph.containsValidationErrorsResource) || graph.containsValidationErrorsResource) + "\n"));
+       d = graph.model.isEdge(a) ?
+               d + (graph.getEdgeValidationError(a, graph.model.getTerminal(a, true), graph.model.getTerminal(a, false)) || "") : d + (graph.getCellValidationError(a) || "");
+       e = graph.validateCell(a, b);
+       e != null && (d = d + e);
+       graph.model.getParent(a) == null && graph.view.validate();
+       return d.length > 0 || !c ? d : null
+};
+EditorUi.prototype.validateBlock = function(blockName) {
+       var graph = this.editor.graph;
+       var parent = graph.getDefaultParent();
+       var count = 0;
+       // var model = graph.getModel();
+       //We can also use model.getChildren(parent)
+       parent.children.forEach(function(n) {
+               if (graph.model.isVertex(n) && n.value.nodeName == blockName) {
+                       count++;
+               }
+       });
+       return count > 1 ? false : true;
+}
+EditorUi.prototype.publish = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               var response = this.validate();
+               if (response === null) {
+
+                       var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
+                       try {
+                               if (useLocalStorage) {
+                                       if (localStorage.getItem(name) != null &&
+                                               !mxUtils.confirm(mxResources.get('replace', [name]))) {
+                                               return;
+                                       }
+
+                                       localStorage.setItem(name, xml);
+                                       this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+                               } else {
+                                       console.log(xml.length);
+                                       console.log(MAX_REQUEST_SIZE);
+                                       if (xml.length < MAX_REQUEST_SIZE) {
+                                               xml = encodeURIComponent(xml);
+
+                                               var xhr = new XMLHttpRequest();
+                                               xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
+                                               xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                                               xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                                               xhr.onload = function(e) {
+                                                       if (xhr.readyState === 4) {
+                                                               if (xhr.status === 200) {
+                                                                       editor.setStatus('Published at ' + JSON.parse(xhr.response).updatedAt +
+                                                                               ' (' + xhr.status + ' ' + xhr.statusText + ')');
+                                                               } else {
+                                                                       editor.setStatus('Error saving project: ' +
+                                                                               JSON.parse(xhr.response).errors[0].message);
+                                                               }
+                                                       }
+                                               };
+                                               xhr.onerror = function(e) {
+                                                       mxUtils.alert(xhr.statusText);
+                                               };
+                                               xhr.send('preproduction=' + xml + '&production=' + xml);
+                                       } else {
+                                               mxUtils.alert(mxResources.get('drawingTooLarge'));
+                                               mxUtils.popup(xml);
+
+                                               return;
+                                       }
+                               }
+
+                               this.editor.filename = name;
+                               this.editor.modified = false;
+                       } catch (e) {
+                               this.editor.setStatus('Error publishing file');
+                       }
+               } else {
+                       editor.setStatus('Error publishing project: ');
+               }
+       } else {
+               this.editor.setStatus('Error publishing file');
+       }
+};
+
+
+/**
+ * Create variable
+ */
+EditorUi.prototype.variable = function(name) {
+       var editor = this.editor;
+
+       if (name != null) {
+               try {
+
+                       var xhr = new XMLHttpRequest();
+                       xhr.open("POST", VARIABLE_URL, true);
+                       xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+                       xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
+                       xhr.onload = function(e) {
+                               if (xhr.readyState === 4) {
+                                       if (xhr.status === 201) {
+                                               editor.setStatus('Variable created at ' + JSON.parse(xhr.response).createdAt +
+                                                       ' (' + xhr.status + ' ' + xhr.statusText + ')');
+                                       } else {
+                                               editor.setStatus('Error creating variable: ' +
+                                                       JSON.parse(xhr.response).errors[0].message);
+                                       }
+                               }
+                       };
+                       xhr.onerror = function(e) {
+                               mxUtils.alert(xhr.statusText);
+                       };
+                       xhr.send('name=' + name);
+               } catch (e) {
+                       this.editor.setStatus('Error creating variable');
+               }
+       } else {
+               this.editor.setStatus('Error creating variable');
+       }
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.getUrl = function(pathname) {
+       var href = (pathname != null) ? pathname : window.location.pathname;
+       var parms = (href.indexOf('?') > 0) ? 1 : 0;
+
+       // Removes template URL parameter for new blank diagram
+       for (var key in urlParams) {
+               if (parms == 0) {
+                       href += '?';
+               } else {
+                       href += '&';
+               }
+
+               href += key + '=' + urlParams[key];
+               parms++;
+       }
+
+       return href;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addUndoListener = function() {
+       var undo = this.actions.get('undo');
+       var redo = this.actions.get('redo');
+
+       var undoMgr = this.editor.undoManager;
+
+       var undoListener = function() {
+               undo.setEnabled(undoMgr.canUndo());
+               redo.setEnabled(undoMgr.canRedo());
+       };
+
+       undoMgr.addListener(mxEvent.ADD, undoListener);
+       undoMgr.addListener(mxEvent.UNDO, undoListener);
+       undoMgr.addListener(mxEvent.REDO, undoListener);
+       undoMgr.addListener(mxEvent.CLEAR, undoListener);
+
+       // Updates the button states once
+       undoListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+EditorUi.prototype.addSelectionListener = function() {
+       var selectionListener = mxUtils.bind(this, function() {
+               var graph = this.editor.graph;
+               var selected = !graph.isSelectionEmpty();
+               var vertexSelected = false;
+               var edgeSelected = false;
+
+               var cells = graph.getSelectionCells();
+
+               if (cells != null) {
+                       for (var i = 0; i < cells.length; i++) {
+                               var cell = cells[i];
+
+                               if (graph.getModel().isEdge(cell)) {
+                                       edgeSelected = true;
+                               }
+
+                               if (graph.getModel().isVertex(cell)) {
+                                       vertexSelected = true;
+                               }
+
+                               if (edgeSelected && vertexSelected) {
+                                       break;
+                               }
+                       }
+               }
+
+               // Updates action states
+               var actions = ['cut', 'copy', 'delete', 'duplicate', 'bold', 'italic',
+                       'style', 'underline', 'toFront', 'toBack', 'dashed', 'rounded',
+                       'shadow',
+                       'tilt', 'autosize'
+               ];
+
+               for (var i = 0; i < actions.length; i++) {
+                       this.actions.get(actions[i]).setEnabled(selected);
+               }
+
+               this.actions.get('curved').setEnabled(edgeSelected);
+               this.actions.get('rotation').setEnabled(vertexSelected);
+               this.actions.get('wordWrap').setEnabled(vertexSelected);
+               this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
+               this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
+                       graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
+               var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
+               this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
+                       graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell()))
+               );
+
+               // Updates menu states
+               var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text',
+                       'format',
+                       'arrange', 'linewidth', 'spacing'
+               ];
+
+               for (var i = 0; i < menus.length; i++) {
+                       this.menus.get(menus[i]).setEnabled(selected);
+               }
+
+               menus = ['line', 'lineend', 'linestart'];
+
+               for (var i = 0; i < menus.length; i++) {
+                       this.menus.get(menus[i]).setEnabled(edgeSelected);
+               }
+
+               this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
+
+               this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
+               this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
+                       graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
+               this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view
+                               .currentRoot != null) ||
+                       (graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))
+               ));
+               this.actions.get('home').setEnabled(graph.view.currentRoot != null);
+               this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
+               var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(
+                       graph.getSelectionCell());
+               this.actions.get('enterGroup').setEnabled(groupEnabled);
+               this.actions.get('expand').setEnabled(groupEnabled);
+               this.actions.get('collapse').setEnabled(groupEnabled);
+               this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
+               this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
+                       graph.getLinkForCell(graph.getSelectionCell()) != null);
+       });
+
+       this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+               selectionListener);
+       selectionListener();
+};
+
+/**
+ * Refreshes the viewport.
+ */
+EditorUi.prototype.refresh = function() {
+       var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode ==
+               5);
+       var w = this.container.clientWidth;
+       var h = this.container.clientHeight;
+
+       if (this.container == document.body) {
+               w = document.body.clientWidth || document.documentElement.clientWidth;
+               h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight :
+                       document.documentElement.clientHeight;
+       }
+
+       var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize -
+               20));
+       var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight -
+               this.toolbarHeight - this.footerHeight - this.splitSize - 1));
+
+       this.menubarContainer.style.height = this.menubarHeight + 'px';
+       this.toolbarContainer.style.top = this.menubarHeight + 'px';
+       this.toolbarContainer.style.height = this.toolbarHeight + 'px';
+
+       var tmp = this.menubarHeight + this.toolbarHeight;
+
+       if (!mxClient.IS_QUIRKS) {
+               tmp += 1;
+       }
+
+       this.sidebarContainer.style.top = tmp + 'px';
+       this.sidebarContainer.style.width = effHsplitPosition + 'px';
+       this.outlineContainer.style.width = effHsplitPosition + 'px';
+       this.outlineContainer.style.height = effVsplitPosition + 'px';
+       this.outlineContainer.style.bottom = this.footerHeight + 'px';
+       this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) +
+               'px';
+       this.diagramContainer.style.top = this.sidebarContainer.style.top;
+       this.footerContainer.style.height = this.footerHeight + 'px';
+       this.footerContainer.style.display = 'none';
+       this.hsplit.style.top = this.sidebarContainer.style.top;
+       this.hsplit.style.bottom = this.outlineContainer.style.bottom;
+       this.hsplit.style.left = effHsplitPosition + 'px';
+       this.vsplit.style.width = this.sidebarContainer.style.width;
+       this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
+
+       if (quirks) {
+               this.menubarContainer.style.width = w + 'px';
+               this.toolbarContainer.style.width = this.menubarContainer.style.width;
+               var sidebarHeight = (h - effVsplitPosition - this.splitSize - this.footerHeight -
+                       this.menubarHeight - this.toolbarHeight);
+               this.sidebarContainer.style.height = sidebarHeight + 'px';
+               this.diagramContainer.style.width = (w - effHsplitPosition - this.splitSize) +
+                       'px';
+               var diagramHeight = (h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+               this.diagramContainer.style.height = diagramHeight + 'px';
+               this.footerContainer.style.width = this.menubarContainer.style.width;
+               this.hsplit.style.height = diagramHeight + 'px';
+       } else {
+               this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize +
+                       this.footerHeight) + 'px';
+               this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
+       }
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createDivs = function() {
+       this.menubarContainer = this.createDiv('geMenubarContainer');
+       this.toolbarContainer = this.createDiv('geToolbarContainer');
+       this.sidebarContainer = this.createDiv('geSidebarContainer');
+       this.outlineContainer = this.createDiv('geOutlineContainer');
+       this.diagramContainer = this.createDiv('geDiagramContainer');
+       this.footerContainer = this.createDiv('geFooterContainer');
+       this.hsplit = this.createDiv('geHsplit');
+       this.vsplit = this.createDiv('geVsplit');
+
+       // Sets static style for containers
+       this.menubarContainer.style.top = '0px';
+       this.menubarContainer.style.left = '0px';
+       this.menubarContainer.style.right = '0px';
+       this.toolbarContainer.style.left = '0px';
+       this.toolbarContainer.style.right = '0px';
+       this.sidebarContainer.style.left = '0px';
+       this.outlineContainer.style.left = '0px';
+       this.diagramContainer.style.right = '0px';
+       this.footerContainer.style.left = '0px';
+       this.footerContainer.style.right = '0px';
+       this.footerContainer.style.bottom = '0px';
+       this.vsplit.style.left = '0px';
+       this.vsplit.style.height = this.splitSize + 'px';
+       this.hsplit.style.width = this.splitSize + 'px';
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createUi = function() {
+       // Creates menubar
+       this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
+       this.menubarContainer.appendChild(this.menubar.container);
+
+       // Creates toolbar
+       this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
+       this.toolbarContainer.appendChild(this.toolbar.container);
+
+       // Creates the sidebar
+       this.sidebar = this.createSidebar(this.sidebarContainer);
+
+       // Creates the footer
+       this.footerContainer.appendChild(this.createFooter());
+
+       // Adds status bar in menubar
+       this.statusContainer = this.createStatusContainer();
+
+       // Connects the status bar to the editor status
+       this.editor.addListener('statusChanged', mxUtils.bind(this, function() {
+               this.setStatusText(this.editor.getStatus());
+       }));
+
+       this.setStatusText(this.editor.getStatus());
+       this.menubar.container.appendChild(this.statusContainer);
+
+       // Inserts into DOM
+       this.container.appendChild(this.menubarContainer);
+       this.container.appendChild(this.toolbarContainer);
+       this.container.appendChild(this.sidebarContainer);
+       this.container.appendChild(this.outlineContainer);
+       this.container.appendChild(this.diagramContainer);
+       this.container.appendChild(this.footerContainer);
+       this.container.appendChild(this.hsplit);
+       this.container.appendChild(this.vsplit);
+
+       // HSplit
+       this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(
+               value) {
+               this.hsplitPosition = value;
+               this.refresh();
+               this.editor.graph.sizeDidChange();
+               this.editor.outline.update(false);
+               this.editor.outline.outline.sizeDidChange();
+       }));
+
+       // VSplit
+       this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(
+               this,
+               function(value) {
+                       this.vsplitPosition = value;
+                       this.refresh();
+                       this.editor.outline.update(false);
+                       this.editor.outline.outline.sizeDidChange();
+               }));
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function() {
+       var container = document.createElement('a');
+       container.className = 'geItem geStatus';
+
+       return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function() {
+       var container = document.createElement('a');
+       container.className = 'geItem geStatus';
+
+       return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.setStatusText = function(value) {
+       this.statusContainer.innerHTML = value;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createToolbar = function(container) {
+       return new Toolbar(this, container);
+};
+
+/**
+ * Creates a new sidebar for the given container.
+ */
+EditorUi.prototype.createSidebar = function(container) {
+       return new Sidebar(this, container);
+};
+
+/**
+ * Creates and returns a new footer.
+ */
+EditorUi.prototype.createFooter = function() {
+       return this.createDiv('geFooter');
+};
+
+/**
+ * Creates the actual toolbar for the toolbar container.
+ */
+EditorUi.prototype.createDiv = function(classname) {
+       var elt = document.createElement('div');
+       elt.className = classname;
+
+       return elt;
+};
+
+/**
+ * Creates the custom header.
+ */
+EditorUi.prototype.createHeader = function(classname) {
+       var elt = document.createElement(classname);
+       return elt;
+};
+
+/**
+ * Creates the custom header.
+ */
+EditorUi.prototype.createForm = function(classname) {
+       var elt = document.createElement('form');
+       elt.className = classname;
+
+       return elt;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange) {
+       var start = null;
+       var initial = null;
+
+       function getValue() {
+               return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
+       };
+
+       function moveHandler(evt) {
+               if (start != null) {
+                       var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                       onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y -
+                               pt.y)) - dx));
+                       mxEvent.consume(evt);
+               }
+       };
+
+       function dropHandler(evt) {
+               moveHandler(evt);
+               start = null;
+               initial = null;
+       };
+
+       mxEvent.addGestureListeners(elt, function(evt) {
+               start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+               initial = getValue();
+               mxEvent.consume(evt);
+       });
+
+       mxEvent.addListener(document, 'mousemove', moveHandler);
+       mxEvent.addListener(document, 'touchmove', moveHandler);
+       mxEvent.addListener(document, 'mouseup', dropHandler);
+       mxEvent.addListener(document, 'touchend', dropHandler);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose) {
+       this.hideDialog();
+       this.dialog = new Dialog(this, elt, w, (mxClient.IS_VML) ? h - 12 : h,
+               modal,
+               closable, onClose);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.hideDialog = function() {
+       if (this.dialog != null) {
+               this.dialog.close();
+               this.dialog = null;
+               this.editor.graph.container.focus();
+       }
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.saveFile = function(forceDialog) {
+       if (!forceDialog && this.editor.filename != null) {
+               this.save(this.editor.getOrCreateFilename());
+       } else {
+               this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
+       }
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.publishFile = function(forceDialog) {
+       if (!forceDialog && this.editor.filename != null) {
+               this.publish(this.editor.getOrCreateFilename());
+       } else {
+               //this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
+       }
+};
+
+/**
+ * Executes the given layout.
+ */
+EditorUi.prototype.executeLayout = function(layout, animate, ignoreChildCount) {
+       var graph = this.editor.graph;
+       var cell = graph.getSelectionCell();
+
+       // Allow global overridding of animation
+       animate = this.animate != null ? this.animate : animate;
+
+       graph.getModel().beginUpdate();
+       try {
+               layout.execute(graph.getDefaultParent(), cell);
+       } catch (e) {
+               throw e;
+       } finally {
+               // Animates the changes in the graph model except
+               // for Camino, where animation is too slow
+               if (animate && navigator.userAgent.indexOf('Camino') < 0) {
+                       // New API for animating graph layout results asynchronously
+                       var morph = new mxMorphing(graph);
+                       morph.addListener(mxEvent.DONE, mxUtils.bind(this, function() {
+                               graph.getModel().endUpdate();
+                       }));
+
+                       morph.startAnimation();
+               } else {
+                       graph.getModel().endUpdate();
+               }
+       }
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+EditorUi.prototype.createKeyHandler = function(editor) {
+       var graph = this.editor.graph;
+       var keyHandler = new mxKeyHandler(graph);
+
+       // Routes command-key to control-key on Mac
+       keyHandler.isControlDown = function(evt) {
+               return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
+       };
+
+       // Helper function to move cells with the cursor keys
+       function nudge(keyCode) {
+               if (!graph.isSelectionEmpty()) {
+                       var dx = 0;
+                       var dy = 0;
+
+                       if (keyCode == 37) {
+                               dx = -1;
+                       } else if (keyCode == 38) {
+                               dy = -1;
+                       } else if (keyCode == 39) {
+                               dx = 1;
+                       } else if (keyCode == 40) {
+                               dy = 1;
+                       }
+
+                       graph.moveCells(graph.getSelectionCells(), dx, dy);
+                       graph.scrollCellToVisible(graph.getSelectionCell());
+               }
+       };
+
+       // Binds keystrokes to actions
+       var bindAction = mxUtils.bind(this, function(code, control, key, shift) {
+               var action = this.actions.get(key);
+
+               if (action != null) {
+                       var f = function() {
+                               if (action.enabled) {
+                                       action.funct();
+                               }
+                       };
+
+                       if (control) {
+                               if (shift) {
+                                       keyHandler.bindControlShiftKey(code, f);
+                               } else {
+                                       keyHandler.bindControlKey(code, f);
+                               }
+                       } else {
+                               if (shift) {
+                                       keyHandler.bindShiftKey(code, f);
+                               } else {
+                                       keyHandler.bindKey(code, f);
+                               }
+                       }
+               }
+       });
+
+       var ui = this;
+       var keyHandleEscape = keyHandler.escape;
+       keyHandler.escape = function(evt) {
+               ui.hideDialog();
+               keyHandleEscape.apply(this, arguments);
+       };
+
+       // Ignores enter keystroke. Remove this line if you want the
+       // enter keystroke to stop editing.
+       keyHandler.enter = function() {};
+       keyHandler.bindKey(8, function() {
+               graph.foldCells(true);
+       }); // Backspace
+       keyHandler.bindKey(13, function() {
+               graph.foldCells(false);
+       }); // Enter
+       keyHandler.bindKey(33, function() {
+               graph.exitGroup();
+       }); // Page Up
+       keyHandler.bindKey(34, function() {
+               graph.enterGroup();
+       }); // Page Down
+       keyHandler.bindKey(36, function() {
+               graph.home();
+       }); // Home
+       keyHandler.bindKey(35, function() {
+               graph.refresh();
+       }); // End
+       keyHandler.bindKey(37, function() {
+               nudge(37);
+       }); // Left arrow
+       keyHandler.bindKey(38, function() {
+               nudge(38);
+       }); // Up arrow
+       keyHandler.bindKey(39, function() {
+               nudge(39);
+       }); // Right arrow
+       keyHandler.bindKey(40, function() {
+               nudge(40);
+       }); // Down arrow
+       keyHandler.bindKey(113, function() {
+               graph.startEditingAtCell();
+       });
+       bindAction(46, false, 'delete'); // Delete
+       bindAction(82, true, 'tilt'); // Ctrl+R
+       bindAction(83, true, 'save'); // Ctrl+S
+       bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
+       bindAction(107, false, 'zoomIn'); // Add
+       bindAction(109, false, 'zoomOut'); // Subtract
+       bindAction(65, true, 'selectAll'); // Ctrl+A
+       bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
+       bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
+       bindAction(69, true, 'export'); // Ctrl+Shift+E
+       bindAction(66, true, 'toBack'); // Ctrl+B
+       bindAction(70, true, 'toFront'); // Ctrl+F
+       bindAction(68, true, 'duplicate'); // Ctrl+D
+       bindAction(90, true, 'undo'); // Ctrl+Z
+       bindAction(89, true, 'redo'); // Ctrl+Y
+       bindAction(88, true, 'cut'); // Ctrl+X
+       bindAction(67, true, 'copy'); // Ctrl+C
+       bindAction(81, true, 'connect'); // Ctrl+Q
+       bindAction(86, true, 'paste'); // Ctrl+V
+       bindAction(71, true, 'group'); // Ctrl+G
+       bindAction(71, true, 'grid', true); // Ctrl+Shift+G
+       bindAction(85, true, 'ungroup'); // Ctrl+U
+       bindAction(112, false, 'about'); // F1
+       bindAction(80, true, 'publish', true); // Ctrl+Shift+P
+
+       return keyHandler;
+};
+
+/**
+ * Giuseppe Careri
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createMultiplicities = function(graph, cells, source,
+       target) {
+       for (var i = 0; i < cells.length; i++) {
+
+               graph.push(new mxMultiplicity(true, cells[i], null, null, source[i][0],
+                       source[i][1], null, mxResources.get(cells[i]) + mxResources.get('musthave') + source[i][0] + mxResources.get('outgoingedge'), null));
+               graph.push(new mxMultiplicity(false, cells[i], null, null, target[i][0],
+                       target[i][1], null, mxResources.get(cells[i]) + mxResources.get('musthave') + target[i][0] + mxResources.get('incomingedge'), null));
+       };
+};
index 64dc3e4..46f34e4 100644 (file)
@@ -1 +1,748 @@
-var _0xe092=["\x63\x61\x6C\x6C","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x61\x70\x70\x6C\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x32","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6C\x6F\x61\x64\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x63\x75\x72\x73\x6F\x72","\x73\x74\x79\x6C\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x76\x69\x65\x77","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x68\x74\x6D\x6C","\x31","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x77\x72\x61\x70","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x61\x63\x74\x69\x76\x65","\x67\x72\x61\x70\x68","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x73\x74\x61\x72\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x6E\x69\x74\x54\x6F\x75\x63\x68","\x65\x78\x74\x65\x6E\x64","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x2F\x64\x65\x66\x61\x75\x6C\x74\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x64\x65\x63\x6F\x64\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x45\x4C\x42\x4F\x57\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x72\x6F\x75\x70","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","","\x69\x73\x56\x65\x72\x74\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x5F","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x67\x65\x74","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x6F\x62\x6A\x65\x63\x74","\x6C\x61\x62\x65\x6C","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x55\x73\x65\x72\x4F\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6E\x6B","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x61\x72\x6B\x65\x72","\x66\x69\x72\x73\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x73\x74\x61\x74\x65","\x73\x68\x61\x70\x65","\x6E\x6F\x64\x65","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x78","\x79","\x2F\x74\x6F\x75\x63\x68\x2D\x68\x61\x6E\x64\x6C\x65\x2E\x70\x6E\x67","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x72\x63","\x2F\x74\x6F\x75\x63\x68\x2D\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x69\x6E\x69\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x49\x6D\x67","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x32\x39\x70\x78","\x68\x65\x69\x67\x68\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x74\x69\x74\x6C\x65","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x70\x61\x64\x64\x69\x6E\x67","\x32\x70\x78","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x72\x65\x64\x72\x61\x77\x54\x6F\x6F\x6C\x73","\x72\x65\x64\x72\x61\x77","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x78","\x74\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x49\x53\x5F\x49\x45","\x49\x53\x5F\x53\x56\x47","\x64\x69\x76","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x65\x6E\x74\x65\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E"];Graph=function(_0xc764x1,_0xc764x2,_0xc764x3,_0xc764x4){mxGraph[_0xe092[0]](this,_0xc764x1,_0xc764x2,_0xc764x3,_0xc764x4);this[_0xe092[1]](true);this[_0xe092[2]](false);this[_0xe092[3]](true);this[_0xe092[4]](!mxClient.IS_TOUCH);this[_0xe092[5]](false);this[_0xe092[6]](false);this[_0xe092[7]]=true;this[_0xe092[8]]=false;this[_0xe092[9]]=false;this[_0xe092[11]][_0xe092[10]]=true;this[_0xe092[12]](false);this[_0xe092[11]][_0xe092[13]](false);this[_0xe092[11]][_0xe092[14]]=function(){return mxConnectionHandler[_0xe092[16]][_0xe092[14]][_0xe092[15]](this,arguments)&&urlParams[_0xe092[17]]!=_0xe092[18]};this[_0xe092[19]]=_0xe092[20];if(_0xc764x4==null){this[_0xe092[21]]()};var _0xc764x5= new mxRubberband(this);this[_0xe092[22]]=function(){return _0xc764x5};this[_0xe092[29]][_0xe092[28]](mxEvent.PAN_START,mxUtils[_0xe092[27]](this,function(){this[_0xe092[25]][_0xe092[24]][_0xe092[23]]=_0xe092[26]}));this[_0xe092[29]][_0xe092[28]](mxEvent.PAN_END,mxUtils[_0xe092[27]](this,function(){this[_0xe092[25]][_0xe092[24]][_0xe092[23]]=_0xe092[30]}));this[_0xe092[31]]=function(_0xc764x6){var _0xc764x7=this[_0xe092[33]][_0xe092[32]](_0xc764x6);var _0xc764x8=(_0xc764x7!=null)?_0xc764x7[_0xe092[24]]:this[_0xe092[34]](_0xc764x6);return _0xc764x8[_0xe092[35]]==_0xe092[36]||_0xc764x8[_0xe092[37]]==_0xe092[38]};this[_0xe092[40]][_0xe092[39]]=function(_0xc764x7){var _0xc764x9=mxCellRenderer[_0xe092[16]][_0xe092[39]][_0xe092[15]](this,arguments);if(_0xc764x7[_0xe092[24]][_0xe092[37]]==_0xe092[38]&&_0xc764x7[_0xe092[24]][_0xe092[35]]!=1){_0xc764x9=mxUtils[_0xe092[41]](_0xc764x9,false)};return _0xc764x9};this[_0xe092[42]]=function(_0xc764x6){return false};this[_0xe092[11]][_0xe092[43]]=16;var _0xc764xa=this[_0xe092[11]][_0xe092[44]];this[_0xe092[11]][_0xe092[44]]=function(_0xc764xb,_0xc764x7){if(_0xc764x7==null){if(!this[_0xe092[46]][_0xe092[29]][_0xe092[45]]){_0xc764x5[_0xe092[49]](_0xc764xb[_0xe092[47]](),_0xc764xb[_0xe092[48]]());this[_0xe092[46]][_0xe092[29]][_0xe092[50]]=false}}else {if(tapAndHoldStartsConnection){_0xc764xa[_0xe092[15]](this,arguments)}else {if(this[_0xe092[46]][_0xe092[52]](_0xc764x7[_0xe092[51]])&&this[_0xe092[46]][_0xe092[53]]()>1){this[_0xe092[46]][_0xe092[54]](_0xc764x7[_0xe092[51]])}}}};if(touchStyle){this[_0xe092[55]]()}};mxUtils[_0xe092[56]](Graph,mxGraph);Graph[_0xe092[16]][_0xe092[57]]=null;Graph[_0xe092[16]][_0xe092[58]]=null;Graph[_0xe092[16]][_0xe092[21]]=function(){var _0xc764xc=mxUtils[_0xe092[61]](STYLE_PATH+_0xe092[60])[_0xe092[59]]();var _0xc764xd= new mxCodec(_0xc764xc[_0xe092[62]]);_0xc764xd[_0xe092[64]](_0xc764xc,this[_0xe092[63]]())};Graph[_0xe092[16]][_0xe092[65]]=function(_0xc764xe){if(_0xc764xe!=null){var _0xc764x7=this[_0xe092[33]][_0xe092[32]](_0xc764xe);var _0xc764x8=(_0xc764x7!=null)?_0xc764x7[_0xe092[24]]:this[_0xe092[34]](_0xc764xe);if(_0xc764x8!=null){var _0xc764xf=mxUtils[_0xe092[66]](_0xc764x8,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL);var _0xc764x10=(_0xc764xf==mxConstants[_0xe092[67]])?mxConstants[_0xe092[68]]:mxConstants[_0xe092[67]];this[_0xe092[69]](mxConstants.STYLE_ELBOW,_0xc764x10,[_0xc764xe])}}};Graph[_0xe092[16]][_0xe092[70]]=function(_0xc764x6){if(_0xc764x6!=null&&this[_0xe092[72]]()[_0xe092[71]](_0xc764x6)){var _0xc764x11=this[_0xe092[72]]()[_0xe092[73]]([_0xc764x6])[0];if(_0xc764x11[_0xe092[74]]!=null){_0xc764x11[_0xe092[74]][_0xe092[75]]=null};var _0xc764x8=_0xc764x11[_0xe092[76]]();_0xc764x8=mxUtils[_0xe092[77]](_0xc764x8,mxConstants.STYLE_ENTRY_X,null);_0xc764x8=mxUtils[_0xe092[77]](_0xc764x8,mxConstants.STYLE_ENTRY_Y,null);_0xc764x8=mxUtils[_0xe092[77]](_0xc764x8,mxConstants.STYLE_EXIT_X,null);_0xc764x8=mxUtils[_0xe092[77]](_0xc764x8,mxConstants.STYLE_EXIT_Y,null);_0xc764x11[_0xe092[77]](_0xc764x8);this[_0xe092[11]][_0xe092[78]]=function(_0xc764xb){return this[_0xe092[46]][_0xe092[33]][_0xe092[79]](_0xc764x11)};this[_0xe092[11]][_0xe092[80]]=function(){return this[_0xe092[46]][_0xe092[73]]([_0xc764x11])[0]}}};Graph[_0xe092[16]][_0xe092[81]]=function(_0xc764x6){return this[_0xe092[82]]&&this[_0xe092[83]](_0xc764x6)};Graph[_0xe092[16]][_0xe092[84]]=function(_0xc764x6){return this[_0xe092[83]](_0xc764x6)};Graph[_0xe092[16]][_0xe092[85]]=function(){var _0xc764x12=mxGraph[_0xe092[16]][_0xe092[85]][_0xe092[15]](this,arguments);_0xc764x12[_0xe092[77]](_0xe092[86]);return _0xc764x12};Graph[_0xe092[16]][_0xe092[87]]=function(_0xc764x6){var _0xc764x13=_0xe092[88];if(this[_0xe092[72]]()[_0xe092[89]](_0xc764x6)){_0xc764x13+=mxResources[_0xe092[93]](_0xe092[90]+_0xc764x6[_0xe092[92]][_0xe092[91]])}else {if(this[_0xe092[72]]()[_0xe092[71]](_0xc764x6)){_0xc764x13=mxGraph[_0xe092[16]][_0xe092[87]][_0xe092[15]](this,arguments)}};return _0xc764x13};Graph[_0xe092[16]][_0xe092[94]]=function(_0xc764x6){if(_0xc764x6[_0xe092[92]]!=null&& typeof (_0xc764x6[_0xe092[92]])==_0xe092[95]){return _0xc764x6[_0xe092[92]][_0xe092[97]](_0xe092[96])};return mxGraph[_0xe092[16]][_0xe092[94]][_0xe092[15]](this,arguments)};Graph[_0xe092[16]][_0xe092[98]]=function(_0xc764x6,_0xc764x10,_0xc764x14){if(_0xc764x6[_0xe092[92]]!=null&& typeof (_0xc764x6[_0xe092[92]])==_0xe092[95]){var _0xc764x15=_0xc764x6[_0xe092[92]][_0xe092[99]](true);_0xc764x15[_0xe092[100]](_0xe092[96],_0xc764x10);_0xc764x10=_0xc764x15};mxGraph[_0xe092[16]][_0xe092[98]][_0xe092[15]](this,arguments)};Graph[_0xe092[16]][_0xe092[101]]=function(_0xc764x6,_0xc764x16){var _0xc764x10=null;if(_0xc764x6[_0xe092[92]]!=null&& typeof (_0xc764x6[_0xe092[92]])==_0xe092[95]){_0xc764x10=_0xc764x6[_0xe092[92]][_0xe092[99]](true)}else {var _0xc764x17=mxUtils[_0xe092[102]]();_0xc764x10=_0xc764x17[_0xe092[104]](_0xe092[103]);_0xc764x10[_0xe092[100]](_0xe092[96],_0xc764x6[_0xe092[92]])};if(_0xc764x16!=null&&_0xc764x16[_0xe092[105]]>0){_0xc764x10[_0xe092[100]](_0xe092[106],_0xc764x16)}else {_0xc764x10[_0xe092[107]](_0xe092[106])};this[_0xe092[109]][_0xe092[108]](_0xc764x6,_0xc764x10)};Graph[_0xe092[16]][_0xe092[110]]=function(_0xc764x6){if(_0xc764x6[_0xe092[92]]!=null&& typeof (_0xc764x6[_0xe092[92]])==_0xe092[95]){return _0xc764x6[_0xe092[92]][_0xe092[97]](_0xe092[106])};return null};Graph[_0xe092[16]][_0xe092[55]]=function(){this[_0xe092[11]][_0xe092[112]][_0xe092[111]]=function(){return this[_0xe092[46]][_0xe092[11]][_0xe092[113]]!=null};this[_0xe092[28]](mxEvent.START_EDITING,function(_0xc764x18,_0xc764x19){this[_0xe092[29]][_0xe092[114]]()});var _0xc764x1a=false;var _0xc764x1b=null;this[_0xe092[115]]=function(_0xc764xb){mxGraph[_0xe092[16]][_0xe092[115]][_0xe092[15]](this,arguments);if(_0xc764xb[_0xe092[32]]()==null){var _0xc764x6=this[_0xe092[118]](_0xc764xb[_0xe092[116]],_0xc764xb[_0xe092[117]]);if(this[_0xe092[72]]()[_0xe092[71]](_0xc764x6)){_0xc764xb[_0xe092[119]]=this[_0xe092[33]][_0xe092[32]](_0xc764x6);if(_0xc764xb[_0xe092[119]]!=null&&_0xc764xb[_0xe092[119]][_0xe092[120]]!=null){this[_0xe092[25]][_0xe092[24]][_0xe092[23]]=_0xc764xb[_0xe092[119]][_0xe092[120]][_0xe092[121]][_0xe092[24]][_0xe092[23]]}}};if(_0xc764xb[_0xe092[32]]()==null){this[_0xe092[25]][_0xe092[24]][_0xe092[23]]=_0xe092[30]}};this[_0xe092[122]]=function(_0xc764x1c,_0xc764xb,_0xc764x18){if(_0xc764x1c==mxEvent[_0xe092[123]]){if(!this[_0xe092[29]][_0xe092[124]]()){_0xc764x1b=_0xc764xb[_0xe092[125]]();_0xc764x1a=(_0xc764x1b!=null)?this[_0xe092[52]](_0xc764x1b):this[_0xe092[126]]()}else {_0xc764x1a=false;_0xc764x1b=null}}else {if(_0xc764x1c==mxEvent[_0xe092[127]]){if(_0xc764x1a&&!this[_0xe092[128]]()){if(!this[_0xe092[29]][_0xe092[124]]()){var _0xc764x1d=mxEvent[_0xe092[130]](_0xc764xb[_0xe092[129]]());var _0xc764x1e=mxEvent[_0xe092[131]](_0xc764xb[_0xe092[129]]());this[_0xe092[29]][_0xe092[132]](_0xc764x1d+16,_0xc764x1e,_0xc764x1b,_0xc764xb[_0xe092[129]]())};_0xc764x1a=false;_0xc764x1b=null;_0xc764xb[_0xe092[133]]();return};_0xc764x1a=false;_0xc764x1b=null}};mxGraph[_0xe092[16]][_0xe092[122]][_0xe092[15]](this,arguments);if(_0xc764x1c==mxEvent[_0xe092[134]]&&_0xc764xb[_0xe092[135]]()){_0xc764x1a=false;_0xc764x1b=null}}};(function(){mxVertexHandler[_0xe092[16]][_0xe092[136]]=true;mxText[_0xe092[16]][_0xe092[137]]=5;mxText[_0xe092[16]][_0xe092[138]]=1;if(touchStyle){mxConstants[_0xe092[139]]=16;mxConstants[_0xe092[140]]=7;if(mxClient[_0xe092[141]]){mxVertexHandler[_0xe092[16]][_0xe092[142]]=4;mxEdgeHandler[_0xe092[16]][_0xe092[142]]=6;Graph[_0xe092[16]][_0xe092[142]]=14;Graph[_0xe092[16]][_0xe092[143]]=20;mxPanningHandler[_0xe092[16]][_0xe092[144]]=false;mxPanningHandler[_0xe092[16]][_0xe092[145]]=true;mxPanningHandler[_0xe092[16]][_0xe092[146]]=function(_0xc764xb){var _0xc764x19=_0xc764xb[_0xe092[129]]();return (this[_0xe092[145]]&&(this[_0xe092[147]]||_0xc764xb[_0xe092[32]]()==null))||(mxEvent[_0xe092[148]](_0xc764x19)&&mxEvent[_0xe092[149]](_0xc764x19))||(this[_0xe092[150]]&&mxEvent[_0xe092[151]](_0xc764x19))}};var _0xc764x1f=mxGraphHandler[_0xe092[16]][_0xe092[152]];mxGraphHandler[_0xe092[16]][_0xe092[152]]=function(_0xc764x18,_0xc764xb){_0xc764x1f[_0xe092[15]](this,arguments);if(this[_0xe092[46]][_0xe092[52]](_0xc764xb[_0xe092[125]]())&&this[_0xe092[46]][_0xe092[53]]()>1){this[_0xe092[153]]=false}};Graph[_0xe092[16]][_0xe092[154]]=function(_0xc764x1){this[_0xe092[155]]= new mxTooltipHandler(this);this[_0xe092[155]][_0xe092[156]](false);this[_0xe092[157]]= new mxSelectionCellsHandler(this);this[_0xe092[29]]= new mxPanningHandler(this);this[_0xe092[29]][_0xe092[158]]=false;this[_0xe092[11]]= new mxConnectionHandler(this);this[_0xe092[11]][_0xe092[156]](false);this[_0xe092[159]]= new mxGraphHandler(this)};mxConnectionHandler[_0xe092[16]][_0xe092[160]]=function(_0xc764xe,_0xc764x20){if(touchStyle&&_0xc764x20!=null){this[_0xe092[46]][_0xe092[161]](_0xc764x20)}else {this[_0xe092[46]][_0xe092[161]](_0xc764xe)}};var _0xc764x21=mxGraph[_0xe092[16]][_0xe092[162]];Graph[_0xe092[16]][_0xe092[162]]=function(_0xc764x19,_0xc764x6){if(_0xc764x6==null){var _0xc764x22=mxUtils[_0xe092[163]](this[_0xe092[25]],mxEvent[_0xe092[130]](_0xc764x19),mxEvent[_0xe092[131]](_0xc764x19));_0xc764x6=this[_0xe092[118]](_0xc764x22[_0xe092[164]],_0xc764x22[_0xe092[165]])};_0xc764x21[_0xe092[0]](this,_0xc764x19,_0xc764x6)};var _0xc764x23= new mxImage(IMAGE_PATH+_0xe092[166],16,16);mxVertexHandler[_0xe092[16]][_0xe092[167]]=_0xc764x23;mxEdgeHandler[_0xe092[16]][_0xe092[167]]=_0xc764x23;mxOutline[_0xe092[16]][_0xe092[168]]=_0xc764x23; new Image()[_0xe092[169]]=_0xc764x23[_0xe092[169]];var _0xc764x24=IMAGE_PATH+_0xe092[170];var _0xc764x25=mxVertexHandler[_0xe092[16]][_0xe092[171]];mxVertexHandler[_0xe092[16]][_0xe092[171]]=function(){_0xc764x25[_0xe092[15]](this,arguments);if(showConnectorImg&&this[_0xe092[46]][_0xe092[11]][_0xe092[111]]()&&this[_0xe092[46]][_0xe092[172]](this[_0xe092[119]][_0xe092[51]])&&!this[_0xe092[46]][_0xe092[84]](this[_0xe092[119]][_0xe092[51]])&&this[_0xe092[46]][_0xe092[53]]()==1){this[_0xe092[173]]=mxUtils[_0xe092[174]](_0xc764x24);this[_0xe092[173]][_0xe092[24]][_0xe092[23]]=_0xe092[26];this[_0xe092[173]][_0xe092[24]][_0xe092[175]]=_0xe092[176];this[_0xe092[173]][_0xe092[24]][_0xe092[177]]=_0xe092[176];this[_0xe092[173]][_0xe092[24]][_0xe092[178]]=_0xe092[179];if(!mxClient[_0xe092[141]]){this[_0xe092[173]][_0xe092[100]](_0xe092[180],mxResources[_0xe092[93]](_0xe092[17]));mxEvent[_0xe092[181]](this[_0xe092[173]],this[_0xe092[46]],this[_0xe092[119]])};this[_0xe092[173]][_0xe092[24]][_0xe092[182]]=_0xe092[183];mxEvent[_0xe092[185]](this[_0xe092[173]],mxUtils[_0xe092[27]](this,function(_0xc764x19){this[_0xe092[46]][_0xe092[29]][_0xe092[114]]();var _0xc764x22=mxUtils[_0xe092[163]](this[_0xe092[46]][_0xe092[25]],mxEvent[_0xe092[130]](_0xc764x19),mxEvent[_0xe092[131]](_0xc764x19));this[_0xe092[46]][_0xe092[11]][_0xe092[49]](this[_0xe092[119]],_0xc764x22[_0xe092[164]],_0xc764x22[_0xe092[165]]);this[_0xe092[46]][_0xe092[184]]=true;mxEvent[_0xe092[133]](_0xc764x19)}));this[_0xe092[46]][_0xe092[25]][_0xe092[186]](this[_0xe092[173]])};this[_0xe092[187]]()};var _0xc764x26=mxVertexHandler[_0xe092[16]][_0xe092[188]];mxVertexHandler[_0xe092[16]][_0xe092[188]]=function(){_0xc764x26[_0xe092[15]](this);this[_0xe092[187]]()};mxVertexHandler[_0xe092[16]][_0xe092[187]]=function(){if(this[_0xe092[119]]!=null&&this[_0xe092[173]]!=null){if(mxVertexHandler[_0xe092[16]][_0xe092[189]]){this[_0xe092[173]][_0xe092[24]][_0xe092[190]]=(this[_0xe092[119]][_0xe092[164]]+this[_0xe092[119]][_0xe092[175]]-this[_0xe092[173]][_0xe092[191]]/2)+_0xe092[192];this[_0xe092[173]][_0xe092[24]][_0xe092[193]]=(this[_0xe092[119]][_0xe092[165]]-this[_0xe092[173]][_0xe092[194]]/2)+_0xe092[192]}else {this[_0xe092[173]][_0xe092[24]][_0xe092[190]]=(this[_0xe092[119]][_0xe092[164]]+this[_0xe092[119]][_0xe092[175]]+mxConstants[_0xe092[139]]/2+4)+_0xe092[192];this[_0xe092[173]][_0xe092[24]][_0xe092[193]]=(this[_0xe092[119]][_0xe092[165]]+(this[_0xe092[119]][_0xe092[177]]-this[_0xe092[173]][_0xe092[194]])/2)+_0xe092[192]}}};var _0xc764x27=mxVertexHandler[_0xe092[16]][_0xe092[195]];mxVertexHandler[_0xe092[16]][_0xe092[195]]=function(_0xc764x18,_0xc764xb){_0xc764x27[_0xe092[15]](this,arguments);if(this[_0xe092[173]]!=null){this[_0xe092[173]][_0xe092[197]][_0xe092[196]](this[_0xe092[173]]);this[_0xe092[173]]=null}}; new Image()[_0xe092[169]]=_0xc764x24}else {var _0xc764x28= new mxImage(IMAGE_PATH+_0xe092[198],15,15);mxConnectionHandler[_0xe092[16]][_0xe092[199]]=_0xc764x28; new Image()[_0xe092[169]]=_0xc764x28[_0xe092[169]];if(urlParams[_0xe092[17]]==_0xe092[18]){var _0xc764x28= new mxImage(IMAGE_PATH+_0xe092[198],15,15);var _0xc764x25=mxVertexHandler[_0xe092[16]][_0xe092[171]];mxVertexHandler[_0xe092[16]][_0xe092[171]]=function(){_0xc764x25[_0xe092[15]](this,arguments);if(showConnectorImg&&this[_0xe092[46]][_0xe092[11]][_0xe092[111]]()&&this[_0xe092[46]][_0xe092[172]](this[_0xe092[119]][_0xe092[51]])&&!this[_0xe092[46]][_0xe092[84]](this[_0xe092[119]][_0xe092[51]])&&this[_0xe092[46]][_0xe092[53]]()==1){if(mxClient[_0xe092[200]]&&!mxClient[_0xe092[201]]){this[_0xe092[173]]=document[_0xe092[104]](_0xe092[202]);this[_0xe092[173]][_0xe092[24]][_0xe092[203]]=_0xe092[204]+_0xc764x28[_0xe092[169]]+_0xe092[205];this[_0xe092[173]][_0xe092[24]][_0xe092[206]]=_0xe092[207];this[_0xe092[173]][_0xe092[24]][_0xe092[208]]=_0xe092[209];this[_0xe092[173]][_0xe092[24]][_0xe092[175]]=(_0xc764x28[_0xe092[175]]+4)+_0xe092[192];this[_0xe092[173]][_0xe092[24]][_0xe092[177]]=(_0xc764x28[_0xe092[177]]+4)+_0xe092[192];this[_0xe092[173]][_0xe092[24]][_0xe092[210]]=(mxClient[_0xe092[211]])?_0xe092[212]:_0xe092[213]}else {this[_0xe092[173]]=mxUtils[_0xe092[174]](_0xc764x28[_0xe092[169]]);this[_0xe092[173]][_0xe092[24]][_0xe092[175]]=_0xc764x28[_0xe092[175]]+_0xe092[192];this[_0xe092[173]][_0xe092[24]][_0xe092[177]]=_0xc764x28[_0xe092[177]]+_0xe092[192]};this[_0xe092[173]][_0xe092[24]][_0xe092[23]]=_0xe092[26];this[_0xe092[173]][_0xe092[24]][_0xe092[178]]=_0xe092[179];this[_0xe092[173]][_0xe092[100]](_0xe092[180],mxResources[_0xe092[93]](_0xe092[17]));mxEvent[_0xe092[181]](this[_0xe092[173]],this[_0xe092[46]],this[_0xe092[119]]);this[_0xe092[173]][_0xe092[24]][_0xe092[182]]=_0xe092[183];mxEvent[_0xe092[28]](this[_0xe092[173]],_0xe092[214],mxUtils[_0xe092[27]](this,function(_0xc764x19){this[_0xe092[46]][_0xe092[29]][_0xe092[114]]();var _0xc764x22=mxUtils[_0xe092[163]](this[_0xe092[46]][_0xe092[25]],mxEvent[_0xe092[130]](_0xc764x19),mxEvent[_0xe092[131]](_0xc764x19));this[_0xe092[46]][_0xe092[11]][_0xe092[49]](this[_0xe092[119]],_0xc764x22[_0xe092[164]],_0xc764x22[_0xe092[165]]);this[_0xe092[46]][_0xe092[184]]=true;mxEvent[_0xe092[133]](_0xc764x19)}));this[_0xe092[46]][_0xe092[25]][_0xe092[186]](this[_0xe092[173]])};this[_0xe092[187]]()};var _0xc764x26=mxVertexHandler[_0xe092[16]][_0xe092[188]];mxVertexHandler[_0xe092[16]][_0xe092[188]]=function(){_0xc764x26[_0xe092[15]](this);this[_0xe092[187]]()};mxVertexHandler[_0xe092[16]][_0xe092[187]]=function(){if(this[_0xe092[119]]!=null&&this[_0xe092[173]]!=null){if(mxVertexHandler[_0xe092[16]][_0xe092[189]]){this[_0xe092[173]][_0xe092[24]][_0xe092[190]]=(this[_0xe092[119]][_0xe092[164]]+this[_0xe092[119]][_0xe092[175]]-this[_0xe092[173]][_0xe092[191]]/2)+_0xe092[192];this[_0xe092[173]][_0xe092[24]][_0xe092[193]]=(this[_0xe092[119]][_0xe092[165]]-this[_0xe092[173]][_0xe092[194]]/2)+_0xe092[192]}else {this[_0xe092[173]][_0xe092[24]][_0xe092[190]]=(this[_0xe092[119]][_0xe092[164]]+this[_0xe092[119]][_0xe092[175]]+mxConstants[_0xe092[139]]/2+2)+_0xe092[192];this[_0xe092[173]][_0xe092[24]][_0xe092[193]]=(this[_0xe092[119]][_0xe092[165]]+(this[_0xe092[119]][_0xe092[177]]-this[_0xe092[173]][_0xe092[194]])/2)+_0xe092[192]}}};var _0xc764x27=mxVertexHandler[_0xe092[16]][_0xe092[195]];mxVertexHandler[_0xe092[16]][_0xe092[195]]=function(_0xc764x18,_0xc764xb){_0xc764x27[_0xe092[15]](this,arguments);if(this[_0xe092[173]]!=null){this[_0xe092[173]][_0xe092[197]][_0xe092[196]](this[_0xe092[173]]);this[_0xe092[173]]=null}}}}})()
\ No newline at end of file
+/**
+ * $Id: Graph.js,v 1.14 2013-02-16 10:19:54 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph instance. Note that the constructor does not take a
+ * container because the graph instance is needed for creating the UI, which
+ * in turn will create the container for the graph. Hence, the container is
+ * assigned later in EditorUi.
+ */
+Graph = function(container, model, renderHint, stylesheet)
+{
+       mxGraph.call(this, container, model, renderHint, stylesheet);
+       
+       this.setConnectable(true);
+       this.setDropEnabled(false);
+       this.setPanning(true);
+       this.setTooltips(!mxClient.IS_TOUCH);
+       this.setAllowLoops(false);
+       this.setMultigraph(false);
+       this.allowAutoPanning = true;
+       this.resetEdgesOnConnect = false;
+       this.constrainChildren = false;
+       
+       // Centers the port icon on the target port
+    this.connectionHandler.targetConnectImage = true;
+
+    // Does not allow dangling edges
+    this.setAllowDanglingEdges(false);
+
+       // Enables cloning of connection sources
+       this.connectionHandler.setCreateTarget(false);
+       
+       // Disables built-in connection starts
+       this.connectionHandler.isValidSource = function()
+       {
+               return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2';
+       };
+
+       // Sets the style to be used when an elbow edge is double clicked
+       this.alternateEdgeStyle = 'vertical';
+
+       if (stylesheet == null)
+       {
+               this.loadStylesheet();
+       }
+       
+       // Creates rubberband selection
+    var rubberband = new mxRubberband(this);
+    
+    this.getRubberband = function()
+    {
+       return rubberband;
+    };
+    
+    // Shows hand cursor while panning
+       this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()
+       {
+               this.container.style.cursor = 'pointer';
+       }));
+                       
+       this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()
+       {
+               this.container.style.cursor = 'default';
+       }));
+
+    // Adds support for HTML labels via style. Note: Currently, only the Java
+    // backend supports HTML labels but CSS support is limited to the following:
+    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+       this.isHtmlLabel = function(cell)
+       {
+               var state = this.view.getState(cell);
+               var style = (state != null) ? state.style : this.getCellStyle(cell);
+               
+               return style['html'] == '1' || style['whiteSpace'] == 'wrap';
+       };
+       
+       // HTML entities are displayed as plain text in wrapped plain text labels
+       this.cellRenderer.getLabelValue = function(state)
+       {
+               var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+               
+               if (state.style['whiteSpace'] == 'wrap' && state.style['html'] != 1)
+               {
+                       result = mxUtils.htmlEntities(result, false);
+               }
+               
+               return result;
+       };
+       
+       // Unlocks all cells
+       this.isCellLocked = function(cell)
+       {
+               return false;
+       };
+
+       // Tap and hold brings up context menu.
+       // Tolerance slightly below graph tolerance is better.
+       this.connectionHandler.tapAndHoldTolerance = 16;
+       
+       //  Tap and hold on background starts rubberband on cell starts connecting
+       var connectionHandlerTapAndHold = this.connectionHandler.tapAndHold;
+       this.connectionHandler.tapAndHold = function(me, state)
+       {
+               if (state == null)
+               {
+                       if (!this.graph.panningHandler.active)
+                       {
+                               rubberband.start(me.getGraphX(), me.getGraphY());
+                               this.graph.panningHandler.panningTrigger = false;
+                       }
+               }
+               else if (tapAndHoldStartsConnection)
+               {
+                       connectionHandlerTapAndHold.apply(this, arguments);     
+               }
+               else if (this.graph.isCellSelected(state.cell) && this.graph.getSelectionCount() > 1)
+               {
+                       this.graph.removeSelectionCell(state.cell);
+               }
+       };
+
+       if (touchStyle)
+       {
+               this.initTouch();
+       }
+};
+
+// Graph inherits from mxGraph
+mxUtils.extend(Graph, mxGraph);
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.minFitScale = null;
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.maxFitScale = null;
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+Graph.prototype.loadStylesheet = function()
+{
+    var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
+       var dec = new mxCodec(node.ownerDocument);
+       dec.decode(node, this.getStylesheet());
+};
+
+/**
+ * Inverts the elbow edge style without removing existing styles.
+ */
+Graph.prototype.flipEdge = function(edge)
+{
+       if (edge != null)
+       {
+               var state = this.view.getState(edge);
+               var style = (state != null) ? state.style : this.getCellStyle(edge);
+               
+               if (style != null)
+               {
+                       var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
+                               mxConstants.ELBOW_HORIZONTAL);
+                       var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
+                               mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
+                       this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
+               }
+       }
+};
+
+/**
+ * Sets the default edge for future connections.
+ */
+Graph.prototype.setDefaultEdge = function(cell)
+{
+       if (cell != null && this.getModel().isEdge(cell))
+       {
+               // Take a snapshot of the cell at the moment of calling
+               var proto = this.getModel().cloneCells([cell])[0];
+               
+               // Delete existing points
+               if (proto.geometry != null)
+               {
+                       proto.geometry.points = null;
+               }
+               
+               // Delete entry-/exitXY styles
+               var style = proto.getStyle();
+               style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
+               style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
+               style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
+               style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
+               proto.setStyle(style);
+               
+               // Uses edge template for connect preview
+               this.connectionHandler.createEdgeState = function(me)
+               {
+               return this.graph.view.createState(proto);
+           };
+
+           // Creates new connections from edge template
+           this.connectionHandler.factoryMethod = function()
+           {
+               return this.graph.cloneCells([proto])[0];
+           };
+       }
+};
+
+/**
+ * Disables folding for non-swimlanes.
+ */
+Graph.prototype.isCellFoldable = function(cell)
+{
+       return this.foldingEnabled && this.isSwimlane(cell);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidRoot = function(cell)
+{
+       return this.isSwimlane(cell);
+};
+
+/**
+ * Overrides createGroupCell to set the group style for new groups to 'group'.
+ */
+Graph.prototype.createGroupCell = function()
+{
+       var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
+       group.setStyle('group');
+       
+       return group;
+};
+
+/**
+ * Giuseppe Careri
+ * Overrides tooltips to show position and size
+ */
+Graph.prototype.getTooltipForCell = function(cell)
+{
+       var tip = '';
+       
+       if (this.getModel().isVertex(cell))
+       {
+               // var geo = this.getCellGeometry(cell);
+               
+               // var f2 = function(x)
+               // {
+               //      return Math.round(parseFloat(x) * 100) / 100;
+               // };
+               
+               // if (geo != null)
+               // {
+               //      if (tip == null)
+               //      {
+               //              tip = '';
+               //      }
+               //      else if (tip.length > 0)
+               //      {
+               //              tip += '\n';
+               //      }
+                       
+               //      tip += 'X: ' + f2(geo.x) + '\nY: ' + f2(geo.y) + '\nW: ' + f2(geo.width) + '\nH: ' + f2(geo.height);
+               // }
+               
+               tip += mxResources.get('description_' + cell.value.nodeName);
+       }
+       else if (this.getModel().isEdge(cell))
+       {
+               tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
+       }
+       
+       return tip;
+};
+
+/**
+ * Giuseppe Careri
+ * Returns the label for the given cell.
+ */
+Graph.prototype.convertValueToString = function(cell)
+{
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               return cell.value.getAttribute('label');
+       }
+       
+       return mxGraph.prototype.convertValueToString.apply(this, arguments);
+};
+
+/**
+ * Giuseppe Careri
+ * Handles label changes for XML user objects.
+ */
+Graph.prototype.cellLabelChanged = function(cell, value, autoSize)
+{
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               var tmp = cell.value.cloneNode(true);
+               tmp.setAttribute('label', value);
+               value = tmp;
+       }
+       
+       mxGraph.prototype.cellLabelChanged.apply(this, arguments);
+};
+
+/**
+ * Sets the link for the given cell.
+ */
+Graph.prototype.setLinkForCell = function(cell, link)
+{
+       var value = null;
+       
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               value = cell.value.cloneNode(true);
+       }
+       else
+       {
+               var doc = mxUtils.createXmlDocument();
+               
+               value = doc.createElement('UserObject');
+               value.setAttribute('label', cell.value);
+       }
+       
+       if (link != null && link.length > 0)
+       {
+               value.setAttribute('link', link);
+       }
+       else
+       {
+               value.removeAttribute('link');
+       }
+       
+       this.model.setValue(cell, value);
+};
+
+/**
+ * Returns the link for the given cell.
+ */
+Graph.prototype.getLinkForCell = function(cell)
+{
+       if (cell.value != null && typeof(cell.value) == 'object')
+       {
+               return cell.value.getAttribute('link');
+       }
+       
+       return null;
+};
+
+/**
+ * Customized graph for touch devices.
+ */
+Graph.prototype.initTouch = function()
+{
+       // Disables new connections via "hotspot"
+       this.connectionHandler.marker.isEnabled = function()
+       {
+               return this.graph.connectionHandler.first != null;
+       };
+
+       // Hides menu when editing starts
+       this.addListener(mxEvent.START_EDITING, function(sender, evt)
+       {
+               this.panningHandler.hideMenu();
+       });
+
+       // Context menu for touchstyle
+       var showMenu = false;
+       var menuCell = null;
+
+       // Checks if native hit detection did not return anything and does custom
+       // hit detection for edges to take into account the tolerance
+       this.updateMouseEvent = function(me)
+       {
+               mxGraph.prototype.updateMouseEvent.apply(this, arguments);
+
+               if (me.getState() == null)
+               {
+                       var cell = this.getCellAt(me.graphX, me.graphY);
+                       
+                       if (this.getModel().isEdge(cell))
+                       {
+                               me.state = this.view.getState(cell);
+                               
+                               if (me.state != null && me.state.shape != null)
+                               {
+                                       this.container.style.cursor = me.state.shape.node.style.cursor;
+                               }
+                       }
+               }
+               
+               if (me.getState() == null)
+               {
+                       this.container.style.cursor = 'default';
+               }
+       };
+       
+       // Handles popup menu on touch devices (tap selected cell)
+       this.fireMouseEvent = function(evtName, me, sender)
+       {
+               if (evtName == mxEvent.MOUSE_DOWN)
+               {
+                       if (!this.panningHandler.isMenuShowing())
+                       {
+                               menuCell = me.getCell();
+                               showMenu = (menuCell != null) ? this.isCellSelected(menuCell) : this.isSelectionEmpty();
+                       }
+                       else
+                       {
+                               showMenu = false;
+                               menuCell = null;
+                       }
+               }
+               else if (evtName == mxEvent.MOUSE_UP)
+               {
+                       if (showMenu && !this.isEditing())
+                       {
+                               if (!this.panningHandler.isMenuShowing())
+                               {
+                                       var x = mxEvent.getClientX(me.getEvent());
+                                       var y = mxEvent.getClientY(me.getEvent());
+                                       
+                                       this.panningHandler.popup(x + 16, y, menuCell, me.getEvent());
+                               }
+                               
+                               showMenu = false;
+                               menuCell = null;
+                               me.consume();
+                               
+                               return;
+                       }
+                       
+                       showMenu = false;
+                       menuCell = null;
+               }
+
+               mxGraph.prototype.fireMouseEvent.apply(this, arguments);
+
+               if (evtName == mxEvent.MOUSE_MOVE && me.isConsumed())
+               {
+                       showMenu = false;
+                       menuCell = null;
+               }
+       };
+};
+
+/**
+ * Implements touch devices.
+ */
+(function()
+{
+       // Enables rotation handle
+       mxVertexHandler.prototype.rotationEnabled = true;
+       
+       // Matches label positions of mxGraph 1.x
+       mxText.prototype.baseSpacingTop = 5;
+       mxText.prototype.baseSpacingBottom = 1;
+
+       // Touch-specific static overrides
+       if (touchStyle)
+       {
+               // Sets constants for touch style
+               mxConstants.HANDLE_SIZE = 16;
+               mxConstants.LABEL_HANDLE_SIZE = 7;
+               
+               // Larger tolerance and grid for real touch devices
+               if (mxClient.IS_TOUCH)
+               {
+                       mxVertexHandler.prototype.tolerance = 4;
+                       mxEdgeHandler.prototype.tolerance = 6;
+                       Graph.prototype.tolerance = 14;
+                       Graph.prototype.gridSize = 20;
+                       
+                       // One finger pans (no rubberband selection) must start regardless of mouse button
+                       mxPanningHandler.prototype.selectOnPopup = false;
+                       mxPanningHandler.prototype.useLeftButtonForPanning = true;
+                       mxPanningHandler.prototype.isPanningTrigger = function(me)
+                       {
+                               var evt = me.getEvent();
+                               
+                               return (this.useLeftButtonForPanning && (this.ignoreCell || me.getState() == null)/* &&
+                                               mxEvent.isLeftMouseButton(evt)*/) || (mxEvent.isControlDown(evt) &&
+                                               mxEvent.isShiftDown(evt)) || (this.usePopupTrigger &&
+                                               mxEvent.isPopupTrigger(evt));
+                       };
+               }
+               
+               // Don't clear selection if multiple cells selected
+               var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
+               mxGraphHandler.prototype.mouseDown = function(sender, me)
+               {
+                       graphHandlerMouseDown.apply(this, arguments);
+
+                       if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1)
+                       {
+                               this.delayedSelection = false;
+                       }
+               };
+
+               // Changes order of panninghandler
+               Graph.prototype.createHandlers = function(container)
+               {
+                       this.tooltipHandler = new mxTooltipHandler(this);
+                       this.tooltipHandler.setEnabled(false);
+                       // Selection cells first
+                       this.selectionCellsHandler = new mxSelectionCellsHandler(this);
+                       this.panningHandler = new mxPanningHandler(this);
+                       this.panningHandler.panningEnabled = false;
+                       this.connectionHandler = new mxConnectionHandler(this);
+                       this.connectionHandler.setEnabled(false);
+                       this.graphHandler = new mxGraphHandler(this);
+               };
+
+               // On connect the target is selected and we clone the cell of the preview edge for insert
+               mxConnectionHandler.prototype.selectCells = function(edge, target)
+               {
+                       if (touchStyle && target != null)
+                       {
+                               this.graph.setSelectionCell(target);
+                       }
+                       else
+                       {
+                               this.graph.setSelectionCell(edge);
+                       }
+               };
+
+               // Overrides double click handling to use the tolerance
+               // FIXME: Double click on edges in iPad needs focus on textarea
+               var graphDblClick = mxGraph.prototype.dblClick;
+               Graph.prototype.dblClick = function(evt, cell)
+               {
+                       if (cell == null)
+                       {
+                               var pt = mxUtils.convertPoint(this.container,
+                                       mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                               cell = this.getCellAt(pt.x, pt.y);
+                       }
+
+                       graphDblClick.call(this, evt, cell);
+               };
+
+               // Rounded edge and vertex handles
+               var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+               mxVertexHandler.prototype.handleImage = touchHandle;
+               mxEdgeHandler.prototype.handleImage = touchHandle;
+               mxOutline.prototype.sizerImage = touchHandle;
+               
+               // Pre-fetches touch handle
+               new Image().src = touchHandle.src;
+
+               // Adds connect icon to selected vertices
+               var connectorSrc = IMAGE_PATH + '/touch-connector.png';
+               
+               var vertexHandlerInit = mxVertexHandler.prototype.init;
+               mxVertexHandler.prototype.init = function()
+               {
+                       vertexHandlerInit.apply(this, arguments);
+
+                       // Only show connector image on one cell and do not show on containers
+                       if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+                               this.graph.isCellConnectable(this.state.cell) &&
+                               !this.graph.isValidRoot(this.state.cell) &&
+                               this.graph.getSelectionCount() == 1)
+                       {
+                               this.connectorImg = mxUtils.createImage(connectorSrc);
+                               this.connectorImg.style.cursor = 'pointer';
+                               this.connectorImg.style.width = '29px';
+                               this.connectorImg.style.height = '29px';
+                               this.connectorImg.style.position = 'absolute';
+                               
+                               if (!mxClient.IS_TOUCH)
+                               {
+                                       this.connectorImg.setAttribute('title', mxResources.get('connect'));
+                                       mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+                               }
+
+                               // Adds 2px tolerance
+                               this.connectorImg.style.padding = '2px';
+                               
+                               // Starts connecting on touch/mouse down
+                               mxEvent.addGestureListeners(this.connectorImg,
+                                       mxUtils.bind(this, function(evt)
+                                       {
+                                               this.graph.panningHandler.hideMenu();
+                                               var pt = mxUtils.convertPoint(this.graph.container,
+                                                               mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                                               this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+                                               this.graph.isMouseDown = true;
+                                               mxEvent.consume(evt);
+                                       })
+                               );
+
+                               this.graph.container.appendChild(this.connectorImg);
+                       }
+
+                       this.redrawTools();
+               };
+               
+               var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
+               mxVertexHandler.prototype.redraw = function()
+               {
+                       vertexHandlerRedraw.apply(this);
+                       this.redrawTools();
+               };
+               
+               mxVertexHandler.prototype.redrawTools = function()
+               {
+                       if (this.state != null && this.connectorImg != null)
+                       {
+                               // Top right for single-sizer
+                               if (mxVertexHandler.prototype.singleSizer)
+                               {
+                                       this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
+                                       this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
+                               }
+                               else
+                               {
+                                       this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 4/* - 2 padding*/) + 'px';
+                                       this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
+                               }
+                       }
+               };
+               
+               var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+               mxVertexHandler.prototype.destroy = function(sender, me)
+               {
+                       vertexHandlerDestroy.apply(this, arguments);
+
+                       if (this.connectorImg != null)
+                       {
+                               this.connectorImg.parentNode.removeChild(this.connectorImg);
+                               this.connectorImg = null;
+                       }
+               };
+               
+               // Pre-fetches touch connector
+               new Image().src = connectorSrc;
+       }
+       else
+       {
+               var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+               mxConnectionHandler.prototype.connectImage = img;
+
+               // Pre-fetches img
+               new Image().src = img.src;
+               
+               if (urlParams['connect'] == '2') // not touchStyle
+               {
+                       var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+                                       
+                       var vertexHandlerInit = mxVertexHandler.prototype.init;
+                       mxVertexHandler.prototype.init = function()
+                       {
+                               vertexHandlerInit.apply(this, arguments);
+       
+                               // Only show connector image on one cell and do not show on containers
+                               if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+                                       this.graph.isCellConnectable(this.state.cell) &&
+                                       !this.graph.isValidRoot(this.state.cell) &&
+                                       this.graph.getSelectionCount() == 1)
+                               {
+                                       // Workaround for event redirection via image tag in quirks and IE8
+                                       if (mxClient.IS_IE && !mxClient.IS_SVG)
+                                       {
+                                               this.connectorImg = document.createElement('div');
+                                               this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
+                                               this.connectorImg.style.backgroundPosition = 'center';
+                                               this.connectorImg.style.backgroundRepeat = 'no-repeat';
+                                               this.connectorImg.style.width = (img.width + 4) + 'px';
+                                               this.connectorImg.style.height = (img.height + 4) + 'px';
+                                               this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+                                       }
+                                       else
+                                       {
+                                               this.connectorImg = mxUtils.createImage(img.src);
+                                               this.connectorImg.style.width = img.width + 'px';
+                                               this.connectorImg.style.height = img.height + 'px';
+                                       }
+                                       
+                                       this.connectorImg.style.cursor = 'pointer';
+                                       this.connectorImg.style.position = 'absolute';
+                                       this.connectorImg.setAttribute('title', mxResources.get('connect'));
+                                       mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+                                       
+                                       // Adds 2px tolerance
+                                       this.connectorImg.style.padding = '2px';
+                                       
+                                       // Starts connecting on touch/mouse down
+                                       mxEvent.addListener(this.connectorImg, 'mousedown',
+                                               mxUtils.bind(this, function(evt)
+                                               {
+                                                       this.graph.panningHandler.hideMenu();
+                                                       var pt = mxUtils.convertPoint(this.graph.container,
+                                                                       mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+                                                       this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+                                                       this.graph.isMouseDown = true;
+                                                       mxEvent.consume(evt);
+                                               })
+                                       );
+       
+                                       this.graph.container.appendChild(this.connectorImg);
+                               }
+       
+                               this.redrawTools();
+                       };
+                       
+                       var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
+                       mxVertexHandler.prototype.redraw = function()
+                       {
+                               vertexHandlerRedraw.apply(this);
+                               this.redrawTools();
+                       };
+                       
+                       mxVertexHandler.prototype.redrawTools = function()
+                       {
+                               if (this.state != null && this.connectorImg != null)
+                               {
+                                       // Top right for single-sizer
+                                       if (mxVertexHandler.prototype.singleSizer)
+                                       {
+                                               this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
+                                               this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
+                                       }
+                                       else
+                                       {
+                                               this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 2/* - 2 padding*/) + 'px';
+                                               this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
+                                       }
+                               }
+                       };
+                       
+                       var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+                       mxVertexHandler.prototype.destroy = function(sender, me)
+                       {
+                               vertexHandlerDestroy.apply(this, arguments);
+       
+                               if (this.connectorImg != null)
+                               {
+                                       this.connectorImg.parentNode.removeChild(this.connectorImg);
+                                       this.connectorImg = null;
+                               }
+                       };
+               }
+       }
+})();
index d4a2395..8ef4252 100644 (file)
@@ -1 +1,716 @@
-var _0xbb90=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x6D\x65\x6E\x75\x73","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x56\x65\x72\x64\x61\x6E\x61","\x54\x69\x6D\x65\x73\x20\x4E\x65\x77\x20\x52\x6F\x6D\x61\x6E","\x47\x61\x72\x61\x6D\x6F\x6E\x64","\x43\x6F\x6D\x69\x63\x20\x53\x61\x6E\x73\x20\x4D\x53","\x43\x6F\x75\x72\x69\x65\x72\x20\x4E\x65\x77","\x47\x65\x6F\x72\x67\x69\x61","\x4C\x75\x63\x69\x64\x61\x20\x43\x6F\x6E\x73\x6F\x6C\x65","\x54\x61\x68\x6F\x6D\x61","\x6C\x65\x6E\x67\x74\x68","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x73\x74\x79\x6C\x65\x43\x68\x61\x6E\x67\x65","\x73\x74\x79\x6C\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74","","\x70\x72\x6F\x6D\x70\x74\x43\x68\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x70\x75\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x28\x70\x74\x29","\x31\x32","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x70\x78","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x28\x70\x78\x29","\x31","\x6C\x69\x6E\x65","\x73\x74\x72\x61\x69\x67\x68\x74","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6D\x61\x6E\x75\x61\x6C","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x6D\x61\x74\x69\x63","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x63\x6C\x61\x73\x73\x69\x63","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x6F\x70\x65\x6E\x41\x72\x72\x6F\x77","\x41\x52\x52\x4F\x57\x5F\x4F\x50\x45\x4E","\x62\x6C\x6F\x63\x6B","\x41\x52\x52\x4F\x57\x5F\x42\x4C\x4F\x43\x4B","\x6F\x76\x61\x6C","\x41\x52\x52\x4F\x57\x5F\x4F\x56\x41\x4C","\x64\x69\x61\x6D\x6F\x6E\x64","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44\x5F\x54\x48\x49\x4E","\x6E\x6F\x6E\x65","\x4E\x4F\x4E\x45","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x65\x6E\x64\x46\x69\x6C\x6C","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x61\x64\x64\x49\x74\x65\x6D","\x73\x69\x7A\x65","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x73\x70\x61\x63\x69\x6E\x67","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x68\x61\x64\x6F\x77","\x61\x63\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x74\x6F\x70","\x30","\x72\x69\x67\x68\x74","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x67\x6C\x6F\x62\x61\x6C","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x74\x65\x78\x74","\x61\x64\x64\x53\x75\x62\x6D\x65\x6E\x75","\x2D","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D\x73","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x77\x6F\x72\x64\x57\x72\x61\x70","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x28\x25\x29","\x31\x30\x30","\x68\x69\x64\x65","\x6C\x65\x66\x74\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x63\x65\x6E\x74\x65\x72","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x72\x69\x67\x68\x74\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x74\x6F\x70\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x6D\x69\x64\x64\x6C\x65","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x62\x6F\x74\x74\x6F\x6D\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x74\x69\x6C\x74","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x6C\x69\x67\x6E","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x46\x6C\x6F\x77","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x61\x72\x72\x61\x6E\x67\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x76\x69\x65\x77","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x25","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x66\x69\x74\x50\x61\x67\x65","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x66\x69\x6C\x65","\x6E\x65\x77","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x41\x73","\x70\x75\x62\x6C\x69\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x65\x64\x69\x74\x46\x69\x6C\x65","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x65\x64\x69\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x75\x74","\x63\x6F\x70\x79","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x68\x65\x6C\x70","\x61\x62\x6F\x75\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x65\x78\x65\x63\x75\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x20","\x70\x72\x6F\x6D\x70\x74","\x6C\x61\x62\x65\x6C","\x66\x75\x6E\x63\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x6D\x61\x72\x6B","\x61\x64\x64\x53\x68\x6F\x72\x74\x63\x75\x74","\x73\x68\x6F\x72\x74\x63\x75\x74","\x73\x70\x61\x6E","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x79","\x77\x72\x69\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x32\x70\x78\x20\x35\x30\x25","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x69\x73\x45\x64\x67\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x62\x65\x6E\x64\x73","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x69\x76","\x20\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x4D\x65\x6E\x75","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x61\x70\x70\x6C\x79","\x64\x65\x73\x74\x72\x6F\x79","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6C\x69\x63\x6B","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74"];Menus=function(_0x4b6ex1){this[_0xbb90[0]]=_0x4b6ex1;this[_0xbb90[1]]= new Object();this[_0xbb90[2]](); new Image()[_0xbb90[3]]=IMAGE_PATH+_0xbb90[4]};Menus[_0xbb90[5]][_0xbb90[2]]=function(){var _0x4b6ex2=this[_0xbb90[0]][_0xbb90[7]][_0xbb90[6]];this[_0xbb90[30]](_0xbb90[8], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){var _0x4b6ex5=[_0xbb90[9],_0xbb90[10],_0xbb90[11],_0xbb90[12],_0xbb90[13],_0xbb90[14],_0xbb90[15],_0xbb90[16],_0xbb90[17]];for(var _0x4b6ex6=0;_0x4b6ex6<_0x4b6ex5[_0xbb90[18]];_0x4b6ex6++){var _0x4b6ex7=this[_0xbb90[20]](_0x4b6ex3,_0x4b6ex5[_0x4b6ex6],[mxConstants[_0xbb90[19]]],[_0x4b6ex5[_0x4b6ex6]],null,_0x4b6ex4);_0x4b6ex7[_0xbb90[23]][_0xbb90[22]][_0xbb90[21]][_0xbb90[8]]=_0x4b6ex5[_0x4b6ex6]};_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[25]),_0xbb90[27],mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[31], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){var _0x4b6ex8=[6,8,9,10,11,12,14,18,24,36,48,72];for(var _0x4b6ex6=0;_0x4b6ex6<_0x4b6ex8[_0xbb90[18]];_0x4b6ex6++){this[_0xbb90[20]](_0x4b6ex3,_0x4b6ex8[_0x4b6ex6],[mxConstants[_0xbb90[32]]],[_0x4b6ex8[_0x4b6ex6]],null,_0x4b6ex4)};_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[25]),_0xbb90[33],_0xbb90[34],mxConstants.STYLE_FONTSIZE,_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[35], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){var _0x4b6ex8=[1,2,3,4,8,12,16,24];for(var _0x4b6ex6=0;_0x4b6ex6<_0x4b6ex8[_0xbb90[18]];_0x4b6ex6++){this[_0xbb90[20]](_0x4b6ex3,_0x4b6ex8[_0x4b6ex6]+_0xbb90[36],[mxConstants[_0xbb90[37]]],[_0x4b6ex8[_0x4b6ex6]],null,_0x4b6ex4)};_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[25]),_0xbb90[38],_0xbb90[39],mxConstants.STYLE_STROKEWIDTH,_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[40], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[41]),[mxConstants[_0xbb90[42]]],[null],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[43]),[mxConstants[_0xbb90[42]]],[_0xbb90[44]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[45]),[mxConstants[_0xbb90[42]],mxConstants[_0xbb90[46]]],[_0xbb90[47],_0xbb90[45]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[48]),[mxConstants[_0xbb90[42]],mxConstants[_0xbb90[46]]],[_0xbb90[47],_0xbb90[48]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[49]),[mxConstants[_0xbb90[42]]],[_0xbb90[50]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[51]),[mxConstants[_0xbb90[42]]],[_0xbb90[52]],null,_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[53], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[54]),[mxConstants[_0xbb90[55]]],[mxConstants[_0xbb90[56]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[57]),[mxConstants[_0xbb90[55]]],[mxConstants[_0xbb90[58]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[59]),[mxConstants[_0xbb90[55]]],[mxConstants[_0xbb90[60]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[61]),[mxConstants[_0xbb90[55]]],[mxConstants[_0xbb90[62]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[63]),[mxConstants[_0xbb90[55]]],[mxConstants[_0xbb90[64]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[65]),[mxConstants[_0xbb90[55]]],[mxConstants[_0xbb90[66]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[67]),[mxConstants[_0xbb90[55]]],[mxConstants[_0xbb90[68]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[69]),null,function(){_0x4b6ex2[_0xbb90[71]](_0xbb90[70],true)},_0x4b6ex4,null,true);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[73]),_0xbb90[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[74], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[54]),[mxConstants[_0xbb90[75]]],[mxConstants[_0xbb90[56]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[57]),[mxConstants[_0xbb90[75]]],[mxConstants[_0xbb90[58]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[59]),[mxConstants[_0xbb90[75]]],[mxConstants[_0xbb90[60]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[61]),[mxConstants[_0xbb90[75]]],[mxConstants[_0xbb90[62]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[63]),[mxConstants[_0xbb90[75]]],[mxConstants[_0xbb90[64]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[65]),[mxConstants[_0xbb90[75]]],[mxConstants[_0xbb90[66]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[67]),[mxConstants[_0xbb90[75]]],[mxConstants[_0xbb90[68]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[69]),null,function(){_0x4b6ex2[_0xbb90[71]](_0xbb90[76],true)},_0x4b6ex4,null,true);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[73]),_0xbb90[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[77], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){var _0x4b6ex9=this[_0xbb90[0]][_0xbb90[80]][_0xbb90[26]](_0xbb90[79])[_0xbb90[78]];var _0x4b6exa=this[_0xbb90[26]](_0xbb90[40])[_0xbb90[78]];if(_0x4b6ex9||_0x4b6ex3[_0xbb90[81]]){this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[82]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_SPACING_TOP,_0x4b6ex4,_0x4b6ex9);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[84]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_SPACING_RIGHT,_0x4b6ex4,_0x4b6ex9);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[85]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_SPACING_BOTTOM,_0x4b6ex4,_0x4b6ex9);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[86]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_SPACING_LEFT,_0x4b6ex4,_0x4b6ex9);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[87]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_SPACING,_0x4b6ex4,_0x4b6ex9);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[88]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_PERIMETER_SPACING,_0x4b6ex4,_0x4b6ex9)};if(_0x4b6exa||_0x4b6ex3[_0xbb90[81]]){_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[89]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_SOURCE_PERIMETER_SPACING,_0x4b6ex4,_0x4b6exa);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[90]),_0xbb90[38],_0xbb90[83],mxConstants.STYLE_TARGET_PERIMETER_SPACING,_0x4b6ex4,_0x4b6exa)}})));this[_0xbb90[30]](_0xbb90[91], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[92]](_0x4b6ex3,_0xbb90[21],_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[93], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){var _0x4b6exb=this[_0xbb90[26]](_0xbb90[93])[_0xbb90[78]];_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[94]](_0xbb90[8],_0x4b6ex3,_0x4b6ex4);this[_0xbb90[94]](_0xbb90[31],_0x4b6ex3,_0x4b6ex4);this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[95],_0xbb90[96],_0xbb90[97],_0xbb90[98],_0xbb90[95]],_0x4b6ex4);this[_0xbb90[94]](_0xbb90[100],_0x4b6ex3,_0x4b6ex4);this[_0xbb90[92]](_0x4b6ex3,_0xbb90[101],_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[28]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[102]),_0xbb90[103],_0xbb90[104],mxConstants.STYLE_TEXT_OPACITY,_0x4b6ex4,_0x4b6exb);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[105]),null,function(){_0x4b6ex2[_0xbb90[71]](mxConstants.STYLE_NOLABEL,false)},_0x4b6ex4,null,_0x4b6exb)})));this[_0xbb90[30]](_0xbb90[100], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[106]),[mxConstants[_0xbb90[107]]],[mxConstants[_0xbb90[108]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[109]),[mxConstants[_0xbb90[107]]],[mxConstants[_0xbb90[110]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[111]),[mxConstants[_0xbb90[107]]],[mxConstants[_0xbb90[112]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[113]),[mxConstants[_0xbb90[114]]],[mxConstants[_0xbb90[115]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[116]),[mxConstants[_0xbb90[114]]],[mxConstants[_0xbb90[117]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[118]),[mxConstants[_0xbb90[114]]],[mxConstants[_0xbb90[119]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[94]](_0xbb90[120],_0x4b6ex3,_0x4b6ex4);this[_0xbb90[94]](_0xbb90[77],_0x4b6ex3,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);var _0x4b6exb=this[_0xbb90[26]](_0xbb90[93])[_0xbb90[78]];_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[48]),null,function(){_0x4b6ex2[_0xbb90[71]](mxConstants.STYLE_HORIZONTAL,true)},_0x4b6ex4,null,_0x4b6exb)})));this[_0xbb90[30]](_0xbb90[120], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[86]),[mxConstants[_0xbb90[121]],mxConstants[_0xbb90[107]]],[mxConstants[_0xbb90[108]],mxConstants[_0xbb90[112]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[109]),[mxConstants[_0xbb90[121]],mxConstants[_0xbb90[107]]],[mxConstants[_0xbb90[110]],mxConstants[_0xbb90[110]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[84]),[mxConstants[_0xbb90[121]],mxConstants[_0xbb90[107]]],[mxConstants[_0xbb90[112]],mxConstants[_0xbb90[108]]],null,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[82]),[mxConstants[_0xbb90[122]],mxConstants[_0xbb90[114]]],[mxConstants[_0xbb90[115]],mxConstants[_0xbb90[119]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[116]),[mxConstants[_0xbb90[122]],mxConstants[_0xbb90[114]]],[mxConstants[_0xbb90[117]],mxConstants[_0xbb90[117]]],null,_0x4b6ex4);this[_0xbb90[20]](_0x4b6ex3,mxResources[_0xbb90[26]](_0xbb90[85]),[mxConstants[_0xbb90[122]],mxConstants[_0xbb90[114]]],[mxConstants[_0xbb90[119]],mxConstants[_0xbb90[115]]],null,_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[123], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[124]),null,function(){_0x4b6ex2[_0xbb90[71]](mxConstants.STYLE_FLIPH,false)},_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[125]),null,function(){_0x4b6ex2[_0xbb90[71]](mxConstants.STYLE_FLIPV,false)},_0x4b6ex4);this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[95],_0xbb90[126],_0xbb90[127]],_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[128], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[106]),null,function(){_0x4b6ex2[_0xbb90[129]](mxConstants.ALIGN_LEFT)},_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[109]),null,function(){_0x4b6ex2[_0xbb90[129]](mxConstants.ALIGN_CENTER)},_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[111]),null,function(){_0x4b6ex2[_0xbb90[129]](mxConstants.ALIGN_RIGHT)},_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[113]),null,function(){_0x4b6ex2[_0xbb90[129]](mxConstants.ALIGN_TOP)},_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[116]),null,function(){_0x4b6ex2[_0xbb90[129]](mxConstants.ALIGN_MIDDLE)},_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[118]),null,function(){_0x4b6ex2[_0xbb90[129]](mxConstants.ALIGN_BOTTOM)},_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[130], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[131]),null,mxUtils[_0xbb90[29]](this,function(){var _0x4b6exc= new mxHierarchicalLayout(_0x4b6ex2,mxConstants.DIRECTION_WEST);this[_0xbb90[0]][_0xbb90[132]](_0x4b6exc,true,true)}),_0x4b6ex4);_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0xbb90[133]),null,mxUtils[_0xbb90[29]](this,function(){var _0x4b6exc= new mxHierarchicalLayout(_0x4b6ex2,mxConstants.DIRECTION_NORTH);this[_0xbb90[0]][_0xbb90[132]](_0x4b6exc,true,true)}),_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[134], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[135],_0xbb90[95],_0xbb90[136],_0xbb90[137],_0xbb90[95],_0xbb90[138],_0xbb90[139]],_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[140], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[141],_0xbb90[142],_0xbb90[95]],_0x4b6ex4);this[_0xbb90[94]](_0xbb90[130],_0x4b6ex3,_0x4b6ex4);_0x4b6ex3[_0xbb90[24]](_0x4b6ex4);this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[95],_0xbb90[143],_0xbb90[144],_0xbb90[145]],_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[146], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[147]],_0x4b6ex4);_0x4b6ex3[_0xbb90[24]]();var _0x4b6exd=[0.25,0.5,0.75,1,2,4];for(var _0x4b6ex6=0;_0x4b6ex6<_0x4b6exd[_0xbb90[18]];_0x4b6ex6++){(function(_0x4b6exe){_0x4b6ex3[_0xbb90[72]]((_0x4b6exe*100)+_0xbb90[148],null,function(){_0x4b6ex2[_0xbb90[149]](_0x4b6exe)},_0x4b6ex4)})(_0x4b6exd[_0x4b6ex6])};this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[95],_0xbb90[150],_0xbb90[151],_0xbb90[95],_0xbb90[152],_0xbb90[153],_0xbb90[95],_0xbb90[154],_0xbb90[155]],_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[156], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[157],_0xbb90[158],_0xbb90[95],_0xbb90[159],_0xbb90[160],_0xbb90[161],_0xbb90[95],_0xbb90[162],_0xbb90[95],_0xbb90[163],_0xbb90[164],_0xbb90[95],_0xbb90[165],_0xbb90[166],_0xbb90[95],_0xbb90[167]],_0x4b6ex4)})));this[_0xbb90[30]](_0xbb90[168], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[169],_0xbb90[170],_0xbb90[95],_0xbb90[171],_0xbb90[172],_0xbb90[173],_0xbb90[174],_0xbb90[95],_0xbb90[175],_0xbb90[95],_0xbb90[176],_0xbb90[177],_0xbb90[178]])})));this[_0xbb90[30]](_0xbb90[179], new Menu(mxUtils[_0xbb90[29]](this,function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[179],_0xbb90[95],_0xbb90[180]])})))};Menus[_0xbb90[5]][_0xbb90[30]]=function(_0x4b6exf,_0x4b6ex3){this[_0xbb90[1]][_0x4b6exf]=_0x4b6ex3};Menus[_0xbb90[5]][_0xbb90[26]]=function(_0x4b6exf){return this[_0xbb90[1]][_0x4b6exf]};Menus[_0xbb90[5]][_0xbb90[94]]=function(_0x4b6exf,_0x4b6ex3,_0x4b6ex4){var _0x4b6exb=this[_0xbb90[26]](_0x4b6exf)[_0xbb90[78]];if(_0x4b6ex3[_0xbb90[81]]||_0x4b6exb){var _0x4b6ex10=_0x4b6ex3[_0xbb90[72]](mxResources[_0xbb90[26]](_0x4b6exf),null,null,_0x4b6ex4,null,_0x4b6exb);this[_0xbb90[181]](_0x4b6exf,_0x4b6ex3,_0x4b6ex10)}};Menus[_0xbb90[5]][_0xbb90[181]]=function(_0x4b6exf,_0x4b6ex11,_0x4b6ex4){var _0x4b6ex3=this[_0xbb90[26]](_0x4b6exf);if(_0x4b6ex3!=null&&(_0x4b6ex11[_0xbb90[81]]||_0x4b6ex3[_0xbb90[78]])){this[_0xbb90[26]](_0x4b6exf)[_0xbb90[182]](_0x4b6ex11,_0x4b6ex4)}};Menus[_0xbb90[5]][_0xbb90[20]]=function(_0x4b6ex3,_0x4b6ex12,_0x4b6ex13,_0x4b6ex14,_0x4b6ex15,_0x4b6ex4){return _0x4b6ex3[_0xbb90[72]](_0x4b6ex12,null,mxUtils[_0xbb90[29]](this,function(){var _0x4b6ex2=this[_0xbb90[0]][_0xbb90[7]][_0xbb90[6]];_0x4b6ex2[_0xbb90[184]]()[_0xbb90[183]]();try{for(var _0x4b6ex6=0;_0x4b6ex6<_0x4b6ex13[_0xbb90[18]];_0x4b6ex6++){_0x4b6ex2[_0xbb90[185]](_0x4b6ex13[_0x4b6ex6],_0x4b6ex14[_0x4b6ex6])}}finally{_0x4b6ex2[_0xbb90[184]]()[_0xbb90[186]]()}}),_0x4b6ex4,_0x4b6ex15)};Menus[_0xbb90[5]][_0xbb90[28]]=function(_0x4b6ex3,_0x4b6ex12,_0x4b6ex16,_0x4b6ex17,_0x4b6ex18,_0x4b6ex4,_0x4b6exb){return _0x4b6ex3[_0xbb90[72]](_0x4b6ex12,null,mxUtils[_0xbb90[29]](this,function(){var _0x4b6ex2=this[_0xbb90[0]][_0xbb90[7]][_0xbb90[6]];var _0x4b6ex19=_0x4b6ex17;var _0x4b6ex1a=_0x4b6ex2[_0xbb90[189]]()[_0xbb90[188]](_0x4b6ex2[_0xbb90[187]]());if(_0x4b6ex1a!=null){_0x4b6ex19=_0x4b6ex1a[_0xbb90[21]][_0x4b6ex18]||_0x4b6ex19};_0x4b6ex19=mxUtils[_0xbb90[192]](mxResources[_0xbb90[26]](_0xbb90[190])+((_0x4b6ex16[_0xbb90[18]]>0)?(_0xbb90[191]+_0x4b6ex16):_0xbb90[27]),_0x4b6ex19);if(_0x4b6ex19!=null&&_0x4b6ex19[_0xbb90[18]]>0){_0x4b6ex2[_0xbb90[185]](_0x4b6ex18,_0x4b6ex19)}}),_0x4b6ex4,null,_0x4b6exb)};Menus[_0xbb90[5]][_0xbb90[92]]=function(_0x4b6ex3,_0x4b6ex18,_0x4b6ex4){var _0x4b6ex1b=this[_0xbb90[0]][_0xbb90[80]][_0xbb90[26]](_0x4b6ex18);if(_0x4b6ex1b!=null&&(_0x4b6ex3[_0xbb90[81]]||_0x4b6ex1b[_0xbb90[78]])){var _0x4b6ex1c=_0x4b6ex3[_0xbb90[72]](_0x4b6ex1b[_0xbb90[193]],null,_0x4b6ex1b[_0xbb90[194]],_0x4b6ex4,null,_0x4b6ex1b[_0xbb90[78]]);if(_0x4b6ex1b[_0xbb90[195]]&&_0x4b6ex1b[_0xbb90[196]]()){this[_0xbb90[197]](_0x4b6ex1c)};this[_0xbb90[198]](_0x4b6ex1c,_0x4b6ex1b);return _0x4b6ex1c};return null};Menus[_0xbb90[5]][_0xbb90[198]]=function(_0x4b6ex1c,_0x4b6ex1b){if(_0x4b6ex1b[_0xbb90[199]]!=null){var _0x4b6ex1d=_0x4b6ex1c[_0xbb90[23]][_0xbb90[22]][_0xbb90[22]];var _0x4b6ex1e=document[_0xbb90[201]](_0xbb90[200]);_0x4b6ex1e[_0xbb90[21]][_0xbb90[202]]=_0xbb90[203];mxUtils[_0xbb90[204]](_0x4b6ex1e,_0x4b6ex1b[_0xbb90[199]]);_0x4b6ex1d[_0xbb90[205]](_0x4b6ex1e)}};Menus[_0xbb90[5]][_0xbb90[197]]=function(_0x4b6ex1c){var _0x4b6ex1d=_0x4b6ex1c[_0xbb90[23]][_0xbb90[22]];_0x4b6ex1d[_0xbb90[21]][_0xbb90[206]]=_0xbb90[207]+IMAGE_PATH+_0xbb90[208];_0x4b6ex1d[_0xbb90[21]][_0xbb90[209]]=_0xbb90[210];_0x4b6ex1d[_0xbb90[21]][_0xbb90[211]]=_0xbb90[212]};Menus[_0xbb90[5]][_0xbb90[99]]=function(_0x4b6ex3,_0x4b6ex13,_0x4b6ex4){for(var _0x4b6ex6=0;_0x4b6ex6<_0x4b6ex13[_0xbb90[18]];_0x4b6ex6++){if(_0x4b6ex13[_0x4b6ex6]==_0xbb90[95]){_0x4b6ex3[_0xbb90[24]](_0x4b6ex4)}else {this[_0xbb90[92]](_0x4b6ex3,_0x4b6ex13[_0x4b6ex6],_0x4b6ex4)}}};Menus[_0xbb90[5]][_0xbb90[213]]=function(_0x4b6ex3,_0x4b6ex1f,_0x4b6ex20){var _0x4b6ex2=this[_0xbb90[0]][_0xbb90[7]][_0xbb90[6]];_0x4b6ex3[_0xbb90[214]]=true;if(_0x4b6ex2[_0xbb90[215]]()){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[169],_0xbb90[170],_0xbb90[95],_0xbb90[173],_0xbb90[95]])}else {this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[174],_0xbb90[95],_0xbb90[171],_0xbb90[172],_0xbb90[95],_0xbb90[175]]);if(_0x4b6ex2[_0xbb90[216]]()==1&&_0x4b6ex2[_0xbb90[184]]()[_0xbb90[217]](_0x4b6ex2[_0xbb90[187]]())){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[218]])};_0x4b6ex3[_0xbb90[24]]()};if(_0x4b6ex2[_0xbb90[216]]()>0){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[141],_0xbb90[142],_0xbb90[95]]);if(_0x4b6ex2[_0xbb90[184]]()[_0xbb90[217]](_0x4b6ex2[_0xbb90[187]]())){var _0x4b6ex21=false;var _0x4b6ex1f=_0x4b6ex2[_0xbb90[187]]();if(_0x4b6ex1f!=null&&_0x4b6ex2[_0xbb90[184]]()[_0xbb90[217]](_0x4b6ex1f)){var _0x4b6ex22=_0x4b6ex2[_0xbb90[220]][_0xbb90[219]](_0x4b6ex1f);if(_0x4b6ex22 instanceof mxEdgeHandler&&_0x4b6ex22[_0xbb90[221]]!=null&&_0x4b6ex22[_0xbb90[221]][_0xbb90[18]]>2){var _0x4b6ex23=_0x4b6ex22[_0xbb90[222]]( new mxMouseEvent(_0x4b6ex20));var _0x4b6ex24=this[_0xbb90[0]][_0xbb90[80]][_0xbb90[26]](_0xbb90[223]);_0x4b6ex24[_0xbb90[224]]=_0x4b6ex22;_0x4b6ex24[_0xbb90[225]]=_0x4b6ex23;_0x4b6ex21=_0x4b6ex23>0&&_0x4b6ex23<_0x4b6ex22[_0xbb90[221]][_0xbb90[18]]}};this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[95],(_0x4b6ex21)?_0xbb90[223]:_0xbb90[226]])}else {if(_0x4b6ex2[_0xbb90[216]]()>1){_0x4b6ex3[_0xbb90[24]]();this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[143]])}};_0x4b6ex3[_0xbb90[24]]();if(_0x4b6ex2[_0xbb90[216]]()==1){var _0x4b6ex25=_0x4b6ex2[_0xbb90[227]](_0x4b6ex2[_0xbb90[187]]());if(_0x4b6ex25!=null){this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[228]])}}}else {this[_0xbb90[99]](_0x4b6ex3,[_0xbb90[95],_0xbb90[176],_0xbb90[177],_0xbb90[95],_0xbb90[178]])}};Menus[_0xbb90[5]][_0xbb90[229]]=function(_0x4b6ex26){var _0x4b6ex27= new Menubar(this[_0xbb90[0]],_0x4b6ex26);var _0x4b6ex28=[_0xbb90[156],_0xbb90[168],_0xbb90[146],_0xbb90[91],_0xbb90[93],_0xbb90[140],_0xbb90[179]];for(var _0x4b6ex6=0;_0x4b6ex6<_0x4b6ex28[_0xbb90[18]];_0x4b6ex6++){_0x4b6ex27[_0xbb90[181]](mxResources[_0xbb90[26]](_0x4b6ex28[_0x4b6ex6]),this[_0xbb90[26]](_0x4b6ex28[_0x4b6ex6])[_0xbb90[194]])};return _0x4b6ex27};function Menubar(_0x4b6ex1,_0x4b6ex26){this[_0xbb90[0]]=_0x4b6ex1;this[_0xbb90[230]]=_0x4b6ex26;mxEvent[_0xbb90[232]](document,mxUtils[_0xbb90[29]](this,function(_0x4b6ex20){this[_0xbb90[231]]()}))}Menubar[_0xbb90[5]][_0xbb90[231]]=function(){if(this[_0xbb90[233]]!=null){this[_0xbb90[233]][_0xbb90[231]]()}};Menubar[_0xbb90[5]][_0xbb90[181]]=function(_0x4b6ex12,_0x4b6ex2a){var _0x4b6ex2b=document[_0xbb90[201]](_0xbb90[234]);_0x4b6ex2b[_0xbb90[237]](_0xbb90[235],_0xbb90[236]);_0x4b6ex2b[_0xbb90[238]]=_0xbb90[239];mxUtils[_0xbb90[204]](_0x4b6ex2b,_0x4b6ex12);this[_0xbb90[240]](_0x4b6ex2b,_0x4b6ex2a);this[_0xbb90[230]][_0xbb90[205]](_0x4b6ex2b);return _0x4b6ex2b};Menubar[_0xbb90[5]][_0xbb90[240]]=function(_0x4b6ex2b,_0x4b6ex2a){if(_0x4b6ex2a!=null){var _0x4b6ex2c=true;var _0x4b6ex2d=mxUtils[_0xbb90[29]](this,function(_0x4b6ex20){if(_0x4b6ex2c&&_0x4b6ex2b[_0xbb90[78]]==null||_0x4b6ex2b[_0xbb90[78]]){this[_0xbb90[0]][_0xbb90[7]][_0xbb90[6]][_0xbb90[241]][_0xbb90[231]]();var _0x4b6ex3= new mxPopupMenu(_0x4b6ex2a);_0x4b6ex3[_0xbb90[242]][_0xbb90[238]]+=_0xbb90[243];_0x4b6ex3[_0xbb90[214]]=true;_0x4b6ex3[_0xbb90[81]]=true;_0x4b6ex3[_0xbb90[244]]=true;_0x4b6ex3[_0xbb90[231]]=mxUtils[_0xbb90[29]](this,function(){mxPopupMenu[_0xbb90[5]][_0xbb90[231]][_0xbb90[245]](_0x4b6ex3,arguments);_0x4b6ex3[_0xbb90[246]]();this[_0xbb90[233]]=null;this[_0xbb90[247]]=null});var _0x4b6ex2e=_0x4b6ex2b[_0xbb90[248]]+document[_0xbb90[251]](_0xbb90[250])[_0xbb90[249]]+22;var _0x4b6ex2f=_0x4b6ex2b[_0xbb90[252]]+_0x4b6ex2b[_0xbb90[253]]+140;_0x4b6ex3[_0xbb90[254]](_0x4b6ex2e,_0x4b6ex2f,null,_0x4b6ex20);this[_0xbb90[233]]=_0x4b6ex3;this[_0xbb90[247]]=_0x4b6ex2b};_0x4b6ex2c=true;mxEvent[_0xbb90[255]](_0x4b6ex20)});mxEvent[_0xbb90[257]](_0x4b6ex2b,_0xbb90[256],mxUtils[_0xbb90[29]](this,function(_0x4b6ex20){if(this[_0xbb90[233]]!=null&&this[_0xbb90[247]]!=_0x4b6ex2b){this[_0xbb90[231]]();_0x4b6ex2d(_0x4b6ex20)}}));mxEvent[_0xbb90[257]](_0x4b6ex2b,_0xbb90[258],mxUtils[_0xbb90[29]](this,function(){_0x4b6ex2c=this[_0xbb90[247]]!=_0x4b6ex2b}));mxEvent[_0xbb90[257]](_0x4b6ex2b,_0xbb90[259],_0x4b6ex2d)}};function Menu(_0x4b6ex2a,_0x4b6exb){mxEventSource[_0xbb90[260]](this);this[_0xbb90[194]]=_0x4b6ex2a;this[_0xbb90[78]]=(_0x4b6exb!=null)?_0x4b6exb:true}mxUtils[_0xbb90[261]](Menu,mxEventSource);Menu[_0xbb90[5]][_0xbb90[262]]=function(_0x4b6ex19){if(this[_0xbb90[78]]!=_0x4b6ex19){this[_0xbb90[78]]=_0x4b6ex19;this[_0xbb90[264]]( new mxEventObject(_0xbb90[263]))}};Menu[_0xbb90[5]][_0xbb90[182]]=function(_0x4b6ex3,_0x4b6ex4){this[_0xbb90[194]](_0x4b6ex3,_0x4b6ex4)}
\ No newline at end of file
+/**
+ * $Id: Menus.js,v 1.13 2013-02-20 16:21:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+Menus = function(editorUi) {
+       this.editorUi = editorUi;
+       this.menus = new Object();
+       this.init();
+
+       // Pre-fetches checkmark image
+       new Image().src = IMAGE_PATH + '/checkmark.gif';
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.init = function() {
+       var graph = this.editorUi.editor.graph;
+
+       this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var fonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond',
+                       'Comic Sans MS',
+                       'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'
+               ];
+
+               for (var i = 0; i < fonts.length; i++) {
+                       var tr = this.styleChange(menu, fonts[i], [mxConstants.STYLE_FONTFAMILY], [
+                               fonts[i]
+                       ], null, parent);
+                       tr.firstChild.nextSibling.style.fontFamily = fonts[i];
+               }
+
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY,
+                       mxConstants.STYLE_FONTFAMILY, parent);
+       })));
+       this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
+
+               for (var i = 0; i < sizes.length; i++) {
+                       this.styleChange(menu, sizes[i], [mxConstants.STYLE_FONTSIZE], [sizes[i]],
+                               null, parent);
+               }
+
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('custom'), '(pt)', '12',
+                       mxConstants.STYLE_FONTSIZE, parent);
+       })));
+       this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
+
+               for (var i = 0; i < sizes.length; i++) {
+                       this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [
+                               sizes[i]
+                       ], null, parent);
+               }
+
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('custom'), '(px)', '1',
+                       mxConstants.STYLE_STROKEWIDTH, parent);
+       })));
+       this.put('line', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [
+                       null
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], [
+                       'entityRelationEdgeStyle'
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE,
+                       mxConstants.STYLE_ELBOW
+               ], ['elbowEdgeStyle', 'horizontal'], null, parent);
+               this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE,
+                       mxConstants.STYLE_ELBOW
+               ], ['elbowEdgeStyle', 'vertical'], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], [
+                       'segmentEdgeStyle'
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], [
+                       'orthogonalEdgeStyle'
+               ], null, parent);
+       })));
+       this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_CLASSIC
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_OPEN
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_BLOCK
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_OVAL
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_DIAMOND
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.ARROW_DIAMOND_THIN
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [
+                       mxConstants.NONE
+               ], null, parent);
+               menu.addSeparator(parent);
+               menu.addItem(mxResources.get('transparent'), null, function() {
+                       graph.toggleCellStyles('endFill', true);
+               }, parent, null, true);
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
+                       mxConstants.STYLE_ENDSIZE, parent);
+       })));
+       this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_CLASSIC
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_OPEN
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_BLOCK
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_OVAL
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_DIAMOND
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.ARROW_DIAMOND_THIN
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [
+                       mxConstants.NONE
+               ], null, parent);
+               menu.addSeparator(parent);
+               menu.addItem(mxResources.get('transparent'), null, function() {
+                       graph.toggleCellStyles('startFill', true);
+               }, parent, null, true);
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
+                       mxConstants.STYLE_STARTSIZE, parent);
+       })));
+       this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent) {
+               // Uses shadow action and line menu to analyze selection
+               var vertexSelected = this.editorUi.actions.get('shadow').enabled;
+               var edgeSelected = this.get('line').enabled;
+
+               if (vertexSelected || menu.showDisabled) {
+                       this.promptChange(menu, mxResources.get('top'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('right'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('bottom'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('left'), '(px)', '0',
+                               mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
+                       menu.addSeparator(parent);
+                       this.promptChange(menu, mxResources.get('global'), '(px)', '0',
+                               mxConstants.STYLE_SPACING, parent, vertexSelected);
+                       this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0',
+                               mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
+               }
+
+               if (edgeSelected || menu.showDisabled) {
+                       menu.addSeparator(parent);
+                       this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0',
+                               mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
+                       this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0',
+                               mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
+               }
+       })));
+       this.put('format', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItem(menu, 'style', parent);
+       })));
+       this.put('text', new Menu(mxUtils.bind(this, function(menu, parent) {
+               var enabled = this.get('text').enabled;
+               menu.addSeparator(parent);
+               this.addSubmenu('fontFamily', menu, parent);
+               this.addSubmenu('fontSize', menu, parent);
+               this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'],
+                       parent);
+               this.addSubmenu('alignment', menu, parent);
+               this.addMenuItem(menu, 'wordWrap', parent);
+               menu.addSeparator(parent);
+               this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100',
+                       mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
+               menu.addItem(mxResources.get('hide'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false);
+               }, parent, null, enabled);
+       })));
+       this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [
+                       mxConstants.ALIGN_LEFT
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [
+                       mxConstants.ALIGN_CENTER
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [
+                       mxConstants.ALIGN_RIGHT
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
+                       mxConstants.ALIGN_TOP
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [
+                       mxConstants.ALIGN_MIDDLE
+               ], null, parent);
+               this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
+                       mxConstants.ALIGN_BOTTOM
+               ], null, parent);
+               menu.addSeparator(parent);
+               this.addSubmenu('position', menu, parent);
+               this.addSubmenu('spacing', menu, parent);
+               menu.addSeparator(parent);
+               var enabled = this.get('text').enabled;
+               menu.addItem(mxResources.get('vertical'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
+               }, parent, null, enabled);
+       })));
+       this.put('position', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION,
+                       mxConstants.STYLE_ALIGN
+               ], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
+               this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION,
+                       mxConstants.STYLE_ALIGN
+               ], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
+               this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION,
+                       mxConstants.STYLE_ALIGN
+               ], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
+               menu.addSeparator(parent);
+               this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
+                       mxConstants.STYLE_VERTICAL_ALIGN
+               ], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
+               this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
+                       mxConstants.STYLE_VERTICAL_ALIGN
+               ], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
+               this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
+                       mxConstants.STYLE_VERTICAL_ALIGN
+               ], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
+       })));
+       this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent) {
+               menu.addItem(mxResources.get('flipH'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false);
+               }, parent);
+               menu.addItem(mxResources.get('flipV'), null, function() {
+                       graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false);
+               }, parent);
+               this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
+       })));
+       this.put('align', new Menu(mxUtils.bind(this, function(menu, parent) {
+               menu.addItem(mxResources.get('leftAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_LEFT);
+               }, parent);
+               menu.addItem(mxResources.get('center'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_CENTER);
+               }, parent);
+               menu.addItem(mxResources.get('rightAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_RIGHT);
+               }, parent);
+               menu.addSeparator(parent);
+               menu.addItem(mxResources.get('topAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_TOP);
+               }, parent);
+               menu.addItem(mxResources.get('middle'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_MIDDLE);
+               }, parent);
+               menu.addItem(mxResources.get('bottomAlign'), null, function() {
+                       graph.alignCells(mxConstants.ALIGN_BOTTOM);
+               }, parent);
+       })));
+       this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent) {
+               // menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
+               // {
+               //      if (!graph.isSelectionEmpty())
+               //      {
+               //              var layout = new mxCompactTreeLayout(graph, true);
+               //              layout.edgeRouting = false;
+               //              layout.levelDistance = 30;
+               //              this.editorUi.executeLayout(layout, true, true);
+               //      }
+               // }), parent);
+               // menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
+               // {
+               //      if (!graph.isSelectionEmpty())
+               //      {
+               //              var layout = new mxCompactTreeLayout(graph, false);
+               //              layout.edgeRouting = false;
+               //              layout.levelDistance = 30;
+               //              this.editorUi.executeLayout(layout, true, true);
+               //      }
+               // }), parent);
+               // menu.addSeparator(parent);
+               menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this,
+                       function() {
+                               var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
+                               this.editorUi.executeLayout(layout, true, true);
+                       }), parent);
+               menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this,
+                       function() {
+                               var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
+                               this.editorUi.executeLayout(layout, true, true);
+                       }), parent);
+               //menu.addSeparator(parent);
+               // menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
+               // {
+               //      var layout = new mxFastOrganicLayout(graph);
+               //              this.editorUi.executeLayout(layout, true, true);
+               // }), parent);
+               // menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
+               // {
+               //      var layout = new mxCircleLayout(graph);
+               //              this.editorUi.executeLayout(layout, true, true, graph.getSelectionCells());
+               // }), parent);
+       })));
+       this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-',
+                       'expand', 'collapse'
+               ], parent);
+       })));
+       this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
+               //this.addSubmenu('direction', menu, parent);
+               this.addSubmenu('layout', menu, parent);
+               //this.addSubmenu('align', menu, parent);
+               menu.addSeparator(parent);
+               //this.addSubmenu('navigation', menu, parent);
+               this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup'],
+                       parent);
+               //this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'autosize'], parent);
+       })));
+       this.put('view', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['actualSize'], parent);
+               menu.addSeparator();
+               var scales = [0.25, 0.5, 0.75, 1, 2, 4];
+
+               for (var i = 0; i < scales.length; i++) {
+                       (function(scale) {
+                               menu.addItem((scale * 100) + '%', null, function() {
+                                       graph.zoomTo(scale);
+                               }, parent);
+                       })(scales[i]);
+               }
+
+               this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow',
+                       'customZoom', '-', 'fitPage', 'fitPageWidth'
+               ], parent);
+       })));
+       this.put('file', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', 'publish',
+                       '-', 'variable', '-', 'import', 'export', '-', 'editFile', 'rename', '-',
+                       'print'
+               ], parent);
+       })));
+       this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste',
+                       'delete', '-', 'duplicate', '-',
+                       'selectVertices', 'selectEdges', 'selectAll'
+               ]);
+       })));
+       this.put('help', new Menu(mxUtils.bind(this, function(menu, parent) {
+               this.addMenuItems(menu, ['help', '-', 'about']);
+       })));
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.put = function(name, menu) {
+       this.menus[name] = menu;
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.get = function(name) {
+       return this.menus[name];
+};
+
+/**
+ * Adds the given submenu.
+ */
+Menus.prototype.addSubmenu = function(name, menu, parent) {
+       var enabled = this.get(name).enabled;
+
+       if (menu.showDisabled || enabled) {
+               var submenu = menu.addItem(mxResources.get(name), null, null, parent, null,
+                       enabled);
+               this.addMenu(name, menu, submenu);
+       }
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.addMenu = function(name, popupMenu, parent) {
+       var menu = this.get(name);
+
+       if (menu != null && (popupMenu.showDisabled || menu.enabled)) {
+               this.get(name).execute(popupMenu, parent);
+       }
+};
+
+/**
+ * Adds a style change item to the given menu.
+ */
+Menus.prototype.styleChange = function(menu, label, keys, values, sprite,
+       parent) {
+       return menu.addItem(label, null, mxUtils.bind(this, function() {
+               var graph = this.editorUi.editor.graph;
+
+               graph.getModel().beginUpdate();
+               try {
+                       for (var i = 0; i < keys.length; i++) {
+                               graph.setCellStyles(keys[i], values[i]);
+                       }
+               } finally {
+                       graph.getModel().endUpdate();
+               }
+       }), parent, sprite);
+};
+
+/**
+ * Adds a style change item with a prompt to the given menu.
+ */
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key,
+       parent, enabled) {
+       return menu.addItem(label, null, mxUtils.bind(this, function() {
+               var graph = this.editorUi.editor.graph;
+               var value = defaultValue;
+               var state = graph.getView().getState(graph.getSelectionCell());
+
+               if (state != null) {
+                       value = state.style[key] || value;
+               }
+
+               value = mxUtils.prompt(mxResources.get('enterValue') + ((hint.length > 0) ?
+                       (' ' + hint) : ''), value);
+
+               if (value != null && value.length > 0) {
+                       graph.setCellStyles(key, value);
+               }
+       }), parent, null, enabled);
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItem = function(menu, key, parent) {
+       var action = this.editorUi.actions.get(key);
+
+       if (action != null && (menu.showDisabled || action.enabled)) {
+               var item = menu.addItem(action.label, null, action.funct, parent, null,
+                       action.enabled);
+
+               // Adds checkmark image
+               if (action.toggleAction && action.isSelected()) {
+                       this.addCheckmark(item);
+               }
+
+               this.addShortcut(item, action);
+
+               return item;
+       }
+
+       return null;
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addShortcut = function(item, action) {
+       if (action.shortcut != null) {
+               var td = item.firstChild.nextSibling.nextSibling;
+               var span = document.createElement('span');
+               span.style.color = 'gray';
+               mxUtils.write(span, action.shortcut);
+               td.appendChild(span);
+       }
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addCheckmark = function(item) {
+       var td = item.firstChild.nextSibling;
+       td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
+       td.style.backgroundRepeat = 'no-repeat';
+       td.style.backgroundPosition = '2px 50%';
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItems = function(menu, keys, parent) {
+       for (var i = 0; i < keys.length; i++) {
+               if (keys[i] == '-') {
+                       menu.addSeparator(parent);
+               } else {
+                       this.addMenuItem(menu, keys[i], parent);
+               }
+       }
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createPopupMenu = function(menu, cell, evt) {
+       var graph = this.editorUi.editor.graph;
+       menu.smartSeparators = true;
+
+       if (graph.isSelectionEmpty()) {
+               this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);
+       } else {
+               this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);
+
+               if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell())) {
+                       this.addMenuItems(menu, ['setAsDefaultEdge']);
+               }
+
+               menu.addSeparator();
+       }
+
+       if (graph.getSelectionCount() > 0) {
+               this.addMenuItems(menu, ['toFront', 'toBack', '-']);
+
+               if (graph.getModel().isEdge(graph.getSelectionCell())) {
+                       var isWaypoint = false;
+                       var cell = graph.getSelectionCell();
+
+                       if (cell != null && graph.getModel().isEdge(cell)) {
+                               var handler = graph.selectionCellsHandler.getHandler(cell);
+
+                               if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends
+                                       .length > 2) {
+                                       var index = handler.getHandleForEvent(new mxMouseEvent(evt));
+
+                                       // Configures removeWaypoint action before execution
+                                       var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
+                                       rmWaypointAction.handler = handler;
+                                       rmWaypointAction.index = index;
+
+                                       isWaypoint = index > 0 && index < handler.bends.length;
+                               }
+                       }
+
+                       this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' :
+                               'addWaypoint'
+                       ]);
+               } else if (graph.getSelectionCount() > 1) {
+                       menu.addSeparator();
+                       this.addMenuItems(menu, ['group']);
+               }
+
+               menu.addSeparator();
+
+               if (graph.getSelectionCount() == 1) {
+                       var link = graph.getLinkForCell(graph.getSelectionCell());
+
+                       if (link != null) {
+                               this.addMenuItems(menu, ['openLink']);
+                       }
+               }
+       } else {
+               this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-',
+                       'selectAll'
+               ]);
+       }
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createMenubar = function(container) {
+       var menubar = new Menubar(this.editorUi, container);
+       var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange',
+               'help'
+       ];
+
+       for (var i = 0; i < menus.length; i++) {
+               menubar.addMenu(mxResources.get(menus[i]), this.get(menus[i]).funct);
+       }
+
+       return menubar;
+};
+
+/**
+ * Construcs a new menubar for the given editor.
+ */
+function Menubar(editorUi, container) {
+       this.editorUi = editorUi;
+       this.container = container;
+
+       // Global handler to hide the current menu
+       mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
+               this.hideMenu();
+       }));
+};
+
+/**
+ * Adds the menubar elements.
+ */
+Menubar.prototype.hideMenu = function() {
+       if (this.currentMenu != null) {
+               this.currentMenu.hideMenu();
+       }
+};
+
+/**
+ * Adds a submenu to this menubar.
+ */
+Menubar.prototype.addMenu = function(label, funct) {
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geItem';
+       mxUtils.write(elt, label);
+
+       this.addMenuHandler(elt, funct);
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menubar.prototype.addMenuHandler = function(elt, funct) {
+       if (funct != null) {
+               var show = true;
+
+               var clickHandler = mxUtils.bind(this, function(evt) {
+                       if (show && elt.enabled == null || elt.enabled) {
+                               this.editorUi.editor.graph.panningHandler.hideMenu();
+                               var menu = new mxPopupMenu(funct);
+                               menu.div.className += ' geMenubarMenu';
+                               menu.smartSeparators = true;
+                               menu.showDisabled = true;
+                               menu.autoExpand = true;
+
+                               // Disables autoexpand and destroys menu when hidden
+                               menu.hideMenu = mxUtils.bind(this, function() {
+                                       mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
+                                       menu.destroy();
+                                       this.currentMenu = null;
+                                       this.currentElt = null;
+                               });
+
+                               // Added width of the page-sidebar
+                               var x = elt.offsetLeft + document.getElementById('page-sidebar').offsetWidth +
+                                       22;
+                               // Added static height of the page-navbar
+                               var y = elt.offsetTop + elt.offsetHeight + 140;
+
+                               menu.popup(x, y, null, evt);
+
+                               //menu.popup(elt.offsetLeft + 4, elt.offsetTop + elt.offsetHeight + 4, null, evt);
+                               this.currentMenu = menu;
+                               this.currentElt = elt;
+                       }
+
+                       show = true;
+                       mxEvent.consume(evt);
+               });
+
+               // Shows menu automatically while in expanded state
+               mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
+                       if (this.currentMenu != null && this.currentElt != elt) {
+                               this.hideMenu();
+                               clickHandler(evt);
+                       }
+               }));
+
+               // Hides menu if already showing
+               mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function() {
+                       show = this.currentElt != elt;
+               }));
+
+               mxEvent.addListener(elt, 'click', clickHandler);
+       }
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Menu(funct, enabled) {
+       mxEventSource.call(this);
+       this.funct = funct;
+       this.enabled = (enabled != null) ? enabled : true;
+};
+
+// Menu inherits from mxEventSource
+mxUtils.extend(Menu, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.setEnabled = function(value) {
+       if (this.enabled != value) {
+               this.enabled = value;
+               this.fireEvent(new mxEventObject('stateChanged'));
+       }
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.execute = function(menu, parent) {
+       this.funct(menu, parent);
+};
index 0ac2913..42e13ca 100644 (file)
@@ -1 +1,1234 @@
-var _0xffeb=["\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x73\x69\x7A\x65","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6D\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x65\x6E\x64","\x63\x6C\x6F\x73\x65","\x63\x75\x62\x65","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x6E\x6F\x74\x65","\x74\x61\x62\x57\x69\x64\x74\x68","\x74\x61\x62\x48\x65\x69\x67\x68\x74","\x74\x61\x62\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x69\x67\x68\x74","\x6C\x65\x66\x74","\x66\x6F\x6C\x64\x65\x72","\x63\x61\x72\x64","\x71\x75\x61\x64\x54\x6F","\x74\x61\x70\x65","\x73\x74\x65\x70","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x65\x67\x69\x6E","\x73\x74\x72\x6F\x6B\x65","\x61\x70\x70\x6C\x79","\x70\x6C\x75\x73","\x64\x6F\x75\x62\x6C\x65","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x6D\x61\x78","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x79\x6D\x62\x6F\x6C","\x41\x6C\x69\x67\x6E","\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x57\x69\x64\x74\x68","\x48\x65\x69\x67\x68\x74","\x53\x70\x61\x63\x69\x6E\x67","\x41\x72\x63\x53\x70\x61\x63\x69\x6E\x67","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x73\x61\x76\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x72\x65\x73\x74\x6F\x72\x65","\x65\x78\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x50\x69\x70\x65","\x63\x75\x72\x76\x65\x54\x6F","\x75\x6D\x6C\x41\x63\x74\x6F\x72","\x6C\x6F\x6C\x6C\x69\x70\x6F\x70","\x6A\x65\x74\x74\x79\x57\x69\x64\x74\x68","\x6A\x65\x74\x74\x79\x48\x65\x69\x67\x68\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x6F\x75\x74\x65\x72\x53\x74\x72\x6F\x6B\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x65\x6E\x64\x53\x74\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x74\x61\x74\x65","\x69\x6E\x69\x74\x53\x68\x61\x70\x65\x73","\x78","\x79","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x73\x68\x61\x70\x65\x73","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x72\x74","\x6C\x69\x6E\x6B","\x64\x61\x73\x68","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x73\x65\x47\x72\x69\x64\x46\x6F\x72\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x69\x6E\x69\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68","\x76\x69\x65\x77","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x73\x72\x63","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x74\x56\x69\x65\x77","\x63\x75\x72\x73\x6F\x72","\x6E\x6F\x64\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x43\x75\x72\x73\x6F\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74","\x72\x65\x64\x72\x61\x77","\x62\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x6F\x75\x72\x63\x65","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x73\x63\x61\x6C\x65","\x73\x6E\x61\x70","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x70\x70\x6C\x79\x53\x74\x79\x6C\x65","\x72\x65\x73\x65\x74","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x73\x68\x61\x70\x65","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x63\x6F\x73","\x73\x69\x6E","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x50\x6F\x69\x6E\x74","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65\x55\x6E\x72\x6F\x74\x61\x74\x65\x64","\x72\x6F\x75\x6E\x64","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x63\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x63\x61\x6C\x65\x46\x61\x63\x74\x6F\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x73\x74\x65\x6E\x63\x69\x6C","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73"];(function(){function _0xd5cax1(){}_0xd5cax1[_0xffeb[0]]= new mxCylinder();_0xd5cax1[_0xffeb[0]][_0xffeb[1]]=_0xd5cax1;_0xd5cax1[_0xffeb[0]][_0xffeb[2]]=20;_0xd5cax1[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5cax8=Math[_0xffeb[6]](_0xd5cax5,Math[_0xffeb[6]](_0xd5cax6,mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[2],this[_0xffeb[2]])));if(_0xd5cax7){_0xd5cax2[_0xffeb[7]](_0xd5cax8,_0xd5cax6);_0xd5cax2[_0xffeb[8]](_0xd5cax8,_0xd5cax8);_0xd5cax2[_0xffeb[8]](0,0);_0xd5cax2[_0xffeb[7]](_0xd5cax8,_0xd5cax8);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax8);_0xd5cax2[_0xffeb[9]]()}else {_0xd5cax2[_0xffeb[7]](0,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5-_0xd5cax8,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax8);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6);_0xd5cax2[_0xffeb[8]](_0xd5cax8,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6-_0xd5cax8);_0xd5cax2[_0xffeb[8]](0,0);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[11]]=_0xd5cax1;function _0xd5cax9(){}_0xd5cax9[_0xffeb[0]]= new mxCylinder();_0xd5cax9[_0xffeb[0]][_0xffeb[1]]=_0xd5cax9;_0xd5cax9[_0xffeb[0]][_0xffeb[2]]=30;_0xd5cax9[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5cax8=Math[_0xffeb[6]](_0xd5cax5,Math[_0xffeb[6]](_0xd5cax6,mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[2],this[_0xffeb[2]])));if(_0xd5cax7){_0xd5cax2[_0xffeb[7]](_0xd5cax5-_0xd5cax8,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5-_0xd5cax8,_0xd5cax8);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax8);_0xd5cax2[_0xffeb[9]]()}else {_0xd5cax2[_0xffeb[7]](0,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5-_0xd5cax8,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax8);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,0);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[13]]=_0xd5cax9;function _0xd5caxa(){}_0xd5caxa[_0xffeb[0]]= new mxCylinder();_0xd5caxa[_0xffeb[0]][_0xffeb[1]]=_0xd5caxa;_0xd5caxa[_0xffeb[0]][_0xffeb[14]]=60;_0xd5caxa[_0xffeb[0]][_0xffeb[15]]=20;_0xd5caxa[_0xffeb[0]][_0xffeb[16]]=_0xffeb[17];_0xd5caxa[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5caxb=mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[14],this[_0xffeb[14]]);var _0xd5caxc=mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[15],this[_0xffeb[15]]);var _0xd5caxd=mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[16],this[_0xffeb[16]]);var _0xd5caxe=Math[_0xffeb[6]](_0xd5cax5,_0xd5caxb);var _0xd5caxf=Math[_0xffeb[6]](_0xd5cax6,_0xd5caxc);if(_0xd5cax7){if(_0xd5caxd==_0xffeb[18]){_0xd5cax2[_0xffeb[7]](0,_0xd5caxf);_0xd5cax2[_0xffeb[8]](_0xd5caxe,_0xd5caxf)}else {_0xd5cax2[_0xffeb[7]](_0xd5cax5-_0xd5caxe,_0xd5caxf);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5caxf)};_0xd5cax2[_0xffeb[9]]()}else {if(_0xd5caxd==_0xffeb[18]){_0xd5cax2[_0xffeb[7]](0,0);_0xd5cax2[_0xffeb[8]](_0xd5caxe,0);_0xd5cax2[_0xffeb[8]](_0xd5caxe,_0xd5caxf);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5caxf)}else {_0xd5cax2[_0xffeb[7]](0,_0xd5caxf);_0xd5cax2[_0xffeb[8]](_0xd5cax5-_0xd5caxe,_0xd5caxf);_0xd5cax2[_0xffeb[8]](_0xd5cax5-_0xd5caxe,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,0)};_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5caxf);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[19]]=_0xd5caxa;function _0xd5cax10(){}_0xd5cax10[_0xffeb[0]]= new mxCylinder();_0xd5cax10[_0xffeb[0]][_0xffeb[1]]=_0xd5cax10;_0xd5cax10[_0xffeb[0]][_0xffeb[2]]=30;_0xd5cax10[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5cax8=Math[_0xffeb[6]](_0xd5cax5,Math[_0xffeb[6]](_0xd5cax6,mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[2],this[_0xffeb[2]])));if(!_0xd5cax7){_0xd5cax2[_0xffeb[7]](_0xd5cax8,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5cax8);_0xd5cax2[_0xffeb[8]](_0xd5cax8,0);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[20]]=_0xd5cax10;function _0xd5cax11(){}_0xd5cax11[_0xffeb[0]]= new mxCylinder();_0xd5cax11[_0xffeb[0]][_0xffeb[1]]=_0xd5cax11;_0xd5cax11[_0xffeb[0]][_0xffeb[2]]=0.4;_0xd5cax11[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5cax8=mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[2],this[_0xffeb[2]]);var _0xd5caxf=_0xd5cax6*_0xd5cax8;var _0xd5cax12=1.4;if(!_0xd5cax7){_0xd5cax2[_0xffeb[7]](0,_0xd5caxf/2);_0xd5cax2[_0xffeb[21]](_0xd5cax5/4,_0xd5caxf*_0xd5cax12,_0xd5cax5/2,_0xd5caxf/2);_0xd5cax2[_0xffeb[21]](_0xd5cax5*3/4,_0xd5caxf*(1-_0xd5cax12),_0xd5cax5,_0xd5caxf/2);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6-_0xd5caxf/2);_0xd5cax2[_0xffeb[21]](_0xd5cax5*3/4,_0xd5cax6-_0xd5caxf*_0xd5cax12,_0xd5cax5/2,_0xd5cax6-_0xd5caxf/2);_0xd5cax2[_0xffeb[21]](_0xd5cax5/4,_0xd5cax6-_0xd5caxf*(1-_0xd5cax12),0,_0xd5cax6-_0xd5caxf/2);_0xd5cax2[_0xffeb[8]](0,_0xd5caxf/2);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[22]]=_0xd5cax11;function _0xd5cax13(){}_0xd5cax13[_0xffeb[0]]= new mxCylinder();_0xd5cax13[_0xffeb[0]][_0xffeb[1]]=_0xd5cax13;_0xd5cax13[_0xffeb[0]][_0xffeb[2]]=0.2;_0xd5cax13[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5cax8=_0xd5cax5*mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[2],this[_0xffeb[2]]);if(!_0xd5cax7){_0xd5cax2[_0xffeb[7]](0,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5-_0xd5cax8,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6/2);_0xd5cax2[_0xffeb[8]](_0xd5cax5-_0xd5cax8,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6);_0xd5cax2[_0xffeb[8]](_0xd5cax8,_0xd5cax6/2);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[23]]=_0xd5cax13;function _0xd5cax14(){mxRectangleShape[_0xffeb[24]](this)}mxUtils[_0xffeb[25]](_0xd5cax14,mxRectangleShape);_0xd5cax14[_0xffeb[0]][_0xffeb[26]]=function(){return false};_0xd5cax14[_0xffeb[0]][_0xffeb[27]]=function(_0xd5cax15,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6){var _0xd5cax16=Math[_0xffeb[6]](_0xd5cax5/5,_0xd5cax6/5)+1;_0xd5cax15[_0xffeb[28]]();_0xd5cax15[_0xffeb[7]](_0xd5cax3+_0xd5cax5/2,_0xd5cax4+_0xd5cax16);_0xd5cax15[_0xffeb[8]](_0xd5cax3+_0xd5cax5/2,_0xd5cax4+_0xd5cax6-_0xd5cax16);_0xd5cax15[_0xffeb[7]](_0xd5cax3+_0xd5cax16,_0xd5cax4+_0xd5cax6/2);_0xd5cax15[_0xffeb[8]](_0xd5cax3+_0xd5cax5-_0xd5cax16,_0xd5cax4+_0xd5cax6/2);_0xd5cax15[_0xffeb[9]]();_0xd5cax15[_0xffeb[29]]();mxRectangleShape[_0xffeb[0]][_0xffeb[27]][_0xffeb[30]](this,arguments)};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[31]]=_0xd5cax14;function _0xd5cax17(){mxRectangleShape[_0xffeb[24]](this)}mxUtils[_0xffeb[25]](_0xd5cax17,mxRectangleShape);_0xd5cax17[_0xffeb[0]][_0xffeb[26]]=function(){return false};_0xd5cax17[_0xffeb[0]][_0xffeb[27]]=function(_0xd5cax15,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6){if(this[_0xffeb[4]]!=null){if(this[_0xffeb[4]][_0xffeb[32]]==1){var _0xd5cax18=Math[_0xffeb[34]](2,this[_0xffeb[33]]+1);mxRectangleShape[_0xffeb[0]][_0xffeb[35]][_0xffeb[24]](this,_0xd5cax15,_0xd5cax3+_0xd5cax18,_0xd5cax4+_0xd5cax18,_0xd5cax5-2*_0xd5cax18,_0xd5cax6-2*_0xd5cax18);mxRectangleShape[_0xffeb[0]][_0xffeb[27]][_0xffeb[30]](this,arguments);_0xd5cax3+=_0xd5cax18;_0xd5cax4+=_0xd5cax18;_0xd5cax5-=2*_0xd5cax18;_0xd5cax6-=2*_0xd5cax18};_0xd5cax15[_0xffeb[36]](false);var _0xd5cax19=0;var _0xd5cax1a=null;do{_0xd5cax1a=mxCellRenderer[_0xffeb[0]][_0xffeb[12]][this[_0xffeb[4]][_0xffeb[37]+_0xd5cax19]];if(_0xd5cax1a!=null){var _0xd5cax1b=this[_0xffeb[4]][_0xffeb[37]+_0xd5cax19+_0xffeb[38]];var _0xd5cax1c=this[_0xffeb[4]][_0xffeb[37]+_0xd5cax19+_0xffeb[39]];var _0xd5cax1d=this[_0xffeb[4]][_0xffeb[37]+_0xd5cax19+_0xffeb[40]];var _0xd5cax1e=this[_0xffeb[4]][_0xffeb[37]+_0xd5cax19+_0xffeb[41]];var _0xd5cax1f=this[_0xffeb[4]][_0xffeb[37]+_0xd5cax19+_0xffeb[42]]||0;var _0xd5cax20=this[_0xffeb[4]][_0xffeb[37]+_0xd5cax19+_0xffeb[43]];if(_0xd5cax20!=null){_0xd5cax1f+=this[_0xffeb[44]](_0xd5cax5+this[_0xffeb[33]],_0xd5cax6+this[_0xffeb[33]])*_0xd5cax20};var _0xd5cax21=_0xd5cax3;var _0xd5cax22=_0xd5cax4;if(_0xd5cax1b==mxConstants[_0xffeb[45]]){_0xd5cax21+=(_0xd5cax5-_0xd5cax1d)/2}else {if(_0xd5cax1b==mxConstants[_0xffeb[46]]){_0xd5cax21+=_0xd5cax5-_0xd5cax1d-_0xd5cax1f}else {_0xd5cax21+=_0xd5cax1f}};if(_0xd5cax1c==mxConstants[_0xffeb[47]]){_0xd5cax22+=(_0xd5cax6-_0xd5cax1e)/2}else {if(_0xd5cax1c==mxConstants[_0xffeb[48]]){_0xd5cax22+=_0xd5cax6-_0xd5cax1e-_0xd5cax1f}else {_0xd5cax22+=_0xd5cax1f}};_0xd5cax15[_0xffeb[49]]();var _0xd5cax23= new _0xd5cax1a();_0xd5cax23[_0xffeb[4]]=this[_0xffeb[4]];_0xd5cax1a[_0xffeb[0]][_0xffeb[50]][_0xffeb[24]](_0xd5cax23,_0xd5cax15,_0xd5cax21,_0xd5cax22,_0xd5cax1d,_0xd5cax1e);_0xd5cax15[_0xffeb[51]]()};_0xd5cax19++}while(_0xd5cax1a!=null);}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[52]]=_0xd5cax17;function _0xd5cax24(){}_0xd5cax24[_0xffeb[0]]= new mxCylinder();_0xd5cax24[_0xffeb[0]][_0xffeb[1]]=_0xd5cax24;_0xd5cax24[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){if(_0xd5cax7){_0xd5cax2[_0xffeb[7]](0,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5/2,_0xd5cax6/2);_0xd5cax2[_0xffeb[8]](_0xd5cax5,0);_0xd5cax2[_0xffeb[9]]()}else {_0xd5cax2[_0xffeb[7]](0,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6);_0xd5cax2[_0xffeb[10]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[53]]=_0xd5cax24;function _0xd5cax25(){}_0xd5cax25[_0xffeb[0]]= new mxCylinder();_0xd5cax25[_0xffeb[0]][_0xffeb[1]]=_0xd5cax25;_0xd5cax25[_0xffeb[0]][_0xffeb[54]]=true;_0xd5cax25[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5cax1d=_0xd5cax5/3;var _0xd5cax1e=_0xd5cax6/4;if(!_0xd5cax7){_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,_0xd5cax1e);_0xd5cax2[_0xffeb[55]](_0xd5cax5/2-_0xd5cax1d,_0xd5cax1e,_0xd5cax5/2-_0xd5cax1d,0,_0xd5cax5/2,0);_0xd5cax2[_0xffeb[55]](_0xd5cax5/2+_0xd5cax1d,0,_0xd5cax5/2+_0xd5cax1d,_0xd5cax1e,_0xd5cax5/2,_0xd5cax1e);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,_0xd5cax1e);_0xd5cax2[_0xffeb[8]](_0xd5cax5/2,2*_0xd5cax6/3);_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,_0xd5cax6/3);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6/3);_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,_0xd5cax6/3);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6/3);_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,2*_0xd5cax6/3);_0xd5cax2[_0xffeb[8]](0,_0xd5cax6);_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,2*_0xd5cax6/3);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6);_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[56]]=_0xd5cax25;function _0xd5cax26(){}_0xd5cax26[_0xffeb[0]]= new mxCylinder();_0xd5cax26[_0xffeb[0]][_0xffeb[1]]=_0xd5cax26;_0xd5cax26[_0xffeb[0]][_0xffeb[2]]=10;_0xd5cax26[_0xffeb[0]][_0xffeb[54]]=true;_0xd5cax26[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5cax27=mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[2],this[_0xffeb[2]]);var _0xd5cax1d=_0xd5cax27*2/3;var _0xd5cax1e=_0xd5cax27;if(!_0xd5cax7){_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,_0xd5cax1e);_0xd5cax2[_0xffeb[55]](_0xd5cax5/2-_0xd5cax1d,_0xd5cax1e,_0xd5cax5/2-_0xd5cax1d,0,_0xd5cax5/2,0);_0xd5cax2[_0xffeb[55]](_0xd5cax5/2+_0xd5cax1d,0,_0xd5cax5/2+_0xd5cax1d,_0xd5cax1e,_0xd5cax5/2,_0xd5cax1e);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[7]](_0xd5cax5/2,_0xd5cax1e);_0xd5cax2[_0xffeb[8]](_0xd5cax5/2,_0xd5cax6);_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[57]]=_0xd5cax26;function _0xd5cax28(){}_0xd5cax28[_0xffeb[0]]= new mxCylinder();_0xd5cax28[_0xffeb[0]][_0xffeb[1]]=_0xd5cax28;_0xd5cax28[_0xffeb[0]][_0xffeb[58]]=32;_0xd5cax28[_0xffeb[0]][_0xffeb[59]]=12;_0xd5cax28[_0xffeb[0]][_0xffeb[3]]=function(_0xd5cax2,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6,_0xd5cax7){var _0xd5caxe=mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[58],this[_0xffeb[58]]);var _0xd5caxf=mxUtils[_0xffeb[5]](this[_0xffeb[4]],_0xffeb[59],this[_0xffeb[59]]);var _0xd5cax29=_0xd5caxe/2;var _0xd5cax2a=_0xd5cax29+_0xd5caxe/2;var _0xd5cax2b=0.3*_0xd5cax6-_0xd5caxf/2;var _0xd5cax2c=0.7*_0xd5cax6-_0xd5caxf/2;if(_0xd5cax7){_0xd5cax2[_0xffeb[7]](_0xd5cax29,_0xd5cax2b);_0xd5cax2[_0xffeb[8]](_0xd5cax2a,_0xd5cax2b);_0xd5cax2[_0xffeb[8]](_0xd5cax2a,_0xd5cax2b+_0xd5caxf);_0xd5cax2[_0xffeb[8]](_0xd5cax29,_0xd5cax2b+_0xd5caxf);_0xd5cax2[_0xffeb[7]](_0xd5cax29,_0xd5cax2c);_0xd5cax2[_0xffeb[8]](_0xd5cax2a,_0xd5cax2c);_0xd5cax2[_0xffeb[8]](_0xd5cax2a,_0xd5cax2c+_0xd5caxf);_0xd5cax2[_0xffeb[8]](_0xd5cax29,_0xd5cax2c+_0xd5caxf);_0xd5cax2[_0xffeb[9]]()}else {_0xd5cax2[_0xffeb[7]](_0xd5cax29,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,0);_0xd5cax2[_0xffeb[8]](_0xd5cax5,_0xd5cax6);_0xd5cax2[_0xffeb[8]](_0xd5cax29,_0xd5cax6);_0xd5cax2[_0xffeb[8]](_0xd5cax29,_0xd5cax2c+_0xd5caxf);_0xd5cax2[_0xffeb[8]](0,_0xd5cax2c+_0xd5caxf);_0xd5cax2[_0xffeb[8]](0,_0xd5cax2c);_0xd5cax2[_0xffeb[8]](_0xd5cax29,_0xd5cax2c);_0xd5cax2[_0xffeb[8]](_0xd5cax29,_0xd5cax2b+_0xd5caxf);_0xd5cax2[_0xffeb[8]](0,_0xd5cax2b+_0xd5caxf);_0xd5cax2[_0xffeb[8]](0,_0xd5cax2b);_0xd5cax2[_0xffeb[8]](_0xd5cax29,_0xd5cax2b);_0xd5cax2[_0xffeb[10]]();_0xd5cax2[_0xffeb[9]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[60]]=_0xd5cax28;function _0xd5cax2d(){}_0xd5cax2d[_0xffeb[0]]= new mxDoubleEllipse();_0xd5cax2d[_0xffeb[0]][_0xffeb[1]]=_0xd5cax2d;_0xd5cax2d[_0xffeb[0]][_0xffeb[61]]=true;_0xd5cax2d[_0xffeb[0]][_0xffeb[50]]=function(_0xd5cax15,_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6){var _0xd5cax18=Math[_0xffeb[6]](4,Math[_0xffeb[6]](_0xd5cax5/5,_0xd5cax6/5));if(_0xd5cax5>0&&_0xd5cax6>0){_0xd5cax15[_0xffeb[62]](_0xd5cax3+_0xd5cax18,_0xd5cax4+_0xd5cax18,_0xd5cax5-2*_0xd5cax18,_0xd5cax6-2*_0xd5cax18);_0xd5cax15[_0xffeb[63]]()};_0xd5cax15[_0xffeb[64]](false);if(this[_0xffeb[61]]){_0xd5cax15[_0xffeb[62]](_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6);_0xd5cax15[_0xffeb[29]]()}};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[65]]=_0xd5cax2d;function _0xd5cax2e(){}_0xd5cax2e[_0xffeb[0]]= new _0xd5cax2d();_0xd5cax2e[_0xffeb[0]][_0xffeb[1]]=_0xd5cax2e;_0xd5cax2e[_0xffeb[0]][_0xffeb[61]]=false;mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[66]]=_0xd5cax2e;var _0xd5cax2f=mxImageExport[_0xffeb[0]][_0xffeb[67]];mxImageExport[_0xffeb[0]][_0xffeb[67]]=function(){_0xd5cax2f[_0xffeb[30]](this,arguments);function _0xd5cax30(_0xd5cax31){return {drawShape:function(_0xd5cax32,_0xd5cax33,_0xd5cax34,_0xd5cax35){var _0xd5cax3=_0xd5cax34[_0xffeb[68]];var _0xd5cax4=_0xd5cax34[_0xffeb[69]];var _0xd5cax5=_0xd5cax34[_0xffeb[70]];var _0xd5cax6=_0xd5cax34[_0xffeb[71]];if(_0xd5cax35){var _0xd5cax18=Math[_0xffeb[6]](4,Math[_0xffeb[6]](_0xd5cax5/5,_0xd5cax6/5));_0xd5cax3+=_0xd5cax18;_0xd5cax4+=_0xd5cax18;_0xd5cax5-=2*_0xd5cax18;_0xd5cax6-=2*_0xd5cax18;if(_0xd5cax5>0&&_0xd5cax6>0){_0xd5cax32[_0xffeb[62]](_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6)};return true}else {_0xd5cax32[_0xffeb[63]]();if(_0xd5cax31){_0xd5cax32[_0xffeb[62]](_0xd5cax3,_0xd5cax4,_0xd5cax5,_0xd5cax6);_0xd5cax32[_0xffeb[29]]()}}}}}this[_0xffeb[72]][_0xffeb[65]]=_0xd5cax30(true);this[_0xffeb[72]][_0xffeb[66]]=_0xd5cax30(false)};function _0xd5cax36(){mxArrow[_0xffeb[24]](this)}mxUtils[_0xffeb[25]](_0xd5cax36,mxArrow);_0xd5cax36[_0xffeb[0]][_0xffeb[73]]=function(_0xd5cax15,_0xd5cax37){var _0xd5cax1d=10;var _0xd5cax38=_0xd5cax37[0];var _0xd5cax39=_0xd5cax37[_0xd5cax37[_0xffeb[74]]-1];var _0xd5caxe=_0xd5cax39[_0xffeb[68]]-_0xd5cax38[_0xffeb[68]];var _0xd5caxf=_0xd5cax39[_0xffeb[69]]-_0xd5cax38[_0xffeb[69]];var _0xd5cax3a=Math[_0xffeb[75]](_0xd5caxe*_0xd5caxe+_0xd5caxf*_0xd5caxf);var _0xd5cax3b=_0xd5cax3a;var _0xd5cax3c=_0xd5caxe/_0xd5cax3a;var _0xd5cax3d=_0xd5caxf/_0xd5cax3a;var _0xd5cax3e=_0xd5cax3b*_0xd5cax3c;var _0xd5cax3f=_0xd5cax3b*_0xd5cax3d;var _0xd5cax40=_0xd5cax1d*_0xd5cax3d/3;var _0xd5cax41=-_0xd5cax1d*_0xd5cax3c/3;var _0xd5cax42=_0xd5cax38[_0xffeb[68]]-_0xd5cax40/2;var _0xd5cax43=_0xd5cax38[_0xffeb[69]]-_0xd5cax41/2;var _0xd5cax44=_0xd5cax42+_0xd5cax40;var _0xd5cax45=_0xd5cax43+_0xd5cax41;var _0xd5cax46=_0xd5cax44+_0xd5cax3e;var _0xd5cax47=_0xd5cax45+_0xd5cax3f;var _0xd5cax48=_0xd5cax46+_0xd5cax40;var _0xd5cax49=_0xd5cax47+_0xd5cax41;var _0xd5cax4a=_0xd5cax48-3*_0xd5cax40;var _0xd5cax4b=_0xd5cax49-3*_0xd5cax41;_0xd5cax15[_0xffeb[28]]();_0xd5cax15[_0xffeb[7]](_0xd5cax44,_0xd5cax45);_0xd5cax15[_0xffeb[8]](_0xd5cax46,_0xd5cax47);_0xd5cax15[_0xffeb[7]](_0xd5cax4a+_0xd5cax40,_0xd5cax4b+_0xd5cax41);_0xd5cax15[_0xffeb[8]](_0xd5cax42,_0xd5cax43);_0xd5cax15[_0xffeb[29]]()};mxCellRenderer[_0xffeb[0]][_0xffeb[12]][_0xffeb[76]]=_0xd5cax36;mxMarker[_0xffeb[78]](_0xffeb[77],function(_0xd5cax32,_0xd5cax1a,_0xd5cax4c,_0xd5cax39,_0xd5cax4d,_0xd5cax4e,_0xd5cax4f,_0xd5cax50,_0xd5cax51,_0xd5cax52){var _0xd5cax3c=_0xd5cax4d*(_0xd5cax4f+_0xd5cax51+1);var _0xd5cax3d=_0xd5cax4e*(_0xd5cax4f+_0xd5cax51+1);return function(){_0xd5cax32[_0xffeb[28]]();_0xd5cax32[_0xffeb[7]](_0xd5cax39[_0xffeb[68]]-_0xd5cax3c/2-_0xd5cax3d/2,_0xd5cax39[_0xffeb[69]]-_0xd5cax3d/2+_0xd5cax3c/2);_0xd5cax32[_0xffeb[8]](_0xd5cax39[_0xffeb[68]]+_0xd5cax3d/2-3*_0xd5cax3c/2,_0xd5cax39[_0xffeb[69]]-3*_0xd5cax3d/2-_0xd5cax3c/2);_0xd5cax32[_0xffeb[29]]()}});var _0xd5cax53=-99;if( typeof (mxVertexHandler)!=_0xffeb[79]){function _0xd5cax54(_0xd5cax33){mxVertexHandler[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax54,mxVertexHandler);_0xd5cax54[_0xffeb[0]][_0xffeb[80]]=false;_0xd5cax54[_0xffeb[0]][_0xffeb[81]]=function(){this[_0xffeb[82]]=mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],mxConstants.STYLE_HORIZONTAL,true);var _0xd5cax55=this[_0xffeb[83]][_0xffeb[85]][_0xffeb[84]];if(this[_0xffeb[86]]!=null){var _0xd5cax34= new mxRectangle(0,0,this[_0xffeb[86]][_0xffeb[70]],this[_0xffeb[86]][_0xffeb[71]]);this[_0xffeb[87]]= new mxImageShape(_0xd5cax34,this[_0xffeb[86]][_0xffeb[88]])}else {var _0xd5cax4f=10;var _0xd5cax34= new mxRectangle(0,0,_0xd5cax4f,_0xd5cax4f);this[_0xffeb[87]]= new mxRhombus(_0xd5cax34,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};this[_0xffeb[87]][_0xffeb[89]]=(_0xd5cax55[_0xffeb[89]]!=mxConstants[_0xffeb[90]])?mxConstants[_0xffeb[91]]:mxConstants[_0xffeb[90]];this[_0xffeb[87]][_0xffeb[81]](_0xd5cax55[_0xffeb[93]]()[_0xffeb[92]]());this[_0xffeb[87]][_0xffeb[95]][_0xffeb[4]][_0xffeb[94]]=this[_0xffeb[96]]();mxEvent[_0xffeb[97]](this[_0xffeb[87]][_0xffeb[95]],_0xd5cax55,this[_0xffeb[83]]);mxVertexHandler[_0xffeb[0]][_0xffeb[81]][_0xffeb[30]](this,arguments)};_0xd5cax54[_0xffeb[0]][_0xffeb[96]]=function(){return _0xffeb[98]};_0xd5cax54[_0xffeb[0]][_0xffeb[99]]=function(){mxVertexHandler[_0xffeb[0]][_0xffeb[99]][_0xffeb[30]](this,arguments);var _0xd5cax4f=this[_0xffeb[87]][_0xffeb[100]][_0xffeb[70]];this[_0xffeb[87]][_0xffeb[100]]=this[_0xffeb[101]](_0xd5cax4f);this[_0xffeb[87]][_0xffeb[99]]()};_0xd5cax54[_0xffeb[0]][_0xffeb[102]]=function(){mxVertexHandler[_0xffeb[0]][_0xffeb[102]][_0xffeb[30]](this,arguments);if(this[_0xffeb[87]]!=null){this[_0xffeb[87]][_0xffeb[102]]();this[_0xffeb[87]]=null}};_0xd5cax54[_0xffeb[0]][_0xffeb[103]]=function(_0xd5cax56){if(_0xd5cax56[_0xffeb[104]](this[_0xffeb[87]])){return _0xd5cax53};return mxVertexHandler[_0xffeb[0]][_0xffeb[103]][_0xffeb[30]](this,arguments)};_0xd5cax54[_0xffeb[0]][_0xffeb[105]]=function(_0xd5cax57,_0xd5cax56){if(!_0xd5cax56[_0xffeb[106]]()&&this[_0xffeb[107]]==_0xd5cax53){var _0xd5cax58= new mxPoint(_0xd5cax56[_0xffeb[108]](),_0xd5cax56[_0xffeb[109]]());this[_0xffeb[110]](_0xd5cax58);var _0xd5cax59=this[_0xffeb[84]][_0xffeb[112]](_0xd5cax56[_0xffeb[111]]());var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];if(_0xd5cax59&&this[_0xffeb[80]]){_0xd5cax58[_0xffeb[68]]=this[_0xffeb[84]][_0xffeb[114]](_0xd5cax58[_0xffeb[68]]/_0xd5cax5a)*_0xd5cax5a;_0xd5cax58[_0xffeb[69]]=this[_0xffeb[84]][_0xffeb[114]](_0xd5cax58[_0xffeb[69]]/_0xd5cax5a)*_0xd5cax5a};this[_0xffeb[115]](_0xd5cax58);this[_0xffeb[116]](this[_0xffeb[87]],_0xd5cax58[_0xffeb[68]],_0xd5cax58[_0xffeb[69]]);this[_0xffeb[83]][_0xffeb[85]][_0xffeb[84]][_0xffeb[117]][_0xffeb[99]](this[_0xffeb[83]],true);_0xd5cax56[_0xffeb[118]]()}else {mxVertexHandler[_0xffeb[0]][_0xffeb[105]][_0xffeb[30]](this,arguments)}};_0xd5cax54[_0xffeb[0]][_0xffeb[119]]=function(_0xd5cax57,_0xd5cax56){if(!_0xd5cax56[_0xffeb[106]]()&&this[_0xffeb[107]]==_0xd5cax53){this[_0xffeb[120]]();this[_0xffeb[121]]();_0xd5cax56[_0xffeb[118]]()}else {mxVertexHandler[_0xffeb[0]][_0xffeb[119]][_0xffeb[30]](this,arguments)}};_0xd5cax54[_0xffeb[0]][_0xffeb[101]]=function(_0xd5cax4f){var _0xd5cax5b=this[_0xffeb[83]][_0xffeb[123]][_0xffeb[122]]();var _0xd5cax5c=mxUtils[_0xffeb[124]](_0xd5cax5b);var _0xd5cax5d=Math[_0xffeb[125]](_0xd5cax5c);var _0xd5cax5e=Math[_0xffeb[126]](_0xd5cax5c);var _0xd5cax34= new mxRectangle(this[_0xffeb[83]][_0xffeb[68]],this[_0xffeb[83]][_0xffeb[69]],this[_0xffeb[83]][_0xffeb[70]],this[_0xffeb[83]][_0xffeb[71]]);if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[127]]()){var _0xd5cax5f=(_0xd5cax34[_0xffeb[70]]-_0xd5cax34[_0xffeb[71]])/2;_0xd5cax34[_0xffeb[68]]+=_0xd5cax5f;_0xd5cax34[_0xffeb[69]]-=_0xd5cax5f;var _0xd5cax23=_0xd5cax34[_0xffeb[70]];_0xd5cax34[_0xffeb[70]]=_0xd5cax34[_0xffeb[71]];_0xd5cax34[_0xffeb[71]]=_0xd5cax23};var _0xd5cax60=this[_0xffeb[128]](_0xd5cax34);if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[129]]){_0xd5cax60[_0xffeb[68]]=2*_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]-_0xd5cax60[_0xffeb[68]]};if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[130]]){_0xd5cax60[_0xffeb[69]]=2*_0xd5cax34[_0xffeb[69]]+_0xd5cax34[_0xffeb[71]]-_0xd5cax60[_0xffeb[69]]};_0xd5cax60=mxUtils[_0xffeb[133]](_0xd5cax60,_0xd5cax5d,_0xd5cax5e, new mxPoint(this[_0xffeb[83]][_0xffeb[131]](),this[_0xffeb[83]][_0xffeb[132]]()));return  new mxRectangle(_0xd5cax60[_0xffeb[68]]-_0xd5cax4f/2,_0xd5cax60[_0xffeb[69]]-_0xd5cax4f/2,_0xd5cax4f,_0xd5cax4f)};_0xd5cax54[_0xffeb[0]][_0xffeb[128]]=function(_0xd5cax34){return null};_0xd5cax54[_0xffeb[0]][_0xffeb[115]]=function(_0xd5cax58){};_0xd5cax54[_0xffeb[0]][_0xffeb[110]]=function(_0xd5cax58){_0xd5cax58[_0xffeb[68]]=Math[_0xffeb[34]](this[_0xffeb[83]][_0xffeb[68]],Math[_0xffeb[6]](this[_0xffeb[83]][_0xffeb[68]]+this[_0xffeb[83]][_0xffeb[70]],_0xd5cax58[_0xffeb[68]]));_0xd5cax58[_0xffeb[69]]=Math[_0xffeb[34]](this[_0xffeb[83]][_0xffeb[69]],Math[_0xffeb[6]](this[_0xffeb[83]][_0xffeb[69]]+this[_0xffeb[83]][_0xffeb[71]],_0xd5cax58[_0xffeb[69]]))};_0xd5cax54[_0xffeb[0]][_0xffeb[120]]=function(){};function _0xd5cax61(_0xd5cax33){_0xd5cax54[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax61,_0xd5cax54);_0xd5cax61[_0xffeb[0]][_0xffeb[128]]=function(_0xd5cax34){var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];var _0xd5caxb=Math[_0xffeb[6]](_0xd5cax34[_0xffeb[70]],mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[14],60)*_0xd5cax5a);var _0xd5caxc=Math[_0xffeb[6]](_0xd5cax34[_0xffeb[71]],mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[15],20)*_0xd5cax5a);var _0xd5caxd=mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[16],_0xffeb[17]);var _0xd5cax3=(_0xd5caxd==_0xffeb[18])?_0xd5cax34[_0xffeb[68]]+_0xd5caxb:_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]-_0xd5caxb;return  new mxPoint(_0xd5cax3,_0xd5cax34[_0xffeb[69]]+_0xd5caxc)};_0xd5cax61[_0xffeb[0]][_0xffeb[115]]=function(_0xd5cax58){var _0xd5cax5b=this[_0xffeb[83]][_0xffeb[123]][_0xffeb[122]]();var _0xd5cax5c=mxUtils[_0xffeb[124]](_0xd5cax5b);var _0xd5cax5d=Math[_0xffeb[125]](-_0xd5cax5c);var _0xd5cax5e=Math[_0xffeb[126]](-_0xd5cax5c);var _0xd5cax34= new mxRectangle(this[_0xffeb[83]][_0xffeb[68]],this[_0xffeb[83]][_0xffeb[69]],this[_0xffeb[83]][_0xffeb[70]],this[_0xffeb[83]][_0xffeb[71]]);if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[127]]()){var _0xd5cax5f=(_0xd5cax34[_0xffeb[70]]-_0xd5cax34[_0xffeb[71]])/2;_0xd5cax34[_0xffeb[68]]+=_0xd5cax5f;_0xd5cax34[_0xffeb[69]]-=_0xd5cax5f;var _0xd5cax23=_0xd5cax34[_0xffeb[70]];_0xd5cax34[_0xffeb[70]]=_0xd5cax34[_0xffeb[71]];_0xd5cax34[_0xffeb[71]]=_0xd5cax23};var _0xd5cax60= new mxPoint(_0xd5cax58[_0xffeb[68]],_0xd5cax58[_0xffeb[69]]);_0xd5cax60=mxUtils[_0xffeb[133]](_0xd5cax60,_0xd5cax5d,_0xd5cax5e, new mxPoint(this[_0xffeb[83]][_0xffeb[131]](),this[_0xffeb[83]][_0xffeb[132]]()));if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[129]]){_0xd5cax60[_0xffeb[68]]=2*_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]-_0xd5cax60[_0xffeb[68]]};if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[130]]){_0xd5cax60[_0xffeb[69]]=2*_0xd5cax34[_0xffeb[69]]+_0xd5cax34[_0xffeb[71]]-_0xd5cax60[_0xffeb[69]]};var _0xd5cax62=this[_0xffeb[134]](_0xd5cax60,_0xd5cax34);if(_0xd5cax62!=null){if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[129]]){_0xd5cax62[_0xffeb[68]]=2*_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]-_0xd5cax62[_0xffeb[68]]};if(this[_0xffeb[83]][_0xffeb[123]][_0xffeb[130]]){_0xd5cax62[_0xffeb[69]]=2*_0xd5cax34[_0xffeb[69]]+_0xd5cax34[_0xffeb[71]]-_0xd5cax62[_0xffeb[69]]};_0xd5cax5d=Math[_0xffeb[125]](_0xd5cax5c);_0xd5cax5e=Math[_0xffeb[126]](_0xd5cax5c);_0xd5cax62=mxUtils[_0xffeb[133]](_0xd5cax62,_0xd5cax5d,_0xd5cax5e, new mxPoint(this[_0xffeb[83]][_0xffeb[131]](),this[_0xffeb[83]][_0xffeb[132]]()));_0xd5cax58[_0xffeb[68]]=_0xd5cax62[_0xffeb[68]];_0xd5cax58[_0xffeb[69]]=_0xd5cax62[_0xffeb[69]]}};_0xd5cax61[_0xffeb[0]][_0xffeb[134]]=function(_0xd5cax60,_0xd5cax34){var _0xd5caxd=mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[16],_0xffeb[17]);var _0xd5caxb=(_0xd5caxd==_0xffeb[18])?_0xd5cax60[_0xffeb[68]]-_0xd5cax34[_0xffeb[68]]:_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]-_0xd5cax60[_0xffeb[68]];var _0xd5caxc=_0xd5cax60[_0xffeb[69]]-_0xd5cax34[_0xffeb[69]];var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];this[_0xffeb[83]][_0xffeb[4]][_0xffeb[14]]=Math[_0xffeb[135]](Math[_0xffeb[34]](1,_0xd5caxb)/_0xd5cax5a);this[_0xffeb[83]][_0xffeb[4]][_0xffeb[15]]=Math[_0xffeb[135]](Math[_0xffeb[34]](1,_0xd5caxc)/_0xd5cax5a)};_0xd5cax61[_0xffeb[0]][_0xffeb[120]]=function(){var _0xd5cax63=this[_0xffeb[84]][_0xffeb[136]]();_0xd5cax63[_0xffeb[137]]();try{this[_0xffeb[83]][_0xffeb[85]][_0xffeb[84]][_0xffeb[139]](_0xffeb[14],this[_0xffeb[83]][_0xffeb[4]][_0xffeb[14]],[this[_0xffeb[83]][_0xffeb[138]]]);this[_0xffeb[83]][_0xffeb[85]][_0xffeb[84]][_0xffeb[139]](_0xffeb[15],this[_0xffeb[83]][_0xffeb[4]][_0xffeb[15]],[this[_0xffeb[83]][_0xffeb[138]]])}finally{_0xd5cax63[_0xffeb[140]]()}};function _0xd5cax64(_0xd5cax33){_0xd5cax61[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax64,_0xd5cax61);_0xd5cax64[_0xffeb[0]][_0xffeb[128]]=function(_0xd5cax34){var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];var _0xd5cax65=mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]/2,_0xd5cax34[_0xffeb[69]]+Math[_0xffeb[6]](_0xd5cax34[_0xffeb[71]],_0xd5cax65*_0xd5cax5a))};_0xd5cax64[_0xffeb[0]][_0xffeb[134]]=function(_0xd5cax58,_0xd5cax34){_0xd5cax58[_0xffeb[68]]=_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]/2;startSize=_0xd5cax58[_0xffeb[69]]-_0xd5cax34[_0xffeb[69]];var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];this[_0xffeb[83]][_0xffeb[4]][_0xffeb[141]]=Math[_0xffeb[135]](Math[_0xffeb[34]](1,startSize)/_0xd5cax5a);return _0xd5cax58};_0xd5cax64[_0xffeb[0]][_0xffeb[120]]=function(){this[_0xffeb[83]][_0xffeb[85]][_0xffeb[84]][_0xffeb[139]](_0xffeb[141],this[_0xffeb[83]][_0xffeb[4]][_0xffeb[141]],[this[_0xffeb[83]][_0xffeb[138]]])};function _0xd5cax66(_0xd5cax33){_0xd5cax61[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax66,_0xd5cax61);_0xd5cax66[_0xffeb[0]][_0xffeb[142]]=20;_0xd5cax66[_0xffeb[0]][_0xffeb[143]]=1;_0xd5cax66[_0xffeb[0]][_0xffeb[128]]=function(_0xd5cax34){var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];var _0xd5cax67=Math[_0xffeb[6]](_0xd5cax34[_0xffeb[70]],Math[_0xffeb[6]](_0xd5cax34[_0xffeb[71]],mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[2],this[_0xffeb[142]])*_0xd5cax5a/this[_0xffeb[143]]));return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax67,_0xd5cax34[_0xffeb[69]]+_0xd5cax67)};_0xd5cax66[_0xffeb[0]][_0xffeb[134]]=function(_0xd5cax60,_0xd5cax34){var _0xd5cax4f=Math[_0xffeb[34]](0,Math[_0xffeb[6]](Math[_0xffeb[6]](_0xd5cax34[_0xffeb[70]]/this[_0xffeb[143]],_0xd5cax60[_0xffeb[68]]-_0xd5cax34[_0xffeb[68]]),Math[_0xffeb[6]](_0xd5cax34[_0xffeb[71]]/this[_0xffeb[143]],_0xd5cax60[_0xffeb[69]]-_0xd5cax34[_0xffeb[69]])));var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];this[_0xffeb[83]][_0xffeb[4]][_0xffeb[2]]=Math[_0xffeb[135]](Math[_0xffeb[34]](1,_0xd5cax4f)/_0xd5cax5a)*this[_0xffeb[143]];return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax4f,_0xd5cax34[_0xffeb[69]]+_0xd5cax4f)};_0xd5cax66[_0xffeb[0]][_0xffeb[120]]=function(){this[_0xffeb[83]][_0xffeb[85]][_0xffeb[84]][_0xffeb[139]](_0xffeb[2],this[_0xffeb[83]][_0xffeb[4]][_0xffeb[2]],[this[_0xffeb[83]][_0xffeb[138]]])};function _0xd5cax68(_0xd5cax33){_0xd5cax66[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax68,_0xd5cax66);_0xd5cax68[_0xffeb[0]][_0xffeb[142]]=30;_0xd5cax68[_0xffeb[0]][_0xffeb[143]]=2;function _0xd5cax69(_0xd5cax33){_0xd5cax66[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax69,_0xd5cax66);_0xd5cax69[_0xffeb[0]][_0xffeb[142]]=30;_0xd5cax69[_0xffeb[0]][_0xffeb[143]]=1;_0xd5cax69[_0xffeb[0]][_0xffeb[128]]=function(_0xd5cax34){var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];var _0xd5cax67=Math[_0xffeb[6]](_0xd5cax34[_0xffeb[70]],Math[_0xffeb[6]](_0xd5cax34[_0xffeb[71]],mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[2],this[_0xffeb[142]])*_0xd5cax5a/this[_0xffeb[143]]));return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]-_0xd5cax67,_0xd5cax34[_0xffeb[69]]+_0xd5cax67)};_0xd5cax69[_0xffeb[0]][_0xffeb[134]]=function(_0xd5cax60,_0xd5cax34){var _0xd5cax4f=Math[_0xffeb[34]](0,Math[_0xffeb[6]](Math[_0xffeb[6]](_0xd5cax34[_0xffeb[70]]/this[_0xffeb[143]],_0xd5cax60[_0xffeb[68]]-_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]),Math[_0xffeb[6]](_0xd5cax34[_0xffeb[71]]/this[_0xffeb[143]],_0xd5cax60[_0xffeb[69]]-_0xd5cax34[_0xffeb[69]])));var _0xd5cax5a=this[_0xffeb[84]][_0xffeb[93]]()[_0xffeb[113]];this[_0xffeb[83]][_0xffeb[4]][_0xffeb[2]]=Math[_0xffeb[135]](Math[_0xffeb[34]](1,_0xd5cax4f)/_0xd5cax5a)*this[_0xffeb[143]];return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]-_0xd5cax4f,_0xd5cax34[_0xffeb[69]]+_0xd5cax4f)};function _0xd5cax6a(_0xd5cax33){_0xd5cax66[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax6a,_0xd5cax66);_0xd5cax6a[_0xffeb[0]][_0xffeb[142]]=0.2;_0xd5cax6a[_0xffeb[0]][_0xffeb[143]]=1;_0xd5cax6a[_0xffeb[0]][_0xffeb[128]]=function(_0xd5cax34){var _0xd5cax67=mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[2],this[_0xffeb[142]]);return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]*_0xd5cax67,_0xd5cax34[_0xffeb[69]]+_0xd5cax34[_0xffeb[71]]/2)};_0xd5cax6a[_0xffeb[0]][_0xffeb[134]]=function(_0xd5cax60,_0xd5cax34){var _0xd5cax4f=Math[_0xffeb[6]](1,(_0xd5cax60[_0xffeb[68]]-_0xd5cax34[_0xffeb[68]])/_0xd5cax34[_0xffeb[70]]);this[_0xffeb[83]][_0xffeb[4]][_0xffeb[2]]=_0xd5cax4f;return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax4f*_0xd5cax34[_0xffeb[70]],_0xd5cax34[_0xffeb[69]]+_0xd5cax34[_0xffeb[71]]/2)};function _0xd5cax6b(_0xd5cax33){_0xd5cax66[_0xffeb[24]](this,_0xd5cax33)}mxUtils[_0xffeb[25]](_0xd5cax6b,_0xd5cax66);_0xd5cax6b[_0xffeb[0]][_0xffeb[142]]=0.4;_0xd5cax6b[_0xffeb[0]][_0xffeb[143]]=1;_0xd5cax6b[_0xffeb[0]][_0xffeb[128]]=function(_0xd5cax34){var _0xd5cax67=mxUtils[_0xffeb[5]](this[_0xffeb[83]][_0xffeb[4]],_0xffeb[2],this[_0xffeb[142]]);return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]/2,_0xd5cax34[_0xffeb[69]]+_0xd5cax67*_0xd5cax34[_0xffeb[71]]/2)};_0xd5cax6b[_0xffeb[0]][_0xffeb[134]]=function(_0xd5cax60,_0xd5cax34){var _0xd5cax4f=Math[_0xffeb[34]](0,Math[_0xffeb[6]](1,((_0xd5cax60[_0xffeb[69]]-_0xd5cax34[_0xffeb[69]])/_0xd5cax34[_0xffeb[71]])*2));this[_0xffeb[83]][_0xffeb[4]][_0xffeb[2]]=_0xd5cax4f;return  new mxPoint(_0xd5cax34[_0xffeb[68]]+_0xd5cax34[_0xffeb[70]]/2,_0xd5cax34[_0xffeb[69]]+_0xd5cax4f*_0xd5cax34[_0xffeb[71]]/2)};var _0xd5cax6c={"\x73\x77\x69\x6D\x6C\x61\x6E\x65":_0xd5cax64,"\x66\x6F\x6C\x64\x65\x72":_0xd5cax61,"\x63\x75\x62\x65":_0xd5cax66,"\x63\x61\x72\x64":_0xd5cax68,"\x6E\x6F\x74\x65":_0xd5cax69,"\x73\x74\x65\x70":_0xd5cax6a,"\x74\x61\x70\x65":_0xd5cax6b};var _0xd5cax6d=mxGraph[_0xffeb[0]][_0xffeb[144]];mxGraph[_0xffeb[0]][_0xffeb[144]]=function(_0xd5cax33){if(_0xd5cax33!=null){var _0xd5cax6e=_0xd5cax6c[_0xd5cax33[_0xffeb[4]][_0xffeb[123]]];if(_0xd5cax6e!=null){return  new _0xd5cax6e(_0xd5cax33)}};return _0xd5cax6d[_0xffeb[30]](this,arguments)}};mxGraph[_0xffeb[0]][_0xffeb[145]]=function(_0xd5cax6f,_0xd5cax50){if(_0xd5cax6f!=null&&_0xd5cax6f[_0xffeb[123]]!=null){if(_0xd5cax6f[_0xffeb[123]][_0xffeb[146]]!=null){if(_0xd5cax6f[_0xffeb[123]][_0xffeb[146]]!=null){return _0xd5cax6f[_0xffeb[123]][_0xffeb[146]][_0xffeb[147]]}}else {if(_0xd5cax6f[_0xffeb[123]][_0xffeb[147]]!=null){return _0xd5cax6f[_0xffeb[123]][_0xffeb[147]]}}};return null};mxRectangleShape[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxLabel[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];mxImageShape[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];mxSwimlane[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];_0xd5cax14[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];_0xd5cax9[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];_0xd5cax10[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];_0xd5cax1[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];_0xd5caxa[_0xffeb[0]][_0xffeb[147]]=mxRectangleShape[_0xffeb[0]][_0xffeb[147]];mxCylinder[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.15,0.05),false), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.85,0.05),false), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.3),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.7),true), new mxConnectionConstraint( new mxPoint(0.15,0.95),false), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.85,0.95),false)];_0xd5cax25[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0.1),false), new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.75,0.1),false), new mxConnectionConstraint( new mxPoint(0,1/3),false), new mxConnectionConstraint( new mxPoint(0,1),false), new mxConnectionConstraint( new mxPoint(1,1/3),false), new mxConnectionConstraint( new mxPoint(1,1),false), new mxConnectionConstraint( new mxPoint(0.5,0.5),false)];_0xd5cax28[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxActor[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.25,0.2),false), new mxConnectionConstraint( new mxPoint(0.1,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.75,0.25),false), new mxConnectionConstraint( new mxPoint(0.9,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];_0xd5cax11[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0,0.35),false), new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.65),false), new mxConnectionConstraint( new mxPoint(1,0.35),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.65),false), new mxConnectionConstraint( new mxPoint(0.25,1),false), new mxConnectionConstraint( new mxPoint(0.75,0),false)];_0xd5cax13[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true), new mxConnectionConstraint( new mxPoint(0.1,0.25),false), new mxConnectionConstraint( new mxPoint(0.2,0.5),false), new mxConnectionConstraint( new mxPoint(0.1,0.75),false), new mxConnectionConstraint( new mxPoint(0.9,0.25),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(0.9,0.75),false)];mxLine[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0.25,0.5),false), new mxConnectionConstraint( new mxPoint(0.75,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.5),false)];_0xd5cax26[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.5,1),false)];mxEllipse[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0,0),true), new mxConnectionConstraint( new mxPoint(1,0),true), new mxConnectionConstraint( new mxPoint(0,1),true), new mxConnectionConstraint( new mxPoint(1,1),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5))];mxDoubleEllipse[_0xffeb[0]][_0xffeb[147]]=mxEllipse[_0xffeb[0]][_0xffeb[147]];mxRhombus[_0xffeb[0]][_0xffeb[147]]=mxEllipse[_0xffeb[0]][_0xffeb[147]];mxTriangle[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(1,0.5),true)];mxHexagon[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.375,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.625,0),true), new mxConnectionConstraint( new mxPoint(0.125,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0.125,0.75),false), new mxConnectionConstraint( new mxPoint(0.875,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(0.875,0.75),false), new mxConnectionConstraint( new mxPoint(0.375,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.625,1),true)];mxCloud[_0xffeb[0]][_0xffeb[147]]=[ new mxConnectionConstraint( new mxPoint(0.25,0.25),false), new mxConnectionConstraint( new mxPoint(0.4,0.1),false), new mxConnectionConstraint( new mxPoint(0.16,0.55),false), new mxConnectionConstraint( new mxPoint(0.07,0.4),false), new mxConnectionConstraint( new mxPoint(0.31,0.8),false), new mxConnectionConstraint( new mxPoint(0.13,0.77),false), new mxConnectionConstraint( new mxPoint(0.8,0.8),false), new mxConnectionConstraint( new mxPoint(0.55,0.95),false), new mxConnectionConstraint( new mxPoint(0.875,0.5),false), new mxConnectionConstraint( new mxPoint(0.96,0.7),false), new mxConnectionConstraint( new mxPoint(0.625,0.2),false), new mxConnectionConstraint( new mxPoint(0.88,0.25),false)];mxArrow[_0xffeb[0]][_0xffeb[147]]=null})()
\ No newline at end of file
+/**
+ * $Id: Shapes.js,v 1.13 2013-02-02 06:44:30 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+
+/**
+ * Registers shapes.
+ */
+(function()
+{
+       // Cube Shape, supports size style
+       function CubeShape() { };
+       CubeShape.prototype = new mxCylinder();
+       CubeShape.prototype.constructor = CubeShape;
+       CubeShape.prototype.size = 20;
+       CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+               if (isForeground)
+               {
+                       path.moveTo(s, h);
+                       path.lineTo(s, s);
+                       path.lineTo(0, 0);
+                       path.moveTo(s, s);
+                       path.lineTo(w, s);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w - s, 0);
+                       path.lineTo(w, s);
+                       path.lineTo(w, h);
+                       path.lineTo(s, h);
+                       path.lineTo(0, h - s);
+                       path.lineTo(0, 0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
+
+       // Note Shape, supports size style
+       function NoteShape() { };
+       NoteShape.prototype = new mxCylinder();
+       NoteShape.prototype.constructor = NoteShape;
+       NoteShape.prototype.size = 30;
+       NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+               if (isForeground)
+               {
+                       path.moveTo(w - s, 0);
+                       path.lineTo(w - s, s);
+                       path.lineTo(w, s);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w - s, 0);
+                       path.lineTo(w, s);
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.lineTo(0, 0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
+
+       // Folder Shape, supports tabWidth, tabHeight styles
+       function FolderShape() { };
+       FolderShape.prototype = new mxCylinder();
+       FolderShape.prototype.constructor = FolderShape;
+       FolderShape.prototype.tabWidth = 60;
+       FolderShape.prototype.tabHeight = 20;
+       FolderShape.prototype.tabPosition = 'right';
+       FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
+               var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
+               var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
+               var dx = Math.min(w, tw);
+               var dy = Math.min(h, th);
+
+               if (isForeground)
+               {
+                       if (tp == 'left')
+                       {
+                               path.moveTo(0, dy);
+                               path.lineTo(dx, dy);
+                       }
+                       // Right is default
+                       else
+                       {
+                               path.moveTo(w - dx, dy);
+                               path.lineTo(w, dy);
+                       }
+                       
+                       path.end();
+               }
+               else
+               {
+                       if (tp == 'left')
+                       {
+                               path.moveTo(0, 0);
+                               path.lineTo(dx, 0);
+                               path.lineTo(dx, dy);
+                               path.lineTo(w, dy);
+                       }
+                       // Right is default
+                       else
+                       {
+                               path.moveTo(0, dy);
+                               path.lineTo(w - dx, dy);
+                               path.lineTo(w - dx, 0);
+                               path.lineTo(w, 0);
+                       }
+                       
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.lineTo(0, dy);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
+
+       // Card Shape, supports size style
+       function CardShape() { };
+       CardShape.prototype = new mxCylinder();
+       CardShape.prototype.constructor = CardShape;
+       CardShape.prototype.size = 30;
+       CardShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+               if (!isForeground)
+               {
+                       path.moveTo(s, 0);
+                       path.lineTo(w, 0);
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.lineTo(0, s);
+                       path.lineTo(s, 0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
+
+       // Tape Shape, supports size style
+       function TapeShape() { };
+       TapeShape.prototype = new mxCylinder();
+       TapeShape.prototype.constructor = TapeShape;
+       TapeShape.prototype.size = 0.4;
+       TapeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s = mxUtils.getValue(this.style, 'size', this.size);
+               var dy = h * s;
+               var fy = 1.4;
+
+               if (!isForeground)
+               {
+                       path.moveTo(0, dy / 2);
+                       path.quadTo(w / 4, dy * fy, w / 2, dy / 2);
+                       path.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
+                       path.lineTo(w, h - dy / 2);
+                       path.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+                       path.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+                       path.lineTo(0, dy / 2);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
+
+       // Tape Shape, supports size style
+       function StepShape() { };
+       StepShape.prototype = new mxCylinder();
+       StepShape.prototype.constructor = StepShape;
+       StepShape.prototype.size = 0.2;
+       StepShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var s =  w * mxUtils.getValue(this.style, 'size', this.size);
+
+               if (!isForeground)
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w - s, 0);
+                       path.lineTo(w, h / 2);
+                       path.lineTo(w - s, h);
+                       path.lineTo(0, h);
+                       path.lineTo(s, h / 2);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
+
+       // Plus Shape
+       function PlusShape()
+       {
+               mxRectangleShape.call(this);
+       };
+       mxUtils.extend(PlusShape, mxRectangleShape);
+       PlusShape.prototype.isHtmlAllowed = function()
+       {
+               return false;
+       };
+       PlusShape.prototype.paintForeground = function(c, x, y, w, h)
+       {
+               var border = Math.min(w / 5, h / 5) + 1;
+               
+               c.begin();
+               c.moveTo(x + w / 2, y + border);
+               c.lineTo(x + w / 2, y + h - border);
+               c.moveTo(x + border, y + h / 2);
+               c.lineTo(x + w - border, y + h / 2);
+               c.end();
+               c.stroke();
+               mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+       };
+
+       mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
+
+       // CompositeShape
+       function ExtendedShape()
+       {
+               mxRectangleShape.call(this);
+       };
+       mxUtils.extend(ExtendedShape, mxRectangleShape);
+       ExtendedShape.prototype.isHtmlAllowed = function()
+       {
+               return false;
+       };
+       ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
+       {
+               if (this.style != null)
+               {
+                       if (this.style['double'] == 1)
+                       {
+                               var inset = Math.max(2, this.strokewidth + 1);
+       
+                               mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+                               mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+                               
+                               x += inset;
+                               y += inset;
+                               w -= 2 * inset;
+                               h -= 2 * inset;
+                       }
+                       
+                       c.setDashed(false);
+                       
+                       // Draws the symbols defined in the style. The symbols are
+                       // numbered from 1...n. Possible postfixes are align,
+                       // verticalAlign, spacing, arcSpacing, width, height
+                       var counter = 0;
+                       var shape = null;
+                       
+                       do
+                       {
+                               shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
+                               
+                               if (shape != null)
+                               {
+                                       var align = this.style['symbol' + counter + 'Align'];
+                                       var valign = this.style['symbol' + counter + 'VerticalAlign'];
+                                       var width = this.style['symbol' + counter + 'Width'];
+                                       var height = this.style['symbol' + counter + 'Height'];
+                                       var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
+                                       var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
+                                       
+                                       if (arcspacing != null)
+                                       {
+                                               spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
+                                       }
+                                       
+                                       var x2 = x;
+                                       var y2 = y;
+                                       
+                                       if (align == mxConstants.ALIGN_CENTER)
+                                       {
+                                               x2 += (w - width) / 2;
+                                       }
+                                       else if (align == mxConstants.ALIGN_RIGHT)
+                                       {
+                                               x2 += w - width - spacing;
+                                       }
+                                       else
+                                       {
+                                               x2 += spacing;
+                                       }
+                                       
+                                       if (valign == mxConstants.ALIGN_MIDDLE)
+                                       {
+                                               y2 += (h - height) / 2;
+                                       }
+                                       else if (valign == mxConstants.ALIGN_BOTTOM)
+                                       {
+                                               y2 += h - height - spacing;
+                                       }
+                                       else
+                                       {
+                                               y2 += spacing;
+                                       }
+                                       
+                                       c.save();
+                                       
+                                       // Small hack to pass style along into subshape
+                                       var tmp = new shape();
+                                       // TODO: Clone style and override settings (eg. strokewidth)
+                                       tmp.style = this.style;
+                                       shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
+                                       c.restore();
+                               }
+                               
+                               counter++;
+                       }
+                       while (shape != null);
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
+       
+       // Tape Shape, supports size style
+       function MessageShape() { };
+       MessageShape.prototype = new mxCylinder();
+       MessageShape.prototype.constructor = MessageShape;
+       MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               if (isForeground)
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w / 2, h / 2);
+                       path.lineTo(w, 0);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(0, 0);
+                       path.lineTo(w, 0);
+                       path.lineTo(w, h);
+                       path.lineTo(0, h);
+                       path.close();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
+       
+       // New Actor Shape
+       function UmlActorShape() { };
+       UmlActorShape.prototype = new mxCylinder();
+       UmlActorShape.prototype.constructor = UmlActorShape;
+       UmlActorShape.prototype.addPipe = true;
+       UmlActorShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var width = w / 3;
+               var height = h / 4;
+               
+               if (!isForeground)
+               {
+                       path.moveTo(w / 2, height);
+                       path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
+                       path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
+                       path.close();
+
+                       path.moveTo(w / 2, height);
+                       path.lineTo(w / 2, 2 * h / 3);
+                       
+                       // Arms
+                       path.moveTo(w / 2, h / 3);
+                       path.lineTo(0, h / 3);
+                       path.moveTo(w / 2, h / 3);
+                       path.lineTo(w, h / 3);
+                       
+                       // Legs
+                       path.moveTo(w / 2, 2 * h / 3);
+                       path.lineTo(0, h);
+                       path.moveTo(w / 2, 2 * h / 3);
+                       path.lineTo(w, h);
+                       path.end();
+               }
+       };
+
+       // Replaces existing actor shape
+       mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
+
+       // New Actor Shape
+       function LollipopShape() { };
+       LollipopShape.prototype = new mxCylinder();
+       LollipopShape.prototype.constructor = LollipopShape;
+       LollipopShape.prototype.size = 10;
+       LollipopShape.prototype.addPipe = true;
+       LollipopShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var ss = mxUtils.getValue(this.style, 'size', this.size);
+               var width = ss * 2 / 3;
+               var height = ss;
+               
+               if (!isForeground)
+               {
+                       path.moveTo(w / 2, height);
+                       path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
+                       path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
+                       path.close();
+
+                       path.moveTo(w / 2, height);
+                       path.lineTo(w / 2, h);
+                       path.end();
+               }
+       };
+
+       // Replaces existing actor shape
+       mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
+       
+       // Folder Shape, supports tabWidth, tabHeight styles
+       function ComponentShape() { };
+       ComponentShape.prototype = new mxCylinder();
+       ComponentShape.prototype.constructor = ComponentShape;
+       ComponentShape.prototype.jettyWidth = 32;
+       ComponentShape.prototype.jettyHeight = 12;
+       ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+       {
+               var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
+               var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
+               var x0 = dx / 2;
+               var x1 = x0 + dx / 2;
+               var y0 = 0.3 * h - dy / 2;
+               var y1 = 0.7 * h - dy / 2;
+
+               if (isForeground)
+               {
+                       path.moveTo(x0, y0);
+                       path.lineTo(x1, y0);
+                       path.lineTo(x1, y0 + dy);
+                       path.lineTo(x0, y0 + dy);
+                       path.moveTo(x0, y1);
+                       path.lineTo(x1, y1);
+                       path.lineTo(x1, y1 + dy);
+                       path.lineTo(x0, y1 + dy);
+                       path.end();
+               }
+               else
+               {
+                       path.moveTo(x0, 0);
+                       path.lineTo(w, 0);
+                       path.lineTo(w, h);
+                       path.lineTo(x0, h);
+                       path.lineTo(x0, y1 + dy);
+                       path.lineTo(0, y1 + dy);
+                       path.lineTo(0, y1);
+                       path.lineTo(x0, y1);
+                       path.lineTo(x0, y0 + dy);
+                       path.lineTo(0, y0 + dy);
+                       path.lineTo(0, y0);
+                       path.lineTo(x0, y0);
+                       path.close();
+                       path.end();
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
+       
+       // State Shapes derives from double ellipse
+       function StateShape() { };
+       StateShape.prototype = new mxDoubleEllipse();
+       StateShape.prototype.constructor = StateShape;
+       StateShape.prototype.outerStroke = true;
+       StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
+       {
+               var inset = Math.min(4, Math.min(w / 5, h / 5));
+               
+               if (w > 0 && h > 0)
+               {
+                       c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+                       c.fillAndStroke();
+               }
+               
+               c.setShadow(false);
+
+               if (this.outerStroke)
+               {
+                       c.ellipse(x, y, w, h);
+                       c.stroke();                     
+               }
+       };
+
+       mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
+
+       function StartStateShape() { };
+       StartStateShape.prototype = new StateShape();
+       StartStateShape.prototype.constructor = StartStateShape;
+       StartStateShape.prototype.outerStroke = false;
+       
+       mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
+
+       // Image export for state shapes
+       var imageExportInitShapes = mxImageExport.prototype.initShapes;
+       mxImageExport.prototype.initShapes = function()
+       {
+               imageExportInitShapes.apply(this, arguments);
+
+               function createStateShape(outerStroke)
+               {
+                       return {
+                               drawShape: function(canvas, state, bounds, background)
+                               {
+                                       var x = bounds.x;
+                                       var y = bounds.y;
+                                       var w = bounds.width;
+                                       var h = bounds.height;
+                                       
+                                       if (background)
+                                       {
+                                               var inset = Math.min(4, Math.min(w / 5, h / 5));
+                                               x += inset;
+                                               y += inset;
+                                               w -= 2 * inset;
+                                               h -= 2 * inset;
+                                               
+                                               if (w > 0 && h > 0)
+                                               {
+                                                       canvas.ellipse(x, y, w, h);
+                                               }
+                                               
+                                               return true;
+                                       }
+                                       else
+                                       {
+                                               canvas.fillAndStroke();
+               
+                                               if (outerStroke)
+                                               {
+                                                       canvas.ellipse(x, y, w, h);
+                                                       canvas.stroke();
+                                               }
+                                       }
+                               }
+                       };
+               };
+               
+               this.shapes['endState'] = createStateShape(true);
+               this.shapes['startState'] = createStateShape(false);
+       };
+
+       // Defines custom edge shape
+       function LinkShape()
+       {
+               mxArrow.call(this);
+       };
+       mxUtils.extend(LinkShape, mxArrow);
+       LinkShape.prototype.paintEdgeShape = function(c, pts)
+       {
+               var width = 10;
+
+               // Base vector (between end points)
+               var p0 = pts[0];
+               var pe = pts[pts.length - 1];
+               
+               var dx = pe.x - p0.x;
+               var dy = pe.y - p0.y;
+               var dist = Math.sqrt(dx * dx + dy * dy);
+               var length = dist;
+               
+               // Computes the norm and the inverse norm
+               var nx = dx / dist;
+               var ny = dy / dist;
+               var basex = length * nx;
+               var basey = length * ny;
+               var floorx = width * ny/3;
+               var floory = -width * nx/3;
+               
+               // Computes points
+               var p0x = p0.x - floorx / 2;
+               var p0y = p0.y - floory / 2;
+               var p1x = p0x + floorx;
+               var p1y = p0y + floory;
+               var p2x = p1x + basex;
+               var p2y = p1y + basey;
+               var p3x = p2x + floorx;
+               var p3y = p2y + floory;
+               // p4 not necessary
+               var p5x = p3x - 3 * floorx;
+               var p5y = p3y - 3 * floory;
+               
+               c.begin();
+               c.moveTo(p1x, p1y);
+               c.lineTo(p2x, p2y);
+               c.moveTo(p5x + floorx, p5y + floory);
+               c.lineTo(p0x, p0y);
+               c.stroke();
+       };
+
+       // Registers the link shape
+       mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
+
+       // Registers and defines the custom marker
+       mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
+       {
+               var nx = unitX * (size + sw + 1);
+               var ny = unitY * (size + sw + 1);
+
+               return function()
+               {
+                       canvas.begin();
+                       canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
+                       canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
+                       canvas.stroke();
+               };
+       });
+
+       // Implements custom handlers
+       var SPECIAL_HANDLE_INDEX = -99;
+
+       // Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
+       if (typeof(mxVertexHandler) != 'undefined')
+       {
+               function mxExtVertexHandler(state)
+               {
+                       mxVertexHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
+       
+               mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
+               
+               mxExtVertexHandler.prototype.init = function()
+               {
+                       this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
+                       var graph = this.state.view.graph;
+       
+                       if (this.handleImage != null)
+                       {
+                               var bounds = new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height);
+                               this.specialHandle = new mxImageShape(bounds, this.handleImage.src);
+                       }
+                       else
+                       {
+                               var size = 10;
+                               var bounds = new mxRectangle(0, 0, size, size);
+                               this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+                       }
+                       
+                       this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
+                                       mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
+                       this.specialHandle.init(graph.getView().getOverlayPane());
+                       this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
+       
+                       mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
+                       mxVertexHandler.prototype.init.apply(this, arguments);
+               };
+               
+               mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
+               {
+                       return 'default';
+               };
+               
+               mxExtVertexHandler.prototype.redraw = function()
+               {
+                       mxVertexHandler.prototype.redraw.apply(this, arguments);
+       
+                       var size = this.specialHandle.bounds.width;
+                       this.specialHandle.bounds = this.getSpecialHandleBounds(size);
+                       this.specialHandle.redraw();
+               };
+
+               mxExtVertexHandler.prototype.destroy = function()
+               {
+                       mxVertexHandler.prototype.destroy.apply(this, arguments);
+                       
+                       if (this.specialHandle != null)
+                       {
+                               this.specialHandle.destroy();
+                               this.specialHandle = null;
+                       }
+               };
+               
+               mxExtVertexHandler.prototype.getHandleForEvent = function(me)
+               {
+                       if (me.isSource(this.specialHandle))
+                       {
+                               return SPECIAL_HANDLE_INDEX;
+                       }
+                       
+                       return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
+               };
+
+               mxExtVertexHandler.prototype.mouseMove = function(sender, me)
+               {
+                       if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+                       {
+                               var point = new mxPoint(me.getGraphX(), me.getGraphY());
+                               this.constrainPoint(point);
+                               var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
+                               var scale = this.graph.getView().scale;
+                               
+                               if (gridEnabled && this.useGridForSpecialHandle)
+                               {
+                                       point.x = this.graph.snap(point.x / scale) * scale;
+                                       point.y = this.graph.snap(point.y / scale) * scale;
+                               }
+                               
+                               this.updateStyle(point);                        
+                               this.moveSizerTo(this.specialHandle, point.x, point.y);
+                               this.state.view.graph.cellRenderer.redraw(this.state, true);
+                               me.consume();
+                       }
+                       else
+                       {
+                               mxVertexHandler.prototype.mouseMove.apply(this, arguments);
+                       }
+               };
+
+               mxExtVertexHandler.prototype.mouseUp = function(sender, me)
+               {
+                       if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+                       {
+                               this.applyStyle();
+                               this.reset();
+                               me.consume();
+                       }
+                       else
+                       {
+                               mxVertexHandler.prototype.mouseUp.apply(this, arguments);
+                       }
+               };
+
+               mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
+               {
+                       var rotation = this.state.shape.getShapeRotation();
+                       var alpha = mxUtils.toRadians(rotation);
+                       var cos = Math.cos(alpha);
+                       var sin = Math.sin(alpha);
+                       
+                       var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+                       
+                       if (this.state.shape.isPaintBoundsInverted())
+                       {
+                               var t = (bounds.width - bounds.height) / 2;
+                               bounds.x += t;
+                               bounds.y -= t;
+                               var tmp = bounds.width;
+                               bounds.width = bounds.height;
+                               bounds.height = tmp;
+                       }
+       
+                       var pt = this.getSpecialHandlePoint(bounds);
+
+                       if (this.state.shape.flipH)
+                       {
+                               pt.x = 2 * bounds.x + bounds.width - pt.x;
+                       }
+                       
+                       if (this.state.shape.flipV)
+                       {
+                               pt.y = 2 * bounds.y + bounds.height - pt.y;
+                       }
+                       
+                       pt = mxUtils.getRotatedPoint(pt, cos, sin,
+                               new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+                       return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
+               };
+               
+               mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       // Hook for subclassers
+                       return null;
+               };
+       
+               mxExtVertexHandler.prototype.updateStyle = function(point)
+               {
+                       // Hook for subclassers
+               };
+               
+               mxExtVertexHandler.prototype.constrainPoint = function(point)
+               {
+                       point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
+                       point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
+               };
+               
+               mxExtVertexHandler.prototype.applyStyle = function()
+               {
+                       // Hook for subclassers
+               };
+
+               // Folder Handler
+               function mxFolderHandler(state)
+               {
+                       mxExtVertexHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
+
+               mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
+                       var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
+                       
+                       var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+                       var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
+       
+                       return new mxPoint(x, bounds.y + th);
+               };
+               
+               mxFolderHandler.prototype.updateStyle = function(point)
+               {
+                       var rotation = this.state.shape.getShapeRotation();
+                       var alpha = mxUtils.toRadians(rotation);
+                       var cos = Math.cos(-alpha);
+                       var sin = Math.sin(-alpha);
+
+                       var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+                       
+                       if (this.state.shape.isPaintBoundsInverted())
+                       {
+                               var t = (bounds.width - bounds.height) / 2;
+                               bounds.x += t;
+                               bounds.y -= t;
+                               var tmp = bounds.width;
+                               bounds.width = bounds.height;
+                               bounds.height = tmp;
+                       }
+       
+                       var pt = new mxPoint(point.x, point.y);
+                       pt = mxUtils.getRotatedPoint(pt, cos, sin,
+                               new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+                       if (this.state.shape.flipH)
+                       {
+                               pt.x = 2 * bounds.x + bounds.width - pt.x;
+                       }
+                       
+                       if (this.state.shape.flipV)
+                       {
+                               pt.y = 2 * bounds.y + bounds.height - pt.y;
+                       }
+                       
+                       var result = this.updateStyleUnrotated(pt, bounds);
+               
+                       // Modifies point to use rotated coordinates of return value
+                       if (result != null)
+                       {
+                               if (this.state.shape.flipH)
+                               {
+                                       result.x = 2 * bounds.x + bounds.width - result.x;
+                               }
+                               
+                               if (this.state.shape.flipV)
+                               {
+                                       result.y = 2 * bounds.y + bounds.height - result.y;
+                               }
+                               
+                               cos = Math.cos(alpha);
+                               sin = Math.sin(alpha);
+                               result = mxUtils.getRotatedPoint(result, cos, sin,
+                                               new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+                               point.x = result.x;
+                               point.y = result.y;
+                       }
+               };
+               
+               mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+                       var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
+                       var th = pt.y - bounds.y;
+                       
+                       var scale = this.graph.getView().scale;
+                       this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
+                       this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
+               };
+               
+               mxFolderHandler.prototype.applyStyle = function()
+               {
+                       var model = this.graph.getModel();
+                       model.beginUpdate();
+                       try
+                       {
+                               this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
+                               this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
+                       }
+                       finally
+                       {
+                               model.endUpdate();
+                       }
+               };
+               
+               // Swimlane Handler
+               function mxSwimlaneHandler(state)
+               {
+                       mxFolderHandler.call(this, state);
+               };
+               
+               mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
+               
+               mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
+
+                       return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
+               };
+               
+               mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
+               {
+                       point.x = bounds.x + bounds.width / 2;
+                       startSize = point.y - bounds.y;
+                       var scale = this.graph.getView().scale;
+                       this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
+                       
+                       return point;
+               };
+               
+               mxSwimlaneHandler.prototype.applyStyle = function()
+               {
+                       this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
+               };
+
+               // Cube Handler
+               function mxCubeHandler(state)
+               {
+                       mxFolderHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxCubeHandler, mxFolderHandler);
+               
+               mxCubeHandler.prototype.defaultValue = 20;
+       
+               mxCubeHandler.prototype.scaleFactor = 1;
+               
+               mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var sz = Math.min(bounds.width, Math.min(bounds.height,
+                               mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+                       
+                       return new mxPoint(bounds.x + sz, bounds.y + sz);
+               };
+       
+               mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
+                                       Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+                       var scale = this.graph.getView().scale;
+                       this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+                       
+                       // Stays on the diagonal
+                       return new mxPoint(bounds.x + size, bounds.y + size);
+               };
+               
+               mxCubeHandler.prototype.applyStyle = function()
+               {
+                       this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
+               };
+               
+               // Card Handler
+               function mxCardHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxCardHandler, mxCubeHandler);
+               
+               mxCardHandler.prototype.defaultValue = 30;
+       
+               mxCardHandler.prototype.scaleFactor = 2;
+               
+               // Note Handler
+               function mxNoteHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxNoteHandler, mxCubeHandler);
+               
+               mxNoteHandler.prototype.defaultValue = 30;
+       
+               mxNoteHandler.prototype.scaleFactor = 1;
+               
+               mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var scale = this.graph.getView().scale;
+                       var sz = Math.min(bounds.width, Math.min(bounds.height,
+                                       mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+                       
+                       return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
+               };
+               
+               mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
+                                       Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+                       var scale = this.graph.getView().scale;
+                       this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+                       
+                       // Stays on the diagonal
+                       return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
+               };
+               
+               // Step Handler
+               function mxStepHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxStepHandler, mxCubeHandler);
+               
+               mxStepHandler.prototype.defaultValue = 0.2;
+       
+               mxStepHandler.prototype.scaleFactor = 1;
+               
+               mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+                       
+                       return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
+               };
+       
+               mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
+                       this.state.style['size'] = size;
+                       
+                       return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
+               };
+               
+               // Tape Handler
+               function mxTapeHandler(state)
+               {
+                       mxCubeHandler.call(this, state);
+               };
+       
+               mxUtils.extend(mxTapeHandler, mxCubeHandler);
+               
+               mxTapeHandler.prototype.defaultValue = 0.4;
+       
+               mxTapeHandler.prototype.scaleFactor = 1;
+               
+               mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
+               {
+                       var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+       
+                       return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
+               };
+       
+               mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+               {
+                       var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
+                       this.state.style['size'] = size;
+                       
+                       return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
+               };
+               
+               var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
+                               'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler};
+
+               var mxGraphCreateHandler = mxGraph.prototype.createHandler;
+               mxGraph.prototype.createHandler = function(state)
+               {
+                       if (state != null)
+                       {
+                               var ctor = handlers[state.style['shape']];
+
+                               if (ctor != null)
+                               {
+                                       return new ctor(state);
+                               }
+                       }
+                       
+                       return mxGraphCreateHandler.apply(this, arguments);
+               };
+       }
+       
+       // Constraints
+       mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
+       {
+               if (terminal != null && terminal.shape != null)
+               {
+                       if (terminal.shape.stencil != null)
+                       {
+                               if (terminal.shape.stencil != null)
+                               {
+                                       return terminal.shape.stencil.constraints;
+                               }
+                       }
+                       else if (terminal.shape.constraints != null)
+                       {
+                               return terminal.shape.constraints;
+                       }
+               }
+
+               return null;
+       };
+
+       mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+                                                new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+       mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
+       mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
+       PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+       mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
+                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
+                                new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+                                new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+                                new mxConnectionConstraint(new mxPoint(1, 0.3), true),
+                                new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                new mxConnectionConstraint(new mxPoint(1, 0.7), true),
+                                new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
+                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
+       UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
+                                                 new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+                                                 new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
+                                                new mxConnectionConstraint(new mxPoint(0, 1/3), false),
+                                                new mxConnectionConstraint(new mxPoint(0, 1), false),
+                                                new mxConnectionConstraint(new mxPoint(1, 1/3), false),
+                                                new mxConnectionConstraint(new mxPoint(1, 1), false),
+                                                new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
+       ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                                 new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+                                                new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                                new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+                                                new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+       mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
+                                new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
+                                new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+                                new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
+                                new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
+                                new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+                                new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+       TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.65), false),
+                                          new mxConnectionConstraint(new mxPoint(1, 0.35), false),
+                                               new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+                                               new mxConnectionConstraint(new mxPoint(1, 0.65), false),
+                                                                               new mxConnectionConstraint(new mxPoint(0.25, 1), false),
+                                                                               new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
+       // TODO: Relative ports
+       StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+                                                       new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                       new mxConnectionConstraint(new mxPoint(0.75, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
+                                          new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
+                                          new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
+                                          new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
+                                               new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+                                               new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
+       mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
+                                                                       new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
+       LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+                                                                               new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+       mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                                  new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
+       mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
+       mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
+       mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+                                           new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
+       mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
+                                           new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0.625, 0), true),
+                                          new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
+                                          new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
+                                          new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+                                          new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
+                                          new mxConnectionConstraint(new mxPoint(0.375, 1), true),
+                                           new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+                                          new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
+       mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
+                                        new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
+                                        new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
+                                        new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
+                                        new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
+                                        new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
+                                        new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
+                                        new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
+                                        new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
+                                        new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
+                                        new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
+                                        new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
+       mxArrow.prototype.constraints = null;
+})();
index 211bc88..bdcb8ea 100644 (file)
@@ -1 +1,904 @@
-var _0x6706=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x61\x6C\x65\x74\x74\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x67\x72\x61\x70\x68","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x65\x64\x69\x74\x6F\x72","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x6D\x6F\x75\x73\x65\x75\x70","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x74\x6F\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C\x61\x74\x65\x64\x54\x61\x72\x67\x65\x74","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x74\x6F\x6F\x6C\x74\x69\x70\x2E\x70\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x6F\x67","\x65\x6E\x74\x72\x79","\x67\x65\x74","\x2F\x65\x6E\x74\x72\x79\x2F","\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x73\x74\x61\x72\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x65\x6E\x64","\x61\x64\x64\x49\x6D\x61\x67\x65\x50\x61\x6C\x65\x74\x74\x65","\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74","\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F","\x61\x6E\x73\x77\x65\x72","\x68\x61\x6E\x67\x75\x70","\x64\x69\x61\x6C","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x71\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F","\x73\x65\x74","\x6D\x61\x74\x68","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F","\x6D\x65\x6E\x75","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x74\x74\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F","\x72\x65\x63\x6F\x72\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x53\x65\x72\x76\x65\x72","\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x73\x65\x72\x76\x65\x72\x2F","\x64\x61\x74\x61\x62\x61\x73\x65","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x63\x61\x6C\x6C\x66\x6C\x6F\x77","\x2F\x63\x61\x6C\x6C\x66\x6C\x6F\x77\x2F","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x69\x66","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x76\x73\x77\x69\x74\x63\x68","\x73\x74\x61\x74\x73","\x2F\x73\x74\x61\x74\x73\x2F","\x67\x6F\x61\x6C","\x67\x65\x6E\x65\x72\x61\x6C","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F","\x6E\x6F\x6F\x70","\x73\x79\x73\x74\x65\x6D","\x61\x67\x69","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x65\x6E\x61\x62\x6C\x65\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x42\x6F\x72\x64\x65\x72","\x74\x68\x75\x6D\x62\x42\x6F\x72\x64\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x44\x65\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x61\x72\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x69\x70\x61\x72\x74\x2F\x47\x65\x61\x72\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x74\x68\x75\x6D\x62\x57\x69\x64\x74\x68","\x74\x68\x75\x6D\x62\x48\x65\x69\x67\x68\x74","\x74\x68\x75\x6D\x62\x50\x61\x64\x64\x69\x6E\x67","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x53\x69\x7A\x65","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70","\x74\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x6F\x6C\x74\x69\x70","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x72\x61\x70\x68\x32","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x76\x69\x65\x77","\x49\x53\x5F\x53\x56\x47","\x63\x61\x6E\x76\x61\x73","\x72\x65\x6C\x61\x74\x69\x76\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x31\x34\x70\x78","\x68\x65\x69\x67\x68\x74","\x32\x37\x70\x78","\x64\x69\x73\x70\x6C\x61\x79","\x62\x6C\x6F\x63\x6B","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x63\x6C\x65\x61\x72","\x6D\x6F\x64\x65\x6C","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x76\x69\x73\x69\x62\x6C\x65","\x70\x78","\x6C\x65\x6E\x67\x74\x68","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x67\x72\x61\x79","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x31\x30\x30\x25","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x32\x70\x78","\x36\x70\x78","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","","\x77\x72\x69\x74\x65","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x74\x6F\x70","\x6E\x6F\x6E\x65","\x78","\x6D\x69\x6E","\x79","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x6D\x61\x78","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x29","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x65\x66\x74","\x64\x72\x61\x77\x50\x61\x6E\x65","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x54\x69\x74\x6C\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x68\x75\x6D\x62","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x66\x6C\x6F\x6F\x72","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x4E\x4F\x5F\x46\x4F","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x49\x53\x5F\x49\x45\x36","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x63\x75\x72\x73\x6F\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x49\x53\x5F\x49\x45","\x34\x70\x78","\x63\x72\x65\x61\x74\x65\x49\x74\x65\x6D","\x67\x65\x49\x74\x65\x6D","\x70\x61\x64\x64\x69\x6E\x67","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x63\x72\x65\x61\x74\x65\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x72\x64\x65\x72","\x31\x70\x78\x20\x64\x61\x73\x68\x65\x64\x20\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x53\x6F\x75\x72\x63\x65","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x61\x70\x70\x6C\x79","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x6D\x6F\x75\x73\x65\x55\x70","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x61\x62\x73","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x64\x72\x6F\x70","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6C\x61\x62\x65\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65","\x6B\x65\x79","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x74\x2D\x49\x54","\x66\x69\x6C\x65\x5F\x69\x64","\x6F\x70\x74\x73","\x30","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x64\x69\x67\x69\x74","\x35","\x31","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x72\x65\x74\x72\x79","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x31\x30","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x6F\x64\x62\x63\x5F\x69\x64","\x71\x75\x65\x72\x79","\x6F\x75\x74\x70\x75\x74","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x72\x67\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x67\x6F\x74\x6F\x69\x66\x6D\x75\x6C\x74\x69\x74\x69\x6D\x65","\x64\x69\x67\x69\x74\x73","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x23","\x6E\x75\x6D\x62\x65\x72","\x74\x65\x78\x74","\x66\x69\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2D\x31","\x73\x69\x70\x5F\x69\x64","\x75\x72\x6C","\x36\x30","\x70\x68\x6F\x6E\x65","\x74\x72\x75\x6E\x6B\x5F\x69\x64","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x74","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x65\x75\x72\x69\x74\x61\x6C\x69\x61\x6E\x66\x65\x6D\x61\x6C\x65","\x71\x75\x65\x75\x65\x5F\x69\x64","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","\x33\x30\x30","\x6D\x61\x69\x6C\x62\x6F\x78","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x5F\x65\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x64\x61\x74\x61\x35","\x71\x75\x65\x75\x65\x6C\x6F\x67","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x6C\x69\x73\x74\x5F\x69\x64","\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x76\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x65\x64\x67\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x23\x66\x66\x66\x66\x66\x66","\x61\x64\x64\x50\x61\x6C\x65\x74\x74\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72","\x61\x64\x64\x46\x6F\x6C\x64\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66\x29","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x31\x30\x30\x25\x20\x35\x30\x25","\x77\x61\x69\x74","\x72\x65\x6D\x6F\x76\x65\x50\x61\x6C\x65\x74\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D"];_0x6706[0];function Sidebar(_0x6357x2,_0x6357x3){this[_0x6706[1]]=_0x6357x2;this[_0x6706[2]]=_0x6357x3;this[_0x6706[3]]= new Object();this[_0x6706[4]]=true;this[_0x6706[5]]= new Graph(document[_0x6706[7]](_0x6706[6]),null,null,this[_0x6706[1]][_0x6706[9]][_0x6706[5]][_0x6706[8]]());this[_0x6706[5]][_0x6706[10]]=false;this[_0x6706[5]][_0x6706[11]]=false;this[_0x6706[5]][_0x6706[12]](false);this[_0x6706[5]][_0x6706[13]]=false;this[_0x6706[5]][_0x6706[14]](false);this[_0x6706[5]][_0x6706[15]](false);this[_0x6706[5]][_0x6706[2]][_0x6706[17]][_0x6706[16]]=_0x6706[18];this[_0x6706[5]][_0x6706[2]][_0x6706[17]][_0x6706[19]]=_0x6706[20];document[_0x6706[22]][_0x6706[21]](this[_0x6706[5]][_0x6706[2]]);if(!mxClient[_0x6706[23]]){mxEvent[_0x6706[26]](document,_0x6706[24],mxUtils[_0x6706[25]](this,function(){this[_0x6706[4]]=true}));mxEvent[_0x6706[26]](_0x6357x3,_0x6706[27],mxUtils[_0x6706[25]](this,function(){this[_0x6706[4]]=true}));mxEvent[_0x6706[26]](document,_0x6706[28],mxUtils[_0x6706[25]](this,function(){this[_0x6706[4]]=false;this[_0x6706[29]]()}));mxEvent[_0x6706[26]](document,_0x6706[30],mxUtils[_0x6706[25]](this,function(_0x6357x4){var _0x6357x5=mxEvent[_0x6706[31]](_0x6357x4);while(_0x6357x5!=null){if(_0x6357x5==this[_0x6706[32]]){return};_0x6357x5=_0x6357x5[_0x6706[33]]};this[_0x6706[29]]()}));mxEvent[_0x6706[26]](document,_0x6706[34],mxUtils[_0x6706[25]](this,function(_0x6357x4){if(_0x6357x4[_0x6706[35]]==null&&_0x6357x4[_0x6706[36]]==null){this[_0x6706[29]]()}}))};this[_0x6706[37]](); new Image()[_0x6706[38]]=IMAGE_PATH+_0x6706[39]}Sidebar[_0x6706[40]][_0x6706[37]]=function(){var _0x6357x6=STENCIL_PATH;console[_0x6706[41]](_0x6357x6);this[_0x6706[49]](_0x6706[42],mxResources[_0x6706[43]](_0x6706[42]),_0x6357x6+_0x6706[44],_0x6706[45],[_0x6706[46],_0x6706[47],_0x6706[48]],[mxResources[_0x6706[43]](_0x6706[46]),mxResources[_0x6706[43]](_0x6706[47]),mxResources[_0x6706[43]](_0x6706[48])]);this[_0x6706[49]](_0x6706[50],mxResources[_0x6706[43]](_0x6706[50]),_0x6357x6+_0x6706[51],_0x6706[45],[_0x6706[52],_0x6706[53],_0x6706[54],_0x6706[55],_0x6706[56],_0x6706[57]],[mxResources[_0x6706[43]](_0x6706[52]),mxResources[_0x6706[43]](_0x6706[53]),mxResources[_0x6706[43]](_0x6706[54]),mxResources[_0x6706[43]](_0x6706[55]),mxResources[_0x6706[43]](_0x6706[56]),mxResources[_0x6706[43]](_0x6706[57])]);this[_0x6706[49]](_0x6706[58],mxResources[_0x6706[43]](_0x6706[58]),_0x6357x6+_0x6706[59],_0x6706[45],[_0x6706[60],_0x6706[61]],[mxResources[_0x6706[43]](_0x6706[60]),mxResources[_0x6706[43]](_0x6706[61])]);this[_0x6706[49]](_0x6706[62],mxResources[_0x6706[43]](_0x6706[62]),_0x6357x6+_0x6706[63],_0x6706[45],[_0x6706[62],_0x6706[64],_0x6706[65],_0x6706[66],_0x6706[67],_0x6706[68],_0x6706[69],_0x6706[70]],[mxResources[_0x6706[43]](_0x6706[62]),mxResources[_0x6706[43]](_0x6706[64]),mxResources[_0x6706[43]](_0x6706[65]),mxResources[_0x6706[43]](_0x6706[66]),mxResources[_0x6706[43]](_0x6706[67]),mxResources[_0x6706[43]](_0x6706[68]),mxResources[_0x6706[43]](_0x6706[69]),mxResources[_0x6706[43]](_0x6706[70])]);this[_0x6706[49]](_0x6706[71],mxResources[_0x6706[43]](_0x6706[71]),_0x6357x6+_0x6706[72],_0x6706[45],[_0x6706[73]],[mxResources[_0x6706[43]](_0x6706[73])]);this[_0x6706[49]](_0x6706[74],mxResources[_0x6706[43]](_0x6706[74]),_0x6357x6+_0x6706[75],_0x6706[45],[_0x6706[76],_0x6706[77]],[mxResources[_0x6706[43]](_0x6706[76]),mxResources[_0x6706[43]](_0x6706[77])]);this[_0x6706[49]](_0x6706[78],mxResources[_0x6706[43]](_0x6706[78]),_0x6357x6+_0x6706[79],_0x6706[45],[_0x6706[80],_0x6706[81],_0x6706[82],_0x6706[83]],[mxResources[_0x6706[43]](_0x6706[80]),mxResources[_0x6706[43]](_0x6706[81]),mxResources[_0x6706[43]](_0x6706[82]),mxResources[_0x6706[43]](_0x6706[83])]);this[_0x6706[49]](_0x6706[84],mxResources[_0x6706[43]](_0x6706[84]),_0x6357x6+_0x6706[85],_0x6706[45],[_0x6706[86]],[mxResources[_0x6706[43]](_0x6706[86])]);this[_0x6706[49]](_0x6706[87],mxResources[_0x6706[43]](_0x6706[87]),_0x6357x6+_0x6706[88],_0x6706[45],[_0x6706[89],_0x6706[90],_0x6706[91],_0x6706[92],_0x6706[93]],[mxResources[_0x6706[43]](_0x6706[89]),mxResources[_0x6706[43]](_0x6706[90]),mxResources[_0x6706[43]](_0x6706[91]),mxResources[_0x6706[43]](_0x6706[92]),mxResources[_0x6706[43]](_0x6706[93])])};Sidebar[_0x6706[40]][_0x6706[94]]=!mxClient[_0x6706[23]];Sidebar[_0x6706[40]][_0x6706[95]]=16;Sidebar[_0x6706[40]][_0x6706[96]]=3;Sidebar[_0x6706[40]][_0x6706[97]]=300;Sidebar[_0x6706[40]][_0x6706[98]]=true;Sidebar[_0x6706[40]][_0x6706[99]]=STENCIL_PATH+_0x6706[100];Sidebar[_0x6706[40]][_0x6706[101]]=34;Sidebar[_0x6706[40]][_0x6706[102]]=34;Sidebar[_0x6706[40]][_0x6706[103]]=2;Sidebar[_0x6706[40]][_0x6706[104]]=9;Sidebar[_0x6706[40]][_0x6706[105]]=false;Sidebar[_0x6706[40]][_0x6706[106]]=false;Sidebar[_0x6706[40]][_0x6706[107]]=function(_0x6357x7,_0x6357x8,_0x6357x9,_0x6357xa){if(this[_0x6706[94]]&&this[_0x6706[4]]){if(this[_0x6706[32]]!=_0x6357x7){if(this[_0x6706[108]]!=null){window[_0x6706[109]](this[_0x6706[108]]);this[_0x6706[108]]=null};var _0x6357xb=mxUtils[_0x6706[25]](this,function(){if(this[_0x6706[110]]==null){this[_0x6706[110]]=document[_0x6706[7]](_0x6706[6]);this[_0x6706[110]][_0x6706[111]]=_0x6706[112];document[_0x6706[22]][_0x6706[21]](this[_0x6706[110]]);this[_0x6706[113]]= new Graph(this[_0x6706[110]],null,null,this[_0x6706[1]][_0x6706[9]][_0x6706[5]][_0x6706[8]]());this[_0x6706[113]][_0x6706[115]][_0x6706[114]](this[_0x6706[95]],this[_0x6706[95]]);this[_0x6706[113]][_0x6706[10]]=false;this[_0x6706[113]][_0x6706[11]]=false;this[_0x6706[113]][_0x6706[13]]=false;this[_0x6706[113]][_0x6706[14]](false);this[_0x6706[113]][_0x6706[12]](false);this[_0x6706[113]][_0x6706[15]](false);if(!mxClient[_0x6706[116]]){this[_0x6706[113]][_0x6706[115]][_0x6706[117]][_0x6706[17]][_0x6706[19]]=_0x6706[118]};this[_0x6706[119]]=mxUtils[_0x6706[120]](IMAGE_PATH+_0x6706[39]);this[_0x6706[119]][_0x6706[17]][_0x6706[19]]=_0x6706[20];this[_0x6706[119]][_0x6706[17]][_0x6706[121]]=_0x6706[122];this[_0x6706[119]][_0x6706[17]][_0x6706[123]]=_0x6706[124];document[_0x6706[22]][_0x6706[21]](this[_0x6706[119]])};this[_0x6706[110]][_0x6706[17]][_0x6706[125]]=_0x6706[126];this[_0x6706[113]][_0x6706[127]]=(_0x6357xa==null||_0x6357xa);this[_0x6706[113]][_0x6706[129]][_0x6706[128]]();this[_0x6706[113]][_0x6706[130]](_0x6357x8);var _0x6357xc=this[_0x6706[113]][_0x6706[131]]();var _0x6357xd=_0x6357xc[_0x6706[121]]+2*this[_0x6706[95]];var _0x6357xe=_0x6357xc[_0x6706[123]]+2*this[_0x6706[95]];if(mxClient[_0x6706[132]]){_0x6357xd+=4;_0x6357xe+=4;this[_0x6706[110]][_0x6706[17]][_0x6706[133]]=_0x6706[18]}else {this[_0x6706[110]][_0x6706[17]][_0x6706[133]]=_0x6706[134]};this[_0x6706[119]][_0x6706[17]][_0x6706[16]]=_0x6706[134];this[_0x6706[110]][_0x6706[17]][_0x6706[121]]=_0x6357xd+_0x6706[135];if(this[_0x6706[106]]&&_0x6357x9!=null&&_0x6357x9[_0x6706[136]]>0){if(this[_0x6706[137]]==null){this[_0x6706[137]]=document[_0x6706[7]](_0x6706[6]);this[_0x6706[137]][_0x6706[17]][_0x6706[138]]=_0x6706[139];this[_0x6706[137]][_0x6706[17]][_0x6706[140]]=_0x6706[141];this[_0x6706[137]][_0x6706[17]][_0x6706[121]]=_0x6706[142];this[_0x6706[137]][_0x6706[17]][_0x6706[133]]=_0x6706[18];if(mxClient[_0x6706[116]]){this[_0x6706[137]][_0x6706[17]][_0x6706[143]]=_0x6706[144]}else {this[_0x6706[137]][_0x6706[17]][_0x6706[19]]=_0x6706[20];this[_0x6706[137]][_0x6706[17]][_0x6706[143]]=_0x6706[145]};this[_0x6706[110]][_0x6706[21]](this[_0x6706[137]])}else {this[_0x6706[137]][_0x6706[146]]=_0x6706[147]};this[_0x6706[137]][_0x6706[17]][_0x6706[125]]=_0x6706[147];mxUtils[_0x6706[148]](this[_0x6706[137]],_0x6357x9);var _0x6357xf=this[_0x6706[137]][_0x6706[149]]+10;_0x6357xe+=_0x6357xf;if(mxClient[_0x6706[116]]){this[_0x6706[137]][_0x6706[17]][_0x6706[150]]=(-_0x6357xf)+_0x6706[135]}else {_0x6357xe-=6;this[_0x6706[137]][_0x6706[17]][_0x6706[151]]=(_0x6357xe-_0x6357xf)+_0x6706[135]}}else {if(this[_0x6706[137]]!=null&&this[_0x6706[137]][_0x6706[33]]!=null){this[_0x6706[137]][_0x6706[17]][_0x6706[125]]=_0x6706[152]}};this[_0x6706[110]][_0x6706[17]][_0x6706[123]]=_0x6357xe+_0x6706[135];var _0x6357x10=-Math[_0x6706[154]](0,_0x6357xc[_0x6706[153]]-this[_0x6706[95]]);var _0x6357x11=-Math[_0x6706[154]](0,_0x6357xc[_0x6706[155]]-this[_0x6706[95]]);var _0x6357x12=this[_0x6706[2]][_0x6706[156]]+this[_0x6706[1]][_0x6706[157]]+3;var _0x6357x13=Math[_0x6706[160]](0,(this[_0x6706[2]][_0x6706[158]]+_0x6357x7[_0x6706[158]]-this[_0x6706[2]][_0x6706[159]]-_0x6357xe/2+16));if(mxClient[_0x6706[116]]){this[_0x6706[113]][_0x6706[115]][_0x6706[117]][_0x6706[165]](_0x6706[161],_0x6706[162]+_0x6357x10+_0x6706[163]+_0x6357x11+_0x6706[164])}else {this[_0x6706[113]][_0x6706[115]][_0x6706[167]][_0x6706[17]][_0x6706[166]]=_0x6357x10+_0x6706[135];this[_0x6706[113]][_0x6706[115]][_0x6706[167]][_0x6706[17]][_0x6706[151]]=_0x6357x11+_0x6706[135]};_0x6357x12+=document[_0x6706[170]](_0x6706[169])[_0x6706[168]];_0x6357x13+=90;this[_0x6706[110]][_0x6706[17]][_0x6706[19]]=_0x6706[20];this[_0x6706[110]][_0x6706[17]][_0x6706[166]]=_0x6357x12+_0x6706[135];this[_0x6706[110]][_0x6706[17]][_0x6706[151]]=_0x6357x13+_0x6706[135];this[_0x6706[119]][_0x6706[17]][_0x6706[166]]=(_0x6357x12-13)+_0x6706[135];this[_0x6706[119]][_0x6706[17]][_0x6706[151]]=(_0x6357x13+_0x6357xe/2-13)+_0x6706[135]});if(this[_0x6706[110]]!=null&&this[_0x6706[110]][_0x6706[17]][_0x6706[125]]!=_0x6706[152]){_0x6357xb()}else {this[_0x6706[108]]=window[_0x6706[171]](_0x6357xb,this[_0x6706[97]])};this[_0x6706[32]]=_0x6357x7}}};Sidebar[_0x6706[40]][_0x6706[29]]=function(){if(this[_0x6706[108]]!=null){window[_0x6706[109]](this[_0x6706[108]]);this[_0x6706[108]]=null};if(this[_0x6706[110]]!=null){this[_0x6706[110]][_0x6706[17]][_0x6706[125]]=_0x6706[152];this[_0x6706[119]][_0x6706[17]][_0x6706[16]]=_0x6706[18];this[_0x6706[32]]=null}};Sidebar[_0x6706[40]][_0x6706[172]]=function(_0x6357x14){var _0x6357x7=document[_0x6706[7]](_0x6706[173]);_0x6357x7[_0x6706[165]](_0x6706[174],_0x6706[175]);_0x6357x7[_0x6706[111]]=_0x6706[176];mxUtils[_0x6706[148]](_0x6357x7,_0x6357x14);return _0x6357x7};Sidebar[_0x6706[40]][_0x6706[177]]=function(_0x6357x8,_0x6357xd,_0x6357xe,_0x6357x15,_0x6357x9,_0x6357xa){this[_0x6706[5]][_0x6706[127]]=(_0x6357xa==null||_0x6357xa);this[_0x6706[5]][_0x6706[115]][_0x6706[178]](1,0,0);this[_0x6706[5]][_0x6706[130]](_0x6357x8);var _0x6357xc=this[_0x6706[5]][_0x6706[131]]();var _0x6357x16=this[_0x6706[96]];var _0x6357x17=Math[_0x6706[154]]((_0x6357xd-2)/(_0x6357xc[_0x6706[121]]-_0x6357xc[_0x6706[153]]+_0x6357x16),(_0x6357xe-2)/(_0x6357xc[_0x6706[123]]-_0x6357xc[_0x6706[155]]+_0x6357x16));var _0x6357x10=-Math[_0x6706[154]](_0x6357xc[_0x6706[153]],0);var _0x6357x11=-Math[_0x6706[154]](_0x6357xc[_0x6706[155]],0);this[_0x6706[5]][_0x6706[115]][_0x6706[178]](_0x6357x17,_0x6357x10,_0x6357x11);_0x6357xc=this[_0x6706[5]][_0x6706[131]]();var _0x6357x18=Math[_0x6706[160]](0,Math[_0x6706[179]]((_0x6357xd-_0x6357xc[_0x6706[121]]-_0x6357xc[_0x6706[153]])/2));var _0x6357xf=Math[_0x6706[160]](0,Math[_0x6706[179]]((_0x6357xe-_0x6357xc[_0x6706[123]]-_0x6357xc[_0x6706[155]])/2));var _0x6357x19=null;if(this[_0x6706[5]][_0x6706[180]]==mxConstants[_0x6706[181]]&&!mxClient[_0x6706[182]]){_0x6357x19=this[_0x6706[5]][_0x6706[115]][_0x6706[185]]()[_0x6706[184]][_0x6706[183]](true)}else {_0x6357x19=this[_0x6706[5]][_0x6706[2]][_0x6706[183]](false);_0x6357x19[_0x6706[146]]=this[_0x6706[5]][_0x6706[2]][_0x6706[146]]};this[_0x6706[5]][_0x6706[186]]()[_0x6706[128]]();if(mxClient[_0x6706[187]]){_0x6357x15[_0x6706[17]][_0x6706[188]]=_0x6706[189]+this[_0x6706[1]][_0x6706[9]][_0x6706[190]]+_0x6706[164]};var _0x6357x1a=3;_0x6357x19[_0x6706[17]][_0x6706[19]]=_0x6706[118];_0x6357x19[_0x6706[17]][_0x6706[133]]=_0x6706[18];_0x6357x19[_0x6706[17]][_0x6706[191]]=_0x6706[192];_0x6357x19[_0x6706[17]][_0x6706[166]]=(_0x6357x18+_0x6357x1a)+_0x6706[135];_0x6357x19[_0x6706[17]][_0x6706[151]]=(_0x6357xf+_0x6357x1a)+_0x6706[135];_0x6357x19[_0x6706[17]][_0x6706[121]]=_0x6357xd+_0x6706[135];_0x6357x19[_0x6706[17]][_0x6706[123]]=_0x6357xe+_0x6706[135];_0x6357x19[_0x6706[17]][_0x6706[16]]=_0x6706[147];_0x6357x19[_0x6706[17]][_0x6706[193]]=_0x6706[147];_0x6357x19[_0x6706[17]][_0x6706[194]]=_0x6706[147];_0x6357x15[_0x6706[21]](_0x6357x19);if(this[_0x6706[105]]&&_0x6357x9!=null){var _0x6357x1b=(mxClient[_0x6706[132]])?2*this[_0x6706[103]]+2:0;_0x6357x15[_0x6706[17]][_0x6706[123]]=(this[_0x6706[102]]+_0x6357x1b+this[_0x6706[104]]+8)+_0x6706[135];var _0x6357x1c=document[_0x6706[7]](_0x6706[6]);_0x6357x1c[_0x6706[17]][_0x6706[195]]=this[_0x6706[104]]+_0x6706[135];_0x6357x1c[_0x6706[17]][_0x6706[140]]=_0x6706[141];_0x6357x1c[_0x6706[17]][_0x6706[196]]=_0x6706[197];if(mxClient[_0x6706[198]]){_0x6357x1c[_0x6706[17]][_0x6706[123]]=(this[_0x6706[104]]+12)+_0x6706[135]};_0x6357x1c[_0x6706[17]][_0x6706[143]]=_0x6706[199];mxUtils[_0x6706[148]](_0x6357x1c,_0x6357x9);_0x6357x15[_0x6706[21]](_0x6357x1c)}};Sidebar[_0x6706[40]][_0x6706[200]]=function(_0x6357x8,_0x6357x9,_0x6357xa){var _0x6357x7=document[_0x6706[7]](_0x6706[173]);_0x6357x7[_0x6706[165]](_0x6706[174],_0x6706[175]);_0x6357x7[_0x6706[111]]=_0x6706[201];_0x6357x7[_0x6706[17]][_0x6706[133]]=_0x6706[18];var _0x6357x1b=(mxClient[_0x6706[132]])?8+2*this[_0x6706[103]]:6;_0x6357x7[_0x6706[17]][_0x6706[121]]=(this[_0x6706[101]]+_0x6357x1b)+_0x6706[135];_0x6357x7[_0x6706[17]][_0x6706[123]]=(this[_0x6706[102]]+_0x6357x1b)+_0x6706[135];_0x6357x7[_0x6706[17]][_0x6706[202]]=this[_0x6706[103]]+_0x6706[135];mxEvent[_0x6706[26]](_0x6357x7,_0x6706[203],function(_0x6357x4){mxEvent[_0x6706[204]](_0x6357x4)});this[_0x6706[177]](_0x6357x8,this[_0x6706[101]],this[_0x6706[102]],_0x6357x7,_0x6357x9,_0x6357xa);return _0x6357x7};Sidebar[_0x6706[40]][_0x6706[205]]=function(_0x6357x8,_0x6357x1d){return function(_0x6357x1e,_0x6357x4,_0x6357x1f,_0x6357x20,_0x6357x21){if(_0x6357x1e[_0x6706[206]]()){_0x6357x8=_0x6357x1e[_0x6706[207]](_0x6357x8);if(_0x6357x8[_0x6706[136]]>0){var _0x6357x22=(_0x6357x1f!=null)?_0x6357x1e[_0x6706[208]](_0x6357x1f,_0x6357x8,_0x6357x4):false;var _0x6357x23=null;if(_0x6357x1f!=null&& !_0x6357x22){_0x6357x1f=null};if(_0x6357x1d&&_0x6357x1e[_0x6706[209]]()&&_0x6357x1e[_0x6706[210]](_0x6357x1f,_0x6357x8,_0x6357x4)){_0x6357x1e[_0x6706[211]](_0x6357x1f,_0x6357x8,null,_0x6357x20,_0x6357x21);_0x6357x23=_0x6357x8}else {if(_0x6357x8[_0x6706[136]]>0){_0x6357x23=_0x6357x1e[_0x6706[212]](_0x6357x8,_0x6357x20,_0x6357x21,_0x6357x1f)}};if(_0x6357x23!=null&&_0x6357x23[_0x6706[136]]>0){_0x6357x1e[_0x6706[213]](_0x6357x23[0]);_0x6357x1e[_0x6706[214]](_0x6357x23)}}}}};Sidebar[_0x6706[40]][_0x6706[215]]=function(_0x6357xd,_0x6357xe){var _0x6357x7=document[_0x6706[7]](_0x6706[6]);_0x6357x7[_0x6706[17]][_0x6706[216]]=_0x6706[217];_0x6357x7[_0x6706[17]][_0x6706[121]]=_0x6357xd+_0x6706[135];_0x6357x7[_0x6706[17]][_0x6706[123]]=_0x6357xe+_0x6706[135];return _0x6357x7};Sidebar[_0x6706[40]][_0x6706[218]]=function(_0x6357x7,_0x6357x24,_0x6357x25){var _0x6357x26=mxUtils[_0x6706[220]](_0x6357x7,this[_0x6706[1]][_0x6706[9]][_0x6706[5]],_0x6357x24,_0x6357x25,0,0,this[_0x6706[1]][_0x6706[9]][_0x6706[5]][_0x6706[219]],true,true);_0x6357x26[_0x6706[221]]=function(_0x6357x1e,_0x6357x20,_0x6357x21){var _0x6357x1f=mxDragSource[_0x6706[40]][_0x6706[221]][_0x6706[222]](this,arguments);if(!_0x6357x1e[_0x6706[223]](_0x6357x1f)){_0x6357x1f=null};return _0x6357x1f};return _0x6357x26};Sidebar[_0x6706[40]][_0x6706[224]]=function(_0x6357x7,_0x6357x27){var _0x6357x1e=this[_0x6706[1]][_0x6706[9]][_0x6706[5]];var _0x6357x28=null;mxEvent[_0x6706[227]](_0x6357x7,function(_0x6357x4){_0x6357x28= new mxPoint(mxEvent[_0x6706[225]](_0x6357x4),mxEvent[_0x6706[226]](_0x6357x4))});var _0x6357x29=_0x6357x27[_0x6706[228]];_0x6357x27[_0x6706[228]]=function(_0x6357x4){if(!mxEvent[_0x6706[229]](_0x6357x4)&&this[_0x6706[230]]==null&&_0x6357x28!=null){var _0x6357x2a=_0x6357x1e[_0x6706[231]];if(Math[_0x6706[232]](_0x6357x28[_0x6706[153]]-mxEvent[_0x6706[225]](_0x6357x4))<=_0x6357x2a&&Math[_0x6706[232]](_0x6357x28[_0x6706[155]]-mxEvent[_0x6706[226]](_0x6357x4))<=_0x6357x2a){var _0x6357x2b=_0x6357x1e[_0x6706[233]]();_0x6357x27[_0x6706[234]](_0x6357x1e,_0x6357x4,null,_0x6357x2b,_0x6357x2b)}};_0x6357x29[_0x6706[222]](this,arguments);_0x6357x28=null}};Sidebar[_0x6706[40]][_0x6706[235]]=function(_0x6357x2c,_0x6357x14,_0x6357x2d,_0x6357x2e){var _0x6357x2f=mxUtils[_0x6706[235]]();var _0x6357x19=_0x6357x2f[_0x6706[7]](_0x6357x2c);_0x6357x19[_0x6706[165]](_0x6706[236],_0x6357x14);_0x6357x2d[_0x6706[237]](function(_0x6357x30,_0x6357x31){_0x6357x19[_0x6706[165]](_0x6357x30,_0x6357x2e[_0x6357x31]?_0x6357x2e[_0x6357x31]:_0x6706[147])});return _0x6357x19};Sidebar[_0x6706[40]][_0x6706[238]]=function(_0x6357x32,_0x6357xd,_0x6357xe,_0x6357x33,_0x6357x9,_0x6357xa){var _0x6357x2d=[];var _0x6357x2e=[];switch(_0x6357x33){case _0x6706[52]:break;case _0x6706[77]:_0x6357x2d=[_0x6706[239],_0x6706[129],_0x6706[240]];_0x6357x2e=[_0x6706[147],0,_0x6706[241]];break;case _0x6706[62]:_0x6357x2d=[_0x6706[242],_0x6706[243]];_0x6357x2e=[_0x6706[244]];break;case _0x6706[249]:_0x6357x2d=[_0x6706[242],_0x6706[245],_0x6706[246]];_0x6357x2e=[_0x6706[244],_0x6706[247],_0x6706[248]];break;case _0x6706[64]:_0x6357x2d=[_0x6706[242],_0x6706[245],_0x6706[246],_0x6706[250],_0x6706[251]];_0x6357x2e=[_0x6706[244],_0x6706[247],_0x6706[248],_0x6706[248],_0x6706[244]];break;case _0x6706[70]:_0x6357x2d=[_0x6706[242],_0x6706[245],_0x6706[252],_0x6706[253],_0x6706[250],_0x6706[251]];_0x6357x2e=[_0x6706[244],_0x6706[247],_0x6706[248],_0x6706[254],_0x6706[248],_0x6706[244]];break;case _0x6706[93]:_0x6357x2d=[_0x6706[255],_0x6706[256]];_0x6357x2e=[_0x6706[147],_0x6706[147]];break;case _0x6706[60]:_0x6357x2d=[_0x6706[251],_0x6706[257]];_0x6357x2e=[_0x6706[244],_0x6706[147]];break;case _0x6706[76]:_0x6357x2d=[_0x6706[258],_0x6706[259],_0x6706[251]];_0x6357x2e=[_0x6706[244],_0x6706[147],_0x6706[244]];break;case _0x6706[89]:_0x6357x2d=[_0x6706[260]];_0x6357x2e=[];break;case _0x6706[80]:_0x6357x2d=[_0x6706[261],_0x6706[262]];_0x6357x2e=[];break;case _0x6706[90]:_0x6357x2d=[_0x6706[251],_0x6706[263]];_0x6357x2e=[];break;case _0x6706[91]:_0x6357x2d=[_0x6706[264],_0x6706[263]];_0x6357x2e=[];break;case _0x6706[81]:_0x6357x2d=[_0x6706[265]];_0x6357x2e=[];break;case _0x6706[82]:_0x6357x2d=[_0x6706[266]];_0x6357x2e=[_0x6706[244]];break;case _0x6706[267]:_0x6357x2d=[_0x6706[266]];_0x6357x2e=[_0x6706[244]];break;case _0x6706[83]:_0x6357x2d=[_0x6706[251]];_0x6357x2e=[_0x6706[244]];break;case _0x6706[65]:_0x6357x2d=[_0x6706[268],_0x6706[269]];_0x6357x2e=[_0x6706[147],_0x6706[270]];break;case _0x6706[66]:_0x6357x2d=[_0x6706[271],_0x6706[269]];_0x6357x2e=[_0x6706[147],_0x6706[270]];break;case _0x6706[67]:_0x6357x2d=[_0x6706[272],_0x6706[269]];_0x6357x2e=[_0x6706[147],_0x6706[270]];break;case _0x6706[73]:_0x6357x2d=[_0x6706[273],_0x6706[274],_0x6706[269]];_0x6357x2e=[_0x6706[147],_0x6706[275],_0x6706[270]];break;case _0x6706[54]:_0x6357x2d=[_0x6706[276],_0x6706[274],_0x6706[93],_0x6706[277]];_0x6357x2e=[_0x6706[244],_0x6706[278]];break;case _0x6706[55]:_0x6357x2d=[_0x6706[279],_0x6706[280],_0x6706[274],_0x6706[243],_0x6706[277]];_0x6357x2e=[_0x6706[147],_0x6706[244],_0x6706[278]];break;case _0x6706[68]:_0x6357x2d=[_0x6706[272],_0x6706[281]];_0x6357x2e=[_0x6706[147],_0x6706[282]];break;case _0x6706[69]:_0x6357x2d=[_0x6706[272],_0x6706[239],_0x6706[283]];_0x6357x2e=[_0x6706[147],_0x6706[147],_0x6706[284]];break;case _0x6706[56]:_0x6357x2d=[_0x6706[285],_0x6706[243],_0x6706[277],_0x6706[242],_0x6706[274],_0x6706[91],_0x6706[286],_0x6706[287],_0x6706[19]];_0x6357x2e=[_0x6706[275],_0x6706[147],_0x6706[147],_0x6706[244],_0x6706[288]];break;case _0x6706[57]:_0x6357x2d=[_0x6706[289],_0x6706[256]];_0x6357x2e=[_0x6706[147],_0x6706[147]];break;case _0x6706[92]:_0x6357x2d=[_0x6706[290]];_0x6357x2e=[_0x6706[244]];break;case _0x6706[61]:_0x6357x2d=[_0x6706[291],_0x6706[251]];_0x6357x2e=[_0x6706[147],_0x6706[244]];break;case _0x6706[300]:_0x6357x2d=[_0x6706[292],_0x6706[293],_0x6706[294],_0x6706[295],_0x6706[296],_0x6706[297],_0x6706[298],_0x6706[299]];_0x6357x2e=[];break;case _0x6706[86]:_0x6357x2d=[_0x6706[301]];_0x6357x2e=[];break;case _0x6706[304]:_0x6357x2d=[_0x6706[302]];_0x6357x2e=[_0x6706[244],_0x6706[303]];break;default:_0x6357x2d=[];_0x6357x2e=[];break};var _0x6357x19=this[_0x6706[235]](_0x6357x33,_0x6357x9,_0x6357x2d,_0x6357x2e);var _0x6357x8=[ new mxCell(_0x6357x19, new mxGeometry(0,0,_0x6357xd,_0x6357xe),_0x6357x32)];_0x6357x8[0][_0x6706[305]]=true;return this[_0x6706[306]](_0x6357x8,_0x6357xd,_0x6357xe,_0x6357x9,_0x6357xa)};Sidebar[_0x6706[40]][_0x6706[306]]=function(_0x6357x8,_0x6357xd,_0x6357xe,_0x6357x9,_0x6357xa){var _0x6357x7=this[_0x6706[200]](_0x6357x8,_0x6357x9,_0x6357xa);var _0x6357x27=this[_0x6706[218]](_0x6357x7,this[_0x6706[205]](_0x6357x8,true),this[_0x6706[215]](_0x6357xd,_0x6357xe));this[_0x6706[224]](_0x6357x7,_0x6357x27);_0x6357x27[_0x6706[307]]=mxUtils[_0x6706[25]](this,function(){return this[_0x6706[1]][_0x6706[9]][_0x6706[5]][_0x6706[309]][_0x6706[308]]});if(!touchStyle){mxEvent[_0x6706[26]](_0x6357x7,_0x6706[30],mxUtils[_0x6706[25]](this,function(_0x6357x4){this[_0x6706[107]](_0x6357x7,_0x6357x8,_0x6357x9,_0x6357xa)}))};return _0x6357x7};Sidebar[_0x6706[40]][_0x6706[310]]=function(_0x6357x32,_0x6357xd,_0x6357xe,_0x6357x33,_0x6357x9,_0x6357xa){var _0x6357x8=[ new mxCell((_0x6357x33!=null)?_0x6357x33:_0x6706[147], new mxGeometry(0,0,_0x6357xd,_0x6357xe),_0x6357x32)];_0x6357x8[0][_0x6706[312]][_0x6706[311]]( new mxPoint(0,_0x6357xe),true);_0x6357x8[0][_0x6706[312]][_0x6706[311]]( new mxPoint(_0x6357xd,0),false);_0x6357x8[0][_0x6706[312]][_0x6706[118]]=true;_0x6357x8[0][_0x6706[313]]=true;return this[_0x6706[314]](_0x6357x8,_0x6357xd,_0x6357xe,_0x6357x9,_0x6357xa)};Sidebar[_0x6706[40]][_0x6706[314]]=function(_0x6357x8,_0x6357xd,_0x6357xe,_0x6357x9,_0x6357xa){var _0x6357x7=this[_0x6706[200]](_0x6357x8,_0x6357x9,_0x6357xa);this[_0x6706[218]](_0x6357x7,this[_0x6706[205]](_0x6357x8,false),this[_0x6706[215]](_0x6357xd,_0x6357xe));var _0x6357x1e=this[_0x6706[1]][_0x6706[9]][_0x6706[5]];mxEvent[_0x6706[26]](_0x6357x7,_0x6706[203],mxUtils[_0x6706[25]](this,function(_0x6357x4){if(this[_0x6706[98]]){_0x6357x1e[_0x6706[315]](_0x6357x8[0])};_0x6357x7[_0x6706[17]][_0x6706[316]]=_0x6706[317];window[_0x6706[171]](function(){_0x6357x7[_0x6706[17]][_0x6706[316]]=_0x6706[147]},300);mxEvent[_0x6706[204]](_0x6357x4)}));if(!touchStyle){mxEvent[_0x6706[26]](_0x6357x7,_0x6706[30],mxUtils[_0x6706[25]](this,function(_0x6357x4){this[_0x6706[107]](_0x6357x7,_0x6357x8,_0x6357x9,_0x6357xa)}))};return _0x6357x7};Sidebar[_0x6706[40]][_0x6706[318]]=function(_0x6357x34,_0x6357x9,_0x6357x35,_0x6357x36){var _0x6357x7=this[_0x6706[172]](_0x6357x9);this[_0x6706[2]][_0x6706[21]](_0x6357x7);var _0x6357x1c=document[_0x6706[7]](_0x6706[6]);_0x6357x1c[_0x6706[111]]=_0x6706[319];if(_0x6357x35){_0x6357x36(_0x6357x1c);_0x6357x36=null}else {_0x6357x1c[_0x6706[17]][_0x6706[125]]=_0x6706[152]};this[_0x6706[320]](_0x6357x7,_0x6357x1c,_0x6357x36);var _0x6357x37=document[_0x6706[7]](_0x6706[6]);_0x6357x37[_0x6706[21]](_0x6357x1c);this[_0x6706[2]][_0x6706[21]](_0x6357x37);if(_0x6357x34!=null){this[_0x6706[3]][_0x6357x34]=[_0x6357x7,_0x6357x37]}};Sidebar[_0x6706[40]][_0x6706[320]]=function(_0x6357x9,_0x6357x38,_0x6357x39){var _0x6357x3a=false;_0x6357x9[_0x6706[17]][_0x6706[188]]=(_0x6357x38[_0x6706[17]][_0x6706[125]]==_0x6706[152])?_0x6706[189]+IMAGE_PATH+_0x6706[321]:_0x6706[189]+IMAGE_PATH+_0x6706[322];_0x6357x9[_0x6706[17]][_0x6706[323]]=_0x6706[324];_0x6357x9[_0x6706[17]][_0x6706[325]]=_0x6706[326];mxEvent[_0x6706[26]](_0x6357x9,_0x6706[203],function(_0x6357x4){if(_0x6357x38[_0x6706[17]][_0x6706[125]]==_0x6706[152]){if(!_0x6357x3a){_0x6357x3a=true;if(_0x6357x39!=null){_0x6357x9[_0x6706[17]][_0x6706[191]]=_0x6706[327];window[_0x6706[171]](function(){_0x6357x39(_0x6357x38);_0x6357x9[_0x6706[17]][_0x6706[191]]=_0x6706[147]},0)}};_0x6357x9[_0x6706[17]][_0x6706[188]]=_0x6706[189]+IMAGE_PATH+_0x6706[322];_0x6357x38[_0x6706[17]][_0x6706[125]]=_0x6706[126]}else {_0x6357x9[_0x6706[17]][_0x6706[188]]=_0x6706[189]+IMAGE_PATH+_0x6706[321];_0x6357x38[_0x6706[17]][_0x6706[125]]=_0x6706[152]};mxEvent[_0x6706[204]](_0x6357x4)})};Sidebar[_0x6706[40]][_0x6706[328]]=function(_0x6357x34){var _0x6357x3b=this[_0x6706[3]][_0x6357x34];if(_0x6357x3b!=null){this[_0x6706[3]][_0x6357x34]=null;for(var _0x6357x3c=0;_0x6357x3c<_0x6357x3b[_0x6706[136]];_0x6357x3c++){this[_0x6706[2]][_0x6706[329]](_0x6357x3b[_0x6357x3c])};return true};return false};Sidebar[_0x6706[40]][_0x6706[49]]=function(_0x6357x34,_0x6357x9,_0x6357x3d,_0x6357x3e,_0x6357x3f,_0x6357x40){this[_0x6706[318]](_0x6357x34,_0x6357x9,(_0x6357x34===_0x6706[42]),mxUtils[_0x6706[25]](this,function(_0x6357x38){var _0x6357x41=_0x6357x40!=null;for(var _0x6357x3c=0;_0x6357x3c<_0x6357x3f[_0x6706[136]];_0x6357x3c++){var _0x6357x42=_0x6357x3d+_0x6357x3f[_0x6357x3c]+_0x6357x3e;_0x6357x38[_0x6706[21]](this[_0x6706[238]](_0x6706[330]+_0x6357x42,80,80,_0x6357x3f[_0x6357x3c],(_0x6357x41)?_0x6357x40[_0x6357x3c]:null,_0x6357x41))}}))}
\ No newline at end of file
+'use strict';
+
+/**
+ * Construcs a new sidebar for the given editor.
+ */
+function Sidebar(editorUi, container) {
+       this.editorUi = editorUi;
+       this.container = container;
+       this.palettes = new Object();
+       this.showTooltips = true;
+       this.graph = new Graph(document.createElement('div'), null, null, this.editorUi
+               .editor.graph.getStylesheet());
+       this.graph.resetViewOnRootChange = false;
+       this.graph.foldingEnabled = false;
+       this.graph.setConnectable(false);
+       this.graph.autoScroll = false;
+       this.graph.setTooltips(false);
+       this.graph.setEnabled(false);
+
+       // Container must be in the DOM for correct HTML rendering
+       this.graph.container.style.visibility = 'hidden';
+       this.graph.container.style.position = 'absolute';
+       document.body.appendChild(this.graph.container);
+
+       if (!mxClient.IS_TOUCH) {
+               mxEvent.addListener(document, 'mouseup', mxUtils.bind(this, function() {
+                       this.showTooltips = true;
+               }));
+
+               // Enables tooltips after scroll
+               mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function() {
+                       this.showTooltips = true;
+               }));
+
+               mxEvent.addListener(document, 'mousedown', mxUtils.bind(this, function() {
+                       this.showTooltips = false;
+                       this.hideTooltip();
+               }));
+
+               mxEvent.addListener(document, 'mousemove', mxUtils.bind(this, function(evt) {
+                       var src = mxEvent.getSource(evt);
+
+                       while (src != null) {
+                               if (src == this.currentElt) {
+                                       return;
+                               }
+
+                               src = src.parentNode;
+                       }
+
+                       this.hideTooltip();
+               }));
+
+               // Handles mouse leaving the window
+               mxEvent.addListener(document, 'mouseout', mxUtils.bind(this, function(evt) {
+                       if (evt.toElement == null && evt.relatedTarget == null) {
+                               this.hideTooltip();
+                       }
+               }));
+       }
+
+       this.init();
+
+       // Pre-fetches tooltip image
+       new Image().src = IMAGE_PATH + '/tooltip.png';
+};
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.init = function() {
+       var dir = STENCIL_PATH;
+       console.log(dir);
+
+       this.addImagePalette('entry', mxResources.get('entry'), dir + '/entry/',
+               '_128x128.png', ['start', 'finally', 'end'], [mxResources.get('start'),
+                       mxResources.get('finally'), mxResources.get('end')
+               ]);
+       this.addImagePalette('call_management', mxResources.get('call_management'),
+               dir + '/call_management/', '_128x128.png', ['answer', 'hangup', 'dial',
+                       'ext_dial', 'queue', 'voicemail'
+                       // , 'callback'
+               ], [mxResources.get('answer'), mxResources.get('hangup'), mxResources.get(
+                               'dial'), mxResources.get('ext_dial'), mxResources.get('queue'),
+                       mxResources.get('voicemail')
+                       // , mxResources.get('callback')
+               ]);
+       this.addImagePalette('variable', mxResources.get('variable'), dir +
+               '/variable/', '_128x128.png', ['set', 'math'], [mxResources.get('set'),
+                       mxResources.get('math')
+               ]);
+       this.addImagePalette('playback', mxResources.get('playback'), dir +
+               '/playback/', '_128x128.png', ['playback', 'menu',
+                       'saydigits', 'saynumber', 'sayphonetic', 'tts', 'ispeechtts', 'getdigits'
+               ], [mxResources.get('playback'), mxResources
+                       .get('menu'), mxResources.get('saydigits'), mxResources.get('saynumber'),
+                       mxResources.get('sayphonetic'), mxResources.get('tts'), mxResources.get('ispeechtts'), mxResources.get('getdigits')
+               ]);
+       this.addImagePalette('recording', mxResources.get('recording'), dir +
+               '/recording/', '_128x128.png', ['record'], [mxResources.get('record')]);
+       this.addImagePalette('integrationServer', mxResources.get('integrationServer'),
+               dir + '/integration_server/', '_128x128.png', ['database', 'ispeechasr'], [
+                       mxResources.get('database'), mxResources.get('ispeechasr')
+               ]);
+       this.addImagePalette('callflow', mxResources.get('callflow'), dir +
+               '/callflow/', '_128x128.png', ['gotoc', 'gotoif', 'gotoiftime', 'vswitch'], [
+                       mxResources.get('gotoc'), mxResources.get('gotoif'), mxResources.get(
+                               'gotoiftime'), mxResources.get('vswitch')
+               ]);
+       this.addImagePalette('stats', mxResources.get('stats'), dir + '/stats/',
+               '_128x128.png', [
+                       // 'queuelog',
+                       'goal'
+               ], [
+                       // mxResources.get('queuelog'),
+                       mxResources.get('goal')
+               ]);
+       this.addImagePalette('general', mxResources.get('general'), dir + '/general/',
+               '_128x128.png', ['noop', 'system', 'agi', 'subproject', 'custom_app'], [mxResources.get(
+                       'noop'), mxResources.get('system'), mxResources.get('agi'), mxResources.get(
+                       'subproject'), mxResources.get(
+                       'custom_app')]);
+
+};
+
+/**
+ * Specifies if tooltips should be visible. Default is true.
+ */
+Sidebar.prototype.enableTooltips = !mxClient.IS_TOUCH;
+
+/**
+ * Specifies the delay for the tooltip. Default is 16 px.
+ */
+Sidebar.prototype.tooltipBorder = 16;
+
+/**
+ * Specifies the delay for the tooltip. Default is 3 px.
+ */
+Sidebar.prototype.thumbBorder = 3;
+
+/**
+ * Specifies the delay for the tooltip. Default is 300 ms.
+ */
+Sidebar.prototype.tooltipDelay = 300;
+
+/**
+ * Specifies if edges should be used as templates if clicked. Default is true.
+ */
+Sidebar.prototype.installEdges = true;
+
+/**
+ * Specifies the URL of the gear image.
+ */
+Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
+
+/**
+ * Specifies the width of the thumbnails.
+ */
+Sidebar.prototype.thumbWidth = 34;
+
+/**
+ * Specifies the height of the thumbnails.
+ */
+Sidebar.prototype.thumbHeight = 34;
+
+/**
+ * Specifies the padding for the thumbnails. Default is 3.
+ */
+Sidebar.prototype.thumbPadding = 2;
+
+/**
+ * Specifies the size of the sidebar titles.
+ */
+Sidebar.prototype.sidebarTitleSize = 9;
+
+/**
+ * Specifies if titles in the sidebar should be enabled.
+ */
+Sidebar.prototype.sidebarTitles = false;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.tooltipTitles = false;
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.showTooltip = function(elt, cells, title, showLabel) {
+       if (this.enableTooltips && this.showTooltips) {
+               if (this.currentElt != elt) {
+                       if (this.thread != null) {
+                               window.clearTimeout(this.thread);
+                               this.thread = null;
+                       }
+
+                       var show = mxUtils.bind(this, function() {
+                               // Lazy creation of the DOM nodes and graph instance
+                               if (this.tooltip == null) {
+                                       this.tooltip = document.createElement('div');
+                                       this.tooltip.className = 'geSidebarTooltip';
+                                       document.body.appendChild(this.tooltip);
+
+                                       this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph
+                                               .getStylesheet());
+                                       this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
+                                       this.graph2.resetViewOnRootChange = false;
+                                       this.graph2.foldingEnabled = false;
+                                       this.graph2.autoScroll = false;
+                                       this.graph2.setTooltips(false);
+                                       this.graph2.setConnectable(false);
+                                       this.graph2.setEnabled(false);
+
+                                       if (!mxClient.IS_SVG) {
+                                               this.graph2.view.canvas.style.position = 'relative';
+                                       }
+
+                                       this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
+                                       this.tooltipImage.style.position = 'absolute';
+                                       this.tooltipImage.style.width = '14px';
+                                       this.tooltipImage.style.height = '27px';
+
+                                       document.body.appendChild(this.tooltipImage);
+                               }
+
+                               this.tooltip.style.display = 'block';
+                               this.graph2.labelsVisible = (showLabel == null || showLabel);
+                               this.graph2.model.clear();
+                               this.graph2.addCells(cells);
+
+                               var bounds = this.graph2.getGraphBounds();
+                               var width = bounds.width + 2 * this.tooltipBorder;
+                               var height = bounds.height + 2 * this.tooltipBorder;
+
+                               if (mxClient.IS_QUIRKS) {
+                                       width += 4;
+                                       height += 4;
+                                       this.tooltip.style.overflow = 'hidden';
+                               } else {
+                                       this.tooltip.style.overflow = 'visible';
+                               }
+
+                               this.tooltipImage.style.visibility = 'visible';
+                               this.tooltip.style.width = width + 'px';
+
+                               // Adds title for entry
+                               if (this.tooltipTitles && title != null && title.length > 0) {
+                                       if (this.tooltipTitle == null) {
+                                               this.tooltipTitle = document.createElement('div');
+                                               this.tooltipTitle.style.borderTop = '1px solid gray';
+                                               this.tooltipTitle.style.textAlign = 'center';
+                                               this.tooltipTitle.style.width = '100%';
+
+                                               // Oversize titles are cut-off currently. Should make tooltip wider later.
+                                               this.tooltipTitle.style.overflow = 'hidden';
+
+                                               if (mxClient.IS_SVG) {
+                                                       this.tooltipTitle.style.paddingTop = '2px';
+                                               } else {
+                                                       this.tooltipTitle.style.position = 'absolute';
+                                                       this.tooltipTitle.style.paddingTop = '6px';
+                                               }
+
+                                               this.tooltip.appendChild(this.tooltipTitle);
+                                       } else {
+                                               this.tooltipTitle.innerHTML = '';
+                                       }
+
+                                       this.tooltipTitle.style.display = '';
+                                       mxUtils.write(this.tooltipTitle, title);
+
+                                       var dy = this.tooltipTitle.offsetHeight + 10;
+                                       height += dy;
+
+                                       if (mxClient.IS_SVG) {
+                                               this.tooltipTitle.style.marginTop = (-dy) + 'px';
+                                       } else {
+                                               height -= 6;
+                                               this.tooltipTitle.style.top = (height - dy) + 'px';
+                                       }
+                               } else if (this.tooltipTitle != null && this.tooltipTitle.parentNode !=
+                                       null) {
+                                       this.tooltipTitle.style.display = 'none';
+                               }
+
+                               this.tooltip.style.height = height + 'px';
+                               var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
+                               var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
+
+                               var left = this.container.clientWidth + this.editorUi.splitSize + 3;
+                               var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container
+                                       .scrollTop - height / 2 + 16));
+
+                               if (mxClient.IS_SVG) {
+                                       this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 +
+                                               ',' + y0 + ')');
+                               } else {
+                                       this.graph2.view.drawPane.style.left = x0 + 'px';
+                                       this.graph2.view.drawPane.style.top = y0 + 'px';
+                               }
+
+                               // Workaround for ignored position CSS style in IE9
+                               // (changes to relative without the following line)
+                               // Added width of the page-sidebar
+                               left += document.getElementById('page-sidebar').offsetWidth;
+                               // Added static height of the page-navbar
+                               top += 90;
+
+                               this.tooltip.style.position = 'absolute';
+                               this.tooltip.style.left = left + 'px';
+                               this.tooltip.style.top = top + 'px';
+                               this.tooltipImage.style.left = (left - 13) + 'px';
+                               this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
+                       });
+
+                       if (this.tooltip != null && this.tooltip.style.display != 'none') {
+                               show();
+                       } else {
+                               this.thread = window.setTimeout(show, this.tooltipDelay);
+                       }
+
+                       this.currentElt = elt;
+               }
+       }
+};
+
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.hideTooltip = function() {
+       if (this.thread != null) {
+               window.clearTimeout(this.thread);
+               this.thread = null;
+       }
+
+       if (this.tooltip != null) {
+               this.tooltip.style.display = 'none';
+               this.tooltipImage.style.visibility = 'hidden';
+               this.currentElt = null;
+       }
+};
+
+/**
+ * Creates and returns the given title element.
+ */
+Sidebar.prototype.createTitle = function(label) {
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geTitle';
+       mxUtils.write(elt, label);
+
+       return elt;
+};
+
+/**
+ * Creates a thumbnail for the given cells.
+ */
+Sidebar.prototype.createThumb = function(cells, width, height, parent, title,
+       showLabel) {
+       this.graph.labelsVisible = (showLabel == null || showLabel);
+       this.graph.view.scaleAndTranslate(1, 0, 0);
+       this.graph.addCells(cells);
+       var bounds = this.graph.getGraphBounds();
+       var corr = this.thumbBorder;
+       var s = Math.min((width - 2) / (bounds.width - bounds.x + corr), (height - 2) /
+               (bounds.height - bounds.y + corr));
+       var x0 = -Math.min(bounds.x, 0);
+       var y0 = -Math.min(bounds.y, 0);
+       this.graph.view.scaleAndTranslate(s, x0, y0);
+
+       bounds = this.graph.getGraphBounds();
+       var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
+       var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
+
+       var node = null;
+
+       // For supporting HTML labels in IE9 standards mode the container is cloned instead
+       if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO) {
+               node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
+       }
+       // LATER: Check if deep clone can be used for quirks if container in DOM
+       else {
+               node = this.graph.container.cloneNode(false);
+               node.innerHTML = this.graph.container.innerHTML;
+       }
+
+       this.graph.getModel().clear();
+
+       // Catch-all event handling
+       if (mxClient.IS_IE6) {
+               parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage +
+                       ')';
+       }
+
+       var dd = 3;
+       node.style.position = 'relative';
+       node.style.overflow = 'hidden';
+       node.style.cursor = 'pointer';
+       node.style.left = (dx + dd) + 'px';
+       node.style.top = (dy + dd) + 'px';
+       node.style.width = width + 'px';
+       node.style.height = height + 'px';
+       node.style.visibility = '';
+       node.style.minWidth = '';
+       node.style.minHeight = '';
+
+       parent.appendChild(node);
+
+       // Adds title for sidebar entries
+       if (this.sidebarTitles && title != null) {
+               var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2 : 0;
+               parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) +
+                       'px';
+
+               var div = document.createElement('div');
+               div.style.fontSize = this.sidebarTitleSize + 'px';
+               div.style.textAlign = 'center';
+               div.style.whiteSpace = 'nowrap';
+
+               if (mxClient.IS_IE) {
+                       div.style.height = (this.sidebarTitleSize + 12) + 'px';
+               }
+
+               div.style.paddingTop = '4px';
+               mxUtils.write(div, title);
+               parent.appendChild(div);
+       }
+};
+
+/**
+ * Creates and returns a new palette item for the given image.
+ */
+Sidebar.prototype.createItem = function(cells, title, showLabel) {
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geItem';
+       elt.style.overflow = 'hidden';
+       var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
+       elt.style.width = (this.thumbWidth + border) + 'px';
+       elt.style.height = (this.thumbHeight + border) + 'px';
+       elt.style.padding = this.thumbPadding + 'px';
+
+       // Blocks default click action
+       mxEvent.addListener(elt, 'click', function(evt) {
+               mxEvent.consume(evt);
+       });
+
+       this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title,
+               showLabel);
+
+       return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createDropHandler = function(cells, allowSplit) {
+       return function(graph, evt, target, x, y) {
+               if (graph.isEnabled()) {
+                       cells = graph.getImportableCells(cells);
+
+                       if (cells.length > 0) {
+                               var validDropTarget = (target != null) ?
+                                       graph.isValidDropTarget(target, cells, evt) : false;
+                               var select = null;
+
+                               if (target != null && !validDropTarget) {
+                                       target = null;
+                               }
+
+                               // Splits the target edge or inserts into target group
+                               if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target,
+                                               cells, evt)) {
+                                       graph.splitEdge(target, cells, null, x, y);
+                                       select = cells;
+                               } else if (cells.length > 0) {
+                                       select = graph.importCells(cells, x, y, target);
+                               }
+
+                               if (select != null && select.length > 0) {
+                                       graph.scrollCellToVisible(select[0]);
+                                       graph.setSelectionCells(select);
+                               }
+                       }
+               }
+       };
+};
+
+/**
+ * Creates and returns a preview element for the given width and height.
+ */
+Sidebar.prototype.createDragPreview = function(width, height) {
+       var elt = document.createElement('div');
+       elt.style.border = '1px dashed black';
+       elt.style.width = width + 'px';
+       elt.style.height = height + 'px';
+
+       return elt;
+};
+
+/**
+ * Creates a drag source for the given element.
+ */
+Sidebar.prototype.createDragSource = function(elt, dropHandler, preview) {
+       var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph,
+               dropHandler,
+               preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
+
+       // Allows drop into cell only if target is a valid root
+       dragSource.getDropTarget = function(graph, x, y) {
+               var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
+
+               if (!graph.isValidRoot(target)) {
+                       target = null;
+               }
+
+               return target;
+       };
+
+       return dragSource;
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.addClickHandler = function(elt, ds) {
+       var graph = this.editorUi.editor.graph;
+       var first = null;
+
+       mxEvent.addGestureListeners(elt, function(evt) {
+               first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+       });
+
+       var oldMouseUp = ds.mouseUp;
+       ds.mouseUp = function(evt) {
+               if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first !=
+                       null) {
+                       var tol = graph.tolerance;
+
+                       if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
+                               Math.abs(first.y - mxEvent.getClientY(evt)) <= tol) {
+                               var gs = graph.getGridSize();
+                               ds.drop(graph, evt, null, gs, gs);
+                       }
+               }
+
+               oldMouseUp.apply(this, arguments);
+               first = null;
+       };
+};
+
+/**
+ * Giuseppe Careri
+ * Create xml document vertex
+ */
+Sidebar.prototype.createXmlDocument = function(element, label, variables,
+       values) {
+       var doc = mxUtils.createXmlDocument();
+       var node = doc.createElement(element)
+       node.setAttribute('label', label);
+
+       variables.forEach(function(variable, index) {
+               node.setAttribute(variable, values[index] ? values[index] : '');
+       });
+
+       return node;
+}
+
+/**
+ * Giuseppe Careri
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplate = function(style, width, height, value,
+       title, showLabel) {
+       var variables = [];
+       var values = [];
+
+       switch (value) {
+               case 'answer':
+                       break;
+               case 'ispeechasr':
+                       variables = ['key', 'model', 'ispeech_asr_language'];
+                       values = ['', 0, 'it-IT'];
+                       break;
+               case 'playback':
+                       variables = ['file_id', 'opts'];
+                       values = ['0'];
+                       break;
+               case 'background':
+                       variables = ['file_id', 'response', 'digit'];
+                       values = ['0', '5', '1'];
+                       break;
+               case 'menu':
+                       variables = ['file_id', 'response', 'digit', 'retry', 'variable_id'];
+                       values = ['0', '5', '1', '1', '0'];
+                       break;
+               case 'getdigits':
+                       variables = ['file_id', 'response', 'mindigit', 'maxdigit', 'retry', 'variable_id'];
+                       values = ['0', '5', '1', '10', '1', '0'];
+                       break;
+               case 'custom_app':
+                       variables = ['application', 'options'];
+                       values = ['', ''];
+                       break;
+               case 'set':
+                       variables = ['variable_id', 'variable_value'];
+                       values = ['0', ''];
+                       break;
+               case 'database':
+                       variables = ['odbc_id', 'query', 'variable_id'];
+                       values = ['0', '', '0'];
+                       break;
+               case 'noop':
+                       variables = ['output'];
+                       values = [];
+                       break;
+               case 'gotoc':
+                       variables = ['context', 'extension'];
+                       values = [];
+                       break;
+               case 'system':
+                       variables = ['variable_id', 'command'];
+                       values = [];
+                       break;
+               case 'agi':
+                       variables = ['args', 'command'];
+                       values = [];
+                       break;
+               case 'gotoif':
+                       variables = ['condition'];
+                       values = [];
+                       break;
+               case 'gotoiftime':
+                       variables = ['interval_id'];
+                       values = ['0'];
+                       break;
+               case 'gotoifmultitime':
+                       variables = ['interval_id'];
+                       values = ['0'];
+                       break;
+               case 'vswitch':
+                       variables = ['variable_id'];
+                       values = ['0'];
+                       break;
+               case 'saydigits':
+                       variables = ['digits', 'escape_digits'];
+                       values = ['', '#'];
+                       break;
+               case 'saynumber':
+                       variables = ['number', 'escape_digits'];
+                       values = ['', '#'];
+                       break;
+               case 'sayphonetic':
+                       variables = ['text', 'escape_digits'];
+                       values = ['', '#'];
+                       break;
+               case 'record':
+                       variables = ['file', 'timeout', 'escape_digits'];
+                       values = ['', '-1', '#'];
+                       break;
+               case 'dial':
+                       variables = ['sip_id', 'timeout', 'custom_app', 'url'];
+                       values = ['0', '60'];
+                       break;
+               case 'ext_dial':
+                       variables = ['phone', 'trunk_id', 'timeout', 'opts', 'url'];
+                       values = ['', '0', '60'];
+                       break;
+               case 'tts':
+                       variables = ['text', 'google_tts_language'];
+                       values = ['', 'it'];
+                       break;
+               case 'ispeechtts':
+                       variables = ['text', 'key', 'ispeech_tts_language'];
+                       values = ['', '', 'euritalianfemale'];
+                       break;
+               case 'queue':
+                       variables = ['queue_id', 'opts', 'url', 'file_id', 'timeout', 'agi',
+                               'macro', 'gosub', 'position'
+                       ];
+                       values = ['-1', '', '', '0', '300'];
+                       break;
+               case 'voicemail':
+                       variables = ['mailbox', 'options'];
+                       values = ['', ''];
+                       break;
+               case 'subproject':
+                       variables = ['project_id'];
+                       values = ['0'];
+                       break;
+               case 'math':
+                       variables = ['operation', 'variable_id'];
+                       values = ['', '0'];
+                       break;
+               case 'queuelog':
+                       variables = ['queuename', 'agent', 'queue_event', 'data1', 'data2', 'data3',
+                               'data4', 'data5'
+                       ];
+                       values = [];
+                       break;
+               case 'goal':
+                       variables = ['goalname'];
+                       values = [];
+                       break;
+               case 'callback':
+                       variables = ['list_id'];
+                       values = ['0', '{CALLERID(num)}'];
+                       break;
+               default:
+                       variables = [];
+                       values = [];
+                       break;
+       }
+
+       var node = this.createXmlDocument(value, title, variables, values);
+
+       //var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+       var cells = [new mxCell(node, new mxGeometry(0, 0, width, height), style)];
+       cells[0].vertex = true;
+
+       return this.createVertexTemplateFromCells(cells, width, height, title,
+               showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height,
+       title, showLabel) {
+       var elt = this.createItem(cells, title, showLabel);
+       var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this
+               .createDragPreview(width, height));
+       this.addClickHandler(elt, ds);
+
+       // Uses guides for vertices only if enabled in graph
+       ds.isGuidesEnabled = mxUtils.bind(this, function() {
+               return this.editorUi.editor.graph.graphHandler.guidesEnabled;
+       });
+
+       // Shows a tooltip with the rendered cell
+       if (!touchStyle) {
+               mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
+                       this.showTooltip(elt, cells, title, showLabel);
+               }));
+       }
+
+       return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplate = function(style, width, height, value,
+       title, showLabel) {
+       var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0,
+               width, height), style)];
+       cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
+       cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
+       cells[0].geometry.relative = true;
+       cells[0].edge = true;
+
+       return this.createEdgeTemplateFromCells(cells, width, height, title,
+               showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height,
+       title, showLabel) {
+       var elt = this.createItem(cells, title, showLabel);
+       this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(
+               width, height));
+
+       // Installs the default edge
+       var graph = this.editorUi.editor.graph;
+       mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) {
+               if (this.installEdges) {
+                       graph.setDefaultEdge(cells[0]);
+               }
+
+               // Highlights the entry for 200ms
+               elt.style.backgroundColor = '#ffffff';
+
+               window.setTimeout(function() {
+                       elt.style.backgroundColor = '';
+               }, 300);
+
+               mxEvent.consume(evt);
+       }));
+
+       // Shows a tooltip with the rendered cell
+       if (!touchStyle) {
+               mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
+                       this.showTooltip(elt, cells, title, showLabel);
+               }));
+       }
+
+       return elt;
+};
+
+/**
+ * Adds the given palette.
+ */
+Sidebar.prototype.addPalette = function(id, title, expanded, onInit) {
+       var elt = this.createTitle(title);
+       this.container.appendChild(elt);
+
+       var div = document.createElement('div');
+       div.className = 'geSidebar';
+
+       if (expanded) {
+               onInit(div);
+               onInit = null;
+       } else {
+               div.style.display = 'none';
+       }
+
+       this.addFoldingHandler(elt, div, onInit);
+
+       var outer = document.createElement('div');
+       outer.appendChild(div);
+       this.container.appendChild(outer);
+
+       // Keeps references to the DOM nodes
+       if (id != null) {
+               this.palettes[id] = [elt, outer];
+       }
+};
+
+/**
+ * Create the given title element.
+ */
+Sidebar.prototype.addFoldingHandler = function(title, content, funct) {
+       var initialized = false;
+
+       title.style.backgroundImage = (content.style.display == 'none') ?
+               'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH +
+               '/expanded.gif)';
+       title.style.backgroundRepeat = 'no-repeat';
+       title.style.backgroundPosition = '100% 50%';
+
+       mxEvent.addListener(title, 'click', function(evt) {
+               if (content.style.display == 'none') {
+                       if (!initialized) {
+                               initialized = true;
+
+                               if (funct != null) {
+                                       title.style.cursor = 'wait';
+                                       window.setTimeout(function() {
+                                               funct(content);
+                                               title.style.cursor = '';
+                                       }, 0);
+                               }
+                       }
+
+                       title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+                       content.style.display = 'block';
+               } else {
+                       title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
+                       content.style.display = 'none';
+               }
+
+               mxEvent.consume(evt);
+       });
+};
+
+/**
+ * Removes the palette for the given ID.
+ */
+Sidebar.prototype.removePalette = function(id) {
+       var elts = this.palettes[id];
+
+       if (elts != null) {
+               this.palettes[id] = null;
+
+               for (var i = 0; i < elts.length; i++) {
+                       this.container.removeChild(elts[i]);
+               }
+
+               return true;
+       }
+
+       return false;
+};
+
+/**
+ * Adds the given image palette.
+ */
+Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items,
+       titles) {
+       // Giuseppe Careri
+       // Expanded Sidebar only entry
+       this.addPalette(id, title, (id === 'entry'), mxUtils.bind(this, function(
+               content) {
+               var showTitles = titles != null;
+
+               for (var i = 0; i < items.length; i++) {
+                       var icon = prefix + items[i] + postfix;
+                       content.appendChild(this.createVertexTemplate('image;image=' + icon, 80,
+                               80, items[i], (showTitles) ? titles[i] : null, showTitles));
+               }
+       }));
+};
index 1be84a6..7eab562 100644 (file)
@@ -1 +1,407 @@
-var _0xa5a9=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x6E\x69\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x62\x69\x6E\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x61\x76\x65","\x70\x75\x62\x6C\x69\x73\x68","\x2D","\x70\x72\x69\x6E\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x6F\x70\x79","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x61\x64\x64\x49\x74\x65\x6D\x73","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x67\x65\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x73\x74\x79\x6C\x65","\x6E\x6F\x77\x72\x61\x70","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x77\x69\x64\x74\x68","\x37\x30\x70\x78","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x31\x32","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x33\x30\x70\x78","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2E\x2E\x2E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x6E\x75\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x4D\x65\x6E\x75\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x42\x75\x74\x74\x6F\x6E","\x69\x6E\x69\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x67\x65\x53\x70\x72\x69\x74\x65\x2D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x64\x49\x74\x65\x6D","\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x61\x62\x65\x6C","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x61\x64\x64\x45\x64\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x69\x73\x45\x64\x67\x65","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x74\x69\x74\x6C\x65","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64\x53\x74\x61\x74\x65","\x20\x67\x65\x44\x69\x73\x61\x62\x6C\x65\x64","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x42\x75\x74\x74\x6F\x6E","\x67\x65\x53\x70\x72\x69\x74\x65\x20","\x67\x65\x4C\x61\x62\x65\x6C","\x77\x72\x69\x74\x65","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x20\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x65\x6E\x75","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x6C\x61\x62\x65\x6C\x73","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70"];function Toolbar(_0x916cx2,_0x916cx3){this[_0xa5a9[0]]=_0x916cx2;this[_0xa5a9[1]]=_0x916cx3;this[_0xa5a9[2]]();mxEvent[_0xa5a9[5]](document,mxUtils[_0xa5a9[4]](this,function(_0x916cx4){this[_0xa5a9[3]]()}))}Toolbar[_0xa5a9[6]][_0xa5a9[2]]=function(){this[_0xa5a9[21]]([_0xa5a9[7],_0xa5a9[8],_0xa5a9[9],_0xa5a9[10],_0xa5a9[11],_0xa5a9[12],_0xa5a9[9],_0xa5a9[13],_0xa5a9[14],_0xa5a9[15],_0xa5a9[16],_0xa5a9[9],_0xa5a9[17],_0xa5a9[9],_0xa5a9[18],_0xa5a9[19],_0xa5a9[20],_0xa5a9[9]]);var _0x916cx5=this[_0xa5a9[25]](_0xa5a9[22],mxResources[_0xa5a9[24]](_0xa5a9[23]),true,_0xa5a9[23]);_0x916cx5[_0xa5a9[27]][_0xa5a9[26]]=_0xa5a9[28];_0x916cx5[_0xa5a9[27]][_0xa5a9[29]]=_0xa5a9[30];_0x916cx5[_0xa5a9[27]][_0xa5a9[31]]=_0xa5a9[32];this[_0xa5a9[33]]();var _0x916cx6=this[_0xa5a9[25]](_0xa5a9[34],mxResources[_0xa5a9[24]](_0xa5a9[35]),true,_0xa5a9[35]);_0x916cx6[_0xa5a9[27]][_0xa5a9[26]]=_0xa5a9[28];_0x916cx6[_0xa5a9[27]][_0xa5a9[29]]=_0xa5a9[30];_0x916cx6[_0xa5a9[27]][_0xa5a9[31]]=_0xa5a9[36];this[_0xa5a9[21]]([_0xa5a9[9],_0xa5a9[37],_0xa5a9[38],_0xa5a9[39]]);var _0x916cx7=this[_0xa5a9[0]][_0xa5a9[41]][_0xa5a9[40]];var _0x916cx8=mxUtils[_0xa5a9[4]](this,function(){var _0x916cx9=_0xa5a9[22];var _0x916cxa=_0xa5a9[34];var _0x916cxb=_0x916cx7[_0xa5a9[44]]()[_0xa5a9[43]](_0x916cx7[_0xa5a9[42]]());if(_0x916cxb!=null){_0x916cx9=_0x916cxb[_0xa5a9[27]][mxConstants[_0xa5a9[45]]]||_0x916cx9;_0x916cxa=_0x916cxb[_0xa5a9[27]][mxConstants[_0xa5a9[46]]]||_0x916cxa;if(_0x916cx9[_0xa5a9[47]]>10){_0x916cx9=_0x916cx9[_0xa5a9[48]](0,8)+_0xa5a9[49]};_0x916cx5[_0xa5a9[50]]=_0x916cx9;_0x916cx6[_0xa5a9[50]]=_0x916cxa}});_0x916cx7[_0xa5a9[52]]()[_0xa5a9[51]](mxEvent.CHANGE,_0x916cx8);_0x916cx7[_0xa5a9[53]]()[_0xa5a9[51]](mxEvent.CHANGE,_0x916cx8)};Toolbar[_0xa5a9[6]][_0xa5a9[3]]=function(){if(this[_0xa5a9[54]]!=null){this[_0xa5a9[54]][_0xa5a9[3]]();this[_0xa5a9[54]][_0xa5a9[55]]();this[_0xa5a9[54]]=null}};Toolbar[_0xa5a9[6]][_0xa5a9[25]]=function(_0x916cxc,_0x916cxd,_0x916cxe,_0x916cxf){var _0x916cx10=this[_0xa5a9[0]][_0xa5a9[56]][_0xa5a9[24]](_0x916cxf);var _0x916cx11=this[_0xa5a9[58]](_0x916cxc,_0x916cxd,_0x916cxe,_0x916cx10[_0xa5a9[57]]);_0x916cx10[_0xa5a9[51]](_0xa5a9[59],function(){_0x916cx11[_0xa5a9[61]](_0x916cx10[_0xa5a9[60]])});return _0x916cx11};Toolbar[_0xa5a9[6]][_0xa5a9[58]]=function(_0x916cxc,_0x916cxd,_0x916cxe,_0x916cx12){var _0x916cx11=(_0x916cxe)?this[_0xa5a9[62]](_0x916cxc):this[_0xa5a9[63]](_0x916cxc);this[_0xa5a9[64]](_0x916cx11,_0x916cxd);this[_0xa5a9[65]](_0x916cx11,_0x916cxe,_0x916cx12);this[_0xa5a9[1]][_0xa5a9[66]](_0x916cx11);return _0x916cx11};Toolbar[_0xa5a9[6]][_0xa5a9[33]]=function(){var _0x916cx11=document[_0xa5a9[68]](_0xa5a9[67]);_0x916cx11[_0xa5a9[69]]=_0xa5a9[70];this[_0xa5a9[1]][_0xa5a9[66]](_0x916cx11);return _0x916cx11};Toolbar[_0xa5a9[6]][_0xa5a9[21]]=function(_0x916cx13){for(var _0x916cx14=0;_0x916cx14<_0x916cx13[_0xa5a9[47]];_0x916cx14++){var _0x916cx15=_0x916cx13[_0x916cx14];if(_0x916cx15==_0xa5a9[9]){this[_0xa5a9[33]]()}else {this[_0xa5a9[73]](_0xa5a9[71]+_0x916cx15[_0xa5a9[72]](),_0x916cx15)}}};Toolbar[_0xa5a9[6]][_0xa5a9[73]]=function(_0x916cx16,_0x916cx15){var _0x916cx17=this[_0xa5a9[0]][_0xa5a9[74]][_0xa5a9[24]](_0x916cx15);var _0x916cx11=null;if(_0x916cx17!=null){_0x916cx11=this[_0xa5a9[76]](_0x916cx16,_0x916cx17[_0xa5a9[75]],_0x916cx17[_0xa5a9[57]]);_0x916cx11[_0xa5a9[61]](_0x916cx17[_0xa5a9[60]]);_0x916cx17[_0xa5a9[51]](_0xa5a9[59],function(){_0x916cx11[_0xa5a9[61]](_0x916cx17[_0xa5a9[60]])})};return _0x916cx11};Toolbar[_0xa5a9[6]][_0xa5a9[76]]=function(_0x916cx18,_0x916cxd,_0x916cx12){var _0x916cx11=this[_0xa5a9[63]](_0x916cx18);this[_0xa5a9[64]](_0x916cx11,_0x916cxd);this[_0xa5a9[77]](_0x916cx11,_0x916cx12);this[_0xa5a9[1]][_0xa5a9[66]](_0x916cx11);return _0x916cx11};Toolbar[_0xa5a9[6]][_0xa5a9[78]]=function(_0x916cx19){var _0x916cx7=this[_0xa5a9[0]][_0xa5a9[41]][_0xa5a9[40]];var _0x916cx1a=function(){var _0x916cx1b=!_0x916cx7[_0xa5a9[79]]();for(var _0x916cx14=0;_0x916cx14<_0x916cx19[_0xa5a9[47]];_0x916cx14++){_0x916cx19[_0x916cx14][_0xa5a9[61]](_0x916cx1b)}};_0x916cx7[_0xa5a9[52]]()[_0xa5a9[51]](mxEvent.CHANGE,_0x916cx1a);_0x916cx1a()};Toolbar[_0xa5a9[6]][_0xa5a9[80]]=function(_0x916cx19){var _0x916cx7=this[_0xa5a9[0]][_0xa5a9[41]][_0xa5a9[40]];var _0x916cx1a=function(){var _0x916cx1c=false;if(!_0x916cx7[_0xa5a9[79]]()){var _0x916cx1d=_0x916cx7[_0xa5a9[81]]();for(var _0x916cx14=0;_0x916cx14<_0x916cx1d[_0xa5a9[47]];_0x916cx14++){if(_0x916cx7[_0xa5a9[53]]()[_0xa5a9[82]](_0x916cx1d[_0x916cx14])){_0x916cx1c=true;break}}};for(var _0x916cx14=0;_0x916cx14<_0x916cx19[_0xa5a9[47]];_0x916cx14++){_0x916cx19[_0x916cx14][_0xa5a9[61]](_0x916cx1c)}};_0x916cx7[_0xa5a9[52]]()[_0xa5a9[51]](mxEvent.CHANGE,_0x916cx1a);_0x916cx1a()};Toolbar[_0xa5a9[6]][_0xa5a9[64]]=function(_0x916cx11,_0x916cxd){_0x916cx11[_0xa5a9[85]](_0xa5a9[83],_0xa5a9[84]);if(_0x916cxd!=null){_0x916cx11[_0xa5a9[85]](_0xa5a9[86],_0x916cxd)};this[_0xa5a9[87]](_0x916cx11)};Toolbar[_0xa5a9[6]][_0xa5a9[87]]=function(_0x916cx11){var _0x916cx18=_0x916cx11[_0xa5a9[69]];_0x916cx11[_0xa5a9[61]]=function(_0x916cx1e){_0x916cx11[_0xa5a9[60]]=_0x916cx1e;if(_0x916cx1e){_0x916cx11[_0xa5a9[69]]=_0x916cx18}else {_0x916cx11[_0xa5a9[69]]=_0x916cx18+_0xa5a9[88]}};_0x916cx11[_0xa5a9[61]](true)};Toolbar[_0xa5a9[6]][_0xa5a9[77]]=function(_0x916cx11,_0x916cx12){if(_0x916cx12!=null){mxEvent[_0xa5a9[51]](_0x916cx11,_0xa5a9[89],function(_0x916cx4){if(_0x916cx11[_0xa5a9[60]]){_0x916cx12(_0x916cx4)};mxEvent[_0xa5a9[90]](_0x916cx4)})}};Toolbar[_0xa5a9[6]][_0xa5a9[63]]=function(_0x916cx18){var _0x916cx11=document[_0xa5a9[68]](_0xa5a9[91]);_0x916cx11[_0xa5a9[85]](_0xa5a9[92],_0xa5a9[93]);_0x916cx11[_0xa5a9[69]]=_0xa5a9[94];var _0x916cx1f=document[_0xa5a9[68]](_0xa5a9[67]);_0x916cx1f[_0xa5a9[69]]=_0xa5a9[95]+_0x916cx18;_0x916cx11[_0xa5a9[66]](_0x916cx1f);return _0x916cx11};Toolbar[_0xa5a9[6]][_0xa5a9[62]]=function(_0x916cxc,_0x916cxd){var _0x916cx11=document[_0xa5a9[68]](_0xa5a9[91]);_0x916cx11[_0xa5a9[85]](_0xa5a9[92],_0xa5a9[93]);_0x916cx11[_0xa5a9[69]]=_0xa5a9[96];mxUtils[_0xa5a9[97]](_0x916cx11,_0x916cxc);return _0x916cx11};Toolbar[_0xa5a9[6]][_0xa5a9[65]]=function(_0x916cx11,_0x916cxe,_0x916cx12,_0x916cx20){if(_0x916cx12!=null){var _0x916cx7=this[_0xa5a9[0]][_0xa5a9[41]][_0xa5a9[40]];var _0x916cx10=null;mxEvent[_0xa5a9[51]](_0x916cx11,_0xa5a9[89],mxUtils[_0xa5a9[4]](this,function(_0x916cx4){if(_0x916cx11[_0xa5a9[60]]==null||_0x916cx11[_0xa5a9[60]]){_0x916cx7[_0xa5a9[98]][_0xa5a9[3]]();_0x916cx10= new mxPopupMenu(_0x916cx12);_0x916cx10[_0xa5a9[67]][_0xa5a9[69]]+=_0xa5a9[99];_0x916cx10[_0xa5a9[100]]=_0x916cx20;_0x916cx10[_0xa5a9[101]]=_0x916cxe;_0x916cx10[_0xa5a9[102]]=true;_0x916cx10[_0xa5a9[106]](_0x916cx11[_0xa5a9[103]],_0x916cx11[_0xa5a9[104]]+_0x916cx11[_0xa5a9[105]]+34,null,_0x916cx4);this[_0xa5a9[54]]=_0x916cx10};mxEvent[_0xa5a9[90]](_0x916cx4)}))}}
\ No newline at end of file
+/**
+ * $Id: Toolbar.js,v 1.3 2013-02-20 16:21:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new toolbar for the given editor.
+ */
+function Toolbar(editorUi, container)
+{
+       this.editorUi = editorUi;
+       this.container = container;
+       this.init();
+
+       // Global handler to hide the current menu
+       mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+       {
+               this.hideMenu();
+       }));
+};
+
+/**
+ * Adds the toolbar elements.
+ */
+Toolbar.prototype.init = function()
+{
+       this.addItems(['save', 'publish', '-', 'print', 'undo', 'redo', '-', 'copy', 'cut', 'paste', 'delete', '-', 'duplicate', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
+       var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+       fontElt.style.whiteSpace = 'nowrap';
+       fontElt.style.overflow = 'hidden';
+       fontElt.style.width = '70px';
+       this.addSeparator();
+       var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+       sizeElt.style.whiteSpace = 'nowrap';
+       sizeElt.style.overflow = 'hidden';
+       sizeElt.style.width = '30px';
+
+       this.addItems(['-', 'bold', 'italic', 'underline']);
+       // Giuseppe Careri
+       // var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null).setAttribute('title', mxResources.get('left'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null).setAttribute('title', mxResources.get('center'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null).setAttribute('title', mxResources.get('right'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
+       // }));
+       // this.addItems(['fontColor', '-']);
+       // var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
+       // }));
+       // var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+       // }));
+       // var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+       // {
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+       //      this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+       // }));
+       // this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
+       // this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
+       // this.addItems(['shadow']);
+
+       var graph = this.editorUi.editor.graph;
+
+       // Update font size and font family labels
+       var update = mxUtils.bind(this, function()
+       {
+               var ff = 'Helvetica';
+               var fs = '12';
+       var state = graph.getView().getState(graph.getSelectionCell());
+
+       if (state != null)
+       {
+               ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
+               fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
+
+               if (ff.length > 10)
+               {
+                       ff = ff.substring(0, 8) + '...';
+               }
+
+               fontElt.innerHTML = ff;
+               sizeElt.innerHTML = fs;
+       }
+       });
+
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
+    graph.getModel().addListener(mxEvent.CHANGE, update);
+
+       // Giuseppe Careri
+       // Updates button states
+  //this.addEdgeSelectionHandler([line, linestart, lineend]);
+       //this.addSelectionHandler([align]);
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.hideMenu = function()
+{
+       if (this.currentMenu != null)
+       {
+               this.currentMenu.hideMenu();
+               this.currentMenu.destroy();
+               this.currentMenu = null;
+       }
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
+{
+       var menu = this.editorUi.menus.get(name);
+       var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
+
+       menu.addListener('stateChanged', function()
+       {
+               elt.setEnabled(menu.enabled);
+       });
+
+       return elt;
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
+{
+       var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
+       this.initElement(elt, tooltip);
+       this.addMenuHandler(elt, showLabels, funct);
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Adds a separator to the separator.
+ */
+Toolbar.prototype.addSeparator = function()
+{
+       var elt = document.createElement('div');
+       elt.className = 'geSeparator';
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItems = function(keys)
+{
+       for (var i = 0; i < keys.length; i++)
+       {
+               var key = keys[i];
+
+               if (key == '-')
+               {
+                       this.addSeparator();
+               }
+               else
+               {
+                       this.addItem('geSprite-' + key.toLowerCase(), key);
+               }
+       }
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItem = function(sprite, key)
+{
+       var action = this.editorUi.actions.get(key);
+       var elt = null;
+
+       if (action != null)
+       {
+               elt = this.addButton(sprite, action.label, action.funct);
+               elt.setEnabled(action.enabled);
+
+               action.addListener('stateChanged', function()
+               {
+                       elt.setEnabled(action.enabled);
+               });
+       }
+
+       return elt;
+};
+
+/**
+ * Adds a button to the toolbar.
+ */
+Toolbar.prototype.addButton = function(classname, tooltip, funct)
+{
+       var elt = this.createButton(classname);
+
+       this.initElement(elt, tooltip);
+       this.addClickHandler(elt, funct);
+       this.container.appendChild(elt);
+
+       return elt;
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addSelectionHandler = function(items)
+{
+       var graph = this.editorUi.editor.graph;
+
+       var selectionListener = function()
+    {
+       var selected = !graph.isSelectionEmpty();
+
+       for (var i = 0; i < items.length; i++)
+       {
+               items[i].setEnabled(selected);
+       }
+    };
+
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addEdgeSelectionHandler = function(items)
+{
+       var graph = this.editorUi.editor.graph;
+
+       var selectionListener = function()
+    {
+               var edgeSelected = false;
+
+               if (!graph.isSelectionEmpty())
+               {
+                       var cells = graph.getSelectionCells();
+
+                       for (var i = 0; i < cells.length; i++)
+                       {
+                               if (graph.getModel().isEdge(cells[i]))
+                               {
+                                       edgeSelected = true;
+                                       break;
+                               }
+                       }
+               }
+
+       for (var i = 0; i < items.length; i++)
+       {
+               items[i].setEnabled(edgeSelected);
+       }
+    };
+
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Initializes the given toolbar element.
+ */
+Toolbar.prototype.initElement = function(elt, tooltip)
+{
+       elt.setAttribute('tabindex', '0');
+
+       // Adds tooltip
+       if (tooltip != null)
+       {
+               elt.setAttribute('title', tooltip);
+       }
+
+       this.addEnabledState(elt);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addEnabledState = function(elt)
+{
+       var classname = elt.className;
+
+       elt.setEnabled = function(value)
+       {
+               elt.enabled = value;
+
+               if (value)
+               {
+                       elt.className = classname;
+               }
+               else
+               {
+                       elt.className = classname + ' geDisabled';
+               }
+       };
+
+       elt.setEnabled(true);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addClickHandler = function(elt, funct)
+{
+       if (funct != null)
+       {
+               mxEvent.addListener(elt, 'click', function(evt)
+               {
+                       if (elt.enabled)
+                       {
+                               funct(evt);
+                       }
+
+                       mxEvent.consume(evt);
+               });
+       }
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createButton = function(classname)
+{
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geButton';
+
+       var inner = document.createElement('div');
+       inner.className = 'geSprite ' + classname;
+       elt.appendChild(inner);
+
+       return elt;
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createLabel = function(label, tooltip)
+{
+       var elt = document.createElement('a');
+       elt.setAttribute('href', 'javascript:void(0);');
+       elt.className = 'geLabel';
+       mxUtils.write(elt, label);
+
+       return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
+{
+       if (funct != null)
+       {
+               var graph = this.editorUi.editor.graph;
+               var menu = null;
+
+               mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+               {
+                       if (elt.enabled == null || elt.enabled)
+                       {
+                               graph.panningHandler.hideMenu();
+                               menu = new mxPopupMenu(funct);
+                               menu.div.className += ' geToolbarMenu';
+                               menu.showDisabled = showAll;
+                               menu.labels = showLabels;
+                               menu.autoExpand = true;
+
+                               menu.popup(elt.offsetLeft, elt.offsetTop + elt.offsetHeight + 34, null, evt);
+                               this.currentMenu = menu;
+                       }
+
+                       mxEvent.consume(evt);
+               }));
+       }
+};
index 178d70c..39607c6 100644 (file)
@@ -1 +1,283 @@
-var _0xcf66=["\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x26","\x73\x70\x6C\x69\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x3D","\x69\x6E\x64\x65\x78\x4F\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x65\x78\x70\x2E\x64\x72\x61\x77\x2E\x69\x6F\x2F\x49\x6D\x61\x67\x65\x45\x78\x70\x6F\x72\x74\x32\x2F\x65\x78\x70\x6F\x72\x74","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x33\x30\x30\x30","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x68\x61\x70\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x74\x79\x6C\x65\x73","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6F\x70\x65\x6E","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x2F\x64\x69\x61","\x63\x75\x73\x74\x6F\x6D","\x4E\x47\x5F\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x4C\x41\x4E\x47\x5F\x4B\x45\x59","\x67\x65\x74\x49\x74\x65\x6D","\x6C\x6F\x67","\x65\x6E","\x65\x6E\x5F\x45\x4E","\x69\x74","\x6D\x78\x4C\x61\x6E\x67\x75\x61\x67\x65","\x61\x72","\x62\x73","\x63\x73","\x64\x61","\x64\x65","\x65\x6C","\x65\x73","\x65\x73\x2D\x61\x72","\x66\x72","\x68\x75","\x69\x64","\x6A\x61","\x6B\x6F","\x6E\x6C","\x6E\x6F","\x70\x6C","\x70\x74\x2D\x62\x72","\x70\x74","\x72\x6F","\x72\x75","\x73\x72","\x73\x76","\x74\x68","\x74\x72","\x75\x6B","\x7A\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x6A\x73","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x20\x43\x61\x6E\x74\x6F\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x54\x61\x69\x77\x61\x6E\x20\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x4D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x42\x72\x61\x7A\x69\x6C\x69\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x61\x74\x61\x6C\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x7A\x65\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x75\x74\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x49\x74\x61\x6C\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65\x09","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x4D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x4D\x61\x6C\x65","\x53\x77\x65\x64\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x53\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x4B\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x53\x70\x61\x69\x6E\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x4D\x65\x78\x69\x63\x6F\x29","\x49\x74\x61\x6C\x69\x61\x6E\x20\x28\x49\x74\x61\x6C\x79\x29\x20\x2F\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x28\x46\x69\x6E\x6C\x61\x6E\x64\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x46\x72\x61\x6E\x63\x65\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x50\x6F\x6C\x69\x73\x68\x20\x28\x50\x6F\x6C\x61\x6E\x64\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x50\x6F\x72\x74\x75\x67\x61\x6C\x29","\x43\x61\x74\x61\x6C\x61\x6E\x20\x28\x43\x61\x74\x61\x6C\x61\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x61\x69\x77\x61\x6E\x29","\x44\x61\x6E\x69\x73\x68\x20\x28\x44\x65\x6E\x6D\x61\x72\x6B\x29","\x47\x65\x72\x6D\x61\x6E\x20\x28\x47\x65\x72\x6D\x61\x6E\x79\x29","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x28\x4A\x61\x70\x61\x6E\x29","\x4B\x6F\x72\x65\x61\x6E\x20\x28\x4B\x6F\x72\x65\x61\x29","\x44\x75\x74\x63\x68\x20\x28\x4E\x65\x74\x68\x65\x72\x6C\x61\x6E\x64\x73\x29","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x6F\x72\x77\x61\x79\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x42\x72\x61\x7A\x69\x6C\x29","\x52\x75\x73\x73\x69\x61\x6E\x20\x28\x52\x75\x73\x73\x69\x61\x29","\x53\x77\x65\x64\x69\x73\x68\x20\x28\x53\x77\x65\x64\x65\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x43\x68\x69\x6E\x61\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x29","\x44\x65\x66\x61\x75\x6C\x74","\x44\x61\x74\x65","\x55\x53\x20\x4D\x6F\x6E\x65\x79","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39\x39","\x54\x69\x6D\x65","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72","\x53\x74\x72\x65\x65\x74\x73","\x55\x53\x20\x43\x69\x74\x79\x2F\x53\x74\x61\x74\x65\x73","\x41\x66\x72\x69\x6B\x61\x61\x6E\x73","\x41\x6C\x62\x61\x6E\x69\x61\x6E","\x41\x6D\x68\x61\x72\x69\x63","\x41\x72\x61\x62\x69\x63","\x41\x72\x6D\x65\x6E\x69\x61\x6E","\x41\x7A\x65\x72\x62\x61\x69\x6A\x61\x6E\x69","\x42\x61\x73\x71\x75\x65","\x42\x65\x6C\x61\x72\x75\x73\x69\x61\x6E","\x42\x65\x6E\x67\x61\x6C\x69","\x42\x69\x68\x61\x72\x69","\x42\x6F\x73\x6E\x69\x61\x6E","\x42\x72\x65\x74\x6F\x6E","\x42\x75\x6C\x67\x61\x72\x69\x61\x6E","\x43\x61\x6D\x62\x6F\x64\x69\x61\x6E","\x43\x61\x74\x61\x6C\x61\x6E","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x53\x69\x6D\x70\x6C\x69\x66\x69\x65\x64\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x29","\x43\x6F\x72\x73\x69\x63\x61\x6E","\x43\x72\x6F\x61\x74\x69\x61\x6E","\x43\x7A\x65\x63\x68","\x44\x61\x6E\x69\x73\x68","\x44\x75\x74\x63\x68","\x45\x6E\x67\x6C\x69\x73\x68","\x45\x73\x70\x65\x72\x61\x6E\x74\x6F","\x45\x73\x74\x6F\x6E\x69\x61\x6E","\x46\x61\x72\x6F\x65\x73\x65","\x46\x69\x6C\x69\x70\x69\x6E\x6F","\x46\x69\x6E\x6E\x69\x73\x68","\x46\x72\x65\x6E\x63\x68","\x46\x72\x69\x73\x69\x61\x6E","\x47\x61\x6C\x69\x63\x69\x61\x6E","\x47\x65\x6F\x72\x67\x69\x61\x6E","\x47\x65\x72\x6D\x61\x6E","\x47\x72\x65\x65\x6B","\x47\x75\x61\x72\x61\x6E\x69","\x47\x75\x6A\x61\x72\x61\x74\x69","\x48\x61\x63\x6B\x65\x72","\x48\x61\x75\x73\x61","\x48\x65\x62\x72\x65\x77","\x48\x69\x6E\x64\x69","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E","\x49\x63\x65\x6C\x61\x6E\x64\x69\x63","\x49\x6E\x64\x6F\x6E\x65\x73\x69\x61\x6E","\x49\x6E\x74\x65\x72\x6C\x69\x6E\x67\x75\x61","\x49\x72\x69\x73\x68","\x49\x74\x61\x6C\x69\x61\x6E","\x4A\x61\x76\x61\x6E\x65\x73\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65","\x4B\x61\x6E\x6E\x61\x64\x61","\x4B\x61\x7A\x61\x6B\x68","\x4B\x69\x6E\x79\x61\x72\x77\x61\x6E\x64\x61","\x4B\x69\x72\x75\x6E\x64\x69","\x4B\x6C\x69\x6E\x67\x6F\x6E","\x4B\x75\x72\x64\x69\x73\x68","\x4B\x6F\x72\x65\x61\x6E","\x4B\x79\x72\x67\x79\x7A","\x4C\x61\x6F\x74\x68\x69\x61\x6E","\x4C\x61\x74\x69\x6E","\x4C\x61\x74\x76\x69\x61\x6E","\x4C\x69\x6E\x67\x61\x6C\x61","\x4C\x69\x74\x68\x75\x61\x6E\x69\x61\x6E","\x4D\x61\x63\x65\x64\x6F\x6E\x69\x61\x6E","\x4D\x61\x6C\x61\x67\x61\x73\x79","\x4D\x61\x6C\x61\x79","\x4D\x61\x6C\x61\x79\x61\x6C\x61\x6D","\x4D\x61\x6C\x74\x65\x73\x65","\x4D\x61\x6F\x72\x69","\x4D\x61\x72\x61\x74\x68\x69","\x4D\x6F\x6C\x64\x61\x76\x69\x61\x6E","\x4D\x6F\x6E\x67\x6F\x6C\x69\x61\x6E","\x4D\x6F\x6E\x74\x65\x6E\x65\x67\x72\x69\x6E","\x4E\x65\x70\x61\x6C\x69","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x79\x6E\x6F\x72\x73\x6B\x29","\x4F\x63\x63\x69\x74\x61\x6E","\x4F\x72\x69\x79\x61","\x4F\x72\x6F\x6D\x6F","\x50\x61\x73\x68\x74\x6F","\x50\x65\x72\x73\x69\x61\x6E","\x50\x69\x72\x61\x74\x65","\x50\x6F\x6C\x69\x73\x68","\x50\x75\x6E\x6A\x61\x62\x69","\x51\x75\x65\x63\x68\x75\x61","\x52\x6F\x6D\x61\x6E\x69\x61\x6E","\x52\x6F\x6D\x61\x6E\x73\x68","\x52\x75\x73\x73\x69\x61\x6E","\x53\x63\x6F\x74\x73\x20\x47\x61\x65\x6C\x69\x63","\x53\x65\x72\x62\x69\x61\x6E","\x53\x65\x72\x62\x6F\x2D\x43\x72\x6F\x61\x74\x69\x61\x6E","\x53\x65\x73\x6F\x74\x68\x6F","\x53\x68\x6F\x6E\x61","\x53\x69\x6E\x64\x68\x69","\x53\x69\x6E\x68\x61\x6C\x65\x73\x65","\x53\x6C\x6F\x76\x61\x6B","\x53\x6C\x6F\x76\x65\x6E\x69\x61\x6E","\x53\x6F\x6D\x61\x6C\x69","\x53\x70\x61\x6E\x69\x73\x68","\x53\x75\x6E\x64\x61\x6E\x65\x73\x65","\x53\x77\x61\x68\x69\x6C\x69","\x53\x77\x65\x64\x69\x73\x68","\x54\x61\x6A\x69\x6B","\x54\x61\x6D\x69\x6C","\x54\x61\x74\x61\x72","\x54\x65\x6C\x75\x67\x75","\x54\x68\x61\x69","\x54\x69\x67\x72\x69\x6E\x79\x61","\x54\x6F\x6E\x67\x61","\x54\x75\x72\x6B\x69\x73\x68","\x54\x75\x72\x6B\x6D\x65\x6E","\x54\x77\x69","\x55\x69\x67\x68\x75\x72","\x55\x6B\x72\x61\x69\x6E\x69\x61\x6E","\x55\x72\x64\x75","\x55\x7A\x62\x65\x6B","\x56\x69\x65\x74\x6E\x61\x6D\x65\x73\x65","\x57\x65\x6C\x73\x68","\x58\x68\x6F\x73\x61","\x59\x69\x64\x64\x69\x73\x68","\x59\x6F\x72\x75\x62\x61","\x5A\x75\x6C\x75"];var urlParams=(function(_0x3efcx2){var _0x3efcx3= new Object();var _0x3efcx4=_0x3efcx2[_0xcf66[3]](_0xcf66[2]);if(_0x3efcx4>0){var _0x3efcx5=_0x3efcx2[_0xcf66[6]](_0x3efcx4+1)[_0xcf66[5]](_0xcf66[4]);for(var _0x3efcx6=0;_0x3efcx6<_0x3efcx5[_0xcf66[7]];_0x3efcx6++){_0x3efcx4=_0x3efcx5[_0x3efcx6][_0xcf66[9]](_0xcf66[8]);if(_0x3efcx4>0){_0x3efcx3[_0x3efcx5[_0x3efcx6][_0xcf66[6]](0,_0x3efcx4)]=_0x3efcx5[_0x3efcx6][_0xcf66[6]](_0x3efcx4+1)}}};return _0x3efcx3})(window[_0xcf66[1]][_0xcf66[0]]);var t0= new Date();var MAX_REQUEST_SIZE=10485760;var MAX_WIDTH=12000;var MAX_HEIGHT=12000;var EXPORT_URL=_0xcf66[10];var SHARE_HOST=_0xcf66[11];var SAVE_URL=_0xcf66[12];var VARIABLE_URL=_0xcf66[13];var STENCIL_PATH=_0xcf66[14];var SHAPES_PATH=_0xcf66[15];var IMAGE_PATH=_0xcf66[16];var STYLE_PATH=_0xcf66[17];var CSS_PATH=_0xcf66[17];var OPEN_FORM=_0xcf66[18];var TEMPLATE_PATH=_0xcf66[19];var RESOURCES_PATH=_0xcf66[20];var RESOURCE_BASE=RESOURCES_PATH+_0xcf66[21];var tapAndHoldStartsConnection=true;var showConnectorImg=true;var mxLoadResources=false;console[_0xcf66[25]](_0xcf66[22],localStorage[_0xcf66[24]](_0xcf66[23]));switch(localStorage[_0xcf66[24]](_0xcf66[23])){case _0xcf66[27]:mxLanguage=_0xcf66[26];break;case _0xcf66[28]:mxLanguage=_0xcf66[28];break;default:mxLanguage=_0xcf66[26]};console[_0xcf66[25]](_0xcf66[29],mxLanguage);var mxLanguages=[_0xcf66[30],_0xcf66[31],_0xcf66[32],_0xcf66[33],_0xcf66[34],_0xcf66[35],_0xcf66[36],_0xcf66[37],_0xcf66[38],_0xcf66[39],_0xcf66[40],_0xcf66[28],_0xcf66[41],_0xcf66[42],_0xcf66[43],_0xcf66[44],_0xcf66[45],_0xcf66[46],_0xcf66[47],_0xcf66[48],_0xcf66[49],_0xcf66[50],_0xcf66[51],_0xcf66[52],_0xcf66[53],_0xcf66[54],_0xcf66[55]];var mxBasePath=_0xcf66[56];var geBasePath=_0xcf66[57];var ISPEECHLANG={usenglishfemale:_0xcf66[58],usenglishmale:_0xcf66[59],ukenglishfemale:_0xcf66[60],ukenglishmale:_0xcf66[61],auenglishfemale:_0xcf66[62],usspanishfemale:_0xcf66[63],usspanishmale:_0xcf66[64],chchinesefemale:_0xcf66[65],chchinesemale:_0xcf66[66],hkchinesefemale:_0xcf66[67],twchinesefemale:_0xcf66[68],jpjapanesefemale:_0xcf66[69],jpjapanesemale:_0xcf66[70],krkoreanfemale:_0xcf66[71],krkoreanmale:_0xcf66[72],caenglishfemale:_0xcf66[73],huhungarianfemale:_0xcf66[74],brportuguesefemale:_0xcf66[75],eurportuguesefemale:_0xcf66[76],eurportuguesemale:_0xcf66[77],eurspanishfemale:_0xcf66[78],eurspanishmale:_0xcf66[79],eurcatalanfemale:_0xcf66[80],eurczechfemale:_0xcf66[81],eurdanishfemale:_0xcf66[82],eurfinnishfemale:_0xcf66[83],eurfrenchfemale:_0xcf66[84],eurfrenchmale:_0xcf66[85],eurnorwegianfemale:_0xcf66[86],eurdutchfemale:_0xcf66[87],eurpolishfemale:_0xcf66[88],euritalianfemale:_0xcf66[89],eurturkishfemale:_0xcf66[90],eurturkishmale:_0xcf66[91],eurgermanfemale:_0xcf66[92],eurgermanmale:_0xcf66[93],rurussianfemale:_0xcf66[94],rurussianmale:_0xcf66[95],swswedishfemale:_0xcf66[96],cafrenchfemale:_0xcf66[97],cafrenchmale:_0xcf66[98]};var ISPEECHASRLANG={"\x65\x6E\x2D\x55\x53":_0xcf66[99],"\x65\x6E\x2D\x43\x41":_0xcf66[100],"\x65\x6E\x2D\x47\x42":_0xcf66[101],"\x65\x6E\x2D\x41\x55":_0xcf66[102],"\x65\x73\x2D\x45\x53":_0xcf66[103],"\x65\x73\x2D\x4D\x58":_0xcf66[104],"\x69\x74\x2D\x49\x54":_0xcf66[105],"\x66\x72\x2D\x46\x52":_0xcf66[106],"\x66\x72\x2D\x43\x41":_0xcf66[107],"\x70\x6C\x2D\x50\x4C":_0xcf66[108],"\x70\x74\x2D\x50\x54":_0xcf66[109],"\x63\x61\x2D\x45\x53":_0xcf66[110],"\x7A\x68\x2D\x54\x57":_0xcf66[111],"\x64\x61\x2D\x44\x4B":_0xcf66[112],"\x66\x72\x2D\x46\x52":_0xcf66[113],"\x6A\x61\x2D\x4A\x50":_0xcf66[114],"\x6B\x6F\x2D\x4B\x52":_0xcf66[115],"\x6E\x6C\x2D\x4E\x4C":_0xcf66[116],"\x6E\x62\x2D\x4E\x4F":_0xcf66[117],"\x70\x74\x2D\x42\x52":_0xcf66[118],"\x72\x75\x2D\x52\x55":_0xcf66[119],"\x73\x76\x2D\x53\x45":_0xcf66[120],"\x7A\x68\x2D\x43\x4E":_0xcf66[121],"\x7A\x68\x2D\x48\x4B":_0xcf66[122]};var ISPEECHASRMODEL={0:_0xcf66[123],date:_0xcf66[124],usmoney:_0xcf66[125],numbersto9:_0xcf66[126],numbersto99:_0xcf66[127],numbersto999:_0xcf66[128],time:_0xcf66[129],phonenumber:_0xcf66[130],streets:_0xcf66[131],citystate:_0xcf66[132]};var GOOGLETTSLANG={"\x61\x66":_0xcf66[133],"\x73\x71":_0xcf66[134],"\x61\x6D":_0xcf66[135],"\x61\x72":_0xcf66[136],"\x68\x79":_0xcf66[137],"\x61\x7A":_0xcf66[138],"\x65\x75":_0xcf66[139],"\x62\x65":_0xcf66[140],"\x62\x6E":_0xcf66[141],"\x62\x68":_0xcf66[142],"\x62\x73":_0xcf66[143],"\x62\x72":_0xcf66[144],"\x62\x67":_0xcf66[145],"\x6B\x6D":_0xcf66[146],"\x63\x61":_0xcf66[147],"\x7A\x68\x2D\x43\x4E":_0xcf66[148],"\x7A\x68\x2D\x54\x57":_0xcf66[149],"\x63\x6F":_0xcf66[150],"\x68\x72":_0xcf66[151],"\x63\x73":_0xcf66[152],"\x64\x61":_0xcf66[153],"\x6E\x6C":_0xcf66[154],"\x65\x6E":_0xcf66[155],"\x65\x6F":_0xcf66[156],"\x65\x74":_0xcf66[157],"\x66\x6F":_0xcf66[158],"\x74\x6C":_0xcf66[159],"\x66\x69":_0xcf66[160],"\x66\x72":_0xcf66[161],"\x66\x79":_0xcf66[162],"\x67\x6C":_0xcf66[163],"\x6B\x61":_0xcf66[164],"\x64\x65":_0xcf66[165],"\x65\x6C":_0xcf66[166],"\x67\x6E":_0xcf66[167],"\x67\x75":_0xcf66[168],"\x78\x78\x2D\x68\x61\x63\x6B\x65\x72":_0xcf66[169],"\x68\x61":_0xcf66[170],"\x69\x77":_0xcf66[171],"\x68\x69":_0xcf66[172],"\x68\x75":_0xcf66[173],"\x69\x73":_0xcf66[174],"\x69\x64":_0xcf66[175],"\x69\x61":_0xcf66[176],"\x67\x61":_0xcf66[177],"\x69\x74":_0xcf66[178],"\x6A\x77":_0xcf66[179],"\x6A\x61":_0xcf66[180],"\x6B\x6E":_0xcf66[181],"\x6B\x6B":_0xcf66[182],"\x72\x77":_0xcf66[183],"\x72\x6E":_0xcf66[184],"\x78\x78\x2D\x6B\x6C\x69\x6E\x67\x6F\x6E":_0xcf66[185],"\x6B\x75":_0xcf66[186],"\x6B\x6F":_0xcf66[187],"\x6B\x79":_0xcf66[188],"\x6C\x6F":_0xcf66[189],"\x6C\x61":_0xcf66[190],"\x6C\x76":_0xcf66[191],"\x6C\x6E":_0xcf66[192],"\x6C\x74":_0xcf66[193],"\x6D\x6B":_0xcf66[194],"\x6D\x67":_0xcf66[195],"\x6D\x73":_0xcf66[196],"\x6D\x6C":_0xcf66[197],"\x6D\x74":_0xcf66[198],"\x6D\x69":_0xcf66[199],"\x6D\x72":_0xcf66[200],"\x6D\x6F":_0xcf66[201],"\x6D\x6E":_0xcf66[202],"\x73\x72\x2D\x4D\x45":_0xcf66[203],"\x6E\x65":_0xcf66[204],"\x6E\x6F":_0xcf66[205],"\x6E\x6E":_0xcf66[206],"\x6F\x63":_0xcf66[207],"\x6F\x72":_0xcf66[208],"\x6F\x6D":_0xcf66[209],"\x70\x73":_0xcf66[210],"\x66\x61":_0xcf66[211],"\x78\x78\x2D\x70\x69\x72\x61\x74\x65":_0xcf66[212],"\x70\x6C":_0xcf66[213],"\x70\x74\x2D\x42\x52":_0xcf66[118],"\x70\x74\x2D\x50\x54":_0xcf66[109],"\x70\x61":_0xcf66[214],"\x71\x75":_0xcf66[215],"\x72\x6F":_0xcf66[216],"\x72\x6D":_0xcf66[217],"\x72\x75":_0xcf66[218],"\x67\x64":_0xcf66[219],"\x73\x72":_0xcf66[220],"\x73\x68":_0xcf66[221],"\x73\x74":_0xcf66[222],"\x73\x6E":_0xcf66[223],"\x73\x64":_0xcf66[224],"\x73\x69":_0xcf66[225],"\x73\x6B":_0xcf66[226],"\x73\x6C":_0xcf66[227],"\x73\x6F":_0xcf66[228],"\x65\x73":_0xcf66[229],"\x73\x75":_0xcf66[230],"\x73\x77":_0xcf66[231],"\x73\x76":_0xcf66[232],"\x74\x67":_0xcf66[233],"\x74\x61":_0xcf66[234],"\x74\x74":_0xcf66[235],"\x74\x65":_0xcf66[236],"\x74\x68":_0xcf66[237],"\x74\x69":_0xcf66[238],"\x74\x6F":_0xcf66[239],"\x74\x72":_0xcf66[240],"\x74\x6B":_0xcf66[241],"\x74\x77":_0xcf66[242],"\x75\x67":_0xcf66[243],"\x75\x6B":_0xcf66[244],"\x75\x72":_0xcf66[245],"\x75\x7A":_0xcf66[246],"\x76\x69":_0xcf66[247],"\x63\x79":_0xcf66[248],"\x78\x68":_0xcf66[249],"\x79\x69":_0xcf66[250],"\x79\x6F":_0xcf66[251],"\x7A\x75":_0xcf66[252]}
\ No newline at end of file
+var urlParams = (function(url) {
+       var result = new Object();
+       var idx = url.lastIndexOf('?');
+
+       if (idx > 0) {
+               var params = url.substring(idx + 1).split('&');
+
+               for (var i = 0; i < params.length; i++) {
+                       idx = params[i].indexOf('=');
+
+                       if (idx > 0) {
+                               result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+                       }
+               }
+       }
+
+       return result;
+})(window.location.href);
+
+var t0 = new Date();
+
+// Public global variables
+var MAX_REQUEST_SIZE = 10485760;
+var MAX_WIDTH = 12000;
+var MAX_HEIGHT = 12000;
+
+// CUSTOM_PARAMETERS - URLs for save and export
+var EXPORT_URL = 'http://exp.draw.io/ImageExport2/export';
+var SHARE_HOST = 'http://localhost:3000';
+
+var SAVE_URL = 'api/square/projects/';
+var VARIABLE_URL = '/api/variables';
+
+// Paths and files
+var STENCIL_PATH = '/assets/plugins/square/stencils';
+var SHAPES_PATH = '/assets/plugins/square/shapes';
+var IMAGE_PATH = '/assets/plugins/mxgraph/images';
+// Path for images inside the diagram
+//var GRAPH_IMAGE_PATH = 'assets/plugins/mxgraph/img';
+//var ICONFINDER_PATH = 'iconfinder';
+var STYLE_PATH = '/assets/plugins/mxgraph/styles';
+var CSS_PATH = '/assets/plugins/mxgraph/styles';
+var OPEN_FORM = 'api/square/projects/open';
+var TEMPLATE_PATH = '/assets/plugins/square/templates';
+
+// Directory for i18 files and basename for main i18n file
+var RESOURCES_PATH = '/assets/plugins/square/resources';
+var RESOURCE_BASE = RESOURCES_PATH + '/dia';
+
+// Specifies connection mode for touch devices (at least one should be true)
+var tapAndHoldStartsConnection = true;
+var showConnectorImg = true;
+
+var mxLoadResources = false;
+// var mxLanguage = 'it';
+console.log('custom', localStorage.getItem("NG_TRANSLATE_LANG_KEY"));
+switch (localStorage.getItem("NG_TRANSLATE_LANG_KEY")) {
+       case 'en_EN':
+               mxLanguage = 'en';
+               break;
+       case 'it':
+               mxLanguage = 'it';
+               break;
+       default:
+               mxLanguage = 'en';
+}
+console.log('mxLanguage', mxLanguage);
+
+var mxLanguages = ['ar', 'bs', 'cs', 'da', 'de', 'el', 'es', 'es-ar', 'fr',
+       'hu', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru',
+       'sr', 'sv', 'th', 'tr', 'uk', 'zh'
+];
+var mxBasePath = 'assets/plugins/mxgraph';
+var geBasePath = 'assets/plugins/mxgraph/js';
+
+var ISPEECHLANG = {
+       usenglishfemale: "US English Female",
+       usenglishmale: "US English Male",
+       ukenglishfemale: "UK English Female",
+       ukenglishmale: "UK English Male",
+       auenglishfemale: "Australian English",
+       usspanishfemale: "US Spanish Female",
+       usspanishmale: "US Spanish Male",
+       chchinesefemale: "Chinese Female",
+       chchinesemale: "Chinese Male",
+       hkchinesefemale: "Hong Kong Cantonese Female",
+       twchinesefemale: "Taiwan Chinese Female",
+       jpjapanesefemale: "Japanese Female",
+       jpjapanesemale: "Japanese Male",
+       krkoreanfemale: "Korean Female",
+       krkoreanmale: "Korean Male",
+       caenglishfemale: "Canadian English Female",
+       huhungarianfemale: "Hungarian Female",
+       brportuguesefemale: "Brazilian Portuguese Female",
+       eurportuguesefemale: "European Portuguese Female",
+       eurportuguesemale: "European Portuguese Male",
+       eurspanishfemale: "European Spanish Female",
+       eurspanishmale: "European Spanish Male",
+       eurcatalanfemale: "European Catalan Female",
+       eurczechfemale: "European Czech Female",
+       eurdanishfemale: "European Danish Female",
+       eurfinnishfemale: "European Finnish Female",
+       eurfrenchfemale: "European French Female",
+       eurfrenchmale: "European French Male",
+       eurnorwegianfemale: "European Norwegian Female",
+       eurdutchfemale: "European Dutch Female",
+       eurpolishfemale: "European Polish Female",
+       euritalianfemale: "European Italian Female",
+       eurturkishfemale: "European Turkish Female      ",
+       eurturkishmale: "European Turkish Male",
+       eurgermanfemale: "European German Female",
+       eurgermanmale: "European German Male",
+       rurussianfemale: "Russian Female",
+       rurussianmale: "Russian Male",
+       swswedishfemale: "Swedish Female",
+       cafrenchfemale: "Canadian French Female",
+       cafrenchmale: "Canadian French Male"
+};
+
+var ISPEECHASRLANG = {
+       "en-US": "English (US)",
+       "en-CA": "English (Canada)",
+       "en-GB": "English (UK)",
+       "en-AU": "English (Australia)",
+       "es-ES": "Spanish (Spain)",
+       "es-MX": "Spanish (Mexico)",
+       "it-IT": "Italian (Italy) / Finnish (Finland)",
+       "fr-FR": "French (France)",
+       "fr-CA": "French (Canada)",
+       "pl-PL": "Polish (Poland)",
+       "pt-PT": "Portuguese (Portugal)",
+       "ca-ES": "Catalan (Catalan)",
+       "zh-TW": "Chinese (Taiwan)",
+       "da-DK": "Danish (Denmark)",
+       "fr-FR": "German (Germany)",
+       "ja-JP": "Japanese (Japan)",
+       "ko-KR": "Korean (Korea)",
+       "nl-NL": "Dutch (Netherlands)",
+       "nb-NO": "Norwegian (Norway)",
+       "pt-BR": "Portuguese (Brazil)",
+       "ru-RU": "Russian (Russia)",
+       "sv-SE": "Swedish (Sweden)",
+       "zh-CN": "Chinese (China)",
+       "zh-HK": "Chinese (Hong Kong)"
+};
+
+var ISPEECHASRMODEL = {
+       0: "Default",
+       date: "Date",
+       usmoney: "US Money",
+       numbersto9: "Numbers to 9",
+       numbersto99: "Numbers to 99",
+       numbersto999: "Numbers to 999",
+       time: "Time",
+       phonenumber: "Phone number",
+       streets: "Streets",
+       citystate: "US City/States"
+};
+
+var GOOGLETTSLANG = {
+       "af": "Afrikaans",
+       "sq": "Albanian",
+       "am": "Amharic",
+       "ar": "Arabic",
+       "hy": "Armenian",
+       "az": "Azerbaijani",
+       "eu": "Basque",
+       "be": "Belarusian",
+       "bn": "Bengali",
+       "bh": "Bihari",
+       "bs": "Bosnian",
+       "br": "Breton",
+       "bg": "Bulgarian",
+       "km": "Cambodian",
+       "ca": "Catalan",
+       "zh-CN": "Chinese (Simplified)",
+       "zh-TW": "Chinese (Traditional)",
+       "co": "Corsican",
+       "hr": "Croatian",
+       "cs": "Czech",
+       "da": "Danish",
+       "nl": "Dutch",
+       "en": "English",
+       "eo": "Esperanto",
+       "et": "Estonian",
+       "fo": "Faroese",
+       "tl": "Filipino",
+       "fi": "Finnish",
+       "fr": "French",
+       "fy": "Frisian",
+       "gl": "Galician",
+       "ka": "Georgian",
+       "de": "German",
+       "el": "Greek",
+       "gn": "Guarani",
+       "gu": "Gujarati",
+       "xx-hacker": "Hacker",
+       "ha": "Hausa",
+       "iw": "Hebrew",
+       "hi": "Hindi",
+       "hu": "Hungarian",
+       "is": "Icelandic",
+       "id": "Indonesian",
+       "ia": "Interlingua",
+       "ga": "Irish",
+       "it": "Italian",
+       "jw": "Javanese",
+       "ja": "Japanese",
+       "kn": "Kannada",
+       "kk": "Kazakh",
+       "rw": "Kinyarwanda",
+       "rn": "Kirundi",
+       "xx-klingon": "Klingon",
+       "ku": "Kurdish",
+       "ko": "Korean",
+       "ky": "Kyrgyz",
+       "lo": "Laothian",
+       "la": "Latin",
+       "lv": "Latvian",
+       "ln": "Lingala",
+       "lt": "Lithuanian",
+       "mk": "Macedonian",
+       "mg": "Malagasy",
+       "ms": "Malay",
+       "ml": "Malayalam",
+       "mt": "Maltese",
+       "mi": "Maori",
+       "mr": "Marathi",
+       "mo": "Moldavian",
+       "mn": "Mongolian",
+       "sr-ME": "Montenegrin",
+       "ne": "Nepali",
+       "no": "Norwegian",
+       "nn": "Norwegian (Nynorsk)",
+       "oc": "Occitan",
+       "or": "Oriya",
+       "om": "Oromo",
+       "ps": "Pashto",
+       "fa": "Persian",
+       "xx-pirate": "Pirate",
+       "pl": "Polish",
+       "pt-BR": "Portuguese (Brazil)",
+       "pt-PT": "Portuguese (Portugal)",
+       "pa": "Punjabi",
+       "qu": "Quechua",
+       "ro": "Romanian",
+       "rm": "Romansh",
+       "ru": "Russian",
+       "gd": "Scots Gaelic",
+       "sr": "Serbian",
+       "sh": "Serbo-Croatian",
+       "st": "Sesotho",
+       "sn": "Shona",
+       "sd": "Sindhi",
+       "si": "Sinhalese",
+       "sk": "Slovak",
+       "sl": "Slovenian",
+       "so": "Somali",
+       "es": "Spanish",
+       "su": "Sundanese",
+       "sw": "Swahili",
+       "sv": "Swedish",
+       "tg": "Tajik",
+       "ta": "Tamil",
+       "tt": "Tatar",
+       "te": "Telugu",
+       "th": "Thai",
+       "ti": "Tigrinya",
+       "to": "Tonga",
+       "tr": "Turkish",
+       "tk": "Turkmen",
+       "tw": "Twi",
+       "ug": "Uighur",
+       "uk": "Ukrainian",
+       "ur": "Urdu",
+       "uz": "Uzbek",
+       "vi": "Vietnamese",
+       "cy": "Welsh",
+       "xh": "Xhosa",
+       "yi": "Yiddish",
+       "yo": "Yoruba",
+       "zu": "Zulu"
+};
index 079d6e7..19ba021 100644 (file)
@@ -345,9 +345,10 @@ var ComponentsDropdowns = function() {
         option.text = teams[team].Users[user].fullname + ' <' + teams[team].Users[user].name + ',' + teams[team].Users[user].internal + '>';
         if (_.includes(_.map(queues, 'id'), teams[team].Users[user].id)) {
           option.setAttribute('selected', '');
-          option.text += ' (' + _.find(queues, {
+          var user = _.find(queues, {
             id: teams[team].Users[user].id
-          }).penalty + ')';
+          });
+          option.text += user.hasOwnProperty('penalty') ? ' (' + user.penalty + ')' : '';
         }
 
         optgroup.appendChild(option);
index f6e9591..2f59a32 100644 (file)
@@ -13,7 +13,7 @@
     <meta name="viewport" content="width=device-width">
     <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
     <link rel="stylesheet" href="app/fc48ba87.vendor.css">
-    <link rel="stylesheet" href="app/e9688178.app.css">
+    <link rel="stylesheet" href="app/e59e4d75.app.css">
 
     <!-- BEGIN DYMANICLY LOADED CSS FILES (all plugin and page related styles must be loaded between GLOBAL and THEME css files ) -->
     <link id="ng_load_plugins_before"/>
@@ -61,7 +61,7 @@
     <![endif]-->
     <script src="app/47e08aab.vendor.js"></script>
 
-    <script src="app/9803d603.app.js"></script>
+    <script src="app/7f4f3cd9.app.js"></script>
 
     <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
     <!-- BEGIN CORE PLUGINS -->
diff --git a/release-notes/changelog_0.0.66.txt b/release-notes/changelog_0.0.66.txt
deleted file mode 100644 (file)
index ee06b36..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-# xCALLY MOTION Changelog
-
-- * 52def3a - 2016-03-18: server config impa update 
-- * cdc1bbd - 2016-03-18: server config smtp smtp.js 
-- * d2dc7dd - 2016-03-18: server api report_call 
-- * 9e7fd0f - 2016-03-18: server routes.js 
-- * 4f89e30 - 2016-03-18: socketio.js 
-- * 1dd1ceb - 2016-03-18: server side config tools dashboard 
-- * d3acb58 - 2016-03-18: server side api chat_room, report_call, report_queue 
-- * bcf8117 - 2016-03-18: quickSidebar update 
-- * 3e2e648 - 2016-03-18: client assets languages 
-- * 5fd9cde - 2016-03-18: client app dashboard 
-- * 7cfb2bc - 2016-03-18: client side app channels mail + voice 
-- * 31cbcd8 - 2016-03-17: Fixed multiple user update after state change 
-- * 21a252e - 2016-03-17: $translate for cm import 
-- * bb9760a - 2016-03-17: Added lastqueue for acw status 
-- * f0b7a58 - 2016-03-17: Fixed variable set in square for a value with spaces; Fixed list update after create/import in services and contacts 
-- * c0c9cbc - 2016-03-17: moh translate directive 
-- * 3df24db - 2016-03-16: Remove mail in the motion bar controller. I open directly the browser. 
-- * 7186f36 - 2016-03-16: dashboard tools 
-- * c46770d - 2016-03-16: client assets languages 
-- * aefac3a - 2016-03-16: server config socketio.js 
-- * d82155b - 2016-03-16: server + client side mail 
-- * 2ce2883 - 2016-03-16: client app dashboard 
-- * 0f84cc4 - 2016-03-16: server side dashboard + socketio.js 
-- * 957b565 - 2016-03-16: fixed dashboard create 
-- * 2124bee - 2016-03-16: fixed sidebar 
-- * b0e1687 - 2016-03-16: Fixed voice realtime queueStatus 
-- * b5cea88 - 2016-03-16: fixed active class on dashboard 
-- * 506dd29 - 2016-03-16: server side report_queue dashboard realtime api 
-- * d12fc36 - 2016-03-16: client side app voice dashboard 
-- * 3f7c99d - 2016-03-16: fixed chanspy.js 
-- * 56afb8e - 2016-03-16: client side assets languages 
-- * 8d1861a - 2016-03-16: add chanSpy.js 
-- * 5fd994a - 2016-03-16: delete chanspy.js 
-- * db7e0ed - 2016-03-16: Added queueStatus filter for voice realtime 
-- * c7cb7eb - 2016-03-16: add complete and abandon fields for report chat 
-- * c26b760 - 2016-03-16: Added queue and queuestatus for voice realtime 
-- * 2ec954b - 2016-03-16: History service update 
-- * efaf89f - 2016-03-16: Updated history service 
-- * c2bff74 - 2016-03-16: chanspy include 
-- * b7b498e - 2016-03-15: post-mege.sh 
-- * e83121e - 2016-03-15: test commit 1 
-- * 0035cf9 - 2016-03-15: add scripts in gruntfile 
-- * 190d31b - 2016-03-15: Changed history move service and added missing history tables. 
-- * 4253e76 - 2016-03-15: migration add migration test file 
-- * c122b65 - 2016-03-15: migration test remove 
-- * 6c220c9 - 2016-03-15: scripts post-mgerge.sh 
-- * 4455a16 - 2016-03-15: client side app dashboard, setting 
-- * 2b9b453 - 2016-03-15: server side models user + trunk 
-- * a7c9762 - 2016-03-15: remove watch pm2 
-- * d9dfa20 - 2016-03-15: add script post-merge 
-- * c70eda7 - 2016-03-15: new version 
-- * e5bd937 - 2016-03-15: Added realtime for fax and mail 
-- * 6ba214e - 2016-03-15: Added agents realtime for chat 
-- * 0db3999 - 2016-03-14: add abandon chat 
-- * d00539b - 2016-03-14: Updated agi scripts 
-- * 9d939b6 - 2016-03-14: transfer management 
-- * 5a16d57 - 2016-03-14: Added set cdr type for agents extensions 
-- * d3f33a0 - 2016-03-14: Fixed agi switch and getvariable 
-- * 3cc1fa8 - 2016-03-14: server side api update 
-- * 7d38e40 - 2016-03-14: assets css error 
-- * 8bee097 - 2016-03-14: client app setting update 
-- * 7591611 - 2016-03-14: commit test 12 
-- * 239a7fe - 2016-03-14: Fixed square async varset and other blocks; Fixed voice realtime pause display. 
-- * 2907dfc - 2016-03-14: commit test 11 
-- * fc83d63 - 2016-03-14: commit test 10 
-- * 643f950 - 2016-03-14: commit test 10 
-- * b15f247 - 2016-03-14: commit test 9 
-- * e0a6c37 - 2016-03-14: commit test 8 
-- * 0f8a091 - 2016-03-14: commit test 7 
-- * 1a3ca42 - 2016-03-11: updated agi 
-- * 2845516 - 2016-03-11: commit test 6 
-- * 5c347d8 - 2016-03-11: commit test 5 
-- * 080906a - 2016-03-11: commit test 4 
-- * afcaa50 - 2016-03-11: commit test 3 
-- * b5e6ad6 - 2016-03-11: commit test 2 
-- * b62a0b5 - 2016-03-11: jscripty mxgraph sidebar and menubar update 
-- * 53aefdd - 2016-03-11: jscripty summary table update 
-- * 3a6c93e - 2016-03-11: jscripty report client side update 
-- * 899e7f2 - 2016-03-11: jscripty templete and directive update 
-- * f3cbf55 - 2016-03-11: jscripty server side update. I modified the queries for getting questions summary and detail. I added scope in questions model. 
-- * d77cb9c - 2016-03-11: commit test 
-- * 4909131 - 2016-03-11: server side api sending 
-- * e26a2a9 - 2016-03-11: bower.json 
-- * cfb6f8f - 2016-03-11: serve side models 
-- * 46d4d8b - 2016-03-11: client side app setting update list.controller + app.js 
-- * 29349c0 - 2016-03-11: add odbc check connection 
-
diff --git a/release-notes/changelog_0.0.70.txt b/release-notes/changelog_0.0.70.txt
new file mode 100644 (file)
index 0000000..977031d
--- /dev/null
@@ -0,0 +1,62 @@
+# xCALLY MOTION Changelog
+
+- * eaa59f6 - 2016-03-23: client app setting update 
+- * 35d5dba - 2016-03-23: client side app mail account 
+- * da6dbe3 - 2016-03-23: server side models 
+- * 2a76229 - 2016-03-23: server config smtp 
+- * 6aabf5a - 2016-03-23: server config map 
+- * f9d8d0e - 2016-03-23: server side api 
+- * 084f17f - 2016-03-23: Check Socket Userid 
+- * a81f050 - 2016-03-23: Modify PhonebarPort with PhonebarListenPort 
+- * f90472e - 2016-03-23: Add parameters in db for motion bar to manage stack SIP 
+- * 384f4fb - 2016-03-23: Added history for contact view 
+- * 17ba013 - 2016-03-23: Check Socket Agent Messages 
+- * 0591188 - 2016-03-22: Rewrote Contact Manager( History and testing still missing) 
+- * 148e0cf - 2016-03-22: client side app channels voice route application removing bug fix 
+- * 0239f44 - 2016-03-22: server config map update 
+- * cbd7bcd - 2016-03-22: server config imap OO prototype style 
+- * 4914f36 - 2016-03-22: server config tools user 
+- * f346d2d - 2016-03-22: new version 
+- * 7f76213 - 2016-03-21: Change sox library 
+- * 5fa109d - 2016-03-21: client side mail inbox assignment 
+- * 97eb221 - 2016-03-21: client app mail account wizard mail conn times msec to sec 
+- * e885000 - 2016-03-21: mail_server_in conn times msec to sec 
+- * aa1221b - 2016-03-21: server config tools dashboard.js 
+- * bbcb218 - 2016-03-18: remove spindrift 
+- * 52def3a - 2016-03-18: server config impa update 
+- * cdc1bbd - 2016-03-18: server config smtp smtp.js 
+- * d2dc7dd - 2016-03-18: server api report_call 
+- * 9e7fd0f - 2016-03-18: server routes.js 
+- * 4f89e30 - 2016-03-18: socketio.js 
+- * 1dd1ceb - 2016-03-18: server side config tools dashboard 
+- * d3acb58 - 2016-03-18: server side api chat_room, report_call, report_queue 
+- * bcf8117 - 2016-03-18: quickSidebar update 
+- * 3e2e648 - 2016-03-18: client assets languages 
+- * 5fd9cde - 2016-03-18: client app dashboard 
+- * 7cfb2bc - 2016-03-18: client side app channels mail + voice 
+- * 31cbcd8 - 2016-03-17: Fixed multiple user update after state change 
+- * 21a252e - 2016-03-17: $translate for cm import 
+- * bb9760a - 2016-03-17: Added lastqueue for acw status 
+- * f0b7a58 - 2016-03-17: Fixed variable set in square for a value with spaces; Fixed list update after create/import in services and contacts 
+- * c0c9cbc - 2016-03-17: moh translate directive 
+- * 3df24db - 2016-03-16: Remove mail in the motion bar controller. I open directly the browser. 
+- * 7186f36 - 2016-03-16: dashboard tools 
+- * c46770d - 2016-03-16: client assets languages 
+- * aefac3a - 2016-03-16: server config socketio.js 
+- * d82155b - 2016-03-16: server + client side mail 
+- * 2ce2883 - 2016-03-16: client app dashboard 
+- * 0f84cc4 - 2016-03-16: server side dashboard + socketio.js 
+- * 957b565 - 2016-03-16: fixed dashboard create 
+- * 2124bee - 2016-03-16: fixed sidebar 
+- * b0e1687 - 2016-03-16: Fixed voice realtime queueStatus 
+- * b5cea88 - 2016-03-16: fixed active class on dashboard 
+- * 506dd29 - 2016-03-16: server side report_queue dashboard realtime api 
+- * d12fc36 - 2016-03-16: client side app voice dashboard 
+- * 3f7c99d - 2016-03-16: fixed chanspy.js 
+- * 56afb8e - 2016-03-16: client side assets languages 
+- * 8d1861a - 2016-03-16: add chanSpy.js 
+- * 5fd994a - 2016-03-16: delete chanspy.js 
+- * db7e0ed - 2016-03-16: Added queueStatus filter for voice realtime 
+- * c7cb7eb - 2016-03-16: add complete and abandon fields for report chat 
+- * c26b760 - 2016-03-16: Added queue and queuestatus for voice realtime 
+
index 11ea78e..4739dd7 100644 (file)
@@ -2,7 +2,10 @@
 
 echo "post-merge started"
 cd /var/opt/motion
-npm install --production
+echo "npm install"
+env CC=/opt/rh/devtoolset-3/root/usr/bin/gcc CXX=/opt/rh/devtoolset-3/root/usr/bin/g++ npm install --production
+echo "sequelize"
 sequelize db:migrate --migrations-path server/migrations --config server/config/environment/dbconf.json --env production
+echo "pm2 restart"
 pm2 restart motion
 echo "post-merge finished"
index 424aeef..3338ae5 100644 (file)
@@ -1 +1,116 @@
-var _0xdfc6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x69\x64","\x75\x73\x65\x72","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x49\x6E\x74\x65\x72\x66\x61\x63\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x4E\x6F\x20\x71\x75\x65\x75\x65\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x55\x53\x45\x52\x5F\x51\x55\x45\x55\x45\x53","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65"];_0xdfc6[0];var _=require(_0xdfc6[1]);var Action=require(_0xdfc6[3])[_0xdfc6[2]];var sequelize=require(_0xdfc6[3])[_0xdfc6[4]];function handleError(_0x150ex5,_0x150ex6){return _0x150ex5[_0xdfc6[6]](500)[_0xdfc6[5]](_0x150ex6)}function responseWithResult(_0x150ex5,_0x150ex8){_0x150ex8=_0x150ex8||200;return function(_0x150ex9){if(_0x150ex9){_0x150ex5[_0xdfc6[6]](_0x150ex8)[_0xdfc6[7]](_0x150ex9)}}}function handleEntityNotFound(_0x150ex5){return function(_0x150ex9){if(!_0x150ex9){_0x150ex5[_0xdfc6[6]](404)[_0xdfc6[8]]();return null};return _0x150ex9}}function saveUpdates(_0x150exc){return function(_0x150ex9){return _0x150ex9[_0xdfc6[10]](_0x150exc)[_0xdfc6[9]](function(_0x150exd){return _0x150exd})}}function removeEntity(_0x150ex5){return function(_0x150ex9){if(_0x150ex9){return _0x150ex9[_0xdfc6[11]]()[_0xdfc6[9]](function(){_0x150ex5[_0xdfc6[6]](204)[_0xdfc6[8]]()})}}}exports[_0xdfc6[12]]=function(_0x150exf,_0x150ex5){Action[_0xdfc6[14]]()[_0xdfc6[9]](responseWithResult(_0x150ex5))[_0xdfc6[13]](handleError(_0x150ex5))};exports[_0xdfc6[15]]=function(_0x150exf,_0x150ex5){};exports[_0xdfc6[16]]=function(_0x150exf,_0x150ex5,_0x150ex10){_0x150exf[_0xdfc6[18]][_0xdfc6[17]]=_0x150exf[_0xdfc6[20]][_0xdfc6[19]];return sequelize[_0xdfc6[29]](function(_0x150ex12){return Action[_0xdfc6[16]](_[_0xdfc6[28]](_0x150exf[_0xdfc6[18]],_0x150exf[_0xdfc6[27]]),{transaction:_0x150ex12,body:_0x150exf[_0xdfc6[18]]})})[_0xdfc6[9]](function(_0x150ex11){return _0x150ex5[_0xdfc6[6]](201)[_0xdfc6[5]](_0x150ex11)})[_0xdfc6[13]](function(_0x150ex6){console[_0xdfc6[21]](_0x150ex6);if(_0x150ex6[_0xdfc6[22]]===_0xdfc6[23]){_0x150ex6[_0xdfc6[22]]=_0xdfc6[24];_0x150ex6[_0xdfc6[25]]=_0xdfc6[26]};return handleError(_0x150ex5,_0x150ex6)})};exports[_0xdfc6[30]]=function(_0x150exf,_0x150ex5){};exports[_0xdfc6[11]]=function(_0x150exf,_0x150ex5){}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/actions              ->  index
+ * POST    /api/actions              ->  create
+ * GET     /api/actions/:id          ->  show
+ * PUT     /api/actions/:id          ->  update
+ * DELETE  /api/actions/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var Action = require('../../models').Action;
+var sequelize = require('../../models').sequelize;
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of Actions
+exports.index = function(req, res) {
+  Action.findAll()
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single Action from the DB
+exports.show = function(req, res) {
+  // Action.findById(req.params.id)
+  //   .then(handleEntityNotFound(res))
+  //   .then(responseWithResult(res))
+  //   .catch(handleError(res));
+}
+
+// Creates a new Action in the DB
+exports.create = function(req, res, next) {
+  req.body.UserId = req.user.id;
+  return sequelize.transaction(function(t) {
+      return Action
+        .create(_.merge(req.body, req.params), {
+          transaction: t,
+          body: req.body
+        });
+    })
+    .then(function(action) {
+      return res.status(201).send(action);
+    }).catch(function(err) {
+      console.log(err);
+      if (err.message === 'Interface not found') {
+        err.message = 'No queues associated for the user';
+        err.translatedMessage = 'MESSAGE_NO_USER_QUEUES';
+      }
+      return handleError(res, err);
+    });
+}
+
+// Updates an existing Action in the DB
+exports.update = function(req, res) {
+  // if (req.body.id) {
+  //   delete req.body.id;
+  // }
+  // Action.findById(req.params.id)
+  //   .then(handleEntityNotFound(res))
+  //   .then(saveUpdates(req.body))
+  //   .then(responseWithResult(res))
+  //   .catch(handleError(res));
+}
+
+// Deletes a Action from the DB
+exports.destroy = function(req, res) {
+  // Action.findById(req.params.id)
+  //   .then(handleEntityNotFound(res))
+  //   .then(removeEntity(res))
+  //   .catch(handleError(res));
+}
index 2b8bfa5..36c2faa 100644 (file)
@@ -1 +1,24 @@
-var _0x110b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x63\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x41\x63\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x110b[0];var Action=require(_0x110b[2])[_0x110b[1]];exports[_0x110b[3]]=function(_0xcf04x2){Action[_0x110b[4]](function(_0xcf04x3){onSave(_0xcf04x2,_0xcf04x3)});Action[_0x110b[5]](function(_0xcf04x3){onSave(_0xcf04x2,_0xcf04x3)})};function onSave(_0xcf04x2,_0xcf04x3,_0xcf04x5){_0xcf04x2[_0x110b[7]](_0x110b[6],_0xcf04x3)}function onRemove(_0xcf04x2,_0xcf04x3,_0xcf04x5){_0xcf04x2[_0x110b[7]](_0x110b[8],_0xcf04x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Action = require('../../models').Action;
+
+exports.register = function (socket) {
+  Action.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  Action.afterUpdate(function (doc) {
+    onSave(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('Action:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('Action:remove', doc);
+}
index 4bc9ff9..8a3909e 100644 (file)
@@ -1 +1,19 @@
-var _0xdffd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdffd[0];var express=require(_0xdffd[1]);var auth=require(_0xdffd[2]);var controller=require(_0xdffd[3]);var router=express.Router();router[_0xdffd[7]](_0xdffd[4],auth[_0xdffd[5]](),controller[_0xdffd[6]]);router[_0xdffd[10]](_0xdffd[8],auth[_0xdffd[5]](),controller[_0xdffd[9]]);module[_0xdffd[11]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+
+var auth = require('../../auth/auth.service');
+var controller = require('./action.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+// router.get('/:id', auth.isAuthenticated(), controller.show);
+// router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:name', auth.isAuthenticated(), controller.create);
+// router.put('/:id', auth.isAuthenticated(), controller.update);
+// router.patch('/:id', auth.isAuthenticated(), controller.update);
+// router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index fb43dce..7927c50 100644 (file)
@@ -1 +1,177 @@
-var _0xfefc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xfefc[0];var _=require(_0xfefc[1]);var sequelize=require(_0xfefc[3])[_0xfefc[2]];var Util=require(_0xfefc[4]);var Agent=require(_0xfefc[3])[_0xfefc[5]];var Team=require(_0xfefc[3])[_0xfefc[6]];var MailRoom=require(_0xfefc[3])[_0xfefc[7]];exports[_0xfefc[8]]=function(_0x74dax7,_0x74dax8,_0x74dax9){return Agent[_0xfefc[23]](_0xfefc[17],{method:[_0xfefc[18],_0x74dax7[_0xfefc[14]]]},{method:[_0xfefc[19],_0x74dax7[_0xfefc[14]]]},{method:[_0xfefc[20],_0x74dax7[_0xfefc[14]]]},{method:[_0xfefc[21],_0x74dax7[_0xfefc[14]]]},_0xfefc[22])[_0xfefc[16]](Util[_0xfefc[15]](_0x74dax7[_0xfefc[14]]))[_0xfefc[13]](function(_0x74daxb){return _0x74dax8[_0xfefc[12]](200)[_0xfefc[11]](_0x74daxb)})[_0xfefc[10]](function(_0x74daxa){console[_0xfefc[9]](_0x74daxa);return handleError(_0x74dax8,_0x74daxa)})};exports[_0xfefc[24]]=function(_0x74dax7,_0x74dax8){return Agent[_0xfefc[23]](_0xfefc[17])[_0xfefc[28]](_0x74dax7[_0xfefc[27]][_0xfefc[26]])[_0xfefc[13]](function(_0x74daxc){if(!_0x74daxc){return _0x74dax8[_0xfefc[25]](404)};return _0x74dax8[_0xfefc[11]](_0x74daxc)})[_0xfefc[10]](function(_0x74daxa){return handleError(_0x74dax8,_0x74daxa)})};exports[_0xfefc[29]]=function(_0x74dax7,_0x74dax8){var _0x74daxd;return Agent[_0xfefc[23]](_0xfefc[17])[_0xfefc[29]](_0x74dax7[_0xfefc[34]])[_0xfefc[13]](function(_0x74daxc){_0x74daxd=_0x74daxc;return Team[_0xfefc[33]]({where:{defaultEntry:true}})})[_0xfefc[13]](function(_0x74daxe){return _0x74daxe[_0xfefc[32]](_0x74daxd[_0xfefc[26]])})[_0xfefc[13]](function(){return _0x74dax8[_0xfefc[12]](201)[_0xfefc[11]](_0x74daxd)})[_0xfefc[10]](sequelize.UniqueConstraintError,function(_0x74daxa){return Util[_0xfefc[31]][_0xfefc[30]](_0x74dax8,_0x74daxa)})[_0xfefc[10]](function(_0x74daxa){return handleError(_0x74dax8,_0x74daxa)})};exports[_0xfefc[35]]=function(_0x74dax7,_0x74dax8){if(_0x74dax7[_0xfefc[34]][_0xfefc[26]]){delete _0x74dax7[_0xfefc[34]][_0xfefc[26]]};return Agent[_0xfefc[28]](_0x74dax7[_0xfefc[27]][_0xfefc[26]])[_0xfefc[13]](function(_0x74daxc){if(!_0x74daxc){return _0x74dax8[_0xfefc[25]](404)};var _0x74daxf=_[_0xfefc[36]](_0x74daxc,_0x74dax7[_0xfefc[34]]);return _0x74daxf[_0xfefc[37]]()})[_0xfefc[13]](function(_0x74daxc){return _0x74dax8[_0xfefc[12]](200)[_0xfefc[11]](_0x74daxc)})[_0xfefc[10]](sequelize.UniqueConstraintError,function(_0x74daxa){return Util[_0xfefc[31]][_0xfefc[30]](_0x74dax8,_0x74daxa)})[_0xfefc[10]](function(_0x74daxa){return handleError(_0x74dax8,_0x74daxa)})};exports[_0xfefc[38]]=function(_0x74dax7,_0x74dax8){var _0x74daxd;return Agent[_0xfefc[28]](_0x74dax7[_0xfefc[27]][_0xfefc[26]])[_0xfefc[13]](function(_0x74daxc){_0x74daxd=_0x74daxc;if(!_0x74daxc){return _0x74dax8[_0xfefc[25]](404)};return _0x74daxc[_0xfefc[38]]()})[_0xfefc[13]](function(){return _0x74dax8[_0xfefc[25]](204)})[_0xfefc[10]](sequelize.ForeignKeyConstraintError,function(_0x74daxa){return Util[_0xfefc[31]][_0xfefc[40]](_0x74dax8,_0xfefc[17],_0x74daxd[_0xfefc[39]],_0x74daxa)})[_0xfefc[10]](function(_0x74daxa){return handleError(_0x74dax8,_0x74daxa)})};exports[_0xfefc[41]]=function(_0x74dax7,_0x74dax8){return Agent[_0xfefc[38]]({where:{id:_0x74dax7[_0xfefc[14]][_0xfefc[42]]},individualHooks:true})[_0xfefc[13]](function(){return _0x74dax8[_0xfefc[25]](204)})[_0xfefc[10]](function(_0x74daxa){return handleError(_0x74dax8,_0x74daxa)})};function handleError(_0x74dax8,_0x74daxa){return _0x74dax8[_0xfefc[12]](500)[_0xfefc[11]](_0x74daxa)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var sequelize = require('../../models').sequelize;
+
+var Util = require('../../config/util');
+
+var Agent = require('../../models').User;
+var Team = require('../../models').Team;
+var MailRoom = require('../../models').MailRoom;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return Agent
+    .scope('agent', {
+        method: ['checkPauseStatus', req.query]
+      }, {
+        method: ['checkQueueStatus', req.query]
+      }, {
+        method: ['checkOnlineStatus', req.query]
+      }, {
+        method: ['checkSipStatus', req.query]
+      },
+      'queues')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      return res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Get a single agent
+exports.show = function(req, res) {
+  return Agent
+    .scope('agent')
+    .findById(req.params.id)
+    .then(function(agent) {
+      if (!agent) {
+        return res.sendStatus(404);
+      }
+      return res.send(agent);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single agent
+exports.showVoiceQueues = function(req, res) {
+  return Agent
+    .scope('agent')
+    .findById(req.params.id)
+    .then(function(agent) {
+      if (!agent) {
+        return res.sendStatus(404);
+      }
+
+      return agent
+        .getVoiceQueues({
+          attributes: ['name']
+        });
+    })
+    .then(function(voiceQueues) {
+      return res.send(voiceQueues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new agent in the DB.
+exports.create = function(req, res) {
+  var _agent;
+
+  return Agent
+    .scope('agent')
+    .create(req.body)
+    .then(function(agent) {
+      _agent = agent;
+
+      return Team
+        .findOne({
+          where: {
+            defaultEntry: true
+          }
+        });
+    })
+    .then(function(team) {
+      return team
+        .addUser(_agent.id);
+    })
+    .then(function() {
+      return res.status(201).send(_agent);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing agent in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return Agent
+    .findById(req.params.id)
+    .then(function(agent) {
+      if (!agent) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(agent, req.body);
+      return updated
+        .save();
+    })
+    .then(function(agent) {
+      return res.status(200).send(agent);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.destroy = function(req, res) {
+  var _agent;
+
+  return Agent
+    .findById(req.params.id)
+    .then(function(agent) {
+      _agent = agent;
+      if (!agent) {
+        return res.sendStatus(404);
+      }
+      return agent
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(sequelize.ForeignKeyConstraintError, function(err) {
+      return Util.errorManager.handleForeignKeyConstraintError(res, 'agent', _agent.name, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return Agent
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 9dd28c1..ce02c96 100644 (file)
@@ -1 +1,33 @@
-var _0x36f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x36f0[0];var agent=require(_0x36f0[2])[_0x36f0[1]];exports[_0x36f0[3]]=function(_0x7235x2){agent[_0x36f0[6]](function(_0x7235x3){if(_0x7235x3[_0x36f0[4]]===_0x36f0[5]){onSave(_0x7235x2,_0x7235x3)}});agent[_0x36f0[7]](function(_0x7235x3){if(_0x7235x3[_0x36f0[4]]===_0x36f0[5]){onSave(_0x7235x2,_0x7235x3)}});agent[_0x36f0[8]](function(_0x7235x3){if(_0x7235x3[_0x36f0[4]]===_0x36f0[5]){onRemove(_0x7235x2,_0x7235x3)}})};function onSave(_0x7235x2,_0x7235x3,_0x7235x5){_0x7235x2[_0x36f0[10]](_0x36f0[9],_0x7235x3)}function onRemove(_0x7235x2,_0x7235x3,_0x7235x5){_0x7235x2[_0x36f0[10]](_0x36f0[11],_0x7235x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var agent = require('../../models').User;
+
+exports.register = function(socket) {
+  agent.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  agent.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  agent.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  // Don't use === in userId check!!!
+  if (doc.role === 'agent' && (socket.role !== 'agent' || socket.userId == doc.id)) {
+    socket.emit('agent:save', doc);
+  }
+}
+
+function onRemove(socket, doc, cb) {
+  // Don't use === in userId check!!!
+  if (doc.role === 'agent' && (socket.role !== 'agent' || socket.userId == doc.id)) {
+    socket.emit('agent:remove', doc);
+  }
+}
index 79370c6..225390f 100644 (file)
@@ -1 +1,18 @@
-var _0x5d25=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x67\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5d25[0];var express=require(_0x5d25[1]);var controller=require(_0x5d25[2]);var auth=require(_0x5d25[3]);var router=express.Router();router[_0x5d25[7]](_0x5d25[4],auth[_0x5d25[5]](),controller[_0x5d25[6]]);router[_0x5d25[7]](_0x5d25[8],auth[_0x5d25[5]](),controller[_0x5d25[9]]);router[_0x5d25[11]](_0x5d25[4],auth[_0x5d25[5]](),controller[_0x5d25[10]]);router[_0x5d25[13]](_0x5d25[8],auth[_0x5d25[5]](),controller[_0x5d25[12]]);router[_0x5d25[14]](_0x5d25[8],auth[_0x5d25[5]](),controller[_0x5d25[12]]);router[_0x5d25[16]](_0x5d25[4],auth[_0x5d25[5]](),controller[_0x5d25[15]]);router[_0x5d25[16]](_0x5d25[8],auth[_0x5d25[5]](),controller[_0x5d25[17]]);module[_0x5d25[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./agent.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/voice/queues', auth.isAuthenticated(), controller.showVoiceQueues);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index be69dfd..2684197 100644 (file)
@@ -1 +1,37 @@
-var _0x77a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x73\x79\x6E\x63","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x6D\x69","\x61\x63\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x4D\x61\x6E\x61\x67\x65\x72\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x2E\x2E"];_0x77a1[0];var Ami=require(_0x77a1[2])[_0x77a1[1]];var async=require(_0x77a1[3]);var _=require(_0x77a1[4]);var ami=null;exports[_0x77a1[5]]=function(ami){this[_0x77a1[6]]=ami};exports[_0x77a1[7]]=function(_0xb0bex5,_0xb0bex6){if(this[_0x77a1[6]]&&this[_0x77a1[6]][_0x77a1[8]]()){this[_0x77a1[6]][_0x77a1[7]](_0xb0bex5,function(_0xb0bex7,_0xb0bex8){if(_0xb0bex7){_0xb0bex6(_0xb0bex7)};var _0xb0bex9=_[_0x77a1[9]](_0xb0bex8,_0xb0bex5);Ami[_0x77a1[12]](_0xb0bex9)[_0x77a1[11]](function(ami){_0xb0bex6(null,ami)})[_0x77a1[10]](function(_0xb0bex7){return _0xb0bex6(_0xb0bex7)})})}else {_0xb0bex6( new Error(_0x77a1[13]))}}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Ami = require('../../models').Ami;
+var async = require('async');
+var _ = require('lodash');
+
+var ami = null;
+
+exports.register = function(ami) {
+  this.ami = ami;
+}
+
+exports.action = function(action, cb) {
+  if (this.ami && this.ami.isConnected()) {
+    this.ami.action(action, function(err, res) {
+      if (err) {
+        cb(err);
+      }
+      var data = _.merge(res, action);
+      Ami
+        .create(data)
+        .then(function(ami) {
+          cb(null, ami)
+        })
+        .catch(function(err) {
+          return cb(err);
+        });
+
+    });
+  } else {
+    cb(new Error('Asterisk Manager disconnected..'));
+  }
+}
index 043ddbd..dc409ab 100644 (file)
@@ -1 +1,101 @@
-var _0x77a0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x64\x61\x74\x61","\x62\x6F\x64\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x61\x6D\x69\x2E\x61\x6D\x69","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64"];_0x77a0[0];var _=require(_0x77a0[1]);var Ami=require(_0x77a0[3])[_0x77a0[2]];exports[_0x77a0[4]]=function(_0x23a4x3,_0x23a4x4){Ami[_0x77a0[9]]()[_0x77a0[8]](function(_0x23a4x6){return _0x23a4x4[_0x77a0[7]](200)[_0x77a0[6]](_0x23a4x6)})[_0x77a0[5]](function(_0x23a4x5){return handleError(_0x23a4x4,_0x23a4x5)})};exports[_0x77a0[10]]=function(_0x23a4x3,_0x23a4x4){Ami[_0x77a0[14]](_0x23a4x3[_0x77a0[13]][_0x77a0[12]])[_0x77a0[8]](function(_0x23a4x7){if(!_0x23a4x7){return _0x23a4x4[_0x77a0[11]](404)};return _0x23a4x4[_0x77a0[6]](_0x23a4x7)})[_0x77a0[5]](function(_0x23a4x5){return handleError(_0x23a4x4,_0x23a4x5)})};exports[_0x77a0[15]]=function(_0x23a4x3,_0x23a4x4){_0x23a4x3[_0x77a0[17]][_0x77a0[16]]=JSON[_0x77a0[18]](_0x23a4x3[_0x77a0[17]]);_0x23a4x3[_0x77a0[17]][_0x77a0[19]]=_0x23a4x3[_0x77a0[20]][_0x77a0[12]];require(_0x77a0[22])[_0x77a0[21]](_0x23a4x3[_0x77a0[17]],function(_0x23a4x5,_0x23a4x8){if(_0x23a4x5){handleError(_0x23a4x4,_0x23a4x5)}else {return _0x23a4x4[_0x77a0[7]](201)[_0x77a0[6]](_0x23a4x8)}})};exports[_0x77a0[23]]=function(_0x23a4x3,_0x23a4x4){if(_0x23a4x3[_0x77a0[17]][_0x77a0[12]]){delete _0x23a4x3[_0x77a0[17]][_0x77a0[12]]};Ami[_0x77a0[14]](_0x23a4x3[_0x77a0[13]][_0x77a0[12]])[_0x77a0[8]](function(_0x23a4x7){if(!_0x23a4x7){return _0x23a4x4[_0x77a0[11]](404)};var _0x23a4x9=_[_0x77a0[24]](_0x23a4x7,_0x23a4x3[_0x77a0[17]]);_0x23a4x9[_0x77a0[25]]()[_0x77a0[8]](function(){return _0x23a4x4[_0x77a0[7]](200)[_0x77a0[6]](_0x23a4x7)})[_0x77a0[5]](function(_0x23a4x5){return handleError(_0x23a4x4,_0x23a4x5)})})[_0x77a0[5]](function(_0x23a4x5){return handleError(_0x23a4x4,_0x23a4x5)})};exports[_0x77a0[26]]=function(_0x23a4x3,_0x23a4x4){Ami[_0x77a0[27]]({where:{id:_0x23a4x3[_0x77a0[13]][_0x77a0[12]]}})[_0x77a0[8]](function(_0x23a4x7){if(!_0x23a4x7){return _0x23a4x4[_0x77a0[11]](404)};_0x23a4x7[_0x77a0[26]]()[_0x77a0[8]](function(){return _0x23a4x4[_0x77a0[11]](204)})[_0x77a0[5]](function(_0x23a4x5){return handleError(_0x23a4x4,_0x23a4x5)})})[_0x77a0[5]](function(_0x23a4x5){return handleError(_0x23a4x4,_0x23a4x5)})};function handleError(_0x23a4x4,_0x23a4x5){return _0x23a4x4[_0x77a0[7]](500)[_0x77a0[6]](_0x23a4x5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Ami = require('../../models').Ami;
+
+// Get list of amis
+exports.index = function(req, res) {
+  Ami
+    .findAll()
+    .then(function(amis) {
+      return res.status(200).send(amis);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single ami
+exports.show = function(req, res) {
+  Ami
+    .findById(req.params.id)
+    .then(function(ami) {
+      if (!ami) {
+        return res.sendStatus(404);
+      }
+      return res.send(ami);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new ami in the DB.
+exports.create = function(req, res) {
+
+  req.body.data = JSON.stringify(req.body);
+  req.body.UserId = req.user.id;
+
+  require('./ami.ami').action(req.body, function(err, result) {
+    if (err) {
+      handleError(res, err);
+    } else {
+      return res.status(201).send(result);
+    }
+  });
+
+};
+
+// Updates an existing ami in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  Ami
+    .findById(req.params.id)
+    .then(function(ami) {
+      if (!ami) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(ami, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(ami);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a ami from the DB.
+exports.destroy = function(req, res) {
+  Ami
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(ami) {
+      if (!ami) {
+        return res.sendStatus(404);
+      }
+      ami.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 00a1955..6047274 100644 (file)
@@ -1 +1,24 @@
-var _0xe34f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x6D\x69\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x6D\x69\x3A\x72\x65\x6D\x6F\x76\x65"];_0xe34f[0];var Ami=require(_0xe34f[2])[_0xe34f[1]];exports[_0xe34f[3]]=function(_0xccc2x2){Ami[_0xe34f[4]](function(_0xccc2x3){onSave(_0xccc2x2,_0xccc2x3)});Ami[_0xe34f[5]](function(_0xccc2x3){onRemove(_0xccc2x2,_0xccc2x3)})};function onSave(_0xccc2x2,_0xccc2x3,_0xccc2x5){_0xccc2x2[_0xe34f[7]](_0xe34f[6],_0xccc2x3)}function onRemove(_0xccc2x2,_0xccc2x3,_0xccc2x5){_0xccc2x2[_0xe34f[7]](_0xe34f[8],_0xccc2x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Ami = require('../../models').Ami;
+
+exports.register = function(socket) {
+  Ami.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  Ami.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('ami:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('ami:remove', doc);
+}
index 670e67b..a7502d7 100644 (file)
@@ -1 +1,20 @@
-var _0xac35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x67\x65\x74"];_0xac35[0];var should=require(_0xac35[1]);var app=require(_0xac35[2]);var request=require(_0xac35[3]);describe(_0xac35[4],function(){it(_0xac35[5],function(_0xa2f4x4){request(app)[_0xac35[13]](_0xac35[12])[_0xac35[11]](200)[_0xac35[11]](_0xac35[10],/json/)[_0xac35[9]](function(_0xa2f4x5,_0xa2f4x6){if(_0xa2f4x5){return _0xa2f4x4(_0xa2f4x5)};_0xa2f4x6[_0xac35[8]][_0xac35[1]][_0xac35[7]][_0xac35[6]](Array);_0xa2f4x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/ami', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/ami')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index b373d8b..b926b75 100644 (file)
@@ -1 +1,16 @@
-var _0x9baf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x6D\x69\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9baf[0];var express=require(_0x9baf[1]);var controller=require(_0x9baf[2]);var auth=require(_0x9baf[3]);var router=express.Router();router[_0x9baf[7]](_0x9baf[4],auth[_0x9baf[5]](),controller[_0x9baf[6]]);router[_0x9baf[9]](_0x9baf[4],auth[_0x9baf[5]](),controller[_0x9baf[8]]);module[_0x9baf[10]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./ami.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+// router.get('/:id', controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+// router.put('/:id', controller.update);
+// router.patch('/:id', controller.update);
+// router.delete('/:id', controller.destroy);
+
+module.exports = router;
index b9388aa..762c4c9 100644 (file)
@@ -1 +1,200 @@
-var _0xe038=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x41\x6C\x6C","\x41\x6E\x79","\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6C\x6C\x49\x64","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6E\x79\x49\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xe038[0];var _=require(_0xe038[1]);var util=require(_0xe038[2]);var Util=require(_0xe038[3]);var sequelize=require(_0xe038[5])[_0xe038[4]];var Automation=require(_0xe038[5])[_0xe038[6]];var ToolsCondition=require(_0xe038[5])[_0xe038[7]];var ToolsAction=require(_0xe038[5])[_0xe038[8]];exports[_0xe038[9]]=function(_0xfb58x8,_0xfb58x9,_0xfb58xa){return Automation[_0xe038[18]](_0xe038[17])[_0xe038[16]](Util[_0xe038[15]](_0xfb58x8[_0xe038[14]]))[_0xe038[13]](function(_0xfb58xc){_0xfb58x9[_0xe038[12]](200)[_0xe038[11]](_0xfb58xc)})[_0xe038[10]](function(_0xfb58xb){return handleError(_0xfb58x9,_0xfb58xb)})};exports[_0xe038[19]]=function(_0xfb58x8,_0xfb58x9){Automation[_0xe038[18]](_0xe038[17])[_0xe038[23]](_0xfb58x8[_0xe038[22]][_0xe038[21]])[_0xe038[13]](function(Automation){if(!Automation){return _0xfb58x9[_0xe038[20]](404)};return _0xfb58x9[_0xe038[11]](Automation)})[_0xe038[10]](function(_0xfb58xb){return handleError(_0xfb58x9,_0xfb58xb)})};exports[_0xe038[24]]=function(_0xfb58x8,_0xfb58x9,_0xfb58xa){Automation[_0xe038[24]](_0xfb58x8[_0xe038[25]],{include:[{model:ToolsCondition,as:_0xe038[26]},{model:ToolsCondition,as:_0xe038[27]},{model:ToolsAction,as:_0xe038[28]}]})[_0xe038[13]](function(){return _0xfb58x9[_0xe038[20]](201)})[_0xe038[10]](function(_0xfb58xb){return handleError(_0xfb58x9,_0xfb58xb)})};exports[_0xe038[29]]=function(_0xfb58x8,_0xfb58x9,_0xfb58xa){var _0xfb58xd;if(_0xfb58x8[_0xe038[25]][_0xe038[21]]){delete _0xfb58x8[_0xe038[25]][_0xe038[21]]};return sequelize[_0xe038[41]](function(_0xfb58xe){return Automation[_0xe038[23]](_0xfb58x8[_0xe038[22]][_0xe038[21]])[_0xe038[13]](function(_0xfb58x10){if(!_0xfb58x10){return _0xfb58x9[_0xe038[20]](404)};var _0xfb58x11=_[_0xe038[39]](_0xfb58x10,_0xfb58x8[_0xe038[25]]);return _0xfb58x11[_0xe038[40]]({transaction:_0xfb58xe})})[_0xe038[13]](function(_0xfb58x10){_0xfb58xd=_0xfb58x10;if(_0xfb58x8[_0xe038[25]][_0xe038[27]]){return ToolsCondition[_0xe038[36]]({where:{AutomationAnyId:_0xfb58x8[_0xe038[22]][_0xe038[21]]},transaction:_0xfb58xe})}})[_0xe038[13]](function(){if(_0xfb58x8[_0xe038[25]][_0xe038[27]]&&Array[_0xe038[31]](_0xfb58x8[_0xe038[25]].Any)&&_0xfb58x8[_0xe038[25]][_0xe038[27]][_0xe038[32]]){_[_0xe038[34]](_0xfb58x8[_0xe038[25]].Any,function(_0xfb58xf){_0xfb58xf[_0xe038[38]]=_0xfb58x8[_0xe038[22]][_0xe038[21]]});return ToolsCondition[_0xe038[35]](_0xfb58x8[_0xe038[25]].Any,{transaction:_0xfb58xe})}})[_0xe038[13]](function(){if(_0xfb58x8[_0xe038[25]][_0xe038[26]]){return ToolsCondition[_0xe038[36]]({where:{AutomationAllId:_0xfb58x8[_0xe038[22]][_0xe038[21]]},transaction:_0xfb58xe})}})[_0xe038[13]](function(){if(_0xfb58x8[_0xe038[25]][_0xe038[26]]&&Array[_0xe038[31]](_0xfb58x8[_0xe038[25]].All)&&_0xfb58x8[_0xe038[25]][_0xe038[26]][_0xe038[32]]){_[_0xe038[34]](_0xfb58x8[_0xe038[25]].All,function(_0xfb58xf){_0xfb58xf[_0xe038[37]]=_0xfb58x8[_0xe038[22]][_0xe038[21]]});return ToolsCondition[_0xe038[35]](_0xfb58x8[_0xe038[25]].All,{transaction:_0xfb58xe})}})[_0xe038[13]](function(){if(_0xfb58x8[_0xe038[25]][_0xe038[28]]){return ToolsAction[_0xe038[36]]({where:{AutomationId:_0xfb58x8[_0xe038[22]][_0xe038[21]]},transaction:_0xfb58xe})}})[_0xe038[13]](function(){if(_0xfb58x8[_0xe038[25]][_0xe038[28]]&&Array[_0xe038[31]](_0xfb58x8[_0xe038[25]].Actions)&&_0xfb58x8[_0xe038[25]][_0xe038[28]][_0xe038[32]]){_[_0xe038[34]](_0xfb58x8[_0xe038[25]].Actions,function(_0xfb58xf){_0xfb58xf[_0xe038[33]]=_0xfb58x8[_0xe038[22]][_0xe038[21]]});return ToolsAction[_0xe038[35]](_0xfb58x8[_0xe038[25]].Actions,{transaction:_0xfb58xe})}})})[_0xe038[13]](function(){return _0xfb58x9[_0xe038[20]](200)})[_0xe038[10]](function(_0xfb58xb){console[_0xe038[30]](_0xfb58xb);return handleError(_0xfb58x9,_0xfb58xb)})};exports[_0xe038[36]]=function(_0xfb58x8,_0xfb58x9){Automation[_0xe038[23]](_0xfb58x8[_0xe038[22]][_0xe038[21]])[_0xe038[13]](function(Automation){if(!Automation){return _0xfb58x9[_0xe038[20]](404)};Automation[_0xe038[36]]()[_0xe038[13]](function(){return _0xfb58x9[_0xe038[20]](204)})[_0xe038[10]](function(_0xfb58xb){return handleError(_0xfb58x9,_0xfb58xb)})})[_0xe038[10]](function(_0xfb58xb){return handleError(_0xfb58x9,_0xfb58xb)})};exports[_0xe038[42]]=function(_0xfb58x8,_0xfb58x9){Automation[_0xe038[36]]({where:{id:_0xfb58x8[_0xe038[14]][_0xe038[21]]},individualHooks:true})[_0xe038[13]](function(){return _0xfb58x9[_0xe038[20]](204)})[_0xe038[10]](function(_0xfb58xb){return handleError(_0xfb58x9,_0xfb58xb)})};function handleError(_0xfb58x9,_0xfb58xb){return _0xfb58x9[_0xe038[12]](500)[_0xe038[11]](_0xfb58xb)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var Util = require('../../config/util');
+var sequelize = require('../../models').sequelize;
+
+var Automation = require('../../models').Automation;
+var ToolsCondition = require('../../models').ToolsCondition;
+var ToolsAction = require('../../models').ToolsAction;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return Automation
+    .scope('all')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single Automation
+exports.show = function(req, res) {
+  Automation
+    .scope('all')
+    .findById(req.params.id)
+    .then(function(Automation) {
+      if (!Automation) {
+        return res.sendStatus(404);
+      }
+      return res.send(Automation);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new Automation in the DB.
+exports.create = function(req, res, next) {
+  Automation
+    .create(req.body, {
+      include: [{
+        model: ToolsCondition,
+        as: 'All'
+      }, {
+        model: ToolsCondition,
+        as: 'Any'
+      }, {
+        model: ToolsAction,
+        as: 'Actions'
+      }]
+    })
+    .then(function() {
+      return res.sendStatus(201);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing Automation in the DB.
+exports.update = function(req, res, next) {
+  var _automation;
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return sequelize.transaction(function(t) {
+      return Automation
+        .findById(req.params.id)
+        .then(function(automation) {
+          if (!automation) {
+            return res.sendStatus(404);
+          }
+          var updated = _.merge(automation, req.body);
+          return updated
+            .save({
+              transaction: t
+            });
+        })
+        .then(function(automation) {
+          _automation = automation;
+          if (req.body.Any) {
+            return ToolsCondition
+              .destroy({
+                where: {
+                  AutomationAnyId: req.params.id
+                },
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.Any && Array.isArray(req.body.Any) && req.body.Any.length) {
+            _.forEach(req.body.Any, function(elem) {
+              elem.AutomationAnyId = req.params.id;
+            });
+            return ToolsCondition
+              .bulkCreate(req.body.Any, {
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.All) {
+            return ToolsCondition
+              .destroy({
+                where: {
+                  AutomationAllId: req.params.id
+                },
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.All && Array.isArray(req.body.All) && req.body.All.length) {
+            _.forEach(req.body.All, function(elem) {
+              elem.AutomationAllId = req.params.id;
+            });
+            return ToolsCondition
+              .bulkCreate(req.body.All, {
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.Actions) {
+            return ToolsAction
+              .destroy({
+                where: {
+                  AutomationId: req.params.id
+                },
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.Actions && Array.isArray(req.body.Actions) && req.body.Actions.length) {
+            _.forEach(req.body.Actions, function(elem) {
+              elem.AutomationId = req.params.id;
+            });
+            return ToolsAction
+              .bulkCreate(req.body.Actions, {
+                transaction: t
+              });
+          }
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+
+// Deletes a Automation from the DB.
+exports.destroy = function(req, res) {
+  Automation
+    .findById(req.params.id)
+    .then(function(Automation) {
+      if (!Automation) {
+        return res.sendStatus(404);
+      }
+      Automation.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+}
+
+exports.bulkDestroy = function(req, res) {
+  Automation
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index dad96b1..2c55b60 100644 (file)
@@ -1 +1,24 @@
-var _0x34c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x34c2[0];var Automation=require(_0x34c2[2])[_0x34c2[1]];exports[_0x34c2[3]]=function(_0xb38ax2){Automation[_0x34c2[4]](function(_0xb38ax3){onSave(_0xb38ax2,_0xb38ax3)});Automation[_0x34c2[5]](function(_0xb38ax3){onRemove(_0xb38ax2,_0xb38ax3)})};function onSave(_0xb38ax2,_0xb38ax3,_0xb38ax5){_0xb38ax2[_0x34c2[7]](_0x34c2[6],_0xb38ax3)}function onRemove(_0xb38ax2,_0xb38ax3,_0xb38ax5){_0xb38ax2[_0x34c2[7]](_0x34c2[8],_0xb38ax3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Automation = require('../../models').Automation;
+
+exports.register = function(socket) {
+  Automation.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Automation.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('automation:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('automation:remove', doc);
+}
index 7d2f3f0..ab8c5b4 100644 (file)
@@ -1 +1,20 @@
-var _0xf2fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74"];_0xf2fd[0];var should=require(_0xf2fd[1]);var app=require(_0xf2fd[2]);var request=require(_0xf2fd[3]);describe(_0xf2fd[4],function(){it(_0xf2fd[5],function(_0xca8dx4){request(app)[_0xf2fd[13]](_0xf2fd[12])[_0xf2fd[11]](200)[_0xf2fd[11]](_0xf2fd[10],/json/)[_0xf2fd[9]](function(_0xca8dx5,_0xca8dx6){if(_0xca8dx5){return _0xca8dx4(_0xca8dx5)};_0xca8dx6[_0xf2fd[8]][_0xf2fd[1]][_0xf2fd[7]][_0xf2fd[6]](Array);_0xca8dx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/automations', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/automations')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 25a9072..98acf5a 100644 (file)
@@ -1 +1,17 @@
-var _0x5989=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5989[0];var express=require(_0x5989[1]);var controller=require(_0x5989[2]);var auth=require(_0x5989[3]);var router=express.Router();router[_0x5989[7]](_0x5989[4],auth[_0x5989[5]](),controller[_0x5989[6]]);router[_0x5989[7]](_0x5989[8],auth[_0x5989[5]](),controller[_0x5989[9]]);router[_0x5989[11]](_0x5989[4],auth[_0x5989[5]](),controller[_0x5989[10]]);router[_0x5989[13]](_0x5989[8],auth[_0x5989[5]](),controller[_0x5989[12]]);router[_0x5989[14]](_0x5989[8],auth[_0x5989[5]](),controller[_0x5989[12]]);router[_0x5989[16]](_0x5989[8],auth[_0x5989[5]](),controller[_0x5989[15]]);router[_0x5989[16]](_0x5989[4],auth[_0x5989[5]](),controller[_0x5989[17]]);module[_0x5989[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./automation.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+
+module.exports = router;
index 7d5baed..2078d7a 100644 (file)
@@ -1 +1,128 @@
-var _0xbefa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0xbefa[0];var _=require(_0xbefa[1]);var Util=require(_0xbefa[2]);var CannedAnswer=require(_0xbefa[4])[_0xbefa[3]];function handleError(_0x6a0dx5,_0x6a0dx6){_0x6a0dx6=_0x6a0dx6||500;return function(_0x6a0dx7){_0x6a0dx5[_0xbefa[6]](_0x6a0dx6)[_0xbefa[5]](_0x6a0dx7)}}function responseWithResult(_0x6a0dx5,_0x6a0dx6){_0x6a0dx6=_0x6a0dx6||200;return function(_0x6a0dx9){if(_0x6a0dx9){_0x6a0dx5[_0xbefa[6]](_0x6a0dx6)[_0xbefa[7]](_0x6a0dx9)}}}function handleEntityNotFound(_0x6a0dx5){return function(_0x6a0dx9){if(!_0x6a0dx9){_0x6a0dx5[_0xbefa[6]](404)[_0xbefa[8]]();return null};return _0x6a0dx9}}function saveUpdates(_0x6a0dxc){return function(_0x6a0dx9){return _0x6a0dx9[_0xbefa[10]](_0x6a0dxc)[_0xbefa[9]](function(_0x6a0dxd){return _0x6a0dxd})}}function removeEntity(_0x6a0dx5){return function(_0x6a0dx9){if(_0x6a0dx9){return _0x6a0dx9[_0xbefa[11]]()[_0xbefa[9]](function(){_0x6a0dx5[_0xbefa[6]](204)[_0xbefa[8]]()})}}}exports[_0xbefa[12]]=function(_0x6a0dxf,_0x6a0dx5,_0x6a0dx10){return CannedAnswer[_0xbefa[17]](Util[_0xbefa[16]](_0x6a0dxf[_0xbefa[15]]))[_0xbefa[9]](function(_0x6a0dx11){_0x6a0dx5[_0xbefa[6]](200)[_0xbefa[5]](_0x6a0dx11)})[_0xbefa[14]](function(_0x6a0dx7){console[_0xbefa[13]](_0x6a0dx7);return handleError(_0x6a0dx5,_0x6a0dx7)})};exports[_0xbefa[18]]=function(_0x6a0dxf,_0x6a0dx5){CannedAnswer[_0xbefa[21]](_0x6a0dxf[_0xbefa[20]][_0xbefa[19]])[_0xbefa[9]](handleEntityNotFound(_0x6a0dx5))[_0xbefa[9]](responseWithResult(_0x6a0dx5))[_0xbefa[14]](handleError(_0x6a0dx5))};exports[_0xbefa[22]]=function(_0x6a0dxf,_0x6a0dx5){CannedAnswer[_0xbefa[22]](_0x6a0dxf[_0xbefa[23]])[_0xbefa[9]](responseWithResult(_0x6a0dx5,201))[_0xbefa[14]](handleError(_0x6a0dx5))};exports[_0xbefa[24]]=function(_0x6a0dxf,_0x6a0dx5){if(_0x6a0dxf[_0xbefa[23]][_0xbefa[19]]){delete _0x6a0dxf[_0xbefa[23]][_0xbefa[19]]};CannedAnswer[_0xbefa[21]](_0x6a0dxf[_0xbefa[20]][_0xbefa[19]])[_0xbefa[9]](handleEntityNotFound(_0x6a0dx5))[_0xbefa[9]](saveUpdates(_0x6a0dxf[_0xbefa[23]]))[_0xbefa[9]](responseWithResult(_0x6a0dx5))[_0xbefa[14]](handleError(_0x6a0dx5))};exports[_0xbefa[11]]=function(_0x6a0dxf,_0x6a0dx5){CannedAnswer[_0xbefa[21]](_0x6a0dxf[_0xbefa[20]][_0xbefa[19]])[_0xbefa[9]](handleEntityNotFound(_0x6a0dx5))[_0xbefa[9]](removeEntity(_0x6a0dx5))[_0xbefa[14]](handleError(_0x6a0dx5))};exports[_0xbefa[25]]=function(_0x6a0dxf,_0x6a0dx5){return CannedAnswer[_0xbefa[11]]({where:{id:_0x6a0dxf[_0xbefa[15]][_0xbefa[27]]},individualHooks:true})[_0xbefa[9]](function(){return _0x6a0dx5[_0xbefa[26]](204)})[_0xbefa[14]](function(_0x6a0dx7){return handleError(_0x6a0dx5,_0x6a0dx7)})}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/answers              ->  index
+ * POST    /api/answers              ->  create
+ * GET     /api/answers/:id          ->  show
+ * PUT     /api/answers/:id          ->  update
+ * DELETE  /api/answers/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var CannedAnswer = require('../../models').CannedAnswer;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return CannedAnswer
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Gets a single CannedAnswer from the DB
+exports.show = function(req, res) {
+  CannedAnswer.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new CannedAnswer in the DB
+exports.create = function(req, res) {
+  CannedAnswer.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing CannedAnswer in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  CannedAnswer.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a CannedAnswer from the DB
+exports.destroy = function(req, res) {
+  CannedAnswer.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return CannedAnswer
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
index d534b98..1998ba4 100644 (file)
@@ -1 +1,24 @@
-var _0xe558=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x3A\x72\x65\x6D\x6F\x76\x65"];_0xe558[0];var CannedAnswer=require(_0xe558[2])[_0xe558[1]];exports[_0xe558[3]]=function(_0x1bdax2){CannedAnswer[_0xe558[4]](function(_0x1bdax3){onSave(_0x1bdax2,_0x1bdax3)});CannedAnswer[_0xe558[5]](function(_0x1bdax3){onRemove(_0x1bdax2,_0x1bdax3)})};function onSave(_0x1bdax2,_0x1bdax3,_0x1bdax5){_0x1bdax2[_0xe558[7]](_0xe558[6],_0x1bdax3)}function onRemove(_0x1bdax2,_0x1bdax3,_0x1bdax5){_0x1bdax2[_0xe558[7]](_0xe558[8],_0x1bdax3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var CannedAnswer = require('../../models').CannedAnswer;
+
+exports.register = function(socket) {
+  CannedAnswer.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  CannedAnswer.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('canned_answer:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('canned_answer:remove', doc);
+}
index 6b89260..b9d0dcd 100644 (file)
@@ -1 +1,18 @@
-var _0x670e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x670e[0];var express=require(_0x670e[1]);var auth=require(_0x670e[2]);var controller=require(_0x670e[3]);var router=express.Router();router[_0x670e[7]](_0x670e[4],auth[_0x670e[5]](),controller[_0x670e[6]]);router[_0x670e[7]](_0x670e[8],auth[_0x670e[5]](),controller[_0x670e[9]]);router[_0x670e[11]](_0x670e[4],auth[_0x670e[5]](),controller[_0x670e[10]]);router[_0x670e[13]](_0x670e[8],auth[_0x670e[5]](),controller[_0x670e[12]]);router[_0x670e[14]](_0x670e[8],auth[_0x670e[5]](),controller[_0x670e[12]]);router[_0x670e[16]](_0x670e[4],auth[_0x670e[5]](),controller[_0x670e[15]]);router[_0x670e[16]](_0x670e[8],auth[_0x670e[5]](),controller[_0x670e[17]]);module[_0x670e[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./canned_answer.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index cdb35cd..e3dafb3 100644 (file)
@@ -1 +1,107 @@
-var _0xd8b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xd8b2[0];var _=require(_0xd8b2[1]);var ChanSpy=require(_0xd8b2[3])[_0xd8b2[2]];var Util=require(_0xd8b2[4]);exports[_0xd8b2[5]]=function(_0x24fcx4,_0x24fcx5,_0x24fcx6){return ChanSpy[_0xd8b2[13]](Util[_0xd8b2[12]](_0x24fcx4[_0xd8b2[11]]))[_0xd8b2[10]](function(_0x24fcx8){_0x24fcx5[_0xd8b2[9]](200)[_0xd8b2[8]](_0x24fcx8)})[_0xd8b2[7]](function(_0x24fcx7){console[_0xd8b2[6]](_0x24fcx7);return handleError(_0x24fcx5,_0x24fcx7)})};exports[_0xd8b2[14]]=function(_0x24fcx4,_0x24fcx5){return ChanSpy[_0xd8b2[18]](_0x24fcx4[_0xd8b2[17]][_0xd8b2[16]])[_0xd8b2[10]](function(_0x24fcx9){if(!_0x24fcx9){return _0x24fcx5[_0xd8b2[15]](404)};return _0x24fcx5[_0xd8b2[8]](_0x24fcx9)})[_0xd8b2[7]](function(_0x24fcx7){return handleError(_0x24fcx5,_0x24fcx7)})};exports[_0xd8b2[19]]=function(_0x24fcx4,_0x24fcx5){return ChanSpy[_0xd8b2[19]](_0x24fcx4[_0xd8b2[20]])[_0xd8b2[10]](function(_0x24fcx9){return _0x24fcx5[_0xd8b2[9]](201)[_0xd8b2[8]](_0x24fcx9)})[_0xd8b2[7]](function(_0x24fcx7){return handleError(_0x24fcx5,_0x24fcx7)})};exports[_0xd8b2[21]]=function(_0x24fcx4,_0x24fcx5){if(_0x24fcx4[_0xd8b2[20]][_0xd8b2[16]]){delete _0x24fcx4[_0xd8b2[20]][_0xd8b2[16]]};return ChanSpy[_0xd8b2[18]](_0x24fcx4[_0xd8b2[17]][_0xd8b2[16]])[_0xd8b2[10]](function(_0x24fcx9){if(!_0x24fcx9){return _0x24fcx5[_0xd8b2[15]](404)};var _0x24fcxa=_[_0xd8b2[22]](_0x24fcx9,_0x24fcx4[_0xd8b2[20]]);return _0x24fcxa[_0xd8b2[23]]()})[_0xd8b2[10]](function(_0x24fcx9){return _0x24fcx5[_0xd8b2[9]](200)[_0xd8b2[8]](_0x24fcx9)})[_0xd8b2[7]](function(_0x24fcx7){return handleError(_0x24fcx5,_0x24fcx7)})};exports[_0xd8b2[24]]=function(_0x24fcx4,_0x24fcx5){return ChanSpy[_0xd8b2[18]](_0x24fcx4[_0xd8b2[17]][_0xd8b2[16]])[_0xd8b2[10]](function(_0x24fcx9){if(!_0x24fcx9){return _0x24fcx5[_0xd8b2[15]](404)};return _0x24fcx9[_0xd8b2[24]]()})[_0xd8b2[10]](function(){return _0x24fcx5[_0xd8b2[15]](204)})[_0xd8b2[7]](function(_0x24fcx7){return handleError(_0x24fcx5,_0x24fcx7)})};exports[_0xd8b2[25]]=function(_0x24fcx4,_0x24fcx5){return ChanSpy[_0xd8b2[24]]({where:{id:_0x24fcx4[_0xd8b2[11]][_0xd8b2[26]]},individualHooks:true})[_0xd8b2[10]](function(){return _0x24fcx5[_0xd8b2[15]](204)})[_0xd8b2[7]](function(_0x24fcx7){return handleError(_0x24fcx5,_0x24fcx7)})};function handleError(_0x24fcx5,_0x24fcx7){return _0x24fcx5[_0xd8b2[9]](500)[_0xd8b2[8]](_0x24fcx7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ChanSpy = require('../../models').ChanSpy;
+var Util = require('../../config/util');
+
+// Get list of chanspy
+exports.index = function(req, res, next) {
+  return ChanSpy
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Get a single chanspy
+exports.show = function(req, res) {
+  return ChanSpy
+    .findById(req.params.id)
+    .then(function(chanspy) {
+      if (!chanspy) {
+        return res.sendStatus(404);
+      }
+      return res.send(chanspy);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new chanspy in the DB.
+exports.create = function(req, res) {
+  return ChanSpy
+    .create(req.body)
+    .then(function(chanspy) {
+      return res.status(201).send(chanspy);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing chanspy in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return ChanSpy
+    .findById(req.params.id)
+    .then(function(chanspy) {
+      if (!chanspy) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(chanspy, req.body);
+      return updated
+        .save();
+    })
+    .then(function(chanspy) {
+      return res.status(200).send(chanspy);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a chanspy from the DB.
+exports.destroy = function(req, res) {
+  return ChanSpy
+    .findById(req.params.id)
+    .then(function(chanspy) {
+      if (!chanspy) {
+        return res.sendStatus(404);
+      }
+      return chanspy.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  return ChanSpy
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 9c14c11..9fb1324 100644 (file)
@@ -1 +1,24 @@
-var _0x8045=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x6E\x73\x70\x79\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x6E\x73\x70\x79\x3A\x72\x65\x6D\x6F\x76\x65"];_0x8045[0];var ChanSpy=require(_0x8045[2])[_0x8045[1]];exports[_0x8045[3]]=function(_0x1acex2){ChanSpy[_0x8045[4]](function(_0x1acex3){onSave(_0x1acex2,_0x1acex3)});ChanSpy[_0x8045[5]](function(_0x1acex3){onRemove(_0x1acex2,_0x1acex3)})};function onSave(_0x1acex2,_0x1acex3,_0x1acex5){_0x1acex2[_0x8045[7]](_0x8045[6],_0x1acex3)}function onRemove(_0x1acex2,_0x1acex3,_0x1acex5){_0x1acex2[_0x8045[7]](_0x8045[8],_0x1acex3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ChanSpy = require('../../models').ChanSpy;
+
+exports.register = function(socket) {
+  ChanSpy.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ChanSpy.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('chanspy:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chanspy:remove', doc);
+}
index eee302c..97d091d 100644 (file)
@@ -1 +1,17 @@
-var _0x2824=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x2824[0];var express=require(_0x2824[1]);var controller=require(_0x2824[2]);var auth=require(_0x2824[3]);var router=express.Router();router[_0x2824[9]](_0x2824[4],auth[_0x2824[5]](),auth[_0x2824[7]](_0x2824[6]),controller[_0x2824[8]]);router[_0x2824[9]](_0x2824[10],auth[_0x2824[5]](),auth[_0x2824[7]](_0x2824[6]),controller[_0x2824[11]]);router[_0x2824[13]](_0x2824[4],auth[_0x2824[5]](),auth[_0x2824[7]](_0x2824[6]),controller[_0x2824[12]]);router[_0x2824[15]](_0x2824[10],auth[_0x2824[5]](),auth[_0x2824[7]](_0x2824[6]),controller[_0x2824[14]]);router[_0x2824[16]](_0x2824[10],auth[_0x2824[5]](),auth[_0x2824[7]](_0x2824[6]),controller[_0x2824[14]]);router[_0x2824[18]](_0x2824[4],auth[_0x2824[5]](),auth[_0x2824[7]](_0x2824[6]),controller[_0x2824[17]]);router[_0x2824[18]](_0x2824[10],auth[_0x2824[5]](),auth[_0x2824[7]](_0x2824[6]),controller[_0x2824[19]]);module[_0x2824[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./chanspy.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
+router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show);
+router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
+router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
+router.patch('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
+router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
+
+module.exports = router;
index 46f4cbe..9c2085d 100644 (file)
@@ -1 +1,105 @@
-var _0x6c1b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x6c1b[0];var _=require(_0x6c1b[1]);var ChatApplication=require(_0x6c1b[3])[_0x6c1b[2]];exports[_0x6c1b[4]]=function(_0xfe13x3,_0xfe13x4){ChatApplication[_0x6c1b[11]]({where:_0xfe13x3[_0x6c1b[9]],order:_0x6c1b[10],include:[{all:true}]})[_0x6c1b[8]](function(_0xfe13x6){return _0xfe13x4[_0x6c1b[7]](200)[_0x6c1b[6]](_0xfe13x6)})[_0x6c1b[5]](function(_0xfe13x5){return handleError(_0xfe13x4,_0xfe13x5)})};exports[_0x6c1b[12]]=function(_0xfe13x3,_0xfe13x4){ChatApplication[_0x6c1b[16]](_0xfe13x3[_0x6c1b[15]][_0x6c1b[14]])[_0x6c1b[8]](function(_0xfe13x7){if(!_0xfe13x7){return _0xfe13x4[_0x6c1b[13]](404)};return _0xfe13x4[_0x6c1b[6]](_0xfe13x7)})[_0x6c1b[5]](function(_0xfe13x5){return handleError(_0xfe13x4,_0xfe13x5)})};exports[_0x6c1b[17]]=function(_0xfe13x3,_0xfe13x4,_0xfe13x8){ChatApplication[_0x6c1b[20]](_0x6c1b[10],{where:{ChatWebsiteId:_0xfe13x3[_0x6c1b[18]][_0x6c1b[19]]}})[_0x6c1b[8]](function(_0xfe13x9){_0xfe13x3[_0x6c1b[18]][_0x6c1b[10]]=_0xfe13x9?++_0xfe13x9:1;ChatApplication[_0x6c1b[17]](_0xfe13x3[_0x6c1b[18]])[_0x6c1b[8]](function(_0xfe13xa){return _0xfe13x4[_0x6c1b[7]](201)[_0x6c1b[6]](_0xfe13xa)})[_0x6c1b[5]](function(_0xfe13x5){return _0xfe13x8(_0xfe13x5)})})[_0x6c1b[5]](function(_0xfe13x5){_0xfe13x8(_0xfe13x5)})};exports[_0x6c1b[21]]=function(_0xfe13x3,_0xfe13x4){if(_0xfe13x3[_0x6c1b[18]][_0x6c1b[14]]){delete _0xfe13x3[_0x6c1b[18]][_0x6c1b[14]]};ChatApplication[_0x6c1b[16]](_0xfe13x3[_0x6c1b[15]][_0x6c1b[14]])[_0x6c1b[8]](function(_0xfe13x7){if(!_0xfe13x7){return _0xfe13x4[_0x6c1b[13]](404)};var _0xfe13xb=_[_0x6c1b[22]](_0xfe13x7,_0xfe13x3[_0x6c1b[18]]);_0xfe13xb[_0x6c1b[23]]()[_0x6c1b[8]](function(){return _0xfe13x4[_0x6c1b[7]](200)[_0x6c1b[6]](_0xfe13x7)})[_0x6c1b[5]](function(_0xfe13x5){return handleError(_0xfe13x4,_0xfe13x5)})})[_0x6c1b[5]](function(_0xfe13x5){return handleError(_0xfe13x4,_0xfe13x5)})};exports[_0x6c1b[24]]=function(_0xfe13x3,_0xfe13x4){ChatApplication[_0x6c1b[16]](_0xfe13x3[_0x6c1b[15]][_0x6c1b[14]])[_0x6c1b[8]](function(_0xfe13x7){if(!_0xfe13x7){return _0xfe13x4[_0x6c1b[13]](404)};_0xfe13x7[_0x6c1b[24]]()[_0x6c1b[8]](function(){return _0xfe13x4[_0x6c1b[13]](204)})[_0x6c1b[5]](function(_0xfe13x5){return handleError(_0xfe13x4,_0xfe13x5)})})[_0x6c1b[5]](function(_0xfe13x5){return handleError(_0xfe13x4,_0xfe13x5)})};function handleError(_0xfe13x4,_0xfe13x5){return _0xfe13x4[_0x6c1b[7]](500)[_0x6c1b[6]](_0xfe13x5)}
\ No newline at end of file
+'use strict';
+var _ = require('lodash');
+var ChatApplication = require('../../models').ChatApplication;
+// Get list of chat_applications
+exports.index = function(req, res) {
+  ChatApplication
+    .findAll({
+      where: req.query,
+      order: 'priority',
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(chat_applications) {
+      return res.status(200).send(chat_applications);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Get a single chat_application
+exports.show = function(req, res) {
+  ChatApplication
+    .findById(req.params.id)
+    .then(function(chat_application) {
+      if (!chat_application) {
+        return res.sendStatus(404);
+      }
+      return res.send(chat_application);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Creates a new chat_application in the DB.
+exports.create = function(req, res, next) {
+  ChatApplication.max('priority', {
+    where: {
+      ChatWebsiteId: req.body.ChatWebsiteId
+    }
+  }).then(function(max) {
+    // SET PRIORITY
+    req.body.priority = max ? ++max : 1;
+    ChatApplication
+      .create(req.body)
+      .then(function(mailApplication) {
+        return res.status(201).send(mailApplication);
+      })
+      .catch(function(err) {
+        return next(err);
+      });
+  }).catch(function(err) {
+    next(err);
+  });
+};
+// Updates an existing chat_application in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  ChatApplication
+    .findById(req.params.id)
+    .then(function(chat_application) {
+      if (!chat_application) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(chat_application, req.body);
+      updated
+        .save()
+        .then(function() {
+          return res.status(200).send(chat_application);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Deletes a chat_application from the DB.
+exports.destroy = function(req, res) {
+  ChatApplication
+    .findById(req.params.id)
+    .then(function(chat_application) {
+      if (!chat_application) {
+        return res.sendStatus(404);
+      }
+      chat_application
+        .destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index b7fc4dd..8776f3a 100644 (file)
@@ -1 +1,24 @@
-var _0x78ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x78ca[0];var ChatApplication=require(_0x78ca[2])[_0x78ca[1]];exports[_0x78ca[3]]=function(_0xd11cx2){ChatApplication[_0x78ca[4]](function(_0xd11cx3){onSave(_0xd11cx2,_0xd11cx3)});ChatApplication[_0x78ca[5]](function(_0xd11cx3){onRemove(_0xd11cx2,_0xd11cx3)})};function onSave(_0xd11cx2,_0xd11cx3,_0xd11cx5){_0xd11cx2[_0x78ca[7]](_0x78ca[6],_0xd11cx3)}function onRemove(_0xd11cx2,_0xd11cx3,_0xd11cx5){_0xd11cx2[_0x78ca[7]](_0x78ca[8],_0xd11cx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ChatApplication = require('../../models').ChatApplication;
+
+exports.register = function(socket) {
+  ChatApplication.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  ChatApplication.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('chat_application:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_application:remove', doc);
+}
index b97ffec..215f533 100644 (file)
@@ -1 +1,20 @@
-var _0xe02e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74"];_0xe02e[0];var should=require(_0xe02e[1]);var app=require(_0xe02e[2]);var request=require(_0xe02e[3]);describe(_0xe02e[4],function(){it(_0xe02e[5],function(_0xf333x4){request(app)[_0xe02e[13]](_0xe02e[12])[_0xe02e[11]](200)[_0xe02e[11]](_0xe02e[10],/json/)[_0xe02e[9]](function(_0xf333x5,_0xf333x6){if(_0xf333x5){return _0xf333x4(_0xf333x5)};_0xf333x6[_0xe02e[8]][_0xe02e[1]][_0xe02e[7]][_0xe02e[6]](Array);_0xf333x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/chat/applications', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/chat/applications')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 1bd8275..d85a510 100644 (file)
@@ -1 +1,15 @@
-var _0xae6e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xae6e[0];var express=require(_0xae6e[1]);var controller=require(_0xae6e[2]);var router=express.Router();router[_0xae6e[5]](_0xae6e[3],controller[_0xae6e[4]]);router[_0xae6e[5]](_0xae6e[6],controller[_0xae6e[7]]);router[_0xae6e[9]](_0xae6e[3],controller[_0xae6e[8]]);router[_0xae6e[11]](_0xae6e[6],controller[_0xae6e[10]]);router[_0xae6e[12]](_0xae6e[6],controller[_0xae6e[10]]);router[_0xae6e[14]](_0xae6e[6],controller[_0xae6e[13]]);module[_0xae6e[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./chat_application.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index e2c6f41..d72924b 100644 (file)
@@ -1 +1,106 @@
-var _0x105d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x69\x64","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x105d[0];var _=require(_0x105d[1]);var Util=require(_0x105d[2]);var ChatEnquiry=require(_0x105d[4])[_0x105d[3]];var ChatVisitor=require(_0x105d[4])[_0x105d[5]];var ChatWebsite=require(_0x105d[4])[_0x105d[6]];exports[_0x105d[7]]=function(_0xad27x6,_0xad27x7,_0xad27x8){return ChatEnquiry[_0x105d[17]](_[_0x105d[16]](Util[_0x105d[13]](_0xad27x6[_0x105d[12]]),{include:[{model:ChatWebsite,attributes:[_0x105d[14],_0x105d[15]]}]}))[_0x105d[11]](function(_0xad27xa){return _0xad27x7[_0x105d[10]](200)[_0x105d[9]](_0xad27xa)})[_0x105d[8]](function(_0xad27x9){return handleError(_0xad27x7,_0xad27x9)})};exports[_0x105d[18]]=function(_0xad27x6,_0xad27x7){return ChatEnquiry[_0x105d[22]](_0xad27x6[_0x105d[21]][_0x105d[14]],{include:[{model:ChatWebsite,attributes:[_0x105d[14],_0x105d[15]]},{model:ChatVisitor}]})[_0x105d[11]](function(_0xad27xb){if(!_0xad27xb){return _0xad27x7[_0x105d[20]](404)};return _0xad27x7[_0x105d[9]](_0xad27xb)})[_0x105d[8]](function(_0xad27x9){console[_0x105d[19]](_0xad27x9);return handleError(_0xad27x7,_0xad27x9)})};exports[_0x105d[23]]=function(_0xad27x6,_0xad27x7){return ChatEnquiry[_0x105d[23]](_0xad27x6[_0x105d[24]])[_0x105d[11]](function(_0xad27xb){return _0xad27x7[_0x105d[10]](201)[_0x105d[9]](_0xad27xb)})[_0x105d[8]](function(_0xad27x9){return handleError(_0xad27x7,_0xad27x9)})};exports[_0x105d[25]]=function(_0xad27x6,_0xad27x7){if(_0xad27x6[_0x105d[24]][_0x105d[14]]){delete _0xad27x6[_0x105d[24]][_0x105d[14]]};return ChatEnquiry[_0x105d[22]](_0xad27x6[_0x105d[21]][_0x105d[14]])[_0x105d[11]](function(_0xad27xb){if(!_0xad27xb){return _0xad27x7[_0x105d[20]](404)};var _0xad27xc=_[_0x105d[16]](_0xad27xb,_0xad27x6[_0x105d[24]]);return _0xad27xc[_0x105d[26]]()})[_0x105d[11]](function(_0xad27xb){return _0xad27x7[_0x105d[10]](200)[_0x105d[9]](_0xad27xb)})[_0x105d[8]](function(_0xad27x9){return handleError(_0xad27x7,_0xad27x9)})};exports[_0x105d[27]]=function(_0xad27x6,_0xad27x7){return ChatEnquiry[_0x105d[22]](_0xad27x6[_0x105d[21]][_0x105d[14]])[_0x105d[11]](function(_0xad27xb){if(!_0xad27xb){return _0xad27x7[_0x105d[20]](404)};return _0xad27xb[_0x105d[27]]()})[_0x105d[11]](function(){return _0xad27x7[_0x105d[20]](204)})[_0x105d[8]](function(_0xad27x9){return handleError(_0xad27x7,_0xad27x9)})};function handleError(_0xad27x7,_0xad27x9){return _0xad27x7[_0x105d[10]](500)[_0x105d[9]](_0xad27x9)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var ChatEnquiry = require('../../models').ChatEnquiry;
+var ChatVisitor = require('../../models').ChatVisitor;
+var ChatWebsite = require('../../models').ChatWebsite;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return ChatEnquiry
+    .findAndCountAll(_.merge(Util.getQuery(req.query), {
+      include: [{
+        model: ChatWebsite,
+        attributes: ['id', 'name']
+      }]
+    }))
+    .then(function(result) {
+      return res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single enquiry
+exports.show = function(req, res) {
+  return ChatEnquiry
+    .findById(req.params.id, {
+      include: [{
+        model: ChatWebsite,
+        attributes: ['id', 'name']
+      }, {
+        model: ChatVisitor
+      }]
+    })
+    .then(function(enquiry) {
+      if (!enquiry) {
+        return res.sendStatus(404);
+      }
+      return res.send(enquiry);
+    })
+    .catch(function(err) {
+      console.error(err);
+      return handleError(res, err);
+    });
+};
+
+// Creates a new enquiry in the DB.
+exports.create = function(req, res) {
+  return ChatEnquiry
+    .create(req.body)
+    .then(function(enquiry) {
+      return res.status(201).send(enquiry);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing enquiry in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ChatEnquiry
+    .findById(req.params.id)
+    .then(function(enquiry) {
+      if (!enquiry) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(enquiry, req.body);
+      return updated
+        .save();
+    })
+    .then(function(enquiry) {
+      return res.status(200).send(enquiry);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a enquiry from the DB.
+exports.destroy = function(req, res) {
+  return ChatEnquiry
+    .findById(req.params.id)
+    .then(function(enquiry) {
+      if (!enquiry) {
+        return res.sendStatus(404);
+      }
+      return enquiry
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index ca1f1cd..b7b69e1 100644 (file)
@@ -1 +1,24 @@
-var _0xddef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x6E\x71\x75\x69\x72\x79\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x6E\x71\x75\x69\x72\x79\x3A\x72\x65\x6D\x6F\x76\x65"];_0xddef[0];var enquiry=require(_0xddef[2])[_0xddef[1]];exports[_0xddef[3]]=function(_0xa197x2){enquiry[_0xddef[4]](function(_0xa197x3){onSave(_0xa197x2,_0xa197x3)});enquiry[_0xddef[5]](function(_0xa197x3){onRemove(_0xa197x2,_0xa197x3)})};function onSave(_0xa197x2,_0xa197x3,_0xa197x5){_0xa197x2[_0xddef[7]](_0xddef[6],_0xa197x3)}function onRemove(_0xa197x2,_0xa197x3,_0xa197x5){_0xa197x2[_0xddef[7]](_0xddef[8],_0xa197x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var enquiry = require('../../models').ChatEnquiry;
+
+exports.register = function(socket) {
+  enquiry.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  enquiry.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('enquiry:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('enquiry:remove', doc);
+}
index 79406f1..84a2544 100644 (file)
@@ -1 +1,15 @@
-var _0xdf21=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdf21[0];var express=require(_0xdf21[1]);var controller=require(_0xdf21[2]);var license=require(_0xdf21[3]);var router=express.Router();router[_0xdf21[8]](_0xdf21[4],license[_0xdf21[5]](),license[_0xdf21[6]](),controller[_0xdf21[7]]);router[_0xdf21[8]](_0xdf21[9],license[_0xdf21[5]](),license[_0xdf21[6]](),controller[_0xdf21[10]]);router[_0xdf21[12]](_0xdf21[4],license[_0xdf21[5]](),license[_0xdf21[6]](),controller[_0xdf21[11]]);router[_0xdf21[14]](_0xdf21[9],license[_0xdf21[5]](),license[_0xdf21[6]](),controller[_0xdf21[13]]);router[_0xdf21[15]](_0xdf21[9],license[_0xdf21[5]](),license[_0xdf21[6]](),controller[_0xdf21[13]]);router[_0xdf21[17]](_0xdf21[9],license[_0xdf21[5]](),license[_0xdf21[6]](),controller[_0xdf21[16]]);module[_0xdf21[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./enquiry.controller');
+var license = require('../../config/license/license.service');
+var router = express.Router();
+
+router.get('/', license.isValidDate(), license.hasChat(), controller.index);
+router.get('/:id', license.isValidDate(), license.hasChat(), controller.show);
+router.post('/', license.isValidDate(), license.hasChat(), controller.create);
+router.put('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.patch('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.delete('/:id', license.isValidDate(), license.hasChat(), controller.destroy);
+
+module.exports = router;
index b140be0..958ca19 100644 (file)
@@ -1 +1,267 @@
-var _0x3c6c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x73\x65\x72","\x6D\x65\x72\x67\x65","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x3c6c[0];var _=require(_0x3c6c[1]);var md5=require(_0x3c6c[2]);var User=require(_0x3c6c[4])[_0x3c6c[3]];var ChatRoom=require(_0x3c6c[4])[_0x3c6c[5]];var ChatMessage=require(_0x3c6c[4])[_0x3c6c[6]];var ChatVisitor=require(_0x3c6c[4])[_0x3c6c[7]];exports[_0x3c6c[8]]=function(_0xb37fx7,_0xb37fx8){ChatMessage[_0x3c6c[13]]()[_0x3c6c[12]](function(_0xb37fxa){return _0xb37fx8[_0x3c6c[11]](200)[_0x3c6c[10]](_0xb37fxa)})[_0x3c6c[9]](function(_0xb37fx9){return handleError(_0xb37fx8,_0xb37fx9)})};exports[_0x3c6c[14]]=function(_0xb37fx7,_0xb37fx8){ChatMessage[_0x3c6c[18]](_0xb37fx7[_0x3c6c[17]][_0x3c6c[16]])[_0x3c6c[12]](function(_0xb37fxb){if(!_0xb37fxb){return _0xb37fx8[_0x3c6c[15]](404)};return _0xb37fx8[_0x3c6c[10]](_0xb37fxb)})[_0x3c6c[9]](function(_0xb37fx9){return handleError(_0xb37fx8,_0xb37fx9)})};exports[_0x3c6c[19]]=function(_0xb37fx7,_0xb37fx8,_0xb37fxc){ChatMessage[_0x3c6c[19]](_[_0x3c6c[22]](_0xb37fx7[_0x3c6c[20]],{UserId:_0xb37fx7[_0x3c6c[21]][_0x3c6c[16]]}))[_0x3c6c[12]](function(_0xb37fxb){return _0xb37fx8[_0x3c6c[11]](201)[_0x3c6c[10]](_0xb37fxb)})[_0x3c6c[9]](function(_0xb37fx9){return handleError(_0xb37fx8,_0xb37fx9)})};exports[_0x3c6c[23]]=function(_0xb37fx7,_0xb37fx8){if(_0xb37fx7[_0x3c6c[20]][_0x3c6c[16]]){delete _0xb37fx7[_0x3c6c[20]][_0x3c6c[16]]};return ChatMessage[_0x3c6c[18]](_0xb37fx7[_0x3c6c[17]][_0x3c6c[16]])[_0x3c6c[12]](function(_0xb37fxb){if(!_0xb37fxb){return _0xb37fx8[_0x3c6c[15]](404)};var _0xb37fxd=_[_0x3c6c[22]](_0xb37fxb,_0xb37fx7[_0x3c6c[20]]);return _0xb37fxd[_0x3c6c[24]]()})[_0x3c6c[12]](function(_0xb37fxb){return _0xb37fx8[_0x3c6c[11]](200)[_0x3c6c[10]](_0xb37fxb)})[_0x3c6c[9]](function(_0xb37fx9){return handleError(_0xb37fx8,_0xb37fx9)})};exports[_0x3c6c[25]]=function(_0xb37fx7,_0xb37fx8){ChatMessage[_0x3c6c[18]](_0xb37fx7[_0x3c6c[17]][_0x3c6c[16]])[_0x3c6c[12]](function(_0xb37fxb){if(!_0xb37fxb){return _0xb37fx8[_0x3c6c[15]](404)};_0xb37fxb[_0x3c6c[25]]()[_0x3c6c[12]](function(){return _0xb37fx8[_0x3c6c[15]](204)})[_0x3c6c[9]](function(_0xb37fx9){return handleError(_0xb37fx8,_0xb37fx9)})})[_0x3c6c[9]](function(_0xb37fx9){return handleError(_0xb37fx8,_0xb37fx9)})};function handleError(_0xb37fx8,_0xb37fx9){return _0xb37fx8[_0x3c6c[11]](500)[_0x3c6c[10]](_0xb37fx9)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var md5 = require('md5');
+
+var User = require('../../models').User;
+var ChatRoom = require('../../models').ChatRoom;
+var ChatMessage = require('../../models').ChatMessage;
+var ChatVisitor = require('../../models').ChatVisitor;
+
+// Get list of chat_messages
+exports.index = function (req, res) {
+  ChatMessage
+    .findAll()
+    .then(function (chat_messages) {
+      return res.status(200).send(chat_messages);
+    })
+    .catch(function (err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single chatMessage
+exports.show = function (req, res) {
+  ChatMessage
+    .findById(req.params.id)
+    .then(function (chatMessage) {
+      if (!chatMessage) {
+        return res.sendStatus(404);
+      }
+      return res.send(chatMessage);
+    })
+    .catch(function (err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new chatMessage in the DB.
+exports.create = function (req, res, next) {
+  // if (req.body.ChatRoomId && req.body.to) {
+  //   return handleError(res, new Error('Select ChatRoomId or to'));
+  // } else if (req.body.to) {
+  //
+  //   switch (req.body.type) {
+  //     case 'internal':
+  //       User
+  //         .findOne({
+  //           where: {
+  //             $or: [{
+  //               id: {
+  //                 $like: req.body.to
+  //               }
+  //             }, {
+  //               name: req.body.to
+  //             }]
+  //           }
+  //         })
+  //         .then(function(user) {
+  //           if (user) {
+  //
+  //             var users = _.sortBy([user, req.user], 'id');
+  //             var participants = {
+  //               users: {
+  //                 ids: [users[0].id, users[1].id]
+  //               },
+  //               visitors: {
+  //                 ids: []
+  //               }
+  //             };
+  //
+  //             var token = md5(JSON.stringify(participants)).toString(
+  //               'base64');
+  //
+  //             participants.users.fullnames = [users[0].fullname, users[1].fullname];
+  //             participants.visitors.fullnames = [];
+  //
+  //             ChatRoom
+  //               .findOrCreate({
+  //                 where: {
+  //                   token: token
+  //                 },
+  //                 defaults: {
+  //                   type: req.body.type,
+  //                   token: token,
+  //                   participants: JSON.stringify(participants)
+  //                 }
+  //               })
+  //               .spread(function(chatRoom, created) {
+  //
+  //                 chatRoom
+  //                   .updateAttributes({
+  //                     participants: JSON.stringify(participants)
+  //                   });
+  //
+  //                 ChatMessage
+  //                   .create({
+  //                     body: req.body.body,
+  //                     fullname: req.user.fullname,
+  //                     email: req.user.email,
+  //                     ChatRoomId: chatRoom.id,
+  //                     userId: req.user.id
+  //                   })
+  //                   .then(function(chatMessage) {
+  //                     return res.status(201).send(chatMessage);
+  //                   })
+  //                   .catch(function(err) {
+  //                     return handleError(res, err);
+  //                   });
+  //               });
+  //
+  //           } else {
+  //             return handleError(res, new Error('User not found'));
+  //           }
+  //         })
+  //         .catch(function(err) {
+  //           return handleError(res, err);
+  //         });
+  //
+  //       break;
+  //     case 'external':
+  //       ChatVisitor
+  //         .findOne({
+  //           where: {
+  //             $or: [{
+  //               id: {
+  //                 $like: req.body.to
+  //               }
+  //             }, {
+  //               fullname: req.body.to
+  //             }]
+  //           }
+  //         })
+  //         .then(function(chatVisitor) {
+  //           if (chatVisitor) {
+  //
+  //             var participants = {
+  //               users: {
+  //                 ids: [req.user.id]
+  //               },
+  //               visitors: {
+  //                 ids: [chatVisitor.id]
+  //               }
+  //             };
+  //
+  //             var token = md5(JSON.stringify(participants)).toString(
+  //               'base64');
+  //
+  //             participants.users.fullnames = [req.user.fullname];
+  //             participants.visitors.fullnames = [chatVisitor.fullname];
+  //
+  //             ChatRoom
+  //               .findOrCreate({
+  //                 where: {
+  //                   token: token
+  //                 },
+  //                 defaults: {
+  //                   type: req.body.type,
+  //                   token: token,
+  //                   participants: JSON.stringify(participants)
+  //                 }
+  //               })
+  //               .spread(function(chatRoom, created) {
+  //
+  //                 chatRoom
+  //                   .updateAttributes({
+  //                     participants: JSON.stringify(participants)
+  //                   });
+  //
+  //                 ChatMessage
+  //                   .create({
+  //                     body: req.body.body,
+  //                     fullname: req.user.fullname,
+  //                     email: req.user.email,
+  //                     ChatRoomId: chatRoom.id,
+  //                     userId: req.user.id
+  //                   })
+  //                   .then(function(chatMessage) {
+  //                     return res.status(201).send(chatMessage);
+  //                   })
+  //                   .catch(function(err) {
+  //                     return handleError(res, err);
+  //                   });
+  //               });
+  //           }
+  //         });
+  //       break;
+  //     default:
+  //       return handleError(res, new Error('Room type unsupported'));
+  //   }
+  //
+  //
+  // } else if (req.body.ChatRoomId) {
+  //
+  //   ChatMessage
+  //     .create(_.merge({
+  //       userId: req.user.id,
+  //       email: req.user.email,
+  //       fullname: req.user.fullname
+  //     }, req.body))
+  //     .then(function(chatMessage) {
+  //       return res.status(201).send(chatMessage);
+  //     })
+  //     .catch(function(err) {
+  //       return handleError(res, err);
+  //     });
+  // } else {
+  //   return handleError(res, new Error('Select ChatRoomId or to'));
+  // }
+  ChatMessage
+    .create(_.merge(req.body, {
+      UserId: req.user.id
+    }))
+    .then(function (chatMessage) {
+      return res.status(201).send(chatMessage);
+    })
+    .catch(function (err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing chatMessage in the DB.
+exports.update = function (req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return ChatMessage
+    .findById(req.params.id)
+    .then(function (chatMessage) {
+      if (!chatMessage) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(chatMessage, req.body);
+      return updated.save();
+    })
+    .then(function (chatMessage) {
+      return res.status(200).send(chatMessage);
+    })
+    .catch(function (err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a chatMessage from the DB.
+exports.destroy = function (req, res) {
+  ChatMessage
+    .findById(req.params.id)
+    .then(function (chatMessage) {
+      if (!chatMessage) {
+        return res.sendStatus(404);
+      }
+      chatMessage.destroy()
+        .then(function () {
+          return res.sendStatus(204);
+        })
+        .catch(function (err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function (err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 8c2936c..dccab23 100644 (file)
@@ -1 +1,59 @@
-var _0x6405=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x49\x64","\x66\x69\x6E\x64","\x75\x73\x65\x72\x49\x64","\x69\x64","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x65\x72\x67\x65","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x6405[0];var chat_message=require(_0x6405[2])[_0x6405[1]];var _=require(_0x6405[3]);exports[_0x6405[4]]=function(_0xd276x3){chat_message[_0x6405[5]](function(_0xd276x4){onSave(_0xd276x3,_0xd276x4)});chat_message[_0x6405[6]](function(_0xd276x4){onSave(_0xd276x3,_0xd276x4)});chat_message[_0x6405[7]](function(_0xd276x4){onRemove(_0xd276x3,_0xd276x4)})};function onSave(_0xd276x3,_0xd276x4,_0xd276x6){return _0xd276x4[_0x6405[28]]()[_0x6405[27]](function(_0xd276xc){return [_0xd276xc[_0x6405[25]]({attributes:[_0x6405[13],_0x6405[20],_0x6405[21],_0x6405[22],_0x6405[23],_0x6405[24]],raw:true}),_0xd276xc[_0x6405[26]]({attributes:[_0x6405[13],_0x6405[21],_0x6405[22]],raw:true})]})[_0x6405[19]](function(_0xd276x8,_0xd276x9){var _0xd276xa=_[_0x6405[11]](_0xd276x8,{id:_0xd276x4[_0x6405[10]]});_0xd276x8[_0x6405[18]](function(_0xd276xb){if(_0xd276x3[_0x6405[12]]==_0xd276xb[_0x6405[13]]&&(_0xd276xa||_0xd276x9)){_0xd276x3[_0x6405[17]](_0x6405[14],_[_0x6405[16]](_0xd276x4[_0x6405[15]],{User:_0xd276xa,ChatVisitor:_0xd276x9}))}})})[_0x6405[9]](function(_0xd276x7){console[_0x6405[8]](_0xd276x7)})}function onRemove(_0xd276x3,_0xd276x4,_0xd276x6){_0xd276x3[_0x6405[17]](_0x6405[29],_0xd276x4)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var chat_message = require('../../models').ChatMessage;
+var _ = require('lodash');
+
+exports.register = function (socket) {
+  chat_message.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  chat_message.afterUpdate(function (doc) {
+    onSave(socket, doc);
+  });
+  chat_message.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  return doc
+    .getChatRoom()
+    .then(function (chatRoom) {
+      return [chatRoom
+        .getUsers({
+          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'],
+          raw: true
+        }), chatRoom
+        .getChatVisitor({
+          attributes: ['id', 'fullname', 'email'],
+          raw: true
+        })
+      ];
+    })
+    .spread(function (users, visitor) {
+      var sender = _.find(users, {
+        id: doc.UserId
+      });
+
+      users.forEach(function (user) {
+        // SOCKET FILTER
+        if (socket.userId == user.id && (sender || visitor)) {
+          socket.emit('chat_message:save', _.merge(doc.dataValues, {
+            User: sender, // TODO modify to sender
+            ChatVisitor: visitor // TODO modify to visitor
+          }));
+        }
+      });
+    })
+    .catch(function (err) {
+      console.error(err);
+    });
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_message:remove', doc);
+}
index e6bcf2c..f646838 100644 (file)
@@ -1 +1,20 @@
-var _0xacb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74"];_0xacb3[0];var should=require(_0xacb3[1]);var app=require(_0xacb3[2]);var request=require(_0xacb3[3]);describe(_0xacb3[4],function(){it(_0xacb3[5],function(_0x5520x4){request(app)[_0xacb3[13]](_0xacb3[12])[_0xacb3[11]](200)[_0xacb3[11]](_0xacb3[10],/json/)[_0xacb3[9]](function(_0x5520x5,_0x5520x6){if(_0x5520x5){return _0x5520x4(_0x5520x5)};_0x5520x6[_0xacb3[8]][_0xacb3[1]][_0xacb3[7]][_0xacb3[6]](Array);_0x5520x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/chat/messages', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/chat/messages')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 48e9e9c..efcb4e1 100644 (file)
@@ -1 +1,15 @@
-var _0x4c9d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4c9d[0];var express=require(_0x4c9d[1]);var controller=require(_0x4c9d[2]);var auth=require(_0x4c9d[3]);var license=require(_0x4c9d[4]);var router=express.Router();router[_0x4c9d[9]](_0x4c9d[5],license[_0x4c9d[6]](),license[_0x4c9d[7]](),controller[_0x4c9d[8]]);router[_0x4c9d[9]](_0x4c9d[10],license[_0x4c9d[6]](),license[_0x4c9d[7]](),controller[_0x4c9d[11]]);router[_0x4c9d[14]](_0x4c9d[5],license[_0x4c9d[6]](),license[_0x4c9d[7]](),auth[_0x4c9d[12]](),controller[_0x4c9d[13]]);router[_0x4c9d[16]](_0x4c9d[10],license[_0x4c9d[6]](),license[_0x4c9d[7]](),controller[_0x4c9d[15]]);router[_0x4c9d[18]](_0x4c9d[10],license[_0x4c9d[6]](),license[_0x4c9d[7]](),controller[_0x4c9d[17]]);module[_0x4c9d[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./chat_message.controller');
+var auth = require('../../auth/auth.service');
+var license = require('../../config/license/license.service');
+var router = express.Router();
+
+router.get('/', license.isValidDate(), license.hasChat(), controller.index);
+router.get('/:id', license.isValidDate(), license.hasChat(), controller.show);
+router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.create);
+router.put('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.delete('/:id', license.isValidDate(), license.hasChat(), controller.destroy);
+
+module.exports = router;
index 3c669ac..8e3b8ba 100644 (file)
@@ -1 +1,112 @@
-var _0xf93b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xf93b[0];var _=require(_0xf93b[1]);var Util=require(_0xf93b[2]);var ChatProactiveAction=require(_0xf93b[4])[_0xf93b[3]];function handleError(_0xf548x5,_0xf548x6){_0xf548x6=_0xf548x6||500;return function(_0xf548x7){_0xf548x5[_0xf93b[6]](_0xf548x6)[_0xf93b[5]](_0xf548x7)}}function responseWithResult(_0xf548x5,_0xf548x6){_0xf548x6=_0xf548x6||200;return function(_0xf548x9){if(_0xf548x9){_0xf548x5[_0xf93b[6]](_0xf548x6)[_0xf93b[7]](_0xf548x9)}}}function responseWithoutResult(_0xf548x5,_0xf548x6){_0xf548x6=_0xf548x6||204;return function(){_0xf548x5[_0xf93b[8]](_0xf548x6)}}function handleEntityNotFound(_0xf548x5){return function(_0xf548x9){if(!_0xf548x9){_0xf548x5[_0xf93b[6]](404)[_0xf93b[9]]();return null};return _0xf548x9}}function saveUpdates(_0xf548xd){return function(_0xf548x9){return _0xf548x9[_0xf93b[11]](_0xf548xd)[_0xf93b[10]](function(_0xf548xe){return _0xf548xe})}}function removeEntity(_0xf548x5){return function(_0xf548x9){if(_0xf548x9){return _0xf548x9[_0xf93b[12]]()[_0xf93b[10]](function(){_0xf548x5[_0xf93b[6]](204)[_0xf93b[9]]()})}}}exports[_0xf93b[13]]=function(_0xf548x10,_0xf548x5){return ChatProactiveAction[_0xf93b[17]](Util[_0xf93b[16]](_0xf548x10[_0xf93b[15]]))[_0xf93b[10]](responseWithResult(_0xf548x5))[_0xf93b[14]](handleError(_0xf548x5))};exports[_0xf93b[18]]=function(_0xf548x10,_0xf548x5){return ChatProactiveAction[_0xf93b[21]](_0xf548x10[_0xf93b[20]][_0xf93b[19]])[_0xf93b[10]](handleEntityNotFound(_0xf548x5))[_0xf93b[10]](responseWithResult(_0xf548x5))[_0xf93b[14]](handleError(_0xf548x5))};exports[_0xf93b[22]]=function(_0xf548x10,_0xf548x5){return ChatProactiveAction[_0xf93b[22]](_0xf548x10[_0xf93b[23]])[_0xf93b[10]](responseWithResult(_0xf548x5,201))[_0xf93b[14]](handleError(_0xf548x5))};exports[_0xf93b[24]]=function(_0xf548x10,_0xf548x5){if(_0xf548x10[_0xf93b[23]][_0xf93b[19]]){delete _0xf548x10[_0xf93b[23]][_0xf93b[19]]};return ChatProactiveAction[_0xf93b[21]](_0xf548x10[_0xf93b[20]][_0xf93b[19]])[_0xf93b[10]](handleEntityNotFound(_0xf548x5))[_0xf93b[10]](saveUpdates(_0xf548x10[_0xf93b[23]]))[_0xf93b[10]](responseWithResult(_0xf548x5))[_0xf93b[14]](handleError(_0xf548x5))};exports[_0xf93b[12]]=function(_0xf548x10,_0xf548x5){return ChatProactiveAction[_0xf93b[21]](_0xf548x10[_0xf93b[20]][_0xf93b[19]])[_0xf93b[10]](handleEntityNotFound(_0xf548x5))[_0xf93b[10]](removeEntity(_0xf548x5))[_0xf93b[14]](handleError(_0xf548x5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/chat/proactives              ->  index
+ * POST    /api/chat/proactives              ->  create
+ * GET     /api/chat/proactives/:id          ->  show
+ * PUT     /api/chat/proactives/:id          ->  update
+ * DELETE  /api/chat/proactives/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var ChatProactiveAction = require('../../models').ChatProactiveAction;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function responseWithoutResult(res, statusCode) {
+  statusCode = statusCode || 204;
+  return function() {
+    res.sendStatus(statusCode);
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) { 
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of ChatProactiveActions
+exports.index = function(req, res) {
+  return ChatProactiveAction.findAll(Util.getQuery(req.query))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single ChatProactiveAction from the DB
+exports.show = function(req, res) {
+  return ChatProactiveAction.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new ChatProactiveAction in the DB
+exports.create = function(req, res) {
+  return ChatProactiveAction.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing ChatProactiveAction in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ChatProactiveAction.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a ChatProactiveAction from the DB
+exports.destroy = function(req, res) {
+  return ChatProactiveAction.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
index 13b6590..ca71aaf 100644 (file)
@@ -1 +1,24 @@
-var _0xc236=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xc236[0];var ChatProactiveAction=require(_0xc236[2])[_0xc236[1]];exports[_0xc236[3]]=function(_0x4328x2){ChatProactiveAction[_0xc236[4]](function(_0x4328x3){onSave(_0x4328x2,_0x4328x3)});ChatProactiveAction[_0xc236[5]](function(_0x4328x3){onRemove(_0x4328x2,_0x4328x3)})};function onSave(_0x4328x2,_0x4328x3,_0x4328x5){_0x4328x2[_0xc236[7]](_0xc236[6],_0x4328x3)}function onRemove(_0x4328x2,_0x4328x3,_0x4328x5){_0x4328x2[_0xc236[7]](_0xc236[8],_0x4328x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ChatProactiveAction = require('../../models').ChatProactiveAction;
+
+exports.register = function(socket) {
+  ChatProactiveAction.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ChatProactiveAction.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('chat_proactive_action:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_proactive_action:remove', doc);
+}
index b6f8eaa..f38d95e 100644 (file)
@@ -1 +1,16 @@
-var _0x91aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x91aa[0];var express=require(_0x91aa[1]);var auth=require(_0x91aa[2]);var controller=require(_0x91aa[3]);var router=express.Router();router[_0x91aa[7]](_0x91aa[4],auth[_0x91aa[5]](),controller[_0x91aa[6]]);router[_0x91aa[7]](_0x91aa[8],auth[_0x91aa[5]](),controller[_0x91aa[9]]);router[_0x91aa[11]](_0x91aa[4],auth[_0x91aa[5]](),controller[_0x91aa[10]]);router[_0x91aa[13]](_0x91aa[8],auth[_0x91aa[5]](),controller[_0x91aa[12]]);router[_0x91aa[14]](_0x91aa[8],auth[_0x91aa[5]](),controller[_0x91aa[12]]);router[_0x91aa[16]](_0x91aa[8],auth[_0x91aa[5]](),controller[_0x91aa[15]]);module[_0x91aa[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./chat_proactive_action.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 83132fc..2b9c66a 100644 (file)
@@ -1 +1,97 @@
-var _0xece6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xece6[0];var proxyquire=require(_0xece6[2])[_0xece6[1]]();var chatProactiveActionCtrlStub={index:_0xece6[3],show:_0xece6[4],create:_0xece6[5],update:_0xece6[6],destroy:_0xece6[7]};var routerStub={get:sinon[_0xece6[8]](),put:sinon[_0xece6[8]](),patch:sinon[_0xece6[8]](),post:sinon[_0xece6[8]](),delete:sinon[_0xece6[8]]()};var chatProactiveActionIndex=proxyquire(_0xece6[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":chatProactiveActionCtrlStub});describe(_0xece6[10],function(){it(_0xece6[11],function(){expect(chatProactiveActionIndex)[_0xece6[13]][_0xece6[12]](routerStub)});describe(_0xece6[14],function(){it(_0xece6[15],function(){expect(routerStub[_0xece6[21]][_0xece6[20]](_0xece6[19],_0xece6[3]))[_0xece6[13]][_0xece6[18]][_0xece6[17]][_0xece6[16]]})});describe(_0xece6[22],function(){it(_0xece6[23],function(){expect(routerStub[_0xece6[21]][_0xece6[20]](_0xece6[24],_0xece6[4]))[_0xece6[13]][_0xece6[18]][_0xece6[17]][_0xece6[16]]})});describe(_0xece6[25],function(){it(_0xece6[26],function(){expect(routerStub[_0xece6[27]][_0xece6[20]](_0xece6[19],_0xece6[5]))[_0xece6[13]][_0xece6[18]][_0xece6[17]][_0xece6[16]]})});describe(_0xece6[28],function(){it(_0xece6[29],function(){expect(routerStub[_0xece6[30]][_0xece6[20]](_0xece6[24],_0xece6[6]))[_0xece6[13]][_0xece6[18]][_0xece6[17]][_0xece6[16]]})});describe(_0xece6[31],function(){it(_0xece6[29],function(){expect(routerStub[_0xece6[32]][_0xece6[20]](_0xece6[24],_0xece6[6]))[_0xece6[13]][_0xece6[18]][_0xece6[17]][_0xece6[16]]})});describe(_0xece6[33],function(){it(_0xece6[34],function(){expect(routerStub[_0xece6[35]][_0xece6[20]](_0xece6[24],_0xece6[7]))[_0xece6[13]][_0xece6[18]][_0xece6[17]][_0xece6[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var chatProactiveActionCtrlStub = {
+  index: 'chatProactiveActionCtrl.index',
+  show: 'chatProactiveActionCtrl.show',
+  create: 'chatProactiveActionCtrl.create',
+  update: 'chatProactiveActionCtrl.update',
+  destroy: 'chatProactiveActionCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var chatProactiveActionIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './chat_proactive_action.controller': chatProactiveActionCtrlStub
+});
+
+describe('ChatProactiveAction API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(chatProactiveActionIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/chat/proactives', function() {
+
+    it('should route to chatProactiveAction.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'chatProactiveActionCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/chat/proactives/:id', function() {
+
+    it('should route to chatProactiveAction.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'chatProactiveActionCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/chat/proactives', function() {
+
+    it('should route to chatProactiveAction.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'chatProactiveActionCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/chat/proactives/:id', function() {
+
+    it('should route to chatProactiveAction.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'chatProactiveActionCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/chat/proactives/:id', function() {
+
+    it('should route to chatProactiveAction.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'chatProactiveActionCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/chat/proactives/:id', function() {
+
+    it('should route to chatProactiveAction.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'chatProactiveActionCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 3463b05..e7c8ffd 100644 (file)
@@ -1 +1,200 @@
-var _0xe1e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x6D\x65","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xe1e2[0];var _=require(_0xe1e2[1]);var Util=require(_0xe1e2[2]);var ChatQueue=require(_0xe1e2[4])[_0xe1e2[3]];var User=require(_0xe1e2[4])[_0xe1e2[5]];var UserHasChatQueue=require(_0xe1e2[4])[_0xe1e2[6]];exports[_0xe1e2[7]]=function(_0x3d66x6,_0x3d66x7){return ChatQueue[_0xe1e2[16]](_0xe1e2[15])[_0xe1e2[14]](Util[_0xe1e2[13]](_0x3d66x6[_0xe1e2[12]]))[_0xe1e2[11]](function(_0x3d66x9){_0x3d66x7[_0xe1e2[10]](200)[_0xe1e2[9]](_0x3d66x9)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[17]]=function(_0x3d66x6,_0x3d66x7,_0x3d66xa){UserHasChatQueue[_0xe1e2[20]]({where:{UserId:_0x3d66x6[_0xe1e2[19]][_0xe1e2[18]]}})[_0xe1e2[11]](function(_0x3d66xb){return _0x3d66x7[_0xe1e2[10]](200)[_0xe1e2[9]](_0x3d66xb)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[21]]=function(_0x3d66x6,_0x3d66x7){ChatQueue[_0xe1e2[24]](_0x3d66x6[_0xe1e2[23]][_0xe1e2[18]])[_0xe1e2[11]](function(_0x3d66xc){if(!_0x3d66xc){return _0x3d66x7[_0xe1e2[22]](404)};return _0x3d66x7[_0xe1e2[9]](_0x3d66xc)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[25]]=function(_0x3d66x6,_0x3d66x7){return ChatQueue[_0xe1e2[24]](_0x3d66x6[_0xe1e2[23]][_0xe1e2[18]])[_0xe1e2[11]](function(_0x3d66xe){if(!_0x3d66xe){return _0x3d66x7[_0xe1e2[22]](404)};return _0x3d66xe[_0xe1e2[30]]({where:{role:_0xe1e2[26]},attributes:[_0xe1e2[18],_0xe1e2[27],_0xe1e2[28],_0xe1e2[29]]})})[_0xe1e2[11]](function(_0x3d66xd){return _0x3d66x7[_0xe1e2[10]](200)[_0xe1e2[9]](_0x3d66xd)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[31]]=function(_0x3d66x6,_0x3d66x7){return ChatQueue[_0xe1e2[31]](_0x3d66x6[_0xe1e2[32]])[_0xe1e2[11]](function(_0x3d66xc){return _0x3d66x7[_0xe1e2[10]](201)[_0xe1e2[9]](_0x3d66xc)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[33]]=function(_0x3d66x6,_0x3d66x7){if(_0x3d66x6[_0xe1e2[32]][_0xe1e2[18]]){delete _0x3d66x6[_0xe1e2[32]][_0xe1e2[18]]};return ChatQueue[_0xe1e2[24]](_0x3d66x6[_0xe1e2[23]][_0xe1e2[18]])[_0xe1e2[11]](function(_0x3d66xc){if(!_0x3d66xc){return _0x3d66x7[_0xe1e2[22]](404)};var _0x3d66xf=_[_0xe1e2[34]](_0x3d66xc,_0x3d66x6[_0xe1e2[32]]);_0x3d66xf[_0xe1e2[35]]()[_0xe1e2[11]](function(){return _0x3d66x7[_0xe1e2[10]](200)[_0xe1e2[9]](_0x3d66xc)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[36]]=function(_0x3d66x6,_0x3d66x7,_0x3d66xa){return ChatQueue[_0xe1e2[24]](_0x3d66x6[_0xe1e2[23]][_0xe1e2[18]])[_0xe1e2[11]](function(_0x3d66x10){if(!_0x3d66x10){return _0x3d66x7[_0xe1e2[22]](404)};return _0x3d66x10[_0xe1e2[39]](_0x3d66x6[_0xe1e2[32]][_0xe1e2[37]],{penalty:_0x3d66x6[_0xe1e2[32]][_0xe1e2[38]],queue:_0x3d66x10[_0xe1e2[27]]},{individualHooks:true})})[_0xe1e2[11]](function(){return _0x3d66x7[_0xe1e2[22]](200)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[40]]=function(_0x3d66x6,_0x3d66x7,_0x3d66xa){return ChatQueue[_0xe1e2[24]](_0x3d66x6[_0xe1e2[23]][_0xe1e2[18]])[_0xe1e2[11]](function(_0x3d66x10){if(!_0x3d66x10){return _0x3d66x7[_0xe1e2[22]](404)};return _0x3d66x10[_0xe1e2[41]](_0x3d66x6[_0xe1e2[12]][_0xe1e2[37]],{individualHooks:true})})[_0xe1e2[11]](function(){return _0x3d66x7[_0xe1e2[22]](200)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[42]]=function(_0x3d66x6,_0x3d66x7){ChatQueue[_0xe1e2[24]](_0x3d66x6[_0xe1e2[23]][_0xe1e2[18]])[_0xe1e2[11]](function(_0x3d66xc){if(!_0x3d66xc){return _0x3d66x7[_0xe1e2[22]](404)};_0x3d66xc[_0xe1e2[42]]()[_0xe1e2[11]](function(){return _0x3d66x7[_0xe1e2[22]](204)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};exports[_0xe1e2[43]]=function(_0x3d66x6,_0x3d66x7){return ChatQueue[_0xe1e2[42]]({where:{id:_0x3d66x6[_0xe1e2[12]][_0xe1e2[44]]},individualHooks:true})[_0xe1e2[11]](function(){return _0x3d66x7[_0xe1e2[22]](204)})[_0xe1e2[8]](function(_0x3d66x8){return handleError(_0x3d66x7,_0x3d66x8)})};function handleError(_0x3d66x7,_0x3d66x8){return _0x3d66x7[_0xe1e2[10]](500)[_0xe1e2[9]](_0x3d66x8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var ChatQueue = require('../../models').ChatQueue;
+var User = require('../../models').User;
+var UserHasChatQueue = require('../../models').UserHasChatQueue;
+
+// Get list of mailQueues
+exports.index = function(req, res) {
+  return ChatQueue
+    .scope('default')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get list of my chat_rooms
+exports.me = function(req, res, next) {
+  UserHasChatQueue
+    .findAll({
+      where: {
+        UserId: req.user.id
+      }
+    })
+    .then(function(userHasChatQueues) {
+      return res.status(200).send(userHasChatQueues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single chat_queue
+exports.show = function(req, res) {
+  ChatQueue
+    .findById(req.params.id)
+    .then(function(chat_queue) {
+      if (!chat_queue) {
+        return res.sendStatus(404);
+      }
+      return res.send(chat_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single queue
+exports.showAgents = function(req, res) {
+  return ChatQueue
+    .findById(req.params.id)
+    .then(function(queue) {
+      if (!queue) {
+        return res.sendStatus(404);
+      }
+      return queue
+        .getUsers({
+          where: {
+            role: 'agent'
+          },
+          attributes: ['id', 'name', 'fullname', 'email']
+        });
+    })
+    .then(function(agents) {
+      return res.status(200).send(agents);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new chat_queue in the DB.
+exports.create = function(req, res) {
+  return ChatQueue
+    .create(req.body)
+    .then(function(chat_queue) {
+      return res.status(201).send(chat_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing chat_queue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ChatQueue
+    .findById(req.params.id)
+    .then(function(chat_queue) {
+      if (!chat_queue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(chat_queue, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(chat_queue);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Add agents to chat queues
+exports.addAgents = function(req, res, next) {
+
+  return ChatQueue
+    .findById(req.params.id)
+    .then(function(chatQueue) {
+      if (!chatQueue) {
+        return res.sendStatus(404);
+      }
+      return chatQueue
+        .addUsers(req.body.agents, {
+          penalty: req.body.penalty,
+          queue: chatQueue.name
+        }, {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.removeAgents = function(req, res, next) {
+  return ChatQueue
+    .findById(req.params.id)
+    .then(function(chatQueue) {
+      if (!chatQueue) {
+        return res.sendStatus(404);
+      }
+      return chatQueue
+        .removeUsers(req.query.agents, {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a chat_queue from the DB.
+exports.destroy = function(req, res) {
+  ChatQueue
+    .findById(req.params.id)
+    .then(function(chat_queue) {
+      if (!chat_queue) {
+        return res.sendStatus(404);
+      }
+      chat_queue.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return ChatQueue
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index f3121f2..2e7f5d4 100644 (file)
@@ -1 +1,24 @@
-var _0x277a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x277a[0];var chatQueue=require(_0x277a[2])[_0x277a[1]];exports[_0x277a[3]]=function(_0x5504x2){chatQueue[_0x277a[4]](function(_0x5504x3){onSave(_0x5504x2,_0x5504x3)});chatQueue[_0x277a[5]](function(_0x5504x3){onRemove(_0x5504x2,_0x5504x3)})};function onSave(_0x5504x2,_0x5504x3,_0x5504x5){_0x5504x2[_0x277a[7]](_0x277a[6],_0x5504x3)}function onRemove(_0x5504x2,_0x5504x3,_0x5504x5){_0x5504x2[_0x277a[7]](_0x277a[8],_0x5504x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var chatQueue = require('../../models').ChatQueue;
+
+exports.register = function (socket) {
+  chatQueue.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  chatQueue.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('chat_queue:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_queue:remove', doc);
+}
index 2a06d43..d4cc855 100644 (file)
@@ -1 +1,21 @@
-var _0x8a5b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6D\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x6D\x65","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x8a5b[0];var express=require(_0x8a5b[1]);var controller=require(_0x8a5b[2]);var auth=require(_0x8a5b[3]);var license=require(_0x8a5b[4]);var router=express.Router();router[_0x8a5b[9]](_0x8a5b[5],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[8]]);router[_0x8a5b[9]](_0x8a5b[10],license[_0x8a5b[6]](),license[_0x8a5b[7]](),auth[_0x8a5b[11]](),controller[_0x8a5b[12]]);router[_0x8a5b[9]](_0x8a5b[13],auth[_0x8a5b[11]](),license[_0x8a5b[7]](),controller[_0x8a5b[14]]);router[_0x8a5b[9]](_0x8a5b[15],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[16]]);router[_0x8a5b[18]](_0x8a5b[5],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[17]]);router[_0x8a5b[18]](_0x8a5b[13],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[19]]);router[_0x8a5b[21]](_0x8a5b[15],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[20]]);router[_0x8a5b[23]](_0x8a5b[13],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[22]]);router[_0x8a5b[24]](_0x8a5b[15],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[20]]);router[_0x8a5b[23]](_0x8a5b[5],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[25]]);router[_0x8a5b[23]](_0x8a5b[15],license[_0x8a5b[6]](),license[_0x8a5b[7]](),controller[_0x8a5b[26]]);module[_0x8a5b[27]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./chat_queue.controller');
+var auth = require('../../auth/auth.service');
+var license = require('../../config/license/license.service');
+var router = express.Router();
+
+router.get('/', license.isValidDate(), license.hasChat(), controller.index);
+router.get('/me', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.me);
+router.get('/:id/agents', auth.isAuthenticated(), license.hasChat(), controller.showAgents);
+router.get('/:id', license.isValidDate(), license.hasChat(), controller.show);
+router.post('/', license.isValidDate(), license.hasChat(), controller.create);
+router.post('/:id/agents', license.isValidDate(), license.hasChat(), controller.addAgents);
+router.put('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.delete('/:id/agents', license.isValidDate(), license.hasChat(), controller.removeAgents);
+router.patch('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.delete('/', license.isValidDate(), license.hasChat(), controller.bulkDestroy);
+router.delete('/:id', license.isValidDate(), license.hasChat(), controller.destroy);
+
+module.exports = router;
index 85b5cc6..f31fd71 100644 (file)
@@ -1 +1,326 @@
-var _0x1aba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x6D\x6F\x6D\x65\x6E\x74","\x74\x6F\x2D\x63\x73\x76","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6D\x65","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x75\x73\x65\x72\x70\x69\x63","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x55\x73\x65\x72\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x67\x65\x74\x55\x73\x65\x72\x73","\x75\x73\x65\x72\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x73\x70\x72\x65\x61\x64","\x62\x61\x73\x65\x36\x34","\x73\x6F\x72\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x50\x45\x4E","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74","\x20","\x72\x65\x70\x6C\x61\x63\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x74\x65\x78\x74\x2F\x63\x73\x76","\x74\x79\x70\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x54\x79\x70\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x47\x72\x6F\x75\x70\x73","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79"];_0x1aba[0];var _=require(_0x1aba[1]);var md5=require(_0x1aba[2]);var moment=require(_0x1aba[3]);var csv=require(_0x1aba[4]);var Util=require(_0x1aba[5]);var User=require(_0x1aba[7])[_0x1aba[6]];var ChatRoom=require(_0x1aba[7])[_0x1aba[8]];var ChatMessage=require(_0x1aba[7])[_0x1aba[9]];var ChatVisitor=require(_0x1aba[7])[_0x1aba[10]];var UserHasChatRoom=require(_0x1aba[7])[_0x1aba[11]];exports[_0x1aba[12]]=function(_0x7690xb,_0x7690xc,_0x7690xd){return ChatRoom[_0x1aba[27]](_[_0x1aba[26]](Util[_0x1aba[19]](_0x7690xb[_0x1aba[18]]),{include:[{model:User,attributes:[_0x1aba[20],_0x1aba[21],_0x1aba[22],_0x1aba[23],_0x1aba[24],_0x1aba[25]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0x1aba[17]](function(_0x7690xf){_0x7690xc[_0x1aba[16]](200)[_0x1aba[15]](_0x7690xf)})[_0x1aba[14]](function(_0x7690xe){console[_0x1aba[13]](_0x7690xe);return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[28]]=function(_0x7690xb,_0x7690xc){return User[_0x1aba[33]](_0x7690xb[_0x1aba[32]][_0x1aba[20]])[_0x1aba[17]](function(_0x7690x11){return _0x7690x11[_0x1aba[31]]({include:[{model:ChatVisitor,attributes:[_0x1aba[20],_0x1aba[22],_0x1aba[23]]},{model:User,attributes:[_0x1aba[20],_0x1aba[21],_0x1aba[22],_0x1aba[23],_0x1aba[24],_0x1aba[25]]}]})})[_0x1aba[17]](function(_0x7690x10){if(!_0x7690x10){return _0x7690xc[_0x1aba[30]](404)};return _0x7690xc[_0x1aba[15]](_0x7690x10)})[_0x1aba[14]](function(_0x7690xe){console[_0x1aba[29]](_0x7690xe);return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[34]]=function(_0x7690xb,_0x7690xc){return ChatRoom[_0x1aba[33]](_0x7690xb[_0x1aba[35]][_0x1aba[20]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x1aba[20],_0x1aba[23],_0x1aba[22]]},{model:User,attributes:[_0x1aba[20],_0x1aba[23],_0x1aba[21],_0x1aba[22],_0x1aba[36]]}]},{model:User,attributes:[_0x1aba[20],_0x1aba[23],_0x1aba[21],_0x1aba[22]]},{model:ChatVisitor}]})[_0x1aba[17]](function(_0x7690x12){if(!_0x7690x12){return _0x7690xc[_0x1aba[30]](404)};return _0x7690xc[_0x1aba[15]](_0x7690x12)})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[37]]=function(_0x7690xb,_0x7690xc,_0x7690xd){var _0x7690x13;return ChatRoom[_0x1aba[47]]({where:{token:md5(JSON[_0x1aba[45]](_0x7690xb[_0x1aba[18]][_0x1aba[40]][_0x1aba[44]]())).toString(_0x1aba[43])},defaults:{type:_0x1aba[25],token:md5(JSON[_0x1aba[45]](_0x7690xb[_0x1aba[18]][_0x1aba[40]][_0x1aba[44]]())).toString(_0x1aba[43]),status:_0x1aba[46]},include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x1aba[20],_0x1aba[23],_0x1aba[22]]},{model:User,attributes:[_0x1aba[20],_0x1aba[21],_0x1aba[22],_0x1aba[23],_0x1aba[24],_0x1aba[25]]}]},{model:User,attributes:[_0x1aba[20],_0x1aba[21],_0x1aba[22],_0x1aba[23],_0x1aba[24],_0x1aba[25]]}]})[_0x1aba[42]](function(_0x7690x12,_0x7690x15){_0x7690x13=_0x7690x12;if(_0x7690x15){return _0x7690x13[_0x1aba[41]](_0x7690xb[_0x1aba[18]][_0x1aba[40]])}else {return}})[_0x1aba[17]](function(){return _0x7690x13[_0x1aba[39]]()})[_0x1aba[17]](function(_0x7690x14){return _0x7690xc[_0x1aba[16]](200)[_0x1aba[15]](_[_0x1aba[26]](_0x7690x13[_0x1aba[38]],{Users:_0x7690x14}))})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[48]]=function(_0x7690xb,_0x7690xc,_0x7690xd){return ChatRoom[_0x1aba[33]](_0x7690xb[_0x1aba[35]][_0x1aba[20]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x1aba[20],_0x1aba[22]]},{model:User,attributes:[_0x1aba[20],_0x1aba[22]]}]}]})[_0x1aba[17]](function(_0x7690x12){var _0x7690x16=[];_0x7690x12[_0x1aba[55]][_0x1aba[54]](function(_0x7690x17){_0x7690x16[_0x1aba[53]]({name:_0x7690x17[_0x1aba[6]]?_0x7690x17[_0x1aba[6]][_0x1aba[22]]:_0x7690x17[_0x1aba[10]][_0x1aba[22]],text:_0x7690x17[_0x1aba[51]][_0x1aba[50]](/(\r\n|\n|\r)/gm,_0x1aba[49]),date:_0x7690x17[_0x1aba[52]]})});return _0x7690xc[_0x1aba[57]](_0x1aba[56])[_0x1aba[16]](200)[_0x1aba[15]](csv(_0x7690x16))})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[58]]=function(_0x7690xb,_0x7690xc){return User[_0x1aba[33]](_0x7690xb[_0x1aba[32]][_0x1aba[20]])[_0x1aba[17]](function(_0x7690x11){return _0x7690x11[_0x1aba[31]]({where:{type:_0x7690xb[_0x1aba[35]][_0x1aba[57]]},include:[{model:ChatVisitor,attributes:[_0x1aba[20],_0x1aba[22],_0x1aba[23]]}]})})[_0x1aba[17]](function(_0x7690x10){if(!_0x7690x10){return _0x7690xc[_0x1aba[30]](404)};return _0x7690xc[_0x1aba[15]](_0x7690x10)})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[59]]=function(_0x7690xb,_0x7690xc){return User[_0x1aba[33]](_0x7690xb[_0x1aba[32]][_0x1aba[20]])[_0x1aba[17]](function(_0x7690x11){return _0x7690x11[_0x1aba[31]]({include:[{model:ChatVisitor,attributes:[_0x1aba[20],_0x1aba[22],_0x1aba[23]]},{model:User,attributes:[_0x1aba[20],_0x1aba[21],_0x1aba[22],_0x1aba[23],_0x1aba[24],_0x1aba[25]]}]})})[_0x1aba[17]](function(_0x7690x10){if(!_0x7690x10){return _0x7690xc[_0x1aba[30]](404)};return _0x7690xc[_0x1aba[15]](_0x7690x10)})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[60]]=function(_0x7690xb,_0x7690xc){};exports[_0x1aba[61]]=function(_0x7690xb,_0x7690xc){if(_0x7690xb[_0x1aba[51]][_0x1aba[20]]){delete _0x7690xb[_0x1aba[51]][_0x1aba[20]]};return ChatRoom[_0x1aba[33]](_0x7690xb[_0x1aba[35]][_0x1aba[20]])[_0x1aba[17]](function(_0x7690x12){if(!_0x7690x12){return _0x7690xc[_0x1aba[30]](404)};var _0x7690x18=_[_0x1aba[26]](_0x7690x12,_0x7690xb[_0x1aba[51]]);return _0x7690x18[_0x1aba[62]]()})[_0x1aba[17]](function(_0x7690x12){return _0x7690xc[_0x1aba[16]](200)[_0x1aba[15]](_0x7690x12)})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[63]]=function(_0x7690xb,_0x7690xc){var _0x7690x13;if(_0x7690xb[_0x1aba[51]][_0x1aba[20]]){delete _0x7690xb[_0x1aba[51]][_0x1aba[20]]};return ChatRoom[_0x1aba[33]](_0x7690xb[_0x1aba[35]][_0x1aba[20]])[_0x1aba[17]](function(_0x7690x12){if(!_0x7690x12||!_0x7690xb[_0x1aba[51]][_0x1aba[40]]){return _0x7690xc[_0x1aba[30]](404)};return _0x7690x12})[_0x1aba[17]](function(_0x7690x12){return _0x7690x12[_0x1aba[61]]({token:md5(JSON[_0x1aba[45]](_0x7690xb[_0x1aba[51]][_0x1aba[40]][_0x1aba[44]]())).toString(_0x1aba[43])})})[_0x1aba[17]](function(_0x7690x12){_0x7690x13=_0x7690x12;return _0x7690x12[_0x1aba[41]](_0x7690xb[_0x1aba[51]][_0x1aba[40]][_0x1aba[44]](),{individualHooks:true})})[_0x1aba[17]](function(){return _0x7690x13[_0x1aba[39]]()})[_0x1aba[17]](function(_0x7690x14){return _0x7690xc[_0x1aba[16]](200)[_0x1aba[15]](_[_0x1aba[26]](_0x7690x13[_0x1aba[38]],{Users:_0x7690x14,ChatMessages:[]}))})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};exports[_0x1aba[64]]=function(_0x7690xb,_0x7690xc){return ChatRoom[_0x1aba[33]](_0x7690xb[_0x1aba[35]][_0x1aba[20]])[_0x1aba[17]](function(_0x7690x12){if(!_0x7690x12){return _0x7690xc[_0x1aba[30]](404)};return _0x7690x12[_0x1aba[64]]()})[_0x1aba[17]](function(){return _0x7690xc[_0x1aba[30]](204)})[_0x1aba[14]](function(_0x7690xe){return handleError(_0x7690xc,_0x7690xe)})};function handleError(_0x7690xc,_0x7690xe){return _0x7690xc[_0x1aba[16]](500)[_0x1aba[15]](_0x7690xe)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var md5 = require('md5');
+var moment = require('moment');
+var csv = require('to-csv');
+
+var Util = require('../../config/util');
+
+var User = require('../../models').User;
+var ChatRoom = require('../../models').ChatRoom;
+var ChatMessage = require('../../models').ChatMessage;
+var ChatVisitor = require('../../models').ChatVisitor;
+var UserHasChatRoom = require('../../models').UserHasChatRoom;
+
+
+// Get list of chat_rooms
+exports.index = function(req, res, next) {
+  return ChatRoom
+    .findAndCountAll(_.merge(Util.getQuery(req.query), {
+      include: [{
+        model: User,
+        attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
+      }, {
+        model: ChatMessage
+      }, {
+        model: ChatVisitor
+      }]
+    }))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Get list of my chat_rooms
+exports.me = function(req, res) {
+  return User
+    .findById(req.user.id)
+    .then(function(user) {
+      return user
+        .getChatRooms({
+          include: [{
+            model: ChatVisitor,
+            attributes: ['id', 'fullname', 'email']
+          }, {
+            model: User,
+            attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
+          }]
+        });
+    })
+    .then(function(chatRooms) {
+      if (!chatRooms) {
+        return res.sendStatus(404);
+      }
+      return res.send(chatRooms);
+    })
+    .catch(function(err) {
+      console.error(err);
+      return handleError(res, err);
+    });
+};
+
+// Get a single chatRoom
+exports.show = function(req, res) {
+  return ChatRoom
+    .findById(req.params.id, {
+      include: [{
+        model: ChatMessage,
+        include: [{
+          model: ChatVisitor,
+          attributes: ['id', 'email', 'fullname']
+        }, {
+          model: User,
+          attributes: ['id', 'email', 'name', 'fullname', 'userpic']
+        }]
+      }, {
+        model: User,
+        attributes: ['id', 'email', 'name', 'fullname']
+      }, {
+        model: ChatVisitor
+      }]
+    })
+    .then(function(chatRoom) {
+      if (!chatRoom) {
+        return res.sendStatus(404);
+      }
+      return res.send(chatRoom);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single chatRoom by users
+exports.getRoomByUsers = function(req, res, next) {
+
+  var _chatRoom;
+
+  return ChatRoom
+    .findOrCreate({
+      where: {
+        token: md5(JSON.stringify(req.query.users.sort())).toString('base64')
+      },
+      defaults: {
+        type: 'internal',
+        token: md5(JSON.stringify(req.query.users.sort())).toString('base64'),
+        status: 'OPEN'
+      },
+      include: [{
+        model: ChatMessage,
+        include: [{
+          model: ChatVisitor,
+          attributes: ['id', 'email', 'fullname']
+        }, {
+          model: User,
+          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
+        }]
+      }, {
+        model: User,
+        attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
+      }]
+    })
+    .spread(function(chatRoom, created) {
+      _chatRoom = chatRoom;
+      if (created) {
+        return _chatRoom
+          .setUsers(req.query.users);
+      } else {
+        return;
+      }
+    })
+    .then(function() {
+      return _chatRoom
+        .getUsers();
+    })
+    .then(function(users) {
+      return res.status(200).send(_.merge(_chatRoom.dataValues, {
+        Users: users
+      }));
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.export = function(req, res, next) {
+  return ChatRoom
+    .findById(req.params.id, {
+      include: [{
+        model: ChatMessage,
+        include: [{
+          model: ChatVisitor,
+          attributes: ['id', 'fullname']
+        }, {
+          model: User,
+          attributes: ['id', 'fullname']
+        }]
+      }]
+    })
+    .then(function(chatRoom) {
+      var chatMessageForCSV = [];
+      chatRoom.ChatMessages.forEach(function(chatMessage) {
+        chatMessageForCSV.push({
+          name: chatMessage.User ? chatMessage.User.fullname : chatMessage.ChatVisitor.fullname,
+          text: chatMessage.body.replace(/(\r\n|\n|\r)/gm, " "),
+          date: chatMessage.createdAt
+        });
+      });
+      return res.type('text/csv').status(200).send(csv(chatMessageForCSV));
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single chatRoom
+exports.getRoomByType = function(req, res) {
+  return User
+    .findById(req.user.id)
+    .then(function(user) {
+      return user
+        .getChatRooms({
+          where: {
+            type: req.params.type
+          },
+          include: [{
+            model: ChatVisitor,
+            attributes: ['id', 'fullname', 'email']
+          }]
+        });
+    })
+    .then(function(chatRooms) {
+      if (!chatRooms) {
+        return res.sendStatus(404);
+      }
+      return res.send(chatRooms);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single chatRoom
+exports.getRoomGroups = function(req, res) {
+  return User
+    .findById(req.user.id)
+    .then(function(user) {
+      return user
+        .getChatRooms({
+          include: [{
+            model: ChatVisitor,
+            attributes: ['id', 'fullname', 'email']
+          }, {
+            model: User,
+            attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
+          }]
+        });
+    })
+    .then(function(chatRooms) {
+      if (!chatRooms) {
+        return res.sendStatus(404);
+      }
+      return res.send(chatRooms);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new chatRoom in the DB.
+exports.create = function(req, res) {};
+
+// Updates an existing chatRoom in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return ChatRoom
+    .findById(req.params.id)
+    .then(function(chatRoom) {
+      if (!chatRoom) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(chatRoom, req.body);
+      return updated
+        .save();
+    })
+    .then(function(chatRoom) {
+      return res.status(200).send(chatRoom);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing chatRoom in the DB.
+exports.updateUsers = function(req, res) {
+  var _chatRoom;
+
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return ChatRoom
+    .findById(req.params.id)
+    .then(function(chatRoom) {
+      if (!chatRoom || !req.body.users) {
+        return res.sendStatus(404);
+      }
+      return chatRoom;
+    })
+    .then(function(chatRoom) {
+      return chatRoom
+        .update({
+          token: md5(JSON.stringify(req.body.users.sort())).toString('base64')
+        });
+    })
+    .then(function(chatRoom) {
+      _chatRoom = chatRoom;
+      return chatRoom
+        .setUsers(req.body.users.sort(), {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return _chatRoom
+        .getUsers();
+    })
+    .then(function(users) {
+      return res.status(200).send(_.merge(_chatRoom.dataValues, {
+        Users: users,
+        ChatMessages: []
+      }));
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a chatRoom from the DB.
+exports.destroy = function(req, res) {
+  return ChatRoom
+    .findById(req.params.id)
+    .then(function(chatRoom) {
+      if (!chatRoom) {
+        return res.sendStatus(404);
+      }
+      return chatRoom
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index ba67872..2f75a98 100644 (file)
@@ -1 +1,30 @@
-var _0xb1ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0xb1ae[0];var User=require(_0xb1ae[2])[_0xb1ae[1]];var ChatRoom=require(_0xb1ae[2])[_0xb1ae[3]];var ChatMessage=require(_0xb1ae[2])[_0xb1ae[4]];var ChatVisitor=require(_0xb1ae[2])[_0xb1ae[5]];exports[_0xb1ae[6]]=function(_0xb84ax5){ChatRoom[_0xb1ae[7]](function(_0xb84ax6){onSave(_0xb84ax5,_0xb84ax6)});ChatRoom[_0xb1ae[8]](function(_0xb84ax6){onSave(_0xb84ax5,_0xb84ax6)});ChatRoom[_0xb1ae[9]](function(_0xb84ax6){onRemove(_0xb84ax5,_0xb84ax6)})};function onSave(_0xb84ax5,_0xb84ax6,_0xb84ax8){_0xb84ax5[_0xb1ae[11]](_0xb1ae[10],_0xb84ax6)}function onRemove(_0xb84ax5,_0xb84ax6,_0xb84ax8){_0xb84ax5[_0xb1ae[11]](_0xb1ae[12],_0xb84ax6)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var User = require('../../models').User;
+var ChatRoom = require('../../models').ChatRoom;
+var ChatMessage = require('../../models').ChatMessage;
+var ChatVisitor = require('../../models').ChatVisitor;
+
+exports.register = function (socket) {
+  ChatRoom.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  ChatRoom.afterUpdate(function (doc) {
+    onSave(socket, doc);
+  });
+  ChatRoom.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('chat_room:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_room:remove', doc);
+}
index b8b833e..731381f 100644 (file)
@@ -1 +1,22 @@
-var _0xcd8c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6D\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x6D\x65","\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x55\x73\x65\x72\x73","\x2F\x67\x72\x6F\x75\x70\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x47\x72\x6F\x75\x70\x73","\x2F\x74\x79\x70\x65\x2F\x3A\x74\x79\x70\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x54\x79\x70\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x65\x78\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65\x55\x73\x65\x72\x73","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xcd8c[0];var express=require(_0xcd8c[1]);var controller=require(_0xcd8c[2]);var auth=require(_0xcd8c[3]);var license=require(_0xcd8c[4]);var router=express.Router();router[_0xcd8c[9]](_0xcd8c[5],license[_0xcd8c[6]](),license[_0xcd8c[7]](),controller[_0xcd8c[8]]);router[_0xcd8c[9]](_0xcd8c[10],license[_0xcd8c[6]](),license[_0xcd8c[7]](),auth[_0xcd8c[11]](),controller[_0xcd8c[12]]);router[_0xcd8c[9]](_0xcd8c[13],license[_0xcd8c[6]](),license[_0xcd8c[7]](),auth[_0xcd8c[11]](),controller[_0xcd8c[14]]);router[_0xcd8c[9]](_0xcd8c[15],license[_0xcd8c[6]](),license[_0xcd8c[7]](),auth[_0xcd8c[11]](),controller[_0xcd8c[16]]);router[_0xcd8c[9]](_0xcd8c[17],license[_0xcd8c[6]](),license[_0xcd8c[7]](),auth[_0xcd8c[11]](),controller[_0xcd8c[18]]);router[_0xcd8c[9]](_0xcd8c[19],license[_0xcd8c[6]](),license[_0xcd8c[7]](),controller[_0xcd8c[20]]);router[_0xcd8c[9]](_0xcd8c[21],license[_0xcd8c[6]](),license[_0xcd8c[7]](),controller[_0xcd8c[22]]);router[_0xcd8c[24]](_0xcd8c[5],license[_0xcd8c[6]](),license[_0xcd8c[7]](),auth[_0xcd8c[11]](),controller[_0xcd8c[23]]);router[_0xcd8c[26]](_0xcd8c[19],license[_0xcd8c[6]](),license[_0xcd8c[7]](),controller[_0xcd8c[25]]);router[_0xcd8c[26]](_0xcd8c[27],license[_0xcd8c[6]](),license[_0xcd8c[7]](),controller[_0xcd8c[28]]);router[_0xcd8c[29]](_0xcd8c[19],license[_0xcd8c[6]](),license[_0xcd8c[7]](),controller[_0xcd8c[25]]);router[_0xcd8c[31]](_0xcd8c[19],license[_0xcd8c[6]](),license[_0xcd8c[7]](),controller[_0xcd8c[30]]);module[_0xcd8c[32]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./chat_room.controller');
+var auth = require('../../auth/auth.service');
+var license = require('../../config/license/license.service');
+var router = express.Router();
+
+router.get('/', license.isValidDate(), license.hasChat(), controller.index);
+router.get('/me', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.me);
+router.get('/users', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.getRoomByUsers);
+router.get('/groups', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.getRoomGroups);
+router.get('/type/:type', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.getRoomByType);
+router.get('/:id', license.isValidDate(), license.hasChat(), controller.show);
+router.get('/:id/export', license.isValidDate(), license.hasChat(), controller.export);
+router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.create);
+router.put('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.put('/:id/users', license.isValidDate(), license.hasChat(), controller.updateUsers);
+router.patch('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.delete('/:id', license.isValidDate(), license.hasChat(), controller.destroy);
+
+module.exports = router;
index f0e6aad..38e5d14 100644 (file)
@@ -1 +1,104 @@
-var _0x8ae8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x69\x6E\x64\x65\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x8ae8[0];var _=require(_0x8ae8[1]);var Util=require(_0x8ae8[2]);var ChatVisitor=require(_0x8ae8[4])[_0x8ae8[3]];var ChatEnquiry=require(_0x8ae8[4])[_0x8ae8[5]];var ChatWebsite=require(_0x8ae8[4])[_0x8ae8[6]];exports[_0x8ae8[7]]=function(_0xe75ex6,_0xe75ex7,_0xe75ex8){return ChatVisitor[_0x8ae8[16]](_[_0x8ae8[15]](Util[_0x8ae8[14]](_0xe75ex6[_0x8ae8[13]]),{include:[{model:ChatWebsite}]}))[_0x8ae8[12]](function(_0xe75exa){_0xe75ex7[_0x8ae8[11]](200)[_0x8ae8[10]](_0xe75exa)})[_0x8ae8[9]](function(_0xe75ex9){console[_0x8ae8[8]](_0xe75ex9);return handleError(_0xe75ex7,_0xe75ex9)})};exports[_0x8ae8[17]]=function(_0xe75ex6,_0xe75ex7){return ChatVisitor[_0x8ae8[21]](_0xe75ex6[_0x8ae8[20]][_0x8ae8[19]],{include:[{model:ChatEnquiry},{model:ChatWebsite}]})[_0x8ae8[12]](function(_0xe75exb){if(!_0xe75exb){return _0xe75ex7[_0x8ae8[18]](404)};return _0xe75ex7[_0x8ae8[10]](_0xe75exb)})[_0x8ae8[9]](function(_0xe75ex9){return handleError(_0xe75ex7,_0xe75ex9)})};exports[_0x8ae8[22]]=function(_0xe75ex6,_0xe75ex7){return ChatVisitor[_0x8ae8[22]](_0xe75ex6[_0x8ae8[23]])[_0x8ae8[12]](function(_0xe75exb){return _0xe75ex7[_0x8ae8[11]](201)[_0x8ae8[10]](_0xe75exb)})[_0x8ae8[9]](function(_0xe75ex9){return handleError(_0xe75ex7,_0xe75ex9)})};exports[_0x8ae8[24]]=function(_0xe75ex6,_0xe75ex7){if(_0xe75ex6[_0x8ae8[23]][_0x8ae8[19]]){delete _0xe75ex6[_0x8ae8[23]][_0x8ae8[19]]};return ChatVisitor[_0x8ae8[21]](_0xe75ex6[_0x8ae8[20]][_0x8ae8[19]])[_0x8ae8[12]](function(_0xe75exb){if(!_0xe75exb){return _0xe75ex7[_0x8ae8[18]](404)};var _0xe75exc=_[_0x8ae8[15]](_0xe75exb,_0xe75ex6[_0x8ae8[23]]);return _0xe75exc[_0x8ae8[25]]()})[_0x8ae8[12]](function(_0xe75exb){return _0xe75ex7[_0x8ae8[11]](200)[_0x8ae8[10]](_0xe75exb)})[_0x8ae8[9]](function(_0xe75ex9){return handleError(_0xe75ex7,_0xe75ex9)})};exports[_0x8ae8[26]]=function(_0xe75ex6,_0xe75ex7){return ChatVisitor[_0x8ae8[21]](_0xe75ex6[_0x8ae8[20]][_0x8ae8[19]])[_0x8ae8[12]](function(_0xe75exb){if(!_0xe75exb){return _0xe75ex7[_0x8ae8[18]](404)};return _0xe75exb[_0x8ae8[26]]()})[_0x8ae8[12]](function(){return _0xe75ex7[_0x8ae8[18]](204)})[_0x8ae8[9]](function(_0xe75ex9){return handleError(_0xe75ex7,_0xe75ex9)})};function handleError(_0xe75ex7,_0xe75ex9){return _0xe75ex7[_0x8ae8[11]](500)[_0x8ae8[10]](_0xe75ex9)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var ChatVisitor = require('../../models').ChatVisitor;
+var ChatEnquiry = require('../../models').ChatEnquiry;
+var ChatWebsite = require('../../models').ChatWebsite;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return ChatVisitor
+    .findAndCountAll(_.merge(Util.getQuery(req.query), {
+      include: [{
+        model: ChatWebsite
+      }]
+    }))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.error(err);
+      return handleError(res, err);
+    });
+};
+
+// Get a single chatVisitor
+exports.show = function(req, res) {
+  return ChatVisitor
+    .findById(req.params.id, {
+      include: [{
+        model: ChatEnquiry
+      }, {
+        model: ChatWebsite
+      }]
+    })
+    .then(function(chatVisitor) {
+      if (!chatVisitor) {
+        return res.sendStatus(404);
+      }
+      return res.send(chatVisitor);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new chatVisitor in the DB.
+exports.create = function(req, res) {
+  return ChatVisitor
+    .create(req.body)
+    .then(function(chatVisitor) {
+      return res.status(201).send(chatVisitor);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing chatVisitor in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ChatVisitor
+    .findById(req.params.id)
+    .then(function(chatVisitor) {
+      if (!chatVisitor) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(chatVisitor, req.body);
+      return updated
+        .save();
+    })
+    .then(function(chatVisitor) {
+      return res.status(200).send(chatVisitor);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a chatVisitor from the DB.
+exports.destroy = function(req, res) {
+  return ChatVisitor
+    .findById(req.params.id)
+    .then(function(chatVisitor) {
+      if (!chatVisitor) {
+        return res.sendStatus(404);
+      }
+      return chatVisitor
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 5e6fd5d..a283bfc 100644 (file)
@@ -1 +1,27 @@
-var _0x40fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x3A\x72\x65\x6D\x6F\x76\x65"];_0x40fb[0];var chat_visitor=require(_0x40fb[2])[_0x40fb[1]];exports[_0x40fb[3]]=function(_0x960fx2){chat_visitor[_0x40fb[4]](function(_0x960fx3){onSave(_0x960fx2,_0x960fx3)});chat_visitor[_0x40fb[5]](function(_0x960fx3){onSave(_0x960fx2,_0x960fx3)});chat_visitor[_0x40fb[6]](function(_0x960fx3){onRemove(_0x960fx2,_0x960fx3)})};function onSave(_0x960fx2,_0x960fx3,_0x960fx5){_0x960fx2[_0x40fb[8]](_0x40fb[7],_0x960fx3)}function onRemove(_0x960fx2,_0x960fx3,_0x960fx5){_0x960fx2[_0x40fb[8]](_0x40fb[9],_0x960fx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var chat_visitor = require('../../models').ChatVisitor;
+
+exports.register = function(socket) {
+  chat_visitor.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  chat_visitor.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  chat_visitor.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('chat_visitor:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_visitor:remove', doc);
+}
index f305765..c58a917 100644 (file)
@@ -1 +1,15 @@
-var _0xf28b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf28b[0];var express=require(_0xf28b[1]);var controller=require(_0xf28b[2]);var license=require(_0xf28b[3]);var router=express.Router();router[_0xf28b[8]](_0xf28b[4],license[_0xf28b[5]](),license[_0xf28b[6]](),controller[_0xf28b[7]]);router[_0xf28b[8]](_0xf28b[9],license[_0xf28b[5]](),license[_0xf28b[6]](),controller[_0xf28b[10]]);router[_0xf28b[12]](_0xf28b[4],license[_0xf28b[5]](),license[_0xf28b[6]](),controller[_0xf28b[11]]);router[_0xf28b[14]](_0xf28b[9],license[_0xf28b[5]](),license[_0xf28b[6]](),controller[_0xf28b[13]]);router[_0xf28b[15]](_0xf28b[9],license[_0xf28b[5]](),license[_0xf28b[6]](),controller[_0xf28b[13]]);router[_0xf28b[17]](_0xf28b[9],license[_0xf28b[5]](),license[_0xf28b[6]](),controller[_0xf28b[16]]);module[_0xf28b[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./chat_visitor.controller');
+var license = require('../../config/license/license.service');
+var router = express.Router();
+
+router.get('/', license.isValidDate(), license.hasChat(), controller.index);
+router.get('/:id', license.isValidDate(), license.hasChat(), controller.show);
+router.post('/', license.isValidDate(), license.hasChat(), controller.create);
+router.put('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.patch('/:id', license.isValidDate(), license.hasChat(), controller.update);
+router.delete('/:id', license.isValidDate(), license.hasChat(), controller.destroy);
+
+module.exports = router;
index 79f2738..084d688 100644 (file)
@@ -1 +1,383 @@
-var _0x2496=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x6D\x75\x73\x74\x61\x63\x68\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x73\x6E\x69\x70\x70\x65\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x78\x63\x68\x61\x74\x74\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x6F\x67","\x6C\x65\x6E\x67\x74\x68","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74\x43\x6F\x64\x65","\x72\x65\x6D\x6F\x74\x65","\x72\x65\x6E\x64\x65\x72","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x77\x65\x62\x73\x69\x74\x65\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x67\x65\x74\x46\x6F\x72\x6D\x73","\x6A\x73\x6F\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x74\x79\x70\x65","\x73\x63\x6F\x70\x65","\x75\x70\x64\x61\x74\x65\x46\x6F\x72\x6D\x73","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x6E\x6C\x69\x6E\x65\x49\x64","\x6F\x66\x66\x6C\x69\x6E\x65","\x4F\x66\x66\x6C\x69\x6E\x65\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x70\x61\x63\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x75\x70\x64\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E"];_0x2496[0];var _=require(_0x2496[1]);var util=require(_0x2496[2]);var async=require(_0x2496[3]);var Mustache=require(_0x2496[4]);var Util=require(_0x2496[5]);var sequelize=require(_0x2496[7])[_0x2496[6]];var ChatWebsite=require(_0x2496[7])[_0x2496[8]];var ChatQueue=require(_0x2496[7])[_0x2496[9]];var User=require(_0x2496[7])[_0x2496[10]];var ChatApplication=require(_0x2496[7])[_0x2496[11]];var ChatWebsitesField=require(_0x2496[7])[_0x2496[12]];var ChatProactiveAction=require(_0x2496[7])[_0x2496[13]];var snippet=require(_0x2496[15])[_0x2496[14]];exports[_0x2496[16]]=function(_0xd545xe,_0xd545xf,_0xd545x10){return ChatWebsite[_0x2496[23]](Util[_0x2496[22]](_0xd545xe[_0x2496[21]]))[_0x2496[20]](function(_0xd545x12){_0xd545xf[_0x2496[19]](200)[_0x2496[18]](_0xd545x12)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[24]]=function(_0xd545xe,_0xd545xf){return ChatWebsite[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[26]])[_0x2496[20]](function(_0xd545x13){if(!_0xd545x13){return _0xd545xf[_0x2496[25]](404)};return _0xd545xf[_0x2496[18]](_0xd545x13)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[29]]=function(_0xd545xe,_0xd545xf,_0xd545x10){return ChatWebsite[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[26]])[_0x2496[20]](function(_0xd545x15){if(!_0xd545x15){return _0xd545xf[_0x2496[25]](404)};return _0xd545x15[_0x2496[34]](_[_0x2496[33]](Util[_0x2496[22]](_0xd545xe[_0x2496[21]]),{include:[{model:ChatQueue,attributes:[_0x2496[26],_0x2496[32]]},{model:User,attributes:[_0x2496[26],_0x2496[32]]}]}))})[_0x2496[20]](function(_0xd545x14){return _0xd545xf[_0x2496[18]]({count:_0xd545x14[_0x2496[31]],rows:_0xd545x14})})[_0x2496[17]](function(_0xd545x11){console[_0x2496[30]](_0xd545x11);return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[35]]=function(_0xd545xe,_0xd545xf,_0xd545x10){return ChatWebsite[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[26]])[_0x2496[20]](function(_0xd545x15){if(!_0xd545x15){return _0xd545xf[_0x2496[25]](404)};return _0xd545x15[_0x2496[36]](Util[_0x2496[22]](_0xd545xe[_0x2496[21]]))})[_0x2496[20]](function(_0xd545x16){return _0xd545xf[_0x2496[18]]({count:_0xd545x16[_0x2496[31]],rows:_0xd545x16})})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[37]]=function(_0xd545xe,_0xd545xf){return ChatWebsite[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[26]])[_0x2496[20]](function(_0xd545x13){var _0xd545x17={remote:_0xd545x13[_0x2496[38]],websiteId:_0xd545xe[_0x2496[27]][_0x2496[26]]};var _0xd545x18=Mustache[_0x2496[39]](snippet,_0xd545x17);return _0xd545xf[_0x2496[19]](200)[_0x2496[18]]({html:_0xd545x18})})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[40]]=function(_0xd545xe,_0xd545xf){return ChatWebsite[_0x2496[40]](_0xd545xe[_0x2496[41]])[_0x2496[20]](function(_0xd545x13){return _0xd545xf[_0x2496[19]](201)[_0x2496[18]](_0xd545x13)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[42]]=function(_0xd545xe,_0xd545xf){if(_0xd545xe[_0x2496[41]][_0x2496[26]]){delete _0xd545xe[_0x2496[41]][_0x2496[26]]};return ChatWebsite[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[26]])[_0x2496[20]](function(_0xd545x13){if(!_0xd545x13){return _0xd545xf[_0x2496[25]](404)};return _0xd545x13[_0x2496[42]](_0xd545xe[_0x2496[41]])[_0x2496[20]](function(_0xd545x13){return _0xd545xf[_0x2496[19]](200)[_0x2496[18]](_0xd545x13)})})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[43]]=function(_0xd545xe,_0xd545xf){var _0xd545x19=0;var _0xd545x1a=_0xd545xe[_0x2496[41]];_0xd545x1a[_0x2496[47]](function(_0xd545x1b){delete _0xd545x1b[_0x2496[26]];delete _0xd545x1b[_0x2496[44]];delete _0xd545x1b[_0x2496[45]];_0xd545x1b[_0x2496[46]]= ++_0xd545x19});return sequelize[_0x2496[50]](function(_0xd545x1c){return ChatApplication[_0x2496[49]]({where:{ChatWebsiteId:_0xd545xe[_0x2496[27]][_0x2496[26]]},individualHooks:true,transaction:_0xd545x1c})[_0x2496[20]](function(){return ChatApplication[_0x2496[48]](_0xd545x1a,{individualHooks:true,transaction:_0xd545x1c})})})[_0x2496[20]](function(_0xd545x14){return _0xd545xf[_0x2496[19]](200)[_0x2496[18]]({count:_0xd545x14[_0x2496[31]],rows:_0xd545x14})})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[49]]=function(_0xd545xe,_0xd545xf){return ChatWebsite[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[26]])[_0x2496[20]](function(_0xd545x13){if(!_0xd545x13){return _0xd545xf[_0x2496[25]](404)};return _0xd545x13[_0x2496[49]]()})[_0x2496[20]](function(){return _0xd545xf[_0x2496[25]](204)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[51]]=function(_0xd545xe,_0xd545xf){return ChatWebsite[_0x2496[49]]({where:{id:_0xd545xe[_0x2496[21]][_0x2496[52]]},individualHooks:true})[_0x2496[20]](function(){return _0xd545xf[_0x2496[25]](204)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[53]]=function(_0xd545xe,_0xd545xf){return ChatApplication[_0x2496[49]]({where:{id:_0xd545xe[_0x2496[21]][_0x2496[54]]},individualHooks:true})[_0x2496[20]](function(){return _0xd545xf[_0x2496[25]](204)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[55]]=function(_0xd545xe,_0xd545xf,_0xd545x10){return ChatApplication[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[56]])[_0x2496[20]](function(_0xd545x1d){if(!_0xd545x1d){return _0xd545xf[_0x2496[25]](404)};return _0xd545x1d[_0x2496[49]]()})[_0x2496[20]](function(){return _0xd545xf[_0x2496[25]](204)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[57]]=function(_0xd545xe,_0xd545xf){return ChatWebsitesField[_0x2496[61]]({method:[_0xd545xe[_0x2496[27]][_0x2496[60]],_0xd545xe[_0x2496[27]][_0x2496[26]]]})[_0x2496[59]]()[_0x2496[20]](function(_0xd545x1e){return _0xd545xf[_0x2496[19]](200)[_0x2496[58]](_0xd545x1e)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[62]]=function(_0xd545xe,_0xd545xf,_0xd545x10){return ChatWebsitesField[_0x2496[49]]({where:_0xd545xe[_0x2496[27]][_0x2496[60]]===_0x2496[63]?{OnlineId:_0xd545xe[_0x2496[27]][_0x2496[26]]}:{OfflineId:_0xd545xe[_0x2496[27]][_0x2496[26]]}})[_0x2496[20]](function(){_[_0x2496[47]](_0xd545xe[_0x2496[41]],function(_0xd545x20){if(_0xd545xe[_0x2496[27]][_0x2496[60]]===_0x2496[63]){_0xd545x20[_0x2496[64]]=_0xd545xe[_0x2496[27]][_0x2496[26]]}else {if(_0xd545xe[_0x2496[27]][_0x2496[60]]===_0x2496[65]){_0xd545x20[_0x2496[66]]=_0xd545xe[_0x2496[27]][_0x2496[26]]}}});return ChatWebsitesField[_0x2496[48]](_0xd545xe[_0x2496[41]])})[_0x2496[20]](function(_0xd545x1f){_0xd545xf[_0x2496[19]](201)[_0x2496[58]](_0xd545x1f)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[67]]=function(_0xd545xe,_0xd545xf){return ChatProactiveAction[_0x2496[49]]({where:{id:_0xd545xe[_0x2496[21]][_0x2496[54]]},individualHooks:true})[_0x2496[20]](function(){return _0xd545xf[_0x2496[25]](204)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[68]]=function(_0xd545xe,_0xd545xf,_0xd545x10){return ChatProactiveAction[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[69]])[_0x2496[20]](function(_0xd545x21){if(!_0xd545x21){return _0xd545xf[_0x2496[25]](404)};return _0xd545x21[_0x2496[49]]()})[_0x2496[20]](function(){return _0xd545xf[_0x2496[25]](204)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[70]]=function(_0xd545xe,_0xd545xf,_0xd545x10){return ChatWebsite[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[26]])[_0x2496[20]](function(_0xd545x15){if(!_0xd545x15){return _0xd545xf[_0x2496[25]](404)};_0xd545xe[_0x2496[41]][_0x2496[71]]=_0xd545x15[_0x2496[26]];return ChatProactiveAction[_0x2496[40]](_0xd545xe[_0x2496[41]])})[_0x2496[20]](function(_0xd545x21){return _0xd545xf[_0x2496[19]](201)[_0x2496[18]](_0xd545x21)})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};exports[_0x2496[72]]=function(_0xd545xe,_0xd545xf){if(_0xd545xe[_0x2496[41]][_0x2496[26]]){delete _0xd545xe[_0x2496[41]][_0x2496[26]]};return ChatProactiveAction[_0x2496[28]](_0xd545xe[_0x2496[27]][_0x2496[69]])[_0x2496[20]](function(_0xd545x21){if(!_0xd545x21){return _0xd545xf[_0x2496[25]](404)};return _0xd545x21[_0x2496[42]](_0xd545xe[_0x2496[41]])[_0x2496[20]](function(_0xd545x21){console[_0x2496[30]](_0xd545x21);return _0xd545xf[_0x2496[19]](200)[_0x2496[18]](_0xd545x21)})})[_0x2496[17]](function(_0xd545x11){return handleError(_0xd545xf,_0xd545x11)})};function handleError(_0xd545xf,_0xd545x11){return _0xd545xf[_0x2496[19]](500)[_0x2496[18]](_0xd545x11)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var async = require('async');
+var Mustache = require('mustache');
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var ChatWebsite = require('../../models').ChatWebsite;
+var ChatQueue = require('../../models').ChatQueue;
+var User = require('../../models').User;
+var ChatApplication = require('../../models').ChatApplication;
+var ChatWebsitesField = require('../../models').ChatWebsitesField;
+var ChatProactiveAction = require('../../models').ChatProactiveAction;
+var snippet = require('../../components/xchatty').snippet;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return ChatWebsite
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Get a single chat_website
+exports.show = function(req, res) {
+  return ChatWebsite
+    .findById(req.params.id)
+    .then(function(chat_website) {
+      if (!chat_website) {
+        return res.sendStatus(404);
+      }
+      return res.send(chat_website);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailAccount
+exports.showApplications = function(req, res, next) {
+  return ChatWebsite
+    // .scope('default')
+    .findById(req.params.id)
+    .then(function(chatWebsite) {
+      if (!chatWebsite) {
+        return res.sendStatus(404);
+      }
+      return chatWebsite
+        .getChatApplications(_.merge(Util.getQuery(req.query), {
+          include: [{
+            model: ChatQueue,
+            attributes: ['id', 'name']
+          }, {
+            model: User,
+            attributes: ['id', 'name']
+          }]
+        }));
+    })
+    .then(function(chatApplications) {
+      return res.send({
+        count: chatApplications.length,
+        rows: chatApplications
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.showProactiveActions = function(req, res, next) {
+  return ChatWebsite
+    .findById(req.params.id)
+    .then(function(chatWebsite) {
+      if (!chatWebsite) {
+        return res.sendStatus(404);
+      }
+      return chatWebsite
+        .getChatProactiveActions(Util.getQuery(req.query));
+    })
+    .then(function(chatProactiveActions) {
+      return res.send({
+        count: chatProactiveActions.length,
+        rows: chatProactiveActions
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a snippet for chat_website
+exports.getSnippetCode = function(req, res) {
+  return ChatWebsite
+    .findById(req.params.id)
+    .then(function(chat_website) {
+      var configSnippet = {
+        remote: chat_website.remote,
+        websiteId: req.params.id
+      };
+      var html = Mustache.render(snippet, configSnippet);
+      return res.status(200).send({
+        html: html
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new chat_website in the DB.
+exports.create = function(req, res) {
+  return ChatWebsite
+    .create(req.body)
+    .then(function(chat_website) {
+      return res.status(201).send(chat_website);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing chat_website in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return ChatWebsite
+    .findById(req.params.id)
+    .then(function(chat_website) {
+      if (!chat_website) {
+        return res.sendStatus(404);
+      }
+
+      return chat_website
+        .update(req.body)
+        .then(function(chat_website) {
+          return res.status(200).send(chat_website);
+        })
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing mailAccount in the DB.
+exports.updateApplications = function(req, res) {
+
+  var priority = 0;
+  var apps = req.body;
+
+  apps.forEach(function(app) {
+    delete app.id;
+    delete app.createdAt;
+    delete app.updatedAt;
+
+    app.priority = ++priority;
+  });
+
+  return sequelize.transaction(function(t) {
+    return ChatApplication
+      .destroy({
+        where: {
+          ChatWebsiteId: req.params.id
+        },
+        individualHooks: true,
+        transaction: t
+      }).then(function() {
+        return ChatApplication
+          .bulkCreate(apps, {
+            individualHooks: true,
+            transaction: t
+          });
+      });
+  }).then(function(chatApplications) {
+    return res.status(200).send({
+      count: chatApplications.length,
+      rows: chatApplications
+    });
+  }).catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+// Deletes a chat_website from the DB.
+exports.destroy = function(req, res) {
+  return ChatWebsite
+    .findById(req.params.id)
+    .then(function(chat_website) {
+      if (!chat_website) {
+        return res.sendStatus(404);
+      }
+      return chat_website
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return ChatWebsite
+    .destroy({
+      where: {
+        id: req.query.websites
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroyApplications = function(req, res) {
+  return ChatApplication
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailAccount from the DB.
+exports.destroyApplication = function(req, res, next) {
+  return ChatApplication
+    .findById(req.params.appId)
+    .then(function(mailApplication) {
+      if (!mailApplication) {
+        return res.sendStatus(404);
+      }
+
+      return mailApplication
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.getForms = function(req, res) {
+  return ChatWebsitesField
+    .scope({
+      method: [req.params.type, req.params.id]
+    })
+    .findAll()
+    .then(function(data) {
+      return res.status(200).json(data);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+}
+
+exports.updateForms = function(req, res, next) {
+  return ChatWebsitesField
+    .destroy({
+      where: req.params.type === 'online' ? {
+        OnlineId: req.params.id
+      } : {
+        OfflineId: req.params.id
+      }
+    })
+    .then(function() {
+      _.forEach(req.body, function(value) {
+        if (req.params.type === 'online') {
+          value.OnlineId = req.params.id;
+        } else if (req.params.type === 'offline') {
+          value.OfflineId = req.params.id;
+        }
+      });
+      return ChatWebsitesField.bulkCreate(req.body);
+    })
+    .then(function(fields) {
+      res.status(201).json(fields);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+}
+
+exports.bulkDestroyProactiveActions = function(req, res) {
+  return ChatProactiveAction
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailAccount from the DB.
+exports.destroyProactiveAction = function(req, res, next) {
+  return ChatProactiveAction
+    .findById(req.params.pactionId)
+    .then(function(chatProactiveAction) {
+      if (!chatProactiveAction) {
+        return res.sendStatus(404);
+      }
+      return chatProactiveAction.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.createProactiveAction = function(req, res, next) {
+  return ChatWebsite
+    .findById(req.params.id)
+    .then(function(chatWebsite) {
+      if (!chatWebsite) {
+        return res.sendStatus(404);
+      }
+      req.body.ChatWebsiteId = chatWebsite.id;
+      return ChatProactiveAction.create(req.body);
+    })
+    .then(function(chatProactiveAction) {
+      return res.status(201).send(chatProactiveAction);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.updateProactiveAction = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return ChatProactiveAction
+    .findById(req.params.pactionId)
+    .then(function(chatProactiveAction) {
+      if (!chatProactiveAction) {
+        return res.sendStatus(404);
+      }
+
+      return chatProactiveAction
+        .update(req.body)
+        .then(function(chatProactiveAction) {
+          console.log(chatProactiveAction);
+          return res.status(200).send(chatProactiveAction);
+        })
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index a7ef256..49f62d6 100644 (file)
@@ -1 +1,24 @@
-var _0x8bdb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x8bdb[0];var chat_website=require(_0x8bdb[2])[_0x8bdb[1]];exports[_0x8bdb[3]]=function(_0xc349x2){chat_website[_0x8bdb[4]](function(_0xc349x3){onSave(_0xc349x2,_0xc349x3)});chat_website[_0x8bdb[5]](function(_0xc349x3){onRemove(_0xc349x2,_0xc349x3)})};function onSave(_0xc349x2,_0xc349x3,_0xc349x5){_0xc349x2[_0x8bdb[7]](_0x8bdb[6],_0xc349x3)}function onRemove(_0xc349x2,_0xc349x3,_0xc349x5){_0xc349x2[_0x8bdb[7]](_0x8bdb[8],_0xc349x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var chat_website = require('../../models').ChatWebsite;
+
+exports.register = function(socket) {
+  chat_website.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  chat_website.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('chat_website:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_website:remove', doc);
+}
index f652ed3..b7d89c0 100644 (file)
@@ -1 +1,29 @@
-var _0x2194=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65","\x73\x68\x6F\x77\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x74\x79\x70\x65","\x67\x65\x74\x46\x6F\x72\x6D\x73","\x2F\x3A\x69\x64\x2F\x73\x6E\x69\x70\x70\x65\x74","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74\x43\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x2F\x3A\x70\x61\x63\x74\x69\x6F\x6E\x49\x64","\x75\x70\x64\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x46\x6F\x72\x6D\x73","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x2194[0];var express=require(_0x2194[1]);var controller=require(_0x2194[2]);var auth=require(_0x2194[3]);var license=require(_0x2194[4]);var router=express.Router();router[_0x2194[8]](_0x2194[5],auth[_0x2194[6]](),controller[_0x2194[7]]);router[_0x2194[8]](_0x2194[9],auth[_0x2194[6]](),controller[_0x2194[10]]);router[_0x2194[8]](_0x2194[11],auth[_0x2194[6]](),controller[_0x2194[12]]);router[_0x2194[8]](_0x2194[13],auth[_0x2194[6]](),controller[_0x2194[14]]);router[_0x2194[8]](_0x2194[15],auth[_0x2194[6]](),controller[_0x2194[16]]);router[_0x2194[8]](_0x2194[17],auth[_0x2194[6]](),controller[_0x2194[18]]);router[_0x2194[20]](_0x2194[5],auth[_0x2194[6]](),controller[_0x2194[19]]);router[_0x2194[20]](_0x2194[13],auth[_0x2194[6]](),controller[_0x2194[21]]);router[_0x2194[23]](_0x2194[9],auth[_0x2194[6]](),controller[_0x2194[22]]);router[_0x2194[23]](_0x2194[11],auth[_0x2194[6]](),controller[_0x2194[24]]);router[_0x2194[23]](_0x2194[25],auth[_0x2194[6]](),controller[_0x2194[26]]);router[_0x2194[23]](_0x2194[15],auth[_0x2194[6]](),controller[_0x2194[27]]);router[_0x2194[28]](_0x2194[9],auth[_0x2194[6]](),controller[_0x2194[22]]);router[_0x2194[30]](_0x2194[5],auth[_0x2194[6]](),controller[_0x2194[29]]);router[_0x2194[30]](_0x2194[9],auth[_0x2194[6]](),controller[_0x2194[31]]);router[_0x2194[30]](_0x2194[11],auth[_0x2194[6]](),controller[_0x2194[32]]);router[_0x2194[30]](_0x2194[13],auth[_0x2194[6]](),controller[_0x2194[33]]);router[_0x2194[30]](_0x2194[34],auth[_0x2194[6]](),controller[_0x2194[35]]);router[_0x2194[30]](_0x2194[25],auth[_0x2194[6]](),controller[_0x2194[36]]);module[_0x2194[37]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./chat_website.controller');
+var auth = require('../../auth/auth.service');
+var license = require('../../config/license/license.service');
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/applications', auth.isAuthenticated(), controller.showApplications);
+router.get('/:id/proactive', auth.isAuthenticated(), controller.showProactiveActions);
+router.get('/:id/fields/:type', auth.isAuthenticated(), controller.getForms);
+router.get('/:id/snippet', auth.isAuthenticated(), controller.getSnippetCode);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/proactive', auth.isAuthenticated(), controller.createProactiveAction);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.put('/:id/applications', auth.isAuthenticated(), controller.updateApplications);
+router.put('/:id/proactive/:pactionId', auth.isAuthenticated(), controller.updateProactiveAction);
+router.put('/:id/fields/:type', auth.isAuthenticated(), controller.updateForms);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:id/applications', auth.isAuthenticated(), controller.bulkDestroyApplications);
+router.delete('/:id/proactive', auth.isAuthenticated(), controller.bulkDestroyProactiveActions);
+router.delete('/:id/applications/:appId', auth.isAuthenticated(), controller.destroyApplication);
+router.delete('/:id/proactive/:pactionId', auth.isAuthenticated(), controller.destroyProactiveAction);
+
+module.exports = router;
index 32c19a7..78c9c47 100644 (file)
@@ -1 +1,112 @@
-var _0xab7c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xab7c[0];var _=require(_0xab7c[1]);var Util=require(_0xab7c[2]);var ChatWebsitesField=require(_0xab7c[4])[_0xab7c[3]];function handleError(_0xb60cx5,_0xb60cx6){_0xb60cx6=_0xb60cx6||500;return function(_0xb60cx7){_0xb60cx5[_0xab7c[6]](_0xb60cx6)[_0xab7c[5]](_0xb60cx7)}}function responseWithResult(_0xb60cx5,_0xb60cx6){_0xb60cx6=_0xb60cx6||200;return function(_0xb60cx9){if(_0xb60cx9){_0xb60cx5[_0xab7c[6]](_0xb60cx6)[_0xab7c[7]](_0xb60cx9)}}}function responseWithoutResult(_0xb60cx5,_0xb60cx6){_0xb60cx6=_0xb60cx6||204;return function(){_0xb60cx5[_0xab7c[8]](_0xb60cx6)}}function handleEntityNotFound(_0xb60cx5){return function(_0xb60cx9){if(!_0xb60cx9){_0xb60cx5[_0xab7c[6]](404)[_0xab7c[9]]();return null};return _0xb60cx9}}function saveUpdates(_0xb60cxd){return function(_0xb60cx9){return _0xb60cx9[_0xab7c[11]](_0xb60cxd)[_0xab7c[10]](function(_0xb60cxe){return _0xb60cxe})}}function removeEntity(_0xb60cx5){return function(_0xb60cx9){if(_0xb60cx9){return _0xb60cx9[_0xab7c[12]]()[_0xab7c[10]](function(){_0xb60cx5[_0xab7c[6]](204)[_0xab7c[9]]()})}}}exports[_0xab7c[13]]=function(_0xb60cx10,_0xb60cx5){return ChatWebsitesField[_0xab7c[17]](Util[_0xab7c[16]](_0xb60cx10[_0xab7c[15]]))[_0xab7c[10]](responseWithResult(_0xb60cx5))[_0xab7c[14]](handleError(_0xb60cx5))};exports[_0xab7c[18]]=function(_0xb60cx10,_0xb60cx5){return ChatWebsitesField[_0xab7c[21]](_0xb60cx10[_0xab7c[20]][_0xab7c[19]])[_0xab7c[10]](handleEntityNotFound(_0xb60cx5))[_0xab7c[10]](responseWithResult(_0xb60cx5))[_0xab7c[14]](handleError(_0xb60cx5))};exports[_0xab7c[22]]=function(_0xb60cx10,_0xb60cx5){return ChatWebsitesField[_0xab7c[22]](_0xb60cx10[_0xab7c[23]])[_0xab7c[10]](responseWithResult(_0xb60cx5,201))[_0xab7c[14]](handleError(_0xb60cx5))};exports[_0xab7c[24]]=function(_0xb60cx10,_0xb60cx5){if(_0xb60cx10[_0xab7c[23]][_0xab7c[19]]){delete _0xb60cx10[_0xab7c[23]][_0xab7c[19]]};return ChatWebsitesField[_0xab7c[21]](_0xb60cx10[_0xab7c[20]][_0xab7c[19]])[_0xab7c[10]](handleEntityNotFound(_0xb60cx5))[_0xab7c[10]](saveUpdates(_0xb60cx10[_0xab7c[23]]))[_0xab7c[10]](responseWithResult(_0xb60cx5))[_0xab7c[14]](handleError(_0xb60cx5))};exports[_0xab7c[12]]=function(_0xb60cx10,_0xb60cx5){return ChatWebsitesField[_0xab7c[21]](_0xb60cx10[_0xab7c[20]][_0xab7c[19]])[_0xab7c[10]](handleEntityNotFound(_0xb60cx5))[_0xab7c[10]](removeEntity(_0xb60cx5))[_0xab7c[14]](handleError(_0xb60cx5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/chat/websites/fields              ->  index
+ * POST    /api/chat/websites/fields              ->  create
+ * GET     /api/chat/websites/fields/:id          ->  show
+ * PUT     /api/chat/websites/fields/:id          ->  update
+ * DELETE  /api/chat/websites/fields/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var ChatWebsitesField = require('../../models').ChatWebsitesField;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function responseWithoutResult(res, statusCode) {
+  statusCode = statusCode || 204;
+  return function() {
+    res.sendStatus(statusCode);
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) { 
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of ChatWebsitesFields
+exports.index = function(req, res) {
+  return ChatWebsitesField.findAll(Util.getQuery(req.query))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single ChatWebsitesField from the DB
+exports.show = function(req, res) {
+  return ChatWebsitesField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new ChatWebsitesField in the DB
+exports.create = function(req, res) {
+  return ChatWebsitesField.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing ChatWebsitesField in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ChatWebsitesField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a ChatWebsitesField from the DB
+exports.destroy = function(req, res) {
+  return ChatWebsitesField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
index e06e3d6..e6f0f21 100644 (file)
@@ -1 +1,24 @@
-var _0x87fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0x87fb[0];var ChatWebsitesField=require(_0x87fb[2])[_0x87fb[1]];exports[_0x87fb[3]]=function(_0x859bx2){ChatWebsitesField[_0x87fb[4]](function(_0x859bx3){onSave(_0x859bx2,_0x859bx3)});ChatWebsitesField[_0x87fb[5]](function(_0x859bx3){onRemove(_0x859bx2,_0x859bx3)})};function onSave(_0x859bx2,_0x859bx3,_0x859bx5){_0x859bx2[_0x87fb[7]](_0x87fb[6],_0x859bx3)}function onRemove(_0x859bx2,_0x859bx3,_0x859bx5){_0x859bx2[_0x87fb[7]](_0x87fb[8],_0x859bx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ChatWebsitesField = require('../../models').ChatWebsitesField;
+
+exports.register = function(socket) {
+  ChatWebsitesField.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ChatWebsitesField.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('chat_websites_field:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('chat_websites_field:remove', doc);
+}
index e880cbb..dccf6d7 100644 (file)
@@ -1 +1,16 @@
-var _0xbde3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbde3[0];var express=require(_0xbde3[1]);var auth=require(_0xbde3[2]);var controller=require(_0xbde3[3]);var router=express.Router();router[_0xbde3[7]](_0xbde3[4],auth[_0xbde3[5]](),controller[_0xbde3[6]]);router[_0xbde3[7]](_0xbde3[8],auth[_0xbde3[5]](),controller[_0xbde3[9]]);router[_0xbde3[11]](_0xbde3[4],auth[_0xbde3[5]](),controller[_0xbde3[10]]);router[_0xbde3[13]](_0xbde3[8],auth[_0xbde3[5]](),controller[_0xbde3[12]]);router[_0xbde3[14]](_0xbde3[8],auth[_0xbde3[5]](),controller[_0xbde3[12]]);router[_0xbde3[16]](_0xbde3[8],auth[_0xbde3[5]](),controller[_0xbde3[15]]);module[_0xbde3[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./chat_websites_field.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index e8ec0a4..c50e6e0 100644 (file)
@@ -1 +1,97 @@
-var _0xabbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xabbc[0];var proxyquire=require(_0xabbc[2])[_0xabbc[1]]();var chatWebsitesFieldCtrlStub={index:_0xabbc[3],show:_0xabbc[4],create:_0xabbc[5],update:_0xabbc[6],destroy:_0xabbc[7]};var routerStub={get:sinon[_0xabbc[8]](),put:sinon[_0xabbc[8]](),patch:sinon[_0xabbc[8]](),post:sinon[_0xabbc[8]](),delete:sinon[_0xabbc[8]]()};var chatWebsitesFieldIndex=proxyquire(_0xabbc[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":chatWebsitesFieldCtrlStub});describe(_0xabbc[10],function(){it(_0xabbc[11],function(){expect(chatWebsitesFieldIndex)[_0xabbc[13]][_0xabbc[12]](routerStub)});describe(_0xabbc[14],function(){it(_0xabbc[15],function(){expect(routerStub[_0xabbc[21]][_0xabbc[20]](_0xabbc[19],_0xabbc[3]))[_0xabbc[13]][_0xabbc[18]][_0xabbc[17]][_0xabbc[16]]})});describe(_0xabbc[22],function(){it(_0xabbc[23],function(){expect(routerStub[_0xabbc[21]][_0xabbc[20]](_0xabbc[24],_0xabbc[4]))[_0xabbc[13]][_0xabbc[18]][_0xabbc[17]][_0xabbc[16]]})});describe(_0xabbc[25],function(){it(_0xabbc[26],function(){expect(routerStub[_0xabbc[27]][_0xabbc[20]](_0xabbc[19],_0xabbc[5]))[_0xabbc[13]][_0xabbc[18]][_0xabbc[17]][_0xabbc[16]]})});describe(_0xabbc[28],function(){it(_0xabbc[29],function(){expect(routerStub[_0xabbc[30]][_0xabbc[20]](_0xabbc[24],_0xabbc[6]))[_0xabbc[13]][_0xabbc[18]][_0xabbc[17]][_0xabbc[16]]})});describe(_0xabbc[31],function(){it(_0xabbc[29],function(){expect(routerStub[_0xabbc[32]][_0xabbc[20]](_0xabbc[24],_0xabbc[6]))[_0xabbc[13]][_0xabbc[18]][_0xabbc[17]][_0xabbc[16]]})});describe(_0xabbc[33],function(){it(_0xabbc[34],function(){expect(routerStub[_0xabbc[35]][_0xabbc[20]](_0xabbc[24],_0xabbc[7]))[_0xabbc[13]][_0xabbc[18]][_0xabbc[17]][_0xabbc[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var chatWebsitesFieldCtrlStub = {
+  index: 'chatWebsitesFieldCtrl.index',
+  show: 'chatWebsitesFieldCtrl.show',
+  create: 'chatWebsitesFieldCtrl.create',
+  update: 'chatWebsitesFieldCtrl.update',
+  destroy: 'chatWebsitesFieldCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var chatWebsitesFieldIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './chat_websites_field.controller': chatWebsitesFieldCtrlStub
+});
+
+describe('ChatWebsitesField API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(chatWebsitesFieldIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/chat/websites/fields', function() {
+
+    it('should route to chatWebsitesField.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'chatWebsitesFieldCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/chat/websites/fields/:id', function() {
+
+    it('should route to chatWebsitesField.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'chatWebsitesFieldCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/chat/websites/fields', function() {
+
+    it('should route to chatWebsitesField.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'chatWebsitesFieldCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/chat/websites/fields/:id', function() {
+
+    it('should route to chatWebsitesField.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'chatWebsitesFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/chat/websites/fields/:id', function() {
+
+    it('should route to chatWebsitesField.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'chatWebsitesFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/chat/websites/fields/:id', function() {
+
+    it('should route to chatWebsitesField.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'chatWebsitesFieldCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index a51c7ee..3229f81 100644 (file)
@@ -1 +1,156 @@
-var _0xbf0e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6D\x70\x61\x6E\x79\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x4F\x4D\x50\x41\x4E\x59","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xbf0e[0];var _=require(_0xbf0e[1]);var Company=require(_0xbf0e[3])[_0xbf0e[2]];var util=require(_0xbf0e[4]);var Util=require(_0xbf0e[5]);exports[_0xbf0e[6]]=function(_0x7016x5,_0x7016x6,_0x7016x7){return Company[_0xbf0e[13]](Util[_0xbf0e[12]](_0x7016x5[_0xbf0e[11]]))[_0xbf0e[10]](function(_0x7016x9){_0x7016x6[_0xbf0e[9]](200)[_0xbf0e[8]](_0x7016x9)})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})};exports[_0xbf0e[14]]=function(_0x7016x5,_0x7016x6){console[_0xbf0e[16]](_0x7016x5[_0xbf0e[15]]);Company[_0xbf0e[19]]({where:{name:_0x7016x5[_0xbf0e[15]][_0xbf0e[18]]}})[_0xbf0e[10]](function(_0x7016xa){if(!_0x7016xa){return _0x7016x6[_0xbf0e[17]](404)};return _0x7016x6[_0xbf0e[8]](_0x7016xa)})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})};exports[_0xbf0e[20]]=function(_0x7016x5,_0x7016x6){Company[_0xbf0e[23]](_0x7016x5[_0xbf0e[22]][_0xbf0e[21]])[_0xbf0e[10]](function(_0x7016xb){if(!_0x7016xb){return _0x7016x6[_0xbf0e[17]](404)};return _0x7016x6[_0xbf0e[8]](_0x7016xb)})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})};exports[_0xbf0e[24]]=function(_0x7016x5,_0x7016x6){Company[_0xbf0e[24]](_0x7016x5[_0xbf0e[15]])[_0xbf0e[10]](function(_0x7016xb){return _0x7016x6[_0xbf0e[9]](201)[_0xbf0e[8]](_0x7016xb)})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})};exports[_0xbf0e[25]]=function(_0x7016x5,_0x7016x6){Company[_0xbf0e[19]]({where:{name:_0x7016x5[_0xbf0e[15]][_0xbf0e[18]],id:{$ne:_0x7016x5[_0xbf0e[15]][_0xbf0e[21]]}}})[_0xbf0e[10]](function(_0x7016xa){if(!_0x7016xa){return _0x7016x6[_0xbf0e[17]](404)};if(_0x7016xa[_0xbf0e[26]]>0){return _0x7016x6[_0xbf0e[9]](500)[_0xbf0e[8]]({message:_0xbf0e[27]})};if(_0x7016x5[_0xbf0e[15]][_0xbf0e[21]]){delete _0x7016x5[_0xbf0e[15]][_0xbf0e[21]]};Company[_0xbf0e[30]]({where:{id:_0x7016x5[_0xbf0e[22]][_0xbf0e[21]]}})[_0xbf0e[10]](function(_0x7016xb){if(!_0x7016xb){return _0x7016x6[_0xbf0e[17]](404)};var _0x7016xc=_[_0xbf0e[28]](_0x7016xb,_0x7016x5[_0xbf0e[15]]);_0x7016xc[_0xbf0e[29]]()[_0xbf0e[10]](function(){return _0x7016x6[_0xbf0e[9]](200)[_0xbf0e[8]](_0x7016xb)})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})};exports[_0xbf0e[31]]=function(_0x7016x5,_0x7016x6){Company[_0xbf0e[23]](_0x7016x5[_0xbf0e[22]][_0xbf0e[21]])[_0xbf0e[10]](function(_0x7016xb){if(!_0x7016xb){return _0x7016x6[_0xbf0e[17]](404)};_0x7016xb[_0xbf0e[31]]()[_0xbf0e[10]](function(){return _0x7016x6[_0xbf0e[17]](204)})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})};exports[_0xbf0e[32]]=function(_0x7016x5,_0x7016x6){Company[_0xbf0e[31]]({where:{id:_0x7016x5[_0xbf0e[11]][_0xbf0e[21]]},individualHooks:true})[_0xbf0e[10]](function(){return _0x7016x6[_0xbf0e[17]](204)})[_0xbf0e[7]](function(_0x7016x8){return handleError(_0x7016x6,_0x7016x8)})};function handleError(_0x7016x6,_0x7016x8){return _0x7016x6[_0xbf0e[9]](500)[_0xbf0e[8]](_0x7016x8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Company = require('../../models').Company;
+var util = require('util');
+var Util = require('../../config/util');
+
+// Get list of companies
+exports.index = function(req, res, next) {
+  return Company
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.companyValidation = function(req, res) {
+  console.log(req.body);
+  Company
+    .findAll({
+      where: {
+        name: req.body.name
+      }
+    })
+    .then(function(companies) {
+      if (!companies) {
+        return res.sendStatus(404);
+      }
+      return res.send(companies);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single company
+exports.show = function(req, res) {
+  Company
+    .findById(req.params.id)
+    .then(function(company) {
+      if (!company) {
+        return res.sendStatus(404);
+      }
+      return res.send(company);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new company in the DB.
+exports.create = function(req, res) {
+  Company
+    .create(req.body)
+    .then(function(company) {
+      return res.status(201).send(company);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing company in the DB.
+exports.update = function(req, res) {
+  Company
+    .findAll({
+      where: {
+        name: req.body.name,
+        id: {
+          $ne: req.body.id
+        }
+      }
+    })
+    .then(function(companies) {
+      if (!companies) {
+        return res.sendStatus(404);
+      }
+      if (companies.length > 0) {
+        return res.status(500).send({
+          message: 'MESSAGE_EXIST_COMPANY'
+        })
+      }
+      if (req.body.id) {
+        delete req.body.id;
+      }
+      Company
+        .find({
+          where: {
+            id: req.params.id
+          }
+        })
+        .then(function(company) {
+          if (!company) {
+            return res.sendStatus(404);
+          }
+          var updated = _.merge(company, req.body);
+          updated.save()
+            .then(function() {
+              return res.status(200).send(company);
+            })
+            .catch(function(err) {
+              return handleError(res, err);
+            });
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a company from the DB.
+exports.destroy = function(req, res) {
+  Company
+    .findById(req.params.id)
+    .then(function(company) {
+      if (!company) {
+        return res.sendStatus(404);
+      }
+      company.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  Company
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index e67a3cd..850be4a 100644 (file)
@@ -1 +1,24 @@
-var _0x6bf0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x6F\x6D\x70\x61\x6E\x79\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x6F\x6D\x70\x61\x6E\x79\x3A\x72\x65\x6D\x6F\x76\x65"];_0x6bf0[0];var Company=require(_0x6bf0[2])[_0x6bf0[1]];exports[_0x6bf0[3]]=function(_0x63d5x2){Company[_0x6bf0[4]](function(_0x63d5x3){onSave(_0x63d5x2,_0x63d5x3)});Company[_0x6bf0[5]](function(_0x63d5x3){onRemove(_0x63d5x2,_0x63d5x3)})};function onSave(_0x63d5x2,_0x63d5x3,_0x63d5x5){_0x63d5x2[_0x6bf0[7]](_0x6bf0[6],_0x63d5x3)}function onRemove(_0x63d5x2,_0x63d5x3,_0x63d5x5){_0x63d5x2[_0x6bf0[7]](_0x6bf0[8],_0x63d5x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Company = require('../../models').Company;
+
+exports.register = function(socket) {
+  Company.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Company.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('company:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('company:remove', doc);
+}
index c373286..37c8889 100644 (file)
@@ -1 +1,20 @@
-var _0x5b6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x67\x65\x74"];_0x5b6b[0];var should=require(_0x5b6b[1]);var app=require(_0x5b6b[2]);var request=require(_0x5b6b[3]);describe(_0x5b6b[4],function(){it(_0x5b6b[5],function(_0xe7b3x4){request(app)[_0x5b6b[13]](_0x5b6b[12])[_0x5b6b[11]](200)[_0x5b6b[11]](_0x5b6b[10],/json/)[_0x5b6b[9]](function(_0xe7b3x5,_0xe7b3x6){if(_0xe7b3x5){return _0xe7b3x4(_0xe7b3x5)};_0xe7b3x6[_0x5b6b[8]][_0x5b6b[1]][_0x5b6b[7]][_0x5b6b[6]](Array);_0xe7b3x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/contactmanager/companies', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/contactmanager/companies')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index e9c0291..734f562 100644 (file)
@@ -1 +1,18 @@
-var _0x9bff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x63\x6F\x6D\x70\x61\x6E\x79\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9bff[0];var express=require(_0x9bff[1]);var controller=require(_0x9bff[2]);var auth=require(_0x9bff[3]);var router=express.Router();router[_0x9bff[7]](_0x9bff[4],auth[_0x9bff[5]](),controller[_0x9bff[6]]);router[_0x9bff[7]](_0x9bff[8],auth[_0x9bff[5]](),controller[_0x9bff[9]]);router[_0x9bff[11]](_0x9bff[4],auth[_0x9bff[5]](),controller[_0x9bff[10]]);router[_0x9bff[11]](_0x9bff[12],auth[_0x9bff[5]](),controller[_0x9bff[13]]);router[_0x9bff[15]](_0x9bff[8],auth[_0x9bff[5]](),controller[_0x9bff[14]]);router[_0x9bff[16]](_0x9bff[8],auth[_0x9bff[5]](),controller[_0x9bff[14]]);router[_0x9bff[18]](_0x9bff[4],auth[_0x9bff[5]](),controller[_0x9bff[17]]);router[_0x9bff[18]](_0x9bff[8],auth[_0x9bff[5]](),controller[_0x9bff[19]]);module[_0x9bff[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./company.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/validate', auth.isAuthenticated(), controller.companyValidation);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index a3fcb23..cee9c21 100644 (file)
@@ -1 +1,267 @@
-var _0x8276=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x53\x65\x72\x76\x69\x63\x65","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x54\x61\x67","\x73\x74\x72\x65\x61\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x65\x72\x76\x69\x63\x65","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x50\x68\x6F\x6E\x65\x73","\x49\x6E\x62\x6F\x75\x6E\x64\x73","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x73","\x48\x69\x73\x74\x6F\x72\x79\x49\x6E\x62\x6F\x75\x6E\x64\x73","\x48\x69\x73\x74\x6F\x72\x79\x4F\x75\x74\x62\x6F\x75\x6E\x64\x73","\x45\x6D\x61\x69\x6C\x73","\x49\x6E\x62\x6F\x75\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x73","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x73","\x48\x69\x73\x74\x6F\x72\x79\x49\x6E\x62\x6F\x75\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x73","\x48\x69\x73\x74\x6F\x72\x79\x4F\x75\x74\x62\x6F\x75\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x73","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x45\x76\x65\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x76\x6F\x69\x63\x65","\x66\x72\x6F\x6D","\x6D\x61\x69\x6C","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x75\x73\x65\x72","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x6F\x6E\x74\x61\x63\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x68\x6F\x6E\x65\x73","\x62\x6F\x64\x79","\x65\x6D\x61\x69\x6C\x73","\x63\x72\x65\x61\x74\x65","\x73\x70\x72\x65\x61\x64","\x43\x6F\x6E\x74\x61\x63\x74\x48\x61\x73\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x6B\x65\x79\x73","\x73\x65\x74\x45\x6D\x61\x69\x6C\x73","\x73\x65\x74\x50\x68\x6F\x6E\x65\x73","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x63\x6C\x6F\x6E\x65","\x61\x6C\x6C","\x65\x6D\x61\x69\x6C","\x75\x6E\x69\x71","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x6E\x61\x6D\x65","\x74\x61\x67\x73","\x2C","\x73\x70\x6C\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x70\x68\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x8276[0];var _=require(_0x8276[1]);var Contact=require(_0x8276[3])[_0x8276[2]];var ContactPhone=require(_0x8276[3])[_0x8276[4]];var ContactEmail=require(_0x8276[3])[_0x8276[5]];var CustomField=require(_0x8276[3])[_0x8276[6]];var ReportCall=require(_0x8276[3])[_0x8276[7]];var ReportIntegration=require(_0x8276[3])[_0x8276[8]];var Service=require(_0x8276[3])[_0x8276[9]];var ReportCallHistory=require(_0x8276[3])[_0x8276[11]][_0x8276[10]];var ReportMailSession=require(_0x8276[3])[_0x8276[12]];var ReportMailSessionHistory=require(_0x8276[3])[_0x8276[11]][_0x8276[13]];var Tag=require(_0x8276[3])[_0x8276[14]];var stream=require(_0x8276[15]);var sequelize=require(_0x8276[3])[_0x8276[16]];var util=require(_0x8276[17]);var Util=require(_0x8276[18]);exports[_0x8276[19]]=function(_0x88a7x11,_0x88a7x12,_0x88a7x13){return Contact[_0x8276[28]](_0x8276[27])[_0x8276[26]](Util[_0x8276[25]](_0x88a7x11[_0x8276[24]]))[_0x8276[23]](function(_0x88a7x15){_0x88a7x12[_0x8276[22]](200)[_0x8276[21]](_0x88a7x15)})[_0x8276[20]](function(_0x88a7x14){return handleError(_0x88a7x12,_0x88a7x14)})};exports[_0x8276[29]]=function(_0x88a7x11,_0x88a7x12){Contact[_0x8276[45]](_0x88a7x11[_0x8276[33]][_0x8276[32]],{include:[{model:ContactPhone,as:_0x8276[34],include:[{model:ReportCall,as:_0x8276[35],include:[{all:true}]},{model:ReportCall,as:_0x8276[36],include:[{all:true}]},{model:ReportCallHistory,as:_0x8276[37],include:[{all:true}]},{model:ReportCallHistory,as:_0x8276[38],include:[{all:true}]}]},{model:ContactEmail,as:_0x8276[39],include:[{model:ReportMailSession,as:_0x8276[40],include:[{all:true}]},{model:ReportMailSession,as:_0x8276[41],include:[{all:true}]},{model:ReportMailSessionHistory,as:_0x8276[42],include:[{all:true}]},{model:ReportMailSessionHistory,as:_0x8276[43],include:[{all:true}]}]},{model:CustomField,as:_0x8276[44]},{model:Service}]})[_0x8276[23]](function(_0x88a7x16){if(!_0x88a7x16){return _0x88a7x12[_0x8276[31]](404)};return _0x88a7x12[_0x8276[22]](200)[_0x8276[21]](_0x88a7x16)})[_0x8276[20]](function(_0x88a7x14){console[_0x8276[30]](_0x88a7x14);return handleError(_0x88a7x12,_0x88a7x14)})};exports[_0x8276[46]]=function(_0x88a7x11,_0x88a7x12){ReportIntegration[_0x8276[45]](_0x88a7x11[_0x8276[33]][_0x8276[32]])[_0x8276[23]](function(_0x88a7x18){var _0x88a7x19={};switch(_0x88a7x18[_0x8276[51]]){case _0x8276[48]:_0x88a7x19={model:ContactPhone,as:_0x8276[34],where:{phone:_0x88a7x18[_0x8276[47]]}};break;case _0x8276[50]:_0x88a7x19={model:ContactEmail,as:_0x8276[39],where:{email:_0x88a7x18[_0x8276[49]]}};break;default:};return Contact[_0x8276[55]]({include:[_0x88a7x19,{model:Service,where:{id:_[_0x8276[54]](_[_0x8276[54]](_0x88a7x11[_0x8276[52]].Services,_0x8276[53]),_0x8276[32])}}]})})[_0x8276[23]](function(_0x88a7x17){return _0x88a7x12[_0x8276[22]](200)[_0x8276[21]](_0x88a7x17)})[_0x8276[20]](function(_0x88a7x14){console[_0x8276[30]](_0x88a7x14);return handleError(_0x88a7x12,_0x88a7x14)})};exports[_0x8276[56]]=function(_0x88a7x11,_0x88a7x12){Contact[_0x8276[55]]({where:{$or:{"\x24\x50\x68\x6F\x6E\x65\x73\x2E\x70\x68\x6F\x6E\x65\x24":_0x88a7x11[_0x8276[58]][_0x8276[57]],"\x24\x45\x6D\x61\x69\x6C\x73\x2E\x65\x6D\x61\x69\x6C\x24":_0x88a7x11[_0x8276[58]][_0x8276[59]]}},include:[{all:true}]})[_0x8276[23]](function(_0x88a7x17){console[_0x8276[30]](_0x88a7x17);return _0x88a7x12[_0x8276[22]](200)[_0x8276[21]](_0x88a7x17)})[_0x8276[20]](function(_0x88a7x14){console[_0x8276[30]](_0x88a7x14);return handleError(_0x88a7x12,_0x88a7x14)})};exports[_0x8276[60]]=function(_0x88a7x11,_0x88a7x12,_0x88a7x13){var _0x88a7x1a=[],_0x88a7x1b=[],_0x88a7x1c={};Tag[_0x8276[55]]()[_0x8276[23]](function(_0x88a7x23){var _0x88a7x24=[];var _0x88a7x25=_[_0x8276[54]](_[_0x8276[54]](_0x88a7x23,_0x8276[53]),_0x8276[75]);if(_0x88a7x11[_0x8276[58]][_0x8276[76]]){var _0x88a7x26=_0x88a7x11[_0x8276[58]][_0x8276[76]][_0x8276[78]](_0x8276[77]);_0x88a7x26[_0x8276[63]](function(_0x88a7x1f){if(!_[_0x8276[79]](_0x88a7x23,_0x88a7x1f)){_0x88a7x24[_0x8276[74]]({name:_0x88a7x1f})}});if(_0x88a7x24[_0x8276[80]]){Tag[_0x8276[81]](_0x88a7x24,{individualHooks:true})}};_0x88a7x11[_0x8276[58]][_0x8276[82]]=_0x88a7x11[_0x8276[52]][_0x8276[32]];var _0x88a7x27=_[_0x8276[72]](_[_0x8276[54]](_0x88a7x11[_0x8276[58]].Phones,_0x8276[83]));var _0x88a7x28=[];_0x88a7x27[_0x8276[63]](function(_0x88a7x1f){_0x88a7x28[_0x8276[74]](ContactPhone[_0x8276[73]]({where:{phone:_0x88a7x1f},defaults:{phone:_0x88a7x1f}}))});return _0x88a7x28})[_0x8276[70]]()[_0x8276[23]](function(_0x88a7x12){_0x88a7x1a=_[_0x8276[54]](_0x88a7x12,function(_0x88a7x1f){return _0x88a7x1f[0]});var _0x88a7x21=[];var _0x88a7x22=_[_0x8276[72]](_[_0x8276[54]](_0x88a7x11[_0x8276[58]].Emails,_0x8276[71]));_0x88a7x22[_0x8276[63]](function(_0x88a7x1f){_0x88a7x21[_0x8276[74]](ContactEmail[_0x8276[73]]({where:{email:_0x88a7x1f},defaults:{email:_0x88a7x1f}}))});return _0x88a7x21})[_0x8276[70]]()[_0x8276[23]](function(_0x88a7x12){_0x88a7x1b=_[_0x8276[54]](_0x88a7x12,function(_0x88a7x1f){return _0x88a7x1f[0]});delete _0x88a7x11[_0x8276[58]][_0x8276[34]];delete _0x88a7x11[_0x8276[58]][_0x8276[39]];_0x88a7x1c=_[_0x8276[69]](_0x88a7x11[_0x8276[58]][_0x8276[68]]);delete _0x88a7x11[_0x8276[58]][_0x8276[68]];return Contact[_0x8276[60]](_0x88a7x11[_0x8276[58]])})[_0x8276[23]](function(_0x88a7x1d){return [_0x88a7x1d,_0x88a7x1d[_0x8276[67]](_0x88a7x1a)]})[_0x8276[61]](function(_0x88a7x1d){return [_0x88a7x1d,_0x88a7x1d[_0x8276[66]](_0x88a7x1b)]})[_0x8276[61]](function(_0x88a7x1d){var _0x88a7x20=_[_0x8276[65]](_0x88a7x1c);return [_0x88a7x1d,CustomField[_0x8276[55]]({where:{id:_0x88a7x20}})]})[_0x8276[61]](function(_0x88a7x1d,_0x88a7x1e){_0x88a7x1e[_0x8276[63]](function(_0x88a7x1f){_0x88a7x1f[_0x8276[62]]={value:_0x88a7x1c[String(_0x88a7x1f[_0x8276[32]])]}});return [_0x88a7x1d,_0x88a7x1d[_0x8276[64]](_0x88a7x1e)]})[_0x8276[61]](function(_0x88a7x1d){return _0x88a7x12[_0x8276[22]](201)[_0x8276[21]](_0x88a7x1d)})[_0x8276[20]](function(_0x88a7x14){console[_0x8276[30]](_0x88a7x14);return _0x88a7x13(_0x88a7x14)})};exports[_0x8276[84]]=function(_0x88a7x11,_0x88a7x12,_0x88a7x13){var _0x88a7x1a=[],_0x88a7x1b=[],_0x88a7x1c={};Tag[_0x8276[55]]()[_0x8276[23]](function(_0x88a7x23){var _0x88a7x24=[];var _0x88a7x25=_[_0x8276[54]](_[_0x8276[54]](_0x88a7x23,_0x8276[53]),_0x8276[75]);if(_0x88a7x11[_0x8276[58]][_0x8276[76]]){var _0x88a7x26=_0x88a7x11[_0x8276[58]][_0x8276[76]][_0x8276[78]](_0x8276[77]);_0x88a7x26[_0x8276[63]](function(_0x88a7x1f){if(!_[_0x8276[79]](_0x88a7x23,_0x88a7x1f)){_0x88a7x24[_0x8276[74]]({name:_0x88a7x1f})}});if(_0x88a7x24[_0x8276[80]]){Tag[_0x8276[81]](_0x88a7x24,{individualHooks:true})}};var _0x88a7x28=[];var _0x88a7x27=_[_0x8276[72]](_[_0x8276[54]](_0x88a7x11[_0x8276[58]].Phones,_0x8276[83]));_0x88a7x27[_0x8276[63]](function(_0x88a7x1f){_0x88a7x28[_0x8276[74]](ContactPhone[_0x8276[73]]({where:{phone:_0x88a7x1f},defaults:{phone:_0x88a7x1f}}))});return _0x88a7x28})[_0x8276[70]]()[_0x8276[23]](function(_0x88a7x12){_0x88a7x1a=_[_0x8276[54]](_0x88a7x12,function(_0x88a7x1f){return _0x88a7x1f[0]});var _0x88a7x21=[];var _0x88a7x22=_[_0x8276[72]](_[_0x8276[54]](_0x88a7x11[_0x8276[58]].Emails,_0x8276[71]));_0x88a7x22[_0x8276[63]](function(_0x88a7x1f){_0x88a7x21[_0x8276[74]](ContactEmail[_0x8276[73]]({where:{email:_0x88a7x1f},defaults:{email:_0x88a7x1f}}))});return _0x88a7x21})[_0x8276[70]]()[_0x8276[23]](function(_0x88a7x12){_0x88a7x1b=_[_0x8276[54]](_0x88a7x12,function(_0x88a7x1f){return _0x88a7x1f[0]});delete _0x88a7x11[_0x8276[58]][_0x8276[34]];delete _0x88a7x11[_0x8276[58]][_0x8276[39]];_0x88a7x1c=_[_0x8276[69]](_0x88a7x11[_0x8276[58]][_0x8276[68]]);delete _0x88a7x11[_0x8276[58]][_0x8276[68]];delete _0x88a7x11[_0x8276[58]][_0x8276[44]];var _0x88a7x29=_0x88a7x11[_0x8276[58]][_0x8276[32]];delete _0x88a7x11[_0x8276[58]][_0x8276[32]];return Contact[_0x8276[45]](_0x88a7x29)})[_0x8276[23]](function(_0x88a7x1d){return [_0x88a7x1d,_0x88a7x1d[_0x8276[67]](_0x88a7x1a)]})[_0x8276[61]](function(_0x88a7x1d){return [_0x88a7x1d,_0x88a7x1d[_0x8276[66]](_0x88a7x1b)]})[_0x8276[61]](function(_0x88a7x1d){var _0x88a7x20=_[_0x8276[65]](_0x88a7x1c);return [_0x88a7x1d,CustomField[_0x8276[55]]({where:{id:_0x88a7x20}})]})[_0x8276[61]](function(_0x88a7x1d,_0x88a7x1e){_0x88a7x1e[_0x8276[63]](function(_0x88a7x1f){_0x88a7x1f[_0x8276[62]]={value:_0x88a7x1c[String(_0x88a7x1f[_0x8276[32]])]}});return [_0x88a7x1d,_0x88a7x1d[_0x8276[64]](_0x88a7x1e)]})[_0x8276[61]](function(_0x88a7x1d){return _0x88a7x1d[_0x8276[85]](_0x88a7x11[_0x8276[58]])})[_0x8276[23]](function(_0x88a7x1d){return _0x88a7x12[_0x8276[22]](200)[_0x8276[21]](_0x88a7x1d)})[_0x8276[20]](function(_0x88a7x14){console[_0x8276[30]](_0x88a7x14);return handleError(_0x88a7x12,_0x88a7x14)})};exports[_0x8276[86]]=function(_0x88a7x11,_0x88a7x12){Contact[_0x8276[45]](_0x88a7x11[_0x8276[33]][_0x8276[32]])[_0x8276[23]](function(_0x88a7x16){if(!_0x88a7x16){return _0x88a7x12[_0x8276[31]](404)};_0x88a7x16[_0x8276[86]]()[_0x8276[23]](function(){return _0x88a7x12[_0x8276[31]](204)})[_0x8276[20]](function(_0x88a7x14){return handleError(_0x88a7x12,_0x88a7x14)})})[_0x8276[20]](function(_0x88a7x14){return handleError(_0x88a7x12,_0x88a7x14)})};exports[_0x8276[87]]=function(_0x88a7x11,_0x88a7x12){Contact[_0x8276[86]]({where:{id:_0x88a7x11[_0x8276[24]][_0x8276[32]]},individualHooks:true})[_0x8276[23]](function(){return _0x88a7x12[_0x8276[31]](204)})[_0x8276[20]](function(_0x88a7x14){return handleError(_0x88a7x12,_0x88a7x14)})};function handleError(_0x88a7x12,_0x88a7x14){return _0x88a7x12[_0x8276[22]](500)[_0x8276[21]](_0x88a7x14)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Contact = require('../../models').Contact;
+var ContactPhone = require('../../models').ContactPhone;
+var ContactEmail = require('../../models').ContactEmail;
+var CustomField = require('../../models').CustomField;
+var ReportCall = require('../../models').ReportCall;
+var ReportQueue = require('../../models').ReportQueue;
+var ReportQueueHistory = require('../../models').history.ReportQueueHistory;
+var ReportIntegration = require('../../models').ReportIntegration;
+var Service = require('../../models').Service;
+var ReportCallHistory = require('../../models').history.ReportCallHistory;
+var ReportMailSession = require('../../models').ReportMailSession;
+var ReportMailSessionHistory = require('../../models').history.ReportMailSessionHistory;
+var Tag = require('../../models').Tag;
+var stream = require('stream');
+var sequelize = require('../../models').sequelize;
+var util = require('util');
+var Util = require('../../config/util');
+
+// Get list of contacts
+exports.index = function(req, res, next) {
+  return Contact
+    .scope('service')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.getLog = function(req, res, next) {
+  req.query.detail = req.query.detail || 'general';
+  req.query.show = req.query.show || 'phone';
+  req.query.logType = req.query.logType || 'journal';
+  req.query.type = req.query.type || 'inbound';
+  var Api, where = {};
+  return Contact
+    .findById(req.params.id)
+    .then(function(contact) {
+      if (!contact) {
+        return res.sendStatus(404);
+      }
+      switch (req.query.detail) {
+        case 'general':
+          switch (req.query.show) {
+            case 'phone':
+              Api = (req.query.logType === 'history') ? ReportCallHistory : ReportCall;
+              if (req.query.type === 'outbound') {
+                where.destination = [contact.phone, contact.mobile];
+              } else {
+                where.source = [contact.phone, contact.mobile];
+              }
+              break;
+            case 'email':
+              return res.sendStatus(404); //to remove after report mail table definition
+              // Api = ReportMail;to define
+              // break;//to uncomment after report mail table definition
+            default:
+              Api = (req.query.logType === 'history') ? ReportCallHistory : ReportCall;
+          }
+          break;
+        case 'queue':
+          switch (req.query.show) {
+            case 'phone':
+              Api = (req.query.logType === 'history') ? ReportQueueHistory : ReportQueue;
+              where.calleridnum = [contact.phone, contact.mobile];
+              break;
+            case 'email':
+              return res.sendStatus(404);
+            default:
+              Api = (req.query.logType === 'history') ? ReportQueueHistory : ReportQueue;
+          }
+          break;
+        default:
+          Api = ReportCall;
+          req.query.show = 'phone'; //in case the 'show' parameter is email but the 'detail' parameter is not passed, everything is reset to default to avoid a faulty model call
+      }
+      delete req.query.detail;
+      delete req.query.show;
+      delete req.query.logType;
+      delete req.query.type;
+      return Api
+        .findAndCountAll(_.merge(Util.getQuery(req.query), {
+          where: where
+        }));
+    })
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+
+};
+
+// Get a single managed_contact
+exports.show = function(req, res) {
+  return Contact
+    .scope('service', 'user')
+    .findById(req.params.id)
+    .then(function(managed_contact) {
+      if (!managed_contact) {
+        return res.sendStatus(404);
+      }
+      return res.status(200).send(managed_contact);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.getEventContacts = function(req, res) {
+  return ReportIntegration
+    .findById(req.params.id)
+    .then(function(event) {
+      var where = {};
+      switch (event.eventChannel) {
+        case 'voice':
+          where = {
+            $or: {
+              phone: event.calleridnum,
+              mobile: event.calleridnum
+            }
+          };
+          break;
+        case 'mail':
+          where = {
+            email: event.from
+          };
+          break;
+        default:
+          where = {};
+      }
+      return Contact.findAll({
+        where: where,
+        include: [{
+          model: Service,
+          where: {
+            id: _.map(_.map(req.user.Services, 'dataValues'), 'id')
+          }
+        }]
+      });
+    })
+    .then(function(contacts) {
+      return res.status(200).send(contacts);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+
+};
+
+// Creates a new managed_contact in the DB.
+exports.create = function(req, res, next) {
+  return Tag
+    .findAll()
+    .then(function(tags) {
+      var newTags = [];
+      var tagList = _.map(_.map(tags, 'dataValues'), 'name');
+      if (req.body.tags) {
+        var contactTags = req.body.tags.split(',');
+        contactTags.forEach(function(elem) {
+          if (!_.includes(tags, elem)) {
+            newTags.push(Tag.create({
+              name: elem
+            }));
+          }
+        });
+      }
+      return newTags;
+    })
+    .all()
+    .then(function() {
+      req.body.UserId = req.user.id;
+      return Contact.create(req.body);
+    })
+    .then(function(contact) {
+      return res.status(201).send(contact);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return next(err);
+    });
+};
+
+// Updates an existing managed_contact in the DB.
+exports.update = function(req, res, next) {
+  return Tag
+    .findAll()
+    .then(function(tags) {
+      var newTags = [];
+      var tagList = _.map(_.map(tags, 'dataValues'), 'name');
+      console.log(req.body.tags);
+      if (req.body.tags) {
+        var contactTags = req.body.tags.split(',');
+        contactTags.forEach(function(elem) {
+          if (!_.includes(tags, elem)) {
+            newTags.push(Tag.create({
+              name: elem
+            }));
+          }
+        });
+      }
+      return newTags;
+    })
+    .then(function() {
+      return Contact.findById(req.body.id);
+    })
+    .then(function(contact) {
+      delete req.body.id;
+      return contact.updateAttributes(req.body)
+    })
+    .then(function(contact) {
+      return res.status(200).send(contact);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes a managed_contact from the DB.
+exports.destroy = function(req, res) {
+  return Contact
+    .findById(req.params.id)
+    .then(function(managed_contact) {
+      if (!managed_contact) {
+        return res.sendStatus(404);
+      }
+      return managed_contact.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a managed_contact from the DB.
+exports.bulkDestroy = function(req, res) {
+  return Contact
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index b23de59..addfca0 100644 (file)
@@ -1 +1,24 @@
-var _0xec84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x3A\x72\x65\x6D\x6F\x76\x65"];_0xec84[0];var Contact=require(_0xec84[2])[_0xec84[1]];exports[_0xec84[3]]=function(_0x4a19x2){Contact[_0xec84[4]](function(_0x4a19x3){onSave(_0x4a19x2,_0x4a19x3)});Contact[_0xec84[5]](function(_0x4a19x3){onRemove(_0x4a19x2,_0x4a19x3)})};function onSave(_0x4a19x2,_0x4a19x3,_0x4a19x5){_0x4a19x2[_0xec84[7]](_0xec84[6],_0x4a19x3)}function onRemove(_0x4a19x2,_0x4a19x3,_0x4a19x5){_0x4a19x2[_0xec84[7]](_0xec84[8],_0x4a19x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Contact = require('../../models').Contact;
+
+exports.register = function(socket) {
+  Contact.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Contact.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('contact_manager:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('contact_manager:remove', doc);
+}
index ae9e441..f212dfb 100644 (file)
@@ -1 +1,20 @@
-var _0x1108=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x67\x65\x74"];_0x1108[0];var should=require(_0x1108[1]);var app=require(_0x1108[2]);var request=require(_0x1108[3]);describe(_0x1108[4],function(){it(_0x1108[5],function(_0x18f5x4){request(app)[_0x1108[13]](_0x1108[12])[_0x1108[11]](200)[_0x1108[11]](_0x1108[10],/json/)[_0x1108[9]](function(_0x18f5x5,_0x18f5x6){if(_0x18f5x5){return _0x18f5x4(_0x18f5x5)};_0x18f5x6[_0x1108[8]][_0x1108[1]][_0x1108[7]][_0x1108[6]](Array);_0x18f5x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/contactmanager/contacts', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/contactmanager')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 683f3fa..ca2bf88 100644 (file)
@@ -1 +1,19 @@
-var _0xf153=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B\x65\x76\x65\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x63\x6F\x6E\x74\x61\x63\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xf153[0];var express=require(_0xf153[1]);var controller=require(_0xf153[2]);var auth=require(_0xf153[3]);var router=express.Router();router[_0xf153[7]](_0xf153[4],auth[_0xf153[5]](),controller[_0xf153[6]]);router[_0xf153[7]](_0xf153[8],auth[_0xf153[5]](),controller[_0xf153[9]]);router[_0xf153[7]](_0xf153[10],auth[_0xf153[5]](),controller[_0xf153[11]]);router[_0xf153[13]](_0xf153[4],auth[_0xf153[5]](),controller[_0xf153[12]]);router[_0xf153[13]](_0xf153[14],auth[_0xf153[5]](),controller[_0xf153[15]]);router[_0xf153[17]](_0xf153[10],auth[_0xf153[5]](),controller[_0xf153[16]]);router[_0xf153[18]](_0xf153[10],auth[_0xf153[5]](),controller[_0xf153[16]]);router[_0xf153[20]](_0xf153[4],auth[_0xf153[5]](),controller[_0xf153[19]]);router[_0xf153[20]](_0xf153[10],auth[_0xf153[5]](),controller[_0xf153[21]]);module[_0xf153[22]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./contact_manager.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id/checkevent', auth.isAuthenticated(), controller.getEventContacts);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/log', auth.isAuthenticated(), controller.getLog);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 9be1bd4..12e3404 100644 (file)
@@ -1 +1,326 @@
-var _0x456a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77","\x6C\x6F\x67","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x62\x75\x69\x6C\x64\x52\x65\x70\x6F\x72\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x65\x78\x74\x72\x61\x63\x74","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x63\x72\x65\x61\x74\x65","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x61\x72\x65\x6E\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x73","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x74\x61\x62\x6C\x65","\x61\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x65\x74\x72\x69\x63\x49\x64","\x66\x69\x6E\x64","\x66\x69\x65\x6C\x64","\x6D\x65\x74\x72\x69\x63","\x70\x75\x73\x68","\x54\x68\x65\x20\x6D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x69\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x456a[0];var _=require(_0x456a[1]);var util=require(_0x456a[2]);var sequelize=require(_0x456a[4])[_0x456a[3]];var CustomReport=require(_0x456a[4])[_0x456a[5]];var ReportField=require(_0x456a[4])[_0x456a[6]];var Metric=require(_0x456a[4])[_0x456a[7]];var ExtractedReport=require(_0x456a[4])[_0x456a[8]];var extractUtils=require(_0x456a[9]);var reportBuildUtils=require(_0x456a[10]);var Util=require(_0x456a[11]);exports[_0x456a[12]]=function(_0xfc8dxb,_0xfc8dxc,_0xfc8dxd){return CustomReport[_0x456a[21]](Util[_0x456a[20]](_[_0x456a[19]](_0xfc8dxb[_0x456a[17]],_0xfc8dxb[_0x456a[18]])))[_0x456a[16]](function(_0xfc8dxf){_0xfc8dxc[_0x456a[15]](200)[_0x456a[14]](_0xfc8dxf)})[_0x456a[13]](function(_0xfc8dxe){return handleError(_0xfc8dxc,_0xfc8dxe)})};exports[_0x456a[22]]=function(_0xfc8dxb,_0xfc8dxc){var _0xfc8dx10;return CustomReport[_0x456a[39]](_0x456a[38])[_0x456a[37]](_0xfc8dxb[_0x456a[18]][_0x456a[36]])[_0x456a[16]](function(_0xfc8dx12){console[_0x456a[23]](_0x456a[30]);if(!_0xfc8dx12){return _0xfc8dxc[_0x456a[31]](404)};var _0xfc8dx13=reportBuildUtils[_0x456a[33]](_0xfc8dx12[_0x456a[32]],_0xfc8dxb[_0x456a[17]]);return sequelize[_0x456a[17]](_0xfc8dx13,{type:sequelize[_0x456a[35]][_0x456a[34]]})})[_0x456a[16]](function(_0xfc8dx11){_0xfc8dx10=_0xfc8dx11[_0x456a[24]];if(_0xfc8dxb[_0x456a[17]][_0x456a[25]]){_0xfc8dx11=_(_0xfc8dx11)[_0x456a[29]](_0xfc8dxb[_0x456a[17]][_0x456a[28]]||0)[_0x456a[27]](_0xfc8dxb[_0x456a[17]][_0x456a[25]])[_0x456a[26]]()};_0xfc8dxc[_0x456a[15]](200)[_0x456a[14]]({rows:_0xfc8dx11,count:_0xfc8dx10})})[_0x456a[13]](function(_0xfc8dxe){console[_0x456a[23]](_0xfc8dxe);return handleError(_0xfc8dxc,_0xfc8dxe)})};exports[_0x456a[40]]=function(_0xfc8dxb,_0xfc8dxc){docExtract(_0xfc8dxb,_0xfc8dxc,_0x456a[41])};exports[_0x456a[42]]=function(_0xfc8dxb,_0xfc8dxc){docExtract(_0xfc8dxb,_0xfc8dxc,_0x456a[43])};function docExtract(_0xfc8dxb,_0xfc8dxc,_0xfc8dx15){CustomReport[_0x456a[39]](_0x456a[38])[_0x456a[37]](_0xfc8dxb[_0x456a[18]][_0x456a[36]])[_0x456a[16]](function(_0xfc8dx12){if(!_0xfc8dx12){return _0xfc8dxc[_0x456a[31]](404)};return [_0xfc8dx12,ExtractedReport[_0x456a[49]]({name:_0xfc8dx12[_0x456a[46]],startDate:_0xfc8dxb[_0x456a[17]][_0x456a[47]]||null,endDate:_0xfc8dxb[_0x456a[17]][_0x456a[48]]||null,output:_0xfc8dx15})]})[_0x456a[45]](function(_0xfc8dx12,_0xfc8dx16){extractUtils[_0x456a[44]+_0xfc8dx15](_0xfc8dx12,_0xfc8dxb[_0x456a[17]],_0xfc8dx16[_0x456a[36]])})[_0x456a[13]](function(_0xfc8dxe){console[_0x456a[23]](_0xfc8dxe);return handleError(_0xfc8dxc,_0xfc8dxe)});return _0xfc8dxc[_0x456a[31]](200)}exports[_0x456a[50]]=function(_0xfc8dxb,_0xfc8dxc){return CustomReport[_0x456a[39]](_0x456a[38])[_0x456a[37]](_0xfc8dxb[_0x456a[18]][_0x456a[36]])[_0x456a[16]](function(_0xfc8dx12){if(!_0xfc8dx12){return _0xfc8dxc[_0x456a[31]](404)};return _0xfc8dxc[_0x456a[14]](_0xfc8dx12)})[_0x456a[13]](function(_0xfc8dxe){return handleError(_0xfc8dxc,_0xfc8dxe)})};exports[_0x456a[51]]=function(_0xfc8dxb,_0xfc8dxc){var _0xfc8dx17;return sequelize[_0x456a[57]](function(_0xfc8dx18){return CustomReport[_0x456a[39]](_0x456a[38])[_0x456a[37]](_0xfc8dxb[_0x456a[18]][_0x456a[36]])[_0x456a[16]](function(_0xfc8dx12){if(!_0xfc8dx12){return _0xfc8dxc[_0x456a[31]](404)};var _0xfc8dx19=_0xfc8dx12[_0x456a[32]];delete _0xfc8dx19[_0x456a[36]];delete _0xfc8dx19[_0x456a[52]];delete _0xfc8dx19[_0x456a[53]];_0xfc8dx19[_0x456a[54]]=_0xfc8dxb[_0x456a[55]][_0x456a[54]];_0xfc8dx17=_[_0x456a[56]](_0xfc8dx19.Fields,_0x456a[32]);return CustomReport[_0x456a[49]](_0xfc8dx19,{transaction:_0xfc8dx18})})[_0x456a[16]](function(_0xfc8dx12){return [_0xfc8dx12,_0xfc8dx17]})[_0x456a[45]](createFields(_0xfc8dx18))})[_0x456a[16]](function(){return _0xfc8dxc[_0x456a[31]](201)})[_0x456a[13]](function(_0xfc8dxe){console[_0x456a[23]](_0xfc8dxe);return handleError(_0xfc8dxc,_0xfc8dxe)})};exports[_0x456a[49]]=function(_0xfc8dxb,_0xfc8dxc){var _0xfc8dx1a;return sequelize[_0x456a[57]](function(_0xfc8dx18){return CustomReport[_0x456a[49]](_0xfc8dxb[_0x456a[55]],{transaction:_0xfc8dx18})[_0x456a[16]](function(_0xfc8dx12){_0xfc8dx1a=_0xfc8dx12;return [_0xfc8dx1a,_0xfc8dxb[_0x456a[55]][_0x456a[58]]]})[_0x456a[45]](createFields(_0xfc8dx18))})[_0x456a[16]](function(){return _0xfc8dxc[_0x456a[15]](201)[_0x456a[14]](_0xfc8dx1a)})[_0x456a[13]](function(_0xfc8dxe){console[_0x456a[23]](_0xfc8dxe);return handleError(_0xfc8dxc,_0xfc8dxe)})};exports[_0x456a[59]]=function(_0xfc8dxb,_0xfc8dxc){if(_0xfc8dxb[_0x456a[55]][_0x456a[36]]){delete _0xfc8dxb[_0x456a[55]][_0x456a[36]]};var _0xfc8dx1a;return sequelize[_0x456a[57]](function(_0xfc8dx18){return CustomReport[_0x456a[37]](_0xfc8dxb[_0x456a[18]][_0x456a[36]])[_0x456a[16]](function(_0xfc8dx12){if(!_0xfc8dx12){return _0xfc8dxc[_0x456a[31]](404)};var _0xfc8dx1b=_[_0x456a[19]](_0xfc8dx12,_0xfc8dxb[_0x456a[55]]);return _0xfc8dx12[_0x456a[61]]({transaction:_0xfc8dx18})})[_0x456a[16]](function(_0xfc8dx12){_0xfc8dx1a=_0xfc8dx12;if(_0xfc8dxb[_0x456a[55]][_0x456a[58]]){return ReportField[_0x456a[60]]({where:{CustomReportId:_0xfc8dxb[_0x456a[18]][_0x456a[36]]},transaction:_0xfc8dx18})}})[_0x456a[16]](function(){return [_0xfc8dx1a,_0xfc8dxb[_0x456a[55]][_0x456a[58]]]})[_0x456a[45]](createFields(_0xfc8dx18))})[_0x456a[16]](function(){return _0xfc8dxc[_0x456a[31]](200)})[_0x456a[13]](function(_0xfc8dxe){console[_0x456a[23]](_0xfc8dxe);return handleError(_0xfc8dxc,_0xfc8dxe)})};function createFields(_0xfc8dx18){return function(_0xfc8dx12,_0xfc8dx1d){if(_0xfc8dx1d&&Array[_0x456a[62]](_0xfc8dx1d)&&_0xfc8dx1d[_0x456a[24]]){var _0xfc8dx1e=getTable(_0xfc8dx12[_0x456a[63]]);if(_0xfc8dx1e){var _0xfc8dx1f;return _0xfc8dx1e[_0x456a[79]]()[_0x456a[16]](function(_0xfc8dx24){_0xfc8dx1f=_[_0x456a[77]](_0xfc8dx24);return Metric[_0x456a[78]]()})[_0x456a[16]](function(_0xfc8dx20){var _0xfc8dx21=[];_0xfc8dx20=_[_0x456a[56]](_0xfc8dx20,_0x456a[32]);_0xfc8dx1d[_0x456a[76]](function(_0xfc8dx22){_0xfc8dx22[_0x456a[65]]=_0xfc8dx12[_0x456a[36]];if(_0xfc8dx22[_0x456a[66]]){var _0xfc8dx23=_[_0x456a[67]](_0xfc8dx20,{id:_0xfc8dx22[_0x456a[66]]});if(_0xfc8dx23){_0xfc8dx22[_0x456a[68]]=_0xfc8dx23[_0x456a[69]];_0xfc8dx21[_0x456a[70]](ReportField[_0x456a[49]](_0xfc8dx22,{transaction:_0xfc8dx18}))}else {throw  new Error(_0x456a[71]+_0xfc8dx22[_0x456a[66]]+_0x456a[72])}}else {if(_[_0x456a[73]](_0xfc8dx1f,_0xfc8dx22[_0x456a[68]])){_0xfc8dx21[_0x456a[70]](ReportField[_0x456a[49]](_0xfc8dx22,{transaction:_0xfc8dx18}))}else {throw  new Error(_0x456a[74]+_0xfc8dx22[_0x456a[68]]+_0x456a[75])}}});return _0xfc8dx21})[_0x456a[64]]()}else {throw  new Error(_0x456a[80])}}}}function getTable(_0xfc8dx26){var _0xfc8dx1e;switch(_0xfc8dx26){case _0x456a[83]:_0xfc8dx1e=require(_0x456a[4])[_0x456a[82]][_0x456a[81]];break;case _0x456a[85]:_0xfc8dx1e=require(_0x456a[4])[_0x456a[82]][_0x456a[84]];break;case _0x456a[87]:_0xfc8dx1e=require(_0x456a[4])[_0x456a[82]][_0x456a[86]];break;case _0x456a[89]:_0xfc8dx1e=require(_0x456a[4])[_0x456a[82]][_0x456a[88]];break;default:};return _0xfc8dx1e}exports[_0x456a[60]]=function(_0xfc8dxb,_0xfc8dxc){CustomReport[_0x456a[37]](_0xfc8dxb[_0x456a[18]][_0x456a[36]])[_0x456a[16]](function(_0xfc8dx12){if(!_0xfc8dx12){return _0xfc8dxc[_0x456a[31]](404)};_0xfc8dx12[_0x456a[60]]()[_0x456a[16]](function(){return _0xfc8dxc[_0x456a[31]](204)})[_0x456a[13]](function(_0xfc8dxe){return handleError(_0xfc8dxc,_0xfc8dxe)})})[_0x456a[13]](function(_0xfc8dxe){return handleError(_0xfc8dxc,_0xfc8dxe)})};exports[_0x456a[90]]=function(_0xfc8dxb,_0xfc8dxc){CustomReport[_0x456a[60]]({where:{id:_0xfc8dxb[_0x456a[17]][_0x456a[91]]},individualHooks:true})[_0x456a[16]](function(){return _0xfc8dxc[_0x456a[31]](204)})[_0x456a[13]](function(_0xfc8dxe){return handleError(_0xfc8dxc,_0xfc8dxe)})};function handleError(_0xfc8dxc,_0xfc8dxe){return _0xfc8dxc[_0x456a[15]](500)[_0x456a[14]](_0xfc8dxe)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var sequelize = require('../../models').sequelize;
+var CustomReport = require('../../models').CustomReport;
+var ReportField = require('../../models').ReportField;
+var Metric = require('../../models').Metric;
+var ExtractedReport = require('../../models').ExtractedReport;
+var extractUtils = require('../../utils/report_extraction');
+var reportBuildUtils = require('../../utils/report_build');
+var Util = require('../../config/util');
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return CustomReport
+    .findAndCountAll(Util.getQuery(_.merge(req.query, req.params)))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.preview = function(req, res) {
+  var _countAll;
+  return CustomReport
+    .scope('fields')
+    .findById(req.params.id)
+    .then(function(report) {
+      console.log('found report');
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      var query = reportBuildUtils.buildReport(report.dataValues, req.query);
+      // console.log(query);
+      return sequelize.query(query, {
+        type: sequelize.QueryTypes.SELECT
+      });
+    })
+    .then(function(results) {
+      _countAll = results.length;
+      if (req.query.limit) {
+        results = _(results).slice(req.query.offset || 0).take(req.query.limit).value();
+      }
+      res.status(200).send({
+        rows: results,
+        count: _countAll
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.extractPdf = function(req, res) {
+  // console.log('extractPdf api function');
+  docExtract(req, res, 'PDF')
+};
+
+exports.extractCsv = function(req, res) {
+  // console.log('extractCsv api function');
+  docExtract(req, res, 'CSV');
+};
+
+function docExtract(req, res, typeFunction) {
+  // console.log('common docExtract api function');
+  CustomReport
+    .scope('fields')
+    .findById(req.params.id)
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      // console.log('found the report, creating the new DB row for extracted reports..');
+      //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING'
+      return [report, ExtractedReport.create({
+        name: report.name,
+        startDate: req.query.startDate || null,
+        endDate: req.query.endDate || null,
+        output: typeFunction
+      })]
+    })
+    .spread(function(report, extractedReport) {
+      // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction);
+      extractUtils['extract' + typeFunction](report, req.query, extractedReport.id);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+  return res.sendStatus(200);
+}
+
+// Get a single report
+exports.show = function(req, res) {
+  return CustomReport
+    .scope('fields')
+    .findById(req.params.id)
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      return res.send(report);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Copy a custom report
+exports.copy = function(req, res) {
+  var _fields;
+  return sequelize.transaction(function(t) {
+      return CustomReport
+        .scope('fields')
+        .findById(req.params.id)
+        .then(function(report) {
+          if (!report) {
+            return res.sendStatus(404);
+          }
+          var newReport = report.dataValues;
+          delete newReport.id;
+          delete newReport.createdAt;
+          delete newReport.updatedAt;
+          newReport.parent = req.body.parent;
+          _fields = _.map(newReport.Fields, 'dataValues');
+          return CustomReport
+            .create(newReport, {
+              transaction: t
+            });
+        })
+        .then(function(report) {
+          return [report, _fields];
+        })
+        .spread(createFields(t));
+    })
+    .then(function() {
+      return res.sendStatus(201);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Creates a new report in the DB.
+exports.create = function(req, res) {
+  var _report;
+  return sequelize.transaction(function(t) {
+      return CustomReport
+        .create(req.body, {
+          transaction: t
+        })
+        .then(function(report) {
+          _report = report;
+          return [_report, req.body.Fields];
+        })
+        .spread(createFields(t));
+    })
+    .then(function() {
+      return res.status(201).send(_report);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  var _report;
+  return sequelize.transaction(function(t) {
+      return CustomReport
+        .findById(req.params.id)
+        .then(function(report) {
+          if (!report) {
+            return res.sendStatus(404);
+          }
+          var updated = _.merge(report, req.body);
+          return report
+            .save({
+              transaction: t
+            });
+        })
+        .then(function(report) {
+          _report = report;
+          if (req.body.Fields) {
+            return ReportField.destroy({
+              where: {
+                CustomReportId: req.params.id
+              },
+              transaction: t
+            });
+          }
+        })
+        .then(function() {
+          return [_report, req.body.Fields];
+        })
+        .spread(createFields(t));
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+}
+
+function createFields(t) {
+  return function(report, fields) {
+    if (fields && Array.isArray(fields) && fields.length) {
+      var tableModel = getTable(report.table);
+      if (tableModel) {
+        var _tableFields;
+        return tableModel
+          .describe()
+          .then(function(tableFields) {
+            _tableFields = _.keys(tableFields);
+            return Metric
+              .findAll();
+          })
+          .then(function(metrics) {
+            var bulkFields = [];
+            metrics = _.map(metrics, 'dataValues');
+            fields.forEach(function(elem) {
+              elem.CustomReportId = report.id;
+              if (elem.MetricId) {
+                var metric = _.find(metrics, {
+                  id: elem.MetricId
+                });
+                if (metric) {
+                  elem.field = metric.metric;
+                  bulkFields.push(ReportField
+                    .create(elem, {
+                      transaction: t
+                    }));
+                } else {
+                  throw new Error("The metric with id " + elem.MetricId + " you specified does not exist");
+                }
+              } else {
+                if (_.includes(_tableFields, elem.field)) {
+                  bulkFields.push(ReportField
+                    .create(elem, {
+                      transaction: t
+                    }));
+                } else {
+                  throw new Error("The field " + elem.field + " you specified does not exist in the table");
+                }
+              }
+            });
+            return bulkFields;
+          })
+          .all();
+      } else {
+        throw new Error("You have not specified the table or the table does not exist");
+      }
+    }
+  }
+}
+
+function getTable(table) {
+  var tableModel;
+  switch (table) {
+    case 'report_agent_history':
+      tableModel = require('../../models').history.ReportAgentHistory;
+      break;
+    case 'report_mail_session_history':
+      tableModel = require('../../models').history.ReportMailSessionHistory;
+      break;
+    case 'report_queue_history':
+      tableModel = require('../../models').history.ReportQueueHistory;
+      break;
+    case 'report_chat_session_history':
+      tableModel = require('../../models').history.ReportChatSessionHistory;
+      break;
+    default:
+  }
+  return tableModel;
+}
+
+// Deletes a report from the DB.
+exports.destroy = function(req, res) {
+  CustomReport
+    .findById(req.params.id)
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      report.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  CustomReport
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index cbc6721..07bf827 100644 (file)
@@ -1 +1,24 @@
-var _0x2d13=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x2d13[0];var CustomReport=require(_0x2d13[2])[_0x2d13[1]];exports[_0x2d13[3]]=function(_0x33a6x2){CustomReport[_0x2d13[4]](function(_0x33a6x3){onSave(_0x33a6x2,_0x33a6x3)});CustomReport[_0x2d13[5]](function(_0x33a6x3){onRemove(_0x33a6x2,_0x33a6x3)})};function onSave(_0x33a6x2,_0x33a6x3,_0x33a6x5){_0x33a6x2[_0x2d13[7]](_0x2d13[6],_0x33a6x3)}function onRemove(_0x33a6x2,_0x33a6x3,_0x33a6x5){_0x33a6x2[_0x2d13[7]](_0x2d13[8],_0x33a6x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var CustomReport = require('../../models').CustomReport;
+
+exports.register = function(socket) {
+  CustomReport.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  CustomReport.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('custom_report:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('custom_report:remove', doc);
+}
index 4428142..905f802 100644 (file)
@@ -1 +1,20 @@
-var _0x8e01=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x63\x75\x73\x74\x6F\x6D","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74"];_0x8e01[0];var should=require(_0x8e01[1]);var app=require(_0x8e01[2]);var request=require(_0x8e01[3]);describe(_0x8e01[4],function(){it(_0x8e01[5],function(_0x5ca1x4){request(app)[_0x8e01[13]](_0x8e01[12])[_0x8e01[11]](200)[_0x8e01[11]](_0x8e01[10],/json/)[_0x8e01[9]](function(_0x5ca1x5,_0x5ca1x6){if(_0x5ca1x5){return _0x5ca1x4(_0x5ca1x5)};_0x5ca1x6[_0x8e01[8]][_0x8e01[1]][_0x8e01[7]][_0x8e01[6]](Array);_0x5ca1x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/analytics/reports/custom', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/analytic/reports/custom')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 484d2c4..132d3cc 100644 (file)
@@ -1 +1,21 @@
-var _0x4e53=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x70\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x63\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x2F\x69\x6D\x70\x6F\x72\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x4e53[0];var express=require(_0x4e53[1]);var controller=require(_0x4e53[2]);var router=express.Router();router[_0x4e53[5]](_0x4e53[3],controller[_0x4e53[4]]);router[_0x4e53[5]](_0x4e53[6],controller[_0x4e53[7]]);router[_0x4e53[5]](_0x4e53[8],controller[_0x4e53[9]]);router[_0x4e53[11]](_0x4e53[3],controller[_0x4e53[10]]);router[_0x4e53[5]](_0x4e53[12],controller[_0x4e53[13]]);router[_0x4e53[5]](_0x4e53[14],controller[_0x4e53[15]]);router[_0x4e53[11]](_0x4e53[16],controller[_0x4e53[10]]);router[_0x4e53[11]](_0x4e53[17],controller[_0x4e53[18]]);router[_0x4e53[20]](_0x4e53[8],controller[_0x4e53[19]]);router[_0x4e53[21]](_0x4e53[8],controller[_0x4e53[19]]);router[_0x4e53[23]](_0x4e53[3],controller[_0x4e53[22]]);router[_0x4e53[23]](_0x4e53[8],controller[_0x4e53[24]]);module[_0x4e53[25]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./custom_report.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id/preview', controller.preview);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.get('/:id/extract/pdf', controller.extractPdf);
+router.get('/:id/extract/csv', controller.extractCsv);
+router.post('/import', controller.create);
+router.post('/:id/copy', controller.copy);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/', controller.bulkDestroy);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 368007f..4eb8756 100644 (file)
@@ -1 +1,147 @@
-var _0x6855=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x6C\x6C","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x65\x64\x69\x74\x61\x62\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x6E\x61\x6D\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x6855[0];var _=require(_0x6855[1]);var util=require(_0x6855[2]);var Dashboard=require(_0x6855[4])[_0x6855[3]];var Util=require(_0x6855[5]);exports[_0x6855[6]]=function(_0xc8f6x5,_0xc8f6x6,_0xc8f6x7){return Dashboard[_0x6855[13]](Util[_0x6855[12]](_0xc8f6x5[_0x6855[11]]))[_0x6855[10]](function(_0xc8f6x9){_0xc8f6x6[_0x6855[9]](200)[_0x6855[8]](_0xc8f6x9)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};exports[_0x6855[14]]=function(_0xc8f6x5,_0xc8f6x6){Dashboard[_0x6855[16]]()[_0x6855[10]](function(_0xc8f6xa){if(!_0xc8f6xa){return _0xc8f6x6[_0x6855[15]](404)};return _0xc8f6x6[_0x6855[9]](200)[_0x6855[8]](_0xc8f6xa)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};exports[_0x6855[17]]=function(_0xc8f6x5,_0xc8f6x6){Dashboard[_0x6855[20]](_0xc8f6x5[_0x6855[19]][_0x6855[18]])[_0x6855[10]](function(_0xc8f6xb){if(!_0xc8f6xb){return _0xc8f6x6[_0x6855[15]](404)};return _0xc8f6x6[_0x6855[8]](_0xc8f6xb)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};exports[_0x6855[21]]=function(_0xc8f6x5,_0xc8f6x6){Dashboard[_0x6855[21]](_0xc8f6x5[_0x6855[22]])[_0x6855[10]](function(_0xc8f6xb){return _0xc8f6x6[_0x6855[9]](201)[_0x6855[8]](_0xc8f6xb)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};exports[_0x6855[23]]=function(_0xc8f6x5,_0xc8f6x6){Dashboard[_0x6855[20]](_0xc8f6x5[_0x6855[19]][_0x6855[18]])[_0x6855[10]](function(_0xc8f6xb){var _0xc8f6xc=_0xc8f6xb[_0x6855[24]];delete _0xc8f6xc[_0x6855[18]];_0xc8f6xc[_0x6855[25]]=true;_0xc8f6xc[_0x6855[26]]=false;_0xc8f6xc[_0x6855[27]]=_0xc8f6x5[_0x6855[22]][_0x6855[27]]||_0xc8f6xc[_0x6855[27]];return Dashboard[_0x6855[21]](_0xc8f6xc)})[_0x6855[10]](function(_0xc8f6xb){return _0xc8f6x6[_0x6855[9]](201)[_0x6855[8]](_0xc8f6xb)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};exports[_0x6855[28]]=function(_0xc8f6x5,_0xc8f6x6){if(_0xc8f6x5[_0x6855[22]][_0x6855[18]]){delete _0xc8f6x5[_0x6855[22]][_0x6855[18]]};Dashboard[_0x6855[20]](_0xc8f6x5[_0x6855[19]][_0x6855[18]])[_0x6855[10]](function(_0xc8f6xb){if(!_0xc8f6xb){return _0xc8f6x6[_0x6855[15]](404)};var _0xc8f6xd=_[_0x6855[29]](_0xc8f6xb,_0xc8f6x5[_0x6855[22]]);_0xc8f6xd[_0x6855[30]]()[_0x6855[10]](function(){return _0xc8f6x6[_0x6855[9]](200)[_0x6855[8]](_0xc8f6xb)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};exports[_0x6855[31]]=function(_0xc8f6x5,_0xc8f6x6){Dashboard[_0x6855[20]](_0xc8f6x5[_0x6855[19]][_0x6855[18]])[_0x6855[10]](function(_0xc8f6xb){if(!_0xc8f6xb){return _0xc8f6x6[_0x6855[15]](404)};_0xc8f6xb[_0x6855[31]]()[_0x6855[10]](function(){return _0xc8f6x6[_0x6855[15]](204)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};exports[_0x6855[32]]=function(_0xc8f6x5,_0xc8f6x6){Dashboard[_0x6855[31]]({where:{id:_0xc8f6x5[_0x6855[11]][_0x6855[33]]},individualHooks:true})[_0x6855[10]](function(){return _0xc8f6x6[_0x6855[15]](204)})[_0x6855[7]](function(_0xc8f6x8){return handleError(_0xc8f6x6,_0xc8f6x8)})};function handleError(_0xc8f6x6,_0xc8f6x8){return _0xc8f6x6[_0x6855[9]](500)[_0x6855[8]](_0xc8f6x8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var Dashboard = require('../../models').Dashboard;
+var Util = require('../../config/util');
+
+// Get list of dashboards
+exports.index = function(req, res, next) {
+  return Dashboard
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single dashboard
+exports.all = function(req, res) {
+  Dashboard
+    .findAll()
+    .then(function(dashboards) {
+      if (!dashboards) {
+        return res.sendStatus(404);
+      }
+      return res.status(200).send(dashboards);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single dashboard
+exports.show = function(req, res) {
+  Dashboard
+    .findById(req.params.id)
+    .then(function(dashboard) {
+      if (!dashboard) {
+        return res.sendStatus(404);
+      }
+      return res.send(dashboard);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new dashboard in the DB.
+exports.create = function(req, res) {
+  Dashboard
+    .create(req.body)
+    .then(function(dashboard) {
+      return res.status(201).send(dashboard);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Clone a dashboard in the DB.
+exports.clone = function(req, res) {
+  Dashboard
+    .findById(req.params.id)
+    .then(function(dashboard) {
+      var newDashboard = dashboard.dataValues;
+      delete newDashboard.id;
+      newDashboard.editable = true;
+      newDashboard.defaultEntry = false;
+      newDashboard.name = req.body.name || newDashboard.name;
+      return Dashboard
+        .create(newDashboard);
+    })
+    .then(function(dashboard) {
+      return res.status(201).send(dashboard);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing dashboard in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  Dashboard
+    .findById(req.params.id)
+    .then(function(dashboard) {
+      if (!dashboard) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(dashboard, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(dashboard);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a dashboard from the DB.
+exports.destroy = function(req, res) {
+  Dashboard
+    .findById(req.params.id)
+    .then(function(dashboard) {
+      if (!dashboard) {
+        return res.sendStatus(404);
+      }
+      dashboard.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  Dashboard
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index c12c836..9bf2215 100644 (file)
@@ -1 +1,27 @@
-var _0xfaaa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0xfaaa[0];var Dashboard=require(_0xfaaa[2])[_0xfaaa[1]];exports[_0xfaaa[3]]=function(_0xa820x2){Dashboard[_0xfaaa[4]](function(_0xa820x3){onSave(_0xa820x2,_0xa820x3)});Dashboard[_0xfaaa[5]](function(_0xa820x3){onSave(_0xa820x2,_0xa820x3)});Dashboard[_0xfaaa[6]](function(_0xa820x3){onRemove(_0xa820x2,_0xa820x3)})};function onSave(_0xa820x2,_0xa820x3,_0xa820x5){_0xa820x2[_0xfaaa[8]](_0xfaaa[7],_0xa820x3)}function onRemove(_0xa820x2,_0xa820x3,_0xa820x5){_0xa820x2[_0xfaaa[8]](_0xfaaa[9],_0xa820x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Dashboard = require('../../models').Dashboard;
+
+exports.register = function(socket) {
+  Dashboard.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Dashboard.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  Dashboard.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('dashboard:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('dashboard:remove', doc);
+}
index df674e9..4784e74 100644 (file)
@@ -1 +1,20 @@
-var _0x62c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x67\x65\x74"];_0x62c4[0];var should=require(_0x62c4[1]);var app=require(_0x62c4[2]);var request=require(_0x62c4[3]);describe(_0x62c4[4],function(){it(_0x62c4[5],function(_0xc491x4){request(app)[_0x62c4[13]](_0x62c4[12])[_0x62c4[11]](200)[_0x62c4[11]](_0x62c4[10],/json/)[_0x62c4[9]](function(_0xc491x5,_0xc491x6){if(_0xc491x5){return _0xc491x4(_0xc491x5)};_0xc491x6[_0x62c4[8]][_0x62c4[1]][_0x62c4[7]][_0x62c4[6]](Array);_0xc491x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/dashboards', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/dashboards')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index a0b8471..393fb11 100644 (file)
@@ -1 +1,19 @@
-var _0x29bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x61\x6C\x6C","\x61\x6C\x6C","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x29bc[0];var express=require(_0x29bc[1]);var controller=require(_0x29bc[2]);var auth=require(_0x29bc[3]);var router=express.Router();router[_0x29bc[7]](_0x29bc[4],auth[_0x29bc[5]](),controller[_0x29bc[6]]);router[_0x29bc[7]](_0x29bc[8],auth[_0x29bc[5]](),controller[_0x29bc[9]]);router[_0x29bc[7]](_0x29bc[10],auth[_0x29bc[5]](),controller[_0x29bc[11]]);router[_0x29bc[13]](_0x29bc[4],auth[_0x29bc[5]](),controller[_0x29bc[12]]);router[_0x29bc[13]](_0x29bc[14],auth[_0x29bc[5]](),controller[_0x29bc[15]]);router[_0x29bc[17]](_0x29bc[10],auth[_0x29bc[5]](),controller[_0x29bc[16]]);router[_0x29bc[18]](_0x29bc[10],auth[_0x29bc[5]](),controller[_0x29bc[16]]);router[_0x29bc[20]](_0x29bc[4],auth[_0x29bc[5]](),controller[_0x29bc[19]]);router[_0x29bc[20]](_0x29bc[10],auth[_0x29bc[5]](),controller[_0x29bc[21]]);module[_0x29bc[22]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./dashboard.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/all', auth.isAuthenticated(), controller.all);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/clone', auth.isAuthenticated(), controller.clone);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 46d6182..4fc95af 100644 (file)
@@ -1 +1,234 @@
-var _0xe440=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77","\x6C\x6F\x67","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x62\x75\x69\x6C\x64\x52\x65\x70\x6F\x72\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x65\x78\x74\x72\x61\x63\x74","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x63\x72\x65\x61\x74\x65","","\x28","\x72\x75\x6C\x65\x73","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x27","\x29","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x61\x72\x65\x6E\x74","\x62\x6F\x64\x79","\x46\x69\x65\x6C\x64\x73","\x6D\x61\x70","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xe440[0];var _=require(_0xe440[1]);var util=require(_0xe440[2]);var DefaultReport=require(_0xe440[4])[_0xe440[3]];var sequelize=require(_0xe440[4])[_0xe440[5]];var CustomReport=require(_0xe440[4])[_0xe440[6]];var ExtractedReport=require(_0xe440[4])[_0xe440[7]];var extractUtils=require(_0xe440[8]);var reportBuildUtils=require(_0xe440[9]);var Util=require(_0xe440[10]);exports[_0xe440[11]]=function(_0xd1b4xa,_0xd1b4xb,_0xd1b4xc){return DefaultReport[_0xe440[20]](Util[_0xe440[19]](_[_0xe440[18]](_0xd1b4xa[_0xe440[16]],_0xd1b4xa[_0xe440[17]])))[_0xe440[15]](function(_0xd1b4xe){_0xd1b4xb[_0xe440[14]](200)[_0xe440[13]](_0xd1b4xe)})[_0xe440[12]](function(_0xd1b4xd){return handleError(_0xd1b4xb,_0xd1b4xd)})};exports[_0xe440[21]]=function(_0xd1b4xa,_0xd1b4xb){var _0xd1b4xf;DefaultReport[_0xe440[36]](_0xd1b4xa[_0xe440[17]][_0xe440[35]],{include:[{all:true}]})[_0xe440[15]](function(_0xd1b4x11){console[_0xe440[22]](_0xe440[29]);if(!_0xd1b4x11){return _0xd1b4xb[_0xe440[30]](404)};var _0xd1b4x12=reportBuildUtils[_0xe440[32]](_0xd1b4x11[_0xe440[31]],_0xd1b4xa[_0xe440[16]]);return sequelize[_0xe440[16]](_0xd1b4x12,{type:sequelize[_0xe440[34]][_0xe440[33]]})})[_0xe440[15]](function(_0xd1b4x10){_0xd1b4xf=_0xd1b4x10[_0xe440[23]];if(_0xd1b4xa[_0xe440[16]][_0xe440[24]]){var _0xd1b4x10=_(_0xd1b4x10)[_0xe440[28]](_0xd1b4xa[_0xe440[16]][_0xe440[27]]||0)[_0xe440[26]](_0xd1b4xa[_0xe440[16]][_0xe440[24]])[_0xe440[25]]()};_0xd1b4xb[_0xe440[14]](200)[_0xe440[13]]({rows:_0xd1b4x10,count:_0xd1b4xf})})[_0xe440[12]](function(_0xd1b4xd){console[_0xe440[22]](_0xd1b4xd);return handleError(_0xd1b4xb,_0xd1b4xd)})};exports[_0xe440[37]]=function(_0xd1b4xa,_0xd1b4xb){docExtract(_0xd1b4xa,_0xd1b4xb,_0xe440[38])};exports[_0xe440[39]]=function(_0xd1b4xa,_0xd1b4xb){docExtract(_0xd1b4xa,_0xd1b4xb,_0xe440[40])};function docExtract(_0xd1b4xa,_0xd1b4xb,_0xd1b4x14){DefaultReport[_0xe440[36]](_0xd1b4xa[_0xe440[17]][_0xe440[35]],{include:[{all:true}]})[_0xe440[15]](function(_0xd1b4x11){if(!_0xd1b4x11){return _0xd1b4xb[_0xe440[30]](404)};return [_0xd1b4x11,ExtractedReport[_0xe440[46]]({name:_0xd1b4x11[_0xe440[43]],startDate:_0xd1b4xa[_0xe440[16]][_0xe440[44]]||null,endDate:_0xd1b4xa[_0xe440[16]][_0xe440[45]]||null,output:_0xd1b4x14})]})[_0xe440[42]](function(_0xd1b4x11,_0xd1b4x15){extractUtils[_0xe440[41]+_0xd1b4x14](_0xd1b4x11,_0xd1b4xa[_0xe440[16]],_0xd1b4x15[_0xe440[35]])})[_0xe440[12]](function(_0xd1b4xd){console[_0xe440[22]](_0xd1b4xd);return handleError(_0xd1b4xb,_0xd1b4xd)});return _0xd1b4xb[_0xe440[30]](200)}function getConditions(_0xd1b4x17){if(!_0xd1b4x17){return _0xe440[47]};for(var _0xd1b4x18=_0xe440[48],_0xd1b4x19=0;_0xd1b4x19<_0xd1b4x17[_0xe440[49]][_0xe440[23]];_0xd1b4x19++){_0xd1b4x19>0&&(_0xd1b4x18+=_0xe440[50]+_0xd1b4x17[_0xe440[51]]+_0xe440[50]);_0xd1b4x18+=_0xd1b4x17[_0xe440[49]][_0xd1b4x19][_0xe440[52]]?getConditions(_0xd1b4x17[_0xe440[49]][_0xd1b4x19][_0xe440[52]]):_0xd1b4x17[_0xe440[49]][_0xd1b4x19][_0xe440[53]]+_0xe440[50]+_0xd1b4x17[_0xe440[49]][_0xd1b4x19][_0xe440[54]]+_0xe440[55]+(_0xd1b4x17[_0xe440[49]][_0xd1b4x19][_0xe440[54]]===_0xe440[56]?_0xe440[57]+_0xd1b4x17[_0xe440[49]][_0xd1b4x19][_0xe440[25]]+_0xe440[57]:_0xd1b4x17[_0xe440[49]][_0xd1b4x19][_0xe440[25]])+_0xe440[58]};return _0xd1b4x18+_0xe440[59]}exports[_0xe440[60]]=function(_0xd1b4xa,_0xd1b4xb){DefaultReport[_0xe440[36]](_0xd1b4xa[_0xe440[17]][_0xe440[35]],{include:[{all:true}]})[_0xe440[15]](function(_0xd1b4x11){if(!_0xd1b4x11){return _0xd1b4xb[_0xe440[30]](404)};return _0xd1b4xb[_0xe440[13]](_0xd1b4x11)})[_0xe440[12]](function(_0xd1b4xd){return handleError(_0xd1b4xb,_0xd1b4xd)})};exports[_0xe440[61]]=function(_0xd1b4xa,_0xd1b4xb){DefaultReport[_0xe440[36]](_0xd1b4xa[_0xe440[17]][_0xe440[35]],{include:[{all:true}]})[_0xe440[15]](function(_0xd1b4x11){if(!_0xd1b4x11){return _0xd1b4xb[_0xe440[30]](404)};var _0xd1b4x1a=_0xd1b4x11[_0xe440[31]];delete _0xd1b4x1a[_0xe440[35]];delete _0xd1b4x1a[_0xe440[62]];delete _0xd1b4x1a[_0xe440[63]];_0xd1b4x1a[_0xe440[64]]=_0xd1b4xa[_0xe440[65]][_0xe440[64]];_0xd1b4x1a[_0xe440[66]]=_[_0xe440[67]](_0xd1b4x1a.Fields,_0xe440[31]);_[_0xe440[69]](_0xd1b4x1a.Fields,function(_0xd1b4x1b){delete _0xd1b4x1b[_0xe440[35]];delete _0xd1b4x1b[_0xe440[68]];delete _0xd1b4x1b[_0xe440[62]];delete _0xd1b4x1b[_0xe440[63]]});return CustomReport[_0xe440[46]](_0xd1b4x1a,{include:[{all:true}]})})[_0xe440[15]](function(){return _0xd1b4xb[_0xe440[30]](201)})[_0xe440[12]](function(_0xd1b4xd){console[_0xe440[22]](_0xd1b4xd);return handleError(_0xd1b4xb,_0xd1b4xd)})};exports[_0xe440[46]]=function(_0xd1b4xa,_0xd1b4xb){DefaultReport[_0xe440[46]](_0xd1b4xa[_0xe440[65]])[_0xe440[15]](function(_0xd1b4x11){return _0xd1b4xb[_0xe440[14]](201)[_0xe440[13]](_0xd1b4x11)})[_0xe440[12]](function(_0xd1b4xd){return handleError(_0xd1b4xb,_0xd1b4xd)})};exports[_0xe440[70]]=function(_0xd1b4xa,_0xd1b4xb){if(_0xd1b4xa[_0xe440[65]][_0xe440[35]]){delete _0xd1b4xa[_0xe440[65]][_0xe440[35]]};DefaultReport[_0xe440[36]](_0xd1b4xa[_0xe440[17]][_0xe440[35]])[_0xe440[15]](function(_0xd1b4x11){if(!_0xd1b4x11){return _0xd1b4xb[_0xe440[30]](404)};var _0xd1b4x1c=_[_0xe440[18]](_0xd1b4x11,_0xd1b4xa[_0xe440[65]]);_0xd1b4x1c[_0xe440[71]]()[_0xe440[15]](function(){return _0xd1b4xb[_0xe440[14]](200)[_0xe440[13]](_0xd1b4x11)})[_0xe440[12]](function(_0xd1b4xd){return handleError(_0xd1b4xb,_0xd1b4xd)})})[_0xe440[12]](function(_0xd1b4xd){return handleError(_0xd1b4xb,_0xd1b4xd)})};exports[_0xe440[72]]=function(_0xd1b4xa,_0xd1b4xb){DefaultReport[_0xe440[36]](_0xd1b4xa[_0xe440[17]][_0xe440[35]])[_0xe440[15]](function(_0xd1b4x11){if(!_0xd1b4x11){return _0xd1b4xb[_0xe440[30]](404)};_0xd1b4x11[_0xe440[72]]()[_0xe440[15]](function(){return _0xd1b4xb[_0xe440[30]](204)})[_0xe440[12]](function(_0xd1b4xd){return handleError(_0xd1b4xb,_0xd1b4xd)})})[_0xe440[12]](function(_0xd1b4xd){return handleError(_0xd1b4xb,_0xd1b4xd)})};function handleError(_0xd1b4xb,_0xd1b4xd){return _0xd1b4xb[_0xe440[14]](500)[_0xe440[13]](_0xd1b4xd)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var DefaultReport = require('../../models').DefaultReport;
+var sequelize = require('../../models').sequelize;
+var CustomReport = require('../../models').CustomReport;
+var ExtractedReport = require('../../models').ExtractedReport;
+var extractUtils = require('../../utils/report_extraction');
+var reportBuildUtils = require('../../utils/report_build');
+var Util = require('../../config/util');
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return DefaultReport
+    .findAndCountAll(Util.getQuery(_.merge(req.query, req.params)))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+
+exports.preview = function(req, res) {
+  var _countAll;
+  DefaultReport
+    .findById(req.params.id, {
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(report) {
+      console.log('found report');
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      var query = reportBuildUtils.buildReport(report.dataValues, req.query);
+      // console.log(query);
+      return sequelize.query(query, {
+        type: sequelize.QueryTypes.SELECT
+      });
+    })
+    .then(function(results) {
+      _countAll = results.length;
+      if (req.query.limit) {
+        var results = _(results).slice(req.query.offset || 0).take(req.query.limit).value();
+      }
+      res.status(200).send({
+        rows: results,
+        count: _countAll
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.extractPdf = function(req, res) {
+  // console.log('extractPdf api function');
+  docExtract(req, res, 'PDF')
+};
+
+exports.extractCsv = function(req, res) {
+  // console.log('extractCsv api function');
+  docExtract(req, res, 'CSV');
+};
+
+function docExtract(req, res, typeFunction) {
+  // console.log('common docExtract api function');
+  DefaultReport
+    .findById(req.params.id, {
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      // console.log('found the report, creating the new DB row for extracted reports..');
+      //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING'
+      return [report, ExtractedReport.create({
+        name: report.name,
+        startDate: req.query.startDate || null,
+        endDate: req.query.endDate || null,
+        output: typeFunction
+      })]
+    })
+    .spread(function(report, extractedReport) {
+      // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction);
+      extractUtils['extract' + typeFunction](report, req.query, extractedReport.id);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+  return res.sendStatus(200);
+}
+
+function getConditions(group) {
+  if (!group) return "";
+  for (var str = "(", i = 0; i < group.rules.length; i++) {
+    i > 0 && (str += " " + group.operator + " ");
+    str += group.rules[i].group ?
+      getConditions(group.rules[i].group) :
+      group.rules[i].field + " " + group.rules[i].condition + " '" + (group.rules[i].condition === 'LIKE' ? "%" + group.rules[i].value + "%" : group.rules[i].value) + "'";
+  }
+
+  return str + ')';
+}
+
+// Get a single report
+exports.show = function(req, res) {
+  DefaultReport
+    .findById(req.params.id, {
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      return res.send(report);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Copy a default report
+exports.copy = function(req, res) {
+  DefaultReport
+    .findById(req.params.id, {
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      var newReport = report.dataValues;
+      delete newReport.id;
+      delete newReport.createdAt;
+      delete newReport.updatedAt;
+      newReport.parent = req.body.parent;
+      newReport.Fields = _.map(newReport.Fields, 'dataValues');
+      _.forEach(newReport.Fields, function(elem) {
+        delete elem.id;
+        delete elem.DefaultReportId;
+        delete elem.createdAt;
+        delete elem.updatedAt;
+      });
+
+      return CustomReport.create(newReport, {
+        include: [{
+          all: true
+        }]
+      })
+    })
+    .then(function() {
+      return res.sendStatus(201);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Creates a new report in the DB.
+exports.create = function(req, res) {
+  DefaultReport
+    .create(req.body)
+    .then(function(report) {
+      return res.status(201).send(report);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing report in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  DefaultReport
+    .findById(req.params.id)
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(report, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(report);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a report from the DB.
+exports.destroy = function(req, res) {
+  DefaultReport
+    .findById(req.params.id)
+    .then(function(report) {
+      if (!report) {
+        return res.sendStatus(404);
+      }
+      report.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index f3119cc..2acd563 100644 (file)
@@ -1 +1,24 @@
-var _0xaf7b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xaf7b[0];var DefaultReport=require(_0xaf7b[2])[_0xaf7b[1]];exports[_0xaf7b[3]]=function(_0x7874x2){DefaultReport[_0xaf7b[4]](function(_0x7874x3){onSave(_0x7874x2,_0x7874x3)});DefaultReport[_0xaf7b[5]](function(_0x7874x3){onRemove(_0x7874x2,_0x7874x3)})};function onSave(_0x7874x2,_0x7874x3,_0x7874x5){_0x7874x2[_0xaf7b[7]](_0xaf7b[6],_0x7874x3)}function onRemove(_0x7874x2,_0x7874x3,_0x7874x5){_0x7874x2[_0xaf7b[7]](_0xaf7b[8],_0x7874x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var DefaultReport = require('../../models').DefaultReport;
+
+exports.register = function(socket) {
+  DefaultReport.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  DefaultReport.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('default_report:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('default_report:remove', doc);
+}
index a148fe4..2a6c81d 100644 (file)
@@ -1 +1,20 @@
-var _0x5d8b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x64\x65\x66\x61\x75\x6C\x74","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x64\x65\x66\x61\x75\x6C\x74","\x67\x65\x74"];_0x5d8b[0];var should=require(_0x5d8b[1]);var app=require(_0x5d8b[2]);var request=require(_0x5d8b[3]);describe(_0x5d8b[4],function(){it(_0x5d8b[5],function(_0xd8b9x4){request(app)[_0x5d8b[13]](_0x5d8b[12])[_0x5d8b[11]](200)[_0x5d8b[11]](_0x5d8b[10],/json/)[_0x5d8b[9]](function(_0xd8b9x5,_0xd8b9x6){if(_0xd8b9x5){return _0xd8b9x4(_0xd8b9x5)};_0xd8b9x6[_0x5d8b[8]][_0x5d8b[1]][_0x5d8b[7]][_0x5d8b[6]](Array);_0xd8b9x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/analytics/reports/default', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/analytic/reports/default')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 30e94cc..550ecd6 100644 (file)
@@ -1 +1,19 @@
-var _0x8e4f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x70\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x63\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8e4f[0];var express=require(_0x8e4f[1]);var controller=require(_0x8e4f[2]);var router=express.Router();router[_0x8e4f[5]](_0x8e4f[3],controller[_0x8e4f[4]]);router[_0x8e4f[5]](_0x8e4f[6],controller[_0x8e4f[7]]);router[_0x8e4f[5]](_0x8e4f[8],controller[_0x8e4f[9]]);router[_0x8e4f[11]](_0x8e4f[3],controller[_0x8e4f[10]]);router[_0x8e4f[5]](_0x8e4f[12],controller[_0x8e4f[13]]);router[_0x8e4f[5]](_0x8e4f[14],controller[_0x8e4f[15]]);router[_0x8e4f[11]](_0x8e4f[16],controller[_0x8e4f[17]]);router[_0x8e4f[19]](_0x8e4f[8],controller[_0x8e4f[18]]);router[_0x8e4f[20]](_0x8e4f[8],controller[_0x8e4f[18]]);router[_0x8e4f[22]](_0x8e4f[8],controller[_0x8e4f[21]]);module[_0x8e4f[23]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./default_report.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id/preview', controller.preview);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.get('/:id/extract/pdf', controller.extractPdf);
+router.get('/:id/extract/csv', controller.extractCsv);
+router.post('/:id/copy', controller.copy);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 7b3bb8a..78e1902 100644 (file)
@@ -1 +1,256 @@
-var _0x5e87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x64\x65\x73\x6B\x2E\x6A\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6F\x61\x75\x74\x68","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65","\x67\x65\x74","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x6A\x73\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x62\x73\x74\x72","\x2F","\x6C\x65\x6E\x67\x74\x68"];_0x5e87[0];var _=require(_0x5e87[1]);var util=require(_0x5e87[2]);var desk=require(_0x5e87[3]);var DeskAccount=require(_0x5e87[5])[_0x5e87[4]];exports[_0x5e87[6]]=function(_0x9866x5,_0x9866x6){var _0x9866x7=[_0x5e87[7],_0x5e87[8],_0x5e87[9],_0x5e87[10]];var _0x9866x8=_0x9866x5[_0x5e87[12]][_0x5e87[11]]?parseInt(_0x9866x5[_0x5e87[12]][_0x5e87[11]],10):100;var _0x9866x9=_0x9866x5[_0x5e87[12]][_0x5e87[13]]?parseInt(_0x9866x5[_0x5e87[12]][_0x5e87[13]],10):0;var _0x9866xa={where:{},limit:_0x9866x8,offset:_0x9866x9*_0x9866x8};_[_0x5e87[27]](_0x9866x5[_0x5e87[12]],function(_0x9866xb,_0x9866xc){switch(_0x9866xc){case _0x5e87[11]:;case _0x5e87[13]:break;case _0x5e87[16]:_0x9866xa[_0x5e87[14]]=util[_0x5e87[19]](_0x5e87[15],_0x9866x5[_0x5e87[12]][_0x5e87[16]],_0x9866x5[_0x5e87[12]][_0x5e87[17]]||_0x5e87[18])||null;break;case _0x5e87[17]:break;case _0x5e87[25]:_0x9866xa[_0x5e87[21]][_0x5e87[20]]=[];_0x9866x7[_0x5e87[24]](function(_0x9866xd){var _0x9866xe={};_0x9866xe[_0x9866xd]={$like:_0x5e87[22]+_0x9866xb+_0x5e87[22]};_0x9866xa[_0x5e87[21]][_0x5e87[20]][_0x5e87[23]](_0x9866xe)});break;default:_0x9866xa[_0x5e87[21]][_0x9866xc]={$like:{}};_0x9866xa[_0x5e87[21]][_0x9866xc][_0x5e87[26]]=_0x5e87[22]+_0x9866xb+_0x5e87[22]}});DeskAccount[_0x5e87[42]](_0x9866xa)[_0x5e87[41]](function(_0x9866x10){var _0x9866x11=Math[_0x5e87[33]](_0x9866x10[_0x5e87[32]]/_0x9866x8);var _0x9866x12=_0x9866x11>(_0x9866xa[_0x5e87[34]]+1)?util[_0x5e87[19]](_0x5e87[35],_0x9866x5[_0x5e87[36]],_0x9866x5[_0x5e87[38]][_0x5e87[37]],_0x9866x5[_0x5e87[39]],_0x9866x9+1):null;var _0x9866x13=_0x9866x9>0?util[_0x5e87[19]](_0x5e87[35],_0x9866x5[_0x5e87[36]],_0x9866x5[_0x5e87[38]][_0x5e87[37]],_0x9866x5[_0x5e87[39]],_0x9866x9-1):null;return _0x9866x6[_0x5e87[30]](200)[_0x5e87[29]]({count:_0x9866x10[_0x5e87[32]],rows:_0x9866x10[_0x5e87[40]],next_page:_0x9866x12,previous_page:_0x9866x13,total_pages:_0x9866x11})})[_0x5e87[31]](function(_0x9866xf){return _0x9866x6[_0x5e87[30]](500)[_0x5e87[29]]({error:_0x5e87[28]})})};exports[_0x5e87[43]]=function(_0x9866x5,_0x9866x6){DeskAccount[_0x5e87[47]](_0x9866x5[_0x5e87[46]][_0x5e87[45]])[_0x5e87[41]](function(_0x9866x14){if(!_0x9866x14){return _0x9866x6[_0x5e87[44]](404)};return _0x9866x6[_0x5e87[29]](_0x9866x14)})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};exports[_0x5e87[48]]=function(_0x9866x5,_0x9866x6,_0x9866x15){DeskAccount[_0x5e87[48]](_0x9866x5[_0x5e87[49]])[_0x5e87[41]](function(_0x9866x14){return _0x9866x6[_0x5e87[30]](201)[_0x5e87[29]](_0x9866x14)})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};exports[_0x5e87[50]]=function(_0x9866x5,_0x9866x6){if(_0x9866x5[_0x5e87[49]][_0x5e87[45]]){delete _0x9866x5[_0x5e87[49]][_0x5e87[45]]};DeskAccount[_0x5e87[47]](_0x9866x5[_0x5e87[46]][_0x5e87[45]])[_0x5e87[41]](function(_0x9866x14){if(!_0x9866x14){return _0x9866x6[_0x5e87[44]](404)};var _0x9866x16=_[_0x5e87[51]](_0x9866x14,_0x9866x5[_0x5e87[49]]);_0x9866x16[_0x5e87[52]]()[_0x5e87[41]](function(){return _0x9866x6[_0x5e87[30]](200)[_0x5e87[29]](_0x9866x14)})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};exports[_0x5e87[53]]=function(_0x9866x5,_0x9866x6){DeskAccount[_0x5e87[47]](_0x9866x5[_0x5e87[46]][_0x5e87[45]])[_0x5e87[41]](function(_0x9866x14){if(!_0x9866x14){return _0x9866x6[_0x5e87[44]](404)};_0x9866x14[_0x5e87[53]]()[_0x5e87[41]](function(){return _0x9866x6[_0x5e87[44]](204)})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};exports[_0x5e87[54]]=function(_0x9866x5,_0x9866x6){DeskAccount[_0x5e87[47]](_0x9866x5[_0x5e87[46]][_0x5e87[45]])[_0x5e87[41]](function(_0x9866x17){var _0x9866x14={endpoint:stripTrailingSlash(_0x9866x17[_0x5e87[10]]),retry:false};if(_0x9866x17[_0x5e87[55]]===_0x5e87[56]){_0x9866x14[_0x5e87[9]]=_0x9866x17[_0x5e87[9]];_0x9866x14[_0x5e87[57]]=_0x9866x17[_0x5e87[57]]}else {if(_0x9866x17[_0x5e87[55]]===_0x5e87[58]){_0x9866x14[_0x5e87[59]]=_0x9866x17[_0x5e87[59]];_0x9866x14[_0x5e87[60]]=_0x9866x17[_0x5e87[60]];_0x9866x14[_0x5e87[61]]=_0x9866x17[_0x5e87[61]];_0x9866x14[_0x5e87[62]]=_0x9866x17[_0x5e87[62]]}};var _0x9866x18=desk[_0x5e87[63]](_0x9866x14);_0x9866x18[_0x5e87[65]](_0x5e87[64],function(_0x9866xf,_0x9866x19,_0x9866x1a){if(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)};return _0x9866x6[_0x5e87[44]](200)})})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};exports[_0x5e87[66]]=function(_0x9866x5,_0x9866x6){var _0x9866x1b={};_0x9866x1b[_0x9866x5[_0x5e87[46]][_0x5e87[67]]]=_0x9866x5[_0x5e87[49]][_0x5e87[68]];DeskAccount[_0x5e87[42]]({where:_0x9866x1b})[_0x5e87[41]](function(_0x9866x10){if(_0x9866x10[_0x5e87[32]]){return _0x9866x6[_0x5e87[30]](200)[_0x5e87[29]]({isValid:false,value:_0x9866x5[_0x5e87[49]][_0x5e87[68]]})};return _0x9866x6[_0x5e87[30]](200)[_0x5e87[29]]({isValid:true,value:_0x9866x5[_0x5e87[49]][_0x5e87[68]]})})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};exports[_0x5e87[69]]=function(_0x9866x5,_0x9866x6){DeskAccount[_0x5e87[47]](_0x9866x5[_0x5e87[46]][_0x5e87[45]])[_0x5e87[41]](function(_0x9866x17){var _0x9866x14={endpoint:stripTrailingSlash(_0x9866x17[_0x5e87[10]]),retry:false};if(_0x9866x17[_0x5e87[55]]===_0x5e87[56]){_0x9866x14[_0x5e87[9]]=_0x9866x17[_0x5e87[9]];_0x9866x14[_0x5e87[57]]=_0x9866x17[_0x5e87[57]]}else {if(_0x9866x17[_0x5e87[55]]===_0x5e87[58]){_0x9866x14[_0x5e87[59]]=_0x9866x17[_0x5e87[59]];_0x9866x14[_0x5e87[60]]=_0x9866x17[_0x5e87[60]];_0x9866x14[_0x5e87[61]]=_0x9866x17[_0x5e87[61]];_0x9866x14[_0x5e87[62]]=_0x9866x17[_0x5e87[62]]}};var _0x9866x18=desk[_0x5e87[63]](_0x9866x14);_0x9866x18[_0x5e87[65]](_0x5e87[70],function(_0x9866xf,_0x9866x19,_0x9866x1a){if(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)};return _0x9866x6[_0x5e87[30]](200)[_0x5e87[73]](_0x9866x19[_0x5e87[72]][_0x5e87[71]])})})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};exports[_0x5e87[74]]=function(_0x9866x5,_0x9866x6){DeskAccount[_0x5e87[53]]({where:{id:_0x9866x5[_0x5e87[12]][_0x5e87[45]]},individualHooks:true})[_0x5e87[41]](function(){return _0x9866x6[_0x5e87[44]](204)})[_0x5e87[31]](function(_0x9866xf){return handleError(_0x9866x6,_0x9866xf)})};function stripTrailingSlash(_0x9866x1d){if(_0x9866x1d[_0x5e87[75]](-1)===_0x5e87[76]){return _0x9866x1d[_0x5e87[75]](0,_0x9866x1d[_0x5e87[77]]-1)};return _0x9866x1d}function handleError(_0x9866x6,_0x9866xf){return _0x9866x6[_0x5e87[30]](500)[_0x5e87[29]](_0x9866xf)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var desk = require('desk.js');
+
+var DeskAccount = require('../../models').DeskAccount;
+
+// Get list of desk_accounts
+exports.index = function(req, res) {
+  var attributes = ['description', 'name', 'username', 'remoteUri'];
+  var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100;
+  var page = req.query.page ? parseInt(req.query.page, 10) : 0;
+
+  var query = {
+    where: {},
+    limit: per_page,
+    offset: page * per_page
+  };
+
+  _.forIn(req.query, function(value, key) {
+    switch (key) {
+      case 'per_page':
+      case 'page':
+        break;
+      case 'sort_by':
+        query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null;
+        break;
+      case 'sort_order':
+        break;
+      case '$':
+        query.where.$or = [];
+        attributes.forEach(function(attribute) {
+          var tmp = {};
+          tmp[attribute] = {
+            $like: '%' + value + '%'
+          };
+
+          query.where.$or.push(tmp);
+        });
+        break;
+      default:
+        query.where[key] = {
+          $like: {}
+        };
+        query.where[key].$like = '%' + value + '%';
+    }
+  });
+
+  DeskAccount
+    .findAndCountAll(query)
+    .then(function(result) {
+
+      var total_pages = Math.ceil(result.count / per_page);
+      var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null;
+      var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null;
+
+      return res.status(200).send({
+        count: result.count,
+        rows: result.rows,
+        next_page: next_page,
+        previous_page: previous_page,
+        total_pages: total_pages
+      });
+
+    })
+    .catch(function(err) {
+      return res.status(500).send({
+        error: 'Something blew up!'
+      });
+    });
+};
+
+// Get a single desk_account
+exports.show = function(req, res) {
+  DeskAccount
+    .findById(req.params.id)
+    .then(function(desk_account) {
+      if (!desk_account) {
+        return res.sendStatus(404);
+      }
+      return res.send(desk_account);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new desk_account in the DB.
+exports.create = function(req, res, next) {
+  DeskAccount
+    .create(req.body)
+    .then(function(desk_account) {
+      return res.status(201).send(desk_account);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing desk_account in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  DeskAccount
+    .findById(req.params.id)
+    .then(function(desk_account) {
+      if (!desk_account) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(desk_account, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(desk_account);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a desk_account from the DB.
+exports.destroy = function(req, res) {
+  DeskAccount
+    .findById(req.params.id)
+    .then(function(desk_account) {
+      if (!desk_account) {
+        return res.sendStatus(404);
+      }
+      desk_account.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.checkAccount = function(req, res) {
+  DeskAccount
+    .findById(req.params.id)
+    .then(function(account) {
+      var desk_account = {
+        endpoint: stripTrailingSlash(account.remoteUri),
+        retry: false
+      };
+      if (account.authType === 'basic') {
+        desk_account.username = account.username;
+        desk_account.password = account.password;
+      } else if (account.authType === 'oauth') {
+        desk_account.consumerKey = account.consumerKey;
+        desk_account.consumerSecret = account.consumerSecret;
+        desk_account.token = account.token;
+        desk_account.tokenSecret = account.tokenSecret;
+      }
+      var client = desk.createClient(desk_account);
+      client.get('/api/v2/users/me', function(err, body, response) {
+        if (err) {
+          return handleError(res, err);
+        }
+        return res.sendStatus(200);
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.deskValidation = function(req, res) {
+  var where = {};
+  where[req.params.field] = req.body.value;
+  DeskAccount
+    .findAndCountAll({
+      where: where
+    })
+    .then(function(result) {
+      if (result.count) {
+        return res.status(200).send({
+          isValid: false,
+          value: req.body.value
+        });
+      }
+      return res.status(200).send({
+        isValid: true,
+        value: req.body.value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.getFields = function(req, res) {
+  DeskAccount
+    .findById(req.params.id)
+    .then(function(account) {
+      var desk_account = {
+        endpoint: stripTrailingSlash(account.remoteUri),
+        retry: false
+      };
+      if (account.authType === 'basic') {
+        desk_account.username = account.username;
+        desk_account.password = account.password;
+      } else if (account.authType === 'oauth') {
+        desk_account.consumerKey = account.consumerKey;
+        desk_account.consumerSecret = account.consumerSecret;
+        desk_account.token = account.token;
+        desk_account.tokenSecret = account.tokenSecret;
+      }
+      var client = desk.createClient(desk_account);
+      client.get('/api/v2/custom_fields', function(err, body, response) {
+        if (err) {
+          return handleError(res, err);
+        }
+        return res.status(200).json(body._embedded.entries);
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+}
+
+exports.bulkDestroy = function(req, res) {
+  DeskAccount
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function stripTrailingSlash(str) {
+  if (str.substr(-1) === '/') {
+    return str.substr(0, str.length - 1);
+  }
+  return str;
+}
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index a459efd..3f7badd 100644 (file)
@@ -1 +1,24 @@
-var _0x4fd6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4fd6[0];var DeskAccount=require(_0x4fd6[2])[_0x4fd6[1]];exports[_0x4fd6[3]]=function(_0x7a87x2){DeskAccount[_0x4fd6[4]](function(_0x7a87x3){onSave(_0x7a87x2,_0x7a87x3)});DeskAccount[_0x4fd6[5]](function(_0x7a87x3){onRemove(_0x7a87x2,_0x7a87x3)})};function onSave(_0x7a87x2,_0x7a87x3,_0x7a87x5){_0x7a87x2[_0x4fd6[7]](_0x4fd6[6],_0x7a87x3)}function onRemove(_0x7a87x2,_0x7a87x3,_0x7a87x5){_0x7a87x2[_0x4fd6[7]](_0x4fd6[8],_0x7a87x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var DeskAccount = require('../../models').DeskAccount;
+
+exports.register = function(socket) {
+  DeskAccount.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  DeskAccount.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('desk_account:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('desk_account:remove', doc);
+}
index e736273..a56fc11 100644 (file)
@@ -1 +1,20 @@
-var _0xf1a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74"];_0xf1a1[0];var should=require(_0xf1a1[1]);var app=require(_0xf1a1[2]);var request=require(_0xf1a1[3]);describe(_0xf1a1[4],function(){it(_0xf1a1[5],function(_0x4a1cx4){request(app)[_0xf1a1[13]](_0xf1a1[12])[_0xf1a1[11]](200)[_0xf1a1[11]](_0xf1a1[10],/json/)[_0xf1a1[9]](function(_0x4a1cx5,_0x4a1cx6){if(_0x4a1cx5){return _0x4a1cx4(_0x4a1cx5)};_0x4a1cx6[_0xf1a1[8]][_0xf1a1[1]][_0xf1a1[7]][_0xf1a1[6]](Array);_0x4a1cx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/desk/accounts', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/desk/accounts')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 5a46183..4a593d0 100644 (file)
@@ -1 +1,19 @@
-var _0xa539=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa539[0];var express=require(_0xa539[1]);var controller=require(_0xa539[2]);var auth=require(_0xa539[3]);var router=express.Router();router[_0xa539[7]](_0xa539[4],auth[_0xa539[5]](),controller[_0xa539[6]]);router[_0xa539[7]](_0xa539[8],auth[_0xa539[5]](),controller[_0xa539[9]]);router[_0xa539[7]](_0xa539[10],auth[_0xa539[5]](),controller[_0xa539[11]]);router[_0xa539[7]](_0xa539[12],auth[_0xa539[5]](),controller[_0xa539[13]]);router[_0xa539[16]](_0xa539[14],auth[_0xa539[5]](),controller[_0xa539[15]]);router[_0xa539[16]](_0xa539[4],auth[_0xa539[5]](),controller[_0xa539[17]]);router[_0xa539[19]](_0xa539[8],auth[_0xa539[5]](),controller[_0xa539[18]]);router[_0xa539[20]](_0xa539[8],auth[_0xa539[5]](),controller[_0xa539[18]]);router[_0xa539[22]](_0xa539[4],auth[_0xa539[5]](),controller[_0xa539[21]]);router[_0xa539[22]](_0xa539[8],auth[_0xa539[5]](),controller[_0xa539[23]]);module[_0xa539[24]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./desk_account.controller');
+var auth = require('../../auth/auth.service');
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/check', auth.isAuthenticated(), controller.checkAccount);
+router.get('/:id/fields', auth.isAuthenticated(), controller.getFields);
+router.post('/validate/:field', auth.isAuthenticated(), controller.deskValidation);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 244c349..3824ca1 100644 (file)
@@ -1 +1,145 @@
-var _0x9ce1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x9ce1[0];var _=require(_0x9ce1[1]);var DeskConfiguration=require(_0x9ce1[3])[_0x9ce1[2]];var DeskField=require(_0x9ce1[3])[_0x9ce1[4]];function handleError(_0x1809x5,_0x1809x6){_0x1809x6=_0x1809x6||500;return function(_0x1809x7){_0x1809x5[_0x9ce1[6]](_0x1809x6)[_0x9ce1[5]](_0x1809x7)}}function responseWithResult(_0x1809x5,_0x1809x6){_0x1809x6=_0x1809x6||200;return function(_0x1809x9){if(_0x1809x9){_0x1809x5[_0x9ce1[6]](_0x1809x6)[_0x9ce1[7]](_0x1809x9)}}}function handleEntityNotFound(_0x1809x5){return function(_0x1809x9){if(!_0x1809x9){_0x1809x5[_0x9ce1[6]](404)[_0x9ce1[8]]();return null};return _0x1809x9}}function saveUpdates(_0x1809xc){return function(_0x1809x9){return _0x1809x9[_0x9ce1[10]](_0x1809xc)[_0x9ce1[9]](function(_0x1809xd){return _0x1809xd})}}function removeEntity(_0x1809x5){return function(_0x1809x9){if(_0x1809x9){return _0x1809x9[_0x9ce1[11]]()[_0x9ce1[9]](function(){_0x1809x5[_0x9ce1[6]](204)[_0x9ce1[8]]()})}}}exports[_0x9ce1[12]]=function(_0x1809xf,_0x1809x5){DeskConfiguration[_0x9ce1[15]]({where:_0x1809xf[_0x9ce1[14]]})[_0x9ce1[9]](responseWithResult(_0x1809x5))[_0x9ce1[13]](handleError(_0x1809x5))};exports[_0x9ce1[16]]=function(_0x1809xf,_0x1809x5){DeskConfiguration[_0x9ce1[22]]({where:{id:_0x1809xf[_0x9ce1[18]][_0x9ce1[17]]},include:[{model:DeskField,as:_0x9ce1[19]},{model:DeskField,as:_0x9ce1[20]},{model:DeskField,as:_0x9ce1[21]}]})[_0x9ce1[9]](handleEntityNotFound(_0x1809x5))[_0x9ce1[9]](responseWithResult(_0x1809x5))[_0x9ce1[13]](handleError(_0x1809x5))};exports[_0x9ce1[23]]=function(_0x1809xf,_0x1809x5){DeskConfiguration[_0x9ce1[23]](_0x1809xf[_0x9ce1[24]])[_0x9ce1[9]](responseWithResult(_0x1809x5,201))[_0x9ce1[13]](handleError(_0x1809x5))};exports[_0x9ce1[25]]=function(_0x1809xf,_0x1809x5){if(_0x1809xf[_0x9ce1[24]][_0x9ce1[17]]){delete _0x1809xf[_0x9ce1[24]][_0x9ce1[17]]};DeskConfiguration[_0x9ce1[26]](_0x1809xf[_0x9ce1[18]][_0x9ce1[17]])[_0x9ce1[9]](handleEntityNotFound(_0x1809x5))[_0x9ce1[9]](saveUpdates(_0x1809xf[_0x9ce1[24]]))[_0x9ce1[9]](responseWithResult(_0x1809x5))[_0x9ce1[13]](handleError(_0x1809x5))};exports[_0x9ce1[11]]=function(_0x1809xf,_0x1809x5){DeskConfiguration[_0x9ce1[26]](_0x1809xf[_0x9ce1[18]][_0x9ce1[17]])[_0x9ce1[9]](handleEntityNotFound(_0x1809x5))[_0x9ce1[9]](removeEntity(_0x1809x5))[_0x9ce1[13]](handleError(_0x1809x5))};exports[_0x9ce1[27]]=function(_0x1809xf,_0x1809x5,_0x1809x10){var _0x1809x11;DeskConfiguration[_0x9ce1[26]](_0x1809xf[_0x9ce1[18]][_0x9ce1[17]])[_0x9ce1[9]](handleEntityNotFound(_0x1809x5))[_0x9ce1[9]](function(_0x1809x14){_0x1809x11=_0x1809x14;return DeskField[_0x9ce1[23]](_0x1809xf[_0x9ce1[24]])})[_0x9ce1[9]](function(_0x1809x13){switch(_0x1809xf[_0x9ce1[18]][_0x9ce1[35]]){case _0x9ce1[30]:return [_0x1809x11[_0x9ce1[29]](_0x1809x13),_0x1809x13];case _0x9ce1[32]:return [_0x1809x11[_0x9ce1[31]](_0x1809x13),_0x1809x13];case _0x9ce1[34]:return [_0x1809x11[_0x9ce1[33]](_0x1809x13),_0x1809x13]}})[_0x9ce1[28]](function(_0x1809x12,_0x1809x13){return _0x1809x5[_0x9ce1[6]](201)[_0x9ce1[7]](_0x1809x13)})[_0x9ce1[13]](handleError(_0x1809x5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/desk/configurations              ->  index
+ * POST    /api/desk/configurations              ->  create
+ * GET     /api/desk/configurations/:id          ->  show
+ * PUT     /api/desk/configurations/:id          ->  update
+ * DELETE  /api/desk/configurations/:id          ->  destroy
+ */
+
+'use strict';
+
+var _ = require('lodash');
+
+var DeskConfiguration = require('../../models').DeskConfiguration;
+var DeskField = require('../../models').DeskField;
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of DeskConfigurations
+exports.index = function(req, res) {
+  DeskConfiguration.findAll({
+      where: req.query
+    })
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single DeskConfiguration from the DB
+exports.show = function(req, res) {
+  DeskConfiguration.find({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        model: DeskField,
+        as: 'Subject'
+      }, {
+        model: DeskField,
+        as: 'Description'
+      }, {
+        model: DeskField,
+        as: 'Field'
+      }]
+    })
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new DeskConfiguration in the DB
+exports.create = function(req, res) {
+  DeskConfiguration.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing DeskConfiguration in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  DeskConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a DeskConfiguration from the DB
+exports.destroy = function(req, res) {
+  DeskConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+exports.addConfigurationField = function(req, res, next) {
+  // console.log(req.params);
+  var deskConfiguration;
+  DeskConfiguration
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(desk_configuration) {
+      deskConfiguration = desk_configuration;
+      return DeskField.create(req.body)
+    })
+    .then(function(deskField) {
+      switch (req.params.type) {
+        case 'subject':
+          return [deskConfiguration.addSubject(deskField), deskField];
+        case 'description':
+          return [deskConfiguration.addDescription(deskField), deskField];
+        case 'field':
+          return [deskConfiguration.addField(deskField), deskField];
+      }
+    })
+    .spread(function(data, deskField) {
+      return res.status(201).json(deskField);
+    })
+    .catch(handleError(res));
+};
index 7c89298..d26e4f6 100644 (file)
@@ -1 +1,24 @@
-var _0xe80f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xe80f[0];var DeskConfiguration=require(_0xe80f[2])[_0xe80f[1]];exports[_0xe80f[3]]=function(_0x4a40x2){DeskConfiguration[_0xe80f[4]](function(_0x4a40x3){onSave(_0x4a40x2,_0x4a40x3)});DeskConfiguration[_0xe80f[5]](function(_0x4a40x3){onRemove(_0x4a40x2,_0x4a40x3)})};function onSave(_0x4a40x2,_0x4a40x3,_0x4a40x5){_0x4a40x2[_0xe80f[7]](_0xe80f[6],_0x4a40x3)}function onRemove(_0x4a40x2,_0x4a40x3,_0x4a40x5){_0x4a40x2[_0xe80f[7]](_0xe80f[8],_0x4a40x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var DeskConfiguration = require('../../models').DeskConfiguration;
+
+exports.register = function(socket) {
+  DeskConfiguration.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  DeskConfiguration.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('desk_configuration:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('desk_configuration:remove', doc);
+}
index e24b557..91adaf0 100644 (file)
@@ -1 +1,19 @@
-var _0xabea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xabea[0];var express=require(_0xabea[1]);var auth=require(_0xabea[2]);var controller=require(_0xabea[3]);var router=express.Router();router[_0xabea[7]](_0xabea[4],auth[_0xabea[5]](),controller[_0xabea[6]]);router[_0xabea[7]](_0xabea[8],auth[_0xabea[5]](),controller[_0xabea[9]]);router[_0xabea[11]](_0xabea[4],auth[_0xabea[5]](),controller[_0xabea[10]]);router[_0xabea[13]](_0xabea[8],auth[_0xabea[5]](),controller[_0xabea[12]]);router[_0xabea[11]](_0xabea[14],auth[_0xabea[5]](),controller[_0xabea[15]]);router[_0xabea[16]](_0xabea[8],auth[_0xabea[5]](),controller[_0xabea[12]]);router[_0xabea[18]](_0xabea[8],auth[_0xabea[5]](),controller[_0xabea[17]]);module[_0xabea[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./desk_configuration.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.post('/:id/:type', auth.isAuthenticated(), controller.addConfigurationField);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index fec2d69..fd6b650 100644 (file)
@@ -1 +1,97 @@
-var _0xe7ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xe7ed[0];var proxyquire=require(_0xe7ed[2])[_0xe7ed[1]]();var deskConfigurationCtrlStub={index:_0xe7ed[3],show:_0xe7ed[4],create:_0xe7ed[5],update:_0xe7ed[6],destroy:_0xe7ed[7]};var routerStub={get:sinon[_0xe7ed[8]](),put:sinon[_0xe7ed[8]](),patch:sinon[_0xe7ed[8]](),post:sinon[_0xe7ed[8]](),delete:sinon[_0xe7ed[8]]()};var deskConfigurationIndex=proxyquire(_0xe7ed[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":deskConfigurationCtrlStub});describe(_0xe7ed[10],function(){it(_0xe7ed[11],function(){expect(deskConfigurationIndex)[_0xe7ed[13]][_0xe7ed[12]](routerStub)});describe(_0xe7ed[14],function(){it(_0xe7ed[15],function(){expect(routerStub[_0xe7ed[21]][_0xe7ed[20]](_0xe7ed[19],_0xe7ed[3]))[_0xe7ed[13]][_0xe7ed[18]][_0xe7ed[17]][_0xe7ed[16]]})});describe(_0xe7ed[22],function(){it(_0xe7ed[23],function(){expect(routerStub[_0xe7ed[21]][_0xe7ed[20]](_0xe7ed[24],_0xe7ed[4]))[_0xe7ed[13]][_0xe7ed[18]][_0xe7ed[17]][_0xe7ed[16]]})});describe(_0xe7ed[25],function(){it(_0xe7ed[26],function(){expect(routerStub[_0xe7ed[27]][_0xe7ed[20]](_0xe7ed[19],_0xe7ed[5]))[_0xe7ed[13]][_0xe7ed[18]][_0xe7ed[17]][_0xe7ed[16]]})});describe(_0xe7ed[28],function(){it(_0xe7ed[29],function(){expect(routerStub[_0xe7ed[30]][_0xe7ed[20]](_0xe7ed[24],_0xe7ed[6]))[_0xe7ed[13]][_0xe7ed[18]][_0xe7ed[17]][_0xe7ed[16]]})});describe(_0xe7ed[31],function(){it(_0xe7ed[29],function(){expect(routerStub[_0xe7ed[32]][_0xe7ed[20]](_0xe7ed[24],_0xe7ed[6]))[_0xe7ed[13]][_0xe7ed[18]][_0xe7ed[17]][_0xe7ed[16]]})});describe(_0xe7ed[33],function(){it(_0xe7ed[34],function(){expect(routerStub[_0xe7ed[35]][_0xe7ed[20]](_0xe7ed[24],_0xe7ed[7]))[_0xe7ed[13]][_0xe7ed[18]][_0xe7ed[17]][_0xe7ed[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var deskConfigurationCtrlStub = {
+  index: 'deskConfigurationCtrl.index',
+  show: 'deskConfigurationCtrl.show',
+  create: 'deskConfigurationCtrl.create',
+  update: 'deskConfigurationCtrl.update',
+  destroy: 'deskConfigurationCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var deskConfigurationIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './desk_configuration.controller': deskConfigurationCtrlStub
+});
+
+describe('DeskConfiguration API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(deskConfigurationIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/desk/configurations', function() {
+
+    it('should route to deskConfiguration.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'deskConfigurationCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/desk/configurations/:id', function() {
+
+    it('should route to deskConfiguration.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'deskConfigurationCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/desk/configurations', function() {
+
+    it('should route to deskConfiguration.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'deskConfigurationCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/desk/configurations/:id', function() {
+
+    it('should route to deskConfiguration.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'deskConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/desk/configurations/:id', function() {
+
+    it('should route to deskConfiguration.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'deskConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/desk/configurations/:id', function() {
+
+    it('should route to deskConfiguration.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'deskConfigurationCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 4f53d40..6b39f83 100644 (file)
@@ -1 +1,104 @@
-var _0x8188=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x8188[0];var _=require(_0x8188[1]);var DeskField=require(_0x8188[3])[_0x8188[2]];function handleError(_0xc9e6x4,_0xc9e6x5){_0xc9e6x5=_0xc9e6x5||500;return function(_0xc9e6x6){_0xc9e6x4[_0x8188[5]](_0xc9e6x5)[_0x8188[4]](_0xc9e6x6)}}function responseWithResult(_0xc9e6x4,_0xc9e6x5){_0xc9e6x5=_0xc9e6x5||200;return function(_0xc9e6x8){if(_0xc9e6x8){_0xc9e6x4[_0x8188[5]](_0xc9e6x5)[_0x8188[6]](_0xc9e6x8)}}}function handleEntityNotFound(_0xc9e6x4){return function(_0xc9e6x8){if(!_0xc9e6x8){_0xc9e6x4[_0x8188[5]](404)[_0x8188[7]]();return null};return _0xc9e6x8}}function saveUpdates(_0xc9e6xb){return function(_0xc9e6x8){return _0xc9e6x8[_0x8188[9]](_0xc9e6xb)[_0x8188[8]](function(_0xc9e6xc){return _0xc9e6xc})}}function removeEntity(_0xc9e6x4){return function(_0xc9e6x8){if(_0xc9e6x8){return _0xc9e6x8[_0x8188[10]]()[_0x8188[8]](function(){_0xc9e6x4[_0x8188[5]](204)[_0x8188[7]]()})}}}exports[_0x8188[11]]=function(_0xc9e6xe,_0xc9e6x4){DeskField[_0x8188[13]]()[_0x8188[8]](responseWithResult(_0xc9e6x4))[_0x8188[12]](handleError(_0xc9e6x4))};exports[_0x8188[14]]=function(_0xc9e6xe,_0xc9e6x4){DeskField[_0x8188[17]](_0xc9e6xe[_0x8188[16]][_0x8188[15]])[_0x8188[8]](handleEntityNotFound(_0xc9e6x4))[_0x8188[8]](responseWithResult(_0xc9e6x4))[_0x8188[12]](handleError(_0xc9e6x4))};exports[_0x8188[18]]=function(_0xc9e6xe,_0xc9e6x4){DeskField[_0x8188[18]](_0xc9e6xe[_0x8188[19]])[_0x8188[8]](responseWithResult(_0xc9e6x4,201))[_0x8188[12]](handleError(_0xc9e6x4))};exports[_0x8188[20]]=function(_0xc9e6xe,_0xc9e6x4){if(_0xc9e6xe[_0x8188[19]][_0x8188[15]]){delete _0xc9e6xe[_0x8188[19]][_0x8188[15]]};DeskField[_0x8188[17]](_0xc9e6xe[_0x8188[16]][_0x8188[15]])[_0x8188[8]](handleEntityNotFound(_0xc9e6x4))[_0x8188[8]](saveUpdates(_0xc9e6xe[_0x8188[19]]))[_0x8188[8]](responseWithResult(_0xc9e6x4))[_0x8188[12]](handleError(_0xc9e6x4))};exports[_0x8188[10]]=function(_0xc9e6xe,_0xc9e6x4){DeskField[_0x8188[17]](_0xc9e6xe[_0x8188[16]][_0x8188[15]])[_0x8188[8]](handleEntityNotFound(_0xc9e6x4))[_0x8188[8]](removeEntity(_0xc9e6x4))[_0x8188[12]](handleError(_0xc9e6x4))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/desk/fields              ->  index
+ * POST    /api/desk/fields              ->  create
+ * GET     /api/desk/fields/:id          ->  show
+ * PUT     /api/desk/fields/:id          ->  update
+ * DELETE  /api/desk/fields/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var DeskField = require('../../models').DeskField;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of DeskFields
+exports.index = function(req, res) {
+  DeskField.findAll()
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single DeskField from the DB
+exports.show = function(req, res) {
+  DeskField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new DeskField in the DB
+exports.create = function(req, res) {
+  DeskField.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing DeskField in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  DeskField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a DeskField from the DB
+exports.destroy = function(req, res) {
+  DeskField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
index 830230f..b01d8f1 100644 (file)
@@ -1 +1,24 @@
-var _0x4ba3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4ba3[0];var DeskField=require(_0x4ba3[2])[_0x4ba3[1]];exports[_0x4ba3[3]]=function(_0x6de0x2){DeskField[_0x4ba3[4]](function(_0x6de0x3){onSave(_0x6de0x2,_0x6de0x3)});DeskField[_0x4ba3[5]](function(_0x6de0x3){onRemove(_0x6de0x2,_0x6de0x3)})};function onSave(_0x6de0x2,_0x6de0x3,_0x6de0x5){_0x6de0x2[_0x4ba3[7]](_0x4ba3[6],_0x6de0x3)}function onRemove(_0x6de0x2,_0x6de0x3,_0x6de0x5){_0x6de0x2[_0x4ba3[7]](_0x4ba3[8],_0x6de0x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var DeskField = require('../../models').DeskField;
+
+exports.register = function(socket) {
+  DeskField.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  DeskField.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('desk_field:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('desk_field:remove', doc);
+}
index ca9e96e..266676c 100644 (file)
@@ -1 +1,18 @@
-var _0xe594=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe594[0];var express=require(_0xe594[1]);var auth=require(_0xe594[2]);var controller=require(_0xe594[3]);var router=express.Router();router[_0xe594[7]](_0xe594[4],auth[_0xe594[5]](),controller[_0xe594[6]]);router[_0xe594[7]](_0xe594[8],auth[_0xe594[5]](),controller[_0xe594[9]]);router[_0xe594[11]](_0xe594[4],auth[_0xe594[5]](),controller[_0xe594[10]]);router[_0xe594[13]](_0xe594[8],auth[_0xe594[5]](),controller[_0xe594[12]]);router[_0xe594[14]](_0xe594[8],auth[_0xe594[5]](),controller[_0xe594[12]]);router[_0xe594[16]](_0xe594[8],auth[_0xe594[5]](),controller[_0xe594[15]]);module[_0xe594[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./desk_field.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 5d7501c..fef888c 100644 (file)
@@ -1 +1,97 @@
-var _0x493b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0x493b[0];var proxyquire=require(_0x493b[2])[_0x493b[1]]();var deskFieldCtrlStub={index:_0x493b[3],show:_0x493b[4],create:_0x493b[5],update:_0x493b[6],destroy:_0x493b[7]};var routerStub={get:sinon[_0x493b[8]](),put:sinon[_0x493b[8]](),patch:sinon[_0x493b[8]](),post:sinon[_0x493b[8]](),delete:sinon[_0x493b[8]]()};var deskFieldIndex=proxyquire(_0x493b[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":deskFieldCtrlStub});describe(_0x493b[10],function(){it(_0x493b[11],function(){expect(deskFieldIndex)[_0x493b[13]][_0x493b[12]](routerStub)});describe(_0x493b[14],function(){it(_0x493b[15],function(){expect(routerStub[_0x493b[21]][_0x493b[20]](_0x493b[19],_0x493b[3]))[_0x493b[13]][_0x493b[18]][_0x493b[17]][_0x493b[16]]})});describe(_0x493b[22],function(){it(_0x493b[23],function(){expect(routerStub[_0x493b[21]][_0x493b[20]](_0x493b[24],_0x493b[4]))[_0x493b[13]][_0x493b[18]][_0x493b[17]][_0x493b[16]]})});describe(_0x493b[25],function(){it(_0x493b[26],function(){expect(routerStub[_0x493b[27]][_0x493b[20]](_0x493b[19],_0x493b[5]))[_0x493b[13]][_0x493b[18]][_0x493b[17]][_0x493b[16]]})});describe(_0x493b[28],function(){it(_0x493b[29],function(){expect(routerStub[_0x493b[30]][_0x493b[20]](_0x493b[24],_0x493b[6]))[_0x493b[13]][_0x493b[18]][_0x493b[17]][_0x493b[16]]})});describe(_0x493b[31],function(){it(_0x493b[29],function(){expect(routerStub[_0x493b[32]][_0x493b[20]](_0x493b[24],_0x493b[6]))[_0x493b[13]][_0x493b[18]][_0x493b[17]][_0x493b[16]]})});describe(_0x493b[33],function(){it(_0x493b[34],function(){expect(routerStub[_0x493b[35]][_0x493b[20]](_0x493b[24],_0x493b[7]))[_0x493b[13]][_0x493b[18]][_0x493b[17]][_0x493b[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var deskFieldCtrlStub = {
+  index: 'deskFieldCtrl.index',
+  show: 'deskFieldCtrl.show',
+  create: 'deskFieldCtrl.create',
+  update: 'deskFieldCtrl.update',
+  destroy: 'deskFieldCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var deskFieldIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './desk_field.controller': deskFieldCtrlStub
+});
+
+describe('DeskField API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(deskFieldIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/desk/fields', function() {
+
+    it('should route to deskField.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'deskFieldCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/desk/fields/:id', function() {
+
+    it('should route to deskField.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'deskFieldCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/desk/fields', function() {
+
+    it('should route to deskField.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'deskFieldCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/desk/fields/:id', function() {
+
+    it('should route to deskField.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'deskFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/desk/fields/:id', function() {
+
+    it('should route to deskField.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'deskFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/desk/fields/:id', function() {
+
+    it('should route to deskField.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'deskFieldCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 860c06c..3d57d37 100644 (file)
@@ -1 +1,197 @@
-var _0x12c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6C\x6F\x67","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x6E\x63\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x74\x72\x6F\x79","\x52\x5F\x4F\x4B","\x57\x5F\x4F\x4B","\x46\x69\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x6F\x72\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x70\x65\x72\x6D\x69\x74\x74\x65\x64","\x65\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x20\x64\x65\x6C\x65\x74\x69\x6E\x67\x20\x66\x69\x6C\x65\x20\x3A","\x66\x69\x6C\x65\x20\x64\x65\x6C\x65\x74\x65\x64","\x75\x6E\x6C\x69\x6E\x6B","\x61\x63\x63\x65\x73\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x66\x6F\x72\x45\x61\x63\x68","\x69\x64\x73"];_0x12c0[0];var _=require(_0x12c0[1]);var ExtractedReport=require(_0x12c0[3])[_0x12c0[2]];var util=require(_0x12c0[4]);var path=require(_0x12c0[5]);var moment=require(_0x12c0[6]);var config=require(_0x12c0[7]);var base64=require(_0x12c0[8]);var fs=require(_0x12c0[9]);var Util=require(_0x12c0[10]);exports[_0x12c0[11]]=function(_0x55a6xa,_0x55a6xb,_0x55a6xc){return ExtractedReport[_0x12c0[18]](Util[_0x12c0[17]](_0x55a6xa[_0x12c0[16]]))[_0x12c0[15]](function(_0x55a6xe){_0x55a6xb[_0x12c0[14]](200)[_0x12c0[13]](_0x55a6xe)})[_0x12c0[12]](function(_0x55a6xd){return handleError(_0x55a6xb,_0x55a6xd)})};exports[_0x12c0[19]]=function(_0x55a6xa,_0x55a6xb){ExtractedReport[_0x12c0[23]](_0x55a6xa[_0x12c0[22]][_0x12c0[21]])[_0x12c0[15]](function(_0x55a6xf){if(!_0x55a6xf){return _0x55a6xb[_0x12c0[20]](404)};return _0x55a6xb[_0x12c0[13]](_0x55a6xf)})[_0x12c0[12]](function(_0x55a6xd){return handleError(_0x55a6xb,_0x55a6xd)})};exports[_0x12c0[24]]=function(_0x55a6xa,_0x55a6xb){ExtractedReport[_0x12c0[23]](_0x55a6xa[_0x12c0[22]][_0x12c0[21]])[_0x12c0[15]](function(_0x55a6x10){if(!_0x55a6x10){return _0x55a6xb[_0x12c0[14]](404)[_0x12c0[13]](_0x55a6x10)};var _0x55a6x11=path[_0x12c0[31]](config[_0x12c0[26]],_0x12c0[27],_0x12c0[28],_0x12c0[29],_0x55a6x10[_0x12c0[30]]);base64[_0x12c0[32]](_0x55a6x11,function(_0x55a6xd,_0x55a6x12){if(_0x55a6xd){console[_0x12c0[25]](_0x55a6xd);return handleError(_0x55a6xb,_0x55a6xd)}else {return _0x55a6xb[_0x12c0[14]](200)[_0x12c0[13]]({downloadString:_0x55a6x12})}})})[_0x12c0[12]](function(_0x55a6xd){console[_0x12c0[25]](_0x55a6xd);return handleError(_0x55a6xb,_0x55a6xd)})};exports[_0x12c0[33]]=function(_0x55a6xa,_0x55a6xb){ExtractedReport[_0x12c0[33]](_0x55a6xa[_0x12c0[34]])[_0x12c0[15]](function(_0x55a6xf){return _0x55a6xb[_0x12c0[14]](201)[_0x12c0[13]](_0x55a6xf)})[_0x12c0[12]](function(_0x55a6xd){return handleError(_0x55a6xb,_0x55a6xd)})};exports[_0x12c0[35]]=function(_0x55a6xa,_0x55a6xb){ExtractedReport[_0x12c0[39]]({where:{name:_0x55a6xa[_0x12c0[34]][_0x12c0[38]],id:{$ne:_0x55a6xa[_0x12c0[34]][_0x12c0[21]]}}})[_0x12c0[15]](function(_0x55a6x13){if(!_0x55a6x13){return _0x55a6xb[_0x12c0[20]](404)};if(_0x55a6xa[_0x12c0[34]][_0x12c0[21]]){delete _0x55a6xa[_0x12c0[34]][_0x12c0[21]]};ExtractedReport[_0x12c0[23]](_0x55a6xa[_0x12c0[22]][_0x12c0[21]])[_0x12c0[15]](function(_0x55a6xf){if(!_0x55a6xf){return _0x55a6xb[_0x12c0[20]](404)};var _0x55a6x14=_[_0x12c0[36]](_0x55a6xf,_0x55a6xa[_0x12c0[34]]);_0x55a6x14[_0x12c0[37]]()[_0x12c0[15]](function(){return _0x55a6xb[_0x12c0[14]](200)[_0x12c0[13]](_0x55a6xf)})[_0x12c0[12]](function(_0x55a6xd){return handleError(_0x55a6xb,_0x55a6xd)})})[_0x12c0[12]](function(_0x55a6xd){return handleError(_0x55a6xb,_0x55a6xd)})})[_0x12c0[12]](function(_0x55a6xd){return handleError(_0x55a6xb,_0x55a6xd)})};exports[_0x12c0[40]]=function(_0x55a6xa,_0x55a6xb){var _0x55a6x15;ExtractedReport[_0x12c0[23]](_0x55a6xa[_0x12c0[22]][_0x12c0[21]])[_0x12c0[15]](function(_0x55a6xf){_0x55a6x15=_0x55a6xf;if(!_0x55a6xf){return _0x55a6xb[_0x12c0[20]](404)};return _0x55a6xf[_0x12c0[40]]()})[_0x12c0[15]](function(){if(_0x55a6x15[_0x12c0[30]]){var _0x55a6x11=path[_0x12c0[31]](config[_0x12c0[26]],_0x12c0[27],_0x12c0[28],_0x12c0[29],_0x55a6x15[_0x12c0[30]]);fs[_0x12c0[48]](_0x55a6x11,fs[_0x12c0[41]]|fs[_0x12c0[42]],function(_0x55a6xd){if(_0x55a6xd){console[_0x12c0[44]](_0x12c0[43])}else {fs[_0x12c0[47]](_0x55a6x11,function(_0x55a6xd){if(_0x55a6xd){console[_0x12c0[44]](_0x12c0[45],_0x55a6xd)}else {console[_0x12c0[25]](_0x12c0[46])}})}})};return _0x55a6xb[_0x12c0[20]](204)})[_0x12c0[12]](function(_0x55a6xd){console[_0x12c0[25]](_0x55a6xd);return handleError(_0x55a6xb,_0x55a6xd)})};exports[_0x12c0[49]]=function(_0x55a6xa,_0x55a6xb){ExtractedReport[_0x12c0[39]]({where:{id:_0x55a6xa[_0x12c0[16]][_0x12c0[51]]}})[_0x12c0[15]](function(_0x55a6x16){_0x55a6x16[_0x12c0[50]](function(_0x55a6xf){_0x55a6xf[_0x12c0[40]]()[_0x12c0[15]](function(){if(_0x55a6xf[_0x12c0[30]]){var _0x55a6x11=path[_0x12c0[31]](config[_0x12c0[26]],_0x12c0[27],_0x12c0[28],_0x12c0[29],_0x55a6xf[_0x12c0[30]]);fs[_0x12c0[48]](_0x55a6x11,fs[_0x12c0[41]]|fs[_0x12c0[42]],function(_0x55a6xd){if(_0x55a6xd){console[_0x12c0[44]](_0x12c0[43])}else {fs[_0x12c0[47]](_0x55a6x11,function(_0x55a6xd){if(_0x55a6xd){console[_0x12c0[44]](_0x12c0[45],_0x55a6xd)}else {console[_0x12c0[25]](_0x12c0[46])}})}})}})[_0x12c0[12]](function(_0x55a6xd){console[_0x12c0[25]](_0x55a6xd)})});return _0x55a6xb[_0x12c0[20]](204)})[_0x12c0[12]](function(_0x55a6xd){return handleError(_0x55a6xb,_0x55a6xd)})};function handleError(_0x55a6xb,_0x55a6xd){return _0x55a6xb[_0x12c0[14]](500)[_0x12c0[13]](_0x55a6xd)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ExtractedReport = require('../../models').ExtractedReport;
+var util = require('util');
+var path = require('path');
+var moment = require('moment');
+var config = require('../../config/environment');
+var base64 = require('file-base64');
+var fs = require('fs');
+var Util = require('../../config/util');
+
+// Get list of extracted_reports
+exports.index = function(req, res, next) {
+  return ExtractedReport
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single extracted_reports
+exports.show = function(req, res) {
+  ExtractedReport
+    .findById(req.params.id)
+    .then(function(extracted) {
+      if (!extracted) {
+        return res.sendStatus(404);
+      }
+      return res.send(extracted);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.download = function(req, res) {
+  ExtractedReport
+    .findById(req.params.id)
+    .then(function(extract) {
+      if (!extract) {
+        return res.status(404).send(extract);
+      }
+      var filepath = path.join(config.root, 'server', 'files', 'reports', extract.savename);
+      base64.encode(filepath, function(err, base64String) {
+        if (err) {
+          console.log(err);
+          return handleError(res, err);
+        } else {
+          return res.status(200).send({
+            downloadString: base64String
+          });
+        }
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Creates a new extracted_report in the DB.
+exports.create = function(req, res) {
+  ExtractedReport
+    .create(req.body)
+    .then(function(extracted) {
+      return res.status(201).send(extracted);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing extracted_report in the DB.
+exports.update = function(req, res) {
+  ExtractedReport
+    .findAll({
+      where: {
+        name: req.body.name,
+        id: {
+          $ne: req.body.id
+        }
+      }
+    })
+    .then(function(extracted_reports) {
+      if (!extracted_reports) {
+        return res.sendStatus(404);
+      }
+      if (req.body.id) {
+        delete req.body.id;
+      }
+      ExtractedReport
+        .findById(req.params.id)
+        .then(function(extracted) {
+          if (!extracted) {
+            return res.sendStatus(404);
+          }
+          var updated = _.merge(extracted, req.body);
+          updated.save()
+            .then(function() {
+              return res.status(200).send(extracted);
+            })
+            .catch(function(err) {
+              return handleError(res, err);
+            });
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes an extracted_report from the DB.
+exports.destroy = function(req, res) {
+  var _extracted;
+  ExtractedReport
+    .findById(req.params.id)
+    .then(function(extracted) {
+      _extracted = extracted;
+      if (!extracted) {
+        return res.sendStatus(404);
+      }
+      return extracted.destroy();
+    })
+    .then(function() {
+      if (_extracted.savename) {
+        var filepath = path.join(config.root, 'server', 'files', 'reports', _extracted.savename);
+        fs.access(filepath, fs.R_OK | fs.W_OK, function(err) {
+          if (err) {
+            console.error('File does not exist or operation not permitted');
+          } else {
+            fs.unlink(filepath, function(err) {
+              if (err) {
+                console.error('error deleting file :', err);
+              } else {
+                console.log('file deleted');
+              }
+            })
+          }
+        });
+      }
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  ExtractedReport
+    .findAll({
+      where: {
+        id: req.query.ids
+      }
+    })
+    .then(function(extracts) {
+      extracts.forEach(function(extracted) {
+        extracted.destroy()
+          .then(function() {
+            if (extracted.savename) {
+              var filepath = path.join(config.root, 'server', 'files', 'reports', extracted.savename);
+              fs.access(filepath, fs.R_OK | fs.W_OK, function(err) {
+                if (err) {
+                  console.error('File does not exist or operation not permitted');
+                } else {
+                  fs.unlink(filepath, function(err) {
+                    if (err) {
+                      console.error('error deleting file :', err);
+                    } else {
+                      console.log('file deleted');
+                    }
+                  })
+                }
+              });
+            }
+          })
+          .catch(function(err) {
+            console.log(err);
+          });
+      });
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 00fe04b..faf3482 100644 (file)
@@ -1 +1,24 @@
-var _0xcad1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xcad1[0];var ExtractedReport=require(_0xcad1[2])[_0xcad1[1]];exports[_0xcad1[3]]=function(_0x26d7x2){ExtractedReport[_0xcad1[4]](function(_0x26d7x3){onSave(_0x26d7x2,_0x26d7x3)});ExtractedReport[_0xcad1[5]](function(_0x26d7x3){onRemove(_0x26d7x2,_0x26d7x3)})};function onSave(_0x26d7x2,_0x26d7x3,_0x26d7x5){_0x26d7x2[_0xcad1[7]](_0xcad1[6],_0x26d7x3)}function onRemove(_0x26d7x2,_0x26d7x3,_0x26d7x5){_0x26d7x2[_0xcad1[7]](_0xcad1[8],_0x26d7x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ExtractedReport = require('../../models').ExtractedReport;
+
+exports.register = function(socket) {
+  ExtractedReport.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ExtractedReport.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('extracted_report:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('extracted_report:remove', doc);
+}
index 9efce0f..0830865 100644 (file)
@@ -1 +1,20 @@
-var _0x3414=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64","\x67\x65\x74"];_0x3414[0];var should=require(_0x3414[1]);var app=require(_0x3414[2]);var request=require(_0x3414[3]);describe(_0x3414[4],function(){it(_0x3414[5],function(_0x61a3x4){request(app)[_0x3414[13]](_0x3414[12])[_0x3414[11]](200)[_0x3414[11]](_0x3414[10],/json/)[_0x3414[9]](function(_0x61a3x5,_0x61a3x6){if(_0x61a3x5){return _0x61a3x4(_0x61a3x5)};_0x61a3x6[_0x3414[8]][_0x3414[1]][_0x3414[7]][_0x3414[6]](Array);_0x61a3x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/analytics/extracted', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/analytics/extracted')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 4a2becf..21b8e1c 100644 (file)
@@ -1 +1,18 @@
-var _0xf98d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xf98d[0];var express=require(_0xf98d[1]);var controller=require(_0xf98d[2]);var auth=require(_0xf98d[3]);var router=express.Router();router[_0xf98d[7]](_0xf98d[4],auth[_0xf98d[5]](),controller[_0xf98d[6]]);router[_0xf98d[7]](_0xf98d[8],auth[_0xf98d[5]](),controller[_0xf98d[9]]);router[_0xf98d[7]](_0xf98d[10],auth[_0xf98d[5]](),controller[_0xf98d[11]]);router[_0xf98d[13]](_0xf98d[4],auth[_0xf98d[5]](),controller[_0xf98d[12]]);router[_0xf98d[15]](_0xf98d[10],auth[_0xf98d[5]](),controller[_0xf98d[14]]);router[_0xf98d[16]](_0xf98d[10],auth[_0xf98d[5]](),controller[_0xf98d[14]]);router[_0xf98d[18]](_0xf98d[4],auth[_0xf98d[5]](),controller[_0xf98d[17]]);router[_0xf98d[18]](_0xf98d[10],auth[_0xf98d[5]](),controller[_0xf98d[19]]);module[_0xf98d[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./extracted_report.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id/download', auth.isAuthenticated(), controller.download);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 4965b95..d550303 100644 (file)
@@ -1 +1,374 @@
-var _0x2b14=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6F\x6E\x74\x65\x78\x74","\x47\x6F\x74\x6F","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78\x2C\x73\x2C\x31","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6C\x6F\x67","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x6F\x6B","\x63\x6F\x6D\x6D\x69\x74","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x65\x64\x69\x74\x65\x64","\x55\x73\x65\x72\x49\x64","\x6D\x65\x72\x67\x65","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x20\x73\x61\x76\x65\x64","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x2b14[0];var _=require(_0x2b14[1]);var util=require(_0x2b14[2]);var async=require(_0x2b14[3]);var Trunk=require(_0x2b14[5])[_0x2b14[4]];var FaxAccount=require(_0x2b14[5])[_0x2b14[6]];var FaxApplication=require(_0x2b14[5])[_0x2b14[7]];var VoiceExtension=require(_0x2b14[5])[_0x2b14[8]];var sequelize=require(_0x2b14[5])[_0x2b14[9]];exports[_0x2b14[10]]=function(_0x15a7x9,_0x15a7xa,_0x15a7xb){var _0x15a7xc=[_0x2b14[11],_0x2b14[12],_0x2b14[13]];var _0x15a7xd=_0x15a7x9[_0x2b14[15]][_0x2b14[14]]?parseInt(_0x15a7x9[_0x2b14[15]][_0x2b14[14]],10):100;var _0x15a7xe=_0x15a7x9[_0x2b14[15]][_0x2b14[16]]?parseInt(_0x15a7x9[_0x2b14[15]][_0x2b14[16]],10):0;var _0x15a7xf={where:{},limit:_0x15a7xd,offset:_0x15a7xe*_0x15a7xd};_[_0x2b14[30]](_0x15a7x9[_0x2b14[15]],function(_0x15a7x10,_0x15a7x11){switch(_0x15a7x11){case _0x2b14[14]:;case _0x2b14[16]:break;case _0x2b14[19]:_0x15a7xf[_0x2b14[17]]=util[_0x2b14[22]](_0x2b14[18],_0x15a7x9[_0x2b14[15]][_0x2b14[19]],_0x15a7x9[_0x2b14[15]][_0x2b14[20]]||_0x2b14[21])||null;break;case _0x2b14[20]:break;case _0x2b14[28]:_0x15a7xf[_0x2b14[24]][_0x2b14[23]]=[];_0x15a7xc[_0x2b14[27]](function(_0x15a7x12){var _0x15a7x13={};_0x15a7x13[_0x15a7x12]={$like:_0x2b14[25]+_0x15a7x10+_0x2b14[25]};_0x15a7xf[_0x2b14[24]][_0x2b14[23]][_0x2b14[26]](_0x15a7x13)});break;default:_0x15a7xf[_0x2b14[24]][_0x15a7x11]={$like:{}};_0x15a7xf[_0x2b14[24]][_0x15a7x11][_0x2b14[29]]=_0x2b14[25]+_0x15a7x10+_0x2b14[25]}});FaxAccount[_0x2b14[45]](_0x15a7xf)[_0x2b14[44]](function(_0x15a7x15){var _0x15a7x16=Math[_0x2b14[36]](_0x15a7x15[_0x2b14[35]]/_0x15a7xd);var _0x15a7x17=_0x15a7x16>(_0x15a7xf[_0x2b14[37]]+1)?util[_0x2b14[22]](_0x2b14[38],_0x15a7x9[_0x2b14[39]],_0x15a7x9[_0x2b14[41]][_0x2b14[40]],_0x15a7x9[_0x2b14[42]],_0x15a7xe+1):null;var _0x15a7x18=_0x15a7xe>0?util[_0x2b14[22]](_0x2b14[38],_0x15a7x9[_0x2b14[39]],_0x15a7x9[_0x2b14[41]][_0x2b14[40]],_0x15a7x9[_0x2b14[42]],_0x15a7xe-1):null;_0x15a7xa[_0x2b14[33]](200)[_0x2b14[32]]({count:_0x15a7x15[_0x2b14[35]],rows:_0x15a7x15[_0x2b14[43]],next_page:_0x15a7x17,previous_page:_0x15a7x18,total_pages:_0x15a7x16})})[_0x2b14[34]](function(_0x15a7x14){_0x15a7xa[_0x2b14[33]](500)[_0x2b14[32]]({error:_0x2b14[31]})})};exports[_0x2b14[46]]=function(_0x15a7x9,_0x15a7xa,_0x15a7xb){FaxAccount[_0x2b14[50]](_0x15a7x9[_0x2b14[49]][_0x2b14[48]])[_0x2b14[44]](function(_0x15a7x19){if(!_0x15a7x19){return _0x15a7xa[_0x2b14[47]](404)};return _0x15a7xa[_0x2b14[32]](_0x15a7x19)})[_0x2b14[34]](function(_0x15a7x14){return _0x15a7xb(_0x15a7x14)})};exports[_0x2b14[51]]=function(_0x15a7x9,_0x15a7xa,_0x15a7xb){return sequelize[_0x2b14[62]]()[_0x2b14[44]](function(_0x15a7x1a){async[_0x2b14[61]]([function(_0x15a7x1b){return FaxAccount[_0x2b14[51]](_0x15a7x9[_0x2b14[52]],{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x19){_0x15a7x1b(null,_0x15a7x19)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})},function(_0x15a7x19,_0x15a7x1b){return Trunk[_0x2b14[50]](_0x15a7x9[_0x2b14[52]].TrunkId,{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x1c){_0x15a7x1b(null,_0x15a7x19,_0x15a7x1c)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})},function(_0x15a7x19,_0x15a7x1c,_0x15a7x1b){return VoiceExtension[_0x2b14[51]]({context:_0x15a7x1c[_0x2b14[53]],exten:_0x15a7x9[_0x2b14[52]][_0x2b14[13]],priority:1,app:_0x2b14[54],appdata:_0x2b14[55],type:_0x2b14[56],TrunkId:_0x15a7x1c[_0x2b14[48]]},{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x1d){_0x15a7x1b(null,_0x15a7x19)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})}],function(_0x15a7x14,_0x15a7x19){if(_0x15a7x14){console[_0x2b14[57]](_0x15a7x14);_0x15a7x1a[_0x2b14[58]]();return _0x15a7xa[_0x2b14[33]](404)[_0x2b14[32]](_0x15a7x14)}else {console[_0x2b14[57]](_0x2b14[59]);_0x15a7x1a[_0x2b14[60]]();return _0x15a7xa[_0x2b14[33]](201)[_0x2b14[32]](_0x15a7x19)}})})};exports[_0x2b14[63]]=function(_0x15a7x9,_0x15a7xa,_0x15a7xb){if(_0x15a7x9[_0x2b14[52]][_0x2b14[48]]){delete _0x15a7x9[_0x2b14[52]][_0x2b14[48]]};return sequelize[_0x2b14[62]]()[_0x2b14[44]](function(_0x15a7x1a){async[_0x2b14[61]]([function(_0x15a7x1b){return FaxAccount[_0x2b14[64]]({where:{id:_0x15a7x9[_0x2b14[49]][_0x2b14[48]]},include:[{model:Trunk}]},{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x19){_0x15a7x1b(null,_0x15a7x19)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})},function(_0x15a7x19,_0x15a7x1b){return Trunk[_0x2b14[50]](_0x15a7x9[_0x2b14[52]].TrunkId,{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x1e){return _0x15a7x19[_0x2b14[65]]({TrunkId:_0x15a7x1e[_0x2b14[48]]},{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x1f){_0x15a7x1b(null,_0x15a7x19,_0x15a7x1e)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})},function(_0x15a7x19,_0x15a7x1e,_0x15a7x1b){return VoiceExtension[_0x2b14[64]]({where:{priority:1,exten:_0x15a7x19[_0x2b14[13]],context:_0x15a7x19[_0x2b14[4]][_0x2b14[53]]}},{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x1d){if(!_0x15a7x1d){_0x15a7x1b(null,_0x15a7x19)};return _0x15a7x1d[_0x2b14[65]]({exten:_0x15a7x9[_0x2b14[52]][_0x2b14[13]],context:_0x15a7x1e[_0x2b14[53]],TrunkId:_0x15a7x9[_0x2b14[52]][_0x2b14[67]]},{transaction:_0x15a7x1a})[_0x2b14[44]](function(){console[_0x2b14[57]](_0x2b14[66]);_0x15a7x1b(null,_0x15a7x19)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})},function(_0x15a7x19,_0x15a7x1b){var _0x15a7x20=_[_0x2b14[68]](_0x15a7x19,_0x15a7x9[_0x2b14[52]]);return _0x15a7x20[_0x2b14[70]]({transaction:_0x15a7x1a})[_0x2b14[44]](function(){console[_0x2b14[57]](_0x2b14[69]);_0x15a7x1b(null,_0x15a7x19)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7x1b(_0x15a7x14)})}],function(_0x15a7x14,_0x15a7x19){if(_0x15a7x14){console[_0x2b14[57]](_0x15a7x14);_0x15a7x1a[_0x2b14[58]]();return _0x15a7xa[_0x2b14[33]](404)[_0x2b14[32]](_0x15a7x14)}else {console[_0x2b14[57]](_0x2b14[59]);_0x15a7x1a[_0x2b14[60]]();return _0x15a7xa[_0x2b14[33]](201)[_0x2b14[32]](_0x15a7x19)}})})};exports[_0x2b14[71]]=function(_0x15a7x9,_0x15a7xa,_0x15a7xb){FaxAccount[_0x2b14[72]]({where:{id:_0x15a7x9[_0x2b14[49]][_0x2b14[48]]}})[_0x2b14[44]](function(_0x15a7x19){if(!_0x15a7x19){return _0x15a7xa[_0x2b14[47]](404)};_0x15a7x19[_0x2b14[71]]()[_0x2b14[44]](function(){return _0x15a7xa[_0x2b14[47]](204)})[_0x2b14[34]](function(_0x15a7x14){_0x15a7xb(_0x15a7x14)})})[_0x2b14[34]](function(_0x15a7x14){_0x15a7xb(_0x15a7x14)})};exports[_0x2b14[73]]=function(_0x15a7x9,_0x15a7xa,_0x15a7xb){FaxApplication[_0x2b14[79]]({where:{id:_0x15a7x9[_0x2b14[52]][_0x2b14[75]]}})[_0x2b14[44]](function(_0x15a7x21){var _0x15a7x22=_0x15a7x21;return sequelize[_0x2b14[62]](function(_0x15a7x1a){return FaxApplication[_0x2b14[71]]({where:{id:_0x15a7x9[_0x2b14[52]][_0x2b14[75]]}},{transaction:_0x15a7x1a})[_0x2b14[44]](function(){var _0x15a7x23=[];for(var _0x15a7x24=0;_0x15a7x24<_0x15a7x9[_0x2b14[52]][_0x2b14[75]][_0x2b14[74]];_0x15a7x24++){var _0x15a7x25=_[_0x2b14[72]](_0x15a7x22,{"\x69\x64":_0x15a7x9[_0x2b14[52]][_0x2b14[75]][_0x15a7x24]});if(_0x15a7x25){_0x15a7x25[_0x2b14[76]]=_0x15a7x24+1;_0x15a7x23[_0x2b14[26]](_0x15a7x25[_0x2b14[77]])}};return FaxApplication[_0x2b14[78]](_0x15a7x23,{transaction:_0x15a7x1a})[_0x2b14[44]](function(_0x15a7x1f){return _0x15a7x1f})})})[_0x2b14[44]](function(_0x15a7x15){return _0x15a7xa[_0x2b14[33]](200)[_0x2b14[32]](_0x15a7x15)})[_0x2b14[34]](function(_0x15a7x14){return handleError(_0x15a7xa,_0x15a7x14)})})[_0x2b14[34]](function(_0x15a7x14){return _0x15a7xb(_0x15a7x14)})};exports[_0x2b14[80]]=function(_0x15a7x9,_0x15a7xa){FaxAccount[_0x2b14[71]]({where:{id:_0x15a7x9[_0x2b14[15]][_0x2b14[48]]},individualHooks:true})[_0x2b14[44]](function(){return _0x15a7xa[_0x2b14[47]](204)})[_0x2b14[34]](function(_0x15a7x14){return handleError(_0x15a7xa,_0x15a7x14)})};function handleError(_0x15a7xa,_0x15a7x14){return _0x15a7xa[_0x2b14[33]](500)[_0x2b14[32]](_0x15a7x14)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var async = require('async');
+
+var Trunk = require('../../models').Trunk;
+var FaxAccount = require('../../models').FaxAccount;
+var FaxApplication = require('../../models').FaxApplication;
+var VoiceExtension = require('../../models').VoiceExtension;
+var sequelize = require('../../models').sequelize;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+
+  var attributes = ['description', 'name', 'phone'];
+  var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100;
+  var page = req.query.page ? parseInt(req.query.page, 10) : 0;
+
+  var query = {
+    where: {},
+    limit: per_page,
+    offset: page * per_page
+  };
+
+  _.forIn(req.query, function(value, key) {
+    switch (key) {
+      case 'per_page':
+      case 'page':
+        break;
+      case 'sort_by':
+        query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null;
+        break;
+      case 'sort_order':
+        break;
+      case '$':
+        query.where.$or = [];
+        attributes.forEach(function(attribute) {
+          var tmp = {};
+          tmp[attribute] = {
+            $like: '%' + value + '%'
+          };
+
+          query.where.$or.push(tmp);
+        });
+        break;
+      default:
+        query.where[key] = {
+          $like: {}
+        };
+        query.where[key].$like = '%' + value + '%';
+    }
+  });
+
+  FaxAccount
+    .findAndCountAll(query)
+    .then(function(result) {
+
+      var total_pages = Math.ceil(result.count / per_page);
+      var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null;
+      var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null;
+
+      res.status(200).send({
+        count: result.count,
+        rows: result.rows,
+        next_page: next_page,
+        previous_page: previous_page,
+        total_pages: total_pages
+      });
+
+    })
+    .catch(function(err) {
+      res.status(500).send({
+        error: 'Something blew up!'
+      });
+    });
+};
+
+// Get a single faxAccount
+exports.show = function(req, res, next) {
+  FaxAccount
+    .findById(req.params.id)
+    .then(function(faxAccount) {
+      if (!faxAccount) {
+        return res.sendStatus(404);
+      }
+      return res.send(faxAccount);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Creates a new faxAccount in the DB.
+exports.create = function(req, res, next) {
+  // console.log(req.body);
+  return sequelize
+    .transaction()
+    .then(function(t) {
+      async.waterfall([
+        function(callback) {
+          return FaxAccount
+            .create(req.body, {
+              transaction: t
+            })
+            .then(function(faxAccount) {
+              callback(null, faxAccount);
+            })
+            .catch(function(err) {
+              callback(err);
+            });
+        },
+        function(faxAccount, callback) {
+          return Trunk
+            .findById(req.body.TrunkId, {
+              transaction: t
+            })
+            .then(function(faxTrunk) {
+              callback(null, faxAccount, faxTrunk);
+            })
+            .catch(function(err) {
+              callback(err);
+            });
+        },
+        function(faxAccount, faxTrunk, callback) {
+          return VoiceExtension
+            .create({
+              context: faxTrunk.context,
+              exten: req.body.phone,
+              priority: 1,
+              app: 'Goto',
+              appdata: 'inbound-fax,s,1',
+              type: 'inbound-fax',
+              TrunkId: faxTrunk.id
+            }, {
+              transaction: t
+            })
+            .then(function(voiceExtension) {
+              callback(null, faxAccount);
+            })
+            .catch(function(err) {
+              callback(err);
+            });
+        }
+      ], function(err, faxAccount) {
+        if (err) {
+          console.log(err);
+          t.rollback();
+          return res.status(404).send(err);
+        } else {
+          console.log('ok');
+          t.commit();
+          return res.status(201).send(faxAccount);
+        }
+      })
+    });
+};
+
+// Updates an existing faxAccount in the DB.
+exports.update = function(req, res, next) {
+  // console.log(req.body);
+  // console.log(req.params);
+
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return sequelize
+    .transaction()
+    .then(function(t) {
+      async.waterfall([
+        function(callback) {
+          return FaxAccount
+            .findOne({
+              where: {
+                id: req.params.id
+              },
+              include: [{
+                model: Trunk
+              }]
+            }, {
+              transaction: t
+            })
+            .then(function(faxAccount) {
+              callback(null, faxAccount);
+            })
+            .catch(function(err) {
+              callback(err);
+            });
+        },
+        function(faxAccount, callback) {
+          return Trunk
+            .findById(req.body.TrunkId, {
+              transaction: t
+            })
+            .then(function(trunk) {
+              return faxAccount
+                .updateAttributes({
+                  TrunkId: trunk.id
+                }, {
+                  transaction: t
+                })
+                .then(function(data) {
+                  callback(null, faxAccount, trunk);
+                })
+                .catch(function(err) {
+                  callback(err);
+                });
+            })
+            .catch(function(err) {
+              callback(err);
+            });
+        },
+        function(faxAccount, trunk, callback) {
+          return VoiceExtension
+            .findOne({
+              where: {
+                priority: 1,
+                exten: faxAccount.phone,
+                context: faxAccount.Trunk.context
+              }
+            }, {
+              transaction: t
+            })
+            .then(function(voiceExtension) {
+              if (!voiceExtension) {
+                callback(null, faxAccount);
+              }
+              return voiceExtension
+                .updateAttributes({
+                  exten: req.body.phone,
+                  context: trunk.context,
+                  TrunkId: req.body.UserId
+                }, {
+                  transaction: t
+                })
+                .then(function() {
+                  console.log('voiceExtension edited');
+                  callback(null, faxAccount);
+                })
+                .catch(function(err) {
+                  callback(err);
+                });
+            })
+            .catch(function(err) {
+              callback(err);
+            });
+        },
+        function(faxAccount, callback) {
+          var updated = _.merge(faxAccount, req.body);
+          return updated.save({
+              transaction: t
+            })
+            .then(function() {
+              console.log('faxAccount saved');
+              callback(null, faxAccount);
+            })
+            .catch(function(err) {
+              callback(err);
+            });
+        }
+      ], function(err, faxAccount) {
+        if (err) {
+          console.log(err);
+          t.rollback();
+          return res.status(404).send(err);
+        } else {
+          console.log('ok');
+          t.commit();
+          return res.status(201).send(faxAccount);
+        }
+      })
+    });
+};
+
+// Deletes a faxAccount from the DB.
+exports.destroy = function(req, res, next) {
+  FaxAccount
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(faxAccount) {
+      if (!faxAccount) {
+        return res.sendStatus(404);
+      }
+      faxAccount.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          next(err);
+        });
+    })
+    .catch(function(err) {
+      next(err);
+    });
+};
+
+exports.addApplications = function(req, res, next) {
+
+  FaxApplication
+    .findAll({
+      where: {
+        id: req.body.applications
+      }
+    })
+    .then(function(faxApplications) {
+      var tmpFaxApplications = faxApplications;
+
+      return sequelize.transaction(function(t) {
+        return FaxApplication.destroy({
+          where: {
+            id: req.body.applications
+          }
+        }, {
+          transaction: t
+        }).then(function() {
+
+          var sortedApplications = [];
+
+          for (var i = 0; i < req.body.applications.length; i++) {
+
+            var tmpFaxApplication = _.find(tmpFaxApplications, {
+              'id': req.body.applications[i]
+            });
+
+            if (tmpFaxApplication) {
+              tmpFaxApplication.priority = i + 1;
+              sortedApplications.push(tmpFaxApplication.dataValues);
+            }
+          }
+
+          return FaxApplication.bulkCreate(sortedApplications, {
+            transaction: t
+          }).then(function(data) {
+            return data;
+          });
+        });
+      }).then(function(result) {
+        return res.status(200).send(result);
+        // Transaction has been committed
+        // result is whatever the result of the promise chain returned to the transaction callback
+      }).catch(function(err) {
+        return handleError(res, err);
+        // Transaction has been rolled back
+        // err is whatever rejected the promise chain returned to the transaction callback
+      });
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  FaxAccount
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index f85cc92..e28dde9 100644 (file)
@@ -1 +1,24 @@
-var _0x17a0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x17a0[0];var fax_account=require(_0x17a0[2])[_0x17a0[1]];exports[_0x17a0[3]]=function(_0x75b8x2){fax_account[_0x17a0[4]](function(_0x75b8x3){onSave(_0x75b8x2,_0x75b8x3)});fax_account[_0x17a0[5]](function(_0x75b8x3){onRemove(_0x75b8x2,_0x75b8x3)})};function onSave(_0x75b8x2,_0x75b8x3,_0x75b8x5){_0x75b8x2[_0x17a0[7]](_0x17a0[6],_0x75b8x3)}function onRemove(_0x75b8x2,_0x75b8x3,_0x75b8x5){_0x75b8x2[_0x17a0[7]](_0x17a0[8],_0x75b8x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var fax_account = require('../../models').FaxAccount;
+
+exports.register = function(socket) {
+  fax_account.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  fax_account.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('fax_account:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('fax_account:remove', doc);
+}
index f895a57..0399e33 100644 (file)
@@ -1 +1,20 @@
-var _0xb61f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74"];_0xb61f[0];var should=require(_0xb61f[1]);var app=require(_0xb61f[2]);var request=require(_0xb61f[3]);describe(_0xb61f[4],function(){it(_0xb61f[5],function(_0x5436x4){request(app)[_0xb61f[13]](_0xb61f[12])[_0xb61f[11]](200)[_0xb61f[11]](_0xb61f[10],/json/)[_0xb61f[9]](function(_0x5436x5,_0x5436x6){if(_0x5436x5){return _0x5436x4(_0x5436x5)};_0x5436x6[_0xb61f[8]][_0xb61f[1]][_0xb61f[7]][_0xb61f[6]](Array);_0x5436x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/fax/accounts', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/fax/accounts')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index abaaff3..15886c9 100644 (file)
@@ -1 +1,17 @@
-var _0x13d9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x13d9[0];var express=require(_0x13d9[1]);var controller=require(_0x13d9[2]);var auth=require(_0x13d9[3]);var router=express.Router();router[_0x13d9[7]](_0x13d9[4],auth[_0x13d9[5]](),controller[_0x13d9[6]]);router[_0x13d9[7]](_0x13d9[8],controller[_0x13d9[9]]);router[_0x13d9[11]](_0x13d9[4],controller[_0x13d9[10]]);router[_0x13d9[11]](_0x13d9[12],controller[_0x13d9[13]]);router[_0x13d9[15]](_0x13d9[8],controller[_0x13d9[14]]);router[_0x13d9[16]](_0x13d9[8],controller[_0x13d9[14]]);router[_0x13d9[18]](_0x13d9[4],controller[_0x13d9[17]]);router[_0x13d9[18]](_0x13d9[8],controller[_0x13d9[19]]);module[_0x13d9[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./fax_account.controller');
+var auth = require('../../auth/auth.service');
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.post('/:id/applications', controller.addApplications);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/', controller.bulkDestroy);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 75bc264..59b09cb 100644 (file)
@@ -1 +1,94 @@
-var _0xfc3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x70\x72\x69\x6F\x72\x69\x74\x79","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64"];_0xfc3c[0];var _=require(_0xfc3c[1]);var FaxApplication=require(_0xfc3c[3])[_0xfc3c[2]];exports[_0xfc3c[4]]=function(_0x5a94x3,_0x5a94x4){FaxApplication[_0xfc3c[10]]({where:_0x5a94x3[_0xfc3c[9]]})[_0xfc3c[8]](function(_0x5a94x6){return _0x5a94x4[_0xfc3c[7]](200)[_0xfc3c[6]](_0x5a94x6)})[_0xfc3c[5]](function(_0x5a94x5){return handleError(_0x5a94x4,_0x5a94x5)})};exports[_0xfc3c[11]]=function(_0x5a94x3,_0x5a94x4){FaxApplication[_0xfc3c[15]](_0x5a94x3[_0xfc3c[14]][_0xfc3c[13]])[_0xfc3c[8]](function(_0x5a94x7){if(!_0x5a94x7){return _0x5a94x4[_0xfc3c[12]](404)};return _0x5a94x4[_0xfc3c[6]](_0x5a94x7)})[_0xfc3c[5]](function(_0x5a94x5){return handleError(_0x5a94x4,_0x5a94x5)})};exports[_0xfc3c[16]]=function(_0x5a94x3,_0x5a94x4,_0x5a94x8){console[_0xfc3c[18]](_0x5a94x3[_0xfc3c[17]]);FaxApplication[_0xfc3c[21]](_0xfc3c[19],{where:{FaxAccountId:_0x5a94x3[_0xfc3c[17]][_0xfc3c[20]]}})[_0xfc3c[8]](function(_0x5a94x9){_0x5a94x3[_0xfc3c[17]][_0xfc3c[19]]=_0x5a94x9?++_0x5a94x9:1;FaxApplication[_0xfc3c[16]](_0x5a94x3[_0xfc3c[17]])[_0xfc3c[8]](function(_0x5a94xa){return _0x5a94x4[_0xfc3c[7]](201)[_0xfc3c[6]](_0x5a94xa)})[_0xfc3c[5]](function(_0x5a94x5){return _0x5a94x8(_0x5a94x5)});console[_0xfc3c[18]](_0x5a94x9)})[_0xfc3c[5]](function(_0x5a94x5){_0x5a94x8(_0x5a94x5)})};exports[_0xfc3c[22]]=function(_0x5a94x3,_0x5a94x4){if(_0x5a94x3[_0xfc3c[17]][_0xfc3c[13]]){delete _0x5a94x3[_0xfc3c[17]][_0xfc3c[13]]};FaxApplication[_0xfc3c[15]](_0x5a94x3[_0xfc3c[14]][_0xfc3c[13]])[_0xfc3c[8]](function(_0x5a94x7){if(!_0x5a94x7){return _0x5a94x4[_0xfc3c[12]](404)};var _0x5a94xb=_[_0xfc3c[23]](_0x5a94x7,_0x5a94x3[_0xfc3c[17]]);_0x5a94xb[_0xfc3c[24]]()[_0xfc3c[8]](function(){return _0x5a94x4[_0xfc3c[7]](200)[_0xfc3c[6]](_0x5a94x7)})[_0xfc3c[5]](function(_0x5a94x5){return handleError(_0x5a94x4,_0x5a94x5)})})[_0xfc3c[5]](function(_0x5a94x5){return handleError(_0x5a94x4,_0x5a94x5)})};exports[_0xfc3c[25]]=function(_0x5a94x3,_0x5a94x4){FaxApplication[_0xfc3c[26]]({where:{id:_0x5a94x3[_0xfc3c[14]][_0xfc3c[13]]}})[_0xfc3c[8]](function(_0x5a94x7){if(!_0x5a94x7){return _0x5a94x4[_0xfc3c[12]](404)};_0x5a94x7[_0xfc3c[25]]()[_0xfc3c[8]](function(){return _0x5a94x4[_0xfc3c[12]](204)})[_0xfc3c[5]](function(_0x5a94x5){return handleError(_0x5a94x4,_0x5a94x5)})})[_0xfc3c[5]](function(_0x5a94x5){return handleError(_0x5a94x4,_0x5a94x5)})};function handleError(_0x5a94x4,_0x5a94x5){return _0x5a94x4[_0xfc3c[7]](500)[_0xfc3c[6]](_0x5a94x5)}
\ No newline at end of file
+'use strict';
+var _ = require('lodash');
+var FaxApplication = require('../../models').FaxApplication;
+// Get list of fax_applications
+exports.index = function(req, res) {
+  FaxApplication.findAll({
+    where: req.query
+  }).then(function(fax_applications) {
+    return res.status(200).send(fax_applications);
+  }).catch(function(err) {
+    return handleError(res, err);
+  });
+};
+// Get a single fax_application
+exports.show = function(req, res) {
+  FaxApplication.findById(req.params.id).then(function(fax_application) {
+    if (!fax_application) {
+      return res.sendStatus(404);
+    }
+    return res.send(fax_application);
+  }).catch(function(err) {
+    return handleError(res, err);
+  });
+};
+// Creates a new fax_application in the DB.
+exports.create = function(req, res, next) {
+  console.log(req.body);
+  FaxApplication.max('priority', {
+    where: {
+      FaxAccountId: req.body.FaxAccountId
+    }
+  }).then(function(max) {
+    // SET PRIORITY
+    req.body.priority = max ? ++max : 1;
+    FaxApplication.create(req.body).then(function(faxApplication) {
+      return res.status(201).send(faxApplication);
+    }).catch(function(err) {
+      return next(err);
+    });
+    console.log(max);
+  }).catch(function(err) {
+    next(err);
+  });
+  // FaxApplication
+  // .create(req.body)
+  // .then(function(fax_application) {
+  //   return res.status(201).send(fax_application);
+  // })
+  // .catch(function(err) {
+  //   return handleError(res, err);
+  // });
+};
+// Updates an existing fax_application in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  FaxApplication.findById(req.params.id).then(function(fax_application) {
+    if (!fax_application) {
+      return res.sendStatus(404);
+    }
+    var updated = _.merge(fax_application, req.body);
+    updated.save().then(function() {
+      return res.status(200).send(fax_application);
+    }).catch(function(err) {
+      return handleError(res, err);
+    });
+  }).catch(function(err) {
+    return handleError(res, err);
+  });
+};
+// Deletes a fax_application from the DB.
+exports.destroy = function(req, res) {
+  FaxApplication.find({
+    where: {
+      id: req.params.id
+    }
+  }).then(function(fax_application) {
+    if (!fax_application) {
+      return res.sendStatus(404);
+    }
+    fax_application.destroy().then(function() {
+      return res.sendStatus(204);
+    }).catch(function(err) {
+      return handleError(res, err);
+    });
+  }).catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 9483602..2a677d7 100644 (file)
@@ -1 +1,24 @@
-var _0x484d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x484d[0];var fax_application=require(_0x484d[2])[_0x484d[1]];exports[_0x484d[3]]=function(_0x21a8x2){fax_application[_0x484d[4]](function(_0x21a8x3){onSave(_0x21a8x2,_0x21a8x3)});fax_application[_0x484d[5]](function(_0x21a8x3){onRemove(_0x21a8x2,_0x21a8x3)})};function onSave(_0x21a8x2,_0x21a8x3,_0x21a8x5){_0x21a8x2[_0x484d[7]](_0x484d[6],_0x21a8x3)}function onRemove(_0x21a8x2,_0x21a8x3,_0x21a8x5){_0x21a8x2[_0x484d[7]](_0x484d[8],_0x21a8x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var fax_application = require('../../models').FaxApplication;
+
+exports.register = function(socket) {
+  fax_application.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  fax_application.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('fax_application:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('fax_application:remove', doc);
+}
index 53d6404..9eeaee8 100644 (file)
@@ -1 +1,20 @@
-var _0xb577=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74"];_0xb577[0];var should=require(_0xb577[1]);var app=require(_0xb577[2]);var request=require(_0xb577[3]);describe(_0xb577[4],function(){it(_0xb577[5],function(_0xf108x4){request(app)[_0xb577[13]](_0xb577[12])[_0xb577[11]](200)[_0xb577[11]](_0xb577[10],/json/)[_0xb577[9]](function(_0xf108x5,_0xf108x6){if(_0xf108x5){return _0xf108x4(_0xf108x5)};_0xf108x6[_0xb577[8]][_0xb577[1]][_0xb577[7]][_0xb577[6]](Array);_0xf108x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/fax/applications', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/fax/applications')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 5989ff3..b27e419 100644 (file)
@@ -1 +1,15 @@
-var _0xbbb2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbbb2[0];var express=require(_0xbbb2[1]);var controller=require(_0xbbb2[2]);var router=express.Router();router[_0xbbb2[5]](_0xbbb2[3],controller[_0xbbb2[4]]);router[_0xbbb2[5]](_0xbbb2[6],controller[_0xbbb2[7]]);router[_0xbbb2[9]](_0xbbb2[3],controller[_0xbbb2[8]]);router[_0xbbb2[11]](_0xbbb2[6],controller[_0xbbb2[10]]);router[_0xbbb2[12]](_0xbbb2[6],controller[_0xbbb2[10]]);router[_0xbbb2[14]](_0xbbb2[6],controller[_0xbbb2[13]]);module[_0xbbb2[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./fax_application.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index 91d716e..2d69e42 100644 (file)
@@ -1 +1,64 @@
-var _0x7dbb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x4E\x4F\x54\x20\x53\x45\x4E\x54","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x62\x6F\x64\x79","\x70\x61\x72\x73\x65","\x66\x61\x78\x42\x6F\x64\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x66\x72\x6F\x6D","\x25\x73\x2F\x25\x73\x40\x25\x73","\x74\x65\x63\x68\x6E\x6F\x6C\x6F\x67\x79","\x74\x6F","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73","\x74\x72\x75\x65","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x69\x6E\x72\x61\x74\x65","\x65\x63\x6D","\x79\x65\x73","\x6E\x6F","\x66\x61\x78\x5F\x6C\x6F\x63\x61\x6C\x69\x64","\x66\x61\x78\x5F\x66\x69\x6C\x65","\x66\x61\x78\x5F\x68\x65\x61\x64\x65\x72","\x75\x75\x69\x64","\x46\x41\x49\x4C\x45\x44","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x69\x64","\x74\x72\x75\x6E\x6B","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0x7dbb[0];var _=require(_0x7dbb[1]);var util=require(_0x7dbb[2]);var FaxMessage=require(_0x7dbb[4])[_0x7dbb[3]];var Trunk=require(_0x7dbb[4])[_0x7dbb[5]];exports[_0x7dbb[6]]=function(_0xe3d2x5){FaxMessage[_0x7dbb[9]](function(_0xe3d2x6){console[_0x7dbb[8]](_0x7dbb[7]);onSave(_0xe3d2x5,_0xe3d2x6)})};function onSave(_0xe3d2x5,_0xe3d2x6,_0xe3d2x8){if(_0xe3d2x6[_0x7dbb[10]]===_0x7dbb[11]&&!_0xe3d2x6[_0x7dbb[12]]){var _0xe3d2x9=JSON[_0x7dbb[14]](_0xe3d2x6[_0x7dbb[13]]);console[_0x7dbb[8]](_0x7dbb[15],_0xe3d2x9);Trunk[_0x7dbb[44]](_0xe3d2x9[_0x7dbb[43]][_0x7dbb[42]])[_0x7dbb[41]](function(_0xe3d2xb){var _0xe3d2xc={Action:_0x7dbb[18],CallerID:_0xe3d2x9[_0x7dbb[19]],Channel:util[_0x7dbb[24]](_0x7dbb[20],_0xe3d2x9[_0x7dbb[21]],_0xe3d2x9[_0x7dbb[22]],_0xe3d2xb[_0x7dbb[23]]),Context:_0x7dbb[25],Exten:_0x7dbb[26],Priority:1,Async:_0x7dbb[27],Variable:{MAXRATE:_0xe3d2x9[_0x7dbb[28]],MINRATE:_0xe3d2x9[_0x7dbb[29]],ECM:_0xe3d2x9[_0x7dbb[30]]?_0x7dbb[31]:_0x7dbb[32],LOCALID:_0xe3d2x9[_0x7dbb[33]],FAXFILE:_0xe3d2x9[_0x7dbb[34]],FAXHEADER:_0xe3d2x9[_0x7dbb[35]],FAXUUID:_0xe3d2x9[_0x7dbb[36]]}};_0xe3d2x5[_0x7dbb[40]](_0xe3d2xc,function(_0xe3d2xa,_0xe3d2xd){if(_0xe3d2xa){_0xe3d2x6[_0x7dbb[38]]({status:_0x7dbb[37]})}else {if(_0xe3d2xd[_0x7dbb[39]]&&_0xe3d2xd[_0x7dbb[12]]){_0xe3d2x6[_0x7dbb[38]]({actionid:_0xe3d2xd[_0x7dbb[12]]})}}})})[_0x7dbb[17]](function(_0xe3d2xa){console[_0x7dbb[16]](_0xe3d2xa)})}}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+
+var FaxMessage = require('../../models').FaxMessage;
+var Trunk = require('../../models').User;
+
+exports.register = function(ami) {
+
+  FaxMessage.afterCreate(function(doc) {
+    console.log('FaxMessage afterCreate');
+    onSave(ami, doc);
+  });
+};
+
+function onSave(ami, doc, cb) {
+  if (doc.status === 'NOT SENT' && !doc.actionid) {
+    // I have to send the fax with the Originate
+    var faxBody = JSON.parse(doc.body);
+    console.log('faxBody', faxBody);
+
+    Trunk
+      .findById(faxBody.trunk.id)
+      .then(function(trunk) {
+        var action = {
+          Action: 'originate',
+          CallerID: faxBody.from,
+          Channel: util.format('%s/%s@%s', faxBody.technology, faxBody.to, trunk.name),
+          Context: 'outbound-fax',
+          Exten: 's',
+          Priority: 1,
+          Async: 'true',
+          Variable: {
+            MAXRATE: faxBody.maxrate,
+            MINRATE: faxBody.minrate,
+            ECM: faxBody.ecm ? 'yes' : 'no',
+            LOCALID: faxBody.fax_localid,
+            FAXFILE: faxBody.fax_file,
+            // 'FAXFILE': 'test.tiff', // Scommentare se si fanno prove in locale!
+            FAXHEADER: faxBody.fax_header,
+            FAXUUID: faxBody.uuid
+          }
+        };
+
+        ami.action(action, function(err, res) {
+          if (err) {
+            doc.updateAttributes({
+              status: 'FAILED'
+            });
+          } else {
+            if (res.response && res.actionid) {
+              doc.updateAttributes({
+                actionid: res.actionid
+              });
+            }
+          }
+        });
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  }
+}
index 3f24986..153d0c9 100644 (file)
@@ -1 +1,433 @@
-var _0x8831=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x70\x61\x74\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x68\x74\x6D\x6C\x2D\x70\x64\x66","\x73\x70\x69\x6E\x64\x72\x69\x66\x74","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x46\x72\x6F\x6D","\x54\x6F","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x66\x61\x78\x2F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2F\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x6F\x6E\x6C\x79\x54\x65\x78\x74","\x62\x6F\x64\x79","\x68\x74\x6D\x6C","\x76\x34","\x2E\x70\x64\x66","\x46\x61\x78\x3A\x20\x48\x54\x4D\x4C\x20\x43\x6F\x6E\x76\x65\x72\x74\x65\x64","\x6C\x6F\x67","\x74\x6F\x46\x69\x6C\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x70\x69\x70\x65","\x70\x64\x66\x53\x74\x72\x65\x61\x6D","\x46\x61\x78\x3A\x20\x48\x54\x4D\x4C\x20\x6A\x6F\x69\x6E\x65\x64\x20\x77\x69\x74\x68\x20\x50\x44\x46\x20\x75\x70\x6C\x6F\x61\x64\x65\x64","\x65\x72\x72\x6F\x72","\x46\x61\x78\x3A\x20\x50\x44\x46\x20\x52\x65\x6E\x61\x6D\x65","\x72\x65\x6E\x61\x6D\x65","\x70\x61\x72\x73\x65","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2E\x74\x69\x66","\x67\x73","\x20\x2D\x71\x20\x2D\x64\x4E\x4F\x50\x41\x55\x53\x45\x20\x2D\x64\x42\x41\x54\x43\x48\x20\x2D\x73\x44\x45\x56\x49\x43\x45\x3D\x74\x69\x66\x66\x67\x34\x20","\x2D\x73\x50\x41\x50\x45\x52\x53\x49\x5A\x45\x3D\x6C\x65\x74\x74\x65\x72\x20\x2D\x73\x4F\x75\x74\x70\x75\x74\x46\x69\x6C\x65\x3D","\x20","\x53\x49\x50","\x74\x6F\x4E\x75\x6D","\x70\x68\x6F\x6E\x65","\x66\x61\x78\x68\x65\x61\x64\x65\x72","\x6C\x6F\x63\x61\x6C\x69\x64","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x69\x6E\x72\x61\x74\x65","\x65\x63\x6D","\x54\x72\x75\x6E\x6B\x49\x64","\x46\x69\x6C\x65\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x73","\x46\x61\x78\x3A\x20\x50\x44\x46\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x74\x6F\x20\x54\x49\x46\x46","\x72\x6F\x6F\x6D\x49\x64","\x73\x65\x74\x46\x72\x6F\x6D","\x73\x70\x72\x65\x61\x64","\x66\x72\x6F\x6D","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x74\x54\x6F","\x74\x6F","\x4E\x4F\x54\x20\x53\x45\x4E\x54","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x50\x45\x4E","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x75\x73\x65\x72\x49\x64","\x63\x68\x6D\x6F\x64","\x65\x78\x69\x73\x74\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x67\x65\x74\x43\x6F\x6E\x74\x65\x6E\x74\x46\x72\x6F\x6D\x4D\x65\x73\x73\x61\x67\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x50\x44\x46","\x52\x45\x43\x45\x49\x56\x45\x44","\x69\x6E\x62\x6F\x75\x6E\x64","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x53\x45\x4E\x54","\x46\x41\x49\x4C\x45\x44"];_0x8831[0];var _=require(_0x8831[1]);var fs=require(_0x8831[2]);var path=require(_0x8831[3]);var uploadFile=require(_0x8831[4]);var uuidLib=require(_0x8831[5]);var pdf=require(_0x8831[6]);var spindrift=require(_0x8831[7]);var formidable=require(_0x8831[8]);var exec=require(_0x8831[10])[_0x8831[9]];var config=require(_0x8831[11]);var FaxMessage=require(_0x8831[13])[_0x8831[12]];var FaxRoom=require(_0x8831[13])[_0x8831[14]];var FaxAccount=require(_0x8831[13])[_0x8831[15]];var Contact=require(_0x8831[13])[_0x8831[16]];exports[_0x8831[17]]=function(_0xb03bxf,_0xb03bx10){FaxMessage[_0x8831[26]]({where:_0xb03bxf[_0x8831[22]],order:_0x8831[23],include:[{model:Contact,as:_0x8831[24]},{model:Contact,as:_0x8831[25]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0x8831[21]](function(_0xb03bx12){return _0xb03bx10[_0x8831[20]](200)[_0x8831[19]](_0xb03bx12)})[_0x8831[18]](function(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)})};exports[_0x8831[27]]=function(_0xb03bxf,_0xb03bx10){FaxMessage[_0x8831[31]]({where:{id:_0xb03bxf[_0x8831[30]][_0x8831[29]]},include:[{model:Contact,as:_0x8831[24]},{model:Contact,as:_0x8831[25]}]})[_0x8831[21]](function(_0xb03bx13){if(!_0xb03bx13){return _0xb03bx10[_0x8831[28]](404)};return _0xb03bx10[_0x8831[19]](_0xb03bx13)})[_0x8831[18]](function(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)})};exports[_0x8831[32]]=function(_0xb03bxf,_0xb03bx10,_0xb03bx14){var _0xb03bx15= new formidable.IncomingForm();_0xb03bx15[_0x8831[33]]=path[_0x8831[36]](config[_0x8831[34]],_0x8831[35]);_0xb03bx15[_0x8831[37]]=true;_0xb03bx15[_0x8831[38]]=false;if(_0xb03bxf[_0x8831[40]][_0x8831[39]]){if(_0xb03bxf[_0x8831[40]][_0x8831[41]]){var _0xb03bx16=uuidLib[_0x8831[42]]();var _0xb03bx17=path[_0x8831[36]](config[_0x8831[34]],_0x8831[35],_0xb03bx16+_0x8831[43]);pdf[_0x8831[32]](_0xb03bxf[_0x8831[40]][_0x8831[41]],{"\x74\x69\x6D\x65\x6F\x75\x74":30000})[_0x8831[46]](_0xb03bx17,function(_0xb03bx11,_0xb03bx18){console[_0x8831[45]](_0x8831[44]);convertPdfAndSendFax(_0xb03bxf,_0xb03bx10,_0xb03bx16,_0xb03bxf[_0x8831[40]])})}}else {_0xb03bx15[_0x8831[56]](_0xb03bxf,function(_0xb03bx11,_0xb03bx19,_0xb03bx1a){if(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)};if(_0xb03bx19[_0x8831[41]]){var _0xb03bx16=uuidLib[_0x8831[42]]();var _0xb03bx17=path[_0x8831[36]](config[_0x8831[34]],_0x8831[35],_0xb03bx16+_0x8831[43]);pdf[_0x8831[32]](_0xb03bx19[_0x8831[41]],{"\x74\x69\x6D\x65\x6F\x75\x74":30000})[_0x8831[46]](_0xb03bx17,function(_0xb03bx11,_0xb03bx18){console[_0x8831[45]](_0x8831[44]);var _0xb03bx1b=spindrift(_0xb03bx18[_0x8831[47]]);var _0xb03bx1c=spindrift(_0xb03bx1a[_0x8831[48]][_0x8831[3]]);var _0xb03bx16=uuidLib[_0x8831[42]]();spindrift[_0x8831[36]](_0xb03bx1b,_0xb03bx1c)[_0x8831[51]]()[_0x8831[50]](fs[_0x8831[49]](path[_0x8831[36]](config[_0x8831[34]],_0x8831[35],_0xb03bx16+_0x8831[43])));console[_0x8831[45]](_0x8831[52]);convertPdfAndSendFax(_0xb03bxf,_0xb03bx10,_0xb03bx16,_0xb03bx19)})}else {var _0xb03bx16=uuidLib[_0x8831[42]]();var _0xb03bx17=path[_0x8831[36]](config[_0x8831[34]],_0x8831[35],_0xb03bx16+_0x8831[43]);fs[_0x8831[55]](_0xb03bx1a[_0x8831[48]][_0x8831[3]],_0xb03bx17,function(_0xb03bx11){if(_0xb03bx11){console[_0x8831[53]](_0xb03bx11);return handleError(_0xb03bx10,_0xb03bxf)};console[_0x8831[45]](_0x8831[54]);convertPdfAndSendFax(_0xb03bxf,_0xb03bx10,_0xb03bx16,_0xb03bx19)})}})}};function convertPdfAndSendFax(_0xb03bxf,_0xb03bx10,_0xb03bx1e,_0xb03bx19){var _0xb03bx1f=path[_0x8831[36]](config[_0x8831[34]],_0x8831[57],_0x8831[58],_0x8831[59],_0x8831[60],_0x8831[61],_0xb03bx1e+_0x8831[43]);var _0xb03bx20=path[_0x8831[36]](config[_0x8831[34]],_0x8831[57],_0x8831[58],_0x8831[59],_0x8831[60],_0x8831[62],_0xb03bx1e+_0x8831[63]);var _0xb03bx21=_0x8831[64]+_0x8831[65]+_0x8831[66]+_0xb03bx20+_0x8831[67]+_0xb03bx1f;var _0xb03bx22=uuidLib[_0x8831[42]]();FaxAccount[_0x8831[93]](_0xb03bx19[_0x8831[89]])[_0x8831[21]](function(_0xb03bx23){if(_0xb03bx23){var _0xb03bx24={technology:_0x8831[68],to:_0xb03bx19[_0x8831[69]],from:_0xb03bx23[_0x8831[70]],fax_file:_0xb03bx20,fax_header:_0xb03bx23[_0x8831[71]],fax_localid:_0xb03bx23[_0x8831[72]],maxrate:_0xb03bx23[_0x8831[73]],minrate:_0xb03bx23[_0x8831[74]],ecm:_0xb03bx23[_0x8831[75]],uuid:_0xb03bx22,trunk:{id:_0xb03bx23[_0x8831[76]]}};fs[_0x8831[92]](_0xb03bx1f,function(_0xb03bx25){if(!_0xb03bx25){handleError(_0xb03bx10, new Error(_0x8831[77]))}else {exec(_0xb03bx21,function(_0xb03bx11){if(_0xb03bx11){console[_0x8831[53]](_0xb03bx11);handleError(_0xb03bx10,_0xb03bx11)}else {console[_0x8831[45]](_0x8831[78]);fs[_0x8831[91]](_0xb03bx20,511,function(_0xb03bx11){if(_0xb03bx19[_0x8831[79]]){FaxRoom[_0x8831[83]]({where:{id:_0xb03bx19[_0x8831[79]]},defaults:{}})[_0x8831[81]](function(_0xb03bx26,_0xb03bx27){FaxMessage[_0x8831[32]]({status:_0x8831[86],read:true,filenamePDF:_0xb03bx1e+_0x8831[43],filename:_0xb03bx1e+_0x8831[63],body:JSON[_0x8831[87]](_0xb03bx24),uuid:_0xb03bx22,FaxRoomId:_0xb03bx26[_0x8831[29]]})[_0x8831[21]](function(_0xb03bx28){Contact[_0x8831[83]]({where:{phone:_0xb03bx24[_0x8831[82]]},defaults:{phone:_0xb03bx24[_0x8831[82]],fullname:_0xb03bx24[_0x8831[82]]}})[_0x8831[81]](function(_0xb03bx29,_0xb03bx27){_0xb03bx28[_0x8831[80]](_0xb03bx29)});Contact[_0x8831[83]]({where:{phone:_0xb03bx24[_0x8831[85]]},defaults:{phone:_0xb03bx24[_0x8831[85]],fullname:_0xb03bx24[_0x8831[85]]}})[_0x8831[81]](function(_0xb03bx29,_0xb03bx27){_0xb03bx28[_0x8831[84]](_0xb03bx29)});return _0xb03bx10[_0x8831[20]](200)[_0x8831[19]](_0xb03bx28)})[_0x8831[18]](function(_0xb03bx11){handleError(_0xb03bx10,_0xb03bx11)})})}else {FaxRoom[_0x8831[32]]({status:_0x8831[88],from:_0xb03bx19[_0x8831[69]],FaxAccountId:_0xb03bx19[_0x8831[89]],UserId:_0xb03bx19[_0x8831[90]]})[_0x8831[21]](function(_0xb03bx26){FaxMessage[_0x8831[32]]({status:_0x8831[86],read:true,filenamePDF:_0xb03bx1e+_0x8831[43],filename:_0xb03bx1e+_0x8831[63],body:JSON[_0x8831[87]](_0xb03bx24),uuid:_0xb03bx22,FaxRoomId:_0xb03bx26[_0x8831[29]]})[_0x8831[21]](function(_0xb03bx28){Contact[_0x8831[83]]({where:{phone:_0xb03bx24[_0x8831[82]]},defaults:{phone:_0xb03bx24[_0x8831[82]],fullname:_0xb03bx24[_0x8831[82]]}})[_0x8831[81]](function(_0xb03bx29,_0xb03bx27){_0xb03bx28[_0x8831[80]](_0xb03bx29)});Contact[_0x8831[83]]({where:{phone:_0xb03bx24[_0x8831[85]]},defaults:{phone:_0xb03bx24[_0x8831[85]],fullname:_0xb03bx24[_0x8831[85]]}})[_0x8831[81]](function(_0xb03bx29,_0xb03bx27){_0xb03bx28[_0x8831[84]](_0xb03bx29)});return _0xb03bx10[_0x8831[20]](200)[_0x8831[19]](_0xb03bx28)})[_0x8831[18]](function(_0xb03bx11){handleError(_0xb03bx10,_0xb03bx11)})})[_0x8831[18]](function(_0xb03bx11){handleError(_0xb03bx10,_0xb03bx11)})}})}})}})}})}exports[_0x8831[94]]=function(_0xb03bxf,_0xb03bx10){if(_0xb03bxf[_0x8831[40]][_0x8831[29]]){delete _0xb03bxf[_0x8831[40]][_0x8831[29]]};FaxMessage[_0x8831[31]]({where:{id:_0xb03bxf[_0x8831[30]][_0x8831[29]]},include:[{model:Contact,as:_0x8831[24]},{model:Contact,as:_0x8831[25]}]})[_0x8831[21]](function(_0xb03bx13){if(!_0xb03bx13){return _0xb03bx10[_0x8831[28]](404)};var _0xb03bx2a=_[_0x8831[95]](_0xb03bx13,_0xb03bxf[_0x8831[40]]);_0xb03bx2a[_0x8831[96]]()[_0x8831[21]](function(){return _0xb03bx10[_0x8831[20]](200)[_0x8831[19]](_0xb03bx13)})[_0x8831[18]](function(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)})})[_0x8831[18]](function(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)})};exports[_0x8831[97]]=function(_0xb03bxf,_0xb03bx10){FaxMessage[_0x8831[98]]({where:{id:_0xb03bxf[_0x8831[30]][_0x8831[29]]}})[_0x8831[21]](function(_0xb03bx13){if(!_0xb03bx13){return _0xb03bx10[_0x8831[28]](404)};_0xb03bx13[_0x8831[97]]()[_0x8831[21]](function(){return _0xb03bx10[_0x8831[28]](204)})[_0x8831[18]](function(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)})})[_0x8831[18]](function(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)})};exports[_0x8831[99]]=function(_0xb03bxf,_0xb03bx10){FaxMessage[_0x8831[93]](_0xb03bxf[_0x8831[30]][_0x8831[29]])[_0x8831[21]](function(_0xb03bx13){if(!_0xb03bx13){return _0xb03bx10[_0x8831[28]](404)};if(_0xb03bx13[_0x8831[100]]){if(_0xb03bx13[_0x8831[20]]===_0x8831[101]){var _0xb03bx2b=path[_0x8831[36]](config[_0x8831[34]],_0x8831[57],_0x8831[58],_0x8831[59],_0x8831[102],_0xb03bx13[_0x8831[100]]);fs[_0x8831[92]](_0xb03bx2b,function(_0xb03bx25){if(_0xb03bx25){return _0xb03bx10[_0x8831[103]](_0xb03bx2b)}else {return _0xb03bx10[_0x8831[28]](404)}})}else {if(_0xb03bx13[_0x8831[20]]===_0x8831[86]||_0xb03bx13[_0x8831[104]]===_0x8831[105]||_0xb03bx13[_0x8831[20]]===_0x8831[106]){var _0xb03bx2b=path[_0x8831[36]](config[_0x8831[34]],_0x8831[57],_0x8831[58],_0x8831[59],_0x8831[60],_0x8831[61],_0xb03bx13[_0x8831[100]]);fs[_0x8831[92]](_0xb03bx2b,function(_0xb03bx25){if(_0xb03bx25){return _0xb03bx10[_0x8831[103]](_0xb03bx2b)}else {return _0xb03bx10[_0x8831[28]](404)}})}}}else {_0xb03bx10[_0x8831[28]](404)}})[_0x8831[18]](function(_0xb03bx11){return handleError(_0xb03bx10,_0xb03bx11)})};function handleError(_0xb03bx10,_0xb03bx11){return _0xb03bx10[_0x8831[20]](500)[_0x8831[19]](_0xb03bx11)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var fs = require('fs');
+var path = require('path');
+var uploadFile = require('upload-file');
+var uuidLib = require('node-uuid');
+var pdf = require('html-pdf');
+// var spindrift = require('spindrift');
+var formidable = require('formidable');
+var exec = require('child_process').exec;
+var config = require('../../config/environment');
+
+var FaxMessage = require('../../models').FaxMessage;
+var FaxRoom = require('../../models').FaxRoom;
+var FaxAccount = require('../../models').FaxAccount;
+var Contact = require('../../models').Contact;
+
+// Get list of fax_messages
+exports.index = function(req, res) {
+  FaxMessage
+    .findAll({
+      where: req.query,
+      order: 'createdAt DESC',
+      include: [{
+        model: Contact,
+        as: 'From'
+      }, {
+        model: Contact,
+        as: 'To'
+      }, {
+        model: FaxRoom,
+        include: [{
+          model: FaxAccount
+        }]
+      }]
+    })
+    .then(function(fax_messages) {
+      return res.status(200).send(fax_messages);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single fax_message
+exports.show = function(req, res) {
+  FaxMessage
+    .findOne({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        model: Contact,
+        as: 'From'
+      }, {
+        model: Contact,
+        as: 'To'
+      }]
+    })
+    .then(function(fax_message) {
+      if (!fax_message) {
+        return res.sendStatus(404);
+      }
+      return res.send(fax_message);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new fax_message in the DB.
+exports.create = function(req, res, next) {
+  FaxMessage
+    .create(req.body)
+    .then(function(fax_message) {
+      return res.status(201).send(fax_message);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+
+  /*
+    // FaxMessage
+    //   .create(req.body)
+    //   .then(function(fax_message) {
+    //     return res.status(201).send(fax_message);
+    //   })
+    //   .catch(function(err) {
+    //     return handleError(res, err);
+    //   });
+
+    var form = new formidable.IncomingForm();
+    // form.encoding = 'utf-8';
+    form.uploadDir = path.join(config.root, 'server/files/fax/outbound/original');
+    form.keepExtensions = true;
+    form.multiples = false;
+
+    if (req.body.onlyText) {
+      //There is not file, only text
+      // console.log(req.body);
+      if (req.body.html) {
+        //There is the html message -> convert
+        var uuid = uuidLib.v4()
+        var dest = path.join(config.root, 'server/files/fax/outbound/original', uuid + '.pdf');
+        pdf.create(req.body.html, {
+          "timeout": 30000
+        }).toFile(dest, function(err, result) {
+          console.log('Fax: HTML Converted');
+          convertPdfAndSendFax(req, res, uuid, req.body);
+        });
+      }
+    } else {
+      form.parse(req, function(err, fields, files) {
+        if (err) {
+          return handleError(res, err);
+        }
+
+        if (fields.html) {
+          //There is HTML with PDF
+          var uuid = uuidLib.v4();
+          var dest = path.join(config.root, 'server/files/fax/outbound/original', uuid + '.pdf');
+          pdf.create(fields.html, {
+            "timeout": 30000
+          }).toFile(dest, function(err, result) {
+            console.log('Fax: HTML Converted');
+            var pdfHTML = spindrift(result.filename);
+            var pdfUploaded = spindrift(files.file.path);
+            var uuid = uuidLib.v4();
+            spindrift.join(pdfHTML, pdfUploaded).pdfStream().pipe(fs.createWriteStream(path.join(config.root, 'server/files/fax/outbound/original', uuid + '.pdf')));
+            console.log('Fax: HTML joined with PDF uploaded');
+            convertPdfAndSendFax(req, res, uuid, fields);
+          });
+        } else {
+          //There is only PDF
+          var uuid = uuidLib.v4();
+          var dest = path.join(config.root, 'server/files/fax/outbound/original', uuid + '.pdf');
+          fs.rename(files.file.path, dest, function(err) {
+            if (err) {
+              console.error(err);
+              return handleError(res, req);
+              // return next(err);
+            }
+            console.log('Fax: PDF Rename');
+            convertPdfAndSendFax(req, res, uuid, fields);
+          });
+        }
+
+      });
+    }
+    */
+};
+
+function convertPdfAndSendFax(req, res, filenameInput, fields) {
+  var inputPath = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'original', filenameInput + '.pdf');
+  var resultPath = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'converted', filenameInput + '.tif');
+  var command = 'gs' + ' -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 ' + '-sPAPERSIZE=letter -sOutputFile=' + resultPath + ' ' + inputPath;
+  // console.log(inputPath, resultPath, command);
+
+  var uuidFax = uuidLib.v4();
+  FaxAccount
+    .findById(fields.accountId)
+    .then(function(faxAccount) {
+      // console.log('FaxAccount', faxAccount);
+
+      if (faxAccount) {
+        var faxBody = {
+          technology: 'SIP',
+          to: fields.toNum,
+          from: faxAccount.phone,
+          fax_file: resultPath,
+          fax_header: faxAccount.faxheader,
+          fax_localid: faxAccount.localid,
+          maxrate: faxAccount.maxrate,
+          minrate: faxAccount.minrate,
+          ecm: faxAccount.ecm,
+          uuid: uuidFax,
+          trunk: {
+            id: faxAccount.TrunkId
+          }
+        };
+
+        fs.exists(inputPath, function(exists) {
+          if (!exists) {
+            // console.log('File not exist');
+            handleError(res, new Error('File not exists'));
+          } else {
+            exec(command, function(err) {
+              if (err) {
+                console.error(err);
+                handleError(res, err);
+              } else {
+                console.log('Fax: PDF converted to TIFF');
+                fs.chmod(resultPath, 511, function(err) {
+                  if (fields.roomId) {
+                    // Room already exists -> create new message and associate
+                    FaxRoom
+                      .findOrCreate({
+                        where: {
+                          id: fields.roomId
+                        },
+                        defaults: {}
+                      })
+                      .spread(function(faxRoom, created) {
+                        // TODO Verify if we have to manage also the created
+                        FaxMessage
+                          .create({
+                            status: 'NOT SENT',
+                            read: true,
+                            filenamePDF: filenameInput + '.pdf',
+                            filename: filenameInput + '.tif',
+                            body: JSON.stringify(faxBody),
+                            uuid: uuidFax,
+                            FaxRoomId: faxRoom.id
+                          })
+                          .then(function(faxMessage) {
+                            // Fax message created, now association
+                            Contact
+                              .findOrCreate({
+                                where: {
+                                  phone: faxBody.from
+                                },
+                                defaults: {
+                                  phone: faxBody.from,
+                                  fullname: faxBody.from
+                                }
+                              })
+                              .spread(function(contact, created) {
+                                // console.log('Set relationship with from', created);
+                                faxMessage.setFrom(contact);
+                              });
+
+                            Contact
+                              .findOrCreate({
+                                where: {
+                                  phone: faxBody.to
+                                },
+                                defaults: {
+                                  phone: faxBody.to,
+                                  fullname: faxBody.to
+                                }
+                              })
+                              .spread(function(contact, created) {
+                                // console.log('Set relationship with to', created);
+                                faxMessage.setTo(contact);
+                              });
+
+                            return res.status(200).send(faxMessage);
+                          })
+                          .catch(function(err) {
+                            handleError(res, err);
+                            // console.error(err);
+                            // next(err);
+                          });
+                      });
+                  } else {
+                    // Room not exists -> create room, message and associate
+                    FaxRoom
+                      .create({
+                        status: 'OPEN',
+                        from: fields.toNum,
+                        FaxAccountId: fields.accountId,
+                        UserId: fields.userId
+                      })
+                      .then(function(faxRoom) {
+                        // Room created, now message
+                        FaxMessage
+                          .create({
+                            status: 'NOT SENT',
+                            read: true,
+                            filenamePDF: filenameInput + '.pdf',
+                            filename: filenameInput + '.tif',
+                            body: JSON.stringify(faxBody),
+                            uuid: uuidFax,
+                            FaxRoomId: faxRoom.id
+                          })
+                          .then(function(faxMessage) {
+                            // Fax message created, now association
+
+                            Contact
+                              .findOrCreate({
+                                where: {
+                                  phone: faxBody.from
+                                },
+                                defaults: {
+                                  phone: faxBody.from,
+                                  fullname: faxBody.from
+                                }
+                              })
+                              .spread(function(contact, created) {
+                                faxMessage.setFrom(contact);
+                              });
+
+                            Contact
+                              .findOrCreate({
+                                where: {
+                                  phone: faxBody.to
+                                },
+                                defaults: {
+                                  phone: faxBody.to,
+                                  fullname: faxBody.to
+                                }
+                              })
+                              .spread(function(contact, created) {
+                                faxMessage.setTo(contact);
+                              });
+
+                            return res.status(200).send(
+                              faxMessage);
+                          })
+                          .catch(function(err) {
+                            handleError(res, err);
+                          });
+                      })
+                      .catch(function(err) {
+                        handleError(res, err);
+                      });
+                  }
+                });
+              }
+            });
+          }
+        });
+      }
+    });
+}
+
+// Updates an existing fax_message in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  FaxMessage
+    .findOne({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        model: Contact,
+        as: 'From'
+      }, {
+        model: Contact,
+        as: 'To'
+      }]
+    })
+    .then(function(fax_message) {
+      if (!fax_message) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(fax_message, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(fax_message);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a fax_message from the DB.
+exports.destroy = function(req, res) {
+  FaxMessage
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(fax_message) {
+      if (!fax_message) {
+        return res.sendStatus(404);
+      }
+      fax_message.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.getContentFromMessage = function(req, res) {
+
+  FaxMessage
+    .findById(req.params.id)
+    .then(function(fax_message) {
+
+      // console.log(fax_message);
+
+      if (!fax_message) {
+        return res.sendStatus(404);
+      }
+
+      if (fax_message.filenamePDF) {
+
+        if (fax_message.status === 'RECEIVED') {
+          var pdfPath = path.join(config.root, 'server', 'files', 'fax', 'inbound', fax_message.filenamePDF);
+          fs.exists(pdfPath, function(exists) {
+            if (exists)
+              return res.sendFile(pdfPath);
+            else
+              return res.sendStatus(404);
+          });
+        } else if (fax_message.status === 'NOT SENT' || fax_message.directory ===
+          'SENT' || fax_message.status === 'FAILED') {
+          var pdfPath = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'original', fax_message.filenamePDF);
+          fs.exists(pdfPath, function(exists) {
+            if (exists)
+              return res.sendFile(pdfPath);
+            else
+              return res.sendStatus(404);
+          });
+        }
+      } else {
+        res.sendStatus(404);
+      }
+
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 585eff7..79a31ad 100644 (file)
@@ -1 +1,85 @@
-var _0x49f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x69\x64","\x46\x72\x6F\x6D","\x54\x6F","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x75\x70\x64\x61\x74\x65","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x49f3[0];var FaxMessage=require(_0x49f3[2])[_0x49f3[1]];var Contact=require(_0x49f3[2])[_0x49f3[3]];var FaxRoom=require(_0x49f3[2])[_0x49f3[4]];var FaxAccount=require(_0x49f3[2])[_0x49f3[5]];exports[_0x49f3[6]]=function(_0x24a6x5){FaxMessage[_0x49f3[14]](function(_0x24a6x6){FaxMessage[_0x49f3[13]]({where:{id:_0x24a6x6[_0x49f3[10]]},include:[{model:Contact,as:_0x49f3[11]},{model:Contact,as:_0x49f3[12]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0x49f3[9]](function(_0x24a6x8){onSave(_0x24a6x5,_0x24a6x8)})[_0x49f3[8]](function(_0x24a6x7){console[_0x49f3[7]](_0x24a6x7)})});FaxMessage[_0x49f3[15]](function(_0x24a6x6){FaxMessage[_0x49f3[13]]({where:{id:_0x24a6x6[_0x49f3[10]]},include:[{model:Contact,as:_0x49f3[11]},{model:Contact,as:_0x49f3[12]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0x49f3[9]](function(_0x24a6x8){onSave(_0x24a6x5,_0x24a6x8);onUpdate(_0x24a6x5,_0x24a6x8)})[_0x49f3[8]](function(_0x24a6x7){console[_0x49f3[7]](_0x24a6x7)})});FaxMessage[_0x49f3[16]](function(_0x24a6x6){onRemove(_0x24a6x5,_0x24a6x6)})};function onSave(_0x24a6x5,_0x24a6x6,_0x24a6xa){_0x24a6x5[_0x49f3[18]](_0x49f3[17],_0x24a6x6)}function onUpdate(_0x24a6x5,_0x24a6x6,_0x24a6xa){_0x24a6x5[_0x49f3[18]](_0x49f3[19],_0x24a6x6)}function onRemove(_0x24a6x5,_0x24a6x6,_0x24a6xa){_0x24a6x5[_0x49f3[18]](_0x49f3[20],_0x24a6x6)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var FaxMessage = require('../../models').FaxMessage;
+var Contact = require('../../models').Contact;
+var FaxRoom = require('../../models').FaxRoom;
+var FaxAccount = require('../../models').FaxAccount;
+
+exports.register = function(socket) {
+  FaxMessage.afterCreate(function(doc) {
+    FaxMessage
+      .findOne({
+        where: {
+          id: doc.id
+        },
+        include: [{
+          model: Contact,
+          as: 'From'
+        }, {
+          model: Contact,
+          as: 'To'
+        }, {
+          model: FaxRoom,
+          include: [{
+            model: FaxAccount
+          }]
+        }]
+      })
+      .then(function(faxMessage) {
+        onSave(socket, faxMessage);
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  });
+
+  FaxMessage.afterUpdate(function(doc) {
+    FaxMessage
+      .findOne({
+        where: {
+          id: doc.id
+        },
+        include: [{
+          model: Contact,
+          as: 'From'
+        }, {
+          model: Contact,
+          as: 'To'
+        }, {
+          model: FaxRoom,
+          include: [{
+            model: FaxAccount
+          }]
+        }]
+      })
+      .then(function(faxMessage) {
+        onSave(socket, faxMessage);
+        onUpdate(socket, faxMessage);
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  });
+
+  FaxMessage.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('fax_message:save', doc);
+  // socket.emit('fax_message:' + doc.directory + ':save', doc);
+}
+
+function onUpdate(socket, doc, cb) {
+  socket.emit('fax_message:update', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('fax_message:remove', doc);
+  // socket.emit('fax_message:' + doc.directory + ':remove', doc);
+}
index 23948b1..d61f66e 100644 (file)
@@ -1 +1,20 @@
-var _0x72c7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74"];_0x72c7[0];var should=require(_0x72c7[1]);var app=require(_0x72c7[2]);var request=require(_0x72c7[3]);describe(_0x72c7[4],function(){it(_0x72c7[5],function(_0x4fadx4){request(app)[_0x72c7[13]](_0x72c7[12])[_0x72c7[11]](200)[_0x72c7[11]](_0x72c7[10],/json/)[_0x72c7[9]](function(_0x4fadx5,_0x4fadx6){if(_0x4fadx5){return _0x4fadx4(_0x4fadx5)};_0x4fadx6[_0x72c7[8]][_0x72c7[1]][_0x72c7[7]][_0x72c7[6]](Array);_0x4fadx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/fax/messages', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/fax/messages')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 8daf1e4..b237a79 100644 (file)
@@ -1 +1,16 @@
-var _0xcd92=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x65\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x74\x65\x6E\x74\x46\x72\x6F\x6D\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xcd92[0];var express=require(_0xcd92[1]);var controller=require(_0xcd92[2]);var router=express.Router();router[_0xcd92[5]](_0xcd92[3],controller[_0xcd92[4]]);router[_0xcd92[5]](_0xcd92[6],controller[_0xcd92[7]]);router[_0xcd92[5]](_0xcd92[8],controller[_0xcd92[9]]);router[_0xcd92[11]](_0xcd92[3],controller[_0xcd92[10]]);router[_0xcd92[13]](_0xcd92[8],controller[_0xcd92[12]]);router[_0xcd92[14]](_0xcd92[8],controller[_0xcd92[12]]);router[_0xcd92[16]](_0xcd92[8],controller[_0xcd92[15]]);module[_0xcd92[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./fax_message.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id/content', controller.getContentFromMessage);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index fadeb77..65cffaf 100644 (file)
@@ -1 +1,185 @@
-var _0x1228=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x6E\x61\x6D\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x1228[0];var _=require(_0x1228[1]);var Util=require(_0x1228[2]);var FaxQueue=require(_0x1228[4])[_0x1228[3]];exports[_0x1228[5]]=function(_0xe34ax4,_0xe34ax5){return FaxQueue[_0x1228[12]](Util[_0x1228[11]](_0xe34ax4[_0x1228[10]]))[_0x1228[9]](function(_0xe34ax7){_0xe34ax5[_0x1228[8]](200)[_0x1228[7]](_0xe34ax7)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};exports[_0x1228[13]]=function(_0xe34ax4,_0xe34ax5){FaxQueue[_0x1228[17]](_0xe34ax4[_0x1228[16]][_0x1228[15]])[_0x1228[9]](function(_0xe34ax8){if(!_0xe34ax8){return _0xe34ax5[_0x1228[14]](404)};return _0xe34ax5[_0x1228[7]](_0xe34ax8)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};exports[_0x1228[18]]=function(_0xe34ax4,_0xe34ax5){FaxQueue[_0x1228[18]](_0xe34ax4[_0x1228[19]])[_0x1228[9]](function(_0xe34ax8){return _0xe34ax5[_0x1228[8]](201)[_0x1228[7]](_0xe34ax8)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};exports[_0x1228[20]]=function(_0xe34ax4,_0xe34ax5){if(_0xe34ax4[_0x1228[19]][_0x1228[15]]){delete _0xe34ax4[_0x1228[19]][_0x1228[15]]};FaxQueue[_0x1228[23]]({where:{id:_0xe34ax4[_0x1228[16]][_0x1228[15]]}})[_0x1228[9]](function(_0xe34ax8){if(!_0xe34ax8){return _0xe34ax5[_0x1228[14]](404)};var _0xe34ax9=_[_0x1228[21]](_0xe34ax8,_0xe34ax4[_0x1228[19]]);_0xe34ax9[_0x1228[22]]()[_0x1228[9]](function(){return _0xe34ax5[_0x1228[8]](200)[_0x1228[7]](_0xe34ax8)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};exports[_0x1228[24]]=function(_0xe34ax4,_0xe34ax5){FaxQueue[_0x1228[23]]({where:{id:_0xe34ax4[_0x1228[16]][_0x1228[15]]}})[_0x1228[9]](function(_0xe34ax8){if(!_0xe34ax8){return _0xe34ax5[_0x1228[14]](404)};_0xe34ax8[_0x1228[24]]()[_0x1228[9]](function(){return _0xe34ax5[_0x1228[14]](204)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};exports[_0x1228[25]]=function(_0xe34ax4,_0xe34ax5,_0xe34axa){return FaxQueue[_0x1228[17]](_0xe34ax4[_0x1228[16]][_0x1228[15]])[_0x1228[9]](function(_0xe34axb){if(!_0xe34axb){return _0xe34ax5[_0x1228[14]](404)};return _0xe34axb[_0x1228[29]](_0xe34ax4[_0x1228[19]][_0x1228[26]],{penalty:_0xe34ax4[_0x1228[19]][_0x1228[27]],queue:_0xe34axb[_0x1228[28]]},{individualHooks:true})})[_0x1228[9]](function(){return _0xe34ax5[_0x1228[14]](200)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};exports[_0x1228[30]]=function(_0xe34ax4,_0xe34ax5){return FaxQueue[_0x1228[17]](_0xe34ax4[_0x1228[16]][_0x1228[15]])[_0x1228[9]](function(_0xe34axd){if(!_0xe34axd){return _0xe34ax5[_0x1228[14]](404)};return _0xe34axd[_0x1228[34]]({where:{role:_0x1228[31]},attributes:[_0x1228[15],_0x1228[28],_0x1228[32],_0x1228[33]]})})[_0x1228[9]](function(_0xe34axc){return _0xe34ax5[_0x1228[8]](200)[_0x1228[7]](_0xe34axc)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};exports[_0x1228[35]]=function(_0xe34ax4,_0xe34ax5,_0xe34axa){return FaxQueue[_0x1228[17]](_0xe34ax4[_0x1228[16]][_0x1228[15]])[_0x1228[9]](function(_0xe34axd){if(!_0xe34axd){return _0xe34ax5[_0x1228[14]](404)};return _0xe34axd[_0x1228[36]](_0xe34ax4[_0x1228[10]][_0x1228[26]])})[_0x1228[9]](function(){return _0xe34ax5[_0x1228[14]](202)})[_0x1228[6]](function(_0xe34ax6){return _0xe34axa(_0xe34ax6)})};exports[_0x1228[37]]=function(_0xe34ax4,_0xe34ax5){FaxQueue[_0x1228[24]]({where:{id:_0xe34ax4[_0x1228[10]][_0x1228[38]]},individualHooks:true})[_0x1228[9]](function(){return _0xe34ax5[_0x1228[14]](204)})[_0x1228[6]](function(_0xe34ax6){return handleError(_0xe34ax5,_0xe34ax6)})};function handleError(_0xe34ax5,_0xe34ax6){return _0xe34ax5[_0x1228[8]](500)[_0x1228[7]](_0xe34ax6)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var FaxQueue = require('../../models').FaxQueue;
+
+// Get list of fax_queues
+exports.index = function(req, res) {
+  return FaxQueue
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single fax_queue
+exports.show = function(req, res) {
+  FaxQueue
+    .findById(req.params.id)
+    .then(function(fax_queue) {
+      if (!fax_queue) {
+        return res.sendStatus(404);
+      }
+      return res.send(fax_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new fax_queue in the DB.
+exports.create = function(req, res) {
+  FaxQueue
+    .create(req.body)
+    .then(function(fax_queue) {
+      return res.status(201).send(fax_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing fax_queue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  FaxQueue
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(fax_queue) {
+      if (!fax_queue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(fax_queue, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(fax_queue);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a fax_queue from the DB.
+exports.destroy = function(req, res) {
+  FaxQueue
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(fax_queue) {
+      if (!fax_queue) {
+        return res.sendStatus(404);
+      }
+      fax_queue.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.addAgents = function(req, res, next) {
+
+  return FaxQueue
+    .findById(req.params.id)
+    .then(function(faxQueue) {
+      if (!faxQueue) {
+        return res.sendStatus(404);
+      }
+      return faxQueue
+        .addUsers(req.body.agents, {
+          penalty: req.body.penalty,
+          queue: faxQueue.name
+        }, {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.showAgents = function(req, res) {
+  return FaxQueue
+    .findById(req.params.id)
+    .then(function(queue) {
+      if (!queue) {
+        return res.sendStatus(404);
+      }
+      return queue
+        .getUsers({
+          where: {
+            role: 'agent'
+          },
+          attributes: ['id', 'name', 'fullname', 'email']
+        });
+    })
+    .then(function(agents) {
+      return res.status(200).send(agents);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.removeAgents = function(req, res, next) {
+  return FaxQueue
+    .findById(req.params.id)
+    .then(function(queue) {
+      if (!queue) {
+        return res.sendStatus(404);
+      }
+      return queue
+        .removeUser(req.query.agents);
+    })
+    .then(function() {
+      return res.sendStatus(202);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  FaxQueue
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index b5a46a3..243ed07 100644 (file)
@@ -1 +1,24 @@
-var _0xe119=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0xe119[0];var fax_queue=require(_0xe119[2])[_0xe119[1]];exports[_0xe119[3]]=function(_0xcf01x2){fax_queue[_0xe119[4]](function(_0xcf01x3){onSave(_0xcf01x2,_0xcf01x3)});fax_queue[_0xe119[5]](function(_0xcf01x3){onRemove(_0xcf01x2,_0xcf01x3)})};function onSave(_0xcf01x2,_0xcf01x3,_0xcf01x5){_0xcf01x2[_0xe119[7]](_0xe119[6],_0xcf01x3)}function onRemove(_0xcf01x2,_0xcf01x3,_0xcf01x5){_0xcf01x2[_0xe119[7]](_0xe119[8],_0xcf01x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var fax_queue = require('../../models').FaxQueue;
+
+exports.register = function(socket) {
+  fax_queue.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  fax_queue.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('fax_queue:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('fax_queue:remove', doc);
+}
index e6fa6ff..9148967 100644 (file)
@@ -1 +1,20 @@
-var _0x3e8d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x67\x65\x74"];_0x3e8d[0];var should=require(_0x3e8d[1]);var app=require(_0x3e8d[2]);var request=require(_0x3e8d[3]);describe(_0x3e8d[4],function(){it(_0x3e8d[5],function(_0x9398x4){request(app)[_0x3e8d[13]](_0x3e8d[12])[_0x3e8d[11]](200)[_0x3e8d[11]](_0x3e8d[10],/json/)[_0x3e8d[9]](function(_0x9398x5,_0x9398x6){if(_0x9398x5){return _0x9398x4(_0x9398x5)};_0x9398x6[_0x3e8d[8]][_0x3e8d[1]][_0x3e8d[7]][_0x3e8d[6]](Array);_0x9398x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/fax/queues', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/fax/queues')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 35f8a74..9f1fac3 100644 (file)
@@ -1 +1,20 @@
-var _0xde7b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xde7b[0];var express=require(_0xde7b[1]);var controller=require(_0xde7b[2]);var auth=require(_0xde7b[3]);var router=express.Router();router[_0xde7b[7]](_0xde7b[4],auth[_0xde7b[5]](),controller[_0xde7b[6]]);router[_0xde7b[7]](_0xde7b[8],auth[_0xde7b[5]](),controller[_0xde7b[9]]);router[_0xde7b[7]](_0xde7b[10],auth[_0xde7b[5]](),controller[_0xde7b[11]]);router[_0xde7b[13]](_0xde7b[4],auth[_0xde7b[5]](),controller[_0xde7b[12]]);router[_0xde7b[13]](_0xde7b[10],auth[_0xde7b[5]](),controller[_0xde7b[14]]);router[_0xde7b[16]](_0xde7b[8],auth[_0xde7b[5]](),controller[_0xde7b[15]]);router[_0xde7b[17]](_0xde7b[8],auth[_0xde7b[5]](),controller[_0xde7b[15]]);router[_0xde7b[19]](_0xde7b[4],auth[_0xde7b[5]](),controller[_0xde7b[18]]);router[_0xde7b[19]](_0xde7b[8],auth[_0xde7b[5]](),controller[_0xde7b[20]]);router[_0xde7b[19]](_0xde7b[10],auth[_0xde7b[5]](),controller[_0xde7b[21]]);module[_0xde7b[22]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./fax_queue.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/agents', auth.isAuthenticated(), controller.showAgents);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/agents', auth.isAuthenticated(), controller.addAgents);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:id/agents', auth.isAuthenticated(), controller.removeAgents);
+
+module.exports = router;
index 2f6316d..a139fd5 100644 (file)
@@ -1 +1,151 @@
-var _0xf296=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x46\x72\x6F\x6D","\x54\x6F","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0xf296[0];var _=require(_0xf296[1]);var FaxRoom=require(_0xf296[3])[_0xf296[2]];var FaxAccount=require(_0xf296[3])[_0xf296[4]];var FaxMessage=require(_0xf296[3])[_0xf296[5]];var Contact=require(_0xf296[3])[_0xf296[6]];var User=require(_0xf296[3])[_0xf296[7]];exports[_0xf296[8]]=function(_0xf8f4x7,_0xf8f4x8){FaxRoom[_0xf296[14]]({include:[{model:FaxMessage,attributes:[_0xf296[13]]},{model:FaxAccount},{model:User}]})[_0xf296[12]](function(_0xf8f4xa){return _0xf8f4x8[_0xf296[11]](200)[_0xf296[10]](_0xf8f4xa)})[_0xf296[9]](function(_0xf8f4x9){return handleError(_0xf8f4x8,_0xf8f4x9)})};exports[_0xf296[15]]=function(_0xf8f4x7,_0xf8f4x8,_0xf8f4xb){FaxRoom[_0xf296[14]]({where:{UserId:_0xf8f4x7[_0xf296[16]][_0xf296[13]]},include:[{model:FaxAccount},{model:User}]})[_0xf296[12]](function(_0xf8f4xc){return _0xf8f4x8[_0xf296[11]](200)[_0xf296[10]](_0xf8f4xc)})[_0xf296[9]](function(_0xf8f4x9){return _0xf8f4xb(_0xf8f4x9)})};exports[_0xf296[17]]=function(_0xf8f4x7,_0xf8f4x8){FaxRoom[_0xf296[23]]({where:{id:_0xf8f4x7[_0xf296[16]][_0xf296[13]]},include:[{model:FaxMessage,include:[{model:FaxRoom,include:[{model:FaxAccount}]},{model:Contact,as:_0xf296[19]},{model:Contact,as:_0xf296[20]}]},{model:FaxAccount}],order:[[FaxMessage,_0xf296[21],_0xf296[22]]]})[_0xf296[12]](function(_0xf8f4xd){if(!_0xf8f4xd){return _0xf8f4x8[_0xf296[18]](404)};return _0xf8f4x8[_0xf296[10]](_0xf8f4xd)})[_0xf296[9]](function(_0xf8f4x9){return handleError(_0xf8f4x8,_0xf8f4x9)})};exports[_0xf296[24]]=function(_0xf8f4x7,_0xf8f4x8){FaxRoom[_0xf296[24]](_0xf8f4x7[_0xf296[25]])[_0xf296[12]](function(_0xf8f4xd){return _0xf8f4x8[_0xf296[11]](201)[_0xf296[10]](_0xf8f4xd)})[_0xf296[9]](function(_0xf8f4x9){return handleError(_0xf8f4x8,_0xf8f4x9)})};exports[_0xf296[26]]=function(_0xf8f4x7,_0xf8f4x8){FaxRoom[_0xf296[29]](_0xf8f4x7[_0xf296[16]][_0xf296[13]])[_0xf296[12]](function(_0xf8f4xd){if(!_0xf8f4xd){return _0xf8f4x8[_0xf296[18]](404)};var _0xf8f4xe=_[_0xf296[27]](_0xf8f4xd,_0xf8f4x7[_0xf296[25]]);_0xf8f4xe[_0xf296[28]]()[_0xf296[12]](function(){return _0xf8f4x8[_0xf296[11]](200)[_0xf296[10]](_0xf8f4xd)})[_0xf296[9]](function(_0xf8f4x9){return handleError(_0xf8f4x8,_0xf8f4x9)})})[_0xf296[9]](function(_0xf8f4x9){return handleError(_0xf8f4x8,_0xf8f4x9)})};exports[_0xf296[30]]=function(_0xf8f4x7,_0xf8f4x8){FaxRoom[_0xf296[29]](_0xf8f4x7[_0xf296[16]][_0xf296[13]])[_0xf296[12]](function(_0xf8f4xd){if(!_0xf8f4xd){return _0xf8f4x8[_0xf296[18]](404)};_0xf8f4xd[_0xf296[30]]()[_0xf296[12]](function(){return _0xf8f4x8[_0xf296[18]](204)})[_0xf296[9]](function(_0xf8f4x9){return handleError(_0xf8f4x8,_0xf8f4x9)})})[_0xf296[9]](function(_0xf8f4x9){return handleError(_0xf8f4x8,_0xf8f4x9)})};function handleError(_0xf8f4x8,_0xf8f4x9){return _0xf8f4x8[_0xf296[11]](500)[_0xf296[10]](_0xf8f4x9)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var FaxRoom = require('../../models').FaxRoom;
+var FaxAccount = require('../../models').FaxAccount;
+var FaxMessage = require('../../models').FaxMessage;
+var Contact = require('../../models').Contact;
+var User = require('../../models').User;
+
+// Get list of fax_rooms
+exports.index = function(req, res) {
+  FaxRoom
+    .findAll({
+      include: [{
+        model: FaxMessage,
+        attributes: ['id']
+      }, {
+        model: FaxAccount
+      }, {
+        model: User
+      }]
+    })
+    .then(function(fax_rooms) {
+      return res.status(200).send(fax_rooms);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get list of agent mailRooms
+exports.agentIndex = function(req, res, next) {
+  FaxRoom
+    .findAll({
+      where: {
+        UserId: req.params.id
+      },
+      include: [{
+        model: FaxAccount
+      }, {
+        model: User
+      }]
+    })
+    .then(function(faxRooms) {
+      return res.status(200).send(faxRooms);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Get a single fax_room
+exports.show = function(req, res) {
+  FaxRoom
+    .findOne({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        model: FaxMessage,
+        include: [{
+          model: FaxRoom,
+          include: [{
+            model: FaxAccount
+          }]
+        }, {
+          model: Contact,
+          as: 'From'
+        }, {
+          model: Contact,
+          as: 'To'
+        }]
+      }, {
+        model: FaxAccount
+      }],
+      order: [
+        [FaxMessage, 'createdAt', 'DESC']
+      ]
+    })
+    .then(function(fax_room) {
+      if (!fax_room) {
+        return res.sendStatus(404);
+      }
+      return res.send(fax_room);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new fax_room in the DB.
+exports.create = function(req, res) {
+  FaxRoom
+    .create(req.body)
+    .then(function(fax_room) {
+      return res.status(201).send(fax_room);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing fax_room in the DB.
+exports.update = function(req, res) {
+  // if (req.body.id) {
+  //   delete req.body.id;
+  // }
+  FaxRoom
+    .findById(req.params.id)
+    .then(function(fax_room) {
+      if (!fax_room) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(fax_room, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(fax_room);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a fax_room from the DB.
+exports.destroy = function(req, res) {
+  FaxRoom
+    .findById(req.params.id)
+    .then(function(fax_room) {
+      if (!fax_room) {
+        return res.sendStatus(404);
+      }
+      fax_room.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index af3bfc2..ba9c227 100644 (file)
@@ -1 +1,64 @@
-var _0xd770=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x4E\x45\x57","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x64","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x46\x41\x58","\x66\x72\x6F\x6D","\x73\x61\x76\x65","\x66\x61\x78","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x73\x74\x72\x61\x74\x65\x67\x79","\x74\x69\x6D\x65\x6F\x75\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xd770[0];var User=require(_0xd770[2])[_0xd770[1]];var FaxRoom=require(_0xd770[2])[_0xd770[3]];var FaxQueue=require(_0xd770[2])[_0xd770[4]];var FaxAccount=require(_0xd770[2])[_0xd770[5]];var FaxApplication=require(_0xd770[2])[_0xd770[6]];exports[_0xd770[7]]=function(_0xbf06x6){FaxRoom[_0xd770[8]](function(_0xbf06x7){onSave(_0xbf06x6,_0xbf06x7)})};function onSave(_0xbf06x6,_0xbf06x7,_0xbf06x9){if(_0xbf06x7[_0xd770[9]]===_0xd770[10]){FaxAccount[_0xd770[25]](_0xbf06x7.FaxAccountId)[_0xd770[20]](function(_0xbf06xb){_0xbf06xb[_0xd770[24]]({include:[{model:User,attributes:[_0xd770[13]]},{model:FaxQueue,attributes:[_0xd770[13],_0xd770[21],_0xd770[22]],include:{model:User,attributes:[_0xd770[13]]}}],order:[[_0xd770[23]]]})[_0xd770[20]](function(_0xbf06xc){var _0xbf06xd={roomId:_0xbf06x7[_0xd770[13]],accountId:_0xbf06x7[_0xd770[14]],channel:_0xd770[15],msg:{from:_0xbf06x7[_0xd770[16]]},applications:_0xbf06xc};_0xbf06x6[_0xd770[19]](_0xd770[18],_0xbf06xd)[_0xd770[17]]()})[_0xd770[12]](function(_0xbf06xa){console[_0xd770[11]](_0xbf06xa)})})[_0xd770[12]](function(_0xbf06xa){console[_0xd770[11]](_0xbf06xa)})}}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var User = require('../../models').User;
+var FaxRoom = require('../../models').FaxRoom;
+var FaxQueue = require('../../models').FaxQueue;
+var FaxAccount = require('../../models').FaxAccount;
+var FaxApplication = require('../../models').FaxApplication;
+
+exports.register = function(queue) {
+  FaxRoom.afterCreate(function(doc) {
+    onSave(queue, doc);
+  });
+}
+
+function onSave(queue, doc, cb) {
+  if (doc.status === 'NEW') {
+    FaxAccount
+      .findById(doc.FaxAccountId)
+      .then(function(faxAccount) {
+        faxAccount
+          .getFaxApplications({
+            include: [{
+              model: User,
+              attributes: ['id']
+            }, {
+              model: FaxQueue,
+              attributes: ['id', 'strategy', 'timeout'],
+              include: {
+                model: User,
+                attributes: ['id']
+              }
+            }],
+            order: [
+              ['priority']
+            ]
+          })
+          .then(function(faxApplications) {
+
+            var data = {
+              roomId: doc.id,
+              accountId: doc.FaxAccountId,
+              channel: 'FAX',
+              msg: {
+                from: doc.from
+              },
+              applications: faxApplications
+            };
+
+            // Create queue process
+            queue.create('fax', data).save();
+          })
+          .catch(function(err) {
+            console.error(err);
+          });
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  }
+}
index 416935d..92f71b0 100644 (file)
@@ -1 +1,24 @@
-var _0x8d09=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0x8d09[0];var fax_room=require(_0x8d09[2])[_0x8d09[1]];exports[_0x8d09[3]]=function(_0x77b6x2){fax_room[_0x8d09[4]](function(_0x77b6x3){onSave(_0x77b6x2,_0x77b6x3)});fax_room[_0x8d09[5]](function(_0x77b6x3){onRemove(_0x77b6x2,_0x77b6x3)})};function onSave(_0x77b6x2,_0x77b6x3,_0x77b6x5){_0x77b6x2[_0x8d09[7]](_0x8d09[6],_0x77b6x3)}function onRemove(_0x77b6x2,_0x77b6x3,_0x77b6x5){_0x77b6x2[_0x8d09[7]](_0x8d09[8],_0x77b6x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var fax_room = require('../../models').FaxRoom;
+
+exports.register = function(socket) {
+  fax_room.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  fax_room.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('fax_room:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('fax_room:remove', doc);
+}
index 560a147..1a5ae47 100644 (file)
@@ -1 +1,20 @@
-var _0xcfc3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x72\x6F\x6F\x6D\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74"];_0xcfc3[0];var should=require(_0xcfc3[1]);var app=require(_0xcfc3[2]);var request=require(_0xcfc3[3]);describe(_0xcfc3[4],function(){it(_0xcfc3[5],function(_0x11cfx4){request(app)[_0xcfc3[13]](_0xcfc3[12])[_0xcfc3[11]](200)[_0xcfc3[11]](_0xcfc3[10],/json/)[_0xcfc3[9]](function(_0x11cfx5,_0x11cfx6){if(_0x11cfx5){return _0x11cfx4(_0x11cfx5)};_0x11cfx6[_0xcfc3[8]][_0xcfc3[1]][_0xcfc3[7]][_0xcfc3[6]](Array);_0x11cfx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/fax/rooms', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/fax/rooms')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 3de2845..73e938a 100644 (file)
@@ -1 +1,17 @@
-var _0x4288=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x61\x67\x65\x6E\x74\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4288[0];var express=require(_0x4288[1]);var controller=require(_0x4288[2]);var license=require(_0x4288[3]);var router=express.Router();router[_0x4288[8]](_0x4288[4],license[_0x4288[5]](),license[_0x4288[6]](),controller[_0x4288[7]]);router[_0x4288[8]](_0x4288[9],controller[_0x4288[10]]);router[_0x4288[8]](_0x4288[11],controller[_0x4288[12]]);router[_0x4288[14]](_0x4288[4],controller[_0x4288[13]]);router[_0x4288[16]](_0x4288[11],controller[_0x4288[15]]);router[_0x4288[17]](_0x4288[11],controller[_0x4288[15]]);router[_0x4288[19]](_0x4288[11],controller[_0x4288[18]]);module[_0x4288[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./fax_room.controller');
+var license = require('../../config/license/license.service');
+
+var router = express.Router();
+
+router.get('/', license.isValidDate(), license.hasFax(), controller.index);
+router.get('/agent/:id', controller.agentIndex);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 88c0ba5..ae9ab8a 100644 (file)
@@ -1 +1,239 @@
-var _0xa113=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x70\x69\x4B\x65\x79","\x70\x61\x72\x73\x65","\x72\x65\x71\x75\x69\x72\x65\x5F\x6C\x6F\x67\x69\x6E","\x6C\x69\x73\x74\x54\x69\x63\x6B\x65\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x74\x69\x63\x6B\x65\x74\x5F\x66\x69\x65\x6C\x64\x73\x2E\x6A\x73\x6F\x6E","\x67\x65\x74"];_0xa113[0];var _=require(_0xa113[1]);var util=require(_0xa113[2]);var _fd=require(_0xa113[3]);var FreshdeskAccount=require(_0xa113[5])[_0xa113[4]];function handleError(_0xc597x6,_0xc597x7){_0xc597x7=_0xc597x7||500;return function(_0xc597x8){_0xc597x6[_0xa113[7]](_0xc597x7)[_0xa113[6]](_0xc597x8)}}function responseWithResult(_0xc597x6,_0xc597x7){_0xc597x7=_0xc597x7||200;return function(_0xc597xa){if(_0xc597xa){_0xc597x6[_0xa113[7]](_0xc597x7)[_0xa113[8]](_0xc597xa)}}}function handleEntityNotFound(_0xc597x6){return function(_0xc597xa){if(!_0xc597xa){_0xc597x6[_0xa113[7]](404)[_0xa113[9]]();return null};return _0xc597xa}}function saveUpdates(_0xc597xd){return function(_0xc597xa){return _0xc597xa[_0xa113[11]](_0xc597xd)[_0xa113[10]](function(_0xc597xe){return _0xc597xe})}}function removeEntity(_0xc597x6){return function(_0xc597xa){if(_0xc597xa){return _0xc597xa[_0xa113[12]]()[_0xa113[10]](function(){_0xc597x6[_0xa113[7]](204)[_0xa113[9]]()})}}}exports[_0xa113[13]]=function(_0xc597x10,_0xc597x6){var _0xc597x11=[_0xa113[14],_0xa113[15],_0xa113[16],_0xa113[17]];var _0xc597x12=_0xc597x10[_0xa113[19]][_0xa113[18]]?parseInt(_0xc597x10[_0xa113[19]][_0xa113[18]],10):100;var _0xc597x13=_0xc597x10[_0xa113[19]][_0xa113[20]]?parseInt(_0xc597x10[_0xa113[19]][_0xa113[20]],10):0;var _0xc597x14={where:{},limit:_0xc597x12,offset:_0xc597x13*_0xc597x12};_[_0xa113[34]](_0xc597x10[_0xa113[19]],function(_0xc597x15,_0xc597x16){switch(_0xc597x16){case _0xa113[18]:;case _0xa113[20]:break;case _0xa113[23]:_0xc597x14[_0xa113[21]]=util[_0xa113[26]](_0xa113[22],_0xc597x10[_0xa113[19]][_0xa113[23]],_0xc597x10[_0xa113[19]][_0xa113[24]]||_0xa113[25])||null;break;case _0xa113[24]:break;case _0xa113[32]:_0xc597x14[_0xa113[28]][_0xa113[27]]=[];_0xc597x11[_0xa113[31]](function(_0xc597x17){var _0xc597x18={};_0xc597x18[_0xc597x17]={$like:_0xa113[29]+_0xc597x15+_0xa113[29]};_0xc597x14[_0xa113[28]][_0xa113[27]][_0xa113[30]](_0xc597x18)});break;default:_0xc597x14[_0xa113[28]][_0xc597x16]={$like:{}};_0xc597x14[_0xa113[28]][_0xc597x16][_0xa113[33]]=_0xa113[29]+_0xc597x15+_0xa113[29]}});FreshdeskAccount[_0xa113[46]](_0xc597x14)[_0xa113[10]](function(_0xc597x19){var _0xc597x1a=Math[_0xa113[38]](_0xc597x19[_0xa113[37]]/_0xc597x12);var _0xc597x1b=_0xc597x1a>(_0xc597x14[_0xa113[39]]+1)?util[_0xa113[26]](_0xa113[40],_0xc597x10[_0xa113[41]],_0xc597x10[_0xa113[43]][_0xa113[42]],_0xc597x10[_0xa113[44]],_0xc597x13+1):null;var _0xc597x1c=_0xc597x13>0?util[_0xa113[26]](_0xa113[40],_0xc597x10[_0xa113[41]],_0xc597x10[_0xa113[43]][_0xa113[42]],_0xc597x10[_0xa113[44]],_0xc597x13-1):null;return _0xc597x6[_0xa113[7]](200)[_0xa113[6]]({count:_0xc597x19[_0xa113[37]],rows:_0xc597x19[_0xa113[45]],next_page:_0xc597x1b,previous_page:_0xc597x1c,total_pages:_0xc597x1a})})[_0xa113[36]](function(_0xc597x8){return _0xc597x6[_0xa113[7]](500)[_0xa113[6]]({error:_0xa113[35]})})};exports[_0xa113[47]]=function(_0xc597x10,_0xc597x6){FreshdeskAccount[_0xa113[50]](_0xc597x10[_0xa113[49]][_0xa113[48]])[_0xa113[10]](handleEntityNotFound(_0xc597x6))[_0xa113[10]](responseWithResult(_0xc597x6))[_0xa113[36]](handleError(_0xc597x6))};exports[_0xa113[51]]=function(_0xc597x10,_0xc597x6){FreshdeskAccount[_0xa113[51]](_0xc597x10[_0xa113[52]])[_0xa113[10]](responseWithResult(_0xc597x6,201))[_0xa113[36]](handleError(_0xc597x6))};exports[_0xa113[53]]=function(_0xc597x10,_0xc597x6){if(_0xc597x10[_0xa113[52]][_0xa113[48]]){delete _0xc597x10[_0xa113[52]][_0xa113[48]]};FreshdeskAccount[_0xa113[50]](_0xc597x10[_0xa113[49]][_0xa113[48]])[_0xa113[10]](handleEntityNotFound(_0xc597x6))[_0xa113[10]](saveUpdates(_0xc597x10[_0xa113[52]]))[_0xa113[10]](responseWithResult(_0xc597x6))[_0xa113[36]](handleError(_0xc597x6))};exports[_0xa113[12]]=function(_0xc597x10,_0xc597x6){FreshdeskAccount[_0xa113[50]](_0xc597x10[_0xa113[49]][_0xa113[48]])[_0xa113[10]](handleEntityNotFound(_0xc597x6))[_0xa113[10]](removeEntity(_0xc597x6))[_0xa113[36]](handleError(_0xc597x6))};exports[_0xa113[54]]=function(_0xc597x10,_0xc597x6){FreshdeskAccount[_0xa113[12]]({where:{id:_0xc597x10[_0xa113[19]][_0xa113[48]]},individualHooks:true})[_0xa113[10]](function(){return _0xc597x6[_0xa113[55]](204)})[_0xa113[36]](function(_0xc597x8){return handleError(_0xc597x6,_0xc597x8)})};exports[_0xa113[56]]=function(_0xc597x10,_0xc597x6){FreshdeskAccount[_0xa113[50]](_0xc597x10[_0xa113[49]][_0xa113[48]])[_0xa113[10]](handleEntityNotFound(_0xc597x6))[_0xa113[10]](function(_0xc597x1d){var _0xc597x1e= new _fd(_0xc597x1d[_0xa113[17]],_0xc597x1d[_0xa113[57]]);_0xc597x1e[_0xa113[60]](function(_0xc597x8,_0xc597x1f,_0xc597x20){if(_0xc597x8){return _0xc597x6[_0xa113[55]](400)};_0xc597x20=JSON[_0xa113[58]](_0xc597x20);if(_0xc597x20[_0xa113[59]]){return _0xc597x6[_0xa113[55]](400)};return _0xc597x6[_0xa113[55]](200)})})[_0xa113[36]](handleError(_0xc597x6))};exports[_0xa113[61]]=function(_0xc597x10,_0xc597x6){var _0xc597x21={};_0xc597x21[_0xc597x10[_0xa113[49]][_0xa113[62]]]=_0xc597x10[_0xa113[52]][_0xa113[63]];FreshdeskAccount[_0xa113[46]]({where:_0xc597x21})[_0xa113[10]](function(_0xc597x19){if(_0xc597x19[_0xa113[37]]){return _0xc597x6[_0xa113[7]](200)[_0xa113[6]]({isValid:false,value:_0xc597x10[_0xa113[52]][_0xa113[63]]})};return _0xc597x6[_0xa113[7]](200)[_0xa113[6]]({isValid:true,value:_0xc597x10[_0xa113[52]][_0xa113[63]]})})[_0xa113[36]](function(_0xc597x8){return handleError(_0xc597x6,_0xc597x8)})};exports[_0xa113[64]]=function(_0xc597x10,_0xc597x6,_0xc597x22){FreshdeskAccount[_0xa113[50]](_0xc597x10[_0xa113[49]][_0xa113[48]])[_0xa113[10]](handleEntityNotFound(_0xc597x6))[_0xa113[10]](function(_0xc597x1d){var _0xc597x23= new _fd(_0xc597x1d[_0xa113[17]],_0xc597x1d[_0xa113[57]]);_0xc597x23[_0xa113[66]](_0xa113[65],function(_0xc597x8,_0xc597x1f,_0xc597x20){if(_0xc597x8){return _0xc597x22(_0xc597x8)};_0xc597x20=JSON[_0xa113[58]](_0xc597x20);return _0xc597x6[_0xa113[7]](200)[_0xa113[6]](_0xc597x20)})})[_0xa113[36]](handleError(_0xc597x6))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/freshdesk/accounts              ->  index
+ * POST    /api/freshdesk/accounts              ->  create
+ * GET     /api/freshdesk/accounts/:id          ->  show
+ * PUT     /api/freshdesk/accounts/:id          ->  update
+ * DELETE  /api/freshdesk/accounts/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var util = require('util');
+var _fd = require('freshdesk');
+
+var FreshdeskAccount = require('../../models').FreshdeskAccount;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of FreshdeskAccounts
+exports.index = function(req, res) {
+  var attributes = ['description', 'name', 'username', 'remoteUri'];
+  var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100;
+  var page = req.query.page ? parseInt(req.query.page, 10) : 0;
+
+  var query = {
+    where: {},
+    limit: per_page,
+    offset: page * per_page
+  };
+
+  _.forIn(req.query, function(value, key) {
+    switch (key) {
+      case 'per_page':
+      case 'page':
+        break;
+      case 'sort_by':
+        query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null;
+        break;
+      case 'sort_order':
+        break;
+      case '$':
+        query.where.$or = [];
+        attributes.forEach(function(attribute) {
+          var tmp = {};
+          tmp[attribute] = {
+            $like: '%' + value + '%'
+          };
+
+          query.where.$or.push(tmp);
+        });
+        break;
+      default:
+        query.where[key] = {
+          $like: {}
+        };
+        query.where[key].$like = '%' + value + '%';
+    }
+  });
+
+  FreshdeskAccount
+    .findAndCountAll(query)
+    .then(function(result) {
+
+      var total_pages = Math.ceil(result.count / per_page);
+      var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null;
+      var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null;
+
+      return res.status(200).send({
+        count: result.count,
+        rows: result.rows,
+        next_page: next_page,
+        previous_page: previous_page,
+        total_pages: total_pages
+      });
+
+    })
+    .catch(function(err) {
+      return res.status(500).send({
+        error: 'Something blew up!'
+      });
+    });
+}
+
+// Gets a single FreshdeskAccount from the DB
+exports.show = function(req, res) {
+  FreshdeskAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new FreshdeskAccount in the DB
+exports.create = function(req, res) {
+  FreshdeskAccount.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing FreshdeskAccount in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  FreshdeskAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a FreshdeskAccount from the DB
+exports.destroy = function(req, res) {
+  FreshdeskAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+exports.bulkDestroy = function(req, res) {
+  FreshdeskAccount
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.checkAccount = function(req, res) {
+  FreshdeskAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(account) {
+      var freshdesk = new _fd(account.remoteUri, account.apiKey);
+      freshdesk.listTickets(function(err, response, body) {
+        if (err) {
+          return res.sendStatus(400);
+        }
+        body = JSON.parse(body);
+        if (body.require_login) {
+          return res.sendStatus(400);
+        }
+        return res.sendStatus(200);
+      })
+    })
+    .catch(handleError(res));
+}
+
+exports.accountValidation = function(req, res) {
+  var where = {};
+  where[req.params.field] = req.body.value;
+  FreshdeskAccount
+    .findAndCountAll({
+      where: where
+    })
+    .then(function(result) {
+      if (result.count) {
+        return res.status(200).send({
+          isValid: false,
+          value: req.body.value
+        });
+      }
+      return res.status(200).send({
+        isValid: true,
+        value: req.body.value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.getFields = function(req, res, next) {
+  FreshdeskAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(account) {
+      var Freshdesk = new _fd(account.remoteUri, account.apiKey);
+      Freshdesk.get('/ticket_fields.json', function(err, response, body) {
+        if (err) {
+          return next(err);
+        }
+        body = JSON.parse(body);
+        return res.status(200).send(body);
+      });
+    })
+    .catch(handleError(res));
+};
index 75563b3..2aabaae 100644 (file)
@@ -1 +1,24 @@
-var _0xba10=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xba10[0];var FreshdeskAccount=require(_0xba10[2])[_0xba10[1]];exports[_0xba10[3]]=function(_0xb0d0x2){FreshdeskAccount[_0xba10[4]](function(_0xb0d0x3){onSave(_0xb0d0x2,_0xb0d0x3)});FreshdeskAccount[_0xba10[5]](function(_0xb0d0x3){onRemove(_0xb0d0x2,_0xb0d0x3)})};function onSave(_0xb0d0x2,_0xb0d0x3,_0xb0d0x5){_0xb0d0x2[_0xba10[7]](_0xba10[6],_0xb0d0x3)}function onRemove(_0xb0d0x2,_0xb0d0x3,_0xb0d0x5){_0xb0d0x2[_0xba10[7]](_0xba10[8],_0xb0d0x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var FreshdeskAccount = require('../../models').FreshdeskAccount;
+
+exports.register = function(socket) {
+  FreshdeskAccount.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  FreshdeskAccount.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('freshdesk_account:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('freshdesk_account:remove', doc);
+}
index e5de364..a7385b7 100644 (file)
@@ -1 +1,21 @@
-var _0x37b5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x37b5[0];var express=require(_0x37b5[1]);var auth=require(_0x37b5[2]);var controller=require(_0x37b5[3]);var router=express.Router();router[_0x37b5[7]](_0x37b5[4],auth[_0x37b5[5]](),controller[_0x37b5[6]]);router[_0x37b5[7]](_0x37b5[8],auth[_0x37b5[5]](),controller[_0x37b5[9]]);router[_0x37b5[7]](_0x37b5[10],auth[_0x37b5[5]](),controller[_0x37b5[11]]);router[_0x37b5[7]](_0x37b5[12],auth[_0x37b5[5]](),controller[_0x37b5[13]]);router[_0x37b5[16]](_0x37b5[14],auth[_0x37b5[5]](),controller[_0x37b5[15]]);router[_0x37b5[16]](_0x37b5[4],auth[_0x37b5[5]](),controller[_0x37b5[17]]);router[_0x37b5[19]](_0x37b5[8],auth[_0x37b5[5]](),controller[_0x37b5[18]]);router[_0x37b5[20]](_0x37b5[8],auth[_0x37b5[5]](),controller[_0x37b5[18]]);router[_0x37b5[22]](_0x37b5[4],auth[_0x37b5[5]](),controller[_0x37b5[21]]);router[_0x37b5[22]](_0x37b5[8],auth[_0x37b5[5]](),controller[_0x37b5[23]]);module[_0x37b5[24]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./freshdesk_account.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/fields', auth.isAuthenticated(), controller.getFields);
+router.get('/:id/check', auth.isAuthenticated(), controller.checkAccount);
+router.post('/validate/:field', auth.isAuthenticated(), controller.accountValidation);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 5b14304..6d7fc75 100644 (file)
@@ -1 +1,97 @@
-var _0xaa87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xaa87[0];var proxyquire=require(_0xaa87[2])[_0xaa87[1]]();var freshdeskAccountCtrlStub={index:_0xaa87[3],show:_0xaa87[4],create:_0xaa87[5],update:_0xaa87[6],destroy:_0xaa87[7]};var routerStub={get:sinon[_0xaa87[8]](),put:sinon[_0xaa87[8]](),patch:sinon[_0xaa87[8]](),post:sinon[_0xaa87[8]](),delete:sinon[_0xaa87[8]]()};var freshdeskAccountIndex=proxyquire(_0xaa87[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":freshdeskAccountCtrlStub});describe(_0xaa87[10],function(){it(_0xaa87[11],function(){expect(freshdeskAccountIndex)[_0xaa87[13]][_0xaa87[12]](routerStub)});describe(_0xaa87[14],function(){it(_0xaa87[15],function(){expect(routerStub[_0xaa87[21]][_0xaa87[20]](_0xaa87[19],_0xaa87[3]))[_0xaa87[13]][_0xaa87[18]][_0xaa87[17]][_0xaa87[16]]})});describe(_0xaa87[22],function(){it(_0xaa87[23],function(){expect(routerStub[_0xaa87[21]][_0xaa87[20]](_0xaa87[24],_0xaa87[4]))[_0xaa87[13]][_0xaa87[18]][_0xaa87[17]][_0xaa87[16]]})});describe(_0xaa87[25],function(){it(_0xaa87[26],function(){expect(routerStub[_0xaa87[27]][_0xaa87[20]](_0xaa87[19],_0xaa87[5]))[_0xaa87[13]][_0xaa87[18]][_0xaa87[17]][_0xaa87[16]]})});describe(_0xaa87[28],function(){it(_0xaa87[29],function(){expect(routerStub[_0xaa87[30]][_0xaa87[20]](_0xaa87[24],_0xaa87[6]))[_0xaa87[13]][_0xaa87[18]][_0xaa87[17]][_0xaa87[16]]})});describe(_0xaa87[31],function(){it(_0xaa87[29],function(){expect(routerStub[_0xaa87[32]][_0xaa87[20]](_0xaa87[24],_0xaa87[6]))[_0xaa87[13]][_0xaa87[18]][_0xaa87[17]][_0xaa87[16]]})});describe(_0xaa87[33],function(){it(_0xaa87[34],function(){expect(routerStub[_0xaa87[35]][_0xaa87[20]](_0xaa87[24],_0xaa87[7]))[_0xaa87[13]][_0xaa87[18]][_0xaa87[17]][_0xaa87[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var freshdeskAccountCtrlStub = {
+  index: 'freshdeskAccountCtrl.index',
+  show: 'freshdeskAccountCtrl.show',
+  create: 'freshdeskAccountCtrl.create',
+  update: 'freshdeskAccountCtrl.update',
+  destroy: 'freshdeskAccountCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var freshdeskAccountIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './freshdesk_account.controller': freshdeskAccountCtrlStub
+});
+
+describe('FreshdeskAccount API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(freshdeskAccountIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/freshdesk/accounts', function() {
+
+    it('should route to freshdeskAccount.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'freshdeskAccountCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/freshdesk/accounts/:id', function() {
+
+    it('should route to freshdeskAccount.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'freshdeskAccountCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/freshdesk/accounts', function() {
+
+    it('should route to freshdeskAccount.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'freshdeskAccountCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/freshdesk/accounts/:id', function() {
+
+    it('should route to freshdeskAccount.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'freshdeskAccountCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/freshdesk/accounts/:id', function() {
+
+    it('should route to freshdeskAccount.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'freshdeskAccountCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/freshdesk/accounts/:id', function() {
+
+    it('should route to freshdeskAccount.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'freshdeskAccountCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index a38c09e..4c3d44d 100644 (file)
@@ -1 +1,146 @@
-var _0xf7aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xf7aa[0];var _=require(_0xf7aa[1]);var FreshdeskConfiguration=require(_0xf7aa[3])[_0xf7aa[2]];var FreshdeskField=require(_0xf7aa[3])[_0xf7aa[4]];function handleError(_0xdf41x5,_0xdf41x6){_0xdf41x6=_0xdf41x6||500;return function(_0xdf41x7){_0xdf41x5[_0xf7aa[6]](_0xdf41x6)[_0xf7aa[5]](_0xdf41x7)}}function responseWithResult(_0xdf41x5,_0xdf41x6){_0xdf41x6=_0xdf41x6||200;return function(_0xdf41x9){if(_0xdf41x9){_0xdf41x5[_0xf7aa[6]](_0xdf41x6)[_0xf7aa[7]](_0xdf41x9)}}}function handleEntityNotFound(_0xdf41x5){return function(_0xdf41x9){if(!_0xdf41x9){_0xdf41x5[_0xf7aa[6]](404)[_0xf7aa[8]]();return null};return _0xdf41x9}}function saveUpdates(_0xdf41xc){return function(_0xdf41x9){return _0xdf41x9[_0xf7aa[10]](_0xdf41xc)[_0xf7aa[9]](function(_0xdf41xd){return _0xdf41xd})}}function removeEntity(_0xdf41x5){return function(_0xdf41x9){if(_0xdf41x9){return _0xdf41x9[_0xf7aa[11]]()[_0xf7aa[9]](function(){_0xdf41x5[_0xf7aa[6]](204)[_0xf7aa[8]]()})}}}exports[_0xf7aa[12]]=function(_0xdf41xf,_0xdf41x5){FreshdeskConfiguration[_0xf7aa[15]]({where:_0xdf41xf[_0xf7aa[14]]})[_0xf7aa[9]](responseWithResult(_0xdf41x5))[_0xf7aa[13]](handleError(_0xdf41x5))};exports[_0xf7aa[16]]=function(_0xdf41xf,_0xdf41x5){FreshdeskConfiguration[_0xf7aa[22]]({where:{id:_0xdf41xf[_0xf7aa[18]][_0xf7aa[17]]},include:[{model:FreshdeskField,as:_0xf7aa[19]},{model:FreshdeskField,as:_0xf7aa[20]},{model:FreshdeskField,as:_0xf7aa[21]}]})[_0xf7aa[9]](handleEntityNotFound(_0xdf41x5))[_0xf7aa[9]](responseWithResult(_0xdf41x5))[_0xf7aa[13]](handleError(_0xdf41x5))};exports[_0xf7aa[23]]=function(_0xdf41xf,_0xdf41x5){FreshdeskConfiguration[_0xf7aa[23]](_0xdf41xf[_0xf7aa[24]])[_0xf7aa[9]](responseWithResult(_0xdf41x5,201))[_0xf7aa[13]](handleError(_0xdf41x5))};exports[_0xf7aa[25]]=function(_0xdf41xf,_0xdf41x5){if(_0xdf41xf[_0xf7aa[24]][_0xf7aa[17]]){delete _0xdf41xf[_0xf7aa[24]][_0xf7aa[17]]};FreshdeskConfiguration[_0xf7aa[26]](_0xdf41xf[_0xf7aa[18]][_0xf7aa[17]])[_0xf7aa[9]](handleEntityNotFound(_0xdf41x5))[_0xf7aa[9]](saveUpdates(_0xdf41xf[_0xf7aa[24]]))[_0xf7aa[9]](responseWithResult(_0xdf41x5))[_0xf7aa[13]](handleError(_0xdf41x5))};exports[_0xf7aa[11]]=function(_0xdf41xf,_0xdf41x5){FreshdeskConfiguration[_0xf7aa[26]](_0xdf41xf[_0xf7aa[18]][_0xf7aa[17]])[_0xf7aa[9]](handleEntityNotFound(_0xdf41x5))[_0xf7aa[9]](removeEntity(_0xdf41x5))[_0xf7aa[13]](handleError(_0xdf41x5))};exports[_0xf7aa[27]]=function(_0xdf41xf,_0xdf41x5,_0xdf41x10){var _0xdf41x11;FreshdeskConfiguration[_0xf7aa[26]](_0xdf41xf[_0xf7aa[18]][_0xf7aa[17]])[_0xf7aa[9]](handleEntityNotFound(_0xdf41x5))[_0xf7aa[9]](function(_0xdf41x14){_0xdf41x11=_0xdf41x14;return FreshdeskField[_0xf7aa[23]](_0xdf41xf[_0xf7aa[24]])})[_0xf7aa[9]](function(_0xdf41x13){switch(_0xdf41xf[_0xf7aa[18]][_0xf7aa[35]]){case _0xf7aa[30]:return [_0xdf41x11[_0xf7aa[29]](_0xdf41x13),_0xdf41x13];case _0xf7aa[32]:return [_0xdf41x11[_0xf7aa[31]](_0xdf41x13),_0xdf41x13];case _0xf7aa[34]:return [_0xdf41x11[_0xf7aa[33]](_0xdf41x13),_0xdf41x13]}})[_0xf7aa[28]](function(_0xdf41x12,_0xdf41x13){return _0xdf41x5[_0xf7aa[6]](201)[_0xf7aa[7]](_0xdf41x13)})[_0xf7aa[13]](handleError(_0xdf41x5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/freshdesk/configurations              ->  index
+ * POST    /api/freshdesk/configurations              ->  create
+ * GET     /api/freshdesk/configurations/:id          ->  show
+ * PUT     /api/freshdesk/configurations/:id          ->  update
+ * DELETE  /api/freshdesk/configurations/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var FreshdeskConfiguration = require('../../models').FreshdeskConfiguration;
+var FreshdeskField = require('../../models').FreshdeskField;
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of FreshdeskConfigurations
+exports.index = function(req, res) {
+  FreshdeskConfiguration.findAll({
+      where: req.query
+    })
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single FreshdeskConfiguration from the DB
+exports.show = function(req, res) {
+  FreshdeskConfiguration.find({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        model: FreshdeskField,
+        as: 'Subject'
+      }, {
+        model: FreshdeskField,
+        as: 'Description'
+      }, {
+        model: FreshdeskField,
+        as: 'Field'
+      }]
+    })
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new FreshdeskConfiguration in the DB
+exports.create = function(req, res) {
+  FreshdeskConfiguration.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing FreshdeskConfiguration in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  FreshdeskConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a FreshdeskConfiguration from the DB
+exports.destroy = function(req, res) {
+  FreshdeskConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+exports.addConfigurationField = function(req, res, next) {
+  // console.log(req.params);
+  var freshdeskConfiguration;
+  FreshdeskConfiguration
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(salesforce_configuration) {
+      freshdeskConfiguration = salesforce_configuration;
+      return FreshdeskField.create(req.body)
+    })
+    .then(function(freshdeskField) {
+      switch (req.params.type) {
+        case 'subject':
+          return [freshdeskConfiguration.addSubject(freshdeskField), freshdeskField];
+        case 'description':
+          return [freshdeskConfiguration.addDescription(freshdeskField), freshdeskField];
+        case 'field':
+          return [freshdeskConfiguration.addField(freshdeskField), freshdeskField];
+      }
+    })
+    .spread(function(data, freshdeskField) {
+      return res.status(201).json(freshdeskField);
+    })
+    .catch(handleError(res));
+};
index 401af08..4ce7f30 100644 (file)
@@ -1 +1,24 @@
-var _0xf97c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xf97c[0];var FreshdeskConfiguration=require(_0xf97c[2])[_0xf97c[1]];exports[_0xf97c[3]]=function(_0x5512x2){FreshdeskConfiguration[_0xf97c[4]](function(_0x5512x3){onSave(_0x5512x2,_0x5512x3)});FreshdeskConfiguration[_0xf97c[5]](function(_0x5512x3){onRemove(_0x5512x2,_0x5512x3)})};function onSave(_0x5512x2,_0x5512x3,_0x5512x5){_0x5512x2[_0xf97c[7]](_0xf97c[6],_0x5512x3)}function onRemove(_0x5512x2,_0x5512x3,_0x5512x5){_0x5512x2[_0xf97c[7]](_0xf97c[8],_0x5512x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var FreshdeskConfiguration = require('../../models').FreshdeskConfiguration;
+
+exports.register = function(socket) {
+  FreshdeskConfiguration.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  FreshdeskConfiguration.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('freshdesk_configuration:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('freshdesk_configuration:remove', doc);
+}
index 52d63cb..e08945f 100644 (file)
@@ -1 +1,19 @@
-var _0x4276=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4276[0];var express=require(_0x4276[1]);var auth=require(_0x4276[2]);var controller=require(_0x4276[3]);var router=express.Router();router[_0x4276[7]](_0x4276[4],auth[_0x4276[5]](),controller[_0x4276[6]]);router[_0x4276[7]](_0x4276[8],auth[_0x4276[5]](),controller[_0x4276[9]]);router[_0x4276[11]](_0x4276[4],auth[_0x4276[5]](),controller[_0x4276[10]]);router[_0x4276[13]](_0x4276[8],auth[_0x4276[5]](),controller[_0x4276[12]]);router[_0x4276[11]](_0x4276[14],auth[_0x4276[5]](),controller[_0x4276[15]]);router[_0x4276[16]](_0x4276[8],auth[_0x4276[5]](),controller[_0x4276[12]]);router[_0x4276[18]](_0x4276[8],auth[_0x4276[5]](),controller[_0x4276[17]]);module[_0x4276[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./freshdesk_configuration.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.post('/:id/:type', auth.isAuthenticated(), controller.addConfigurationField);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 5d2f967..b297c23 100644 (file)
@@ -1 +1,97 @@
-var _0xaa8e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xaa8e[0];var proxyquire=require(_0xaa8e[2])[_0xaa8e[1]]();var freshdeskConfigurationCtrlStub={index:_0xaa8e[3],show:_0xaa8e[4],create:_0xaa8e[5],update:_0xaa8e[6],destroy:_0xaa8e[7]};var routerStub={get:sinon[_0xaa8e[8]](),put:sinon[_0xaa8e[8]](),patch:sinon[_0xaa8e[8]](),post:sinon[_0xaa8e[8]](),delete:sinon[_0xaa8e[8]]()};var freshdeskConfigurationIndex=proxyquire(_0xaa8e[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":freshdeskConfigurationCtrlStub});describe(_0xaa8e[10],function(){it(_0xaa8e[11],function(){expect(freshdeskConfigurationIndex)[_0xaa8e[13]][_0xaa8e[12]](routerStub)});describe(_0xaa8e[14],function(){it(_0xaa8e[15],function(){expect(routerStub[_0xaa8e[21]][_0xaa8e[20]](_0xaa8e[19],_0xaa8e[3]))[_0xaa8e[13]][_0xaa8e[18]][_0xaa8e[17]][_0xaa8e[16]]})});describe(_0xaa8e[22],function(){it(_0xaa8e[23],function(){expect(routerStub[_0xaa8e[21]][_0xaa8e[20]](_0xaa8e[24],_0xaa8e[4]))[_0xaa8e[13]][_0xaa8e[18]][_0xaa8e[17]][_0xaa8e[16]]})});describe(_0xaa8e[25],function(){it(_0xaa8e[26],function(){expect(routerStub[_0xaa8e[27]][_0xaa8e[20]](_0xaa8e[19],_0xaa8e[5]))[_0xaa8e[13]][_0xaa8e[18]][_0xaa8e[17]][_0xaa8e[16]]})});describe(_0xaa8e[28],function(){it(_0xaa8e[29],function(){expect(routerStub[_0xaa8e[30]][_0xaa8e[20]](_0xaa8e[24],_0xaa8e[6]))[_0xaa8e[13]][_0xaa8e[18]][_0xaa8e[17]][_0xaa8e[16]]})});describe(_0xaa8e[31],function(){it(_0xaa8e[29],function(){expect(routerStub[_0xaa8e[32]][_0xaa8e[20]](_0xaa8e[24],_0xaa8e[6]))[_0xaa8e[13]][_0xaa8e[18]][_0xaa8e[17]][_0xaa8e[16]]})});describe(_0xaa8e[33],function(){it(_0xaa8e[34],function(){expect(routerStub[_0xaa8e[35]][_0xaa8e[20]](_0xaa8e[24],_0xaa8e[7]))[_0xaa8e[13]][_0xaa8e[18]][_0xaa8e[17]][_0xaa8e[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var freshdeskConfigurationCtrlStub = {
+  index: 'freshdeskConfigurationCtrl.index',
+  show: 'freshdeskConfigurationCtrl.show',
+  create: 'freshdeskConfigurationCtrl.create',
+  update: 'freshdeskConfigurationCtrl.update',
+  destroy: 'freshdeskConfigurationCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var freshdeskConfigurationIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './freshdesk_configuration.controller': freshdeskConfigurationCtrlStub
+});
+
+describe('FreshdeskConfiguration API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(freshdeskConfigurationIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/freshdesk/configurations', function() {
+
+    it('should route to freshdeskConfiguration.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'freshdeskConfigurationCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/freshdesk/configurations/:id', function() {
+
+    it('should route to freshdeskConfiguration.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'freshdeskConfigurationCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/freshdesk/configurations', function() {
+
+    it('should route to freshdeskConfiguration.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'freshdeskConfigurationCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/freshdesk/configurations/:id', function() {
+
+    it('should route to freshdeskConfiguration.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'freshdeskConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/freshdesk/configurations/:id', function() {
+
+    it('should route to freshdeskConfiguration.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'freshdeskConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/freshdesk/configurations/:id', function() {
+
+    it('should route to freshdeskConfiguration.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'freshdeskConfigurationCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 6ffbaf4..4a35db8 100644 (file)
@@ -1 +1,104 @@
-var _0xdf5a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xdf5a[0];var _=require(_0xdf5a[1]);var FreshdeskField=require(_0xdf5a[3])[_0xdf5a[2]];function handleError(_0xc164x4,_0xc164x5){_0xc164x5=_0xc164x5||500;return function(_0xc164x6){_0xc164x4[_0xdf5a[5]](_0xc164x5)[_0xdf5a[4]](_0xc164x6)}}function responseWithResult(_0xc164x4,_0xc164x5){_0xc164x5=_0xc164x5||200;return function(_0xc164x8){if(_0xc164x8){_0xc164x4[_0xdf5a[5]](_0xc164x5)[_0xdf5a[6]](_0xc164x8)}}}function handleEntityNotFound(_0xc164x4){return function(_0xc164x8){if(!_0xc164x8){_0xc164x4[_0xdf5a[5]](404)[_0xdf5a[7]]();return null};return _0xc164x8}}function saveUpdates(_0xc164xb){return function(_0xc164x8){return _0xc164x8[_0xdf5a[9]](_0xc164xb)[_0xdf5a[8]](function(_0xc164xc){return _0xc164xc})}}function removeEntity(_0xc164x4){return function(_0xc164x8){if(_0xc164x8){return _0xc164x8[_0xdf5a[10]]()[_0xdf5a[8]](function(){_0xc164x4[_0xdf5a[5]](204)[_0xdf5a[7]]()})}}}exports[_0xdf5a[11]]=function(_0xc164xe,_0xc164x4){FreshdeskField[_0xdf5a[13]]()[_0xdf5a[8]](responseWithResult(_0xc164x4))[_0xdf5a[12]](handleError(_0xc164x4))};exports[_0xdf5a[14]]=function(_0xc164xe,_0xc164x4){FreshdeskField[_0xdf5a[17]](_0xc164xe[_0xdf5a[16]][_0xdf5a[15]])[_0xdf5a[8]](handleEntityNotFound(_0xc164x4))[_0xdf5a[8]](responseWithResult(_0xc164x4))[_0xdf5a[12]](handleError(_0xc164x4))};exports[_0xdf5a[18]]=function(_0xc164xe,_0xc164x4){FreshdeskField[_0xdf5a[18]](_0xc164xe[_0xdf5a[19]])[_0xdf5a[8]](responseWithResult(_0xc164x4,201))[_0xdf5a[12]](handleError(_0xc164x4))};exports[_0xdf5a[20]]=function(_0xc164xe,_0xc164x4){if(_0xc164xe[_0xdf5a[19]][_0xdf5a[15]]){delete _0xc164xe[_0xdf5a[19]][_0xdf5a[15]]};FreshdeskField[_0xdf5a[17]](_0xc164xe[_0xdf5a[16]][_0xdf5a[15]])[_0xdf5a[8]](handleEntityNotFound(_0xc164x4))[_0xdf5a[8]](saveUpdates(_0xc164xe[_0xdf5a[19]]))[_0xdf5a[8]](responseWithResult(_0xc164x4))[_0xdf5a[12]](handleError(_0xc164x4))};exports[_0xdf5a[10]]=function(_0xc164xe,_0xc164x4){FreshdeskField[_0xdf5a[17]](_0xc164xe[_0xdf5a[16]][_0xdf5a[15]])[_0xdf5a[8]](handleEntityNotFound(_0xc164x4))[_0xdf5a[8]](removeEntity(_0xc164x4))[_0xdf5a[12]](handleError(_0xc164x4))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/freshdesk/fields              ->  index
+ * POST    /api/freshdesk/fields              ->  create
+ * GET     /api/freshdesk/fields/:id          ->  show
+ * PUT     /api/freshdesk/fields/:id          ->  update
+ * DELETE  /api/freshdesk/fields/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var FreshdeskField = require('../../models').FreshdeskField;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of FreshdeskFields
+exports.index = function(req, res) {
+  FreshdeskField.findAll()
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single FreshdeskField from the DB
+exports.show = function(req, res) {
+  FreshdeskField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new FreshdeskField in the DB
+exports.create = function(req, res) {
+  FreshdeskField.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing FreshdeskField in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  FreshdeskField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a FreshdeskField from the DB
+exports.destroy = function(req, res) {
+  FreshdeskField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
index 3446069..b351442 100644 (file)
@@ -1 +1,24 @@
-var _0x1459=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0x1459[0];var FreshdeskField=require(_0x1459[2])[_0x1459[1]];exports[_0x1459[3]]=function(_0x7776x2){FreshdeskField[_0x1459[4]](function(_0x7776x3){onSave(_0x7776x2,_0x7776x3)});FreshdeskField[_0x1459[5]](function(_0x7776x3){onRemove(_0x7776x2,_0x7776x3)})};function onSave(_0x7776x2,_0x7776x3,_0x7776x5){_0x7776x2[_0x1459[7]](_0x1459[6],_0x7776x3)}function onRemove(_0x7776x2,_0x7776x3,_0x7776x5){_0x7776x2[_0x1459[7]](_0x1459[8],_0x7776x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var FreshdeskField = require('../../models').FreshdeskField;
+
+exports.register = function(socket) {
+  FreshdeskField.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  FreshdeskField.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('freshdesk_field:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('freshdesk_field:remove', doc);
+}
index 83c5ceb..d17268f 100644 (file)
@@ -1 +1,18 @@
-var _0xb3f6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb3f6[0];var express=require(_0xb3f6[1]);var auth=require(_0xb3f6[2]);var controller=require(_0xb3f6[3]);var router=express.Router();router[_0xb3f6[7]](_0xb3f6[4],auth[_0xb3f6[5]](),controller[_0xb3f6[6]]);router[_0xb3f6[7]](_0xb3f6[8],auth[_0xb3f6[5]](),controller[_0xb3f6[9]]);router[_0xb3f6[11]](_0xb3f6[4],auth[_0xb3f6[5]](),controller[_0xb3f6[10]]);router[_0xb3f6[13]](_0xb3f6[8],auth[_0xb3f6[5]](),controller[_0xb3f6[12]]);router[_0xb3f6[14]](_0xb3f6[8],auth[_0xb3f6[5]](),controller[_0xb3f6[12]]);router[_0xb3f6[16]](_0xb3f6[8],auth[_0xb3f6[5]](),controller[_0xb3f6[15]]);module[_0xb3f6[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./freshdesk_field.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 75d91b2..b5c0fb8 100644 (file)
@@ -1 +1,97 @@
-var _0xb45f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xb45f[0];var proxyquire=require(_0xb45f[2])[_0xb45f[1]]();var freshdeskFieldCtrlStub={index:_0xb45f[3],show:_0xb45f[4],create:_0xb45f[5],update:_0xb45f[6],destroy:_0xb45f[7]};var routerStub={get:sinon[_0xb45f[8]](),put:sinon[_0xb45f[8]](),patch:sinon[_0xb45f[8]](),post:sinon[_0xb45f[8]](),delete:sinon[_0xb45f[8]]()};var freshdeskFieldIndex=proxyquire(_0xb45f[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":freshdeskFieldCtrlStub});describe(_0xb45f[10],function(){it(_0xb45f[11],function(){expect(freshdeskFieldIndex)[_0xb45f[13]][_0xb45f[12]](routerStub)});describe(_0xb45f[14],function(){it(_0xb45f[15],function(){expect(routerStub[_0xb45f[21]][_0xb45f[20]](_0xb45f[19],_0xb45f[3]))[_0xb45f[13]][_0xb45f[18]][_0xb45f[17]][_0xb45f[16]]})});describe(_0xb45f[22],function(){it(_0xb45f[23],function(){expect(routerStub[_0xb45f[21]][_0xb45f[20]](_0xb45f[24],_0xb45f[4]))[_0xb45f[13]][_0xb45f[18]][_0xb45f[17]][_0xb45f[16]]})});describe(_0xb45f[25],function(){it(_0xb45f[26],function(){expect(routerStub[_0xb45f[27]][_0xb45f[20]](_0xb45f[19],_0xb45f[5]))[_0xb45f[13]][_0xb45f[18]][_0xb45f[17]][_0xb45f[16]]})});describe(_0xb45f[28],function(){it(_0xb45f[29],function(){expect(routerStub[_0xb45f[30]][_0xb45f[20]](_0xb45f[24],_0xb45f[6]))[_0xb45f[13]][_0xb45f[18]][_0xb45f[17]][_0xb45f[16]]})});describe(_0xb45f[31],function(){it(_0xb45f[29],function(){expect(routerStub[_0xb45f[32]][_0xb45f[20]](_0xb45f[24],_0xb45f[6]))[_0xb45f[13]][_0xb45f[18]][_0xb45f[17]][_0xb45f[16]]})});describe(_0xb45f[33],function(){it(_0xb45f[34],function(){expect(routerStub[_0xb45f[35]][_0xb45f[20]](_0xb45f[24],_0xb45f[7]))[_0xb45f[13]][_0xb45f[18]][_0xb45f[17]][_0xb45f[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var freshdeskFieldCtrlStub = {
+  index: 'freshdeskFieldCtrl.index',
+  show: 'freshdeskFieldCtrl.show',
+  create: 'freshdeskFieldCtrl.create',
+  update: 'freshdeskFieldCtrl.update',
+  destroy: 'freshdeskFieldCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var freshdeskFieldIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './freshdesk_field.controller': freshdeskFieldCtrlStub
+});
+
+describe('FreshdeskField API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(freshdeskFieldIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/freshdesk/fields', function() {
+
+    it('should route to freshdeskField.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'freshdeskFieldCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/freshdesk/fields/:id', function() {
+
+    it('should route to freshdeskField.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'freshdeskFieldCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/freshdesk/fields', function() {
+
+    it('should route to freshdeskField.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'freshdeskFieldCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/freshdesk/fields/:id', function() {
+
+    it('should route to freshdeskField.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'freshdeskFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/freshdesk/fields/:id', function() {
+
+    it('should route to freshdeskField.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'freshdeskFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/freshdesk/fields/:id', function() {
+
+    it('should route to freshdeskField.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'freshdeskFieldCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 1098bfe..5789126 100644 (file)
@@ -1 +1,15 @@
-var _0x6167=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6167[0];var express=require(_0x6167[1]);var controller=require(_0x6167[2]);var router=express.Router();router[_0x6167[5]](_0x6167[3],controller[_0x6167[4]]);router[_0x6167[5]](_0x6167[6],controller[_0x6167[7]]);router[_0x6167[9]](_0x6167[3],controller[_0x6167[8]]);router[_0x6167[11]](_0x6167[6],controller[_0x6167[10]]);router[_0x6167[12]](_0x6167[6],controller[_0x6167[10]]);router[_0x6167[14]](_0x6167[6],controller[_0x6167[13]]);module[_0x6167[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./integration.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index 6062aef..cc5e706 100644 (file)
@@ -1 +1,178 @@
-var _0x5a32=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x61\x64\x6D\x2D\x7A\x69\x70","\x73\x74\x72\x69\x6E\x67\x2D\x74\x6F\x2D\x6A\x73\x6F\x6E","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x6A\x6F\x69\x6E","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x7A\x69\x70\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x67\x65\x74\x45\x6E\x74\x72\x69\x65\x73","\x6E\x61\x6D\x65","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x67\x65\x74\x44\x61\x74\x61","\x75\x70\x6C\x6F\x61\x64\x5A\x69\x70","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x65\x78\x74\x72\x61\x63\x74\x41\x6C\x6C\x54\x6F","\x6D\x65\x72\x67\x65","\x6A\x73\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x6D\x61\x6E\x69\x66\x65\x73\x74","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6F\x6E","\x65\x72\x72\x6F\x72","\x75\x70\x6C\x6F\x61\x64","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x5a32[0];var _=require(_0x5a32[1]);var uploadFile=require(_0x5a32[2]);var config=require(_0x5a32[3]);var path=require(_0x5a32[4]);var sr=require(_0x5a32[5]);var admZip=require(_0x5a32[6]);var str2json=require(_0x5a32[7]);var fs=require(_0x5a32[8]);var Util=require(_0x5a32[9]);var Integration=require(_0x5a32[11])[_0x5a32[10]];exports[_0x5a32[12]]=function(_0x3675xb,_0x3675xc,_0x3675xd){return Integration[_0x5a32[19]](Util[_0x5a32[18]](_0x3675xb[_0x5a32[17]]))[_0x5a32[16]](function(_0x3675xf){_0x3675xc[_0x5a32[15]](200)[_0x5a32[14]](_0x3675xf)})[_0x5a32[13]](function(_0x3675xe){return handleError(_0x3675xc,_0x3675xe)})};exports[_0x5a32[20]]=function(_0x3675xb,_0x3675xc){Integration[_0x5a32[24]](_0x3675xb[_0x5a32[23]][_0x5a32[22]])[_0x5a32[16]](function(_0x3675x10){if(!_0x3675x10){return _0x3675xc[_0x5a32[21]](404)};return _0x3675xc[_0x5a32[14]](_0x3675x10)})[_0x5a32[13]](function(_0x3675xe){return handleError(_0x3675xc,_0x3675xe)})};exports[_0x5a32[25]]=function(_0x3675xb,_0x3675xc){var _0x3675x11= new uploadFile({dest:path[_0x5a32[28]](config[_0x5a32[26]],_0x5a32[27]),maxFileSize:5*1000000,maxNumberOfFiles:1,minNumberOfFiles:1,acceptFileTypes:/(\.|\/)(zip)$/i,messages:{maxNumberOfFiles:_0x5a32[29],acceptFileTypes:_0x5a32[30],maxFileSize:_0x5a32[31],invalidRequest:_0x5a32[32]}});_0x3675x11[_0x5a32[50]](_0x5a32[33],function(_0x3675x12,_0x3675x13){var _0x3675x14= new admZip(_0x3675x13[_0x5a32[34]][_0x5a32[4]]);var _0x3675x15=false;var _0x3675x16=_0x3675x14[_0x5a32[35]]();_0x3675x16[_0x5a32[46]](function(_0x3675x17){if(_0x3675x17[_0x5a32[36]]===_0x5a32[37]){var _0x3675x18=_0x3675x17[_0x5a32[39]]().toString(_0x5a32[38]);console[_0x5a32[41]](_0x5a32[40],_0x3675x18);try{_0x3675x15=JSON[_0x5a32[42]](_0x3675x18);console[_0x5a32[41]](_0x5a32[40],_0x3675x15);Integration[_0x5a32[25]](_[_0x5a32[44]](_0x3675x13[_0x5a32[34]],_0x3675x15))[_0x5a32[16]](function(_0x3675x10){_0x3675x14[_0x5a32[43]](path[_0x5a32[28]](config[_0x5a32[26]],_0x5a32[27]),true);return _0x3675xc[_0x5a32[15]](201)[_0x5a32[14]](_0x3675x10)})[_0x5a32[13]](function(_0x3675xe){return handleError(_0x3675xc,_0x3675xe)})}catch(e){console[_0x5a32[41]](e);var _0x3675xe={errors:[{type:_0x5a32[45],message:e}]};return handleError(_0x3675xc,_0x3675xe)}}});fs[_0x5a32[47]](_0x3675x13[_0x5a32[34]][_0x5a32[4]]);if(!_0x3675x15){var _0x3675xe={errors:[{type:_0x5a32[48],message:_0x5a32[49]}]};return handleError(_0x3675xc,_0x3675xe)}});_0x3675x11[_0x5a32[50]](_0x5a32[51],function(_0x3675x19){var _0x3675xe={errors:[{type:_0x5a32[52],message:_0x3675x19}]};return handleError(_0x3675xc,_0x3675xe)});_0x3675x11[_0x5a32[42]](_0x3675xb)};exports[_0x5a32[53]]=function(_0x3675xb,_0x3675xc){if(_0x3675xb[_0x5a32[54]][_0x5a32[22]]){delete _0x3675xb[_0x5a32[54]][_0x5a32[22]]};Integration[_0x5a32[56]]({where:{id:_0x3675xb[_0x5a32[23]][_0x5a32[22]]}})[_0x5a32[16]](function(_0x3675x10){if(!_0x3675x10){return _0x3675xc[_0x5a32[21]](404)};var _0x3675x1a=_[_0x5a32[44]](_0x3675x10,_0x3675xb[_0x5a32[54]]);_0x3675x1a[_0x5a32[55]]()[_0x5a32[16]](function(){return _0x3675xc[_0x5a32[15]](200)[_0x5a32[14]](_0x3675x10)})[_0x5a32[13]](function(_0x3675xe){return handleError(_0x3675xc,_0x3675xe)})})[_0x5a32[13]](function(_0x3675xe){return handleError(_0x3675xc,_0x3675xe)})};exports[_0x5a32[57]]=function(_0x3675xb,_0x3675xc){Integration[_0x5a32[56]]({where:{id:_0x3675xb[_0x5a32[23]][_0x5a32[22]]}})[_0x5a32[16]](function(_0x3675x10){if(!_0x3675x10){return _0x3675xc[_0x5a32[21]](404)};_0x3675x10[_0x5a32[57]]()[_0x5a32[16]](function(){return _0x3675xc[_0x5a32[21]](204)})[_0x5a32[13]](function(_0x3675xe){return handleError(_0x3675xc,_0x3675xe)})})[_0x5a32[13]](function(_0x3675xe){return handleError(_0x3675xc,_0x3675xe)})};function handleError(_0x3675xc,_0x3675xe){return _0x3675xc[_0x5a32[15]](500)[_0x5a32[14]](_0x3675xe)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var uploadFile = require('upload-file');
+var config = require('../../config/environment');
+var path = require('path');
+var sr = require('simple-random');
+var admZip = require('adm-zip');
+var str2json = require('string-to-json');
+var fs = require('fs');
+var Util = require('../../config/util');
+
+var Integration = require('../../models').Integration;
+
+// Get list of Integration
+exports.index = function(req, res, next) {
+  return Integration
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single integration
+exports.show = function(req, res) {
+  Integration
+    .findById(req.params.id)
+    .then(function(integration) {
+      if (!integration) {
+        return res.sendStatus(404);
+      }
+      return res.send(integration);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new integration in the DB.
+exports.create = function(req, res) {
+  var upload = new uploadFile({
+    dest: path.join(config.root, 'server/files/integrations'),
+    maxFileSize: 5 * 1000000,
+    maxNumberOfFiles: 1,
+    minNumberOfFiles: 1,
+    acceptFileTypes: /(\.|\/)(zip)$/i,
+    messages: {
+      maxNumberOfFiles: "Max number of files upload exceeded",
+      acceptFileTypes: "Only zip format accepted",
+      maxFileSize: "The maximum file size is 5 Mb",
+      invalidRequest: "Invalid request"
+    }
+  });
+
+  upload.on('end', function(fields, files) {
+    var zip = new admZip(files.file.path);
+
+    var manifest = false;
+    var zipEntries = zip.getEntries();
+    zipEntries.forEach(function(zipEntry) {
+      if (zipEntry.name === 'manifest.json') {
+        var str = zipEntry.getData().toString('utf8');
+        console.log('uploadZip', str);
+        try {
+          manifest = JSON.parse(str);
+          console.log('uploadZip', manifest);
+          Integration
+            .create(_.merge(files.file, manifest))
+            .then(function(integration) {
+
+              // Extract All Zip and overwrite old directory
+              zip.extractAllTo(path.join(config.root,
+                'server/files/integrations'), true);
+
+              return res.status(201).send(integration);
+            })
+            .catch(function(err) {
+              return handleError(res, err);
+            });
+        } catch (e) {
+          console.log(e);
+          var err = {
+            errors: [{
+              type: 'json',
+              message: e
+            }]
+          };
+          return handleError(res, err);
+        }
+      }
+    });
+
+    fs.unlinkSync(files.file.path);
+
+    if (!manifest) {
+      var err = {
+        errors: [{
+          type: 'manifest',
+          message: 'manifest.json not found'
+        }]
+      };
+      return handleError(res, err);
+    }
+  });
+
+  upload.on('error', function(e) {
+    var err = {
+      errors: [{
+        type: 'upload',
+        message: e
+      }]
+    };
+    return handleError(res, err);
+  });
+
+  upload.parse(req);
+};
+
+// Updates an existing integration in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  Integration
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(integration) {
+      if (!integration) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(integration, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(integration);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a integration from the DB.
+exports.destroy = function(req, res) {
+  Integration
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(integration) {
+      if (!integration) {
+        return res.sendStatus(404);
+      }
+      integration.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index f7a2c0d..a79af43 100644 (file)
@@ -1 +1,27 @@
-var _0x1272=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x1272[0];var Integration=require(_0x1272[2])[_0x1272[1]];exports[_0x1272[3]]=function(_0x5d53x2){Integration[_0x1272[4]](function(_0x5d53x3){onSave(_0x5d53x2,_0x5d53x3)});Integration[_0x1272[5]](function(_0x5d53x3){onSave(_0x5d53x2,_0x5d53x3)});Integration[_0x1272[6]](function(_0x5d53x3){onRemove(_0x5d53x2,_0x5d53x3)})};function onSave(_0x5d53x2,_0x5d53x3,_0x5d53x5){_0x5d53x2[_0x1272[8]](_0x1272[7],_0x5d53x3)}function onRemove(_0x5d53x2,_0x5d53x3,_0x5d53x5){_0x5d53x2[_0x1272[8]](_0x1272[9],_0x5d53x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Integration = require('../../models').Integration;
+
+exports.register = function(socket) {
+  Integration.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Integration.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  Integration.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('integration:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('integration:remove', doc);
+}
index 8d57fb8..0d4146d 100644 (file)
@@ -1 +1,20 @@
-var _0x5bcf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74"];_0x5bcf[0];var should=require(_0x5bcf[1]);var app=require(_0x5bcf[2]);var request=require(_0x5bcf[3]);describe(_0x5bcf[4],function(){it(_0x5bcf[5],function(_0x1502x4){request(app)[_0x5bcf[13]](_0x5bcf[12])[_0x5bcf[11]](200)[_0x5bcf[11]](_0x5bcf[10],/json/)[_0x5bcf[9]](function(_0x1502x5,_0x1502x6){if(_0x1502x5){return _0x1502x4(_0x1502x5)};_0x1502x6[_0x5bcf[8]][_0x5bcf[1]][_0x5bcf[7]][_0x5bcf[6]](Array);_0x1502x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/integrations', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/integrations')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 439ce41..b9f5ab2 100644 (file)
@@ -1 +1,16 @@
-var _0x1398=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1398[0];var express=require(_0x1398[1]);var controller=require(_0x1398[2]);var auth=require(_0x1398[3]);var router=express.Router();router[_0x1398[7]](_0x1398[4],auth[_0x1398[5]](),controller[_0x1398[6]]);router[_0x1398[7]](_0x1398[8],auth[_0x1398[5]](),controller[_0x1398[9]]);router[_0x1398[11]](_0x1398[4],auth[_0x1398[5]](),controller[_0x1398[10]]);router[_0x1398[13]](_0x1398[8],auth[_0x1398[5]](),controller[_0x1398[12]]);router[_0x1398[15]](_0x1398[4],auth[_0x1398[5]](),controller[_0x1398[14]]);router[_0x1398[15]](_0x1398[8],auth[_0x1398[5]](),controller[_0x1398[16]]);module[_0x1398[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./interval.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index e443476..584391e 100644 (file)
@@ -1 +1,167 @@
-var _0x5c93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x61\x6C\x6C","\x61\x72\x65\x20\x74\x68\x65\x72\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x79\x65\x73\x20\x74\x68\x65\x72\x65\x20\x61\x72\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x6F\x6E\x65\x20\x6F\x72\x20\x6D\x6F\x72\x65\x20\x72\x6F\x75\x74\x65\x73\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x68\x65\x6D\x20\x66\x69\x72\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x5c93[0];var _=require(_0x5c93[1]);var Interval=require(_0x5c93[3])[_0x5c93[2]];var VoiceExtension=require(_0x5c93[3])[_0x5c93[4]];var sequelize=require(_0x5c93[3])[_0x5c93[5]];var Util=require(_0x5c93[6]);exports[_0x5c93[7]]=function(_0x1f47x6,_0x1f47x7,_0x1f47x8){return Interval[_0x5c93[17]](_0x5c93[15],_0x5c93[16])[_0x5c93[14]](Util[_0x5c93[13]](_0x1f47x6[_0x5c93[12]]))[_0x5c93[11]](function(_0x1f47xa){_0x1f47x7[_0x5c93[10]](200)[_0x5c93[9]](_0x1f47xa)})[_0x5c93[8]](function(_0x1f47x9){return handleError(_0x1f47x7,_0x1f47x9)})};exports[_0x5c93[18]]=function(_0x1f47x6,_0x1f47x7){return Interval[_0x5c93[17]](_0x5c93[16])[_0x5c93[22]](_0x1f47x6[_0x5c93[21]][_0x5c93[20]])[_0x5c93[11]](function(_0x1f47xb){if(!_0x1f47xb){return _0x1f47x7[_0x5c93[19]](404)};return _0x1f47x7[_0x5c93[9]](_0x1f47xb)})[_0x5c93[8]](function(_0x1f47x9){return handleError(_0x1f47x7,_0x1f47x9)})};exports[_0x5c93[23]]=function(_0x1f47x6,_0x1f47x7){return Interval[_0x5c93[17]](_0x5c93[16])[_0x5c93[23]](_0x1f47x6[_0x5c93[25]])[_0x5c93[11]](function(_0x1f47xb){return _0x1f47x7[_0x5c93[10]](201)[_0x5c93[9]](_0x1f47xb)})[_0x5c93[8]](function(_0x1f47x9){console[_0x5c93[24]](_0x1f47x9);return handleError(_0x1f47x7,_0x1f47x9)})};exports[_0x5c93[26]]=function(_0x1f47x6,_0x1f47x7){console[_0x5c93[24]](_0x1f47x6[_0x5c93[25]]);return sequelize[_0x5c93[32]](function(_0x1f47xc){if(_0x1f47x6[_0x5c93[25]][_0x5c93[20]]){delete _0x1f47x6[_0x5c93[25]][_0x5c93[20]]};return Interval[_0x5c93[26]](_0x1f47x6[_0x5c93[25]],{where:{id:_0x1f47x6[_0x5c93[21]][_0x5c93[20]]},individualHooks:true,transaction:_0x1f47xc})[_0x5c93[11]](function(){if(_0x1f47x6[_0x5c93[25]][_0x5c93[29]]){return Interval[_0x5c93[31]]({where:{IntervalId:_0x1f47x6[_0x5c93[21]][_0x5c93[20]]},transaction:_0x1f47xc})}})[_0x5c93[11]](function(){console[_0x5c93[24]](_0x5c93[28]);if(_0x1f47x6[_0x5c93[25]][_0x5c93[29]]&&_0x1f47x6[_0x5c93[25]][_0x5c93[29]][_0x5c93[30]]){return _0x1f47x6[_0x5c93[21]][_0x5c93[20]]}})[_0x5c93[11]](bulkCreateSubIntervals(_0x1f47x6[_0x5c93[25]].SubIntervals,_0x1f47xc))[_0x5c93[27]]()})[_0x5c93[11]](function(){return _0x1f47x7[_0x5c93[19]](200)})[_0x5c93[8]](function(_0x1f47x9){console[_0x5c93[24]](_0x1f47x9);return handleError(_0x1f47x7,_0x1f47x9)})};function bulkCreateSubIntervals(_0x1f47xe,_0x1f47xc){return function(_0x1f47xf){if(_0x1f47xf){console[_0x5c93[24]](_0x5c93[33]);var _0x1f47x10=[];_0x1f47xe[_0x5c93[36]](function(_0x1f47x11){_0x1f47x11[_0x5c93[34]]=_0x1f47xf;_0x1f47x10[_0x5c93[35]](Interval[_0x5c93[23]](_0x1f47x11,{transaction:_0x1f47xc}))});return _0x1f47x10}else {return []}}}exports[_0x5c93[31]]=function(_0x1f47x6,_0x1f47x7){return sequelize[_0x5c93[32]](function(_0x1f47xc){return Interval[_0x5c93[31]]({where:{id:_0x1f47x6[_0x5c93[21]][_0x5c93[20]]},individualHooks:true,transaction:_0x1f47xc})})[_0x5c93[11]](function(){return _0x1f47x7[_0x5c93[19]](204)})[_0x5c93[8]](sequelize.ForeignKeyConstraintError,function(_0x1f47x9){_0x1f47x9[_0x5c93[37]]=_0x5c93[38];_0x1f47x9[_0x5c93[39]]=_0x5c93[40];return handleError(_0x1f47x7,_0x1f47x9)})[_0x5c93[8]](function(_0x1f47x9){return handleError(_0x1f47x7,_0x1f47x9)})};exports[_0x5c93[41]]=function(_0x1f47x6,_0x1f47x7){return sequelize[_0x5c93[32]](function(_0x1f47xc){return Interval[_0x5c93[31]]({where:{id:_0x1f47x6[_0x5c93[12]][_0x5c93[42]]},individualHooks:true,transaction:_0x1f47xc})})[_0x5c93[11]](function(){return _0x1f47x7[_0x5c93[19]](204)})[_0x5c93[8]](sequelize.ForeignKeyConstraintError,function(_0x1f47x9){_0x1f47x9[_0x5c93[37]]=_0x5c93[38];_0x1f47x9[_0x5c93[39]]=_0x5c93[40];return handleError(_0x1f47x7,_0x1f47x9)})[_0x5c93[8]](function(_0x1f47x9){return handleError(_0x1f47x7,_0x1f47x9)})};function handleError(_0x1f47x7,_0x1f47x9){return _0x1f47x7[_0x5c93[10]](500)[_0x5c93[9]](_0x1f47x9)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Interval = require('../../models').Interval;
+var VoiceExtension = require('../../models').VoiceExtension;
+var sequelize = require('../../models').sequelize;
+
+var Util = require('../../config/util');
+
+// Get list of interval
+exports.index = function(req, res, next) {
+  return Interval
+    .scope('intervals', 'subintervals')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single interval
+exports.show = function(req, res) {
+  return Interval
+    .scope('subintervals')
+    .findById(req.params.id)
+    .then(function(interval) {
+      if (!interval) {
+        return res.sendStatus(404);
+      }
+      return res.send(interval);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new interval in the DB.
+exports.create = function(req, res) {
+  return Interval
+    .scope('subintervals')
+    .create(req.body)
+    .then(function(interval) {
+      return res.status(201).send(interval);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing interval in the DB.
+exports.update = function(req, res) {
+  console.log(req.body);
+  return sequelize.transaction(function(t) {
+      if (req.body.id) {
+        delete req.body.id;
+      }
+      return Interval
+        .update(req.body, {
+          where: {
+            id: req.params.id
+          },
+          individualHooks: true,
+          transaction: t
+        })
+        .then(function() {
+          if (req.body.SubIntervals) {
+            return Interval
+              .destroy({
+                where: {
+                  IntervalId: req.params.id
+                },
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          console.log('are there intervals');
+          if (req.body.SubIntervals && req.body.SubIntervals.length) {
+            return req.params.id;
+          }
+        })
+        .then(bulkCreateSubIntervals(req.body.SubIntervals, t))
+        .all();
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+function bulkCreateSubIntervals(subIntervals, t) {
+  return function(mainInterval) {
+    if (mainInterval) {
+      console.log('yes there are');
+      var bulkSubInts = [];
+      subIntervals.forEach(function(elem) {
+        elem.IntervalId = mainInterval;
+        bulkSubInts.push(Interval.create(elem, {
+          transaction: t
+        }));
+      });
+      return bulkSubInts;
+    } else {
+      return [];
+    }
+  }
+}
+
+// Deletes a interval from the DB.
+exports.destroy = function(req, res) {
+  return sequelize.transaction(function(t) {
+      return Interval
+        .destroy({
+          where: {
+            id: req.params.id
+          },
+          individualHooks: true,
+          transaction: t
+        });
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(sequelize.ForeignKeyConstraintError, function(err) {
+      err.message = 'The Interval is associated with one or more routes, delete them first';
+      err.translatedMessage = 'MESSAGE_INTERVAL_ROUTE_ASSOCIATED'
+      return handleError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes multiple intervals from the DB.
+exports.bulkDestroy = function(req, res) {
+  return sequelize.transaction(function(t) {
+      return Interval
+        .destroy({
+          where: {
+            id: req.query.ids
+          },
+          individualHooks: true,
+          transaction: t
+        });
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(sequelize.ForeignKeyConstraintError, function(err) {
+      err.message = 'The Interval is associated with one or more routes, delete them first';
+      err.translatedMessage = 'MESSAGE_INTERVAL_ROUTE_ASSOCIATED'
+      return handleError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index cbe33a7..d8aee27 100644 (file)
@@ -1 +1,31 @@
-var _0x1216=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x69\x6E\x74\x65\x72\x76\x61\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x69\x6E\x74\x65\x72\x76\x61\x6C\x3A\x75\x70\x64\x61\x74\x65"];_0x1216[0];var Interval=require(_0x1216[2])[_0x1216[1]];exports[_0x1216[3]]=function(_0xa5bcx2){Interval[_0x1216[4]](function(_0xa5bcx3){onSave(_0xa5bcx2,_0xa5bcx3)});Interval[_0x1216[5]](function(_0xa5bcx3){onRemove(_0xa5bcx2,_0xa5bcx3)});Interval[_0x1216[6]](function(_0xa5bcx3){onUpdate(_0xa5bcx2,_0xa5bcx3)})};function onSave(_0xa5bcx2,_0xa5bcx3,_0xa5bcx5){_0xa5bcx2[_0x1216[8]](_0x1216[7],_0xa5bcx3)}function onRemove(_0xa5bcx2,_0xa5bcx3,_0xa5bcx5){_0xa5bcx2[_0x1216[8]](_0x1216[9],_0xa5bcx3)}function onUpdate(_0xa5bcx2,_0xa5bcx3,_0xa5bcx5){_0xa5bcx2[_0x1216[8]](_0x1216[10],_0xa5bcx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Interval = require('../../models').Interval;
+
+exports.register = function(socket) {
+  Interval.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Interval.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+  Interval.afterUpdate(function(doc) {
+    onUpdate(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('interval:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('interval:remove', doc);
+}
+
+function onUpdate(socket, doc, cb) {
+  socket.emit('interval:update', doc);
+}
index 4dee2dd..280cb64 100644 (file)
@@ -1 +1,20 @@
-var _0xca2d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x67\x65\x74"];_0xca2d[0];var should=require(_0xca2d[1]);var app=require(_0xca2d[2]);var request=require(_0xca2d[3]);describe(_0xca2d[4],function(){it(_0xca2d[5],function(_0x83eex4){request(app)[_0xca2d[13]](_0xca2d[12])[_0xca2d[11]](200)[_0xca2d[11]](_0xca2d[10],/json/)[_0xca2d[9]](function(_0x83eex5,_0x83eex6){if(_0x83eex5){return _0x83eex4(_0x83eex5)};_0x83eex6[_0xca2d[8]][_0xca2d[1]][_0xca2d[7]][_0xca2d[6]](Array);_0x83eex4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/intervals', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/intervals')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 750c352..1ecf642 100644 (file)
@@ -1 +1,33 @@
-var _0x3555=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x3A\x73\x65\x73\x73\x69\x6F\x6E\x49\x64","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x73\x75\x6D\x6D\x61\x72\x79","\x73\x68\x6F\x77\x53\x75\x6D\x6D\x61\x72\x79","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x64\x65\x74\x61\x69\x6C","\x73\x68\x6F\x77\x44\x65\x74\x61\x69\x6C","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x3A\x73\x65\x73\x73\x69\x6F\x6E\x49\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3555[0];var express=require(_0x3555[1]);var auth=require(_0x3555[2]);var controller=require(_0x3555[3]);var router=express.Router();router[_0x3555[7]](_0x3555[4],auth[_0x3555[5]](),controller[_0x3555[6]]);router[_0x3555[7]](_0x3555[8],auth[_0x3555[5]](),controller[_0x3555[9]]);router[_0x3555[7]](_0x3555[10],controller[_0x3555[11]]);router[_0x3555[7]](_0x3555[12],controller[_0x3555[13]]);router[_0x3555[7]](_0x3555[14],controller[_0x3555[15]]);router[_0x3555[7]](_0x3555[16],controller[_0x3555[17]]);router[_0x3555[7]](_0x3555[18],controller[_0x3555[19]]);router[_0x3555[7]](_0x3555[20],controller[_0x3555[21]]);router[_0x3555[23]](_0x3555[4],auth[_0x3555[5]](),controller[_0x3555[22]]);router[_0x3555[23]](_0x3555[12],auth[_0x3555[5]](),controller[_0x3555[24]]);router[_0x3555[23]](_0x3555[25],auth[_0x3555[5]](),controller[_0x3555[26]]);router[_0x3555[28]](_0x3555[8],auth[_0x3555[5]](),controller[_0x3555[27]]);router[_0x3555[28]](_0x3555[14],auth[_0x3555[5]](),controller[_0x3555[29]]);router[_0x3555[30]](_0x3555[8],auth[_0x3555[5]](),controller[_0x3555[27]]);router[_0x3555[32]](_0x3555[4],auth[_0x3555[5]](),controller[_0x3555[31]]);router[_0x3555[32]](_0x3555[8],auth[_0x3555[5]](),controller[_0x3555[33]]);module[_0x3555[34]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./jscripty_project.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/download', controller.download);
+router.get('/:id/sessions', controller.showSessions);
+router.get('/:id/sessions/:sessionId', controller.showSession);
+
+router.get('/:id/questions', controller.showQuestions);
+
+router.get('/:id/questions/summary', controller.showSummary);
+router.get('/:id/questions/detail', controller.showDetail);
+
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/sessions', auth.isAuthenticated(), controller.createSession);
+router.post('/:id/sessions/:sessionId/questions', auth.isAuthenticated(), controller.createQuestions);
+
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.put('/:id/sessions/:sessionId', auth.isAuthenticated(), controller.updateSession);
+
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+
+module.exports = router;
index 8e8e963..3860e91 100644 (file)
@@ -1 +1,97 @@
-var _0x239b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0x239b[0];var proxyquire=require(_0x239b[2])[_0x239b[1]]();var jscriptyProjectCtrlStub={index:_0x239b[3],show:_0x239b[4],create:_0x239b[5],update:_0x239b[6],destroy:_0x239b[7]};var routerStub={get:sinon[_0x239b[8]](),put:sinon[_0x239b[8]](),patch:sinon[_0x239b[8]](),post:sinon[_0x239b[8]](),delete:sinon[_0x239b[8]]()};var jscriptyProjectIndex=proxyquire(_0x239b[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":jscriptyProjectCtrlStub});describe(_0x239b[10],function(){it(_0x239b[11],function(){expect(jscriptyProjectIndex)[_0x239b[13]][_0x239b[12]](routerStub)});describe(_0x239b[14],function(){it(_0x239b[15],function(){expect(routerStub[_0x239b[21]][_0x239b[20]](_0x239b[19],_0x239b[3]))[_0x239b[13]][_0x239b[18]][_0x239b[17]][_0x239b[16]]})});describe(_0x239b[22],function(){it(_0x239b[23],function(){expect(routerStub[_0x239b[21]][_0x239b[20]](_0x239b[24],_0x239b[4]))[_0x239b[13]][_0x239b[18]][_0x239b[17]][_0x239b[16]]})});describe(_0x239b[25],function(){it(_0x239b[26],function(){expect(routerStub[_0x239b[27]][_0x239b[20]](_0x239b[19],_0x239b[5]))[_0x239b[13]][_0x239b[18]][_0x239b[17]][_0x239b[16]]})});describe(_0x239b[28],function(){it(_0x239b[29],function(){expect(routerStub[_0x239b[30]][_0x239b[20]](_0x239b[24],_0x239b[6]))[_0x239b[13]][_0x239b[18]][_0x239b[17]][_0x239b[16]]})});describe(_0x239b[31],function(){it(_0x239b[29],function(){expect(routerStub[_0x239b[32]][_0x239b[20]](_0x239b[24],_0x239b[6]))[_0x239b[13]][_0x239b[18]][_0x239b[17]][_0x239b[16]]})});describe(_0x239b[33],function(){it(_0x239b[34],function(){expect(routerStub[_0x239b[35]][_0x239b[20]](_0x239b[24],_0x239b[7]))[_0x239b[13]][_0x239b[18]][_0x239b[17]][_0x239b[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var jscriptyProjectCtrlStub = {
+  index: 'jscriptyProjectCtrl.index',
+  show: 'jscriptyProjectCtrl.show',
+  create: 'jscriptyProjectCtrl.create',
+  update: 'jscriptyProjectCtrl.update',
+  destroy: 'jscriptyProjectCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var jscriptyProjectIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './jscripty_project.controller': jscriptyProjectCtrlStub
+});
+
+describe('JscriptyProject API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(jscriptyProjectIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/jscripty/projects', function() {
+
+    it('should route to jscriptyProject.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'jscriptyProjectCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/jscripty/projects/:id', function() {
+
+    it('should route to jscriptyProject.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'jscriptyProjectCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/jscripty/projects', function() {
+
+    it('should route to jscriptyProject.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'jscriptyProjectCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/jscripty/projects/:id', function() {
+
+    it('should route to jscriptyProject.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'jscriptyProjectCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/jscripty/projects/:id', function() {
+
+    it('should route to jscriptyProject.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'jscriptyProjectCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/jscripty/projects/:id', function() {
+
+    it('should route to jscriptyProject.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'jscriptyProjectCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index e4b2bf2..7550756 100644 (file)
@@ -1 +1,389 @@
-var _0x4ed4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x78\x6D\x6C\x32\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E\x73","\x6C\x6F\x67","\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x41\x6E\x64\x49\x6E\x70\x75\x74","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E","\x73\x65\x73\x73\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E\x53\x75\x6D\x6D\x61\x72\x79","\x73\x68\x6F\x77\x44\x65\x74\x61\x69\x6C","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x69\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6C\x61\x62\x65\x6C","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x74\x65\x78\x74","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x61\x6E\x73\x77\x65\x72","\x63\x6F\x75\x6E\x74","\x63\x6F\x6C","\x66\x6E","\x63\x72\x65\x61\x74\x65","\x6E\x61\x6D\x65","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x50\x52\x4F\x4A\x45\x43\x54","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x72\x65\x71\x2E\x62\x6F\x64\x79","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x66\x69\x6E\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0x4ed4[0];var xml=require(_0x4ed4[1]);var _=require(_0x4ed4[2]);var JscriptyProject=require(_0x4ed4[4])[_0x4ed4[3]];var Util=require(_0x4ed4[5]);var sequelize=require(_0x4ed4[4])[_0x4ed4[6]];var ReportJscriptySession=require(_0x4ed4[4])[_0x4ed4[7]];var ReportJscriptyQuestion=require(_0x4ed4[4])[_0x4ed4[8]];var ReportJscriptyInput=require(_0x4ed4[4])[_0x4ed4[9]];var Promise=require(_0x4ed4[10]);function handleError(_0x71fcxb,_0x71fcxc){return _0x71fcxb[_0x4ed4[12]](500)[_0x4ed4[11]](_0x71fcxc)}function responseWithResult(_0x71fcxb,_0x71fcxe){_0x71fcxe=_0x71fcxe||200;return function(_0x71fcxf){if(_0x71fcxf){_0x71fcxb[_0x4ed4[12]](_0x71fcxe)[_0x4ed4[13]](_0x71fcxf)}}}function handleEntityNotFound(_0x71fcxb){return function(_0x71fcxf){if(!_0x71fcxf){_0x71fcxb[_0x4ed4[12]](404)[_0x4ed4[14]]();return null};return _0x71fcxf}}function saveUpdates(_0x71fcx12){return function(_0x71fcxf){return _0x71fcxf[_0x4ed4[16]](_0x71fcx12)[_0x4ed4[15]](function(_0x71fcx13){return _0x71fcx13})}}function removeEntity(_0x71fcxb){return function(_0x71fcxf){if(_0x71fcxf){return _0x71fcxf[_0x4ed4[17]]()[_0x4ed4[15]](function(){_0x71fcxb[_0x4ed4[12]](204)[_0x4ed4[14]]()})}}}exports[_0x4ed4[18]]=function(_0x71fcx15,_0x71fcxb,_0x71fcx16){return JscriptyProject[_0x4ed4[22]](Util[_0x4ed4[21]](_0x71fcx15[_0x4ed4[20]]))[_0x4ed4[15]](function(_0x71fcx17){_0x71fcxb[_0x4ed4[12]](200)[_0x4ed4[11]](_0x71fcx17)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[23]]=function(_0x71fcx15,_0x71fcxb){return JscriptyProject[_0x4ed4[27]](_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]])[_0x4ed4[15]](function(_0x71fcx18){if(!_0x71fcx18){return _0x71fcxb[_0x4ed4[24]](404)};return _0x71fcxb[_0x4ed4[11]](_0x71fcx18)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[28]]=function(_0x71fcx15,_0x71fcxb){return ReportJscriptySession[_0x4ed4[31]]({method:[_0x4ed4[30],_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]]]})[_0x4ed4[22]](Util[_0x4ed4[21]](_0x71fcx15[_0x4ed4[20]]))[_0x4ed4[15]](handleEntityNotFound(_0x71fcxb))[_0x4ed4[15]](responseWithResult(_0x71fcxb))[_0x4ed4[19]](function(_0x71fcxc){console[_0x4ed4[29]](_0x71fcxc);return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[32]]=function(_0x71fcx15,_0x71fcxb){return ReportJscriptySession[_0x4ed4[34]]({where:{projectId:_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]],session_id:_0x71fcx15[_0x4ed4[26]][_0x4ed4[33]]},include:[{model:ReportJscriptyQuestion,include:[{model:ReportJscriptyInput}]}]})[_0x4ed4[15]](handleEntityNotFound(_0x71fcxb))[_0x4ed4[15]](responseWithResult(_0x71fcxb))[_0x4ed4[19]](function(_0x71fcxc){console[_0x4ed4[29]](_0x71fcxc);return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[35]]=function(_0x71fcx15,_0x71fcxb){return ReportJscriptyQuestion[_0x4ed4[34]]({where:{projectId:_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]]},include:[{model:ReportJscriptyInput}]})[_0x4ed4[15]](function(_0x71fcx19){if(!_0x71fcx19){return _0x71fcxb[_0x4ed4[24]](404)};return _0x71fcxb[_0x4ed4[12]](200)[_0x4ed4[11]](_0x71fcx19)})[_0x4ed4[15]](handleEntityNotFound(_0x71fcxb))[_0x4ed4[19]](function(_0x71fcxc){console[_0x4ed4[29]](_0x71fcxc);return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[36]]=function(_0x71fcx15,_0x71fcxb){return ReportJscriptyQuestion[_0x4ed4[31]]({method:[_0x4ed4[37],_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]]]})[_0x4ed4[22]](Util[_0x4ed4[21]](_0x71fcx15[_0x4ed4[20]]))[_0x4ed4[15]](handleEntityNotFound(_0x71fcxb))[_0x4ed4[15]](function(_0x71fcx1a){return _0x71fcxb[_0x4ed4[12]](200)[_0x4ed4[11]](_0x71fcx1a)})[_0x4ed4[19]](function(_0x71fcxc){console[_0x4ed4[29]](_0x71fcxc);return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[38]]=function(_0x71fcx15,_0x71fcxb){return ReportJscriptyQuestion[_0x4ed4[34]]({where:{projectId:_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]],question_type:_0x4ed4[39]},attributes:[_0x4ed4[40],_0x4ed4[41],_0x4ed4[42],_0x4ed4[43],[sequelize[_0x4ed4[46]](_0x4ed4[44],sequelize[_0x4ed4[45]](_0x4ed4[43])),_0x4ed4[44]]],group:[_0x4ed4[40],_0x4ed4[41],_0x4ed4[42],_0x4ed4[43]]})[_0x4ed4[15]](function(_0x71fcx19){return _0x71fcxb[_0x4ed4[12]](201)[_0x4ed4[11]](_0x71fcx19)})[_0x4ed4[19]](function(_0x71fcxc){console[_0x4ed4[29]](_0x71fcxc);return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[47]]=function(_0x71fcx15,_0x71fcxb){return JscriptyProject[_0x4ed4[47]](_0x71fcx15[_0x4ed4[54]])[_0x4ed4[15]](function(_0x71fcx18){return _0x71fcxb[_0x4ed4[12]](201)[_0x4ed4[11]](_0x71fcx18)})[_0x4ed4[19]](sequelize.UniqueConstraintError,function(_0x71fcxc){if(_0x71fcxc[_0x4ed4[49]][_0x4ed4[48]]){_0x71fcxc[_0x4ed4[50]]=_0x4ed4[51];_0x71fcxc[_0x4ed4[52]]=_0x4ed4[53]};return handleError(_0x71fcxb,_0x71fcxc)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[55]]=function(_0x71fcx15,_0x71fcxb){ReportJscriptySession[_0x4ed4[47]](_0x71fcx15[_0x4ed4[54]])[_0x4ed4[15]](function(_0x71fcx1b){return _0x71fcxb[_0x4ed4[12]](201)[_0x4ed4[11]](_0x71fcx1b)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[56]]=function(_0x71fcx15,_0x71fcxb){ReportJscriptyQuestion[_0x4ed4[17]]({where:{sessionId:_0x71fcx15[_0x4ed4[26]][_0x4ed4[33]]}})[_0x4ed4[15]](function(){console[_0x4ed4[29]](_0x4ed4[57],_0x71fcx15[_0x4ed4[54]]);var _0x71fcx1d=[];_0x71fcx15[_0x4ed4[54]][_0x4ed4[59]](function(_0x71fcx1e){_0x71fcx1d[_0x4ed4[58]](ReportJscriptyQuestion[_0x4ed4[47]](_0x71fcx1e,{include:[{model:ReportJscriptyInput}]}))});return Promise[_0x4ed4[60]](_0x71fcx1d)})[_0x4ed4[15]](function(_0x71fcx1c){return _0x71fcxb[_0x4ed4[12]](201)[_0x4ed4[11]](_0x71fcx1c)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[61]]=function(_0x71fcx15,_0x71fcxb){if(_0x71fcx15[_0x4ed4[54]][_0x4ed4[25]]){delete _0x71fcx15[_0x4ed4[54]][_0x4ed4[25]]};JscriptyProject[_0x4ed4[27]](_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]])[_0x4ed4[15]](function(_0x71fcx18){if(!_0x71fcx18){return _0x71fcxb[_0x4ed4[24]](404)};var _0x71fcx13=_[_0x4ed4[62]](_0x71fcx18,_0x71fcx15[_0x4ed4[54]]);_0x71fcx13[_0x4ed4[63]]()[_0x4ed4[15]](function(){return _0x71fcxb[_0x4ed4[12]](200)[_0x4ed4[11]](_0x71fcx18)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[64]]=function(_0x71fcx15,_0x71fcxb){ReportJscriptySession[_0x4ed4[61]](_0x71fcx15[_0x4ed4[54]],{where:{session_id:_0x71fcx15[_0x4ed4[26]][_0x4ed4[33]]}})[_0x4ed4[15]](function(_0x71fcx1b){return _0x71fcxb[_0x4ed4[12]](200)[_0x4ed4[11]](_0x71fcx1b)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[17]]=function(_0x71fcx15,_0x71fcxb){JscriptyProject[_0x4ed4[65]]({where:{id:_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]]}})[_0x4ed4[15]](function(_0x71fcx18){if(!_0x71fcx18){return _0x71fcxb[_0x4ed4[24]](404)};_0x71fcx18[_0x4ed4[17]]()[_0x4ed4[15]](function(){return _0x71fcxb[_0x4ed4[24]](204)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[66]]=function(_0x71fcx15,_0x71fcxb){JscriptyProject[_0x4ed4[17]]({where:{id:_0x71fcx15[_0x4ed4[20]][_0x4ed4[67]]},individualHooks:true})[_0x4ed4[15]](function(){return _0x71fcxb[_0x4ed4[24]](204)})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})};exports[_0x4ed4[68]]=function(_0x71fcx15,_0x71fcxb,_0x71fcx16){JscriptyProject[_0x4ed4[27]](_0x71fcx15[_0x4ed4[26]][_0x4ed4[25]])[_0x4ed4[15]](function(_0x71fcx18){if(!_0x71fcx18){return _0x71fcxb[_0x4ed4[24]](404)};console[_0x4ed4[29]](_0x71fcx15[_0x4ed4[20]][_0x4ed4[69]]);_0x71fcxb[_0x4ed4[73]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x4ed4[70]+_0x71fcx15[_0x4ed4[20]][_0x4ed4[69]]+_0x4ed4[71],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x4ed4[72]});return _0x71fcxb[_0x4ed4[11]](_0x71fcx18[_0x4ed4[74]])})[_0x4ed4[19]](function(_0x71fcxc){return handleError(_0x71fcxb,_0x71fcxc)})}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/jscripty/projects              ->  index
+ * POST    /api/jscripty/projects              ->  create
+ * GET     /api/jscripty/projects/:id          ->  show
+ * PUT     /api/jscripty/projects/:id          ->  update
+ * DELETE  /api/jscripty/projects/:id          ->  destroy
+ */
+
+'use strict';
+var xml = require('xml2js');
+
+var _ = require('lodash');
+
+var JscriptyProject = require('../../models').JscriptyProject;
+var Util = require('../../config/util');
+var sequelize = require('../../models').sequelize;
+var ReportJscriptySession = require('../../models').ReportJscriptySession;
+var ReportJscriptyQuestion = require('../../models').ReportJscriptyQuestion;
+var ReportJscriptyInput = require('../../models').ReportJscriptyInput;
+var Promise = require('bluebird');
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
+
+
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of JscriptyProjects
+
+exports.index = function(req, res, next) {
+  return JscriptyProject
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.show = function(req, res) {
+  return JscriptyProject
+    .findById(req.params.id)
+    .then(function(jscripty_project) {
+      if (!jscripty_project) {
+        return res.sendStatus(404);
+      }
+      return res.send(jscripty_project);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Gets a all ReportJscriptySession from the DB
+exports.showSessions = function(req, res) {
+    return ReportJscriptySession
+      .scope({
+        method: ['questionsAndInput', req.params.id]
+      })
+      .findAndCountAll(Util.getQuery(req.query))
+      .then(handleEntityNotFound(res))
+      .then(responseWithResult(res))
+      .catch(function(err) {
+        console.log(err);
+        return handleError(res, err);
+      });
+  }
+  // Gets a one ReportJscriptySession from the DB
+exports.showSession = function(req, res) {
+  return ReportJscriptySession
+    .findAll({
+      where: {
+        projectId: req.params.id,
+        session_id: req.params.sessionId
+      },
+      include: [{
+        model: ReportJscriptyQuestion,
+        include: [{
+          model: ReportJscriptyInput
+        }]
+      }]
+
+    })
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+}
+
+// Gets a all ReportJscriptyQuestion from the DB
+exports.showQuestions = function(req, res) {
+  return ReportJscriptyQuestion
+    .findAll({
+      where: {
+        projectId: req.params.id
+      },
+      include: [{
+        model: ReportJscriptyInput
+      }],
+
+    })
+    .then(function(jscripty_questions) {
+      if (!jscripty_questions) {
+        return res.sendStatus(404);
+      }
+      return res.status(200).send(jscripty_questions);
+    })
+    .then(handleEntityNotFound(res))
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+}
+
+
+// Gets summary of ReportJscriptyQuestion from the DB
+
+exports.showSummary = function(req, res) {
+    return ReportJscriptyQuestion
+      .scope({
+        method: ['questionSummary', req.params.id]
+      })
+      .findAndCountAll(Util.getQuery(req.query))
+      .then(handleEntityNotFound(res))
+      .then(function(jscripty_summary) {
+        return res.status(200).send(jscripty_summary);
+      })
+      .catch(function(err) {
+        console.log(err);
+        return handleError(res, err);
+      });
+
+  }
+  // Gets detail of ReportJscriptyQuestion from the DB
+exports.showDetail = function(req, res) {
+
+    return ReportJscriptyQuestion
+      .findAll({
+
+        where: {
+          projectId: req.params.id,
+          question_type: 'question'
+        },
+        attributes: ['question_id', 'question_label', 'question_text', 'question_answer', [sequelize.fn('count', sequelize.col('question_answer')),
+          'count'
+        ]],
+
+        group: ['question_id', 'question_label', 'question_text', 'question_answer']
+
+
+      })
+      .then(function(jscripty_questions) {
+
+        return res.status(201).send(jscripty_questions);
+
+      })
+
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+  }
+  // Creates a new JscriptyProject in the DB
+exports.create = function(req, res) {
+  return JscriptyProject
+    .create(req.body)
+    .then(function(jscripty_project) {
+      return res.status(201).send(jscripty_project);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      if (err.fields.name) {
+        err.message = 'Project name already exists';
+        err.translatedMessage = 'MESSAGE_EXIST_PROJECT'
+      }
+      return handleError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new ReportJscriptySession in the DB
+exports.createSession = function(req, res) {
+    ReportJscriptySession
+      .create(req.body)
+      .then(function(jscripty_session) {
+        return res.status(201).send(jscripty_session);
+      })
+      .catch(function(err) {
+        return handleError(res, err);
+      });
+
+  }
+  // Creates a new ReportJscriptyQuestions in the DB
+exports.createQuestions = function(req, res) {
+    ReportJscriptyQuestion
+      .destroy({
+        where: {
+          sessionId: req.params.sessionId
+        }
+      })
+      .then(function() {
+        console.log('req.body', req.body);
+        var _promises = [];
+
+        req.body.forEach(function(question) {
+          _promises.push(ReportJscriptyQuestion.create(question, {
+            include: [{
+              model: ReportJscriptyInput
+            }]
+          }));
+        });
+
+        return Promise
+          .all(_promises);
+      })
+      .then(function(jscripty_question) {
+        return res.status(201).send(jscripty_question);
+      })
+      .catch(function(err) {
+        return handleError(res, err);
+      });
+  }
+  // Updates an existing JscriptyProject in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  JscriptyProject
+    .findById(req.params.id)
+    .then(function(jscripty_project) {
+      if (!jscripty_project) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(jscripty_project, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(jscripty_project);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Updates an existing ReportJscriptySession in the DB
+exports.updateSession = function(req, res) {
+
+  ReportJscriptySession
+    .update(req.body, {
+      where: {
+        session_id: req.params.sessionId
+      }
+
+    })
+    .then(function(jscripty_session) {
+      return res.status(200).send(jscripty_session);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+}
+
+// Deletes a JscriptyProject from the DB
+exports.destroy = function(req, res) {
+  JscriptyProject
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(jscripty_project) {
+      if (!jscripty_project) {
+        return res.sendStatus(404);
+      }
+      jscripty_project.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a jscripty_project from the DB.
+exports.bulkDestroy = function(req, res) {
+  JscriptyProject
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+exports.download = function(req, res, next) {
+  JscriptyProject
+    .findById(req.params.id)
+    .then(function(jscripty_project) {
+      if (!jscripty_project) {
+        return res.sendStatus(404);
+      }
+      console.log(req.query.filename);
+      res.set({
+        "Content-Disposition": "attachment; filename=\"" + req.query.filename +
+          ".xml\"",
+        "Content-Type": "txt/xml"
+      });
+      return res.send(jscripty_project.production);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// exports.projectJson = function(req, res, next) {
+//   JscriptyProject
+//     .findById(req.params.id)
+//     .then(function(jscripty_project) {
+//       if (!jscripty_project) {
+//         return res.sendStatus(404);
+//       }
+//
+//       xml.parseString(jscripty_project.production, {
+//         normalizeTags: true,
+//         explicitArray: false
+//       }, function(err, result) {
+//         console.log(result);
+//         return res.status(200).send(result);
+//
+//       });
+//     })
+//     .catch(function(err) {
+//       return handleError(res, err);
+//     });
+// };
index 1f1c8e7..4f5b49e 100644 (file)
@@ -1 +1,24 @@
-var _0xf023=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xf023[0];var JscriptyProject=require(_0xf023[2])[_0xf023[1]];exports[_0xf023[3]]=function(_0xa5f5x2){JscriptyProject[_0xf023[4]](function(_0xa5f5x3){onSave(_0xa5f5x2,_0xa5f5x3)});JscriptyProject[_0xf023[5]](function(_0xa5f5x3){onRemove(_0xa5f5x2,_0xa5f5x3)})};function onSave(_0xa5f5x2,_0xa5f5x3,_0xa5f5x5){_0xa5f5x2[_0xf023[7]](_0xf023[6],_0xa5f5x3)}function onRemove(_0xa5f5x2,_0xa5f5x3,_0xa5f5x5){_0xa5f5x2[_0xf023[7]](_0xf023[8],_0xa5f5x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var JscriptyProject = require('../../models').JscriptyProject;
+
+exports.register = function(socket) {
+  JscriptyProject.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  JscriptyProject.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('jscripty_project:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('jscripty_project:remove', doc);
+}
index 3037bdd..3eb5928 100644 (file)
@@ -1 +1,19 @@
-var _0x9a44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x72\x65\x71\x75\x65\x73\x74","\x72\x65\x71\x75\x65\x73\x74","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9a44[0];var express=require(_0x9a44[1]);var auth=require(_0x9a44[2]);var controller=require(_0x9a44[3]);var router=express.Router();router[_0x9a44[7]](_0x9a44[4],auth[_0x9a44[5]](),controller[_0x9a44[6]]);router[_0x9a44[10]](_0x9a44[8],auth[_0x9a44[5]](),controller[_0x9a44[9]]);module[_0x9a44[11]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./license.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+// router.get('/:id', auth.isAuthenticated(), controller.show);
+// router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/request', auth.isAuthenticated(), controller.request);
+// router.put('/:id', auth.isAuthenticated(), controller.update);
+// router.patch('/:id', auth.isAuthenticated(), controller.update);
+// router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 0299273..3d38afa 100644 (file)
@@ -1 +1,161 @@
-var _0x77ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x53\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x74\x6F\x6B\x65\x6E","\x67\x65\x74\x55\x75\x69\x64","\x6A\x73\x6F\x6E","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x72\x65\x71\x75\x65\x73\x74","\x6C\x6F\x67","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x50\x4F\x53\x54","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x2F\x72\x65\x71\x75\x65\x73\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x77ad[0];var _=require(_0x77ad[1]);var rp=require(_0x77ad[2]);var config=require(_0x77ad[3]);var license=require(_0x77ad[4]);var Settings=require(_0x77ad[6])[_0x77ad[5]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,description:_0x77ad[7]};function handleError(_0xf4d2x8,_0xf4d2x9){_0xf4d2x9=_0xf4d2x9||500;return function(_0xf4d2xa){_0xf4d2x8[_0x77ad[9]](_0xf4d2x9)[_0x77ad[8]](_0xf4d2xa)}}function responseWithResult(_0xf4d2x8,_0xf4d2x9){_0xf4d2x9=_0xf4d2x9||200;return function(_0xf4d2xc){if(_0xf4d2xc){if(_0xf4d2xc[_0x77ad[10]]){_0xf4d2xc[_0x77ad[11]][_0x77ad[10]]=license[_0x77ad[12]](_0xf4d2xc[_0x77ad[11]][_0x77ad[10]]);_0xf4d2xc[_0x77ad[11]][_0x77ad[10]]=JSON[_0x77ad[13]](_0xf4d2xc[_0x77ad[11]][_0x77ad[10]])}else {_0xf4d2xc[_0x77ad[11]][_0x77ad[10]]=demoLicense};_0xf4d2xc[_0x77ad[11]][_0x77ad[10]][_0x77ad[14]]=license[_0x77ad[15]]();_0xf4d2x8[_0x77ad[9]](_0xf4d2x9)[_0x77ad[16]](_0xf4d2xc)}}}function handleEntityNotFound(_0xf4d2x8){return function(_0xf4d2xc){if(!_0xf4d2xc){_0xf4d2xc={dataValues:{license:demoLicense}};_0xf4d2xc[_0x77ad[11]][_0x77ad[10]][_0x77ad[14]]=license[_0x77ad[15]]();_0xf4d2x8[_0x77ad[9]](201)[_0x77ad[16]](_0xf4d2xc);return null};return _0xf4d2xc}}function saveUpdates(_0xf4d2xf){return function(_0xf4d2xc){return _0xf4d2xc[_0x77ad[18]](_0xf4d2xf)[_0x77ad[17]](function(_0xf4d2x10){return _0xf4d2x10})}}function removeEntity(_0xf4d2x8){return function(_0xf4d2xc){if(_0xf4d2xc){return _0xf4d2xc[_0x77ad[20]]()[_0x77ad[17]](function(){_0xf4d2x8[_0x77ad[9]](204)[_0x77ad[19]]()})}}}exports[_0x77ad[21]]=function(_0xf4d2x12,_0xf4d2x8){Settings[_0x77ad[23]](1)[_0x77ad[17]](handleEntityNotFound(_0xf4d2x8))[_0x77ad[17]](responseWithResult(_0xf4d2x8))[_0x77ad[22]](handleError(_0xf4d2x8))};exports[_0x77ad[24]]=function(_0xf4d2x12,_0xf4d2x8){};exports[_0x77ad[25]]=function(_0xf4d2x12,_0xf4d2x8){};exports[_0x77ad[26]]=function(_0xf4d2x12,_0xf4d2x8){return rp({method:_0x77ad[29],uri:config[_0x77ad[30]]+_0x77ad[31]+license[_0x77ad[15]]()+_0x77ad[32],body:_0xf4d2x12[_0x77ad[33]],json:true})[_0x77ad[17]](function(_0xf4d2x13){console[_0x77ad[27]](_0xf4d2x13);_0xf4d2x8[_0x77ad[9]](201)[_0x77ad[8]](_0xf4d2x13)})[_0x77ad[22]](function(_0xf4d2xa){console[_0x77ad[27]](_0xf4d2xa);return _0xf4d2x8[_0x77ad[9]](_0xf4d2xa[_0x77ad[28]]||500)[_0x77ad[8]](_0xf4d2xa)})};exports[_0x77ad[34]]=function(_0xf4d2x12,_0xf4d2x8){};exports[_0x77ad[20]]=function(_0xf4d2x12,_0xf4d2x8){}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/licenses              ->  index
+ * POST    /api/licenses              ->  create
+ * GET     /api/licenses/:id          ->  show
+ * PUT     /api/licenses/:id          ->  update
+ * DELETE  /api/licenses/:id          ->  destroy
+ */
+
+'use strict';
+
+var _ = require('lodash');
+var rp = require('request-promise');
+
+var config = require('../../config/environment');
+var license = require('../../config/license/license.service');
+var Settings = require('../../models').Settings;
+
+var demoLicense = {
+  users: 1,
+  agents: 1,
+  telephones: 0,
+  chat: false,
+  mail: false,
+  fax: false,
+  description: 'DEMO LICENSE'
+};
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      if (entity.license) {
+        entity.dataValues.license = license.decrypt(entity.dataValues.license);
+        entity.dataValues.license = JSON.parse(entity.dataValues.license);
+      } else {
+        entity.dataValues.license = demoLicense;
+      }
+
+      entity.dataValues.license.token = license.getUuid();
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      entity = {
+        dataValues: {
+          license: demoLicense
+        }
+      };
+
+      entity.dataValues.license.token = license.getUuid();
+      res.status(201).json(entity);
+      return null;
+    }
+
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity
+      .updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity
+        .destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of Licenses
+exports.index = function(req, res) {
+  // License.findAll()
+  //   .then(responseWithResult(res))
+  //   .catch(handleError(res));
+
+  Settings
+    .findById(1)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single License from the DB
+exports.show = function(req, res) {
+  // License.findById(req.params.id)
+  //   .then(handleEntityNotFound(res))
+  //   .then(responseWithResult(res))
+  //   .catch(handleError(res));
+}
+
+// Creates a new License in the DB
+exports.create = function(req, res) {
+  // License.create(req.body)
+  //   .then(responseWithResult(res, 201))
+  //   .catch(handleError(res));
+}
+
+// Creates a new License in the DB
+exports.request = function(req, res) {
+  // License.create(req.body)
+  //   .then(responseWithResult(res, 201))
+  //   .catch(handleError(res));
+  return rp({
+      method: 'POST',
+      uri: config.provisioning + '/servers/' + license.getUuid() + '/request',
+      body: req.body,
+      json: true // Automatically stringifies the body to JSON
+    })
+    .then(function(data) {
+      console.log(data);
+      res.status(201).send(data);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return res.status(err.statusCode || 500).send(err);
+    });
+  // .catch(handleError(res));
+}
+
+// Updates an existing License in the DB
+exports.update = function(req, res) {
+  // if (req.body.id) {
+  //   delete req.body.id;
+  // }
+  // License.findById(req.params.id)
+  //   .then(handleEntityNotFound(res))
+  //   .then(saveUpdates(req.body))
+  //   .then(responseWithResult(res))
+  //   .catch(handleError(res));
+}
+
+// Deletes a License from the DB
+exports.destroy = function(req, res) {
+  // License.findById(req.params.id)
+  //   .then(handleEntityNotFound(res))
+  //   .then(removeEntity(res))
+  //   .catch(handleError(res));
+}
index ca27cb7..fb7f746 100644 (file)
@@ -1 +1,24 @@
-var _0x52c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x69\x63\x65\x6E\x73\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6C\x69\x63\x65\x6E\x73\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x52c2[0];exports[_0x52c2[1]]=function(_0x4945x1){};function onSave(_0x4945x1,_0x4945x3,_0x4945x4){_0x4945x1[_0x52c2[3]](_0x52c2[2],_0x4945x3)}function onRemove(_0x4945x1,_0x4945x3,_0x4945x4){_0x4945x1[_0x52c2[3]](_0x52c2[4],_0x4945x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+// var License = require('../../models').License;
+
+exports.register = function (socket) {
+  // License.afterCreate(function(doc) {
+  //   onSave(socket, doc);
+  // });
+  // License.afterDestroy(function(doc) {
+  //   onRemove(socket, doc);
+  // });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('license:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('license:remove', doc);
+}
index 5c039e6..92b8162 100644 (file)
@@ -1 +1,23 @@
-var _0x7dbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x7dbc[0];var express=require(_0x7dbc[1]);var controller=require(_0x7dbc[2]);var auth=require(_0x7dbc[3]);var router=express.Router();router[_0x7dbc[7]](_0x7dbc[4],auth[_0x7dbc[5]](),controller[_0x7dbc[6]]);router[_0x7dbc[7]](_0x7dbc[8],auth[_0x7dbc[5]](),controller[_0x7dbc[9]]);router[_0x7dbc[7]](_0x7dbc[10],auth[_0x7dbc[5]](),controller[_0x7dbc[11]]);router[_0x7dbc[13]](_0x7dbc[4],auth[_0x7dbc[5]](),controller[_0x7dbc[12]]);router[_0x7dbc[15]](_0x7dbc[8],auth[_0x7dbc[5]](),controller[_0x7dbc[14]]);router[_0x7dbc[15]](_0x7dbc[10],auth[_0x7dbc[5]](),controller[_0x7dbc[16]]);router[_0x7dbc[17]](_0x7dbc[8],auth[_0x7dbc[5]](),controller[_0x7dbc[14]]);router[_0x7dbc[19]](_0x7dbc[4],auth[_0x7dbc[5]](),controller[_0x7dbc[18]]);router[_0x7dbc[19]](_0x7dbc[8],auth[_0x7dbc[5]](),controller[_0x7dbc[20]]);router[_0x7dbc[19]](_0x7dbc[10],auth[_0x7dbc[5]](),controller[_0x7dbc[21]]);router[_0x7dbc[19]](_0x7dbc[22],auth[_0x7dbc[5]](),controller[_0x7dbc[23]]);module[_0x7dbc[24]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_account.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/applications', auth.isAuthenticated(), controller.showApplications);
+router.post('/', auth.isAuthenticated(), controller.create);
+// router.post('/:id/applications', auth.isAuthenticated(), controller.createApplications);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.put('/:id/applications', auth.isAuthenticated(), controller.updateApplications);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:id/applications', auth.isAuthenticated(), controller.bulkDestroyApplications);
+router.delete('/:id/applications/:appId', auth.isAuthenticated(), controller.destroyApplication);
+
+
+module.exports = router;
index a8de06f..87e8593 100644 (file)
@@ -1 +1,242 @@
-var _0x2192=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73"];_0x2192[0];var _=require(_0x2192[1]);var util=require(_0x2192[2]);var async=require(_0x2192[3]);var Util=require(_0x2192[4]);var sequelize=require(_0x2192[6])[_0x2192[5]];var User=require(_0x2192[6])[_0x2192[7]];var MailQueue=require(_0x2192[6])[_0x2192[8]];var MailAccount=require(_0x2192[6])[_0x2192[9]];var MailServerIn=require(_0x2192[6])[_0x2192[10]];var MailServerOut=require(_0x2192[6])[_0x2192[11]];var MailApplication=require(_0x2192[6])[_0x2192[12]];exports[_0x2192[13]]=function(_0x77adxc,_0x77adxd){return MailAccount[_0x2192[22]](_0x2192[21])[_0x2192[20]](Util[_0x2192[19]](_0x77adxc[_0x2192[18]]))[_0x2192[17]](function(_0x77adxf){_0x77adxd[_0x2192[16]](200)[_0x2192[15]](_0x77adxf)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[23]]=function(_0x77adxc,_0x77adxd,_0x77adx10){return MailAccount[_0x2192[22]](_0x2192[21])[_0x2192[27]](_0x77adxc[_0x2192[26]][_0x2192[25]])[_0x2192[17]](function(_0x77adx11){if(!_0x77adx11){return _0x77adxd[_0x2192[24]](404)};return _0x77adxd[_0x2192[15]](_0x77adx11)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[28]]=function(_0x77adxc,_0x77adxd,_0x77adx10){return MailAccount[_0x2192[22]](_0x2192[21])[_0x2192[27]](_0x77adxc[_0x2192[26]][_0x2192[25]])[_0x2192[17]](function(_0x77adx11){if(!_0x77adx11){return _0x77adxd[_0x2192[24]](404)};return _0x77adx11[_0x2192[33]](_[_0x2192[32]](Util[_0x2192[19]](_0x77adxc[_0x2192[18]]),{include:[{model:MailQueue,attributes:[_0x2192[25],_0x2192[30]]},{model:User,attributes:[_0x2192[25],_0x2192[30],_0x2192[31]]}]}))})[_0x2192[17]](function(_0x77adx12){return _0x77adxd[_0x2192[15]]({count:_0x77adx12[_0x2192[29]],rows:_0x77adx12})})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[34]]=function(_0x77adxc,_0x77adxd,_0x77adx10){return sequelize[_0x2192[38]](function(_0x77adx13){return MailAccount[_0x2192[34]](_0x77adxc[_0x2192[37]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0x77adx13})})[_0x2192[17]](function(_0x77adx11){return _0x77adxd[_0x2192[16]](201)[_0x2192[15]](_0x77adx11)})[_0x2192[14]](sequelize.UniqueConstraintError,function(_0x77adxe){return Util[_0x2192[36]][_0x2192[35]](_0x77adxd,_0x77adxe)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[39]]=function(_0x77adxc,_0x77adxd){if(_0x77adxc[_0x2192[37]][_0x2192[25]]){delete _0x77adxc[_0x2192[37]][_0x2192[25]]};return MailAccount[_0x2192[27]](_0x77adxc[_0x2192[26]][_0x2192[25]])[_0x2192[17]](function(_0x77adx11){if(!_0x77adx11){return _0x77adxd[_0x2192[24]](404)};var _0x77adx14=_[_0x2192[32]](_0x77adx11,_0x77adxc[_0x2192[37]]);return _0x77adx14[_0x2192[40]]()})[_0x2192[17]](function(_0x77adx11){return _0x77adxd[_0x2192[16]](200)[_0x2192[15]](_0x77adx11)})[_0x2192[14]](sequelize.UniqueConstraintError,function(_0x77adxe){return Util[_0x2192[36]][_0x2192[35]](_0x77adxd,_0x77adxe)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[41]]=function(_0x77adxc,_0x77adxd){var _0x77adx15=0;var _0x77adx16=_0x77adxc[_0x2192[37]];_0x77adx16[_0x2192[45]](function(_0x77adx17){delete _0x77adx17[_0x2192[25]];delete _0x77adx17[_0x2192[42]];delete _0x77adx17[_0x2192[43]];_0x77adx17[_0x2192[44]]= ++_0x77adx15});return sequelize[_0x2192[38]](function(_0x77adx13){return MailApplication[_0x2192[47]]({where:{MailAccountId:_0x77adxc[_0x2192[26]][_0x2192[25]]},individualHooks:true,transaction:_0x77adx13})[_0x2192[17]](function(_0x77adx19){return MailApplication[_0x2192[46]](_0x77adx16,{individualHooks:true,transaction:_0x77adx13})})})[_0x2192[17]](function(_0x77adx18){return _0x77adxd[_0x2192[16]](200)[_0x2192[15]]({count:_0x77adx18[_0x2192[29]],rows:_0x77adx18})})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[47]]=function(_0x77adxc,_0x77adxd,_0x77adx10){return MailAccount[_0x2192[27]](_0x77adxc[_0x2192[26]][_0x2192[25]])[_0x2192[17]](function(_0x77adx11){if(!_0x77adx11){return _0x77adxd[_0x2192[24]](404)};return _0x77adx11[_0x2192[47]]()})[_0x2192[17]](function(){return _0x77adxd[_0x2192[24]](204)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[48]]=function(_0x77adxc,_0x77adxd,_0x77adx10){return MailApplication[_0x2192[27]](_0x77adxc[_0x2192[26]][_0x2192[49]])[_0x2192[17]](function(_0x77adx19){if(!_0x77adx19){return _0x77adxd[_0x2192[24]](404)};return _0x77adx19[_0x2192[47]]()})[_0x2192[17]](function(){return _0x77adxd[_0x2192[24]](204)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[50]]=function(_0x77adxc,_0x77adxd){return MailAccount[_0x2192[47]]({where:{id:_0x77adxc[_0x2192[18]][_0x2192[51]]},individualHooks:true})[_0x2192[17]](function(){return _0x77adxd[_0x2192[24]](204)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};exports[_0x2192[52]]=function(_0x77adxc,_0x77adxd){return MailApplication[_0x2192[47]]({where:{id:_0x77adxc[_0x2192[18]][_0x2192[51]]},individualHooks:true})[_0x2192[17]](function(){return _0x77adxd[_0x2192[24]](204)})[_0x2192[14]](function(_0x77adxe){return handleError(_0x77adxd,_0x77adxe)})};function handleError(_0x77adxd,_0x77adxe){return _0x77adxd[_0x2192[16]](500)[_0x2192[15]](_0x77adxe)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var async = require('async');
+
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var User = require('../../models').User;
+var MailQueue = require('../../models').MailQueue;
+var MailAccount = require('../../models').MailAccount;
+var MailServerIn = require('../../models').MailServerIn;
+var MailServerOut = require('../../models').MailServerOut;
+var MailApplication = require('../../models').MailApplication;
+
+// Get list of mailAccounts
+exports.index = function(req, res) {
+  return MailAccount
+    .scope('default')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailAccount
+exports.show = function(req, res, next) {
+  return MailAccount
+    .scope('default')
+    .findById(req.params.id)
+    .then(function(mailAccount) {
+      if (!mailAccount) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailAccount);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailAccount
+exports.showApplications = function(req, res, next) {
+  return MailAccount
+    .scope('default')
+    .findById(req.params.id)
+    .then(function(mailAccount) {
+      if (!mailAccount) {
+        return res.sendStatus(404);
+      }
+      return mailAccount
+        .getMailApplications(_.merge(Util.getQuery(req.query), {
+          include: [{
+            model: MailQueue,
+            attributes: ['id', 'name']
+          }, {
+            model: User,
+            attributes: ['id', 'name', 'online']
+          }]
+        }));
+    })
+    .then(function(mailApplications) {
+      return res.send({
+        count: mailApplications.length,
+        rows: mailApplications
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new mailAccount in the DB.
+exports.create = function(req, res, next) {
+  return sequelize.transaction(function(t) {
+      return MailAccount
+        .create(req.body, {
+          include: [{
+            model: MailServerIn
+          }, {
+            model: MailServerOut
+          }],
+          transaction: t
+        });
+    }).then(function(mailAccount) {
+      return res.status(201).send(mailAccount);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing mailAccount in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return MailAccount
+    .findById(req.params.id)
+    .then(function(mailAccount) {
+      if (!mailAccount) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailAccount, req.body);
+      return updated
+        .save();
+    })
+    .then(function(mailAccount) {
+      return res.status(200).send(mailAccount);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing mailAccount in the DB.
+exports.updateApplications = function(req, res) {
+
+  var priority = 0;
+  var apps = req.body;
+
+  apps.forEach(function(app) {
+    delete app.id;
+    delete app.createdAt;
+    delete app.updatedAt;
+
+    app.priority = ++priority;
+  });
+
+  return sequelize.transaction(function(t) {
+    return MailApplication
+      .destroy({
+        where: {
+          MailAccountId: req.params.id
+        },
+        individualHooks: true,
+        transaction: t
+      }).then(function(mailApplication) {
+        return MailApplication
+          .bulkCreate(apps, {
+            individualHooks: true,
+            transaction: t
+          });
+      });
+  }).then(function(mailAccounts) {
+    return res.status(200).send({
+      count: mailAccounts.length,
+      rows: mailAccounts
+    });
+  }).catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+// Deletes a mailAccount from the DB.
+exports.destroy = function(req, res, next) {
+  return MailAccount
+    .findById(req.params.id)
+    .then(function(mailAccount) {
+      if (!mailAccount) {
+        return res.sendStatus(404);
+      }
+
+      return mailAccount
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailAccount from the DB.
+exports.destroyApplication = function(req, res, next) {
+  return MailApplication
+    .findById(req.params.appId)
+    .then(function(mailApplication) {
+      if (!mailApplication) {
+        return res.sendStatus(404);
+      }
+
+      return mailApplication
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return MailAccount
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroyApplications = function(req, res) {
+  return MailApplication
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index d6b274d..5b51c79 100644 (file)
@@ -1 +1,27 @@
-var _0x482b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x482b[0];var MailAccount=require(_0x482b[2])[_0x482b[1]];exports[_0x482b[3]]=function(_0xb7dbx2){MailAccount[_0x482b[4]](function(_0xb7dbx3){onSave(_0xb7dbx2,_0xb7dbx3)});MailAccount[_0x482b[5]](function(_0xb7dbx3){onSave(_0xb7dbx2,_0xb7dbx3)});MailAccount[_0x482b[6]](function(_0xb7dbx3){onRemove(_0xb7dbx2,_0xb7dbx3)})};function onSave(_0xb7dbx2,_0xb7dbx3,_0xb7dbx5){_0xb7dbx2[_0x482b[8]](_0x482b[7],_0xb7dbx3)}function onRemove(_0xb7dbx2,_0xb7dbx3,_0xb7dbx5){_0xb7dbx2[_0x482b[8]](_0x482b[9],_0xb7dbx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var MailAccount = require('../../models').MailAccount;
+
+exports.register = function(socket) {
+  MailAccount.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  MailAccount.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  MailAccount.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_account:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_account:remove', doc);
+}
index c4751a0..3c132bb 100644 (file)
@@ -1 +1,15 @@
-var _0xf00c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf00c[0];var express=require(_0xf00c[1]);var controller=require(_0xf00c[2]);var router=express.Router();router[_0xf00c[5]](_0xf00c[3],controller[_0xf00c[4]]);router[_0xf00c[5]](_0xf00c[6],controller[_0xf00c[7]]);router[_0xf00c[9]](_0xf00c[3],controller[_0xf00c[8]]);router[_0xf00c[11]](_0xf00c[6],controller[_0xf00c[10]]);router[_0xf00c[12]](_0xf00c[6],controller[_0xf00c[10]]);router[_0xf00c[14]](_0xf00c[6],controller[_0xf00c[13]]);module[_0xf00c[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_application.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index 29005c7..260557e 100644 (file)
@@ -1 +1,111 @@
-var _0xada2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xada2[0];var _=require(_0xada2[1]);var MailApplication=require(_0xada2[3])[_0xada2[2]];exports[_0xada2[4]]=function(_0x8812x3,_0x8812x4,_0x8812x5){MailApplication[_0xada2[11]]({where:_0x8812x3[_0xada2[9]],order:_0xada2[10],include:[{all:true}]})[_0xada2[8]](function(_0x8812x7){return _0x8812x4[_0xada2[7]](200)[_0xada2[6]](_0x8812x7)})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})};exports[_0xada2[12]]=function(_0x8812x3,_0x8812x4,_0x8812x5){MailApplication[_0xada2[16]](_0x8812x3[_0xada2[15]][_0xada2[14]],{include:[{all:true}]})[_0xada2[8]](function(_0x8812x8){if(!_0x8812x8){return _0x8812x4[_0xada2[13]](404)};return _0x8812x4[_0xada2[6]](_0x8812x8)})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})};exports[_0xada2[17]]=function(_0x8812x3,_0x8812x4,_0x8812x5){MailApplication[_0xada2[20]](_0xada2[10],{where:{MailAccountId:_0x8812x3[_0xada2[18]][_0xada2[19]]}})[_0xada2[8]](function(_0x8812x9){_0x8812x3[_0xada2[18]][_0xada2[10]]=_0x8812x9?++_0x8812x9:1;MailApplication[_0xada2[17]](_0x8812x3[_0xada2[18]])[_0xada2[8]](function(_0x8812x8){return _0x8812x4[_0xada2[7]](201)[_0xada2[6]](_0x8812x8)})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})};exports[_0xada2[21]]=function(_0x8812x3,_0x8812x4,_0x8812x5){if(_0x8812x3[_0xada2[18]][_0xada2[14]]){delete _0x8812x3[_0xada2[18]][_0xada2[14]]};MailApplication[_0xada2[16]](_0x8812x3[_0xada2[15]][_0xada2[14]])[_0xada2[8]](function(_0x8812x8){if(!_0x8812x8){return _0x8812x4[_0xada2[13]](404)};var _0x8812xa=_[_0xada2[22]](_0x8812x8,_0x8812x3[_0xada2[18]]);_0x8812xa[_0xada2[23]]()[_0xada2[8]](function(){return _0x8812x4[_0xada2[7]](200)[_0xada2[6]](_0x8812x8)})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})};exports[_0xada2[24]]=function(_0x8812x3,_0x8812x4,_0x8812x5){MailApplication[_0xada2[16]](_0x8812x3[_0xada2[15]][_0xada2[14]])[_0xada2[8]](function(_0x8812x8){if(!_0x8812x8){return _0x8812x4[_0xada2[13]](404)};_0x8812x8[_0xada2[24]]()[_0xada2[8]](function(){return _0x8812x4[_0xada2[13]](204)})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})})[_0xada2[5]](function(_0x8812x6){return handleError(_0x8812x4,_0x8812x6)})};function handleError(_0x8812x4,_0x8812x6){return _0x8812x4[_0xada2[7]](500)[_0xada2[6]](_0x8812x6)}
\ No newline at end of file
+'use strict';
+var _ = require('lodash');
+var MailApplication = require('../../models').MailApplication;
+// Get list of mailApplications
+exports.index = function(req, res, next) {
+  MailApplication
+    .findAll({
+      where: req.query,
+      order: 'priority',
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(mailApplications) {
+      return res.status(200).send(mailApplications);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Get a single mailApplication
+exports.show = function(req, res, next) {
+  MailApplication
+    .findById(req.params.id, {
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(mailApplication) {
+      if (!mailApplication) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailApplication);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Creates a new mailApplication in the DB.
+exports.create = function(req, res, next) {
+  MailApplication
+    .max('priority', {
+      where: {
+        MailAccountId: req.body.MailAccountId
+      }
+    }).then(function(max) {
+      // SET PRIORITY
+      req.body.priority = max ? ++max : 1;
+      MailApplication
+        .create(req.body)
+        .then(function(mailApplication) {
+          return res.status(201).send(mailApplication);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Updates an existing mailApplication in the DB.
+exports.update = function(req, res, next) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  MailApplication
+    .findById(req.params.id)
+    .then(function(mailApplication) {
+      if (!mailApplication) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailApplication, req.body);
+      updated
+        .save()
+        .then(function() {
+          return res.status(200).send(mailApplication);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Deletes a mailApplication from the DB.
+exports.destroy = function(req, res, next) {
+  MailApplication
+    .findById(req.params.id)
+    .then(function(mailApplication) {
+      if (!mailApplication) {
+        return res.sendStatus(404);
+      }
+      mailApplication
+        .destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 8ed14af..ead0c90 100644 (file)
@@ -1 +1,24 @@
-var _0xff0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xff0f[0];var mailApplication=require(_0xff0f[2])[_0xff0f[1]];exports[_0xff0f[3]]=function(_0x8b0dx2){mailApplication[_0xff0f[4]](function(_0x8b0dx3){onSave(_0x8b0dx2,_0x8b0dx3)});mailApplication[_0xff0f[5]](function(_0x8b0dx3){onRemove(_0x8b0dx2,_0x8b0dx3)})};function onSave(_0x8b0dx2,_0x8b0dx3,_0x8b0dx5){_0x8b0dx2[_0xff0f[7]](_0xff0f[6],_0x8b0dx3)}function onRemove(_0x8b0dx2,_0x8b0dx3,_0x8b0dx5){_0x8b0dx2[_0xff0f[7]](_0xff0f[8],_0x8b0dx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var mailApplication = require('../../models').MailApplication;
+
+exports.register = function(socket) {
+  mailApplication.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  mailApplication.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_application:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_application:remove', doc);
+}
index 271899f..023b99b 100644 (file)
@@ -1 +1,20 @@
-var _0x6aa8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74"];_0x6aa8[0];var should=require(_0x6aa8[1]);var app=require(_0x6aa8[2]);var request=require(_0x6aa8[3]);describe(_0x6aa8[4],function(){it(_0x6aa8[5],function(_0xea58x4){request(app)[_0x6aa8[13]](_0x6aa8[12])[_0x6aa8[11]](200)[_0x6aa8[11]](_0x6aa8[10],/json/)[_0x6aa8[9]](function(_0xea58x5,_0xea58x6){if(_0xea58x5){return _0xea58x4(_0xea58x5)};_0xea58x6[_0x6aa8[8]][_0x6aa8[1]][_0x6aa8[7]][_0x6aa8[6]](Array);_0xea58x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/mail/applications', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/mail/applications')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 90ef344..f154de4 100644 (file)
@@ -1 +1,15 @@
-var _0x33bf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x33bf[0];var express=require(_0x33bf[1]);var controller=require(_0x33bf[2]);var router=express.Router();router[_0x33bf[5]](_0x33bf[3],controller[_0x33bf[4]]);router[_0x33bf[5]](_0x33bf[6],controller[_0x33bf[7]]);router[_0x33bf[9]](_0x33bf[3],controller[_0x33bf[8]]);router[_0x33bf[11]](_0x33bf[6],controller[_0x33bf[10]]);router[_0x33bf[12]](_0x33bf[6],controller[_0x33bf[10]]);router[_0x33bf[14]](_0x33bf[6],controller[_0x33bf[13]]);module[_0x33bf[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_attachment.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index cb6a213..72d2b7b 100644 (file)
@@ -1 +1,100 @@
-var _0xc882=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x66\x73","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x6E\x61\x6D\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x68\x61\x73\x68","\x73\x69\x7A\x65","\x66\x69\x6C\x65","\x74\x79\x70\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x75\x6E\x6C\x69\x6E\x6B","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79"];_0xc882[0];var _=require(_0xc882[1]);var path=require(_0xc882[2]);var fs=require(_0xc882[3]);var formidable=require(_0xc882[4]);var Promise=require(_0xc882[5]);var config=require(_0xc882[6]);var MailAttachment=require(_0xc882[8])[_0xc882[7]];exports[_0xc882[9]]=function(_0x54dfx8,_0x54dfx9,_0x54dfxa){return MailAttachment[_0xc882[14]]()[_0xc882[13]](function(_0x54dfxc){return _0x54dfx9[_0xc882[12]](200)[_0xc882[11]](_0x54dfxc)})[_0xc882[10]](function(_0x54dfxb){return _0x54dfxa(_0x54dfxb)})};exports[_0xc882[15]]=function(_0x54dfx8,_0x54dfx9,_0x54dfxa){return MailAttachment[_0xc882[20]](_0x54dfx8[_0xc882[19]][_0xc882[18]])[_0xc882[13]](function(_0x54dfxd){return _0x54dfx9[_0xc882[17]](_0x54dfxd[_0xc882[2]],_0x54dfxd[_0xc882[16]])})[_0xc882[10]](function(_0x54dfxb){return _0x54dfxa(_0x54dfxb)})};exports[_0xc882[21]]=function(_0x54dfx8,_0x54dfx9,_0x54dfxa){var _0x54dfxe= new formidable.IncomingForm();_0x54dfxe[_0xc882[22]]=path[_0xc882[27]](config[_0xc882[23]],_0xc882[24],_0xc882[25],_0xc882[26]);_0x54dfxe[_0xc882[28]]=true;_0x54dfxe[_0xc882[29]]=true;_0x54dfxe[_0xc882[30]]=true;_0x54dfxe[_0xc882[35]](_0x54dfx8,function(_0x54dfxb,_0x54dfxe,_0x54dfxf){if(_0x54dfxb){return _0x54dfx9[_0xc882[12]](500)[_0xc882[11]](_0x54dfxb)};return _0x54dfx9[_0xc882[12]](201)[_0xc882[11]]({size:_0x54dfxf[_0xc882[32]][_0xc882[31]],path:_0x54dfxf[_0xc882[32]][_0xc882[2]],name:_0x54dfxf[_0xc882[32]][_0xc882[16]],type:_0x54dfxf[_0xc882[32]][_0xc882[33]],basename:path[_0xc882[34]](_0x54dfxf[_0xc882[32]][_0xc882[2]])})})};exports[_0xc882[36]]=function(_0x54dfx8,_0x54dfx9,_0x54dfxa){if(_0x54dfx8[_0xc882[37]][_0xc882[18]]){delete _0x54dfx8[_0xc882[37]][_0xc882[18]]};MailAttachment[_0xc882[20]](_0x54dfx8[_0xc882[19]][_0xc882[18]])[_0xc882[13]](function(_0x54dfxd){if(!_0x54dfxd){return _0x54dfx9[_0xc882[38]](404)};var _0x54dfx10=_[_0xc882[39]](_0x54dfxd,_0x54dfx8[_0xc882[37]]);_0x54dfx10[_0xc882[40]]()[_0xc882[13]](function(){return _0x54dfx9[_0xc882[12]](200)[_0xc882[11]](_0x54dfxd)})[_0xc882[10]](function(_0x54dfxb){return _0x54dfxa(_0x54dfxb)})})[_0xc882[10]](function(_0x54dfxb){return _0x54dfxa(_0x54dfxb)})};exports[_0xc882[41]]=function(_0x54dfx8,_0x54dfx9,_0x54dfxa){var _0x54dfx11=Promise[_0xc882[43]](require(_0xc882[3])[_0xc882[42]]);var _0x54dfx12=path[_0xc882[27]](config[_0xc882[23]],_0xc882[24],_0xc882[25],_0xc882[26],_0x54dfx8[_0xc882[19]][_0xc882[18]]);return _0x54dfx11(_0x54dfx12)[_0xc882[13]](function(){return _0x54dfx9[_0xc882[38]](204)})[_0xc882[10]](function(_0x54dfxb){return handleError(_0x54dfx9,_0x54dfxb)})};function handleError(_0x54dfx9,_0x54dfxb){return _0x54dfx9[_0xc882[12]](500)[_0xc882[11]](_0x54dfxb)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var path = require('path');
+var fs = require('fs');
+var formidable = require('formidable');
+var Promise = require('bluebird');
+
+var config = require('../../config/environment');
+var MailAttachment = require('../../models').MailAttachment;
+
+// Get list of mailAttachments
+exports.index = function(req, res, next) {
+  return MailAttachment
+    .findAll()
+    .then(function(mailAttachments) {
+      return res.status(200).send(mailAttachments);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Get a single mailAttachment
+exports.show = function(req, res, next) {
+  return MailAttachment
+    .findById(req.params.id)
+    .then(function(mailAttachment) {
+      return res.download(mailAttachment.path, mailAttachment.name);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Creates a new mailAttachment in the DB.
+exports.create = function(req, res, next) {
+
+  var form = new formidable.IncomingForm();
+  form.uploadDir = path.join(config.root, 'server', 'files', 'attachments');
+  form.keepExtensions = true;
+  form.multiples = true;
+  form.hash = true;
+
+  form.parse(req, function(err, form, wrap) {
+    if (err) {
+      return res.status(500).send(err);
+    }
+    return res.status(201).send({
+      size: wrap.file.size,
+      path: wrap.file.path,
+      name: wrap.file.name,
+      type: wrap.file.type,
+      basename: path.basename(wrap.file.path)
+    });
+  });
+};
+
+// Updates an existing mailAttachment in the DB.
+exports.update = function(req, res, next) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  MailAttachment
+    .findById(req.params.id)
+    .then(function(mailAttachment) {
+      if (!mailAttachment) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailAttachment, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(mailAttachment);
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Deletes a mailAttachment from the DB.
+exports.destroy = function(req, res, next) {
+  var unlink = Promise.promisify(require("fs").unlink);
+  var _path = path.join(config.root, 'server', 'files', 'attachments', req.params.id);
+
+  return unlink(_path)
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index bc93042..65c9085 100644 (file)
@@ -1 +1,24 @@
-var _0x12bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x12bc[0];var mail_attachment=require(_0x12bc[2])[_0x12bc[1]];exports[_0x12bc[3]]=function(_0xb2fcx2){mail_attachment[_0x12bc[4]](function(_0xb2fcx3){onSave(_0xb2fcx2,_0xb2fcx3)});mail_attachment[_0x12bc[5]](function(_0xb2fcx3){onRemove(_0xb2fcx2,_0xb2fcx3)})};function onSave(_0xb2fcx2,_0xb2fcx3,_0xb2fcx5){_0xb2fcx2[_0x12bc[7]](_0x12bc[6],_0xb2fcx3)}function onRemove(_0xb2fcx2,_0xb2fcx3,_0xb2fcx5){_0xb2fcx2[_0x12bc[7]](_0x12bc[8],_0xb2fcx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var mail_attachment = require('../../models').MailAttachment;
+
+exports.register = function(socket) {
+  mail_attachment.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  mail_attachment.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_attachment:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_attachment:remove', doc);
+}
index b7b6379..58b5988 100644 (file)
@@ -1 +1,19 @@
-var _0x2be5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2be5[0];var express=require(_0x2be5[1]);var controller=require(_0x2be5[2]);var auth=require(_0x2be5[3]);var router=express.Router();router[_0x2be5[7]](_0x2be5[4],auth[_0x2be5[5]](),controller[_0x2be5[6]]);router[_0x2be5[7]](_0x2be5[8],auth[_0x2be5[5]](),controller[_0x2be5[9]]);router[_0x2be5[11]](_0x2be5[4],auth[_0x2be5[5]](),controller[_0x2be5[10]]);router[_0x2be5[13]](_0x2be5[4],auth[_0x2be5[5]](),controller[_0x2be5[12]]);router[_0x2be5[13]](_0x2be5[14],auth[_0x2be5[5]](),controller[_0x2be5[15]]);router[_0x2be5[13]](_0x2be5[16],auth[_0x2be5[5]](),controller[_0x2be5[12]]);router[_0x2be5[13]](_0x2be5[8],auth[_0x2be5[5]](),controller[_0x2be5[12]]);router[_0x2be5[17]](_0x2be5[8],auth[_0x2be5[5]](),controller[_0x2be5[12]]);router[_0x2be5[19]](_0x2be5[8],auth[_0x2be5[5]](),controller[_0x2be5[18]]);module[_0x2be5[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_message.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/', auth.isAuthenticated(), controller.update);
+router.put('/delete/bulk', auth.isAuthenticated(), controller.bulkDelete);
+router.put('/delete/:id', auth.isAuthenticated(), controller.update);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 8365255..0105703 100644 (file)
@@ -1 +1,179 @@
-var _0xcda3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x73\x79\x6E\x63","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x65\x72\x72\x6F\x72","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x63\x6F\x6D\x6D\x69\x74","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0xcda3[0];var _=require(_0xcda3[1]);var async=require(_0xcda3[2]);var htmlToText=require(_0xcda3[3]);var formidable=require(_0xcda3[4]);var path=require(_0xcda3[5]);var config=require(_0xcda3[6]);var sequelize=require(_0xcda3[8])[_0xcda3[7]];var MailMessage=require(_0xcda3[8])[_0xcda3[9]];var MailAttachment=require(_0xcda3[8])[_0xcda3[10]];var MailRoom=require(_0xcda3[8])[_0xcda3[11]];var MailAccount=require(_0xcda3[8])[_0xcda3[12]];var ContactEmail=require(_0xcda3[8])[_0xcda3[13]];var Contact=require(_0xcda3[8])[_0xcda3[14]];var User=require(_0xcda3[8])[_0xcda3[15]];exports[_0xcda3[16]]=function(_0xe410xf,_0xe410x10,_0xe410x11){var _0xe410x12={order:_0xcda3[17],include:[{all:true,include:[{all:true}]}]};switch(_0xe410xf[_0xcda3[23]][_0xcda3[22]]){case _0xcda3[20]:_0xe410x12[_0xcda3[18]]=_0xe410xf[_0xcda3[19]];break;case _0xcda3[21]:break;default:};return MailMessage[_0xcda3[28]](_0xe410x12)[_0xcda3[27]](function(_0xe410x14){return _0xe410x10[_0xcda3[26]](200)[_0xcda3[25]](_0xe410x14)})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})};exports[_0xcda3[29]]=function(_0xe410xf,_0xe410x10,_0xe410x11){return MailMessage[_0xcda3[36]](_0xe410xf[_0xcda3[32]][_0xcda3[31]],{include:[{model:MailAttachment},{model:User,attributes:[_0xcda3[31],_0xcda3[33],_0xcda3[34],_0xcda3[35]]}]})[_0xcda3[27]](function(_0xe410x15){if(!_0xe410x15){return _0xe410x10[_0xcda3[30]](404)};return _0xe410x10[_0xcda3[25]](_0xe410x15)})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})};exports[_0xcda3[37]]=function(_0xe410xf,_0xe410x10,_0xe410x11){_0xe410xf[_0xcda3[39]][_0xcda3[38]]=_0xe410xf[_0xcda3[23]][_0xcda3[31]];_0xe410xf[_0xcda3[39]][_0xcda3[40]]=_0xe410xf[_0xcda3[39]][_0xcda3[40]]||htmlToText[_0xcda3[42]](_0xe410xf[_0xcda3[39]][_0xcda3[41]],{wordwrap:false});return sequelize[_0xcda3[46]]()[_0xcda3[27]](function(_0xe410x16){return MailMessage[_0xcda3[37]](_0xe410xf[_0xcda3[39]],{include:[{model:MailAttachment}],transaction:_0xe410x16})[_0xcda3[27]](function(_0xe410x15){_0xe410x16[_0xcda3[45]]();return _0xe410x10[_0xcda3[26]](201)[_0xcda3[25]](_0xe410x15)})[_0xcda3[24]](function(_0xe410x13){console[_0xcda3[43]](_0xe410x13);_0xe410x16[_0xcda3[44]]();return handleError(_0xe410x10,_0xe410x13)})})};exports[_0xcda3[47]]=function(_0xe410xf,_0xe410x10,_0xe410x11){MailMessage[_0xcda3[36]](_0xe410xf[_0xcda3[32]][_0xcda3[31]],{include:[{all:true}]})[_0xcda3[27]](function(_0xe410x15){if(!_0xe410x15){return _0xe410x10[_0xcda3[30]](404)};var _0xe410x17=_[_0xcda3[48]](_0xe410x15,_0xe410xf[_0xcda3[39]]);_0xe410x17[_0xcda3[49]]()[_0xcda3[27]](function(){return _0xe410x10[_0xcda3[26]](200)[_0xcda3[25]](_0xe410x17)})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})};exports[_0xcda3[50]]=function(_0xe410xf,_0xe410x10,_0xe410x11){MailMessage[_0xcda3[36]](_0xe410xf[_0xcda3[32]][_0xcda3[31]])[_0xcda3[27]](function(_0xe410x15){if(!_0xe410x15){return _0xe410x10[_0xcda3[30]](404)};_0xe410x15[_0xcda3[50]]()[_0xcda3[27]](function(){return _0xe410x10[_0xcda3[30]](204)})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})};exports[_0xcda3[51]]=function(_0xe410xf,_0xe410x10,_0xe410x11){MailMessage[_0xcda3[53]]({where:{id:{$in:_0xe410xf[_0xcda3[39]][_0xcda3[31]]}},attributes:{directory:_0xcda3[52]}})[_0xcda3[27]](function(_0xe410x15){if(!_0xe410x15){return _0xe410x10[_0xcda3[30]](404)};_0xe410x15[_0xcda3[50]]()[_0xcda3[27]](function(){return _0xe410x10[_0xcda3[30]](204)})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})})[_0xcda3[24]](function(_0xe410x13){return handleError(_0xe410x10,_0xe410x13,_0xe410x11)})};function handleError(_0xe410x10,_0xe410x13,_0xe410x11){return _0xe410x10[_0xcda3[26]](500)[_0xcda3[25]](_0xe410x13)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var async = require('async');
+
+var htmlToText = require('html-to-text');
+var formidable = require('formidable');
+var path = require('path');
+
+var config = require('../../config/environment');
+var sequelize = require('../../models').sequelize;
+var MailMessage = require('../../models').MailMessage;
+var MailAttachment = require('../../models').MailAttachment;
+var MailRoom = require('../../models').MailRoom;
+var MailAccount = require('../../models').MailAccount;
+var ContactEmail = require('../../models').ContactEmail;
+var Contact = require('../../models').Contact;
+var User = require('../../models').User;
+
+// Get list of mail_messages
+exports.index = function(req, res, next) {
+  var params = {
+    order: 'createdAt DESC',
+    include: [{
+      all: true,
+      include: [{
+        all: true
+      }]
+    }]
+  };
+
+  switch (req.user.role) {
+    case 'admin':
+      params.where = req.query;
+      break;
+    case 'agent':
+      break;
+    default:
+  }
+
+  return MailMessage
+    .findAll(params)
+    .then(function(mail_messages) {
+      return res.status(200).send(mail_messages);
+    })
+    .catch(function(err) {
+      return handleError(res, err, next);
+    });
+};
+
+// Get a single mailMessage
+exports.show = function(req, res, next) {
+  return MailMessage
+    .findById(req.params.id, {
+      include: [{
+        model: MailAttachment
+      }, {
+        model: User,
+        attributes: ['id', 'name', 'fullname', 'email']
+      }]
+    })
+    .then(function(mailMessage) {
+      if (!mailMessage) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailMessage);
+    })
+    .catch(function(err) {
+      return handleError(res, err, next);
+    });
+};
+
+// Creates a new mailMessage in the DB.
+exports.create = function(req, res, next) {
+  req.body.UserId = req.user.id;
+  req.body.text = req.body.text || htmlToText.fromString(req.body.html, {
+    wordwrap: false
+  });
+
+  return sequelize.transaction().then(function(t) {
+    return MailMessage
+      .create(req.body, {
+        include: [{
+          model: MailAttachment
+        }],
+        transaction: t,
+        // user: req.user
+      }).then(function(mailMessage) {
+        t.commit();
+        return res.status(201).send(mailMessage);
+      }).catch(function(err) {
+        console.error(err);
+        t.rollback();
+        return handleError(res, err);
+      });
+  });
+};
+
+// Updates an existing mailMessage in the DB.
+exports.update = function(req, res, next) {
+
+  MailMessage
+    .findById(req.params.id, {
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(mailMessage) {
+      if (!mailMessage) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailMessage, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(updated);
+        })
+        .catch(function(err) {
+          return handleError(res, err, next);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err, next);
+    });
+};
+
+// Deletes a mailMessage from the DB.
+exports.destroy = function(req, res, next) {
+  MailMessage
+    .findById(req.params.id)
+    .then(function(mailMessage) {
+      if (!mailMessage) {
+        return res.sendStatus(404);
+      }
+      mailMessage.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err, next);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err, next);
+    });
+};
+
+// Deletes a mailMessage from the DB.
+exports.bulkDelete = function(req, res, next) {
+  MailMessage
+    .bulkUpdate({
+      where: {
+        id: {
+          $in: req.body.id
+        }
+      },
+      attributes: {
+        directory: 'TRASH'
+      }
+    })
+    .then(function(mailMessage) {
+      if (!mailMessage) {
+        return res.sendStatus(404);
+      }
+      mailMessage.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err, next);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err, next);
+    });
+};
+
+function handleError(res, err, next) {
+  return res.status(500).send(err);
+}
index 61f3659..6e8aef8 100644 (file)
@@ -1 +1,48 @@
-var _0x5081=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x49\x64","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x5081[0];var MailMessage=require(_0x5081[2])[_0x5081[1]];exports[_0x5081[3]]=function(_0xaae6x2){MailMessage[_0x5081[4]](function(_0xaae6x3){onSave(_0xaae6x2,_0xaae6x3)});MailMessage[_0x5081[5]](function(_0xaae6x3){onSave(_0xaae6x2,_0xaae6x3)});MailMessage[_0x5081[6]](function(_0xaae6x3){onRemove(_0xaae6x2,_0xaae6x3)})};function onSave(_0xaae6x2,_0xaae6x3,_0xaae6x5){if(_0xaae6x2[_0x5081[7]]===_0xaae6x3[_0x5081[8]]||_0xaae6x2[_0x5081[9]]===_0x5081[10]){_0xaae6x2[_0x5081[12]](_0x5081[11],_0xaae6x3)}}function onRemove(_0xaae6x2,_0xaae6x3,_0xaae6x5){_0xaae6x2[_0x5081[12]](_0x5081[13],_0xaae6x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var MailMessage = require('../../models').MailMessage;
+
+exports.register = function(socket) {
+  MailMessage.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+
+  MailMessage.afterUpdate(function(doc) {
+    console.log(socket.userId, doc.UserId, doc.changed('status'));
+    if (doc.changed('status') && socket.userId == doc.UserId) {
+      console.log('ok');
+      switch (doc.status) {
+        case 'SENDING':
+          socket.emit('mail_message:sending', null);
+          break;
+        case 'SENT':
+          socket.emit('mail_message:sent', null);
+          break;
+        case 'FAILED':
+          socket.emit('mail_message:failed', null);
+          break;
+        default:
+      }
+    }
+
+    onSave(socket, doc);
+  });
+
+  MailMessage.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  if (socket.userId === doc.UserId || socket.role === 'admin') {
+    socket.emit('mail_message:save', doc);
+  }
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_message:remove', doc);
+}
index 6f955b3..1252097 100644 (file)
@@ -1 +1,20 @@
-var _0x35af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x35af[0];var express=require(_0x35af[1]);var controller=require(_0x35af[2]);var auth=require(_0x35af[3]);var router=express.Router();router[_0x35af[7]](_0x35af[4],auth[_0x35af[5]](),controller[_0x35af[6]]);router[_0x35af[7]](_0x35af[8],auth[_0x35af[5]](),controller[_0x35af[9]]);router[_0x35af[7]](_0x35af[10],auth[_0x35af[5]](),controller[_0x35af[11]]);router[_0x35af[13]](_0x35af[4],auth[_0x35af[5]](),controller[_0x35af[12]]);router[_0x35af[13]](_0x35af[10],auth[_0x35af[5]](),controller[_0x35af[14]]);router[_0x35af[16]](_0x35af[8],auth[_0x35af[5]](),controller[_0x35af[15]]);router[_0x35af[17]](_0x35af[8],auth[_0x35af[5]](),controller[_0x35af[15]]);router[_0x35af[19]](_0x35af[4],auth[_0x35af[5]](),controller[_0x35af[18]]);router[_0x35af[19]](_0x35af[8],auth[_0x35af[5]](),controller[_0x35af[20]]);router[_0x35af[19]](_0x35af[10],auth[_0x35af[5]](),controller[_0x35af[21]]);module[_0x35af[22]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_queue.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/agents', auth.isAuthenticated(), controller.showAgents);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/agents', auth.isAuthenticated(), controller.addAgents);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:id/agents', auth.isAuthenticated(), controller.removeAgents);
+
+module.exports = router;
index d94cca2..70cd358 100644 (file)
@@ -1 +1,212 @@
-var _0x876e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x6E\x61\x6D\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72"];_0x876e[0];var _=require(_0x876e[1]);var util=require(_0x876e[2]);var Util=require(_0x876e[3]);var sequelize=require(_0x876e[5])[_0x876e[4]];var MailQueue=require(_0x876e[5])[_0x876e[6]];exports[_0x876e[7]]=function(_0xcfb7x6,_0xcfb7x7){return MailQueue[_0x876e[16]](_0x876e[15])[_0x876e[14]](Util[_0x876e[13]](_0xcfb7x6[_0x876e[12]]))[_0x876e[11]](function(_0xcfb7x9){_0xcfb7x7[_0x876e[10]](200)[_0x876e[9]](_0xcfb7x9)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[17]]=function(_0xcfb7x6,_0xcfb7x7){return MailQueue[_0x876e[16]](_0x876e[15])[_0x876e[21]](_0xcfb7x6[_0x876e[20]][_0x876e[19]])[_0x876e[11]](function(_0xcfb7xa){if(!_0xcfb7xa){return _0xcfb7x7[_0x876e[18]](404)};return _0xcfb7x7[_0x876e[9]](_0xcfb7xa)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[22]]=function(_0xcfb7x6,_0xcfb7x7){return MailQueue[_0x876e[22]](_0xcfb7x6[_0x876e[25]])[_0x876e[11]](function(_0xcfb7xa){return _0xcfb7x7[_0x876e[10]](201)[_0x876e[9]](_0xcfb7xa)})[_0x876e[8]](sequelize.UniqueConstraintError,function(_0xcfb7x8){return Util[_0x876e[24]][_0x876e[23]](_0xcfb7x7,_0xcfb7x8)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[26]]=function(_0xcfb7x6,_0xcfb7x7){if(_0xcfb7x6[_0x876e[25]][_0x876e[19]]){delete _0xcfb7x6[_0x876e[25]][_0x876e[19]]};return MailQueue[_0x876e[21]](_0xcfb7x6[_0x876e[20]][_0x876e[19]])[_0x876e[11]](function(_0xcfb7xa){if(!_0xcfb7xa){return _0xcfb7x7[_0x876e[18]](404)};var _0xcfb7xb=_[_0x876e[27]](_0xcfb7xa,_0xcfb7x6[_0x876e[25]]);return _0xcfb7xb[_0x876e[28]]()})[_0x876e[11]](function(_0xcfb7xa){return _0xcfb7x7[_0x876e[10]](200)[_0x876e[9]](_0xcfb7xa)})[_0x876e[8]](sequelize.UniqueConstraintError,function(_0xcfb7x8){return Util[_0x876e[24]][_0x876e[23]](_0xcfb7x7,_0xcfb7x8)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[29]]=function(_0xcfb7x6,_0xcfb7x7,_0xcfb7xc){return MailQueue[_0x876e[21]](_0xcfb7x6[_0x876e[20]][_0x876e[19]])[_0x876e[11]](function(_0xcfb7xa){if(_0xcfb7xa){return _0xcfb7xa[_0x876e[33]](_0xcfb7x6[_0x876e[25]][_0x876e[30]],{penalty:_0xcfb7x6[_0x876e[25]][_0x876e[31]],queue:_0xcfb7xa[_0x876e[32]]},{individualHooks:true})}else {throw  new Error(_0x876e[34])}})[_0x876e[11]](function(){return _0xcfb7x7[_0x876e[18]](200)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[35]]=function(_0xcfb7x6,_0xcfb7x7){return MailQueue[_0x876e[21]](_0xcfb7x6[_0x876e[20]][_0x876e[19]])[_0x876e[11]](function(_0xcfb7xa){if(_0xcfb7xa){return _0xcfb7xa[_0x876e[36]](_0xcfb7x6[_0x876e[25]][_0x876e[30]],{individualHooks:true})}else {throw  new Error(_0x876e[34])}})[_0x876e[11]](function(){return _0xcfb7x7[_0x876e[18]](200)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[37]]=function(_0xcfb7x6,_0xcfb7x7){var _0xcfb7xd;return MailQueue[_0x876e[21]](_0xcfb7x6[_0x876e[20]][_0x876e[19]])[_0x876e[11]](function(_0xcfb7xa){_0xcfb7xd=_0xcfb7xa;if(!_0xcfb7xa){return _0xcfb7x7[_0x876e[18]](404)};return _0xcfb7xa[_0x876e[37]]()})[_0x876e[11]](function(){return _0xcfb7x7[_0x876e[18]](204)})[_0x876e[8]](sequelize.ForeignKeyConstraintError,function(_0xcfb7x8){return Util[_0x876e[24]][_0x876e[41]](_0xcfb7x7,_0x876e[40],_0xcfb7xd[_0x876e[32]],_0xcfb7x8)})[_0x876e[8]](function(_0xcfb7x8){console[_0x876e[39]](_0x876e[38],_0xcfb7x8);return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[42]]=function(_0xcfb7x6,_0xcfb7x7){return MailQueue[_0x876e[37]]({where:{id:_0xcfb7x6[_0x876e[12]][_0x876e[43]]},individualHooks:true})[_0x876e[11]](function(){return _0xcfb7x7[_0x876e[18]](204)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[44]]=function(_0xcfb7x6,_0xcfb7x7){return MailQueue[_0x876e[21]](_0xcfb7x6[_0x876e[20]][_0x876e[19]])[_0x876e[11]](function(_0xcfb7xf){if(!_0xcfb7xf){return _0xcfb7x7[_0x876e[18]](404)};return _0xcfb7xf[_0x876e[48]]({where:{role:_0x876e[45]},attributes:[_0x876e[19],_0x876e[32],_0x876e[46],_0x876e[47]]})})[_0x876e[11]](function(_0xcfb7xe){return _0xcfb7x7[_0x876e[10]](200)[_0x876e[9]](_0xcfb7xe)})[_0x876e[8]](function(_0xcfb7x8){return handleError(_0xcfb7x7,_0xcfb7x8)})};exports[_0x876e[35]]=function(_0xcfb7x6,_0xcfb7x7,_0xcfb7xc){return MailQueue[_0x876e[21]](_0xcfb7x6[_0x876e[20]][_0x876e[19]])[_0x876e[11]](function(_0xcfb7xf){if(!_0xcfb7xf){return _0xcfb7x7[_0x876e[18]](404)};return _0xcfb7xf[_0x876e[49]](_0xcfb7x6[_0x876e[12]][_0x876e[30]])})[_0x876e[11]](function(){return _0xcfb7x7[_0x876e[18]](202)})[_0x876e[8]](function(_0xcfb7x8){return _0xcfb7xc(_0xcfb7x8)})};function handleError(_0xcfb7x7,_0xcfb7x8){return _0xcfb7x7[_0x876e[10]](500)[_0x876e[9]](_0xcfb7x8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var MailQueue = require('../../models').MailQueue;
+
+// Get list of mailQueues
+exports.index = function(req, res) {
+  return MailQueue
+    .scope('default')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailQueue
+exports.show = function(req, res) {
+  return MailQueue
+    .scope('default')
+    .findById(req.params.id)
+    .then(function(mailQueue) {
+      if (!mailQueue) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailQueue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new mailQueue in the DB.
+exports.create = function(req, res) {
+  return MailQueue
+    .create(req.body)
+    .then(function(mailQueue) {
+      return res.status(201).send(mailQueue);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing mailQueue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return MailQueue
+    .findById(req.params.id)
+    .then(function(mailQueue) {
+      if (!mailQueue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailQueue, req.body);
+      return updated
+        .save();
+    })
+    .then(function(mailQueue) {
+      return res.status(200).send(mailQueue);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing user_has_mailQueue in the DB.
+exports.addAgents = function(req, res, next) {
+  return MailQueue
+    .findById(req.params.id)
+    .then(function(mailQueue) {
+      if (mailQueue) {
+        return mailQueue
+          .addUsers(req.body.agents, {
+            penalty: req.body.penalty,
+            queue: mailQueue.name
+          }, {
+            individualHooks: true
+          });
+      } else {
+        throw new Error('MailQueue not found');
+      }
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.removeAgents = function(req, res) {
+  return MailQueue
+    .findById(req.params.id)
+    .then(function(mailQueue) {
+      if (mailQueue) {
+        return mailQueue
+          .removeUsers(req.body.agents, {
+            individualHooks: true
+          });
+      } else {
+        throw new Error('MailQueue not found');
+      }
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailQueue from the DB.
+exports.destroy = function(req, res) {
+  var _mailQueue;
+
+  return MailQueue
+    .findById(req.params.id)
+    .then(function(mailQueue) {
+      _mailQueue = mailQueue;
+      if (!mailQueue) {
+        return res.sendStatus(404);
+      }
+      return mailQueue
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(sequelize.ForeignKeyConstraintError, function(err) {
+      return Util.errorManager.handleForeignKeyConstraintError(res, 'queue', _mailQueue.name, err);
+    })
+    .catch(function(err) {
+      console.error('err', err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return MailQueue
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.showAgents = function(req, res) {
+  return MailQueue
+    .findById(req.params.id)
+    .then(function(queue) {
+      if (!queue) {
+        return res.sendStatus(404);
+      }
+      return queue
+        .getUsers({
+          where: {
+            role: 'agent'
+          },
+          attributes: ['id', 'name', 'fullname', 'email']
+        });
+    })
+    .then(function(agents) {
+      return res.status(200).send(agents);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.removeAgents = function(req, res, next) {
+  return MailQueue
+    .findById(req.params.id)
+    .then(function(queue) {
+      if (!queue) {
+        return res.sendStatus(404);
+      }
+      return queue
+        .removeUser(req.query.agents);
+    })
+    .then(function() {
+      return res.sendStatus(202);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 855c472..3518b62 100644 (file)
@@ -1 +1,24 @@
-var _0x19d7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x19d7[0];var MailQueue=require(_0x19d7[2])[_0x19d7[1]];exports[_0x19d7[3]]=function(_0x8ed7x2){MailQueue[_0x19d7[4]](function(_0x8ed7x3){onSave(_0x8ed7x2,_0x8ed7x3)});MailQueue[_0x19d7[5]](function(_0x8ed7x3){onRemove(_0x8ed7x2,_0x8ed7x3)})};function onSave(_0x8ed7x2,_0x8ed7x3,_0x8ed7x5){_0x8ed7x2[_0x19d7[7]](_0x19d7[6],_0x8ed7x3)}function onRemove(_0x8ed7x2,_0x8ed7x3,_0x8ed7x5){_0x8ed7x2[_0x19d7[7]](_0x19d7[8],_0x8ed7x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var MailQueue = require('../../models').MailQueue;
+
+exports.register = function(socket) {
+  MailQueue.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  MailQueue.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_queue:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_queue:remove', doc);
+}
index 7e29463..91ef299 100644 (file)
@@ -1 +1,22 @@
-var _0xee73=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x61\x67\x65\x6E\x74\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xee73[0];var express=require(_0xee73[1]);var controller=require(_0xee73[2]);var auth=require(_0xee73[3]);var router=express.Router();router[_0xee73[7]](_0xee73[4],auth[_0xee73[5]](),controller[_0xee73[6]]);router[_0xee73[7]](_0xee73[8],auth[_0xee73[5]](),controller[_0xee73[9]]);router[_0xee73[7]](_0xee73[10],auth[_0xee73[5]](),controller[_0xee73[11]]);router[_0xee73[7]](_0xee73[12],controller[_0xee73[13]]);router[_0xee73[15]](_0xee73[4],auth[_0xee73[5]](),controller[_0xee73[14]]);router[_0xee73[15]](_0xee73[16],auth[_0xee73[5]](),controller[_0xee73[17]]);router[_0xee73[19]](_0xee73[10],auth[_0xee73[5]](),controller[_0xee73[18]]);router[_0xee73[19]](_0xee73[12],auth[_0xee73[5]](),controller[_0xee73[20]]);router[_0xee73[21]](_0xee73[10],auth[_0xee73[5]](),controller[_0xee73[18]]);router[_0xee73[23]](_0xee73[4],auth[_0xee73[5]](),controller[_0xee73[22]]);router[_0xee73[23]](_0xee73[10],auth[_0xee73[5]](),controller[_0xee73[24]]);module[_0xee73[25]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_room.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+// TODO endpoint to filter just NEW/OPEN
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/agent/:id', auth.isAuthenticated(), controller.agentIndex);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/agents', controller.showAgents);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/messages', auth.isAuthenticated(), controller.createMessage);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.put('/:id/agents', auth.isAuthenticated(), controller.updateAgents);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 17b7365..0d5f5bb 100644 (file)
@@ -1 +1,231 @@
-var _0xd0b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x61\x67\x65\x6E\x74","\x69\x64","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x63\x6F\x6D\x6D\x69\x74","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6A\x6F\x62\x49\x64","\x4D\x61\x69\x6C\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xd0b7[0];var _=require(_0xd0b7[1]);var util=require(_0xd0b7[2]);var htmlToText=require(_0xd0b7[3]);var Util=require(_0xd0b7[4]);var sequelize=require(_0xd0b7[6])[_0xd0b7[5]];var User=require(_0xd0b7[6])[_0xd0b7[7]];var Agent=require(_0xd0b7[6])[_0xd0b7[7]];var Contact=require(_0xd0b7[6])[_0xd0b7[8]];var MailRoom=require(_0xd0b7[6])[_0xd0b7[9]];var MailMessage=require(_0xd0b7[6])[_0xd0b7[10]];var MailAccount=require(_0xd0b7[6])[_0xd0b7[11]];var MailAttachment=require(_0xd0b7[6])[_0xd0b7[12]];exports[_0xd0b7[13]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){switch(_0x17b7xd[_0xd0b7[24]][_0xd0b7[26]]){case _0xd0b7[22]:return MailRoom[_0xd0b7[25]](_0xd0b7[21],{method:[_0xd0b7[22],_0x17b7xd[_0xd0b7[24]][_0xd0b7[23]]]})[_0xd0b7[20]](Util[_0xd0b7[19]](_0x17b7xd[_0xd0b7[18]]))[_0xd0b7[17]](function(_0x17b7x11){return _0x17b7xe[_0xd0b7[16]](200)[_0xd0b7[15]](_0x17b7x11)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)});default:return MailRoom[_0xd0b7[25]](_0xd0b7[21])[_0xd0b7[20]](Util[_0xd0b7[19]](_0x17b7xd[_0xd0b7[18]]))[_0xd0b7[17]](function(_0x17b7x11){return _0x17b7xe[_0xd0b7[16]](200)[_0xd0b7[15]](_0x17b7x11)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})}};exports[_0xd0b7[27]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){return MailRoom[_0xd0b7[29]]({where:{UserId:_0x17b7xd[_0xd0b7[28]][_0xd0b7[23]]},include:[{all:true}]})[_0xd0b7[17]](function(_0x17b7x12){return _0x17b7xe[_0xd0b7[16]](200)[_0xd0b7[15]](_0x17b7x12)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})};exports[_0xd0b7[30]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){return MailRoom[_0xd0b7[25]](_0xd0b7[21])[_0xd0b7[33]](_0x17b7xd[_0xd0b7[28]][_0xd0b7[23]])[_0xd0b7[17]](function(_0x17b7x13){if(!_0x17b7x13){return _0x17b7xe[_0xd0b7[32]](404)};return _0x17b7xe[_0xd0b7[15]](_0x17b7x13)})[_0xd0b7[14]](function(_0x17b7x10){console[_0xd0b7[31]](_0x17b7x10);return handleError(_0x17b7xe,_0x17b7x10)})};exports[_0xd0b7[34]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){return MailRoom[_0xd0b7[33]](_0x17b7xd[_0xd0b7[28]][_0xd0b7[23]])[_0xd0b7[17]](function(_0x17b7x13){if(!_0x17b7x13){return _0x17b7xe[_0xd0b7[32]](404)};return _0x17b7x13[_0xd0b7[39]]({attributes:[_0xd0b7[23],_0xd0b7[35],_0xd0b7[36],_0xd0b7[37],_0xd0b7[26],_0xd0b7[38]]})})[_0xd0b7[17]](function(_0x17b7x14){return _0x17b7xe[_0xd0b7[15]](_0x17b7x14)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})};exports[_0xd0b7[40]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){return MailRoom[_0xd0b7[40]](_0x17b7xd[_0xd0b7[41]])[_0xd0b7[17]](function(_0x17b7x13){return _0x17b7xe[_0xd0b7[16]](201)[_0xd0b7[15]](_0x17b7x13)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})};exports[_0xd0b7[42]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){_0x17b7xd[_0xd0b7[41]][_0xd0b7[43]]=_0x17b7xd[_0xd0b7[24]][_0xd0b7[23]];_0x17b7xd[_0xd0b7[41]][_0xd0b7[44]]=_0x17b7xd[_0xd0b7[28]][_0xd0b7[23]];_0x17b7xd[_0xd0b7[41]][_0xd0b7[45]]=(_0x17b7xd[_0xd0b7[41]][_0xd0b7[46]]&&_0x17b7xd[_0xd0b7[41]][_0xd0b7[46]][_0xd0b7[47]])?true:false;_0x17b7xd[_0xd0b7[41]][_0xd0b7[48]]=_0x17b7xd[_0xd0b7[41]][_0xd0b7[48]]||htmlToText[_0xd0b7[50]](_0x17b7xd[_0xd0b7[41]][_0xd0b7[49]],{wordwrap:false});return sequelize[_0xd0b7[53]]()[_0xd0b7[17]](function(_0x17b7x15){return MailMessage[_0xd0b7[40]](_0x17b7xd[_0xd0b7[41]],{include:[{model:MailAttachment}],transaction:_0x17b7x15,user:_0x17b7xd[_0xd0b7[24]]})[_0xd0b7[17]](function(_0x17b7x16){_0x17b7x15[_0xd0b7[52]]();return _0x17b7xe[_0xd0b7[16]](201)[_0xd0b7[15]](_0x17b7x16)})[_0xd0b7[14]](function(_0x17b7x10){console[_0xd0b7[31]](_0x17b7x10);_0x17b7x15[_0xd0b7[51]]();return handleError(_0x17b7xe,_0x17b7x10)})})};exports[_0xd0b7[54]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){return MailRoom[_0xd0b7[33]](_0x17b7xd[_0xd0b7[28]][_0xd0b7[23]])[_0xd0b7[17]](function(_0x17b7x13){if(!_0x17b7x13){return _0x17b7xe[_0xd0b7[32]](404)};if(_0x17b7x13[_0xd0b7[55]]){throw  new Error(_0xd0b7[56])};var _0x17b7x17=_[_0xd0b7[57]](_0x17b7x13,_0x17b7xd[_0xd0b7[41]]);return _0x17b7x17[_0xd0b7[58]]()})[_0xd0b7[17]](function(_0x17b7x13){return _0x17b7xe[_0xd0b7[16]](200)[_0xd0b7[15]](_0x17b7x13)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})};exports[_0xd0b7[59]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){return MailRoom[_0xd0b7[33]](_0x17b7xd[_0xd0b7[28]][_0xd0b7[23]])[_0xd0b7[17]](function(_0x17b7x13){if(!_0x17b7x13){return _0x17b7xe[_0xd0b7[32]](404)};return _0x17b7x13[_0xd0b7[61]](_0x17b7xd[_0xd0b7[41]][_0xd0b7[60]],{individualHooks:true})})[_0xd0b7[17]](function(){return _0x17b7xe[_0xd0b7[32]](200)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})};exports[_0xd0b7[62]]=function(_0x17b7xd,_0x17b7xe,_0x17b7xf){return MailRoom[_0xd0b7[33]](_0x17b7xd[_0xd0b7[28]][_0xd0b7[23]])[_0xd0b7[17]](function(_0x17b7x13){if(!_0x17b7x13){return _0x17b7xe[_0xd0b7[32]](404)};return _0x17b7x13[_0xd0b7[62]]()})[_0xd0b7[17]](function(){return _0x17b7xe[_0xd0b7[32]](204)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})};exports[_0xd0b7[63]]=function(_0x17b7xd,_0x17b7xe){return MailRoom[_0xd0b7[62]]({where:{id:_0x17b7xd[_0xd0b7[18]][_0xd0b7[64]]},individualHooks:true})[_0xd0b7[17]](function(){return _0x17b7xe[_0xd0b7[32]](200)})[_0xd0b7[14]](function(_0x17b7x10){return handleError(_0x17b7xe,_0x17b7x10)})};function handleError(_0x17b7xe,_0x17b7x10){return _0x17b7xe[_0xd0b7[16]](500)[_0xd0b7[15]](_0x17b7x10)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var htmlToText = require('html-to-text');
+
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var User = require('../../models').User;
+var Agent = require('../../models').User;
+var Contact = require('../../models').Contact;
+var MailRoom = require('../../models').MailRoom;
+var MailMessage = require('../../models').MailMessage;
+var MailAccount = require('../../models').MailAccount;
+var MailAttachment = require('../../models').MailAttachment;
+
+// Get list of mailRooms
+exports.index = function(req, res, next) {
+  switch (req.user.role) {
+    case 'agent':
+
+      return MailRoom
+        .scope('default', {
+          method: ['agent', req.user.id]
+        })
+        .findAndCountAll(Util.getQuery(req.query))
+        .then(function(result) {
+          return res.status(200).send(result);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+
+    default:
+
+      return MailRoom
+        .scope('default')
+        .findAndCountAll(Util.getQuery(req.query))
+        .then(function(result) {
+          return res.status(200).send(result);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+  }
+};
+
+// Get list of agent mailRooms
+exports.agentIndex = function(req, res, next) {
+  return MailRoom
+    .findAll({
+      where: {
+        UserId: req.params.id
+      },
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(mailRooms) {
+      return res.status(200).send(mailRooms);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailRoom
+exports.show = function(req, res, next) {
+  return MailRoom
+    .scope('default')
+    .findById(req.params.id)
+    .then(function(mailRoom) {
+      if (!mailRoom) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailRoom);
+    })
+    .catch(function(err) {
+      console.error(err);
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailRoom
+exports.showAgents = function(req, res, next) {
+  return MailRoom
+    .findById(req.params.id)
+    .then(function(mailRoom) {
+      if (!mailRoom) {
+        return res.sendStatus(404);
+      }
+
+      return mailRoom
+        .getUsers({
+          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
+        });
+    })
+    .then(function(users) {
+      return res.send(users);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new mailRoom in the DB.
+exports.create = function(req, res, next) {
+  return MailRoom
+    .create(req.body)
+    .then(function(mailRoom) {
+      return res.status(201).send(mailRoom);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new mailMessage in the DB.
+exports.createMessage = function(req, res, next) {
+  req.body.UserId = req.user.id;
+  req.body.MailRoomId = req.params.id;
+  req.body.attachment = (req.body.MailAttachments && req.body.MailAttachments.length) ? true : false;
+  req.body.text = req.body.text || htmlToText.fromString(req.body.html, {
+    wordwrap: false
+  });
+
+  return sequelize.transaction().then(function(t) {
+    return MailMessage
+      .create(req.body, {
+        include: [{
+          model: MailAttachment
+        }],
+        transaction: t,
+        user: req.user
+      }).then(function(mailMessage) {
+        t.commit();
+        return res.status(201).send(mailMessage);
+      }).catch(function(err) {
+        console.error(err);
+        t.rollback();
+        return handleError(res, err);
+      });
+  });
+};
+
+// Updates an existing mailRoom in the DB.
+exports.update = function(req, res, next) {
+  return MailRoom
+    .findById(req.params.id)
+    .then(function(mailRoom) {
+      if (!mailRoom) {
+        return res.sendStatus(404);
+      }
+      // CHECK IF MAIL IS ALREADY ASSIGNED
+      if (mailRoom.jobId) {
+        throw new Error('Mail already assigned');
+      }
+      var updated = _.merge(mailRoom, req.body);
+
+      return updated
+        .save();
+    })
+    .then(function(mailRoom) {
+      return res.status(200).send(mailRoom);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailRoom
+exports.updateAgents = function(req, res, next) {
+  return MailRoom
+    .findById(req.params.id)
+    .then(function(mailRoom) {
+      if (!mailRoom) {
+        return res.sendStatus(404);
+      }
+
+      return mailRoom
+        .setUsers(req.body.agents, {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailRoom from the DB.
+exports.destroy = function(req, res, next) {
+  return MailRoom
+    .findById(req.params.id)
+    .then(function(mailRoom) {
+      if (!mailRoom) {
+        return res.sendStatus(404);
+      }
+      return mailRoom.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return MailRoom
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 9db2a4d..3f12a1c 100644 (file)
@@ -1 +1,43 @@
-var _0x43f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x55\x73\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0x43f5[0];var MailMessage=require(_0x43f5[2])[_0x43f5[1]];var MailRoom=require(_0x43f5[2])[_0x43f5[3]];var User=require(_0x43f5[2])[_0x43f5[4]];exports[_0x43f5[5]]=function(_0x7a07x4){MailRoom[_0x43f5[6]](function(_0x7a07x5){onSave(_0x7a07x4,_0x7a07x5)});MailRoom[_0x43f5[7]](function(_0x7a07x5){onRemove(_0x7a07x4,_0x7a07x5)});MailRoom[_0x43f5[13]](function(_0x7a07x5){MailRoom[_0x43f5[12]](_0x7a07x5[_0x43f5[11]],{include:[{all:true}]})[_0x43f5[10]](function(_0x7a07x7){onSave(_0x7a07x4,_0x7a07x7)})[_0x43f5[9]](function(_0x7a07x6){console[_0x43f5[8]](_0x7a07x6)})})};function onSave(_0x7a07x4,_0x7a07x5,_0x7a07x9){_0x7a07x4[_0x43f5[15]](_0x43f5[14],_0x7a07x5)}function onRemove(_0x7a07x4,_0x7a07x5,_0x7a07x9){_0x7a07x4[_0x43f5[15]](_0x43f5[16],_0x7a07x5)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+
+var MailMessage = require('../../models').MailMessage;
+var MailRoom = require('../../models').MailRoom;
+var User = require('../../models').User;
+
+exports.register = function(socket) {
+  MailRoom.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+
+  MailRoom.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+
+  MailRoom.afterUpdate(function(doc) {
+    MailRoom
+      .findById(doc.id, {
+        include: [{
+          all: true
+        }]
+      })
+      .then(function(mailRoom) {
+        onSave(socket, mailRoom);
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_room:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_room:remove', doc);
+}
index d954754..adb146b 100644 (file)
@@ -1 +1,15 @@
-var _0xbf93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbf93[0];var express=require(_0xbf93[1]);var controller=require(_0xbf93[2]);var router=express.Router();router[_0xbf93[5]](_0xbf93[3],controller[_0xbf93[4]]);router[_0xbf93[5]](_0xbf93[6],controller[_0xbf93[7]]);router[_0xbf93[9]](_0xbf93[3],controller[_0xbf93[8]]);router[_0xbf93[11]](_0xbf93[6],controller[_0xbf93[10]]);router[_0xbf93[12]](_0xbf93[6],controller[_0xbf93[10]]);router[_0xbf93[14]](_0xbf93[6],controller[_0xbf93[13]]);module[_0xbf93[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_server_in.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 1f348c0..27fda21 100644 (file)
@@ -1 +1,96 @@
-var _0xacc1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xacc1[0];var _=require(_0xacc1[1]);var Util=require(_0xacc1[2]);var sequelize=require(_0xacc1[4])[_0xacc1[3]];var MailServerIn=require(_0xacc1[4])[_0xacc1[5]];exports[_0xacc1[6]]=function(_0x92afx5,_0x92afx6){return MailServerIn[_0xacc1[11]]()[_0xacc1[10]](function(_0x92afx8){return _0x92afx6[_0xacc1[9]](200)[_0xacc1[8]](_0x92afx8)})[_0xacc1[7]](function(_0x92afx7){return handleError(_0x92afx6,_0x92afx7)})};exports[_0xacc1[12]]=function(_0x92afx5,_0x92afx6){return MailServerIn[_0xacc1[16]](_0x92afx5[_0xacc1[15]][_0xacc1[14]])[_0xacc1[10]](function(_0x92afx9){if(!_0x92afx9){return _0x92afx6[_0xacc1[13]](404)};return _0x92afx6[_0xacc1[8]](_0x92afx9)})[_0xacc1[7]](function(_0x92afx7){return handleError(_0x92afx6,_0x92afx7)})};exports[_0xacc1[17]]=function(_0x92afx5,_0x92afx6){return MailServerIn[_0xacc1[17]](_0x92afx5[_0xacc1[20]])[_0xacc1[10]](function(_0x92afx9){return _0x92afx6[_0xacc1[9]](201)[_0xacc1[8]](_0x92afx9)})[_0xacc1[7]](sequelize.UniqueConstraintError,function(_0x92afx7){return Util[_0xacc1[19]][_0xacc1[18]](_0x92afx6,_0x92afx7)})[_0xacc1[7]](function(_0x92afx7){return handleError(_0x92afx6,_0x92afx7)})};exports[_0xacc1[21]]=function(_0x92afx5,_0x92afx6){if(_0x92afx5[_0xacc1[20]][_0xacc1[14]]){delete _0x92afx5[_0xacc1[20]][_0xacc1[14]]};return MailServerIn[_0xacc1[16]](_0x92afx5[_0xacc1[15]][_0xacc1[14]])[_0xacc1[10]](function(_0x92afx9){if(!_0x92afx9){return _0x92afx6[_0xacc1[13]](404)};var _0x92afxa=_[_0xacc1[22]](_0x92afx9,_0x92afx5[_0xacc1[20]]);return _0x92afxa[_0xacc1[23]]()})[_0xacc1[10]](function(_0x92afx9){return _0x92afx6[_0xacc1[9]](200)[_0xacc1[8]](_0x92afx9)})[_0xacc1[7]](sequelize.UniqueConstraintError,function(_0x92afx7){return Util[_0xacc1[19]][_0xacc1[18]](_0x92afx6,_0x92afx7)})[_0xacc1[7]](function(_0x92afx7){return handleError(_0x92afx6,_0x92afx7)})};exports[_0xacc1[24]]=function(_0x92afx5,_0x92afx6){return MailServerIn[_0xacc1[16]](_0x92afx5[_0xacc1[15]][_0xacc1[14]])[_0xacc1[10]](function(_0x92afx9){if(!_0x92afx9){return _0x92afx6[_0xacc1[13]](404)};return _0x92afx9[_0xacc1[24]]()})[_0xacc1[7]](function(_0x92afx7){return handleError(_0x92afx6,_0x92afx7)})};function handleError(_0x92afx6,_0x92afx7){return _0x92afx6[_0xacc1[9]](500)[_0xacc1[8]](_0x92afx7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var MailServerIn = require('../../models').MailServerIn;
+
+// Get list of mail_server_ins
+exports.index = function(req, res) {
+  return MailServerIn
+    .findAll()
+    .then(function(mail_server_ins) {
+      return res.status(200).send(mail_server_ins);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailServerIn
+exports.show = function(req, res) {
+  return MailServerIn
+    .findById(req.params.id)
+    .then(function(mailServerIn) {
+      if (!mailServerIn) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailServerIn);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new mailServerIn in the DB.
+exports.create = function(req, res) {
+  return MailServerIn
+    .create(req.body)
+    .then(function(mailServerIn) {
+      return res.status(201).send(mailServerIn);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing mailServerIn in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return MailServerIn
+    .findById(req.params.id)
+    .then(function(mailServerIn) {
+      if (!mailServerIn) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailServerIn, req.body);
+      return updated
+        .save();
+    })
+    .then(function(mailServerIn) {
+      return res.status(200).send(mailServerIn);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailServerIn from the DB.
+exports.destroy = function(req, res) {
+  return MailServerIn
+    .findById(req.params.id)
+    .then(function(mailServerIn) {
+      if (!mailServerIn) {
+        return res.sendStatus(404);
+      }
+      return mailServerIn
+        .destroy();
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index fb1d20c..811977e 100644 (file)
@@ -1 +1,27 @@
-var _0xb905=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xb905[0];var MailServerIn=require(_0xb905[2])[_0xb905[1]];exports[_0xb905[3]]=function(_0x5dd5x2){MailServerIn[_0xb905[4]](function(_0x5dd5x3){onSave(_0x5dd5x2,_0x5dd5x3)});MailServerIn[_0xb905[5]](function(_0x5dd5x3){onSave(_0x5dd5x2,_0x5dd5x3)});MailServerIn[_0xb905[6]](function(_0x5dd5x3){onRemove(_0x5dd5x2,_0x5dd5x3)})};function onSave(_0x5dd5x2,_0x5dd5x3,_0x5dd5x5){_0x5dd5x2[_0xb905[8]](_0xb905[7],_0x5dd5x3)}function onRemove(_0x5dd5x2,_0x5dd5x3,_0x5dd5x5){_0x5dd5x2[_0xb905[8]](_0xb905[9],_0x5dd5x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var MailServerIn = require('../../models').MailServerIn;
+
+exports.register = function(socket) {
+  MailServerIn.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  MailServerIn.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  MailServerIn.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_server_in:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_server_in:remove', doc);
+}
index 31d9ca8..526e713 100644 (file)
@@ -1 +1,19 @@
-var _0x9ac0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x65\x72\x76\x69\x63\x65","\x69\x6E\x64\x65\x78\x53\x65\x72\x76\x69\x63\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x74\x65\x73\x74","\x74\x65\x73\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x74\x65\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9ac0[0];var express=require(_0x9ac0[1]);var controller=require(_0x9ac0[2]);var auth=require(_0x9ac0[3]);var router=express.Router();router[_0x9ac0[7]](_0x9ac0[4],auth[_0x9ac0[5]](),controller[_0x9ac0[6]]);router[_0x9ac0[7]](_0x9ac0[8],auth[_0x9ac0[5]](),controller[_0x9ac0[9]]);router[_0x9ac0[7]](_0x9ac0[10],auth[_0x9ac0[5]](),controller[_0x9ac0[11]]);router[_0x9ac0[7]](_0x9ac0[12],auth[_0x9ac0[5]](),controller[_0x9ac0[13]]);router[_0x9ac0[15]](_0x9ac0[4],auth[_0x9ac0[5]](),controller[_0x9ac0[14]]);router[_0x9ac0[15]](_0x9ac0[16],auth[_0x9ac0[5]](),controller[_0x9ac0[13]]);router[_0x9ac0[18]](_0x9ac0[10],auth[_0x9ac0[5]](),controller[_0x9ac0[17]]);router[_0x9ac0[19]](_0x9ac0[10],auth[_0x9ac0[5]](),controller[_0x9ac0[17]]);router[_0x9ac0[21]](_0x9ac0[10],auth[_0x9ac0[5]](),controller[_0x9ac0[20]]);module[_0x9ac0[22]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_server_out.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/service', auth.isAuthenticated(), controller.indexService);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/test', auth.isAuthenticated(), controller.test);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/test', auth.isAuthenticated(), controller.test);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 228121f..96b04e4 100644 (file)
@@ -1 +1,142 @@
-var _0x747c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x69\x6E\x64\x65\x78\x53\x65\x72\x76\x69\x63\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x65\x73\x74","\x65\x72\x72\x6F\x72","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x45\x52\x52\x4F\x52","\x63\x6F\x6D\x6D\x69\x74","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x20","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x20\x74\x65\x73\x74\x2E\x2E","\x75\x73\x65\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0x747c[0];var _=require(_0x747c[1]);var MailServerOut=require(_0x747c[3])[_0x747c[2]];var MailMessage=require(_0x747c[3])[_0x747c[4]];var sequelize=require(_0x747c[3])[_0x747c[5]];exports[_0x747c[6]]=function(_0x2077x5,_0x2077x6){return MailServerOut[_0x747c[11]]()[_0x747c[10]](function(_0x2077x8){return _0x2077x6[_0x747c[9]](200)[_0x747c[8]](_0x2077x8)})[_0x747c[7]](function(_0x2077x7){return handleError(_0x2077x6,_0x2077x7)})};exports[_0x747c[12]]=function(_0x2077x5,_0x2077x6){return MailServerOut[_0x747c[13]]({where:{service:true}})[_0x747c[10]](function(_0x2077x9){return _0x2077x6[_0x747c[9]](200)[_0x747c[8]](_0x2077x9)})[_0x747c[7]](function(_0x2077x7){return handleError(_0x2077x6,_0x2077x7)})};exports[_0x747c[14]]=function(_0x2077x5,_0x2077x6){return MailServerOut[_0x747c[18]](_0x2077x5[_0x747c[17]][_0x747c[16]])[_0x747c[10]](function(_0x2077x9){if(!_0x2077x9){return _0x2077x6[_0x747c[15]](404)};return _0x2077x6[_0x747c[8]](_0x2077x9)})[_0x747c[7]](function(_0x2077x7){return handleError(_0x2077x6,_0x2077x7)})};exports[_0x747c[19]]=function(_0x2077x5,_0x2077x6){return MailServerOut[_0x747c[19]](_0x2077x5[_0x747c[20]])[_0x747c[10]](function(_0x2077x9){return _0x2077x6[_0x747c[9]](201)[_0x747c[8]](_0x2077x9)})[_0x747c[7]](function(_0x2077x7){return handleError(_0x2077x6,_0x2077x7)})};exports[_0x747c[21]]=function(_0x2077x5,_0x2077x6){if(_0x2077x5[_0x747c[20]][_0x747c[16]]){delete _0x2077x5[_0x747c[20]][_0x747c[16]]};return MailServerOut[_0x747c[18]](_0x2077x5[_0x747c[17]][_0x747c[16]])[_0x747c[10]](function(_0x2077x9){if(!_0x2077x9){return _0x2077x6[_0x747c[15]](404)};var _0x2077xa=_[_0x747c[22]](_0x2077x9,_0x2077x5[_0x747c[20]]);return _0x2077xa[_0x747c[23]]()})[_0x747c[10]](function(_0x2077x9){return _0x2077x6[_0x747c[9]](200)[_0x747c[8]](_0x2077x9)})[_0x747c[7]](function(_0x2077x7){return handleError(_0x2077x6,_0x2077x7)})};exports[_0x747c[24]]=function(_0x2077x5,_0x2077x6){return MailServerOut[_0x747c[18]](_0x2077x5[_0x747c[17]][_0x747c[16]])[_0x747c[10]](function(_0x2077x9){if(!_0x2077x9){return _0x2077x6[_0x747c[15]](404)};return _0x2077x9[_0x747c[24]]()})[_0x747c[10]](function(){return _0x2077x6[_0x747c[15]](204)})[_0x747c[7]](function(_0x2077x7){return handleError(_0x2077x6,_0x2077x7)})};exports[_0x747c[25]]=function(_0x2077x5,_0x2077x6){return sequelize[_0x747c[35]]()[_0x747c[10]](function(_0x2077xb){var _0x2077xc;var _0x2077xd;return MailServerOut[_0x747c[18]](_0x2077x5[_0x747c[17]][_0x747c[16]])[_0x747c[10]](function(_0x2077x9){if(!_0x2077x9){_0x2077xb[_0x747c[27]]();return _0x2077x6[_0x747c[15]](404)}else {return _0x2077x9}})[_0x747c[10]](function(_0x2077x9){_0x2077xc=_0x2077x9;return MailMessage[_0x747c[19]]({subject:_0x747c[31]+_0x2077x9[_0x747c[32]]+_0x747c[33],text:_0x747c[31]+_0x2077x9[_0x747c[32]]+_0x747c[33],from:[_0x2077x9[_0x747c[32]]],to:[_0x2077x9[_0x747c[32]]]},{transaction:_0x2077xb,user:_0x2077x5[_0x747c[34]]})})[_0x747c[10]](function(_0x2077xe){_0x2077xd=_0x2077xe;return _0x2077xc[_0x747c[21]]({state:_0x747c[30]})})[_0x747c[10]](function(){_0x2077xb[_0x747c[29]]();return _0x2077x6[_0x747c[9]](201)[_0x747c[8]](_0x2077xd)})[_0x747c[7]](function(_0x2077x7){console[_0x747c[26]](_0x2077x7);_0x2077xb[_0x747c[27]]();return _0x2077xc[_0x747c[21]]({state:_0x747c[28]})[_0x747c[10]](function(){return handleError(_0x2077x6,_0x2077x7)})})})};function handleError(_0x2077x6,_0x2077x7){return _0x2077x6[_0x747c[9]](500)[_0x747c[8]](_0x2077x7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var MailServerOut = require('../../models').MailServerOut;
+var MailMessage = require('../../models').MailMessage;
+var sequelize = require('../../models').sequelize;
+
+// Get list of mailServerOuts
+exports.index = function(req, res) {
+  return MailServerOut
+    .findAll()
+    .then(function(mailServerOuts) {
+      return res.status(200).send(mailServerOuts);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.indexService = function(req, res) {
+  return MailServerOut
+    .findOne({
+      where: {
+        service: true
+      }
+    })
+    .then(function(mailServerOut) {
+      return res.status(200).send(mailServerOut);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailServerOut
+exports.show = function(req, res) {
+  return MailServerOut
+    .findById(req.params.id)
+    .then(function(mailServerOut) {
+      if (!mailServerOut) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailServerOut);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new mailServerOut in the DB.
+exports.create = function(req, res) {
+  return MailServerOut
+    .create(req.body)
+    .then(function(mailServerOut) {
+      return res.status(201).send(mailServerOut);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing mailServerOut in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return MailServerOut
+    .findById(req.params.id)
+    .then(function(mailServerOut) {
+      if (!mailServerOut) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailServerOut, req.body);
+      return updated
+        .save();
+    })
+    .then(function(mailServerOut) {
+      return res.status(200).send(mailServerOut);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailServerOut from the DB.
+exports.destroy = function(req, res) {
+  return MailServerOut
+    .findById(req.params.id)
+    .then(function(mailServerOut) {
+      if (!mailServerOut) {
+        return res.sendStatus(404);
+      }
+
+      return mailServerOut
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.test = function(req, res) {
+  var _mailServerOut;
+  var _mailMessage;
+
+  return MailServerOut
+    .findById(req.params.id)
+    .then(function(mailServerOut) {
+      if (!mailServerOut) {
+        return res.sendStatus(404);
+      }
+      return mailServerOut;
+    })
+    .then(function(mailServerOut) {
+      _mailServerOut = mailServerOut;
+      return MailMessage
+        .create({
+          subject: 'MailAccount ' + mailServerOut.username + ' test..',
+          text: 'MailAccount ' + mailServerOut.username + ' test..',
+          from: [mailServerOut.username],
+          to: [mailServerOut.username],
+          UserId: req.user.id
+        });
+    })
+    .then(function(mailMessage) {
+      _mailMessage = mailMessage;
+      return _mailServerOut
+        .update({
+          state: 'CONNECTED',
+        });
+    })
+    .then(function() {
+      return res.status(201).send(_mailMessage);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index b72c4b3..d9e6e91 100644 (file)
@@ -1 +1,26 @@
-var _0xeaeb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x20\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xeaeb[0];var MailServerOut=require(_0xeaeb[2])[_0xeaeb[1]];exports[_0xeaeb[3]]=function(_0xdaefx2){MailServerOut[_0xeaeb[6]](function(_0xdaefx3){console[_0xeaeb[5]](_0xeaeb[4]);onSave(_0xdaefx2,_0xdaefx3)});MailServerOut[_0xeaeb[8]](function(_0xdaefx3){console[_0xeaeb[5]](_0xeaeb[7]);onRemove(_0xdaefx2,_0xdaefx3)})};function onSave(_0xdaefx2,_0xdaefx3,_0xdaefx5){_0xdaefx2[_0xeaeb[10]](_0xeaeb[9],_0xdaefx3)}function onRemove(_0xdaefx2,_0xdaefx3,_0xdaefx5){_0xdaefx2[_0xeaeb[10]](_0xeaeb[11],_0xdaefx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var MailServerOut = require('../../models').MailServerOut;
+
+exports.register = function(socket) {
+  MailServerOut.afterCreate(function(doc) {
+    console.log('MailServerOut afterCreate');
+    onSave(socket, doc);
+  });
+  MailServerOut.afterDestroy(function(doc) {
+    console.log('MailServerOut afterDestroy');
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_server_out:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_server_out:remove', doc);
+}
index fd5c657..cb8e0b2 100644 (file)
@@ -1 +1,15 @@
-var _0x6f91=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6f91[0];var express=require(_0x6f91[1]);var controller=require(_0x6f91[2]);var router=express.Router();router[_0x6f91[5]](_0x6f91[3],controller[_0x6f91[4]]);router[_0x6f91[5]](_0x6f91[6],controller[_0x6f91[7]]);router[_0x6f91[9]](_0x6f91[3],controller[_0x6f91[8]]);router[_0x6f91[11]](_0x6f91[6],controller[_0x6f91[10]]);router[_0x6f91[12]](_0x6f91[6],controller[_0x6f91[10]]);router[_0x6f91[14]](_0x6f91[6],controller[_0x6f91[13]]);module[_0x6f91[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./mail_template.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index 634e5a9..8853adc 100644 (file)
@@ -1 +1,92 @@
-var _0x1831=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4D\x61\x69\x6C\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x1831[0];var _=require(_0x1831[1]);var util=require(_0x1831[2]);var Util=require(_0x1831[3]);var MailTemplate=require(_0x1831[5])[_0x1831[4]];exports[_0x1831[6]]=function(_0x2621x5,_0x2621x6,_0x2621x7){return MailTemplate[_0x1831[13]](Util[_0x1831[12]](_0x2621x5[_0x1831[11]]))[_0x1831[10]](function(_0x2621x9){_0x2621x6[_0x1831[9]](200)[_0x1831[8]](_0x2621x9)})[_0x1831[7]](function(_0x2621x8){return handleError(_0x2621x6,_0x2621x8)})};exports[_0x1831[14]]=function(_0x2621x5,_0x2621x6){return MailTemplate[_0x1831[18]](_0x2621x5[_0x1831[17]][_0x1831[16]])[_0x1831[10]](function(_0x2621xa){if(!_0x2621xa){return _0x2621x6[_0x1831[15]](404)};return _0x2621x6[_0x1831[8]](_0x2621xa)})[_0x1831[7]](function(_0x2621x8){return handleError(_0x2621x6,_0x2621x8)})};exports[_0x1831[19]]=function(_0x2621x5,_0x2621x6){return MailTemplate[_0x1831[19]](_0x2621x5[_0x1831[20]])[_0x1831[10]](function(_0x2621xa){return _0x2621x6[_0x1831[9]](201)[_0x1831[8]](_0x2621xa)})[_0x1831[7]](function(_0x2621x8){return handleError(_0x2621x6,_0x2621x8)})};exports[_0x1831[21]]=function(_0x2621x5,_0x2621x6){if(_0x2621x5[_0x1831[20]][_0x1831[16]]){delete _0x2621x5[_0x1831[20]][_0x1831[16]]};return MailTemplate[_0x1831[18]](_0x2621x5[_0x1831[17]][_0x1831[16]])[_0x1831[10]](function(_0x2621xa){if(!_0x2621xa){return _0x2621x6[_0x1831[15]](404)};var _0x2621xb=_[_0x1831[22]](_0x2621xa,_0x2621x5[_0x1831[20]]);return _0x2621xb[_0x1831[23]]()})[_0x1831[10]](function(_0x2621xa){return _0x2621x6[_0x1831[9]](200)[_0x1831[8]](_0x2621xa)})[_0x1831[7]](function(_0x2621x8){return handleError(_0x2621x6,_0x2621x8)})};exports[_0x1831[24]]=function(_0x2621x5,_0x2621x6){return MailTemplate[_0x1831[18]](_0x2621x5[_0x1831[17]][_0x1831[16]])[_0x1831[10]](function(_0x2621xa){if(!_0x2621xa){return _0x2621x6[_0x1831[15]](404)};_0x2621xa[_0x1831[24]]()})[_0x1831[10]](function(){return _0x2621x6[_0x1831[15]](204)})[_0x1831[7]](function(_0x2621x8){return handleError(_0x2621x6,_0x2621x8)})};function handleError(_0x2621x6,_0x2621x8){return _0x2621x6[_0x1831[9]](500)[_0x1831[8]](_0x2621x8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var Util = require('../../config/util');
+
+var MailTemplate = require('../../models').MailTemplate;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return MailTemplate
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single mailTemplate
+exports.show = function(req, res) {
+  return MailTemplate
+    .findById(req.params.id)
+    .then(function(mailTemplate) {
+      if (!mailTemplate) {
+        return res.sendStatus(404);
+      }
+      return res.send(mailTemplate);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new mailTemplate in the DB.
+exports.create = function(req, res) {
+  return MailTemplate
+    .create(req.body)
+    .then(function(mailTemplate) {
+      return res.status(201).send(mailTemplate);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing mailTemplate in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return MailTemplate
+    .findById(req.params.id)
+    .then(function(mailTemplate) {
+      if (!mailTemplate) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(mailTemplate, req.body);
+      return updated
+        .save();
+    })
+    .then(function(mailTemplate) {
+      return res.status(200).send(mailTemplate);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a mailTemplate from the DB.
+exports.destroy = function(req, res) {
+  return MailTemplate
+    .findById(req.params.id)
+    .then(function(mailTemplate) {
+      if (!mailTemplate) {
+        return res.sendStatus(404);
+      }
+      mailTemplate
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index cbccc5b..a01fb2e 100644 (file)
@@ -1 +1,24 @@
-var _0x59d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x61\x69\x6C\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x59d5[0];var MailTemplate=require(_0x59d5[2])[_0x59d5[1]];exports[_0x59d5[3]]=function(_0x8bcdx2){MailTemplate[_0x59d5[4]](function(_0x8bcdx3){onSave(_0x8bcdx2,_0x8bcdx3)});MailTemplate[_0x59d5[5]](function(_0x8bcdx3){onRemove(_0x8bcdx2,_0x8bcdx3)})};function onSave(_0x8bcdx2,_0x8bcdx3,_0x8bcdx5){_0x8bcdx2[_0x59d5[7]](_0x59d5[6],_0x8bcdx3)}function onRemove(_0x8bcdx2,_0x8bcdx3,_0x8bcdx5){_0x8bcdx2[_0x59d5[7]](_0x59d5[8],_0x8bcdx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var MailTemplate = require('../../models').MailTemplate;
+
+exports.register = function(socket) {
+  MailTemplate.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  MailTemplate.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('mail_template:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('mail_template:remove', doc);
+}
index 3e9df17..d565c16 100644 (file)
@@ -1 +1,19 @@
-var _0xc8bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x65\x74\x72\x69\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x6D\x65\x74\x72\x69\x63\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xc8bc[0];var express=require(_0xc8bc[1]);var controller=require(_0xc8bc[2]);var auth=require(_0xc8bc[3]);var router=express.Router();router[_0xc8bc[7]](_0xc8bc[4],auth[_0xc8bc[5]](),controller[_0xc8bc[6]]);router[_0xc8bc[7]](_0xc8bc[8],auth[_0xc8bc[5]](),controller[_0xc8bc[9]]);router[_0xc8bc[7]](_0xc8bc[10],auth[_0xc8bc[5]](),controller[_0xc8bc[11]]);router[_0xc8bc[13]](_0xc8bc[4],auth[_0xc8bc[5]](),controller[_0xc8bc[12]]);router[_0xc8bc[13]](_0xc8bc[14],auth[_0xc8bc[5]](),controller[_0xc8bc[15]]);router[_0xc8bc[17]](_0xc8bc[10],auth[_0xc8bc[5]](),controller[_0xc8bc[16]]);router[_0xc8bc[18]](_0xc8bc[10],auth[_0xc8bc[5]](),controller[_0xc8bc[16]]);router[_0xc8bc[20]](_0xc8bc[4],auth[_0xc8bc[5]](),controller[_0xc8bc[19]]);router[_0xc8bc[20]](_0xc8bc[10],auth[_0xc8bc[5]](),controller[_0xc8bc[21]]);module[_0xc8bc[22]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./metric.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/table', auth.isAuthenticated(), controller.getMetricsByTable);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/validate', auth.isAuthenticated(), controller.metricValidation);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 4a581d8..ce77ec6 100644 (file)
@@ -1 +1,180 @@
-var _0x87b5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6D\x65\x74\x72\x69\x63\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x6C\x6F\x67","\x74\x61\x62\x6C\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4D\x45\x54\x52\x49\x43","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4D\x45\x54\x52\x49\x43\x5F\x43\x4F\x4E\x46\x49\x47\x55\x52\x41\x54\x49\x4F\x4E\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x67\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x54\x65\x78\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x87b5[0];var _=require(_0x87b5[1]);var Metric=require(_0x87b5[3])[_0x87b5[2]];var util=require(_0x87b5[4]);var Util=require(_0x87b5[5]);exports[_0x87b5[6]]=function(_0xa73dx5,_0xa73dx6,_0xa73dx7){return Metric[_0x87b5[13]](Util[_0x87b5[12]](_0xa73dx5[_0x87b5[11]]))[_0x87b5[10]](function(_0xa73dx9){_0xa73dx6[_0x87b5[9]](200)[_0x87b5[8]](_0xa73dx9)})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})};exports[_0x87b5[14]]=function(_0xa73dx5,_0xa73dx6){Metric[_0x87b5[18]]({where:{name:_0xa73dx5[_0x87b5[17]][_0x87b5[16]]}})[_0x87b5[10]](function(_0xa73dxa){if(!_0xa73dxa){return _0xa73dx6[_0x87b5[15]](404)};return _0xa73dx6[_0x87b5[8]](_0xa73dxa)})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})};exports[_0x87b5[19]]=function(_0xa73dx5,_0xa73dx6){Metric[_0x87b5[18]]({where:{table:_0xa73dx5[_0x87b5[11]][_0x87b5[21]]}})[_0x87b5[10]](function(_0xa73dxa){console[_0x87b5[20]](_0xa73dxa);if(!_0xa73dxa){return _0xa73dx6[_0x87b5[15]](404)};return _0xa73dx6[_0x87b5[9]](200)[_0x87b5[8]](_0xa73dxa)})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})};exports[_0x87b5[22]]=function(_0xa73dx5,_0xa73dx6){Metric[_0x87b5[25]](_0xa73dx5[_0x87b5[24]][_0x87b5[23]])[_0x87b5[10]](function(_0xa73dxb){if(!_0xa73dxb){return _0xa73dx6[_0x87b5[15]](404)};return _0xa73dx6[_0x87b5[8]](_0xa73dxb)})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})};exports[_0x87b5[26]]=function(_0xa73dx5,_0xa73dx6){Metric[_0x87b5[26]](_0xa73dx5[_0x87b5[17]])[_0x87b5[10]](function(_0xa73dxb){return _0xa73dx6[_0x87b5[9]](201)[_0x87b5[8]](_0xa73dxb)})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})};exports[_0x87b5[27]]=function(_0xa73dx5,_0xa73dx6){Metric[_0x87b5[18]]({where:{name:_0xa73dx5[_0x87b5[17]][_0x87b5[16]],id:{$ne:_0xa73dx5[_0x87b5[17]][_0x87b5[23]]}}})[_0x87b5[10]](function(_0xa73dxa){if(!_0xa73dxa){return _0xa73dx6[_0x87b5[15]](404)};if(_0xa73dxa[_0x87b5[30]]>0){return _0xa73dx6[_0x87b5[9]](500)[_0x87b5[8]]({message:_0x87b5[31]})};if(_0xa73dx5[_0x87b5[17]][_0x87b5[23]]){delete _0xa73dx5[_0x87b5[17]][_0x87b5[23]]};return Metric[_0x87b5[32]]({where:{id:_0xa73dx5[_0x87b5[24]][_0x87b5[23]]}})})[_0x87b5[10]](function(_0xa73dxb){if(!_0xa73dxb){return _0xa73dx6[_0x87b5[15]](404)};var _0xa73dxc=_[_0x87b5[28]](_0xa73dxb,_0xa73dx5[_0x87b5[17]]);return _0xa73dxc[_0x87b5[29]]()})[_0x87b5[10]](function(){return _0xa73dx6[_0x87b5[15]](200)})[_0x87b5[7]](function(_0xa73dx8){console[_0x87b5[20]](_0xa73dx8);return handleError(_0xa73dx6,_0xa73dx8)})};exports[_0x87b5[33]]=function(_0xa73dx5,_0xa73dx6){Metric[_0x87b5[25]](_0xa73dx5[_0x87b5[24]][_0x87b5[23]])[_0x87b5[10]](function(_0xa73dxb){if(!_0xa73dxb){return _0xa73dx6[_0x87b5[15]](404)};_0xa73dxb[_0x87b5[35]]()[_0x87b5[10]](function(_0xa73dxd){if(_0xa73dxd[_0x87b5[30]]>0){return _0xa73dx6[_0x87b5[9]](500)[_0x87b5[8]]({message:_0x87b5[34]})};_0xa73dxb[_0x87b5[33]]()[_0x87b5[10]](function(){return _0xa73dx6[_0x87b5[15]](204)})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})};exports[_0x87b5[36]]=function(_0xa73dx5,_0xa73dx6){Metric[_0x87b5[33]]({where:{id:_0xa73dx5[_0x87b5[11]][_0x87b5[23]]},individualHooks:true})[_0x87b5[10]](function(){return _0xa73dx6[_0x87b5[15]](204)})[_0x87b5[7]](function(_0xa73dx8){return handleError(_0xa73dx6,_0xa73dx8)})};function handleError(_0xa73dx6,_0xa73dx8){return _0xa73dx6[_0x87b5[9]](500)[_0x87b5[8]](_0xa73dx8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Metric = require('../../models').Metric;
+var util = require('util');
+var Util = require('../../config/util');
+
+// Get list of metrics
+exports.index = function(req, res, next) {
+  return Metric
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.metricValidation = function(req, res) {
+  Metric
+    .findAll({
+      where: {
+        name: req.body.name
+      }
+    })
+    .then(function(metrics) {
+      if (!metrics) {
+        return res.sendStatus(404);
+      }
+      return res.send(metrics);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.getMetricsByTable = function(req, res) {
+  Metric
+    .findAll({
+      where: {
+        table: req.query.table
+      }
+    })
+    .then(function(metrics) {
+      console.log(metrics);
+      if (!metrics) {
+        return res.sendStatus(404);
+      }
+      return res.status(200).send(metrics);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single metric
+exports.show = function(req, res) {
+  Metric
+    .findById(req.params.id)
+    .then(function(metric) {
+      if (!metric) {
+        return res.sendStatus(404);
+      }
+      return res.send(metric);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new metric in the DB.
+exports.create = function(req, res) {
+  Metric
+    .create(req.body)
+    .then(function(metric) {
+      return res.status(201).send(metric);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing metric in the DB.
+exports.update = function(req, res) {
+  Metric
+    .findAll({
+      where: {
+        name: req.body.name,
+        id: {
+          $ne: req.body.id
+        }
+      }
+    })
+    .then(function(metrics) {
+      if (!metrics) {
+        return res.sendStatus(404);
+      }
+      if (metrics.length > 0) {
+        return res.status(500).send({
+          message: 'MESSAGE_EXIST_METRIC'
+        })
+      }
+      if (req.body.id) {
+        delete req.body.id;
+      }
+      return Metric
+        .find({
+          where: {
+            id: req.params.id
+          }
+        });
+    })
+    .then(function(metric) {
+      if (!metric) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(metric, req.body);
+      return updated.save();
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes a metric from the DB.
+exports.destroy = function(req, res) {
+  Metric
+    .findById(req.params.id)
+    .then(function(metric) {
+      if (!metric) {
+        return res.sendStatus(404);
+      }
+      metric.getZendeskTexts()
+        .then(function(texts) {
+          if (texts.length > 0) {
+            return res.status(500).send({
+              message: 'MESSAGE_METRIC_CONFIGURATION_ASSOCIATED'
+            });
+          }
+          metric.destroy()
+            .then(function() {
+              return res.sendStatus(204);
+            })
+            .catch(function(err) {
+              return handleError(res, err);
+            });
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  Metric
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index f273e2e..e604bc9 100644 (file)
@@ -1 +1,41 @@
-var _0xd722=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x65\x74\x72\x69\x63\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x65\x74\x72\x69\x63\x3A\x72\x65\x6D\x6F\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6D\x65\x74\x72\x69\x63","\x69\x64","\x75\x70\x64\x61\x74\x65"];_0xd722[0];var Metric=require(_0xd722[2])[_0xd722[1]];var ReportField=require(_0xd722[2])[_0xd722[3]];exports[_0xd722[4]]=function(_0x4a0bx3){Metric[_0xd722[5]](function(_0x4a0bx4){onSave(_0x4a0bx3,_0x4a0bx4)});Metric[_0xd722[6]](function(_0x4a0bx4){updateFields(_0x4a0bx4)});Metric[_0xd722[7]](function(_0x4a0bx4){onRemove(_0x4a0bx3,_0x4a0bx4)})};function onSave(_0x4a0bx3,_0x4a0bx4,_0x4a0bx6){_0x4a0bx3[_0xd722[9]](_0xd722[8],_0x4a0bx4)}function onRemove(_0x4a0bx3,_0x4a0bx4,_0x4a0bx6){_0x4a0bx3[_0xd722[9]](_0xd722[10],_0x4a0bx4)}function updateFields(_0x4a0bx4){return ReportField[_0xd722[15]]({field:_0x4a0bx4[_0xd722[13]]},{where:{MetricId:_0x4a0bx4[_0xd722[14]]}})[_0xd722[12]](function(_0x4a0bx9){console[_0xd722[11]](_0x4a0bx9)})}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Metric = require('../../models').Metric;
+var ReportField = require('../../models').ReportField;
+
+exports.register = function(socket) {
+  Metric.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Metric.afterUpdate(function(doc) {
+    updateFields(doc);
+  });
+  Metric.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('metric:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('metric:remove', doc);
+}
+
+function updateFields(doc) {
+  return ReportField.update({
+      field: doc.metric
+    }, {
+      where: {
+        MetricId: doc.id
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
index b65b83c..076cab1 100644 (file)
@@ -1 +1,20 @@
-var _0x3018=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73","\x67\x65\x74"];_0x3018[0];var should=require(_0x3018[1]);var app=require(_0x3018[2]);var request=require(_0x3018[3]);describe(_0x3018[4],function(){it(_0x3018[5],function(_0x49e3x4){request(app)[_0x3018[13]](_0x3018[12])[_0x3018[11]](200)[_0x3018[11]](_0x3018[10],/json/)[_0x3018[9]](function(_0x49e3x5,_0x49e3x6){if(_0x49e3x5){return _0x49e3x4(_0x49e3x5)};_0x49e3x6[_0x3018[8]][_0x3018[1]][_0x3018[7]][_0x3018[6]](Array);_0x49e3x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/analytics/metrics', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/analytics/metrics')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 1a5b5f8..8204682 100644 (file)
@@ -1 +1,15 @@
-var _0x8635=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8635[0];var express=require(_0x8635[1]);var controller=require(_0x8635[2]);var router=express.Router();router[_0x8635[5]](_0x8635[3],controller[_0x8635[4]]);router[_0x8635[5]](_0x8635[6],controller[_0x8635[7]]);router[_0x8635[9]](_0x8635[3],controller[_0x8635[8]]);router[_0x8635[11]](_0x8635[6],controller[_0x8635[10]]);router[_0x8635[12]](_0x8635[6],controller[_0x8635[10]]);router[_0x8635[14]](_0x8635[6],controller[_0x8635[13]]);module[_0x8635[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./module.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 481c3a8..9d6517c 100644 (file)
@@ -1 +1,92 @@
-var _0xc5ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x6F\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xc5ab[0];var _=require(_0xc5ab[1]);var Module=require(_0xc5ab[3])[_0xc5ab[2]];exports[_0xc5ab[4]]=function(_0x86bax3,_0x86bax4){Module[_0xc5ab[9]]()[_0xc5ab[8]](function(_0x86bax6){return _0x86bax4[_0xc5ab[7]](200)[_0xc5ab[6]](_0x86bax6)})[_0xc5ab[5]](function(_0x86bax5){return handleError(_0x86bax4,_0x86bax5)})};exports[_0xc5ab[10]]=function(_0x86bax3,_0x86bax4){var _0x86bax7=_0x86bax3[_0xc5ab[12]][_0xc5ab[11]];Module[_0xc5ab[14]](_0x86bax7)[_0xc5ab[8]](function(_0x86bax8){if(!_0x86bax8){return _0x86bax4[_0xc5ab[13]](404)};return _0x86bax4[_0xc5ab[6]](_0x86bax8)})[_0xc5ab[5]](function(_0x86bax5){return handleError(_0x86bax4,_0x86bax5)})};exports[_0xc5ab[15]]=function(_0x86bax3,_0x86bax4){Module[_0xc5ab[15]](_0x86bax3[_0xc5ab[16]])[_0xc5ab[8]](function(_0x86bax8){return _0x86bax4[_0xc5ab[7]](201)[_0xc5ab[6]](_0x86bax8)})[_0xc5ab[5]](function(_0x86bax5){return handleError(_0x86bax4,_0x86bax5)})};exports[_0xc5ab[17]]=function(_0x86bax3,_0x86bax4){var _0x86bax7=_0x86bax3[_0xc5ab[16]][_0xc5ab[11]];if(_0x86bax3[_0xc5ab[16]][_0xc5ab[11]]){delete _0x86bax3[_0xc5ab[16]][_0xc5ab[11]]};Module[_0xc5ab[14]](_0x86bax7)[_0xc5ab[8]](function(_0x86bax8){if(!_0x86bax8){return _0x86bax4[_0xc5ab[13]](404)};var _0x86bax9=_[_0xc5ab[18]](_0x86bax8,_0x86bax3[_0xc5ab[16]]);_0x86bax9[_0xc5ab[19]]()[_0xc5ab[8]](function(){return _0x86bax4[_0xc5ab[7]](200)[_0xc5ab[6]](_0x86bax8)})[_0xc5ab[5]](function(_0x86bax5){return handleError(_0x86bax4,_0x86bax5)})})[_0xc5ab[5]](function(_0x86bax5){return handleError(_0x86bax4,_0x86bax5)})};exports[_0xc5ab[20]]=function(_0x86bax3,_0x86bax4){var _0x86bax7=_0x86bax3[_0xc5ab[12]][_0xc5ab[11]];Module[_0xc5ab[14]](_0x86bax7)[_0xc5ab[8]](function(_0x86bax8){if(!_0x86bax8){return _0x86bax4[_0xc5ab[13]](404)};_0x86bax8[_0xc5ab[20]]()[_0xc5ab[8]](function(){return _0x86bax4[_0xc5ab[13]](204)})[_0xc5ab[5]](function(_0x86bax5){return handleError(_0x86bax4,_0x86bax5)})})[_0xc5ab[5]](function(_0x86bax5){return handleError(_0x86bax4,_0x86bax5)})};function handleError(_0x86bax4,_0x86bax5){return _0x86bax4[_0xc5ab[7]](500)[_0xc5ab[6]](_0x86bax5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Module = require('../../models').Module;
+
+// Get list of modules
+exports.index = function(req, res) {
+  Module
+  .findAll()
+  .then(function (modules) {
+    return res.status(200).send(modules);
+  })
+  .catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+// Get a single module
+exports.show = function(req, res) {
+  var moduleId = req.params.id;
+
+  Module
+  .findById(moduleId)
+  .then(function (module) {
+    if(!module) { return res.sendStatus(404); }
+    return res.send(module);
+  })
+  .catch(function(err){
+    return handleError(res, err);
+  });
+};
+
+// Creates a new module in the DB.
+exports.create = function(req, res) {
+  Module
+  .create(req.body)
+  .then(function(module) {
+    return res.status(201).send(module);
+  })
+  .catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+// Updates an existing module in the DB.
+exports.update = function(req, res) {
+  var moduleId = req.body.id;
+
+  if(req.body.id) { delete req.body.id; }
+
+  Module
+  .findById(moduleId)
+  .then(function (module) {
+    if(!module) { return res.sendStatus(404); }
+    var updated = _.merge(module, req.body);
+    updated.save()
+    .then(function () {
+      return res.status(200).send(module);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+  })
+  .catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+// Deletes a module from the DB.
+exports.destroy = function(req, res) {
+  var moduleId = req.params.id;
+
+  Module
+  .findById(moduleId)
+  .then(function (module) {
+    if(!module) { return res.sendStatus(404); }
+    module.destroy()
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+  })
+  .catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 5b411a2..0eade3b 100644 (file)
@@ -1 +1,24 @@
-var _0xcdd5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x6F\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x6F\x64\x75\x6C\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x6F\x64\x75\x6C\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0xcdd5[0];var module=require(_0xcdd5[2])[_0xcdd5[1]];exports[_0xcdd5[3]]=function(_0x93d0x2){module[_0xcdd5[4]](function(_0x93d0x3){onSave(_0x93d0x2,_0x93d0x3)});module[_0xcdd5[5]](function(_0x93d0x3){onRemove(_0x93d0x2,_0x93d0x3)})};function onSave(_0x93d0x2,_0x93d0x3,_0x93d0x5){_0x93d0x2[_0xcdd5[7]](_0xcdd5[6],_0x93d0x3)}function onRemove(_0x93d0x2,_0x93d0x3,_0x93d0x5){_0x93d0x2[_0xcdd5[7]](_0xcdd5[8],_0x93d0x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var module = require('../../models').Module;
+
+exports.register = function(socket) {
+  module.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  module.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('module:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('module:remove', doc);
+}
index 88c85fb..45aa629 100644 (file)
@@ -1 +1,20 @@
-var _0x829c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65\x73","\x67\x65\x74"];_0x829c[0];var should=require(_0x829c[1]);var app=require(_0x829c[2]);var request=require(_0x829c[3]);describe(_0x829c[4],function(){it(_0x829c[5],function(_0x1989x4){request(app)[_0x829c[13]](_0x829c[12])[_0x829c[11]](200)[_0x829c[11]](_0x829c[10],/json/)[_0x829c[9]](function(_0x1989x5,_0x1989x6){if(_0x1989x5){return _0x1989x4(_0x1989x5)};_0x1989x6[_0x829c[8]][_0x829c[1]][_0x829c[7]][_0x829c[6]](Array);_0x1989x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/modules', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/modules')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 1668d7f..f341cb4 100644 (file)
@@ -1 +1,15 @@
-var _0x5f02=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5f02[0];var express=require(_0x5f02[1]);var controller=require(_0x5f02[2]);var router=express.Router();router[_0x5f02[5]](_0x5f02[3],controller[_0x5f02[4]]);router[_0x5f02[8]](_0x5f02[6],controller[_0x5f02[7]]);router[_0x5f02[10]](_0x5f02[3],controller[_0x5f02[9]]);router[_0x5f02[11]](_0x5f02[3],controller[_0x5f02[9]]);router[_0x5f02[13]](_0x5f02[3],controller[_0x5f02[12]]);module[_0x5f02[14]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./setting.controller');
+
+var router = express.Router();
+
+// router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 2e6bb19..3ebcb5c 100644 (file)
@@ -1 +1,110 @@
-var _0x5c1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x63\x72\x79\x70\x74\x6F","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x69\x63\x65\x6E\x73\x65","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x61\x64\x64\x72\x65\x73\x73","\x6E\x65\x74\x6D\x61\x73\x6B","\x6D\x61\x63","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x72\x73\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x68\x65\x78","\x75\x74\x66\x38","\x66\x69\x6E\x61\x6C"];_0x5c1f[0];var _=require(_0x5c1f[1]);var util=require(_0x5c1f[2]);var crypto=require(_0x5c1f[3]);var Setting=require(_0x5c1f[5])[_0x5c1f[4]];exports[_0x5c1f[6]]=function(_0x9af2x5,_0x9af2x6){Setting[_0x5c1f[11]]()[_0x5c1f[10]](function(_0x9af2x8){return _0x9af2x6[_0x5c1f[9]](200)[_0x5c1f[8]](_0x9af2x8)})[_0x5c1f[7]](function(_0x9af2x7){return handleError(_0x9af2x6,_0x9af2x7)})};exports[_0x5c1f[12]]=function(_0x9af2x5,_0x9af2x6){Setting[_0x5c1f[24]](_0x9af2x5[_0x5c1f[23]][_0x5c1f[22]])[_0x5c1f[10]](function(_0x9af2x9){if(!_0x9af2x9){return _0x9af2x6[_0x5c1f[13]](404)};if(_0x9af2x9[_0x5c1f[14]]){_0x9af2x9[_0x5c1f[14]]=decrypt(_0x5c1f[15],util[_0x5c1f[20]](_0x5c1f[16],_0x9af2x9[_0x5c1f[17]],_0x9af2x9[_0x5c1f[18]],_0x9af2x9[_0x5c1f[19]]),_0x9af2x9[_0x5c1f[14]]);_0x9af2x9[_0x5c1f[14]]=JSON[_0x5c1f[21]](_0x9af2x9[_0x5c1f[14]])};return _0x9af2x6[_0x5c1f[8]](_0x9af2x9)})[_0x5c1f[7]](function(_0x9af2x7){return handleError(_0x9af2x6,_0x9af2x7)})};exports[_0x5c1f[25]]=function(_0x9af2x5,_0x9af2x6){Setting[_0x5c1f[25]](_0x9af2x5[_0x5c1f[26]])[_0x5c1f[10]](function(_0x9af2x9){return _0x9af2x6[_0x5c1f[9]](201)[_0x5c1f[8]](_0x9af2x9)})[_0x5c1f[7]](function(_0x9af2x7){return handleError(_0x9af2x6,_0x9af2x7)})};exports[_0x5c1f[27]]=function(_0x9af2x5,_0x9af2x6){if(_0x9af2x5[_0x5c1f[26]][_0x5c1f[22]]){delete _0x9af2x5[_0x5c1f[26]][_0x5c1f[22]]};Setting[_0x5c1f[24]](_0x9af2x5[_0x5c1f[23]][_0x5c1f[22]])[_0x5c1f[10]](function(_0x9af2x9){if(!_0x9af2x9){return _0x9af2x6[_0x5c1f[13]](404)};var _0x9af2xa=_[_0x5c1f[28]](_0x9af2x9,_0x9af2x5[_0x5c1f[26]]);_0x9af2xa[_0x5c1f[29]]()[_0x5c1f[10]](function(){return _0x9af2x6[_0x5c1f[9]](200)[_0x5c1f[8]](_0x9af2x9)})[_0x5c1f[7]](function(_0x9af2x7){return handleError(_0x9af2x6,_0x9af2x7)})})[_0x5c1f[7]](function(_0x9af2x7){return handleError(_0x9af2x6,_0x9af2x7)})};exports[_0x5c1f[30]]=function(_0x9af2x5,_0x9af2x6){Setting[_0x5c1f[24]](_0x9af2x5[_0x5c1f[23]][_0x5c1f[22]])[_0x5c1f[10]](function(_0x9af2x9){if(!_0x9af2x9){return _0x9af2x6[_0x5c1f[13]](404)};_0x9af2x9[_0x5c1f[30]]()[_0x5c1f[10]](function(){return _0x9af2x6[_0x5c1f[13]](204)})[_0x5c1f[7]](function(_0x9af2x7){return handleError(_0x9af2x6,_0x9af2x7)})})[_0x5c1f[7]](function(_0x9af2x7){return handleError(_0x9af2x6,_0x9af2x7)})};function handleError(_0x9af2x6,_0x9af2x7){return _0x9af2x6[_0x5c1f[9]](500)[_0x5c1f[8]](_0x9af2x7)}function decrypt(_0x9af2xd,_0x9af2xe,_0x9af2xf){var _0x9af2x10=crypto[_0x5c1f[31]](_0x9af2xd,_0x9af2xe);var _0x9af2x11=_0x9af2x10[_0x5c1f[27]](_0x9af2xf,_0x5c1f[32],_0x5c1f[33]);_0x9af2x11+=_0x9af2x10[_0x5c1f[34]](_0x5c1f[33]);return _0x9af2x11}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var crypto = require('crypto');
+
+var Setting = require('../../models').Setting;
+
+// Get list of settings
+exports.index = function(req, res) {
+  Setting
+    .findAll()
+    .then(function(settings) {
+      return res.status(200).send(settings);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single setting
+exports.show = function(req, res) {
+  Setting
+    .findById(req.params.id)
+    .then(function(setting) {
+      if (!setting) {
+        return res.sendStatus(404);
+      }
+
+      if (setting.license) {
+        setting.license = decrypt('aes-256-ctr', util.format('%s:%s:%s',
+          setting.address, setting.netmask, setting.mac), setting.license);
+        setting.license = JSON.parse(setting.license);
+      }
+
+      return res.send(setting);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new setting in the DB.
+exports.create = function(req, res) {
+  Setting
+    .create(req.body)
+    .then(function(setting) {
+      return res.status(201).send(setting);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing setting in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  Setting
+    .findById(req.params.id)
+    .then(function(setting) {
+      if (!setting) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(setting, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(setting);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a setting from the DB.
+exports.destroy = function(req, res) {
+  Setting
+    .findById(req.params.id)
+    .then(function(setting) {
+      if (!setting) {
+        return res.sendStatus(404);
+      }
+      setting.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
+
+function decrypt(algorithm, password, text) {
+  var decipher = crypto.createDecipher(algorithm, password)
+  var dec = decipher.update(text, 'hex', 'utf8')
+  dec += decipher.final('utf8');
+  return dec;
+}
index 53cc4fd..0784c1f 100644 (file)
@@ -1 +1,24 @@
-var _0x8fa8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x74\x74\x69\x6E\x67\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x65\x74\x74\x69\x6E\x67\x3A\x72\x65\x6D\x6F\x76\x65"];_0x8fa8[0];var Setting=require(_0x8fa8[2])[_0x8fa8[1]];exports[_0x8fa8[3]]=function(_0xfe06x2){Setting[_0x8fa8[4]](function(_0xfe06x3){onSave(_0xfe06x2,_0xfe06x3)});Setting[_0x8fa8[5]](function(_0xfe06x3){onRemove(_0xfe06x2,_0xfe06x3)})};function onSave(_0xfe06x2,_0xfe06x3,_0xfe06x5){_0xfe06x2[_0x8fa8[7]](_0x8fa8[6],_0xfe06x3)}function onRemove(_0xfe06x2,_0xfe06x3,_0xfe06x5){_0xfe06x2[_0x8fa8[7]](_0x8fa8[8],_0xfe06x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Setting = require('../../models').Setting;
+
+exports.register = function(socket) {
+  Setting.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Setting.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('setting:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('setting:remove', doc);
+}
index aee67ae..eec76c9 100644 (file)
@@ -1 +1,20 @@
-var _0x4738=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x73","\x67\x65\x74"];_0x4738[0];var should=require(_0x4738[1]);var app=require(_0x4738[2]);var request=require(_0x4738[3]);describe(_0x4738[4],function(){it(_0x4738[5],function(_0x6c87x4){request(app)[_0x4738[13]](_0x4738[12])[_0x4738[11]](200)[_0x4738[11]](_0x4738[10],/json/)[_0x4738[9]](function(_0x6c87x5,_0x6c87x6){if(_0x6c87x5){return _0x6c87x4(_0x6c87x5)};_0x6c87x6[_0x4738[8]][_0x4738[1]][_0x4738[7]][_0x4738[6]](Array);_0x6c87x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/settings', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/settings')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 06017bd..fd9d420 100644 (file)
@@ -1 +1,11 @@
-var _0xf0f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x3A\x61\x63\x74\x69\x6F\x6E\x2F\x3A\x73\x74\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf0f0[0];var express=require(_0xf0f0[1]);var controller=require(_0xf0f0[2]);var auth=require(_0xf0f0[3]);var router=express.Router();router[_0xf0f0[7]](_0xf0f0[4],auth[_0xf0f0[5]](),controller[_0xf0f0[6]]);module[_0xf0f0[8]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./motionbar.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/:action/:state', auth.isAuthenticated(), controller.action);
+
+module.exports = router;
index f73195a..f0a79be 100644 (file)
@@ -1 +1,32 @@
-var _0x9506=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72\x49\x64","\x71\x75\x65\x72\x79","\x55\x73\x65\x20\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x70\x61\x72\x61\x6D\x73","\x73\x74\x61\x74\x65","\x41\x64\x6D\x69\x6E\x49\x64","\x69\x64","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65"];_0x9506[0];var _=require(_0x9506[1]);var Motionbar=require(_0x9506[3])[_0x9506[2]];exports[_0x9506[4]]=function(_0x6951x3,_0x6951x4){if(!_0x6951x3[_0x9506[6]][_0x9506[5]]){return handleError(_0x6951x4,{message:_0x9506[7]})};_0x6951x3[_0x9506[9]][_0x9506[8]]=parseInt(_0x6951x3[_0x9506[6]][_0x9506[5]],10);_0x6951x3[_0x9506[9]][_0x9506[4]]=_0x6951x3[_0x9506[10]][_0x9506[4]];_0x6951x3[_0x9506[9]][_0x9506[11]]=_0x6951x3[_0x9506[10]][_0x9506[11]];_0x6951x3[_0x9506[9]][_0x9506[12]]=_0x6951x3[_0x9506[14]][_0x9506[13]];Motionbar[_0x9506[19]](_0x6951x3[_0x9506[9]])[_0x9506[18]](function(_0x6951x6){return _0x6951x4[_0x9506[17]](201)[_0x9506[16]](_0x6951x6)})[_0x9506[15]](function(_0x6951x5){return handleError(_0x6951x4,_0x6951x5)})};function handleError(_0x6951x4,_0x6951x5){return _0x6951x4[_0x9506[17]](500)[_0x9506[16]](_0x6951x5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Motionbar = require('../../models').Motionbar;
+
+// Get list of motionbars
+exports.action = function(req, res) {
+
+  if (!req.query.userId) {
+    return handleError(res, {
+      message: 'Use userId'
+    });
+  }
+
+  req.body.UserId = parseInt(req.query.userId, 10);
+  req.body.action = req.params.action;
+  req.body.state = req.params.state;
+  req.body.AdminId = req.user.id;
+
+  Motionbar
+    .create(req.body)
+    .then(function(action) {
+      return res.status(201).send(action);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 16b4e7c..0eb15d4 100644 (file)
@@ -1 +1,27 @@
-var _0xd40b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x49\x64","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x3A\x72\x65\x6D\x6F\x76\x65"];_0xd40b[0];var Motionbar=require(_0xd40b[2])[_0xd40b[1]];exports[_0xd40b[3]]=function(_0xed6bx2){Motionbar[_0xd40b[4]](function(_0xed6bx3){onSave(_0xed6bx2,_0xed6bx3)});Motionbar[_0xd40b[5]](function(_0xed6bx3){onRemove(_0xed6bx2,_0xed6bx3)})};function onSave(_0xed6bx2,_0xed6bx3,_0xed6bx5){if(_0xed6bx2[_0xd40b[6]]==_0xed6bx3[_0xd40b[7]]){_0xed6bx2[_0xd40b[9]](_0xd40b[8],_0xed6bx3)}}function onRemove(_0xed6bx2,_0xed6bx3,_0xed6bx5){_0xed6bx2[_0xd40b[9]](_0xd40b[10],_0xed6bx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Motionbar = require('../../models').Motionbar;
+
+exports.register = function(socket) {
+  Motionbar.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Motionbar.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  // doc.UserId is string. You don't use ===
+  if (socket.userId == doc.UserId) {
+    socket.emit('motionbar:save', doc);
+  }
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('motionbar:remove', doc);
+}
index 2c49b4f..bbbac7f 100644 (file)
@@ -1 +1,20 @@
-var _0x601c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x67\x65\x74"];_0x601c[0];var should=require(_0x601c[1]);var app=require(_0x601c[2]);var request=require(_0x601c[3]);describe(_0x601c[4],function(){it(_0x601c[5],function(_0x3737x4){request(app)[_0x601c[13]](_0x601c[12])[_0x601c[11]](200)[_0x601c[11]](_0x601c[10],/json/)[_0x601c[9]](function(_0x3737x5,_0x3737x6){if(_0x3737x5){return _0x3737x4(_0x3737x5)};_0x3737x6[_0x601c[8]][_0x601c[1]][_0x601c[7]][_0x601c[6]](Array);_0x3737x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/motionbar', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/motionbar')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index b734c86..bdf03bc 100644 (file)
@@ -1 +1,17 @@
-var _0xf34e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xf34e[0];var express=require(_0xf34e[1]);var auth=require(_0xf34e[2]);var controller=require(_0xf34e[3]);var router=express.Router();router[_0xf34e[7]](_0xf34e[4],auth[_0xf34e[5]](),controller[_0xf34e[6]]);router[_0xf34e[7]](_0xf34e[8],auth[_0xf34e[5]](),controller[_0xf34e[9]]);router[_0xf34e[11]](_0xf34e[4],auth[_0xf34e[5]](),controller[_0xf34e[10]]);router[_0xf34e[13]](_0xf34e[8],auth[_0xf34e[5]](),controller[_0xf34e[12]]);router[_0xf34e[14]](_0xf34e[8],auth[_0xf34e[5]](),controller[_0xf34e[12]]);router[_0xf34e[16]](_0xf34e[4],auth[_0xf34e[5]](),controller[_0xf34e[15]]);router[_0xf34e[16]](_0xf34e[8],auth[_0xf34e[5]](),controller[_0xf34e[17]]);module[_0xf34e[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./pause.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 1df0305..84c022b 100644 (file)
@@ -1 +1,150 @@
-var _0x6f9c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x6F\x72\x64\x65\x72","\x77\x68\x65\x72\x65","\x25","\x66\x6F\x72\x45\x61\x63\x68"];_0x6f9c[0];var _=require(_0x6f9c[1]);var Util=require(_0x6f9c[2]);var Pause=require(_0x6f9c[4])[_0x6f9c[3]];function handleError(_0x63ccx5,_0x63ccx6){_0x63ccx6=_0x63ccx6||500;return function(_0x63ccx7){_0x63ccx5[_0x6f9c[6]](_0x63ccx6)[_0x6f9c[5]](_0x63ccx7)}}function responseWithResult(_0x63ccx5,_0x63ccx6){_0x63ccx6=_0x63ccx6||200;return function(_0x63ccx9){if(_0x63ccx9){_0x63ccx5[_0x6f9c[6]](_0x63ccx6)[_0x6f9c[7]](_0x63ccx9)}}}function handleEntityNotFound(_0x63ccx5){return function(_0x63ccx9){if(!_0x63ccx9){_0x63ccx5[_0x6f9c[6]](404)[_0x6f9c[8]]();return null};return _0x63ccx9}}function saveUpdates(_0x63ccxc){return function(_0x63ccx9){return _0x63ccx9[_0x6f9c[10]](_0x63ccxc)[_0x6f9c[9]](function(_0x63ccxd){return _0x63ccxd})}}function removeEntity(_0x63ccx5){return function(_0x63ccx9){if(_0x63ccx9){return _0x63ccx9[_0x6f9c[11]]()[_0x6f9c[9]](function(){_0x63ccx5[_0x6f9c[6]](204)[_0x6f9c[8]]()})}}}exports[_0x6f9c[12]]=function(_0x63ccxf,_0x63ccx5){return Pause[_0x6f9c[16]](Util[_0x6f9c[15]](_0x63ccxf[_0x6f9c[14]]))[_0x6f9c[9]](function(_0x63ccx10){_0x63ccx5[_0x6f9c[6]](200)[_0x6f9c[5]](_0x63ccx10)})[_0x6f9c[13]](function(_0x63ccx7){return handleError(_0x63ccx5,_0x63ccx7)})};exports[_0x6f9c[17]]=function(_0x63ccxf,_0x63ccx5){Pause[_0x6f9c[20]](_0x63ccxf[_0x6f9c[19]][_0x6f9c[18]])[_0x6f9c[9]](handleEntityNotFound(_0x63ccx5))[_0x6f9c[9]](responseWithResult(_0x63ccx5))[_0x6f9c[13]](handleError(_0x63ccx5))};exports[_0x6f9c[21]]=function(_0x63ccxf,_0x63ccx5){Pause[_0x6f9c[21]](_0x63ccxf[_0x6f9c[22]])[_0x6f9c[9]](responseWithResult(_0x63ccx5,201))[_0x6f9c[13]](handleError(_0x63ccx5))};exports[_0x6f9c[23]]=function(_0x63ccxf,_0x63ccx5){if(_0x63ccxf[_0x6f9c[22]][_0x6f9c[18]]){delete _0x63ccxf[_0x6f9c[22]][_0x6f9c[18]]};Pause[_0x6f9c[20]](_0x63ccxf[_0x6f9c[19]][_0x6f9c[18]])[_0x6f9c[9]](handleEntityNotFound(_0x63ccx5))[_0x6f9c[9]](saveUpdates(_0x63ccxf[_0x6f9c[22]]))[_0x6f9c[9]](responseWithResult(_0x63ccx5))[_0x6f9c[13]](handleError(_0x63ccx5))};exports[_0x6f9c[11]]=function(_0x63ccxf,_0x63ccx5){Pause[_0x6f9c[20]](_0x63ccxf[_0x6f9c[19]][_0x6f9c[18]])[_0x6f9c[9]](handleEntityNotFound(_0x63ccx5))[_0x6f9c[9]](removeEntity(_0x63ccx5))[_0x6f9c[13]](handleError(_0x63ccx5))};exports[_0x6f9c[24]]=function(_0x63ccxf,_0x63ccx5){return Pause[_0x6f9c[11]]({where:{id:_0x63ccxf[_0x6f9c[14]][_0x6f9c[26]]},individualHooks:true})[_0x6f9c[9]](function(){return _0x63ccx5[_0x6f9c[25]](204)})[_0x6f9c[13]](function(_0x63ccx7){return handleError(_0x63ccx5,_0x63ccx7)})};function getQuery(_0x63ccx12){var _0x63ccx13={where:{}};_[_0x6f9c[32]](_0x63ccx12,function(_0x63ccx14,_0x63ccx15){switch(_0x63ccx15){case _0x6f9c[27]:;case _0x6f9c[28]:;case _0x6f9c[29]:_0x63ccx13[_0x63ccx15]=_0x63ccx14;break;default:_0x63ccx13[_0x6f9c[30]][_0x63ccx15]={$like:_0x6f9c[31]+_0x63ccx14+_0x6f9c[31]}}});return _0x63ccx13}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/pauses              ->  index
+ * POST    /api/pauses              ->  create
+ * GET     /api/pauses/:id          ->  show
+ * PUT     /api/pauses/:id          ->  update
+ * DELETE  /api/pauses/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var Pause = require('../../models').Pause;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function (err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function (entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function (entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function (entity) {
+    return entity.updateAttributes(updates)
+      .then(function (updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function (entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function () {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of Pauses
+exports.index = function (req, res) {
+  return Pause
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function (result) {
+      res.status(200).send(result);
+    })
+    .catch(function (err) {
+      return handleError(res, err);
+    });
+}
+
+// Gets a single Pause from the DB
+exports.show = function (req, res) {
+  Pause.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new Pause in the DB
+exports.create = function (req, res) {
+  Pause.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing Pause in the DB
+exports.update = function (req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  Pause.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a Pause from the DB
+exports.destroy = function (req, res) {
+  Pause.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function (req, res) {
+
+  return Pause
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function () {
+      return res.sendStatus(204);
+    })
+    .catch(function (err) {
+      return handleError(res, err);
+    });
+};
+
+function getQuery(query) {
+  var _query = {
+    where: {}
+  };
+
+  _.forEach(query, function (value, key) {
+    switch (key) {
+    case 'limit':
+    case 'offset':
+    case 'order':
+      _query[key] = value;
+      break;
+    default:
+      _query.where[key] = {
+        $like: '%' + value + '%'
+      };
+    }
+  });
+
+  return _query;
+}
index 864eec0..fd1c7b0 100644 (file)
@@ -1 +1,24 @@
-var _0x7732=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x70\x61\x75\x73\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x70\x61\x75\x73\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x7732[0];var Pause=require(_0x7732[2])[_0x7732[1]];exports[_0x7732[3]]=function(_0x55afx2){Pause[_0x7732[4]](function(_0x55afx3){onSave(_0x55afx2,_0x55afx3)});Pause[_0x7732[5]](function(_0x55afx3){onRemove(_0x55afx2,_0x55afx3)})};function onSave(_0x55afx2,_0x55afx3,_0x55afx5){_0x55afx2[_0x7732[7]](_0x7732[6],_0x55afx3)}function onRemove(_0x55afx2,_0x55afx3,_0x55afx5){_0x55afx2[_0x7732[7]](_0x7732[8],_0x55afx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Pause = require('../../models').Pause;
+
+exports.register = function(socket) {
+  Pause.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Pause.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('pause:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('pause:remove', doc);
+}
index d124f5b..92aec80 100644 (file)
@@ -1 +1,16 @@
-var _0x87aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x87aa[0];var express=require(_0x87aa[1]);var controller=require(_0x87aa[2]);var router=express.Router();router[_0x87aa[5]](_0x87aa[3],controller[_0x87aa[4]]);router[_0x87aa[5]](_0x87aa[6],controller[_0x87aa[7]]);router[_0x87aa[5]](_0x87aa[8],controller[_0x87aa[9]]);router[_0x87aa[11]](_0x87aa[3],controller[_0x87aa[10]]);router[_0x87aa[13]](_0x87aa[8],controller[_0x87aa[12]]);router[_0x87aa[14]](_0x87aa[8],controller[_0x87aa[12]]);router[_0x87aa[16]](_0x87aa[8],controller[_0x87aa[15]]);module[_0x87aa[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_agent.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/describe', controller.describe);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 191ce71..1b848da 100644 (file)
@@ -1 +1,106 @@
-var _0xa28b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xa28b[0];var _=require(_0xa28b[1]);var ReportAgent=require(_0xa28b[3])[_0xa28b[2]];var ReportAgentHistory=require(_0xa28b[3])[_0xa28b[5]][_0xa28b[4]];exports[_0xa28b[6]]=function(_0x210ax4,_0x210ax5){ReportAgent[_0xa28b[11]]()[_0xa28b[10]](function(_0x210ax7){return _0x210ax5[_0xa28b[9]](200)[_0xa28b[8]](_0x210ax7)})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})};exports[_0xa28b[12]]=function(_0x210ax4,_0x210ax5){ReportAgentHistory[_0xa28b[12]]()[_0xa28b[10]](function(_0x210ax8){return _0x210ax5[_0xa28b[9]](200)[_0xa28b[8]](_0x210ax8)})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})};exports[_0xa28b[13]]=function(_0x210ax4,_0x210ax5){ReportAgent[_0xa28b[17]](_0x210ax4[_0xa28b[16]][_0xa28b[15]])[_0xa28b[10]](function(_0x210ax9){if(!_0x210ax9){return _0x210ax5[_0xa28b[14]](404)};return _0x210ax5[_0xa28b[8]](_0x210ax9)})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})};exports[_0xa28b[18]]=function(_0x210ax4,_0x210ax5){ReportAgent[_0xa28b[18]](_0x210ax4[_0xa28b[19]])[_0xa28b[10]](function(_0x210ax9){return _0x210ax5[_0xa28b[9]](201)[_0xa28b[8]](_0x210ax9)})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})};exports[_0xa28b[20]]=function(_0x210ax4,_0x210ax5){if(_0x210ax4[_0xa28b[19]][_0xa28b[15]]){delete _0x210ax4[_0xa28b[19]][_0xa28b[15]]};ReportAgent[_0xa28b[17]](_0x210ax4[_0xa28b[16]][_0xa28b[15]])[_0xa28b[10]](function(_0x210ax9){if(!_0x210ax9){return _0x210ax5[_0xa28b[14]](404)};var _0x210axa=_[_0xa28b[21]](_0x210ax9,_0x210ax4[_0xa28b[19]]);_0x210axa[_0xa28b[22]]()[_0xa28b[10]](function(){return _0x210ax5[_0xa28b[9]](200)[_0xa28b[8]](_0x210ax9)})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})};exports[_0xa28b[23]]=function(_0x210ax4,_0x210ax5){ReportAgent[_0xa28b[17]](_0x210ax4[_0xa28b[16]][_0xa28b[15]])[_0xa28b[10]](function(_0x210ax9){if(!_0x210ax9){return _0x210ax5[_0xa28b[14]](404)};_0x210ax9[_0xa28b[23]]()[_0xa28b[10]](function(){return _0x210ax5[_0xa28b[14]](204)})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})})[_0xa28b[7]](function(_0x210ax6){return handleError(_0x210ax5,_0x210ax6)})};function handleError(_0x210ax5,_0x210ax6){return _0x210ax5[_0xa28b[9]](500)[_0xa28b[8]](_0x210ax6)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ReportAgent = require('../../models').ReportAgent;
+var ReportAgentHistory = require('../../models').history.ReportAgentHistory;
+
+// Get list of report_agents
+exports.index = function(req, res) {
+  ReportAgent
+    .findAll()
+    .then(function(report_agents) {
+      return res.status(200).send(report_agents);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get list of fields
+exports.describe = function(req, res) {
+  ReportAgentHistory
+    .describe()
+    .then(function(fields) {
+      return res.status(200).send(fields);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single report_agent
+exports.show = function(req, res) {
+  ReportAgent
+    .findById(req.params.id)
+    .then(function(report_agent) {
+      if (!report_agent) {
+        return res.sendStatus(404);
+      }
+      return res.send(report_agent);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new report_agent in the DB.
+exports.create = function(req, res) {
+  ReportAgent
+    .create(req.body)
+    .then(function(report_agent) {
+      return res.status(201).send(report_agent);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing report_agent in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  ReportAgent
+    .findById(req.params.id)
+    .then(function(report_agent) {
+      if (!report_agent) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(report_agent, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(report_agent);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a report_agent from the DB.
+exports.destroy = function(req, res) {
+  ReportAgent
+    .findById(req.params.id)
+    .then(function(report_agent) {
+      if (!report_agent) {
+        return res.sendStatus(404);
+      }
+      report_agent.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index e0f5a97..86cb2bb 100644 (file)
@@ -1 +1,30 @@
-var _0xf010=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xf010[0];var ReportAgent=require(_0xf010[2])[_0xf010[1]];exports[_0xf010[3]]=function(_0xbd77x2){ReportAgent[_0xf010[4]](function(_0xbd77x3){onSave(_0xbd77x2,_0xbd77x3)});ReportAgent[_0xf010[5]](function(_0xbd77x3){onSave(_0xbd77x2,_0xbd77x3)});ReportAgent[_0xf010[6]](function(_0xbd77x3){onRemove(_0xbd77x2,_0xbd77x3)})};function onSave(_0xbd77x2,_0xbd77x3,_0xbd77x5){if(_0xbd77x2[_0xf010[7]]===_0xbd77x3[_0xf010[8]]||_0xbd77x2[_0xf010[9]]===_0xf010[10]){_0xbd77x2[_0xf010[12]](_0xf010[11],_0xbd77x3)}}function onRemove(_0xbd77x2,_0xbd77x3,_0xbd77x5){_0xbd77x2[_0xf010[12]](_0xf010[13],_0xbd77x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportAgent = require('../../models').ReportAgent;
+
+exports.register = function(socket) {
+  ReportAgent.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportAgent.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportAgent.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  if (socket.name === doc.membername || socket.role === 'admin') {
+    socket.emit('report_agent:save', doc);
+  }
+
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_agent:remove', doc);
+}
index ccf3c44..442fcc0 100644 (file)
@@ -1 +1,22 @@
-var _0xd9e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x67\x6C\x6F\x62\x61\x6C\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x47\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x76\x67\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x65\x64","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x65\x64","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd9e3[0];var express=require(_0xd9e3[1]);var auth=require(_0xd9e3[2]);var controller=require(_0xd9e3[3]);var router=express.Router();router[_0xd9e3[7]](_0xd9e3[4],auth[_0xd9e3[5]](),controller[_0xd9e3[6]]);router[_0xd9e3[7]](_0xd9e3[8],controller[_0xd9e3[9]]);router[_0xd9e3[7]](_0xd9e3[10],controller[_0xd9e3[11]]);router[_0xd9e3[7]](_0xd9e3[12],controller[_0xd9e3[13]]);router[_0xd9e3[7]](_0xd9e3[14],controller[_0xd9e3[15]]);router[_0xd9e3[7]](_0xd9e3[16],controller[_0xd9e3[17]]);router[_0xd9e3[7]](_0xd9e3[18],auth[_0xd9e3[5]](),controller[_0xd9e3[19]]);router[_0xd9e3[21]](_0xd9e3[4],auth[_0xd9e3[5]](),controller[_0xd9e3[20]]);router[_0xd9e3[23]](_0xd9e3[18],auth[_0xd9e3[5]](),controller[_0xd9e3[22]]);router[_0xd9e3[24]](_0xd9e3[18],auth[_0xd9e3[5]](),controller[_0xd9e3[22]]);router[_0xd9e3[26]](_0xd9e3[18],auth[_0xd9e3[5]](),controller[_0xd9e3[25]]);module[_0xd9e3[27]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./report_call.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/manualoutbound', controller.manualOutbound);
+router.get('/manualoutboundglobalduration', controller.manualOutboundGlobalDuration);
+router.get('/manualoutboundavgduration', controller.manualOutboundAvgDuration);
+router.get('/manualoutboundanswered', controller.manualOutboundAnswered);
+router.get('/manualoutboundanswerrate', controller.manualOutboundAnswerRate);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 399d6bc..d8b1ba0 100644 (file)
@@ -1 +1,192 @@
-var _0x69db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x61\x74\x61","\x6C\x6F\x67","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x63\x6F\x75\x6E\x74","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x47\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22\x2C\x20\x31\x2C\x20\x30\x29\x29\x20\x2F\x20\x43\x4F\x55\x4E\x54\x28\x2A\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x69db[0];var _=require(_0x69db[1]);var sequelize=require(_0x69db[3])[_0x69db[2]];var ReportCall=require(_0x69db[3])[_0x69db[4]];function handleError(_0x7b82x5,_0x7b82x6){_0x7b82x6=_0x7b82x6||500;return function(_0x7b82x7){_0x7b82x5[_0x69db[6]](_0x7b82x6)[_0x69db[5]](_0x7b82x7)}}function responseWithResult(_0x7b82x5,_0x7b82x6){_0x7b82x6=_0x7b82x6||200;return function(_0x7b82x9){if(_0x7b82x9){_0x7b82x5[_0x69db[6]](_0x7b82x6)[_0x69db[7]](_0x7b82x9)}}}function handleEntityNotFound(_0x7b82x5){return function(_0x7b82x9){if(!_0x7b82x9){_0x7b82x5[_0x69db[6]](404)[_0x69db[8]]();return null};return _0x7b82x9}}function saveUpdates(_0x7b82xc){return function(_0x7b82x9){return _0x7b82x9[_0x69db[10]](_0x7b82xc)[_0x69db[9]](function(_0x7b82xd){return _0x7b82xd})}}function removeEntity(_0x7b82x5){return function(_0x7b82x9){if(_0x7b82x9){return _0x7b82x9[_0x69db[11]]()[_0x69db[9]](function(){_0x7b82x5[_0x69db[6]](204)[_0x69db[8]]()})}}}exports[_0x69db[12]]=function(_0x7b82xf,_0x7b82x5){ReportCall[_0x69db[14]]()[_0x69db[9]](responseWithResult(_0x7b82x5))[_0x69db[13]](handleError(_0x7b82x5))};exports[_0x69db[15]]=function(_0x7b82xf,_0x7b82x5){ReportCall[_0x69db[18]](_0x7b82xf[_0x69db[17]][_0x69db[16]])[_0x69db[9]](handleEntityNotFound(_0x7b82x5))[_0x69db[9]](responseWithResult(_0x7b82x5))[_0x69db[13]](handleError(_0x7b82x5))};exports[_0x69db[19]]=function(_0x7b82xf,_0x7b82x5){return ReportCall[_0x69db[23]]({where:{type:_0x69db[22]}})[_0x69db[9]](function(_0x7b82x10){console[_0x69db[21]](_0x69db[20],_0x7b82x10);return _0x7b82x5[_0x69db[6]](200)[_0x69db[5]]({value:_0x7b82x10})})[_0x69db[13]](function(_0x7b82x7){return handleError(_0x7b82x5,_0x7b82x7)})};exports[_0x69db[24]]=function(_0x7b82xf,_0x7b82x5){return sequelize[_0x69db[29]](_0x69db[26],{type:sequelize[_0x69db[28]][_0x69db[27]]})[_0x69db[9]](function(_0x7b82x10){return _0x7b82x5[_0x69db[6]](200)[_0x69db[5]]({value:_0x7b82x10[0][_0x69db[25]]})})[_0x69db[13]](function(_0x7b82x7){return handleError(_0x7b82x5,_0x7b82x7)})};exports[_0x69db[30]]=function(_0x7b82xf,_0x7b82x5){return sequelize[_0x69db[29]](_0x69db[31],{type:sequelize[_0x69db[28]][_0x69db[27]]})[_0x69db[9]](function(_0x7b82x10){return _0x7b82x5[_0x69db[6]](200)[_0x69db[5]]({value:_0x7b82x10[0][_0x69db[25]]})})[_0x69db[13]](function(_0x7b82x7){return handleError(_0x7b82x5,_0x7b82x7)})};exports[_0x69db[32]]=function(_0x7b82xf,_0x7b82x5){return ReportCall[_0x69db[23]]({where:{disposition:_0x69db[33],type:_0x69db[22]}})[_0x69db[9]](function(_0x7b82x10){return _0x7b82x5[_0x69db[6]](200)[_0x69db[5]]({value:_0x7b82x10})})[_0x69db[13]](function(_0x7b82x7){return handleError(_0x7b82x5,_0x7b82x7)})};exports[_0x69db[34]]=function(_0x7b82xf,_0x7b82x5){return sequelize[_0x69db[29]](_0x69db[35],{type:sequelize[_0x69db[28]][_0x69db[27]]})[_0x69db[9]](function(_0x7b82x10){return _0x7b82x5[_0x69db[6]](200)[_0x69db[5]]({value:_0x7b82x10[0][_0x69db[25]]})})[_0x69db[13]](function(_0x7b82x7){return handleError(_0x7b82x5,_0x7b82x7)})};exports[_0x69db[36]]=function(_0x7b82xf,_0x7b82x5){ReportCall[_0x69db[36]](_0x7b82xf[_0x69db[37]])[_0x69db[9]](responseWithResult(_0x7b82x5,201))[_0x69db[13]](handleError(_0x7b82x5))};exports[_0x69db[38]]=function(_0x7b82xf,_0x7b82x5){if(_0x7b82xf[_0x69db[37]][_0x69db[16]]){delete _0x7b82xf[_0x69db[37]][_0x69db[16]]};ReportCall[_0x69db[18]](_0x7b82xf[_0x69db[17]][_0x69db[16]])[_0x69db[9]](handleEntityNotFound(_0x7b82x5))[_0x69db[9]](saveUpdates(_0x7b82xf[_0x69db[37]]))[_0x69db[9]](responseWithResult(_0x7b82x5))[_0x69db[13]](handleError(_0x7b82x5))};exports[_0x69db[11]]=function(_0x7b82xf,_0x7b82x5){ReportCall[_0x69db[18]](_0x7b82xf[_0x69db[17]][_0x69db[16]])[_0x69db[9]](handleEntityNotFound(_0x7b82x5))[_0x69db[9]](removeEntity(_0x7b82x5))[_0x69db[13]](handleError(_0x7b82x5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/report/calls              ->  index
+ * POST    /api/report/calls              ->  create
+ * GET     /api/report/calls/:id          ->  show
+ * PUT     /api/report/calls/:id          ->  update
+ * DELETE  /api/report/calls/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var sequelize = require('../../models').sequelize;
+var ReportCall = require('../../models').ReportCall;
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity
+        .destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of ReportCalls
+exports.index = function(req, res) {
+  ReportCall.findAll()
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single ReportCall from the DB
+exports.show = function(req, res) {
+  ReportCall.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Get Answered Calls
+exports.manualOutbound = function(req, res) {
+  return ReportCall
+    .count({
+      where: {
+        type: 'outbound'
+      }
+    })
+    .then(function(data) {
+      console.log('data', data);
+      return res.status(200).send({
+        value: data
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.manualOutboundGlobalDuration = function(req, res) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(SUM(duration)) as value FROM report_call WHERE type=\"outbound\"', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.manualOutboundAvgDuration = function(req, res) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(ROUND(AVG(duration), 0)) as value FROM report_call WHERE type=\"outbound\"', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.manualOutboundAnswered = function(req, res) {
+  return ReportCall
+    .count({
+      where: {
+        disposition: 'ANSWERED',
+        type: 'outbound'
+      }
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.manualOutboundAnswerRate = function(req, res) {
+  return sequelize
+    .query('SELECT ROUND(SUM(IF(disposition=\"ANSWERED\", 1, 0)) / COUNT(*) * 100, 1) as value FROM report_call WHERE type=\"outbound\"', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+
+// Creates a new ReportCall in the DB
+exports.create = function(req, res) {
+  ReportCall.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing ReportCall in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  ReportCall.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a ReportCall from the DB
+exports.destroy = function(req, res) {
+  ReportCall.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
index fa49535..73f0ccd 100644 (file)
@@ -1 +1,24 @@
-var _0x8a5a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x3A\x72\x65\x6D\x6F\x76\x65"];_0x8a5a[0];var ReportCall=require(_0x8a5a[2])[_0x8a5a[1]];exports[_0x8a5a[3]]=function(_0xfe2ex2){ReportCall[_0x8a5a[4]](function(_0xfe2ex3){onSave(_0xfe2ex2,_0xfe2ex3)});ReportCall[_0x8a5a[5]](function(_0xfe2ex3){onRemove(_0xfe2ex2,_0xfe2ex3)})};function onSave(_0xfe2ex2,_0xfe2ex3,_0xfe2ex5){_0xfe2ex2[_0x8a5a[7]](_0x8a5a[6],_0xfe2ex3)}function onRemove(_0xfe2ex2,_0xfe2ex3,_0xfe2ex5){_0xfe2ex2[_0x8a5a[7]](_0x8a5a[8],_0xfe2ex3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportCall = require('../../models').ReportCall;
+
+exports.register = function(socket) {
+  ReportCall.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportCall.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('report_call:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_call:remove', doc);
+}
index 7069f06..7701153 100644 (file)
@@ -1 +1,17 @@
-var _0x19db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x63\x63\x65\x70\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x19db[0];var express=require(_0x19db[1]);var controller=require(_0x19db[2]);var auth=require(_0x19db[3]);var router=express.Router();router[_0x19db[6]](_0x19db[4],controller[_0x19db[5]]);router[_0x19db[6]](_0x19db[7],controller[_0x19db[8]]);router[_0x19db[6]](_0x19db[9],auth[_0x19db[10]](),controller[_0x19db[11]]);router[_0x19db[13]](_0x19db[4],controller[_0x19db[12]]);router[_0x19db[15]](_0x19db[7],controller[_0x19db[14]]);router[_0x19db[16]](_0x19db[7],controller[_0x19db[14]]);router[_0x19db[18]](_0x19db[7],controller[_0x19db[17]]);module[_0x19db[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_chat.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), controller.accept);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index b463376..25acee0 100644 (file)
@@ -1 +1,156 @@
-var _0x5fb8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x63\x63\x65\x70\x74\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x62\x61\x73\x65\x36\x34","\x75\x73\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x75\x70\x64\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x74\x72\x6F\x79"];_0x5fb8[0];var _=require(_0x5fb8[1]);var md5=require(_0x5fb8[2]);var ReportChat=require(_0x5fb8[4])[_0x5fb8[3]];var ChatRoom=require(_0x5fb8[4])[_0x5fb8[5]];var ChatVisitor=require(_0x5fb8[4])[_0x5fb8[6]];var Agent=require(_0x5fb8[4])[_0x5fb8[7]];var sequelize=require(_0x5fb8[4])[_0x5fb8[8]];var Util=require(_0x5fb8[9]);exports[_0x5fb8[10]]=function(_0x8c25x9,_0x8c25xa,_0x8c25xb){return ReportChat[_0x5fb8[17]](Util[_0x5fb8[16]](_0x8c25x9[_0x5fb8[15]]))[_0x5fb8[14]](function(_0x8c25xd){_0x8c25xa[_0x5fb8[13]](200)[_0x5fb8[12]](_0x8c25xd)})[_0x5fb8[11]](function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})};exports[_0x5fb8[18]]=function(_0x8c25x9,_0x8c25xa){return ReportChat[_0x5fb8[22]](_0x8c25x9[_0x5fb8[21]][_0x5fb8[20]])[_0x5fb8[14]](function(_0x8c25xe){if(!_0x8c25xe){return _0x8c25xa[_0x5fb8[19]](404)};return _0x8c25xa[_0x5fb8[12]](_0x8c25xe)})[_0x5fb8[11]](function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})};exports[_0x5fb8[23]]=function(_0x8c25x9,_0x8c25xa){var _0x8c25xf=_0x8c25x9[_0x5fb8[21]][_0x5fb8[26]][_0x5fb8[25]](_0x5fb8[24])[1];var _0x8c25x10;return ChatRoom[_0x5fb8[22]](_0x8c25xf)[_0x5fb8[14]](function(_0x8c25x13){_0x8c25x10=_0x8c25x13;return _0x8c25x10[_0x5fb8[34]](_0x8c25x9[_0x5fb8[31]][_0x5fb8[20]],{individualHooks:true})})[_0x5fb8[14]](function(){return _0x8c25x10[_0x5fb8[33]]({token:md5(JSON[_0x5fb8[32]]([_0x8c25x9[_0x5fb8[31]][_0x5fb8[20]]])).toString(_0x5fb8[30])})})[_0x5fb8[14]](function(){return ReportChat[_0x5fb8[22]](_0x8c25x9[_0x5fb8[21]][_0x5fb8[20]])})[_0x5fb8[14]](function(_0x8c25xe){if(!_0x8c25xe){return _0x8c25xa[_0x5fb8[19]](404)};var _0x8c25x12=_[_0x5fb8[28]](_0x8c25xe,{connectid:_0x8c25x9[_0x5fb8[21]][_0x5fb8[26]]});return _0x8c25x12[_0x5fb8[29]]()})[_0x5fb8[14]](function(){return ChatVisitor[_0x5fb8[22]](_0x8c25x10.ChatVisitorId)})[_0x5fb8[14]](function(_0x8c25x11){if(!_0x8c25x11){return _0x8c25xa[_0x5fb8[19]](404)};var _0x8c25x12=_[_0x5fb8[28]](_0x8c25x11,{status:_0x5fb8[27]});return _0x8c25x12[_0x5fb8[29]]()})[_0x5fb8[14]](function(){return _0x8c25xa[_0x5fb8[19]](200)})[_0x5fb8[11]](function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})};exports[_0x5fb8[35]]=function(_0x8c25x9,_0x8c25xa){return ReportChat[_0x5fb8[35]](_0x8c25x9[_0x5fb8[36]])[_0x5fb8[14]](function(_0x8c25xe){return _0x8c25xa[_0x5fb8[13]](201)[_0x5fb8[12]](_0x8c25xe)})[_0x5fb8[11]](function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})};exports[_0x5fb8[33]]=function(_0x8c25x9,_0x8c25xa,_0x8c25xb){if(_0x8c25x9[_0x5fb8[36]][_0x5fb8[20]]){delete _0x8c25x9[_0x5fb8[36]][_0x5fb8[20]]};return ReportChat[_0x5fb8[22]](_0x8c25x9[_0x5fb8[21]][_0x5fb8[20]])[_0x5fb8[14]](function(_0x8c25xe){if(!_0x8c25xe){return _0x8c25xa[_0x5fb8[19]](404)};var _0x8c25x12=_[_0x5fb8[28]](_0x8c25xe,_0x8c25x9[_0x5fb8[36]]);return _0x8c25x12[_0x5fb8[29]]()[_0x5fb8[14]](function(){return _0x8c25xa[_0x5fb8[13]](200)[_0x5fb8[12]](_0x8c25xe)})})[_0x5fb8[11]](sequelize.ValidationError,function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})[_0x5fb8[11]](function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})};exports[_0x5fb8[37]]=function(_0x8c25x9,_0x8c25xa){ReportChat[_0x5fb8[22]](_0x8c25x9[_0x5fb8[21]][_0x5fb8[20]])[_0x5fb8[14]](function(_0x8c25xe){if(!_0x8c25xe){return _0x8c25xa[_0x5fb8[19]](404)};_0x8c25xe[_0x5fb8[37]]()[_0x5fb8[14]](function(){return _0x8c25xa[_0x5fb8[19]](204)})[_0x5fb8[11]](function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})})[_0x5fb8[11]](function(_0x8c25xc){return handleError(_0x8c25xa,_0x8c25xc)})};function handleError(_0x8c25xa,_0x8c25xc){return _0x8c25xa[_0x5fb8[13]](500)[_0x5fb8[12]](_0x8c25xc)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var md5 = require('md5');
+
+var ReportChat = require('../../models').ReportChat;
+var ChatRoom = require('../../models').ChatRoom;
+var ChatVisitor = require('../../models').ChatVisitor;
+var Agent = require('../../models').User;
+var sequelize = require('../../models').sequelize;
+
+var Util = require('../../config/util');
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return ReportChat
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Ge
+// Get a single reportChat
+exports.show = function(req, res) {
+  return ReportChat
+    .findById(req.params.id)
+    .then(function(reportChat) {
+      if (!reportChat) {
+        return res.sendStatus(404);
+      }
+      return res.send(reportChat);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single reportMail
+exports.accept = function(req, res) {
+  var _roomid = req.params.uniqueid.split('.')[1];
+  var _chatRoom;
+
+  return ChatRoom
+    .findById(_roomid)
+    .then(function(chatRoom) {
+      _chatRoom = chatRoom;
+      return _chatRoom
+        .addUser(req.user.id, {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return _chatRoom
+        .update({
+          token: md5(JSON.stringify([req.user.id])).toString('base64')
+        })
+    })
+    .then(function() {
+      return ReportChat
+        .findById(req.params.id);
+    })
+    .then(function(reportChat) {
+      if (!reportChat) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(reportChat, {
+        connectid: req.params.uniqueid
+      });
+      return updated.save();
+    })
+    .then(function() {
+      return ChatVisitor.findById(_chatRoom.ChatVisitorId);
+    })
+    .then(function(chatVisitor) {
+      if (!chatVisitor) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(chatVisitor, {
+        status: 'accepted'
+      });
+      return updated.save();
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new reportChat in the DB.
+exports.create = function(req, res) {
+  return ReportChat
+    .create(req.body)
+    .then(function(reportChat) {
+      return res.status(201).send(reportChat);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing reportChat in the DB.
+exports.update = function(req, res, next) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return ReportChat
+    .findById(req.params.id)
+    .then(function(reportChat) {
+      if (!reportChat) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(reportChat, req.body);
+      return updated
+        .save()
+        .then(function() {
+          return res.status(200).send(reportChat);
+        });
+    })
+    .catch(sequelize.ValidationError, function(err) {
+      return handleError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a reportChat from the DB.
+exports.destroy = function(req, res) {
+  ReportChat
+    .findById(req.params.id)
+    .then(function(reportChat) {
+      if (!reportChat) {
+        return res.sendStatus(404);
+      }
+      reportChat.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index aaf2a80..dd9728d 100644 (file)
@@ -1 +1,35 @@
-var _0x7219=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x61\x67\x65\x6E\x74\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x7219[0];var ReportChat=require(_0x7219[2])[_0x7219[1]];exports[_0x7219[3]]=function(_0x1818x2){ReportChat[_0x7219[4]](function(_0x1818x3){onSave(_0x1818x2,_0x1818x3)});ReportChat[_0x7219[5]](function(_0x1818x3){onUpdate(_0x1818x2,_0x1818x3)});ReportChat[_0x7219[6]](function(_0x1818x3){onRemove(_0x1818x2,_0x1818x3)})};function onSave(_0x1818x2,_0x1818x3,_0x1818x5){if(_0x1818x2[_0x7219[7]]===_0x1818x3[_0x7219[8]]||_0x1818x2[_0x7219[9]]===_0x7219[10]){_0x1818x2[_0x7219[12]](_0x7219[11],_0x1818x3)}}function onUpdate(_0x1818x2,_0x1818x3,_0x1818x5){if(_0x1818x2[_0x7219[7]]===_0x1818x3[_0x7219[8]]||_0x1818x2[_0x7219[9]]===_0x7219[10]){_0x1818x2[_0x7219[12]](_0x7219[13],_0x1818x3)}}function onRemove(_0x1818x2,_0x1818x3,_0x1818x5){_0x1818x2[_0x7219[12]](_0x7219[14],_0x1818x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportChat = require('../../models').ReportChat;
+
+exports.register = function(socket) {
+  ReportChat.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportChat.afterUpdate(function(doc) {
+    onUpdate(socket, doc);
+  });
+  ReportChat.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  if (socket.name === doc.agentname || socket.role === 'admin') {
+    socket.emit('report_chat:save', doc);
+  }
+}
+
+function onUpdate(socket, doc, cb) {
+  if (socket.name === doc.agentname || socket.role === 'admin') {
+    socket.emit('report_chat:update', doc);
+  }
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_chat:remove', doc);
+}
index 64e5b87..030bd33 100644 (file)
@@ -1 +1,16 @@
-var _0x1e44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1e44[0];var express=require(_0x1e44[1]);var controller=require(_0x1e44[2]);var router=express.Router();router[_0x1e44[5]](_0x1e44[3],controller[_0x1e44[4]]);router[_0x1e44[5]](_0x1e44[6],controller[_0x1e44[7]]);router[_0x1e44[5]](_0x1e44[8],controller[_0x1e44[9]]);router[_0x1e44[11]](_0x1e44[3],controller[_0x1e44[10]]);router[_0x1e44[13]](_0x1e44[8],controller[_0x1e44[12]]);router[_0x1e44[14]](_0x1e44[8],controller[_0x1e44[12]]);router[_0x1e44[16]](_0x1e44[8],controller[_0x1e44[15]]);module[_0x1e44[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_chat_session.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/describe', controller.describe);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index f50e7e6..c3cd755 100644 (file)
@@ -1 +1,107 @@
-var _0x9080=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x9080[0];var _=require(_0x9080[1]);var ReportChatSession=require(_0x9080[3])[_0x9080[2]];var ReportChatSessionHistory=require(_0x9080[3])[_0x9080[5]][_0x9080[4]];var Util=require(_0x9080[6]);exports[_0x9080[7]]=function(_0xced2x5,_0xced2x6,_0xced2x7){return ReportChatSession[_0x9080[14]](Util[_0x9080[13]](_0xced2x5[_0x9080[12]]))[_0x9080[11]](function(_0xced2x9){_0xced2x6[_0x9080[10]](200)[_0x9080[9]](_0xced2x9)})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})};exports[_0x9080[15]]=function(_0xced2x5,_0xced2x6){return ReportChatSessionHistory[_0x9080[15]]()[_0x9080[11]](function(_0xced2xa){return _0xced2x6[_0x9080[10]](200)[_0x9080[9]](_0xced2xa)})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})};exports[_0x9080[16]]=function(_0xced2x5,_0xced2x6){return ReportChatSession[_0x9080[20]](_0xced2x5[_0x9080[19]][_0x9080[18]])[_0x9080[11]](function(_0xced2xb){if(!_0xced2xb){return _0xced2x6[_0x9080[17]](404)};return _0xced2x6[_0x9080[9]](_0xced2xb)})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})};exports[_0x9080[21]]=function(_0xced2x5,_0xced2x6){return ReportChatSession[_0x9080[21]](_0xced2x5[_0x9080[22]])[_0x9080[11]](function(_0xced2xb){return _0xced2x6[_0x9080[10]](201)[_0x9080[9]](_0xced2xb)})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})};exports[_0x9080[23]]=function(_0xced2x5,_0xced2x6){if(_0xced2x5[_0x9080[22]][_0x9080[18]]){delete _0xced2x5[_0x9080[22]][_0x9080[18]]};return ReportChatSession[_0x9080[20]](_0xced2x5[_0x9080[19]][_0x9080[18]])[_0x9080[11]](function(_0xced2xb){if(!_0xced2xb){return _0xced2x6[_0x9080[17]](404)};var _0xced2xc=_[_0x9080[24]](_0xced2xb,_0xced2x5[_0x9080[22]]);_0xced2xc[_0x9080[25]]()[_0x9080[11]](function(){return _0xced2x6[_0x9080[10]](200)[_0x9080[9]](_0xced2xb)})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})};exports[_0x9080[26]]=function(_0xced2x5,_0xced2x6){return ReportChatSession[_0x9080[20]](_0xced2x5[_0x9080[19]][_0x9080[18]])[_0x9080[11]](function(_0xced2xb){if(!_0xced2xb){return _0xced2x6[_0x9080[17]](404)};_0xced2xb[_0x9080[26]]()[_0x9080[11]](function(){return _0xced2x6[_0x9080[17]](204)})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})})[_0x9080[8]](function(_0xced2x8){return handleError(_0xced2x6,_0xced2x8)})};function handleError(_0xced2x6,_0xced2x8){return _0xced2x6[_0x9080[10]](500)[_0x9080[9]](_0xced2x8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ReportChatSession = require('../../models').ReportChatSession;
+var ReportChatSessionHistory = require('../../models').history.ReportChatSessionHistory;
+
+var Util = require('../../config/util');
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return ReportChatSession
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Get list of fields
+exports.describe = function(req, res) {
+  return ReportChatSessionHistory
+    .describe()
+    .then(function(fields) {
+      return res.status(200).send(fields);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single report_chat_session
+exports.show = function(req, res) {
+  return ReportChatSession
+    .findById(req.params.id)
+    .then(function(report_chat_session) {
+      if (!report_chat_session) {
+        return res.sendStatus(404);
+      }
+      return res.send(report_chat_session);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new report_chat_session in the DB.
+exports.create = function(req, res) {
+  return ReportChatSession
+    .create(req.body)
+    .then(function(report_chat_session) {
+      return res.status(201).send(report_chat_session);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing report_chat_session in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ReportChatSession
+    .findById(req.params.id)
+    .then(function(report_chat_session) {
+      if (!report_chat_session) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(report_chat_session, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(report_chat_session);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a report_chat_session from the DB.
+exports.destroy = function(req, res) {
+  return ReportChatSession
+    .findById(req.params.id)
+    .then(function(report_chat_session) {
+      if (!report_chat_session) {
+        return res.sendStatus(404);
+      }
+      report_chat_session.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 1023da3..a378e10 100644 (file)
@@ -1 +1,27 @@
-var _0x25f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x25f3[0];var ReportChatSession=require(_0x25f3[2])[_0x25f3[1]];exports[_0x25f3[3]]=function(_0x2f1dx2){ReportChatSession[_0x25f3[4]](function(_0x2f1dx3){onSave(_0x2f1dx2,_0x2f1dx3)});ReportChatSession[_0x25f3[5]](function(_0x2f1dx3){onSave(_0x2f1dx2,_0x2f1dx3)});ReportChatSession[_0x25f3[6]](function(_0x2f1dx3){onRemove(_0x2f1dx2,_0x2f1dx3)})};function onSave(_0x2f1dx2,_0x2f1dx3,_0x2f1dx5){_0x2f1dx2[_0x25f3[8]](_0x25f3[7],_0x2f1dx3)}function onRemove(_0x2f1dx2,_0x2f1dx3,_0x2f1dx5){_0x2f1dx2[_0x25f3[8]](_0x25f3[9],_0x2f1dx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportChatSession = require('../../models').ReportChatSession;
+
+exports.register = function(socket) {
+  ReportChatSession.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportChatSession.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportChatSession.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('report_chat_session:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_chat_session:remove', doc);
+}
index afd2a89..451980f 100644 (file)
@@ -1 +1,16 @@
-var _0xc560=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc560[0];var express=require(_0xc560[1]);var controller=require(_0xc560[2]);var router=express.Router();router[_0xc560[5]](_0xc560[3],controller[_0xc560[4]]);router[_0xc560[5]](_0xc560[6],controller[_0xc560[7]]);router[_0xc560[5]](_0xc560[8],controller[_0xc560[9]]);router[_0xc560[11]](_0xc560[3],controller[_0xc560[10]]);router[_0xc560[13]](_0xc560[8],controller[_0xc560[12]]);router[_0xc560[14]](_0xc560[8],controller[_0xc560[12]]);router[_0xc560[16]](_0xc560[8],controller[_0xc560[15]]);module[_0xc560[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_integration.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/describe', controller.describe);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 12c724c..6fc6afb 100644 (file)
@@ -1 +1,106 @@
-var _0x1d72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x1d72[0];var _=require(_0x1d72[1]);var ReportIntegration=require(_0x1d72[3])[_0x1d72[2]];var ReportIntegrationHistory=require(_0x1d72[3])[_0x1d72[5]][_0x1d72[4]];exports[_0x1d72[6]]=function(_0x8b1bx4,_0x8b1bx5){ReportIntegration[_0x1d72[11]]()[_0x1d72[10]](function(_0x8b1bx7){return _0x8b1bx5[_0x1d72[9]](200)[_0x1d72[8]](_0x8b1bx7)})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})};exports[_0x1d72[12]]=function(_0x8b1bx4,_0x8b1bx5){ReportIntegrationHistory[_0x1d72[12]]()[_0x1d72[10]](function(_0x8b1bx8){return _0x8b1bx5[_0x1d72[9]](200)[_0x1d72[8]](_0x8b1bx8)})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})};exports[_0x1d72[13]]=function(_0x8b1bx4,_0x8b1bx5){ReportIntegration[_0x1d72[17]](_0x8b1bx4[_0x1d72[16]][_0x1d72[15]])[_0x1d72[10]](function(_0x8b1bx9){if(!_0x8b1bx9){return _0x8b1bx5[_0x1d72[14]](404)};return _0x8b1bx5[_0x1d72[8]](_0x8b1bx9)})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})};exports[_0x1d72[18]]=function(_0x8b1bx4,_0x8b1bx5){ReportIntegration[_0x1d72[18]](_0x8b1bx4[_0x1d72[19]])[_0x1d72[10]](function(_0x8b1bx9){return _0x8b1bx5[_0x1d72[9]](201)[_0x1d72[8]](_0x8b1bx9)})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})};exports[_0x1d72[20]]=function(_0x8b1bx4,_0x8b1bx5){if(_0x8b1bx4[_0x1d72[19]][_0x1d72[15]]){delete _0x8b1bx4[_0x1d72[19]][_0x1d72[15]]};ReportIntegration[_0x1d72[17]](_0x8b1bx4[_0x1d72[16]][_0x1d72[15]])[_0x1d72[10]](function(_0x8b1bx9){if(!_0x8b1bx9){return _0x8b1bx5[_0x1d72[14]](404)};var _0x8b1bxa=_[_0x1d72[21]](_0x8b1bx9,_0x8b1bx4[_0x1d72[19]]);_0x8b1bxa[_0x1d72[22]]()[_0x1d72[10]](function(){return _0x8b1bx5[_0x1d72[9]](200)[_0x1d72[8]](_0x8b1bx9)})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})};exports[_0x1d72[23]]=function(_0x8b1bx4,_0x8b1bx5){ReportIntegration[_0x1d72[17]](_0x8b1bx4[_0x1d72[16]][_0x1d72[15]])[_0x1d72[10]](function(_0x8b1bx9){if(!_0x8b1bx9){return _0x8b1bx5[_0x1d72[14]](404)};_0x8b1bx9[_0x1d72[23]]()[_0x1d72[10]](function(){return _0x8b1bx5[_0x1d72[14]](204)})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})})[_0x1d72[7]](function(_0x8b1bx6){return handleError(_0x8b1bx5,_0x8b1bx6)})};function handleError(_0x8b1bx5,_0x8b1bx6){return _0x8b1bx5[_0x1d72[9]](500)[_0x1d72[8]](_0x8b1bx6)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ReportIntegration = require('../../models').ReportIntegration;
+var ReportIntegrationHistory = require('../../models').history.ReportIntegrationHistory;
+
+// Get list of report_integrations
+exports.index = function(req, res) {
+  ReportIntegration
+    .findAll()
+    .then(function(report_integrations) {
+      return res.status(200).send(report_integrations);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get list of fields
+exports.describe = function(req, res) {
+  ReportIntegrationHistory
+    .describe()
+    .then(function(fields) {
+      return res.status(200).send(fields);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single report_integration
+exports.show = function(req, res) {
+  ReportIntegration
+    .findById(req.params.id)
+    .then(function(report_integration) {
+      if (!report_integration) {
+        return res.sendStatus(404);
+      }
+      return res.send(report_integration);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new report_integration in the DB.
+exports.create = function(req, res) {
+  ReportIntegration
+    .create(req.body)
+    .then(function(report_integration) {
+      return res.status(201).send(report_integration);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing report_integration in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  ReportIntegration
+    .findById(req.params.id)
+    .then(function(report_integration) {
+      if (!report_integration) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(report_integration, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(report_integration);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a report_integration from the DB.
+exports.destroy = function(req, res) {
+  ReportIntegration
+    .findById(req.params.id)
+    .then(function(report_integration) {
+      if (!report_integration) {
+        return res.sendStatus(404);
+      }
+      report_integration.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 544b71f..2bd59ab 100644 (file)
@@ -1 +1,23 @@
-var _0xd8fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x6F\x63\x6B\x65\x74\x20\x6E\x61\x6D\x65\x20\x69\x73\x20","\x6E\x61\x6D\x65","\x6C\x6F\x67","\x64\x6F\x63\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x20\x69\x73\x20","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x65\x6D\x69\x74\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x25\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x69\x74"];_0xd8fd[0];var util=require(_0xd8fd[1]);var ReportIntegration=require(_0xd8fd[3])[_0xd8fd[2]];exports[_0xd8fd[4]]=function(_0xdb13x3){ReportIntegration[_0xd8fd[5]](function(_0xdb13x4){onSave(_0xdb13x3,_0xdb13x4)})};function onSave(_0xdb13x3,_0xdb13x4,_0xdb13x6){console[_0xd8fd[8]](_0xd8fd[6],_0xdb13x3[_0xd8fd[7]]);console[_0xd8fd[8]](_0xd8fd[9],_0xdb13x4[_0xd8fd[10]]);if(_0xdb13x3[_0xd8fd[7]]===_0xdb13x4[_0xd8fd[10]]){console[_0xd8fd[8]](_0xd8fd[11]);_0xdb13x3[_0xd8fd[15]](util[_0xd8fd[14]](_0xd8fd[12],_0xdb13x4[_0xd8fd[13]]),_0xdb13x4)}}
\ No newline at end of file
+/**
+ * Broadcast integrations update when the model changes
+ */
+
+'use strict';
+
+var util = require('util');
+var ReportIntegration = require('../../models').ReportIntegration;
+
+exports.register = function(socket) {
+  ReportIntegration.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  console.log('socket name is ', socket.name);
+  console.log('doc membername is ', doc.membername);
+  if (socket.name === doc.membername) {
+    console.log('emitting');
+    socket.emit(util.format('report_integration:%s', doc.integration), doc);
+  }
+}
index ee06ddb..2aadc12 100644 (file)
@@ -1 +1,17 @@
-var _0x8cff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x63\x63\x65\x70\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8cff[0];var express=require(_0x8cff[1]);var controller=require(_0x8cff[2]);var auth=require(_0x8cff[3]);var router=express.Router();router[_0x8cff[7]](_0x8cff[4],auth[_0x8cff[5]](),controller[_0x8cff[6]]);router[_0x8cff[7]](_0x8cff[8],auth[_0x8cff[5]](),controller[_0x8cff[9]]);router[_0x8cff[7]](_0x8cff[10],auth[_0x8cff[5]](),controller[_0x8cff[11]]);router[_0x8cff[13]](_0x8cff[4],auth[_0x8cff[5]](),controller[_0x8cff[12]]);router[_0x8cff[15]](_0x8cff[8],auth[_0x8cff[5]](),controller[_0x8cff[14]]);router[_0x8cff[16]](_0x8cff[8],auth[_0x8cff[5]](),controller[_0x8cff[14]]);router[_0x8cff[18]](_0x8cff[8],auth[_0x8cff[5]](),controller[_0x8cff[17]]);module[_0x8cff[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_mail.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), controller.accept);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 597febf..9477b57 100644 (file)
@@ -1 +1,140 @@
-var _0x7c82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x75\x73\x65\x72","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x7c82[0];var _=require(_0x7c82[1]);var ReportMail=require(_0x7c82[3])[_0x7c82[2]];var Agent=require(_0x7c82[3])[_0x7c82[4]];var sequelize=require(_0x7c82[3])[_0x7c82[5]];var Util=require(_0x7c82[6]);exports[_0x7c82[7]]=function(_0xe22dx6,_0xe22dx7,_0xe22dx8){return ReportMail[_0x7c82[14]](Util[_0x7c82[13]](_0xe22dx6[_0x7c82[12]]))[_0x7c82[11]](function(_0xe22dxa){_0xe22dx7[_0x7c82[10]](200)[_0x7c82[9]](_0xe22dxa)})[_0x7c82[8]](function(_0xe22dx9){return handleError(_0xe22dx7,_0xe22dx9)})};exports[_0x7c82[15]]=function(_0xe22dx6,_0xe22dx7){return ReportMail[_0x7c82[19]](_0xe22dx6[_0x7c82[18]][_0x7c82[17]])[_0x7c82[11]](function(_0xe22dxb){if(!_0xe22dxb){return _0xe22dx7[_0x7c82[16]](404)};return _0xe22dx7[_0x7c82[9]](_0xe22dxb)})[_0x7c82[8]](function(_0xe22dx9){return handleError(_0xe22dx7,_0xe22dx9)})};exports[_0x7c82[20]]=function(_0xe22dx6,_0xe22dx7){var _0xe22dxc;var _0xe22dxd=_0xe22dx6[_0x7c82[18]][_0x7c82[23]][_0x7c82[22]](_0x7c82[21])[1];return Agent[_0x7c82[19]](_0xe22dx6[_0x7c82[28]][_0x7c82[17]],{attributes:[_0x7c82[17],_0x7c82[29]]})[_0x7c82[11]](function(_0xe22dx10){_0xe22dxc=_0xe22dx10;return _0xe22dx10[_0x7c82[27]]({where:{status:{$ne:_0x7c82[26]},id:{$ne:_0xe22dxd}},attributes:[_0x7c82[17]]})})[_0x7c82[11]](function(_0xe22dxf){return ReportMail[_0x7c82[19]](_0xe22dx6[_0x7c82[18]][_0x7c82[17]])})[_0x7c82[11]](function(_0xe22dxb){if(!_0xe22dxb){return _0xe22dx7[_0x7c82[16]](404)};var _0xe22dxe=_[_0x7c82[24]](_0xe22dxb,{connectid:_0xe22dx6[_0x7c82[18]][_0x7c82[23]]});return _0xe22dxe[_0x7c82[25]]()})[_0x7c82[11]](function(){return _0xe22dx7[_0x7c82[16]](200)})[_0x7c82[8]](function(_0xe22dx9){return handleError(_0xe22dx7,_0xe22dx9)})};exports[_0x7c82[30]]=function(_0xe22dx6,_0xe22dx7){return ReportMail[_0x7c82[30]](_0xe22dx6[_0x7c82[31]])[_0x7c82[11]](function(_0xe22dxb){return _0xe22dx7[_0x7c82[10]](201)[_0x7c82[9]](_0xe22dxb)})[_0x7c82[8]](function(_0xe22dx9){return handleError(_0xe22dx7,_0xe22dx9)})};exports[_0x7c82[32]]=function(_0xe22dx6,_0xe22dx7){if(_0xe22dx6[_0x7c82[31]][_0x7c82[17]]){delete _0xe22dx6[_0x7c82[31]][_0x7c82[17]]};return ReportMail[_0x7c82[19]](_0xe22dx6[_0x7c82[18]][_0x7c82[17]])[_0x7c82[11]](function(_0xe22dxb){if(!_0xe22dxb){return _0xe22dx7[_0x7c82[16]](404)};var _0xe22dxe=_[_0x7c82[24]](_0xe22dxb,_0xe22dx6[_0x7c82[31]]);return _0xe22dxe[_0x7c82[25]]()})[_0x7c82[11]](function(_0xe22dxb){return _0xe22dx7[_0x7c82[10]](200)[_0x7c82[9]](_0xe22dxb)})[_0x7c82[8]](function(_0xe22dx9){return handleError(_0xe22dx7,_0xe22dx9)})};exports[_0x7c82[33]]=function(_0xe22dx6,_0xe22dx7){return ReportMail[_0x7c82[19]](_0xe22dx6[_0x7c82[18]][_0x7c82[17]])[_0x7c82[11]](function(_0xe22dxb){if(!_0xe22dxb){return _0xe22dx7[_0x7c82[16]](404)};return _0xe22dxb[_0x7c82[33]]()})[_0x7c82[11]](function(){return _0xe22dx7[_0x7c82[16]](204)})[_0x7c82[8]](function(_0xe22dx9){return handleError(_0xe22dx7,_0xe22dx9)})};function handleError(_0xe22dx7,_0xe22dx9){return _0xe22dx7[_0x7c82[10]](500)[_0x7c82[9]](_0xe22dx9)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ReportMail = require('../../models').ReportMail;
+var Agent = require('../../models').User;
+var sequelize = require('../../models').sequelize;
+
+var Util = require('../../config/util');
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return ReportMail
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Get a single reportMail
+exports.show = function(req, res) {
+  return ReportMail
+    .findById(req.params.id)
+    .then(function(reportMail) {
+      if (!reportMail) {
+        return res.sendStatus(404);
+      }
+      return res.send(reportMail);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single reportMail
+exports.accept = function(req, res) {
+  var _agent;
+  var _roomid = req.params.uniqueid.split('.')[1];
+
+  return Agent
+    .findById(req.user.id, {
+      attributes: ['id', 'mailCapacity']
+    })
+    .then(function(agent) {
+      _agent = agent;
+      return agent
+        .getMailRooms({
+          where: {
+            status: {
+              $ne: 'CLOSED'
+            },
+            id: {
+              $ne: _roomid
+            }
+          },
+          attributes: ['id']
+        });
+    })
+    .then(function(mailRooms) {
+      return ReportMail
+        .findById(req.params.id);
+    })
+    .then(function(reportMail) {
+      if (!reportMail) {
+        return res.sendStatus(404);
+      }
+
+      var updated = _.merge(reportMail, {
+        connectid: req.params.uniqueid
+      });
+
+      return updated
+        .save();
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new reportMail in the DB.
+exports.create = function(req, res) {
+  return ReportMail
+    .create(req.body)
+    .then(function(reportMail) {
+      return res.status(201).send(reportMail);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing reportMail in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ReportMail
+    .findById(req.params.id)
+    .then(function(reportMail) {
+      if (!reportMail) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(reportMail, req.body);
+      return updated
+        .save();
+    })
+    .then(function(reportMail) {
+      return res.status(200).send(reportMail);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a reportMail from the DB.
+exports.destroy = function(req, res) {
+  return ReportMail
+    .findById(req.params.id)
+    .then(function(reportMail) {
+      if (!reportMail) {
+        return res.sendStatus(404);
+      }
+      return reportMail
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 08577e5..1fec069 100644 (file)
@@ -1 +1,35 @@
-var _0xbc7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x72\x65\x6D\x6F\x76\x65"];_0xbc7f[0];var ReportMail=require(_0xbc7f[2])[_0xbc7f[1]];exports[_0xbc7f[3]]=function(_0xc8abx2){ReportMail[_0xbc7f[4]](function(_0xc8abx3){onSave(_0xc8abx2,_0xc8abx3)});ReportMail[_0xbc7f[5]](function(_0xc8abx3){onUpdate(_0xc8abx2,_0xc8abx3)});ReportMail[_0xbc7f[6]](function(_0xc8abx3){onRemove(_0xc8abx2,_0xc8abx3)})};function onSave(_0xc8abx2,_0xc8abx3,_0xc8abx5){if(_0xc8abx2[_0xbc7f[7]]===_0xc8abx3[_0xbc7f[8]]||_0xc8abx2[_0xbc7f[9]]===_0xbc7f[10]){_0xc8abx2[_0xbc7f[12]](_0xbc7f[11],_0xc8abx3)}}function onUpdate(_0xc8abx2,_0xc8abx3,_0xc8abx5){if(_0xc8abx2[_0xbc7f[7]]===_0xc8abx3[_0xbc7f[8]]||_0xc8abx2[_0xbc7f[9]]===_0xbc7f[10]){_0xc8abx2[_0xbc7f[12]](_0xbc7f[13],_0xc8abx3)}}function onRemove(_0xc8abx2,_0xc8abx3,_0xc8abx5){_0xc8abx2[_0xbc7f[12]](_0xbc7f[14],_0xc8abx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportMail = require('../../models').ReportMail;
+
+exports.register = function(socket) {
+  ReportMail.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportMail.afterUpdate(function(doc) {
+    onUpdate(socket, doc);
+  });
+  ReportMail.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  if (socket.name === doc.membername || socket.role === 'admin') {
+    socket.emit('report_mail:save', doc);
+  }
+}
+
+function onUpdate(socket, doc, cb) {
+  if (socket.name === doc.membername || socket.role === 'admin') {
+    socket.emit('report_mail:update', doc);
+  }
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_mail:remove', doc);
+}
index ef698a8..e63d04d 100644 (file)
@@ -1 +1,16 @@
-var _0x9fe9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9fe9[0];var express=require(_0x9fe9[1]);var controller=require(_0x9fe9[2]);var router=express.Router();router[_0x9fe9[5]](_0x9fe9[3],controller[_0x9fe9[4]]);router[_0x9fe9[5]](_0x9fe9[6],controller[_0x9fe9[7]]);router[_0x9fe9[5]](_0x9fe9[8],controller[_0x9fe9[9]]);router[_0x9fe9[11]](_0x9fe9[3],controller[_0x9fe9[10]]);router[_0x9fe9[13]](_0x9fe9[8],controller[_0x9fe9[12]]);router[_0x9fe9[14]](_0x9fe9[8],controller[_0x9fe9[12]]);router[_0x9fe9[16]](_0x9fe9[8],controller[_0x9fe9[15]]);module[_0x9fe9[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_mail_session.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/describe', controller.describe);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index c49a644..a964ba2 100644 (file)
@@ -1 +1,104 @@
-var _0xc26f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xc26f[0];var _=require(_0xc26f[1]);var ReportMailSession=require(_0xc26f[3])[_0xc26f[2]];var ReportMailSessionHistory=require(_0xc26f[3])[_0xc26f[5]][_0xc26f[4]];var Util=require(_0xc26f[6]);exports[_0xc26f[7]]=function(_0x9fc2x5,_0x9fc2x6,_0x9fc2x7){return ReportMailSession[_0xc26f[14]](Util[_0xc26f[13]](_0x9fc2x5[_0xc26f[12]]))[_0xc26f[11]](function(_0x9fc2x9){_0x9fc2x6[_0xc26f[10]](200)[_0xc26f[9]](_0x9fc2x9)})[_0xc26f[8]](function(_0x9fc2x8){return handleError(_0x9fc2x6,_0x9fc2x8)})};exports[_0xc26f[15]]=function(_0x9fc2x5,_0x9fc2x6){return ReportMailSessionHistory[_0xc26f[15]]()[_0xc26f[11]](function(_0x9fc2xa){return _0x9fc2x6[_0xc26f[10]](200)[_0xc26f[9]](_0x9fc2xa)})[_0xc26f[8]](function(_0x9fc2x8){return handleError(_0x9fc2x6,_0x9fc2x8)})};exports[_0xc26f[16]]=function(_0x9fc2x5,_0x9fc2x6){return ReportMailSession[_0xc26f[20]](_0x9fc2x5[_0xc26f[19]][_0xc26f[18]])[_0xc26f[11]](function(_0x9fc2xb){if(!_0x9fc2xb){return _0x9fc2x6[_0xc26f[17]](404)};return _0x9fc2x6[_0xc26f[9]](_0x9fc2xb)})[_0xc26f[8]](function(_0x9fc2x8){return handleError(_0x9fc2x6,_0x9fc2x8)})};exports[_0xc26f[21]]=function(_0x9fc2x5,_0x9fc2x6){return ReportMailSession[_0xc26f[21]](_0x9fc2x5[_0xc26f[22]])[_0xc26f[11]](function(_0x9fc2xb){return _0x9fc2x6[_0xc26f[10]](201)[_0xc26f[9]](_0x9fc2xb)})[_0xc26f[8]](function(_0x9fc2x8){return handleError(_0x9fc2x6,_0x9fc2x8)})};exports[_0xc26f[23]]=function(_0x9fc2x5,_0x9fc2x6){if(_0x9fc2x5[_0xc26f[22]][_0xc26f[18]]){delete _0x9fc2x5[_0xc26f[22]][_0xc26f[18]]};return ReportMailSession[_0xc26f[20]](_0x9fc2x5[_0xc26f[19]][_0xc26f[18]])[_0xc26f[11]](function(_0x9fc2xb){if(!_0x9fc2xb){return _0x9fc2x6[_0xc26f[17]](404)};var _0x9fc2xc=_[_0xc26f[24]](_0x9fc2xb,_0x9fc2x5[_0xc26f[22]]);return _0x9fc2xc[_0xc26f[25]]()})[_0xc26f[11]](function(_0x9fc2xb){return _0x9fc2x6[_0xc26f[10]](200)[_0xc26f[9]](_0x9fc2xb)})[_0xc26f[8]](function(_0x9fc2x8){return handleError(_0x9fc2x6,_0x9fc2x8)})};exports[_0xc26f[26]]=function(_0x9fc2x5,_0x9fc2x6){return ReportMailSession[_0xc26f[20]](_0x9fc2x5[_0xc26f[19]][_0xc26f[18]])[_0xc26f[11]](function(_0x9fc2xb){if(!_0x9fc2xb){return _0x9fc2x6[_0xc26f[17]](404)};return _0x9fc2xb[_0xc26f[26]]()})[_0xc26f[11]](function(){return _0x9fc2x6[_0xc26f[17]](204)})[_0xc26f[8]](function(_0x9fc2x8){return handleError(_0x9fc2x6,_0x9fc2x8)})};function handleError(_0x9fc2x6,_0x9fc2x8){return _0x9fc2x6[_0xc26f[10]](500)[_0xc26f[9]](_0x9fc2x8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ReportMailSession = require('../../models').ReportMailSession;
+var ReportMailSessionHistory = require('../../models').history.ReportMailSessionHistory;
+
+var Util = require('../../config/util');
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return ReportMailSession
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get list of fields
+exports.describe = function(req, res) {
+  return ReportMailSessionHistory
+    .describe()
+    .then(function(fields) {
+      return res.status(200).send(fields);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single reportMailSession
+exports.show = function(req, res) {
+  return ReportMailSession
+    .findById(req.params.id)
+    .then(function(reportMailSession) {
+      if (!reportMailSession) {
+        return res.sendStatus(404);
+      }
+      return res.send(reportMailSession);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new reportMailSession in the DB.
+exports.create = function(req, res) {
+  return ReportMailSession
+    .create(req.body)
+    .then(function(reportMailSession) {
+      return res.status(201).send(reportMailSession);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing reportMailSession in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ReportMailSession
+    .findById(req.params.id)
+    .then(function(reportMailSession) {
+      if (!reportMailSession) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(reportMailSession, req.body);
+      return updated
+        .save();
+    })
+    .then(function(reportMailSession) {
+      return res.status(200).send(reportMailSession);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a reportMailSession from the DB.
+exports.destroy = function(req, res) {
+  return ReportMailSession
+    .findById(req.params.id)
+    .then(function(reportMailSession) {
+      if (!reportMailSession) {
+        return res.sendStatus(404);
+      }
+      return reportMailSession
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index d13570e..6489a0d 100644 (file)
@@ -1 +1,27 @@
-var _0xbb5d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xbb5d[0];var ReportMailSession=require(_0xbb5d[2])[_0xbb5d[1]];exports[_0xbb5d[3]]=function(_0xe472x2){ReportMailSession[_0xbb5d[4]](function(_0xe472x3){onSave(_0xe472x2,_0xe472x3)});ReportMailSession[_0xbb5d[5]](function(_0xe472x3){onSave(_0xe472x2,_0xe472x3)});ReportMailSession[_0xbb5d[6]](function(_0xe472x3){onRemove(_0xe472x2,_0xe472x3)})};function onSave(_0xe472x2,_0xe472x3,_0xe472x5){_0xe472x2[_0xbb5d[8]](_0xbb5d[7],_0xe472x3)}function onRemove(_0xe472x2,_0xe472x3,_0xe472x5){_0xe472x2[_0xbb5d[8]](_0xbb5d[9],_0xe472x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportMailSession = require('../../models').ReportMailSession;
+
+exports.register = function(socket) {
+  ReportMailSession.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportMailSession.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportMailSession.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('report_mail_session:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_mail_session:remove', doc);
+}
index 9fa055b..caa3489 100644 (file)
@@ -1 +1,26 @@
-var _0x328d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x61\x63\x74\x69\x76\x65","\x61\x63\x74\x69\x76\x65","\x2F\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x6E\x73\x77\x65\x72\x65\x64","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x2F\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x2F\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x2F\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x2F\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x2F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x328d[0];var express=require(_0x328d[1]);var controller=require(_0x328d[2]);var router=express.Router();router[_0x328d[5]](_0x328d[3],controller[_0x328d[4]]);router[_0x328d[5]](_0x328d[6],controller[_0x328d[7]]);router[_0x328d[5]](_0x328d[8],controller[_0x328d[9]]);router[_0x328d[5]](_0x328d[10],controller[_0x328d[11]]);router[_0x328d[5]](_0x328d[12],controller[_0x328d[13]]);router[_0x328d[5]](_0x328d[14],controller[_0x328d[15]]);router[_0x328d[5]](_0x328d[16],controller[_0x328d[17]]);router[_0x328d[5]](_0x328d[18],controller[_0x328d[19]]);router[_0x328d[5]](_0x328d[20],controller[_0x328d[21]]);router[_0x328d[5]](_0x328d[22],controller[_0x328d[23]]);router[_0x328d[5]](_0x328d[24],controller[_0x328d[25]]);router[_0x328d[5]](_0x328d[26],controller[_0x328d[27]]);router[_0x328d[5]](_0x328d[28],controller[_0x328d[29]]);router[_0x328d[31]](_0x328d[3],controller[_0x328d[30]]);router[_0x328d[33]](_0x328d[28],controller[_0x328d[32]]);router[_0x328d[34]](_0x328d[28],controller[_0x328d[32]]);router[_0x328d[36]](_0x328d[28],controller[_0x328d[35]]);module[_0x328d[37]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_queue.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/describe', controller.describe);
+router.get('/waiting', controller.waiting);
+router.get('/active', controller.active);
+router.get('/answered', controller.answered);
+router.get('/abandoned', controller.abandoned);
+router.get('/avganswertime', controller.avganswertime);
+router.get('/avgtalktime', controller.avgtalktime);
+router.get('/answerrate', controller.answerrate);
+router.get('/abandonrate', controller.abandonrate);
+router.get('/totaloffered', controller.totaloffered);
+router.get('/unmanaged', controller.unmanaged);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 0438ad6..79eb271 100644 (file)
@@ -1 +1,279 @@
-var _0x76d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6F\x75\x6E\x74","\x61\x63\x74\x69\x76\x65","\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x76\x61\x6C\x75\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x76d5[0];var _=require(_0x76d5[1]);var sequelize=require(_0x76d5[3])[_0x76d5[2]];var ReportQueue=require(_0x76d5[3])[_0x76d5[4]];var ReportQueueHistory=require(_0x76d5[3])[_0x76d5[6]][_0x76d5[5]];exports[_0x76d5[7]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[12]]()[_0x76d5[11]](function(_0x15bfx8){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]](_0x15bfx8)})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[13]]=function(_0x15bfx5,_0x15bfx6){return ReportQueueHistory[_0x76d5[13]]()[_0x76d5[11]](function(_0x15bfx9){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]](_0x15bfx9)})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[14]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[15]]({where:{queuecallerleaveAt:null}})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[16]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[15]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[17]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[15]]({where:{queuecallercomplete:true}})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[18]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[15]]({where:{queuecallerabandon:true}})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[19]]=function(_0x15bfx5,_0x15bfx6){return sequelize[_0x76d5[24]](_0x76d5[21],{type:sequelize[_0x76d5[23]][_0x76d5[22]]})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa[0][_0x76d5[20]]})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[25]]=function(_0x15bfx5,_0x15bfx6){return sequelize[_0x76d5[24]](_0x76d5[26],{type:sequelize[_0x76d5[23]][_0x76d5[22]]})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa[0][_0x76d5[20]]})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[27]]=function(_0x15bfx5,_0x15bfx6){return sequelize[_0x76d5[24]](_0x76d5[28],{type:sequelize[_0x76d5[23]][_0x76d5[22]]})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa[0][_0x76d5[20]]})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[29]]=function(_0x15bfx5,_0x15bfx6){return sequelize[_0x76d5[24]](_0x76d5[30],{type:sequelize[_0x76d5[23]][_0x76d5[22]]})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa[0][_0x76d5[20]]})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[31]]=function(_0x15bfx5,_0x15bfx6){return sequelize[_0x76d5[24]](_0x76d5[32],{type:sequelize[_0x76d5[23]][_0x76d5[22]]})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa[0][_0x76d5[20]]})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[33]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[15]]({where:{queuecallerexit:true}})[_0x76d5[11]](function(_0x15bfxa){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]]({value:_0x15bfxa})})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[34]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[38]](_0x15bfx5[_0x76d5[37]][_0x76d5[36]])[_0x76d5[11]](function(_0x15bfxb){if(!_0x15bfxb){return _0x15bfx6[_0x76d5[35]](404)};return _0x15bfx6[_0x76d5[9]](_0x15bfxb)})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[39]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[39]](_0x15bfx5[_0x76d5[40]])[_0x76d5[11]](function(_0x15bfxb){return _0x15bfx6[_0x76d5[10]](201)[_0x76d5[9]](_0x15bfxb)})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[41]]=function(_0x15bfx5,_0x15bfx6){if(_0x15bfx5[_0x76d5[40]][_0x76d5[36]]){delete _0x15bfx5[_0x76d5[40]][_0x76d5[36]]};return ReportQueue[_0x76d5[38]](_0x15bfx5[_0x76d5[37]][_0x76d5[36]])[_0x76d5[11]](function(_0x15bfxb){if(!_0x15bfxb){return _0x15bfx6[_0x76d5[35]](404)};var _0x15bfxc=_[_0x76d5[44]](_0x15bfxb,_0x15bfx5[_0x76d5[40]]);return _0x15bfxc[_0x76d5[45]]()})[_0x76d5[11]](function(_0x15bfxb){return _0x15bfx6[_0x76d5[10]](200)[_0x76d5[9]](_0x15bfxb)})[_0x76d5[8]](function(_0x15bfx7){console[_0x76d5[43]](_0x76d5[42],_0x15bfx7);return handleError(_0x15bfx6,_0x15bfx7)})};exports[_0x76d5[46]]=function(_0x15bfx5,_0x15bfx6){return ReportQueue[_0x76d5[38]](_0x15bfx5[_0x76d5[37]][_0x76d5[36]])[_0x76d5[11]](function(_0x15bfxb){if(!_0x15bfxb){return _0x15bfx6[_0x76d5[35]](404)};return _0x15bfxb[_0x76d5[46]]()})[_0x76d5[11]](function(){return _0x15bfx6[_0x76d5[35]](204)})[_0x76d5[8]](function(_0x15bfx7){return handleError(_0x15bfx6,_0x15bfx7)})};function handleError(_0x15bfx6,_0x15bfx7){return _0x15bfx6[_0x76d5[10]](500)[_0x76d5[9]](_0x15bfx7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var sequelize = require('../../models').sequelize;
+var ReportQueue = require('../../models').ReportQueue;
+var ReportQueueHistory = require('../../models').history.ReportQueueHistory;
+
+// Get list of reportQueues
+exports.index = function(req, res) {
+  return ReportQueue
+    .findAll()
+    .then(function(reportQueues) {
+      return res.status(200).send(reportQueues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get list of fields
+exports.describe = function(req, res) {
+  return ReportQueueHistory
+    .describe()
+    .then(function(fields) {
+      return res.status(200).send(fields);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Waiting Calls
+exports.waiting = function(req, res) {
+  return ReportQueue
+    .count({
+      where: {
+        queuecallerleaveAt: null
+      }
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Waiting Calls
+exports.active = function(req, res) {
+  return ReportQueue
+    .count({
+      where: {
+        queuecallerexit: false,
+        queuecallerabandon: false,
+        queuecallercomplete: false,
+        queuecallerleaveAt: {
+          $ne: null
+        }
+      }
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.answered = function(req, res) {
+  return ReportQueue
+    .count({
+      where: {
+        queuecallercomplete: true
+      }
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Abandoned Calls
+exports.abandoned = function(req, res) {
+  return ReportQueue
+    .count({
+      where: {
+        queuecallerabandon: true
+      }
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.avganswertime = function(req, res) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as value FROM report_agent WHERE agentcomplete = 1', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.avgtalktime = function(req, res) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(ROUND(AVG(talktime), 0)) as value FROM report_agent WHERE agentcomplete = 1', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.answerrate = function(req, res) {
+  return sequelize
+    .query('SELECT ROUND(SUM(queuecallercomplete) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.abandonrate = function(req, res) {
+  return sequelize
+    .query('SELECT ROUND(SUM(queuecallerabandon) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.totaloffered = function(req, res) {
+  return sequelize
+    .query('SELECT COUNT(distinct uniqueid) as value FROM report_queue', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get Answered Calls
+exports.unmanaged = function(req, res) {
+  return ReportQueue
+    .count({
+      where: {
+        queuecallerexit: true
+      }
+    })
+    .then(function(data) {
+      return res.status(200).send({
+        value: data
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single reportQueue
+exports.show = function(req, res) {
+  return ReportQueue
+    .findById(req.params.id)
+    .then(function(reportQueue) {
+      if (!reportQueue) {
+        return res.sendStatus(404);
+      }
+      return res.send(reportQueue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new reportQueue in the DB.
+exports.create = function(req, res) {
+  return ReportQueue
+    .create(req.body)
+    .then(function(reportQueue) {
+      return res.status(201).send(reportQueue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing reportQueue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ReportQueue
+    .findById(req.params.id)
+    .then(function(reportQueue) {
+      if (!reportQueue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(reportQueue, req.body);
+      return updated
+        .save();
+    })
+    .then(function(reportQueue) {
+      return res.status(200).send(reportQueue);
+    })
+    .catch(function(err) {
+      console.error('err', err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes a reportQueue from the DB.
+exports.destroy = function(req, res) {
+  return ReportQueue
+    .findById(req.params.id)
+    .then(function(reportQueue) {
+      if (!reportQueue) {
+        return res.sendStatus(404);
+      }
+      return reportQueue
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 91f77eb..9f57869 100644 (file)
@@ -1 +1,29 @@
-var _0x4018=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4018[0];var ReportQueue=require(_0x4018[2])[_0x4018[1]];exports[_0x4018[3]]=function(_0x48edx2){ReportQueue[_0x4018[4]](function(_0x48edx3){onSave(_0x48edx2,_0x48edx3)});ReportQueue[_0x4018[5]](function(_0x48edx3){onSave(_0x48edx2,_0x48edx3)});ReportQueue[_0x4018[6]](function(_0x48edx3){onRemove(_0x48edx2,_0x48edx3)})};function onSave(_0x48edx2,_0x48edx3,_0x48edx5){if(_0x48edx2[_0x4018[7]]===_0x4018[8]){_0x48edx2[_0x4018[10]](_0x4018[9],_0x48edx3)}}function onRemove(_0x48edx2,_0x48edx3,_0x48edx5){_0x48edx2[_0x4018[10]](_0x4018[11],_0x48edx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportQueue = require('../../models').ReportQueue;
+
+exports.register = function(socket) {
+  ReportQueue.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportQueue.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportQueue.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  if (socket.role === 'admin') {
+    socket.emit('report_queue:save', doc);
+  }
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_queue:remove', doc);
+}
index 33297eb..75fa91c 100644 (file)
@@ -1 +1,12 @@
-var _0xef22=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x65\x78\x70\x6F\x72\x74\x73"];_0xef22[0];var express=require(_0xef22[1]);var controller=require(_0xef22[2]);var router=express.Router();router[_0xef22[5]](_0xef22[3],controller[_0xef22[4]]);router[_0xef22[8]](_0xef22[6],controller[_0xef22[7]]);router[_0xef22[9]](_0xef22[6],controller[_0xef22[7]]);module[_0xef22[10]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./report_tree.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+
+module.exports = router;
index 7a1cfb7..a6b11b0 100644 (file)
@@ -1 +1,46 @@
-var _0xb089=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xb089[0];var _=require(_0xb089[1]);var util=require(_0xb089[2]);var ReportTree=require(_0xb089[4])[_0xb089[3]];exports[_0xb089[5]]=function(_0xa2ecx4,_0xa2ecx5){ReportTree[_0xb089[11]]()[_0xb089[10]](function(_0xa2ecx7){if(!_0xa2ecx7){return _0xa2ecx5[_0xb089[7]](404)};return _0xa2ecx5[_0xb089[9]](200)[_0xb089[8]](_0xa2ecx7)})[_0xb089[6]](function(_0xa2ecx6){return handleError(_0xa2ecx5,_0xa2ecx6)})};exports[_0xb089[12]]=function(_0xa2ecx4,_0xa2ecx5){ReportTree[_0xb089[18]](_0xa2ecx4[_0xb089[17]][_0xb089[16]])[_0xb089[10]](function(_0xa2ecx8){if(!_0xa2ecx8){return _0xa2ecx5[_0xb089[7]](404)};var _0xa2ecx9=_[_0xb089[14]](_0xa2ecx8,_0xa2ecx4[_0xb089[13]]);_0xa2ecx9[_0xb089[15]]()[_0xb089[10]](function(){return _0xa2ecx5[_0xb089[9]](200)[_0xb089[8]](_0xa2ecx8)})[_0xb089[6]](function(_0xa2ecx6){return handleError(_0xa2ecx5,_0xa2ecx6)})})[_0xb089[6]](function(_0xa2ecx6){return handleError(_0xa2ecx5,_0xa2ecx6)})};function handleError(_0xa2ecx5,_0xa2ecx6){return _0xa2ecx5[_0xb089[9]](500)[_0xb089[8]](_0xa2ecx6)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var ReportTree = require('../../models').ReportTree;
+
+// Get the reports trees
+exports.index = function(req, res) {
+  ReportTree
+    .findAll()
+    .then(function(trees) {
+      if (!trees) {
+        return res.sendStatus(404);
+      }
+      return res.status(200).send(trees);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing report in the DB.
+exports.update = function(req, res) {
+  ReportTree
+    .findById(req.params.id)
+    .then(function(tree) {
+      if (!tree) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(tree, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(tree);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 51e1925..389fa7a 100644 (file)
@@ -1 +1,27 @@
-var _0x1e5c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x1e5c[0];var ReportTree=require(_0x1e5c[2])[_0x1e5c[1]];exports[_0x1e5c[3]]=function(_0x9af5x2){ReportTree[_0x1e5c[4]](function(_0x9af5x3){onSave(_0x9af5x2,_0x9af5x3)});ReportTree[_0x1e5c[5]](function(_0x9af5x3){onSave(_0x9af5x2,_0x9af5x3)});ReportTree[_0x1e5c[6]](function(_0x9af5x3){onRemove(_0x9af5x2,_0x9af5x3)})};function onSave(_0x9af5x2,_0x9af5x3,_0x9af5x5){_0x9af5x2[_0x1e5c[8]](_0x1e5c[7],_0x9af5x3)}function onRemove(_0x9af5x2,_0x9af5x3,_0x9af5x5){_0x9af5x2[_0x1e5c[8]](_0x1e5c[9],_0x9af5x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ReportTree = require('../../models').ReportTree;
+
+exports.register = function(socket) {
+  ReportTree.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportTree.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  ReportTree.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('report_tree:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('report_tree:remove', doc);
+}
index 9b7b184..37d897a 100644 (file)
@@ -1 +1,20 @@
-var _0xbb57=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x74\x72\x65\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x74\x72\x65\x65\x73","\x67\x65\x74"];_0xbb57[0];var should=require(_0xbb57[1]);var app=require(_0xbb57[2]);var request=require(_0xbb57[3]);describe(_0xbb57[4],function(){it(_0xbb57[5],function(_0xa1dex4){request(app)[_0xbb57[13]](_0xbb57[12])[_0xbb57[11]](200)[_0xbb57[11]](_0xbb57[10],/json/)[_0xbb57[9]](function(_0xa1dex5,_0xa1dex6){if(_0xa1dex5){return _0xa1dex4(_0xa1dex5)};_0xa1dex6[_0xbb57[8]][_0xbb57[1]][_0xbb57[7]][_0xbb57[6]](Array);_0xa1dex4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/analytics/reports/trees', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/analytic/reports/trees')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index d322f84..d8b47b0 100644 (file)
@@ -1 +1,21 @@
-var _0x28e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x28e1[0];var express=require(_0x28e1[1]);var auth=require(_0x28e1[2]);var controller=require(_0x28e1[3]);var router=express.Router();router[_0x28e1[7]](_0x28e1[4],auth[_0x28e1[5]](),controller[_0x28e1[6]]);router[_0x28e1[7]](_0x28e1[8],auth[_0x28e1[5]](),controller[_0x28e1[9]]);router[_0x28e1[7]](_0x28e1[10],auth[_0x28e1[5]](),controller[_0x28e1[11]]);router[_0x28e1[7]](_0x28e1[12],auth[_0x28e1[5]](),controller[_0x28e1[13]]);router[_0x28e1[16]](_0x28e1[14],auth[_0x28e1[5]](),controller[_0x28e1[15]]);router[_0x28e1[16]](_0x28e1[4],auth[_0x28e1[5]](),controller[_0x28e1[17]]);router[_0x28e1[19]](_0x28e1[8],auth[_0x28e1[5]](),controller[_0x28e1[18]]);router[_0x28e1[20]](_0x28e1[8],auth[_0x28e1[5]](),controller[_0x28e1[18]]);router[_0x28e1[22]](_0x28e1[4],auth[_0x28e1[5]](),controller[_0x28e1[21]]);router[_0x28e1[22]](_0x28e1[8],auth[_0x28e1[5]](),controller[_0x28e1[23]]);module[_0x28e1[24]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./salesforce_account.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/check', auth.isAuthenticated(), controller.checkAccount);
+router.get('/:id/fields', auth.isAuthenticated(), controller.getFields);
+router.post('/validate/:field', auth.isAuthenticated(), controller.accountValidation);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 5707106..a03b303 100644 (file)
@@ -1 +1,97 @@
-var _0x8336=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0x8336[0];var proxyquire=require(_0x8336[2])[_0x8336[1]]();var salesforceAccountCtrlStub={index:_0x8336[3],show:_0x8336[4],create:_0x8336[5],update:_0x8336[6],destroy:_0x8336[7]};var routerStub={get:sinon[_0x8336[8]](),put:sinon[_0x8336[8]](),patch:sinon[_0x8336[8]](),post:sinon[_0x8336[8]](),delete:sinon[_0x8336[8]]()};var salesforceAccountIndex=proxyquire(_0x8336[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":salesforceAccountCtrlStub});describe(_0x8336[10],function(){it(_0x8336[11],function(){expect(salesforceAccountIndex)[_0x8336[13]][_0x8336[12]](routerStub)});describe(_0x8336[14],function(){it(_0x8336[15],function(){expect(routerStub[_0x8336[21]][_0x8336[20]](_0x8336[19],_0x8336[3]))[_0x8336[13]][_0x8336[18]][_0x8336[17]][_0x8336[16]]})});describe(_0x8336[22],function(){it(_0x8336[23],function(){expect(routerStub[_0x8336[21]][_0x8336[20]](_0x8336[24],_0x8336[4]))[_0x8336[13]][_0x8336[18]][_0x8336[17]][_0x8336[16]]})});describe(_0x8336[25],function(){it(_0x8336[26],function(){expect(routerStub[_0x8336[27]][_0x8336[20]](_0x8336[19],_0x8336[5]))[_0x8336[13]][_0x8336[18]][_0x8336[17]][_0x8336[16]]})});describe(_0x8336[28],function(){it(_0x8336[29],function(){expect(routerStub[_0x8336[30]][_0x8336[20]](_0x8336[24],_0x8336[6]))[_0x8336[13]][_0x8336[18]][_0x8336[17]][_0x8336[16]]})});describe(_0x8336[31],function(){it(_0x8336[29],function(){expect(routerStub[_0x8336[32]][_0x8336[20]](_0x8336[24],_0x8336[6]))[_0x8336[13]][_0x8336[18]][_0x8336[17]][_0x8336[16]]})});describe(_0x8336[33],function(){it(_0x8336[34],function(){expect(routerStub[_0x8336[35]][_0x8336[20]](_0x8336[24],_0x8336[7]))[_0x8336[13]][_0x8336[18]][_0x8336[17]][_0x8336[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var salesforceAccountCtrlStub = {
+  index: 'salesforceAccountCtrl.index',
+  show: 'salesforceAccountCtrl.show',
+  create: 'salesforceAccountCtrl.create',
+  update: 'salesforceAccountCtrl.update',
+  destroy: 'salesforceAccountCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var salesforceAccountIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './salesforce_account.controller': salesforceAccountCtrlStub
+});
+
+describe('SalesforceAccount API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(salesforceAccountIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/salesforce/accounts', function() {
+
+    it('should route to salesforceAccount.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'salesforceAccountCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/salesforce/accounts/:id', function() {
+
+    it('should route to salesforceAccount.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'salesforceAccountCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/salesforce/accounts', function() {
+
+    it('should route to salesforceAccount.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'salesforceAccountCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/salesforce/accounts/:id', function() {
+
+    it('should route to salesforceAccount.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'salesforceAccountCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/salesforce/accounts/:id', function() {
+
+    it('should route to salesforceAccount.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'salesforceAccountCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/salesforce/accounts/:id', function() {
+
+    it('should route to salesforceAccount.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'salesforceAccountCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 446fb1c..69c55e6 100644 (file)
@@ -1 +1,253 @@
-var _0x84d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x6F\x67\x69\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x66\x69\x65\x6C\x64\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x84d5[0];var _=require(_0x84d5[1]);var util=require(_0x84d5[2]);var jsforce=require(_0x84d5[3]);var SalesforceAccount=require(_0x84d5[5])[_0x84d5[4]];function handleError(_0x596fx6,_0x596fx7){_0x596fx7=_0x596fx7||500;return function(_0x596fx8){_0x596fx6[_0x84d5[7]](_0x596fx7)[_0x84d5[6]](_0x596fx8)}}function responseWithResult(_0x596fx6,_0x596fx7){_0x596fx7=_0x596fx7||200;return function(_0x596fxa){if(_0x596fxa){_0x596fx6[_0x84d5[7]](_0x596fx7)[_0x84d5[8]](_0x596fxa)}}}function handleEntityNotFound(_0x596fx6){return function(_0x596fxa){if(!_0x596fxa){_0x596fx6[_0x84d5[7]](404)[_0x84d5[9]]();return null};return _0x596fxa}}function saveUpdates(_0x596fxd){return function(_0x596fxa){return _0x596fxa[_0x84d5[11]](_0x596fxd)[_0x84d5[10]](function(_0x596fxe){return _0x596fxe})}}function removeEntity(_0x596fx6){return function(_0x596fxa){if(_0x596fxa){return _0x596fxa[_0x84d5[12]]()[_0x84d5[10]](function(){_0x596fx6[_0x84d5[7]](204)[_0x84d5[9]]()})}}}exports[_0x84d5[13]]=function(_0x596fx10,_0x596fx6){var _0x596fx11=[_0x84d5[14],_0x84d5[15],_0x84d5[16],_0x84d5[17]];var _0x596fx12=_0x596fx10[_0x84d5[19]][_0x84d5[18]]?parseInt(_0x596fx10[_0x84d5[19]][_0x84d5[18]],10):100;var _0x596fx13=_0x596fx10[_0x84d5[19]][_0x84d5[20]]?parseInt(_0x596fx10[_0x84d5[19]][_0x84d5[20]],10):0;var _0x596fx14={where:{},limit:_0x596fx12,offset:_0x596fx13*_0x596fx12};_[_0x84d5[34]](_0x596fx10[_0x84d5[19]],function(_0x596fx15,_0x596fx16){switch(_0x596fx16){case _0x84d5[18]:;case _0x84d5[20]:break;case _0x84d5[23]:_0x596fx14[_0x84d5[21]]=util[_0x84d5[26]](_0x84d5[22],_0x596fx10[_0x84d5[19]][_0x84d5[23]],_0x596fx10[_0x84d5[19]][_0x84d5[24]]||_0x84d5[25])||null;break;case _0x84d5[24]:break;case _0x84d5[32]:_0x596fx14[_0x84d5[28]][_0x84d5[27]]=[];_0x596fx11[_0x84d5[31]](function(_0x596fx17){var _0x596fx18={};_0x596fx18[_0x596fx17]={$like:_0x84d5[29]+_0x596fx15+_0x84d5[29]};_0x596fx14[_0x84d5[28]][_0x84d5[27]][_0x84d5[30]](_0x596fx18)});break;default:_0x596fx14[_0x84d5[28]][_0x596fx16]={$like:{}};_0x596fx14[_0x84d5[28]][_0x596fx16][_0x84d5[33]]=_0x84d5[29]+_0x596fx15+_0x84d5[29]}});SalesforceAccount[_0x84d5[46]](_0x596fx14)[_0x84d5[10]](function(_0x596fx19){var _0x596fx1a=Math[_0x84d5[38]](_0x596fx19[_0x84d5[37]]/_0x596fx12);var _0x596fx1b=_0x596fx1a>(_0x596fx14[_0x84d5[39]]+1)?util[_0x84d5[26]](_0x84d5[40],_0x596fx10[_0x84d5[41]],_0x596fx10[_0x84d5[43]][_0x84d5[42]],_0x596fx10[_0x84d5[44]],_0x596fx13+1):null;var _0x596fx1c=_0x596fx13>0?util[_0x84d5[26]](_0x84d5[40],_0x596fx10[_0x84d5[41]],_0x596fx10[_0x84d5[43]][_0x84d5[42]],_0x596fx10[_0x84d5[44]],_0x596fx13-1):null;return _0x596fx6[_0x84d5[7]](200)[_0x84d5[6]]({count:_0x596fx19[_0x84d5[37]],rows:_0x596fx19[_0x84d5[45]],next_page:_0x596fx1b,previous_page:_0x596fx1c,total_pages:_0x596fx1a})})[_0x84d5[36]](function(_0x596fx8){return _0x596fx6[_0x84d5[7]](500)[_0x84d5[6]]({error:_0x84d5[35]})})};exports[_0x84d5[47]]=function(_0x596fx10,_0x596fx6){SalesforceAccount[_0x84d5[50]](_0x596fx10[_0x84d5[49]][_0x84d5[48]])[_0x84d5[10]](handleEntityNotFound(_0x596fx6))[_0x84d5[10]](responseWithResult(_0x596fx6))[_0x84d5[36]](handleError(_0x596fx6))};exports[_0x84d5[51]]=function(_0x596fx10,_0x596fx6){SalesforceAccount[_0x84d5[51]](_0x596fx10[_0x84d5[52]])[_0x84d5[10]](responseWithResult(_0x596fx6,201))[_0x84d5[36]](handleError(_0x596fx6))};exports[_0x84d5[53]]=function(_0x596fx10,_0x596fx6){if(_0x596fx10[_0x84d5[52]][_0x84d5[48]]){delete _0x596fx10[_0x84d5[52]][_0x84d5[48]]};SalesforceAccount[_0x84d5[50]](_0x596fx10[_0x84d5[49]][_0x84d5[48]])[_0x84d5[10]](handleEntityNotFound(_0x596fx6))[_0x84d5[10]](saveUpdates(_0x596fx10[_0x84d5[52]]))[_0x84d5[10]](responseWithResult(_0x596fx6))[_0x84d5[36]](handleError(_0x596fx6))};exports[_0x84d5[12]]=function(_0x596fx10,_0x596fx6){SalesforceAccount[_0x84d5[50]](_0x596fx10[_0x84d5[49]][_0x84d5[48]])[_0x84d5[10]](handleEntityNotFound(_0x596fx6))[_0x84d5[10]](removeEntity(_0x596fx6))[_0x84d5[36]](handleError(_0x596fx6))};exports[_0x84d5[54]]=function(_0x596fx10,_0x596fx6){SalesforceAccount[_0x84d5[50]](_0x596fx10[_0x84d5[49]][_0x84d5[48]])[_0x84d5[10]](handleEntityNotFound(_0x596fx6))[_0x84d5[10]](function(_0x596fx1d){var _0x596fx1e= new jsforce.Connection({oauth2:{loginUrl:_0x596fx1d[_0x84d5[17]],clientId:_0x596fx1d[_0x84d5[55]],clientSecret:_0x596fx1d[_0x84d5[56]]}});var _0x596fx1f=_0x596fx1d[_0x84d5[59]][_0x84d5[58]](_0x596fx1d[_0x84d5[57]]);_0x596fx1e[_0x84d5[61]](_0x596fx1d[_0x84d5[16]],_0x596fx1f,function(_0x596fx8,_0x596fx20){if(_0x596fx8){return _0x596fx6[_0x84d5[7]](400)[_0x84d5[6]](_0x596fx8)};return _0x596fx6[_0x84d5[60]](200)})})[_0x84d5[36]](handleError(_0x596fx6))};exports[_0x84d5[62]]=function(_0x596fx10,_0x596fx6){var _0x596fx21={};_0x596fx21[_0x596fx10[_0x84d5[49]][_0x84d5[63]]]=_0x596fx10[_0x84d5[52]][_0x84d5[64]];SalesforceAccount[_0x84d5[46]]({where:_0x596fx21})[_0x84d5[10]](function(_0x596fx19){if(_0x596fx19[_0x84d5[37]]){return _0x596fx6[_0x84d5[7]](200)[_0x84d5[6]]({isValid:false,value:_0x596fx10[_0x84d5[52]][_0x84d5[64]]})};return _0x596fx6[_0x84d5[7]](200)[_0x84d5[6]]({isValid:true,value:_0x596fx10[_0x84d5[52]][_0x84d5[64]]})})[_0x84d5[36]](function(_0x596fx8){return handleError(_0x596fx6,_0x596fx8)})};exports[_0x84d5[65]]=function(_0x596fx10,_0x596fx6){SalesforceAccount[_0x84d5[50]](_0x596fx10[_0x84d5[49]][_0x84d5[48]])[_0x84d5[10]](handleEntityNotFound(_0x596fx6))[_0x84d5[10]](function(_0x596fx1d){var _0x596fx1e= new jsforce.Connection({oauth2:{loginUrl:_0x596fx1d[_0x84d5[17]],clientId:_0x596fx1d[_0x84d5[55]],clientSecret:_0x596fx1d[_0x84d5[56]]}});var _0x596fx1f=_0x596fx1d[_0x84d5[59]][_0x84d5[58]](_0x596fx1d[_0x84d5[57]]);_0x596fx1e[_0x84d5[61]](_0x596fx1d[_0x84d5[16]],_0x596fx1f,function(_0x596fx8,_0x596fx20){if(_0x596fx8){return _0x596fx6[_0x84d5[7]](400)[_0x84d5[6]](_0x596fx8)};_0x596fx1e[_0x84d5[69]](_0x84d5[68])[_0x84d5[67]](function(_0x596fx8,_0x596fx22){if(_0x596fx8){return _0x596fx6[_0x84d5[7]](400)[_0x84d5[6]](_0x596fx8)};return _0x596fx6[_0x84d5[7]](200)[_0x84d5[6]](_0x596fx22[_0x84d5[66]])})})})[_0x84d5[36]](handleError(_0x596fx6))};exports[_0x84d5[70]]=function(_0x596fx10,_0x596fx6){SalesforceAccount[_0x84d5[12]]({where:{id:_0x596fx10[_0x84d5[19]][_0x84d5[48]]},individualHooks:true})[_0x84d5[10]](function(){return _0x596fx6[_0x84d5[60]](204)})[_0x84d5[36]](function(_0x596fx8){return handleError(_0x596fx6,_0x596fx8)})}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/salesforce/accounts              ->  index
+ * POST    /api/salesforce/accounts              ->  create
+ * GET     /api/salesforce/accounts/:id          ->  show
+ * PUT     /api/salesforce/accounts/:id          ->  update
+ * DELETE  /api/salesforce/accounts/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var util = require('util');
+var jsforce = require('jsforce');
+
+var SalesforceAccount = require('../../models').SalesforceAccount;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of SalesforceAccounts
+exports.index = function(req, res) {
+  var attributes = ['description', 'name', 'username', 'remoteUri'];
+  var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100;
+  var page = req.query.page ? parseInt(req.query.page, 10) : 0;
+
+  var query = {
+    where: {},
+    limit: per_page,
+    offset: page * per_page
+  };
+
+  _.forIn(req.query, function(value, key) {
+    switch (key) {
+      case 'per_page':
+      case 'page':
+        break;
+      case 'sort_by':
+        query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null;
+        break;
+      case 'sort_order':
+        break;
+      case '$':
+        query.where.$or = [];
+        attributes.forEach(function(attribute) {
+          var tmp = {};
+          tmp[attribute] = {
+            $like: '%' + value + '%'
+          };
+
+          query.where.$or.push(tmp);
+        });
+        break;
+      default:
+        query.where[key] = {
+          $like: {}
+        };
+        query.where[key].$like = '%' + value + '%';
+    }
+  });
+
+  SalesforceAccount
+    .findAndCountAll(query)
+    .then(function(result) {
+
+      var total_pages = Math.ceil(result.count / per_page);
+      var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null;
+      var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null;
+
+      return res.status(200).send({
+        count: result.count,
+        rows: result.rows,
+        next_page: next_page,
+        previous_page: previous_page,
+        total_pages: total_pages
+      });
+
+    })
+    .catch(function(err) {
+      return res.status(500).send({
+        error: 'Something blew up!'
+      });
+    });
+}
+
+// Gets a single SalesforceAccount from the DB
+exports.show = function(req, res) {
+  SalesforceAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new SalesforceAccount in the DB
+exports.create = function(req, res) {
+  SalesforceAccount.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing SalesforceAccount in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  SalesforceAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a SalesforceAccount from the DB
+exports.destroy = function(req, res) {
+  SalesforceAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+exports.checkAccount = function(req, res) {
+  SalesforceAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(account) {
+      var conn = new jsforce.Connection({
+        oauth2: {
+          loginUrl: account.remoteUri,
+          clientId: account.clientId,
+          clientSecret: account.clientSecret,
+        }
+      });
+      var pwd = account.password.concat(account.securityToken);
+      conn.login(account.username, pwd, function(err, userInfo) {
+        if (err) {
+          return res.status(400).send(err);
+        }
+        return res.sendStatus(200);
+      });
+    })
+    .catch(handleError(res));
+}
+
+exports.accountValidation = function(req, res) {
+  var where = {};
+  where[req.params.field] = req.body.value;
+  SalesforceAccount
+    .findAndCountAll({
+      where: where
+    })
+    .then(function(result) {
+      if (result.count) {
+        return res.status(200).send({
+          isValid: false,
+          value: req.body.value
+        });
+      }
+      return res.status(200).send({
+        isValid: true,
+        value: req.body.value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.getFields = function(req, res) {
+  SalesforceAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(account) {
+      var conn = new jsforce.Connection({
+        oauth2: {
+          loginUrl: account.remoteUri,
+          clientId: account.clientId,
+          clientSecret: account.clientSecret,
+        }
+      });
+      var pwd = account.password.concat(account.securityToken);
+      conn.login(account.username, pwd, function(err, userInfo) {
+        if (err) {
+          return res.status(400).send(err);
+        }
+        conn.sobject("Task").describe(function(err, meta) {
+          if (err) {
+            return res.status(400).send(err);
+          }
+          return res.status(200).send(meta.fields);
+        });
+      });
+    })
+    .catch(handleError(res));
+};
+
+exports.bulkDestroy = function(req, res) {
+  SalesforceAccount
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
index 2925487..2c58d15 100644 (file)
@@ -1 +1,24 @@
-var _0x4e28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4e28[0];var SalesforceAccount=require(_0x4e28[2])[_0x4e28[1]];exports[_0x4e28[3]]=function(_0xb775x2){SalesforceAccount[_0x4e28[4]](function(_0xb775x3){onSave(_0xb775x2,_0xb775x3)});SalesforceAccount[_0x4e28[5]](function(_0xb775x3){onRemove(_0xb775x2,_0xb775x3)})};function onSave(_0xb775x2,_0xb775x3,_0xb775x5){_0xb775x2[_0x4e28[7]](_0x4e28[6],_0xb775x3)}function onRemove(_0xb775x2,_0xb775x3,_0xb775x5){_0xb775x2[_0x4e28[7]](_0x4e28[8],_0xb775x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SalesforceAccount = require('../../models').SalesforceAccount;
+
+exports.register = function(socket) {
+  SalesforceAccount.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SalesforceAccount.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('salesforce_account:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('salesforce_account:remove', doc);
+}
index 7853372..7936a09 100644 (file)
@@ -1 +1,18 @@
-var _0x65ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x65ed[0];var express=require(_0x65ed[1]);var auth=require(_0x65ed[2]);var controller=require(_0x65ed[3]);var router=express.Router();router[_0x65ed[7]](_0x65ed[4],auth[_0x65ed[5]](),controller[_0x65ed[6]]);router[_0x65ed[7]](_0x65ed[8],auth[_0x65ed[5]](),controller[_0x65ed[9]]);router[_0x65ed[11]](_0x65ed[4],auth[_0x65ed[5]](),controller[_0x65ed[10]]);router[_0x65ed[13]](_0x65ed[8],auth[_0x65ed[5]](),controller[_0x65ed[12]]);router[_0x65ed[11]](_0x65ed[14],auth[_0x65ed[5]](),controller[_0x65ed[15]]);router[_0x65ed[16]](_0x65ed[8],auth[_0x65ed[5]](),controller[_0x65ed[12]]);router[_0x65ed[18]](_0x65ed[8],auth[_0x65ed[5]](),controller[_0x65ed[17]]);module[_0x65ed[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./salesforce_configuration.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.post('/:id/:type', auth.isAuthenticated(), controller.addConfigurationField);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 5caa4df..0d1e211 100644 (file)
@@ -1 +1,97 @@
-var _0x1f3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0x1f3c[0];var proxyquire=require(_0x1f3c[2])[_0x1f3c[1]]();var salesforceConfigurationCtrlStub={index:_0x1f3c[3],show:_0x1f3c[4],create:_0x1f3c[5],update:_0x1f3c[6],destroy:_0x1f3c[7]};var routerStub={get:sinon[_0x1f3c[8]](),put:sinon[_0x1f3c[8]](),patch:sinon[_0x1f3c[8]](),post:sinon[_0x1f3c[8]](),delete:sinon[_0x1f3c[8]]()};var salesforceConfigurationIndex=proxyquire(_0x1f3c[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":salesforceConfigurationCtrlStub});describe(_0x1f3c[10],function(){it(_0x1f3c[11],function(){expect(salesforceConfigurationIndex)[_0x1f3c[13]][_0x1f3c[12]](routerStub)});describe(_0x1f3c[14],function(){it(_0x1f3c[15],function(){expect(routerStub[_0x1f3c[21]][_0x1f3c[20]](_0x1f3c[19],_0x1f3c[3]))[_0x1f3c[13]][_0x1f3c[18]][_0x1f3c[17]][_0x1f3c[16]]})});describe(_0x1f3c[22],function(){it(_0x1f3c[23],function(){expect(routerStub[_0x1f3c[21]][_0x1f3c[20]](_0x1f3c[24],_0x1f3c[4]))[_0x1f3c[13]][_0x1f3c[18]][_0x1f3c[17]][_0x1f3c[16]]})});describe(_0x1f3c[25],function(){it(_0x1f3c[26],function(){expect(routerStub[_0x1f3c[27]][_0x1f3c[20]](_0x1f3c[19],_0x1f3c[5]))[_0x1f3c[13]][_0x1f3c[18]][_0x1f3c[17]][_0x1f3c[16]]})});describe(_0x1f3c[28],function(){it(_0x1f3c[29],function(){expect(routerStub[_0x1f3c[30]][_0x1f3c[20]](_0x1f3c[24],_0x1f3c[6]))[_0x1f3c[13]][_0x1f3c[18]][_0x1f3c[17]][_0x1f3c[16]]})});describe(_0x1f3c[31],function(){it(_0x1f3c[29],function(){expect(routerStub[_0x1f3c[32]][_0x1f3c[20]](_0x1f3c[24],_0x1f3c[6]))[_0x1f3c[13]][_0x1f3c[18]][_0x1f3c[17]][_0x1f3c[16]]})});describe(_0x1f3c[33],function(){it(_0x1f3c[34],function(){expect(routerStub[_0x1f3c[35]][_0x1f3c[20]](_0x1f3c[24],_0x1f3c[7]))[_0x1f3c[13]][_0x1f3c[18]][_0x1f3c[17]][_0x1f3c[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var salesforceConfigurationCtrlStub = {
+  index: 'salesforceConfigurationCtrl.index',
+  show: 'salesforceConfigurationCtrl.show',
+  create: 'salesforceConfigurationCtrl.create',
+  update: 'salesforceConfigurationCtrl.update',
+  destroy: 'salesforceConfigurationCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var salesforceConfigurationIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './salesforce_configuration.controller': salesforceConfigurationCtrlStub
+});
+
+describe('SalesforceConfiguration API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(salesforceConfigurationIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/salesforce/configurations', function() {
+
+    it('should route to salesforceConfiguration.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'salesforceConfigurationCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'salesforceConfigurationCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/salesforce/configurations', function() {
+
+    it('should route to salesforceConfiguration.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'salesforceConfigurationCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'salesforceConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'salesforceConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'salesforceConfigurationCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 3139078..523aef6 100644 (file)
@@ -1 +1,147 @@
-var _0xf231=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xf231[0];var _=require(_0xf231[1]);var SalesforceConfiguration=require(_0xf231[3])[_0xf231[2]];var SalesforceField=require(_0xf231[3])[_0xf231[4]];function handleError(_0x9db1x5,_0x9db1x6){_0x9db1x6=_0x9db1x6||500;return function(_0x9db1x7){_0x9db1x5[_0xf231[6]](_0x9db1x6)[_0xf231[5]](_0x9db1x7)}}function responseWithResult(_0x9db1x5,_0x9db1x6){_0x9db1x6=_0x9db1x6||200;return function(_0x9db1x9){if(_0x9db1x9){_0x9db1x5[_0xf231[6]](_0x9db1x6)[_0xf231[7]](_0x9db1x9)}}}function handleEntityNotFound(_0x9db1x5){return function(_0x9db1x9){if(!_0x9db1x9){_0x9db1x5[_0xf231[6]](404)[_0xf231[8]]();return null};return _0x9db1x9}}function saveUpdates(_0x9db1xc){return function(_0x9db1x9){return _0x9db1x9[_0xf231[10]](_0x9db1xc)[_0xf231[9]](function(_0x9db1xd){return _0x9db1xd})}}function removeEntity(_0x9db1x5){return function(_0x9db1x9){if(_0x9db1x9){return _0x9db1x9[_0xf231[11]]()[_0xf231[9]](function(){_0x9db1x5[_0xf231[6]](204)[_0xf231[8]]()})}}}exports[_0xf231[12]]=function(_0x9db1xf,_0x9db1x5){SalesforceConfiguration[_0xf231[15]]({where:_0x9db1xf[_0xf231[14]]})[_0xf231[9]](responseWithResult(_0x9db1x5))[_0xf231[13]](handleError(_0x9db1x5))};exports[_0xf231[16]]=function(_0x9db1xf,_0x9db1x5){SalesforceConfiguration[_0xf231[22]]({where:{id:_0x9db1xf[_0xf231[18]][_0xf231[17]]},include:[{model:SalesforceField,as:_0xf231[19]},{model:SalesforceField,as:_0xf231[20]},{model:SalesforceField,as:_0xf231[21]}]})[_0xf231[9]](handleEntityNotFound(_0x9db1x5))[_0xf231[9]](responseWithResult(_0x9db1x5))[_0xf231[13]](handleError(_0x9db1x5))};exports[_0xf231[23]]=function(_0x9db1xf,_0x9db1x5){SalesforceConfiguration[_0xf231[23]](_0x9db1xf[_0xf231[24]])[_0xf231[9]](responseWithResult(_0x9db1x5,201))[_0xf231[13]](handleError(_0x9db1x5))};exports[_0xf231[25]]=function(_0x9db1xf,_0x9db1x5){if(_0x9db1xf[_0xf231[24]][_0xf231[17]]){delete _0x9db1xf[_0xf231[24]][_0xf231[17]]};SalesforceConfiguration[_0xf231[26]](_0x9db1xf[_0xf231[18]][_0xf231[17]])[_0xf231[9]](handleEntityNotFound(_0x9db1x5))[_0xf231[9]](saveUpdates(_0x9db1xf[_0xf231[24]]))[_0xf231[9]](responseWithResult(_0x9db1x5))[_0xf231[13]](handleError(_0x9db1x5))};exports[_0xf231[11]]=function(_0x9db1xf,_0x9db1x5){SalesforceConfiguration[_0xf231[26]](_0x9db1xf[_0xf231[18]][_0xf231[17]])[_0xf231[9]](handleEntityNotFound(_0x9db1x5))[_0xf231[9]](removeEntity(_0x9db1x5))[_0xf231[13]](handleError(_0x9db1x5))};exports[_0xf231[27]]=function(_0x9db1xf,_0x9db1x5,_0x9db1x10){var _0x9db1x11;SalesforceConfiguration[_0xf231[26]](_0x9db1xf[_0xf231[18]][_0xf231[17]])[_0xf231[9]](handleEntityNotFound(_0x9db1x5))[_0xf231[9]](function(_0x9db1x14){_0x9db1x11=_0x9db1x14;return SalesforceField[_0xf231[23]](_0x9db1xf[_0xf231[24]])})[_0xf231[9]](function(_0x9db1x13){switch(_0x9db1xf[_0xf231[18]][_0xf231[35]]){case _0xf231[30]:return [_0x9db1x11[_0xf231[29]](_0x9db1x13),_0x9db1x13];case _0xf231[32]:return [_0x9db1x11[_0xf231[31]](_0x9db1x13),_0x9db1x13];case _0xf231[34]:return [_0x9db1x11[_0xf231[33]](_0x9db1x13),_0x9db1x13]}})[_0xf231[28]](function(_0x9db1x12,_0x9db1x13){return _0x9db1x5[_0xf231[6]](201)[_0xf231[7]](_0x9db1x13)})[_0xf231[13]](handleError(_0x9db1x5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/salesforce/configurations              ->  index
+ * POST    /api/salesforce/configurations              ->  create
+ * GET     /api/salesforce/configurations/:id          ->  show
+ * PUT     /api/salesforce/configurations/:id          ->  update
+ * DELETE  /api/salesforce/configurations/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var SalesforceConfiguration = require('../../models').SalesforceConfiguration;
+var SalesforceField = require('../../models').SalesforceField;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of SalesforceConfigurations
+exports.index = function(req, res) {
+  SalesforceConfiguration.findAll({
+      where: req.query
+    })
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single SalesforceConfiguration from the DB
+exports.show = function(req, res) {
+  SalesforceConfiguration.find({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        model: SalesforceField,
+        as: 'Subject'
+      }, {
+        model: SalesforceField,
+        as: 'Description'
+      }, {
+        model: SalesforceField,
+        as: 'Field'
+      }]
+    })
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new SalesforceConfiguration in the DB
+exports.create = function(req, res) {
+  SalesforceConfiguration.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing SalesforceConfiguration in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  SalesforceConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a SalesforceConfiguration from the DB
+exports.destroy = function(req, res) {
+  SalesforceConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+exports.addConfigurationField = function(req, res, next) {
+  // console.log(req.params);
+  var salesforceConfiguration;
+  SalesforceConfiguration
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(salesforce_configuration) {
+      salesforceConfiguration = salesforce_configuration;
+      return SalesforceField.create(req.body)
+    })
+    .then(function(salesforceField) {
+      switch (req.params.type) {
+        case 'subject':
+          return [salesforceConfiguration.addSubject(salesforceField), salesforceField];
+        case 'description':
+          return [salesforceConfiguration.addDescription(salesforceField), salesforceField];
+        case 'field':
+          return [salesforceConfiguration.addField(salesforceField), salesforceField];
+      }
+    })
+    .spread(function(data, salesforceField) {
+      return res.status(201).json(salesforceField);
+    })
+    .catch(handleError(res));
+};
index 6dc0e05..c45a482 100644 (file)
@@ -1 +1,24 @@
-var _0x3eb7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x3eb7[0];var SalesforceConfiguration=require(_0x3eb7[2])[_0x3eb7[1]];exports[_0x3eb7[3]]=function(_0xec9dx2){SalesforceConfiguration[_0x3eb7[4]](function(_0xec9dx3){onSave(_0xec9dx2,_0xec9dx3)});SalesforceConfiguration[_0x3eb7[5]](function(_0xec9dx3){onRemove(_0xec9dx2,_0xec9dx3)})};function onSave(_0xec9dx2,_0xec9dx3,_0xec9dx5){_0xec9dx2[_0x3eb7[7]](_0x3eb7[6],_0xec9dx3)}function onRemove(_0xec9dx2,_0xec9dx3,_0xec9dx5){_0xec9dx2[_0x3eb7[7]](_0x3eb7[8],_0xec9dx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SalesforceConfiguration = require('../../models').SalesforceConfiguration;
+
+exports.register = function(socket) {
+  SalesforceConfiguration.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SalesforceConfiguration.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('salesforce_configuration:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('salesforce_configuration:remove', doc);
+}
index 6970658..4a0ccb2 100644 (file)
@@ -1 +1,18 @@
-var _0xaf5d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xaf5d[0];var express=require(_0xaf5d[1]);var auth=require(_0xaf5d[2]);var controller=require(_0xaf5d[3]);var router=express.Router();router[_0xaf5d[7]](_0xaf5d[4],auth[_0xaf5d[5]](),controller[_0xaf5d[6]]);router[_0xaf5d[7]](_0xaf5d[8],auth[_0xaf5d[5]](),controller[_0xaf5d[9]]);router[_0xaf5d[11]](_0xaf5d[4],auth[_0xaf5d[5]](),controller[_0xaf5d[10]]);router[_0xaf5d[13]](_0xaf5d[8],auth[_0xaf5d[5]](),controller[_0xaf5d[12]]);router[_0xaf5d[14]](_0xaf5d[8],auth[_0xaf5d[5]](),controller[_0xaf5d[12]]);router[_0xaf5d[16]](_0xaf5d[8],auth[_0xaf5d[5]](),controller[_0xaf5d[15]]);module[_0xaf5d[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./salesforce_field.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 0761a01..639e318 100644 (file)
@@ -1 +1,97 @@
-var _0xea1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xea1f[0];var proxyquire=require(_0xea1f[2])[_0xea1f[1]]();var salesforceFieldCtrlStub={index:_0xea1f[3],show:_0xea1f[4],create:_0xea1f[5],update:_0xea1f[6],destroy:_0xea1f[7]};var routerStub={get:sinon[_0xea1f[8]](),put:sinon[_0xea1f[8]](),patch:sinon[_0xea1f[8]](),post:sinon[_0xea1f[8]](),delete:sinon[_0xea1f[8]]()};var salesforceFieldIndex=proxyquire(_0xea1f[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":salesforceFieldCtrlStub});describe(_0xea1f[10],function(){it(_0xea1f[11],function(){expect(salesforceFieldIndex)[_0xea1f[13]][_0xea1f[12]](routerStub)});describe(_0xea1f[14],function(){it(_0xea1f[15],function(){expect(routerStub[_0xea1f[21]][_0xea1f[20]](_0xea1f[19],_0xea1f[3]))[_0xea1f[13]][_0xea1f[18]][_0xea1f[17]][_0xea1f[16]]})});describe(_0xea1f[22],function(){it(_0xea1f[23],function(){expect(routerStub[_0xea1f[21]][_0xea1f[20]](_0xea1f[24],_0xea1f[4]))[_0xea1f[13]][_0xea1f[18]][_0xea1f[17]][_0xea1f[16]]})});describe(_0xea1f[25],function(){it(_0xea1f[26],function(){expect(routerStub[_0xea1f[27]][_0xea1f[20]](_0xea1f[19],_0xea1f[5]))[_0xea1f[13]][_0xea1f[18]][_0xea1f[17]][_0xea1f[16]]})});describe(_0xea1f[28],function(){it(_0xea1f[29],function(){expect(routerStub[_0xea1f[30]][_0xea1f[20]](_0xea1f[24],_0xea1f[6]))[_0xea1f[13]][_0xea1f[18]][_0xea1f[17]][_0xea1f[16]]})});describe(_0xea1f[31],function(){it(_0xea1f[29],function(){expect(routerStub[_0xea1f[32]][_0xea1f[20]](_0xea1f[24],_0xea1f[6]))[_0xea1f[13]][_0xea1f[18]][_0xea1f[17]][_0xea1f[16]]})});describe(_0xea1f[33],function(){it(_0xea1f[34],function(){expect(routerStub[_0xea1f[35]][_0xea1f[20]](_0xea1f[24],_0xea1f[7]))[_0xea1f[13]][_0xea1f[18]][_0xea1f[17]][_0xea1f[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var salesforceFieldCtrlStub = {
+  index: 'salesforceFieldCtrl.index',
+  show: 'salesforceFieldCtrl.show',
+  create: 'salesforceFieldCtrl.create',
+  update: 'salesforceFieldCtrl.update',
+  destroy: 'salesforceFieldCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var salesforceFieldIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './salesforce_field.controller': salesforceFieldCtrlStub
+});
+
+describe('SalesforceField API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(salesforceFieldIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/salesforce/fields', function() {
+
+    it('should route to salesforceField.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'salesforceFieldCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/salesforce/fields/:id', function() {
+
+    it('should route to salesforceField.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'salesforceFieldCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/salesforce/fields', function() {
+
+    it('should route to salesforceField.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'salesforceFieldCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/salesforce/fields/:id', function() {
+
+    it('should route to salesforceField.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'salesforceFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/salesforce/fields/:id', function() {
+
+    it('should route to salesforceField.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'salesforceFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/salesforce/fields/:id', function() {
+
+    it('should route to salesforceField.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'salesforceFieldCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index 66e81ef..bab61d7 100644 (file)
@@ -1 +1,104 @@
-var _0xaacd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xaacd[0];var _=require(_0xaacd[1]);var SalesforceField=require(_0xaacd[3])[_0xaacd[2]];function handleError(_0x9c5bx4,_0x9c5bx5){_0x9c5bx5=_0x9c5bx5||500;return function(_0x9c5bx6){_0x9c5bx4[_0xaacd[5]](_0x9c5bx5)[_0xaacd[4]](_0x9c5bx6)}}function responseWithResult(_0x9c5bx4,_0x9c5bx5){_0x9c5bx5=_0x9c5bx5||200;return function(_0x9c5bx8){if(_0x9c5bx8){_0x9c5bx4[_0xaacd[5]](_0x9c5bx5)[_0xaacd[6]](_0x9c5bx8)}}}function handleEntityNotFound(_0x9c5bx4){return function(_0x9c5bx8){if(!_0x9c5bx8){_0x9c5bx4[_0xaacd[5]](404)[_0xaacd[7]]();return null};return _0x9c5bx8}}function saveUpdates(_0x9c5bxb){return function(_0x9c5bx8){return _0x9c5bx8[_0xaacd[9]](_0x9c5bxb)[_0xaacd[8]](function(_0x9c5bxc){return _0x9c5bxc})}}function removeEntity(_0x9c5bx4){return function(_0x9c5bx8){if(_0x9c5bx8){return _0x9c5bx8[_0xaacd[10]]()[_0xaacd[8]](function(){_0x9c5bx4[_0xaacd[5]](204)[_0xaacd[7]]()})}}}exports[_0xaacd[11]]=function(_0x9c5bxe,_0x9c5bx4){SalesforceField[_0xaacd[13]]()[_0xaacd[8]](responseWithResult(_0x9c5bx4))[_0xaacd[12]](handleError(_0x9c5bx4))};exports[_0xaacd[14]]=function(_0x9c5bxe,_0x9c5bx4){SalesforceField[_0xaacd[17]](_0x9c5bxe[_0xaacd[16]][_0xaacd[15]])[_0xaacd[8]](handleEntityNotFound(_0x9c5bx4))[_0xaacd[8]](responseWithResult(_0x9c5bx4))[_0xaacd[12]](handleError(_0x9c5bx4))};exports[_0xaacd[18]]=function(_0x9c5bxe,_0x9c5bx4){SalesforceField[_0xaacd[18]](_0x9c5bxe[_0xaacd[19]])[_0xaacd[8]](responseWithResult(_0x9c5bx4,201))[_0xaacd[12]](handleError(_0x9c5bx4))};exports[_0xaacd[20]]=function(_0x9c5bxe,_0x9c5bx4){if(_0x9c5bxe[_0xaacd[19]][_0xaacd[15]]){delete _0x9c5bxe[_0xaacd[19]][_0xaacd[15]]};SalesforceField[_0xaacd[17]](_0x9c5bxe[_0xaacd[16]][_0xaacd[15]])[_0xaacd[8]](handleEntityNotFound(_0x9c5bx4))[_0xaacd[8]](saveUpdates(_0x9c5bxe[_0xaacd[19]]))[_0xaacd[8]](responseWithResult(_0x9c5bx4))[_0xaacd[12]](handleError(_0x9c5bx4))};exports[_0xaacd[10]]=function(_0x9c5bxe,_0x9c5bx4){SalesforceField[_0xaacd[17]](_0x9c5bxe[_0xaacd[16]][_0xaacd[15]])[_0xaacd[8]](handleEntityNotFound(_0x9c5bx4))[_0xaacd[8]](removeEntity(_0x9c5bx4))[_0xaacd[12]](handleError(_0x9c5bx4))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/salesforce/fields              ->  index
+ * POST    /api/salesforce/fields              ->  create
+ * GET     /api/salesforce/fields/:id          ->  show
+ * PUT     /api/salesforce/fields/:id          ->  update
+ * DELETE  /api/salesforce/fields/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var SalesforceField = require('../../models').SalesforceField;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of SalesforceFields
+exports.index = function(req, res) {
+  SalesforceField.findAll()
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single SalesforceField from the DB
+exports.show = function(req, res) {
+  SalesforceField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new SalesforceField in the DB
+exports.create = function(req, res) {
+  SalesforceField.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing SalesforceField in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  SalesforceField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a SalesforceField from the DB
+exports.destroy = function(req, res) {
+  SalesforceField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
index d48e69f..b3f5775 100644 (file)
@@ -1 +1,24 @@
-var _0x4278=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4278[0];var SalesforceField=require(_0x4278[2])[_0x4278[1]];exports[_0x4278[3]]=function(_0x9046x2){SalesforceField[_0x4278[4]](function(_0x9046x3){onSave(_0x9046x2,_0x9046x3)});SalesforceField[_0x4278[5]](function(_0x9046x3){onRemove(_0x9046x2,_0x9046x3)})};function onSave(_0x9046x2,_0x9046x3,_0x9046x5){_0x9046x2[_0x4278[7]](_0x4278[6],_0x9046x3)}function onRemove(_0x9046x2,_0x9046x3,_0x9046x5){_0x9046x2[_0x4278[7]](_0x4278[8],_0x9046x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SalesforceField = require('../../models').SalesforceField;
+
+exports.register = function(socket) {
+  SalesforceField.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SalesforceField.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('salesforce_field:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('salesforce_field:remove', doc);
+}
index cf0cac9..86265f7 100644 (file)
@@ -1 +1,25 @@
-var _0xd063=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x3A\x69\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x65\x72\x76\x69\x63\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x70\x75\x74","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xd063[0];var express=require(_0xd063[1]);var controller=require(_0xd063[2]);var auth=require(_0xd063[3]);var router=express.Router();router[_0xd063[7]](_0xd063[4],auth[_0xd063[5]](),controller[_0xd063[6]]);router[_0xd063[7]](_0xd063[8],auth[_0xd063[5]](),controller[_0xd063[9]]);router[_0xd063[7]](_0xd063[10],auth[_0xd063[5]](),controller[_0xd063[11]]);router[_0xd063[7]](_0xd063[12],auth[_0xd063[5]](),controller[_0xd063[13]]);router[_0xd063[15]](_0xd063[4],auth[_0xd063[5]](),controller[_0xd063[14]]);router[_0xd063[15]](_0xd063[16],auth[_0xd063[5]](),controller[_0xd063[17]]);router[_0xd063[15]](_0xd063[18],auth[_0xd063[5]](),controller[_0xd063[19]]);router[_0xd063[15]](_0xd063[10],auth[_0xd063[5]](),controller[_0xd063[20]]);router[_0xd063[22]](_0xd063[8],auth[_0xd063[5]](),controller[_0xd063[21]]);router[_0xd063[22]](_0xd063[12],auth[_0xd063[5]](),controller[_0xd063[23]]);router[_0xd063[22]](_0xd063[18],auth[_0xd063[5]](),controller[_0xd063[24]]);router[_0xd063[26]](_0xd063[4],auth[_0xd063[5]](),controller[_0xd063[25]]);router[_0xd063[26]](_0xd063[12],auth[_0xd063[5]](),controller[_0xd063[27]]);router[_0xd063[26]](_0xd063[8],auth[_0xd063[5]](),controller[_0xd063[28]]);module[_0xd063[29]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./service.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:serviceId/customfields/:id', auth.isAuthenticated(), controller.showCustomField);
+router.get('/:id/customfields', auth.isAuthenticated(), controller.getCustomFields);
+router.get('/:id/agents', auth.isAuthenticated(), controller.showAgents);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/agents', auth.isAuthenticated(), controller.addAgents);
+router.post('/:id/customfields', auth.isAuthenticated(), controller.createCustomField);
+router.put('/:serviceId/customfields/:id', auth.isAuthenticated(), controller.updateCustomField);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id/agents', auth.isAuthenticated(), controller.removeAgents);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:serviceId/customfields/:id', auth.isAuthenticated(), controller.removeCustomField);
+router.delete('/:serviceId/customfields', auth.isAuthenticated(), controller.removeAllCustomFields);
+
+module.exports = router;
index 5ae7aec..3520e6b 100644 (file)
@@ -1 +1,356 @@
-var _0x98a0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x65\x72\x76\x69\x63\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x65\x72\x76\x69\x63\x65","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x6C\x6F\x67","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x70\x64\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x55\x53\x54\x4F\x4D\x5F\x46\x49\x45\x4C\x44","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x53\x65\x72\x76\x69\x63\x65\x49\x64","\x63\x72\x65\x61\x74\x65","\x73\x68\x6F\x77","\x73\x65\x72\x76\x69\x63\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x46\x69\x6E\x64\x69\x6E\x67\x20\x61\x70\x70\x20\x72\x6F\x77\x2E\x2E\x2E\x2E\x2E","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x53\x45\x52\x56\x49\x43\x45","\x75\x70\x64\x61\x74\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x6E\x6F\x20\x73\x65\x72\x76\x69\x63\x65\x20\x66\x6F\x75\x6E\x64","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0x98a0[0];var _=require(_0x98a0[1]);var util=require(_0x98a0[2]);var User=require(_0x98a0[4])[_0x98a0[3]];var Service=require(_0x98a0[4])[_0x98a0[5]];var UserHasService=require(_0x98a0[4])[_0x98a0[6]];var CustomField=require(_0x98a0[4])[_0x98a0[7]];var Contact=require(_0x98a0[4])[_0x98a0[8]];var Util=require(_0x98a0[9]);exports[_0x98a0[10]]=function(_0xc439x9,_0xc439xa,_0xc439xb){return Service[_0x98a0[17]](Util[_0x98a0[16]](_0xc439x9[_0x98a0[15]]))[_0x98a0[14]](function(_0xc439xd){_0xc439xa[_0x98a0[13]](200)[_0x98a0[12]](_0xc439xd)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[18]]=function(_0xc439x9,_0xc439xa){CustomField[_0x98a0[22]]({where:{ServiceId:_0xc439x9[_0x98a0[21]][_0x98a0[20]],active:true}})[_0x98a0[14]](function(_0xc439xe){return _0xc439xa[_0x98a0[13]](200)[_0x98a0[12]](_0xc439xe)})[_0x98a0[11]](function(_0xc439xc){console[_0x98a0[19]](_0xc439xc);return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[23]]=function(_0xc439x9,_0xc439xa){CustomField[_0x98a0[25]](_0xc439x9[_0x98a0[21]][_0x98a0[20]])[_0x98a0[14]](function(_0xc439xf){if(!_0xc439xf){return _0xc439xa[_0x98a0[24]](404)};return _0xc439xa[_0x98a0[12]](_0xc439xf)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[26]]=function(_0xc439x9,_0xc439xa){CustomField[_0x98a0[22]]({where:{name:_0xc439x9[_0x98a0[29]][_0x98a0[32]],id:{$ne:_0xc439x9[_0x98a0[29]][_0x98a0[20]]}}})[_0x98a0[14]](function(_0xc439xe){if(!_0xc439xe){return _0xc439xa[_0x98a0[24]](404)};if(_0xc439xe[_0x98a0[27]]>0){return _0xc439xa[_0x98a0[13]](500)[_0x98a0[12]]({message:_0x98a0[28]})};if(_0xc439x9[_0x98a0[29]][_0x98a0[20]]){delete _0xc439x9[_0x98a0[29]][_0x98a0[20]]};CustomField[_0x98a0[25]](_0xc439x9[_0x98a0[21]][_0x98a0[20]])[_0x98a0[14]](function(_0xc439xf){if(!_0xc439xf){return _0xc439xa[_0x98a0[24]](404)};var _0xc439x10=_[_0x98a0[30]](_0xc439xf,_0xc439x9[_0x98a0[29]]);_0xc439x10[_0x98a0[31]]()[_0x98a0[14]](function(){return _0xc439xa[_0x98a0[13]](200)[_0x98a0[12]](_0xc439xf)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[33]]=function(_0xc439x9,_0xc439xa){_0xc439x9[_0x98a0[29]][_0x98a0[34]]=_0xc439x9[_0x98a0[21]][_0x98a0[20]];CustomField[_0x98a0[35]](_0xc439x9[_0x98a0[29]])[_0x98a0[14]](function(_0xc439xf){return _0xc439xa[_0x98a0[13]](201)[_0x98a0[12]](_0xc439xf)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[36]]=function(_0xc439x9,_0xc439xa){Service[_0x98a0[25]](_0xc439x9[_0x98a0[21]][_0x98a0[20]])[_0x98a0[14]](function(_0xc439x11){if(!_0xc439x11){return _0xc439xa[_0x98a0[24]](404)};return _0xc439xa[_0x98a0[12]](_0xc439x11)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[37]]=function(_0xc439x9,_0xc439xa){console[_0x98a0[19]](_0xc439x9[_0x98a0[29]]);Service[_0x98a0[22]]({where:{id:_0xc439x9[_0x98a0[29]][_0x98a0[20]]}})[_0x98a0[14]](function(_0xc439x11){if(!_0xc439x11){return _0xc439xa[_0x98a0[24]](404)};return _0xc439xa[_0x98a0[12]](_0xc439x11)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[35]]=function(_0xc439x9,_0xc439xa){Service[_0x98a0[22]]({where:{name:_0xc439x9[_0x98a0[29]][_0x98a0[32]]}})[_0x98a0[14]](function(_0xc439x12){console[_0x98a0[19]](_0xc439x12);console[_0x98a0[19]](_0x98a0[38]);if(!_0xc439x12){return _0xc439xa[_0x98a0[24]](404)};if(_0xc439x12[_0x98a0[27]]>0){return _0xc439xa[_0x98a0[13]](500)[_0x98a0[12]]({message:_0x98a0[39]})};Service[_0x98a0[35]](_0xc439x9[_0x98a0[29]])[_0x98a0[14]](function(_0xc439x11){return _0xc439xa[_0x98a0[13]](201)[_0x98a0[12]](_0xc439x11)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[40]]=function(_0xc439x9,_0xc439xa){Service[_0x98a0[22]]({where:{name:_0xc439x9[_0x98a0[29]][_0x98a0[32]]}})[_0x98a0[14]](function(_0xc439x12){console[_0x98a0[19]](_0xc439x12);console[_0x98a0[19]](_0x98a0[38]);if(!_0xc439x12){return _0xc439xa[_0x98a0[24]](404)};if(_0xc439x12[_0x98a0[27]]>0){return _0xc439xa[_0x98a0[13]](500)[_0x98a0[12]]({message:_0x98a0[39]})};return Service[_0x98a0[25]](_0xc439x9[_0x98a0[21]][_0x98a0[20]])})[_0x98a0[14]](function(_0xc439x11){if(!_0xc439x11){return _0xc439xa[_0x98a0[24]](404)};if(_0xc439x9[_0x98a0[29]][_0x98a0[20]]){delete _0xc439x9[_0x98a0[29]][_0x98a0[20]]};var _0xc439x10=_[_0x98a0[30]](_0xc439x11,_0xc439x9[_0x98a0[29]]);return _0xc439x10[_0x98a0[31]]()})[_0x98a0[14]](function(_0xc439x11){return _0xc439xa[_0x98a0[13]](200)[_0x98a0[12]](_0xc439x11)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};exports[_0x98a0[41]]=function(_0xc439x9,_0xc439xa,_0xc439xb){console[_0x98a0[19]](_0x98a0[41]);console[_0x98a0[19]](_0xc439x9[_0x98a0[21]]);console[_0x98a0[19]](_0xc439x9[_0x98a0[29]]);User[_0x98a0[22]]({where:{id:{$in:_0xc439x9[_0x98a0[29]][_0x98a0[44]]}}})[_0x98a0[14]](function(_0xc439x13){var _0xc439x14=_[_0x98a0[42]](_0xc439x13,function(_0xc439x15){return {service:_0xc439x9[_0x98a0[21]][_0x98a0[20]],membername:_0xc439x15[_0x98a0[32]],UserId:_0xc439x15[_0x98a0[20]]}});UserHasService[_0x98a0[43]](_0xc439x14,{individualHooks:true})[_0x98a0[14]](function(){return _0xc439xa[_0x98a0[24]](200)})[_0x98a0[11]](function(_0xc439xc){return _0xc439xb(_0xc439xc)})})[_0x98a0[11]](function(_0xc439xc){return _0xc439xb(_0xc439xc)})};exports[_0x98a0[45]]=function(_0xc439x9,_0xc439xa,_0xc439xb){Service[_0x98a0[48]]({where:{id:_0xc439x9[_0x98a0[21]][_0x98a0[20]]}})[_0x98a0[14]](function(_0xc439x11){if(_0xc439x11){_0xc439x11[_0x98a0[46]](_0xc439x9[_0x98a0[29]][_0x98a0[44]],{individualHooks:true})[_0x98a0[14]](function(){return _0xc439xa[_0x98a0[24]](200)})[_0x98a0[11]](function(_0xc439xc){return _0xc439xb(_0xc439xc)})}else {return _0xc439xb( new Error(_0x98a0[47]))}})[_0x98a0[11]](function(_0xc439xc){return _0xc439xb(_0xc439xc)})};exports[_0x98a0[49]]=function(_0xc439x9,_0xc439xa){destroyService(_0xc439x9[_0x98a0[21]][_0x98a0[20]],_0xc439xa)};exports[_0x98a0[50]]=function(_0xc439x9,_0xc439xa){destroyService(_0xc439x9[_0x98a0[15]][_0x98a0[20]],_0xc439xa)};function destroyService(_0xc439x17,_0xc439xa){return delOrUpdateCf(_0xc439x17)[_0x98a0[51]]()[_0x98a0[14]](function(){return Service[_0x98a0[49]]({where:{id:_0xc439x17},individualHooks:true})})[_0x98a0[14]](function(){return _0xc439xa[_0x98a0[24]](204)})[_0x98a0[11]](function(_0xc439xc){console[_0x98a0[19]](_0xc439xc);return handleError(_0xc439xa,_0xc439xc)})}function delOrUpdateCf(_0xc439x17){return CustomField[_0x98a0[22]]({where:{ServiceId:_0xc439x17},include:[{model:Contact}]})[_0x98a0[14]](function(_0xc439xe){console[_0x98a0[19]](_0xc439xe[_0x98a0[27]]);var _0xc439x19=[];_[_0x98a0[54]](_0xc439xe,function(_0xc439x1a){if(_0xc439x1a[_0x98a0[52]][_0x98a0[27]]){_0xc439x19[_0x98a0[53]](_0xc439x1a[_0x98a0[40]]({active:false}))}else {_0xc439x19[_0x98a0[53]](_0xc439x1a[_0x98a0[49]]())}});return _0xc439x19})}exports[_0x98a0[55]]=function(_0xc439x9,_0xc439xa){CustomField[_0x98a0[25]](_0xc439x9[_0x98a0[21]][_0x98a0[20]],{include:[{model:Contact}]})[_0x98a0[14]](function(_0xc439xf){if(!_0xc439xf){return _0xc439xa[_0x98a0[24]](404)};if(_0xc439xf[_0x98a0[52]][_0x98a0[27]]){return _0xc439xf[_0x98a0[40]]({active:false})}else {return _0xc439xf[_0x98a0[49]]()}})[_0x98a0[14]](function(){return _0xc439xa[_0x98a0[24]](204)})[_0x98a0[11]](function(_0xc439xc){return handleError(_0xc439xa,_0xc439xc)})};function handleError(_0xc439xa,_0xc439xc){return _0xc439xa[_0x98a0[13]](500)[_0x98a0[12]](_0xc439xc)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+
+var User = require('../../models').User;
+var Service = require('../../models').Service;
+var UserHasService = require('../../models').UserHasService;
+var CustomField = require('../../models').CustomField;
+var Contact = require('../../models').Contact;
+var Util = require('../../config/util');
+var sequelize = require('../../models').sequelize;
+
+// Get list of services
+exports.index = function(req, res, next) {
+  return Service
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get all custom_fields
+exports.getCustomFields = function(req, res) {
+  return CustomField
+    .findAndCountAll({
+      where: {
+        ServiceId: req.params.id,
+        active: true
+      }
+    })
+    .then(function(customFields) {
+      return res.status(200).send(customFields);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.showCustomField = function(req, res) {
+  return CustomField
+    .findById(req.params.id)
+    .then(function(customField) {
+      if (!customField) {
+        return res.sendStatus(404);
+      }
+      return res.status(200).send(customField);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.updateCustomField = function(req, res) {
+  return CustomField
+    .findById(req.params.id)
+    .then(function(customField) {
+      if (!customField) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(customField, req.body);
+      return updated.save();
+    })
+    .then(function(customField) {
+      return res.status(200).send(customField);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.createCustomField = function(req, res) {
+  var _customField;
+  req.body.ServiceId = req.params.id;
+  return CustomField
+    .create(req.body)
+    .then(function(customField) {
+      _customField = customField;
+      customField.name = 'cf_' + customField.id;
+      return customField.save();
+    })
+    .then(function() {
+      return sequelize.query(util.format('ALTER TABLE contacts ADD COLUMN %s VARCHAR(255)', _customField.name));
+    })
+    .then(function() {
+      return res.sendStatus(201);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single service
+exports.show = function(req, res) {
+  return Service
+    .findById(req.params.id)
+    .then(function(service) {
+      if (!service) {
+        return res.sendStatus(404);
+      }
+      return res.send(service);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new service in the DB.
+exports.create = function(req, res) {
+
+  return Service
+    .create(req.body)
+    .then(function(service) {
+      return res.status(201).send(service);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      err.translatedMessage = 'MESSAGE_EXIST_SERVICE';
+      err.message = 'The service name already exists';
+      return res.status(500).send(err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing service in the DB.
+exports.update = function(req, res) {
+  return Service
+    .findById(req.params.id)
+    .then(function(service) {
+      if (!service) {
+        return res.sendStatus(404);
+      }
+      if (req.body.id) {
+        delete req.body.id;
+      }
+      var updated = _.merge(service, req.body);
+      return updated.save();
+    })
+    .then(function(service) {
+      return res.status(200).send(service);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      err.translatedMessage = 'MESSAGE_EXIST_SERVICE';
+      err.message = 'The service name already exists';
+      return res.status(500).send(err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.showAgents = function(req, res) {
+  return Service
+    .findById(req.params.id)
+    .then(function(service) {
+      if (!service) {
+        return res.sendStatus(404);
+      }
+      return service
+        .getUsers({
+          where: {
+            role: 'agent'
+          },
+          attributes: ['id', 'name', 'fullname', 'email']
+        });
+    })
+    .then(function(agents) {
+      return res.status(200).send(agents);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing user_has_service in the DB.
+exports.addAgents = function(req, res, next) {
+  return User
+    .findAll({
+      where: {
+        id: req.body.agents
+      }
+    })
+    .then(function(users) {
+      // console.log(users);
+      var userHasServices = _.map(users, function(user) {
+        return {
+          service: req.params.id,
+          membername: user.name,
+          UserId: user.id
+        };
+      });
+
+      return UserHasService
+        .bulkCreate(userHasServices, {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return next(err);
+    });
+};
+
+exports.removeAgents = function(req, res, next) {
+  return UserHasService
+    .destroy({
+      where: {
+        UserId: req.query.agents,
+        service: req.params.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(202);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Deletes a service from the DB.
+exports.destroy = function(req, res) {
+  return destroyService(req.params.id, res);
+};
+
+// Deletes multiple services from the DB.
+exports.bulkDestroy = function(req, res) { //add the check for associated contacts
+  return destroyService(req.query.id, res);
+};
+
+function destroyService(id, res) {
+  return delCf(id, res)
+    .all()
+    .then(function() {
+      return Service.destroy({
+        where: {
+          id: id
+        },
+        individualHooks: true
+      });
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+}
+
+function delCf(id, res) {
+  var _cfs;
+  return CustomField.findAll({
+      where: {
+        ServiceId: id
+      }
+    })
+    .then(function(cfs) {
+      if (!cfs) {
+        return res.sendStatus(404);
+      }
+      _cfs = cfs;
+      return CustomField
+        .destroy({
+          where: {
+            id: id
+          }
+        });
+    })
+    .then(function() {
+      var bulkDel = [];
+      _.forEach(_cfs, function(elem) {
+        bulkDel.push(sequelize.query(util.format('ALTER TABLE contacts DROP COLUMN %s', elem.name)));
+      });
+      return bulkDel;
+    })
+}
+
+exports.removeCustomField = function(req, res) {
+  var _cf;
+  return CustomField
+    .findById(req.params.id)
+    .then(function(cf) {
+      if (!cf) {
+        return res.sendStatus(404);
+      }
+      _cf = cf;
+      return CustomField
+        .destroy({
+          where: {
+            id: req.params.id
+          }
+        });
+    })
+    .then(function() {
+      return sequelize.query(util.format('ALTER TABLE contacts DROP COLUMN %s', _cf.name));
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.removeAllCustomFields = function(req, res) {
+  var _cfs;
+  return CustomField
+    .findAll({
+      where: {
+        id: req.query.ids
+      }
+    })
+    .then(function(cfs) {
+      if (!cfs) {
+        return res.sendStatus(404);
+      }
+      _cfs = cfs;
+      return CustomField
+        .destroy({
+          where: {
+            id: req.query.ids
+          }
+        });
+    })
+    .then(function(customFields) {
+      if (!customFields) {
+        return res.sendStatus(404);
+      }
+      var bulkDel = [];
+      _cfs.forEach(function(elem) {
+        bulkDel.push(sequelize.query(util.format('ALTER TABLE contacts DROP COLUMN %s', elem.name)));
+      });
+      return bulkDel;
+    })
+    .all()
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 77378d1..981784a 100644 (file)
@@ -1 +1,33 @@
-var _0x66ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x73\x65\x72\x76\x69\x63\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64","\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x3A\x72\x65\x6D\x6F\x76\x65"];_0x66ef[0];var Service=require(_0x66ef[2])[_0x66ef[1]];var CustomField=require(_0x66ef[2])[_0x66ef[3]];exports[_0x66ef[4]]=function(_0x9c2dx3){Service[_0x66ef[6]](function(_0x9c2dx4){onSave(_0x9c2dx3,_0x9c2dx4,_0x66ef[5])});Service[_0x66ef[9]](function(_0x9c2dx4){console[_0x66ef[8]](_0x66ef[7]);onRemove(_0x9c2dx3,_0x9c2dx4,_0x66ef[5])});CustomField[_0x66ef[6]](function(_0x9c2dx4){onSave(_0x9c2dx3,_0x9c2dx4,_0x66ef[10])});CustomField[_0x66ef[9]](function(_0x9c2dx4){onRemove(_0x9c2dx3,_0x9c2dx4,_0x66ef[10])})};function onSave(_0x9c2dx3,_0x9c2dx4,_0x9c2dx6,_0x9c2dx7){_0x9c2dx3[_0x66ef[12]](_0x9c2dx6+_0x66ef[11],_0x9c2dx4)}function onRemove(_0x9c2dx3,_0x9c2dx4,_0x9c2dx6,_0x9c2dx7){console[_0x66ef[8]](_0x9c2dx6);_0x9c2dx3[_0x66ef[12]](_0x9c2dx6+_0x66ef[13],_0x9c2dx4)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Service = require('../../models').Service;
+var CustomField = require('../../models').CustomField;
+
+exports.register = function(socket) {
+  Service.afterCreate(function(doc) {
+    onSave(socket, doc, 'service');
+  });
+  Service.afterDestroy(function(doc) {
+    console.log('destroy');
+    onRemove(socket, doc, 'service');
+  });
+  CustomField.afterCreate(function(doc) {
+    onSave(socket, doc, 'custom_field');
+  });
+  CustomField.afterDestroy(function(doc) {
+    onRemove(socket, doc, 'custom_field');
+  });
+}
+
+function onSave(socket, doc, type, cb) {
+  socket.emit(type + ':save', doc);
+}
+
+function onRemove(socket, doc, type, cb) {
+  console.log(type);
+  socket.emit(type + ':remove', doc);
+}
index 11117f2..7d84147 100644 (file)
@@ -1 +1,20 @@
-var _0xb126=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x73\x65\x72\x76\x69\x63\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x73\x65\x72\x76\x69\x63\x65\x73","\x67\x65\x74"];_0xb126[0];var should=require(_0xb126[1]);var app=require(_0xb126[2]);var request=require(_0xb126[3]);describe(_0xb126[4],function(){it(_0xb126[5],function(_0xc4bdx4){request(app)[_0xb126[13]](_0xb126[12])[_0xb126[11]](200)[_0xb126[11]](_0xb126[10],/json/)[_0xb126[9]](function(_0xc4bdx5,_0xc4bdx6){if(_0xc4bdx5){return _0xc4bdx4(_0xc4bdx5)};_0xc4bdx6[_0xb126[8]][_0xb126[1]][_0xb126[7]][_0xb126[6]](Array);_0xc4bdx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/contactmanager/services', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/contactmanager/services')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 61ec48e..e30286b 100644 (file)
@@ -1 +1,19 @@
-var _0xe5db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x2F\x6D\x61\x69\x6C\x62\x6F\x78","\x67\x65\x74\x4D\x61\x69\x6C\x62\x6F\x78","\x2F\x69\x6E\x66\x6F","\x67\x65\x74\x49\x6E\x66\x6F","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe5db[0];var express=require(_0xe5db[1]);var controller=require(_0xe5db[2]);var auth=require(_0xe5db[3]);var router=express.Router();router[_0xe5db[7]](_0xe5db[4],auth[_0xe5db[5]](),controller[_0xe5db[6]]);router[_0xe5db[7]](_0xe5db[8],auth[_0xe5db[5]](),controller[_0xe5db[9]]);router[_0xe5db[7]](_0xe5db[10],auth[_0xe5db[5]](),controller[_0xe5db[11]]);router[_0xe5db[7]](_0xe5db[12],controller[_0xe5db[13]]);router[_0xe5db[7]](_0xe5db[14],auth[_0xe5db[5]](),controller[_0xe5db[15]]);router[_0xe5db[17]](_0xe5db[4],auth[_0xe5db[5]](),controller[_0xe5db[16]]);router[_0xe5db[19]](_0xe5db[14],auth[_0xe5db[5]](),controller[_0xe5db[18]]);router[_0xe5db[20]](_0xe5db[14],auth[_0xe5db[5]](),controller[_0xe5db[18]]);router[_0xe5db[22]](_0xe5db[14],auth[_0xe5db[5]](),controller[_0xe5db[21]]);module[_0xe5db[23]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./setting.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/internal', auth.isAuthenticated(), controller.getInternal);
+router.get('/mailbox', auth.isAuthenticated(), controller.getMailbox);
+router.get('/info', controller.getInfo);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 609e5c4..6c2943d 100644 (file)
@@ -1 +1,172 @@
-var _0x4dc9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x76\x61\x6C\x75\x65","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\x78","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x62\x6F\x78","\x6C\x6F\x67","\x6D\x69\x6E\x5F\x6D\x61\x69\x6C\x62\x6F\x78","\x6D\x61\x69\x6C\x62\x6F\x78","\x67\x65\x74\x49\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x70\x61\x63\x6B\x61\x67\x65\x2E\x6A\x73\x6F\x6E","\x6E\x61\x6D\x65","\x76\x65\x72\x73\x69\x6F\x6E","\x65\x6E\x67\x69\x6E\x65\x73","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x4dc9[0];var _=require(_0x4dc9[1]);var Settings=require(_0x4dc9[3])[_0x4dc9[2]];var Agent=require(_0x4dc9[3])[_0x4dc9[4]];var VoiceMail=require(_0x4dc9[3])[_0x4dc9[5]];exports[_0x4dc9[6]]=function(_0xeb2dx5,_0xeb2dx6){return Settings[_0x4dc9[11]]()[_0x4dc9[10]](function(_0xeb2dx8){return _0xeb2dx6[_0x4dc9[9]](200)[_0x4dc9[8]](_0xeb2dx8)})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})};exports[_0x4dc9[12]]=function(_0xeb2dx5,_0xeb2dx6){var _0xeb2dx9;return Settings[_0x4dc9[17]](1)[_0x4dc9[10]](function(_0xeb2dx8){_0xeb2dx9=_0xeb2dx8;return Agent[_0x4dc9[16]](_0x4dc9[15])})[_0x4dc9[10]](function(_0xeb2dxa){var _0xeb2dxb={value:0};if(_0xeb2dxa){_0xeb2dxb[_0x4dc9[13]]= ++_0xeb2dxa}else {_0xeb2dxb[_0x4dc9[13]]=_0xeb2dx9[_0x4dc9[14]]};return _0xeb2dx6[_0x4dc9[9]](200)[_0x4dc9[8]](_0xeb2dxb)})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})};exports[_0x4dc9[18]]=function(_0xeb2dx5,_0xeb2dx6){var _0xeb2dx9;return Settings[_0x4dc9[17]](1)[_0x4dc9[10]](function(_0xeb2dx8){_0xeb2dx9=_0xeb2dx8;return VoiceMail[_0x4dc9[16]](_0x4dc9[21])})[_0x4dc9[10]](function(_0xeb2dxc){var _0xeb2dxd={value:0};if(_0xeb2dxc){_0xeb2dxd[_0x4dc9[13]]= ++_0xeb2dxc}else {_0xeb2dxd[_0x4dc9[13]]=_0xeb2dx9[_0x4dc9[20]]};return _0xeb2dx6[_0x4dc9[9]](200)[_0x4dc9[8]](_0xeb2dxd)})[_0x4dc9[7]](function(_0xeb2dx7){console[_0x4dc9[19]](_0xeb2dx7);return handleError(_0xeb2dx6,_0xeb2dx7)})};exports[_0x4dc9[22]]=function(_0xeb2dx5,_0xeb2dx6){var _0xeb2dxe=require(_0x4dc9[23]);return _0xeb2dx6[_0x4dc9[9]](200)[_0x4dc9[8]]({name:_0xeb2dxe[_0x4dc9[24]],version:_0xeb2dxe[_0x4dc9[25]],engines:_0xeb2dxe[_0x4dc9[26]]})};exports[_0x4dc9[27]]=function(_0xeb2dx5,_0xeb2dx6){Settings[_0x4dc9[17]](_0xeb2dx5[_0x4dc9[30]][_0x4dc9[29]])[_0x4dc9[10]](function(_0xeb2dxf){if(!_0xeb2dxf){return _0xeb2dx6[_0x4dc9[28]](404)};return _0xeb2dx6[_0x4dc9[8]](_0xeb2dxf)})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})};exports[_0x4dc9[31]]=function(_0xeb2dx5,_0xeb2dx6){Settings[_0x4dc9[31]](_0xeb2dx5[_0x4dc9[32]])[_0x4dc9[10]](function(_0xeb2dxf){return _0xeb2dx6[_0x4dc9[9]](201)[_0x4dc9[8]](_0xeb2dxf)})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})};exports[_0x4dc9[33]]=function(_0xeb2dx5,_0xeb2dx6){if(_0xeb2dx5[_0x4dc9[32]][_0x4dc9[29]]){delete _0xeb2dx5[_0x4dc9[32]][_0x4dc9[29]]};Settings[_0x4dc9[36]]({where:{id:_0xeb2dx5[_0x4dc9[30]][_0x4dc9[29]]}})[_0x4dc9[10]](function(_0xeb2dxf){if(!_0xeb2dxf){return _0xeb2dx6[_0x4dc9[28]](404)};var _0xeb2dx10=_[_0x4dc9[34]](_0xeb2dxf,_0xeb2dx5[_0x4dc9[32]]);_0xeb2dx10[_0x4dc9[35]]()[_0x4dc9[10]](function(){return _0xeb2dx6[_0x4dc9[9]](200)[_0x4dc9[8]](_0xeb2dxf)})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})};exports[_0x4dc9[37]]=function(_0xeb2dx5,_0xeb2dx6){Settings[_0x4dc9[36]]({where:{id:_0xeb2dx5[_0x4dc9[30]][_0x4dc9[29]]}})[_0x4dc9[10]](function(_0xeb2dxf){if(!_0xeb2dxf){return _0xeb2dx6[_0x4dc9[28]](404)};_0xeb2dxf[_0x4dc9[37]]()[_0x4dc9[10]](function(){return _0xeb2dx6[_0x4dc9[28]](204)})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})})[_0x4dc9[7]](function(_0xeb2dx7){return handleError(_0xeb2dx6,_0xeb2dx7)})};function handleError(_0xeb2dx6,_0xeb2dx7){return _0xeb2dx6[_0x4dc9[9]](500)[_0x4dc9[8]](_0xeb2dx7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Settings = require('../../models').Settings;
+var Agent = require('../../models').User;
+var VoiceMail = require('../../models').VoiceVoicemail;
+
+// Get list of settings
+exports.index = function(req, res) {
+  return Settings
+    .findAll()
+    .then(function(settings) {
+      return res.status(200).send(settings);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get internal
+exports.getInternal = function(req, res) {
+  var _settings;
+  return Settings
+    .findById(1)
+    .then(function(settings) {
+      _settings = settings;
+      return Agent
+        .max('internal');
+    })
+    .then(function(internal) {
+      var _internal = {
+        value: 0
+      };
+
+      if (internal) {
+        _internal.value = ++internal;
+      } else {
+        _internal.value = _settings.min_internal;
+      }
+
+      return res.status(200).send(_internal);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get internal
+exports.getMailbox = function(req, res) {
+  var _settings;
+  return Settings
+    .findById(1)
+    .then(function(settings) {
+      _settings = settings;
+      return VoiceMail
+        .max('mailbox');
+    })
+    .then(function(mailbox) {
+      var _mailbox = {
+        value: 0
+      };
+
+      if (mailbox) {
+        _mailbox.value = ++mailbox;
+      } else {
+        _mailbox.value = _settings.min_mailbox;
+      }
+
+      return res.status(200).send(_mailbox);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Get list of settings
+exports.getInfo = function(req, res) {
+
+  var info = require('../../../package.json');
+
+  return res.status(200).send({
+    name: info.name,
+    version: info.version,
+    engines: info.engines
+  });
+};
+
+// Get a single setting
+exports.show = function(req, res) {
+  Settings
+    .findById(req.params.id)
+    .then(function(setting) {
+      if (!setting) {
+        return res.sendStatus(404);
+      }
+      return res.send(setting);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new setting in the DB.
+exports.create = function(req, res) {
+  Settings
+    .create(req.body)
+    .then(function(setting) {
+      return res.status(201).send(setting);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing setting in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  Settings
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(setting) {
+      if (!setting) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(setting, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(setting);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a setting from the DB.
+exports.destroy = function(req, res) {
+  Settings
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(setting) {
+      if (!setting) {
+        return res.sendStatus(404);
+      }
+      setting.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 313c9e3..611827e 100644 (file)
@@ -1 +1,24 @@
-var _0x257f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x74\x74\x69\x6E\x67\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x65\x74\x74\x69\x6E\x67\x3A\x72\x65\x6D\x6F\x76\x65"];_0x257f[0];var Settings=require(_0x257f[2])[_0x257f[1]];exports[_0x257f[3]]=function(_0xc1e4x2){Settings[_0x257f[4]](function(_0xc1e4x3){onSave(_0xc1e4x2,_0xc1e4x3)});Settings[_0x257f[5]](function(_0xc1e4x3){onRemove(_0xc1e4x2,_0xc1e4x3)})};function onSave(_0xc1e4x2,_0xc1e4x3,_0xc1e4x5){_0xc1e4x2[_0x257f[7]](_0x257f[6],_0xc1e4x3)}function onRemove(_0xc1e4x2,_0xc1e4x3,_0xc1e4x5){_0xc1e4x2[_0x257f[7]](_0x257f[8],_0xc1e4x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Settings = require('../../models').Settings;
+
+exports.register = function(socket) {
+  Settings.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Settings.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('setting:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('setting:remove', doc);
+}
index 150e233..4ade980 100644 (file)
@@ -1 +1,18 @@
-var _0x65f6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x73\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x65f6[0];var express=require(_0x65f6[1]);var controller=require(_0x65f6[2]);var auth=require(_0x65f6[3]);var router=express.Router();router[_0x65f6[7]](_0x65f6[4],auth[_0x65f6[5]](),controller[_0x65f6[6]]);router[_0x65f6[7]](_0x65f6[8],auth[_0x65f6[5]](),controller[_0x65f6[9]]);router[_0x65f6[7]](_0x65f6[10],auth[_0x65f6[5]](),controller[_0x65f6[11]]);router[_0x65f6[7]](_0x65f6[12],auth[_0x65f6[5]](),controller[_0x65f6[13]]);router[_0x65f6[15]](_0x65f6[4],auth[_0x65f6[5]](),controller[_0x65f6[14]]);router[_0x65f6[17]](_0x65f6[8],auth[_0x65f6[5]](),controller[_0x65f6[16]]);router[_0x65f6[18]](_0x65f6[8],auth[_0x65f6[5]](),controller[_0x65f6[16]]);router[_0x65f6[20]](_0x65f6[8],auth[_0x65f6[5]](),controller[_0x65f6[19]]);module[_0x65f6[21]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./sound.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/download', auth.isAuthenticated(), controller.download);
+router.get('/:id/stream', auth.isAuthenticated(), controller.stream);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index aa971bb..335d2c9 100644 (file)
@@ -1 +1,266 @@
-var _0x46bf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x73\x6F\x78","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x53\x6F\x75\x6E\x64\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x77\x61\x76\x2C\x6D\x70\x33\x2C\x67\x73\x6D\x2C\x20\x61\x6E\x64\x20\x6F\x67\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x31\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x6E\x61\x6D\x65","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x53\x6F\x75\x6E\x64\x73","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x69\x64\x65\x6E\x74\x69\x66\x79","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x75\x6E\x6C\x69\x6E\x6B","\x6F\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x73\x74\x61\x72\x74","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x73\x74\x72\x65\x61\x6D","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x53\x6F\x75\x6E\x64\x73","\x5F\x66\x6F\x72\x6D\x61\x74"];_0x46bf[0];var _=require(_0x46bf[1]);var Sound=require(_0x46bf[3])[_0x46bf[2]];var uploadFile=require(_0x46bf[4]);var sr=require(_0x46bf[5]);var sox=require(_0x46bf[6]);var path=require(_0x46bf[7]);var config=require(_0x46bf[8]);var fs=require(_0x46bf[9]);var sequelize=require(_0x46bf[3])[_0x46bf[10]];var base64=require(_0x46bf[11]);var Promise=require(_0x46bf[12]);exports[_0x46bf[13]]=function(_0xa1afxc,_0xa1afxd){Sound[_0x46bf[18]]()[_0x46bf[17]](function(_0xa1afxf){return _0xa1afxd[_0x46bf[16]](200)[_0x46bf[15]](_0xa1afxf)})[_0x46bf[14]](function(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)})};exports[_0x46bf[19]]=function(_0xa1afxc,_0xa1afxd){Sound[_0x46bf[23]](_0xa1afxc[_0x46bf[22]][_0x46bf[21]])[_0x46bf[17]](function(Sound){if(!Sound){return _0xa1afxd[_0x46bf[20]](404)};return _0xa1afxd[_0x46bf[15]](Sound)})[_0x46bf[14]](function(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)})};exports[_0x46bf[24]]=function(_0xa1afxc,_0xa1afxd){var _0xa1afx10= new uploadFile({dest:path[_0x46bf[26]](config[_0x46bf[25]]),maxFileSize:15*1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xa1afx11,_0xa1afx12){return sr()+path[_0x46bf[28]](_0xa1afx12[_0x46bf[27]])},messages:{maxNumberOfFiles:_0x46bf[29],acceptFileTypes:_0x46bf[30],maxFileSize:_0x46bf[31],invalidRequest:_0x46bf[32]}});_0xa1afx10[_0x46bf[54]](_0x46bf[33],function(_0xa1afx13,_0xa1afx14){if(!_0xa1afx14[_0x46bf[34]][_0x46bf[27]]){return _0xa1afxd[_0x46bf[16]](500)[_0x46bf[15]](_0xa1afx10)};var _0xa1afx15={};var _0xa1afx16=path[_0x46bf[28]](_0xa1afx14[_0x46bf[34]][_0x46bf[27]]);_0xa1afx15[_0x46bf[35]]=_0x46bf[36];_0xa1afx15[_0x46bf[37]]=path[_0x46bf[28]](_0xa1afx14[_0x46bf[34]][_0x46bf[27]])[_0x46bf[38]](1);_0xa1afx15[_0x46bf[39]]=_0x46bf[40];_0xa1afx15[_0x46bf[41]]=_0xa1afx15[_0x46bf[42]]=path[_0x46bf[43]](_0xa1afx14[_0x46bf[34]][_0x46bf[7]],_0xa1afx16);_0xa1afx15[_0x46bf[44]]=path[_0x46bf[43]](_0xa1afx14[_0x46bf[34]][_0x46bf[27]],_0xa1afx16);var _0xa1afx17=path[_0x46bf[26]](config[_0x46bf[25]],_0xa1afx15[_0x46bf[44]]+_0xa1afx16);var _0xa1afx18=path[_0x46bf[26]](config[_0x46bf[45]],_0xa1afx15[_0x46bf[44]]+_0x46bf[46]+_0xa1afx15[_0x46bf[39]]);fs[_0x46bf[48]](_0xa1afx17,parseInt(_0x46bf[47],8));sox[_0x46bf[49]](_0xa1afx17,function(_0xa1afxe,_0xa1afx19){});var _0xa1afx1a=sox[_0x46bf[50]](_0xa1afx17,_0xa1afx18,{sampleRate:8000,format:_0x46bf[40],channelCount:1,bitRate:192*1024,compressionQuality:5});_0xa1afx1a[_0x46bf[54]](_0x46bf[51],function(_0xa1afxe){console[_0x46bf[51]](_0x46bf[52],_0xa1afxe);fs[_0x46bf[53]](_0xa1afx17,function(_0xa1afxe){if(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)}});return handleError(_0xa1afxd,_0xa1afxe)});_0xa1afx1a[_0x46bf[54]](_0x46bf[55],function(_0xa1afx1b,_0xa1afx1c){});_0xa1afx1a[_0x46bf[54]](_0x46bf[56],function(_0xa1afx1d){_0xa1afx15[_0x46bf[57]]=isNaN(_0xa1afx1d[_0x46bf[58]])?null:_0xa1afx1d[_0x46bf[58]]*1000;_0xa1afx15[_0x46bf[59]]=isNaN(_0xa1afx1d[_0x46bf[60]])?null:_0xa1afx1d[_0x46bf[60]];_0xa1afx15[_0x46bf[61]]=isNaN(_0xa1afx1d[_0x46bf[62]])?null:_0xa1afx1d[_0x46bf[62]];_0xa1afx15[_0x46bf[63]]=isNaN(_0xa1afx1d[_0x46bf[64]])?null:_0xa1afx1d[_0x46bf[64]];_0xa1afx15[_0x46bf[65]]=isNaN(_0xa1afx1d[_0x46bf[66]])?null:_0xa1afx1d[_0x46bf[66]]});_0xa1afx1a[_0x46bf[54]](_0x46bf[67],function(_0xa1afx1d){_0xa1afx15[_0x46bf[68]]=isNaN(_0xa1afx1d[_0x46bf[58]])?null:_0xa1afx1d[_0x46bf[58]]*1000;_0xa1afx15[_0x46bf[69]]=isNaN(_0xa1afx1d[_0x46bf[60]])?null:_0xa1afx1d[_0x46bf[60]];_0xa1afx15[_0x46bf[70]]=isNaN(_0xa1afx1d[_0x46bf[62]])?null:_0xa1afx1d[_0x46bf[62]];_0xa1afx15[_0x46bf[71]]=isNaN(_0xa1afx1d[_0x46bf[64]])?null:_0xa1afx1d[_0x46bf[64]];_0xa1afx15[_0x46bf[72]]=isNaN(_0xa1afx1d[_0x46bf[66]])?null:_0xa1afx1d[_0x46bf[66]]});_0xa1afx1a[_0x46bf[54]](_0x46bf[33],function(){console[_0x46bf[74]](_0x46bf[73]);fs[_0x46bf[48]](_0xa1afx18,parseInt(_0x46bf[47],8));Sound[_0x46bf[24]](_0xa1afx15)[_0x46bf[17]](function(_0xa1afx1e){return _0xa1afxd[_0x46bf[16]](201)[_0x46bf[15]](_0xa1afx1e)})[_0x46bf[14]](function(_0xa1afxe){console[_0x46bf[74]](_0xa1afxe);return handleError(_0xa1afxd,_0xa1afxe)})});_0xa1afx1a[_0x46bf[75]]()});_0xa1afx10[_0x46bf[54]](_0x46bf[51],function(_0xa1afxe){console[_0x46bf[74]](_0x46bf[76],_0xa1afxe);return handleError(_0xa1afxd,_0xa1afxe)});_0xa1afx10[_0x46bf[77]](_0xa1afxc)};exports[_0x46bf[78]]=function(_0xa1afxc,_0xa1afxd){if(_0xa1afxc[_0x46bf[79]][_0x46bf[21]]){delete _0xa1afxc[_0x46bf[79]][_0x46bf[21]]};Sound[_0x46bf[23]](_0xa1afxc[_0x46bf[22]][_0x46bf[21]])[_0x46bf[17]](function(_0xa1afx1e){if(!_0xa1afx1e){return _0xa1afxd[_0x46bf[20]](404)};var _0xa1afx1f=_[_0x46bf[80]](_0xa1afx1e,_0xa1afxc[_0x46bf[79]]);_0xa1afx1f[_0x46bf[81]]()[_0x46bf[17]](function(){return _0xa1afxd[_0x46bf[16]](200)[_0x46bf[15]](_0xa1afx1e)})[_0x46bf[14]](function(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)})})[_0x46bf[14]](function(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)})};exports[_0x46bf[82]]=function(_0xa1afxc,_0xa1afxd){Sound[_0x46bf[23]](_0xa1afxc[_0x46bf[22]][_0x46bf[21]])[_0x46bf[17]](function(_0xa1afx1e){if(!_0xa1afx1e){return _0xa1afxd[_0x46bf[16]](404)[_0x46bf[15]](_0xa1afx1e)};var _0xa1afx20=path[_0x46bf[26]](config[_0x46bf[25]],_0xa1afx1e[_0x46bf[44]]+_0x46bf[46]+_0xa1afx1e[_0x46bf[37]]);var _0xa1afx21=path[_0x46bf[26]](config[_0x46bf[45]],_0xa1afx1e[_0x46bf[44]]+_0x46bf[46]+_0xa1afx1e[_0x46bf[39]]);return sequelize[_0x46bf[83]](function(_0xa1afx22){return _0xa1afx1e[_0x46bf[82]]({transaction:_0xa1afx22})[_0x46bf[17]](function(){fs[_0x46bf[53]](_0xa1afx20,function(_0xa1afxe){if(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)}});fs[_0x46bf[53]](_0xa1afx21,function(_0xa1afxe){if(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)}});return _0xa1afxd[_0x46bf[16]](200)[_0x46bf[15]](_0xa1afx1e)})})[_0x46bf[14]](function(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)})})[_0x46bf[14]](function(_0xa1afxe){return handleError(_0xa1afxd,_0xa1afxe)})};exports[_0x46bf[84]]=function(_0xa1afxc,_0xa1afxd){getStream(_0xa1afxc,_0xa1afxd,_0x46bf[85])};exports[_0x46bf[86]]=function(_0xa1afxc,_0xa1afxd){getStream(_0xa1afxc,_0xa1afxd,_0x46bf[87])};function getStream(_0xa1afxc,_0xa1afxd,_0xa1afx24){return Sound[_0x46bf[23]](_0xa1afxc[_0x46bf[22]][_0x46bf[21]])[_0x46bf[17]](function(_0xa1afx1e){var _0xa1afx26=Promise[_0x46bf[91]](fs[_0x46bf[90]]);return _0xa1afx26(path[_0x46bf[26]](config[_0xa1afx24+_0x46bf[92]],_0xa1afx1e[_0x46bf[44]]+_0x46bf[46]+_0xa1afx1e[_0xa1afx24+_0x46bf[93]]))})[_0x46bf[17]](function(_0xa1afx19){var _0xa1afx25= new Buffer(_0xa1afx19,_0x46bf[89]).toString(_0x46bf[88]);return _0xa1afx25})[_0x46bf[17]](function(_0xa1afx25){return _0xa1afxd[_0x46bf[16]](200)[_0x46bf[15]]({downloadString:_0xa1afx25})})[_0x46bf[14]](function(_0xa1afxe){console[_0x46bf[74]](_0xa1afxe);return handleError(_0xa1afxd,_0xa1afxe)})}function handleError(_0xa1afxd,_0xa1afxe){return _0xa1afxd[_0x46bf[16]](500)[_0x46bf[15]](_0xa1afxe)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Sound = require('../../models').Sound;
+var uploadFile = require('upload-file');
+var sr = require('simple-random');
+var sox = require('sox');
+var path = require('path');
+var config = require('../../config/environment');
+var fs = require('fs');
+var sequelize = require('../../models').sequelize;
+var base64 = require('file-base64');
+var Promise = require('bluebird');
+
+// Get list of Sounds
+exports.index = function(req, res) {
+  Sound
+    .findAndCountAll()
+    .then(function(Sounds) {
+      return res.status(200).send(Sounds);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single Sound
+exports.show = function(req, res) {
+  Sound
+    .findById(req.params.id)
+    .then(function(Sound) {
+      if (!Sound) {
+        return res.sendStatus(404);
+      }
+      return res.send(Sound);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new Sound in the DB.
+exports.create = function(req, res) {
+  var upload = new uploadFile({
+    dest: path.join(config.originalSounds),
+    maxFileSize: 15 * 1000000,
+    maxNumberOfFiles: 10,
+    minNumberOfFiles: 0,
+    acceptFileTypes: /(\.|\/)(wav|mp3|gsm|ogg)$/i,
+    rename: function(name, file) {
+      return sr() + path.extname(file.filename);
+    },
+    messages: {
+      maxNumberOfFiles: "Max number of files upload exceeded",
+      acceptFileTypes: "Only wav,mp3,gsm, and ogg format accepted",
+      maxFileSize: "The maximum file size is 15 Mb",
+      invalidRequest: "Invalid request"
+    }
+  });
+
+  upload.on('end', function(fields, files) {
+    if (!files.file.filename) {
+      return res.status(500).send(upload);
+    }
+
+    var job_details = {};
+    var original_format = path.extname(files.file.filename);
+    job_details.description = "";
+    job_details.original_format = path.extname(files.file.filename).substring(1);
+    job_details.converted_format = 'wav';
+    job_details.name = job_details.display_name = path.basename(files.file.path, original_format);
+    job_details.save_name = path.basename(files.file.filename, original_format);
+
+
+
+    var filepath = path.join(config.originalSounds, job_details.save_name + original_format);
+    var destination = path.join(config.convertedSounds, job_details.save_name + '.' + job_details.converted_format);
+    //
+
+    fs.chmodSync(filepath, parseInt('0777', 8));
+    sox.identify(filepath, function(err, result) {
+      // console.log('************** Result: ', result);
+    });
+
+    var job = sox.transcode(filepath, destination, {
+      sampleRate: 8000,
+      format: 'wav',
+      channelCount: 1,
+      bitRate: 192 * 1024,
+      compressionQuality: 5,
+    });
+
+
+
+    job.on('error', function(err) {
+      console.error('********** Conversion Error: ', err);
+      fs.unlink(filepath, function(err) {
+        if (err)
+          return handleError(res, err);
+      });
+      return handleError(res, err);
+    });
+
+    job.on('progress', function(amountDone, amountTotal) {
+      // console.log("*********** Progress", amountDone, amountTotal);
+    });
+
+    job.on('src', function(info) {
+      // console.log('********** src: ', info);
+      /* info looks like:
+      {
+        format: 'wav',
+        duration: 1.5,
+        sampleCount: 66150,
+        channelCount: 1,
+        bitRate: 722944,
+        sampleRate: 44100,
+      }
+      */
+      job_details.original_duration = isNaN(info.duration) ? null : info.duration * 1000;
+      job_details.original_sampleCount = isNaN(info.sampleCount) ? null : info.sampleCount;
+      job_details.original_channelCount = isNaN(info.channelCount) ? null : info.channelCount;
+      job_details.original_bitRate = isNaN(info.bitRate) ? null : info.bitRate;
+      job_details.original_sampleRate = isNaN(info.sampleRate) ? null : info.sampleRate;
+    });
+
+    job.on('dest', function(info) {
+      // console.log('********** dest: ', info);
+      /* info looks like:
+      {
+        sampleRate: 44100,
+        format: 'mp3',
+        channelCount: 2,
+        sampleCount: 67958,
+        duration: 1.540998,
+        bitRate: 196608,
+      }
+      */
+      job_details.converted_duration = isNaN(info.duration) ? null : info.duration * 1000;
+      job_details.converted_sampleCount = isNaN(info.sampleCount) ? null : info.sampleCount;
+      job_details.converted_channelCount = isNaN(info.channelCount) ? null : info.channelCount;
+      job_details.converted_bitRate = isNaN(info.bitRate) ? null : info.bitRate;
+      job_details.converted_sampleRate = isNaN(info.sampleRate) ? null : info.sampleRate;
+    });
+
+    job.on('end', function() {
+      console.log("Conversion completed");
+      fs.chmodSync(destination, parseInt('0777', 8));
+      Sound
+        .create(job_details)
+        .then(function(sound) {
+          return res.status(201).send(sound);
+        })
+        .catch(function(err) {
+          console.log(err);
+          return handleError(res, err);
+        });
+    });
+
+    job.start();
+
+  });
+
+  upload.on('error', function(err) {
+    console.log('********** Upload error :', err)
+    return handleError(res, err);
+  });
+
+  upload.parse(req);
+};
+
+// Updates an existing upload in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  Sound
+    .findById(req.params.id)
+    .then(function(sound) {
+      if (!sound) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(sound, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(sound);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a Sound from the DB.
+exports.destroy = function(req, res) {
+  Sound
+    .findById(req.params.id)
+    .then(function(sound) {
+      if (!sound) {
+        return res.status(404).send(sound);
+      }
+      var original_filepath = path.join(config.originalSounds, sound.save_name + '.' + sound.original_format);
+      var converted_filepath = path.join(config.convertedSounds, sound.save_name + '.' + sound.converted_format);
+      return sequelize.transaction(function(t) {
+          return sound.destroy({
+              transaction: t
+            })
+            .then(function() {
+              fs.unlink(original_filepath, function(err) {
+                if (err)
+                  return handleError(res, err);
+              });
+              fs.unlink(converted_filepath, function(err) {
+                if (err)
+                  return handleError(res, err);
+              });
+              return res.status(200).send(sound);
+            })
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+//Download an uploaded file
+exports.download = function(req, res) {
+  getStream(req, res, 'original');
+};
+
+//Stream an uploaded file
+exports.stream = function(req, res) {
+  getStream(req, res, 'converted');
+}
+
+
+function getStream(req, res, value) {
+  return Sound
+    .findById(req.params.id)
+    .then(function(sound) {
+      var readFile = Promise.promisify(fs.readFile);
+      return readFile(path.join(config[value + 'Sounds'], sound.save_name + '.' + sound[value + '_format']));
+    })
+    .then(function(result) {
+      var base64String = new Buffer(result, 'binary').toString('base64');
+      return base64String;
+    })
+    .then(function(base64String) {
+      return res.status(200).send({
+        downloadString: base64String
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+}
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 24a117e..cef5b4b 100644 (file)
@@ -1 +1,24 @@
-var _0x14aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x6F\x75\x6E\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x6F\x75\x6E\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0x14aa[0];var Sound=require(_0x14aa[2])[_0x14aa[1]];exports[_0x14aa[3]]=function(_0xd79cx2){Sound[_0x14aa[4]](function(_0xd79cx3){onSave(_0xd79cx2,_0xd79cx3)});Sound[_0x14aa[5]](function(_0xd79cx3){onRemove(_0xd79cx2,_0xd79cx3)})};function onSave(_0xd79cx2,_0xd79cx3,_0xd79cx5){_0xd79cx2[_0x14aa[7]](_0x14aa[6],_0xd79cx3)}function onRemove(_0xd79cx2,_0xd79cx3,_0xd79cx5){_0xd79cx2[_0x14aa[7]](_0x14aa[8],_0xd79cx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Sound = require('../../models').Sound;
+
+exports.register = function(socket) {
+  Sound.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Sound.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('sound:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('sound:remove', doc);
+}
index ffda68e..970195e 100644 (file)
@@ -1 +1,20 @@
-var _0x793d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x67\x65\x74"];_0x793d[0];var should=require(_0x793d[1]);var app=require(_0x793d[2]);var request=require(_0x793d[3]);describe(_0x793d[4],function(){it(_0x793d[5],function(_0xa623x4){request(app)[_0x793d[13]](_0x793d[12])[_0x793d[11]](200)[_0x793d[11]](_0x793d[10],/json/)[_0x793d[9]](function(_0xa623x5,_0xa623x6){if(_0xa623x5){return _0xa623x4(_0xa623x5)};_0xa623x6[_0x793d[8]][_0x793d[1]][_0x793d[7]][_0x793d[6]](Array);_0xa623x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/sounds', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/sounds')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 8a781d8..5f8a51e 100644 (file)
@@ -1 +1,18 @@
-var _0xf51d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xf51d[0];var express=require(_0xf51d[1]);var controller=require(_0xf51d[2]);var auth=require(_0xf51d[3]);var router=express.Router();router[_0xf51d[7]](_0xf51d[4],auth[_0xf51d[5]](),controller[_0xf51d[6]]);router[_0xf51d[7]](_0xf51d[8],auth[_0xf51d[5]](),controller[_0xf51d[9]]);router[_0xf51d[7]](_0xf51d[10],auth[_0xf51d[5]](),controller[_0xf51d[11]]);router[_0xf51d[13]](_0xf51d[4],auth[_0xf51d[5]](),controller[_0xf51d[12]]);router[_0xf51d[15]](_0xf51d[10],auth[_0xf51d[5]](),controller[_0xf51d[14]]);router[_0xf51d[16]](_0xf51d[10],auth[_0xf51d[5]](),controller[_0xf51d[14]]);router[_0xf51d[18]](_0xf51d[4],auth[_0xf51d[5]](),controller[_0xf51d[17]]);router[_0xf51d[18]](_0xf51d[10],auth[_0xf51d[5]](),controller[_0xf51d[19]]);module[_0xf51d[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./square_odbc.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id/check', auth.isAuthenticated(), controller.checkConnection);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 948eb38..69af149 100644 (file)
@@ -1 +1,135 @@
-var _0x277f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6F\x64\x62\x63","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x64\x73\x6E","\x63\x6C\x6F\x73\x65","\x6F\x70\x65\x6E"];_0x277f[0];var _=require(_0x277f[1]);var db=require(_0x277f[2])();var SquareOdbc=require(_0x277f[4])[_0x277f[3]];var Util=require(_0x277f[5]);exports[_0x277f[6]]=function(_0x1672x5,_0x1672x6){return SquareOdbc[_0x277f[13]](Util[_0x277f[12]](_0x1672x5[_0x277f[11]]))[_0x277f[10]](function(_0x1672x8){_0x1672x6[_0x277f[9]](200)[_0x277f[8]](_0x1672x8)})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})};exports[_0x277f[14]]=function(_0x1672x5,_0x1672x6){return SquareOdbc[_0x277f[18]](_0x1672x5[_0x277f[17]][_0x277f[16]])[_0x277f[10]](function(_0x1672x9){if(!_0x1672x9){return _0x1672x6[_0x277f[15]](404)};return _0x1672x6[_0x277f[8]](_0x1672x9)})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})};exports[_0x277f[19]]=function(_0x1672x5,_0x1672x6){return SquareOdbc[_0x277f[19]](_0x1672x5[_0x277f[20]])[_0x277f[10]](function(_0x1672x9){return _0x1672x6[_0x277f[9]](201)[_0x277f[8]](_0x1672x9)})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})};exports[_0x277f[21]]=function(_0x1672x5,_0x1672x6){if(_0x1672x5[_0x277f[20]][_0x277f[16]]){delete _0x1672x5[_0x277f[20]][_0x277f[16]]};return SquareOdbc[_0x277f[18]](_0x1672x5[_0x277f[17]][_0x277f[16]])[_0x277f[10]](function(_0x1672x9){if(!_0x1672x9){return _0x1672x6[_0x277f[15]](404)};var _0x1672xa=_[_0x277f[22]](_0x1672x9,_0x1672x5[_0x277f[20]]);_0x1672xa[_0x277f[23]]()[_0x277f[10]](function(){return _0x1672x6[_0x277f[9]](200)[_0x277f[8]](_0x1672x9)})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})};exports[_0x277f[24]]=function(_0x1672x5,_0x1672x6){return SquareOdbc[_0x277f[18]](_0x1672x5[_0x277f[17]][_0x277f[16]])[_0x277f[10]](function(_0x1672xb){if(!_0x1672xb){return _0x1672x6[_0x277f[15]](404)};return _0x1672xb[_0x277f[24]]()})[_0x277f[10]](function(){return _0x1672x6[_0x277f[15]](204)})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})};exports[_0x277f[25]]=function(_0x1672x5,_0x1672x6){return SquareOdbc[_0x277f[24]]({where:{id:_0x1672x5[_0x277f[11]][_0x277f[26]]},individualHooks:true})[_0x277f[10]](function(){return _0x1672x6[_0x277f[15]](204)})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})};exports[_0x277f[27]]=function(_0x1672x5,_0x1672x6){return SquareOdbc[_0x277f[18]](_0x1672x5[_0x277f[17]][_0x277f[16]])[_0x277f[10]](function(_0x1672x9){if(!_0x1672x9){return _0x1672x6[_0x277f[15]](404)};db[_0x277f[30]](_0x1672x9[_0x277f[28]],function(_0x1672x7){if(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)};db[_0x277f[29]](function(_0x1672x7){if(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)};return _0x1672x6[_0x277f[15]](200)})})})[_0x277f[7]](function(_0x1672x7){return handleError(_0x1672x6,_0x1672x7)})};function handleError(_0x1672x6,_0x1672x7){return _0x1672x6[_0x277f[9]](500)[_0x277f[8]](_0x1672x7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var db = require("odbc")();
+
+var SquareOdbc = require('../../models').SquareOdbc;
+var Util = require('../../config/util');
+
+// Get list of square_odbcs
+exports.index = function(req, res) {
+  return SquareOdbc
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single square_odbc
+exports.show = function(req, res) {
+  return SquareOdbc
+    .findById(req.params.id)
+    .then(function(square_odbc) {
+      if (!square_odbc) {
+        return res.sendStatus(404);
+      }
+      return res.send(square_odbc);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new square_odbc in the DB.
+exports.create = function(req, res) {
+  return SquareOdbc
+    .create(req.body)
+    .then(function(square_odbc) {
+      return res.status(201).send(square_odbc);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing square_odbc in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return SquareOdbc
+    .findById(req.params.id)
+    .then(function(square_odbc) {
+      if (!square_odbc) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(square_odbc, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(square_odbc);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a square_odbc from the DB.
+exports.destroy = function(req, res) {
+  return SquareOdbc
+    .findById(req.params.id)
+    .then(function(odbc) {
+      if (!odbc) {
+        return res.sendStatus(404);
+      }
+      return odbc
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a square_project from the DB.
+exports.bulkDestroy = function(req, res) {
+  return SquareOdbc
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.checkConnection = function(req, res) {
+  return SquareOdbc
+    .findById(req.params.id)
+    .then(function(square_odbc) {
+      if (!square_odbc) {
+        return res.sendStatus(404);
+      }
+      db.open(square_odbc.dsn, function(err) {
+        if (err) {
+          return handleError(res, err);
+        }
+        db.close(function(err) {
+          if (err) {
+            return handleError(res, err);
+          }
+          return res.sendStatus(200);
+        })
+      })
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 154dda1..af0c04a 100644 (file)
@@ -1 +1,24 @@
-var _0x3c3e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x3A\x72\x65\x6D\x6F\x76\x65"];_0x3c3e[0];var SquareOdbc=require(_0x3c3e[2])[_0x3c3e[1]];exports[_0x3c3e[3]]=function(_0x64a4x2){SquareOdbc[_0x3c3e[4]](function(_0x64a4x3){onSave(_0x64a4x2,_0x64a4x3)});SquareOdbc[_0x3c3e[5]](function(_0x64a4x3){onRemove(_0x64a4x2,_0x64a4x3)})};function onSave(_0x64a4x2,_0x64a4x3,_0x64a4x5){_0x64a4x2[_0x3c3e[7]](_0x3c3e[6],_0x64a4x3)}function onRemove(_0x64a4x2,_0x64a4x3,_0x64a4x5){_0x64a4x2[_0x3c3e[7]](_0x3c3e[8],_0x64a4x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SquareOdbc = require('../../models').SquareOdbc;
+
+exports.register = function(socket) {
+  SquareOdbc.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SquareOdbc.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('square_odbc:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('square_odbc:remove', doc);
+}
index 5268ac9..ce9350c 100644 (file)
@@ -1 +1,20 @@
-var _0x5e8d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x67\x65\x74"];_0x5e8d[0];var should=require(_0x5e8d[1]);var app=require(_0x5e8d[2]);var request=require(_0x5e8d[3]);describe(_0x5e8d[4],function(){it(_0x5e8d[5],function(_0xae90x4){request(app)[_0x5e8d[13]](_0x5e8d[12])[_0x5e8d[11]](200)[_0x5e8d[11]](_0x5e8d[10],/json/)[_0x5e8d[9]](function(_0xae90x5,_0xae90x6){if(_0xae90x5){return _0xae90x4(_0xae90x5)};_0xae90x6[_0x5e8d[8]][_0x5e8d[1]][_0x5e8d[7]][_0x5e8d[6]](Array);_0xae90x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/square/odbc', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/square/odbc')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index e45b381..614ce23 100644 (file)
@@ -1 +1,18 @@
-var _0x4bdd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x4bdd[0];var express=require(_0x4bdd[1]);var controller=require(_0x4bdd[2]);var auth=require(_0x4bdd[3]);var router=express.Router();router[_0x4bdd[7]](_0x4bdd[4],auth[_0x4bdd[5]](),controller[_0x4bdd[6]]);router[_0x4bdd[7]](_0x4bdd[8],auth[_0x4bdd[5]](),controller[_0x4bdd[9]]);router[_0x4bdd[7]](_0x4bdd[10],controller[_0x4bdd[11]]);router[_0x4bdd[13]](_0x4bdd[4],auth[_0x4bdd[5]](),controller[_0x4bdd[12]]);router[_0x4bdd[15]](_0x4bdd[8],auth[_0x4bdd[5]](),controller[_0x4bdd[14]]);router[_0x4bdd[16]](_0x4bdd[8],auth[_0x4bdd[5]](),controller[_0x4bdd[14]]);router[_0x4bdd[18]](_0x4bdd[4],auth[_0x4bdd[5]](),controller[_0x4bdd[17]]);router[_0x4bdd[18]](_0x4bdd[8],auth[_0x4bdd[5]](),controller[_0x4bdd[19]]);module[_0x4bdd[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./square_project.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/download', controller.download);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 50afde4..3531326 100644 (file)
@@ -1 +1,132 @@
-var _0xa83c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x67","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0xa83c[0];var _=require(_0xa83c[1]);var path=require(_0xa83c[2]);var config=require(_0xa83c[3]);var Util=require(_0xa83c[4]);var SquareProject=require(_0xa83c[6])[_0xa83c[5]];exports[_0xa83c[7]]=function(_0xd6cex6,_0xd6cex7){return SquareProject[_0xa83c[14]](Util[_0xa83c[13]](_0xd6cex6[_0xa83c[12]]))[_0xa83c[11]](function(_0xd6cex9){_0xd6cex7[_0xa83c[10]](200)[_0xa83c[9]](_0xd6cex9)})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})};exports[_0xa83c[15]]=function(_0xd6cex6,_0xd6cex7){return SquareProject[_0xa83c[19]](_0xd6cex6[_0xa83c[18]][_0xa83c[17]])[_0xa83c[11]](function(_0xd6cexa){if(!_0xd6cexa){return _0xd6cex7[_0xa83c[16]](404)};return _0xd6cex7[_0xa83c[9]](_0xd6cexa)})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})};exports[_0xa83c[20]]=function(_0xd6cex6,_0xd6cex7){return SquareProject[_0xa83c[20]](_0xd6cex6[_0xa83c[21]])[_0xa83c[11]](function(_0xd6cexa){return _0xd6cex7[_0xa83c[10]](201)[_0xa83c[9]](_0xd6cexa)})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})};exports[_0xa83c[22]]=function(_0xd6cex6,_0xd6cex7){if(_0xd6cex6[_0xa83c[21]][_0xa83c[17]]){delete _0xd6cex6[_0xa83c[21]][_0xa83c[17]]};return SquareProject[_0xa83c[19]](_0xd6cex6[_0xa83c[18]][_0xa83c[17]])[_0xa83c[11]](function(_0xd6cexa){if(!_0xd6cexa){return _0xd6cex7[_0xa83c[16]](404)};var _0xd6cexb=_[_0xa83c[23]](_0xd6cexa,_0xd6cex6[_0xa83c[21]]);_0xd6cexb[_0xa83c[24]]()[_0xa83c[11]](function(){return _0xd6cex7[_0xa83c[10]](200)[_0xa83c[9]](_0xd6cexa)})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})};exports[_0xa83c[25]]=function(_0xd6cex6,_0xd6cex7){return SquareProject[_0xa83c[19]](_0xd6cex6[_0xa83c[18]][_0xa83c[17]])[_0xa83c[11]](function(_0xd6cexc){if(!_0xd6cexc){return _0xd6cex7[_0xa83c[16]](404)};return _0xd6cexc[_0xa83c[25]]()})[_0xa83c[11]](function(){return _0xd6cex7[_0xa83c[16]](204)})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})};exports[_0xa83c[26]]=function(_0xd6cex6,_0xd6cex7){return SquareProject[_0xa83c[25]]({where:{id:_0xd6cex6[_0xa83c[12]][_0xa83c[27]]},individualHooks:true})[_0xa83c[11]](function(){return _0xd6cex7[_0xa83c[16]](204)})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})};exports[_0xa83c[28]]=function(_0xd6cex6,_0xd6cex7,_0xd6cexd){SquareProject[_0xa83c[19]](_0xd6cex6[_0xa83c[18]][_0xa83c[17]])[_0xa83c[11]](function(_0xd6cexa){if(!_0xd6cexa){return _0xd6cex7[_0xa83c[16]](404)};console[_0xa83c[30]](_0xd6cex6[_0xa83c[12]][_0xa83c[29]]);_0xd6cex7[_0xa83c[34]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0xa83c[31]+_0xd6cex6[_0xa83c[12]][_0xa83c[29]]+_0xa83c[32],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xa83c[33]});return _0xd6cex7[_0xa83c[9]](_0xd6cexa[_0xa83c[35]])})[_0xa83c[8]](function(_0xd6cex8){return handleError(_0xd6cex7,_0xd6cex8)})};function handleError(_0xd6cex7,_0xd6cex8){return _0xd6cex7[_0xa83c[10]](500)[_0xa83c[9]](_0xd6cex8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var path = require('path');
+var config = require('../../config/environment');
+var Util = require('../../config/util');
+
+var SquareProject = require('../../models').SquareProject;
+
+// Get list of square_projects
+exports.index = function(req, res) {
+  return SquareProject
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single square_project
+exports.show = function(req, res) {
+  return SquareProject
+    .findById(req.params.id)
+    .then(function(square_project) {
+      if (!square_project) {
+        return res.sendStatus(404);
+      }
+      return res.send(square_project);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new square_project in the DB.
+exports.create = function(req, res) {
+  return SquareProject
+    .create(req.body)
+    .then(function(square_project) {
+      return res.status(201).send(square_project);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing square_project in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return SquareProject
+    .findById(req.params.id)
+    .then(function(square_project) {
+      if (!square_project) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(square_project, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(square_project);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a square_project from the DB.
+exports.destroy = function(req, res) {
+  return SquareProject
+    .findById(req.params.id)
+    .then(function(project) {
+      if (!project) {
+        return res.sendStatus(404);
+      }
+      return project
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a square_project from the DB.
+exports.bulkDestroy = function(req, res) {
+  return SquareProject
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.download = function(req, res, next) {
+  SquareProject
+    .findById(req.params.id)
+    .then(function(square_project) {
+      if (!square_project) {
+        return res.sendStatus(404);
+      }
+      console.log(req.query.filename);
+      res.set({
+        "Content-Disposition": "attachment; filename=\"" + req.query.filename +
+          ".xml\"",
+        "Content-Type": "txt/xml"
+      });
+      return res.send(square_project.preproduction);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index e8c4304..bc43e25 100644 (file)
@@ -1 +1,27 @@
-var _0xe58e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xe58e[0];var SquareProject=require(_0xe58e[2])[_0xe58e[1]];exports[_0xe58e[3]]=function(_0xc56ex2){SquareProject[_0xe58e[4]](function(_0xc56ex3){onSave(_0xc56ex2,_0xc56ex3)});SquareProject[_0xe58e[5]](function(_0xc56ex3){onSave(_0xc56ex2,_0xc56ex3)});SquareProject[_0xe58e[6]](function(_0xc56ex3){onRemove(_0xc56ex2,_0xc56ex3)})};function onSave(_0xc56ex2,_0xc56ex3,_0xc56ex5){_0xc56ex2[_0xe58e[8]](_0xe58e[7],_0xc56ex3)}function onRemove(_0xc56ex2,_0xc56ex3,_0xc56ex5){_0xc56ex2[_0xe58e[8]](_0xe58e[9],_0xc56ex3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SquareProject = require('../../models').SquareProject;
+
+exports.register = function(socket) {
+  SquareProject.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SquareProject.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  SquareProject.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('square_project:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('square_project:remove', doc);
+}
index 8214a4e..e87249c 100644 (file)
@@ -1 +1,21 @@
-var _0xc506=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xc506[0];var express=require(_0xc506[1]);var auth=require(_0xc506[2]);var controller=require(_0xc506[3]);var router=express.Router();router[_0xc506[7]](_0xc506[4],auth[_0xc506[5]](),controller[_0xc506[6]]);router[_0xc506[7]](_0xc506[8],auth[_0xc506[5]](),controller[_0xc506[9]]);router[_0xc506[7]](_0xc506[10],auth[_0xc506[5]](),controller[_0xc506[11]]);router[_0xc506[7]](_0xc506[12],auth[_0xc506[5]](),controller[_0xc506[13]]);router[_0xc506[16]](_0xc506[14],auth[_0xc506[5]](),controller[_0xc506[15]]);router[_0xc506[16]](_0xc506[4],auth[_0xc506[5]](),controller[_0xc506[17]]);router[_0xc506[19]](_0xc506[12],auth[_0xc506[5]](),controller[_0xc506[18]]);router[_0xc506[20]](_0xc506[12],auth[_0xc506[5]](),controller[_0xc506[18]]);router[_0xc506[22]](_0xc506[4],auth[_0xc506[5]](),controller[_0xc506[21]]);router[_0xc506[22]](_0xc506[12],auth[_0xc506[5]](),controller[_0xc506[23]]);module[_0xc506[24]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./sugarcrm_account.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id/check', auth.isAuthenticated(), controller.checkAccount);
+router.get('/:id/fields', auth.isAuthenticated(), controller.getFields);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/validate/:field', auth.isAuthenticated(), controller.accountValidation);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 8fcaeb4..758de1a 100644 (file)
@@ -1 +1,97 @@
-var _0x8411=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0x8411[0];var proxyquire=require(_0x8411[2])[_0x8411[1]]();var sugarcrmAccountCtrlStub={index:_0x8411[3],show:_0x8411[4],create:_0x8411[5],update:_0x8411[6],destroy:_0x8411[7]};var routerStub={get:sinon[_0x8411[8]](),put:sinon[_0x8411[8]](),patch:sinon[_0x8411[8]](),post:sinon[_0x8411[8]](),delete:sinon[_0x8411[8]]()};var sugarcrmAccountIndex=proxyquire(_0x8411[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":sugarcrmAccountCtrlStub});describe(_0x8411[10],function(){it(_0x8411[11],function(){expect(sugarcrmAccountIndex)[_0x8411[13]][_0x8411[12]](routerStub)});describe(_0x8411[14],function(){it(_0x8411[15],function(){expect(routerStub[_0x8411[21]][_0x8411[20]](_0x8411[19],_0x8411[3]))[_0x8411[13]][_0x8411[18]][_0x8411[17]][_0x8411[16]]})});describe(_0x8411[22],function(){it(_0x8411[23],function(){expect(routerStub[_0x8411[21]][_0x8411[20]](_0x8411[24],_0x8411[4]))[_0x8411[13]][_0x8411[18]][_0x8411[17]][_0x8411[16]]})});describe(_0x8411[25],function(){it(_0x8411[26],function(){expect(routerStub[_0x8411[27]][_0x8411[20]](_0x8411[19],_0x8411[5]))[_0x8411[13]][_0x8411[18]][_0x8411[17]][_0x8411[16]]})});describe(_0x8411[28],function(){it(_0x8411[29],function(){expect(routerStub[_0x8411[30]][_0x8411[20]](_0x8411[24],_0x8411[6]))[_0x8411[13]][_0x8411[18]][_0x8411[17]][_0x8411[16]]})});describe(_0x8411[31],function(){it(_0x8411[29],function(){expect(routerStub[_0x8411[32]][_0x8411[20]](_0x8411[24],_0x8411[6]))[_0x8411[13]][_0x8411[18]][_0x8411[17]][_0x8411[16]]})});describe(_0x8411[33],function(){it(_0x8411[34],function(){expect(routerStub[_0x8411[35]][_0x8411[20]](_0x8411[24],_0x8411[7]))[_0x8411[13]][_0x8411[18]][_0x8411[17]][_0x8411[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var sugarcrmAccountCtrlStub = {
+  index: 'sugarcrmAccountCtrl.index',
+  show: 'sugarcrmAccountCtrl.show',
+  create: 'sugarcrmAccountCtrl.create',
+  update: 'sugarcrmAccountCtrl.update',
+  destroy: 'sugarcrmAccountCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var sugarcrmAccountIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './sugarcrm_account.controller': sugarcrmAccountCtrlStub
+});
+
+describe('SugarcrmAccount API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(sugarcrmAccountIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/sugarcrm/accounts', function() {
+
+    it('should route to sugarcrmAccount.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'sugarcrmAccountCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/sugarcrm/accounts/:id', function() {
+
+    it('should route to sugarcrmAccount.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'sugarcrmAccountCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/sugarcrm/accounts', function() {
+
+    it('should route to sugarcrmAccount.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'sugarcrmAccountCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/sugarcrm/accounts/:id', function() {
+
+    it('should route to sugarcrmAccount.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'sugarcrmAccountCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/sugarcrm/accounts/:id', function() {
+
+    it('should route to sugarcrmAccount.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'sugarcrmAccountCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/sugarcrm/accounts/:id', function() {
+
+    it('should route to sugarcrmAccount.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'sugarcrmAccountCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index ee34bf9..afa4692 100644 (file)
@@ -1 +1,200 @@
-var _0x929b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x64\x65\x2D\x73\x75\x67\x61\x72\x63\x72\x6D\x2D\x63\x6C\x69\x65\x6E\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x69\x6E\x69\x74","\x6C\x6F\x67\x69\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x43\x61\x73\x65\x73","\x67\x65\x74\x5F\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x63\x61\x6C\x6C"];_0x929b[0];var _=require(_0x929b[1]);var Util=require(_0x929b[2]);var SugarcrmAccount=require(_0x929b[4])[_0x929b[3]];function handleError(_0x5d7fx5,_0x5d7fx6){_0x5d7fx6=_0x5d7fx6||500;return function(_0x5d7fx7){_0x5d7fx5[_0x929b[6]](_0x5d7fx6)[_0x929b[5]](_0x5d7fx7)}}function responseWithResult(_0x5d7fx5,_0x5d7fx6){_0x5d7fx6=_0x5d7fx6||200;return function(_0x5d7fx9){if(_0x5d7fx9){_0x5d7fx5[_0x929b[6]](_0x5d7fx6)[_0x929b[7]](_0x5d7fx9)}}}function responseWithoutResult(_0x5d7fx5,_0x5d7fx6){_0x5d7fx6=_0x5d7fx6||200;return function(){_0x5d7fx5[_0x929b[8]](_0x5d7fx6)}}function handleEntityNotFound(_0x5d7fx5){return function(_0x5d7fx9){if(!_0x5d7fx9){_0x5d7fx5[_0x929b[6]](404)[_0x929b[9]]();return null};return _0x5d7fx9}}function saveUpdates(_0x5d7fxd){return function(_0x5d7fx9){return _0x5d7fx9[_0x929b[11]](_0x5d7fxd)[_0x929b[10]](function(_0x5d7fxe){return _0x5d7fxe})}}function removeEntity(_0x5d7fx5){return function(_0x5d7fx9){if(_0x5d7fx9){return _0x5d7fx9[_0x929b[12]]()[_0x929b[10]](function(){_0x5d7fx5[_0x929b[6]](204)[_0x929b[9]]()})}}}exports[_0x929b[13]]=function(_0x5d7fx10,_0x5d7fx5){return SugarcrmAccount[_0x929b[19]](_0x929b[18])[_0x929b[17]](Util[_0x929b[16]](_0x5d7fx10[_0x929b[15]]))[_0x929b[10]](responseWithResult(_0x5d7fx5))[_0x929b[14]](handleError(_0x5d7fx5))};exports[_0x929b[20]]=function(_0x5d7fx10,_0x5d7fx5){return SugarcrmAccount[_0x929b[23]](_0x5d7fx10[_0x929b[22]][_0x929b[21]])[_0x929b[10]](handleEntityNotFound(_0x5d7fx5))[_0x929b[10]](responseWithResult(_0x5d7fx5))[_0x929b[14]](handleError(_0x5d7fx5))};exports[_0x929b[24]]=function(_0x5d7fx10,_0x5d7fx5){return SugarcrmAccount[_0x929b[24]](_0x5d7fx10[_0x929b[25]])[_0x929b[10]](responseWithResult(_0x5d7fx5,201))[_0x929b[14]](handleError(_0x5d7fx5))};exports[_0x929b[26]]=function(_0x5d7fx10,_0x5d7fx5){if(_0x5d7fx10[_0x929b[25]][_0x929b[21]]){delete _0x5d7fx10[_0x929b[25]][_0x929b[21]]};return SugarcrmAccount[_0x929b[23]](_0x5d7fx10[_0x929b[22]][_0x929b[21]])[_0x929b[10]](handleEntityNotFound(_0x5d7fx5))[_0x929b[10]](saveUpdates(_0x5d7fx10[_0x929b[25]]))[_0x929b[10]](responseWithResult(_0x5d7fx5))[_0x929b[14]](handleError(_0x5d7fx5))};exports[_0x929b[12]]=function(_0x5d7fx10,_0x5d7fx5){return SugarcrmAccount[_0x929b[23]](_0x5d7fx10[_0x929b[22]][_0x929b[21]])[_0x929b[10]](handleEntityNotFound(_0x5d7fx5))[_0x929b[10]](removeEntity(_0x5d7fx5))[_0x929b[14]](handleError(_0x5d7fx5))};exports[_0x929b[27]]=function(_0x5d7fx10,_0x5d7fx5){return SugarcrmAccount[_0x929b[23]](_0x5d7fx10[_0x929b[22]][_0x929b[21]])[_0x929b[10]](handleEntityNotFound(_0x5d7fx5))[_0x929b[10]](function(_0x5d7fx11){var _0x5d7fx12=require(_0x929b[28]);_0x5d7fx12[_0x929b[34]]({apiURL:Util[_0x929b[30]](_0x5d7fx11[_0x929b[29]])+_0x929b[31],login:_0x5d7fx11[_0x929b[32]],passwd:_0x5d7fx11[_0x929b[33]]});_0x5d7fx12[_0x929b[35]](function(_0x5d7fx13){if(!_0x5d7fx13){return _0x5d7fx5[_0x929b[8]](400)};return _0x5d7fx5[_0x929b[8]](200)})})[_0x929b[14]](handleError(_0x5d7fx5))};exports[_0x929b[36]]=function(_0x5d7fx10,_0x5d7fx5){SugarcrmAccount[_0x929b[12]]({where:{id:_0x5d7fx10[_0x929b[15]][_0x929b[37]]},individualHooks:true})[_0x929b[10]](function(){return _0x5d7fx5[_0x929b[8]](204)})[_0x929b[14]](handleError(_0x5d7fx5))};exports[_0x929b[38]]=function(_0x5d7fx10,_0x5d7fx5){var _0x5d7fx14={};_0x5d7fx14[_0x5d7fx10[_0x929b[22]][_0x929b[39]]]=_0x5d7fx10[_0x929b[25]][_0x929b[40]];return SugarcrmAccount[_0x929b[17]]({where:_0x5d7fx14})[_0x929b[10]](function(_0x5d7fx15){if(_0x5d7fx15[_0x929b[41]]){return _0x5d7fx5[_0x929b[6]](200)[_0x929b[5]]({isValid:false,value:_0x5d7fx10[_0x929b[25]][_0x929b[40]]})};return _0x5d7fx5[_0x929b[6]](200)[_0x929b[5]]({isValid:true,value:_0x5d7fx10[_0x929b[25]][_0x929b[40]]})})[_0x929b[14]](function(_0x5d7fx7){return handleError(_0x5d7fx5,_0x5d7fx7)})};exports[_0x929b[42]]=function(_0x5d7fx10,_0x5d7fx5){var _0x5d7fx12=require(_0x929b[28]);return SugarcrmAccount[_0x929b[23]](_0x5d7fx10[_0x929b[22]][_0x929b[21]])[_0x929b[10]](handleEntityNotFound(_0x5d7fx5))[_0x929b[10]](function(_0x5d7fx11){_0x5d7fx12[_0x929b[34]]({apiURL:Util[_0x929b[30]](_0x5d7fx11[_0x929b[29]])+_0x929b[31],login:_0x5d7fx11[_0x929b[32]],passwd:_0x5d7fx11[_0x929b[33]]});_0x5d7fx12[_0x929b[35]](function(_0x5d7fx13){if(!_0x5d7fx13){return _0x5d7fx5[_0x929b[8]](400)};var _0x5d7fx16={session:_0x5d7fx13,module_name:_0x929b[43]};_0x5d7fx12[_0x929b[46]](_0x929b[44],_0x5d7fx16,function(_0x5d7fx15,_0x5d7fx7){if(_0x5d7fx7){return _0x5d7fx5[_0x929b[8]](400)};return _0x5d7fx5[_0x929b[6]](200)[_0x929b[5]](_0x5d7fx15[_0x929b[45]])})})})[_0x929b[14]](handleError(_0x5d7fx5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/sugarcrm/accounts              ->  index
+ * POST    /api/sugarcrm/accounts              ->  create
+ * GET     /api/sugarcrm/accounts/:id          ->  show
+ * PUT     /api/sugarcrm/accounts/:id          ->  update
+ * DELETE  /api/sugarcrm/accounts/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var SugarcrmAccount = require('../../models').SugarcrmAccount;
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function responseWithoutResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function() {
+    res.sendStatus(statusCode);
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of SugarcrmAccounts
+exports.index = function(req, res) {
+  return SugarcrmAccount
+    .scope('configurations')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single SugarcrmAccount from the DB
+exports.show = function(req, res) {
+  return SugarcrmAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new SugarcrmAccount in the DB
+exports.create = function(req, res) {
+  return SugarcrmAccount.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing SugarcrmAccount in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return SugarcrmAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a SugarcrmAccount from the DB
+exports.destroy = function(req, res) {
+  return SugarcrmAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+exports.checkAccount = function(req, res) {
+  return SugarcrmAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(account) {
+      var sugar = require('node-sugarcrm-client');
+      sugar.init({
+        apiURL: Util.stripTrailingSlash(account.remoteUri) + "/service/v4_1/rest.php",
+        login: account.username,
+        passwd: account.password
+      });
+      sugar.login(function(sessionId) {
+        if (!sessionId) {
+          return res.sendStatus(400);
+        }
+        return res.sendStatus(200);
+      });
+    })
+    .catch(handleError(res));
+}
+
+exports.bulkDestroy = function(req, res) {
+  SugarcrmAccount
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(handleError(res));
+};
+
+exports.accountValidation = function(req, res) {
+  var where = {};
+  where[req.params.field] = req.body.value;
+  return SugarcrmAccount
+    .findAndCountAll({
+      where: where
+    })
+    .then(function(result) {
+      if (result.count) {
+        return res.status(200).send({
+          isValid: false,
+          value: req.body.value
+        });
+      }
+      return res.status(200).send({
+        isValid: true,
+        value: req.body.value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.getFields = function(req, res) {
+  var sugar = require('node-sugarcrm-client');
+  return SugarcrmAccount.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(account) {
+      sugar.init({
+        apiURL: Util.stripTrailingSlash(account.remoteUri) + "/service/v4_1/rest.php",
+        login: account.username,
+        passwd: account.password
+      });
+      sugar.login(function(sessionId) {
+        if (!sessionId) {
+          return res.sendStatus(400);
+        }
+        var params = {
+          session: sessionId,
+          module_name: "Cases"
+        };
+        sugar.call("get_module_fields", params, function(result, err) {
+          if (err) {
+            return res.sendStatus(400);
+          }
+          return res.status(200).send(result.module_fields);
+        });
+      });
+    })
+    .catch(handleError(res));
+};
index 2b3fc1b..859bf6d 100644 (file)
@@ -1 +1,24 @@
-var _0x3dd5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x3dd5[0];var SugarcrmAccount=require(_0x3dd5[2])[_0x3dd5[1]];exports[_0x3dd5[3]]=function(_0x33c6x2){SugarcrmAccount[_0x3dd5[4]](function(_0x33c6x3){onSave(_0x33c6x2,_0x33c6x3)});SugarcrmAccount[_0x3dd5[5]](function(_0x33c6x3){onRemove(_0x33c6x2,_0x33c6x3)})};function onSave(_0x33c6x2,_0x33c6x3,_0x33c6x5){_0x33c6x2[_0x3dd5[7]](_0x3dd5[6],_0x33c6x3)}function onRemove(_0x33c6x2,_0x33c6x3,_0x33c6x5){_0x33c6x2[_0x3dd5[7]](_0x3dd5[8],_0x33c6x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SugarcrmAccount = require('../../models').SugarcrmAccount;
+
+exports.register = function(socket) {
+  SugarcrmAccount.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SugarcrmAccount.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('sugarcrm_account:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('sugarcrm_account:remove', doc);
+}
index 9007b92..90111bf 100644 (file)
@@ -1 +1,18 @@
-var _0x52e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x52e8[0];var express=require(_0x52e8[1]);var auth=require(_0x52e8[2]);var controller=require(_0x52e8[3]);var router=express.Router();router[_0x52e8[7]](_0x52e8[4],auth[_0x52e8[5]](),controller[_0x52e8[6]]);router[_0x52e8[7]](_0x52e8[8],auth[_0x52e8[5]](),controller[_0x52e8[9]]);router[_0x52e8[11]](_0x52e8[4],auth[_0x52e8[5]](),controller[_0x52e8[10]]);router[_0x52e8[13]](_0x52e8[8],auth[_0x52e8[5]](),controller[_0x52e8[12]]);router[_0x52e8[11]](_0x52e8[14],auth[_0x52e8[5]](),controller[_0x52e8[15]]);router[_0x52e8[16]](_0x52e8[8],auth[_0x52e8[5]](),controller[_0x52e8[12]]);router[_0x52e8[18]](_0x52e8[8],auth[_0x52e8[5]](),controller[_0x52e8[17]]);module[_0x52e8[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./sugarcrm_configuration.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.post('/:id/:type', auth.isAuthenticated(), controller.addConfigurationField);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index e0ea166..ba1b022 100644 (file)
@@ -1 +1,97 @@
-var _0xe9a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0xe9a8[0];var proxyquire=require(_0xe9a8[2])[_0xe9a8[1]]();var sugarcrmConfigurationCtrlStub={index:_0xe9a8[3],show:_0xe9a8[4],create:_0xe9a8[5],update:_0xe9a8[6],destroy:_0xe9a8[7]};var routerStub={get:sinon[_0xe9a8[8]](),put:sinon[_0xe9a8[8]](),patch:sinon[_0xe9a8[8]](),post:sinon[_0xe9a8[8]](),delete:sinon[_0xe9a8[8]]()};var sugarcrmConfigurationIndex=proxyquire(_0xe9a8[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":sugarcrmConfigurationCtrlStub});describe(_0xe9a8[10],function(){it(_0xe9a8[11],function(){expect(sugarcrmConfigurationIndex)[_0xe9a8[13]][_0xe9a8[12]](routerStub)});describe(_0xe9a8[14],function(){it(_0xe9a8[15],function(){expect(routerStub[_0xe9a8[21]][_0xe9a8[20]](_0xe9a8[19],_0xe9a8[3]))[_0xe9a8[13]][_0xe9a8[18]][_0xe9a8[17]][_0xe9a8[16]]})});describe(_0xe9a8[22],function(){it(_0xe9a8[23],function(){expect(routerStub[_0xe9a8[21]][_0xe9a8[20]](_0xe9a8[24],_0xe9a8[4]))[_0xe9a8[13]][_0xe9a8[18]][_0xe9a8[17]][_0xe9a8[16]]})});describe(_0xe9a8[25],function(){it(_0xe9a8[26],function(){expect(routerStub[_0xe9a8[27]][_0xe9a8[20]](_0xe9a8[19],_0xe9a8[5]))[_0xe9a8[13]][_0xe9a8[18]][_0xe9a8[17]][_0xe9a8[16]]})});describe(_0xe9a8[28],function(){it(_0xe9a8[29],function(){expect(routerStub[_0xe9a8[30]][_0xe9a8[20]](_0xe9a8[24],_0xe9a8[6]))[_0xe9a8[13]][_0xe9a8[18]][_0xe9a8[17]][_0xe9a8[16]]})});describe(_0xe9a8[31],function(){it(_0xe9a8[29],function(){expect(routerStub[_0xe9a8[32]][_0xe9a8[20]](_0xe9a8[24],_0xe9a8[6]))[_0xe9a8[13]][_0xe9a8[18]][_0xe9a8[17]][_0xe9a8[16]]})});describe(_0xe9a8[33],function(){it(_0xe9a8[34],function(){expect(routerStub[_0xe9a8[35]][_0xe9a8[20]](_0xe9a8[24],_0xe9a8[7]))[_0xe9a8[13]][_0xe9a8[18]][_0xe9a8[17]][_0xe9a8[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var sugarcrmConfigurationCtrlStub = {
+  index: 'sugarcrmConfigurationCtrl.index',
+  show: 'sugarcrmConfigurationCtrl.show',
+  create: 'sugarcrmConfigurationCtrl.create',
+  update: 'sugarcrmConfigurationCtrl.update',
+  destroy: 'sugarcrmConfigurationCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var sugarcrmConfigurationIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './sugarcrm_configuration.controller': sugarcrmConfigurationCtrlStub
+});
+
+describe('SugarcrmConfiguration API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(sugarcrmConfigurationIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/sugarcrm/configurations', function() {
+
+    it('should route to sugarcrmConfiguration.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'sugarcrmConfigurationCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/sugarcrm/configurations/:id', function() {
+
+    it('should route to sugarcrmConfiguration.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'sugarcrmConfigurationCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/sugarcrm/configurations', function() {
+
+    it('should route to sugarcrmConfiguration.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'sugarcrmConfigurationCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/sugarcrm/configurations/:id', function() {
+
+    it('should route to sugarcrmConfiguration.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'sugarcrmConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/sugarcrm/configurations/:id', function() {
+
+    it('should route to sugarcrmConfiguration.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'sugarcrmConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/sugarcrm/configurations/:id', function() {
+
+    it('should route to sugarcrmConfiguration.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'sugarcrmConfigurationCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index e269fb6..5918283 100644 (file)
@@ -1 +1,145 @@
-var _0xfa7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xfa7d[0];var _=require(_0xfa7d[1]);var SugarcrmConfiguration=require(_0xfa7d[3])[_0xfa7d[2]];var SugarcrmField=require(_0xfa7d[3])[_0xfa7d[4]];function handleError(_0xc0aex5,_0xc0aex6){_0xc0aex6=_0xc0aex6||500;return function(_0xc0aex7){_0xc0aex5[_0xfa7d[6]](_0xc0aex6)[_0xfa7d[5]](_0xc0aex7)}}function responseWithResult(_0xc0aex5,_0xc0aex6){_0xc0aex6=_0xc0aex6||200;return function(_0xc0aex9){if(_0xc0aex9){_0xc0aex5[_0xfa7d[6]](_0xc0aex6)[_0xfa7d[7]](_0xc0aex9)}}}function handleEntityNotFound(_0xc0aex5){return function(_0xc0aex9){if(!_0xc0aex9){_0xc0aex5[_0xfa7d[6]](404)[_0xfa7d[8]]();return null};return _0xc0aex9}}function saveUpdates(_0xc0aexc){return function(_0xc0aex9){return _0xc0aex9[_0xfa7d[10]](_0xc0aexc)[_0xfa7d[9]](function(_0xc0aexd){return _0xc0aexd})}}function removeEntity(_0xc0aex5){return function(_0xc0aex9){if(_0xc0aex9){return _0xc0aex9[_0xfa7d[11]]()[_0xfa7d[9]](function(){_0xc0aex5[_0xfa7d[6]](204)[_0xfa7d[8]]()})}}}exports[_0xfa7d[12]]=function(_0xc0aexf,_0xc0aex5){SugarcrmConfiguration[_0xfa7d[15]]({where:_0xc0aexf[_0xfa7d[14]]})[_0xfa7d[9]](responseWithResult(_0xc0aex5))[_0xfa7d[13]](handleError(_0xc0aex5))};exports[_0xfa7d[16]]=function(_0xc0aexf,_0xc0aex5){SugarcrmConfiguration[_0xfa7d[22]]({where:{id:_0xc0aexf[_0xfa7d[18]][_0xfa7d[17]]},include:[{model:SugarcrmField,as:_0xfa7d[19]},{model:SugarcrmField,as:_0xfa7d[20]},{model:SugarcrmField,as:_0xfa7d[21]}]})[_0xfa7d[9]](handleEntityNotFound(_0xc0aex5))[_0xfa7d[9]](responseWithResult(_0xc0aex5))[_0xfa7d[13]](handleError(_0xc0aex5))};exports[_0xfa7d[23]]=function(_0xc0aexf,_0xc0aex5){SugarcrmConfiguration[_0xfa7d[23]](_0xc0aexf[_0xfa7d[24]])[_0xfa7d[9]](responseWithResult(_0xc0aex5,201))[_0xfa7d[13]](handleError(_0xc0aex5))};exports[_0xfa7d[25]]=function(_0xc0aexf,_0xc0aex5){if(_0xc0aexf[_0xfa7d[24]][_0xfa7d[17]]){delete _0xc0aexf[_0xfa7d[24]][_0xfa7d[17]]};SugarcrmConfiguration[_0xfa7d[26]](_0xc0aexf[_0xfa7d[18]][_0xfa7d[17]])[_0xfa7d[9]](handleEntityNotFound(_0xc0aex5))[_0xfa7d[9]](saveUpdates(_0xc0aexf[_0xfa7d[24]]))[_0xfa7d[9]](responseWithResult(_0xc0aex5))[_0xfa7d[13]](handleError(_0xc0aex5))};exports[_0xfa7d[11]]=function(_0xc0aexf,_0xc0aex5){SugarcrmConfiguration[_0xfa7d[26]](_0xc0aexf[_0xfa7d[18]][_0xfa7d[17]])[_0xfa7d[9]](handleEntityNotFound(_0xc0aex5))[_0xfa7d[9]](removeEntity(_0xc0aex5))[_0xfa7d[13]](handleError(_0xc0aex5))};exports[_0xfa7d[27]]=function(_0xc0aexf,_0xc0aex5,_0xc0aex10){var _0xc0aex11;SugarcrmConfiguration[_0xfa7d[26]](_0xc0aexf[_0xfa7d[18]][_0xfa7d[17]])[_0xfa7d[9]](handleEntityNotFound(_0xc0aex5))[_0xfa7d[9]](function(_0xc0aex14){_0xc0aex11=_0xc0aex14;return SugarcrmField[_0xfa7d[23]](_0xc0aexf[_0xfa7d[24]])})[_0xfa7d[9]](function(_0xc0aex13){switch(_0xc0aexf[_0xfa7d[18]][_0xfa7d[35]]){case _0xfa7d[30]:return [_0xc0aex11[_0xfa7d[29]](_0xc0aex13),_0xc0aex13];case _0xfa7d[32]:return [_0xc0aex11[_0xfa7d[31]](_0xc0aex13),_0xc0aex13];case _0xfa7d[34]:return [_0xc0aex11[_0xfa7d[33]](_0xc0aex13),_0xc0aex13]}})[_0xfa7d[28]](function(_0xc0aex12,_0xc0aex13){return _0xc0aex5[_0xfa7d[6]](201)[_0xfa7d[7]](_0xc0aex13)})[_0xfa7d[13]](handleError(_0xc0aex5))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/sugarcrm/configurations              ->  index
+ * POST    /api/sugarcrm/configurations              ->  create
+ * GET     /api/sugarcrm/configurations/:id          ->  show
+ * PUT     /api/sugarcrm/configurations/:id          ->  update
+ * DELETE  /api/sugarcrm/configurations/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var SugarcrmConfiguration = require('../../models').SugarcrmConfiguration;
+var SugarcrmField = require('../../models').SugarcrmField;
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of SugarcrmConfigurations
+exports.index = function(req, res) {
+  SugarcrmConfiguration.findAll({
+      where: req.query
+    })
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single SugarcrmConfiguration from the DB
+exports.show = function(req, res) {
+  SugarcrmConfiguration.find({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        model: SugarcrmField,
+        as: 'Subject'
+      }, {
+        model: SugarcrmField,
+        as: 'Description'
+      }, {
+        model: SugarcrmField,
+        as: 'Field'
+      }]
+    })
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new SugarcrmConfiguration in the DB
+exports.create = function(req, res) {
+  SugarcrmConfiguration.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing SugarcrmConfiguration in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  SugarcrmConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a SugarcrmConfiguration from the DB
+exports.destroy = function(req, res) {
+  SugarcrmConfiguration.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+exports.addConfigurationField = function(req, res, next) {
+  var sugarcrmConfiguration;
+  SugarcrmConfiguration
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(sugarcrm_configuration) {
+      sugarcrmConfiguration = sugarcrm_configuration;
+      return SugarcrmField.create(req.body)
+    })
+    .then(function(sugarcrmField) {
+      switch (req.params.type) {
+        case 'subject':
+          return [sugarcrmConfiguration.addSubject(sugarcrmField), sugarcrmField];
+        case 'description':
+          return [sugarcrmConfiguration.addDescription(sugarcrmField), sugarcrmField];
+        case 'field':
+          return [sugarcrmConfiguration.addField(sugarcrmField), sugarcrmField];
+      }
+    })
+    .spread(function(data, sugarcrmField) {
+      return res.status(201).json(sugarcrmField);
+    })
+    .catch(handleError(res));
+};
index 4cc4287..c4464da 100644 (file)
@@ -1 +1,24 @@
-var _0xe87f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xe87f[0];var SugarcrmConfiguration=require(_0xe87f[2])[_0xe87f[1]];exports[_0xe87f[3]]=function(_0x308dx2){SugarcrmConfiguration[_0xe87f[4]](function(_0x308dx3){onSave(_0x308dx2,_0x308dx3)});SugarcrmConfiguration[_0xe87f[5]](function(_0x308dx3){onRemove(_0x308dx2,_0x308dx3)})};function onSave(_0x308dx2,_0x308dx3,_0x308dx5){_0x308dx2[_0xe87f[7]](_0xe87f[6],_0x308dx3)}function onRemove(_0x308dx2,_0x308dx3,_0x308dx5){_0x308dx2[_0xe87f[7]](_0xe87f[8],_0x308dx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SugarcrmConfiguration = require('../../models').SugarcrmConfiguration;
+
+exports.register = function(socket) {
+  SugarcrmConfiguration.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SugarcrmConfiguration.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('sugarcrm_configuration:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('sugarcrm_configuration:remove', doc);
+}
index ceff8bd..edc0dc9 100644 (file)
@@ -1 +1,18 @@
-var _0x83e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x83e1[0];var express=require(_0x83e1[1]);var auth=require(_0x83e1[2]);var controller=require(_0x83e1[3]);var router=express.Router();router[_0x83e1[7]](_0x83e1[4],auth[_0x83e1[5]](),controller[_0x83e1[6]]);router[_0x83e1[7]](_0x83e1[8],auth[_0x83e1[5]](),controller[_0x83e1[9]]);router[_0x83e1[11]](_0x83e1[4],auth[_0x83e1[5]](),controller[_0x83e1[10]]);router[_0x83e1[13]](_0x83e1[8],auth[_0x83e1[5]](),controller[_0x83e1[12]]);router[_0x83e1[14]](_0x83e1[8],auth[_0x83e1[5]](),controller[_0x83e1[12]]);router[_0x83e1[16]](_0x83e1[8],auth[_0x83e1[5]](),controller[_0x83e1[15]]);module[_0x83e1[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./sugarcrm_field.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index 7f67ac8..f8a20f7 100644 (file)
@@ -1 +1,97 @@
-var _0x2dff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0x2dff[0];var proxyquire=require(_0x2dff[2])[_0x2dff[1]]();var sugarcrmFieldCtrlStub={index:_0x2dff[3],show:_0x2dff[4],create:_0x2dff[5],update:_0x2dff[6],destroy:_0x2dff[7]};var routerStub={get:sinon[_0x2dff[8]](),put:sinon[_0x2dff[8]](),patch:sinon[_0x2dff[8]](),post:sinon[_0x2dff[8]](),delete:sinon[_0x2dff[8]]()};var sugarcrmFieldIndex=proxyquire(_0x2dff[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":sugarcrmFieldCtrlStub});describe(_0x2dff[10],function(){it(_0x2dff[11],function(){expect(sugarcrmFieldIndex)[_0x2dff[13]][_0x2dff[12]](routerStub)});describe(_0x2dff[14],function(){it(_0x2dff[15],function(){expect(routerStub[_0x2dff[21]][_0x2dff[20]](_0x2dff[19],_0x2dff[3]))[_0x2dff[13]][_0x2dff[18]][_0x2dff[17]][_0x2dff[16]]})});describe(_0x2dff[22],function(){it(_0x2dff[23],function(){expect(routerStub[_0x2dff[21]][_0x2dff[20]](_0x2dff[24],_0x2dff[4]))[_0x2dff[13]][_0x2dff[18]][_0x2dff[17]][_0x2dff[16]]})});describe(_0x2dff[25],function(){it(_0x2dff[26],function(){expect(routerStub[_0x2dff[27]][_0x2dff[20]](_0x2dff[19],_0x2dff[5]))[_0x2dff[13]][_0x2dff[18]][_0x2dff[17]][_0x2dff[16]]})});describe(_0x2dff[28],function(){it(_0x2dff[29],function(){expect(routerStub[_0x2dff[30]][_0x2dff[20]](_0x2dff[24],_0x2dff[6]))[_0x2dff[13]][_0x2dff[18]][_0x2dff[17]][_0x2dff[16]]})});describe(_0x2dff[31],function(){it(_0x2dff[29],function(){expect(routerStub[_0x2dff[32]][_0x2dff[20]](_0x2dff[24],_0x2dff[6]))[_0x2dff[13]][_0x2dff[18]][_0x2dff[17]][_0x2dff[16]]})});describe(_0x2dff[33],function(){it(_0x2dff[34],function(){expect(routerStub[_0x2dff[35]][_0x2dff[20]](_0x2dff[24],_0x2dff[7]))[_0x2dff[13]][_0x2dff[18]][_0x2dff[17]][_0x2dff[16]]})})})
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var sugarcrmFieldCtrlStub = {
+  index: 'sugarcrmFieldCtrl.index',
+  show: 'sugarcrmFieldCtrl.show',
+  create: 'sugarcrmFieldCtrl.create',
+  update: 'sugarcrmFieldCtrl.update',
+  destroy: 'sugarcrmFieldCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var sugarcrmFieldIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './sugarcrm_field.controller': sugarcrmFieldCtrlStub
+});
+
+describe('SugarcrmField API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(sugarcrmFieldIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/sugarcrm/fields', function() {
+
+    it('should route to sugarcrmField.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'sugarcrmFieldCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/sugarcrm/fields/:id', function() {
+
+    it('should route to sugarcrmField.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'sugarcrmFieldCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/sugarcrm/fields', function() {
+
+    it('should route to sugarcrmField.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'sugarcrmFieldCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/sugarcrm/fields/:id', function() {
+
+    it('should route to sugarcrmField.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'sugarcrmFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/sugarcrm/fields/:id', function() {
+
+    it('should route to sugarcrmField.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'sugarcrmFieldCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/sugarcrm/fields/:id', function() {
+
+    it('should route to sugarcrmField.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'sugarcrmFieldCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});
index d1c107e..eb6fe3d 100644 (file)
@@ -1 +1,104 @@
-var _0xf10f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xf10f[0];var _=require(_0xf10f[1]);var SugarcrmField=require(_0xf10f[3])[_0xf10f[2]];function handleError(_0x35b9x4,_0x35b9x5){_0x35b9x5=_0x35b9x5||500;return function(_0x35b9x6){_0x35b9x4[_0xf10f[5]](_0x35b9x5)[_0xf10f[4]](_0x35b9x6)}}function responseWithResult(_0x35b9x4,_0x35b9x5){_0x35b9x5=_0x35b9x5||200;return function(_0x35b9x8){if(_0x35b9x8){_0x35b9x4[_0xf10f[5]](_0x35b9x5)[_0xf10f[6]](_0x35b9x8)}}}function handleEntityNotFound(_0x35b9x4){return function(_0x35b9x8){if(!_0x35b9x8){_0x35b9x4[_0xf10f[5]](404)[_0xf10f[7]]();return null};return _0x35b9x8}}function saveUpdates(_0x35b9xb){return function(_0x35b9x8){return _0x35b9x8[_0xf10f[9]](_0x35b9xb)[_0xf10f[8]](function(_0x35b9xc){return _0x35b9xc})}}function removeEntity(_0x35b9x4){return function(_0x35b9x8){if(_0x35b9x8){return _0x35b9x8[_0xf10f[10]]()[_0xf10f[8]](function(){_0x35b9x4[_0xf10f[5]](204)[_0xf10f[7]]()})}}}exports[_0xf10f[11]]=function(_0x35b9xe,_0x35b9x4){SugarcrmField[_0xf10f[13]]()[_0xf10f[8]](responseWithResult(_0x35b9x4))[_0xf10f[12]](handleError(_0x35b9x4))};exports[_0xf10f[14]]=function(_0x35b9xe,_0x35b9x4){SugarcrmField[_0xf10f[17]](_0x35b9xe[_0xf10f[16]][_0xf10f[15]])[_0xf10f[8]](handleEntityNotFound(_0x35b9x4))[_0xf10f[8]](responseWithResult(_0x35b9x4))[_0xf10f[12]](handleError(_0x35b9x4))};exports[_0xf10f[18]]=function(_0x35b9xe,_0x35b9x4){SugarcrmField[_0xf10f[18]](_0x35b9xe[_0xf10f[19]])[_0xf10f[8]](responseWithResult(_0x35b9x4,201))[_0xf10f[12]](handleError(_0x35b9x4))};exports[_0xf10f[20]]=function(_0x35b9xe,_0x35b9x4){if(_0x35b9xe[_0xf10f[19]][_0xf10f[15]]){delete _0x35b9xe[_0xf10f[19]][_0xf10f[15]]};SugarcrmField[_0xf10f[17]](_0x35b9xe[_0xf10f[16]][_0xf10f[15]])[_0xf10f[8]](handleEntityNotFound(_0x35b9x4))[_0xf10f[8]](saveUpdates(_0x35b9xe[_0xf10f[19]]))[_0xf10f[8]](responseWithResult(_0x35b9x4))[_0xf10f[12]](handleError(_0x35b9x4))};exports[_0xf10f[10]]=function(_0x35b9xe,_0x35b9x4){SugarcrmField[_0xf10f[17]](_0x35b9xe[_0xf10f[16]][_0xf10f[15]])[_0xf10f[8]](handleEntityNotFound(_0x35b9x4))[_0xf10f[8]](removeEntity(_0x35b9x4))[_0xf10f[12]](handleError(_0x35b9x4))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/sugarcrm/fields              ->  index
+ * POST    /api/sugarcrm/fields              ->  create
+ * GET     /api/sugarcrm/fields/:id          ->  show
+ * PUT     /api/sugarcrm/fields/:id          ->  update
+ * DELETE  /api/sugarcrm/fields/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+
+var SugarcrmField = require('../../models').SugarcrmField;
+
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) { 
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of SugarcrmFields
+exports.index = function(req, res) {
+  SugarcrmField.findAll()
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single SugarcrmField from the DB
+exports.show = function(req, res) {
+  SugarcrmField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Creates a new SugarcrmField in the DB
+exports.create = function(req, res) {
+  SugarcrmField.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing SugarcrmField in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  SugarcrmField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a SugarcrmField from the DB
+exports.destroy = function(req, res) {
+  SugarcrmField.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
index ee4a59f..bcc89cc 100644 (file)
@@ -1 +1,24 @@
-var _0xdffc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0xdffc[0];var SugarcrmField=require(_0xdffc[2])[_0xdffc[1]];exports[_0xdffc[3]]=function(_0x61a6x2){SugarcrmField[_0xdffc[4]](function(_0x61a6x3){onSave(_0x61a6x2,_0x61a6x3)});SugarcrmField[_0xdffc[5]](function(_0x61a6x3){onRemove(_0x61a6x2,_0x61a6x3)})};function onSave(_0x61a6x2,_0x61a6x3,_0x61a6x5){_0x61a6x2[_0xdffc[7]](_0xdffc[6],_0x61a6x3)}function onRemove(_0x61a6x2,_0x61a6x3,_0x61a6x5){_0x61a6x2[_0xdffc[7]](_0xdffc[8],_0x61a6x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var SugarcrmField = require('../../models').SugarcrmField;
+
+exports.register = function(socket) {
+  SugarcrmField.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  SugarcrmField.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('sugarcrm_field:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('sugarcrm_field:remove', doc);
+}
index 8daffd2..17d7f06 100644 (file)
@@ -1 +1,17 @@
-var _0xa903=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x61\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa903[0];var express=require(_0xa903[1]);var controller=require(_0xa903[2]);var auth=require(_0xa903[3]);var router=express.Router();router[_0xa903[7]](_0xa903[4],auth[_0xa903[5]](),controller[_0xa903[6]]);router[_0xa903[7]](_0xa903[8],auth[_0xa903[5]](),controller[_0xa903[9]]);router[_0xa903[11]](_0xa903[4],auth[_0xa903[5]](),controller[_0xa903[10]]);router[_0xa903[13]](_0xa903[8],auth[_0xa903[5]](),controller[_0xa903[12]]);router[_0xa903[14]](_0xa903[8],auth[_0xa903[5]](),controller[_0xa903[12]]);router[_0xa903[16]](_0xa903[4],auth[_0xa903[5]](),controller[_0xa903[15]]);router[_0xa903[16]](_0xa903[8],auth[_0xa903[5]](),controller[_0xa903[17]]);module[_0xa903[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./tag.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 1a7fba0..38b0632 100644 (file)
@@ -1 +1,116 @@
-var _0x1af8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x61\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x73\x73\x61\x67\x65","\x54\x61\x67\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68"];_0x1af8[0];var _=require(_0x1af8[1]);var Tag=require(_0x1af8[3])[_0x1af8[2]];var Util=require(_0x1af8[4]);exports[_0x1af8[5]]=function(_0x63eex4,_0x63eex5,_0x63eex6){return Tag[_0x1af8[12]](Util[_0x1af8[11]](_0x63eex4[_0x1af8[10]]))[_0x1af8[9]](function(_0x63eex8){_0x63eex5[_0x1af8[8]](200)[_0x1af8[7]](_0x63eex8)})[_0x1af8[6]](function(_0x63eex7){return handleError(_0x63eex5,_0x63eex7)})};exports[_0x1af8[13]]=function(_0x63eex4,_0x63eex5){Tag[_0x1af8[17]](_0x63eex4[_0x1af8[16]][_0x1af8[15]])[_0x1af8[9]](function(_0x63eex9){if(!_0x63eex9){return _0x63eex5[_0x1af8[14]](404)};return _0x63eex5[_0x1af8[7]](_0x63eex9)})[_0x1af8[6]](function(_0x63eex7){return handleError(_0x63eex5,_0x63eex7)})};exports[_0x1af8[18]]=function(_0x63eex4,_0x63eex5){Tag[_0x1af8[18]](_0x63eex4[_0x1af8[19]])[_0x1af8[9]](function(_0x63eex9){return _0x63eex5[_0x1af8[8]](201)[_0x1af8[7]](_0x63eex9)})[_0x1af8[6]](function(_0x63eex7){return handleError(_0x63eex5,_0x63eex7)})};exports[_0x1af8[20]]=function(_0x63eex4,_0x63eex5){if(_0x63eex4[_0x1af8[19]][_0x1af8[15]]){delete _0x63eex4[_0x1af8[19]][_0x1af8[15]]};return Tag[_0x1af8[17]](_0x63eex4[_0x1af8[16]][_0x1af8[15]])[_0x1af8[9]](function(_0x63eex9){if(!_0x63eex9){return _0x63eex5[_0x1af8[14]](404)};var _0x63eexa=_[_0x1af8[21]](_0x63eex9,_0x63eex4[_0x1af8[19]]);return _0x63eexa[_0x1af8[22]]()})[_0x1af8[9]](function(_0x63eex9){return _0x63eex5[_0x1af8[8]](200)[_0x1af8[7]](_0x63eex9)})[_0x1af8[6]](function(_0x63eex7){return handleError(_0x63eex5,_0x63eex7)})};exports[_0x1af8[23]]=function(_0x63eex4,_0x63eex5){return Tag[_0x1af8[27]](_0x1af8[26])[_0x1af8[17]](_0x63eex4[_0x1af8[16]][_0x1af8[15]])[_0x1af8[9]](function(_0x63eex9){if(!_0x63eex9){return _0x63eex5[_0x1af8[14]](404)};if(tagHasAssociation(_0x63eex9)){var _0x63eex7= new Error();_0x63eex7[_0x1af8[24]]=_0x1af8[25];throw _0x63eex7};return _0x63eex9[_0x1af8[23]]()})[_0x1af8[9]](function(){return _0x63eex5[_0x1af8[14]](204)})[_0x1af8[6]](function(_0x63eex7){return handleError(_0x63eex5,_0x63eex7)})};exports[_0x1af8[28]]=function(_0x63eex4,_0x63eex5){Tag[_0x1af8[23]]({where:{id:_0x63eex4[_0x1af8[10]][_0x1af8[29]]},individualHooks:true})[_0x1af8[9]](function(){return _0x63eex5[_0x1af8[14]](204)})[_0x1af8[6]](function(_0x63eex7){return handleError(_0x63eex5,_0x63eex7)})};function handleError(_0x63eex5,_0x63eex7){return _0x63eex5[_0x1af8[8]](500)[_0x1af8[7]](_0x63eex7)}function tagHasAssociation(_0x63eex9){return ((_0x63eex9[_0x1af8[30]]&&_0x63eex9[_0x1af8[30]][_0x1af8[31]]>0))}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Tag = require('../../models').Tag;
+var Util = require('../../config/util');
+
+// Get list of tags
+exports.index = function(req, res, next) {
+  return Tag
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single tag
+exports.show = function(req, res) {
+  Tag
+    .findById(req.params.id)
+    .then(function(tag) {
+      if (!tag) {
+        return res.sendStatus(404);
+      }
+      return res.send(tag);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new tag in the DB.
+exports.create = function(req, res) {
+  Tag
+    .create(req.body)
+    .then(function(tag) {
+      return res.status(201).send(tag);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing tag in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return Tag
+    .findById(req.params.id)
+    .then(function(tag) {
+      if (!tag) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(tag, req.body);
+      return updated
+        .save();
+    })
+    .then(function(tag) {
+      return res.status(200).send(tag);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a tag from the DB.
+exports.destroy = function(req, res) {
+  return Tag
+    .scope('configuration')
+    .findById(req.params.id)
+    .then(function(tag) {
+      if (!tag) {
+        return res.sendStatus(404);
+      }
+      if (tagHasAssociation(tag)) {
+        var err = new Error();
+        err.message = 'Tag is associated with an integration\'s configuration';
+        throw err;
+      }
+      return tag.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  Tag
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
+
+function tagHasAssociation(tag) {
+  return ((tag.ZendeskConfigurations && tag.ZendeskConfigurations.length > 0));
+}
index 3f1c5f5..790b0a2 100644 (file)
@@ -1 +1,24 @@
-var _0xafae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x54\x61\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x74\x61\x67\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x74\x61\x67\x3A\x72\x65\x6D\x6F\x76\x65"];_0xafae[0];var Tag=require(_0xafae[2])[_0xafae[1]];exports[_0xafae[3]]=function(_0xbba4x2){Tag[_0xafae[4]](function(_0xbba4x3){onSave(_0xbba4x2,_0xbba4x3)});Tag[_0xafae[5]](function(_0xbba4x3){onRemove(_0xbba4x2,_0xbba4x3)})};function onSave(_0xbba4x2,_0xbba4x3,_0xbba4x5){_0xbba4x2[_0xafae[7]](_0xafae[6],_0xbba4x3)}function onRemove(_0xbba4x2,_0xbba4x3,_0xbba4x5){_0xbba4x2[_0xafae[7]](_0xafae[8],_0xbba4x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Tag = require('../../models').Tag;
+
+exports.register = function(socket) {
+  Tag.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Tag.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('tag:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('tag:remove', doc);
+}
index d9b1e98..794a03a 100644 (file)
@@ -1 +1,20 @@
-var _0x2821=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x74\x61\x67\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x74\x61\x67\x73","\x67\x65\x74"];_0x2821[0];var should=require(_0x2821[1]);var app=require(_0x2821[2]);var request=require(_0x2821[3]);describe(_0x2821[4],function(){it(_0x2821[5],function(_0xe989x4){request(app)[_0x2821[13]](_0x2821[12])[_0x2821[11]](200)[_0x2821[11]](_0x2821[10],/json/)[_0x2821[9]](function(_0xe989x5,_0xe989x6){if(_0xe989x5){return _0xe989x4(_0xe989x5)};_0xe989x6[_0x2821[8]][_0x2821[1]][_0x2821[7]][_0x2821[6]](Array);_0xe989x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/tags', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/tags')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 0ac7cec..afa9ea4 100644 (file)
@@ -1 +1,20 @@
-var _0xf0d1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xf0d1[0];var express=require(_0xf0d1[1]);var controller=require(_0xf0d1[2]);var auth=require(_0xf0d1[3]);var router=express.Router();router[_0xf0d1[7]](_0xf0d1[4],auth[_0xf0d1[5]](),controller[_0xf0d1[6]]);router[_0xf0d1[7]](_0xf0d1[8],auth[_0xf0d1[5]](),controller[_0xf0d1[9]]);router[_0xf0d1[7]](_0xf0d1[10],auth[_0xf0d1[5]](),controller[_0xf0d1[11]]);router[_0xf0d1[13]](_0xf0d1[4],auth[_0xf0d1[5]](),controller[_0xf0d1[12]]);router[_0xf0d1[13]](_0xf0d1[10],auth[_0xf0d1[5]](),controller[_0xf0d1[14]]);router[_0xf0d1[16]](_0xf0d1[8],auth[_0xf0d1[5]](),controller[_0xf0d1[15]]);router[_0xf0d1[17]](_0xf0d1[8],auth[_0xf0d1[5]](),controller[_0xf0d1[15]]);router[_0xf0d1[19]](_0xf0d1[4],auth[_0xf0d1[5]](),controller[_0xf0d1[18]]);router[_0xf0d1[19]](_0xf0d1[8],auth[_0xf0d1[5]](),controller[_0xf0d1[20]]);router[_0xf0d1[19]](_0xf0d1[10],auth[_0xf0d1[5]](),controller[_0xf0d1[21]]);module[_0xf0d1[22]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./team.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/agents', auth.isAuthenticated(), controller.showAgents);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/agents', auth.isAuthenticated(), controller.addAgents);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:id/agents', auth.isAuthenticated(), controller.removeAgents);
+
+module.exports = router;
index 08c7c85..e911873 100644 (file)
@@ -1 +1,170 @@
-var _0x213b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x61\x6D","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x61\x64\x64\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72"];_0x213b[0];var _=require(_0x213b[1]);var util=require(_0x213b[2]);var Util=require(_0x213b[3]);var sequelize=require(_0x213b[5])[_0x213b[4]];var Team=require(_0x213b[5])[_0x213b[6]];var Agent=require(_0x213b[5])[_0x213b[7]];exports[_0x213b[8]]=function(_0xe3d1x7,_0xe3d1x8){return Team[_0x213b[18]](_0x213b[17])[_0x213b[16]](_[_0x213b[15]](Util[_0x213b[14]](_0xe3d1x7[_0x213b[13]])))[_0x213b[12]](function(_0xe3d1xa){_0xe3d1x8[_0x213b[11]](200)[_0x213b[10]](_0xe3d1xa)})[_0x213b[9]](function(_0xe3d1x9){return handleError(_0xe3d1x8,_0xe3d1x9)})};exports[_0x213b[19]]=function(_0xe3d1x7,_0xe3d1x8){return Team[_0x213b[18]](_0x213b[17])[_0x213b[23]](_0xe3d1x7[_0x213b[22]][_0x213b[21]])[_0x213b[12]](function(_0xe3d1xb){if(!_0xe3d1xb){return _0xe3d1x8[_0x213b[20]](404)};return _0xe3d1x8[_0x213b[10]](_0xe3d1xb)})[_0x213b[9]](function(_0xe3d1x9){return handleError(_0xe3d1x8,_0xe3d1x9)})};exports[_0x213b[24]]=function(_0xe3d1x7,_0xe3d1x8){return Team[_0x213b[18]](_0x213b[17])[_0x213b[23]](_0xe3d1x7[_0x213b[22]][_0x213b[21]])[_0x213b[12]](function(_0xe3d1xb){if(!_0xe3d1xb){return _0xe3d1x8[_0x213b[20]](404)};return _0xe3d1x8[_0x213b[11]](200)[_0x213b[10]](_0xe3d1xb.Users)})[_0x213b[9]](function(_0xe3d1x9){return handleError(_0xe3d1x8,_0xe3d1x9)})};exports[_0x213b[25]]=function(_0xe3d1x7,_0xe3d1x8){return Team[_0x213b[18]](_0x213b[17])[_0x213b[25]](_0xe3d1x7[_0x213b[28]])[_0x213b[12]](function(_0xe3d1xb){return _0xe3d1x8[_0x213b[11]](201)[_0x213b[10]](_0xe3d1xb)})[_0x213b[9]](sequelize.UniqueConstraintError,function(_0xe3d1x9){return Util[_0x213b[27]][_0x213b[26]](_0xe3d1x8,_0xe3d1x9)})[_0x213b[9]](function(_0xe3d1x9){return handleError(_0xe3d1x8,_0xe3d1x9)})};exports[_0x213b[29]]=function(_0xe3d1x7,_0xe3d1x8){if(_0xe3d1x7[_0x213b[28]][_0x213b[21]]){delete _0xe3d1x7[_0x213b[28]][_0x213b[21]]};return Team[_0x213b[23]](_0xe3d1x7[_0x213b[22]][_0x213b[21]])[_0x213b[12]](function(_0xe3d1xb){if(!_0xe3d1xb){return _0xe3d1x8[_0x213b[20]](404)};var _0xe3d1xc=_[_0x213b[15]](_0xe3d1xb,_0xe3d1x7[_0x213b[28]]);return _0xe3d1xc[_0x213b[30]]()})[_0x213b[12]](function(_0xe3d1xb){return _0xe3d1x8[_0x213b[11]](200)[_0x213b[10]](_0xe3d1xb)})[_0x213b[9]](function(_0xe3d1x9){return handleError(_0xe3d1x8,_0xe3d1x9)})};exports[_0x213b[31]]=function(_0xe3d1x7,_0xe3d1x8){return Team[_0x213b[23]](_0xe3d1x7[_0x213b[22]][_0x213b[21]])[_0x213b[12]](function(_0xe3d1xb){if(!_0xe3d1xb){return _0xe3d1x8[_0x213b[20]](404)};return _0xe3d1xb[_0x213b[31]]()})[_0x213b[12]](function(){return _0xe3d1x8[_0x213b[20]](204)})[_0x213b[9]](function(_0xe3d1x9){return handleError(_0xe3d1x8,_0xe3d1x9)})};exports[_0x213b[32]]=function(_0xe3d1x7,_0xe3d1x8){return Team[_0x213b[31]]({where:{id:_0xe3d1x7[_0x213b[13]][_0x213b[33]]},individualHooks:true})[_0x213b[12]](function(){return _0xe3d1x8[_0x213b[20]](204)})[_0x213b[9]](function(_0xe3d1x9){return handleError(_0xe3d1x8,_0xe3d1x9)})};exports[_0x213b[34]]=function(_0xe3d1x7,_0xe3d1x8,_0xe3d1xd){return Team[_0x213b[23]](_0xe3d1x7[_0x213b[22]][_0x213b[21]])[_0x213b[12]](function(_0xe3d1xb){if(!_0xe3d1xb){return _0xe3d1x8[_0x213b[20]](404)};return _0xe3d1xb[_0x213b[36]](_0xe3d1x7[_0x213b[28]][_0x213b[35]])})[_0x213b[12]](function(){return _0xe3d1x8[_0x213b[20]](201)})[_0x213b[9]](function(_0xe3d1x9){return _0xe3d1xd(_0xe3d1x9)})};exports[_0x213b[37]]=function(_0xe3d1x7,_0xe3d1x8,_0xe3d1xd){return Team[_0x213b[23]](_0xe3d1x7[_0x213b[22]][_0x213b[21]])[_0x213b[12]](function(_0xe3d1xb){if(!_0xe3d1xb){return _0xe3d1x8[_0x213b[20]](404)};return _0xe3d1xb[_0x213b[38]](_0xe3d1x7[_0x213b[13]][_0x213b[35]])})[_0x213b[12]](function(){return _0xe3d1x8[_0x213b[20]](202)})[_0x213b[9]](function(_0xe3d1x9){return _0xe3d1xd(_0xe3d1x9)})};function handleError(_0xe3d1x8,_0xe3d1x9){return _0xe3d1x8[_0x213b[11]](500)[_0x213b[10]](_0xe3d1x9)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var Team = require('../../models').Team;
+var Agent = require('../../models').User;
+
+// Get list of teams
+exports.index = function(req, res) {
+  return Team
+    .scope('default')
+    .findAndCountAll(_.merge(Util.getQuery(req.query)))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single team
+exports.show = function(req, res) {
+  return Team
+    .scope('default')
+    .findById(req.params.id)
+    .then(function(team) {
+      if (!team) {
+        return res.sendStatus(404);
+      }
+      return res.send(team);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single team
+exports.showAgents = function(req, res) {
+  return Team
+    .scope('default')
+    .findById(req.params.id)
+    .then(function(team) {
+      if (!team) {
+        return res.sendStatus(404);
+      }
+      return res.status(200).send(team.Users);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new team in the DB.
+exports.create = function(req, res) {
+  return Team
+    .scope('default')
+    .create(req.body)
+    .then(function(team) {
+      return res.status(201).send(team);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing team in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return Team
+    .findById(req.params.id)
+    .then(function(team) {
+      if (!team) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(team, req.body);
+      return updated
+        .save();
+    })
+    .then(function(team) {
+      return res.status(200).send(team);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a team from the DB.
+exports.destroy = function(req, res) {
+  return Team
+    .findById(req.params.id)
+    .then(function(team) {
+      if (!team) {
+        return res.sendStatus(404);
+      }
+      return team.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return Team
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing user_has_mail_queue in the DB.
+exports.addAgents = function(req, res, next) {
+  return Team
+    .findById(req.params.id)
+    .then(function(team) {
+      if (!team) {
+        return res.sendStatus(404);
+      }
+      return team
+        .addUsers(req.body.agents);
+    })
+    .then(function() {
+      return res.sendStatus(201);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+exports.removeAgents = function(req, res, next) {
+  return Team
+    .findById(req.params.id)
+    .then(function(team) {
+      if (!team) {
+        return res.sendStatus(404);
+      }
+      return team
+        .removeUser(req.query.agents);
+    })
+    .then(function() {
+      return res.sendStatus(202);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index a401a66..3f89dc2 100644 (file)
@@ -1 +1,27 @@
-var _0x11a0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x74\x65\x61\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x74\x65\x61\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0x11a0[0];var team=require(_0x11a0[2])[_0x11a0[1]];exports[_0x11a0[3]]=function(_0x883cx2){team[_0x11a0[4]](function(_0x883cx3){onSave(_0x883cx2,_0x883cx3)});team[_0x11a0[5]](function(_0x883cx3){onSave(_0x883cx2,_0x883cx3)});team[_0x11a0[6]](function(_0x883cx3){onRemove(_0x883cx2,_0x883cx3)})};function onSave(_0x883cx2,_0x883cx3,_0x883cx5){_0x883cx2[_0x11a0[8]](_0x11a0[7],_0x883cx3)}function onRemove(_0x883cx2,_0x883cx3,_0x883cx5){_0x883cx2[_0x11a0[8]](_0x11a0[9],_0x883cx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var team = require('../../models').Team;
+
+exports.register = function(socket) {
+  team.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  team.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  team.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('team:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('team:remove', doc);
+}
index 43b0d90..b76928a 100644 (file)
@@ -1 +1,20 @@
-var _0x3aa0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74"];_0x3aa0[0];var should=require(_0x3aa0[1]);var app=require(_0x3aa0[2]);var request=require(_0x3aa0[3]);describe(_0x3aa0[4],function(){it(_0x3aa0[5],function(_0xae0dx4){request(app)[_0x3aa0[13]](_0x3aa0[12])[_0x3aa0[11]](200)[_0x3aa0[11]](_0x3aa0[10],/json/)[_0x3aa0[9]](function(_0xae0dx5,_0xae0dx6){if(_0xae0dx5){return _0xae0dx4(_0xae0dx5)};_0xae0dx6[_0x3aa0[8]][_0x3aa0[1]][_0x3aa0[7]][_0x3aa0[6]](Array);_0xae0dx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/teams', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/teams')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index ec72313..f7e10cb 100644 (file)
@@ -1 +1,20 @@
-var _0x49f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x49f3[0];var express=require(_0x49f3[1]);var auth=require(_0x49f3[2]);var controller=require(_0x49f3[3]);var license=require(_0x49f3[4]);var router=express.Router();router[_0x49f3[8]](_0x49f3[5],auth[_0x49f3[6]](),controller[_0x49f3[7]]);router[_0x49f3[8]](_0x49f3[9],auth[_0x49f3[6]](),controller[_0x49f3[10]]);router[_0x49f3[8]](_0x49f3[11],auth[_0x49f3[6]](),controller[_0x49f3[12]]);router[_0x49f3[16]](_0x49f3[5],auth[_0x49f3[6]](),license[_0x49f3[13]](),license[_0x49f3[14]](),controller[_0x49f3[15]]);router[_0x49f3[18]](_0x49f3[11],auth[_0x49f3[6]](),controller[_0x49f3[17]]);router[_0x49f3[19]](_0x49f3[11],auth[_0x49f3[6]](),controller[_0x49f3[17]]);router[_0x49f3[21]](_0x49f3[5],auth[_0x49f3[6]](),controller[_0x49f3[20]]);router[_0x49f3[21]](_0x49f3[11],auth[_0x49f3[6]](),controller[_0x49f3[22]]);module[_0x49f3[23]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./telephone.controller');
+var license = require('../../config/license/license.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/internal', auth.isAuthenticated(), controller.getInternal);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), license.isValidDate(), license.isTelephonesLimit(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+
+module.exports = router;
index aabe093..75bb5f7 100644 (file)
@@ -1 +1,174 @@
-var _0x7114=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\x78","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x72\x65\x71\x2E\x70\x61\x72\x61\x6D\x73","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6C\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x7114[0];var _=require(_0x7114[1]);var Util=require(_0x7114[2]);var sequelize=require(_0x7114[4])[_0x7114[3]];var Telephone=require(_0x7114[4])[_0x7114[5]];function handleError(_0xc76bx6,_0xc76bx7){_0xc76bx7=_0xc76bx7||500;return function(_0xc76bx8){_0xc76bx6[_0x7114[7]](_0xc76bx7)[_0x7114[6]](_0xc76bx8)}}function responseWithResult(_0xc76bx6,_0xc76bx7){_0xc76bx7=_0xc76bx7||200;return function(_0xc76bxa){if(_0xc76bxa){_0xc76bx6[_0x7114[7]](_0xc76bx7)[_0x7114[8]](_0xc76bxa)}}}function handleEntityNotFound(_0xc76bx6){return function(_0xc76bxa){if(!_0xc76bxa){_0xc76bx6[_0x7114[7]](404)[_0x7114[9]]();return null};return _0xc76bxa}}function saveUpdates(_0xc76bxd){return function(_0xc76bxa){return _0xc76bxa[_0x7114[11]](_0xc76bxd)[_0x7114[10]](function(_0xc76bxe){return _0xc76bxe})}}function removeEntity(_0xc76bx6){return function(_0xc76bxa){if(_0xc76bxa){return _0xc76bxa[_0x7114[12]]()[_0x7114[10]](function(){_0xc76bx6[_0x7114[7]](204)[_0x7114[9]]()})}}}exports[_0x7114[13]]=function(_0xc76bx10,_0xc76bx6){return Telephone[_0x7114[19]](_0x7114[18])[_0x7114[17]](Util[_0x7114[16]](_0xc76bx10[_0x7114[15]]))[_0x7114[10]](function(_0xc76bx11){_0xc76bx6[_0x7114[7]](200)[_0x7114[6]](_0xc76bx11)})[_0x7114[14]](function(_0xc76bx8){return handleError(_0xc76bx6,_0xc76bx8)})};exports[_0x7114[20]]=function(_0xc76bx10,_0xc76bx6){Telephone[_0x7114[23]](_0xc76bx10[_0x7114[22]][_0x7114[21]])[_0x7114[10]](handleEntityNotFound(_0xc76bx6))[_0x7114[10]](responseWithResult(_0xc76bx6))[_0x7114[14]](handleError(_0xc76bx6))};exports[_0x7114[24]]=function(_0xc76bx10,_0xc76bx6){var _0xc76bx12;return Telephone[_0x7114[26]](_0x7114[25])[_0x7114[10]](function(_0xc76bx13){_0xc76bx12=_0xc76bx13?_0xc76bx13:0;_0xc76bx6[_0x7114[7]](200)[_0x7114[6]]({internal:_0xc76bx12+1})})[_0x7114[14]](function(_0xc76bx8){return handleError(_0xc76bx6,_0xc76bx8)})};exports[_0x7114[27]]=function(_0xc76bx10,_0xc76bx6){console[_0x7114[29]](_0x7114[28],_0xc76bx10[_0x7114[22]]);return Telephone[_0x7114[32]]({where:{internal:_0xc76bx10[_0x7114[31]][_0x7114[25]]}})[_0x7114[10]](function(_0xc76bx14){if(!_0xc76bx14){return _0xc76bx6[_0x7114[30]](404)};return _0xc76bx6[_0x7114[6]](_0xc76bx14)})[_0x7114[14]](function(_0xc76bx8){return handleError(_0xc76bx6,_0xc76bx8)})};exports[_0x7114[33]]=function(_0xc76bx10,_0xc76bx6){_0xc76bx10[_0x7114[31]][_0x7114[34]]=_0x7114[18];return Telephone[_0x7114[33]](_0xc76bx10[_0x7114[31]])[_0x7114[10]](responseWithResult(_0xc76bx6,201))[_0x7114[14]](sequelize.UniqueConstraintError,function(_0xc76bx8){return Util[_0x7114[36]][_0x7114[35]](_0xc76bx6,_0xc76bx8)})[_0x7114[14]](handleError(_0xc76bx6))};exports[_0x7114[37]]=function(_0xc76bx10,_0xc76bx6){if(_0xc76bx10[_0x7114[31]][_0x7114[21]]){delete _0xc76bx10[_0x7114[31]][_0x7114[21]]};return Telephone[_0x7114[23]](_0xc76bx10[_0x7114[22]][_0x7114[21]])[_0x7114[10]](handleEntityNotFound(_0xc76bx6))[_0x7114[10]](saveUpdates(_0xc76bx10[_0x7114[31]]))[_0x7114[10]](responseWithResult(_0xc76bx6))[_0x7114[14]](sequelize.UniqueConstraintError,function(_0xc76bx8){return Util[_0x7114[36]][_0x7114[35]](_0xc76bx6,_0xc76bx8)})[_0x7114[14]](handleError(_0xc76bx6))};exports[_0x7114[12]]=function(_0xc76bx10,_0xc76bx6){return Telephone[_0x7114[23]](_0xc76bx10[_0x7114[22]][_0x7114[21]])[_0x7114[10]](handleEntityNotFound(_0xc76bx6))[_0x7114[10]](removeEntity(_0xc76bx6))[_0x7114[14]](handleError(_0xc76bx6))};exports[_0x7114[38]]=function(_0xc76bx10,_0xc76bx6){return Telephone[_0x7114[12]]({where:{id:_0xc76bx10[_0x7114[15]][_0x7114[39]]},individualHooks:true})[_0x7114[10]](function(){return _0xc76bx6[_0x7114[30]](204)})[_0x7114[14]](function(_0xc76bx8){return handleError(_0xc76bx6,_0xc76bx8)})}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/telephones              ->  index
+ * POST    /api/telephones              ->  create
+ * GET     /api/telephones/:id          ->  show
+ * PUT     /api/telephones/:id          ->  update
+ * DELETE  /api/telephones/:id          ->  destroy
+ */
+
+'use strict';
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var Telephone = require('../../models').User;
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Gets a list of Telephones
+exports.index = function(req, res) {
+  return Telephone
+    .scope('telephone')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+}
+
+// Gets a single Telephone from the DB
+exports.show = function(req, res) {
+  Telephone.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Get list of settings
+exports.getInternal = function(req, res) {
+
+  var _tinternal;
+
+  return Telephone
+    .max('internal')
+    .then(function(tinternal) {
+      _tinternal = tinternal ? tinternal : 0;
+
+      res.status(200).send({
+        internal: _tinternal + 1
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Validate the existence of an internal number
+exports.getInternalValidation = function(req, res) {
+  console.log('req.params', req.params);
+  return Telephone
+    .findAll({
+      where: {
+        internal: req.body.internal
+      }
+    })
+    .then(function(internals) {
+      if (!internals) {
+        return res.sendStatus(404);
+      }
+      return res.send(internals);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new Telephone in the DB
+exports.create = function(req, res) {
+  req.body.role = 'telephone';
+  return Telephone
+    .create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(handleError(res));
+}
+
+// Updates an existing Telephone in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return Telephone.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(handleError(res));
+}
+
+// Deletes a Telephone from the DB
+exports.destroy = function(req, res) {
+  return Telephone.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return Telephone
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
index ddf9ac3..11f6d7a 100644 (file)
@@ -1 +1,24 @@
-var _0xc257=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0xc257[0];exports[_0xc257[1]]=function(_0xd153x1){};function onSave(_0xd153x1,_0xd153x3,_0xd153x4){_0xd153x1[_0xc257[3]](_0xc257[2],_0xd153x3)}function onRemove(_0xd153x1,_0xd153x3,_0xd153x4){_0xd153x1[_0xc257[3]](_0xc257[4],_0xd153x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+// var Telephone = require('../../models').Telephone;
+
+exports.register = function (socket) {
+  // Telephone.afterCreate(function(doc) {
+  //   onSave(socket, doc);
+  // });
+  // Telephone.afterDestroy(function(doc) {
+  //   onRemove(socket, doc);
+  // });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('telephone:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('telephone:remove', doc);
+}
index e02964c..e2c0971 100644 (file)
@@ -1 +1,17 @@
-var _0x5c2d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5c2d[0];var express=require(_0x5c2d[1]);var controller=require(_0x5c2d[2]);var auth=require(_0x5c2d[3]);var router=express.Router();router[_0x5c2d[7]](_0x5c2d[4],auth[_0x5c2d[5]](),controller[_0x5c2d[6]]);router[_0x5c2d[7]](_0x5c2d[8],auth[_0x5c2d[5]](),controller[_0x5c2d[9]]);router[_0x5c2d[11]](_0x5c2d[4],auth[_0x5c2d[5]](),controller[_0x5c2d[10]]);router[_0x5c2d[13]](_0x5c2d[8],auth[_0x5c2d[5]](),controller[_0x5c2d[12]]);router[_0x5c2d[14]](_0x5c2d[8],auth[_0x5c2d[5]](),controller[_0x5c2d[12]]);router[_0x5c2d[16]](_0x5c2d[8],auth[_0x5c2d[5]](),controller[_0x5c2d[15]]);router[_0x5c2d[16]](_0x5c2d[4],auth[_0x5c2d[5]](),controller[_0x5c2d[17]]);module[_0x5c2d[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./trigger.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+
+module.exports = router;
index ce8d4e4..97bbaf4 100644 (file)
@@ -1 +1,199 @@
-var _0x58ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x69\x67\x67\x65\x72","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x41\x6C\x6C","\x41\x6E\x79","\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x54\x72\x69\x67\x67\x65\x72\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x58ef[0];var _=require(_0x58ef[1]);var util=require(_0x58ef[2]);var Util=require(_0x58ef[3]);var sequelize=require(_0x58ef[5])[_0x58ef[4]];var Trigger=require(_0x58ef[5])[_0x58ef[6]];var ToolsCondition=require(_0x58ef[5])[_0x58ef[7]];var ToolsAction=require(_0x58ef[5])[_0x58ef[8]];exports[_0x58ef[9]]=function(_0x7c02x8,_0x7c02x9,_0x7c02xa){return Trigger[_0x58ef[18]](_0x58ef[17])[_0x58ef[16]](Util[_0x58ef[15]](_0x7c02x8[_0x58ef[14]]))[_0x58ef[13]](function(_0x7c02xc){_0x7c02x9[_0x58ef[12]](200)[_0x58ef[11]](_0x7c02xc)})[_0x58ef[10]](function(_0x7c02xb){return handleError(_0x7c02x9,_0x7c02xb)})};exports[_0x58ef[19]]=function(_0x7c02x8,_0x7c02x9){Trigger[_0x58ef[18]](_0x58ef[17])[_0x58ef[23]](_0x7c02x8[_0x58ef[22]][_0x58ef[21]])[_0x58ef[13]](function(Trigger){if(!Trigger){return _0x7c02x9[_0x58ef[20]](404)};return _0x7c02x9[_0x58ef[11]](Trigger)})[_0x58ef[10]](function(_0x7c02xb){return handleError(_0x7c02x9,_0x7c02xb)})};exports[_0x58ef[24]]=function(_0x7c02x8,_0x7c02x9){Trigger[_0x58ef[24]](_0x7c02x8[_0x58ef[25]],{include:[{model:ToolsCondition,as:_0x58ef[26]},{model:ToolsCondition,as:_0x58ef[27]},{model:ToolsAction,as:_0x58ef[28]}]})[_0x58ef[13]](function(){return _0x7c02x9[_0x58ef[20]](201)})[_0x58ef[10]](function(_0x7c02xb){return handleError(_0x7c02x9,_0x7c02xb)})};exports[_0x58ef[29]]=function(_0x7c02x8,_0x7c02x9,_0x7c02xa){var _0x7c02xd;if(_0x7c02x8[_0x58ef[25]][_0x58ef[21]]){delete _0x7c02x8[_0x58ef[25]][_0x58ef[21]]};return sequelize[_0x58ef[41]](function(_0x7c02xe){return Trigger[_0x58ef[23]](_0x7c02x8[_0x58ef[22]][_0x58ef[21]])[_0x58ef[13]](function(_0x7c02x10){if(!_0x7c02x10){return _0x7c02x9[_0x58ef[20]](404)};var _0x7c02x11=_[_0x58ef[39]](_0x7c02x10,_0x7c02x8[_0x58ef[25]]);return _0x7c02x11[_0x58ef[40]]({transaction:_0x7c02xe})})[_0x58ef[13]](function(_0x7c02x10){_0x7c02xd=_0x7c02x10;if(_0x7c02x8[_0x58ef[25]][_0x58ef[27]]){return ToolsCondition[_0x58ef[36]]({where:{TriggerAnyId:_0x7c02x8[_0x58ef[22]][_0x58ef[21]]},transaction:_0x7c02xe})}})[_0x58ef[13]](function(){if(_0x7c02x8[_0x58ef[25]][_0x58ef[27]]&&Array[_0x58ef[31]](_0x7c02x8[_0x58ef[25]].Any)&&_0x7c02x8[_0x58ef[25]][_0x58ef[27]][_0x58ef[32]]){_[_0x58ef[34]](_0x7c02x8[_0x58ef[25]].Any,function(_0x7c02xf){_0x7c02xf[_0x58ef[38]]=_0x7c02x8[_0x58ef[22]][_0x58ef[21]]});return ToolsCondition[_0x58ef[35]](_0x7c02x8[_0x58ef[25]].Any,{transaction:_0x7c02xe})}})[_0x58ef[13]](function(){if(_0x7c02x8[_0x58ef[25]][_0x58ef[26]]){return ToolsCondition[_0x58ef[36]]({where:{TriggerAllId:_0x7c02x8[_0x58ef[22]][_0x58ef[21]]},transaction:_0x7c02xe})}})[_0x58ef[13]](function(){if(_0x7c02x8[_0x58ef[25]][_0x58ef[26]]&&Array[_0x58ef[31]](_0x7c02x8[_0x58ef[25]].All)&&_0x7c02x8[_0x58ef[25]][_0x58ef[26]][_0x58ef[32]]){_[_0x58ef[34]](_0x7c02x8[_0x58ef[25]].All,function(_0x7c02xf){_0x7c02xf[_0x58ef[37]]=_0x7c02x8[_0x58ef[22]][_0x58ef[21]]});return ToolsCondition[_0x58ef[35]](_0x7c02x8[_0x58ef[25]].All,{transaction:_0x7c02xe})}})[_0x58ef[13]](function(){if(_0x7c02x8[_0x58ef[25]][_0x58ef[28]]){return ToolsAction[_0x58ef[36]]({where:{TriggerId:_0x7c02x8[_0x58ef[22]][_0x58ef[21]]},transaction:_0x7c02xe})}})[_0x58ef[13]](function(){if(_0x7c02x8[_0x58ef[25]][_0x58ef[28]]&&Array[_0x58ef[31]](_0x7c02x8[_0x58ef[25]].Actions)&&_0x7c02x8[_0x58ef[25]][_0x58ef[28]][_0x58ef[32]]){_[_0x58ef[34]](_0x7c02x8[_0x58ef[25]].Actions,function(_0x7c02xf){_0x7c02xf[_0x58ef[33]]=_0x7c02x8[_0x58ef[22]][_0x58ef[21]]});return ToolsAction[_0x58ef[35]](_0x7c02x8[_0x58ef[25]].Actions,{transaction:_0x7c02xe})}})})[_0x58ef[13]](function(){return _0x7c02x9[_0x58ef[20]](200)})[_0x58ef[10]](function(_0x7c02xb){console[_0x58ef[30]](_0x7c02xb);return handleError(_0x7c02x9,_0x7c02xb)})};exports[_0x58ef[36]]=function(_0x7c02x8,_0x7c02x9){Trigger[_0x58ef[23]](_0x7c02x8[_0x58ef[22]][_0x58ef[21]])[_0x58ef[13]](function(Trigger){if(!Trigger){return _0x7c02x9[_0x58ef[20]](404)};Trigger[_0x58ef[36]]()[_0x58ef[13]](function(){return _0x7c02x9[_0x58ef[20]](204)})[_0x58ef[10]](function(_0x7c02xb){return handleError(_0x7c02x9,_0x7c02xb)})})[_0x58ef[10]](function(_0x7c02xb){return handleError(_0x7c02x9,_0x7c02xb)})};exports[_0x58ef[42]]=function(_0x7c02x8,_0x7c02x9){Trigger[_0x58ef[36]]({where:{id:_0x7c02x8[_0x58ef[14]][_0x58ef[21]]},individualHooks:true})[_0x58ef[13]](function(){return _0x7c02x9[_0x58ef[20]](204)})[_0x58ef[10]](function(_0x7c02xb){return handleError(_0x7c02x9,_0x7c02xb)})};function handleError(_0x7c02x9,_0x7c02xb){return _0x7c02x9[_0x58ef[12]](500)[_0x58ef[11]](_0x7c02xb)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var Util = require('../../config/util');
+var sequelize = require('../../models').sequelize;
+
+var Trigger = require('../../models').Trigger;
+var ToolsCondition = require('../../models').ToolsCondition;
+var ToolsAction = require('../../models').ToolsAction;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return Trigger
+    .scope('all')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single Trigger
+exports.show = function(req, res) {
+  Trigger
+    .scope('all')
+    .findById(req.params.id)
+    .then(function(Trigger) {
+      if (!Trigger) {
+        return res.sendStatus(404);
+      }
+      return res.send(Trigger);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new Trigger in the DB.
+exports.create = function(req, res) {
+  Trigger
+    .create(req.body, {
+      include: [{
+        model: ToolsCondition,
+        as: 'All'
+      }, {
+        model: ToolsCondition,
+        as: 'Any'
+      }, {
+        model: ToolsAction,
+        as: 'Actions'
+      }]
+    })
+    .then(function() {
+      return res.sendStatus(201);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing Trigger in the DB.
+exports.update = function(req, res, next) {
+  var _trigger;
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return sequelize.transaction(function(t) {
+      return Trigger
+        .findById(req.params.id)
+        .then(function(trigger) {
+          if (!trigger) {
+            return res.sendStatus(404);
+          }
+          var updated = _.merge(trigger, req.body);
+          return updated
+            .save({
+              transaction: t
+            });
+        })
+        .then(function(trigger) {
+          _trigger = trigger;
+          if (req.body.Any) {
+            return ToolsCondition
+              .destroy({
+                where: {
+                  TriggerAnyId: req.params.id
+                },
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.Any && Array.isArray(req.body.Any) && req.body.Any.length) {
+            _.forEach(req.body.Any, function(elem) {
+              elem.TriggerAnyId = req.params.id;
+            });
+            return ToolsCondition
+              .bulkCreate(req.body.Any, {
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.All) {
+            return ToolsCondition
+              .destroy({
+                where: {
+                  TriggerAllId: req.params.id
+                },
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.All && Array.isArray(req.body.All) && req.body.All.length) {
+            _.forEach(req.body.All, function(elem) {
+              elem.TriggerAllId = req.params.id;
+            });
+            return ToolsCondition
+              .bulkCreate(req.body.All, {
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.Actions) {
+            return ToolsAction
+              .destroy({
+                where: {
+                  TriggerId: req.params.id
+                },
+                transaction: t
+              });
+          }
+        })
+        .then(function() {
+          if (req.body.Actions && Array.isArray(req.body.Actions) && req.body.Actions.length) {
+            _.forEach(req.body.Actions, function(elem) {
+              elem.TriggerId = req.params.id;
+            });
+            return ToolsAction
+              .bulkCreate(req.body.Actions, {
+                transaction: t
+              });
+          }
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes a Trigger from the DB.
+exports.destroy = function(req, res) {
+  Trigger
+    .findById(req.params.id)
+    .then(function(Trigger) {
+      if (!Trigger) {
+        return res.sendStatus(404);
+      }
+      Trigger.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  Trigger
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index e0f4ee7..7fe5fa2 100644 (file)
@@ -1 +1,24 @@
-var _0x5e12=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x74\x72\x69\x67\x67\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x74\x72\x69\x67\x67\x65\x72\x3A\x72\x65\x6D\x6F\x76\x65"];_0x5e12[0];var Trigger=require(_0x5e12[2])[_0x5e12[1]];exports[_0x5e12[3]]=function(_0xa3dax2){Trigger[_0x5e12[4]](function(_0xa3dax3){onSave(_0xa3dax2,_0xa3dax3)});Trigger[_0x5e12[5]](function(_0xa3dax3){onRemove(_0xa3dax2,_0xa3dax3)})};function onSave(_0xa3dax2,_0xa3dax3,_0xa3dax5){_0xa3dax2[_0x5e12[7]](_0x5e12[6],_0xa3dax3)}function onRemove(_0xa3dax2,_0xa3dax3,_0xa3dax5){_0xa3dax2[_0x5e12[7]](_0x5e12[8],_0xa3dax3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Trigger = require('../../models').Trigger;
+
+exports.register = function(socket) {
+  Trigger.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Trigger.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('trigger:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('trigger:remove', doc);
+}
index 3a1ff0e..c88586d 100644 (file)
@@ -1 +1,20 @@
-var _0xefe6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x67\x65\x74"];_0xefe6[0];var should=require(_0xefe6[1]);var app=require(_0xefe6[2]);var request=require(_0xefe6[3]);describe(_0xefe6[4],function(){it(_0xefe6[5],function(_0xbbc7x4){request(app)[_0xefe6[13]](_0xefe6[12])[_0xefe6[11]](200)[_0xefe6[11]](_0xefe6[10],/json/)[_0xefe6[9]](function(_0xbbc7x5,_0xbbc7x6){if(_0xbbc7x5){return _0xbbc7x4(_0xbbc7x5)};_0xbbc7x6[_0xefe6[8]][_0xefe6[1]][_0xefe6[7]][_0xefe6[6]](Array);_0xbbc7x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/triggers', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/triggers')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 4b1936e..ea72fdd 100644 (file)
@@ -1 +1,18 @@
-var _0x233c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x74\x72\x75\x6E\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x233c[0];var express=require(_0x233c[1]);var controller=require(_0x233c[2]);var config=require(_0x233c[3]);var auth=require(_0x233c[4]);var router=express.Router();router[_0x233c[8]](_0x233c[5],auth[_0x233c[6]](),controller[_0x233c[7]]);router[_0x233c[8]](_0x233c[9],auth[_0x233c[6]](),controller[_0x233c[10]]);router[_0x233c[12]](_0x233c[5],auth[_0x233c[6]](),controller[_0x233c[11]]);router[_0x233c[12]](_0x233c[13],auth[_0x233c[6]](),controller[_0x233c[14]]);router[_0x233c[16]](_0x233c[9],auth[_0x233c[6]](),controller[_0x233c[15]]);router[_0x233c[18]](_0x233c[5],auth[_0x233c[6]](),controller[_0x233c[17]]);router[_0x233c[18]](_0x233c[9],auth[_0x233c[6]](),controller[_0x233c[19]]);module[_0x233c[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./trunk.controller');
+var config = require('../../config/environment');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/validate', auth.isAuthenticated(), controller.trunkValidation);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index fc88d33..eff129a 100644 (file)
@@ -1 +1,160 @@
-var _0x35ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x74\x72\x75\x6E\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x6C\x65\x6E\x67\x74\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x66\x6F\x72\x45\x61\x63\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x54\x52\x55\x4E\x4B\x5F\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44"];_0x35ea[0];var _=require(_0x35ea[1]);var Trunk=require(_0x35ea[3])[_0x35ea[2]];var VoiceExtension=require(_0x35ea[3])[_0x35ea[4]];var sequelize=require(_0x35ea[3])[_0x35ea[5]];var util=require(_0x35ea[6]);var Util=require(_0x35ea[7]);exports[_0x35ea[8]]=function(_0x99e9x7,_0x99e9x8,_0x99e9x9){return Trunk[_0x35ea[15]](Util[_0x35ea[14]](_0x99e9x7[_0x35ea[13]]))[_0x35ea[12]](function(_0x99e9xb){_0x99e9x8[_0x35ea[11]](200)[_0x35ea[10]](_0x99e9xb)})[_0x35ea[9]](function(_0x99e9xa){return handleError(_0x99e9x8,_0x99e9xa)})};exports[_0x35ea[16]]=function(_0x99e9x7,_0x99e9x8){return Trunk[_0x35ea[20]](_0x99e9x7[_0x35ea[19]][_0x35ea[18]])[_0x35ea[12]](function(_0x99e9xc){if(!_0x99e9xc){return _0x99e9x8[_0x35ea[17]](404)};return _0x99e9x8[_0x35ea[10]](_0x99e9xc)})[_0x35ea[9]](function(_0x99e9xa){return handleError(_0x99e9x8,_0x99e9xa)})};exports[_0x35ea[21]]=function(_0x99e9x7,_0x99e9x8){return Trunk[_0x35ea[24]]({where:{name:_0x99e9x7[_0x35ea[23]][_0x35ea[22]]}})[_0x35ea[12]](function(_0x99e9xd){if(!_0x99e9xd){return _0x99e9x8[_0x35ea[17]](404)};return _0x99e9x8[_0x35ea[10]](_0x99e9xd)})[_0x35ea[9]](function(_0x99e9xa){return handleError(_0x99e9x8,_0x99e9xa)})};exports[_0x35ea[25]]=function(_0x99e9x7,_0x99e9x8){return Trunk[_0x35ea[25]](_0x99e9x7[_0x35ea[23]])[_0x35ea[12]](function(_0x99e9xc){return _0x99e9x8[_0x35ea[11]](201)[_0x35ea[10]](_0x99e9xc)})[_0x35ea[9]](function(_0x99e9xa){return handleError(_0x99e9x8,_0x99e9xa)})};exports[_0x35ea[26]]=function(_0x99e9x7,_0x99e9x8){if(_0x99e9x7[_0x35ea[23]][_0x35ea[18]]){delete _0x99e9x7[_0x35ea[23]][_0x35ea[18]]};return Trunk[_0x35ea[20]](_0x99e9x7[_0x35ea[19]][_0x35ea[18]])[_0x35ea[12]](function(_0x99e9xc){if(!_0x99e9xc){return _0x99e9x8[_0x35ea[17]](404)};var _0x99e9xe=_[_0x35ea[28]](_0x99e9xc,_0x99e9x7[_0x35ea[23]]);return _0x99e9xe[_0x35ea[29]]()})[_0x35ea[12]](function(_0x99e9xc){return _0x99e9x8[_0x35ea[11]](200)[_0x35ea[10]](_0x99e9xc)})[_0x35ea[9]](function(_0x99e9xa){console[_0x35ea[27]](_0x99e9xa);return handleError(_0x99e9x8,_0x99e9xa)})};exports[_0x35ea[30]]=function(_0x99e9x7,_0x99e9x8){return Trunk[_0x35ea[20]](_0x99e9x7[_0x35ea[19]][_0x35ea[18]])[_0x35ea[12]](function(_0x99e9xc){if(!_0x99e9xc){return _0x99e9x8[_0x35ea[17]](404)};return _0x99e9xc[_0x35ea[30]]()})[_0x35ea[12]](function(){return _0x99e9x8[_0x35ea[17]](204)})[_0x35ea[9]](function(_0x99e9xa){return handleError(_0x99e9x8,_0x99e9xa)})};exports[_0x35ea[31]]=function(_0x99e9x7,_0x99e9x8){var _0x99e9xf=false;Trunk[_0x35ea[24]]({where:{id:_0x99e9x7[_0x35ea[13]][_0x35ea[18]]},include:[{all:true}]})[_0x35ea[12]](function(_0x99e9xd){if(!_0x99e9xd){return _0x99e9x8[_0x35ea[17]](404)};_0x99e9xd[_0x35ea[34]](function(_0x99e9x10){if(_0x99e9x10[_0x35ea[33]][_0x35ea[32]]>0){_0x99e9xf=true}});if(_0x99e9xf){return _0x99e9x8[_0x35ea[11]](500)[_0x35ea[10]]({message:_0x35ea[35]})};Trunk[_0x35ea[30]]({where:{id:_0x99e9x7[_0x35ea[13]][_0x35ea[18]]},individualHooks:true})[_0x35ea[12]](function(){return _0x99e9x8[_0x35ea[17]](204)})[_0x35ea[9]](function(_0x99e9xa){return handleError(_0x99e9x8,_0x99e9xa)})})[_0x35ea[9]](function(_0x99e9xa){return handleError(_0x99e9x8,_0x99e9xa)})};function handleError(_0x99e9x8,_0x99e9xa){return _0x99e9x8[_0x35ea[11]](500)[_0x35ea[10]](_0x99e9xa)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Trunk = require('../../models').Trunk;
+var VoiceExtension = require('../../models').VoiceExtension;
+var sequelize = require('../../models').sequelize;
+var util = require('util');
+var Util = require('../../config/util');
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return Trunk
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single trunk
+exports.show = function(req, res) {
+  return Trunk
+    .findById(req.params.id)
+    .then(function(trunk) {
+      if (!trunk) {
+        return res.sendStatus(404);
+      }
+      return res.send(trunk);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Validate the existence of a trunk
+exports.trunkValidation = function(req, res) {
+  return Trunk
+    .findAll({
+      where: {
+        name: req.body.name
+      }
+    })
+    .then(function(trunks) {
+      if (!trunks) {
+        return res.sendStatus(404);
+      }
+      return res.send(trunks);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new trunk in the DB.
+exports.create = function(req, res) {
+  return Trunk
+    .create(req.body)
+    .then(function(trunk) {
+      return res.status(201).send(trunk);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return Trunk
+    .findById(req.params.id)
+    .then(function(trunk) {
+      if (!trunk) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(trunk, req.body);
+      return updated
+        .save();
+    })
+    .then(function(trunk) {
+      return res.status(200).send(trunk);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes a trunk from the DB.
+exports.destroy = function(req, res) {
+  return Trunk
+    .findById(req.params.id)
+    .then(function(trunk) {
+      if (!trunk) {
+        return res.sendStatus(404);
+      }
+      return trunk
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes multiple trunk from the DB.
+exports.bulkDestroy = function(req, res) {
+  var associatedTrunks = false;
+
+  Trunk
+    .findAll({
+      where: {
+        id: req.query.id
+      },
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(trunks) {
+      if (!trunks) {
+        return res.sendStatus(404);
+      }
+      trunks.forEach(function(element) {
+        if (element.VoiceExtensions.length > 0) {
+          associatedTrunks = true;
+        }
+      });
+      if (associatedTrunks) {
+        return res.status(500).send({
+          message: 'MESSAGE_TRUNK_OUTBOUND_ASSOCIATED'
+        });
+      }
+      Trunk
+        .destroy({
+          where: {
+            id: req.query.id
+          },
+          individualHooks: true
+        })
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index bbcb1f9..bf99ee7 100644 (file)
@@ -1 +1,30 @@
-var _0xff03=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x74\x72\x75\x6E\x6B\x20\x6E\x61\x6D\x65","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\x74\x72\x75\x6E\x6B\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x74\x72\x75\x6E\x6B\x3A\x72\x65\x6D\x6F\x76\x65"];_0xff03[0];var Trunk=require(_0xff03[2])[_0xff03[1]];exports[_0xff03[3]]=function(_0x327ax2){Trunk[_0xff03[4]](function(_0x327ax3){onSave(_0x327ax2,_0x327ax3)});Trunk[_0xff03[5]](function(_0x327ax3){onRemove(_0x327ax2,_0x327ax3)});Trunk[_0xff03[9]](function(_0x327ax3){if(_0x327ax3[_0xff03[7]](_0xff03[6])){throw  new Error(_0xff03[8])}})};function onSave(_0x327ax2,_0x327ax3,_0x327ax5){_0x327ax2[_0xff03[11]](_0xff03[10],_0x327ax3)}function onRemove(_0x327ax2,_0x327ax3,_0x327ax5){_0x327ax2[_0xff03[11]](_0xff03[12],_0x327ax3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Trunk = require('../../models').Trunk;
+
+exports.register = function(socket) {
+  Trunk.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Trunk.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+
+  Trunk.beforeUpdate(function(doc) {
+    if (doc.changed('name')) {
+      throw new Error("You can't modify a trunk name");
+    }
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('trunk:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('trunk:remove', doc);
+}
index 061c059..44410d3 100644 (file)
@@ -1 +1,12 @@
-var _0x5de2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x70\x64\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x70\x75\x6C\x6C","\x70\x75\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x5de2[0];var express=require(_0x5de2[1]);var controller=require(_0x5de2[2]);var auth=require(_0x5de2[3]);var router=express.Router();router[_0x5de2[9]](_0x5de2[4],auth[_0x5de2[5]](),auth[_0x5de2[7]](_0x5de2[6]),controller[_0x5de2[8]]);router[_0x5de2[9]](_0x5de2[10],auth[_0x5de2[5]](),auth[_0x5de2[7]](_0x5de2[6]),controller[_0x5de2[11]]);module[_0x5de2[12]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./update.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
+router.get('/pull', auth.isAuthenticated(), auth.hasRole('admin'), controller.pull);
+
+module.exports = router;
index f7a5ead..e93190b 100644 (file)
@@ -1 +1,52 @@
-var _0xa2df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x6F\x6F\x74","\x6A\x6F\x69\x6E","\x73\x69\x6D\x70\x6C\x65\x2D\x67\x69\x74","\x69\x6E\x64\x65\x78","\x6C\x65\x6E\x67\x74\x68","\x61\x6C\x6C","\x7C","\x73\x70\x6C\x69\x74","\x6D\x65\x73\x73\x61\x67\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6C\x6F\x67","\x70\x75\x6C\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x67\x69\x74\x20\x70\x75\x6C\x6C"];_0xa2df[0];var _=require(_0xa2df[1]);var path=require(_0xa2df[2]);var moment=require(_0xa2df[3]);var Promise=require(_0xa2df[4]);var exec=Promise[_0xa2df[7]](require(_0xa2df[6])[_0xa2df[5]]);var config=require(_0xa2df[8]);var Git=require(_0xa2df[11])(path[_0xa2df[10]](config[_0xa2df[9]]));exports[_0xa2df[12]]=function(_0x615ax8,_0x615ax9){return Git[_0xa2df[25]](function(_0x615axa,_0x615axb){if(_0x615axa){return handleError(_0x615ax9,_0x615axa)};var _0x615axc=[];for(var _0x615axd=0;_0x615axd<10&&_0x615axd<_0x615axb[_0xa2df[14]][_0xa2df[13]];_0x615axd++){_0x615axc[_0xa2df[22]]({version:_0x615axb[_0xa2df[14]][_0x615axd][_0xa2df[17]][_0xa2df[16]](_0xa2df[15])[1]||_0xa2df[18],message:_0x615axb[_0xa2df[14]][_0x615axd][_0xa2df[17]][_0xa2df[16]](_0xa2df[15])[0],createdAt:moment(_0x615axb[_0xa2df[14]][_0x615axd][_0xa2df[21]])[_0xa2df[20]](_0xa2df[19])})};return _0x615ax9[_0xa2df[24]](200)[_0xa2df[23]]({rows:_0x615axc,count:_0x615axc[_0xa2df[13]]})})};exports[_0xa2df[26]]=function(_0x615ax8,_0x615ax9){return exec(_0xa2df[31])[_0xa2df[30]](function(){return _0x615ax9[_0xa2df[29]](201)[_0xa2df[23]]()})[_0xa2df[28]](function(_0x615axa){console[_0xa2df[27]](_0x615axa)})};function handleError(_0x615ax9,_0x615axa){return _0x615ax9[_0xa2df[24]](500)[_0xa2df[23]](_0x615axa)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var path = require('path');
+var moment = require('moment');
+var Promise = require('bluebird');
+var exec = Promise.promisify(require('child_process').exec);
+
+var config = require('../../config/environment');
+
+var Git = require('simple-git')(path.join(config.root));
+
+// Get list of updates
+exports.index = function(req, res) {
+  return Git
+    .log(function(err, logs) {
+      if (err) {
+        return handleError(res, err);
+      }
+
+      var rows = [];
+      for (var i = 0; i < 10 && i < logs.all.length; i++) {
+        rows.push({
+          version: logs.all[i].message.split('|')[1] || 'unknown',
+          message: logs.all[i].message.split('|')[0],
+          createdAt: moment(logs.all[i].date).format("YYYY-MM-DD HH:mm:ss")
+        });
+      }
+
+      return res.status(200).send({
+        rows: rows,
+        count: rows.length
+      });
+    });
+};
+
+// Get a single update
+exports.pull = function(req, res) {
+  return Git
+    .pull('origin', 'develop', function(err, data) {
+      console.log('data', data);
+      if (err) {
+        console.error('err', err);
+        return handleError(res, err);
+      }
+      return res.sendStatus(201).send(data);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 1057c76..3d8b8b6 100644 (file)
@@ -1 +1,26 @@
-var _0x99c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6D\x65","\x6D\x65","\x2F\x61\x6C\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x2F\x61\x76\x61\x74\x61\x72\x2F\x3A\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x61\x76\x61\x74\x61\x72","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x75\x70\x64\x61\x74\x65","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x63\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x99c2[0];var express=require(_0x99c2[1]);var controller=require(_0x99c2[2]);var config=require(_0x99c2[3]);var auth=require(_0x99c2[4]);var license=require(_0x99c2[5]);var router=express.Router();router[_0x99c2[9]](_0x99c2[6],auth[_0x99c2[7]](),controller[_0x99c2[8]]);router[_0x99c2[9]](_0x99c2[10],auth[_0x99c2[7]](),controller[_0x99c2[11]]);router[_0x99c2[9]](_0x99c2[12],auth[_0x99c2[7]](),controller[_0x99c2[13]]);router[_0x99c2[9]](_0x99c2[14],controller[_0x99c2[15]]);router[_0x99c2[9]](_0x99c2[16],controller[_0x99c2[17]]);router[_0x99c2[9]](_0x99c2[18],auth[_0x99c2[7]](),controller[_0x99c2[19]]);router[_0x99c2[22]](_0x99c2[20],auth[_0x99c2[7]](),controller[_0x99c2[21]]);router[_0x99c2[25]](_0x99c2[23],auth[_0x99c2[7]](),controller[_0x99c2[24]]);router[_0x99c2[25]](_0x99c2[26],auth[_0x99c2[7]](),auth[_0x99c2[28]](_0x99c2[27]),controller[_0x99c2[29]]);router[_0x99c2[25]](_0x99c2[18],auth[_0x99c2[7]](),controller[_0x99c2[30]]);router[_0x99c2[22]](_0x99c2[6],auth[_0x99c2[7]](),license[_0x99c2[31]](),license[_0x99c2[32]](),controller[_0x99c2[33]]);router[_0x99c2[22]](_0x99c2[16],auth[_0x99c2[7]](),controller[_0x99c2[34]]);router[_0x99c2[36]](_0x99c2[6],auth[_0x99c2[7]](),controller[_0x99c2[35]]);router[_0x99c2[36]](_0x99c2[18],auth[_0x99c2[7]](),controller[_0x99c2[37]]);module[_0x99c2[38]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./user.controller');
+var config = require('../../config/environment');
+var auth = require('../../auth/auth.service');
+var license = require('../../config/license/license.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/me', auth.isAuthenticated(), controller.me);
+router.get('/all', auth.isAuthenticated(), controller.getUsers);
+router.get('/avatar/:filename', controller.getAvatar);
+router.get('/:id/avatar', controller.getAvatarById);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/validate/:field', auth.isAuthenticated(), controller.userValidation);
+router.put('/password', auth.isAuthenticated(), controller.changePassword);
+router.put('/:id/password', auth.isAuthenticated(), auth.hasRole('admin'), controller.resetPassword);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.post('/', auth.isAuthenticated(), license.isValidDate(), license.isUsersLimit(), controller.create);
+router.post('/:id/avatar', auth.isAuthenticated(), controller.changeAvatar);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 0356817..2e46525 100644 (file)
@@ -1 +1,369 @@
-var _0xfc0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x6F\x64\x75\x6C\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x70\x61\x73\x73\x70\x6F\x72\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x61\x76\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x75\x70\x64\x61\x74\x65","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x75\x73\x65\x72\x70\x69\x63","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x65\x78\x69\x73\x74\x73","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x76\x69\x73\x69\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D\x65\x72\x2E\x70\x6E\x67","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74"];_0xfc0f[0];var User=require(_0xfc0f[2])[_0xfc0f[1]];var Module=require(_0xfc0f[2])[_0xfc0f[3]];var sequelize=require(_0xfc0f[2])[_0xfc0f[4]];var config=require(_0xfc0f[5]);var Util=require(_0xfc0f[6]);var passport=require(_0xfc0f[7]);var moment=require(_0xfc0f[8]);var jwt=require(_0xfc0f[9]);var uploadFile=require(_0xfc0f[10]);var path=require(_0xfc0f[11]);var fs=require(_0xfc0f[12]);var _=require(_0xfc0f[13]);var util=require(_0xfc0f[14]);var sr=require(_0xfc0f[15]);exports[_0xfc0f[16]]=function(_0xb256xf,_0xb256x10,_0xb256x11){return User[_0xfc0f[25]](_0xfc0f[24])[_0xfc0f[23]](Util[_0xfc0f[22]](_0xb256xf[_0xfc0f[21]]))[_0xfc0f[20]](function(_0xb256x13){_0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]](_0xb256x13)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[26]]=function(_0xb256xf,_0xb256x10,_0xb256x11){return User[_0xfc0f[28]]({where:{role:{$in:[_0xfc0f[27],_0xfc0f[24],_0xfc0f[24]]}}})[_0xfc0f[20]](function(_0xb256x14){return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]](_0xb256x14)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[29]]=function(_0xb256xf,_0xb256x10,_0xb256x11){return User[_0xfc0f[29]](_0xb256xf[_0xfc0f[32]])[_0xfc0f[20]](function(_0xb256x15){return _0xb256x10[_0xfc0f[19]](201)[_0xfc0f[18]](_0xb256x15)})[_0xfc0f[17]](sequelize.UniqueConstraintError,function(_0xb256x12){return Util[_0xfc0f[31]][_0xfc0f[30]](_0xb256x10,_0xb256x12)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[33]]=function(_0xb256xf,_0xb256x10,_0xb256x11){return User[_0xfc0f[37]](_0xb256xf[_0xfc0f[36]][_0xfc0f[35]])[_0xfc0f[20]](function(_0xb256x15){if(!_0xb256x15){return _0xb256x10[_0xfc0f[34]](404)};return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]](_0xb256x15)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[38]]=function(_0xb256xf,_0xb256x10,_0xb256x11){var _0xb256x16=_0xb256xf[_0xfc0f[36]][_0xfc0f[35]];var _0xb256x17;return User[_0xfc0f[37]](_0xb256x16)[_0xfc0f[20]](function(_0xb256x15){_0xb256x17=_0xb256x15;if(!_0xb256x15){return _0xb256x10[_0xfc0f[34]](404)};return _0xb256x15[_0xfc0f[38]]()})[_0xfc0f[20]](function(_0xb256x15){return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]](_0xb256x15)})[_0xfc0f[17]](sequelize.ForeignKeyConstraintError,function(_0xb256x12){return Util[_0xfc0f[31]][_0xfc0f[40]](_0xb256x10,_0xfc0f[24],_0xb256x17[_0xfc0f[39]],_0xb256x12)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[41]]=function(_0xb256xf,_0xb256x10,_0xb256x11){var _0xb256x16=_0xb256xf[_0xfc0f[24]][_0xfc0f[35]];var _0xb256x18=String(_0xb256xf[_0xfc0f[32]][_0xfc0f[42]]);var _0xb256x19=String(_0xb256xf[_0xfc0f[32]][_0xfc0f[43]]);return User[_0xfc0f[37]](_0xb256x16)[_0xfc0f[20]](function(_0xb256x15){if(_0xb256x15[_0xfc0f[44]](_0xb256x18)){_0xb256x15[_0xfc0f[45]]=_0xb256x19;_0xb256x15[_0xfc0f[46]]()[_0xfc0f[20]](function(){return _0xb256x10[_0xfc0f[34]](200)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})}else {return _0xb256x10[_0xfc0f[34]](403)}})};exports[_0xfc0f[47]]=function(_0xb256xf,_0xb256x10,_0xb256x11){var _0xb256x19=String(_0xb256xf[_0xfc0f[32]][_0xfc0f[43]]);return User[_0xfc0f[37]](_0xb256xf[_0xfc0f[36]][_0xfc0f[35]])[_0xfc0f[20]](function(_0xb256x15){_0xb256x15[_0xfc0f[45]]=_0xb256x19;return _0xb256x15[_0xfc0f[46]]()})[_0xfc0f[20]](function(){return _0xb256x10[_0xfc0f[34]](200)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[48]]=function(_0xb256xf,_0xb256x10,_0xb256x11){var _0xb256x1a= new uploadFile({dest:path[_0xfc0f[53]](config[_0xfc0f[49]],_0xfc0f[50],_0xfc0f[51],_0xfc0f[52]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0xb256x1b,_0xb256x1c){return sr()+path[_0xfc0f[55]](_0xb256x1c[_0xfc0f[54]])},messages:{maxNumberOfFiles:_0xfc0f[56],acceptFileTypes:_0xfc0f[57],invalidRequest:_0xfc0f[58]}});_0xb256x1a[_0xfc0f[62]](_0xfc0f[59],function(_0xb256x1d,_0xb256x1e){if(!_0xb256x1e[_0xfc0f[60]][_0xfc0f[54]]){return _0xb256x10[_0xfc0f[19]](500)[_0xfc0f[18]](_0xb256x1a)};return User[_0xfc0f[37]](_0xb256xf[_0xfc0f[36]][_0xfc0f[35]])[_0xfc0f[20]](function(_0xb256x15){if(!_0xb256x15){return _0xb256x10[_0xfc0f[34]](404)};return _0xb256x15[_0xfc0f[61]]({userpic:_0xb256x1e[_0xfc0f[60]][_0xfc0f[54]]})})[_0xfc0f[20]](function(_0xb256x15){return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]](_0xb256x15)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})});_0xb256x1a[_0xfc0f[62]](_0xfc0f[63],function(_0xb256x12){console[_0xfc0f[65]](_0xfc0f[64],_0xb256x12);return handleError(_0xb256x10,_0xb256x12)});_0xb256x1a[_0xfc0f[66]](_0xb256xf)};exports[_0xfc0f[67]]=function(_0xb256xf,_0xb256x10,_0xb256x11){var _0xb256x16=_0xb256xf[_0xfc0f[24]][_0xfc0f[35]];return User[_0xfc0f[72]]({where:{id:_0xb256x16},attributes:[_0xfc0f[35],_0xfc0f[68],_0xfc0f[39],_0xfc0f[69],_0xfc0f[70],_0xfc0f[71]],include:[Module]})[_0xfc0f[20]](function(_0xb256x15){if(!_0xb256x15){return _0xb256x10[_0xfc0f[34]](401)};return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]](_0xb256x15)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[61]]=function(_0xb256xf,_0xb256x10,_0xb256x11){var _0xb256x16=_0xb256xf[_0xfc0f[24]][_0xfc0f[35]];delete _0xb256xf[_0xfc0f[32]][_0xfc0f[45]];return User[_0xfc0f[37]](_0xb256xf[_0xfc0f[36]][_0xfc0f[35]])[_0xfc0f[20]](function(_0xb256x15){if(!_0xb256x15){return _0xb256x10[_0xfc0f[34]](500)};return _0xb256x15[_0xfc0f[61]](_0xb256xf[_0xfc0f[32]])})[_0xfc0f[20]](function(_0xb256x15){return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]](_0xb256x15)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[73]]=function(_0xb256xf,_0xb256x10,_0xb256x11){var _0xb256x1f=path[_0xfc0f[53]](config[_0xfc0f[49]],_0xfc0f[50],_0xfc0f[51],_0xfc0f[52],_0xb256xf[_0xfc0f[36]][_0xfc0f[54]]);fs[_0xfc0f[76]](_0xb256x1f,function(_0xb256x20){if(!_0xb256x20){_0xb256x1f=path[_0xfc0f[53]](config[_0xfc0f[49]],_0xfc0f[50],_0xfc0f[51],_0xfc0f[52],_0xfc0f[74])};return _0xb256x10[_0xfc0f[75]](_0xb256x1f)})};exports[_0xfc0f[77]]=function(_0xb256xf,_0xb256x10,_0xb256x11){if(_0xb256xf[_0xfc0f[36]][_0xfc0f[35]]===_0xfc0f[78]){var _0xb256x1f=path[_0xfc0f[53]](config[_0xfc0f[49]],_0xfc0f[50],_0xfc0f[51],_0xfc0f[52],_0xfc0f[79]);fs[_0xfc0f[76]](_0xb256x1f,function(_0xb256x20){return _0xb256x10[_0xfc0f[75]](_0xb256x1f)})}else {return User[_0xfc0f[37]](_0xb256xf[_0xfc0f[36]][_0xfc0f[35]])[_0xfc0f[20]](function(_0xb256x15){if(_0xb256x15){var _0xb256x1f=path[_0xfc0f[53]](config[_0xfc0f[49]],_0xfc0f[50],_0xfc0f[51],_0xfc0f[52],_0xb256x15[_0xfc0f[71]]?_0xb256x15[_0xfc0f[71]]:_0xfc0f[74]);fs[_0xfc0f[76]](_0xb256x1f,function(_0xb256x20){if(!_0xb256x20){_0xb256x1f=path[_0xfc0f[53]](config[_0xfc0f[49]],_0xfc0f[50],_0xfc0f[51],_0xfc0f[52],_0xfc0f[74])};return _0xb256x10[_0xfc0f[75]](_0xb256x1f)})}else {return _0xb256x10[_0xfc0f[34]](500)}})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})}};exports[_0xfc0f[80]]=function(_0xb256xf,_0xb256x10){return User[_0xfc0f[38]]({where:{id:_0xb256xf[_0xfc0f[21]][_0xfc0f[35]]},individualHooks:true})[_0xfc0f[20]](function(){return _0xb256x10[_0xfc0f[34]](204)})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[81]]=function(_0xb256xf,_0xb256x10){var _0xb256x21={};_0xb256x21[_0xb256xf[_0xfc0f[36]][_0xfc0f[82]]]=_0xb256xf[_0xfc0f[32]][_0xfc0f[83]];return User[_0xfc0f[23]]({where:_0xb256x21})[_0xfc0f[20]](function(_0xb256x13){if(_0xb256x13[_0xfc0f[84]]){return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]]({isValid:false,value:_0xb256xf[_0xfc0f[32]][_0xfc0f[83]]})};return _0xb256x10[_0xfc0f[19]](200)[_0xfc0f[18]]({isValid:true,value:_0xb256xf[_0xfc0f[32]][_0xfc0f[83]]})})[_0xfc0f[17]](function(_0xb256x12){return handleError(_0xb256x10,_0xb256x12)})};exports[_0xfc0f[85]]=function(_0xb256xf,_0xb256x10,_0xb256x11){_0xb256x10[_0xfc0f[87]](_0xfc0f[86])};function handleError(_0xb256x10,_0xb256x12){return _0xb256x10[_0xfc0f[19]](500)[_0xfc0f[18]](_0xb256x12)}
\ No newline at end of file
+'use strict';
+
+var User = require('../../models').User;
+var Module = require('../../models').Module;
+var sequelize = require('../../models').sequelize;
+
+var config = require('../../config/environment');
+var Util = require('../../config/util');
+
+var passport = require('passport');
+var moment = require('moment');
+var jwt = require('jsonwebtoken');
+var uploadFile = require('upload-file');
+var path = require('path');
+var fs = require('fs');
+var _ = require('lodash');
+var util = require('util');
+var sr = require('simple-random');
+
+/**
+ * Get list of admin/user
+ */
+exports.index = function(req, res, next) {
+  return User
+    .scope('user')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Get list of admin/user/user
+ */
+exports.getUsers = function(req, res, next) {
+  return User
+    .findAll({
+      where: {
+        role: {
+          $in: ['admin', 'user', 'user']
+        }
+      }
+    })
+    .then(function(users) {
+      return res.status(200).send(users);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Creates a new user
+ */
+exports.create = function(req, res, next) {
+  return User
+    .create(req.body)
+    .then(function(user) {
+      return res.status(201).send(user);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      return Util.errorManager.handleUniqueConstraintError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Get a single user
+ */
+exports.show = function(req, res, next) {
+  return User
+    .findById(req.params.id)
+    .then(function(user) {
+      if (!user) {
+        return res.sendStatus(404);
+      }
+
+      return res.status(200).send(user);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Deletes a user
+ */
+exports.destroy = function(req, res, next) {
+  var userId = req.params.id;
+  var _user;
+
+  return User
+    .findById(userId)
+    .then(function(user) {
+      _user = user;
+      if (!user) {
+        return res.sendStatus(404);
+      }
+      return user
+        .destroy();
+    })
+    .then(function(user) {
+      return res.status(200).send(user);
+    })
+    .catch(sequelize.ForeignKeyConstraintError, function(err) {
+      return Util.errorManager.handleForeignKeyConstraintError(res, 'user', _user.name, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Change a user password
+ */
+exports.changePassword = function(req, res, next) {
+  var userId = req.user.id;
+  var oldPass = String(req.body.oldPassword);
+  var newPass = String(req.body.newPassword);
+
+  return User
+    .findById(userId)
+    .then(function(user) {
+      if (user.authenticate(oldPass)) {
+        user.password = newPass;
+        user.save()
+          .then(function() {
+            return res.sendStatus(200);
+          })
+          .catch(function(err) {
+            return handleError(res, err);
+          });
+      } else {
+        return res.sendStatus(403);
+      }
+    });
+};
+
+/**
+ * Change a user password by admin
+ */
+exports.resetPassword = function(req, res, next) {
+  var newPass = String(req.body.newPassword);
+  return User
+    .findById(req.params.id)
+    .then(function(user) {
+      user.password = newPass;
+      return user
+        .save();
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Change the avatar of the user
+ */
+exports.changeAvatar = function(req, res, next) {
+
+  var upload = new uploadFile({
+    dest: path.join(config.root, 'server', 'files', 'images'),
+    maxNumberOfFiles: 1,
+    minNumberOfFiles: 0,
+    acceptFileTypes: /(\.|\/)(jpeg|png)$/i,
+    rename: function(name, file) {
+      return sr() + path.extname(file.filename);
+    },
+    messages: {
+      maxNumberOfFiles: "Max number of files upload exceeded",
+      acceptFileTypes: "Only jpeg and png format accepted",
+      invalidRequest: "Invalid request"
+    }
+  });
+
+  upload.on('end', function(fields, files) {
+    if (!files.file.filename) {
+      return res.status(500).send(upload);
+    }
+
+    return User
+      .findById(req.params.id)
+      .then(function(user) {
+        if (!user) {
+          return res.sendStatus(404);
+        }
+
+        return user
+          .update({
+            userpic: files.file.filename
+          });
+      })
+      .then(function(user) {
+        return res.status(200).send(user);
+      })
+      .catch(function(err) {
+        return handleError(res, err);
+      });
+  });
+
+  upload.on('error', function(err) {
+    console.log('********** Upload error :', err)
+    return handleError(res, err);
+  });
+
+  upload.parse(req);
+};
+
+
+/**
+ * Get my info
+ */
+exports.me = function(req, res, next) {
+  var userId = req.user.id;
+
+  return User
+    .findOne({
+      where: {
+        id: userId
+      },
+      attributes: ['id', 'fullname', 'name', 'email', 'role', 'userpic'],
+      include: [Module]
+    })
+    .then(function(user) {
+      if (!user) {
+        return res.sendStatus(401);
+      }
+      return res.status(200).send(user);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Update my user
+ */
+exports.update = function(req, res, next) {
+  var userId = req.user.id;
+  delete req.body.password;
+
+  return User
+    .findById(req.params.id)
+    .then(function(user) {
+      if (!user) {
+        return res.sendStatus(500);
+      }
+      return user
+        .update(req.body);
+    })
+    .then(function(user) {
+      return res.status(200).send(user);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+/**
+ * Get my avatar
+ */
+exports.getAvatar = function(req, res, next) {
+  var imgPath = path.join(config.root, 'server', 'files', 'images', req.params.filename);
+
+  fs.exists(imgPath, function(exists) {
+    if (!exists) {
+      imgPath = path.join(config.root, 'server', 'files', 'images', 'userpic.png');
+    }
+
+    return res.sendFile(imgPath);
+  });
+};
+
+/**
+ * Get my avatar by id
+ */
+exports.getAvatarById = function(req, res, next) {
+  if (req.params.id === 'visitor') {
+    var imgPath = path.join(config.root, 'server', 'files', 'images', 'customer.png');
+
+    fs.exists(imgPath, function(exists) {
+      return res.sendFile(imgPath);
+    });
+
+  } else {
+    return User
+      .findById(req.params.id)
+      .then(function(user) {
+        if (user) {
+          var imgPath = path.join(config.root, 'server', 'files', 'images', user.userpic ? user.userpic : 'userpic.png');
+
+          fs.exists(imgPath, function(exists) {
+            if (!exists) {
+              imgPath = path.join(config.root, 'server', 'files', 'images', 'userpic.png');
+            }
+
+            return res.sendFile(imgPath);
+          });
+        } else {
+          return res.sendStatus(500);
+        }
+      })
+      .catch(function(err) {
+        return handleError(res, err);
+      });
+  }
+};
+
+// Deletes a user from the DB.
+exports.bulkDestroy = function(req, res) {
+  return User
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.userValidation = function(req, res) {
+  var where = {};
+  where[req.params.field] = req.body.value;
+
+  return User
+    .findAndCountAll({
+      where: where
+    })
+    .then(function(result) {
+      if (result.count) {
+        return res.status(200).send({
+          isValid: false,
+          value: req.body.value
+        });
+      }
+      return res.status(200).send({
+        isValid: true,
+        value: req.body.value
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+
+};
+
+/**
+ * Authentication callback
+ */
+exports.authCallback = function(req, res, next) {
+  res.redirect('/');
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 7acf11c..e1071aa 100644 (file)
@@ -1 +1,31 @@
-var _0xcca1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x3A\x72\x65\x6D\x6F\x76\x65"];_0xcca1[0];var user=require(_0xcca1[2])[_0xcca1[1]];exports[_0xcca1[3]]=function(_0xa5a4x2){user[_0xcca1[4]](function(_0xa5a4x3){onSave(_0xa5a4x2,_0xa5a4x3)});user[_0xcca1[5]](function(_0xa5a4x3){onSave(_0xa5a4x2,_0xa5a4x3)});user[_0xcca1[6]](function(_0xa5a4x3){onRemove(_0xa5a4x2,_0xa5a4x3)})};function onSave(_0xa5a4x2,_0xa5a4x3,_0xa5a4x5){if(_0xa5a4x3[_0xcca1[7]]===_0xcca1[8]){_0xa5a4x2[_0xcca1[10]](_0xcca1[9],_0xa5a4x3)}}function onRemove(_0xa5a4x2,_0xa5a4x3,_0xa5a4x5){if(_0xa5a4x3[_0xcca1[7]]===_0xcca1[8]){_0xa5a4x2[_0xcca1[10]](_0xcca1[11],_0xa5a4x3)}}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var user = require('../../models').User;
+
+exports.register = function(socket) {
+  user.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  user.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  user.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  if (doc.role === 'admin') {
+    socket.emit('user:save', doc);
+  }
+}
+
+function onRemove(socket, doc, cb) {
+  if (doc.role === 'admin') {
+    socket.emit('user:remove', doc);
+  }
+}
index edfe95c..bce94e7 100644 (file)
@@ -1 +1,15 @@
-var _0xd048=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd048[0];var express=require(_0xd048[1]);var controller=require(_0xd048[2]);var router=express.Router();router[_0xd048[5]](_0xd048[3],controller[_0xd048[4]]);router[_0xd048[5]](_0xd048[6],controller[_0xd048[7]]);router[_0xd048[9]](_0xd048[3],controller[_0xd048[8]]);router[_0xd048[11]](_0xd048[6],controller[_0xd048[10]]);router[_0xd048[12]](_0xd048[6],controller[_0xd048[10]]);router[_0xd048[14]](_0xd048[6],controller[_0xd048[13]]);module[_0xd048[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./user_has_chat_queue.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index 86fb102..b399892 100644 (file)
@@ -1 +1,103 @@
-var _0x8385=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x8385[0];var _=require(_0x8385[1]);var UserHasChatQueue=require(_0x8385[3])[_0x8385[2]];exports[_0x8385[4]]=function(_0x5a68x3,_0x5a68x4){UserHasChatQueue[_0x8385[10]](_0x5a68x3[_0x8385[9]]?{where:_0x5a68x3[_0x8385[9]]}:{})[_0x8385[8]](function(_0x5a68x6){return _0x5a68x4[_0x8385[7]](200)[_0x8385[6]](_0x5a68x6)})[_0x8385[5]](function(_0x5a68x5){return handleError(_0x5a68x4,_0x5a68x5)})};exports[_0x8385[11]]=function(_0x5a68x3,_0x5a68x4){UserHasChatQueue[_0x8385[15]](_0x5a68x3[_0x8385[14]][_0x8385[13]])[_0x8385[8]](function(_0x5a68x7){if(!_0x5a68x7){return _0x5a68x4[_0x8385[12]](404)};return _0x5a68x4[_0x8385[6]](_0x5a68x7)})[_0x8385[5]](function(_0x5a68x5){return handleError(_0x5a68x4,_0x5a68x5)})};exports[_0x8385[16]]=function(_0x5a68x3,_0x5a68x4){UserHasChatQueue[_0x8385[16]](_0x5a68x3[_0x8385[17]])[_0x8385[8]](function(_0x5a68x7){return _0x5a68x4[_0x8385[7]](201)[_0x8385[6]](_0x5a68x7)})[_0x8385[5]](function(_0x5a68x5){return handleError(_0x5a68x4,_0x5a68x5)})};exports[_0x8385[18]]=function(_0x5a68x3,_0x5a68x4){if(_0x5a68x3[_0x8385[17]][_0x8385[13]]){delete _0x5a68x3[_0x8385[17]][_0x8385[13]]};UserHasChatQueue[_0x8385[21]]({where:{id:_0x5a68x3[_0x8385[14]][_0x8385[13]]}})[_0x8385[8]](function(_0x5a68x7){if(!_0x5a68x7){return _0x5a68x4[_0x8385[12]](404)};var _0x5a68x8=_[_0x8385[19]](_0x5a68x7,_0x5a68x3[_0x8385[17]]);_0x5a68x8[_0x8385[20]]()[_0x8385[8]](function(){return _0x5a68x4[_0x8385[7]](200)[_0x8385[6]](_0x5a68x7)})[_0x8385[5]](function(_0x5a68x5){return handleError(_0x5a68x4,_0x5a68x5)})})[_0x8385[5]](function(_0x5a68x5){return handleError(_0x5a68x4,_0x5a68x5)})};exports[_0x8385[22]]=function(_0x5a68x3,_0x5a68x4){UserHasChatQueue[_0x8385[21]]({where:{id:_0x5a68x3[_0x8385[14]][_0x8385[13]]}})[_0x8385[8]](function(_0x5a68x7){if(!_0x5a68x7){return _0x5a68x4[_0x8385[12]](404)};_0x5a68x7[_0x8385[22]]()[_0x8385[8]](function(){return _0x5a68x4[_0x8385[12]](204)})[_0x8385[5]](function(_0x5a68x5){return handleError(_0x5a68x4,_0x5a68x5)})})[_0x8385[5]](function(_0x5a68x5){return handleError(_0x5a68x4,_0x5a68x5)})};function handleError(_0x5a68x4,_0x5a68x5){return _0x5a68x4[_0x8385[7]](500)[_0x8385[6]](_0x5a68x5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var UserHasChatQueue = require('../../models').UserHasChatQueue;
+
+// Get list of userHasChatQueues
+exports.index = function(req, res) {
+  UserHasChatQueue
+    .findAll(req.query ? {
+      where: req.query
+    } : {})
+    .then(function(userHasChatQueues) {
+      return res.status(200).send(userHasChatQueues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single userHasChatQueue
+exports.show = function(req, res) {
+  UserHasChatQueue
+    .findById(req.params.id)
+    .then(function(userHasChatQueue) {
+      if (!userHasChatQueue) {
+        return res.sendStatus(404);
+      }
+      return res.send(userHasChatQueue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new userHasChatQueue in the DB.
+exports.create = function(req, res) {
+  UserHasChatQueue
+    .create(req.body)
+    .then(function(userHasChatQueue) {
+      return res.status(201).send(userHasChatQueue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing userHasChatQueue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  UserHasChatQueue
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(userHasChatQueue) {
+      if (!userHasChatQueue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(userHasChatQueue, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(userHasChatQueue);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a userHasChatQueue from the DB.
+exports.destroy = function(req, res) {
+  UserHasChatQueue
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(userHasChatQueue) {
+      if (!userHasChatQueue) {
+        return res.sendStatus(404);
+      }
+      userHasChatQueue.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index dcf7223..882e78a 100644 (file)
@@ -1 +1,24 @@
-var _0x3675=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x3675[0];var UserHasChatQueue=require(_0x3675[2])[_0x3675[1]];exports[_0x3675[3]]=function(_0x6e5cx2){UserHasChatQueue[_0x3675[4]](function(_0x6e5cx3){onSave(_0x6e5cx2,_0x6e5cx3)});UserHasChatQueue[_0x3675[5]](function(_0x6e5cx3){onRemove(_0x6e5cx2,_0x6e5cx3)})};function onSave(_0x6e5cx2,_0x6e5cx3,_0x6e5cx5){_0x6e5cx2[_0x3675[7]](_0x3675[6],_0x6e5cx3)}function onRemove(_0x6e5cx2,_0x6e5cx3,_0x6e5cx5){_0x6e5cx2[_0x3675[7]](_0x3675[8],_0x6e5cx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var UserHasChatQueue = require('../../models').UserHasChatQueue;
+
+exports.register = function(socket) {
+  UserHasChatQueue.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasChatQueue.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('user_has_chat_queue:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('user_has_chat_queue:remove', doc);
+}
index 20e236b..539163a 100644 (file)
@@ -1 +1,20 @@
-var _0x3b68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x67\x65\x74"];_0x3b68[0];var should=require(_0x3b68[1]);var app=require(_0x3b68[2]);var request=require(_0x3b68[3]);describe(_0x3b68[4],function(){it(_0x3b68[5],function(_0xc116x4){request(app)[_0x3b68[13]](_0x3b68[12])[_0x3b68[11]](200)[_0x3b68[11]](_0x3b68[10],/json/)[_0x3b68[9]](function(_0xc116x5,_0xc116x6){if(_0xc116x5){return _0xc116x4(_0xc116x5)};_0xc116x6[_0x3b68[8]][_0x3b68[1]][_0x3b68[7]][_0x3b68[6]](Array);_0xc116x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/chat/user_has_queues', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/chat/user_has_queues')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index a563966..381448d 100644 (file)
@@ -1 +1,16 @@
-var _0x7ddf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x3A\x75\x73\x65\x72\x49\x64\x2F\x3A\x63\x68\x61\x74\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7ddf[0];var express=require(_0x7ddf[1]);var controller=require(_0x7ddf[2]);var auth=require(_0x7ddf[3]);var router=express.Router();router[_0x7ddf[6]](_0x7ddf[4],controller[_0x7ddf[5]]);module[_0x7ddf[7]]=router
\ No newline at end of file
+'use strict';
+
+var express     = require('express');
+var controller  = require('./user_has_chat_room.controller');
+var auth        = require('../../auth/auth.service');
+
+var router = express.Router();
+
+// router.get('/', controller.index);
+// router.get('/:id', controller.show);
+// router.post('/', controller.create);
+router.put('/:userId/:chatRoomId', controller.update);
+// router.patch('/:id', controller.update);
+// router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 2a81529..d747380 100644 (file)
@@ -1 +1,96 @@
-var _0x33be=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x75\x73\x65\x72\x49\x64","\x63\x68\x61\x74\x52\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x33be[0];var _=require(_0x33be[1]);var UserHasChatRoom=require(_0x33be[3])[_0x33be[2]];exports[_0x33be[4]]=function(_0x993bx3,_0x993bx4){UserHasChatRoom[_0x33be[9]]()[_0x33be[8]](function(_0x993bx6){return _0x993bx4[_0x33be[7]](200)[_0x33be[6]](_0x993bx6)})[_0x33be[5]](function(_0x993bx5){return handleError(_0x993bx4,_0x993bx5)})};exports[_0x33be[10]]=function(_0x993bx3,_0x993bx4){UserHasChatRoom[_0x33be[14]](_0x993bx3[_0x33be[13]][_0x33be[12]])[_0x33be[8]](function(_0x993bx7){if(!_0x993bx7){return _0x993bx4[_0x33be[11]](404)};return _0x993bx4[_0x33be[6]](_0x993bx7)})[_0x33be[5]](function(_0x993bx5){return handleError(_0x993bx4,_0x993bx5)})};exports[_0x33be[15]]=function(_0x993bx3,_0x993bx4){UserHasChatRoom[_0x33be[15]](_0x993bx3[_0x33be[16]])[_0x33be[8]](function(_0x993bx7){return _0x993bx4[_0x33be[7]](201)[_0x33be[6]](_0x993bx7)})[_0x33be[5]](function(_0x993bx5){return handleError(_0x993bx4,_0x993bx5)})};exports[_0x33be[17]]=function(_0x993bx3,_0x993bx4){UserHasChatRoom[_0x33be[21]]({where:{UserId:_0x993bx3[_0x33be[13]][_0x33be[19]],ChatRoomId:_0x993bx3[_0x33be[13]][_0x33be[20]]},limit:1})[_0x33be[8]](function(_0x993bx7){if(!_0x993bx7){return _0x993bx4[_0x33be[11]](404)};_0x993bx7[_0x33be[18]](_0x993bx3[_0x33be[16]])[_0x33be[8]](function(){return _0x993bx4[_0x33be[7]](200)[_0x33be[6]](_0x993bx7)})[_0x33be[5]](function(_0x993bx5){return handleError(_0x993bx4,_0x993bx5)})})[_0x33be[5]](function(_0x993bx5){return handleError(_0x993bx4,_0x993bx5)})};exports[_0x33be[22]]=function(_0x993bx3,_0x993bx4){UserHasChatRoom[_0x33be[14]](_0x993bx3[_0x33be[13]][_0x33be[12]])[_0x33be[8]](function(_0x993bx7){if(!_0x993bx7){return _0x993bx4[_0x33be[11]](404)};_0x993bx7[_0x33be[22]]()[_0x33be[8]](function(){return _0x993bx4[_0x33be[11]](204)})[_0x33be[5]](function(_0x993bx5){return handleError(_0x993bx4,_0x993bx5)})})[_0x33be[5]](function(_0x993bx5){return handleError(_0x993bx4,_0x993bx5)})};function handleError(_0x993bx4,_0x993bx5){return _0x993bx4[_0x33be[7]](500)[_0x33be[6]](_0x993bx5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var UserHasChatRoom = require('../../models').UserHasChatRoom;
+
+// Get list of user_has_chat_rooms
+exports.index = function(req, res) {
+  UserHasChatRoom
+  .findAll()
+  .then(function (user_has_chat_rooms) {
+    return res.status(200).send(user_has_chat_rooms);
+  })
+  .catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+// Get a single user_has_chat_room
+exports.show = function(req, res) {
+  UserHasChatRoom
+  .findById(req.params.id)
+  .then(function (user_has_chat_room) {
+    if(!user_has_chat_room) { return res.sendStatus(404); }
+    return res.send(user_has_chat_room);
+  })
+  .catch(function(err){
+    return handleError(res, err);
+  });
+};
+
+// Creates a new user_has_chat_room in the DB.
+exports.create = function(req, res) {
+
+  UserHasChatRoom
+    .create(req.body)
+    .then(function(user_has_chat_room) {
+      return res.status(201).send(user_has_chat_room);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing user_has_chat_room in the DB.
+exports.update = function(req, res) {
+
+  UserHasChatRoom
+    .findOne({
+      where: {
+        UserId: req.params.userId,
+        ChatRoomId: req.params.chatRoomId
+      },
+      limit: 1
+    })
+    .then(function (user_has_chat_room) {
+      if (!user_has_chat_room) {
+        return res.sendStatus(404);
+      }
+
+      user_has_chat_room
+        .updateAttributes(req.body)
+        .then(function () {
+          return res.status(200).send(user_has_chat_room);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a user_has_chat_room from the DB.
+exports.destroy = function(req, res) {
+
+  UserHasChatRoom
+  .findById(req.params.id)
+  .then(function (user_has_chat_room) {
+    if(!user_has_chat_room) { return res.sendStatus(404); }
+    user_has_chat_room.destroy()
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+  })
+  .catch(function(err) {
+    return handleError(res, err);
+  });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 4c8a54e..e0be09b 100644 (file)
@@ -1 +1,66 @@
-var _0x5570=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x64","\x6D\x61\x70","\x75\x73\x65\x72\x49\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x65\x6D\x61\x69\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0x5570[0];var _=require(_0x5570[1]);var User=require(_0x5570[3])[_0x5570[2]];var ChatRoom=require(_0x5570[3])[_0x5570[4]];var ChatVisitor=require(_0x5570[3])[_0x5570[5]];var ChatMessage=require(_0x5570[3])[_0x5570[6]];var UserHasChatRoom=require(_0x5570[3])[_0x5570[7]];exports[_0x5570[8]]=function(_0x7abbx7){UserHasChatRoom[_0x5570[9]](function(_0x7abbx8){onSave(_0x7abbx7,_0x7abbx8)});UserHasChatRoom[_0x5570[10]](function(_0x7abbx8){onRemove(_0x7abbx7,_0x7abbx8)})};function onSave(_0x7abbx7,_0x7abbx8){var _0x7abbxa;return ChatRoom[_0x5570[24]](_0x7abbx8.ChatRoomId,{include:[{model:ChatVisitor,attributes:[_0x5570[13],_0x5570[21],_0x5570[22]]},{model:User,attributes:[_0x5570[13],_0x5570[21],_0x5570[23],_0x5570[22]]},{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x5570[13],_0x5570[21],_0x5570[22]]},{model:User,attributes:[_0x5570[13],_0x5570[21],_0x5570[23],_0x5570[22]]}]}]})[_0x5570[20]](function(_0x7abbxc){_0x7abbxa=_0x7abbxc;var _0x7abbxd=_[_0x5570[14]](_0x7abbxa.Users,_0x5570[13]);_0x7abbxd[_0x5570[19]](function(_0x7abbxe){if(_0x7abbx7[_0x5570[15]]==_0x7abbxe){_0x7abbx7[_0x5570[18]](_0x5570[16],_0x7abbxa[_0x5570[17]])}});return})[_0x5570[12]](function(_0x7abbxb){console[_0x5570[11]](_0x7abbxb)})}function onRemove(_0x7abbx7,_0x7abbx8){_0x7abbx7[_0x5570[18]](_0x5570[25],_0x7abbx8)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+var _ = require('lodash');
+var User = require('../../models').User;
+var ChatRoom = require('../../models').ChatRoom;
+var ChatVisitor = require('../../models').ChatVisitor;
+var ChatMessage = require('../../models').ChatMessage;
+var UserHasChatRoom = require('../../models').UserHasChatRoom;
+
+exports.register = function(socket) {
+  UserHasChatRoom.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasChatRoom.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc) {
+
+  var _chatRoom;
+
+  return ChatRoom
+    .findById(doc.ChatRoomId, {
+      include: [{
+        model: ChatVisitor,
+        attributes: ['id', 'email', 'fullname']
+      }, {
+        model: User,
+        attributes: ['id', 'email', 'name', 'fullname']
+      }, {
+        model: ChatMessage,
+        include: [{
+          model: ChatVisitor,
+          attributes: ['id', 'email', 'fullname']
+        }, {
+          model: User,
+          attributes: ['id', 'email', 'name', 'fullname']
+        }]
+      }]
+    })
+    .then(function(chatRoom) {
+      _chatRoom = chatRoom;
+      // _chatRoom.dataValues.ChatMessages = [];
+
+      var ids = _.map(_chatRoom.Users, 'id');
+
+      ids.forEach(function(id) {
+        if (socket.userId == id) {
+          socket.emit('user_has_chat_room:save', _chatRoom.dataValues)
+        }
+      });
+
+      return;
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onRemove(socket, doc) {
+  socket.emit('user_has_chat_room:remove', doc);
+}
index b4bf038..b33382a 100644 (file)
@@ -1 +1,20 @@
-var _0x7b3d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x72\x6F\x6F\x6D\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x72\x6F\x6F\x6D\x73","\x67\x65\x74"];_0x7b3d[0];var should=require(_0x7b3d[1]);var app=require(_0x7b3d[2]);var request=require(_0x7b3d[3]);describe(_0x7b3d[4],function(){it(_0x7b3d[5],function(_0x541cx4){request(app)[_0x7b3d[13]](_0x7b3d[12])[_0x7b3d[11]](200)[_0x7b3d[11]](_0x7b3d[10],/json/)[_0x7b3d[9]](function(_0x541cx5,_0x541cx6){if(_0x541cx5){return _0x541cx4(_0x541cx5)};_0x541cx6[_0x7b3d[8]][_0x7b3d[1]][_0x7b3d[7]][_0x7b3d[6]](Array);_0x541cx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/chat/user_has_rooms', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/chat/user_has_rooms')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 088a8b1..5805e3d 100644 (file)
@@ -1 +1,15 @@
-var _0xfa20=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xfa20[0];var express=require(_0xfa20[1]);var controller=require(_0xfa20[2]);var router=express.Router();router[_0xfa20[5]](_0xfa20[3],controller[_0xfa20[4]]);router[_0xfa20[5]](_0xfa20[6],controller[_0xfa20[7]]);router[_0xfa20[9]](_0xfa20[3],controller[_0xfa20[8]]);router[_0xfa20[11]](_0xfa20[6],controller[_0xfa20[10]]);router[_0xfa20[12]](_0xfa20[6],controller[_0xfa20[10]]);router[_0xfa20[14]](_0xfa20[6],controller[_0xfa20[13]]);module[_0xfa20[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./user_has_fax_queue.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index 9007003..f92e570 100644 (file)
@@ -1 +1,103 @@
-var _0xe1c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0xe1c4[0];var _=require(_0xe1c4[1]);var UserHasFaxQueue=require(_0xe1c4[3])[_0xe1c4[2]];exports[_0xe1c4[4]]=function(_0x29dax3,_0x29dax4){UserHasFaxQueue[_0xe1c4[10]](_0x29dax3[_0xe1c4[9]]?{where:_0x29dax3[_0xe1c4[9]]}:{})[_0xe1c4[8]](function(_0x29dax6){return _0x29dax4[_0xe1c4[7]](200)[_0xe1c4[6]](_0x29dax6)})[_0xe1c4[5]](function(_0x29dax5){return handleError(_0x29dax4,_0x29dax5)})};exports[_0xe1c4[11]]=function(_0x29dax3,_0x29dax4){UserHasFaxQueue[_0xe1c4[15]](_0x29dax3[_0xe1c4[14]][_0xe1c4[13]])[_0xe1c4[8]](function(_0x29dax7){if(!_0x29dax7){return _0x29dax4[_0xe1c4[12]](404)};return _0x29dax4[_0xe1c4[6]](_0x29dax7)})[_0xe1c4[5]](function(_0x29dax5){return handleError(_0x29dax4,_0x29dax5)})};exports[_0xe1c4[16]]=function(_0x29dax3,_0x29dax4){UserHasFaxQueue[_0xe1c4[16]](_0x29dax3[_0xe1c4[17]])[_0xe1c4[8]](function(_0x29dax7){return _0x29dax4[_0xe1c4[7]](201)[_0xe1c4[6]](_0x29dax7)})[_0xe1c4[5]](function(_0x29dax5){return handleError(_0x29dax4,_0x29dax5)})};exports[_0xe1c4[18]]=function(_0x29dax3,_0x29dax4){if(_0x29dax3[_0xe1c4[17]][_0xe1c4[13]]){delete _0x29dax3[_0xe1c4[17]][_0xe1c4[13]]};UserHasFaxQueue[_0xe1c4[21]]({where:{id:_0x29dax3[_0xe1c4[14]][_0xe1c4[13]]}})[_0xe1c4[8]](function(_0x29dax7){if(!_0x29dax7){return _0x29dax4[_0xe1c4[12]](404)};var _0x29dax8=_[_0xe1c4[19]](_0x29dax7,_0x29dax3[_0xe1c4[17]]);_0x29dax8[_0xe1c4[20]]()[_0xe1c4[8]](function(){return _0x29dax4[_0xe1c4[7]](200)[_0xe1c4[6]](_0x29dax7)})[_0xe1c4[5]](function(_0x29dax5){return handleError(_0x29dax4,_0x29dax5)})})[_0xe1c4[5]](function(_0x29dax5){return handleError(_0x29dax4,_0x29dax5)})};exports[_0xe1c4[22]]=function(_0x29dax3,_0x29dax4){UserHasFaxQueue[_0xe1c4[21]]({where:{id:_0x29dax3[_0xe1c4[14]][_0xe1c4[13]]}})[_0xe1c4[8]](function(_0x29dax7){if(!_0x29dax7){return _0x29dax4[_0xe1c4[12]](404)};_0x29dax7[_0xe1c4[22]]()[_0xe1c4[8]](function(){return _0x29dax4[_0xe1c4[12]](204)})[_0xe1c4[5]](function(_0x29dax5){return handleError(_0x29dax4,_0x29dax5)})})[_0xe1c4[5]](function(_0x29dax5){return handleError(_0x29dax4,_0x29dax5)})};function handleError(_0x29dax4,_0x29dax5){return _0x29dax4[_0xe1c4[7]](500)[_0xe1c4[6]](_0x29dax5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var UserHasFaxQueue = require('../../models').UserHasFaxQueue;
+
+// Get list of user_has_fax_queues
+exports.index = function(req, res) {
+  UserHasFaxQueue
+    .findAll(req.query ? {
+      where: req.query
+    } : {})
+    .then(function(user_has_fax_queues) {
+      return res.status(200).send(user_has_fax_queues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single user_has_fax_queue
+exports.show = function(req, res) {
+  UserHasFaxQueue
+    .findById(req.params.id)
+    .then(function(user_has_fax_queue) {
+      if (!user_has_fax_queue) {
+        return res.sendStatus(404);
+      }
+      return res.send(user_has_fax_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new user_has_fax_queue in the DB.
+exports.create = function(req, res) {
+  UserHasFaxQueue
+    .create(req.body)
+    .then(function(user_has_fax_queue) {
+      return res.status(201).send(user_has_fax_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing user_has_fax_queue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  UserHasFaxQueue
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(user_has_fax_queue) {
+      if (!user_has_fax_queue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(user_has_fax_queue, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(user_has_fax_queue);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a user_has_fax_queue from the DB.
+exports.destroy = function(req, res) {
+  UserHasFaxQueue
+    .find({
+      where: {
+        id: req.params.id
+      }
+    })
+    .then(function(user_has_fax_queue) {
+      if (!user_has_fax_queue) {
+        return res.sendStatus(404);
+      }
+      user_has_fax_queue.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 76a7640..4b0602a 100644 (file)
@@ -1 +1,30 @@
-var _0x882d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x882d[0];var UserHasFaxQueue=require(_0x882d[2])[_0x882d[1]];exports[_0x882d[3]]=function(_0xefe4x2){UserHasFaxQueue[_0x882d[4]](function(_0xefe4x3){onSave(_0xefe4x2,_0xefe4x3)});UserHasFaxQueue[_0x882d[5]](function(_0xefe4x3){onRemove(_0xefe4x2,_0xefe4x3)});UserHasFaxQueue[_0x882d[6]](function(_0xefe4x3){onSave(_0xefe4x2,_0xefe4x3)});UserHasFaxQueue[_0x882d[7]](function(_0xefe4x3){onRemove(_0xefe4x2,_0xefe4x3)})};function onSave(_0xefe4x2,_0xefe4x3,_0xefe4x5){_0xefe4x2[_0x882d[9]](_0x882d[8],_0xefe4x3)}function onRemove(_0xefe4x2,_0xefe4x3,_0xefe4x5){_0xefe4x2[_0x882d[9]](_0x882d[10],_0xefe4x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var UserHasFaxQueue = require('../../models').UserHasFaxQueue;
+
+exports.register = function(socket) {
+  UserHasFaxQueue.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasFaxQueue.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+  UserHasFaxQueue.afterBulkCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasFaxQueue.afterBulkDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('user_has_fax_queue:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('user_has_fax_queue:remove', doc);
+}
index f9610dd..992672c 100644 (file)
@@ -1 +1,20 @@
-var _0xc948=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x67\x65\x74"];_0xc948[0];var should=require(_0xc948[1]);var app=require(_0xc948[2]);var request=require(_0xc948[3]);describe(_0xc948[4],function(){it(_0xc948[5],function(_0xe574x4){request(app)[_0xc948[13]](_0xc948[12])[_0xc948[11]](200)[_0xc948[11]](_0xc948[10],/json/)[_0xc948[9]](function(_0xe574x5,_0xe574x6){if(_0xe574x5){return _0xe574x4(_0xe574x5)};_0xe574x6[_0xc948[8]][_0xc948[1]][_0xc948[7]][_0xc948[6]](Array);_0xe574x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/fax/user_has_queues', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/fax/user_has_queues')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 52e08d0..50b083e 100644 (file)
@@ -1 +1,15 @@
-var _0xa394=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa394[0];var express=require(_0xa394[1]);var controller=require(_0xa394[2]);var router=express.Router();router[_0xa394[5]](_0xa394[3],controller[_0xa394[4]]);router[_0xa394[5]](_0xa394[6],controller[_0xa394[7]]);router[_0xa394[9]](_0xa394[3],controller[_0xa394[8]]);router[_0xa394[11]](_0xa394[6],controller[_0xa394[10]]);router[_0xa394[12]](_0xa394[6],controller[_0xa394[10]]);router[_0xa394[14]](_0xa394[6],controller[_0xa394[13]]);module[_0xa394[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./user_has_mail_queue.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index bd4faac..c15bc9d 100644 (file)
@@ -1 +1,95 @@
-var _0x7245=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x7245[0];var _=require(_0x7245[1]);var UserHasMailQueue=require(_0x7245[3])[_0x7245[2]];exports[_0x7245[4]]=function(_0x35c2x3,_0x35c2x4){UserHasMailQueue[_0x7245[10]](_0x35c2x3[_0x7245[9]]?{where:_0x35c2x3[_0x7245[9]]}:{})[_0x7245[8]](function(_0x35c2x6){return _0x35c2x4[_0x7245[7]](200)[_0x7245[6]](_0x35c2x6)})[_0x7245[5]](function(_0x35c2x5){return handleError(_0x35c2x4,_0x35c2x5)})};exports[_0x7245[11]]=function(_0x35c2x3,_0x35c2x4){UserHasMailQueue[_0x7245[15]](_0x35c2x3[_0x7245[14]][_0x7245[13]])[_0x7245[8]](function(_0x35c2x7){if(!_0x35c2x7){return _0x35c2x4[_0x7245[12]](404)};return _0x35c2x4[_0x7245[6]](_0x35c2x7)})[_0x7245[5]](function(_0x35c2x5){return handleError(_0x35c2x4,_0x35c2x5)})};exports[_0x7245[16]]=function(_0x35c2x3,_0x35c2x4){UserHasMailQueue[_0x7245[16]](_0x35c2x3[_0x7245[17]])[_0x7245[8]](function(_0x35c2x7){return _0x35c2x4[_0x7245[7]](201)[_0x7245[6]](_0x35c2x7)})[_0x7245[5]](function(_0x35c2x5){return handleError(_0x35c2x4,_0x35c2x5)})};exports[_0x7245[18]]=function(_0x35c2x3,_0x35c2x4){if(_0x35c2x3[_0x7245[17]][_0x7245[13]]){delete _0x35c2x3[_0x7245[17]][_0x7245[13]]};UserHasMailQueue[_0x7245[15]](_0x35c2x3[_0x7245[14]][_0x7245[13]])[_0x7245[8]](function(_0x35c2x7){if(!_0x35c2x7){return _0x35c2x4[_0x7245[12]](404)};var _0x35c2x8=_[_0x7245[19]](_0x35c2x7,_0x35c2x3[_0x7245[17]]);_0x35c2x8[_0x7245[20]]()[_0x7245[8]](function(){return _0x35c2x4[_0x7245[7]](200)[_0x7245[6]](_0x35c2x7)})[_0x7245[5]](function(_0x35c2x5){return handleError(_0x35c2x4,_0x35c2x5)})})[_0x7245[5]](function(_0x35c2x5){return handleError(_0x35c2x4,_0x35c2x5)})};exports[_0x7245[21]]=function(_0x35c2x3,_0x35c2x4){UserHasMailQueue[_0x7245[15]](_0x35c2x3[_0x7245[14]][_0x7245[13]])[_0x7245[8]](function(_0x35c2x7){if(!_0x35c2x7){return _0x35c2x4[_0x7245[12]](404)};_0x35c2x7[_0x7245[21]]()[_0x7245[8]](function(){return _0x35c2x4[_0x7245[12]](204)})[_0x7245[5]](function(_0x35c2x5){return handleError(_0x35c2x4,_0x35c2x5)})})[_0x7245[5]](function(_0x35c2x5){return handleError(_0x35c2x4,_0x35c2x5)})};function handleError(_0x35c2x4,_0x35c2x5){return _0x35c2x4[_0x7245[7]](500)[_0x7245[6]](_0x35c2x5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var UserHasMailQueue = require('../../models').UserHasMailQueue;
+
+// Get list of user_has_mail_queues
+exports.index = function(req, res) {
+  UserHasMailQueue
+    .findAll(req.query ? {
+      where: req.query
+    } : {})
+    .then(function(user_has_mail_queues) {
+      return res.status(200).send(user_has_mail_queues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single user_has_mail_queue
+exports.show = function(req, res) {
+  UserHasMailQueue
+    .findById(req.params.id)
+    .then(function(user_has_mail_queue) {
+      if (!user_has_mail_queue) {
+        return res.sendStatus(404);
+      }
+      return res.send(user_has_mail_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new user_has_mail_queue in the DB.
+exports.create = function(req, res) {
+  UserHasMailQueue
+    .create(req.body)
+    .then(function(user_has_mail_queue) {
+      return res.status(201).send(user_has_mail_queue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing user_has_mail_queue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  UserHasMailQueue
+    .findById(req.params.id)
+    .then(function(user_has_mail_queue) {
+      if (!user_has_mail_queue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(user_has_mail_queue, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(user_has_mail_queue);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a user_has_mail_queue from the DB.
+exports.destroy = function(req, res) {
+  UserHasMailQueue
+    .findById(req.params.id)
+    .then(function(user_has_mail_queue) {
+      if (!user_has_mail_queue) {
+        return res.sendStatus(404);
+      }
+      user_has_mail_queue.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 5508fc7..bea513c 100644 (file)
@@ -1 +1,24 @@
-var _0x5949=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x5949[0];var UserHasMailQueue=require(_0x5949[2])[_0x5949[1]];exports[_0x5949[3]]=function(_0x4a54x2){UserHasMailQueue[_0x5949[4]](function(_0x4a54x3){onSave(_0x4a54x2,_0x4a54x3)});UserHasMailQueue[_0x5949[5]](function(_0x4a54x3){onRemove(_0x4a54x2,_0x4a54x3)})};function onSave(_0x4a54x2,_0x4a54x3,_0x4a54x5){_0x4a54x2[_0x5949[7]](_0x5949[6],_0x4a54x3)}function onRemove(_0x4a54x2,_0x4a54x3,_0x4a54x5){_0x4a54x2[_0x5949[7]](_0x5949[8],_0x4a54x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var UserHasMailQueue = require('../../models').UserHasMailQueue;
+
+exports.register = function(socket) {
+  UserHasMailQueue.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasMailQueue.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('user_has_mail_queue:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('user_has_mail_queue:remove', doc);
+}
index 278d7e8..1e7edf7 100644 (file)
@@ -1 +1,15 @@
-var _0x3965=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3965[0];var express=require(_0x3965[1]);var controller=require(_0x3965[2]);var router=express.Router();router[_0x3965[5]](_0x3965[3],controller[_0x3965[4]]);router[_0x3965[5]](_0x3965[6],controller[_0x3965[7]]);router[_0x3965[9]](_0x3965[3],controller[_0x3965[8]]);router[_0x3965[11]](_0x3965[6],controller[_0x3965[10]]);router[_0x3965[12]](_0x3965[6],controller[_0x3965[10]]);router[_0x3965[14]](_0x3965[6],controller[_0x3965[13]]);module[_0x3965[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./user_has_service.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index f40de17..377090e 100644 (file)
@@ -1 +1,98 @@
-var _0x1882=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x53\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x1882[0];var _=require(_0x1882[1]);var UserHasService=require(_0x1882[3])[_0x1882[2]];exports[_0x1882[4]]=function(_0x6073x3,_0x6073x4){UserHasService[_0x1882[10]](_0x6073x3[_0x1882[9]]?{where:_0x6073x3[_0x1882[9]]}:{})[_0x1882[8]](function(_0x6073x6){return _0x6073x4[_0x1882[7]](200)[_0x1882[6]](_0x6073x6)})[_0x1882[5]](function(_0x6073x5){return handleError(_0x6073x4,_0x6073x5)})};exports[_0x1882[11]]=function(_0x6073x3,_0x6073x4){UserHasService[_0x1882[15]](_0x6073x3[_0x1882[14]][_0x1882[13]])[_0x1882[8]](function(_0x6073x7){if(!_0x6073x7){return _0x6073x4[_0x1882[12]](404)};return _0x6073x4[_0x1882[6]](_0x6073x7)})[_0x1882[5]](function(_0x6073x5){return handleError(_0x6073x4,_0x6073x5)})};exports[_0x1882[16]]=function(_0x6073x3,_0x6073x4,_0x6073x8){console[_0x1882[18]](_0x6073x3[_0x1882[17]]);UserHasService[_0x1882[16]](_0x6073x3[_0x1882[17]])[_0x1882[8]](function(_0x6073x7){return _0x6073x4[_0x1882[7]](201)[_0x1882[6]](_0x6073x7)})[_0x1882[5]](function(_0x6073x5){console[_0x1882[19]](_0x6073x5);return _0x6073x8(_0x6073x5)})};exports[_0x1882[20]]=function(_0x6073x3,_0x6073x4){if(_0x6073x3[_0x1882[17]][_0x1882[13]]){delete _0x6073x3[_0x1882[17]][_0x1882[13]]};UserHasService[_0x1882[15]](_0x6073x3[_0x1882[14]][_0x1882[13]])[_0x1882[8]](function(_0x6073x7){if(!_0x6073x7){return _0x6073x4[_0x1882[12]](404)};var _0x6073x9=_[_0x1882[21]](_0x6073x7,_0x6073x3[_0x1882[17]]);_0x6073x9[_0x1882[22]]()[_0x1882[8]](function(){return _0x6073x4[_0x1882[7]](200)[_0x1882[6]](_0x6073x7)})[_0x1882[5]](function(_0x6073x5){return handleError(_0x6073x4,_0x6073x5)})})[_0x1882[5]](function(_0x6073x5){return handleError(_0x6073x4,_0x6073x5)})};exports[_0x1882[23]]=function(_0x6073x3,_0x6073x4){UserHasService[_0x1882[15]](_0x6073x3[_0x1882[14]][_0x1882[13]])[_0x1882[8]](function(_0x6073x7){if(!_0x6073x7){return _0x6073x4[_0x1882[12]](404)};_0x6073x7[_0x1882[23]]()[_0x1882[8]](function(){return _0x6073x4[_0x1882[12]](204)})[_0x1882[5]](function(_0x6073x5){return handleError(_0x6073x4,_0x6073x5)})})[_0x1882[5]](function(_0x6073x5){return handleError(_0x6073x4,_0x6073x5)})};function handleError(_0x6073x4,_0x6073x5){return _0x6073x4[_0x1882[7]](500)[_0x1882[6]](_0x6073x5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var UserHasService = require('../../models').UserHasService;
+
+// Get list of user_has_voice_queues
+exports.index = function(req, res) {
+  UserHasService
+    .findAll(req.query ? {
+      where: req.query
+    } : {})
+    .then(function(user_has_voice_queues) {
+      return res.status(200).send(user_has_voice_queues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single userHasService
+exports.show = function(req, res) {
+  UserHasService
+    .findById(req.params.id)
+    .then(function(userHasService) {
+      if (!userHasService) {
+        return res.sendStatus(404);
+      }
+      return res.send(userHasService);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new userHasService in the DB.
+exports.create = function(req, res, next) {
+  console.log(req.body);
+  UserHasService
+    .create(req.body)
+    .then(function(userHasService) {
+      return res.status(201).send(userHasService);
+    })
+    .catch(function(err) {
+      console.error(err);
+      return next(err);
+      // return handleError(res, err);
+    });
+};
+
+// Updates an existing userHasService in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  UserHasService
+    .findById(req.params.id)
+    .then(function(userHasService) {
+      if (!userHasService) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(userHasService, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(userHasService);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a userHasService from the DB.
+exports.destroy = function(req, res) {
+  UserHasService
+    .findById(req.params.id)
+    .then(function(userHasService) {
+      if (!userHasService) {
+        return res.sendStatus(404);
+      }
+      userHasService.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index e6dc664..816d536 100644 (file)
@@ -1 +1,27 @@
-var _0x5818=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x53\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x5818[0];var UserHasService=require(_0x5818[2])[_0x5818[1]];exports[_0x5818[3]]=function(_0xdd0bx2){UserHasService[_0x5818[4]](function(_0xdd0bx3){onSave(_0xdd0bx2,_0xdd0bx3)});UserHasService[_0x5818[5]](function(_0xdd0bx3){onSave(_0xdd0bx2,_0xdd0bx3)});UserHasService[_0x5818[6]](function(_0xdd0bx3){onRemove(_0xdd0bx2,_0xdd0bx3)})};function onSave(_0xdd0bx2,_0xdd0bx3,_0xdd0bx5){_0xdd0bx2[_0x5818[8]](_0x5818[7],_0xdd0bx3)}function onRemove(_0xdd0bx2,_0xdd0bx3,_0xdd0bx5){_0xdd0bx2[_0x5818[8]](_0x5818[9],_0xdd0bx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var UserHasService = require('../../models').UserHasService;
+
+exports.register = function(socket) {
+  UserHasService.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasService.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasService.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('user_has_service:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('user_has_service:remove', doc);
+}
index 3aad89f..0822ab1 100644 (file)
@@ -1 +1,20 @@
-var _0xffbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65","\x67\x65\x74"];_0xffbc[0];var should=require(_0xffbc[1]);var app=require(_0xffbc[2]);var request=require(_0xffbc[3]);describe(_0xffbc[4],function(){it(_0xffbc[5],function(_0xa9a2x4){request(app)[_0xffbc[13]](_0xffbc[12])[_0xffbc[11]](200)[_0xffbc[11]](_0xffbc[10],/json/)[_0xffbc[9]](function(_0xa9a2x5,_0xa9a2x6){if(_0xa9a2x5){return _0xa9a2x4(_0xa9a2x5)};_0xa9a2x6[_0xffbc[8]][_0xffbc[1]][_0xffbc[7]][_0xffbc[6]](Array);_0xa9a2x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/contactmanager/user_has_service', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/contactmanager/user_has_service')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index b7a5991..723bdc1 100644 (file)
@@ -1 +1,15 @@
-var _0x7f86=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7f86[0];var express=require(_0x7f86[1]);var controller=require(_0x7f86[2]);var router=express.Router();router[_0x7f86[5]](_0x7f86[3],controller[_0x7f86[4]]);router[_0x7f86[5]](_0x7f86[6],controller[_0x7f86[7]]);router[_0x7f86[9]](_0x7f86[3],controller[_0x7f86[8]]);router[_0x7f86[11]](_0x7f86[6],controller[_0x7f86[10]]);router[_0x7f86[12]](_0x7f86[6],controller[_0x7f86[10]]);router[_0x7f86[14]](_0x7f86[6],controller[_0x7f86[13]]);module[_0x7f86[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./user_has_team.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index 1f6ef7b..7f0f426 100644 (file)
@@ -1 +1,96 @@
-var _0xa558=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xa558[0];var _=require(_0xa558[1]);var UserHasTeam=require(_0xa558[3])[_0xa558[2]];exports[_0xa558[4]]=function(_0xc9dcx3,_0xc9dcx4){console[_0xa558[6]](_0xc9dcx3[_0xa558[5]]);UserHasTeam[_0xa558[11]]({where:_0xc9dcx3[_0xa558[5]]})[_0xa558[10]](function(_0xc9dcx6){return _0xc9dcx4[_0xa558[9]](200)[_0xa558[8]](_0xc9dcx6)})[_0xa558[7]](function(_0xc9dcx5){return handleError(_0xc9dcx4,_0xc9dcx5)})};exports[_0xa558[12]]=function(_0xc9dcx3,_0xc9dcx4){UserHasTeam[_0xa558[16]](_0xc9dcx3[_0xa558[15]][_0xa558[14]])[_0xa558[10]](function(_0xc9dcx7){if(!_0xc9dcx7){return _0xc9dcx4[_0xa558[13]](404)};return _0xc9dcx4[_0xa558[8]](_0xc9dcx7)})[_0xa558[7]](function(_0xc9dcx5){return handleError(_0xc9dcx4,_0xc9dcx5)})};exports[_0xa558[17]]=function(_0xc9dcx3,_0xc9dcx4){UserHasTeam[_0xa558[17]](_0xc9dcx3[_0xa558[18]])[_0xa558[10]](function(_0xc9dcx7){return _0xc9dcx4[_0xa558[9]](201)[_0xa558[8]](_0xc9dcx7)})[_0xa558[7]](function(_0xc9dcx5){return handleError(_0xc9dcx4,_0xc9dcx5)})};exports[_0xa558[19]]=function(_0xc9dcx3,_0xc9dcx4){if(_0xc9dcx3[_0xa558[18]][_0xa558[14]]){delete _0xc9dcx3[_0xa558[18]][_0xa558[14]]};UserHasTeam[_0xa558[16]](_0xc9dcx3[_0xa558[15]][_0xa558[14]])[_0xa558[10]](function(_0xc9dcx7){if(!_0xc9dcx7){return _0xc9dcx4[_0xa558[13]](404)};var _0xc9dcx8=_[_0xa558[20]](_0xc9dcx7,_0xc9dcx3[_0xa558[18]]);_0xc9dcx8[_0xa558[21]]()[_0xa558[10]](function(){return _0xc9dcx4[_0xa558[9]](200)[_0xa558[8]](_0xc9dcx7)})[_0xa558[7]](function(_0xc9dcx5){return handleError(_0xc9dcx4,_0xc9dcx5)})})[_0xa558[7]](function(_0xc9dcx5){return handleError(_0xc9dcx4,_0xc9dcx5)})};exports[_0xa558[22]]=function(_0xc9dcx3,_0xc9dcx4){UserHasTeam[_0xa558[16]](_0xc9dcx3[_0xa558[15]][_0xa558[14]])[_0xa558[10]](function(_0xc9dcx7){if(!_0xc9dcx7){return _0xc9dcx4[_0xa558[13]](404)};_0xc9dcx7[_0xa558[22]]()[_0xa558[10]](function(){return _0xc9dcx4[_0xa558[13]](204)})[_0xa558[7]](function(_0xc9dcx5){return handleError(_0xc9dcx4,_0xc9dcx5)})})[_0xa558[7]](function(_0xc9dcx5){return handleError(_0xc9dcx4,_0xc9dcx5)})};function handleError(_0xc9dcx4,_0xc9dcx5){return _0xc9dcx4[_0xa558[9]](500)[_0xa558[8]](_0xc9dcx5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var UserHasTeam = require('../../models').UserHasTeam;
+
+// Get list of user_has_teams
+exports.index = function(req, res) {
+  console.log(req.query);
+  UserHasTeam
+    .findAll({
+      where: req.query
+    })
+    .then(function(user_has_teams) {
+      return res.status(200).send(user_has_teams);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single user_has_team
+exports.show = function(req, res) {
+  UserHasTeam
+    .findById(req.params.id)
+    .then(function(user_has_team) {
+      if (!user_has_team) {
+        return res.sendStatus(404);
+      }
+      return res.send(user_has_team);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new user_has_team in the DB.
+exports.create = function(req, res) {
+  UserHasTeam
+    .create(req.body)
+    .then(function(user_has_team) {
+      return res.status(201).send(user_has_team);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing user_has_team in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  UserHasTeam
+    .findById(req.params.id)
+    .then(function(user_has_team) {
+      if (!user_has_team) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(user_has_team, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(user_has_team);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a user_has_team from the DB.
+exports.destroy = function(req, res) {
+  UserHasTeam
+    .findById(req.params.id)
+    .then(function(user_has_team) {
+      if (!user_has_team) {
+        return res.sendStatus(404);
+      }
+      user_has_team.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index ca7d5e8..6d5861d 100644 (file)
@@ -1 +1,13 @@
-var _0x9b56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x64\x65\x66\x69\x6E\x65"];_0x9b56[0];module[_0x9b56[1]]=function(_0xf8e7x1,_0xf8e7x2){var _0xf8e7x3=_0xf8e7x1[_0x9b56[3]](_0x9b56[2],{name:String,info:String,active:Boolean});return _0xf8e7x3}
\ No newline at end of file
+'use strict';
+
+module.export = function(sequelize, DataTypes) {
+
+  var UserHasTeam = sequelize.define('UserHasTeam', {
+    name: String,
+    info: String,
+    active: Boolean
+  });
+
+  return UserHasTeam;
+
+};
index c9ac4ce..879043c 100644 (file)
@@ -1 +1,24 @@
-var _0xf9bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0xf9bd[0];var user_has_team=require(_0xf9bd[2])[_0xf9bd[1]];exports[_0xf9bd[3]]=function(_0x7269x2){user_has_team[_0xf9bd[4]](function(_0x7269x3){onSave(_0x7269x2,_0x7269x3)});user_has_team[_0xf9bd[5]](function(_0x7269x3){onRemove(_0x7269x2,_0x7269x3)})};function onSave(_0x7269x2,_0x7269x3,_0x7269x5){_0x7269x2[_0xf9bd[7]](_0xf9bd[6],_0x7269x3)}function onRemove(_0x7269x2,_0x7269x3,_0x7269x5){_0x7269x2[_0xf9bd[7]](_0xf9bd[8],_0x7269x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var user_has_team = require('../../models').UserHasTeam;
+
+exports.register = function(socket) {
+  user_has_team.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  user_has_team.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('user_has_team:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('user_has_team:remove', doc);
+}
index 7eeee53..5cc5226 100644 (file)
@@ -1 +1,20 @@
-var _0xdf65=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x67\x65\x74"];_0xdf65[0];var should=require(_0xdf65[1]);var app=require(_0xdf65[2]);var request=require(_0xdf65[3]);describe(_0xdf65[4],function(){it(_0xdf65[5],function(_0x165fx4){request(app)[_0xdf65[13]](_0xdf65[12])[_0xdf65[11]](200)[_0xdf65[11]](_0xdf65[10],/json/)[_0xdf65[9]](function(_0x165fx5,_0x165fx6){if(_0x165fx5){return _0x165fx4(_0x165fx5)};_0x165fx6[_0xdf65[8]][_0xdf65[1]][_0xdf65[7]][_0xdf65[6]](Array);_0x165fx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/user_has_teams', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/user_has_teams')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index c99222a..72551d5 100644 (file)
@@ -1 +1,15 @@
-var _0x1ef6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1ef6[0];var express=require(_0x1ef6[1]);var controller=require(_0x1ef6[2]);var router=express.Router();router[_0x1ef6[5]](_0x1ef6[3],controller[_0x1ef6[4]]);router[_0x1ef6[5]](_0x1ef6[6],controller[_0x1ef6[7]]);router[_0x1ef6[9]](_0x1ef6[3],controller[_0x1ef6[8]]);router[_0x1ef6[11]](_0x1ef6[6],controller[_0x1ef6[10]]);router[_0x1ef6[12]](_0x1ef6[6],controller[_0x1ef6[10]]);router[_0x1ef6[14]](_0x1ef6[6],controller[_0x1ef6[13]]);module[_0x1ef6[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./user_has_voice_queue.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
\ No newline at end of file
index a41cff2..f3e5d22 100644 (file)
@@ -1 +1,98 @@
-var _0xdb76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xdb76[0];var _=require(_0xdb76[1]);var UserHasVoiceQueue=require(_0xdb76[3])[_0xdb76[2]];exports[_0xdb76[4]]=function(_0x87b9x3,_0x87b9x4){UserHasVoiceQueue[_0xdb76[10]](_0x87b9x3[_0xdb76[9]]?{where:_0x87b9x3[_0xdb76[9]]}:{})[_0xdb76[8]](function(_0x87b9x6){return _0x87b9x4[_0xdb76[7]](200)[_0xdb76[6]](_0x87b9x6)})[_0xdb76[5]](function(_0x87b9x5){return handleError(_0x87b9x4,_0x87b9x5)})};exports[_0xdb76[11]]=function(_0x87b9x3,_0x87b9x4){UserHasVoiceQueue[_0xdb76[15]](_0x87b9x3[_0xdb76[14]][_0xdb76[13]])[_0xdb76[8]](function(_0x87b9x7){if(!_0x87b9x7){return _0x87b9x4[_0xdb76[12]](404)};return _0x87b9x4[_0xdb76[6]](_0x87b9x7)})[_0xdb76[5]](function(_0x87b9x5){return handleError(_0x87b9x4,_0x87b9x5)})};exports[_0xdb76[16]]=function(_0x87b9x3,_0x87b9x4,_0x87b9x8){console[_0xdb76[18]](_0x87b9x3[_0xdb76[17]]);UserHasVoiceQueue[_0xdb76[16]](_0x87b9x3[_0xdb76[17]])[_0xdb76[8]](function(_0x87b9x7){return _0x87b9x4[_0xdb76[7]](201)[_0xdb76[6]](_0x87b9x7)})[_0xdb76[5]](function(_0x87b9x5){console[_0xdb76[19]](_0x87b9x5);return _0x87b9x8(_0x87b9x5)})};exports[_0xdb76[20]]=function(_0x87b9x3,_0x87b9x4){if(_0x87b9x3[_0xdb76[17]][_0xdb76[13]]){delete _0x87b9x3[_0xdb76[17]][_0xdb76[13]]};UserHasVoiceQueue[_0xdb76[15]](_0x87b9x3[_0xdb76[14]][_0xdb76[13]])[_0xdb76[8]](function(_0x87b9x7){if(!_0x87b9x7){return _0x87b9x4[_0xdb76[12]](404)};var _0x87b9x9=_[_0xdb76[21]](_0x87b9x7,_0x87b9x3[_0xdb76[17]]);_0x87b9x9[_0xdb76[22]]()[_0xdb76[8]](function(){return _0x87b9x4[_0xdb76[7]](200)[_0xdb76[6]](_0x87b9x7)})[_0xdb76[5]](function(_0x87b9x5){return handleError(_0x87b9x4,_0x87b9x5)})})[_0xdb76[5]](function(_0x87b9x5){return handleError(_0x87b9x4,_0x87b9x5)})};exports[_0xdb76[23]]=function(_0x87b9x3,_0x87b9x4){UserHasVoiceQueue[_0xdb76[15]](_0x87b9x3[_0xdb76[14]][_0xdb76[13]])[_0xdb76[8]](function(_0x87b9x7){if(!_0x87b9x7){return _0x87b9x4[_0xdb76[12]](404)};_0x87b9x7[_0xdb76[23]]()[_0xdb76[8]](function(){return _0x87b9x4[_0xdb76[12]](204)})[_0xdb76[5]](function(_0x87b9x5){return handleError(_0x87b9x4,_0x87b9x5)})})[_0xdb76[5]](function(_0x87b9x5){return handleError(_0x87b9x4,_0x87b9x5)})};function handleError(_0x87b9x4,_0x87b9x5){return _0x87b9x4[_0xdb76[7]](500)[_0xdb76[6]](_0x87b9x5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
+
+// Get list of user_has_voice_queues
+exports.index = function(req, res) {
+  UserHasVoiceQueue
+    .findAll(req.query ? {
+      where: req.query
+    } : {})
+    .then(function(user_has_voice_queues) {
+      return res.status(200).send(user_has_voice_queues);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single userHasVoiceQueue
+exports.show = function(req, res) {
+  UserHasVoiceQueue
+    .findById(req.params.id)
+    .then(function(userHasVoiceQueue) {
+      if (!userHasVoiceQueue) {
+        return res.sendStatus(404);
+      }
+      return res.send(userHasVoiceQueue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new userHasVoiceQueue in the DB.
+exports.create = function(req, res, next) {
+  console.log(req.body);
+  UserHasVoiceQueue
+    .create(req.body)
+    .then(function(userHasVoiceQueue) {
+      return res.status(201).send(userHasVoiceQueue);
+    })
+    .catch(function(err) {
+      console.error(err);
+      return next(err);
+      // return handleError(res, err);
+    });
+};
+
+// Updates an existing userHasVoiceQueue in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  UserHasVoiceQueue
+    .findById(req.params.id)
+    .then(function(userHasVoiceQueue) {
+      if (!userHasVoiceQueue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(userHasVoiceQueue, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(userHasVoiceQueue);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a userHasVoiceQueue from the DB.
+exports.destroy = function(req, res) {
+  UserHasVoiceQueue
+    .findById(req.params.id)
+    .then(function(userHasVoiceQueue) {
+      if (!userHasVoiceQueue) {
+        return res.sendStatus(404);
+      }
+      userHasVoiceQueue.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index bebef5f..1ed4063 100644 (file)
@@ -1 +1,42 @@
-var _0x861b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x6C\x6F\x67\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x71\x75\x65\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x64\x65\x73\x63","\x73\x74\x61\x74\x75\x73\x41\x74","\x70\x61\x75\x73\x65\x64","\x70\x61\x75\x73\x65\x64\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x55\x73\x65\x72\x49\x64","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x861b[0];var UserHasVoiceQueue=require(_0x861b[2])[_0x861b[1]];exports[_0x861b[3]]=function(_0x27ccx2){UserHasVoiceQueue[_0x861b[4]](function(_0x27ccx3){onSave(_0x27ccx2,_0x27ccx3)});UserHasVoiceQueue[_0x861b[5]](function(_0x27ccx3){onSave(_0x27ccx2,_0x27ccx3)});UserHasVoiceQueue[_0x861b[6]](function(_0x27ccx3){onRemove(_0x27ccx2,_0x27ccx3)})};function onSave(_0x27ccx2,_0x27ccx3,_0x27ccx5){_0x27ccx2[_0x861b[22]](_0x861b[7],{logged:_0x27ccx3[_0x861b[8]],loggedAt:_0x27ccx3[_0x861b[9]],queue:_0x27ccx3[_0x861b[10]],membername:_0x27ccx3[_0x861b[11]],interface:_0x27ccx3[_0x861b[12]],callstaken:_0x27ccx3[_0x861b[13]],lastcall:_0x27ccx3[_0x861b[14]],status:_0x27ccx3[_0x861b[15]],statusdesc:_0x27ccx3[_0x861b[16]],statusAt:_0x27ccx3[_0x861b[17]],paused:_0x27ccx3[_0x861b[18]],pausedAt:_0x27ccx3[_0x861b[19]],reason:_0x27ccx3[_0x861b[20]],UserId:_0x27ccx3[_0x861b[21]]})}function onRemove(_0x27ccx2,_0x27ccx3,_0x27ccx5){_0x27ccx2[_0x861b[22]](_0x861b[23],_0x27ccx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
+
+exports.register = function(socket) {
+  UserHasVoiceQueue.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasVoiceQueue.afterUpdate(function(doc) {
+    onSave(socket, doc);
+  });
+  UserHasVoiceQueue.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('user_has_voice_queue:save', {
+    logged: doc.logged,
+    loggedAt: doc.loggedAt,
+    queue: doc.queue,
+    membername: doc.membername,
+    interface: doc.interface,
+    callstaken: doc.callstaken,
+    lastcall: doc.lastcall,
+    status: doc.status,
+    statusdesc: doc.statusdesc,
+    statusAt: doc.statusAt,
+    paused: doc.paused,
+    pausedAt: doc.pausedAt,
+    reason: doc.reason,
+    UserId: doc.UserId
+  });
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('user_has_voice_queue:remove', doc);
+}
diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.spec.js b/server/api/user_has_voice_queue/user_has_voice_queue.spec.js
deleted file mode 100644 (file)
index 928e10a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var _0xee62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x67\x65\x74"];_0xee62[0];var should=require(_0xee62[1]);var app=require(_0xee62[2]);var request=require(_0xee62[3]);describe(_0xee62[4],function(){it(_0xee62[5],function(_0x6f19x4){request(app)[_0xee62[13]](_0xee62[12])[_0xee62[11]](200)[_0xee62[11]](_0xee62[10],/json/)[_0xee62[9]](function(_0x6f19x5,_0x6f19x6){if(_0x6f19x5){return _0x6f19x4(_0x6f19x5)};_0x6f19x6[_0xee62[8]][_0xee62[1]][_0xee62[7]][_0xee62[6]](Array);_0x6f19x4()})})})
\ No newline at end of file
index 084e60b..4c9decb 100644 (file)
@@ -1 +1,17 @@
-var _0x7f62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x7f62[0];var express=require(_0x7f62[1]);var controller=require(_0x7f62[2]);var auth=require(_0x7f62[3]);var router=express.Router();router[_0x7f62[7]](_0x7f62[4],auth[_0x7f62[5]](),controller[_0x7f62[6]]);router[_0x7f62[7]](_0x7f62[8],auth[_0x7f62[5]](),controller[_0x7f62[9]]);router[_0x7f62[11]](_0x7f62[4],auth[_0x7f62[5]](),controller[_0x7f62[10]]);router[_0x7f62[13]](_0x7f62[8],auth[_0x7f62[5]](),controller[_0x7f62[12]]);router[_0x7f62[14]](_0x7f62[8],auth[_0x7f62[5]](),controller[_0x7f62[12]]);router[_0x7f62[16]](_0x7f62[4],auth[_0x7f62[5]](),controller[_0x7f62[15]]);router[_0x7f62[16]](_0x7f62[8],auth[_0x7f62[5]](),controller[_0x7f62[17]]);module[_0x7f62[18]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./variable.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 5be772f..2378a95 100644 (file)
@@ -1 +1,117 @@
-var _0x5581=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x73\x73\x61\x67\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x73"];_0x5581[0];var _=require(_0x5581[1]);var Variable=require(_0x5581[3])[_0x5581[2]];var Util=require(_0x5581[4]);exports[_0x5581[5]]=function(_0xd9d7x4,_0xd9d7x5,_0xd9d7x6){return Variable[_0x5581[12]](Util[_0x5581[11]](_0xd9d7x4[_0x5581[10]]))[_0x5581[9]](function(_0xd9d7x8){_0xd9d7x5[_0x5581[8]](200)[_0x5581[7]](_0xd9d7x8)})[_0x5581[6]](function(_0xd9d7x7){return handleError(_0xd9d7x5,_0xd9d7x7)})};exports[_0x5581[13]]=function(_0xd9d7x4,_0xd9d7x5){return Variable[_0x5581[17]](_0xd9d7x4[_0x5581[16]][_0x5581[15]])[_0x5581[9]](function(_0xd9d7x9){if(!_0xd9d7x9){return _0xd9d7x5[_0x5581[14]](404)};return _0xd9d7x5[_0x5581[7]](_0xd9d7x9)})[_0x5581[6]](function(_0xd9d7x7){return handleError(_0xd9d7x5,_0xd9d7x7)})};exports[_0x5581[18]]=function(_0xd9d7x4,_0xd9d7x5){return Variable[_0x5581[18]](_0xd9d7x4[_0x5581[19]])[_0x5581[9]](function(_0xd9d7x9){return _0xd9d7x5[_0x5581[8]](201)[_0x5581[7]](_0xd9d7x9)})[_0x5581[6]](function(_0xd9d7x7){return handleError(_0xd9d7x5,_0xd9d7x7)})};exports[_0x5581[20]]=function(_0xd9d7x4,_0xd9d7x5){if(_0xd9d7x4[_0x5581[19]][_0x5581[15]]){delete _0xd9d7x4[_0x5581[19]][_0x5581[15]]};return Variable[_0x5581[17]](_0xd9d7x4[_0x5581[16]][_0x5581[15]])[_0x5581[9]](function(_0xd9d7x9){if(!_0xd9d7x9){return _0xd9d7x5[_0x5581[14]](404)};var _0xd9d7xa=_[_0x5581[21]](_0xd9d7x9,_0xd9d7x4[_0x5581[19]]);return _0xd9d7xa[_0x5581[22]]()})[_0x5581[9]](function(_0xd9d7x9){return _0xd9d7x5[_0x5581[8]](200)[_0x5581[7]](_0xd9d7x9)})[_0x5581[6]](function(_0xd9d7x7){return handleError(_0xd9d7x5,_0xd9d7x7)})};exports[_0x5581[23]]=function(_0xd9d7x4,_0xd9d7x5){return Variable[_0x5581[27]](_0x5581[26])[_0x5581[17]](_0xd9d7x4[_0x5581[16]][_0x5581[15]])[_0x5581[9]](function(_0xd9d7x9){if(!_0xd9d7x9){return _0xd9d7x5[_0x5581[14]](404)};if(variableHasAssociation(_0xd9d7x9)){var _0xd9d7x7= new Error();_0xd9d7x7[_0x5581[24]]=_0x5581[25];throw _0xd9d7x7};return _0xd9d7x9[_0x5581[23]]()})[_0x5581[9]](function(){return _0xd9d7x5[_0x5581[14]](204)})[_0x5581[6]](function(_0xd9d7x7){return handleError(_0xd9d7x5,_0xd9d7x7)})};exports[_0x5581[28]]=function(_0xd9d7x4,_0xd9d7x5){return Variable[_0x5581[23]]({where:{id:_0xd9d7x4[_0x5581[10]][_0x5581[29]]},individualHooks:true})[_0x5581[9]](function(){return _0xd9d7x5[_0x5581[14]](204)})[_0x5581[6]](function(_0xd9d7x7){return handleError(_0xd9d7x5,_0xd9d7x7)})};function handleError(_0xd9d7x5,_0xd9d7x7){return _0xd9d7x5[_0x5581[8]](500)[_0x5581[7]](_0xd9d7x7)}function variableHasAssociation(_0xd9d7x9){return ((_0xd9d7x9[_0x5581[30]]&&_0xd9d7x9[_0x5581[30]][_0x5581[31]]>0)||(_0xd9d7x9[_0x5581[32]]&&_0xd9d7x9[_0x5581[32]][_0x5581[31]]>0)||(_0xd9d7x9[_0x5581[33]]&&_0xd9d7x9[_0x5581[33]][_0x5581[31]]>0)||(_0xd9d7x9[_0x5581[34]]&&_0xd9d7x9[_0x5581[34]][_0x5581[31]]>0)||(_0xd9d7x9[_0x5581[35]]&&_0xd9d7x9[_0x5581[35]][_0x5581[31]]>0))}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Variable = require('../../models').Variable;
+var Util = require('../../config/util');
+
+// Get list of variables
+exports.index = function(req, res, next) {
+  return Variable
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single variable
+exports.show = function(req, res) {
+  return Variable
+    .findById(req.params.id)
+    .then(function(variable) {
+      if (!variable) {
+        return res.sendStatus(404);
+      }
+      return res.send(variable);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new variable in the DB.
+exports.create = function(req, res) {
+  return Variable
+    .create(req.body)
+    .then(function(variable) {
+      return res.status(201).send(variable);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing variable in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return Variable
+    .findById(req.params.id)
+    .then(function(variable) {
+      if (!variable) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(variable, req.body);
+      return updated
+        .save();
+    })
+    .then(function(variable) {
+      return res.status(200).send(variable);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a variable from the DB.
+exports.destroy = function(req, res) {
+  return Variable
+    .scope('fields')
+    .findById(req.params.id)
+    .then(function(variable) {
+      if (!variable) {
+        return res.sendStatus(404);
+      }
+      if (variableHasAssociation(variable)) {
+        var err = new Error();
+        err.message = 'Variable is associated with an integration\'s configuration';
+        throw err;
+      }
+      return variable.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.bulkDestroy = function(req, res) {
+  return Variable
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
+
+function variableHasAssociation(variable) {
+  return ((variable.ZendeskFields && variable.ZendeskFields.length > 0) || (variable.DeskFields && variable.DeskFields.length > 0) || (variable.SalesforceFields && variable.SalesforceFields.length >
+    0) || (variable.FreshdeskFields && variable.FreshdeskFields.length > 0) || (variable.SugarcrmFields && variable.SugarcrmFields.length > 0));
+}
index df53e12..739f11c 100644 (file)
@@ -1 +1,24 @@
-var _0x42d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x42d4[0];var Variable=require(_0x42d4[2])[_0x42d4[1]];exports[_0x42d4[3]]=function(_0xd3a7x2){Variable[_0x42d4[4]](function(_0xd3a7x3){onSave(_0xd3a7x2,_0xd3a7x3)});Variable[_0x42d4[5]](function(_0xd3a7x3){onRemove(_0xd3a7x2,_0xd3a7x3)})};function onSave(_0xd3a7x2,_0xd3a7x3,_0xd3a7x5){_0xd3a7x2[_0x42d4[7]](_0x42d4[6],_0xd3a7x3)}function onRemove(_0xd3a7x2,_0xd3a7x3,_0xd3a7x5){_0xd3a7x2[_0x42d4[7]](_0x42d4[8],_0xd3a7x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var Variable = require('../../models').Variable;
+
+exports.register = function(socket) {
+  Variable.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  Variable.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('variable:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('variable:remove', doc);
+}
index c497e84..1b436c8 100644 (file)
@@ -1 +1,16 @@
-var _0x3472=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3472[0];var express=require(_0x3472[1]);var controller=require(_0x3472[2]);var auth=require(_0x3472[3]);var router=express.Router();router[_0x3472[7]](_0x3472[4],auth[_0x3472[5]](),controller[_0x3472[6]]);router[_0x3472[7]](_0x3472[8],auth[_0x3472[5]](),controller[_0x3472[9]]);router[_0x3472[11]](_0x3472[4],auth[_0x3472[5]](),controller[_0x3472[10]]);router[_0x3472[11]](_0x3472[12],auth[_0x3472[5]](),controller[_0x3472[13]]);router[_0x3472[15]](_0x3472[8],auth[_0x3472[5]](),controller[_0x3472[14]]);router[_0x3472[17]](_0x3472[4],auth[_0x3472[5]](),controller[_0x3472[16]]);router[_0x3472[17]](_0x3472[8],auth[_0x3472[5]](),controller[_0x3472[18]]);module[_0x3472[19]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./voice_context.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/validate', auth.isAuthenticated(), controller.contextValidation);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+module.exports = router;
index cd96c0f..c6ec224 100644 (file)
@@ -1 +1,227 @@
-var _0x62bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x4F\x4E\x54\x45\x58\x54","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x6C\x6F\x67","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x61\x20\x72\x6F\x75\x74\x65\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x6F\x72\x20\x63\x68\x61\x6E\x67\x65\x20\x69\x74\x20\x66\x69\x72\x73\x74","\x4D\x45\x53\x53\x41\x47\x45\x5F\x43\x4F\x4E\x54\x45\x58\x54\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x65\x6E\x74\x72\x79\x21","\x4D\x45\x53\x53\x41\x47\x45\x5F\x44\x45\x46\x41\x55\x4C\x54\x5F\x45\x4E\x54\x52\x59","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x66\x69\x6E\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70"];_0x62bc[0];var _=require(_0x62bc[1]);var util=require(_0x62bc[2]);var Util=require(_0x62bc[3]);var sequelize=require(_0x62bc[5])[_0x62bc[4]];var VoiceContext=require(_0x62bc[5])[_0x62bc[6]];var VoiceExtension=require(_0x62bc[5])[_0x62bc[7]];exports[_0x62bc[8]]=function(_0xde12x7,_0xde12x8,_0xde12x9){return VoiceContext[_0x62bc[15]](Util[_0x62bc[14]](_0xde12x7[_0x62bc[13]]))[_0x62bc[12]](function(_0xde12xb){_0xde12x8[_0x62bc[11]](200)[_0x62bc[10]](_0xde12xb)})[_0x62bc[9]](function(_0xde12xa){return handleError(_0xde12x8,_0xde12xa)})};exports[_0x62bc[16]]=function(_0xde12x7,_0xde12x8){return VoiceContext[_0x62bc[20]](_0xde12x7[_0x62bc[19]][_0x62bc[18]])[_0x62bc[12]](function(_0xde12xc){if(!_0xde12xc){return _0xde12x8[_0x62bc[17]](404)};return _0xde12x8[_0x62bc[10]](_0xde12xc)})[_0x62bc[9]](function(_0xde12xa){return handleError(_0xde12x8,_0xde12xa)})};exports[_0x62bc[21]]=function(_0xde12x7,_0xde12x8){return VoiceContext[_0x62bc[24]]({where:{name:_0xde12x7[_0x62bc[23]][_0x62bc[22]]}})[_0x62bc[12]](function(_0xde12xd){if(!_0xde12xd){return _0xde12x8[_0x62bc[17]](404)};return _0xde12x8[_0x62bc[10]](_0xde12xd)})[_0x62bc[9]](function(_0xde12xa){return handleError(_0xde12x8,_0xde12xa)})};exports[_0x62bc[25]]=function(_0xde12x7,_0xde12x8){return VoiceContext[_0x62bc[25]](_0xde12x7[_0x62bc[23]])[_0x62bc[12]](function(_0xde12xc){return _0xde12x8[_0x62bc[11]](201)[_0x62bc[10]](_0xde12xc)})[_0x62bc[9]](sequelize.UniqueConstraintError,function(_0xde12xa){_0xde12xa[_0x62bc[26]]=_0x62bc[27];_0xde12xa[_0x62bc[28]]=_0x62bc[29];return handleError(_0xde12x8,_0xde12xa)})[_0x62bc[9]](function(_0xde12xa){return handleError(_0xde12x8,_0xde12xa)})};exports[_0x62bc[30]]=function(_0xde12x7,_0xde12x8){return VoiceContext[_0x62bc[24]]({where:{name:_0xde12x7[_0x62bc[23]][_0x62bc[22]],id:{$ne:_0xde12x7[_0x62bc[23]][_0x62bc[18]]}}})[_0x62bc[12]](function(_0xde12xf){if(!_0xde12xf){return _0xde12x8[_0x62bc[17]](404)};if(_0xde12xf[_0x62bc[33]]>0){return _0xde12x8[_0x62bc[11]](500)[_0x62bc[10]]({message:_0x62bc[29]})};if(_0xde12x7[_0x62bc[23]][_0x62bc[18]]){delete _0xde12x7[_0x62bc[23]][_0x62bc[18]]};return VoiceContext[_0x62bc[20]](_0xde12x7[_0x62bc[19]][_0x62bc[18]])})[_0x62bc[12]](function(_0xde12xc){if(!_0xde12xc){return _0xde12x8[_0x62bc[17]](404)};var _0xde12xe=_[_0x62bc[31]](_0xde12xc,_0xde12x7[_0x62bc[23]]);return _0xde12xe[_0x62bc[32]]()})[_0x62bc[12]](function(_0xde12xc){return _0xde12x8[_0x62bc[11]](200)[_0x62bc[10]](_0xde12xc)})[_0x62bc[9]](function(_0xde12xa){return handleError(_0xde12x8,_0xde12xa)})};exports[_0x62bc[34]]=function(_0xde12x7,_0xde12x8){var _0xde12x10;return VoiceContext[_0x62bc[20]](_0xde12x7[_0x62bc[19]][_0x62bc[18]])[_0x62bc[12]](function(_0xde12xc){_0xde12x10=_0xde12xc;if(!_0xde12x10){return _0xde12x8[_0x62bc[17]](404)};if(_0xde12x10[_0x62bc[39]]){return _0xde12x8[_0x62bc[11]](500)[_0x62bc[10]]({message:_0x62bc[40],translatedMessage:_0x62bc[41]})};return VoiceExtension[_0x62bc[24]]({where:{context:_0xde12x10[_0x62bc[22]],VoiceContextId:null}})})[_0x62bc[12]](function(_0xde12x11){console[_0x62bc[36]](_0xde12x11);if(_0xde12x11[_0x62bc[33]]>0){return _0xde12x8[_0x62bc[11]](500)[_0x62bc[10]]({message:_0x62bc[37],translatedMessage:_0x62bc[38]})};return _0xde12x10[_0x62bc[34]]()})[_0x62bc[12]](function(){return _0xde12x8[_0x62bc[17]](204)})[_0x62bc[9]](function(_0xde12xa){console[_0x62bc[36]](_0x62bc[35],_0xde12xa);return handleError(_0xde12x8,_0xde12xa)})};exports[_0x62bc[42]]=function(_0xde12x7,_0xde12x8){var _0xde12x12;return VoiceContext[_0x62bc[24]]({where:{id:_0xde12x7[_0x62bc[13]][_0x62bc[43]]}})[_0x62bc[12]](function(_0xde12xd){_0xde12x12=_0xde12xd;var _0xde12x13=_[_0x62bc[44]](_0xde12x12,{defaultEntry:true});if(_0xde12x13){return _0xde12x8[_0x62bc[11]](500)[_0x62bc[10]]({message:_0x62bc[40],translatedMessage:_0x62bc[41]})};if(!_0xde12x12){return _0xde12x8[_0x62bc[17]](404)};var _0xde12x14=_[_0x62bc[46]](_[_0x62bc[46]](_0xde12x12,_0x62bc[45]),_0x62bc[22]);return VoiceExtension[_0x62bc[24]]({where:{context:_0xde12x14,VoiceContextId:null}})})[_0x62bc[12]](function(_0xde12x11){if(_0xde12x11[_0x62bc[33]]>_0xde12x12[_0x62bc[33]]){return _0xde12x8[_0x62bc[11]](500)[_0x62bc[10]]({message:_0x62bc[37],translatedMessage:_0x62bc[38]})};return VoiceContext[_0x62bc[34]]({where:{id:_0xde12x7[_0x62bc[13]][_0x62bc[43]]},individualHooks:true})})[_0x62bc[12]](function(){return _0xde12x8[_0x62bc[17]](204)})[_0x62bc[9]](function(_0xde12xa){console[_0x62bc[36]](_0xde12xa);return handleError(_0xde12x8,_0xde12xa)})};function handleError(_0xde12x8,_0xde12xa){return _0xde12x8[_0x62bc[11]](500)[_0x62bc[10]](_0xde12xa)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+
+var Util = require('../../config/util');
+var sequelize = require('../../models').sequelize;
+
+var VoiceContext = require('../../models').VoiceContext;
+var VoiceExtension = require('../../models').VoiceExtension;
+
+// Get list of agents
+exports.index = function(req, res, next) {
+  return VoiceContext
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single voiceContext
+exports.show = function(req, res) {
+  return VoiceContext
+    .findById(req.params.id)
+    .then(function(voiceContext) {
+      if (!voiceContext) {
+        return res.sendStatus(404);
+      }
+      return res.send(voiceContext);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Validate the existence of a context
+exports.contextValidation = function(req, res) {
+  return VoiceContext
+    .findAll({
+      where: {
+        name: req.body.name
+      }
+    })
+    .then(function(voiceContexts) {
+      if (!voiceContexts) {
+        return res.sendStatus(404);
+      }
+      return res.send(voiceContexts);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new voiceContext in the DB.
+exports.create = function(req, res) {
+  return VoiceContext
+    .create(req.body)
+    .then(function(voiceContext) {
+      return res.status(201).send(voiceContext);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      err.message = 'The context name already exists';
+      err.translatedMessage = 'MESSAGE_EXIST_CONTEXT'
+      return handleError(res, err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+
+};
+
+// Updates an existing voiceContext in the DB.
+exports.update = function(req, res) {
+  return VoiceContext
+    .findAll({
+      where: {
+        name: req.body.name,
+        id: {
+          $ne: req.body.id
+        }
+      }
+    })
+    .then(function(existingContexts) {
+      if (!existingContexts) {
+        return res.sendStatus(404);
+      }
+      if (existingContexts.length > 0) {
+        return res.status(500).send({
+          message: 'MESSAGE_EXIST_CONTEXT'
+        });
+      }
+      if (req.body.id) {
+        delete req.body.id;
+      }
+      return VoiceContext
+        .findById(req.params.id);
+    })
+    .then(function(voiceContext) {
+      if (!voiceContext) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(voiceContext, req.body);
+      return updated
+        .save();
+    })
+    .then(function(voiceContext) {
+      return res.status(200).send(voiceContext);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+
+};
+
+// Deletes a voiceContext from the DB.
+exports.destroy = function(req, res) {
+  var _voiceContext;
+
+  return VoiceContext
+    .findById(req.params.id)
+    .then(function(voiceContext) {
+      _voiceContext = voiceContext;
+      if (!_voiceContext) {
+        return res.sendStatus(404);
+      }
+      if (_voiceContext.defaultEntry) {
+        return res.status(500).send({
+          message: 'You can\'t delete a default entry!',
+          translatedMessage: 'MESSAGE_DEFAULT_ENTRY'
+        });
+      }
+      return VoiceExtension
+        .findAll({
+          where: {
+            context: _voiceContext.name,
+            VoiceContextId: null
+          }
+        });
+    })
+    .then(function(contextExtensions) {
+      console.log(contextExtensions);
+      if (contextExtensions.length > 0) {
+        return res.status(500).send({
+          message: 'The context is associated to a route, delete or change it first',
+          translatedMessage: 'MESSAGE_CONTEXT_ROUTE_ASSOCIATED'
+        });
+      }
+      return _voiceContext
+        .destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      console.log('err', err);
+      return handleError(res, err);
+    });
+
+};
+
+// Deletes a context from the DB.
+exports.bulkDestroy = function(req, res) {
+
+  var _voiceContexts;
+
+  return VoiceContext
+    .findAll({
+      where: {
+        id: req.query.ids
+      }
+    })
+    .then(function(voiceContexts) {
+      _voiceContexts = voiceContexts;
+      var isDefault = _.find(_voiceContexts, {
+        defaultEntry: true
+      });
+      if (isDefault) {
+        return res.status(500).send({
+          message: 'You can\'t delete a default entry!',
+          translatedMessage: 'MESSAGE_DEFAULT_ENTRY'
+        });
+      }
+      if (!_voiceContexts) {
+        return res.sendStatus(404);
+      }
+      var destroyContextsNames = _.map(_.map(_voiceContexts, 'dataValues'), 'name');
+
+      return VoiceExtension
+        .findAll({
+          where: {
+            context: destroyContextsNames,
+            VoiceContextId: null
+          }
+        });
+    })
+    .then(function(contextExtensions) {
+      if (contextExtensions.length > _voiceContexts.length) {
+        return res.status(500).send({
+          message: 'The context is associated to a route, delete or change it first',
+          translatedMessage: 'MESSAGE_CONTEXT_ROUTE_ASSOCIATED'
+        });
+      }
+
+      return VoiceContext
+        .destroy({
+          where: {
+            id: req.query.ids
+          },
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 19ee430..c3841ec 100644 (file)
@@ -1 +1,24 @@
-var _0xb47a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0xb47a[0];var VoiceContext=require(_0xb47a[2])[_0xb47a[1]];exports[_0xb47a[3]]=function(_0xeb35x2){VoiceContext[_0xb47a[4]](function(_0xeb35x3){onSave(_0xeb35x2,_0xeb35x3)});VoiceContext[_0xb47a[5]](function(_0xeb35x3){onRemove(_0xeb35x2,_0xeb35x3)})};function onSave(_0xeb35x2,_0xeb35x3,_0xeb35x5){_0xeb35x2[_0xb47a[7]](_0xb47a[6],_0xeb35x3)}function onRemove(_0xeb35x2,_0xeb35x3,_0xeb35x5){_0xeb35x2[_0xb47a[7]](_0xb47a[8],_0xeb35x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var VoiceContext = require('../../models').VoiceContext;
+
+exports.register = function(socket) {
+  VoiceContext.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  VoiceContext.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('voice_context:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('voice_context:remove', doc);
+}
index f131c54..1a60777 100644 (file)
@@ -1 +1,20 @@
-var _0x47fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x67\x65\x74"];_0x47fa[0];var should=require(_0x47fa[1]);var app=require(_0x47fa[2]);var request=require(_0x47fa[3]);describe(_0x47fa[4],function(){it(_0x47fa[5],function(_0xf724x4){request(app)[_0x47fa[13]](_0x47fa[12])[_0x47fa[11]](200)[_0x47fa[11]](_0x47fa[10],/json/)[_0x47fa[9]](function(_0xf724x5,_0xf724x6){if(_0xf724x5){return _0xf724x4(_0xf724x5)};_0xf724x6[_0x47fa[8]][_0x47fa[1]][_0x47fa[7]][_0x47fa[6]](Array);_0xf724x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/voice/contexts', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/voice/contexts')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 3e9f012..b0215fc 100644 (file)
@@ -1 +1,16 @@
-var _0xd2c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xd2c0[0];var express=require(_0xd2c0[1]);var controller=require(_0xd2c0[2]);var auth=require(_0xd2c0[3]);var router=express.Router();router[_0xd2c0[7]](_0xd2c0[4],auth[_0xd2c0[5]](),controller[_0xd2c0[6]]);router[_0xd2c0[7]](_0xd2c0[8],auth[_0xd2c0[5]](),controller[_0xd2c0[9]]);router[_0xd2c0[11]](_0xd2c0[4],auth[_0xd2c0[5]](),controller[_0xd2c0[10]]);router[_0xd2c0[13]](_0xd2c0[8],auth[_0xd2c0[5]](),controller[_0xd2c0[12]]);router[_0xd2c0[15]](_0xd2c0[4],auth[_0xd2c0[5]](),controller[_0xd2c0[14]]);router[_0xd2c0[15]](_0xd2c0[8],auth[_0xd2c0[5]](),controller[_0xd2c0[16]]);module[_0xd2c0[17]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./voice_extension.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy); //check it for apps
+router.delete('/:id', auth.isAuthenticated(), controller.destroy); //check it for apps
+
+module.exports = router;
index 2104b0b..6dc7233 100644 (file)
@@ -1 +1,146 @@
-var _0x822e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x75\x74\x65\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x65\x72\x72","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x822e[0];var _=require(_0x822e[1]);var VoiceExtension=require(_0x822e[3])[_0x822e[2]];var Interval=require(_0x822e[3])[_0x822e[4]];var sequelize=require(_0x822e[3])[_0x822e[5]];var Sequelize=require(_0x822e[3])[_0x822e[6]];var util=require(_0x822e[7]);var async=require(_0x822e[8]);var veUtil=require(_0x822e[9]);var Util=require(_0x822e[10]);var Applications=veUtil[_0x822e[11]];exports[_0x822e[12]]=function(_0xeec6xb,_0xeec6xc,_0xeec6xd){return VoiceExtension[_0x822e[23]](_0x822e[21],_0x822e[22])[_0x822e[20]](Util[_0x822e[19]](_0xeec6xb[_0x822e[18]]))[_0x822e[17]](function(_0xeec6xf){_0xeec6xc[_0x822e[16]](200)[_0x822e[15]](_0xeec6xf)})[_0x822e[14]](function(_0xeec6xe){console[_0x822e[13]](_0xeec6xe);return handleError(_0xeec6xc,_0xeec6xe)})};exports[_0x822e[24]]=function(_0xeec6xb,_0xeec6xc){VoiceExtension[_0x822e[23]](_0x822e[22])[_0x822e[28]]({where:{id:_0xeec6xb[_0x822e[27]][_0x822e[26]],VoiceExtensionId:null}})[_0x822e[17]](function(_0xeec6x10){if(!_0xeec6x10){return _0xeec6xc[_0x822e[25]](404)};return _0xeec6xc[_0x822e[15]](_0xeec6x10)})[_0x822e[14]](function(_0xeec6xe){return handleError(_0xeec6xc,_0xeec6xe)})};exports[_0x822e[29]]=function(_0xeec6xb,_0xeec6xc){var _0xeec6x11;return sequelize[_0x822e[39]](function(_0xeec6x12){return VoiceExtension[_0x822e[29]](_0xeec6xb[_0x822e[35]],{transaction:_0xeec6x12})[_0x822e[17]](function(_0xeec6x13){_0xeec6x11=_0xeec6x13;if(_0xeec6xb[_0x822e[35]][_0x822e[11]]&&Array[_0x822e[37]](_0xeec6xb[_0x822e[35]].Applications)&&_0xeec6xb[_0x822e[35]][_0x822e[11]][_0x822e[38]]){return _0xeec6x13}})[_0x822e[17]](veUtil[_0x822e[36]](_0xeec6xb[_0x822e[35]].Applications,_0xeec6x12,_0xeec6xc))})[_0x822e[17]](function(){return _0xeec6xc[_0x822e[16]](201)[_0x822e[15]](_0xeec6x11)})[_0x822e[14]](sequelize.UniqueConstraintError,function(_0xeec6xe){_0xeec6xe[_0x822e[31]]=_0x822e[32];_0xeec6xe[_0x822e[33]]=_0x822e[34];return handleError(_0xeec6xc,_0xeec6xe)})[_0x822e[14]](sequelize.ValidationError,function(_0xeec6xe){_0xeec6xe[_0x822e[31]]=_0x822e[32];_0xeec6xe[_0x822e[33]]=_0x822e[34];return handleError(_0xeec6xc,_0xeec6xe)})[_0x822e[14]](function(_0xeec6xe){console[_0x822e[13]](_0x822e[30],_0xeec6xe);return handleError(_0xeec6xc,_0xeec6xe)})};exports[_0x822e[40]]=function(_0xeec6xb,_0xeec6xc){return sequelize[_0x822e[39]](function(_0xeec6x12){return veUtil[_0x822e[41]](_0xeec6xb,_0xeec6x12)})[_0x822e[17]](function(){return _0xeec6xc[_0x822e[25]](200)})[_0x822e[14]](sequelize.UniqueConstraintError,function(_0xeec6xe){_0xeec6xe[_0x822e[31]]=_0x822e[32];_0xeec6xe[_0x822e[33]]=_0x822e[34];console[_0x822e[13]](_0xeec6xe);return handleError(_0xeec6xc,_0xeec6xe)})[_0x822e[14]](function(_0xeec6xe){console[_0x822e[13]](_0xeec6xe);return handleError(_0xeec6xc,_0xeec6xe)})};exports[_0x822e[42]]=function(_0xeec6xb,_0xeec6xc,_0xeec6xd){return sequelize[_0x822e[39]](function(_0xeec6x12){return VoiceExtension[_0x822e[43]](_0xeec6xb[_0x822e[27]][_0x822e[26]])[_0x822e[17]](function(_0xeec6x10){if(!_0xeec6x10){return _0xeec6xc[_0x822e[25]](404)};return _0xeec6x10[_0x822e[42]]()})})[_0x822e[17]](function(){return _0xeec6xc[_0x822e[25]](204)})[_0x822e[14]](function(_0xeec6xe){console[_0x822e[13]](_0xeec6xe);return handleError(_0xeec6xc,_0xeec6xe)})};exports[_0x822e[44]]=function(_0xeec6xb,_0xeec6xc){VoiceExtension[_0x822e[42]]({where:{id:_0xeec6xb[_0x822e[18]][_0x822e[26]]},individualHooks:true})[_0x822e[17]](function(){return _0xeec6xc[_0x822e[25]](204)})[_0x822e[14]](function(_0xeec6xe){return handleError(_0xeec6xc,_0xeec6xe)})};function handleError(_0xeec6xc,_0xeec6xe){return _0xeec6xc[_0x822e[16]](500)[_0x822e[15]](_0xeec6xe)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var VoiceExtension = require('../../models').VoiceExtension;
+var Interval = require('../../models').Interval;
+var sequelize = require('../../models').sequelize;
+var Sequelize = require('../../models').Sequelize;
+var util = require('util');
+var async = require('async');
+var veUtil = require('../../utils/voice_extension');
+var Util = require('../../config/util');
+
+var Applications = veUtil.Applications;
+
+// Get list of extensions
+exports.index = function(req, res, next) {
+  return VoiceExtension
+    .scope('routes', 'application')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Get a single voice_extension or application
+exports.show = function(req, res) {
+  VoiceExtension
+    .scope('application')
+    .findOne({
+      where: {
+        id: req.params.id,
+        VoiceExtensionId: null
+      }
+    })
+    .then(function(voice_extension) {
+      if (!voice_extension) {
+        return res.sendStatus(404);
+      }
+      return res.send(voice_extension);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.create = function(req, res) {
+  var _route;
+  return sequelize.transaction(function(t) {
+      return VoiceExtension
+        .create(req.body, {
+          transaction: t
+        })
+        .then(function(route) {
+          _route = route;
+          if (req.body.Applications && Array.isArray(req.body.Applications) && req.body.Applications.length) {
+            return route;
+          }
+        })
+        .then(veUtil.createApps(req.body.Applications, t, res));
+    })
+    .then(function() {
+      return res.status(201).send(_route);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      err.message = 'Extension/context combination already exist';
+      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
+      return handleError(res, err);
+    })
+    .catch(sequelize.ValidationError, function(err) {
+      err.message = 'Extension/context combination already exist';
+      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
+      return handleError(res, err);
+    })
+    .catch(function(err) {
+      console.log('err', err);
+      return handleError(res, err);
+    });
+}
+
+
+
+// Updates an existing voice_extension in the DB.
+exports.update = function(req, res) {
+  return sequelize.transaction(function(t) {
+      return veUtil.routeUpdate(req, t);
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      err.message = 'Extension/context combination already exist';
+      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
+      console.log(err);
+      return handleError(res, err);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+}
+
+// Deletes a voice_extension from the DB.
+exports.destroy = function(req, res, next) {
+  return sequelize.transaction(function(t) {
+      return VoiceExtension
+        .findById(req.params.id)
+        .then(function(voice_extension) {
+          if (!voice_extension) {
+            return res.sendStatus(404);
+          }
+          return voice_extension.destroy();
+        });
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes from the DB.
+exports.bulkDestroy = function(req, res) {
+  VoiceExtension
+    .destroy({
+      where: {
+        id: req.query.id
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index aaa52ce..8da1778 100644 (file)
@@ -1 +1,34 @@
-var _0xdd27=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65"];_0xdd27[0];var VoiceExtension=require(_0xdd27[2])[_0xdd27[1]];exports[_0xdd27[3]]=function(_0xc5aex2){VoiceExtension[_0xdd27[4]](function(_0xc5aex3){onSave(_0xc5aex2,_0xc5aex3)});VoiceExtension[_0xdd27[5]](function(_0xc5aex3){onRemove(_0xc5aex2,_0xc5aex3)});VoiceExtension[_0xdd27[6]](function(_0xc5aex3){onUpdate(_0xc5aex2,_0xc5aex3)})};function onSave(_0xc5aex2,_0xc5aex3,_0xc5aex5){_0xc5aex2[_0xdd27[8]](_0xdd27[7],_0xc5aex3)}function onRemove(_0xc5aex2,_0xc5aex3,_0xc5aex5){_0xc5aex2[_0xdd27[8]](_0xdd27[9],_0xc5aex3)}function onUpdate(_0xc5aex2,_0xc5aex3,_0xc5aex5){_0xc5aex2[_0xdd27[8]](_0xdd27[10],_0xc5aex3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var VoiceExtension = require('../../models').VoiceExtension;
+
+exports.register = function(socket) {
+  VoiceExtension.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  VoiceExtension.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+  // VoiceExtension.afterBulkDestroy(function(doc) {//causes a maximum stack range error due to the object sent being too big!!
+  //   onRemove(socket, doc);
+  // });
+  VoiceExtension.afterUpdate(function(doc) {
+    onUpdate(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('voice_extension:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('voice_extension:remove', doc);
+}
+
+function onUpdate(socket, doc, cb) {
+  socket.emit('voice_extension:update', doc);
+}
index 8d6d595..0971536 100644 (file)
@@ -1 +1,20 @@
-var _0x307b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x67\x65\x74"];_0x307b[0];var should=require(_0x307b[1]);var app=require(_0x307b[2]);var request=require(_0x307b[3]);describe(_0x307b[4],function(){it(_0x307b[5],function(_0x36ddx4){request(app)[_0x307b[13]](_0x307b[12])[_0x307b[11]](200)[_0x307b[11]](_0x307b[10],/json/)[_0x307b[9]](function(_0x36ddx5,_0x36ddx6){if(_0x36ddx5){return _0x36ddx4(_0x36ddx5)};_0x36ddx6[_0x307b[8]][_0x307b[1]][_0x307b[7]][_0x307b[6]](Array);_0x36ddx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/voice/extensions', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/voice/extensions')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index d65aba6..59cc818 100644 (file)
@@ -1 +1,21 @@
-var _0x2915=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x74\x72\x65\x61\x6D","\x73\x74\x72\x65\x61\x6D","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x6C\x65\x73","\x73\x68\x6F\x77\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x6D\x6F\x68\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x6C\x65\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x2915[0];var express=require(_0x2915[1]);var controller=require(_0x2915[2]);var auth=require(_0x2915[3]);var router=express.Router();router[_0x2915[7]](_0x2915[4],auth[_0x2915[5]](),controller[_0x2915[6]]);router[_0x2915[7]](_0x2915[8],auth[_0x2915[5]](),controller[_0x2915[9]]);router[_0x2915[7]](_0x2915[10],auth[_0x2915[5]](),controller[_0x2915[11]]);router[_0x2915[7]](_0x2915[12],auth[_0x2915[5]](),controller[_0x2915[13]]);router[_0x2915[15]](_0x2915[4],auth[_0x2915[5]](),controller[_0x2915[14]]);router[_0x2915[15]](_0x2915[16],auth[_0x2915[5]](),controller[_0x2915[17]]);router[_0x2915[15]](_0x2915[12],auth[_0x2915[5]](),controller[_0x2915[18]]);router[_0x2915[20]](_0x2915[10],auth[_0x2915[5]](),controller[_0x2915[19]]);router[_0x2915[22]](_0x2915[4],auth[_0x2915[5]](),controller[_0x2915[21]]);router[_0x2915[22]](_0x2915[10],auth[_0x2915[5]](),controller[_0x2915[23]]);router[_0x2915[22]](_0x2915[12],auth[_0x2915[5]](),controller[_0x2915[24]]);module[_0x2915[25]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./voice_musiconhold.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/stream', auth.isAuthenticated(), controller.stream);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/files', auth.isAuthenticated(), controller.showAudioFiles);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/validate', auth.isAuthenticated(), controller.mohValidation);
+router.post('/:id/files', auth.isAuthenticated(), controller.addFiles);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:id/files', auth.isAuthenticated(), controller.deleteAudioFiles);
+
+module.exports = router;
index b6bc1dc..6c74d50 100644 (file)
@@ -1 +1,283 @@
-var _0x9cd1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73\x2D\x65\x78\x74\x72\x61","\x72\x65\x6D\x6F\x76\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x46\x69\x6C\x65\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x6A\x6F\x69\x6E","\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x2E\x77\x61\x76","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x73\x6F\x75\x6E\x64\x73","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x66\x69\x6C\x65\x73","\x72\x65\x61\x64\x64\x69\x72","\x64\x65\x6C\x65\x74\x65\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x2F","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x75\x6E\x6C\x69\x6E\x6B","\x6D\x6F\x68\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6C\x6F\x67","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x6D\x6F\x68","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x66\x69\x6C\x65\x20\x65\x72\x72\x6F\x72","\x4D\x45\x53\x53\x41\x47\x45\x5F\x46\x49\x4C\x45\x5F\x43\x52\x45\x41\x54\x49\x4F\x4E\x5F\x45\x52\x52\x4F\x52","\x63\x6F\x6D\x6D\x69\x74","\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x6D\x6B\x64\x69\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x70\x75\x73\x68","\x69\x64\x73","\x73\x74\x72\x65\x61\x6D","\x65\x6E\x63\x6F\x64\x65"];_0x9cd1[0];var fs=require(_0x9cd1[1]);var _=require(_0x9cd1[2]);var path=require(_0x9cd1[3]);var util=require(_0x9cd1[4]);var fse=require(_0x9cd1[5]);var remove=require(_0x9cd1[6]);var base64=require(_0x9cd1[7]);var config=require(_0x9cd1[8]);var Util=require(_0x9cd1[9]);var Sound=require(_0x9cd1[11])[_0x9cd1[10]];var sequelize=require(_0x9cd1[11])[_0x9cd1[12]];var VoiceMusicOnHold=require(_0x9cd1[11])[_0x9cd1[13]];exports[_0x9cd1[14]]=function(_0x5e1dxd,_0x5e1dxe){return VoiceMusicOnHold[_0x9cd1[21]](Util[_0x9cd1[20]](_0x5e1dxd[_0x9cd1[19]]))[_0x9cd1[18]](function(_0x5e1dx10){_0x5e1dxe[_0x9cd1[17]](200)[_0x9cd1[16]](_0x5e1dx10)})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[22]]=function(_0x5e1dxd,_0x5e1dxe){return VoiceMusicOnHold[_0x9cd1[26]](_0x5e1dxd[_0x9cd1[25]][_0x9cd1[24]])[_0x9cd1[18]](function(_0x5e1dx11){if(!_0x5e1dx11){return _0x5e1dxe[_0x9cd1[23]](404)};return _0x5e1dxe[_0x9cd1[16]](_0x5e1dx11)})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[27]]=function(_0x5e1dxd,_0x5e1dxe){var _0x5e1dx12;return VoiceMusicOnHold[_0x9cd1[26]](_0x5e1dxd[_0x9cd1[25]][_0x9cd1[24]])[_0x9cd1[18]](function(_0x5e1dx11){if(!_0x5e1dx11){return _0x5e1dxe[_0x9cd1[23]](404)};_0x5e1dx12=_0x5e1dx11;return Sound[_0x9cd1[41]]({where:{id:_0x5e1dxd[_0x9cd1[40]][_0x9cd1[39]]}})})[_0x9cd1[18]](function(_0x5e1dx13){var _0x5e1dx14=path[_0x9cd1[30]](config[_0x9cd1[28]],_0x9cd1[29]);var _0x5e1dx15;_0x5e1dx13[_0x9cd1[36]](function(_0x5e1dx16){_0x5e1dx15=path[_0x9cd1[30]](_0x5e1dx12[_0x9cd1[31]],_0x5e1dx16[_0x9cd1[32]]+_0x9cd1[33]);fse[_0x9cd1[35]](path[_0x9cd1[30]](_0x5e1dx14,_0x5e1dx16[_0x9cd1[34]]+_0x9cd1[33]),_0x5e1dx15)});fs[_0x9cd1[38]](_0x5e1dx15,parseInt(_0x9cd1[37],8));_0x5e1dxe[_0x9cd1[23]](200)})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[42]]=function(_0x5e1dxd,_0x5e1dxe){var _0x5e1dx17={};VoiceMusicOnHold[_0x9cd1[26]](_0x5e1dxd[_0x9cd1[25]][_0x9cd1[24]])[_0x9cd1[18]](function(_0x5e1dx11){if(!_0x5e1dx11){return _0x5e1dxe[_0x9cd1[23]](404)};_0x5e1dx17[_0x9cd1[3]]=_0x5e1dx11[_0x9cd1[31]];fs[_0x9cd1[44]](_0x5e1dx11[_0x9cd1[31]],function(_0x5e1dxf,_0x5e1dx18){if(!_0x5e1dxf){_0x5e1dx17[_0x9cd1[43]]=_0x5e1dx18;return _0x5e1dxe[_0x9cd1[16]](_0x5e1dx17)}else {throw _0x5e1dxf}})})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[45]]=function(_0x5e1dxd,_0x5e1dxe){VoiceMusicOnHold[_0x9cd1[26]](_0x5e1dxd[_0x9cd1[25]][_0x9cd1[24]])[_0x9cd1[18]](function(_0x5e1dx11){if(!_0x5e1dx11){return _0x5e1dxe[_0x9cd1[23]](404)};var _0x5e1dx19=_0x5e1dx11[_0x9cd1[31]]+_0x9cd1[46]+_0x5e1dxd[_0x9cd1[19]][_0x9cd1[47]];fs[_0x9cd1[48]](_0x5e1dx19,function(_0x5e1dxf){if(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)}else {return _0x5e1dxe[_0x9cd1[23]](204)}})})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[49]]=function(_0x5e1dxd,_0x5e1dxe){console[_0x9cd1[50]](_0x5e1dxd[_0x9cd1[40]]);VoiceMusicOnHold[_0x9cd1[41]]({where:{name:_0x5e1dxd[_0x9cd1[40]][_0x9cd1[51]]}})[_0x9cd1[18]](function(_0x5e1dx1a){if(!_0x5e1dx1a){return _0x5e1dxe[_0x9cd1[23]](404)};return _0x5e1dxe[_0x9cd1[16]](_0x5e1dx1a)})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[52]]=function(_0x5e1dxd,_0x5e1dxe){return sequelize[_0x9cd1[60]]()[_0x9cd1[18]](function(_0x5e1dx1b){_0x5e1dxd[_0x9cd1[40]][_0x9cd1[31]]=path[_0x9cd1[30]](config[_0x9cd1[28]],_0x9cd1[53],_0x5e1dxd[_0x9cd1[40]][_0x9cd1[51]]);return VoiceMusicOnHold[_0x9cd1[52]](_0x5e1dxd[_0x9cd1[40]],{transaction:_0x5e1dx1b})[_0x9cd1[18]](function(_0x5e1dx11){fs[_0x9cd1[59]](_0x5e1dx11[_0x9cd1[31]],parseInt(_0x9cd1[37],8),function(_0x5e1dxf){if(_0x5e1dxf){console[_0x9cd1[50]](_0x9cd1[55]);_0x5e1dx1b[_0x9cd1[54]]();return _0x5e1dxe[_0x9cd1[17]](500)[_0x9cd1[16]]({message:_0x9cd1[56]})};_0x5e1dx1b[_0x9cd1[57]]();console[_0x9cd1[50]](_0x9cd1[58]);return _0x5e1dxe[_0x9cd1[17]](201)[_0x9cd1[16]](_0x5e1dx11)})})[_0x9cd1[15]](function(_0x5e1dxf){_0x5e1dx1b[_0x9cd1[54]]()})})};exports[_0x9cd1[61]]=function(_0x5e1dxd,_0x5e1dxe){if(_0x5e1dxd[_0x9cd1[40]][_0x9cd1[24]]){delete _0x5e1dxd[_0x9cd1[40]][_0x9cd1[24]]};return VoiceMusicOnHold[_0x9cd1[26]](_0x5e1dxd[_0x9cd1[25]][_0x9cd1[24]])[_0x9cd1[18]](function(_0x5e1dx11){if(!_0x5e1dx11){return _0x5e1dxe[_0x9cd1[23]](404)};var _0x5e1dx1c=_[_0x9cd1[64]](_0x5e1dx11,_0x5e1dxd[_0x9cd1[40]]);return _0x5e1dx1c[_0x9cd1[65]]()})[_0x9cd1[18]](function(_0x5e1dx11){return _0x5e1dxe[_0x9cd1[17]](200)[_0x9cd1[16]](_0x5e1dx11)})[_0x9cd1[15]](function(_0x5e1dxf){console[_0x9cd1[63]](_0x9cd1[62],_0x5e1dxf);return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[66]]=function(_0x5e1dxd,_0x5e1dxe){var _0x5e1dx1d;return sequelize[_0x9cd1[60]](function(_0x5e1dx1b){return VoiceMusicOnHold[_0x9cd1[26]](_0x5e1dxd[_0x9cd1[25]][_0x9cd1[24]])[_0x9cd1[18]](function(_0x5e1dx11){if(!_0x5e1dx11){return _0x5e1dxe[_0x9cd1[23]](404)};_0x5e1dx1d=_0x5e1dx11;return _0x5e1dx11[_0x9cd1[66]]({transaction:_0x5e1dx1b})})[_0x9cd1[18]](function(){remove(_0x5e1dx1d[_0x9cd1[31]],function(_0x5e1dxf){if(_0x5e1dxf){console[_0x9cd1[50]](_0x5e1dxf)};return _0x5e1dxe[_0x9cd1[23]](204)})})})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[67]]=function(_0x5e1dxd,_0x5e1dxe){var _0x5e1dx1e;return sequelize[_0x9cd1[60]](function(_0x5e1dx1b){return VoiceMusicOnHold[_0x9cd1[41]]({where:{id:_0x5e1dxd[_0x9cd1[19]][_0x9cd1[70]]}})[_0x9cd1[18]](function(_0x5e1dx20){if(!_0x5e1dx20){return _0x5e1dxe[_0x9cd1[23]](404)};_0x5e1dx1e=_0x5e1dx20;var _0x5e1dx21=[];_0x5e1dx20[_0x9cd1[36]](function(_0x5e1dx1f){_0x5e1dx21[_0x9cd1[69]](_0x5e1dx1f[_0x9cd1[66]]({transaction:_0x5e1dx1b}))});return _0x5e1dx21})[_0x9cd1[68]]()[_0x9cd1[18]](function(){_0x5e1dx1e[_0x9cd1[36]](function(_0x5e1dx1f){remove(_0x5e1dx1f[_0x9cd1[31]],function(_0x5e1dxf){if(_0x5e1dxf){console[_0x9cd1[50]](_0x5e1dxf);throw _0x5e1dxf}})})})})[_0x9cd1[18]](function(){return _0x5e1dxe[_0x9cd1[23]](204)})[_0x9cd1[15]](function(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)})};exports[_0x9cd1[71]]=function(_0x5e1dxd,_0x5e1dxe){var _0x5e1dx22=decodeURI(_0x5e1dxd[_0x9cd1[19]][_0x9cd1[3]]);base64[_0x9cd1[72]](_0x5e1dx22,function(_0x5e1dxf,_0x5e1dx23){if(_0x5e1dxf){return handleError(_0x5e1dxe,_0x5e1dxf)}else {return _0x5e1dxe[_0x9cd1[17]](200)[_0x9cd1[16]](_0x5e1dx23)}})};function handleError(_0x5e1dxe,_0x5e1dxf){return _0x5e1dxe[_0x9cd1[17]](500)[_0x9cd1[16]](_0x5e1dxf)}
\ No newline at end of file
+'use strict';
+
+var fs = require('fs');
+var _ = require('lodash');
+var path = require('path');
+var util = require('util');
+var fse = require('fs-extra');
+var remove = require('remove');
+var base64 = require('file-base64');
+
+var config = require('../../config/environment');
+var Util = require('../../config/util');
+
+var Sound = require('../../models').Sound;
+var sequelize = require('../../models').sequelize;
+var VoiceMusicOnHold = require('../../models').VoiceMusicOnHold;
+
+
+// Get list of voice_musiconholds
+exports.index = function(req, res) {
+  return VoiceMusicOnHold
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single voiceMusiconhold
+exports.show = function(req, res) {
+  return VoiceMusicOnHold
+    .findById(req.params.id)
+    .then(function(voiceMusiconhold) {
+      if (!voiceMusiconhold) {
+        return res.sendStatus(404);
+      }
+      return res.send(voiceMusiconhold);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Add files to moh class
+exports.addFiles = function(req, res) {
+  var _voiceMusiconhold;
+  return VoiceMusicOnHold
+    .findById(req.params.id)
+    .then(function(voiceMusiconhold) {
+      if (!voiceMusiconhold) {
+        return res.sendStatus(404);
+      }
+      _voiceMusiconhold = voiceMusiconhold;
+
+      return Sound
+        .findAll({
+          where: {
+            id: req.body.sounds
+          }
+        });
+    })
+    .then(function(soundFiles) {
+      var origin = path.join(config.root, 'server/files/sounds/converted');
+      var dest;
+      soundFiles.forEach(function(elem) {
+        dest = path.join(_voiceMusiconhold.directory, elem.display_name + '.wav');
+        fse.copySync(path.join(origin, elem.save_name + '.wav'), dest);
+      });
+      fs.chmodSync(dest, parseInt('0777', 8));
+      res.sendStatus(200);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.showAudioFiles = function(req, res) {
+  var fileObject = {};
+  VoiceMusicOnHold
+    .findById(req.params.id)
+    .then(function(voiceMusiconhold) {
+      if (!voiceMusiconhold) {
+        return res.sendStatus(404);
+      }
+      fileObject.path = voiceMusiconhold.directory;
+      fs.readdir(voiceMusiconhold.directory, function(err, files) {
+        if (!err) {
+          fileObject.files = files;
+          return res.send(fileObject);
+        } else {
+          throw err;
+        }
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.deleteAudioFiles = function(req, res) {
+  VoiceMusicOnHold
+    .findById(req.params.id)
+    .then(function(voiceMusiconhold) {
+      if (!voiceMusiconhold) {
+        return res.sendStatus(404);
+      }
+      var deletePath = voiceMusiconhold.directory + '/' + req.query.filename;
+      fs.unlink(deletePath, function(err) {
+        if (err) {
+          return handleError(res, err);
+        } else {
+          return res.sendStatus(204);
+        }
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Validate the existence of a route
+exports.mohValidation = function(req, res) {
+  console.log(req.body);
+  VoiceMusicOnHold
+    .findAll({
+      where: {
+        name: req.body.name,
+      }
+    })
+    .then(function(voice_mohs) {
+      if (!voice_mohs) {
+        return res.sendStatus(404);
+      }
+      return res.send(voice_mohs);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new voiceMusiconhold in the DB.
+exports.create = function(req, res) {
+  return sequelize.transaction().then(function(t) {
+    req.body.directory = path.join(config.root, 'server/files/moh', req.body.name);
+    return VoiceMusicOnHold
+      .create(req.body, {
+        transaction: t
+      })
+      .then(function(voiceMusiconhold) {
+        fs.mkdir(voiceMusiconhold.directory, parseInt('0777', 8), function(err) {
+          if (err) {
+            console.log('file error');
+            t.rollback();
+            return res.status(500).send({
+              message: 'MESSAGE_FILE_CREATION_ERROR'
+            });
+          }
+          t.commit();
+          console.log('file created');
+          return res.status(201).send(voiceMusiconhold);
+        });
+      })
+      .catch(function(err) {
+        t.rollback();
+      });
+  })
+};
+
+// Updates an existing voiceMusiconhold in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return VoiceMusicOnHold
+    .findById(req.params.id)
+    .then(function(voiceMusiconhold) {
+      if (!voiceMusiconhold) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(voiceMusiconhold, req.body);
+
+      return updated
+        .save();
+    })
+    .then(function(voiceMusiconhold) {
+      return res.status(200).send(voiceMusiconhold);
+    })
+    .catch(function(err) {
+      console.error('err', err);
+      return handleError(res, err);
+    });
+};
+
+// Deletes a voiceMusiconhold from the DB.
+exports.destroy = function(req, res) {
+  var _voicemoh;
+  return sequelize.transaction(function(t) {
+      return VoiceMusicOnHold
+        .findById(req.params.id)
+        .then(function(voiceMusiconhold) {
+          if (!voiceMusiconhold) {
+            return res.sendStatus(404);
+          }
+          _voicemoh = voiceMusiconhold;
+          return voiceMusiconhold.destroy({
+            transaction: t
+          });
+        })
+        .then(function() {
+          remove(_voicemoh.directory, function(err) {
+            if (err) {
+              console.log(err);
+            }
+            return res.sendStatus(204);
+          });
+        })
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes multiple voice_musiconholds from the DB.
+exports.bulkDestroy = function(req, res) {
+  var _voicemohs;
+  return sequelize.transaction(function(t) {
+      return VoiceMusicOnHold
+        .findAll({
+          where: {
+            id: req.query.ids
+          }
+        })
+        .then(function(voice_musiconholds) {
+          if (!voice_musiconholds) {
+            return res.sendStatus(404);
+          }
+          _voicemohs = voice_musiconholds;
+          var bulkDest = [];
+          voice_musiconholds.forEach(function(element) {
+            bulkDest.push(element.destroy({
+              transaction: t
+            }));
+          });
+          return bulkDest;
+        })
+        .all()
+        .then(function() {
+          _voicemohs.forEach(function(element) {
+            remove(element.directory, function(err) {
+              if (err) {
+                console.log(err);
+                throw err
+              }
+            });
+          })
+        });
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// stream a moh file
+exports.stream = function(req, res) {
+  var filepath = decodeURI(req.query.path);
+  base64.encode(filepath, function(err, base64String) {
+    if (err) {
+      return handleError(res, err);
+    } else {
+      return res.status(200).send(base64String);
+    }
+  });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index d0301cc..efa073f 100644 (file)
@@ -1 +1,24 @@
-var _0x9024=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0x9024[0];var VoiceMusicOnHold=require(_0x9024[2])[_0x9024[1]];exports[_0x9024[3]]=function(_0x4853x2){VoiceMusicOnHold[_0x9024[4]](function(_0x4853x3){onSave(_0x4853x2,_0x4853x3)});VoiceMusicOnHold[_0x9024[5]](function(_0x4853x3){onRemove(_0x4853x2,_0x4853x3)})};function onSave(_0x4853x2,_0x4853x3,_0x4853x5){_0x4853x2[_0x9024[7]](_0x9024[6],_0x4853x3)}function onRemove(_0x4853x2,_0x4853x3,_0x4853x5){_0x4853x2[_0x9024[7]](_0x9024[8],_0x4853x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var VoiceMusicOnHold = require('../../models').VoiceMusicOnHold;
+
+exports.register = function(socket) {
+  VoiceMusicOnHold.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  VoiceMusicOnHold.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('voice_musiconhold:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('voice_musiconhold:remove', doc);
+}
index f574a81..e992daf 100644 (file)
@@ -1 +1,20 @@
-var _0xde93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x67\x65\x74"];_0xde93[0];var should=require(_0xde93[1]);var app=require(_0xde93[2]);var request=require(_0xde93[3]);describe(_0xde93[4],function(){it(_0xde93[5],function(_0x56e6x4){request(app)[_0xde93[13]](_0xde93[12])[_0xde93[11]](200)[_0xde93[11]](_0xde93[10],/json/)[_0xde93[9]](function(_0x56e6x5,_0x56e6x6){if(_0x56e6x5){return _0x56e6x4(_0x56e6x5)};_0x56e6x6[_0xde93[8]][_0xde93[1]][_0xde93[7]][_0xde93[6]](Array);_0x56e6x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/voice/musiconhold', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/voice/musiconhold')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index d397cc2..f864580 100644 (file)
@@ -1 +1,19 @@
-var _0x9339=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6E\x61\x6D\x65","\x73\x68\x6F\x77","\x2F\x3A\x6E\x61\x6D\x65\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9339[0];var express=require(_0x9339[1]);var controller=require(_0x9339[2]);var auth=require(_0x9339[3]);var router=express.Router();router[_0x9339[7]](_0x9339[4],auth[_0x9339[5]](),controller[_0x9339[6]]);router[_0x9339[7]](_0x9339[8],auth[_0x9339[5]](),controller[_0x9339[9]]);router[_0x9339[7]](_0x9339[10],auth[_0x9339[5]](),controller[_0x9339[11]]);router[_0x9339[13]](_0x9339[4],auth[_0x9339[5]](),controller[_0x9339[12]]);router[_0x9339[13]](_0x9339[10],auth[_0x9339[5]](),controller[_0x9339[14]]);router[_0x9339[16]](_0x9339[8],auth[_0x9339[5]](),controller[_0x9339[15]]);router[_0x9339[18]](_0x9339[10],auth[_0x9339[5]](),controller[_0x9339[17]]);router[_0x9339[18]](_0x9339[4],auth[_0x9339[5]](),controller[_0x9339[19]]);router[_0x9339[18]](_0x9339[8],auth[_0x9339[5]](),controller[_0x9339[20]]);module[_0x9339[21]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./voice_queue.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:name', auth.isAuthenticated(), controller.show);
+router.get('/:name/agents', auth.isAuthenticated(), controller.showAgents);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:name/agents', auth.isAuthenticated(), controller.addAgents);
+router.put('/:name', auth.isAuthenticated(), controller.update);
+router.delete('/:name/agents', auth.isAuthenticated(), controller.removeAgents);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:name', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index e8a74e8..4143afc 100644 (file)
@@ -1 +1,211 @@
-var _0xbe7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74","\x69\x64","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x66\x6F\x72\x45\x61\x63\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xbe7f[0];var _=require(_0xbe7f[1]);var util=require(_0xbe7f[2]);var Util=require(_0xbe7f[3]);var sequelize=require(_0xbe7f[5])[_0xbe7f[4]];var User=require(_0xbe7f[5])[_0xbe7f[6]];var VoiceQueue=require(_0xbe7f[5])[_0xbe7f[7]];var UserHasVoiceQueue=require(_0xbe7f[5])[_0xbe7f[8]];var VoiceExtension=require(_0xbe7f[5])[_0xbe7f[9]];exports[_0xbe7f[10]]=function(_0x9d8dx9,_0x9d8dxa){return VoiceQueue[_0xbe7f[17]](Util[_0xbe7f[16]](_0x9d8dx9[_0xbe7f[15]]))[_0xbe7f[14]](function(_0x9d8dxc){_0x9d8dxa[_0xbe7f[13]](200)[_0xbe7f[12]](_0x9d8dxc)})[_0xbe7f[11]](function(_0x9d8dxb){return handleError(_0x9d8dxa,_0x9d8dxb)})};exports[_0xbe7f[18]]=function(_0x9d8dx9,_0x9d8dxa){return VoiceQueue[_0xbe7f[22]](_0x9d8dx9[_0xbe7f[21]][_0xbe7f[20]])[_0xbe7f[14]](function(_0x9d8dxd){if(!_0x9d8dxd){return _0x9d8dxa[_0xbe7f[19]](404)};return _0x9d8dxa[_0xbe7f[12]](_0x9d8dxd)})[_0xbe7f[11]](function(_0x9d8dxb){return handleError(_0x9d8dxa,_0x9d8dxb)})};exports[_0xbe7f[23]]=function(_0x9d8dx9,_0x9d8dxa){return VoiceQueue[_0xbe7f[22]](_0x9d8dx9[_0xbe7f[21]][_0xbe7f[20]])[_0xbe7f[14]](function(_0x9d8dxf){if(!_0x9d8dxf){return _0x9d8dxa[_0xbe7f[19]](404)};return _0x9d8dxf[_0xbe7f[28]]({where:{role:_0xbe7f[24]},attributes:[_0xbe7f[25],_0xbe7f[20],_0xbe7f[26],_0xbe7f[27]]})})[_0xbe7f[14]](function(_0x9d8dxe){return _0x9d8dxa[_0xbe7f[13]](200)[_0xbe7f[12]](_0x9d8dxe)})[_0xbe7f[11]](function(_0x9d8dxb){return handleError(_0x9d8dxa,_0x9d8dxb)})};exports[_0xbe7f[29]]=function(_0x9d8dx9,_0x9d8dxa){return VoiceQueue[_0xbe7f[29]](_0x9d8dx9[_0xbe7f[40]])[_0xbe7f[14]](function(_0x9d8dxd){return _0x9d8dxa[_0xbe7f[13]](201)[_0xbe7f[12]](_0x9d8dxd)})[_0xbe7f[11]](sequelize.UniqueConstraintError,function(_0x9d8dxb){var _0x9d8dx10=[];_0x9d8dxb[_0xbe7f[34]][_0xbe7f[33]](function(_0x9d8dx11){switch(_0x9d8dx11[_0xbe7f[32]]){case _0xbe7f[31]:_0x9d8dx10[_0xbe7f[30]](_0xbe7f[20]);break;default:_0x9d8dx10[_0xbe7f[30]](_0x9d8dx11[_0xbe7f[32]])}});_0x9d8dx10[_0xbe7f[30]](_0xbe7f[35]);_0x9d8dxb[_0xbe7f[36]]=_0x9d8dx10[_0xbe7f[37]]();_0x9d8dxb[_0xbe7f[38]]=_0xbe7f[39];return _0x9d8dxa[_0xbe7f[13]](500)[_0xbe7f[12]](_0x9d8dxb)})[_0xbe7f[11]](function(_0x9d8dxb){return handleError(_0x9d8dxa,_0x9d8dxb)})};exports[_0xbe7f[41]]=function(_0x9d8dx9,_0x9d8dxa){if(_0x9d8dx9[_0xbe7f[40]][_0xbe7f[20]]){delete _0x9d8dx9[_0xbe7f[40]][_0xbe7f[20]]};return VoiceQueue[_0xbe7f[22]](_0x9d8dx9[_0xbe7f[21]][_0xbe7f[20]])[_0xbe7f[14]](function(_0x9d8dxd){if(!_0x9d8dxd){return _0x9d8dxa[_0xbe7f[19]](404)};var _0x9d8dx12=_[_0xbe7f[43]](_0x9d8dxd,_0x9d8dx9[_0xbe7f[40]]);return _0x9d8dx12[_0xbe7f[44]]()})[_0xbe7f[14]](function(_0x9d8dxd){return _0x9d8dxa[_0xbe7f[13]](200)[_0xbe7f[12]](_0x9d8dxd)})[_0xbe7f[11]](function(_0x9d8dxb){console[_0xbe7f[42]](_0x9d8dxb);return handleError(_0x9d8dxa,_0x9d8dxb)})};exports[_0xbe7f[45]]=function(_0x9d8dx9,_0x9d8dxa,_0x9d8dx13){return User[_0xbe7f[52]]({where:{id:{$in:_0x9d8dx9[_0xbe7f[40]][_0xbe7f[51]]}}})[_0xbe7f[14]](function(_0x9d8dx14){var _0x9d8dx15=_[_0xbe7f[49]](_0x9d8dx14,function(_0x9d8dx16){return {queue:_0x9d8dx9[_0xbe7f[21]][_0xbe7f[20]],location:util[_0xbe7f[47]](_0xbe7f[46],_0x9d8dx16[_0xbe7f[20]]),membername:_0x9d8dx16[_0xbe7f[20]],UserId:_0x9d8dx16[_0xbe7f[25]],penalty:_0x9d8dx9[_0xbe7f[40]][_0xbe7f[48]]}});return UserHasVoiceQueue[_0xbe7f[50]](_0x9d8dx15,{individualHooks:true})})[_0xbe7f[14]](function(){return _0x9d8dxa[_0xbe7f[19]](200)})[_0xbe7f[11]](function(_0x9d8dxb){console[_0xbe7f[42]](_0x9d8dxb);return _0x9d8dx13(_0x9d8dxb)})};exports[_0xbe7f[53]]=function(_0x9d8dx9,_0x9d8dxa,_0x9d8dx13){return UserHasVoiceQueue[_0xbe7f[54]]({where:{UserId:_0x9d8dx9[_0xbe7f[15]][_0xbe7f[51]],queue:_0x9d8dx9[_0xbe7f[21]][_0xbe7f[20]]},individualHooks:true})[_0xbe7f[14]](function(){return _0x9d8dxa[_0xbe7f[19]](202)})[_0xbe7f[11]](function(_0x9d8dxb){return _0x9d8dx13(_0x9d8dxb)})};exports[_0xbe7f[54]]=function(_0x9d8dx9,_0x9d8dxa){return VoiceQueue[_0xbe7f[54]]({where:{name:_0x9d8dx9[_0xbe7f[21]][_0xbe7f[20]]},individualHooks:true})[_0xbe7f[14]](function(){return _0x9d8dxa[_0xbe7f[19]](204)})[_0xbe7f[11]](function(_0x9d8dxb){return handleError(_0x9d8dxa,_0x9d8dxb)})};exports[_0xbe7f[55]]=function(_0x9d8dx9,_0x9d8dxa){return VoiceQueue[_0xbe7f[54]]({where:{name:_0x9d8dx9[_0xbe7f[15]][_0xbe7f[56]]},individualHooks:true})[_0xbe7f[14]](function(){return _0x9d8dxa[_0xbe7f[19]](204)})[_0xbe7f[11]](function(_0x9d8dxb){return handleError(_0x9d8dxa,_0x9d8dxb)})};function handleError(_0x9d8dxa,_0x9d8dxb){return _0x9d8dxa[_0xbe7f[13]](500)[_0xbe7f[12]](_0x9d8dxb)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+
+var util = require('util');
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var User = require('../../models').User;
+var VoiceQueue = require('../../models').VoiceQueue;
+var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
+var VoiceExtension = require('../../models').VoiceExtension;
+
+// Get list of voiceQueues
+exports.index = function(req, res) {
+  return VoiceQueue
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single voiceQueue
+exports.show = function(req, res) {
+  return VoiceQueue
+    .findById(req.params.name)
+    .then(function(voiceQueue) {
+      if (!voiceQueue) {
+        return res.sendStatus(404);
+      }
+      return res.send(voiceQueue);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single queue
+exports.showAgents = function(req, res) {
+  return VoiceQueue
+    .findById(req.params.name)
+    .then(function(queue) {
+      if (!queue) {
+        return res.sendStatus(404);
+      }
+      return queue
+        .getUsers({
+          where: {
+            role: 'agent'
+          },
+          attributes: ['id', 'name', 'fullname', 'email']
+        });
+    })
+    .then(function(agents) {
+      return res.status(200).send(agents);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new voiceQueue in the DB.
+exports.create = function(req, res) {
+  return VoiceQueue
+    .create(req.body)
+    .then(function(voiceQueue) {
+      return res.status(201).send(voiceQueue);
+    })
+    .catch(sequelize.UniqueConstraintError, function(err) {
+      var paths = [];
+
+      err.errors.forEach(function(error) {
+        switch (error.path) {
+          case 'PRIMARY':
+            paths.push('name');
+            break;
+          default:
+            paths.push(error.path);
+        }
+      });
+
+      paths.push(' must be unique');
+      err.message = paths.join();
+      err.translatedMessage = 'MESSAGE_EXIST_QUEUE';
+
+      return res.status(500).send(err);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing voiceQueue in the DB.
+exports.update = function(req, res) {
+  if (req.body.name) {
+    delete req.body.name;
+  }
+
+  return VoiceQueue
+    .findById(req.params.name)
+    .then(function(voiceQueue) {
+      if (!voiceQueue) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(voiceQueue, req.body);
+      return updated
+        .save();
+    })
+    .then(function(voiceQueue) {
+      return res.status(200).send(voiceQueue);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+
+// Add agents to voice queues
+exports.addAgents = function(req, res, next) {
+  return User
+    .findAll({
+      where: {
+        id: {
+          $in: req.body.agents
+        }
+      }
+    })
+    .then(function(users) {
+      var userHasVoiceQueues = _.map(users, function(user) {
+        return {
+          queue: req.params.name,
+          location: util.format('SIP/%s', user.name),
+          membername: user.name,
+          UserId: user.id,
+          penalty: req.body.penalty
+        };
+      });
+
+      return UserHasVoiceQueue
+        .bulkCreate(userHasVoiceQueues, {
+          individualHooks: true
+        });
+    })
+    .then(function() {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return next(err);
+    });
+};
+
+exports.removeAgents = function(req, res, next) {
+  return UserHasVoiceQueue
+    .destroy({
+      where: {
+        UserId: req.query.agents,
+        queue: req.params.name
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(202);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Deletes a voiceQueue from the DB.
+exports.destroy = function(req, res) {
+  return VoiceQueue
+    .destroy({
+      where: {
+        name: req.params.name
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes multiple voiceQueues from the DB.
+exports.bulkDestroy = function(req, res) {
+  return VoiceQueue
+    .destroy({
+      where: {
+        name: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index bf8bba6..6cb2204 100644 (file)
@@ -1 +1,24 @@
-var _0xee76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0xee76[0];var VoiceQueue=require(_0xee76[2])[_0xee76[1]];exports[_0xee76[3]]=function(_0xfd1fx2){VoiceQueue[_0xee76[4]](function(_0xfd1fx3){onSave(_0xfd1fx2,_0xfd1fx3)});VoiceQueue[_0xee76[5]](function(_0xfd1fx3){onRemove(_0xfd1fx2,_0xfd1fx3)})};function onSave(_0xfd1fx2,_0xfd1fx3,_0xfd1fx5){_0xfd1fx2[_0xee76[7]](_0xee76[6],_0xfd1fx3)}function onRemove(_0xfd1fx2,_0xfd1fx3,_0xfd1fx5){_0xfd1fx2[_0xee76[7]](_0xee76[8],_0xfd1fx3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var VoiceQueue = require('../../models').VoiceQueue;
+
+exports.register = function(socket) {
+  VoiceQueue.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  VoiceQueue.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('voice_queue:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('voice_queue:remove', doc);
+}
index e58bc05..61bbb0d 100644 (file)
@@ -1 +1,18 @@
-var _0x7830=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x7830[0];var express=require(_0x7830[1]);var auth=require(_0x7830[2]);var controller=require(_0x7830[3]);var router=express.Router();router[_0x7830[7]](_0x7830[4],auth[_0x7830[5]](),controller[_0x7830[6]]);router[_0x7830[7]](_0x7830[8],auth[_0x7830[5]](),controller[_0x7830[9]]);router[_0x7830[7]](_0x7830[10],auth[_0x7830[5]](),controller[_0x7830[11]]);router[_0x7830[13]](_0x7830[4],auth[_0x7830[5]](),controller[_0x7830[12]]);router[_0x7830[15]](_0x7830[8],auth[_0x7830[5]](),controller[_0x7830[14]]);router[_0x7830[16]](_0x7830[8],auth[_0x7830[5]](),controller[_0x7830[14]]);router[_0x7830[18]](_0x7830[4],auth[_0x7830[5]](),controller[_0x7830[17]]);router[_0x7830[18]](_0x7830[8],auth[_0x7830[5]](),controller[_0x7830[19]]);module[_0x7830[20]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./voice_recording.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/stream', auth.isAuthenticated(), controller.getStream);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 6919783..0c800bc 100644 (file)
@@ -1 +1,172 @@
-var _0x98d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x63\x61\x75\x73\x65","\x63\x6F\x64\x65","\x45\x4E\x4F\x45\x4E\x54","\x4E\x6F\x20\x66\x69\x6C\x65\x20\x6F\x72\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x46\x49\x4C\x45\x5F\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x4F\x52\x59","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x77\x68\x65\x72\x65","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x6F\x72\x64\x65\x72","\x25","\x66\x6F\x72\x45\x61\x63\x68","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x76\x61\x6C\x75\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0x98d4[0];var _=require(_0x98d4[1]);var util=require(_0x98d4[2]);var VoiceRecording=require(_0x98d4[4])[_0x98d4[3]];var Promise=require(_0x98d4[5]);var base64=require(_0x98d4[6]);var fs=require(_0x98d4[7]);function handleError(_0xee9bx8){return function(_0xee9bx9){if(_0xee9bx9[_0x98d4[8]]&&_0xee9bx9[_0x98d4[8]][_0x98d4[9]]===_0x98d4[10]){_0xee9bx9={message:_0x98d4[11],translatedMessage:_0x98d4[12]}};return _0xee9bx8[_0x98d4[14]](500)[_0x98d4[13]](_0xee9bx9)}}function responseWithResult(_0xee9bx8,_0xee9bxb){_0xee9bxb=_0xee9bxb||200;return function(_0xee9bxc){if(_0xee9bxc){_0xee9bx8[_0x98d4[14]](_0xee9bxb)[_0x98d4[15]](_0xee9bxc)}}}function handleEntityNotFound(_0xee9bx8){return function(_0xee9bxc){if(!_0xee9bxc){_0xee9bx8[_0x98d4[14]](404)[_0x98d4[16]]();return null};return _0xee9bxc}}function saveUpdates(_0xee9bxf){return function(_0xee9bxc){return _0xee9bxc[_0x98d4[17]](_0xee9bxf)}}function removeEntity(_0xee9bx8){return function(_0xee9bxc){if(_0xee9bxc){return _0xee9bxc[_0x98d4[19]]()[_0x98d4[18]](function(){_0xee9bx8[_0x98d4[14]](204)[_0x98d4[16]]()})}}}function getQuery(_0xee9bx12){var _0xee9bx13={};_0xee9bx13[_0x98d4[20]]={};_[_0x98d4[25]](_0xee9bx12,function(_0xee9bx14,_0xee9bx15){switch(_0xee9bx15){case _0x98d4[21]:;case _0x98d4[22]:_0xee9bx13[_0xee9bx15]=Number(_0xee9bx14);break;case _0x98d4[23]:_0xee9bx13[_0xee9bx15]=_0xee9bx14;break;default:_0xee9bx13[_0x98d4[20]][_0xee9bx15]={$like:_0x98d4[24]+_0xee9bx14+_0x98d4[24]}}});return _0xee9bx13}exports[_0x98d4[26]]=function(_0xee9bx16,_0xee9bx8){var _0xee9bx13=getQuery(_0xee9bx16[_0x98d4[27]]);return VoiceRecording[_0x98d4[29]](_0xee9bx13)[_0x98d4[18]](responseWithResult(_0xee9bx8))[_0x98d4[28]](handleError(_0xee9bx8))};exports[_0x98d4[30]]=function(_0xee9bx16,_0xee9bx8){return VoiceRecording[_0x98d4[33]](_0xee9bx16[_0x98d4[32]][_0x98d4[31]])[_0x98d4[18]](handleEntityNotFound(_0xee9bx8))[_0x98d4[18]](responseWithResult(_0xee9bx8))[_0x98d4[28]](handleError(_0xee9bx8))};exports[_0x98d4[34]]=function(_0xee9bx16,_0xee9bx8){return VoiceRecording[_0x98d4[33]](_0xee9bx16[_0x98d4[32]][_0x98d4[31]])[_0x98d4[18]](function(_0xee9bx19){var _0xee9bx1a=Promise[_0x98d4[38]](fs[_0x98d4[37]]);return _0xee9bx1a(_0xee9bx19[_0x98d4[39]])})[_0x98d4[18]](function(_0xee9bx18){var _0xee9bx17= new Buffer(_0xee9bx18,_0x98d4[36]).toString(_0x98d4[35]);return _0xee9bx17})[_0x98d4[18]](function(_0xee9bx17){return _0xee9bx8[_0x98d4[14]](200)[_0x98d4[13]]({downloadString:_0xee9bx17})})[_0x98d4[28]](handleError(_0xee9bx8))};exports[_0x98d4[40]]=function(_0xee9bx16,_0xee9bx8){return VoiceRecording[_0x98d4[40]](_0xee9bx16[_0x98d4[41]])[_0x98d4[18]](responseWithResult(_0xee9bx8,201))[_0x98d4[28]](handleError(_0xee9bx8))};exports[_0x98d4[42]]=function(_0xee9bx16,_0xee9bx8){if(_0xee9bx16[_0x98d4[41]][_0x98d4[31]]){delete _0xee9bx16[_0x98d4[41]][_0x98d4[31]]};return VoiceRecording[_0x98d4[33]](_0xee9bx16[_0x98d4[32]][_0x98d4[31]])[_0x98d4[18]](handleEntityNotFound(_0xee9bx8))[_0x98d4[18]](saveUpdates(_0xee9bx16[_0x98d4[41]]))[_0x98d4[18]](responseWithResult(_0xee9bx8))[_0x98d4[28]](handleError(_0xee9bx8))};exports[_0x98d4[19]]=function(_0xee9bx16,_0xee9bx8){return VoiceRecording[_0x98d4[33]](_0xee9bx16[_0x98d4[32]][_0x98d4[31]])[_0x98d4[18]](handleEntityNotFound(_0xee9bx8))[_0x98d4[18]](removeEntity(_0xee9bx8))[_0x98d4[28]](handleError(_0xee9bx8))};exports[_0x98d4[43]]=function(_0xee9bx16,_0xee9bx8){return VoiceRecording[_0x98d4[19]]({where:{uniqueid:_0xee9bx16[_0x98d4[27]][_0x98d4[45]]},individualHooks:true})[_0x98d4[18]](function(){return _0xee9bx8[_0x98d4[44]](204)})[_0x98d4[28]](handleError(_0xee9bx8))}
\ No newline at end of file
+/**
+ * Using Rails-like standard naming convention for endpoints.
+ * GET     /api/voice/recordings              ->  index
+ * POST    /api/voice/recordings              ->  create
+ * GET     /api/voice/recordings/:id          ->  show
+ * PUT     /api/voice/recordings/:id          ->  update
+ * DELETE  /api/voice/recordings/:id          ->  destroy
+ */
+
+'use strict';
+
+
+var _ = require('lodash');
+var util = require('util');
+
+var VoiceRecording = require('../../models').VoiceRecording;
+var Promise = require('bluebird');
+// var base64 = Promise.promisifyAll(require('file-base64'));
+var base64 = require('file-base64');
+var fs = require('fs');
+
+function handleError(res) {
+  return function(err) {
+    if (err.cause && err.cause.code === 'ENOENT') {
+      err = {
+        message: 'No file or directory',
+        translatedMessage: 'MESSAGE_NO_FILE_OR_DIRECTORY'
+      };
+    }
+    return res.status(500).send(err);
+  }
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(body) {
+  return function(entity) {
+    return entity
+      .updateAttributes(body);
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+function getQuery(query) {
+  var _query = {};
+  _query.where = {};
+
+  _.forEach(query, function(value, key) {
+    switch (key) {
+      case 'limit':
+      case 'offset':
+        _query[key] = Number(value);
+        break;
+      case 'order':
+        _query[key] = value;
+        break;
+      default:
+        _query.where[key] = {
+          $like: '%' + value + '%'
+        };
+    }
+  });
+
+  return _query;
+}
+
+// Gets a list of VoiceRecordings
+exports.index = function(req, res) {
+  var _query = getQuery(req.query);
+  return VoiceRecording
+    .findAndCountAll(_query)
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single VoiceRecording from the DB
+exports.show = function(req, res) {
+  return VoiceRecording.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Gets a single VoiceRecording from the DB
+exports.getStream = function(req, res) {
+  return VoiceRecording
+    .findById(req.params.id)
+    .then(function(recording) {
+      var readFile = Promise.promisify(fs.readFile);
+      return readFile(recording.value);
+    })
+    .then(function(result) {
+      var base64String = new Buffer(result, 'binary').toString('base64');
+      return base64String;
+    })
+    .then(function(base64String) {
+      return res.status(200).send({
+        downloadString: base64String
+      });
+    })
+    .catch(handleError(res));
+}
+
+
+// Creates a new VoiceRecording in the DB
+exports.create = function(req, res) {
+  return VoiceRecording.create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+}
+
+// Updates an existing VoiceRecording in the DB
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return VoiceRecording.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+// Deletes a VoiceRecording from the DB
+exports.destroy = function(req, res) {
+  return VoiceRecording.findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+}
+
+// Deletes a agent from the DB.
+exports.bulkDestroy = function(req, res) {
+  return VoiceRecording
+    .destroy({
+      where: {
+        uniqueid: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(handleError(res));
+};
index f8fe112..a0f969a 100644 (file)
@@ -1 +1,24 @@
-var _0x78e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x3A\x72\x65\x6D\x6F\x76\x65"];_0x78e3[0];var VoiceRecording=require(_0x78e3[2])[_0x78e3[1]];exports[_0x78e3[3]]=function(_0xae08x2){VoiceRecording[_0x78e3[4]](function(_0xae08x3){onSave(_0xae08x2,_0xae08x3)});VoiceRecording[_0x78e3[5]](function(_0xae08x3){onRemove(_0xae08x2,_0xae08x3)})};function onSave(_0xae08x2,_0xae08x3,_0xae08x5){_0xae08x2[_0x78e3[7]](_0x78e3[6],_0xae08x3)}function onRemove(_0xae08x2,_0xae08x3,_0xae08x5){_0xae08x2[_0x78e3[7]](_0x78e3[8],_0xae08x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var VoiceRecording = require('../../models').VoiceRecording;
+
+exports.register = function(socket) {
+  VoiceRecording.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  VoiceRecording.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+};
+
+function onSave(socket, doc, cb) {
+  socket.emit('voice_recording:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('voice_recording:remove', doc);
+}
index 3bc39f5..96f6298 100644 (file)
@@ -1 +1,18 @@
-var _0xe672=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x6D\x61\x69\x6C\x62\x6F\x78\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xe672[0];var express=require(_0xe672[1]);var controller=require(_0xe672[2]);var auth=require(_0xe672[3]);var router=express.Router();router[_0xe672[7]](_0xe672[4],auth[_0xe672[5]](),controller[_0xe672[6]]);router[_0xe672[7]](_0xe672[8],auth[_0xe672[5]](),controller[_0xe672[9]]);router[_0xe672[11]](_0xe672[4],auth[_0xe672[5]](),controller[_0xe672[10]]);router[_0xe672[11]](_0xe672[12],auth[_0xe672[5]](),controller[_0xe672[13]]);router[_0xe672[15]](_0xe672[8],auth[_0xe672[5]](),controller[_0xe672[14]]);router[_0xe672[17]](_0xe672[16],auth[_0xe672[5]](),controller[_0xe672[14]]);router[_0xe672[19]](_0xe672[4],auth[_0xe672[5]](),controller[_0xe672[18]]);router[_0xe672[19]](_0xe672[8],auth[_0xe672[5]](),controller[_0xe672[20]]);module[_0xe672[21]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./voice_voicemail.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:uniqueid', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/validate', auth.isAuthenticated(), controller.mailboxValidation);
+router.put('/:uniqueid', auth.isAuthenticated(), controller.update);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:uniqueid', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 18812fc..69a1139 100644 (file)
@@ -1 +1,190 @@
-var _0x1fd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x72\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x6D\x61\x69\x6C\x62\x6F\x78\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6C\x6F\x67","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4D\x41\x49\x4C\x42\x4F\x58","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x1fd7[0];var _=require(_0x1fd7[1]);var stream=require(_0x1fd7[2]);var Util=require(_0x1fd7[3]);var VoiceVoicemail=require(_0x1fd7[5])[_0x1fd7[4]];var VoiceVoicemailMessages=require(_0x1fd7[5])[_0x1fd7[6]];exports[_0x1fd7[7]]=function(_0x9e5ax6,_0x9e5ax7){return VoiceVoicemail[_0x1fd7[14]](Util[_0x1fd7[13]](_0x9e5ax6[_0x1fd7[12]]))[_0x1fd7[11]](function(_0x9e5ax9){_0x9e5ax7[_0x1fd7[10]](200)[_0x1fd7[9]](_0x9e5ax9)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})};exports[_0x1fd7[15]]=function(_0x9e5ax6,_0x9e5ax7){VoiceVoicemail[_0x1fd7[19]]({where:{uniqueid:_0x9e5ax6[_0x1fd7[18]][_0x1fd7[17]]}})[_0x1fd7[11]](function(_0x9e5axa){if(!_0x9e5axa){return _0x9e5ax7[_0x1fd7[16]](404)};return _0x9e5ax7[_0x1fd7[9]](_0x9e5axa)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})};exports[_0x1fd7[20]]=function(_0x9e5ax6,_0x9e5ax7){console[_0x1fd7[22]](_0x9e5ax6[_0x1fd7[21]]);VoiceVoicemail[_0x1fd7[25]]({where:{mailbox:_0x9e5ax6[_0x1fd7[21]][_0x1fd7[23]],context:_0x9e5ax6[_0x1fd7[21]][_0x1fd7[24]]}})[_0x1fd7[11]](function(_0x9e5axb){if(!_0x9e5axb){return _0x9e5ax7[_0x1fd7[16]](404)};return _0x9e5ax7[_0x1fd7[9]](_0x9e5axb)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})};exports[_0x1fd7[26]]=function(_0x9e5ax6,_0x9e5ax7){VoiceVoicemail[_0x1fd7[25]]({where:{mailbox:_0x9e5ax6[_0x1fd7[21]][_0x1fd7[23]],context:_0x9e5ax6[_0x1fd7[21]][_0x1fd7[24]]}})[_0x1fd7[11]](function(_0x9e5axb){if(!_0x9e5axb){return _0x9e5ax7[_0x1fd7[16]](404)};if(_0x9e5axb[_0x1fd7[27]]>0){return _0x9e5ax7[_0x1fd7[10]](500)[_0x1fd7[9]]({message:_0x1fd7[28]})};VoiceVoicemail[_0x1fd7[26]](_0x9e5ax6[_0x1fd7[21]])[_0x1fd7[11]](function(_0x9e5axa){return _0x9e5ax7[_0x1fd7[10]](201)[_0x1fd7[9]](_0x9e5axa)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})})};exports[_0x1fd7[29]]=function(_0x9e5ax6,_0x9e5ax7){VoiceVoicemail[_0x1fd7[25]]({where:{mailbox:_0x9e5ax6[_0x1fd7[21]][_0x1fd7[23]],context:_0x9e5ax6[_0x1fd7[21]][_0x1fd7[24]],uniqueid:{$ne:_0x9e5ax6[_0x1fd7[21]][_0x1fd7[17]]}}})[_0x1fd7[11]](function(_0x9e5axb){if(!_0x9e5axb){return _0x9e5ax7[_0x1fd7[16]](404)};if(_0x9e5axb[_0x1fd7[27]]>0){return _0x9e5ax7[_0x1fd7[10]](500)[_0x1fd7[9]]({message:_0x1fd7[28]})};if(_0x9e5ax6[_0x1fd7[21]][_0x1fd7[17]]){delete _0x9e5ax6[_0x1fd7[21]][_0x1fd7[17]]};VoiceVoicemail[_0x1fd7[19]]({where:{uniqueid:_0x9e5ax6[_0x1fd7[18]][_0x1fd7[17]]}})[_0x1fd7[11]](function(_0x9e5axa){if(!_0x9e5axa){return _0x9e5ax7[_0x1fd7[16]](404)};var _0x9e5axc=_[_0x1fd7[30]](_0x9e5axa,_0x9e5ax6[_0x1fd7[21]]);_0x9e5axc[_0x1fd7[31]]()[_0x1fd7[11]](function(){return _0x9e5ax7[_0x1fd7[10]](200)[_0x1fd7[9]](_0x9e5axa)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})};exports[_0x1fd7[32]]=function(_0x9e5ax6,_0x9e5ax7){VoiceVoicemail[_0x1fd7[19]]({where:{uniqueid:_0x9e5ax6[_0x1fd7[18]][_0x1fd7[17]]}})[_0x1fd7[11]](function(_0x9e5axa){if(!_0x9e5axa){return _0x9e5ax7[_0x1fd7[16]](404)};_0x9e5axa[_0x1fd7[32]]()[_0x1fd7[11]](function(){return _0x9e5ax7[_0x1fd7[16]](204)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})};exports[_0x1fd7[33]]=function(_0x9e5ax6,_0x9e5ax7){VoiceVoicemail[_0x1fd7[32]]({where:{uniqueid:_0x9e5ax6[_0x1fd7[12]][_0x1fd7[17]]},individualHooks:true})[_0x1fd7[11]](function(){return _0x9e5ax7[_0x1fd7[16]](204)})[_0x1fd7[8]](function(_0x9e5ax8){return handleError(_0x9e5ax7,_0x9e5ax8)})};function handleError(_0x9e5ax7,_0x9e5ax8){return _0x9e5ax7[_0x1fd7[10]](500)[_0x1fd7[9]](_0x9e5ax8)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var stream = require('stream');
+var Util = require('../../config/util');
+
+var VoiceVoicemail = require('../../models').VoiceVoicemail;
+var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages;
+
+// Get list of voice_voicemails
+exports.index = function(req, res) {
+  return VoiceVoicemail
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single voice_voicemail
+exports.show = function(req, res) {
+  VoiceVoicemail
+    .find({
+      where: {
+        uniqueid: req.params.uniqueid
+      }
+    })
+    .then(function(voice_voicemail) {
+      if (!voice_voicemail) {
+        return res.sendStatus(404);
+      }
+      return res.send(voice_voicemail);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// validate mailbox uniqueness
+exports.mailboxValidation = function(req, res) {
+  console.log(req.body);
+  VoiceVoicemail
+    .findAll({
+      where: {
+        mailbox: req.body.mailbox,
+        context: req.body.context
+      }
+    })
+    .then(function(voicemails) {
+      if (!voicemails) {
+        return res.sendStatus(404);
+      }
+      return res.send(voicemails);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+// Creates a new voice_voicemail in the DB.
+exports.create = function(req, res) {
+  VoiceVoicemail
+    .findAll({
+      where: {
+        mailbox: req.body.mailbox,
+        context: req.body.context
+      }
+    })
+    .then(function(voicemails) {
+      if (!voicemails) {
+        return res.sendStatus(404);
+      }
+      if (voicemails.length > 0) {
+        return res.status(500).send({
+          message: 'MESSAGE_EXIST_MAILBOX'
+        })
+      }
+      VoiceVoicemail
+        .create(req.body)
+        .then(function(voice_voicemail) {
+          return res.status(201).send(voice_voicemail);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+};
+
+// Updates an existing voice_voicemail in the DB.
+exports.update = function(req, res) {
+  VoiceVoicemail
+    .findAll({
+      where: {
+        mailbox: req.body.mailbox,
+        context: req.body.context,
+        uniqueid: {
+          $ne: req.body.uniqueid
+        }
+      }
+    })
+    .then(function(voicemails) {
+      if (!voicemails) {
+        return res.sendStatus(404);
+      }
+      if (voicemails.length > 0) {
+        return res.status(500).send({
+          message: 'MESSAGE_EXIST_MAILBOX'
+        })
+      }
+      if (req.body.uniqueid) {
+        delete req.body.uniqueid;
+      }
+      VoiceVoicemail
+        .find({
+          where: {
+            uniqueid: req.params.uniqueid
+          }
+        })
+        .then(function(voice_voicemail) {
+          if (!voice_voicemail) {
+            return res.sendStatus(404);
+          }
+          var updated = _.merge(voice_voicemail, req.body);
+          updated.save()
+            .then(function() {
+              return res.status(200).send(voice_voicemail);
+            })
+            .catch(function(err) {
+              return handleError(res, err);
+            });
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+
+};
+
+// Deletes a voice_voicemail from the DB.
+exports.destroy = function(req, res) {
+  VoiceVoicemail
+    .find({
+      where: {
+        uniqueid: req.params.uniqueid
+      }
+    })
+    .then(function(voice_voicemail) {
+      if (!voice_voicemail) {
+        return res.sendStatus(404);
+      }
+      voice_voicemail.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a voice_voicemail from the DB.
+exports.bulkDestroy = function(req, res) {
+  VoiceVoicemail
+    .destroy({
+      where: {
+        uniqueid: req.query.uniqueid
+      },
+      individualHooks: true
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index e243ea3..41e7a38 100644 (file)
@@ -1 +1,39 @@
-var _0x7612=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x3A\x72\x65\x6D\x6F\x76\x65"];_0x7612[0];var VoiceVoicemail=require(_0x7612[2])[_0x7612[1]];var VoiceVoicemailMessages=require(_0x7612[2])[_0x7612[3]];exports[_0x7612[4]]=function(_0x14dax3){VoiceVoicemail[_0x7612[5]](function(_0x14dax4){onSave(_0x14dax3,_0x14dax4)});VoiceVoicemail[_0x7612[6]](function(_0x14dax4){onRemove(_0x14dax3,_0x14dax4)});VoiceVoicemailMessages[_0x7612[5]](function(_0x14dax4){onMessageSave(_0x14dax3,_0x14dax4)});VoiceVoicemailMessages[_0x7612[6]](function(_0x14dax4){onMessageRemove(_0x14dax3,_0x14dax4)})};function onSave(_0x14dax3,_0x14dax4,_0x14dax6){_0x14dax3[_0x7612[8]](_0x7612[7],_0x14dax4)}function onRemove(_0x14dax3,_0x14dax4,_0x14dax6){_0x14dax3[_0x7612[8]](_0x7612[9],_0x14dax4)}function onMessageSave(_0x14dax3,_0x14dax4,_0x14dax6){_0x14dax3[_0x7612[8]](_0x7612[10],_0x14dax4)}function onMessageRemove(_0x14dax3,_0x14dax4,_0x14dax6){_0x14dax3[_0x7612[8]](_0x7612[11],_0x14dax4)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var VoiceVoicemail = require('../../models').VoiceVoicemail;
+var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages;
+
+exports.register = function(socket) {
+  VoiceVoicemail.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  VoiceVoicemail.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+  VoiceVoicemailMessages.afterCreate(function(doc) {
+    onMessageSave(socket, doc);
+  });
+  VoiceVoicemailMessages.afterDestroy(function(doc) {
+    onMessageRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('voice_voicemail:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('voice_voicemail:remove', doc);
+}
+
+function onMessageSave(socket, doc, cb) {
+  socket.emit('voice_voicemail_messages:save', doc);
+}
+
+function onMessageRemove(socket, doc, cb) {
+  socket.emit('voice_voicemail_messages:remove', doc);
+}
index d0559a8..5785825 100644 (file)
@@ -1 +1,20 @@
-var _0xb603=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x67\x65\x74"];_0xb603[0];var should=require(_0xb603[1]);var app=require(_0xb603[2]);var request=require(_0xb603[3]);describe(_0xb603[4],function(){it(_0xb603[5],function(_0xfa64x4){request(app)[_0xb603[13]](_0xb603[12])[_0xb603[11]](200)[_0xb603[11]](_0xb603[10],/json/)[_0xb603[9]](function(_0xfa64x5,_0xfa64x6){if(_0xfa64x5){return _0xfa64x4(_0xfa64x5)};_0xfa64x6[_0xb603[8]][_0xb603[1]][_0xb603[7]][_0xb603[6]](Array);_0xfa64x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/voice/voicemails', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/voice/voicemails')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index e1be24a..b80b40a 100644 (file)
@@ -1 +1,15 @@
-var _0x6f9d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x6f9d[0];var express=require(_0x6f9d[1]);var controller=require(_0x6f9d[2]);var auth=require(_0x6f9d[3]);var router=express.Router();router[_0x6f9d[7]](_0x6f9d[4],auth[_0x6f9d[5]](),controller[_0x6f9d[6]]);router[_0x6f9d[7]](_0x6f9d[8],auth[_0x6f9d[5]](),controller[_0x6f9d[9]]);router[_0x6f9d[7]](_0x6f9d[10],auth[_0x6f9d[5]](),controller[_0x6f9d[11]]);router[_0x6f9d[13]](_0x6f9d[4],auth[_0x6f9d[5]](),controller[_0x6f9d[12]]);router[_0x6f9d[13]](_0x6f9d[8],auth[_0x6f9d[5]](),controller[_0x6f9d[14]]);module[_0x6f9d[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./voice_voicemail_messages.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/download', auth.isAuthenticated(), controller.download);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index b37cc71..8268a61 100644 (file)
@@ -1 +1,106 @@
-var _0x514f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x72\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x69\x64\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79"];_0x514f[0];var _=require(_0x514f[1]);var stream=require(_0x514f[2]);var Util=require(_0x514f[3]);var VoiceVoicemailMessages=require(_0x514f[5])[_0x514f[4]];exports[_0x514f[6]]=function(_0xf5e1x5,_0xf5e1x6){return VoiceVoicemailMessages[_0x514f[16]]({method:[_0x514f[15],_0xf5e1x5[_0x514f[12]]]})[_0x514f[14]](Util[_0x514f[13]](_0xf5e1x5[_0x514f[12]]))[_0x514f[11]](function(_0xf5e1x8){_0xf5e1x6[_0x514f[10]](200)[_0x514f[9]](_0xf5e1x8)})[_0x514f[8]](function(_0xf5e1x7){console[_0x514f[7]](_0xf5e1x7);return handleError(_0xf5e1x6,_0xf5e1x7)})};exports[_0x514f[17]]=function(_0xf5e1x5,_0xf5e1x6){return VoiceVoicemailMessages[_0x514f[21]](_0xf5e1x5[_0x514f[20]][_0x514f[19]])[_0x514f[11]](function(_0xf5e1x9){if(!_0xf5e1x9){return _0xf5e1x6[_0x514f[18]](404)};return _0xf5e1x6[_0x514f[9]](_0xf5e1x9)})[_0x514f[8]](function(_0xf5e1x7){return handleError(_0xf5e1x6,_0xf5e1x7)})};exports[_0x514f[22]]=function(_0xf5e1x5,_0xf5e1x6){return VoiceVoicemailMessages[_0x514f[21]](_0xf5e1x5[_0x514f[20]][_0x514f[19]])[_0x514f[11]](function(_0xf5e1x9){if(!_0xf5e1x9){return _0xf5e1x6[_0x514f[18]](404)};_0xf5e1x9[_0x514f[23]]=null;_0xf5e1x9[_0x514f[22]]()})[_0x514f[11]](function(){return _0xf5e1x6[_0x514f[18]](204)})[_0x514f[8]](function(_0xf5e1x7){return handleError(_0xf5e1x6,_0xf5e1x7)})};exports[_0x514f[24]]=function(_0xf5e1x5,_0xf5e1x6){return VoiceVoicemailMessages[_0x514f[29]]({where:{id:_0xf5e1x5[_0x514f[12]][_0x514f[28]]},individualHooks:true})[_0x514f[11]](function(_0xf5e1xa){var _0xf5e1xb=[];_0xf5e1xa[_0x514f[27]](function(_0xf5e1xc){voicemail_message[_0x514f[23]]=null;_0xf5e1xb[_0x514f[26]](voicemail_message[_0x514f[22]]())});return _0xf5e1xb})[_0x514f[25]]()[_0x514f[11]](function(){return _0xf5e1x6[_0x514f[18]](204)})[_0x514f[8]](function(_0xf5e1x7){return handleError(_0xf5e1x6,_0xf5e1x7)})};exports[_0x514f[30]]=function(_0xf5e1x5,_0xf5e1x6){return VoiceVoicemailMessages[_0x514f[21]](_0xf5e1x5[_0x514f[20]][_0x514f[19]])[_0x514f[11]](function(_0xf5e1xc){var _0xf5e1xd= new Buffer(_0xf5e1xc[_0x514f[23]],_0x514f[32]).toString(_0x514f[31]);return _0xf5e1xd})[_0x514f[11]](function(_0xf5e1xd){return _0xf5e1x6[_0x514f[10]](200)[_0x514f[9]]({downloadString:_0xf5e1xd})})[_0x514f[8]](function(_0xf5e1x7){console[_0x514f[7]](_0xf5e1x7);return handleError(_0xf5e1x6,_0xf5e1x7)})};function handleError(_0xf5e1x6,_0xf5e1x7){return _0xf5e1x6[_0x514f[10]](500)[_0x514f[9]](_0xf5e1x7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var stream = require('stream');
+var Util = require('../../config/util');
+
+var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages;
+
+// Get list of voicemail messages
+exports.index = function(req, res) {
+  return VoiceVoicemailMessages
+    .scope({
+      method: ['mailbox', req.query]
+    })
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(function(result) {
+      res.status(200).send(result);
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+// Get a single voicemail_message
+exports.show = function(req, res) {
+  return VoiceVoicemailMessages
+    .findById(req.params.id)
+    .then(function(voicemail_message) {
+      if (!voicemail_message) {
+        return res.sendStatus(404);
+      }
+      return res.send(voicemail_message);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a voicemail_message from the DB.
+exports.destroy = function(req, res) {
+  return VoiceVoicemailMessages
+    .findById(req.params.id)
+    .then(function(voicemail_message) {
+      if (!voicemail_message) {
+        return res.sendStatus(404);
+      }
+      voicemail_message.recording = null;
+      voicemail_message.destroy();
+    })
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes all voicemail_messages from the DB.
+exports.bulkDestroy = function(req, res) {
+  return VoiceVoicemailMessages
+    .findAll({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(function(voicemail_messages) {
+      var bulkDest = [];
+      voicemail_messages.forEach(function(message) {
+        voicemail_message.recording = null;
+        bulkDest.push(voicemail_message.destroy());
+      });
+      return bulkDest;
+    })
+    .all()
+    .then(function() {
+      return res.sendStatus(204);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.download = function(req, res) {
+  return VoiceVoicemailMessages
+    .findById(req.params.id)
+    .then(function(message) {
+      var base64String = new Buffer(message.recording, 'binary').toString('base64');
+      return base64String;
+    })
+    .then(function(base64String) {
+      return res.status(200).send({
+        downloadString: base64String
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 047b846..ee0fbef 100644 (file)
@@ -1 +1,24 @@
-var _0x1da9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x3A\x72\x65\x6D\x6F\x76\x65"];_0x1da9[0];var VoiceVoicemailMessages=require(_0x1da9[2])[_0x1da9[1]];exports[_0x1da9[3]]=function(_0x569ex2){VoiceVoicemailMessages[_0x1da9[4]](function(_0x569ex3){onSave(_0x569ex2,_0x569ex3)});VoiceVoicemailMessages[_0x1da9[5]](function(_0x569ex3){onRemove(_0x569ex2,_0x569ex3)})};function onSave(_0x569ex2,_0x569ex3,_0x569ex5){_0x569ex2[_0x1da9[7]](_0x1da9[6],_0x569ex3)}function onRemove(_0x569ex2,_0x569ex3,_0x569ex5){_0x569ex2[_0x1da9[7]](_0x1da9[8],_0x569ex3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages;
+
+exports.register = function(socket) {
+  VoiceVoicemailMessages.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  VoiceVoicemailMessages.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('voice_voicemail_messages:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('voice_voicemail_messages:remove', doc);
+}
index 300acea..374e711 100644 (file)
@@ -1 +1,19 @@
-var _0x89c6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x77\x69\x64\x67\x65\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x6F\x75\x6E\x74\x65\x72","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x63\x6F\x75\x6E\x74\x65\x72","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x74\x61\x62\x6C\x65","\x2F\x70\x69\x65\x63\x68\x61\x72\x74","\x70\x69\x65\x63\x68\x61\x72\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x89c6[0];var express=require(_0x89c6[1]);var controller=require(_0x89c6[2]);var auth=require(_0x89c6[3]);var router=express.Router();router[_0x89c6[7]](_0x89c6[4],auth[_0x89c6[5]](),controller[_0x89c6[6]]);router[_0x89c6[7]](_0x89c6[8],auth[_0x89c6[5]](),controller[_0x89c6[9]]);router[_0x89c6[7]](_0x89c6[10],auth[_0x89c6[5]](),controller[_0x89c6[11]]);module[_0x89c6[12]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./widget.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+// router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/counter', auth.isAuthenticated(), controller.counter);
+router.get('/table', auth.isAuthenticated(), controller.table);
+router.get('/piechart', auth.isAuthenticated(), controller.piechart);
+// router.get('/:id', auth.isAuthenticated(), controller.show);
+// router.post('/', auth.isAuthenticated(), controller.create);
+// router.put('/:id', auth.isAuthenticated(), controller.update);
+// router.patch('/:id', auth.isAuthenticated(), controller.update);
+// router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 7fe0f06..731df92 100644 (file)
@@ -1 +1,102 @@
-var _0x6958=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x63\x6F\x75\x6E\x74\x65\x72","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73","\x73\x65\x6C\x65\x63\x74","\x71\x75\x65\x72\x79","\x74\x61\x62\x6C\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x57\x48\x45\x52\x45\x20\x25\x73","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x66\x69\x65\x6C\x64\x73","\x69\x73\x41\x72\x72\x61\x79","\x70\x61\x72\x73\x65","\x63\x6F\x6C\x75\x6D\x6E","\x61\x6C\x69\x61\x73","\x20\x41\x53\x20\x22","\x22","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x69\x73\x53\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x2C","\x6A\x6F\x69\x6E","\x2A","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x25\x73","\x72\x65\x70\x6F\x72\x74","\x70\x69\x65\x63\x68\x61\x72\x74","","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73\x25\x73"];_0x6958[0];var _=require(_0x6958[1]);var util=require(_0x6958[2]);var sequelize=require(_0x6958[4])[_0x6958[3]];exports[_0x6958[5]]=function(_0xceddx4,_0xceddx5){var _0xceddx6=util[_0x6958[10]](_0x6958[6],_0xceddx4[_0x6958[8]][_0x6958[7]],_0xceddx4[_0x6958[8]][_0x6958[9]]);if(_0xceddx4[_0x6958[8]][_0x6958[11]]){_0xceddx6+=util[_0x6958[10]](_0x6958[12],decodeURIComponent(_0xceddx4[_0x6958[8]][_0x6958[11]]))};sequelize[_0x6958[8]](_0xceddx6,{type:sequelize[_0x6958[19]][_0x6958[18]]})[_0x6958[17]](function(_0xceddx8){return _0xceddx5[_0x6958[16]](200)[_0x6958[15]]({result:_0xceddx8})})[_0x6958[14]](function(_0xceddx7){console[_0x6958[13]](_0xceddx7);return handleError(_0xceddx5,_0xceddx7)})};exports[_0x6958[9]]=function(_0xceddx4,_0xceddx5){var _0xceddx9=[];var _0xceddxa;if(_0xceddx4[_0x6958[8]][_0x6958[20]]){if(_[_0x6958[21]](_0xceddx4[_0x6958[8]][_0x6958[20]])){_0xceddx4[_0x6958[8]][_0x6958[20]][_0x6958[28]](function(_0xceddxb){_0xceddxa=JSON[_0x6958[22]](_0xceddxb);if(_0xceddxa[_0x6958[23]]&&_0xceddxa[_0x6958[24]]){_0xceddx9[_0x6958[27]](_0xceddxa[_0x6958[23]]+_0x6958[25]+_0xceddxa[_0x6958[24]]+_0x6958[26])}})}else {if(_[_0x6958[29]](_0xceddx4[_0x6958[8]][_0x6958[20]])){_0xceddxa=JSON[_0x6958[22]](_0xceddx4[_0x6958[8]][_0x6958[20]]);if(_0xceddxa[_0x6958[23]]&&_0xceddxa[_0x6958[24]]){_0xceddx9[_0x6958[27]](_0xceddxa[_0x6958[23]]+_0x6958[25]+_0xceddxa[_0x6958[24]]+_0x6958[26])}}}};var _0xceddxc=_0xceddx9[_0x6958[30]]?_0xceddx9[_0x6958[32]](_0x6958[31]):_0x6958[33];sequelize[_0x6958[8]](util[_0x6958[10]](_0x6958[34],_0xceddxc,_0x6958[35]+_0xceddx4[_0x6958[8]][_0x6958[9]],decodeURIComponent(_0xceddx4[_0x6958[8]][_0x6958[11]])),{type:sequelize[_0x6958[19]][_0x6958[18]]})[_0x6958[17]](function(_0xceddx8){return _0xceddx5[_0x6958[16]](200)[_0x6958[15]](_0xceddx8)})[_0x6958[14]](function(_0xceddx7){return handleError(_0xceddx5,_0xceddx7)})};exports[_0x6958[36]]=function(_0xceddx4,_0xceddx5){var _0xceddx9=[];var _0xceddxa;if(_0xceddx4[_0x6958[8]][_0x6958[20]]){if(_[_0x6958[21]](_0xceddx4[_0x6958[8]][_0x6958[20]])){_0xceddx4[_0x6958[8]][_0x6958[20]][_0x6958[28]](function(_0xceddxb){_0xceddxa=JSON[_0x6958[22]](_0xceddxb);if(_0xceddxa[_0x6958[23]]&&_0xceddxa[_0x6958[24]]){_0xceddx9[_0x6958[27]](_0xceddxa[_0x6958[23]]+_0x6958[25]+_0xceddxa[_0x6958[24]]+_0x6958[26])}})}else {if(_[_0x6958[29]](_0xceddx4[_0x6958[8]][_0x6958[20]])){_0xceddxa=JSON[_0x6958[22]](_0xceddx4[_0x6958[8]][_0x6958[20]]);if(_0xceddxa[_0x6958[23]]&&_0xceddxa[_0x6958[24]]){_0xceddx9[_0x6958[27]](_0xceddxa[_0x6958[23]]+_0x6958[25]+_0xceddxa[_0x6958[24]]+_0x6958[26])}}}};var _0xceddxc=_0xceddx9[_0x6958[30]]?_0xceddx9[_0x6958[32]](_0x6958[31]):_0x6958[33];var _0xceddxd=_0x6958[37];if(_0xceddx4[_0x6958[8]][_0x6958[11]]!==_0x6958[38]){_0xceddxd=util[_0x6958[10]](_0x6958[12],decodeURIComponent(_0xceddx4[_0x6958[8]][_0x6958[11]]))};sequelize[_0x6958[8]](util[_0x6958[10]](_0x6958[39],_0xceddxc,_0xceddx4[_0x6958[8]][_0x6958[9]],_0xceddxd),{type:sequelize[_0x6958[19]][_0x6958[18]]})[_0x6958[17]](function(_0xceddx8){return _0xceddx5[_0x6958[16]](200)[_0x6958[15]]({result:_0xceddx8})})[_0x6958[14]](function(_0xceddx7){return handleError(_0xceddx5,_0xceddx7)})};function handleError(_0xceddx5,_0xceddx7){return _0xceddx5[_0x6958[16]](500)[_0x6958[15]](_0xceddx7)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var sequelize = require('../../models').sequelize;
+
+// var ReportAgent = require('../../models').ReportAgent;
+// var ReportCall = require('../../models').ReportCall;
+// var ReportDial = require('../../models').ReportDial;
+// var ReportMember = require('../../models').ReportMember;
+// var ReportQueue = require('../../models').ReportQueue;
+
+
+
+exports.counter = function(req, res) {
+  var query = util.format("SELECT %s FROM %s", req.query.select, req.query.table);
+  if (req.query.condition) {
+    query += util.format(" WHERE %s", decodeURIComponent(req.query.condition))
+  }
+  sequelize.query(query, {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(result) {
+      return res.status(200).send({
+        result: result
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+      return handleError(res, err);
+    });
+};
+
+exports.table = function(req, res) {
+  var columns = [];
+  var elem;
+  if (req.query.fields) {
+    if (_.isArray(req.query.fields)) {
+      req.query.fields.forEach(function(element) {
+        elem = JSON.parse(element);
+        if (elem.column && elem.alias) {
+          columns.push(elem.column + ' AS "' + elem.alias + '"');
+        }
+      });
+    } else if (_.isString(req.query.fields)) {
+      elem = JSON.parse(req.query.fields);
+      if (elem.column && elem.alias) {
+        columns.push(elem.column + ' AS "' + elem.alias + '"');
+      }
+    }
+  }
+  var select = columns.length ? columns.join(',') : '*';
+  sequelize.query(util.format("SELECT %s FROM %s WHERE %s", select, 'report' + req.query.table, decodeURIComponent(req.query.condition)), {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(result) {
+      return res.status(200).send(result);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.piechart = function(req, res) {
+  var columns = [];
+  var elem;
+  if (req.query.fields) {
+    if (_.isArray(req.query.fields)) {
+      req.query.fields.forEach(function(element) {
+        elem = JSON.parse(element);
+        if (elem.column && elem.alias) {
+          columns.push(elem.column + ' AS "' + elem.alias + '"');
+        }
+      });
+    } else if (_.isString(req.query.fields)) {
+      elem = JSON.parse(req.query.fields);
+      if (elem.column && elem.alias) {
+        columns.push(elem.column + ' AS "' + elem.alias + '"');
+      }
+    }
+  }
+  var select = columns.length ? columns.join(',') : '*';
+  var where = '';
+  if (req.query.condition !== 'undefined') {
+    where = util.format(' WHERE %s', decodeURIComponent(req.query.condition));
+  }
+  sequelize.query(util.format("SELECT %s FROM %s%s", select, req.query.table, where), {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(result) {
+      return res.status(200).send({
+        result: result
+      });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 9b81b91..94ea420 100644 (file)
@@ -1 +1,20 @@
-var _0xe3db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74\x73","\x67\x65\x74"];_0xe3db[0];var should=require(_0xe3db[1]);var app=require(_0xe3db[2]);var request=require(_0xe3db[3]);describe(_0xe3db[4],function(){it(_0xe3db[5],function(_0x24cex4){request(app)[_0xe3db[13]](_0xe3db[12])[_0xe3db[11]](200)[_0xe3db[11]](_0xe3db[10],/json/)[_0xe3db[9]](function(_0x24cex5,_0x24cex6){if(_0x24cex5){return _0x24cex4(_0x24cex5)};_0x24cex6[_0xe3db[8]][_0xe3db[1]][_0xe3db[7]][_0xe3db[6]](Array);_0x24cex4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/widgets', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/widgets')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index a0e64a7..e03bc91 100644 (file)
@@ -1 +1,33 @@
-var _0x32c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x78\x63\x68\x61\x74\x74\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x6A\x71\x75\x65\x72\x79","\x67\x65\x74\x4A\x71\x75\x65\x72\x79\x4C\x69\x62\x72\x61\x72\x79","\x67\x65\x74","\x2F\x61\x73\x73\x65\x74\x73","\x67\x65\x74\x41\x73\x73\x65\x74\x73","\x2F\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x2F\x73\x69\x67\x6E\x75\x70","\x73\x69\x67\x6E\x75\x70\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x72\x65\x61\x64","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x73\x69\x67\x6E\x6F\x75\x74","\x73\x69\x67\x6E\x6F\x75\x74\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x73\x75\x62\x6D\x69\x74","\x73\x75\x62\x6D\x69\x74\x45\x6E\x71\x75\x69\x72\x79","\x2F\x75\x6E\x73\x65\x72\x76\x65\x64","\x75\x6E\x73\x65\x72\x76\x65\x64\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x67\x65\x74\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x2F\x72\x61\x74\x69\x6E\x67","\x73\x65\x74\x52\x61\x74\x69\x6E\x67","\x2F\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x3A\x69\x64","\x67\x65\x74\x4A\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x68\x74\x6D\x6C","\x67\x65\x74\x48\x74\x6D\x6C\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x73\x74\x79\x6C\x65\x73","\x67\x65\x74\x53\x74\x79\x6C\x65\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x32c4[0];var express=require(_0x32c4[1]);var controller=require(_0x32c4[2]);var router=express.Router();router[_0x32c4[5]](_0x32c4[3],controller[_0x32c4[4]]);router[_0x32c4[5]](_0x32c4[6],controller[_0x32c4[7]]);router[_0x32c4[5]](_0x32c4[8],controller[_0x32c4[9]]);router[_0x32c4[5]](_0x32c4[10],controller[_0x32c4[11]]);router[_0x32c4[5]](_0x32c4[12],controller[_0x32c4[13]]);router[_0x32c4[5]](_0x32c4[14],controller[_0x32c4[15]]);router[_0x32c4[5]](_0x32c4[16],controller[_0x32c4[17]]);router[_0x32c4[5]](_0x32c4[18],controller[_0x32c4[19]]);router[_0x32c4[5]](_0x32c4[20],controller[_0x32c4[21]]);router[_0x32c4[5]](_0x32c4[22],controller[_0x32c4[23]]);router[_0x32c4[5]](_0x32c4[24],controller[_0x32c4[25]]);router[_0x32c4[5]](_0x32c4[26],controller[_0x32c4[27]]);router[_0x32c4[5]](_0x32c4[28],controller[_0x32c4[29]]);router[_0x32c4[5]](_0x32c4[30],controller[_0x32c4[31]]);router[_0x32c4[5]](_0x32c4[32],controller[_0x32c4[33]]);router[_0x32c4[5]](_0x32c4[34],controller[_0x32c4[35]]);router[_0x32c4[38]](_0x32c4[36],controller[_0x32c4[37]]);router[_0x32c4[40]](_0x32c4[28],controller[_0x32c4[39]]);router[_0x32c4[41]](_0x32c4[28],controller[_0x32c4[39]]);router[_0x32c4[43]](_0x32c4[28],controller[_0x32c4[42]]);module[_0x32c4[44]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./xchatty.controller');
+
+var router = express.Router();
+
+router.get('/jquery', controller.getJqueryLibrary);
+router.get('/assets', controller.getAssets);
+
+router.get('/status', controller.getStatus);
+router.get('/signup', controller.signupCustomer);
+router.get('/read', controller.getMessages);
+router.get('/send', controller.sendMessage);
+router.get('/signout', controller.signoutCustomer);
+router.get('/submit', controller.submitEnquiry);
+router.get('/unserved', controller.unservedCustomer);
+router.get('/transcript', controller.getTranscript);
+router.get('/rating', controller.setRating);
+router.get('/abandon', controller.abandonCustomer);
+
+router.get('/:id', controller.getJsByWebsite);
+router.get('/:id/html', controller.getHtmlByWebsite);
+router.get('/:id/proactive', controller.getProactiveActionsByWebsite);
+router.get('/:id/styles', controller.getStyleByWebsite);
+
+// router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 7bdd4af..a64547e 100644 (file)
@@ -1 +1,830 @@
-var _0xbfe4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x6D\x69\x6E","\x6D\x75\x73\x74\x61\x63\x68\x65","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x74\x68","\x6D\x64\x35","\x66\x73","\x75\x61\x2D\x70\x61\x72\x73\x65\x72\x2D\x6A\x73","\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65\x2D\x70\x61\x72\x73\x65\x72","\x69\x70\x61\x64\x64\x72\x2E\x6A\x73","\x67\x65\x6F\x69\x70\x2D\x6C\x69\x74\x65","\x74\x6F\x2D\x63\x73\x76","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x58\x63\x68\x61\x74\x74\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x78\x63\x68\x61\x74\x74\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x4A\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x6E\x6F\x77","\x73\x65\x74","\x6A\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x74\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79\x2F","\x66\x61\x6C\x73\x65","\x74\x72\x75\x65","\x22\x22","\x6E\x75\x6C\x6C","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79\x2F\x61\x73\x73\x65\x74\x73","\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x5F\x73\x68\x61\x70\x65","\x68\x65\x61\x64\x65\x72\x5F\x6F\x6E\x6C\x69\x6E\x65","\x6F\x6E\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x65\x6D\x61\x69\x6C\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x73\x74\x61\x72\x74\x5F\x63\x68\x61\x74\x5F\x62\x75\x74\x74\x6F\x6E","\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65","\x68\x65\x61\x64\x65\x72\x5F\x6F\x66\x66\x6C\x69\x6E\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x6D\x65\x73\x73\x61\x67\x65\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x65\x6E\x71\x75\x69\x72\x79\x5F\x62\x75\x74\x74\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x5F\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x72\x61\x74\x69\x6E\x67\x5F\x6D\x65\x73\x73\x61\x67\x65","\x72\x61\x74\x69\x6E\x67\x5F\x73\x65\x6E\x64","\x72\x61\x74\x69\x6E\x67\x5F\x73\x6B\x69\x70","\x72\x65\x6E\x64\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x53\x74\x79\x6C\x65\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x63\x73\x73","\x63\x6F\x6C\x6F\x72","\x63\x6F\x6C\x6F\x72\x5F\x66\x6F\x63\x75\x73","\x63\x6F\x6C\x6F\x72\x5F\x62\x75\x74\x74\x6F\x6E","\x67\x65\x74\x41\x73\x73\x65\x74\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x78\x63\x68\x61\x74\x74\x79","\x61\x73\x73\x65\x74\x73","\x72\x65\x73\x6F\x75\x72\x63\x65","\x71\x75\x65\x72\x79","\x6A\x6F\x69\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x67\x65\x74\x4A\x71\x75\x65\x72\x79\x4C\x69\x62\x72\x61\x72\x79","\x6A\x71\x75\x65\x72\x79","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x69\x73\x5F\x75\x6E\x73\x65\x72\x76\x65\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x28","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x29","\x76\x69\x73\x69\x74\x6F\x72\x5F\x69\x64","\x75\x6E\x73\x65\x72\x76\x65\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x6F\x6F\x6D\x5F\x69\x64","\x73\x69\x67\x6E\x65\x64\x5F\x75\x70","\x4F\x50\x45\x4E","","\x6F\x70\x65\x6E\x5F\x73\x74\x61\x74\x65","\x64\x61\x74\x61","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x61\x76\x61\x74\x61\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x6E\x61\x6D\x65","\x69\x73\x5F\x6E\x65\x77\x5F\x70\x61\x67\x65","\x77\x68\x65\x72\x65","\x6C\x61\x73\x74\x5F\x69\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x6D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x73\x69\x67\x6E\x6F\x75\x74\x43\x75\x73\x74\x6F\x6D\x65\x72","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x69\x67\x6E\x75\x70\x43\x75\x73\x74\x6F\x6D\x65\x72","\x67\x65\x74\x52\x65\x73\x75\x6C\x74","\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x74\x55\x41","\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65","\x70\x61\x72\x73\x65","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E","\x72\x65\x66\x65\x72\x65\x72","\x77\x65\x62\x63\x68\x61\x74","\x62\x72\x6F\x77\x73\x65\x72","\x20","\x76\x65\x72\x73\x69\x6F\x6E","\x65\x6E\x67\x69\x6E\x65","\x6F\x73","\x6D\x6F\x64\x65\x6C","\x64\x65\x76\x69\x63\x65","\x76\x65\x6E\x64\x6F\x72","\x74\x79\x70\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x64\x61\x74\x61\x31","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x33","\x62\x61\x73\x65\x36\x34","\x75\x6E\x73\x65\x72\x76\x65\x64\x43\x75\x73\x74\x6F\x6D\x65\x72","\x73\x75\x62\x6D\x69\x74\x45\x6E\x71\x75\x69\x72\x79","\x45\x6E\x71\x75\x69\x72\x79","\x65\x6E\x71\x75\x69\x72\x79","\x77\x65\x62\x73\x69\x74\x65\x49\x64","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x31","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x31","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x32","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x32","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x33","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x33","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x63\x6F\x6D\x6D\x69\x74","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x55\x73\x65\x72\x49\x64","\x72\x65\x70\x6C\x61\x63\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x65\x78\x74\x2F\x63\x73\x76","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x74\x6D\x6C\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x65\x6E\x61\x62\x6C\x65","\x4F\x6E\x6C\x69\x6E\x65","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x64\x69\x76\x5F\x67\x72\x6F\x75\x70\x22\x3E","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x25\x64\x22\x3E\x25\x73\x20\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x6C\x61\x62\x65\x6C","\x72\x65\x71\x75\x69\x72\x65\x64","\x2A","\x66\x6F\x72\x6D\x61\x74","\x3C\x69\x6E\x70\x75\x74\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x69\x64\x3D\x22\x25\x64\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x2F\x3E","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x3C\x2F\x64\x69\x76\x3E","\x74\x65\x78\x74\x49\x6E\x70\x75\x74","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x20\x69\x64\x3D\x22\x25\x64\x22\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x3E\x3C\x2F\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x74\x65\x78\x74\x41\x72\x65\x61","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x3E\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x6F\x70\x74\x69\x6F\x6E\x73","\x3C\x6C\x61\x62\x65\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x72\x61\x64\x69\x6F\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x72\x61\x64\x69\x6F","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x25\x64\x22\x3E\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x25\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x64\x69\x76\x3E","\x73\x65\x6C\x65\x63\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E","\x4F\x66\x66\x6C\x69\x6E\x65","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x3E\x25\x73\x20\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x69\x64\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x2F\x3E","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x20\x69\x64\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x3E\x3C\x2F\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x72\x61\x64\x69\x6F\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E","\x6A\x73\x6F\x6E\x70","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x73\x65\x74\x52\x61\x74\x69\x6E\x67","\x72\x61\x74\x69\x6E\x67","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x52\x61\x74\x69\x6E\x67","\x61\x62\x61\x6E\x64\x6F\x6E\x43\x75\x73\x74\x6F\x6D\x65\x72","\x66\x69\x6E\x64"];_0xbfe4[0];var _=require(_0xbfe4[1]);var jsmin=require(_0xbfe4[2])[_0xbfe4[2]];var Mustache=require(_0xbfe4[3]);var querystring=require(_0xbfe4[4]);var path=require(_0xbfe4[5]);var md5=require(_0xbfe4[6]);var fs=require(_0xbfe4[7]);var UAParser=require(_0xbfe4[8]);var uaParser= new UAParser();var languageParser=require(_0xbfe4[9]);var ipaddr=require(_0xbfe4[10]);var geoip=require(_0xbfe4[11]);var csv=require(_0xbfe4[12]);var util=require(_0xbfe4[13]);var moment=require(_0xbfe4[14]);var config=require(_0xbfe4[15]);var Xchatty=require(_0xbfe4[17])[_0xbfe4[16]];var xchatty_components=require(_0xbfe4[18]);var Util=require(_0xbfe4[19]);var sequelize=require(_0xbfe4[17])[_0xbfe4[20]];var User=require(_0xbfe4[17])[_0xbfe4[21]];var Agent=require(_0xbfe4[17])[_0xbfe4[21]];var ChatRoom=require(_0xbfe4[17])[_0xbfe4[22]];var ChatEnquiry=require(_0xbfe4[17])[_0xbfe4[23]];var ChatVisitor=require(_0xbfe4[17])[_0xbfe4[24]];var ChatMessage=require(_0xbfe4[17])[_0xbfe4[25]];var ChatWebsite=require(_0xbfe4[17])[_0xbfe4[26]];var ChatWebsitesField=require(_0xbfe4[17])[_0xbfe4[27]];var ChatProactiveAction=require(_0xbfe4[17])[_0xbfe4[28]];var ReportChatSession=require(_0xbfe4[17])[_0xbfe4[29]];var id=1;exports[_0xbfe4[30]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return Xchatty[_0xbfe4[35]]()[_0xbfe4[34]](function(_0xbc6ax24){return _0xbc6ax21[_0xbfe4[33]](200)[_0xbfe4[32]](_0xbc6ax24)})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[36]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){ChatWebsite[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]])[_0xbfe4[34]](function(_0xbc6ax25){_0xbc6ax21[_0xbfe4[39]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xbfe4[37],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0xbfe4[38]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0xbc6ax26=xchatty_components[_0xbfe4[40]];var _0xbc6ax27={websiteId:_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]],rootPath:Util[_0xbfe4[44]](_0xbc6ax25[_0xbfe4[43]])+_0xbfe4[45],signedUp:_0xbfe4[46],windowFocused:_0xbfe4[46],isNewPage:_0xbfe4[47],processingSignUp:_0xbfe4[46],processingEnquiry:_0xbfe4[46],processingSend:_0xbfe4[46],processingRating:_0xbfe4[46],visitorFullname:_0xbfe4[48],visitorAvatar:_0xbfe4[48],timerReadMessages:_0xbfe4[49],timerCheckStatus:_0xbfe4[49],isOnline:_0xbfe4[46],decayHistory:0,defaultTimeout:5000,isInitialStatusCheck:_0xbfe4[47],muteNotificationSoundOnce:_0xbfe4[46],assetBase:Util[_0xbfe4[44]](_0xbc6ax25[_0xbfe4[43]])+_0xbfe4[50],hasSessionSaf:_0xbfe4[46],restoreOpenState:_0xbfe4[46],animateHover:_0xbc6ax25[_0xbfe4[51]],hideEmail:_0xbfe4[46],hideOffline:_0xbfe4[46],headerShape:_0xbc6ax25[_0xbfe4[52]],HeaderOnline:_0xbc6ax25[_0xbfe4[53]],OnlineMessage:_0xbc6ax25[_0xbfe4[54]],UsernamePlaceholder:_0xbc6ax25[_0xbfe4[55]],EmailPlaceholder:_0xbc6ax25[_0xbfe4[56]],StartChatButtonText:_0xbc6ax25[_0xbfe4[57]],OfflineMessage:_0xbc6ax25[_0xbfe4[58]],HeaderOffline:_0xbc6ax25[_0xbfe4[59]],EnquiryMessagePlaceholder:_0xbc6ax25[_0xbfe4[60]],EnquiryButtonText:_0xbc6ax25[_0xbfe4[61]],downloadTranscript:_0xbc6ax25[_0xbfe4[62]],RatingMessage:_0xbc6ax25[_0xbfe4[63]],RatingSend:_0xbc6ax25[_0xbfe4[64]],RatingSkip:_0xbc6ax25[_0xbfe4[65]]};_0xbc6ax26=Mustache[_0xbfe4[66]](_0xbc6ax26,_0xbc6ax27);_0xbc6ax21[_0xbfe4[32]](_0xbc6ax26)})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[68]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){ChatWebsite[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]])[_0xbfe4[34]](function(_0xbc6ax25){_0xbc6ax21[_0xbfe4[39]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xbfe4[69],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0xbfe4[38]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0xbc6ax28=xchatty_components[_0xbfe4[70]];var _0xbc6ax29={assetBase:Util[_0xbfe4[44]](_0xbc6ax25[_0xbfe4[43]])+_0xbfe4[50],color:_0xbc6ax25[_0xbfe4[71]],colorFocus:_0xbc6ax25[_0xbfe4[72]],colorButton:_0xbc6ax25[_0xbfe4[73]]};_0xbc6ax28=Mustache[_0xbfe4[66]](_0xbc6ax28,_0xbc6ax29);_0xbc6ax21[_0xbfe4[32]](_0xbc6ax28)})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[74]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){_0xbc6ax21[_0xbfe4[83]](path[_0xbfe4[82]](config[_0xbfe4[75]],_0xbfe4[76],_0xbfe4[77],_0xbfe4[78],_0xbfe4[79],_0xbc6ax20[_0xbfe4[81]][_0xbfe4[80]]))};exports[_0xbfe4[84]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){_0xbc6ax21[_0xbfe4[39]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xbfe4[37],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0xbfe4[38]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0xbc6ax2a=xchatty_components[_0xbfe4[85]];_0xbc6ax21[_0xbfe4[32]](_0xbc6ax2a)};exports[_0xbfe4[86]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){if(!_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]]){_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]]={}};var _0xbc6ax2b={};return Agent[_0xbfe4[35]]({where:{online:true,role:_0xbfe4[106]}})[_0xbfe4[34]](function(_0xbc6ax2e){if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[100]]){_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[100]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[100]]===_0xbfe4[47]?true:false};_0xbc6ax2b={success:true,has_session_saf:null,signed_up:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]]?true:false,fullname:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[102]]?_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[102]]:_0xbfe4[99],email:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[103]]?_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[103]]:_0xbfe4[99],avatar:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[104]]?_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[104]]:_0xbfe4[99],open_state:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[100]]||_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]]?true:false,online:_0xbc6ax2e[_0xbfe4[105]]?true:false,is_unserved:false,room_id:0};return})[_0xbfe4[34]](function(){if(_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]]){return ChatRoom[_0xbfe4[95]]({where:{ChatVisitorId:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]],status:_0xbfe4[98],token:{$ne:_0xbfe4[99]}}})};return})[_0xbfe4[34]](function(_0xbc6ax2d){if(_0xbc6ax2d){_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]]=_0xbc6ax2d[_0xbfe4[41]];_0xbc6ax2b[_0xbfe4[96]]=_0xbc6ax2d[_0xbfe4[41]];_0xbc6ax2b[_0xbfe4[97]]=true}else {_0xbc6ax2b[_0xbfe4[97]]=false};return})[_0xbfe4[34]](function(){if(_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]]){return ChatVisitor[_0xbfe4[95]]({where:{id:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]],status:_0xbfe4[94]}})};return})[_0xbfe4[34]](function(_0xbc6ax2c){if(_0xbc6ax2c){_0xbc6ax2b[_0xbfe4[88]]=true};return _0xbc6ax21[_0xbfe4[32]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[89]]+_0xbfe4[90]+JSON[_0xbfe4[91]](_0xbc6ax2b)+_0xbfe4[92])})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[107]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){var _0xbc6ax2f={where:{ChatRoomId:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]]},include:[{model:User,attributes:[_0xbfe4[41],_0xbfe4[108],_0xbfe4[102],_0xbfe4[103]]},{model:ChatVisitor,attributes:[_0xbfe4[41],_0xbfe4[102],_0xbfe4[103]]}]};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[109]]===_0xbfe4[46]){_0xbc6ax2f[_0xbfe4[110]][_0xbfe4[41]]={$gt:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[111]]}};ChatMessage[_0xbfe4[35]](_0xbc6ax2f)[_0xbfe4[34]](function(_0xbc6ax30){var _0xbc6ax31={success:true,messages:_0xbc6ax30,composing:false,composing_fullname:null};_0xbc6ax21[_0xbfe4[32]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[89]]+_0xbfe4[90]+JSON[_0xbfe4[91]](_0xbc6ax31)+_0xbfe4[92])})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[112]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){var _0xbc6ax2f={where:{ChatRoomId:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]]},include:[{model:User,attributes:[_0xbfe4[41],_0xbfe4[108],_0xbfe4[102],_0xbfe4[103]]},{model:ChatVisitor,attributes:[_0xbfe4[41],_0xbfe4[102],_0xbfe4[103]]}]};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[109]]===_0xbfe4[46]){_0xbc6ax2f[_0xbfe4[110]][_0xbfe4[41]]={$gt:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[111]]}};ChatMessage[_0xbfe4[115]]({body:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[114]][_0xbfe4[113]],ChatRoomId:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]],ChatVisitorId:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]]})[_0xbfe4[34]](function(_0xbc6ax32){ChatMessage[_0xbfe4[35]](_0xbc6ax2f)[_0xbfe4[34]](function(_0xbc6ax30){var _0xbc6ax31={errors:[],success:true,data:_0xbc6ax32,messages:_0xbc6ax30};_0xbc6ax21[_0xbfe4[32]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[89]]+_0xbfe4[90]+JSON[_0xbfe4[91]](_0xbc6ax31)+_0xbfe4[92])})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[116]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return ChatRoom[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]])[_0xbfe4[34]](function(_0xbc6ax2d){return _0xbc6ax2d[_0xbfe4[119]]({status:_0xbfe4[117],completeReason:_0xbfe4[118]})})[_0xbfe4[34]](function(){var _0xbc6ax31={success:true,errors:[]};_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]]={};_0xbc6ax21[_0xbfe4[32]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[89]]+_0xbfe4[90]+JSON[_0xbfe4[91]](_0xbc6ax31)+_0xbfe4[92])})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[120]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){var _0xbc6ax33=uaParser[_0xbfe4[124]](_0xbc6ax20[_0xbfe4[123]][_0xbfe4[122]])[_0xbfe4[121]]();var _0xbc6ax34=languageParser[_0xbfe4[126]](_0xbc6ax20[_0xbfe4[123]][_0xbfe4[125]]);var _0xbc6ax35=_0xbc6ax20[_0xbfe4[123]][_0xbfe4[127]]?_0xbc6ax20[_0xbfe4[123]][_0xbfe4[127]]:_0xbc6ax20[_0xbfe4[129]][_0xbfe4[128]]||_0xbc6ax20[_0xbfe4[130]];var _0xbc6ax36={fullname:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[102]],email:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[103]],remote_address:_0xbc6ax35,user_agent:_0xbc6ax20[_0xbfe4[123]][_0xbfe4[122]],visitor_language:_0xbc6ax20[_0xbfe4[123]][_0xbfe4[125]],referer:_0xbc6ax20[_0xbfe4[123]][_0xbfe4[132]],origin:_0xbfe4[133],browser:_0xbc6ax33[_0xbfe4[134]][_0xbfe4[108]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[134]][_0xbfe4[136]],engine:_0xbc6ax33[_0xbfe4[137]][_0xbfe4[108]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[137]][_0xbfe4[136]],os:_0xbc6ax33[_0xbfe4[138]][_0xbfe4[108]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[138]][_0xbfe4[136]],device:_0xbc6ax33[_0xbfe4[140]][_0xbfe4[139]]?_0xbc6ax33[_0xbfe4[140]][_0xbfe4[139]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[140]][_0xbfe4[141]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[140]][_0xbfe4[142]]:null,ChatWebsiteId:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[143]]};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[144]]&&_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[145]]){_0xbc6ax36[_0xbfe4[144]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[144]];_0xbc6ax36[_0xbfe4[145]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[145]]};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[146]]&&_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[147]]){_0xbc6ax36[_0xbfe4[146]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[146]];_0xbc6ax36[_0xbfe4[147]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[147]]};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[148]]&&_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[149]]){_0xbc6ax36[_0xbfe4[148]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[148]];_0xbc6ax36[_0xbfe4[149]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[131]][_0xbfe4[149]]};return ChatVisitor[_0xbfe4[115]](_0xbc6ax36)[_0xbfe4[34]](function(_0xbc6ax37){_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[102]]=_0xbc6ax37[_0xbfe4[102]];_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[103]]=_0xbc6ax37[_0xbfe4[103]];_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[104]]=md5(_0xbc6ax37[_0xbfe4[103]]).toString(_0xbfe4[150]);_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]]=_0xbc6ax37[_0xbfe4[41]];var _0xbc6ax31={success:true,errors:[],chatVisitor:{id:_0xbc6ax37[_0xbfe4[41]]}};_0xbc6ax21[_0xbfe4[32]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[89]]+_0xbfe4[90]+JSON[_0xbfe4[91]](_0xbc6ax31)+_0xbfe4[92])})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[151]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return ChatVisitor[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]])[_0xbfe4[34]](function(_0xbc6ax37){return _0xbc6ax37[_0xbfe4[119]]({status:_0xbfe4[94]})})[_0xbfe4[34]](function(){var _0xbc6ax31={success:true,errors:[]};_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]]={};_0xbc6ax21[_0xbfe4[32]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[89]]+_0xbfe4[90]+JSON[_0xbfe4[91]](_0xbc6ax31)+_0xbfe4[92])})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[152]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return sequelize[_0xbfe4[164]]()[_0xbfe4[34]](function(_0xbc6ax38){var _0xbc6ax35=_0xbc6ax20[_0xbfe4[123]][_0xbfe4[127]]?_0xbc6ax20[_0xbfe4[123]][_0xbfe4[127]]:_0xbc6ax20[_0xbfe4[129]][_0xbfe4[128]]||_0xbc6ax20[_0xbfe4[130]];var _0xbc6ax33=uaParser[_0xbfe4[124]](_0xbc6ax20[_0xbfe4[123]][_0xbfe4[122]])[_0xbfe4[121]]();var _0xbc6ax34=languageParser[_0xbfe4[126]](_0xbc6ax20[_0xbfe4[123]][_0xbfe4[125]]);var _0xbc6ax36={fullname:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[102]],email:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[103]],remote_address:_0xbc6ax35,user_agent:_0xbc6ax20[_0xbfe4[123]][_0xbfe4[122]],visitor_language:_0xbc6ax20[_0xbfe4[123]][_0xbfe4[125]],browser:_0xbc6ax33[_0xbfe4[134]][_0xbfe4[108]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[134]][_0xbfe4[136]],engine:_0xbc6ax33[_0xbfe4[137]][_0xbfe4[108]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[137]][_0xbfe4[136]],os:_0xbc6ax33[_0xbfe4[138]][_0xbfe4[108]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[138]][_0xbfe4[136]],device:_0xbc6ax33[_0xbfe4[140]][_0xbfe4[139]]?_0xbc6ax33[_0xbfe4[140]][_0xbfe4[139]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[140]][_0xbfe4[141]]+_0xbfe4[135]+_0xbc6ax33[_0xbfe4[140]][_0xbfe4[142]]:null,referer:_0xbc6ax20[_0xbfe4[123]][_0xbfe4[132]],origin:_0xbfe4[154],status:_0xbfe4[94],ChatWebsiteId:parseInt(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[155]],10),ChatEnquiry:{username:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[102]],email:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[103]],text:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[113]],ChatWebsiteId:parseInt(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[155]],10)}};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[156]]&&_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[157]]){_0xbc6ax36[_0xbfe4[156]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[156]];_0xbc6ax36[_0xbfe4[157]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[157]]};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[158]]&&_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[159]]){_0xbc6ax36[_0xbfe4[158]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[158]];_0xbc6ax36[_0xbfe4[159]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[159]]};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[160]]&&_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[161]]){_0xbc6ax36[_0xbfe4[160]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[160]];_0xbc6ax36[_0xbfe4[161]]=_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[153]][_0xbfe4[161]]};return ChatVisitor[_0xbfe4[115]](_0xbc6ax36,{transaction:_0xbc6ax38,include:[{model:ChatEnquiry}]})[_0xbfe4[34]](function(){_0xbc6ax38[_0xbfe4[163]]();_0xbc6ax21[_0xbfe4[32]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[89]]+_0xbfe4[90]+JSON[_0xbfe4[91]]({success:true,errors:[]})+_0xbfe4[92])})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax38[_0xbfe4[162]]();_0xbc6ax22(_0xbc6ax23)})})};exports[_0xbfe4[165]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){if(_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]]&&_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]]&&_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]]){ChatMessage[_0xbfe4[35]]({where:{ChatRoomId:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[96]]},include:[{model:Agent,attributes:[_0xbfe4[41],_0xbfe4[102]]},{model:ChatVisitor,attributes:[_0xbfe4[41],_0xbfe4[102]]}]})[_0xbfe4[34]](function(_0xbc6ax30){var _0xbc6ax39=[];_0xbc6ax30[_0xbfe4[171]](function(_0xbc6ax32){var _0xbc6ax3a={name:_0xbc6ax32[_0xbfe4[166]]?_0xbc6ax32[_0xbfe4[21]][_0xbfe4[102]]:_0xbc6ax32[_0xbfe4[24]][_0xbfe4[102]],text:_0xbc6ax32[_0xbfe4[168]][_0xbfe4[167]](/(\r\n|\n|\r)/gm,_0xbfe4[135]),date:_0xbc6ax32[_0xbfe4[169]]};_0xbc6ax39[_0xbfe4[170]](_0xbc6ax3a)});var _0xbc6ax3b=csv(_0xbc6ax39);_0xbc6ax21[_0xbfe4[142]](_0xbfe4[172])[_0xbfe4[33]](200)[_0xbfe4[32]](_0xbc6ax3b)})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax22(_0xbc6ax23)})}};exports[_0xbfe4[173]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return Xchatty[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]])[_0xbfe4[34]](function(_0xbc6ax3c){if(!_0xbc6ax3c){return _0xbc6ax21[_0xbfe4[174]](404)};return _0xbc6ax21[_0xbfe4[32]](_0xbc6ax3c)})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[115]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return Xchatty[_0xbfe4[115]](_0xbc6ax20[_0xbfe4[168]])[_0xbfe4[34]](function(_0xbc6ax3c){return _0xbc6ax21[_0xbfe4[33]](201)[_0xbfe4[32]](_0xbc6ax3c)})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[119]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){if(_0xbc6ax20[_0xbfe4[168]][_0xbfe4[41]]){delete _0xbc6ax20[_0xbfe4[168]][_0xbfe4[41]]};return Xchatty[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]])[_0xbfe4[34]](function(_0xbc6ax3c){if(!_0xbc6ax3c){return _0xbc6ax21[_0xbfe4[174]](404)};var _0xbc6ax3d=_[_0xbfe4[175]](_0xbc6ax3c,_0xbc6ax20[_0xbfe4[168]]);_0xbc6ax3d[_0xbfe4[176]]()[_0xbfe4[34]](function(){return _0xbc6ax21[_0xbfe4[33]](200)[_0xbfe4[32]](_0xbc6ax3c)})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[177]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return Xchatty[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]])[_0xbfe4[34]](function(_0xbc6ax3c){if(!_0xbc6ax3c){return _0xbc6ax21[_0xbfe4[174]](404)};_0xbc6ax3c[_0xbfe4[177]]()[_0xbfe4[34]](function(){return _0xbc6ax21[_0xbfe4[174]](204)})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[178]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){var _0xbc6ax3e=xchatty_components[_0xbfe4[179]];return ChatWebsite[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]],{include:[{all:true}]})[_0xbfe4[34]](function(_0xbc6ax25){var _0xbc6ax3f={rootPath:Util[_0xbfe4[44]](_0xbc6ax25[_0xbfe4[43]])+_0xbfe4[45],headerShape:_0xbc6ax25[_0xbfe4[52]],enquiryEnable:_0xbc6ax25[_0xbfe4[180]],onlineFields:_0xbc6ax25[_0xbfe4[181]],renderedOnlineField:function(){var _0xbc6ax40=_0xbfe4[99];var _0xbc6ax41=this;switch(this[_0xbfe4[207]]){case _0xbfe4[191]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[183],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[186]:_0xbfe4[99]);_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[188],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax41[_0xbfe4[189]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[185]:_0xbfe4[99]);_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[193]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[183],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[186]:_0xbfe4[99]);_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[192],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax41[_0xbfe4[189]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[185]:_0xbfe4[99]);_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[199]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[194],_0xbc6ax41[_0xbfe4[184]]);_[_0xbfe4[171]](_0xbc6ax41[_0xbfe4[195]],function(_0xbc6ax42){_0xbc6ax40+=_0xbfe4[196];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[197],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax42,_0xbc6ax42);_0xbc6ax40+=_0xbfe4[198]});_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[201]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[194],_0xbc6ax41[_0xbfe4[184]]);_[_0xbfe4[171]](_0xbc6ax41[_0xbfe4[195]],function(_0xbc6ax42){_0xbc6ax40+=_0xbfe4[196];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[200],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax42,_0xbc6ax42);_0xbc6ax40+=_0xbfe4[198]});_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[206]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[202],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[184]]);_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[203],_0xbc6ax41[_0xbfe4[30]]+1);_[_0xbfe4[171]](_0xbc6ax41[_0xbfe4[195]],function(_0xbc6ax42){_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[204],_0xbc6ax42,_0xbc6ax42)});_0xbc6ax40+=_0xbfe4[205];break};_0xbc6ax40+=_0xbfe4[208];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[209],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax41[_0xbfe4[184]]);return _0xbc6ax40},offlineFields:_0xbc6ax25[_0xbfe4[210]],renderedOfflineField:function(){var _0xbc6ax40=_0xbfe4[99];var _0xbc6ax41=this;switch(this[_0xbfe4[207]]){case _0xbfe4[191]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[211],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[186]:_0xbfe4[99]);_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[212],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax41[_0xbfe4[189]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[185]:_0xbfe4[99]);_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[193]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[211],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[186]:_0xbfe4[99]);_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[213],_0xbc6ax41[_0xbfe4[30]],_0xbc6ax41[_0xbfe4[184]],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax41[_0xbfe4[189]],_0xbc6ax41[_0xbfe4[185]]?_0xbfe4[185]:_0xbfe4[99]);_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[199]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[194],_0xbc6ax41[_0xbfe4[184]]);_[_0xbfe4[171]](_0xbc6ax41[_0xbfe4[195]],function(_0xbc6ax42){_0xbc6ax40+=_0xbfe4[196];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[214],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax42,_0xbc6ax42);_0xbc6ax40+=_0xbfe4[198]});_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[201]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[194],_0xbc6ax41[_0xbfe4[184]]);_[_0xbfe4[171]](_0xbc6ax41[_0xbfe4[195]],function(_0xbc6ax42){_0xbc6ax40+=_0xbfe4[196];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[215],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax42,_0xbc6ax42);_0xbc6ax40+=_0xbfe4[198]});_0xbc6ax40+=_0xbfe4[190];break;case _0xbfe4[206]:_0xbc6ax40=_0xbfe4[182];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[194],_0xbc6ax41[_0xbfe4[184]]);_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[216],_0xbc6ax41[_0xbfe4[30]]+1);_[_0xbfe4[171]](_0xbc6ax41[_0xbfe4[195]],function(_0xbc6ax42){_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[204],_0xbc6ax42,_0xbc6ax42)});_0xbc6ax40+=_0xbfe4[205];break};_0xbc6ax40+=_0xbfe4[208];_0xbc6ax40+=util[_0xbfe4[187]](_0xbfe4[217],_0xbc6ax41[_0xbfe4[30]]+1,_0xbc6ax41[_0xbfe4[184]]);return _0xbc6ax40}};_0xbc6ax3e=Mustache[_0xbfe4[66]](_0xbc6ax3e,_0xbc6ax3f);return _0xbc6ax21[_0xbfe4[33]](200)[_0xbfe4[218]](_0xbc6ax3e)})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[219]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return ChatWebsite[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[42]][_0xbfe4[41]],{include:[{model:ChatProactiveAction}]})[_0xbfe4[34]](function(_0xbc6ax25){if(!_0xbc6ax25){return _0xbc6ax21[_0xbfe4[33]](400)[_0xbfe4[218]]({})};return _0xbc6ax21[_0xbfe4[33]](200)[_0xbfe4[218]](_0xbc6ax25.ChatProactiveActions)})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax22(_0xbc6ax23)})};exports[_0xbfe4[220]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){return ChatRoom[_0xbfe4[67]](_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[223]][_0xbfe4[96]])[_0xbfe4[34]](function(_0xbc6ax2d){if(!_0xbc6ax2d){return _0xbc6ax21[_0xbfe4[33]](400)[_0xbfe4[218]]({})};if(_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[223]][_0xbfe4[222]](_0xbfe4[221])&&_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[223]][_0xbfe4[222]](_0xbfe4[113])){return _0xbc6ax2d[_0xbfe4[119]]({rating:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[223]][_0xbfe4[221]],ratingMessage:_0xbc6ax20[_0xbfe4[81]][_0xbfe4[101]][_0xbfe4[223]][_0xbfe4[113]]})};return})[_0xbfe4[34]](function(){return _0xbc6ax21[_0xbfe4[33]](200)[_0xbfe4[218]]({})})[_0xbfe4[31]](function(_0xbc6ax23){return _0xbc6ax21[_0xbfe4[33]](400)[_0xbfe4[218]](_0xbc6ax23)})};exports[_0xbfe4[224]]=function(_0xbc6ax20,_0xbc6ax21,_0xbc6ax22){if(_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[222]](_0xbfe4[93])&&_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]]>0){return ReportChatSession[_0xbfe4[225]]({where:{visitorid:_0xbc6ax20[_0xbfe4[87]][_0xbfe4[78]][_0xbfe4[93]]}})[_0xbfe4[34]](function(_0xbc6ax43){return _0xbc6ax43[_0xbfe4[119]]({abandon:true})})[_0xbfe4[34]](function(){return _0xbc6ax21[_0xbfe4[33]](200)[_0xbfe4[218]]({})})[_0xbfe4[31]](function(_0xbc6ax23){_0xbc6ax21[_0xbfe4[33]](500)[_0xbfe4[218]]({})})};return _0xbc6ax21[_0xbfe4[33]](200)[_0xbfe4[218]]({})}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var jsmin = require('jsmin').jsmin;
+var Mustache = require('mustache');
+var querystring = require('querystring');
+var path = require('path');
+var md5 = require('md5');
+var fs = require('fs');
+var UAParser = require('ua-parser-js');
+var uaParser = new UAParser();
+var languageParser = require('accept-language-parser');
+var ipaddr = require('ipaddr.js');
+var geoip = require('geoip-lite');
+var csv = require('to-csv');
+var util = require('util');
+var moment = require('moment');
+
+var config = require('../../config/environment');
+var Xchatty = require('../../models').Xchatty;
+var xchatty_components = require('../../components/xchatty');
+var Util = require('../../config/util');
+
+var sequelize = require('../../models').sequelize;
+var User = require('../../models').User;
+var Agent = require('../../models').User;
+var ChatRoom = require('../../models').ChatRoom;
+var ChatEnquiry = require('../../models').ChatEnquiry;
+var ChatVisitor = require('../../models').ChatVisitor;
+var ChatMessage = require('../../models').ChatMessage;
+var ChatWebsite = require('../../models').ChatWebsite;
+var ChatWebsitesField = require('../../models').ChatWebsitesField;
+var ChatProactiveAction = require('../../models').ChatProactiveAction;
+var ReportChatSession = require('../../models').ReportChatSession;
+
+var id = 1;
+
+// Get list of xchattys
+exports.index = function(req, res, next) {
+  return Xchatty
+    .findAll()
+    .then(function(xchattys) {
+      return res.status(200).send(xchattys);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+exports.getJsByWebsite = function(req, res, next) {
+
+  // TO DO: Find the configuration of the website and replace configuration in the file
+  ChatWebsite
+    .findById(req.params.id)
+    .then(function(chatWebsite) {
+      res.set({
+        'Content-Type': 'application/javascript',
+        'x-timestamp': Date.now(),
+        'x-sent': true
+      });
+
+      var js = xchatty_components.js;
+      /*jshint multistr: true */
+      var configJS = {
+        websiteId: req.params.id,
+        // rootPath: path.join(chatWebsite.remote, 'api', 'xchatty/'),
+        rootPath: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/',
+        signedUp: 'false',
+        windowFocused: 'false',
+        isNewPage: 'true',
+        processingSignUp: 'false',
+        processingEnquiry: 'false',
+        processingSend: 'false',
+        processingRating: 'false',
+        visitorFullname: '""',
+        visitorAvatar: '""',
+        timerReadMessages: 'null',
+        timerCheckStatus: 'null',
+        isOnline: 'false',
+        decayHistory: 0,
+        defaultTimeout: 5000,
+        isInitialStatusCheck: 'true',
+        muteNotificationSoundOnce: 'false',
+        assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets',
+        hasSessionSaf: 'false',
+        restoreOpenState: 'false',
+        animateHover: chatWebsite.animation,
+        hideEmail: 'false',
+        hideOffline: 'false',
+        headerShape: chatWebsite.header_shape,
+        HeaderOnline: chatWebsite.header_online,
+        OnlineMessage: chatWebsite.online_message,
+        UsernamePlaceholder: chatWebsite.username_placeholder,
+        EmailPlaceholder: chatWebsite.email_placeholder,
+        StartChatButtonText: chatWebsite.start_chat_button,
+        OfflineMessage: chatWebsite.offline_message,
+        HeaderOffline: chatWebsite.header_offline,
+        EnquiryMessagePlaceholder: chatWebsite.enquiry_message_placeholder,
+        EnquiryButtonText: chatWebsite.enquiry_button,
+        downloadTranscript: chatWebsite.download_transcript,
+        RatingMessage: chatWebsite.rating_message,
+        RatingSend: chatWebsite.rating_send,
+        RatingSkip: chatWebsite.rating_skip
+      };
+
+      js = Mustache.render(js, configJS);
+      res.send(js);
+
+    })
+    .catch(function(err) {
+      next(err);
+    });
+
+};
+
+exports.getStyleByWebsite = function(req, res, next) {
+
+  // TO DO: Find the configuration of the website and replace configuration in the file
+  ChatWebsite
+    .findById(req.params.id)
+    .then(function(chatWebsite) {
+
+      res.set({
+        'Content-Type': 'text/css',
+        'x-timestamp': Date.now(),
+        'x-sent': true
+      });
+
+      var css = xchatty_components.css;
+
+      var configCSS = {
+        // assetBase: path.join(chatWebsite.remote, 'api', 'xchatty',
+        //   'assets'),
+        assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets',
+        color: chatWebsite.color,
+        colorFocus: chatWebsite.color_focus,
+        colorButton: chatWebsite.color_button
+      };
+
+      css = Mustache.render(css, configCSS);
+      res.send(css);
+    })
+    .catch(function(err) {
+      next(err);
+    });
+};
+
+exports.getAssets = function(req, res, next) {
+  res.download(path.join(config.root, 'server', 'components', 'xchatty', 'assets', req.query.resource));
+};
+
+exports.getJqueryLibrary = function(req, res, next) {
+
+  // TODO: Find the configuration of the website and replace configuration in the file
+  res.set({
+    'Content-Type': 'application/javascript',
+    'x-timestamp': Date.now(),
+    'x-sent': true
+  });
+
+  var jquery = xchatty_components.jquery;
+  res.send(jquery);
+
+};
+
+exports.getStatus = function(req, res, next) {
+
+  if (!req.session.xchatty) {
+    req.session.xchatty = {};
+  }
+
+  var _jsonResponse = {};
+
+  return Agent
+    .findAll({
+      where: {
+        online: true,
+        role: 'agent'
+      }
+    })
+    .then(function(agents) {
+      if (req.query.data.open_state)
+        req.session.xchatty.open_state = req.query.data.open_state === 'true' ? true : false;
+      _jsonResponse = {
+        success: true,
+        has_session_saf: null,
+        signed_up: req.session.xchatty.room_id ? true : false,
+        fullname: req.session.xchatty.fullname ? req.session.xchatty.fullname : '',
+        email: req.session.xchatty.email ? req.session.xchatty.email : '',
+        avatar: req.session.xchatty.avatar ? req.session.xchatty.avatar : '',
+        open_state: req.session.xchatty.open_state || req.session.xchatty.room_id ? true : false,
+        online: agents.length ? true : false,
+        is_unserved: false,
+        room_id: 0
+      };
+      return;
+    })
+    .then(function() {
+      if (req.session.xchatty.visitor_id) {
+        return ChatRoom
+          .findOne({
+            where: {
+              ChatVisitorId: req.session.xchatty.visitor_id,
+              status: 'OPEN',
+              token: {
+                $ne: ''
+              }
+            }
+          });
+      }
+      return;
+    })
+    .then(function(chatRoom) {
+      if (chatRoom) {
+        req.session.xchatty.room_id = chatRoom.id;
+        _jsonResponse.room_id = chatRoom.id;
+        _jsonResponse.signed_up = true;
+      } else {
+        _jsonResponse.signed_up = false;
+      }
+      return;
+    })
+    .then(function() {
+      if (req.session.xchatty.visitor_id) {
+        return ChatVisitor
+          .findOne({
+            where: {
+              id: req.session.xchatty.visitor_id,
+              status: 'unserved'
+            }
+          })
+      }
+      return;
+    })
+    .then(function(visitor) {
+      if (visitor) {
+        _jsonResponse.is_unserved = true;
+      }
+      return res.send(req.query.callback + '(' + JSON.stringify(_jsonResponse) + ')');
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+exports.getMessages = function(req, res, next) {
+
+  /*jshint multistr: true */
+  var condition = {
+    where: {
+      ChatRoomId: req.session.xchatty.room_id
+    },
+    include: [{
+      model: User,
+      attributes: ['id', 'name', 'fullname', 'email']
+    }, {
+      model: ChatVisitor,
+      attributes: ['id', 'fullname', 'email']
+    }]
+  };
+
+  if (req.query.data.is_new_page === 'false') {
+    condition.where.id = {
+      $gt: req.query.data.last_id
+    };
+  }
+
+  ChatMessage
+    .findAll(condition)
+    .then(function(chatMessages) {
+      var json = {
+        success: true,
+        messages: chatMessages,
+        composing: false,
+        composing_fullname: null
+      };
+
+      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
+    })
+    .catch(function(err) {
+      next(err);
+    });
+};
+
+exports.sendMessage = function(req, res, next) {
+
+  /*jshint multistr: true */
+  var condition = {
+    where: {
+      ChatRoomId: req.session.xchatty.room_id
+    },
+    include: [{
+      model: User,
+      attributes: ['id', 'name', 'fullname', 'email']
+    }, {
+      model: ChatVisitor,
+      attributes: ['id', 'fullname', 'email']
+    }]
+  };
+
+  if (req.query.data.is_new_page === 'false') {
+    condition.where.id = {
+      $gt: req.query.data.last_id
+    };
+  }
+
+  ChatMessage
+    .create({
+      body: req.query.data.Message.message,
+      ChatRoomId: req.session.xchatty.room_id,
+      ChatVisitorId: req.session.xchatty.visitor_id
+    })
+    .then(function(chatMessage) {
+      ChatMessage
+        .findAll(condition)
+        .then(function(chatMessages) {
+          var json = {
+            errors: [],
+            success: true,
+            data: chatMessage,
+            messages: chatMessages
+          };
+
+          res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
+        })
+        .catch(function(err) {
+          next(err);
+        });
+    })
+    .catch(function(err) {
+      next(err);
+    });
+
+};
+
+exports.signoutCustomer = function(req, res, next) {
+  return ChatRoom
+    .findById(req.session.xchatty.room_id)
+    .then(function(chatRoom) {
+      return chatRoom
+        .update({
+          status: 'CLOSED',
+          completeReason: 'requester'
+        });
+    })
+    .then(function() {
+      var json = {
+        success: true,
+        errors: []
+      };
+      req.session.xchatty = {};
+      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
+    })
+    .catch(function(err) {
+      next(err);
+    });
+};
+
+exports.signupCustomer = function(req, res, next) {
+
+  var ua = uaParser.setUA(req.headers['user-agent']).getResult();
+  var languages = languageParser.parse(req.headers['accept-language']);
+  // var addr = ipaddr.parse(req.connection.remoteAddress);
+
+  var remoteAddress = req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip;
+
+  // var ipv4Addr = "151.0.175.186";
+  // var geo = geoip.lookup(ipv4Addr);
+
+  var body = {
+    fullname: req.query.data.Discussion.fullname,
+    email: req.query.data.Discussion.email,
+    // remote_address: addr,
+    remote_address: remoteAddress,
+    user_agent: req.headers['user-agent'],
+    visitor_language: req.headers['accept-language'],
+    referer: req.headers.referer,
+    origin: 'webchat',
+    browser: ua.browser.name + ' ' + ua.browser.version,
+    engine: ua.engine.name + ' ' + ua.engine.version,
+    os: ua.os.name + ' ' + ua.os.version,
+    device: ua.device.model ? ua.device.model + ' ' + ua.device.vendor + ' ' + ua.device.type : null,
+    // country: geo.country,
+    // city: geo.city,
+    // region: geo.region,
+    // latitude: geo.ll.length ? geo.ll[0].toString() : null,
+    // longitude: geo.ll.length ? geo.ll[1].toString() : null,
+    ChatWebsiteId: req.query.chatWebsiteId
+  };
+
+  if (req.query.data.Discussion.data1 && req.query.data.Discussion.labelData1) {
+    body.data1 = req.query.data.Discussion.data1;
+    body.labelData1 = req.query.data.Discussion.labelData1;
+  }
+  if (req.query.data.Discussion.data2 && req.query.data.Discussion.labelData2) {
+    body.data2 = req.query.data.Discussion.data2;
+    body.labelData2 = req.query.data.Discussion.labelData2;
+  }
+  if (req.query.data.Discussion.data3 && req.query.data.Discussion.labelData3) {
+    body.data3 = req.query.data.Discussion.data3;
+    body.labelData3 = req.query.data.Discussion.labelData3;
+  }
+
+  return ChatVisitor
+    .create(body)
+    .then(function(chatVisitor) {
+
+      req.session.xchatty.fullname = chatVisitor.fullname;
+      req.session.xchatty.email = chatVisitor.email;
+      req.session.xchatty.avatar = md5(chatVisitor.email).toString('base64');
+      req.session.xchatty.visitor_id = chatVisitor.id;
+
+      var json = {
+        success: true,
+        errors: [],
+        chatVisitor: {
+          id: chatVisitor.id
+        }
+      };
+
+      /*jshint multistr: true */
+      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
+    })
+    .catch(function(err) {
+      next(err);
+    });
+};
+
+exports.unservedCustomer = function(req, res, next) {
+  return ChatVisitor
+    .findById(req.session.xchatty.visitor_id)
+    .then(function(chatVisitor) {
+      return chatVisitor
+        .update({
+          status: 'unserved'
+        });
+    })
+    .then(function() {
+      var json = {
+        success: true,
+        errors: []
+      };
+      req.session.xchatty = {};
+      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
+    })
+    .catch(function(err) {
+      next(err);
+    });
+};
+
+exports.submitEnquiry = function(req, res, next) {
+
+  return sequelize.transaction().then(function(t) {
+
+    var remoteAddress = req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip;
+
+    var ua = uaParser.setUA(req.headers['user-agent']).getResult();
+    var languages = languageParser.parse(req.headers['accept-language']);
+    var body = {
+      fullname: req.query.data.Enquiry.fullname,
+      email: req.query.data.Enquiry.email,
+      remote_address: remoteAddress,
+      user_agent: req.headers['user-agent'],
+      visitor_language: req.headers['accept-language'],
+      browser: ua.browser.name + ' ' + ua.browser.version,
+      engine: ua.engine.name + ' ' + ua.engine.version,
+      os: ua.os.name + ' ' + ua.os.version,
+      device: ua.device.model ? ua.device.model + ' ' + ua.device.vendor + ' ' + ua.device.type : null,
+      referer: req.headers.referer,
+      origin: 'enquiry',
+      status: 'unserved',
+      ChatWebsiteId: parseInt(req.query.data.Enquiry.websiteId, 10),
+      ChatEnquiry: {
+        username: req.query.data.Enquiry.fullname,
+        email: req.query.data.Enquiry.email,
+        text: req.query.data.Enquiry.message,
+        ChatWebsiteId: parseInt(req.query.data.Enquiry.websiteId, 10)
+      }
+    };
+
+    if (req.query.data.Enquiry.offlineData1 && req.query.data.Enquiry.labelOfflineData1) {
+      body.offlineData1 = req.query.data.Enquiry.offlineData1;
+      body.labelOfflineData1 = req.query.data.Enquiry.labelOfflineData1;
+    }
+    if (req.query.data.Enquiry.offlineData2 && req.query.data.Enquiry.labelOfflineData2) {
+      body.offlineData2 = req.query.data.Enquiry.offlineData2;
+      body.labelOfflineData2 = req.query.data.Enquiry.labelOfflineData2;
+    }
+    if (req.query.data.Enquiry.offlineData3 && req.query.data.Enquiry.labelOfflineData3) {
+      body.offlineData3 = req.query.data.Enquiry.offlineData3;
+      body.labelOfflineData3 = req.query.data.Enquiry.labelOfflineData3;
+    }
+
+    return ChatVisitor
+      .create(body, {
+        transaction: t,
+        include: [{
+          model: ChatEnquiry
+        }]
+      })
+      .then(function() {
+        t.commit();
+        res.send(req.query.callback + '(' + JSON.stringify({
+          success: true,
+          errors: []
+        }) + ')');
+      })
+      .catch(function(err) {
+        t.rollback();
+        next(err);
+      });
+  });
+};
+
+exports.getTranscript = function(req, res, next) {
+  if (req.session.xchatty && req.session.xchatty.visitor_id && req.session.xchatty.room_id) {
+    ChatMessage
+      .findAll({
+        where: {
+          ChatRoomId: req.session.xchatty.room_id
+        },
+        include: [{
+          model: Agent,
+          attributes: ['id', 'fullname']
+        }, {
+          model: ChatVisitor,
+          attributes: ['id', 'fullname']
+        }]
+      })
+      .then(function(chatMessages) {
+        var chatMessageForCSV = [];
+        chatMessages.forEach(function(chatMessage) {
+          var chatMsg = {
+            name: chatMessage.UserId ? chatMessage.User.fullname : chatMessage.ChatVisitor.fullname,
+            text: chatMessage.body.replace(/(\r\n|\n|\r)/gm, " "),
+            date: chatMessage.createdAt
+          };
+          chatMessageForCSV.push(chatMsg);
+        });
+        var csv_transcript = csv(chatMessageForCSV);
+        res.type('text/csv').status(200).send(csv_transcript);
+      })
+      .catch(function(err) {
+        next(err);
+      });
+  }
+};
+
+// Get a single xchatty
+exports.show = function(req, res, next) {
+  return Xchatty
+    .findById(req.params.id)
+    .then(function(xchatty) {
+      if (!xchatty) {
+        return res.sendStatus(404);
+      }
+      return res.send(xchatty);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Creates a new xchatty in the DB.
+exports.create = function(req, res, next) {
+  return Xchatty
+    .create(req.body)
+    .then(function(xchatty) {
+      return res.status(201).send(xchatty);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Updates an existing xchatty in the DB.
+exports.update = function(req, res, next) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+
+  return Xchatty
+    .findById(req.params.id)
+    .then(function(xchatty) {
+      if (!xchatty) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(xchatty, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(xchatty);
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+// Deletes a xchatty from the DB.
+exports.destroy = function(req, res, next) {
+  return Xchatty
+    .findById(req.params.id)
+    .then(function(xchatty) {
+      if (!xchatty) {
+        return res.sendStatus(404);
+      }
+      xchatty.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+
+exports.getHtmlByWebsite = function(req, res, next) {
+  var template = xchatty_components.template;
+  return ChatWebsite
+    .findById(req.params.id, {
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(chatWebsite) {
+      var configWebsite = {
+        rootPath: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/',
+        headerShape: chatWebsite.header_shape,
+        enquiryEnable: chatWebsite.enquiry_enable,
+        onlineFields: chatWebsite.Online,
+        renderedOnlineField: function() {
+          var renderedElement = '';
+          var element = this;
+          switch (this.component) {
+            case 'textInput':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label" for="%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
+              renderedElement += util.format('<input data-label="%s" type="text" id="%d" name="data[Discussion][data%d]" placeholder="%s" %s/>', element.label, element.index, element.index +
+                1,
+                element.placeholder, element.required ?
+                'required' :
+                '');
+              renderedElement += '</div>';
+              break;
+            case 'textArea':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label" for="%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
+              renderedElement += util.format('<textarea id="%d" data-label="%s" name="data[Discussion][data%d]" placeholder="%s" %s></textarea>', element.index, element.label, element.index +
+                1,
+                element.placeholder, element.required ?
+                'required' :
+                '');
+              renderedElement += '</div>';
+              break;
+            case 'checkbox':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
+              _.forEach(element.options, function(item) {
+                renderedElement += '<label style="display:block;">';
+                renderedElement += util.format('<input type="checkbox" name="data[Discussion][data%d]" value="%s"> %s<br>', element.index + 1, item, item);
+                renderedElement += '</label>';
+              });
+              renderedElement += '</div>';
+              break;
+            case 'radio':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
+              _.forEach(element.options, function(item) {
+                renderedElement += '<label style="display:block;">';
+                renderedElement += util.format('<input type="radio" name="data[Discussion][data%d]" value="%s"> %s<br>', element.index + 1, item, item);
+                renderedElement += '</label>';
+              });
+              renderedElement += '</div>';
+              break;
+            case 'select':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label" for="%d">%s</label>', element.index, element.label);
+              renderedElement += util.format('<select name="data[Discussion][data%d]">', element.index + 1);
+              _.forEach(element.options, function(item) {
+                renderedElement += util.format('<option value="%s">%s</option>', item, item);
+              });
+              renderedElement += '</select></div>';
+              break;
+          }
+          renderedElement += '<br>';
+          renderedElement += util.format('<input type="hidden" name="data[Discussion][labelData%d]" value="%s">', element.index + 1, element.label);
+          return renderedElement;
+        },
+        offlineFields: chatWebsite.Offline,
+        renderedOfflineField: function() {
+          var renderedElement = '';
+          var element = this;
+          switch (this.component) {
+            case 'textInput':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label" for="offline%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
+              renderedElement += util.format('<input data-label="%s" type="text" id="offline%d" name="data[Enquiry][offlineData%d]" placeholder="%s" %s/>', element.label, element.index,
+                element.index +
+                1,
+                element.placeholder, element.required ?
+                'required' :
+                '');
+              renderedElement += '</div>';
+              break;
+            case 'textArea':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label" for="offline%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
+              renderedElement += util.format('<textarea id="offline%d" data-label="%s" name="data[Enquiry][offlineData%d]" placeholder="%s" %s></textarea>', element.index, element.label,
+                element.index +
+                1,
+                element.placeholder, element.required ?
+                'required' :
+                '');
+              renderedElement += '</div>';
+              break;
+            case 'checkbox':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
+              _.forEach(element.options, function(item) {
+                renderedElement += '<label style="display:block;">';
+                renderedElement += util.format('<input type="checkbox" name="data[Enquiry][offlineData%d]" value="%s"> %s<br>', element.index + 1, item, item);
+                renderedElement += '</label>';
+              });
+              renderedElement += '</div>';
+              break;
+            case 'radio':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
+              _.forEach(element.options, function(item) {
+                renderedElement += '<label style="display:block;">';
+                renderedElement += util.format('<input type="radio" name="data[Enquiry][offlineData%d]" value="%s"> %s<br>', element.index + 1, item, item);
+                renderedElement += '</label>';
+              });
+              renderedElement += '</div>';
+              break;
+            case 'select':
+              renderedElement = '<div class="xc_div_group">';
+              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
+              renderedElement += util.format('<select name="data[Enquiry][offlineData%d]">', element.index + 1);
+              _.forEach(element.options, function(item) {
+                renderedElement += util.format('<option value="%s">%s</option>', item, item);
+              });
+              renderedElement += '</select></div>';
+              break;
+          }
+          renderedElement += '<br>';
+          renderedElement += util.format('<input type="hidden" name="data[Enquiry][labelOfflineData%d]" value="%s">', element.index + 1, element.label);
+          return renderedElement;
+        }
+      };
+      template = Mustache.render(template, configWebsite);
+      return res.status(200).jsonp(template);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+exports.getProactiveActionsByWebsite = function(req, res, next) {
+  return ChatWebsite
+    .findById(req.params.id, {
+      include: [{
+        model: ChatProactiveAction
+      }]
+    })
+    .then(function(chatWebsite) {
+      if (!chatWebsite) {
+        return res.status(400).jsonp({});
+      }
+      return res.status(200).jsonp(chatWebsite.ChatProactiveActions);
+    })
+    .catch(function(err) {
+      return next(err);
+    });
+};
+
+exports.setRating = function(req, res, next) {
+  return ChatRoom
+    .findById(req.query.data.Rating.room_id)
+    .then(function(chatRoom) {
+      if (!chatRoom) {
+        return res.status(400).jsonp({});
+      }
+      if (req.query.data.Rating.hasOwnProperty('rating') && req.query.data.Rating.hasOwnProperty('message')) {
+        return chatRoom
+          .update({
+            rating: req.query.data.Rating.rating,
+            ratingMessage: req.query.data.Rating.message
+          });
+      }
+      return;
+    })
+    .then(function() {
+      return res.status(200).jsonp({});
+    })
+    .catch(function(err) {
+      return res.status(400).jsonp(err);
+    });
+}
+
+exports.abandonCustomer = function(req, res, next) {
+  if (req.session.xchatty.hasOwnProperty('visitor_id') && req.session.xchatty.visitor_id > 0) {
+    return ReportChatSession
+      .find({
+        where: {
+          visitorid: req.session.xchatty.visitor_id
+        }
+      })
+      .then(function(reportChatSession) {
+        return reportChatSession
+          .update({
+            abandon: true
+          });
+      })
+      .then(function() {
+        return res.status(200).jsonp({});
+      })
+      .catch(function(err) {
+        res.status(500).jsonp({});
+      });
+  }
+  return res.status(200).jsonp({});
+}
index 6f6f65e..b8ec557 100644 (file)
@@ -1 +1,24 @@
-var _0x92ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x58\x63\x68\x61\x74\x74\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x78\x63\x68\x61\x74\x74\x79\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x78\x63\x68\x61\x74\x74\x79\x3A\x72\x65\x6D\x6F\x76\x65"];_0x92ff[0];var xchatty=require(_0x92ff[2])[_0x92ff[1]];exports[_0x92ff[3]]=function(_0x4a4ax2){};function onSave(_0x4a4ax2,_0x4a4ax4,_0x4a4ax5){_0x4a4ax2[_0x92ff[5]](_0x92ff[4],_0x4a4ax4)}function onRemove(_0x4a4ax2,_0x4a4ax4,_0x4a4ax5){_0x4a4ax2[_0x92ff[5]](_0x92ff[6],_0x4a4ax4)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var xchatty = require('../../models').Xchatty;
+
+exports.register = function(socket) {
+  // xchatty.afterCreate(function (doc) {
+  //   onSave(socket, doc);
+  // });
+  // xchatty.afterDestroy(function (doc) {
+  //   onRemove(socket, doc);
+  // });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('xchatty:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('xchatty:remove', doc);
+}
index 6109081..1d3a00a 100644 (file)
@@ -1 +1,32 @@
-var _0xe484=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x7A\x65\x6E\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x3A\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x74\x61\x67\x73","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x66\x69\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xe484[0];var express=require(_0xe484[1]);var auth=require(_0xe484[2]);var controller=require(_0xe484[3]);var router=express.Router();router[_0xe484[7]](_0xe484[4],auth[_0xe484[5]](),controller[_0xe484[6]]);router[_0xe484[7]](_0xe484[8],auth[_0xe484[5]](),controller[_0xe484[9]]);router[_0xe484[7]](_0xe484[10],auth[_0xe484[5]](),controller[_0xe484[11]]);router[_0xe484[7]](_0xe484[12],auth[_0xe484[5]](),controller[_0xe484[13]]);router[_0xe484[7]](_0xe484[14],auth[_0xe484[5]](),controller[_0xe484[15]]);router[_0xe484[7]](_0xe484[16],auth[_0xe484[5]](),controller[_0xe484[17]]);router[_0xe484[20]](_0xe484[18],auth[_0xe484[5]](),controller[_0xe484[19]]);router[_0xe484[20]](_0xe484[4],auth[_0xe484[5]](),controller[_0xe484[21]]);router[_0xe484[20]](_0xe484[14],auth[_0xe484[5]](),controller[_0xe484[22]]);router[_0xe484[20]](_0xe484[23],auth[_0xe484[5]](),controller[_0xe484[24]]);router[_0xe484[26]](_0xe484[8],auth[_0xe484[5]](),controller[_0xe484[25]]);router[_0xe484[26]](_0xe484[27],auth[_0xe484[5]](),controller[_0xe484[28]]);router[_0xe484[26]](_0xe484[29],auth[_0xe484[5]](),controller[_0xe484[30]]);router[_0xe484[31]](_0xe484[8],auth[_0xe484[5]](),controller[_0xe484[25]]);router[_0xe484[31]](_0xe484[29],auth[_0xe484[5]](),controller[_0xe484[30]]);router[_0xe484[33]](_0xe484[4],auth[_0xe484[5]](),controller[_0xe484[32]]);router[_0xe484[33]](_0xe484[8],auth[_0xe484[5]](),controller[_0xe484[34]]);router[_0xe484[33]](_0xe484[14],auth[_0xe484[5]](),controller[_0xe484[35]]);router[_0xe484[33]](_0xe484[16],auth[_0xe484[5]](),controller[_0xe484[36]]);router[_0xe484[33]](_0xe484[29],auth[_0xe484[5]](),controller[_0xe484[37]]);module[_0xe484[38]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var auth = require('../../auth/auth.service');
+var controller = require('./zendesk_account.controller');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/check', auth.isAuthenticated(), controller.checkAccount);
+router.get('/:id/fields', auth.isAuthenticated(), controller.getFields);
+router.get('/:id/configurations', auth.isAuthenticated(), controller.getAccountConfigurations);
+router.get('/:id/configurations/:cid', auth.isAuthenticated(), controller.getConfiguration);
+router.post('/validate/:field', auth.isAuthenticated(), controller.zendeskValidation);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.post('/:id/configurations', auth.isAuthenticated(), controller.createConfiguration);
+router.post('/:id/configurations/:cid/:type', auth.isAuthenticated(), controller.createField);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+// router.put('/:id/configurations/:cid', auth.isAuthenticated(), controller.updateConfiguration);
+router.put('/:id/configurations/:cid/tags', auth.isAuthenticated(), controller.addConfigurationTags);
+router.put('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), controller.updateField);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+// router.patch('/:id/configurations/:cid', auth.isAuthenticated(), controller.updateConfiguration);
+router.patch('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), controller.updateField);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+router.delete('/:id/configurations', auth.isAuthenticated(), controller.bulkDestroyConfigurations);
+router.delete('/:id/configurations/:cid', auth.isAuthenticated(), controller.destroyConfiguration);
+router.delete('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), controller.destroyField);
+
+module.exports = router;
index 815cfa3..78030cd 100644 (file)
@@ -1 +1,316 @@
-var _0xf772=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6E\x6F\x64\x65\x2D\x7A\x65\x6E\x64\x65\x73\x6B","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x45\x72\x72\x6F\x72\x3A","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x76\x65\x72\x69\x66\x69\x65\x64","\x61\x75\x74\x68","\x75\x73\x65\x72\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x6C\x69\x73\x74","\x74\x69\x63\x6B\x65\x74\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x73\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x49\x64","\x74\x79\x70\x65","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x66\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x73\x65\x74\x54\x61\x67\x73"];_0xf772[0];var _=require(_0xf772[1]);var Util=require(_0xf772[2]);var zendesk=require(_0xf772[3]);var ZendeskAccount=require(_0xf772[5])[_0xf772[4]];var ZendeskConfiguration=require(_0xf772[5])[_0xf772[6]];var ZendeskField=require(_0xf772[5])[_0xf772[7]];function handleError(_0xb5b3x8,_0xb5b3x9){_0xb5b3x9=_0xb5b3x9||500;return function(_0xb5b3xa){console[_0xf772[9]](_0xf772[8],_0xb5b3xa);_0xb5b3x8[_0xf772[11]](_0xb5b3x9)[_0xf772[10]](_0xb5b3xa)}}function responseWithResult(_0xb5b3x8,_0xb5b3x9){_0xb5b3x9=_0xb5b3x9||200;return function(_0xb5b3xc){if(_0xb5b3xc){_0xb5b3x8[_0xf772[11]](_0xb5b3x9)[_0xf772[12]](_0xb5b3xc)}}}function responseWithoutResult(_0xb5b3x8,_0xb5b3x9){_0xb5b3x9=_0xb5b3x9||200;return function(){_0xb5b3x8[_0xf772[13]](_0xb5b3x9)}}function handleEntityNotFound(_0xb5b3x8){return function(_0xb5b3xc){if(!_0xb5b3xc){_0xb5b3x8[_0xf772[11]](404)[_0xf772[14]]();return null};return _0xb5b3xc}}function saveUpdates(_0xb5b3x10){return function(_0xb5b3xc){return _0xb5b3xc[_0xf772[16]](_0xb5b3x10)[_0xf772[15]](function(_0xb5b3x11){return _0xb5b3x11})}}function removeEntity(_0xb5b3x8){return function(_0xb5b3xc){if(_0xb5b3xc){return _0xb5b3xc[_0xf772[17]]()[_0xf772[15]](function(){_0xb5b3x8[_0xf772[11]](204)[_0xf772[14]]()})}}}exports[_0xf772[18]]=function(_0xb5b3x13,_0xb5b3x8,_0xb5b3x14){return ZendeskAccount[_0xf772[24]](_0xf772[23])[_0xf772[22]](Util[_0xf772[21]](_0xb5b3x13[_0xf772[20]]))[_0xf772[15]](responseWithResult(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[25]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskAccount[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[26]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](responseWithResult(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[29]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskAccount[_0xf772[29]](_0xb5b3x13[_0xf772[30]])[_0xf772[15]](responseWithResult(_0xb5b3x8,201))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[31]]=function(_0xb5b3x13,_0xb5b3x8){if(_0xb5b3x13[_0xf772[30]][_0xf772[26]]){delete _0xb5b3x13[_0xf772[30]][_0xf772[26]]};return ZendeskAccount[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[26]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](saveUpdates(_0xb5b3x13[_0xf772[30]]))[_0xf772[15]](responseWithResult(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[17]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskAccount[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[26]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](removeEntity(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[32]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskAccount[_0xf772[17]]({where:{id:_0xb5b3x13[_0xf772[20]][_0xf772[33]]},individualHooks:true})[_0xf772[15]](responseWithResult(_0xb5b3x8,204))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[34]]=function(_0xb5b3x13,_0xb5b3x8){var _0xb5b3x15={};_0xb5b3x15[_0xb5b3x13[_0xf772[27]][_0xf772[35]]]=_0xb5b3x13[_0xf772[30]][_0xf772[36]];return ZendeskAccount[_0xf772[22]]({where:_0xb5b3x15})[_0xf772[15]](function(_0xb5b3x16){if(_0xb5b3x16[_0xf772[37]]){return _0xb5b3x8[_0xf772[11]](200)[_0xf772[10]]({isValid:false,value:_0xb5b3x13[_0xf772[30]][_0xf772[36]]})};return _0xb5b3x8[_0xf772[11]](200)[_0xf772[10]]({isValid:true,value:_0xb5b3x13[_0xf772[30]][_0xf772[36]]})})[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[38]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskAccount[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[26]])[_0xf772[15]](function(_0xb5b3x17){var _0xb5b3x18={username:_0xb5b3x17[_0xf772[39]],remoteUri:_0xb5b3x17[_0xf772[40]]};if(_0xb5b3x17[_0xf772[41]]===_0xf772[42]){_0xb5b3x18[_0xf772[42]]=_0xb5b3x17[_0xf772[42]]}else {if(_0xb5b3x17[_0xf772[41]]===_0xf772[43]){_0xb5b3x18[_0xf772[43]]=_0xb5b3x17[_0xf772[43]]}};var _0xb5b3x19=zendesk[_0xf772[44]](_0xb5b3x18);_0xb5b3x19[_0xf772[47]][_0xf772[46]](function(_0xb5b3xa,_0xb5b3x1a,_0xb5b3x16){if(_0xb5b3xa){console[_0xf772[9]](_0xb5b3xa);return handleError(_0xb5b3x8,_0xb5b3xa)};if(!_0xb5b3x16[_0xf772[45]]){return _0xb5b3x8[_0xf772[13]](500)};return _0xb5b3x8[_0xf772[13]](204)})})[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[48]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskAccount[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[26]])[_0xf772[15]](function(_0xb5b3x17){var _0xb5b3x18={username:_0xb5b3x17[_0xf772[39]],remoteUri:_0xb5b3x17[_0xf772[40]]};if(_0xb5b3x17[_0xf772[41]]===_0xf772[42]){_0xb5b3x18[_0xf772[42]]=_0xb5b3x17[_0xf772[42]]}else {if(_0xb5b3x17[_0xf772[41]]===_0xf772[43]){_0xb5b3x18[_0xf772[43]]=_0xb5b3x17[_0xf772[43]]}};var _0xb5b3x19=zendesk[_0xf772[44]](_0xb5b3x18);_0xb5b3x19[_0xf772[50]][_0xf772[49]](function(_0xb5b3xa,_0xb5b3x1a,_0xb5b3x16){if(_0xb5b3xa){console[_0xf772[9]](_0xb5b3xa);return handleError(_0xb5b3x8,_0xb5b3xa)};return _0xb5b3x8[_0xf772[11]](200)[_0xf772[10]](_0xb5b3x16)})})[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[51]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskConfiguration[_0xf772[24]]({method:[_0xf772[52],_0xb5b3x13[_0xf772[27]][_0xf772[26]]]})[_0xf772[22]](Util[_0xf772[21]](_0xb5b3x13[_0xf772[20]]))[_0xf772[15]](responseWithResult(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[53]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskConfiguration[_0xf772[24]]({method:[_0xf772[52],_0xb5b3x13[_0xf772[27]][_0xf772[26]]]})[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[54]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](responseWithResult(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[55]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskConfiguration[_0xf772[24]]({method:[_0xf772[52],_0xb5b3x13[_0xf772[27]][_0xf772[26]]]})[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[54]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](removeEntity(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[56]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskConfiguration[_0xf772[17]]({where:{id:_0xb5b3x13[_0xf772[20]][_0xf772[33]]},individualHooks:true})[_0xf772[15]](responseWithResult(_0xb5b3x8,204))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[57]]=function(_0xb5b3x13,_0xb5b3x8){_0xb5b3x13[_0xf772[30]][_0xf772[58]]=_0xb5b3x13[_0xf772[27]][_0xf772[26]];return ZendeskConfiguration[_0xf772[29]](_0xb5b3x13[_0xf772[30]])[_0xf772[15]](responseWithResult(_0xb5b3x8,201))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[59]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskConfiguration[_0xf772[24]]({method:[_0xf772[52],_0xb5b3x13[_0xf772[27]][_0xf772[26]]]})[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[54]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](function(_0xb5b3x1b){switch(_0xb5b3x13[_0xf772[27]][_0xf772[65]]){case _0xf772[61]:_0xb5b3x13[_0xf772[30]][_0xf772[60]]=_0xb5b3x13[_0xf772[27]][_0xf772[54]];break;case _0xf772[63]:_0xb5b3x13[_0xf772[30]][_0xf772[62]]=_0xb5b3x13[_0xf772[27]][_0xf772[54]];break;case _0xf772[35]:_0xb5b3x13[_0xf772[30]][_0xf772[64]]=_0xb5b3x13[_0xf772[27]][_0xf772[54]];break};return ZendeskField[_0xf772[29]](_0xb5b3x13[_0xf772[30]])})[_0xf772[15]](responseWithResult(_0xb5b3x8,201))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[66]]=function(_0xb5b3x13,_0xb5b3x8){if(_0xb5b3x13[_0xf772[30]][_0xf772[26]]){delete _0xb5b3x13[_0xf772[30]][_0xf772[26]]};return ZendeskField[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[67]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](saveUpdates(_0xb5b3x13[_0xf772[30]]))[_0xf772[15]](responseWithResult(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[68]]=function(_0xb5b3x13,_0xb5b3x8){return ZendeskField[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[67]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](removeEntity(_0xb5b3x8))[_0xf772[19]](handleError(_0xb5b3x8))};exports[_0xf772[69]]=function(_0xb5b3x13,_0xb5b3x8,_0xb5b3x14){return ZendeskConfiguration[_0xf772[28]](_0xb5b3x13[_0xf772[27]][_0xf772[54]])[_0xf772[15]](handleEntityNotFound(_0xb5b3x8))[_0xf772[15]](function(_0xb5b3x1b){return _0xb5b3x1b[_0xf772[70]](_0xb5b3x13[_0xf772[30]])})[_0xf772[15]](responseWithoutResult(_0xb5b3x8,200))[_0xf772[19]](function(_0xb5b3xa){console[_0xf772[9]](_0xb5b3xa);return handleError(_0xb5b3x8,_0xb5b3xa)})}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Util = require('../../config/util');
+var zendesk = require('node-zendesk');
+
+var ZendeskAccount = require('../../models').ZendeskAccount;
+var ZendeskConfiguration = require('../../models').ZendeskConfiguration;
+var ZendeskField = require('../../models').ZendeskField;
+
+function handleError(res, statusCode) {
+  statusCode = statusCode || 500;
+  return function(err) {
+    console.error('Error:', err);
+    res.status(statusCode).send(err);
+  };
+}
+
+function responseWithResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function(entity) {
+    if (entity) {
+      res.status(statusCode).json(entity);
+    }
+  };
+}
+
+function responseWithoutResult(res, statusCode) {
+  statusCode = statusCode || 200;
+  return function() {
+    res.sendStatus(statusCode);
+  };
+}
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function saveUpdates(updates) {
+  return function(entity) {
+    return entity.updateAttributes(updates)
+      .then(function(updated) {
+        return updated;
+      });
+  };
+}
+
+function removeEntity(res) {
+  return function(entity) {
+    if (entity) {
+      return entity.destroy()
+        .then(function() {
+          res.status(204).end();
+        });
+    }
+  };
+}
+
+// Get list of zendesk_accounts
+exports.index = function(req, res, next) {
+  return ZendeskAccount
+    .scope('configurations')
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+};
+
+// Get a single zendesk_account
+exports.show = function(req, res) {
+  return ZendeskAccount
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+};
+
+// Creates a new zendesk_account in the DB.
+exports.create = function(req, res) {
+  return ZendeskAccount
+    .create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+};
+
+// Updates an existing zendesk_account in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ZendeskAccount
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+};
+
+// Deletes a zendesk_account from the DB.
+exports.destroy = function(req, res) {
+  return ZendeskAccount
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+};
+
+exports.bulkDestroy = function(req, res) {
+  return ZendeskAccount
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(responseWithResult(res, 204))
+    .catch(handleError(res));
+};
+
+exports.zendeskValidation = function(req, res) {
+  var where = {};
+  where[req.params.field] = req.body.value;
+  return ZendeskAccount
+    .findAndCountAll({
+      where: where
+    })
+    .then(function(result) {
+      if (result.count) {
+        return res.status(200).send({
+          isValid: false,
+          value: req.body.value
+        });
+      }
+      return res.status(200).send({
+        isValid: true,
+        value: req.body.value
+      });
+    })
+    .catch(handleError(res));
+
+};
+
+exports.checkAccount = function(req, res) {
+  return ZendeskAccount
+    .findById(req.params.id)
+    .then(function(account) {
+      var accountZendesk = {
+        username: account.username,
+        remoteUri: account.remoteUri,
+        // debug: true
+      };
+      if (account.authType === 'password') {
+        accountZendesk.password = account.password;
+      } else if (account.authType === 'token') {
+        accountZendesk.token = account.token;
+        // accountZendesk.oauth = true;
+      }
+      // console.log(accountZendesk);
+      var client = zendesk.createClient(accountZendesk);
+      client.users.auth(function(err, res2, result) {
+        if (err) {
+          console.error(err);
+          return handleError(res, err);
+        }
+        // console.log(result);
+        if (!result.verified) {
+          return res.sendStatus(500);
+        }
+        return res.sendStatus(204);
+      });
+    })
+    .catch(handleError(res));
+};
+
+exports.getFields = function(req, res) {
+  return ZendeskAccount
+    .findById(req.params.id)
+    .then(function(account) {
+      var accountZendesk = {
+        username: account.username,
+        remoteUri: account.remoteUri,
+        // debug: true
+      };
+      if (account.authType === 'password') {
+        accountZendesk.password = account.password;
+      } else if (account.authType === 'token') {
+        accountZendesk.token = account.token;
+      }
+      var client = zendesk.createClient(accountZendesk);
+      client.ticketfields.list(function(err, res2, result) {
+        if (err) {
+          console.error(err);
+          return handleError(res, err);
+        }
+        return res.status(200).send(result);
+      });
+    })
+    .catch(handleError(res));
+}
+
+exports.getAccountConfigurations = function(req, res) {
+  return ZendeskConfiguration
+    .scope({
+      method: ['account', req.params.id]
+    })
+    .findAndCountAll(Util.getQuery(req.query))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+exports.getConfiguration = function(req, res) {
+
+  return ZendeskConfiguration
+    .scope({
+      method: ['account', req.params.id]
+    })
+    .findById(req.params.cid)
+    .then(handleEntityNotFound(res))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+}
+
+exports.destroyConfiguration = function(req, res) {
+  return ZendeskConfiguration
+    .scope({
+      method: ['account', req.params.id]
+    })
+    .findById(req.params.cid)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+};
+
+exports.bulkDestroyConfigurations = function(req, res) {
+  return ZendeskConfiguration
+    .destroy({
+      where: {
+        id: req.query.ids
+      },
+      individualHooks: true
+    })
+    .then(responseWithResult(res, 204))
+    .catch(handleError(res));
+};
+
+exports.createConfiguration = function(req, res) {
+  req.body['AccountId'] = req.params.id;
+  return ZendeskConfiguration
+    .create(req.body)
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+};
+
+exports.createField = function(req, res) {
+  return ZendeskConfiguration
+    .scope({
+      method: ['account', req.params.id]
+    })
+    .findById(req.params.cid)
+    .then(handleEntityNotFound(res))
+    .then(function(configuration) {
+      switch (req.params.type) {
+        case 'subject':
+          req.body['SubjectId'] = req.params.cid;
+          break;
+        case 'description':
+          req.body['DescriptionId'] = req.params.cid;
+          break;
+        case 'field':
+          req.body['FieldId'] = req.params.cid;
+          break;
+      }
+      return ZendeskField.create(req.body);
+    })
+    .then(responseWithResult(res, 201))
+    .catch(handleError(res));
+};
+
+exports.updateField = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return ZendeskField
+    .findById(req.params.fid)
+    .then(handleEntityNotFound(res))
+    .then(saveUpdates(req.body))
+    .then(responseWithResult(res))
+    .catch(handleError(res));
+};
+
+exports.destroyField = function(req, res) {
+  return ZendeskField
+    .findById(req.params.fid)
+    .then(handleEntityNotFound(res))
+    .then(removeEntity(res))
+    .catch(handleError(res));
+};
+
+exports.addConfigurationTags = function(req, res, next) {
+  return ZendeskConfiguration
+    .findById(req.params.cid)
+    .then(handleEntityNotFound(res))
+    .then(function(configuration) {
+      return configuration.setTags(req.body);
+    })
+    .then(responseWithoutResult(res, 200))
+    .catch(function(err) {
+      console.error(err);
+      return handleError(res, err);
+    });
+};
index 8324aee..96c8214 100644 (file)
@@ -1 +1,24 @@
-var _0x2eb2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x2eb2[0];var ZendeskAccount=require(_0x2eb2[2])[_0x2eb2[1]];exports[_0x2eb2[3]]=function(_0xbb08x2){ZendeskAccount[_0x2eb2[4]](function(_0xbb08x3){onSave(_0xbb08x2,_0xbb08x3)});ZendeskAccount[_0x2eb2[5]](function(_0xbb08x3){onRemove(_0xbb08x2,_0xbb08x3)})};function onSave(_0xbb08x2,_0xbb08x3,_0xbb08x5){_0xbb08x2[_0x2eb2[7]](_0x2eb2[6],_0xbb08x3)}function onRemove(_0xbb08x2,_0xbb08x3,_0xbb08x5){_0xbb08x2[_0x2eb2[7]](_0x2eb2[8],_0xbb08x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ZendeskAccount = require('../../models').ZendeskAccount;
+
+exports.register = function(socket) {
+  ZendeskAccount.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  ZendeskAccount.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('zendesk_account:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('zendesk_account:remove', doc);
+}
index fb3ed4c..68c8389 100644 (file)
@@ -1 +1,20 @@
-var _0xf329=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74"];_0xf329[0];var should=require(_0xf329[1]);var app=require(_0xf329[2]);var request=require(_0xf329[3]);describe(_0xf329[4],function(){it(_0xf329[5],function(_0x3a10x4){request(app)[_0xf329[13]](_0xf329[12])[_0xf329[11]](200)[_0xf329[11]](_0xf329[10],/json/)[_0xf329[9]](function(_0x3a10x5,_0x3a10x6){if(_0x3a10x5){return _0x3a10x4(_0x3a10x5)};_0x3a10x6[_0xf329[8]][_0xf329[1]][_0xf329[7]][_0xf329[6]](Array);_0x3a10x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/zendesk/accounts', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/zendesk/accounts')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index eb4ac50..e0bc33f 100644 (file)
@@ -1 +1,17 @@
-var _0xee77=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xee77[0];var express=require(_0xee77[1]);var controller=require(_0xee77[2]);var auth=require(_0xee77[3]);var router=express.Router();router[_0xee77[7]](_0xee77[4],auth[_0xee77[5]](),controller[_0xee77[6]]);router[_0xee77[7]](_0xee77[8],auth[_0xee77[5]](),controller[_0xee77[9]]);router[_0xee77[11]](_0xee77[4],auth[_0xee77[5]](),controller[_0xee77[10]]);router[_0xee77[13]](_0xee77[8],auth[_0xee77[5]](),controller[_0xee77[12]]);router[_0xee77[11]](_0xee77[14],auth[_0xee77[5]](),controller[_0xee77[15]]);router[_0xee77[11]](_0xee77[16],auth[_0xee77[5]](),controller[_0xee77[17]]);router[_0xee77[18]](_0xee77[8],auth[_0xee77[5]](),controller[_0xee77[12]]);router[_0xee77[20]](_0xee77[8],auth[_0xee77[5]](),controller[_0xee77[19]]);module[_0xee77[21]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./zendesk_configuration.controller');
+var auth = require('../../auth/auth.service');
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.post('/:id/tags', auth.isAuthenticated(), controller.addConfigurationTags);
+router.post('/:id/:type', auth.isAuthenticated(), controller.addConfigurationField);
+router.patch('/:id', auth.isAuthenticated(), controller.update);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;
index 32014b4..e299424 100644 (file)
@@ -1 +1,181 @@
-var _0x48b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x65\x72\x72\x6F\x72","\x73\x65\x74\x54\x61\x67\x73","\x65\x6E\x64"];_0x48b0[0];var _=require(_0x48b0[1]);var ZendeskConfiguration=require(_0x48b0[3])[_0x48b0[2]];var ZendeskField=require(_0x48b0[3])[_0x48b0[4]];exports[_0x48b0[5]]=function(_0x7272x4,_0x7272x5){ZendeskConfiguration[_0x48b0[11]]({where:_0x7272x4[_0x48b0[10]]})[_0x48b0[9]](function(_0x7272x7){return _0x7272x5[_0x48b0[8]](200)[_0x48b0[7]](_0x7272x7)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})};exports[_0x48b0[12]]=function(_0x7272x4,_0x7272x5){ZendeskConfiguration[_0x48b0[16]]({where:{id:_0x7272x4[_0x48b0[15]][_0x48b0[14]]},include:[{all:true}]})[_0x48b0[9]](function(_0x7272x8){if(!_0x7272x8){return _0x7272x5[_0x48b0[13]](404)};return _0x7272x5[_0x48b0[7]](_0x7272x8)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})};exports[_0x48b0[17]]=function(_0x7272x4,_0x7272x5){ZendeskConfiguration[_0x48b0[17]](_0x7272x4[_0x48b0[18]])[_0x48b0[9]](function(_0x7272x8){return _0x7272x5[_0x48b0[8]](201)[_0x48b0[7]](_0x7272x8)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})};exports[_0x48b0[19]]=function(_0x7272x4,_0x7272x5){if(_0x7272x4[_0x48b0[18]][_0x48b0[14]]){delete _0x7272x4[_0x48b0[18]][_0x48b0[14]]};ZendeskConfiguration[_0x48b0[22]](_0x7272x4[_0x48b0[15]][_0x48b0[14]])[_0x48b0[9]](function(_0x7272x8){if(!_0x7272x8){return _0x7272x5[_0x48b0[13]](404)};var _0x7272x9=_[_0x48b0[20]](_0x7272x8,_0x7272x4[_0x48b0[18]]);_0x7272x9[_0x48b0[21]]()[_0x48b0[9]](function(){return _0x7272x5[_0x48b0[8]](200)[_0x48b0[7]](_0x7272x8)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})};exports[_0x48b0[23]]=function(_0x7272x4,_0x7272x5){ZendeskConfiguration[_0x48b0[22]](_0x7272x4[_0x48b0[15]][_0x48b0[14]])[_0x48b0[9]](function(_0x7272x8){if(!_0x7272x8){return _0x7272x5[_0x48b0[13]](404)};_0x7272x8[_0x48b0[23]]()[_0x48b0[9]](function(){return _0x7272x5[_0x48b0[13]](204)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})};exports[_0x48b0[24]]=function(_0x7272x4,_0x7272x5,_0x7272xa){ZendeskConfiguration[_0x48b0[22]](_0x7272x4[_0x48b0[15]][_0x48b0[14]])[_0x48b0[9]](function(_0x7272xb){if(!_0x7272xb){return _0x7272x5[_0x48b0[13]](500)};ZendeskField[_0x48b0[17]](_0x7272x4[_0x48b0[18]])[_0x48b0[9]](function(_0x7272xc){switch(_0x7272x4[_0x48b0[15]][_0x48b0[31]]){case _0x48b0[26]:_0x7272xb[_0x48b0[25]](_0x7272xc)[_0x48b0[9]](function(){return _0x7272x5[_0x48b0[8]](200)[_0x48b0[7]](_0x7272xc)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)});break;case _0x48b0[28]:_0x7272xb[_0x48b0[27]](_0x7272xc)[_0x48b0[9]](function(){return _0x7272x5[_0x48b0[8]](200)[_0x48b0[7]](_0x7272xc)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)});break;case _0x48b0[30]:_0x7272xb[_0x48b0[29]](_0x7272xc)[_0x48b0[9]](function(){return _0x7272x5[_0x48b0[8]](200)[_0x48b0[7]](_0x7272xc)})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)});break}})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})})[_0x48b0[6]](function(_0x7272x6){return handleError(_0x7272x5,_0x7272x6)})};exports[_0x48b0[32]]=function(_0x7272x4,_0x7272x5,_0x7272xa){ZendeskConfiguration[_0x48b0[22]](_0x7272x4[_0x48b0[15]][_0x48b0[14]])[_0x48b0[9]](handleEntityNotFound(_0x7272x5))[_0x48b0[9]](function(_0x7272xb){return _0x7272xb[_0x48b0[34]](_0x7272x4[_0x48b0[18]])})[_0x48b0[9]](function(_0x7272xd){return _0x7272x5[_0x48b0[13]](200)})[_0x48b0[6]](function(_0x7272x6){console[_0x48b0[33]](_0x7272x6);return handleError(_0x7272x5,_0x7272x6)})};function handleEntityNotFound(_0x7272x5){return function(_0x7272xf){if(!_0x7272xf){_0x7272x5[_0x48b0[8]](404)[_0x48b0[35]]();return null};return _0x7272xf}}function handleError(_0x7272x5,_0x7272x6){return _0x7272x5[_0x48b0[8]](500)[_0x48b0[7]](_0x7272x6)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ZendeskConfiguration = require('../../models').ZendeskConfiguration;
+var ZendeskField = require('../../models').ZendeskField;
+
+// Get list of zendesk_configurations
+exports.index = function(req, res) {
+  ZendeskConfiguration
+    .findAll({
+      where: req.query
+    })
+    .then(function(zendesk_configurations) {
+      return res.status(200).send(zendesk_configurations);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single zendesk_configuration
+exports.show = function(req, res) {
+  ZendeskConfiguration
+    .find({
+      where: {
+        id: req.params.id
+      },
+      include: [{
+        all: true
+      }]
+    })
+    .then(function(zendesk_configuration) {
+      if (!zendesk_configuration) {
+        return res.sendStatus(404);
+      }
+      return res.send(zendesk_configuration);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new zendesk_configuration in the DB.
+exports.create = function(req, res) {
+  ZendeskConfiguration
+    .create(req.body)
+    .then(function(zendesk_configuration) {
+      return res.status(201).send(zendesk_configuration);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing zendesk_configuration in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  ZendeskConfiguration
+    .findById(req.params.id)
+    .then(function(zendesk_configuration) {
+      if (!zendesk_configuration) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(zendesk_configuration, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(zendesk_configuration);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a zendesk_configuration from the DB.
+exports.destroy = function(req, res) {
+  ZendeskConfiguration
+    .findById(req.params.id)
+    .then(function(zendesk_configuration) {
+      if (!zendesk_configuration) {
+        return res.sendStatus(404);
+      }
+      zendesk_configuration.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+exports.addConfigurationField = function(req, res, next) {
+  // console.log(req.params);
+  ZendeskConfiguration
+    .findById(req.params.id)
+    .then(function(configuration) {
+      if (!configuration) {
+        return res.sendStatus(500);
+      }
+      ZendeskField
+        .create(req.body)
+        .then(function(field) {
+          switch (req.params.type) {
+            case 'subject':
+              configuration.addSubject(field)
+                .then(function() {
+                  return res.status(200).send(field);
+                })
+                .catch(function(err) {
+                  return handleError(res, err);
+                });
+              break;
+            case 'description':
+              configuration.addDescription(field)
+                .then(function() {
+                  return res.status(200).send(field);
+                })
+                .catch(function(err) {
+                  return handleError(res, err);
+                });
+              break;
+            case 'field':
+              configuration.addField(field)
+                .then(function() {
+                  return res.status(200).send(field);
+                })
+                .catch(function(err) {
+                  return handleError(res, err);
+                });
+              break;
+          }
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+          // return next(err);
+        });
+    })
+    .catch(function(err) {
+      // return next(err);
+      return handleError(res, err);
+    });
+};
+
+exports.addConfigurationTags = function(req, res, next) {
+  ZendeskConfiguration
+    .findById(req.params.id)
+    .then(handleEntityNotFound(res))
+    .then(function(configuration) {
+      return configuration.setTags(req.body);
+    })
+    .then(function(data) {
+      return res.sendStatus(200);
+    })
+    .catch(function(err) {
+      console.error(err);
+      return handleError(res, err);
+    });
+};
+
+function handleEntityNotFound(res) {
+  return function(entity) {
+    if (!entity) {
+      res.status(404).end();
+      return null;
+    }
+    return entity;
+  };
+}
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 43cda8d..d9a56f1 100644 (file)
@@ -1 +1,24 @@
-var _0xe14f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xe14f[0];var ZendeskConfiguration=require(_0xe14f[2])[_0xe14f[1]];exports[_0xe14f[3]]=function(_0xdb22x2){ZendeskConfiguration[_0xe14f[4]](function(_0xdb22x3){onSave(_0xdb22x2,_0xdb22x3)});ZendeskConfiguration[_0xe14f[5]](function(_0xdb22x3){onRemove(_0xdb22x2,_0xdb22x3)})};function onSave(_0xdb22x2,_0xdb22x3,_0xdb22x5){_0xdb22x2[_0xe14f[7]](_0xe14f[6],_0xdb22x3)}function onRemove(_0xdb22x2,_0xdb22x3,_0xdb22x5){_0xdb22x2[_0xe14f[7]](_0xe14f[8],_0xdb22x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ZendeskConfiguration = require('../../models').ZendeskConfiguration;
+
+exports.register = function(socket) {
+  ZendeskConfiguration.afterCreate(function (doc) {
+    onSave(socket, doc);
+  });
+  ZendeskConfiguration.afterDestroy(function (doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('zendesk_configuration:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('zendesk_configuration:remove', doc);
+}
index 403171f..3589f5d 100644 (file)
@@ -1 +1,20 @@
-var _0x4452=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74"];_0x4452[0];var should=require(_0x4452[1]);var app=require(_0x4452[2]);var request=require(_0x4452[3]);describe(_0x4452[4],function(){it(_0x4452[5],function(_0xa192x4){request(app)[_0x4452[13]](_0x4452[12])[_0x4452[11]](200)[_0x4452[11]](_0x4452[10],/json/)[_0x4452[9]](function(_0xa192x5,_0xa192x6){if(_0xa192x5){return _0xa192x4(_0xa192x5)};_0xa192x6[_0x4452[8]][_0x4452[1]][_0x4452[7]][_0x4452[6]](Array);_0xa192x4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/zendesk/configurations', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/zendesk/configurations')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
\ No newline at end of file
index 8baa450..76f5c48 100644 (file)
@@ -1 +1,15 @@
-var _0x323d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x323d[0];var express=require(_0x323d[1]);var controller=require(_0x323d[2]);var router=express.Router();router[_0x323d[5]](_0x323d[3],controller[_0x323d[4]]);router[_0x323d[5]](_0x323d[6],controller[_0x323d[7]]);router[_0x323d[9]](_0x323d[3],controller[_0x323d[8]]);router[_0x323d[11]](_0x323d[6],controller[_0x323d[10]]);router[_0x323d[12]](_0x323d[6],controller[_0x323d[10]]);router[_0x323d[14]](_0x323d[6],controller[_0x323d[13]]);module[_0x323d[15]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./zendesk_field.controller');
+
+var router = express.Router();
+
+router.get('/', controller.index);
+router.get('/:id', controller.show);
+router.post('/', controller.create);
+router.put('/:id', controller.update);
+router.patch('/:id', controller.update);
+router.delete('/:id', controller.destroy);
+
+module.exports = router;
index 77a189a..48d0c38 100644 (file)
@@ -1 +1,93 @@
-var _0x7148=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x7148[0];var _=require(_0x7148[1]);var ZendeskField=require(_0x7148[3])[_0x7148[2]];exports[_0x7148[4]]=function(_0xaf2bx3,_0xaf2bx4){ZendeskField[_0x7148[9]]()[_0x7148[8]](function(_0xaf2bx6){return _0xaf2bx4[_0x7148[7]](200)[_0x7148[6]](_0xaf2bx6)})[_0x7148[5]](function(_0xaf2bx5){return handleError(_0xaf2bx4,_0xaf2bx5)})};exports[_0x7148[10]]=function(_0xaf2bx3,_0xaf2bx4){ZendeskField[_0x7148[14]](_0xaf2bx3[_0x7148[13]][_0x7148[12]])[_0x7148[8]](function(_0xaf2bx7){if(!_0xaf2bx7){return _0xaf2bx4[_0x7148[11]](404)};return _0xaf2bx4[_0x7148[6]](_0xaf2bx7)})[_0x7148[5]](function(_0xaf2bx5){return handleError(_0xaf2bx4,_0xaf2bx5)})};exports[_0x7148[15]]=function(_0xaf2bx3,_0xaf2bx4){ZendeskField[_0x7148[15]](_0xaf2bx3[_0x7148[16]])[_0x7148[8]](function(_0xaf2bx7){return _0xaf2bx4[_0x7148[7]](201)[_0x7148[6]](_0xaf2bx7)})[_0x7148[5]](function(_0xaf2bx5){return handleError(_0xaf2bx4,_0xaf2bx5)})};exports[_0x7148[17]]=function(_0xaf2bx3,_0xaf2bx4){if(_0xaf2bx3[_0x7148[16]][_0x7148[12]]){delete _0xaf2bx3[_0x7148[16]][_0x7148[12]]};ZendeskField[_0x7148[14]](_0xaf2bx3[_0x7148[13]][_0x7148[12]])[_0x7148[8]](function(_0xaf2bx7){if(!_0xaf2bx7){return _0xaf2bx4[_0x7148[11]](404)};var _0xaf2bx8=_[_0x7148[18]](_0xaf2bx7,_0xaf2bx3[_0x7148[16]]);_0xaf2bx8[_0x7148[19]]()[_0x7148[8]](function(){return _0xaf2bx4[_0x7148[7]](200)[_0x7148[6]](_0xaf2bx7)})[_0x7148[5]](function(_0xaf2bx5){return handleError(_0xaf2bx4,_0xaf2bx5)})})[_0x7148[5]](function(_0xaf2bx5){return handleError(_0xaf2bx4,_0xaf2bx5)})};exports[_0x7148[20]]=function(_0xaf2bx3,_0xaf2bx4){ZendeskField[_0x7148[14]](_0xaf2bx3[_0x7148[13]][_0x7148[12]])[_0x7148[8]](function(_0xaf2bx7){if(!_0xaf2bx7){return _0xaf2bx4[_0x7148[11]](404)};_0xaf2bx7[_0x7148[20]]()[_0x7148[8]](function(){return _0xaf2bx4[_0x7148[11]](204)})[_0x7148[5]](function(_0xaf2bx5){return handleError(_0xaf2bx4,_0xaf2bx5)})})[_0x7148[5]](function(_0xaf2bx5){return handleError(_0xaf2bx4,_0xaf2bx5)})};function handleError(_0xaf2bx4,_0xaf2bx5){return _0xaf2bx4[_0x7148[7]](500)[_0x7148[6]](_0xaf2bx5)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var ZendeskField = require('../../models').ZendeskField;
+
+// Get list of zendesk_fields
+exports.index = function(req, res) {
+  ZendeskField
+    .findAll()
+    .then(function(zendesk_fields) {
+      return res.status(200).send(zendesk_fields);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Get a single zendesk_field
+exports.show = function(req, res) {
+  ZendeskField
+    .findById(req.params.id)
+    .then(function(zendesk_field) {
+      if (!zendesk_field) {
+        return res.sendStatus(404);
+      }
+      return res.send(zendesk_field);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Creates a new zendesk_field in the DB.
+exports.create = function(req, res) {
+  ZendeskField
+    .create(req.body)
+    .then(function(zendesk_field) {
+      return res.status(201).send(zendesk_field);
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Updates an existing zendesk_field in the DB.
+exports.update = function(req, res) {
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  ZendeskField
+    .findById(req.params.id)
+    .then(function(zendesk_field) {
+      if (!zendesk_field) {
+        return res.sendStatus(404);
+      }
+      var updated = _.merge(zendesk_field, req.body);
+      updated.save()
+        .then(function() {
+          return res.status(200).send(zendesk_field);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+// Deletes a zendesk_field from the DB.
+exports.destroy = function(req, res) {
+  ZendeskField
+    .findById(req.params.id)
+    .then(function(zendesk_field) {
+      if (!zendesk_field) {
+        return res.sendStatus(404);
+      }
+      zendesk_field.destroy()
+        .then(function() {
+          return res.sendStatus(204);
+        })
+        .catch(function(err) {
+          return handleError(res, err);
+        });
+    })
+    .catch(function(err) {
+      return handleError(res, err);
+    });
+};
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}
index 2b5fc9c..8a5419b 100644 (file)
@@ -1 +1,24 @@
-var _0x2272=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A\x72\x65\x6D\x6F\x76\x65"];_0x2272[0];var ZendeskField=require(_0x2272[2])[_0x2272[1]];exports[_0x2272[3]]=function(_0x74a5x2){ZendeskField[_0x2272[4]](function(_0x74a5x3){onSave(_0x74a5x2,_0x74a5x3)});ZendeskField[_0x2272[5]](function(_0x74a5x3){onRemove(_0x74a5x2,_0x74a5x3)})};function onSave(_0x74a5x2,_0x74a5x3,_0x74a5x5){_0x74a5x2[_0x2272[7]](_0x2272[6],_0x74a5x3)}function onRemove(_0x74a5x2,_0x74a5x3,_0x74a5x5){_0x74a5x2[_0x2272[7]](_0x2272[8],_0x74a5x3)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var ZendeskField = require('../../models').ZendeskField;
+
+exports.register = function(socket) {
+  ZendeskField.afterCreate(function(doc) {
+    onSave(socket, doc);
+  });
+  ZendeskField.afterDestroy(function(doc) {
+    onRemove(socket, doc);
+  });
+}
+
+function onSave(socket, doc, cb) {
+  socket.emit('zendesk_field:save', doc);
+}
+
+function onRemove(socket, doc, cb) {
+  socket.emit('zendesk_field:remove', doc);
+}
index 2f1b5b7..1527fe8 100644 (file)
@@ -1 +1,20 @@
-var _0x6ea3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x68\x6F\x75\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x70","\x73\x75\x70\x65\x72\x74\x65\x73\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x73\x70\x6F\x6E\x64\x20\x77\x69\x74\x68\x20\x4A\x53\x4F\x4E\x20\x61\x72\x72\x61\x79","\x69\x6E\x73\x74\x61\x6E\x63\x65\x6F\x66","\x62\x65","\x62\x6F\x64\x79","\x65\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x65\x78\x70\x65\x63\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74"];_0x6ea3[0];var should=require(_0x6ea3[1]);var app=require(_0x6ea3[2]);var request=require(_0x6ea3[3]);describe(_0x6ea3[4],function(){it(_0x6ea3[5],function(_0x84ecx4){request(app)[_0x6ea3[13]](_0x6ea3[12])[_0x6ea3[11]](200)[_0x6ea3[11]](_0x6ea3[10],/json/)[_0x6ea3[9]](function(_0x84ecx5,_0x84ecx6){if(_0x84ecx5){return _0x84ecx4(_0x84ecx5)};_0x84ecx6[_0x6ea3[8]][_0x6ea3[1]][_0x6ea3[7]][_0x6ea3[6]](Array);_0x84ecx4()})})})
\ No newline at end of file
+'use strict';
+
+var should = require('should');
+var app = require('../../app');
+var request = require('supertest');
+
+describe('GET /api/zendesk/fields', function() {
+
+  it('should respond with JSON array', function(done) {
+    request(app)
+      .get('/api/zendesk/fields')
+      .expect(200)
+      .expect('Content-Type', /json/)
+      .end(function(err, res) {
+        if (err) return done(err);
+        res.body.should.be.instanceof(Array);
+        done();
+      });
+  });
+});
index 06a0db2..241452e 100644 (file)
@@ -1 +1,112 @@
-var _0xbb6c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4E\x4F\x44\x45\x5F\x45\x4E\x56","\x65\x6E\x76","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4E\x4F\x44\x45\x5F\x54\x4C\x53\x5F\x52\x45\x4A\x45\x43\x54\x5F\x55\x4E\x41\x55\x54\x48\x4F\x52\x49\x5A\x45\x44","\x75\x6E\x63\x61\x75\x67\x68\x74\x45\x78\x63\x65\x70\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x6D\x65\x73\x73\x61\x67\x65","\x0A\x4D\x65\x73\x73\x61\x67\x65\x3A\x20","\x6C\x6F\x67","\x73\x74\x61\x63\x6B","\x0A\x53\x74\x61\x63\x6B\x74\x72\x61\x63\x65\x3A","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x64\x75\x6D\x70\x45\x72\x72\x6F\x72\x20\x3A\x3A\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x6E\x20\x6F\x62\x6A\x65\x63\x74","\x6F\x6E","\x6F\x73","\x68\x74\x74\x70","\x75\x74\x69\x6C","\x63\x72\x79\x70\x74\x6F","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x73\x68\x65\x6C\x6C\x6A\x73\x2F\x67\x6C\x6F\x62\x61\x6C","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x53\x65\x74\x74\x69\x6E\x67\x73","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x2F\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x63\x6C\x69\x65\x6E\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x70\x6F\x72\x74","\x61\x73\x74\x65\x72\x69\x73\x6B","\x68\x6F\x73\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x73\x74\x65\x72\x69\x73\x6B\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6B\x65\x65\x70\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x6B\x75\x65","\x6C\x69\x73\x74\x65\x6E","\x61\x70\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x6F\x75\x74\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x68\x69\x73\x74\x6F\x72\x79\x2F\x68\x69\x73\x74\x6F\x72\x79","\x74\x68\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x73\x65\x65\x64\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64","\x73\x65\x65\x64\x50\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6F\x63\x6B\x65\x74\x69\x6F","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x66\x61\x78","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x69\x6D\x61\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x74\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x6D\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x67\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x69\x70","\x45\x78\x70\x72\x65\x73\x73\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x25\x64\x2C\x20\x69\x6E\x20\x25\x73\x20\x6D\x6F\x64\x65","\x67\x65\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbb6c[0];process[_0xbb6c[2]][_0xbb6c[1]]=process[_0xbb6c[2]][_0xbb6c[1]]||_0xbb6c[3];process[_0xbb6c[2]][_0xbb6c[4]]=0;process[_0xbb6c[14]](_0xbb6c[5],function(_0xc747x1){if( typeof _0xc747x1===_0xbb6c[6]){if(_0xc747x1[_0xbb6c[7]]){console[_0xbb6c[9]](_0xbb6c[8]+_0xc747x1[_0xbb6c[7]])};if(_0xc747x1[_0xbb6c[10]]){console[_0xbb6c[9]](_0xbb6c[11]);console[_0xbb6c[9]](_0xbb6c[12]);console[_0xbb6c[9]](_0xc747x1[_0xbb6c[10]])}}else {console[_0xbb6c[9]](_0xbb6c[13])}});var os=require(_0xbb6c[15]);var http=require(_0xbb6c[16]);var util=require(_0xbb6c[17]);var crypto=require(_0xbb6c[18]);var cronjob=require(_0xbb6c[20])[_0xbb6c[19]];var shelljs=require(_0xbb6c[21]);var express=require(_0xbb6c[22]);var models=require(_0xbb6c[23]);var config=require(_0xbb6c[24]);var Settings=models[_0xbb6c[25]];var app=express();var server=require(_0xbb6c[16])[_0xbb6c[26]](app);var io=require(_0xbb6c[29])(server,{serveClient:(config[_0xbb6c[2]]===_0xbb6c[27])?false:true,path:_0xbb6c[28]});var ami=require(_0xbb6c[35])(config[_0xbb6c[31]][_0xbb6c[30]],config[_0xbb6c[31]][_0xbb6c[32]],config[_0xbb6c[31]][_0xbb6c[33]],config[_0xbb6c[31]][_0xbb6c[34]],true);ami[_0xbb6c[36]]();var kue=require(_0xbb6c[37]);kue[_0xbb6c[39]][_0xbb6c[38]](3001);var _setting;var _license;require(_0xbb6c[40])(app);require(_0xbb6c[41])(app);models[_0xbb6c[67]][_0xbb6c[46]]()[_0xbb6c[45]](function(){require(_0xbb6c[41])(app);if(config[_0xbb6c[48]]){require(_0xbb6c[49])};if(config[_0xbb6c[50]]){require(_0xbb6c[51])};require(_0xbb6c[52])(io);require(_0xbb6c[53])();require(_0xbb6c[54])();require(_0xbb6c[55])();require(_0xbb6c[56])();require(_0xbb6c[57])(ami);require(_0xbb6c[58])();require(_0xbb6c[59])();require(_0xbb6c[60])();require(_0xbb6c[61])(ami);require(_0xbb6c[62])();require(_0xbb6c[63])();server[_0xbb6c[38]](config[_0xbb6c[30]],config[_0xbb6c[64]],function(){console[_0xbb6c[9]](_0xbb6c[65],config[_0xbb6c[30]],app[_0xbb6c[66]](_0xbb6c[2]))})})[_0xbb6c[45]](function(){return models[_0xbb6c[47]][_0xbb6c[46]]()})[_0xbb6c[45]](function(){require(_0xbb6c[44])(cronjob)})[_0xbb6c[43]](function(_0xc747x1){console[_0xbb6c[42]](_0xc747x1)});exports=module[_0xbb6c[68]]=app
\ No newline at end of file
+/**
+ * Main application file
+ */
+
+'use strict';
+
+// Set default node environment to development
+process.env.NODE_ENV = process.env.NODE_ENV || 'development';
+process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
+
+process.on('uncaughtException', function(err) {
+  if (typeof err === 'object') {
+    if (err.message) {
+      console.log('\nMessage: ' + err.message)
+    }
+    if (err.stack) {
+      console.log('\nStacktrace:')
+      console.log('====================')
+      console.log(err.stack);
+    }
+  } else {
+    console.log('dumpError :: argument is not an object');
+  }
+});
+
+var os = require('os');
+var http = require('http');
+var util = require('util');
+var crypto = require('crypto');
+var cronjob = require('cron').CronJob;
+var shelljs = require('shelljs/global');
+
+var express = require('express');
+var models = require('./models');
+var config = require('./config/environment');
+
+var Settings = models.Settings;
+
+// Setup server
+var app = express();
+var server = require('http').createServer(app);
+var io = require('socket.io')(server, {
+  serveClient: (config.env === 'production') ? false : true,
+  path: '/socket.io-client'
+});
+
+var ami = require('asterisk-manager')(config.asterisk.port,
+  config.asterisk.host,
+  config.asterisk.username,
+  config.asterisk.password,
+  true);
+ami.keepConnected();
+
+// Initialization Kue
+var kue = require('kue');
+kue.app.listen(3001);
+
+var _setting;
+var _license;
+
+require('./config/express')(app);
+require('./routes')(app);
+
+models
+  .sequelize
+  .sync()
+  .then(function() {
+
+    require('./routes')(app);
+    // Populate DB Develop with sample data
+    if (config.seedDB) {
+      require('./config/seed');
+    }
+    // Populate DB Production with sample data
+    if (config.seedPDB) {
+      require('./config/seedp');
+    }
+
+    // Start Cally Square Projects
+    require('./config/socketio')(io);
+    require('./config/routing/mail')();
+    require('./config/routing/chat')();
+    require('./config/automations/mail')();
+    require('./config/automations/fax')();
+    require('./config/triggers')(ami);
+    require('./config/imap')();
+    require('./config/smtp')();
+    require('./config/tools')();
+    require('./config/ami')(ami);
+    require('./config/agi')();
+    require('./config/license')();
+
+    // Start server
+    server.listen(config.port, config.ip, function() {
+      console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
+    });
+  })
+  .then(function() {
+    // Connect to database history
+    return models
+      .sequelize_history
+      .sync();
+  })
+  .then(function() {
+    require('./config/history/history')(cronjob);
+  })
+  .catch(function(err) {
+    console.error(err);
+  });
+
+// Expose app
+exports = module.exports = app;
index 743b4e9..a606070 100644 (file)
@@ -1 +1,95 @@
-var _0x9aec=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x65\x78\x70\x72\x65\x73\x73\x2D\x6A\x77\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x65\x72\x76\x69\x63\x65","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x75\x73\x65\x72","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65","\x71\x75\x65\x72\x79","\x61\x63\x63\x65\x73\x73\x5F\x74\x6F\x6B\x65\x6E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x73","\x42\x65\x61\x72\x65\x72\x20","\x52\x65\x71\x75\x69\x72\x65\x64\x20\x72\x6F\x6C\x65\x20\x6E\x65\x65\x64\x73\x20\x74\x6F\x20\x62\x65\x20\x73\x65\x74","\x72\x6F\x6C\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x52\x6F\x6C\x65\x73","\x31\x64","\x73\x69\x67\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x6A\x73\x6F\x6E","\x74\x6F\x6B\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x6F\x6F\x6B\x69\x65","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65"];_0x9aec[0];var passport=require(_0x9aec[1]);var config=require(_0x9aec[2]);var jwt=require(_0x9aec[3]);var expressJwt=require(_0x9aec[4]);var compose=require(_0x9aec[5]);var User=require(_0x9aec[7])[_0x9aec[6]];var Service=require(_0x9aec[7])[_0x9aec[8]];var validateJwt=expressJwt({secret:config[_0x9aec[10]][_0x9aec[9]]});function isAuthenticated(){return compose()[_0x9aec[17]](function(_0xfbcaxa,_0xfbcaxb,_0xfbcaxc){if(_0xfbcaxa[_0x9aec[18]]&&_0xfbcaxa[_0x9aec[18]][_0x9aec[20]](_0x9aec[19])){_0xfbcaxa[_0x9aec[22]][_0x9aec[21]]=_0x9aec[23]+_0xfbcaxa[_0x9aec[18]][_0x9aec[19]]};validateJwt(_0xfbcaxa,_0xfbcaxb,_0xfbcaxc)})[_0x9aec[17]](function(_0xfbcaxa,_0xfbcaxb,_0xfbcaxc){User[_0x9aec[16]](_0xfbcaxa[_0x9aec[13]][_0x9aec[15]],{include:[{model:Service}]})[_0x9aec[14]](function(_0xfbcaxe){if(!_0xfbcaxe){return _0xfbcaxb[_0x9aec[12]](401)};_0xfbcaxa[_0x9aec[13]]=_0xfbcaxe;return _0xfbcaxc()})[_0x9aec[11]](function(_0xfbcaxd){return _0xfbcaxc(_0xfbcaxd)})})}function hasRole(_0xfbcax10){if(!_0xfbcax10){throw  new Error(_0x9aec[24])};return compose()[_0x9aec[17]](isAuthenticated())[_0x9aec[17]](function _0xfbcax11(_0xfbcaxa,_0xfbcaxb,_0xfbcaxc){if(config[_0x9aec[27]][_0x9aec[26]](_0xfbcaxa[_0x9aec[13]][_0x9aec[25]])>=config[_0x9aec[27]][_0x9aec[26]](_0xfbcax10)){return _0xfbcaxc()}else {return _0xfbcaxb[_0x9aec[12]](403)}})}function signToken(_0xfbcax13,_0xfbcax14,_0xfbcax15){var _0xfbcax16=60*24*365*5;if(!_0xfbcax15){_0xfbcax16=_0x9aec[28]};return jwt[_0x9aec[29]]({id:_0xfbcax13},config[_0x9aec[10]][_0x9aec[9]],{expiresIn:_0xfbcax16})}function setTokenCookie(_0xfbcaxa,_0xfbcaxb){if(!_0xfbcaxa[_0x9aec[13]]){return _0xfbcaxb[_0x9aec[31]](404,{message:_0x9aec[30]})};var _0xfbcax18=signToken(_0xfbcaxa[_0x9aec[13]][_0x9aec[15]],_0xfbcaxa[_0x9aec[13]][_0x9aec[25]]);_0xfbcaxb[_0x9aec[34]](_0x9aec[32],JSON[_0x9aec[33]](_0xfbcax18));_0xfbcaxb[_0x9aec[36]](_0x9aec[35])}exports[_0x9aec[37]]=isAuthenticated;exports[_0x9aec[38]]=hasRole;exports[_0x9aec[39]]=signToken;exports[_0x9aec[40]]=setTokenCookie
\ No newline at end of file
+'use strict';
+
+//var mongoose = require('mongoose');
+var passport = require('passport');
+var config = require('../config/environment');
+var jwt = require('jsonwebtoken');
+var expressJwt = require('express-jwt');
+var compose = require('composable-middleware');
+// var User = require('../api/user/user.model');
+var User = require('../models').User;
+var Service = require('../models').Service;
+var validateJwt = expressJwt({
+  secret: config.session.secret
+});
+
+/**
+ * Attaches the user object to the request if authenticated
+ * Otherwise returns 403
+ */
+function isAuthenticated() {
+  return compose()
+    // Validate jwt
+    .use(function(req, res, next) {
+      // allow access_token to be passed through query parameter as well
+      if (req.query && req.query.hasOwnProperty('access_token')) {
+        req.headers.authorization = 'Bearer ' + req.query.access_token;
+      }
+      validateJwt(req, res, next);
+    })
+    // Attach user to request
+    .use(function(req, res, next) {
+      User
+        .findById(req.user.id, {
+          include: [{
+            model: Service
+          }]
+        })
+        .then(function(user) {
+          if (!user) return res.send(401);
+          req.user = user;
+          return next();
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    });
+}
+
+/**
+ * Checks if the user role meets the minimum requirements of the route
+ */
+function hasRole(roleRequired) {
+  if (!roleRequired) throw new Error('Required role needs to be set');
+
+  return compose()
+    .use(isAuthenticated())
+    .use(function meetsRequirements(req, res, next) {
+      if (config.userRoles.indexOf(req.user.role) >= config.userRoles.indexOf(roleRequired)) {
+        return next();
+      } else {
+        return res.send(403);
+      }
+    });
+}
+
+/**
+ * Returns a jwt token signed by the app secret
+ */
+function signToken(id, role, remember) {
+  var expiresIn = 60 * 24 * 365 * 5; //If remember, it expires in 5 years
+  if (!remember)
+    expiresIn = "1d"; //Expire in one day
+  return jwt.sign({
+    id: id
+  }, config.session.secret, {
+    expiresIn: expiresIn
+  });
+}
+
+/**
+ * Set token cookie directly for oAuth strategies
+ */
+function setTokenCookie(req, res) {
+  if (!req.user) return res.json(404, {
+    message: 'Something went wrong, please try again.'
+  });
+  var token = signToken(req.user.id, req.user.role);
+  res.cookie('token', JSON.stringify(token));
+  res.redirect('/');
+}
+
+exports.isAuthenticated = isAuthenticated;
+exports.hasRole = hasRole;
+exports.signToken = signToken;
+exports.setTokenCookie = setTokenCookie;
index f35331c..4a6f878 100644 (file)
@@ -1 +1,21 @@
-var _0xa311=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x5F\x61\x62\x6F\x75\x74\x5F\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa311[0];var express=require(_0xa311[1]);var passport=require(_0xa311[2]);var auth=require(_0xa311[3]);var router=express.Router();router[_0xa311[9]](_0xa311[10],passport[_0xa311[7]](_0xa311[5],{scope:[_0xa311[11],_0xa311[12]],failureRedirect:_0xa311[6],session:false}))[_0xa311[9]](_0xa311[4],passport[_0xa311[7]](_0xa311[5],{failureRedirect:_0xa311[6],session:false}),auth[_0xa311[8]]);module[_0xa311[13]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var passport = require('passport');
+var auth = require('../auth.service');
+
+var router = express.Router();
+
+router
+  .get('/', passport.authenticate('facebook', {
+    scope: ['email', 'user_about_me'],
+    failureRedirect: '/signup',
+    session: false
+  }))
+
+  .get('/callback', passport.authenticate('facebook', {
+    failureRedirect: '/signup',
+    session: false
+  }), auth.setTokenCookie);
+
+module.exports = router;
\ No newline at end of file
index e07cad2..90ae489 100644 (file)
@@ -1 +1,37 @@
-var _0x7f78=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x73\x65\x74\x75\x70","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x65\x6D\x61\x69\x6C\x73","\x75\x73\x65\x72","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0x7f78[0]);var FacebookStrategy=require(_0x7f78[2])[_0x7f78[1]];exports[_0x7f78[3]]=function(_0xdd89x3,_0xdd89x4){passport[_0x7f78[17]]( new FacebookStrategy({clientID:_0xdd89x4[_0x7f78[5]][_0x7f78[4]],clientSecret:_0xdd89x4[_0x7f78[5]][_0x7f78[6]],callbackURL:_0xdd89x4[_0x7f78[5]][_0x7f78[7]]},function(_0xdd89x5,_0xdd89x6,_0xdd89x7,_0xdd89x8){_0xdd89x3[_0x7f78[16]]({"\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2E\x69\x64":_0xdd89x7[_0x7f78[8]]},function(_0xdd89x9,_0xdd89xa){if(_0xdd89x9){return _0xdd89x8(_0xdd89x9)};if(!_0xdd89xa){_0xdd89xa= new _0xdd89x3({name:_0xdd89x7[_0x7f78[9]],email:_0xdd89x7[_0x7f78[11]][0][_0x7f78[10]],role:_0x7f78[12],username:_0xdd89x7[_0x7f78[13]],provider:_0x7f78[5],facebook:_0xdd89x7[_0x7f78[14]]});_0xdd89xa[_0x7f78[15]](function(_0xdd89x9){if(_0xdd89x9){_0xdd89x8(_0xdd89x9)};return _0xdd89x8(_0xdd89x9,_0xdd89xa)})}else {return _0xdd89x8(_0xdd89x9,_0xdd89xa)}})}))}
\ No newline at end of file
+var passport = require('passport');
+var FacebookStrategy = require('passport-facebook').Strategy;
+
+exports.setup = function (User, config) {
+  passport.use(new FacebookStrategy({
+      clientID: config.facebook.clientID,
+      clientSecret: config.facebook.clientSecret,
+      callbackURL: config.facebook.callbackURL
+    },
+    function(accessToken, refreshToken, profile, done) {
+      User.findOne({
+        'facebook.id': profile.id
+      },
+      function(err, user) {
+        if (err) {
+          return done(err);
+        }
+        if (!user) {
+          user = new User({
+            name: profile.displayName,
+            email: profile.emails[0].value,
+            role: 'user',
+            username: profile.username,
+            provider: 'facebook',
+            facebook: profile._json
+          });
+          user.save(function(err) {
+            if (err) done(err);
+            return done(err, user);
+          });
+        } else {
+          return done(err, user);
+        }
+      })
+    }
+  ));
+};
\ No newline at end of file
index c473706..9b1ce39 100644 (file)
@@ -1 +1,24 @@
-var _0x812c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x6F\x6F\x67\x6C\x65","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x61\x75\x74\x68\x2F\x75\x73\x65\x72\x69\x6E\x66\x6F\x2E\x70\x72\x6F\x66\x69\x6C\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x61\x75\x74\x68\x2F\x75\x73\x65\x72\x69\x6E\x66\x6F\x2E\x65\x6D\x61\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x812c[0];var express=require(_0x812c[1]);var passport=require(_0x812c[2]);var auth=require(_0x812c[3]);var router=express.Router();router[_0x812c[9]](_0x812c[10],passport[_0x812c[7]](_0x812c[5],{failureRedirect:_0x812c[6],scope:[_0x812c[11],_0x812c[12]],session:false}))[_0x812c[9]](_0x812c[4],passport[_0x812c[7]](_0x812c[5],{failureRedirect:_0x812c[6],session:false}),auth[_0x812c[8]]);module[_0x812c[13]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var passport = require('passport');
+var auth = require('../auth.service');
+
+var router = express.Router();
+
+router
+  .get('/', passport.authenticate('google', {
+    failureRedirect: '/signup',
+    scope: [
+      'https://www.googleapis.com/auth/userinfo.profile',
+      'https://www.googleapis.com/auth/userinfo.email'
+    ],
+    session: false
+  }))
+
+  .get('/callback', passport.authenticate('google', {
+    failureRedirect: '/signup',
+    session: false
+  }), auth.setTokenCookie);
+
+module.exports = router;
\ No newline at end of file
index 24beff4..d304e8a 100644 (file)
@@ -1 +1,33 @@
-var _0x1a84=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x4F\x41\x75\x74\x68\x32\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x67\x6F\x6F\x67\x6C\x65\x2D\x6F\x61\x75\x74\x68","\x73\x65\x74\x75\x70","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x67\x6F\x6F\x67\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x65\x6D\x61\x69\x6C\x73","\x75\x73\x65\x72","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0x1a84[0]);var GoogleStrategy=require(_0x1a84[2])[_0x1a84[1]];exports[_0x1a84[3]]=function(_0x3128x3,_0x3128x4){passport[_0x1a84[17]]( new GoogleStrategy({clientID:_0x3128x4[_0x1a84[5]][_0x1a84[4]],clientSecret:_0x3128x4[_0x1a84[5]][_0x1a84[6]],callbackURL:_0x3128x4[_0x1a84[5]][_0x1a84[7]]},function(_0x3128x5,_0x3128x6,_0x3128x7,_0x3128x8){_0x3128x3[_0x1a84[16]]({"\x67\x6F\x6F\x67\x6C\x65\x2E\x69\x64":_0x3128x7[_0x1a84[8]]},function(_0x3128x9,_0x3128xa){if(!_0x3128xa){_0x3128xa= new _0x3128x3({name:_0x3128x7[_0x1a84[9]],email:_0x3128x7[_0x1a84[11]][0][_0x1a84[10]],role:_0x1a84[12],username:_0x3128x7[_0x1a84[13]],provider:_0x1a84[5],google:_0x3128x7[_0x1a84[14]]});_0x3128xa[_0x1a84[15]](function(_0x3128x9){if(_0x3128x9){_0x3128x8(_0x3128x9)};return _0x3128x8(_0x3128x9,_0x3128xa)})}else {return _0x3128x8(_0x3128x9,_0x3128xa)}})}))}
\ No newline at end of file
+var passport = require('passport');
+var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
+
+exports.setup = function (User, config) {
+  passport.use(new GoogleStrategy({
+      clientID: config.google.clientID,
+      clientSecret: config.google.clientSecret,
+      callbackURL: config.google.callbackURL
+    },
+    function(accessToken, refreshToken, profile, done) {
+      User.findOne({
+        'google.id': profile.id
+      }, function(err, user) {
+        if (!user) {
+          user = new User({
+            name: profile.displayName,
+            email: profile.emails[0].value,
+            role: 'user',
+            username: profile.username,
+            provider: 'google',
+            google: profile._json
+          });
+          user.save(function(err) {
+            if (err) done(err);
+            return done(err, user);
+          });
+        } else {
+          return done(err, user);
+        }
+      });
+    }
+  ));
+};
index 177bf69..a034241 100644 (file)
@@ -1 +1,22 @@
-var _0xa4e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x75\x70","\x2E\x2F\x6C\x6F\x63\x61\x6C\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x74\x77\x69\x74\x74\x65\x72\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2F\x6C\x6F\x63\x61\x6C","\x2E\x2F\x6C\x6F\x63\x61\x6C","\x75\x73\x65","\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2E\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2F\x74\x77\x69\x74\x74\x65\x72","\x2E\x2F\x74\x77\x69\x74\x74\x65\x72","\x2F\x67\x6F\x6F\x67\x6C\x65","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa4e5[0];var express=require(_0xa4e5[1]);var passport=require(_0xa4e5[2]);var config=require(_0xa4e5[3]);var User=require(_0xa4e5[5])[_0xa4e5[4]];require(_0xa4e5[7])[_0xa4e5[6]](User,config);require(_0xa4e5[8])[_0xa4e5[6]](User,config);require(_0xa4e5[9])[_0xa4e5[6]](User,config);require(_0xa4e5[10])[_0xa4e5[6]](User,config);var router=express.Router();router[_0xa4e5[13]](_0xa4e5[11],require(_0xa4e5[12]));router[_0xa4e5[13]](_0xa4e5[14],require(_0xa4e5[15]));router[_0xa4e5[13]](_0xa4e5[16],require(_0xa4e5[17]));router[_0xa4e5[13]](_0xa4e5[18],require(_0xa4e5[19]));module[_0xa4e5[20]]=router
\ No newline at end of file
+'use strict';
+
+var express   = require('express');
+var passport  = require('passport');
+var config    = require('../config/environment');
+var User      = require('../models').User;
+
+
+// Passport Configuration
+require('./local/passport').setup(User, config);
+require('./facebook/passport').setup(User, config);
+require('./google/passport').setup(User, config);
+require('./twitter/passport').setup(User, config);
+
+var router = express.Router();
+
+router.use('/local', require('./local'));
+router.use('/facebook', require('./facebook'));
+router.use('/twitter', require('./twitter'));
+router.use('/google', require('./google'));
+
+module.exports = router;
index cce5e3b..d60d5e0 100644 (file)
@@ -1 +1,63 @@
-var _0x5bce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x2F","\x6C\x6F\x63\x61\x6C\x2D\x6C\x6F\x67\x69\x6E","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x69\x64","\x72\x65\x6D\x65\x6D\x62\x65\x72","\x62\x6F\x64\x79","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x74\x68\x65\x6E","\x6C\x6F\x67\x69\x6E","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x6C\x6F\x67\x6F\x75\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x6C\x6F\x67\x6F\x75\x74","\x72\x65\x64\x69\x72\x65\x63\x74","\x75\x73\x65\x72","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5bce[0];var express=require(_0x5bce[1]);var passport=require(_0x5bce[2]);var async=require(_0x5bce[3]);var auth=require(_0x5bce[4]);var User=require(_0x5bce[6])[_0x5bce[5]];var Action=require(_0x5bce[6])[_0x5bce[7]];var ReportMember=require(_0x5bce[6])[_0x5bce[8]];var license=require(_0x5bce[9]);var channels=[_0x5bce[10],_0x5bce[11],_0x5bce[12],_0x5bce[13]];var router=express.Router();router[_0x5bce[30]](_0x5bce[14],function(_0x82a9xb,_0x82a9xc,_0x82a9xd){passport[_0x5bce[29]](_0x5bce[15],function(_0x82a9xe,_0x82a9xf,_0x82a9x10){var _0x82a9x11=_0x82a9xe||_0x82a9x10;if(_0x82a9x11){return _0x82a9xc[_0x5bce[17]](401)[_0x5bce[16]](_0x82a9x11)};if(!_0x82a9xf){return _0x82a9xc[_0x5bce[17]](404)[_0x5bce[16]]({message:_0x5bce[18]})};return Action[_0x5bce[28]]({name:_0x5bce[26],data1:_0x82a9xf[_0x5bce[21]],data2:_0x82a9xf[_0x5bce[27]],UserId:_0x82a9xf[_0x5bce[21]]})[_0x5bce[25]](function(_0x82a9x12){return _0x82a9xc[_0x5bce[16]]({role:_0x82a9xf[_0x5bce[20]],token:auth[_0x5bce[24]](_0x82a9xf[_0x5bce[21]],_0x82a9xf[_0x5bce[20]],_0x82a9xb[_0x5bce[23]][_0x5bce[22]]||false),userId:_0x82a9xf[_0x5bce[21]]})})[_0x5bce[19]](function(_0x82a9xe){return _0x82a9xd(_0x82a9xe)})})(_0x82a9xb,_0x82a9xc,_0x82a9xd)});router[_0x5bce[36]](_0x5bce[31],auth[_0x5bce[32]](),function(_0x82a9xb,_0x82a9xc,_0x82a9xd){return Action[_0x5bce[28]]({name:_0x5bce[33],data1:_0x82a9xb[_0x5bce[35]][_0x5bce[21]],data2:_0x82a9xb[_0x5bce[35]][_0x5bce[27]],UserId:_0x82a9xb[_0x5bce[35]][_0x5bce[21]]})[_0x5bce[25]](function(){_0x82a9xb[_0x5bce[33]]();_0x82a9xc[_0x5bce[34]](_0x5bce[14])})[_0x5bce[19]](function(_0x82a9xe){return _0x82a9xd(_0x82a9xe)})});module[_0x5bce[37]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var passport = require('passport');
+var async = require('async');
+
+var auth = require('../auth.service');
+var User = require('../../models').User;
+var Action = require('../../models').Action;
+var ReportMember = require('../../models').ReportMember;
+var license = require('../../config/license/license.service');
+
+var channels = ['voice', 'chat', 'mail', 'fax'];
+var router = express.Router();
+
+router.post('/', function(req, res, next) {
+  passport.authenticate('local-login', function(err, user, info) {
+    var error = err || info;
+    if (error) return res.status(401).json(error);
+    if (!user) return res.status(404).json({
+      message: 'Something went wrong, please try again.'
+    });
+
+    return Action
+      .create({
+        name: 'login',
+        data1: user.id,
+        data2: user.name,
+        UserId: user.id
+      })
+      .then(function(action) {
+        return res.json({
+          role: user.role,
+          token: auth.signToken(user.id, user.role, req.body.remember || false),
+          userId: user.id
+        });
+      })
+      .catch(function(err) {
+        return next(err);
+      });
+
+  })(req, res, next)
+});
+
+router
+  .get('/logout', auth.isAuthenticated(), function(req, res, next) {
+    return Action
+      .create({
+        name: 'logout',
+        data1: req.user.id,
+        data2: req.user.name,
+        UserId: req.user.id
+      })
+      .then(function() {
+        req.logout();
+        res.redirect('/');
+      })
+      .catch(function(err) {
+        return next(err);
+      });
+  });
+
+module.exports = router;
index d6b0882..bfb533d 100644 (file)
@@ -1 +1,51 @@
-var _0xea47=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x61\x6D\x69","\x6C\x6F\x67\x6F\x75\x74","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x61","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x55\x73\x65\x72\x49\x64","\x6C\x6F\x67","\x51\x75\x65\x75\x65\x52\x65\x6D\x6F\x76\x65","\x61\x63\x74\x69\x6F\x6E","\x6C\x6F\x67\x69\x6E","\x51\x75\x65\x75\x65\x41\x64\x64"];_0xea47[0];var util=require(_0xea47[1]);var amiController=require(_0xea47[2]);exports[_0xea47[3]]=function(_0xe960x3,_0xe960x4,_0xe960x5,_0xe960x6){var _0xe960x7={action:_0xea47[4],queue:_0xe960x5,interface:util[_0xea47[6]](_0xea47[5],_0xe960x4),paused:false};_0xe960x7[_0xea47[7]]=JSON[_0xea47[8]](_0xe960x7);_0xe960x7[_0xea47[9]]=_0xe960x3;amiController[_0xea47[12]](_0xe960x7,function(_0xe960x8,_0xe960x9){if(_0xe960x8){console[_0xea47[10]](_0xe960x8)};var _0xe960x7={action:_0xea47[11],queue:_0xe960x5,interface:util[_0xea47[6]](_0xea47[5],_0xe960x4)};_0xe960x7[_0xea47[7]]=JSON[_0xea47[8]](_0xe960x7);_0xe960x7[_0xea47[9]]=_0xe960x3;amiController[_0xea47[12]](_0xe960x7,_0xe960x6)})};exports[_0xea47[13]]=function(_0xe960x3,_0xe960x4,_0xe960x5,_0xe960x6){var _0xe960x7={action:_0xea47[14],queue:_0xe960x5,interface:util[_0xea47[6]](_0xea47[5],_0xe960x4),penalty:0,paused:false,membername:_0xe960x4};_0xe960x7[_0xea47[7]]=JSON[_0xea47[8]](_0xe960x7);_0xe960x7[_0xea47[9]]=_0xe960x3;amiController[_0xea47[12]](_0xe960x7,_0xe960x6)}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var util = require('util');
+var amiController = require('../../api/ami/ami.ami');
+
+exports.logout = function(userid, username, queuename, callback) {
+  var body = {
+    action: 'QueuePause',
+    queue: queuename,
+    interface: util.format('SIP/%s', username),
+    paused: false
+  };
+  body.data = JSON.stringify(body);
+  body.UserId = userid;
+
+  amiController.action(body, function(err, res) {
+    if (err) {
+      console.log(err);
+    }
+    var body = {
+      action: 'QueueRemove',
+      queue: queuename,
+      interface: util.format('SIP/%s', username)
+    };
+    body.data = JSON.stringify(body);
+    body.UserId = userid;
+
+    amiController.action(body, callback);
+  });
+}
+
+exports.login = function(userid, username, queuename, callback) {
+
+  var body = {
+    action: 'QueueAdd',
+    queue: queuename,
+    interface: util.format('SIP/%s', username),
+    penalty: 0,
+    paused: false,
+    membername: username
+  };
+
+  body.data = JSON.stringify(body);
+  body.UserId = userid;
+
+  amiController.action(body, callback);
+}
index f7c68c4..e602ae6 100644 (file)
@@ -1 +1,93 @@
-var _0x182f=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x6C\x6F\x63\x61\x6C","\x53\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x73\x65\x74\x75\x70","\x6C\x6F\x63\x61\x6C\x2D\x6C\x6F\x67\x69\x6E","\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x61\x74\x63\x68","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x6C\x6F\x67\x69\x6E\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64\x2E","\x74\x68\x65\x6E","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x2E","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0x182f[0]);var LocalStrategy=require(_0x182f[2])[_0x182f[1]];var Settings=require(_0x182f[4])[_0x182f[3]];var license=require(_0x182f[5]);exports[_0x182f[6]]=function(_0x75c3x5,_0x75c3x6){passport[_0x182f[17]](_0x182f[7], new LocalStrategy({usernameField:_0x182f[8],passwordField:_0x182f[9]},function(_0x75c3x7,_0x75c3x8,_0x75c3x9){var _0x75c3xa;var _0x75c3xb;var _0x75c3xc;return _0x75c3x5[_0x182f[16]]({where:{name:_0x75c3x7}})[_0x182f[12]](function(_0x75c3xf){_0x75c3xa=_0x75c3xf;if(!_0x75c3xa||!_0x75c3xf[_0x182f[14]](_0x75c3x8)){throw  new Error({message:_0x182f[15]})};return _0x75c3xa})[_0x182f[12]](license[_0x182f[13]]())[_0x182f[12]](function(_0x75c3xe){if(_0x75c3xe){return _0x75c3x9(null,_0x75c3xa)}else {return _0x75c3x9(null,false,{message:_0x182f[11]})}})[_0x182f[10]](function(_0x75c3xd){return _0x75c3x9(null,false,_0x75c3xd)})}))}
\ No newline at end of file
+var passport = require('passport');
+var LocalStrategy = require('passport-local').Strategy;
+var Settings = require('../../models').Settings;
+var license = require('../../config/license/license.service');
+
+exports.setup = function(User, config) {
+
+  passport.use('local-login', new LocalStrategy({
+      usernameField: 'name',
+      passwordField: 'password' // this is the virtual field on the model
+    },
+    function(name, password, done) {
+      var _user;
+      var _settings;
+      var _license;
+
+      return User.findOne({
+          where: {
+            name: name
+          }
+        })
+        .then(function(user) {
+          _user = user;
+
+          if (!_user || !user.authenticate(password)) {
+            throw new Error({
+              message: 'Wrong credentials.'
+            });
+          }
+
+          return _user;
+        })
+        .then(license.isValidAgent())
+        .then(function(valid) {
+          if (valid) {
+            return done(null, _user);
+          } else {
+            return done(null, false, {
+              message: 'Maximum login limit has been reached.'
+            });
+
+          }
+        })
+        .catch(function(err) {
+          return done(null, false, err);
+        });
+    }
+  ));
+
+  // passport.use('local-signup', new LocalStrategy({
+  //     usernameField: 'name',
+  //     passwordField: 'password',
+  //     passReqToCallback: true
+  //   },
+  //   function(req, name, password, done) {
+  //
+  //     if (!req.user) {
+  //       User
+  //         .findOne({
+  //           where: {
+  //             name: name
+  //           }
+  //         })
+  //         .then(function(user) {
+  //           if (user) {
+  //             return done(null, false, {
+  //               message: 'That email is already taken.'
+  //             });
+  //           } else {
+  //             var newUser = User.build(req.body);
+  //             newUser.provider = 'local';
+  //             newUser.online = true;
+  //             newUser
+  //               .save()
+  //               .then(function() {
+  //                 return done(null, newUser);
+  //               })
+  //               .catch(function(err) {
+  //                 return done(err);
+  //               });
+  //           }
+  //         })
+  //         .catch(function(err) {
+  //           return done(err);
+  //         });
+  //     } else {
+  //       // user is logged in and already has a local account. Ignore signup. (You should log out before trying to create a new account, user!)
+  //       return done(null, req.user);
+  //     }
+  //   }
+  // ));
+
+};
index 22062ab..8360247 100644 (file)
@@ -1 +1,20 @@
-var _0x5fb9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x74\x77\x69\x74\x74\x65\x72","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x5fb9[0];var express=require(_0x5fb9[1]);var passport=require(_0x5fb9[2]);var auth=require(_0x5fb9[3]);var router=express.Router();router[_0x5fb9[9]](_0x5fb9[10],passport[_0x5fb9[7]](_0x5fb9[5],{failureRedirect:_0x5fb9[6],session:false}))[_0x5fb9[9]](_0x5fb9[4],passport[_0x5fb9[7]](_0x5fb9[5],{failureRedirect:_0x5fb9[6],session:false}),auth[_0x5fb9[8]]);module[_0x5fb9[11]]=router
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var passport = require('passport');
+var auth = require('../auth.service');
+
+var router = express.Router();
+
+router
+  .get('/', passport.authenticate('twitter', {
+    failureRedirect: '/signup',
+    session: false
+  }))
+
+  .get('/callback', passport.authenticate('twitter', {
+    failureRedirect: '/signup',
+    session: false
+  }), auth.setTokenCookie);
+
+module.exports = router;
\ No newline at end of file
index 35c5244..a2eb4a5 100644 (file)
@@ -1 +1,35 @@
-var _0x6dd9=["\x73\x65\x74\x75\x70","\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x74\x77\x69\x74\x74\x65\x72","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x74\x77\x69\x74\x74\x65\x72","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];exports[_0x6dd9[0]]=function(_0xf4b4x1,_0xf4b4x2){var _0xf4b4x3=require(_0x6dd9[1]);var _0xf4b4x4=require(_0x6dd9[3])[_0x6dd9[2]];_0xf4b4x3[_0x6dd9[15]]( new _0xf4b4x4({consumerKey:_0xf4b4x2[_0x6dd9[5]][_0x6dd9[4]],consumerSecret:_0xf4b4x2[_0x6dd9[5]][_0x6dd9[6]],callbackURL:_0xf4b4x2[_0x6dd9[5]][_0x6dd9[7]]},function(_0xf4b4x5,_0xf4b4x6,_0xf4b4x7,_0xf4b4x8){_0xf4b4x1[_0x6dd9[14]]({"\x74\x77\x69\x74\x74\x65\x72\x2E\x69\x64\x5F\x73\x74\x72":_0xf4b4x7[_0x6dd9[8]]},function(_0xf4b4x9,_0xf4b4xa){if(_0xf4b4x9){return _0xf4b4x8(_0xf4b4x9)};if(!_0xf4b4xa){_0xf4b4xa= new _0xf4b4x1({name:_0xf4b4x7[_0x6dd9[9]],username:_0xf4b4x7[_0x6dd9[10]],role:_0x6dd9[11],provider:_0x6dd9[5],twitter:_0xf4b4x7[_0x6dd9[12]]});_0xf4b4xa[_0x6dd9[13]](function(_0xf4b4x9){if(_0xf4b4x9){return _0xf4b4x8(_0xf4b4x9)};return _0xf4b4x8(_0xf4b4x9,_0xf4b4xa)})}else {return _0xf4b4x8(_0xf4b4x9,_0xf4b4xa)}})}))}
\ No newline at end of file
+exports.setup = function (User, config) {
+  var passport = require('passport');
+  var TwitterStrategy = require('passport-twitter').Strategy;
+
+  passport.use(new TwitterStrategy({
+    consumerKey: config.twitter.clientID,
+    consumerSecret: config.twitter.clientSecret,
+    callbackURL: config.twitter.callbackURL
+  },
+  function(token, tokenSecret, profile, done) {
+    User.findOne({
+      'twitter.id_str': profile.id
+    }, function(err, user) {
+      if (err) {
+        return done(err);
+      }
+      if (!user) {
+        user = new User({
+          name: profile.displayName,
+          username: profile.username,
+          role: 'user',
+          provider: 'twitter',
+          twitter: profile._json
+        });
+        user.save(function(err) {
+          if (err) return done(err);
+          return done(err, user);
+        });
+      } else {
+        return done(err, user);
+      }
+    });
+    }
+  ));
+};
\ No newline at end of file
index 5c8083b..a99a4a3 100644 (file)
@@ -1 +1,1215 @@
-var _0xefb0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x67\x69","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x78\x6D\x6C\x32\x6A\x73","\x77\x61\x69\x74\x2E\x66\x6F\x72","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x68\x65\x6C\x6C\x6A\x73","\x6F\x64\x62\x63","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x53\x65\x74\x74\x69\x6E\x67\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x54\x72\x75\x6E\x6B","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x6F\x75\x6E\x64","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x61\x6E\x73\x77\x65\x72","\x2D\x2D\x41\x4E\x53\x57\x45\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6C\x6F\x67","\x41\x6E\x73\x77\x65\x72\x69\x6E\x67\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x41\x4E\x53\x57\x45\x52\x0A","\x73\x65\x6E\x64","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x2D\x2D\x43\x55\x53\x54\x4F\x4D\x20\x41\x50\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x75\x73\x74\x6F\x6D\x20\x61\x70\x70\x20\x22","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x22\x2E\x2E\x2E","\x6F\x70\x74\x69\x6F\x6E\x73","\x65\x78\x65\x63","\x64\x69\x61\x6C","\x2D\x2D\x49\x4E\x54\x45\x52\x4E\x41\x4C\x5F\x44\x49\x41\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x73\x69\x70\x5F\x69\x64","\x66\x69\x6E\x64","\x43\x61\x6C\x6C\x69\x6E\x67\x20","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x2E\x2E\x2E","\x74\x69\x6D\x65\x6F\x75\x74","\x6F\x70\x74\x73","\x75\x72\x6C","\x44\x49\x41\x4C","\x2C","\x6A\x6F\x69\x6E","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x2D\x2D\x45\x58\x54\x45\x52\x4E\x41\x4C\x5F\x44\x49\x41\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x74\x72\x75\x6E\x6B\x5F\x69\x64","\x53\x49\x50\x2F\x25\x73\x40\x25\x73","\x70\x68\x6F\x6E\x65","\x71\x75\x65\x75\x65","\x2D\x2D\x51\x55\x45\x55\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x71\x75\x65\x75\x65\x5F\x69\x64","\x66\x69\x6C\x65\x5F\x69\x64","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4A\x6F\x69\x6E\x69\x6E\x67\x20","\x20\x71\x75\x65\x75\x65\x2E\x2E\x2E","\x51\x55\x45\x55\x45","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2D\x2D\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6D\x61\x69\x6C\x62\x6F\x78","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x61\x62\x65\x6C","\x74\x61\x67","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20","\x3A","\x20\x62\x6C\x6F\x63\x6B\x20\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x2E\x2E","\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C","\x6D\x61\x74\x68","\x2D\x2D\x4D\x41\x54\x48\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x43\x61\x6C\x63\x75\x6C\x61\x74\x69\x6E\x67\x20\x65\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x53\x61\x76\x69\x6E\x67\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x6E\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x69\x73\x41\x72\x72\x61\x79","\x5B","\x5D","\x22","\x66\x6F\x72","\x66\x6F\x72\x45\x61\x63\x68","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x2D\x2D\x50\x4C\x41\x59\x42\x41\x43\x4B\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x70\x6C\x61\x79\x62\x61\x63\x6B\x2E\x2E\x2E","\x50\x4C\x41\x59\x42\x41\x43\x4B","\x6D\x65\x6E\x75","\x2D\x2D\x4D\x45\x4E\x55\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x54\x68\x65\x72\x65\x20\x61\x72\x65\x20","\x72\x65\x74\x72\x79","\x20\x72\x65\x74\x72\x69\x65\x73","\x41\x6E\x6E\x6F\x75\x6E\x63\x69\x6E\x67\x20\x61\x6E\x64\x20\x77\x61\x69\x74\x69\x6E\x67\x20\x66\x6F\x72\x20\x75\x73\x65\x72\x20\x65\x6E\x74\x72\x79\x2E\x2E\x2E","\x47\x45\x54\x20\x44\x41\x54\x41\x20\x25\x73\x20\x25\x73\x20\x25\x73\x0A","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x64\x69\x67\x69\x74","\x72\x65\x73\x75\x6C\x74","\x20\x28\x74\x69\x6D\x65\x6F\x75\x74\x29","\x53\x61\x76\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x65\x6E\x74\x72\x79\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x64\x61\x74\x61","\x4D\x65\x6E\x75\x20\x74\x69\x6D\x65\x6F\x75\x74\x21","\x30","\x74","\x52\x75\x6E\x20\x6F\x75\x74\x20\x6F\x66\x20\x72\x65\x74\x72\x69\x65\x73\x21","\x2D","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x2D\x2D\x53\x41\x59\x4E\x55\x4D\x42\x45\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x6E\x75\x6D\x62\x65\x72\x2E\x2E\x2E","\x53\x41\x59\x20\x4E\x55\x4D\x42\x45\x52\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x6E\x75\x6D\x62\x65\x72","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x2D\x2D\x53\x41\x59\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x70\x68\x6F\x6E\x65\x74\x69\x63\x2E\x2E\x2E","\x53\x41\x59\x20\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x74\x65\x78\x74","\x74\x74\x73","\x2D\x2D\x47\x4F\x4F\x47\x4C\x45\x5F\x54\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x67\x69\x5F\x73\x63\x72\x69\x70\x74\x73","\x67\x6F\x6F\x67\x6C\x65\x74\x74\x73\x2E\x61\x67\x69","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x41\x50\x49\x2E\x2E\x2E","\x41\x47\x49","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x2D\x2D\x49\x53\x50\x45\x45\x43\x48\x5F\x54\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x2F\x76\x61\x72\x2F\x77\x77\x77\x2F\x68\x74\x6D\x6C\x2F\x61\x67\x69\x73\x71\x75\x61\x72\x65\x2F\x61\x67\x69\x73\x63\x72\x69\x70\x74\x73\x2F\x69\x73\x70\x65\x65\x63\x68\x2D\x74\x74\x73\x2E\x61\x67\x69","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x6B\x65\x79","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x69\x53\x70\x65\x65\x63\x68\x20\x54\x54\x53\x20\x41\x50\x49\x2E\x2E\x2E","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x2D\x2D\x47\x45\x54\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6D\x61\x78\x64\x69\x67\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x2D\x31","\x54\x68\x65\x72\x65\x20\x69\x73\x20\x61\x20\x72\x65\x73\x75\x6C\x74\x2C\x20\x69\x73\x20\x6F\x76\x65\x72\x20\x74\x68\x65\x20\x6D\x69\x6E\x69\x6D\x75\x6D\x20\x6C\x65\x6E\x67\x74\x68\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x64\x75\x65\x20\x74\x6F\x20\x61\x6E\x20\x68\x61\x6E\x67\x75\x70\x21","\x78","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x68\x61\x6E\x67\x75\x70\x21","\x4E\x6F\x20\x65\x6E\x74\x72\x79\x20\x6F\x72\x20\x6E\x6F\x74\x20\x6C\x6F\x6E\x67\x20\x65\x6E\x6F\x75\x67\x68\x21","\x69","\x72\x65\x63\x6F\x72\x64","\x2D\x2D\x52\x45\x43\x4F\x52\x44\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x63\x61\x6C\x6C\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x2E\x2E","\x52\x45\x43\x4F\x52\x44\x20\x46\x49\x4C\x45\x20\x25\x73\x20\x77\x61\x76\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73\x0A","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x63\x6F\x64\x65","\x53\x61\x76\x69\x6E\x67\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x20\x69\x6E\x20\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x53\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x25\x73\x20\x25\x73\x0A","\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x2D\x2D\x47\x4F\x54\x4F\x49\x46\x54\x49\x4D\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x66\x61\x6C\x73\x65","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x64","\x66\x69\x6C\x74\x65\x72","\x49\x73\x20\x61\x20\x67\x72\x6F\x75\x70\x20\x6F\x66\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x21","\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x21","\x43\x68\x65\x63\x6B\x69\x6E\x67\x20\x69\x66\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x2E\x2E\x2E","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20","\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x21","\x74\x72\x75\x65","\x54\x68\x65\x72\x65\x20\x61\x72\x65\x20\x6E\x6F\x20\x73\x75\x62\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x2C\x20\x73\x6F\x20\x69\x74\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x61\x6C\x77\x61\x79\x73\x20\x74\x72\x75\x65\x21","\x49\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x21","\x54\x68\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x21","\x54\x68\x65\x20\x66\x69\x6E\x61\x6C\x20\x72\x65\x73\x75\x6C\x74\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x69\x73\x20\x22","\x22\x21","\x76\x73\x77\x69\x74\x63\x68","\x2D\x2D\x56\x41\x52\x49\x41\x42\x4C\x45\x5F\x53\x57\x49\x54\x43\x48\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x65\x74\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x76\x61\x6C\x75\x65\x20\x61\x6E\x64\x20\x73\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x74\x68\x65\x20\x72\x69\x67\x68\x74\x20\x65\x78\x69\x74\x2E\x2E\x2E","\x67\x6F\x61\x6C","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x31","\x74\x68\x65\x6E","\x73\x79\x73\x74\x65\x6D","\x2D\x2D\x53\x59\x53\x54\x45\x4D\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x74\x72\x69\x6D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x73\x79\x73\x74\x65\x6D\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E\x2E\x2E","\x72\x65\x70\x6C\x61\x63\x65","\x50\x72\x6F\x67\x72\x61\x6D\x20\x6F\x75\x74\x70\x75\x74\x3A","\x53\x61\x76\x69\x6E\x67\x20\x74\x68\x65\x20\x6F\x75\x74\x70\x75\x74\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x2D\x2D\x41\x47\x49\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x41\x47\x49\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E\x2E\x2E","\x61\x72\x67\x73","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x2D\x2D\x53\x55\x42\x50\x52\x4F\x4A\x45\x43\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x4D\x6F\x76\x69\x6E\x67\x20\x74\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x22\x22","\x61\x67\x69\x3A\x2F\x2F\x31\x39\x32\x2E\x31\x36\x38\x2E\x32\x2E\x31\x34\x37\x2F\x73\x71\x75\x61\x72\x65\x2C\x25\x73","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x2D\x2D\x49\x53\x50\x45\x45\x43\x48\x5F\x41\x53\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x69\x73\x70\x65\x65\x63\x68\x2D\x61\x73\x72\x2E\x61\x67\x69","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x6D\x6F\x64\x65\x6C","\x23","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x47\x6F\x6F\x67\x6C\x65\x20\x41\x53\x52\x20\x41\x50\x49\x2E\x2E\x2E","\x64\x61\x74\x61\x62\x61\x73\x65","\x2D\x2D\x44\x41\x54\x41\x42\x41\x53\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6F\x64\x62\x63\x5F\x69\x64","\x54\x72\x79\x69\x6E\x67\x20\x74\x6F\x20\x67\x65\x74\x20\x4F\x44\x42\x43\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\x2E\x2E","\x71\x75\x65\x72\x79","\x64\x73\x6E","\x6F\x70\x65\x6E\x53\x79\x6E\x63","\x71\x75\x65\x72\x79\x53\x79\x6E\x63","\x63\x6C\x6F\x73\x65\x53\x79\x6E\x63","\x6D\x65\x73\x73\x61\x67\x65","\x45\x52\x52\x4F\x52","\x4D\x45\x53\x53\x41\x47\x45","\x67\x6F\x74\x6F\x63","\x2D\x2D\x47\x4F\x54\x4F\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x6F\x69\x6E\x67\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x20\x2E\x2E\x2E","\x4C\x6F\x63\x61\x6C\x2F\x25\x73\x40\x25\x73","\x63\x6F\x6E\x74\x65\x78\x74","\x67\x6F\x74\x6F\x69\x66","\x2D\x2D\x47\x4F\x54\x4F\x49\x46\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x2E\x2E","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x68\x65\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x73\x20","\x68\x61\x6E\x67\x75\x70","\x2D\x2D\x48\x41\x4E\x47\x55\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x48\x61\x6E\x67\x69\x6E\x20\x75\x70\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x6E\x6F\x6F\x70","\x2D\x2D\x4E\x4F\x4F\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6F\x75\x74\x70\x75\x74","\x4E\x4F\x4F\x50\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x20","\x4E\x4F\x4F\x50","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x2D\x2D\x53\x41\x59\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x64\x69\x67\x69\x74\x73\x2E\x2E\x2E","\x53\x41\x59\x20\x44\x49\x47\x49\x54\x53\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x64\x69\x67\x69\x74\x73","\x73\x65\x74","\x2D\x2D\x53\x45\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x76\x69\x6E\x67\x20\x76\x61\x6C\x75\x65\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x6D\x78\x63\x65\x6C\x6C","\x24","\x66\x6F\x72\x49\x6E","\x72\x65\x64\x75\x63\x65","\x65\x64\x67\x65","\x73\x6F\x75\x72\x63\x65","\x76\x61\x6C\x75\x65","\x24\x2E\x74\x61\x72\x67\x65\x74","\x6D\x61\x74\x63\x68","\x72\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x72\x65\x70\x6C\x61\x63\x65\x64","\x76\x65\x72\x74\x69\x63\x65\x73","\x73\x74\x61\x72\x74","\x69\x73\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x4E\x6F\x20\x74\x61\x72\x67\x65\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x68\x61\x6E\x67\x75\x70\x21","\x66\x69\x6E\x61\x6C\x6C\x79","\x4E\x6F\x20\x74\x61\x72\x67\x65\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x73\x74\x6F\x70\x70\x69\x6E\x67\x20\x22\x46\x69\x6E\x61\x6C\x6C\x79\x22\x20\x62\x72\x61\x6E\x63\x68\x21","\x65\x6E\x64","\x65\x72\x72\x6F\x72","\x2F\x2F\x45\x72\x72\x6F\x72\x3A","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x2F\x2F\x43\x6F\x6E\x74\x65\x78\x74\x20\x63\x6C\x6F\x73\x65","\x2F\x2F\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x22\x46\x69\x6E\x61\x6C\x6C\x79\x22\x20\x62\x72\x61\x6E\x63\x68\x21","\x6C\x61\x75\x6E\x63\x68\x46\x69\x62\x65\x72","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x65\x78\x69\x74\x20\x74\x69\x6D\x65\x20\x66\x72\x6F\x6D\x20\x49\x56\x52","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65","\x2F\x2F\x43\x6F\x6E\x74\x65\x78\x74\x20\x48\x61\x6E\x67\x75\x70","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x6E\x65\x77\x20\x63\x61\x6C\x6C\x20\x66\x72\x6F\x6D\x3A\x20","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64","\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x3A\x20","\x61\x67\x69\x5F\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B","\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x73\x63\x72\x69\x70\x74","\x61\x67\x69\x5F\x72\x65\x71\x75\x65\x73\x74","\x61\x67\x69\x5F\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x67\x69\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x61\x67\x69\x5F\x74\x79\x70\x65","\x61\x67\x69\x5F\x76\x65\x72\x73\x69\x6F\x6E","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x70\x72\x65\x73","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x61\x6E\x69\x32","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x74\x6F\x6E","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x74\x6E\x73","\x61\x67\x69\x5F\x64\x6E\x69\x64","\x61\x67\x69\x5F\x72\x64\x6E\x69\x73","\x61\x67\x69\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x61\x67\x69\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x61\x67\x69\x5F\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x67\x69\x5F\x65\x6E\x68\x61\x6E\x63\x65\x64","\x61\x67\x69\x5F\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x61\x67\x69\x5F\x74\x68\x72\x65\x61\x64\x69\x64","\x61\x67\x69\x5F\x61\x72\x67\x5F\x31","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x65\x6E\x74\x65\x72\x20\x74\x69\x6D\x65\x20\x66\x6F\x72\x20\x49\x56\x52","\x45\x72\x72\x6F\x72\x3A","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x6D\x78\x67\x72\x61\x70\x68\x6D\x6F\x64\x65\x6C","\x4E\x6F\x20\x72\x6F\x6F\x74\x20\x69\x6E\x20\x70\x72\x6F\x6A\x65\x63\x74\x21","\x70\x61\x72\x73\x65\x53\x74\x72\x69\x6E\x67","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x70\x75\x62\x6C\x69\x73\x68\x65\x64\x21","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x66\x6F\x75\x6E\x64\x21","\x66\x69\x6E\x64\x4F\x6E\x65","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x21","\x73\x70\x6C\x69\x74","\x2A","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x45","\x44","\x4D","\x70\x75\x73\x68","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x69\x6E\x64\x65\x78\x4F\x66","\x53\x65\x74\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x53\x65\x6E\x64\x69\x6E\x67\x20\x73\x65\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2C\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x69\x73\x20","\x2C\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x20","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x5D\x5B","\x66\x6F\x72\x4F\x77\x6E","\x28","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x29","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x25\x73\x2F\x25\x73","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x53\x6F\x75\x6E\x64\x73","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x63\x6C\x6F\x6E\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x61\x67\x69\x5F\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65\x20\x41\x47\x49\x2E\x2E\x2E","\x6C\x69\x73\x74\x65\x6E","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72"];_0xefb0[0];var _=require(_0xefb0[1]);var agi=require(_0xefb0[2]);var util=require(_0xefb0[3]);var moment=require(_0xefb0[4]);var xml=require(_0xefb0[5]);var wait=require(_0xefb0[6]);var sr=require(_0xefb0[7]);var path=require(_0xefb0[8]);var config=require(_0xefb0[9]);var sh=require(_0xefb0[10]);var db=require(_0xefb0[11])();var SquareProject=require(_0xefb0[13])[_0xefb0[12]];var Variable=require(_0xefb0[13])[_0xefb0[14]];var SquareOdbc=require(_0xefb0[13])[_0xefb0[15]];var Settings=require(_0xefb0[13])[_0xefb0[16]];var User=require(_0xefb0[13])[_0xefb0[17]];var VoiceQueue=require(_0xefb0[13])[_0xefb0[18]];var Trunk=require(_0xefb0[13])[_0xefb0[19]];var Interval=require(_0xefb0[13])[_0xefb0[20]];var Sound=require(_0xefb0[13])[_0xefb0[21]];var ReportSquare=require(_0xefb0[13])[_0xefb0[22]];var ReportSquareDetail=require(_0xefb0[13])[_0xefb0[23]];var users,trunks,variables,intervals,projects,sounds,queues,dbConnections,generalUniqueId;var agiPort;var weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};var monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};var methods={};methods[_0xefb0[24]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[25]);console[_0xefb0[26]](_0xefb0[27]);_0xbdb6x24[_0xefb0[29]](_0xefb0[28],function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[30]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[31]);console[_0xefb0[26]](_0xefb0[32]+_0xbdb6x25[_0xefb0[33]]+_0xefb0[34]);_0xbdb6x24[_0xefb0[36]](_0xbdb6x25[_0xefb0[33]],_0xbdb6x25[_0xefb0[35]],function(_0xbdb6x27,_0xbdb6x28){if(_0xbdb6x26){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)}})};methods[_0xefb0[37]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[38]);if(!users){getUsers(false)};var _0xbdb6x29=_[_0xefb0[40]](users,{id:parseInt(_0xbdb6x25[_0xefb0[39]])});console[_0xefb0[26]](_0xefb0[41]+util[_0xefb0[44]](_0xefb0[42],_0xbdb6x29[_0xefb0[43]])+_0xefb0[45]);var _0xbdb6x2a=[util[_0xefb0[44]](_0xefb0[42],_0xbdb6x29[_0xefb0[43]]),_0xbdb6x25[_0xefb0[46]],_0xbdb6x25[_0xefb0[47]],_0xbdb6x25[_0xefb0[48]]];_0xbdb6x24[_0xefb0[36]](_0xefb0[49],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[52]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[53]);if(!trunks){getTrunks(false)};var _0xbdb6x2b=_[_0xefb0[40]](trunks,{id:parseInt(_0xbdb6x25[_0xefb0[54]])});console[_0xefb0[26]](_0xefb0[41]+util[_0xefb0[44]](_0xefb0[42],_0xbdb6x2b[_0xefb0[43]])+_0xefb0[45]);var _0xbdb6x2a=[util[_0xefb0[44]](_0xefb0[55],_0xbdb6x25[_0xefb0[56]],_0xbdb6x2b[_0xefb0[43]]),_0xbdb6x25[_0xefb0[46]],_0xbdb6x25[_0xefb0[47]],_0xbdb6x25[_0xefb0[48]]];_0xbdb6x24[_0xefb0[36]](_0xefb0[49],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[57]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[58]);if(!queues){getQueues(false)};var _0xbdb6x2c=_[_0xefb0[40]](queues,{name:_0xbdb6x25[_0xefb0[59]]});var _0xbdb6x2d=getFilePath(_0xbdb6x25[_0xefb0[60]]);var _0xbdb6x2a=[_0xbdb6x2c[_0xefb0[43]],_0xbdb6x25[_0xefb0[47]],_0xbdb6x25[_0xefb0[48]],_0xbdb6x2d,_0xbdb6x25[_0xefb0[46]],_0xbdb6x25[_0xefb0[2]],_0xbdb6x25[_0xefb0[61]],_0xbdb6x25[_0xefb0[62]],_0xefb0[63],_0xbdb6x25[_0xefb0[64]]];console[_0xefb0[26]](_0xefb0[65]+_0xbdb6x2c[_0xefb0[43]]+_0xefb0[66]);_0xbdb6x24[_0xefb0[36]](_0xefb0[67],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[68]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[69]);var _0xbdb6x2a=[_0xbdb6x25[_0xefb0[70]],_0xbdb6x25[_0xefb0[47]]];var _0xbdb6x2e={uniqueid:_0xbdb6x24[_0xefb0[71]],node:_0xbdb6x25[_0xefb0[72]],application:_0xbdb6x25[_0xefb0[73]],data:_0xbdb6x2a[_0xefb0[51]](_0xefb0[50])||null};ReportSquareDetail[_0xefb0[78]](_0xbdb6x2e)[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[74]+_0xbdb6x25[_0xefb0[73]]+_0xefb0[75]+_0xbdb6x25[_0xefb0[72]]+_0xefb0[76],_0xbdb6x27)});console[_0xefb0[26]](_0xefb0[79]);_0xbdb6x24[_0xefb0[36]](_0xefb0[80],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[81]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[82]);console[_0xefb0[26]](_0xefb0[83]);var _0xbdb6x2f=eval(_0xbdb6x25[_0xefb0[84]]);console[_0xefb0[26]](_0xefb0[85]);var _0xbdb6x30=getVariableName(_0xbdb6x25[_0xefb0[86]]);if(_[_0xefb0[87]](_0xbdb6x2f)){_0xbdb6x2f[_0xefb0[92]](function(_0xbdb6x31,_0xbdb6x32){wait[_0xefb0[91]](setVariable,_0xbdb6x24,_0xbdb6x30+_0xefb0[88]+_0xbdb6x32+_0xefb0[89],_0xefb0[90]+_0xbdb6x31+_0xefb0[90])})}else {wait[_0xefb0[91]](setVariable,_0xbdb6x24,_0xbdb6x30,_0xefb0[90]+_0xbdb6x2f+_0xefb0[90])}};methods[_0xefb0[93]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[94]);var _0xbdb6x33=getFilePath(_0xbdb6x25[_0xefb0[60]]);var _0xbdb6x2a=[_0xbdb6x33,_0xbdb6x25[_0xefb0[47]]];console[_0xefb0[26]](_0xefb0[95]);_0xbdb6x24[_0xefb0[36]](_0xefb0[96],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[97]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[98]);var _0xbdb6x28={};console[_0xefb0[26]](_0xefb0[99]+_0xbdb6x25[_0xefb0[100]]+_0xefb0[101]);if(_0xbdb6x25[_0xefb0[100]]>0){_0xbdb6x25[_0xefb0[100]]--;var _0xbdb6x34=getFilePath(_0xbdb6x25[_0xefb0[60]]);console[_0xefb0[26]](_0xefb0[102]);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[103],_0xbdb6x34,parseInt(_0xbdb6x25[_0xefb0[104]])*1000,_0xbdb6x25[_0xefb0[105]]),function(_0xbdb6x27,_0xbdb6x28){var _0xbdb6x2e={uniqueid:_0xbdb6x24[_0xefb0[71]],node:_0xbdb6x25[_0xefb0[72]],application:_0xbdb6x25[_0xefb0[73]],data:_0xbdb6x28[_0xefb0[106]]||null};ReportSquareDetail[_0xefb0[78]](_0xbdb6x2e)[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[74]+_0xbdb6x25[_0xefb0[73]]+_0xefb0[75]+_0xbdb6x25[_0xefb0[72]]+_0xefb0[76],_0xbdb6x27)});if(_0xbdb6x28[_0xefb0[106]]!==_0xefb0[107]){if(_0xbdb6x25[_0xefb0[86]]){console[_0xefb0[26]](_0xefb0[108]);var _0xbdb6x30=getVariableName(_0xbdb6x25[_0xefb0[86]]);setVariable(_0xbdb6x24,_0xbdb6x30,_0xefb0[90]+_0xbdb6x28[_0xefb0[106]]+_0xefb0[90],function(){_0xbdb6x28[_0xefb0[109]]=_0xbdb6x28[_0xefb0[106]];_0xbdb6x26(null,_0xbdb6x28)})}}else {console[_0xefb0[26]](_0xefb0[110]);_0xbdb6x28={code:200,result:_0xefb0[111],data:_0xefb0[112]};_0xbdb6x26(null,_0xbdb6x28)}})}else {console[_0xefb0[26]](_0xefb0[113]);_0xbdb6x28={code:200,result:_0xefb0[111],data:_0xefb0[114]};_0xbdb6x26(null,_0xbdb6x28)}};methods[_0xefb0[115]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[116]);console[_0xefb0[26]](_0xefb0[117]);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[118],_0xbdb6x25[_0xefb0[119]],_0xbdb6x25[_0xefb0[120]]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[121]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[122]);console[_0xefb0[26]](_0xefb0[123]);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[124],_0xbdb6x25[_0xefb0[125]],_0xbdb6x25[_0xefb0[120]]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[126]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[127]);var _0xbdb6x2a=[path[_0xefb0[51]](config[_0xefb0[128]],_0xefb0[129],_0xefb0[130]),encodeURIComponent(_0xbdb6x25[_0xefb0[125]]),_0xbdb6x25[_0xefb0[131]]];console[_0xefb0[26]](_0xefb0[132]);_0xbdb6x24[_0xefb0[36]](_0xefb0[133],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[134]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[135]);var _0xbdb6x2a=[_0xefb0[136],encodeURIComponent(_0xbdb6x25[_0xefb0[125]]),_0xbdb6x25[_0xefb0[137]],_0xefb0[63],_0xefb0[63],_0xbdb6x25[_0xefb0[138]]];console[_0xefb0[26]](_0xefb0[139]);_0xbdb6x24[_0xefb0[36]](_0xefb0[133],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[140]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[141]);var _0xbdb6x28={};console[_0xefb0[26]](_0xefb0[99]+_0xbdb6x25[_0xefb0[100]]+_0xefb0[101]);if(_0xbdb6x25[_0xefb0[100]]>0){_0xbdb6x25[_0xefb0[100]]--;var _0xbdb6x34=getFilePath(_0xbdb6x25[_0xefb0[60]]);console[_0xefb0[26]](_0xefb0[102]);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[103],_0xbdb6x34,parseInt(_0xbdb6x25[_0xefb0[104]])*1000,_0xbdb6x25[_0xefb0[142]]),function(_0xbdb6x27,_0xbdb6x28){var _0xbdb6x2e={uniqueid:_0xbdb6x24[_0xefb0[71]],node:_0xbdb6x25[_0xefb0[72]],application:_0xbdb6x25[_0xefb0[73]],data:_0xbdb6x28[_0xefb0[106]]||null};ReportSquareDetail[_0xefb0[78]](_0xbdb6x2e)[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[74]+_0xbdb6x25[_0xefb0[73]]+_0xefb0[75]+_0xbdb6x25[_0xefb0[72]]+_0xefb0[76],_0xbdb6x27)});if(_0xbdb6x28[_0xefb0[106]]&&_0xbdb6x28[_0xefb0[106]][_0xefb0[143]]>=parseInt(_0xbdb6x25[_0xefb0[144]])){if(_0xbdb6x28[_0xefb0[106]]!==_0xefb0[145]){console[_0xefb0[26]](_0xefb0[146]);if(_0xbdb6x25[_0xefb0[86]]){console[_0xefb0[26]](_0xefb0[108]);var _0xbdb6x30=getVariableName(_0xbdb6x25[_0xefb0[86]]);setVariable(_0xbdb6x24,_0xbdb6x30,_0xefb0[90]+_0xbdb6x28[_0xefb0[106]]+_0xefb0[90],function(){_0xbdb6x28={code:200,result:_0xefb0[111],data:_0xefb0[147]};_0xbdb6x26(null,_0xbdb6x28)})}}else {console[_0xefb0[26]](_0xefb0[148]);_0xbdb6x28={code:500,result:_0xefb0[145]};_0xbdb6x26(null,_0xbdb6x28)}}else {console[_0xefb0[26]](_0xefb0[149]);_0xbdb6x28={code:200,result:_0xefb0[111],data:_0xefb0[150]};_0xbdb6x26(null,_0xbdb6x28)}})}else {console[_0xefb0[26]](_0xefb0[113]);_0xbdb6x28={code:500,result:_0xefb0[145]};_0xbdb6x26(null,_0xbdb6x28)}};methods[_0xefb0[151]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[152]);var _0xbdb6x35=sr();console[_0xefb0[26]](_0xefb0[153]);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[154],path[_0xefb0[51]](config[_0xefb0[128]],_0xefb0[155],_0xbdb6x35),_0xbdb6x25[_0xefb0[120]],_0xbdb6x25[_0xefb0[46]],null,true,null),function(_0xbdb6x27,_0xbdb6x28){if(_0xbdb6x28[_0xefb0[156]]===200&&_0xbdb6x28[_0xefb0[106]]!==_0xefb0[145]){console[_0xefb0[26]](_0xefb0[157]);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[158],_0xefb0[159],_0xbdb6x35),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})}else {_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)}})};methods[_0xefb0[160]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[161]);var _0xbdb6x28;var _0xbdb6x36=_0xefb0[162];var _0xbdb6x37;if(!intervals){getIntervals(false)};var _0xbdb6x38=_[_0xefb0[40]](intervals,{id:parseInt(_0xbdb6x25[_0xefb0[163]])});if(!_0xbdb6x38[_0xefb0[164]]){_0xbdb6x37=_[_0xefb0[166]](intervals,{IntervalId:parseInt(_0xbdb6x38[_0xefb0[165]])})};if(_0xbdb6x37){console[_0xefb0[26]](_0xefb0[167]);if(_0xbdb6x37[_0xefb0[143]]){console[_0xefb0[26]](_0xefb0[99]+_0xbdb6x37[_0xefb0[143]]+_0xefb0[168]);var _0xbdb6x39;console[_0xefb0[26]](_0xefb0[169]);_0xbdb6x37[_0xefb0[92]](function(_0xbdb6x31,_0xbdb6x32){_0xbdb6x39=splitInterval(_0xbdb6x31[_0xefb0[170]]);if(isIntervalValid(_0xbdb6x39)){console[_0xefb0[26]](_0xefb0[171]+_0xbdb6x32+_0xefb0[172]);_0xbdb6x36=_0xefb0[173]}})}else {console[_0xefb0[26]](_0xefb0[174]);_0xbdb6x36=_0xefb0[173]}}else {console[_0xefb0[26]](_0xefb0[175]);var _0xbdb6x3a=splitInterval(_0xbdb6x38[_0xefb0[170]]);if(isIntervalValid(_0xbdb6x3a)){console[_0xefb0[26]](_0xefb0[176]);_0xbdb6x36=_0xefb0[173]}};console[_0xefb0[26]](_0xefb0[177]+_0xbdb6x36+_0xefb0[178]);_0xbdb6x28={code:200,result:_0xefb0[111],data:_0xbdb6x36};_0xbdb6x26(null,_0xbdb6x28)};methods[_0xefb0[179]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[180]);console[_0xefb0[26]](_0xefb0[181]);var _0xbdb6x30=getVariableName(_0xbdb6x25[_0xefb0[86]]);getVariable(_0xbdb6x24,_0xbdb6x30,function(_0xbdb6x27,_0xbdb6x28){if(!_0xbdb6x28[_0xefb0[109]]){_0xbdb6x28[_0xefb0[109]]=_0xefb0[114]};_0xbdb6x26(null,_0xbdb6x28)})};methods[_0xefb0[182]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){var _0xbdb6x2e={uniqueid:_0xbdb6x24[_0xefb0[71]],node:_0xbdb6x25[_0xefb0[72]],application:_0xbdb6x25[_0xefb0[73]],data:_0xbdb6x25[_0xefb0[183]]||null};ReportSquareDetail[_0xefb0[78]](_0xbdb6x2e)[_0xefb0[185]](function(_0xbdb6x28){_0xbdb6x28={code:200,result:_0xefb0[184]};_0xbdb6x26(null,_0xbdb6x28)})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[74]+_0xbdb6x25[_0xefb0[73]]+_0xefb0[75]+_0xbdb6x25[_0xefb0[72]]+_0xefb0[76],_0xbdb6x27);var _0xbdb6x28={code:200,result:_0xefb0[184]};_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[186]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[187]);var _0xbdb6x2e={uniqueid:_0xbdb6x24[_0xefb0[71]],node:_0xbdb6x25[_0xefb0[72]],application:_0xbdb6x25[_0xefb0[73]],data:_[_0xefb0[189]](_0xbdb6x25[_0xefb0[188]])||null};ReportSquareDetail[_0xefb0[78]](_0xbdb6x2e)[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[74]+_0xbdb6x25[_0xefb0[73]]+_0xefb0[75]+_0xbdb6x25[_0xefb0[72]]+_0xefb0[76],_0xbdb6x27)});console[_0xefb0[26]](_0xefb0[190]);sh[_0xefb0[36]](_[_0xefb0[189]](_0xbdb6x25[_0xefb0[188]]),function(_0xbdb6x3b,_0xbdb6x3c){var _0xbdb6x3d=_0xbdb6x3c[_0xefb0[191]](/(\r\n|\n|\r)/gm,_0xefb0[63]);console[_0xefb0[26]](_0xefb0[192],_0xbdb6x3d);console[_0xefb0[26]](_0xefb0[193]);var _0xbdb6x30=getVariableName(_0xbdb6x25[_0xefb0[86]]);setVariable(_0xbdb6x24,_0xbdb6x30,_0xefb0[90]+_0xbdb6x3d+_0xefb0[90],_0xbdb6x26)})};methods[_0xefb0[2]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[194]);console[_0xefb0[26]](_0xefb0[195]);_0xbdb6x24[_0xefb0[36]](_0xefb0[133],_0xbdb6x25[_0xefb0[188]],_0xbdb6x25[_0xefb0[196]],function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[197]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[198]);if(!projects){getProjects(false)};var _0xbdb6x3e=_[_0xefb0[40]](projects,{id:parseInt(_0xbdb6x25[_0xefb0[199]])});console[_0xefb0[26]](_0xefb0[200]+_0xbdb6x3e[_0xefb0[43]]+_0xefb0[34]);_0xbdb6x24[_0xefb0[36]](_0xefb0[133],util[_0xefb0[44]](_0xefb0[201],_0xbdb6x3e[_0xefb0[43]]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[202]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[203]);var _0xbdb6x2a=[path[_0xefb0[51]](config[_0xefb0[128]],_0xefb0[129],_0xefb0[204]),_0xbdb6x25[_0xefb0[205]],_0xefb0[63],(_0xbdb6x25[_0xefb0[206]]===_0xefb0[111]?_0xefb0[63]:_0xbdb6x25[_0xefb0[206]]),_0xefb0[184],_0xefb0[207],_0xefb0[63],_0xbdb6x25[_0xefb0[138]]];console[_0xefb0[26]](_0xefb0[208]);_0xbdb6x24[_0xefb0[36]](_0xefb0[133],_0xbdb6x2a[_0xefb0[51]](_0xefb0[50]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[209]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[210]);if(!dbConnections){getDbConnections(false)};var _0xbdb6x3f=_[_0xefb0[40]](dbConnections,{id:parseInt(_0xbdb6x25[_0xefb0[211]])});console[_0xefb0[26]](_0xefb0[212]);var _0xbdb6x2e={uniqueid:_0xbdb6x24[_0xefb0[71]],node:_0xbdb6x25[_0xefb0[72]],application:_0xbdb6x25[_0xefb0[73]],data:_0xbdb6x25[_0xefb0[213]]||null};ReportSquareDetail[_0xefb0[78]](_0xbdb6x2e)[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[74]+_0xbdb6x25[_0xefb0[73]]+_0xefb0[75]+_0xbdb6x25[_0xefb0[72]]+_0xefb0[76],_0xbdb6x27)});try{db[_0xefb0[215]](_0xbdb6x3f[_0xefb0[214]]);var _0xbdb6x40=db[_0xefb0[216]](_0xbdb6x25[_0xefb0[213]]);db[_0xefb0[217]]();setVariablesMatrix(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26,_0xbdb6x40)}catch(e){console[_0xefb0[26]](e[_0xefb0[218]]);wait[_0xefb0[91]](setVariable,_0xbdb6x24,_0xefb0[219],_0xefb0[173]);wait[_0xefb0[91]](setVariable,_0xbdb6x24,_0xefb0[220],_0xefb0[90]+e[_0xefb0[218]]+_0xefb0[90])}};methods[_0xefb0[221]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[222]);console[_0xefb0[26]](_0xefb0[223]+_0xbdb6x25[_0xefb0[224]]+_0xefb0[225]);_0xbdb6x24[_0xefb0[36]](_0xefb0[49],util[_0xefb0[44]](_0xefb0[226],_0xbdb6x25[_0xefb0[224]],_0xbdb6x25[_0xefb0[227]]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[228]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[229]);var _0xbdb6x28={code:200,result:_0xefb0[111]};console[_0xefb0[26]](_0xefb0[230]);_0xbdb6x28[_0xefb0[109]]=String(eval(_0xbdb6x25[_0xefb0[231]])?_0xefb0[173]:_0xefb0[162]);console[_0xefb0[26]](_0xefb0[232]+_0xbdb6x28[_0xefb0[109]]);_0xbdb6x26(null,_0xbdb6x28)};methods[_0xefb0[233]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[234]);console[_0xefb0[26]](_0xefb0[235]);_0xbdb6x24[_0xefb0[233]]()};methods[_0xefb0[236]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[237]);var _0xbdb6x3c=(_0xbdb6x25[_0xefb0[238]])?_0xefb0[90]+_0xbdb6x25[_0xefb0[238]]+_0xefb0[90]:_0xefb0[90]+_0xbdb6x25[_0xefb0[72]]+_0xefb0[90];console[_0xefb0[26]](_0xefb0[239]+_0xbdb6x3c);_0xbdb6x24[_0xefb0[36]](_0xefb0[240],_0xbdb6x3c,function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[241]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[242]);console[_0xefb0[26]](_0xefb0[243]);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[244],_0xbdb6x25[_0xefb0[245]],_0xbdb6x25[_0xefb0[120]]),function(_0xbdb6x27,_0xbdb6x28){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)})};methods[_0xefb0[246]]=function(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[247]);console[_0xefb0[26]](_0xefb0[248]);var _0xbdb6x30=getVariableName(_0xbdb6x25[_0xefb0[86]]);wait[_0xefb0[91]](setVariable,_0xbdb6x24,_0xbdb6x30,_0xefb0[90]+_0xbdb6x25[_0xefb0[249]]+_0xefb0[90])};function getVertices(_0xbdb6x42){return _[_0xefb0[253]](_0xbdb6x42,function(_0xbdb6x2f,_0xbdb6x43,_0xbdb6x44){if(_0xbdb6x44===_0xefb0[250]){return _0xbdb6x2f};if(_[_0xefb0[87]](_0xbdb6x43)){_[_0xefb0[252]](_0xbdb6x43,function(_0xbdb6x45,_0xbdb6x46){_0xbdb6x2f[_0xbdb6x45[_0xefb0[251]][_0xefb0[165]]]=_0xbdb6x45[_0xefb0[251]];_0xbdb6x2f[_0xbdb6x45[_0xefb0[251]][_0xefb0[165]]][_0xefb0[73]]=_0xbdb6x44});return _0xbdb6x2f};_0xbdb6x2f[_0xbdb6x43[_0xefb0[251]][_0xefb0[165]]]=_0xbdb6x43[_0xefb0[251]];_0xbdb6x2f[_0xbdb6x43[_0xefb0[251]][_0xefb0[165]]][_0xefb0[73]]=_0xbdb6x44;return _0xbdb6x2f},{})}function getTargetBySource(_0xbdb6x42,_0xbdb6x48,_0xbdb6x45){return _[_0xefb0[106]](_[_0xefb0[40]](_0xbdb6x42[_0xefb0[250]],function(_0xbdb6x43){if(_0xbdb6x43[_0xefb0[251]][_0xefb0[254]]&&_0xbdb6x43[_0xefb0[251]][_0xefb0[255]]){if(_0xbdb6x43[_0xefb0[251]][_0xefb0[255]]===_0xbdb6x48){if(_0xbdb6x43[_0xefb0[251]][_0xefb0[256]]&&_0xbdb6x43[_0xefb0[251]][_0xefb0[256]]!==_0xbdb6x45){return false};return true}};return false}),_0xefb0[257])}function replaceAllVariables(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26){var _0xbdb6x4a=_0xbdb6x25;for(var _0xbdb6x46 in _0xbdb6x4a){var _0xbdb6x28=_0xbdb6x4a[_0xbdb6x46][_0xefb0[258]](/{+(.*?)}/gi);if(_0xbdb6x28){console[_0xefb0[26]](_0xefb0[259],_0xbdb6x28);_0xbdb6x28[_0xefb0[92]](function(_0xbdb6x4b,_0xbdb6x32){console[_0xefb0[26]](_0xefb0[260],_0xbdb6x28[_0xbdb6x32][_0xefb0[261]](1,_0xbdb6x28[_0xbdb6x32][_0xefb0[143]]-1));var _0xbdb6x45=wait[_0xefb0[91]](getVariable,_0xbdb6x24,_0xbdb6x28[_0xbdb6x32][_0xefb0[261]](1,_0xbdb6x28[_0xbdb6x32][_0xefb0[143]]-1));console[_0xefb0[26]](_0xefb0[256],_0xbdb6x45);if(_0xbdb6x45[_0xefb0[109]]){_0xbdb6x4a[_0xbdb6x46]=_0xbdb6x4a[_0xbdb6x46][_0xefb0[191]](_0xbdb6x28[_0xbdb6x32],_0xbdb6x45[_0xefb0[109]])}})}};_0xbdb6x4a[_0xefb0[262]]=true;return _0xbdb6x4a}function xstart(_0xbdb6x24){var _0xbdb6x42=_0xbdb6x24[_0xefb0[128]];var _0xbdb6x4d=_0xbdb6x24[_0xefb0[263]];if(_0xbdb6x42[_0xefb0[264]]){if(!_[_0xefb0[87]](_0xbdb6x42[_0xefb0[264]])){var _0xbdb6x48=_0xbdb6x42[_0xefb0[264]][_0xefb0[251]][_0xefb0[165]];var _0xbdb6x28={};do{try{var _0xbdb6x25=_0xbdb6x4d[_0xbdb6x48][_0xefb0[262]]?_0xbdb6x4d[_0xbdb6x48]:replaceAllVariables(_0xbdb6x24,_0xbdb6x4d[_0xbdb6x48]);if(_0xbdb6x25){if(_[_0xefb0[265]](methods[_0xbdb6x25[_0xefb0[73]]])){_0xbdb6x28=wait[_0xefb0[91]](methods[_0xbdb6x25[_0xefb0[73]]],_0xbdb6x24,_0xbdb6x25)}else {_0xbdb6x28=wait[_0xefb0[91]](methods[_0xefb0[236]],_0xbdb6x24,_0xbdb6x25)};if(_0xbdb6x28[_0xefb0[156]]===200&&_0xbdb6x28[_0xefb0[106]]!==_0xefb0[145]){var _0xbdb6x4e=getTargetBySource(_0xbdb6x42,_0xbdb6x48,_0xbdb6x28[_0xefb0[109]]);if(!_0xbdb6x4e){if(_0xbdb6x25[_0xefb0[73]]===_0xefb0[97]){if(_0xbdb6x25[_0xefb0[100]]>0){_0xbdb6x4e=getTargetBySource(_0xbdb6x42,_0xbdb6x48,_0xefb0[150]);if(!_0xbdb6x4e){_0xbdb6x4e=_0xbdb6x48}}};if(_0xbdb6x25[_0xefb0[73]]===_0xefb0[140]&&_0xbdb6x25[_0xefb0[100]]>0){_0xbdb6x4e=_0xbdb6x48};if(_0xbdb6x25[_0xefb0[73]]===_0xefb0[179]){_0xbdb6x4e=getTargetBySource(_0xbdb6x42,_0xbdb6x48,_0xefb0[114]);if(!_0xbdb6x4e){_0xbdb6x4e=_0xbdb6x48}}};_0xbdb6x48=_0xbdb6x4e}else {_0xbdb6x48=null}}else {_0xbdb6x48=null}}catch(err){console[_0xefb0[26]](err)}}while(_0xbdb6x48);;console[_0xefb0[26]](_0xefb0[266]);_0xbdb6x24[_0xefb0[233]]()}}}function xfinally(_0xbdb6x24){var _0xbdb6x42=_0xbdb6x24[_0xefb0[128]];var _0xbdb6x4d=_0xbdb6x24[_0xefb0[263]];if(_0xbdb6x42[_0xefb0[267]]){if(!_[_0xefb0[87]](_0xbdb6x42[_0xefb0[267]])){var _0xbdb6x48=_0xbdb6x42[_0xefb0[267]][_0xefb0[251]][_0xefb0[165]];var _0xbdb6x28={};do{try{var _0xbdb6x25=replaceAllVariables(_0xbdb6x24,_0xbdb6x4d[_0xbdb6x48]);if(_0xbdb6x25){if(_[_0xefb0[265]](methods[_0xbdb6x25[_0xefb0[73]]])){_0xbdb6x28=wait[_0xefb0[91]](methods[_0xbdb6x25[_0xefb0[73]]],_0xbdb6x24,_0xbdb6x25)}else {_0xbdb6x28=wait[_0xefb0[91]](methods[_0xefb0[236]],_0xbdb6x24,_0xbdb6x25)};if(_0xbdb6x28[_0xefb0[156]]===200&&_0xbdb6x28[_0xefb0[106]]!==_0xefb0[145]){var _0xbdb6x4e=getTargetBySource(_0xbdb6x42,_0xbdb6x48,_0xbdb6x28[_0xefb0[109]]);if(!_0xbdb6x4e){if(_0xbdb6x25[_0xefb0[73]]===_0xefb0[97]){if(_0xbdb6x25[_0xefb0[100]]>0){_0xbdb6x4e=getTargetBySource(_0xbdb6x42,_0xbdb6x48,_0xefb0[150]);if(!_0xbdb6x4e){_0xbdb6x4e=_0xbdb6x48}}};if(_0xbdb6x25[_0xefb0[73]]===_0xefb0[140]&&_0xbdb6x25[_0xefb0[100]]>0){_0xbdb6x4e=_0xbdb6x48}};_0xbdb6x48=_0xbdb6x4e}else {_0xbdb6x48=null}}else {_0xbdb6x48=null}}catch(err){console[_0xefb0[26]](err)}}while(_0xbdb6x48);;_0xbdb6x24[_0xefb0[233]]();console[_0xefb0[26]](_0xefb0[268])}};_0xbdb6x24[_0xefb0[269]]()}function main(_0xbdb6x24){_0xbdb6x24[_0xefb0[272]](_0xefb0[270],function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[271],_0xbdb6x27)});_0xbdb6x24[_0xefb0[272]](_0xefb0[273],function(){console[_0xefb0[26]](_0xefb0[274])});_0xbdb6x24[_0xefb0[272]](_0xefb0[233],function(){if(_0xbdb6x24[_0xefb0[267]]){_0xbdb6x24[_0xefb0[267]]=false;console[_0xefb0[26]](_0xefb0[275]);wait[_0xefb0[276]](xfinally,_0xbdb6x24)}else {ReportSquare[_0xefb0[279]]({leaveAt:moment()[_0xefb0[44]](_0xefb0[278])},{where:{uniqueid:_0xbdb6x24[_0xefb0[71]]}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[277],_0xbdb6x27)});console[_0xefb0[26]](_0xefb0[280])}});_0xbdb6x24[_0xefb0[272]](_0xefb0[104],function(_0xbdb6x28){});_0xbdb6x24[_0xefb0[272]](_0xefb0[281],function(_0xbdb6x51){console[_0xefb0[26]](_0xbdb6x51);console[_0xefb0[26]](_0xefb0[282]+_0xbdb6x51[_0xefb0[283]]+_0xefb0[284]+_0xbdb6x51[_0xefb0[285]]);var _0xbdb6x52={network:_0xbdb6x51[_0xefb0[286]],network_script:_0xbdb6x51[_0xefb0[287]],request:_0xbdb6x51[_0xefb0[288]],channel:_0xbdb6x51[_0xefb0[289]],language:_0xbdb6x51[_0xefb0[290]],type:_0xbdb6x51[_0xefb0[291]],uniqueid:_0xbdb6x51[_0xefb0[285]],version:_0xbdb6x51[_0xefb0[292]],callerid:_0xbdb6x51[_0xefb0[283]],calleridname:_0xbdb6x51[_0xefb0[293]],callingpres:_0xbdb6x51[_0xefb0[294]],callingani2:_0xbdb6x51[_0xefb0[295]],callington:_0xbdb6x51[_0xefb0[296]],callingtns:_0xbdb6x51[_0xefb0[297]],dnid:_0xbdb6x51[_0xefb0[298]],rdnis:_0xbdb6x51[_0xefb0[299]],context:_0xbdb6x51[_0xefb0[300]],extension:_0xbdb6x51[_0xefb0[301]],priority:_0xbdb6x51[_0xefb0[302]],enhanced:_0xbdb6x51[_0xefb0[303]],accountcode:_0xbdb6x51[_0xefb0[304]],threadid:_0xbdb6x51[_0xefb0[305]],project_name:_0xbdb6x51[_0xefb0[306]],joinAt:moment()[_0xefb0[44]](_0xefb0[278])};ReportSquare[_0xefb0[78]](_0xbdb6x52)[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[307],_0xbdb6x27)});if(_0xbdb6x51[_0xefb0[306]]){SquareProject[_0xefb0[315]]({where:{name:_0xbdb6x51[_0xefb0[306]]},attributes:[_0xefb0[165],_0xefb0[309]]})[_0xefb0[185]](function(_0xbdb6x3e){if(_0xbdb6x3e){if(_0xbdb6x3e[_0xefb0[309]]){xml[_0xefb0[312]](_0xbdb6x3e[_0xefb0[309]],{normalizeTags:true,explicitArray:false},function(_0xbdb6x27,_0xbdb6x2f){var _0xbdb6x42=_0xbdb6x2f[_0xefb0[310]][_0xefb0[128]];if(_0xbdb6x42){_0xbdb6x24[_0xefb0[128]]=_0xbdb6x42;_0xbdb6x24[_0xefb0[267]]=true;_0xbdb6x24[_0xefb0[71]]=_0xbdb6x51[_0xefb0[285]];_0xbdb6x24[_0xefb0[263]]=getVertices(_0xbdb6x42);wait[_0xefb0[276]](xstart,_0xbdb6x24)}else {console[_0xefb0[26]](_0xefb0[311]);_0xbdb6x24[_0xefb0[269]]()}})}else {console[_0xefb0[26]](_0xefb0[313]);_0xbdb6x24[_0xefb0[269]]()}}else {console[_0xefb0[26]](_0xefb0[314]);_0xbdb6x24[_0xefb0[269]]()}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xefb0[308],_0xbdb6x27);_0xbdb6x24[_0xefb0[269]]()})}else {console[_0xefb0[26]](_0xefb0[316]);_0xbdb6x24[_0xefb0[269]]()}})}function splitInterval(_0xbdb6x38){var _0xbdb6x54={};var _0xbdb6x3a=_0xbdb6x38[_0xefb0[317]](_0xefb0[50]);var _0xbdb6x55;_0xbdb6x3a[_0xefb0[92]](function(_0xbdb6x56,_0xbdb6x32){switch(_0xbdb6x32){case 0:if(_0xbdb6x56!==_0xefb0[318]){_0xbdb6x55=_0xbdb6x56[_0xefb0[317]](_0xefb0[114]);_0xbdb6x54[_0xefb0[319]]=moment(_0xbdb6x55[0],_0xefb0[320]);_0xbdb6x54[_0xefb0[321]]=moment(_0xbdb6x55[1],_0xefb0[320])}else {_0xbdb6x54[_0xefb0[319]]=null;_0xbdb6x54[_0xefb0[321]]=null};break;case 1:if(_0xbdb6x56!==_0xefb0[318]){_0xbdb6x55=_0xbdb6x56[_0xefb0[317]](_0xefb0[114]);_0xbdb6x54[_0xefb0[322]]=weekDaysCollection[_0xbdb6x55[0]];_0xbdb6x54[_0xefb0[323]]=_0xbdb6x55[1]?weekDaysCollection[_0xbdb6x55[1]]:null}else {_0xbdb6x54[_0xefb0[322]]=null;_0xbdb6x54[_0xefb0[323]]=null};break;case 2:if(_0xbdb6x56!==_0xefb0[318]){_0xbdb6x55=_0xbdb6x56[_0xefb0[317]](_0xefb0[114]);_0xbdb6x54[_0xefb0[324]]=_0xbdb6x55[0];_0xbdb6x54[_0xefb0[325]]=_0xbdb6x55[1]?_0xbdb6x55[1]:null}else {_0xbdb6x54[_0xefb0[324]]=null;_0xbdb6x54[_0xefb0[325]]=null};break;case 3:if(_0xbdb6x56!==_0xefb0[318]){_0xbdb6x55=_0xbdb6x56[_0xefb0[317]](_0xefb0[114]);_0xbdb6x54[_0xefb0[326]]=monthsCollection[_0xbdb6x55[0]];_0xbdb6x54[_0xefb0[327]]=_0xbdb6x55[1]?monthsCollection[_0xbdb6x55[1]]:null}else {_0xbdb6x54[_0xefb0[326]]=null;_0xbdb6x54[_0xefb0[327]]=null};break;default:}});return _0xbdb6x54}function isIntervalValid(_0xbdb6x38){var _0xbdb6x58=moment()[_0xefb0[44]](_0xefb0[320]);var _0xbdb6x59=moment()[_0xefb0[44]](_0xefb0[328]);var _0xbdb6x5a=moment()[_0xefb0[44]](_0xefb0[329]);var _0xbdb6x5b=moment()[_0xefb0[44]](_0xefb0[330]);var _0xbdb6x5c,_0xbdb6x5d,_0xbdb6x5e,_0xbdb6x5f;var _0xbdb6x60=[1,2,3,4,5,6,7,8,9,10,11,12];var _0xbdb6x61=[1,2,3,4,5,6,7];var _0xbdb6x62=[];for(var _0xbdb6x63=1;_0xbdb6x63<=31;_0xbdb6x63++){_0xbdb6x62[_0xefb0[331]](_0xbdb6x63)};_0xbdb6x5c=(_0xbdb6x38[_0xefb0[319]]&&_0xbdb6x38[_0xefb0[321]])?moment(_0xbdb6x58,_0xefb0[320])[_0xefb0[332]](moment(_0xbdb6x38[_0xefb0[319]],_0xefb0[320]),moment(_0xbdb6x38[_0xefb0[321]],_0xefb0[320])):true;if(_0xbdb6x38[_0xefb0[322]]){if(_0xbdb6x38[_0xefb0[323]]){var _0xbdb6x64=_[_0xefb0[166]](_0xbdb6x61,function(_0xbdb6x31){return (_0xbdb6x31>=_0xbdb6x38[_0xefb0[322]])||(_0xbdb6x31<=_0xbdb6x38[_0xefb0[323]])});_0xbdb6x5d=(_0xbdb6x64[_0xefb0[333]](parseInt(_0xbdb6x59))!== -1)?true:false}else {_0xbdb6x5d=(parseInt(_0xbdb6x59)===_0xbdb6x38[_0xefb0[322]])?true:false}}else {_0xbdb6x5d=true};if(_0xbdb6x38[_0xefb0[324]]){if(_0xbdb6x38[_0xefb0[325]]){var _0xbdb6x65=_[_0xefb0[166]](_0xbdb6x62,function(_0xbdb6x31){return (_0xbdb6x31>=_0xbdb6x38[_0xefb0[324]])||(_0xbdb6x31<=_0xbdb6x38[_0xefb0[325]])});_0xbdb6x5e=(_0xbdb6x65[_0xefb0[333]](parseInt(_0xbdb6x5a))!== -1)?true:false}else {_0xbdb6x5e=(parseInt(_0xbdb6x5a)===_0xbdb6x38[_0xefb0[324]])?true:false}}else {_0xbdb6x5e=true};if(_0xbdb6x38[_0xefb0[326]]){if(_0xbdb6x38[_0xefb0[327]]){var _0xbdb6x66=_[_0xefb0[166]](_0xbdb6x60,function(_0xbdb6x31){return (_0xbdb6x31>=_0xbdb6x38[_0xefb0[326]])||(_0xbdb6x31<=_0xbdb6x38[_0xefb0[327]])});_0xbdb6x5f=(_0xbdb6x66[_0xefb0[333]](parseInt(_0xbdb6x5b))!== -1)?true:false}else {_0xbdb6x5f=(parseInt(_0xbdb6x5b)===_0xbdb6x38[_0xefb0[326]])?true:false}}else {_0xbdb6x5f=true};return _0xbdb6x5c&&_0xbdb6x5d&&_0xbdb6x5e&&_0xbdb6x5f}function setVariable(_0xbdb6x24,_0xbdb6x68,_0xbdb6x45,_0xbdb6x26){console[_0xefb0[26]](_0xefb0[334]);console[_0xefb0[26]](_0xefb0[335]+_0xbdb6x68+_0xefb0[336],_0xbdb6x45);_0xbdb6x24[_0xefb0[29]](util[_0xefb0[44]](_0xefb0[158],_0xbdb6x68,_0xbdb6x45),function(_0xbdb6x27,_0xbdb6x28){if(_0xbdb6x26){_0xbdb6x26(_0xbdb6x27,_0xbdb6x28)}})}function getVariableName(_0xbdb6x6a){if(!variables){getVariables(false)};var _0xbdb6x4b={name:_0xefb0[337]};if(_0xbdb6x6a){_0xbdb6x4b=_[_0xefb0[40]](variables,{id:parseInt(_0xbdb6x6a)})};return _0xbdb6x4b[_0xefb0[43]]}function setVariablesMatrix(_0xbdb6x24,_0xbdb6x25,_0xbdb6x26,_0xbdb6x40){var _0xbdb6x30=getVariableName(_0xbdb6x25[_0xefb0[86]]);_[_0xefb0[92]](_0xbdb6x40,function(_0xbdb6x6c,_0xbdb6x32){_[_0xefb0[339]](_0xbdb6x6c,function(_0xbdb6x45,_0xbdb6x46){wait[_0xefb0[91]](setVariable,_0xbdb6x24,_0xbdb6x30+_0xefb0[88]+_0xbdb6x32+_0xefb0[338]+_0xbdb6x46+_0xefb0[89],_0xefb0[90]+_0xbdb6x45+_0xefb0[90])})})}function getVariable(_0xbdb6x24,_0xbdb6x68,_0xbdb6x26){_0xbdb6x24[_0xefb0[343]](_0xbdb6x68,function(_0xbdb6x27,_0xbdb6x28){if(_0xbdb6x28[_0xefb0[156]]===200&&_0xbdb6x28[_0xefb0[106]]!==_0xefb0[111]){_0xbdb6x28[_0xefb0[109]]=_0xbdb6x28[_0xefb0[106]][_0xefb0[261]](_0xbdb6x28[_0xefb0[106]][_0xefb0[341]](_0xefb0[340])+1,_0xbdb6x28[_0xefb0[106]][_0xefb0[341]](_0xefb0[342]))}else {_0xbdb6x28[_0xefb0[109]]=_0xefb0[63]};_0xbdb6x26(null,_0xbdb6x28)})}function getFilePath(_0xbdb6x6a){if(!sounds){getSounds(false)};if(_0xbdb6x6a>0){var _0xbdb6x6f=_[_0xefb0[40]](sounds,{id:parseInt(_0xbdb6x6a)});return util[_0xefb0[44]](_0xefb0[344],config[_0xefb0[345]],_0xbdb6x6f[_0xefb0[346]])};return _0xefb0[63]}function getUsers(_0xbdb6x71){User[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){users=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(User,users,_0xefb0[165])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function getQueues(_0xbdb6x71){VoiceQueue[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){queues=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(VoiceQueue,queues,_0xefb0[43])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function getTrunks(_0xbdb6x71){Trunk[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){trunks=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(Trunk,trunks,_0xefb0[165])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function getVariables(_0xbdb6x71){Variable[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){variables=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(Variable,variables,_0xefb0[165])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function getDbConnections(_0xbdb6x71){SquareOdbc[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){dbConnections=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(SquareOdbc,dbConnections,_0xefb0[165])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function getIntervals(_0xbdb6x71){Interval[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){intervals=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(Interval,intervals,_0xefb0[165])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function getProjects(_0xbdb6x71){SquareProject[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){projects=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(SquareProject,projects,_0xefb0[165])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function getSounds(_0xbdb6x71){Sound[_0xefb0[348]]()[_0xefb0[185]](function(_0xbdb6x2f){sounds=_[_0xefb0[347]](_0xbdb6x2f);if(_0xbdb6x71){synchUpdates(Sound,sounds,_0xefb0[165])}})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}function synchUpdates(_0xbdb6x7a,_0xbdb6x7b,_0xbdb6x46){var _0xbdb6x7c={};_0xbdb6x7a[_0xefb0[349]](function(_0xbdb6x7d){_0xbdb6x7c[_0xbdb6x46]=_0xbdb6x7d[_0xbdb6x46];updateCollection(_0xbdb6x7b,_0xbdb6x7c,_0xbdb6x7d)});_0xbdb6x7a[_0xefb0[350]](function(_0xbdb6x7d){_0xbdb6x7c[_0xbdb6x46]=_0xbdb6x7d[_0xbdb6x46];updateCollection(_0xbdb6x7b,_0xbdb6x7c,_0xbdb6x7d)});_0xbdb6x7a[_0xefb0[352]](function(_0xbdb6x7d){_0xbdb6x7c[_0xbdb6x46]=_0xbdb6x7d[_0xbdb6x46];_[_0xefb0[351]](_0xbdb6x7b,_0xbdb6x7c)})}function updateCollection(_0xbdb6x7b,_0xbdb6x7c,_0xbdb6x7d){var _0xbdb6x7f=_[_0xefb0[40]](_0xbdb6x7b,_0xbdb6x7c);var _0xbdb6x32=_0xbdb6x7b[_0xefb0[333]](_0xbdb6x7f);if(_0xbdb6x7f){_[_0xefb0[353]](_0xbdb6x7b[_0xbdb6x32],_0xbdb6x7d)}else {_0xbdb6x7b[_0xefb0[354]](_0xbdb6x7d)}}function getPort(){Settings[_0xefb0[315]]()[_0xefb0[185]](function(_0xbdb6x2f){agiPort=_0xbdb6x2f[_0xefb0[355]]})[_0xefb0[77]](function(_0xbdb6x27){console[_0xefb0[26]](_0xbdb6x27)})}module[_0xefb0[356]]=function(){console[_0xefb0[26]](_0xefb0[357]);getPort();var _0xbdb6x81=agi[_0xefb0[359]](main)[_0xefb0[358]](agiPort?agiPort:4573);getUsers(true);getQueues(true);getTrunks(true);getVariables(true);getIntervals(true);getProjects(true);getSounds(true);getDbConnections(true)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+
+var agi = require('agi');
+var util = require('util');
+var moment = require('moment');
+var xml = require('xml2js');
+var wait = require('wait.for');
+var sr = require('simple-random');
+var path = require('path');
+var config = require('../config/environment');
+var sh = require('shelljs');
+
+var db = require("odbc")();
+
+var SquareProject = require('../models').SquareProject;
+var Variable = require('../models').Variable;
+var SquareOdbc = require('../models').SquareOdbc;
+var Settings = require('../models').Settings;
+var User = require('../models').User;
+var VoiceQueue = require('../models').VoiceQueue;
+var Trunk = require('../models').Trunk;
+var Interval = require('../models').Interval;
+var Sound = require('../models').Sound;
+var ReportSquare = require('../models').ReportSquare;
+var ReportSquareDetail = require('../models').ReportSquareDetail;
+// var TempTable = require('../models').TempTable;
+// var FakeTable = require('../models').FakeTable;
+var users, trunks, variables, intervals, projects, sounds, queues, dbConnections, generalUniqueId;
+var agiPort;
+var weekDaysCollection = {
+  mon: 1,
+  tue: 2,
+  wed: 3,
+  thu: 4,
+  fri: 5,
+  sat: 6,
+  sun: 7
+};
+var monthsCollection = {
+  jan: 1,
+  feb: 2,
+  mar: 3,
+  apr: 4,
+  may: 5,
+  jun: 6,
+  jul: 7,
+  aug: 8,
+  sep: 9,
+  oct: 10,
+  nov: 11,
+  dec: 12
+};
+var methods = {};
+
+methods.answer = function(context, vertex, callback) {
+  console.log('--ANSWER BLOCK--');
+  console.log('Answering the call...');
+  context.send('ANSWER\n', function(err, res) {
+    callback(err, res);
+  });
+};
+
+methods.custom_app = function(context, vertex, callback) {
+  console.log('--CUSTOM APP BLOCK--');
+  console.log('Executing custom app "' + vertex.application + '"...');
+  context.exec(vertex.application, vertex.options, function(err, res) {
+    if (callback) {
+      callback(err, res);
+    }
+  });
+};
+
+
+methods.dial = function(context, vertex, callback) {
+  console.log('--INTERNAL_DIAL BLOCK--');
+  if (!users) {
+    getUsers(false);
+  }
+  var sip = _.find(users, {
+    id: parseInt(vertex.sip_id)
+  });
+  console.log('Calling ' + util.format('SIP/%s', sip.name) + '...');
+  var parameters = [util.format('SIP/%s', sip.name), vertex.timeout, vertex.opts, vertex.url];
+  context.exec('DIAL', parameters.join(','),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.ext_dial = function(context, vertex, callback) {
+  console.log('--EXTERNAL_DIAL BLOCK--');
+  if (!trunks) {
+    getTrunks(false);
+  }
+  var trunk = _.find(trunks, {
+    id: parseInt(vertex.trunk_id)
+  });
+  console.log('Calling ' + util.format('SIP/%s', trunk.name) + '...');
+  var parameters = [util.format('SIP/%s@%s', vertex.phone, trunk.name), vertex.timeout, vertex.opts, vertex.url];
+  context.exec('DIAL', parameters.join(','),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.queue = function(context, vertex, callback) {
+  console.log('--QUEUE BLOCK--');
+  if (!queues) {
+    getQueues(false);
+  }
+  var queue = _.find(queues, {
+    name: vertex.queue_id
+  });
+  var announceOverride = getFilePath(vertex.file_id);
+  var parameters = [queue.name, vertex.opts, vertex.url, announceOverride, vertex.timeout, vertex.agi, vertex.macro, vertex.gosub, '', vertex.position];
+  console.log('Joining ' + queue.name + ' queue...');
+  context.exec('QUEUE', parameters.join(','), function(err, res) {
+    callback(err, res);
+  });
+};
+
+methods.voicemail = function(context, vertex, callback) {
+  console.log('--VOICEMAIL BLOCK--');
+  var parameters = [vertex.mailbox, vertex.opts];
+  var squareDetail = {
+    uniqueid: context.uniqueid,
+    node: vertex.label,
+    application: vertex.tag,
+    data: parameters.join(',') || null
+  }
+  ReportSquareDetail
+    .create(squareDetail)
+    .catch(function(err) {
+      console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err);
+    });
+  console.log('Starting voicemail recording...');
+  context.exec('VOICEMAIL', parameters.join(','), function(err, res) {
+    callback(err, res);
+  });
+};
+
+// methods.callback = function(context, vertex, callback) {
+//   context.send('ANSWER\n', function(err, res) {
+//     callback(err, res);
+//   });
+// };
+
+methods.math = function(context, vertex, callback) {
+  console.log('--MATH BLOCK--');
+  console.log('Calculating expression...');
+  var result = eval(vertex.operation);
+  console.log('Saving result in variable...');
+  var varName = getVariableName(vertex.variable_id);
+  if (_.isArray(result)) {
+    result.forEach(function(elem, index) {
+      wait.for(setVariable, context, varName + '[' + index + ']', '"' + elem + '"');
+    });
+  } else {
+    wait.for(setVariable, context, varName, '"' + result + '"');
+  }
+}
+
+// methods.background = function(context, vertex, callback) {
+//   var parameters = [getFilePath(vertex.file_id), vertex.opts];
+//   context.exec('BACKGROUND', parameters.join('|'), function(err, res) {
+//     callback(err, res);
+//   });
+// };
+
+methods.playback = function(context, vertex, callback) {
+  console.log('--PLAYBACK BLOCK--');
+  var audiofile = getFilePath(vertex.file_id);
+  // var audiofile = '/var/www/html/files/sounds/d0269ff87187df665ece75538e4cddfd';
+  var parameters = [audiofile, vertex.opts];
+  console.log('Executing playback...');
+  context.exec('PLAYBACK', parameters.join(','), function(err, res) {
+    callback(err, res);
+  });
+};
+
+methods.menu = function(context, vertex, callback) {
+  console.log('--MENU BLOCK--');
+  var res = {};
+  console.log('There are ' + vertex.retry + ' retries');
+  if (vertex.retry > 0) {
+    vertex.retry--;
+    var announce = getFilePath(vertex.file_id);
+    // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415';
+    // console.log(announce);
+    console.log('Announcing and waiting for user entry...');
+    context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.digit),
+      function(err, res) {
+        var squareDetail = {
+          uniqueid: context.uniqueid,
+          node: vertex.label,
+          application: vertex.tag,
+          data: res.result || null
+        }
+        ReportSquareDetail
+          .create(squareDetail)
+          .catch(function(err) {
+            console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err);
+          });
+        if (res.result !== ' (timeout)') {
+          if (vertex.variable_id) {
+            console.log('Saving user entry in a variable...');
+            var varName = getVariableName(vertex.variable_id);
+            setVariable(context, varName, '"' + res.result + '"', function() {
+              res.data = res.result;
+              callback(null, res);
+            });
+          }
+
+        } else {
+          console.log('Menu timeout!');
+          res = {
+            code: 200,
+            result: '0',
+            data: 't'
+          };
+          callback(null, res);
+        }
+      });
+
+  } else {
+    console.log('Run out of retries!');
+    res = {
+      code: 200,
+      result: '0',
+      data: '-'
+    };
+    callback(null, res);
+  }
+};
+
+methods.saynumber = function(context, vertex, callback) {
+  console.log('--SAYNUMBER BLOCK--');
+  console.log('Saying number...');
+  context.send(util.format('SAY NUMBER %s "%s"\n', vertex.number, vertex.escape_digits),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.sayphonetic = function(context, vertex, callback) {
+  console.log('--SAYPHONETIC BLOCK--');
+  console.log('Saying phonetic...');
+  context.send(util.format('SAY PHONETIC %s "%s"\n', vertex.text, vertex.escape_digits),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.tts = function(context, vertex, callback) {
+  console.log('--GOOGLE_TTS BLOCK--');
+  var parameters = [path.join(config.root, 'server/config/agi_scripts', 'googletts.agi'), encodeURIComponent(vertex.text), vertex.google_tts_language];
+  // var parameters = ['/var/www/html/agisquare/agiscripts/googletts.agi', encodeURIComponent(vertex.text), vertex.google_tts_language];
+  console.log('Calling Google TTS API...');
+  context.exec('AGI', parameters.join(','),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.ispeechtts = function(context, vertex, callback) {
+  console.log('--ISPEECH_TTS BLOCK--');
+  // var parameters = [path.join(config.root, 'server/config/agi_scripts', 'ispeech-tts.agi'), encodeURIComponent(vertex.text), vertex.ispeech_tts_language, '', '', vertex.key];
+  var parameters = ['/var/www/html/agisquare/agiscripts/ispeech-tts.agi', encodeURIComponent(vertex.text), vertex.ispeech_tts_language, '', '', vertex.key];
+  console.log('Calling iSpeech TTS API...');
+  context.exec('AGI', parameters.join(','),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.getdigits = function(context, vertex, callback) {
+  console.log('--GETDIGITS BLOCK--');
+  var res = {};
+  console.log('There are ' + vertex.retry + ' retries');
+  if (vertex.retry > 0) {
+    vertex.retry--;
+    var announce = getFilePath(vertex.file_id);
+    // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415';
+    console.log('Announcing and waiting for user entry...');
+    context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.maxdigit),
+      function(err, res) {
+        var squareDetail = {
+          uniqueid: context.uniqueid,
+          node: vertex.label,
+          application: vertex.tag,
+          data: res.result || null
+        }
+        ReportSquareDetail
+          .create(squareDetail)
+          .catch(function(err) {
+            console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err);
+          });
+        if (res.result && res.result.length >= parseInt(vertex.mindigit)) {
+          if (res.result !== '-1') {
+            console.log('There is a result, is over the minimum length and not due to an hangup!');
+            if (vertex.variable_id) {
+              console.log('Saving user entry in a variable...');
+              var varName = getVariableName(vertex.variable_id);
+              setVariable(context, varName, '"' + res.result + '"', function() {
+                res = {
+                  code: 200,
+                  result: '0',
+                  data: 'x'
+                };
+                callback(null, res);
+              });
+            }
+          } else {
+            console.log('Channel hangup!');
+            res = {
+              code: 500,
+              result: '-1'
+            };
+            callback(null, res);
+          }
+        } else {
+          console.log('No entry or not long enough!');
+          res = {
+            code: 200,
+            result: '0',
+            data: 'i'
+          };
+          callback(null, res);
+        }
+      });
+  } else {
+    console.log('Run out of retries!');
+    res = {
+      code: 500,
+      result: '-1'
+    };
+    callback(null, res);
+  }
+};
+
+methods.record = function(context, vertex, callback) {
+  console.log('--RECORD BLOCK--');
+  var saveName = sr();
+  // FakeTable
+  //   .create({
+  //     name: vertex.name,
+  //     filename: saveName
+  //   })
+  //   .then(function() {
+  console.log('Starting call recording...');
+  context.send(util.format('RECORD FILE %s wav "%s" %s %s %s %s\n', path.join(config.root, 'server/files/recordings', saveName), vertex.escape_digits, vertex.timeout, null, true, null), function(
+    err, res) {
+    if (res.code === 200 && res.result !== '-1') {
+      console.log('Saving recording filename in RECORDING_SAVENAME variable...');
+      context.send(util.format('SET VARIABLE %s %s\n', 'RECORDING_SAVENAME', saveName), function(err, res) {
+        callback(err, res);
+      });
+    } else {
+      callback(err, res);
+    }
+  });
+  // })
+  // .catch(function(err) {
+  //   console.log(err);
+  // });
+};
+
+methods.gotoiftime = function(context, vertex, callback) { //single or multiple intervals
+  console.log('--GOTOIFTIME BLOCK--');
+  var res;
+  var valid = 'false';
+  var gotoIntervals;
+  if (!intervals) {
+    getIntervals(false);
+  }
+  var interval = _.find(intervals, {
+    id: parseInt(vertex.interval_id)
+  });
+  if (!interval.IntervalId) {
+    gotoIntervals = _.filter(intervals, {
+      IntervalId: parseInt(interval.id)
+    });
+  }
+  if (gotoIntervals) {
+    console.log('Is a group of intervals!');
+    if (gotoIntervals.length) {
+      console.log('There are ' + gotoIntervals.length + ' intervals!');
+      var subInterval;
+      console.log('Checking if at least one interval is valid...');
+      gotoIntervals.forEach(function(elem, index) {
+        subInterval = splitInterval(elem.interval);
+        if (isIntervalValid(subInterval)) {
+          console.log('Interval ' + index + ' is valid!');
+          valid = 'true';
+        }
+      });
+    } else {
+      console.log('There are no sub intervals, so it will be always true!');
+      valid = 'true';
+    }
+  } else {
+    console.log('Is a single interval!');
+    var splittedInterval = splitInterval(interval.interval);
+    if (isIntervalValid(splittedInterval)) {
+      console.log('The interval is valid!');
+      valid = 'true';
+    }
+  }
+  console.log('The final result for the intervals is "' + valid + '"!');
+  res = {
+    code: 200,
+    result: '0',
+    data: valid
+  };
+  callback(null, res);
+};
+
+methods.vswitch = function(context, vertex, callback) {
+  console.log('--VARIABLE_SWITCH BLOCK--');
+  console.log('Getting the variable value and searching the right exit...');
+  var varName = getVariableName(vertex.variable_id);
+  getVariable(context, varName, function(err, res) {
+    if (!res.data) {
+      res.data = '-';
+    }
+    callback(null, res);
+  });
+
+};
+
+methods.goal = function(context, vertex, callback) {
+  var squareDetail = {
+    uniqueid: context.uniqueid,
+    node: vertex.label,
+    application: vertex.tag,
+    data: vertex.goalname || null
+  }
+  ReportSquareDetail
+    .create(squareDetail)
+    .then(function(res) {
+      res = {
+        code: 200,
+        result: '1'
+      };
+      callback(null, res);
+    })
+    .catch(function(err) {
+      console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err);
+      var res = {
+        code: 200,
+        result: '1'
+      };
+      callback(err, res);
+    });
+};
+
+methods.system = function(context, vertex, callback) {
+  console.log('--SYSTEM BLOCK--');
+  var squareDetail = {
+    uniqueid: context.uniqueid,
+    node: vertex.label,
+    application: vertex.tag,
+    data: _.trim(vertex.command) || null
+  }
+  ReportSquareDetail
+    .create(squareDetail)
+    .catch(function(err) {
+      console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err);
+    });
+  console.log('Executing the system command...');
+  sh.exec(_.trim(vertex.command), function(code, output) {
+    var formattedOutput = output.replace(/(\r\n|\n|\r)/gm, "");
+    console.log('Program output:', formattedOutput);
+    console.log('Saving the output in a variable...');
+    var varName = getVariableName(vertex.variable_id);
+    setVariable(context, varName, '"' + formattedOutput + '"', callback);
+  });
+};
+
+methods.agi = function(context, vertex, callback) {
+  console.log('--AGI BLOCK--');
+  console.log('Executing the AGI command...');
+  context.exec('AGI', vertex.command, vertex.args,
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.subproject = function(context, vertex, callback) {
+  console.log('--SUBPROJECT BLOCK--');
+  if (!projects) {
+    getProjects(false);
+  }
+  var project = _.find(projects, {
+    id: parseInt(vertex.project_id)
+  });
+  console.log('Moving to project ""' + project.name + '"...');
+  context.exec('AGI', util.format('agi://192.168.2.147/square,%s', project.name),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.ispeechasr = function(context, vertex, callback) {
+  console.log('--ISPEECH_ASR BLOCK--');
+  // var parameters = ['/var/www/html/agisquare/agiscripts/ispeech-asr.agi', vertex.ispeech_asr_language, '', (vertex.model === '0' ? '' : vertex.model), '1', '#', '', vertex.key];
+  var parameters = [path.join(config.root, 'server/config/agi_scripts', 'ispeech-asr.agi'), vertex.ispeech_asr_language, '', (vertex.model === '0' ? '' : vertex.model), '1', '#', '', vertex.key];
+  console.log('Calling Google ASR API...');
+  context.exec('AGI', parameters.join(','),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.database = function(context, vertex, callback) {
+  console.log('--DATABASE BLOCK--');
+  if (!dbConnections) {
+    getDbConnections(false);
+  }
+  var connection = _.find(dbConnections, {
+    id: parseInt(vertex.odbc_id)
+  });
+  console.log('Trying to get ODBC connection...');
+  var squareDetail = {
+    uniqueid: context.uniqueid,
+    node: vertex.label,
+    application: vertex.tag,
+    data: vertex.query || null
+  }
+  ReportSquareDetail
+    .create(squareDetail)
+    .catch(function(err) {
+      console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err);
+    });
+  try {
+    db.openSync(connection.dsn);
+    var data = db.querySync(vertex.query);
+    db.closeSync();
+    setVariablesMatrix(context, vertex, callback, data);
+  } catch (e) {
+    console.log(e.message);
+    wait.for(setVariable, context, 'ERROR', 'true');
+    wait.for(setVariable, context, 'MESSAGE', '"' + e.message + '"');
+  }
+};
+
+methods.gotoc = function(context, vertex, callback) {
+  console.log('--GOTO BLOCK--');
+  console.log('Going to extension ' + vertex.extension + ' ...');
+  context.exec('DIAL', util.format('Local/%s@%s', vertex.extension, vertex.context),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.gotoif = function(context, vertex, callback) {
+  console.log('--GOTOIF BLOCK--');
+  var res = {
+    code: 200,
+    result: '0'
+  };
+  console.log('Evaluating condition...');
+  res.data = String(eval(vertex.condition) ? 'true' : 'false');
+  console.log('The result is ' + res.data);
+  callback(null, res);
+};
+
+methods.hangup = function(context, vertex, callback) {
+  console.log('--HANGUP BLOCK--');
+  console.log('Hangin up the call...');
+  context.hangup();
+};
+
+methods.noop = function(context, vertex, callback) {
+  console.log('--NOOP BLOCK--');
+  var output = (vertex.output) ? '\"' + vertex.output + '\"' : '\"' +
+    vertex.label + '\"';
+  console.log('NOOP value is ' + output);
+  context.exec('NOOP', output,
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.saydigits = function(context, vertex, callback) {
+  console.log('--SAYDIGITS BLOCK--');
+  console.log('Saying digits...');
+  context.send(util.format('SAY DIGITS %s "%s"\n', vertex.digits, vertex.escape_digits),
+    function(err, res) {
+      callback(err, res);
+    });
+};
+
+methods.set = function(context, vertex, callback) {
+  console.log('--SET BLOCK--');
+  console.log('Saving value in a variable...');
+  var varName = getVariableName(vertex.variable_id);
+  wait.for(setVariable, context, varName, '"' + vertex.variable_value + '"');
+};
+
+function getVertices(root) {
+  return _.reduce(root, function(result, edge, tag) {
+
+    if (tag === 'mxcell') {
+      return result;
+    }
+
+    if (_.isArray(edge)) {
+      _.forIn(edge, function(value, key) {
+        result[value.$.id] = value.$;
+        result[value.$.id].tag = tag;
+      });
+      return result;
+    }
+
+    result[edge.$.id] = edge.$;
+    result[edge.$.id].tag = tag;
+    return result;
+
+  }, {});
+}
+
+function getTargetBySource(root, source, value) {
+  return _.result(_.find(root.mxcell, function(edge) {
+    if (edge.$.edge && edge.$.source) {
+      if (edge.$.source === source) {
+        if (edge.$.value && edge.$.value !== value) {
+          return false;
+        }
+        return true;
+      }
+    }
+    return false;
+  }), '$.target');
+}
+
+function replaceAllVariables(context, vertex, callback) {
+  var obj = vertex;
+  for (var key in obj) {
+    var res = obj[key].match(/{+(.*?)}/gi);
+    if (res) {
+      console.log('res', res);
+      res.forEach(function(variable, index) {
+        console.log('variable', res[index].substring(1, res[index].length - 1));
+        var value = wait.for(getVariable, context, res[index].substring(1, res[index].length - 1));
+        console.log('value', value);
+        if (value.data) {
+          obj[key] = obj[key].replace(res[index], value.data);
+          // console.log('Replace', res[index], string);
+        }
+      })
+    }
+  }
+  obj.replaced = true;
+  return obj;
+}
+
+function xstart(context) {
+  var root = context.root;
+  var vertices = context.vertices;
+
+  if (root.start) {
+    if (!_.isArray(root.start)) {
+      var source = root.start.$.id;
+      var res = {};
+      do {
+        try {
+          var vertex = vertices[source].replaced ? vertices[source] : replaceAllVariables(context, vertices[source]);
+          if (vertex) {
+            if (_.isFunction(methods[vertex.tag])) {
+              res = wait.for(methods[vertex.tag], context, vertex);
+            } else {
+              res = wait.for(methods.noop, context, vertex);
+            }
+            if (res.code === 200 && res.result !== '-1') {
+              var target = getTargetBySource(root, source, res.data);
+              if (!target) {
+                if (vertex.tag === 'menu') {
+                  if (vertex.retry > 0) {
+                    target = getTargetBySource(root, source, 'i');
+                    if (!target) {
+                      target = source;
+                    }
+                  }
+                }
+                if (vertex.tag === 'getdigits' && vertex.retry > 0) {
+                  target = source;
+                }
+                if (vertex.tag === 'vswitch') {
+                  target = getTargetBySource(root, source, '-');
+                  if (!target) {
+                    target = source;
+                  }
+                }
+              }
+              source = target;
+            } else {
+              source = null;
+            }
+          } else {
+            source = null;
+          }
+        } catch (err) {
+          console.log(err);
+        }
+      }
+      while (source);
+      console.log('No target found, hangup!');
+      context.hangup();
+    }
+  }
+}
+
+
+function xfinally(context) {
+  var root = context.root;
+  var vertices = context.vertices;
+
+  if (root.finally) {
+    if (!_.isArray(root.finally)) {
+      var source = root.finally.$.id;
+      var res = {};
+      do {
+        try {
+          var vertex = replaceAllVariables(context, vertices[source]);
+          if (vertex) {
+            if (_.isFunction(methods[vertex.tag])) {
+              res = wait.for(methods[vertex.tag], context, vertex);
+            } else {
+              res = wait.for(methods.noop, context, vertex);
+            }
+            if (res.code === 200 && res.result !== '-1') {
+              var target = getTargetBySource(root, source, res.data);
+              if (!target) {
+                if (vertex.tag === 'menu') {
+                  if (vertex.retry > 0) {
+                    target = getTargetBySource(root, source, 'i');
+                    if (!target) {
+                      target = source;
+                    }
+                  }
+                }
+                if (vertex.tag === 'getdigits' && vertex.retry > 0) {
+                  target = source;
+                }
+              }
+              source = target;
+            } else {
+              source = null;
+            }
+          } else {
+            source = null;
+          }
+        } catch (err) {
+          console.log(err);
+        }
+      } while (source);
+      context.hangup();
+      console.log('No target found, stopping "Finally" branch!');
+    }
+  }
+  context.end();
+}
+
+
+function main(context) {
+
+  context.on('error', function(err) {
+    console.log('//Error:', err);
+  });
+
+  context.on('close', function() {
+    console.log('//Context close');
+  });
+
+  context.on('hangup', function() {
+    if (context.finally) {
+      context.finally = false;
+      console.log('//Starting "Finally" branch!');
+      wait.launchFiber(xfinally, context);
+    } else {
+      ReportSquare.update({
+          leaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
+        }, {
+          where: {
+            uniqueid: context.uniqueid
+          }
+        })
+        .catch(function(err) {
+          console.log('Error saving exit time from IVR', err);
+        });
+      console.log('//Context Hangup');
+    }
+  });
+
+  context.on('response', function(res) {
+    //console.log('Response:', res);
+  });
+
+  context.on('variables', function(vars) {
+    console.log(vars);
+    console.log('Received new call from: ' + vars.agi_callerid +
+      ' with uniqueid: ' + vars.agi_uniqueid);
+    var squareLog = {
+      network: vars.agi_network,
+      network_script: vars.agi_network_script,
+      request: vars.agi_request,
+      channel: vars.agi_channel,
+      language: vars.agi_language,
+      type: vars.agi_type,
+      uniqueid: vars.agi_uniqueid,
+      version: vars.agi_version,
+      callerid: vars.agi_callerid,
+      calleridname: vars.agi_calleridname,
+      callingpres: vars.agi_callingpres,
+      callingani2: vars.agi_callingani2,
+      callington: vars.agi_callington,
+      callingtns: vars.agi_callingtns,
+      dnid: vars.agi_dnid,
+      rdnis: vars.agi_rdnis,
+      context: vars.agi_context,
+      extension: vars.agi_extension,
+      priority: vars.agi_priority,
+      enhanced: vars.agi_enhanced,
+      accountcode: vars.agi_accountcode,
+      threadid: vars.agi_threadid,
+      project_name: vars.agi_arg_1,
+      joinAt: moment().format("YYYY-MM-DD HH:mm:ss")
+    };
+
+    ReportSquare
+      .create(squareLog)
+      .catch(function(err) {
+        console.log('Error saving enter time for IVR', err);
+      });
+
+    if (vars.agi_arg_1) {
+      SquareProject
+        .findOne({
+          where: {
+            name: vars.agi_arg_1
+          },
+          attributes: ['id', 'production']
+        })
+        .then(function(project) {
+          if (project) {
+            if (project.production) {
+              xml.parseString(project.production, {
+                normalizeTags: true,
+                explicitArray: false
+              }, function(err, result) {
+                var root = result.mxgraphmodel.root;
+                if (root) {
+                  context.root = root;
+                  context.finally = true;
+                  context.uniqueid = vars.agi_uniqueid;
+                  context.vertices = getVertices(root);
+                  wait.launchFiber(xstart, context);
+                } else {
+                  console.log('No root in project!');
+                  context.end();
+                }
+              });
+            } else {
+              console.log('No project published!');
+              context.end();
+            }
+          } else {
+            console.log('No project found!');
+            context.end();
+          }
+        })
+        .catch(function(err) {
+          console.log('Error:', err);
+          context.end();
+        });
+    } else {
+      console.log('No project argument!');
+      context.end();
+    }
+  });
+}
+
+function splitInterval(interval) {
+  var finalInterval = {};
+  var splittedInterval = interval.split(',');
+  var intValues;
+  splittedInterval.forEach(function(element, index) {
+    switch (index) {
+      case 0:
+        if (element !== '*') {
+          intValues = element.split('-');
+          finalInterval.t_from = moment(intValues[0], 'HH:mm');
+          finalInterval.t_to = moment(intValues[1], 'HH:mm');
+        } else {
+          finalInterval.t_from = null;
+          finalInterval.t_to = null;
+        }
+        break;
+      case 1:
+        if (element !== '*') {
+          intValues = element.split('-');
+          finalInterval.wd_from = weekDaysCollection[intValues[0]];
+          finalInterval.wd_to = intValues[1] ? weekDaysCollection[intValues[1]] : null;
+        } else {
+          finalInterval.wd_from = null;
+          finalInterval.wd_to = null;
+        }
+        break;
+      case 2:
+        if (element !== '*') {
+          intValues = element.split('-');
+          finalInterval.md_from = intValues[0];
+          finalInterval.md_to = intValues[1] ? intValues[1] : null;
+        } else {
+          finalInterval.md_from = null;
+          finalInterval.md_to = null;
+        }
+        break;
+      case 3:
+        if (element !== '*') {
+          intValues = element.split('-');
+          finalInterval.m_from = monthsCollection[intValues[0]];
+          finalInterval.m_to = intValues[1] ? monthsCollection[intValues[1]] : null;
+        } else {
+          finalInterval.m_from = null;
+          finalInterval.m_to = null;
+        }
+        break;
+      default:
+
+    }
+
+
+  });
+  return finalInterval;
+}
+
+function isIntervalValid(interval) {
+  var hour = moment().format("HH:mm");
+  var day = moment().format("E");
+  var monthDay = moment().format("D");
+  var month = moment().format("M");
+  var tValid, wdValid, mdValid, mValid;
+  var monthsNumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
+  var weekDaysNumbers = [1, 2, 3, 4, 5, 6, 7];
+  var daysOfMonthsNumbers = [];
+  for (var i = 1; i <= 31; i++) {
+    daysOfMonthsNumbers.push(i);
+  }
+  tValid = (interval.t_from && interval.t_to) ? moment(hour, "HH:mm").isBetween(moment(interval.t_from, "HH:mm"), moment(interval.t_to, "HH:mm")) : true;
+  if (interval.wd_from) {
+    if (interval.wd_to) {
+      var validWeekdays = _.filter(weekDaysNumbers, function(elem) {
+        return (elem >= interval.wd_from) || (elem <= interval.wd_to);
+      });
+      wdValid = (validWeekdays.indexOf(parseInt(day)) !== -1) ? true : false;
+    } else {
+      wdValid = (parseInt(day) === interval.wd_from) ? true : false;
+    }
+  } else {
+    wdValid = true;
+  }
+  if (interval.md_from) {
+    if (interval.md_to) {
+      var validMonthsdays = _.filter(daysOfMonthsNumbers, function(elem) {
+        return (elem >= interval.md_from) || (elem <= interval.md_to);
+      });
+      mdValid = (validMonthsdays.indexOf(parseInt(monthDay)) !== -1) ? true : false;
+    } else {
+      mdValid = (parseInt(monthDay) === interval.md_from) ? true : false;
+    }
+  } else {
+    mdValid = true;
+  }
+  if (interval.m_from) {
+    if (interval.m_to) {
+      var validMonths = _.filter(monthsNumbers, function(elem) {
+        return (elem >= interval.m_from) || (elem <= interval.m_to);
+      });
+      mValid = (validMonths.indexOf(parseInt(month)) !== -1) ? true : false;
+    } else {
+      mValid = (parseInt(month) === interval.m_from) ? true : false;
+    }
+  } else {
+    mValid = true;
+  }
+
+  return tValid && wdValid && mdValid && mValid;
+
+}
+
+function setVariable(context, name, value, callback) {
+  console.log('Setting variable...');
+  console.log('Sending set variable,variable is ' + name + ', value is ', value);
+  context.send(util.format('SET VARIABLE %s %s\n', name, value), function(err, res) {
+    if (callback) {
+      callback(err, res);
+    }
+  });
+}
+
+function getVariableName(id) {
+  if (!variables) {
+    getVariables(false);
+  }
+  var variable = {
+    name: 'placeholder' //if for any reason i don't receive both the name and the id of the variable, the value will be saved in a placeholder variable
+  };
+  if (id) {
+    variable = _.find(variables, {
+      id: parseInt(id)
+    });
+  }
+  return variable.name;
+}
+
+function setVariablesMatrix(context, vertex, callback, data) {
+  var varName = getVariableName(vertex.variable_id);
+  _.forEach(data, function(row, index) {
+    _.forOwn(row, function(value, key) {
+      wait.for(setVariable, context, varName + '[' + index + '][' + key + ']', '"' + value + '"');
+    });
+  });
+}
+
+function getVariable(context, name, callback) {
+  context.getVariable(name, function(err, res) {
+    if (res.code === 200 && res.result !== '0') {
+      res.data = res.result.substring(res.result.lastIndexOf("(") + 1,
+        res.result.lastIndexOf(")"));
+    } else {
+      res.data = '';
+    }
+    callback(null, res);
+  })
+}
+
+function getFilePath(id) {
+  if (!sounds) {
+    getSounds(false);
+  }
+  if (id > 0) {
+    var file = _.find(sounds, {
+      id: parseInt(id)
+    });
+    return util.format('%s/%s', config.convertedSounds, file.save_name);
+  }
+  return '';
+}
+
+function getUsers(synch) {
+  User
+    .findAll()
+    .then(function(result) {
+      users = _.clone(result);
+      if (synch) {
+        synchUpdates(User, users, 'id');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getQueues(synch) {
+  VoiceQueue
+    .findAll()
+    .then(function(result) {
+      queues = _.clone(result);
+      if (synch) {
+        synchUpdates(VoiceQueue, queues, 'name');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getTrunks(synch) {
+  Trunk
+    .findAll()
+    .then(function(result) {
+      trunks = _.clone(result);
+      if (synch) {
+        synchUpdates(Trunk, trunks, 'id');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getVariables(synch) {
+  Variable
+    .findAll()
+    .then(function(result) {
+      variables = _.clone(result);
+      if (synch) {
+        synchUpdates(Variable, variables, 'id');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getDbConnections(synch) {
+  SquareOdbc
+    .findAll()
+    .then(function(result) {
+      dbConnections = _.clone(result);
+      if (synch) {
+        synchUpdates(SquareOdbc, dbConnections, 'id');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getIntervals(synch) {
+  Interval
+    .findAll()
+    .then(function(result) {
+      intervals = _.clone(result);
+      if (synch) {
+        synchUpdates(Interval, intervals, 'id');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getProjects(synch) {
+  SquareProject
+    .findAll()
+    .then(function(result) {
+      projects = _.clone(result);
+      if (synch) {
+        synchUpdates(SquareProject, projects, 'id');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getSounds(synch) {
+  Sound
+    .findAll()
+    .then(function(result) {
+      sounds = _.clone(result);
+      if (synch) {
+        synchUpdates(Sound, sounds, 'id');
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function synchUpdates(Model, collection, key) {
+  var condition = {};
+  Model.afterCreate(function(doc) {
+    condition[key] = doc[key];
+    updateCollection(collection, condition, doc);
+  });
+  Model.afterUpdate(function(doc) {
+    condition[key] = doc[key];
+    updateCollection(collection, condition, doc);
+  });
+  Model.afterDestroy(function(doc) {
+    condition[key] = doc[key];
+    _.remove(collection, condition);
+  });
+}
+
+function updateCollection(collection, condition, doc) {
+  var oldItem = _.find(collection, condition);
+  var index = collection.indexOf(oldItem);
+  if (oldItem) {
+    _.merge(collection[index], doc);
+  } else {
+    collection.unshift(doc);
+  }
+}
+
+function getPort() {
+  Settings
+    .findOne()
+    .then(function(result) {
+      agiPort = result.agi_port;
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+module.exports = function() {
+  console.log('Starting Cally Square AGI...');
+  getPort();
+  var server = agi.createServer(main).listen(agiPort ? agiPort : 4573);
+  getUsers(true);
+  getQueues(true);
+  getTrunks(true);
+  getVariables(true);
+  getIntervals(true);
+  getProjects(true);
+  getSounds(true);
+  getDbConnections(true);
+};
index e88d39c..99ebb83 100644 (file)
@@ -1 +1,574 @@
-var _0xcab1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6C\x6C","\x65\x6E\x74\x65\x72\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x75\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\x6E\x61\x6D\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x41\x6C\x72\x65\x61\x64\x79\x20\x50\x61\x75\x73\x65\x20\x4F\x66\x66","\x66\x69\x6E\x64\x4F\x6E\x65","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x4C\x4F\x47\x49\x4E","\x51\x75\x65\x75\x65\x41\x64\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x51\x75\x65\x75\x65\x52\x65\x6D\x6F\x76\x65","\x69\x64","\x53\x49\x50\x2F\x25\x73","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x71\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x71\x75\x65\x75\x65","\x64\x65\x73\x74\x72\x6F\x79","\x71\x75\x65\x75\x65\x49\x64","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x6C\x6F\x67\x69\x6E","\x6C\x6F\x67\x6F\x75\x74","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xcab1[0];var moment=require(_0xcab1[1]);var util=require(_0xcab1[2]);var Promise=require(_0xcab1[3]);var Sequelize=require(_0xcab1[5])[_0xcab1[4]];var ReportMember=require(_0xcab1[5])[_0xcab1[6]];var _Action=require(_0xcab1[5])[_0xcab1[7]];var Agent=require(_0xcab1[5])[_0xcab1[8]];var UserHasVoiceQueue=require(_0xcab1[5])[_0xcab1[9]];var UserHasChatQueue=require(_0xcab1[5])[_0xcab1[10]];var UserHasMailQueue=require(_0xcab1[5])[_0xcab1[11]];var UserHasFaxQueue=require(_0xcab1[5])[_0xcab1[12]];function Action(_0x5054xd){console[_0xcab1[14]](_0xcab1[13]);var _0x5054xe=[_0xcab1[15],_0xcab1[16],_0xcab1[17],_0xcab1[18]];_Action[_0xcab1[19]](function(_0x5054xf,_0x5054x10){return _0x5054x2d(_0x5054xf,_0x5054x10,_0x5054xd)});ReportMember[_0xcab1[34]](function(_0x5054xf,_0x5054x10){return ReportMember[_0xcab1[33]]({where:{channel:_0x5054xf[_0xcab1[30]],membername:_0x5054xf[_0xcab1[31]],interface:_0x5054xf[_0xcab1[32]],exitAt:null}})[_0xcab1[29]](function(_0x5054x11){var _0x5054x12=[];var _0x5054x13=moment();_0x5054x11[_0xcab1[28]](function(_0x5054x14){var _0x5054x15=moment(_0x5054x14[_0xcab1[21]]);_0x5054x12[_0xcab1[27]](_0x5054x14[_0xcab1[26]]({exitAt:_0x5054x13[_0xcab1[23]](_0xcab1[22]),duration:_0x5054x13[_0xcab1[25]](_0x5054x15,_0xcab1[24])}))});return _0x5054x12})[_0xcab1[20]]()});function _0x5054x16(_0x5054x10,_0x5054x17){return function(_0x5054x18){return Promise[_0xcab1[48]](_0x5054xd[_0xcab1[47]])({action:_0xcab1[46],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),paused:true,reason:_0x5054x10[_0xcab1[39]][_0xcab1[38]]})[_0xcab1[29]](function(_0x5054x1b){return _0x5054x18[_0xcab1[26]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,pauseType:_0x5054x10[_0xcab1[39]][_0xcab1[38]],lastPauseAt:moment()[_0xcab1[23]](_0xcab1[22])},{transaction:_0x5054x10[_0xcab1[44]]||null})})[_0xcab1[29]](function(_0x5054x18){var _0x5054x19=[];_0x5054xe[_0xcab1[28]](function(_0x5054x1a){_0x5054x19[_0xcab1[27]]({channel:_0x5054x1a,membername:_0x5054x18[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),type:_0x5054x10[_0xcab1[39]][_0xcab1[38]],enterAt:moment()[_0xcab1[23]](_0xcab1[22]),data1:_0x5054x17[_0xcab1[40]],data2:_0x5054x17[_0xcab1[41]],data3:_0x5054x17[_0xcab1[42]],data4:_0x5054x17[_0xcab1[43]]})});return ReportMember[_0xcab1[45]](_0x5054x19,{individualHooks:true,transaction:_0x5054x10[_0xcab1[44]]||null})})}}function _0x5054x1c(_0x5054x10,_0x5054x17){return function(_0x5054x18){if(!_0x5054x10[_0xcab1[39]]){_0x5054x10[_0xcab1[39]]={}};switch(_0x5054x10[_0xcab1[39]][_0xcab1[30]]){case _0xcab1[15]:return Promise[_0xcab1[48]](_0x5054xd[_0xcab1[47]])({action:_0xcab1[46],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),paused:false,reason:_0x5054x10[_0xcab1[39]][_0xcab1[38]]})[_0xcab1[29]](function(){return _0x5054x18[_0xcab1[26]]({voicePause:false},{transaction:_0x5054x10[_0xcab1[44]]||null})})[_0xcab1[29]](function(_0x5054x18){var _0x5054x13=moment();return ReportMember[_0xcab1[50]]({where:{channel:_0x5054x10[_0xcab1[39]][_0xcab1[30]],membername:_0x5054x18[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),exitAt:null}})})[_0xcab1[29]](_0x5054x2a({message:_0xcab1[49]}))[_0xcab1[29]](function(_0x5054x1d){var _0x5054x13=moment();var _0x5054x15=moment(_0x5054x1d[_0xcab1[21]]);return _0x5054x1d[_0xcab1[26]]({exitAt:_0x5054x13[_0xcab1[23]](_0xcab1[22]),duration:_0x5054x13[_0xcab1[25]](_0x5054x15,_0xcab1[24])},{individualHooks:true,transaction:_0x5054x10[_0xcab1[44]]||null})})[_0xcab1[29]](function(){return _0x5054x18});case _0xcab1[16]:;case _0xcab1[17]:;case _0xcab1[18]:var _0x5054x1e={};_0x5054x1e[util[_0xcab1[23]](_0xcab1[51],_0x5054x10[_0xcab1[39]][_0xcab1[30]],_0xcab1[52])]=false;return _0x5054x18[_0xcab1[26]](_0x5054x1e,{transaction:_0x5054x10[_0xcab1[44]]})[_0xcab1[29]](function(_0x5054x18){var _0x5054x13=moment();return ReportMember[_0xcab1[50]]({where:{channel:_0x5054x10[_0xcab1[39]][_0xcab1[30]],membername:_0x5054x18[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),exitAt:null}})})[_0xcab1[29]](_0x5054x2a({message:_0xcab1[49]}))[_0xcab1[29]](function(_0x5054x1d){var _0x5054x13=moment();var _0x5054x15=moment(_0x5054x1d[_0xcab1[21]]);return _0x5054x1d[_0xcab1[26]]({exitAt:_0x5054x13[_0xcab1[23]](_0xcab1[22]),duration:_0x5054x13[_0xcab1[25]](_0x5054x15,_0xcab1[24])},{individualHooks:true,transaction:_0x5054x10[_0xcab1[44]]})})[_0xcab1[29]](function(){return _0x5054x18});default:var _0x5054x17=Promise[_0xcab1[48]](_0x5054xd[_0xcab1[47]]);return _0x5054x17({action:_0xcab1[46],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),paused:false})[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[53]](_0x5054x1f)})[_0xcab1[29]](function(){return _0x5054x18[_0xcab1[26]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false},{transaction:_0x5054x10[_0xcab1[44]]})})[_0xcab1[29]](function(_0x5054x18){var _0x5054x13=moment();return ReportMember[_0xcab1[26]]({exitAt:_0x5054x13},{where:{membername:_0x5054x18[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),exitAt:null},transaction:_0x5054x10[_0xcab1[44]]})})[_0xcab1[29]](function(){return _0x5054x18})}}}function _0x5054x20(_0x5054x10,_0x5054x17){return function(_0x5054x18){return _0x5054x18[_0xcab1[57]]()[_0xcab1[29]](function(_0x5054x21){var _0x5054x22=[];_0x5054x21[_0xcab1[28]](function(_0x5054x23){_0x5054x22[_0xcab1[27]](_0x5054xd[_0xcab1[47]]({action:_0xcab1[56],queue:_0x5054x23[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),membername:_0x5054x18[_0xcab1[35]]}))});return Promise[_0xcab1[20]](_0x5054x22)})[_0xcab1[29]](function(_0x5054x1b){var _0x5054x19=[];_0x5054xe[_0xcab1[28]](function(_0x5054x1a){_0x5054x19[_0xcab1[27]]({channel:_0x5054x1a,membername:_0x5054x18[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),type:_0xcab1[55],enterAt:moment()[_0xcab1[23]](_0xcab1[22])})});return ReportMember[_0xcab1[45]](_0x5054x19,{individualHooks:true})})}}function _0x5054x24(_0x5054x10,_0x5054x17){return function(_0x5054x18){return _0x5054x18[_0xcab1[57]]()[_0xcab1[29]](function(_0x5054x21){var _0x5054x22=[];_0x5054x21[_0xcab1[28]](function(_0x5054x23){_0x5054x22[_0xcab1[27]](_0x5054xd[_0xcab1[47]]({action:_0xcab1[58],queue:_0x5054x23[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]])}))});return Promise[_0xcab1[20]](_0x5054x22)[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[53]](_0x5054x1f)})})[_0xcab1[29]](function(_0x5054x1b){return ReportMember[_0xcab1[26]]({exitAt:moment()[_0xcab1[23]](_0xcab1[22])},{where:{membername:_0x5054x18[_0xcab1[35]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),type:_0xcab1[55],exitAt:null},individualHooks:true,transaction:_0x5054x10[_0xcab1[44]]})})}}function _0x5054x25(_0x5054x10,_0x5054x17){return function(_0x5054x18){var _0x5054x26=[];switch(_0x5054x10[_0xcab1[39]][_0xcab1[30]]){case _0xcab1[15]:_0x5054x10[_0xcab1[39]][_0xcab1[62]][_0xcab1[28]](function(_0x5054x27){_0x5054x26[_0xcab1[27]](UserHasVoiceQueue[_0xcab1[61]]({where:{UserId:_0x5054x18[_0xcab1[59]],queue:_0x5054x27},defaults:{queue:_0x5054x27,location:util[_0xcab1[23]](_0xcab1[60],_0x5054x18[_0xcab1[35]]),membername:_0x5054x18[_0xcab1[35]],UserId:_0x5054x18[_0xcab1[59]]},transaction:_0x5054x10[_0xcab1[44]]}))});return Promise[_0xcab1[20]](_0x5054x26)[_0xcab1[29]](function(){var _0x5054x22=[];_0x5054x10[_0xcab1[39]][_0xcab1[62]][_0xcab1[28]](function(_0x5054x27){_0x5054x22[_0xcab1[27]](_0x5054xd[_0xcab1[47]]({action:_0xcab1[56],queue:_0x5054x27,interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]]),membername:_0x5054x18[_0xcab1[35]]}))});return Promise[_0xcab1[20]](_0x5054x22)})[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[53]](_0x5054x1f)});case _0xcab1[16]:_0x5054x10[_0xcab1[39]][_0xcab1[62]][_0xcab1[28]](function(_0x5054x27){_0x5054x26[_0xcab1[27]](UserHasChatQueue[_0xcab1[61]]({where:{UserId:_0x5054x18[_0xcab1[59]],ChatQueueId:_0x5054x27[_0xcab1[59]]},defaults:{ChatQueueId:_0x5054x27[_0xcab1[59]],queue:_0x5054x27[_0xcab1[35]],UserId:_0x5054x18[_0xcab1[59]]},transaction:_0x5054x10[_0xcab1[44]]}))});return Promise[_0xcab1[20]](_0x5054x26)[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[14]](_0x5054x1f)});case _0xcab1[17]:_0x5054x10[_0xcab1[39]][_0xcab1[62]][_0xcab1[28]](function(_0x5054x27){_0x5054x26[_0xcab1[27]](UserHasMailQueue[_0xcab1[61]]({where:{UserId:_0x5054x18[_0xcab1[59]],MailQueueId:_0x5054x27[_0xcab1[59]]},defaults:{MailQueueId:_0x5054x27[_0xcab1[59]],queue:_0x5054x27[_0xcab1[35]],UserId:_0x5054x18[_0xcab1[59]]},transaction:_0x5054x10[_0xcab1[44]]}))});return Promise[_0xcab1[20]](_0x5054x26)[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[14]](_0x5054x1f)});case _0xcab1[18]:_0x5054x10[_0xcab1[39]][_0xcab1[62]][_0xcab1[28]](function(_0x5054x27){_0x5054x26[_0xcab1[27]](UserHasFaxQueue[_0xcab1[61]]({where:{UserId:_0x5054x18[_0xcab1[59]],FaxQueueId:_0x5054x27[_0xcab1[59]]},defaults:{faxQueueId:_0x5054x27[_0xcab1[59]],queue:_0x5054x27[_0xcab1[35]],UserId:_0x5054x18[_0xcab1[59]]},transaction:_0x5054x10[_0xcab1[44]]}))});return Promise[_0xcab1[20]](_0x5054x26)[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[14]](_0x5054x1f)});default:}}}function _0x5054x28(_0x5054x10,_0x5054x17){return function(_0x5054x18){switch(_0x5054x10[_0xcab1[39]][_0xcab1[30]]){case _0xcab1[15]:return UserHasVoiceQueue[_0xcab1[65]]({where:{UserId:_0x5054x18[_0xcab1[59]],queue:_0x5054x10[_0xcab1[39]][_0xcab1[64]]},transaction:_0x5054x10[_0xcab1[44]],individualHooks:true})[_0xcab1[29]](function(){var _0x5054x29=Promise[_0xcab1[48]](_0x5054xd[_0xcab1[47]]);return _0x5054x29({action:_0xcab1[58],queue:_0x5054x10[_0xcab1[39]][_0xcab1[64]],interface:util[_0xcab1[23]](_0xcab1[36],_0xcab1[37],_0x5054x18[_0xcab1[35]])})})[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[53]](_0xcab1[63],_0x5054x1f)});case _0xcab1[16]:return UserHasChatQueue[_0xcab1[65]]({where:{UserId:_0x5054x18[_0xcab1[59]],ChatQueueId:_0x5054x10[_0xcab1[39]][_0xcab1[66]]},transaction:_0x5054x10[_0xcab1[44]],individualHooks:true})[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[53]](_0xcab1[63],_0x5054x1f)});case _0xcab1[17]:return UserHasMailQueue[_0xcab1[65]]({where:{UserId:_0x5054x18[_0xcab1[59]],MailQueueId:_0x5054x10[_0xcab1[39]][_0xcab1[66]]},transaction:_0x5054x10[_0xcab1[44]],individualHooks:true})[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[53]](_0xcab1[63],_0x5054x1f)});case _0xcab1[18]:return UserHasFaxQueue[_0xcab1[65]]({where:{UserId:_0x5054x18[_0xcab1[59]],FaxQueueId:_0x5054x10[_0xcab1[39]][_0xcab1[66]]},transaction:_0x5054x10[_0xcab1[44]],individualHooks:true})[_0xcab1[54]](function(_0x5054x1f){console[_0xcab1[53]](_0xcab1[63],_0x5054x1f)});default:}}}function _0x5054x2a(_0x5054x2b){return function(_0x5054x2c){if(!_0x5054x2c){throw _0x5054x2b};return _0x5054x2c}}function _0x5054x2d(_0x5054x17,_0x5054x10,_0x5054xd){switch(_0x5054x17[_0xcab1[35]]){case _0xcab1[70]:return Agent[_0xcab1[69]](_0x5054x10[_0xcab1[39]][_0xcab1[68]])[_0xcab1[29]](_0x5054x2a({message:_0xcab1[67]}))[_0xcab1[29]](_0x5054x16(_0x5054x10,_0x5054x17));case _0xcab1[71]:return Agent[_0xcab1[69]](_0x5054x10[_0xcab1[39]][_0xcab1[68]])[_0xcab1[29]](_0x5054x2a({message:_0xcab1[67]}))[_0xcab1[29]](_0x5054x1c(_0x5054x10,_0x5054x17));case _0xcab1[72]:return Agent[_0xcab1[69]](_0x5054x17[_0xcab1[40]])[_0xcab1[29]](_0x5054x2a({message:_0xcab1[67]}))[_0xcab1[29]](_0x5054x20(_0x5054x10,_0x5054x17));case _0xcab1[73]:return Agent[_0xcab1[69]](_0x5054x17[_0xcab1[40]])[_0xcab1[29]](_0x5054x2a({message:_0xcab1[67]}))[_0xcab1[29]](_0x5054x1c(_0x5054x10,_0x5054x17))[_0xcab1[29]](_0x5054x24(_0x5054x10,_0x5054x17));case _0xcab1[56]:return Agent[_0xcab1[69]](_0x5054x10[_0xcab1[39]][_0xcab1[68]])[_0xcab1[29]](_0x5054x2a({message:_0xcab1[67]}))[_0xcab1[29]](_0x5054x25(_0x5054x10,_0x5054x17));case _0xcab1[58]:return Agent[_0xcab1[69]](_0x5054x10[_0xcab1[39]][_0xcab1[68]])[_0xcab1[29]](_0x5054x2a({message:_0xcab1[67]}))[_0xcab1[29]](_0x5054x28(_0x5054x10,_0x5054x17));default:throw {message:_0xcab1[74]}}}return {}}module[_0xcab1[75]]=Action
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var moment = require('moment');
+var util = require('util');
+var Promise = require('bluebird');
+
+var Sequelize = require('../../models').sequelize;
+var ReportMember = require('../../models').ReportMember;
+var _Action = require('../../models').Action;
+var Agent = require('../../models').User;
+var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
+var UserHasChatQueue = require('../../models').UserHasChatQueue;
+var UserHasMailQueue = require('../../models').UserHasMailQueue;
+var UserHasFaxQueue = require('../../models').UserHasFaxQueue;
+
+function Action(ami) {
+  console.log('Action Initialization...');
+  var channels = ['voice', 'chat', 'mail', 'fax'];
+
+  _Action.afterCreate(function(doc, options) {
+    return onSave(doc, options, ami);
+  });
+
+  ReportMember.beforeCreate(function(doc, options) {
+    return ReportMember
+      .findAll({
+        where: {
+          channel: doc.channel,
+          membername: doc.membername,
+          interface: doc.interface,
+          exitAt: null
+        }
+      })
+      .then(function(elms) {
+        var queries = [];
+        var exitAt = moment();
+        elms.forEach(function(elm) {
+          var enterAt = moment(elm.enterAt);
+          queries.push(elm.update({
+            exitAt: exitAt.format("YYYY-MM-DD HH:mm:ss"),
+            duration: exitAt.diff(enterAt, 'seconds')
+          }));
+        })
+        return queries;
+      })
+      .all();
+  });
+
+  // HANDLE PAUSE FUNCTION
+  function handlePause(options, action) {
+    return function(agent) {
+      return Promise
+        .promisify(ami.action)({
+          action: 'QueuePause',
+          interface: util.format('%s/%s', 'SIP', agent.name),
+          paused: true,
+          reason: options.body.type
+        })
+        .then(function(astData) {
+          return agent
+            .update({
+              voicePause: true,
+              chatPause: true,
+              mailPause: true,
+              faxPause: true,
+              pauseType: options.body.type,
+              lastPauseAt: moment().format("YYYY-MM-DD HH:mm:ss")
+            }, {
+              transaction: options.transaction || null
+            });
+        })
+        .then(function(agent) {
+          var reportMembers = [];
+          channels.forEach(function(channel) {
+            reportMembers.push({
+              channel: channel,
+              membername: agent.name,
+              interface: util.format('%s/%s', 'SIP', agent.name),
+              type: options.body.type,
+              enterAt: moment().format("YYYY-MM-DD HH:mm:ss"),
+              data1: action.data1,
+              data2: action.data2,
+              data3: action.data3,
+              data4: action.data4
+            });
+          })
+          return ReportMember
+            .bulkCreate(reportMembers, {
+              individualHooks: true,
+              transaction: options.transaction || null
+            });
+        });
+    }
+  }
+
+  // HANDLE UNPAUSE FUNCTION
+  function handleUnpause(options, action) {
+    return function(agent) {
+      if (!options.body) options.body = {};
+
+      switch (options.body.channel) {
+        case 'voice':
+
+          return Promise
+            .promisify(ami.action)({
+              action: 'QueuePause',
+              interface: util.format('%s/%s', 'SIP', agent.name),
+              paused: false,
+              reason: options.body.type
+            })
+            .then(function() {
+              return agent
+                .update({
+                  voicePause: false,
+                }, {
+                  transaction: options.transaction || null
+                })
+            })
+            .then(function(agent) {
+              var exitAt = moment();
+              return ReportMember
+                .findOne({
+                  where: {
+                    channel: options.body.channel,
+                    membername: agent.name,
+                    interface: util.format('%s/%s', 'SIP', agent.name),
+                    exitAt: null
+                  }
+                });
+            })
+            .then(handleEntityNotFound({
+              message: 'Already Pause Off'
+            }))
+            .then(function(reportMember) {
+              var exitAt = moment();
+              var enterAt = moment(reportMember.enterAt);
+
+              return reportMember
+                .update({
+                  exitAt: exitAt.format("YYYY-MM-DD HH:mm:ss"),
+                  duration: exitAt.diff(enterAt, 'seconds')
+                }, {
+                  individualHooks: true,
+                  transaction: options.transaction || null
+                });
+            })
+            .then(function() {
+              return agent;
+            });
+
+        case 'chat':
+        case 'mail':
+        case 'fax':
+
+          var data = {};
+          data[util.format('%s%s', options.body.channel, 'Pause')] = false;
+
+          return agent
+            .update(data, {
+              transaction: options.transaction
+            })
+            .then(function(agent) {
+              var exitAt = moment();
+
+              return ReportMember
+                .findOne({
+                  where: {
+                    channel: options.body.channel,
+                    membername: agent.name,
+                    interface: util.format('%s/%s', 'SIP', agent.name),
+                    exitAt: null
+                  }
+                });
+            })
+            .then(handleEntityNotFound({
+              message: 'Already Pause Off'
+            }))
+            .then(function(reportMember) {
+              var exitAt = moment();
+              var enterAt = moment(reportMember.enterAt);
+
+              return reportMember
+                .update({
+                  exitAt: exitAt.format("YYYY-MM-DD HH:mm:ss"),
+                  duration: exitAt.diff(enterAt, 'seconds')
+                }, {
+                  individualHooks: true,
+                  transaction: options.transaction
+                });
+            })
+            .then(function() {
+              return agent;
+            });
+
+        default:
+          var action = Promise.promisify(ami.action);
+          return action({
+              action: 'QueuePause',
+              interface: util.format('%s/%s', 'SIP', agent.name),
+              paused: false
+            })
+            .catch(function(err) {
+              console.error(err);
+            })
+            .then(function() {
+              return agent
+                .update({
+                  voicePause: false,
+                  mailPause: false,
+                  chatPause: false,
+                  faxPause: false
+                }, {
+                  transaction: options.transaction
+                });
+            })
+            .then(function(agent) {
+              var exitAt = moment();
+              return ReportMember
+                .update({
+                  exitAt: exitAt
+                }, {
+                  where: {
+                    membername: agent.name,
+                    interface: util.format('%s/%s', 'SIP', agent.name),
+                    exitAt: null
+                  },
+                  transaction: options.transaction
+                });
+            })
+            .then(function() {
+              return agent;
+            });
+      }
+    }
+  }
+
+  // HANDLE LOGIN FUNCTION
+  function handleLogin(options, action) {
+    return function(agent) {
+      return agent
+        .getVoiceQueues()
+        .then(function(voiceQueues) {
+          var actions = [];
+          voiceQueues.forEach(function(voiceQueue) {
+            actions.push(ami.action({
+              action: 'QueueAdd',
+              queue: voiceQueue.name,
+              interface: util.format('%s/%s', 'SIP', agent.name),
+              membername: agent.name
+            }));
+          });
+          return Promise.all(actions);
+        })
+        .then(function(astData) {
+          var reportMembers = [];
+          channels.forEach(function(channel) {
+            reportMembers.push({
+              channel: channel,
+              membername: agent.name,
+              interface: util.format('%s/%s', 'SIP', agent.name),
+              type: 'LOGIN',
+              enterAt: moment().format("YYYY-MM-DD HH:mm:ss")
+            });
+          });
+          return ReportMember
+            .bulkCreate(reportMembers, {
+              individualHooks: true
+            });
+        });
+    }
+  }
+
+  // HANDLE LOGOUT FUNCTION
+  function handleLogout(options, action) {
+    return function(agent) {
+      return agent
+        .getVoiceQueues()
+        .then(function(voiceQueues) {
+          var actions = [];
+          voiceQueues.forEach(function(voiceQueue) {
+            actions.push(ami.action({
+              action: 'QueueRemove',
+              queue: voiceQueue.name,
+              interface: util.format('%s/%s', 'SIP', agent.name)
+            }));
+          });
+          return Promise
+            .all(actions)
+            .catch(function(err) {
+              console.error(err);
+            });
+        })
+        .then(function(astData) {
+          return ReportMember
+            .update({
+              exitAt: moment().format("YYYY-MM-DD HH:mm:ss")
+            }, {
+              where: {
+                membername: agent.name,
+                interface: util.format('%s/%s', 'SIP', agent.name),
+                type: 'LOGIN',
+                exitAt: null
+              },
+              individualHooks: true,
+              transaction: options.transaction
+            });
+        });
+    }
+  }
+
+  // HANDLE QUEUEADD FUNCTION
+  function handleQueueAdd(options, action) {
+    return function(agent) {
+      var bulkQueues = [];
+      switch (options.body.channel) {
+        case 'voice':
+          options.body.queues.forEach(function(queue) {
+            bulkQueues.push(UserHasVoiceQueue
+              .findOrCreate({
+                where: {
+                  UserId: agent.id,
+                  queue: queue
+                },
+                defaults: {
+                  queue: queue,
+                  location: util.format('SIP/%s', agent.name),
+                  membername: agent.name,
+                  UserId: agent.id,
+                },
+                transaction: options.transaction
+              }));
+          });
+          return Promise
+            .all(bulkQueues)
+            .then(function() {
+              var actions = [];
+              options.body.queues.forEach(function(queue) {
+                actions.push(ami.action({
+                  action: 'QueueAdd',
+                  queue: queue,
+                  interface: util.format('%s/%s', 'SIP', agent.name),
+                  membername: agent.name
+                }));
+              });
+              return Promise
+                .all(actions);
+            })
+            .catch(function(err) {
+              console.error(err);
+            })
+        case 'chat':
+          options.body.queues.forEach(function(queue) {
+            bulkQueues.push(UserHasChatQueue
+              .findOrCreate({
+                where: {
+                  UserId: agent.id,
+                  ChatQueueId: queue.id
+                },
+                defaults: {
+                  ChatQueueId: queue.id,
+                  queue: queue.name,
+                  UserId: agent.id,
+                },
+                transaction: options.transaction
+              }));
+          });
+          return Promise
+            .all(bulkQueues)
+            .catch(function(err) {
+              console.log(err);
+            });
+        case 'mail':
+          options.body.queues.forEach(function(queue) {
+            bulkQueues.push(UserHasMailQueue
+              .findOrCreate({
+                where: {
+                  UserId: agent.id,
+                  MailQueueId: queue.id
+                },
+                defaults: {
+                  MailQueueId: queue.id,
+                  queue: queue.name,
+                  UserId: agent.id,
+                },
+                transaction: options.transaction
+              }));
+          });
+          return Promise
+            .all(bulkQueues)
+            .catch(function(err) {
+              console.log(err);
+            });
+        case 'fax':
+          options.body.queues.forEach(function(queue) {
+            bulkQueues.push(UserHasFaxQueue
+              .findOrCreate({
+                where: {
+                  UserId: agent.id,
+                  FaxQueueId: queue.id
+                },
+                defaults: {
+                  faxQueueId: queue.id,
+                  queue: queue.name,
+                  UserId: agent.id,
+                },
+                transaction: options.transaction
+              }));
+          });
+          return Promise
+            .all(bulkQueues)
+            .catch(function(err) {
+              console.log(err);
+            });
+        default:
+      }
+    }
+  }
+
+  // HANDLE QUEUEREMOVE FUNCTION
+  function handleQueueRemove(options, action) {
+    return function(agent) {
+      switch (options.body.channel) {
+        case 'voice':
+          return UserHasVoiceQueue
+            .destroy({
+              where: {
+                UserId: agent.id,
+                queue: options.body.queue
+              },
+              transaction: options.transaction,
+              individualHooks: true
+            })
+            .then(function() {
+              var newAction = Promise.promisify(ami.action);
+              return newAction({
+                action: 'QueueRemove',
+                queue: options.body.queue,
+                interface: util.format('%s/%s', 'SIP', agent.name),
+              });
+            })
+            .catch(function(err) {
+              console.error('queue association remove error :', err);
+            });
+        case 'chat':
+          return UserHasChatQueue
+            .destroy({
+              where: {
+                UserId: agent.id,
+                ChatQueueId: options.body.queueId
+              },
+              transaction: options.transaction,
+              individualHooks: true
+            })
+            .catch(function(err) {
+              console.error('queue association remove error :', err);
+            });
+        case 'mail':
+          return UserHasMailQueue
+            .destroy({
+              where: {
+                UserId: agent.id,
+                MailQueueId: options.body.queueId
+              },
+              transaction: options.transaction,
+              individualHooks: true
+            })
+            .catch(function(err) {
+              console.error('queue association remove error :', err);
+            });
+        case 'fax':
+          return UserHasFaxQueue
+            .destroy({
+              where: {
+                UserId: agent.id,
+                FaxQueueId: options.body.queueId
+              },
+              transaction: options.transaction,
+              individualHooks: true
+            })
+            .catch(function(err) {
+              console.error('queue association remove error :', err);
+            });
+        default:
+      }
+    }
+  }
+
+  // HANDLE ENTITY NOT FOUND
+  function handleEntityNotFound(error) {
+    return function(entity) {
+      if (!entity) {
+        throw error;
+      }
+      return entity;
+    };
+  }
+
+  function onSave(action, options, ami) {
+    // START ACTION STATEMENT
+    switch (action.name) {
+      case 'pause':
+        // START HANDLE PAUSE
+        return Agent
+          .findById(options.body.agent)
+          .then(handleEntityNotFound({
+            message: 'Unknown Agent'
+          }))
+          .then(handlePause(options, action));
+        // END HANDLE PAUSE
+      case 'unpause':
+        // START HANDLE UNPAUSE
+        return Agent
+          .findById(options.body.agent)
+          .then(handleEntityNotFound({
+            message: 'Unknown Agent'
+          }))
+          .then(handleUnpause(options, action));
+        // END HANDLE UNPAUSE
+
+      case 'login':
+        // START HANDLE LOGIN
+        return Agent
+          .findById(action.data1)
+          .then(handleEntityNotFound({
+            message: 'Unknown Agent'
+          }))
+          .then(handleLogin(options, action));
+        // END HANDLE LOGING
+
+      case 'logout':
+        // START HANDLE LOGOUT
+        return Agent
+          .findById(action.data1)
+          .then(handleEntityNotFound({
+            message: 'Unknown Agent'
+          }))
+          .then(handleUnpause(options, action))
+          .then(handleLogout(options, action));
+        // END HANDLE LOGOUT
+      case 'QueueAdd':
+        // START HANDLE QUEUEADD
+        return Agent
+          .findById(options.body.agent)
+          .then(handleEntityNotFound({
+            message: 'Unknown Agent'
+          }))
+          .then(handleQueueAdd(options, action));
+        // END HANDLE QUEUEADD
+      case 'QueueRemove':
+        // START HANDLE QUEUEREMOVE
+        return Agent
+          .findById(options.body.agent)
+          .then(handleEntityNotFound({
+            message: 'Unknown Agent'
+          }))
+          .then(handleQueueRemove(options, action));
+        // END HANDLE QUEUEREMOVE
+
+      default:
+        throw {
+          message: 'Unknown Action'
+        };
+    }
+    // END ACTION STATEMENT
+  }
+
+  return {};
+}
+
+module.exports = Action;
index 1c260ce..d3f273e 100644 (file)
@@ -1 +1,152 @@
-var _0x5856=["\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x41\x43\x57\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x75\x6E\x70\x61\x75\x73\x65","\x62\x6F\x64\x79","\x61\x63\x77\x54\x69\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x61\x63\x77\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x41\x43\x57","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x5856[0]);var _=require(_0x5856[1]);var VoiceQueue=require(_0x5856[3])[_0x5856[2]];var Agent=require(_0x5856[3])[_0x5856[4]];var Action=require(_0x5856[3])[_0x5856[5]];var ReportAgent=require(_0x5856[3])[_0x5856[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x7e20xb){console[_0x5856[8]](_0x5856[7]);VoiceQueue[_0x5856[14]]()[_0x5856[12]](function(_0x7e20x10){_voiceQueues=_0x7e20x10;synchCollection(VoiceQueue,_voiceQueues,_0x5856[13]);return Agent[_0x5856[16]](_0x5856[15])[_0x5856[14]]()})[_0x5856[12]](function(_0x7e20xd){_agents=_0x7e20xd;synchCollection(Agent,_agents,_0x5856[10]);Action[_0x5856[11]](function(_0x7e20xe,_0x7e20xf){return onSave(_0x7e20xe,_0x7e20xf)})})[_0x5856[9]](function(_0x7e20xc){console[_0x5856[8]](_0x7e20xc)})}function onSave(_0x7e20xe,_0x7e20xf){if(_0x7e20xe[_0x5856[13]]===_0x5856[17]&&activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]]){var _0x7e20x12;if(activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]][_0x5856[17]]){_0x7e20x12=activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]][_0x5856[19]]}else {clearTimeout(activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]][_0x5856[20]]);_0x7e20x12=moment[_0x5856[23]](moment()-activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]][_0x5856[22]])[_0x5856[21]]()};return ReportAgent[_0x5856[27]]({agentacw:true,acwtime:_0x7e20x12},{where:{uniqueid:activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]][_0x5856[24]],destuniqueid:activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]][_0x5856[25]]},transaction:_0x7e20xf[_0x5856[26]],individualHooks:true})[_0x5856[12]](function(){delete activeAcw[_0x7e20xf[_0x5856[18]][_0x5856[15]]]})[_0x5856[9]](function(_0x7e20xc){console[_0x5856[8]](_0x7e20xc)})}}ACW[_0x5856[29]][_0x5856[28]]=function(_0x7e20x13){var _0x7e20x14=_[_0x5856[31]](_voiceQueues,{name:_0x7e20x13[_0x5856[30]],acw:true});if(_0x7e20x14){var _0x7e20x15=_[_0x5856[31]](_agents,{name:_0x7e20x13[_0x5856[32]]});Action[_0x5856[37]]({name:_0x5856[38],data1:_0x7e20x13[_0x5856[30]],data2:_0x7e20x14[_0x5856[34]],data3:_0x7e20x13[_0x5856[24]],data4:_0x5856[36]},{body:{agent:_0x7e20x15[_0x5856[10]],type:_0x5856[36]}})[_0x5856[12]](function(){console[_0x5856[8]](_0x5856[33]);activeAcw[_0x7e20x15[_0x5856[10]]]={uniqueid:_0x7e20x13[_0x5856[24]],destuniqueid:_0x7e20x13[_0x5856[25]],acwTime:_0x7e20x14[_0x5856[34]],acwAt:moment(),unpause:false};activeAcw[_0x7e20x15[_0x5856[10]]][_0x5856[20]]=setTimeout(function(){console[_0x5856[8]](_0x5856[35]);activeAcw[_0x7e20x15[_0x5856[10]]][_0x5856[17]]=true;return Action[_0x5856[37]]({name:_0x5856[17],data1:_0x7e20x13[_0x5856[30]],data2:_0x7e20x14[_0x5856[34]],data3:_0x7e20x13[_0x5856[24]],data4:_0x5856[36]},{body:{agent:_0x7e20x15[_0x5856[10]],type:_0x5856[36]}})[_0x5856[9]](function(_0x7e20xc){console[_0x5856[8]](_0x7e20xc)})},_0x7e20x14[_0x5856[34]]*1000)})[_0x5856[9]](function(_0x7e20xc){console[_0x5856[8]](_0x7e20xc)})}};function synchCollection(_0x7e20x17,_0x7e20x18,_0x7e20x19){var _0x7e20x1a={};_0x7e20x17[_0x5856[11]](function(_0x7e20xe){_0x7e20x1a[_0x7e20x19]=_0x7e20xe[_0x7e20x19];updateCollection(_0x7e20x18,_0x7e20xe,_0x7e20x1a)});_0x7e20x17[_0x5856[39]](function(_0x7e20xe){_0x7e20x1a[_0x7e20x19]=_0x7e20xe[_0x7e20x19];updateCollection(_0x7e20x18,_0x7e20xe,_0x7e20x1a)});_0x7e20x17[_0x5856[41]](function(_0x7e20xe){_0x7e20x1a[_0x7e20x19]=_0x7e20xe[_0x7e20x19];_[_0x5856[40]](_0x7e20x18,_0x7e20x1a)})}function updateCollection(_0x7e20x1c,_0x7e20xe,_0x7e20x1a){var _0x7e20x1d=_[_0x5856[31]](_0x7e20x1c,_0x7e20x1a);var _0x7e20x1e=_0x7e20x1c[_0x5856[42]](_0x7e20x1d);if(_0x7e20x1d){_[_0x5856[43]](_0x7e20x1c[_0x7e20x1e],_0x7e20xe)}else {_0x7e20x1c[_0x5856[44]](_0x7e20xe)}}module[_0x5856[45]]=ACW
\ No newline at end of file
+var moment = require('moment');
+var _ = require('lodash');
+var VoiceQueue = require('../../models').VoiceQueue;
+var Agent = require('../../models').User;
+var Action = require('../../models').Action;
+var ReportAgent = require('../../models').ReportAgent;
+var _voiceQueues;
+var _agents;
+var activeAcw = {};
+
+
+function ACW(ami) {
+  console.log('ACW Initialization...');
+  VoiceQueue
+    .findAll()
+    .then(function(voiceQueues) {
+      _voiceQueues = voiceQueues;
+      // console.log('_voiceQueues', _.map(_voiceQueues, 'dataValues'));
+      synchCollection(VoiceQueue, _voiceQueues, 'name');
+      return Agent
+        .scope('agent')
+        .findAll();
+    })
+    .then(function(agents) {
+      _agents = agents;
+      // console.log('_agents', _.map(_agents, 'dataValues'));
+      synchCollection(Agent, _agents, 'id');
+      Action.afterCreate(function(doc, options) {
+        return onSave(doc, options);
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function onSave(doc, options) {
+  if (doc.name === 'unpause' && activeAcw[options.body.agent]) {
+    var acwTime;
+    if (activeAcw[options.body.agent].unpause) {
+      acwTime = activeAcw[options.body.agent].acwTime;
+    } else {
+      clearTimeout(activeAcw[options.body.agent].timeout);
+      acwTime = moment.duration(moment() - activeAcw[options.body.agent].acwAt).asSeconds();
+    }
+    return ReportAgent
+      .update({
+        agentacw: true,
+        acwtime: acwTime
+      }, {
+        where: {
+          uniqueid: activeAcw[options.body.agent].uniqueid,
+          destuniqueid: activeAcw[options.body.agent].destuniqueid
+        },
+        transaction: options.transaction,
+        individualHooks: true
+      })
+      .then(function() {
+        delete activeAcw[options.body.agent];
+      })
+      .catch(function(err) {
+        console.log(err);
+      });
+  }
+}
+
+ACW.prototype.agentcomplete = function(evt) {
+  var queueIsAcw = _.find(_voiceQueues, {
+    name: evt.queue,
+    acw: true
+  });
+  if (queueIsAcw) {
+    var agent = _.find(_agents, {
+      name: evt.membername
+    });
+    Action
+      .create({
+        name: 'pause',
+        data1: evt.queue,
+        data2: queueIsAcw.acwTimeout,
+        data3: evt.uniqueid,
+        data4: 'ACW'
+      }, {
+        body: {
+          agent: agent.id,
+          type: 'ACW'
+        }
+      })
+      .then(function() {
+        console.log('PAUSED BY ACW');
+        activeAcw[agent.id] = {
+          uniqueid: evt.uniqueid,
+          destuniqueid: evt.destuniqueid,
+          acwTime: queueIsAcw.acwTimeout,
+          acwAt: moment(),
+          unpause: false
+        };
+
+        activeAcw[agent.id].timeout = setTimeout(function() {
+          console.log('UNPAUSED BY ACW');
+          activeAcw[agent.id].unpause = true;
+          return Action
+            .create({
+              name: 'unpause',
+              data1: evt.queue,
+              data2: queueIsAcw.acwTimeout,
+              data3: evt.uniqueid,
+              data4: 'ACW'
+            }, {
+              body: {
+                agent: agent.id,
+                type: 'ACW'
+              }
+            })
+            .catch(function(err) {
+              console.log(err);
+            });
+        }, queueIsAcw.acwTimeout * 1000);
+      })
+      .catch(function(err) {
+        console.log(err);
+      });
+  }
+}
+
+function synchCollection(model, array, uniqueProperty) {
+  var condition = {};
+  model.afterCreate(function(doc) {
+    condition[uniqueProperty] = doc[uniqueProperty]
+    updateCollection(array, doc, condition);
+  });
+  model.afterUpdate(function(doc) {
+    condition[uniqueProperty] = doc[uniqueProperty]
+    updateCollection(array, doc, condition);
+  });
+  model.afterDestroy(function(doc) {
+    condition[uniqueProperty] = doc[uniqueProperty]
+    _.remove(array, condition);
+  });
+}
+
+function updateCollection(collection, doc, condition) {
+  var oldItem = _.find(collection, condition);
+  var index = collection.indexOf(oldItem);
+  if (oldItem) {
+    _.merge(collection[index], doc);
+  } else {
+    collection.unshift(doc);
+  }
+}
+
+module.exports = ACW;
index 912cbf9..1aca579 100644 (file)
@@ -1 +1,94 @@
-var _0xcb92=["\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x67\x65\x6E\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x6C\x6C\x65\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70\x41\x74","\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x65\x6A\x65\x63\x74\x65\x64","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x61\x67\x65\x6E\x74\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x62\x65\x67\x69\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x61\x67\x65\x6E\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x61\x67\x65\x6E\x74\x5D\x20\x61\x67\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0xcb92[0]);var ReportAgent=require(_0xcb92[2])[_0xcb92[1]];function Agent(){console[_0xcb92[4]](_0xcb92[3])}Agent[_0xcb92[6]][_0xcb92[5]]=function(_0xec38x4){_0xec38x4[_0xcb92[7]]=_0xcb92[5];_0xec38x4[_0xcb92[8]]=moment()[_0xcb92[10]](_0xcb92[9]);return createAgent(_0xec38x4)};Agent[_0xcb92[6]][_0xcb92[11]]=function(_0xec38x4){_0xec38x4[_0xcb92[7]]=_0xcb92[11];_0xec38x4[_0xcb92[12]]=moment()[_0xcb92[10]](_0xcb92[9]);updateAgents(_0xec38x4);updateAgents({agentringnoanswer:true,agentringnoanswerAt:moment()[_0xcb92[10]](_0xcb92[9]),reason:_0xcb92[13],lastevent:_0xcb92[13]},{uniqueid:_0xec38x4[_0xcb92[14]],destuniqueid:{$ne:_0xec38x4[_0xcb92[15]]},reason:null})};Agent[_0xcb92[6]][_0xcb92[16]]=function(_0xec38x4){_0xec38x4[_0xcb92[7]]=_0xcb92[16];_0xec38x4[_0xcb92[17]]=true;_0xec38x4[_0xcb92[18]]=moment()[_0xcb92[10]](_0xcb92[9]);return updateAgents(_0xec38x4)};Agent[_0xcb92[6]][_0xcb92[19]]=function(_0xec38x4){_0xec38x4[_0xcb92[7]]=_0xcb92[19];_0xec38x4[_0xcb92[20]]=true;_0xec38x4[_0xcb92[21]]=moment()[_0xcb92[10]](_0xcb92[9]);return updateAgents(_0xec38x4)};Agent[_0xcb92[6]][_0xcb92[22]]=function(_0xec38x4){_0xec38x4[_0xcb92[7]]=_0xcb92[23];_0xec38x4[_0xcb92[24]]=true;_0xec38x4[_0xcb92[25]]=moment()[_0xcb92[10]](_0xcb92[9]);_0xec38x4[_0xcb92[26]]=_0xcb92[23];return updateAgents(_0xec38x4)};Agent[_0xcb92[6]][_0xcb92[27]]=function(_0xec38x4){_0xec38x4[_0xcb92[7]]=_0xcb92[28];_0xec38x4[_0xcb92[24]]=true;_0xec38x4[_0xcb92[25]]=moment()[_0xcb92[10]](_0xcb92[9]);_0xec38x4[_0xcb92[26]]=_0xcb92[28];return updateAgents(_0xec38x4,{uniqueid:_0xec38x4[_0xcb92[14]],reason:null})};function createAgent(_0xec38x4){return ReportAgent[_0xcb92[34]](_0xec38x4)[_0xcb92[33]](function(_0xec38x7){console[_0xcb92[4]](_0xcb92[32])})[_0xcb92[31]](function(_0xec38x6){console[_0xcb92[30]](_0xcb92[29]+_0xec38x6)})}function updateAgents(_0xec38x4,_0xec38x9){return ReportAgent[_0xcb92[37]](_0xec38x4,{where:(_0xec38x9)?_0xec38x9:{uniqueid:_0xec38x4[_0xcb92[14]],destuniqueid:_0xec38x4[_0xcb92[15]]},individualHooks:true})[_0xcb92[33]](function(_0xec38x7){console[_0xcb92[4]](_0xcb92[36])})[_0xcb92[31]](function(_0xec38x6){console[_0xcb92[30]](_0xcb92[35]+_0xec38x6)})}module[_0xcb92[38]]=Agent
\ No newline at end of file
+var moment = require('moment');
+var ReportAgent = require('../../models').ReportAgent;
+
+function Agent() {
+  console.log('Agent Initialization...');
+}
+
+Agent.prototype.called = function(evt) {
+  evt.lastevent = 'called';
+  evt.agentcalledAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return createAgent(evt);
+}
+
+Agent.prototype.connect = function(evt) {
+  evt.lastevent = 'connect';
+  evt.agentconnectAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  updateAgents(evt);
+  updateAgents({
+    agentringnoanswer: true,
+    agentringnoanswerAt: moment().format("YYYY-MM-DD HH:mm:ss"),
+    reason: 'answered_elsewhere',
+    lastevent: 'answered_elsewhere'
+  }, {
+    uniqueid: evt.uniqueid,
+    destuniqueid: {
+      $ne: evt.destuniqueid
+    },
+    reason: null
+  })
+}
+
+Agent.prototype.complete = function(evt) {
+  evt.lastevent = 'complete';
+  evt.agentcomplete = true;
+  evt.agentcompleteAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return updateAgents(evt);
+}
+
+Agent.prototype.dump = function(evt) {
+  evt.lastevent = 'dump';
+
+  evt.agentdump = true;
+  evt.agentdumpAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return updateAgents(evt);
+}
+
+Agent.prototype.ringnoanswer = function(evt) {
+  evt.lastevent = 'rejected';
+  evt.agentringnoanswer = true;
+  evt.agentringnoanswerAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  evt.reason = 'rejected';
+  return updateAgents(evt);
+}
+
+Agent.prototype.callerabandon = function(evt) {
+  evt.lastevent = 'abandoned';
+  evt.agentringnoanswer = true;
+  evt.agentringnoanswerAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  evt.reason = 'abandoned';
+  return updateAgents(evt, {
+    uniqueid: evt.uniqueid,
+    reason: null
+  });
+}
+
+function createAgent(evt) {
+  return ReportAgent
+    .create(evt)
+    .then(function(agent) {
+      console.log('[report] agent begin created');
+    })
+    .catch(function(err) {
+      console.error('[report] agent ' + err);
+    });
+}
+
+function updateAgents(evt, where) {
+  return ReportAgent
+    .update(evt, {
+      where: (where) ? where : {
+        uniqueid: evt.uniqueid,
+        destuniqueid: evt.destuniqueid
+      },
+      individualHooks: true
+    })
+    .then(function(agent) {
+      console.log('[agent] agent')
+    })
+    .catch(function(err) {
+      console.error('[agent] agent error: ' + err);
+    });
+}
+
+module.exports = Agent;
index ffdda23..15e34b3 100644 (file)
@@ -1 +1,26 @@
-var _0x21a5=["\x43\x61\x6C\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x64\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x73\x70\x72\x65\x61\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];function Call(){console[_0x21a5[1]](_0x21a5[0])}Call[_0x21a5[3]][_0x21a5[2]]=function(_0x2566x2){create(_0x2566x2)};function create(_0x2566x2){var _0x2566x4=require(_0x21a5[5])[_0x21a5[4]];_0x2566x4[_0x21a5[12]]({where:{uniqueid:_0x2566x2[_0x21a5[11]]},defaults:_0x2566x2})[_0x21a5[10]](function(_0x2566x4,_0x2566x6){console[_0x21a5[1]](_0x21a5[9],_0x2566x6)})[_0x21a5[8]](function(_0x2566x5){console[_0x21a5[7]](_0x21a5[6]+_0x2566x5)})}module[_0x21a5[13]]=Call
\ No newline at end of file
+function Call() {
+  console.log('Call Initialization...');
+}
+
+Call.prototype.add = function(evt) {
+  create(evt);
+}
+
+function create(evt) {
+  var call = require('../../models').ReportCall;
+  call
+    .findOrCreate({
+      where: {
+        uniqueid: evt.uniqueid
+      },
+      defaults: evt
+    })
+    .spread(function(call, created) {
+      console.log('[report] call created: ', created);
+    })
+    .catch(function(err) {
+      console.error('[report] call ' + err);
+    });
+}
+
+module.exports = Call;
index a2d6900..dddcd91 100644 (file)
@@ -1 +1,225 @@
-var _0xfcf1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x67\x65\x6E\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x63\x61\x6C\x6C","\x2E\x2F\x6D\x65\x6D\x62\x65\x72","\x2E\x2F\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72","\x2E\x2F\x71\x75\x65\x75\x65\x5F\x6D\x65\x6D\x62\x65\x72","\x2E\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2F\x74\x72\x75\x6E\x6B","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x2E\x2F\x61\x63\x77","\x2E\x2F\x75\x73\x65\x72","\x2E\x2F\x74\x72\x61\x6E\x73\x66\x65\x72","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x65\x78\x70\x6F\x72\x74\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x68\x6F\x73\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x70\x6F\x72\x74","\x69\x6E\x66\x6F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x63\x6C\x6F\x73\x65","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x43\x4C\x4F\x53\x45\x3A\x20\x25\x73","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x45\x52\x52\x4F\x52\x3A\x20\x25\x73","\x6D\x61\x6E\x61\x67\x65\x72\x65\x76\x65\x6E\x74","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x64\x65\x76\x69\x63\x65","\x53\x49\x50\x2F\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F","\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x74\x61\x74\x65","\x53\x49\x50\x2F","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x74\x65\x55\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F","\x63\x61\x6C\x6C\x65\x64","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70","\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x61\x64\x64\x65\x64","\x6C\x6F\x67\x69\x6E","\x61\x64\x64\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x65\x6E\x61\x6C\x74\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x65\x6D\x6F\x76\x65\x64","\x6C\x6F\x67\x6F\x75\x74","\x72\x65\x6D\x6F\x76\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E","\x6A\x6F\x69\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65","\x6C\x65\x61\x76\x65","\x63\x64\x72","\x61\x64\x64","\x68\x61\x6E\x67\x75\x70","\x6D\x6F\x6E\x69\x74\x6F\x72\x73\x74\x61\x72\x74","\x6D\x6F\x6E\x69\x74\x6F\x72\x73\x74\x6F\x70","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x74\x79\x70\x65","\x62\x6C\x69\x6E\x64","\x63\x72\x65\x61\x74\x65\x42\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64","\x63\x72\x65\x61\x74\x65\x41\x74\x74\x65\x6E\x64\x65\x64","\x76\x61\x72\x73\x65\x74","\x69\x6E\x62\x6F\x75\x6E\x64","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x2E\x2E\x2F\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x61\x6D\x69"];_0xfcf1[0];var Agent=require(_0xfcf1[1]);var Action=require(_0xfcf1[2]);var Call=require(_0xfcf1[3]);var Member=require(_0xfcf1[4]);var QueueCaller=require(_0xfcf1[5]);var QueueMember=require(_0xfcf1[6]);var Recording=require(_0xfcf1[7]);var Trunk=require(_0xfcf1[8]);var Context=require(_0xfcf1[9]);var ACW=require(_0xfcf1[10]);var User=require(_0xfcf1[11]);var Transfer=require(_0xfcf1[12]);function onDisconnect(_0x3097xe){}function onConnect(_0x3097xe){}function getVariable(_0x3097x11){var _0x3097x12=Object[_0xfcf1[14]](_0x3097x11[_0xfcf1[13]]);_0x3097x11[_0xfcf1[13]]=_0x3097x12[0];return _0x3097x11}module[_0xfcf1[15]]=function(_0x3097xe){var _0x3097x13= new Agent();var _0x3097x14= new Call();var _0x3097x15= new Member();var _0x3097x16= new QueueMember();var _0x3097x17= new QueueCaller();var _0x3097x18= new Recording();var _0x3097x19= new Trunk(_0x3097xe);var _0x3097x1a= new Context(_0x3097xe);var _0x3097x1b= new Action(_0x3097xe);var _0x3097x1c= new ACW(_0x3097xe);var _0x3097x1d= new User();var _0x3097x1e= new Transfer();_0x3097xe[_0xfcf1[23]](_0xfcf1[16],function(){console[_0xfcf1[21]](_0xfcf1[17],_0x3097xe[_0xfcf1[19]][_0xfcf1[18]],_0x3097xe[_0xfcf1[19]][_0xfcf1[20]]);_0x3097xe[_0xfcf1[19]][_0xfcf1[22]]= new Date();onConnect(_0x3097xe)});_0x3097xe[_0xfcf1[23]](_0xfcf1[24],function(){onDisconnect(_0x3097xe);console[_0xfcf1[21]](_0xfcf1[25],_0x3097xe[_0xfcf1[19]][_0xfcf1[18]],_0x3097xe[_0xfcf1[19]][_0xfcf1[20]])});_0x3097xe[_0xfcf1[23]](_0xfcf1[26],function(_0x3097x1f){console[_0xfcf1[28]](_0xfcf1[27],_0x3097xe[_0xfcf1[19]][_0xfcf1[18]],_0x3097xe[_0xfcf1[19]][_0xfcf1[20]],_0x3097x1f)});_0x3097xe[_0xfcf1[23]](_0xfcf1[29],function(_0x3097x20){console[_0xfcf1[28]](_0xfcf1[30],_0x3097xe[_0xfcf1[19]][_0xfcf1[18]],_0x3097xe[_0xfcf1[19]][_0xfcf1[20]],_0x3097x20)});_0x3097xe[_0xfcf1[23]](_0xfcf1[31],function(_0x3097x21){});_0x3097xe[_0xfcf1[23]](_0xfcf1[32],function(_0x3097x21){if(_0x3097x21[_0xfcf1[33]]===_0xfcf1[34]){console[_0xfcf1[28]](_0xfcf1[35],_0x3097x21[_0xfcf1[36]])};if(_0x3097x21[_0xfcf1[33]][_0xfcf1[38]](_0xfcf1[37])===0){_0x3097x1d[_0xfcf1[39]](_0x3097x21)}});_0x3097xe[_0xfcf1[23]](_0xfcf1[40],function(_0x3097x21){if(_0x3097x21[_0xfcf1[41]]===_0xfcf1[42]){console[_0xfcf1[28]](_0xfcf1[40],_0xfcf1[43])};_0x3097x13[_0xfcf1[43]](_0x3097x21);_0x3097x1d[_0xfcf1[44]](_0xfcf1[43],_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[45],function(_0x3097x21){_0x3097x1c[_0xfcf1[45]](_0x3097x21);_0x3097x13[_0xfcf1[46]](_0x3097x21);_0x3097x17[_0xfcf1[46]](_0x3097x21);_0x3097x1d[_0xfcf1[44]](_0xfcf1[46],_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[47],function(_0x3097x21){_0x3097x13[_0xfcf1[16]](_0x3097x21);_0x3097x1d[_0xfcf1[44]](_0xfcf1[16],_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[48],function(_0x3097x21){_0x3097x13[_0xfcf1[49]](_0x3097x21);_0x3097x1d[_0xfcf1[44]](_0xfcf1[46],_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[50],function(_0x3097x21){_0x3097x13[_0xfcf1[51]](_0x3097x21);_0x3097x1d[_0xfcf1[44]](_0xfcf1[46],_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[52],function(_0x3097x21){_0x3097x15[_0xfcf1[53]](_0x3097x21);_0x3097x16[_0xfcf1[54]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[55],function(_0x3097x21){_0x3097x15[_0xfcf1[56]](_0x3097x21);_0x3097x16[_0xfcf1[56]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[57],function(_0x3097x21){_0x3097x16[_0xfcf1[58]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[59],function(_0x3097x21){_0x3097x15[_0xfcf1[60]](_0x3097x21);_0x3097x16[_0xfcf1[61]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[62],function(_0x3097x21){_0x3097x16[_0xfcf1[63]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[64],function(_0x3097x21){_0x3097x16[_0xfcf1[65]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[66],function(_0x3097x21){_0x3097x17[_0xfcf1[67]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[68],function(_0x3097x21){_0x3097x17[_0xfcf1[69]](_0x3097x21);_0x3097x1d[_0xfcf1[44]](_0xfcf1[46],_0x3097x21);_0x3097x13[_0xfcf1[70]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[71],function(_0x3097x21){_0x3097x17[_0xfcf1[72]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[73],function(_0x3097x21){_0x3097x14[_0xfcf1[74]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[75],function(_0x3097x21){});_0x3097xe[_0xfcf1[23]](_0xfcf1[76],function(_0x3097x21){});_0x3097xe[_0xfcf1[23]](_0xfcf1[77],function(_0x3097x21){_0x3097x18[_0xfcf1[79]](_0x3097x21,_0xfcf1[78])});_0x3097xe[_0xfcf1[23]](_0xfcf1[80],function(_0x3097x21){_0x3097x21[_0xfcf1[81]]=_0xfcf1[82];_0x3097x1e[_0xfcf1[83]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[84],function(_0x3097x21){_0x3097x21[_0xfcf1[81]]=_0xfcf1[85];_0x3097x1e[_0xfcf1[86]](_0x3097x21)});_0x3097xe[_0xfcf1[23]](_0xfcf1[87],function(_0x3097x21){var _0x3097x11=getVariable(_0x3097x21);switch(_0x3097x11[_0xfcf1[13]]){case _0xfcf1[89]:_0x3097x18[_0xfcf1[79]](_0x3097x11,_0xfcf1[88]);break;case _0xfcf1[91]:_0x3097x17[_0xfcf1[90]](_0x3097x11);break;default:break}});require(_0xfcf1[93])[_0xfcf1[92]](_0x3097xe);require(_0xfcf1[94])[_0xfcf1[92]](_0x3097xe)}
\ No newline at end of file
+'use strict';
+
+var Agent = require('./agent');
+var Action = require('./action');
+var Call = require('./call');
+var Member = require('./member');
+var QueueCaller = require('./queue_caller');
+var QueueMember = require('./queue_member');
+var Recording = require('./recording');
+var Trunk = require('./trunk');
+var Context = require('./voice_context');
+var ACW = require('./acw');
+var User = require('./user');
+var Transfer = require('./transfer');
+
+// When the ami disconnects.. perform this
+function onDisconnect(ami) {}
+
+// When the ami connects.. perform this
+function onConnect(ami) {}
+
+function getVariable(event) {
+  var keys = Object.keys(event.variable);
+  event.variable = keys[0];
+  return event;
+}
+
+module.exports = function(ami) {
+
+  var agent = new Agent();
+  var call = new Call();
+  var member = new Member();
+  var queuemember = new QueueMember();
+  var queuecaller = new QueueCaller();
+  var recording = new Recording();
+  var trunk = new Trunk(ami);
+  var context = new Context(ami);
+  var action = new Action(ami);
+  var acw = new ACW(ami);
+  var user = new User();
+  var tranfer = new Transfer();
+
+  // Asterisk Status Connect
+
+  // Raised when asterisk is connected
+  ami.on('connect', function() {
+    console.info('[%s:%s] AMI CONNECTED', ami.options.host, ami.options.port);
+    ami.options.connectedAt = new Date();
+    // Call onConnect.
+    onConnect(ami);
+  });
+
+  // Raised when asterisk is disconnected
+  ami.on('disconnect', function() {
+    // Call onDisconnect.
+    onDisconnect(ami);
+    console.info('[%s:%s] AMI DISCONNECTED', ami.options.host, ami.options.port);
+  });
+
+  // Raised when asterisk is closed
+  ami.on('close', function(flag) {
+    console.log('[%s:%s] AMI CLOSE: %s', ami.options.host, ami.options.port, flag);
+  });
+
+  // Raised when asterisk has an error
+  ami.on('error', function(err) {
+    console.log('[%s:%s] AMI ERROR: %s', ami.options.host, ami.options.port, err);
+  });
+
+  ami.on('managerevent', function(evt) {
+    // console.log(evt.event);
+  });
+
+  ami.on('devicestatechange', function(evt) {
+    if (evt.device === 'SIP/massimiliano.bungaro') console.log('statechange', evt.state);
+    if (evt.device.indexOf('SIP/') === 0) {
+      user.stateUpdate(evt);
+    }
+  });
+
+  // Agent Status Events
+
+  // Raised when an Agent is notified of a member in the queue.
+  ami.on('agentcalled', function(evt) {
+    if (evt.membername === 'massimiliano.bungaro') console.log('agentcalled', 'called');
+    agent.called(evt);
+    user.queueStatusUpdate('called', evt);
+  });
+
+  // Raised when an agent has finished servicing a member in the queue.
+  ami.on('agentcomplete', function(evt) {
+    // console.log('agentcomplete', evt);
+    acw.agentcomplete(evt);
+    agent.complete(evt);
+    queuecaller.complete(evt);
+    user.queueStatusUpdate('complete', evt);
+  });
+
+  // Raised when an agent answers and is bridged to a member in the queue.
+  ami.on('agentconnect', function(evt) {
+    // console.log('agentconnect', evt);
+    agent.connect(evt);
+    user.queueStatusUpdate('connect', evt);
+  });
+
+  // Raised when an agent hangs up on a member in the queue.
+  ami.on('agentdump', function(evt) {
+    agent.dump(evt);
+    user.queueStatusUpdate('complete', evt);
+  });
+
+  // Raised when an agent is notified of a member in the queue and fails to answer.
+  ami.on('agentringnoanswer', function(evt) {
+    agent.ringnoanswer(evt);
+    user.queueStatusUpdate('complete', evt);
+  });
+
+  // Member Status Events in Queue
+
+  // Raised when a member is added to the queue.
+  ami.on('queuememberadded', function(evt) {
+    member.login(evt);
+    queuemember.added(evt);
+  });
+
+  // Raised when a member is paused/unpaused in the queue with a reason.
+  ami.on('queuememberpause', function(evt) {
+    member.pause(evt);
+    queuemember.pause(evt);
+  });
+
+  // Raised when a member's penalty is changed.
+  ami.on('queuememberpenalty', function(evt) {
+    queuemember.penalty(evt);
+  });
+
+  // Raised when a member is removed from the queue.
+  ami.on('queuememberremoved', function(evt) {
+    member.logout(evt);
+    queuemember.removed(evt);
+  });
+
+  // Raised when a member's ringinuse setting is changed.
+  ami.on('queuememberringinuse', function(evt) {
+    queuemember.ringinuse(evt);
+  });
+
+  // Raised when a Queue member's status has changed.
+  ami.on('queuememberstatus', function(evt) {
+    queuemember.status(evt);
+  });
+
+  // Queue Status Events
+
+  // Raised when a caller joins a Queue.
+  ami.on('queuecallerjoin', function(evt) {
+    queuecaller.join(evt);
+  });
+
+  // Raised when a caller abandons the queue.
+  ami.on('queuecallerabandon', function(evt) {
+    queuecaller.abandon(evt);
+    //queuemember.callerabandon(evt);
+    user.queueStatusUpdate('complete', evt);
+    agent.callerabandon(evt);
+  });
+
+  // Raised when a caller leaves a Queue.
+  ami.on('queuecallerleave', function(evt) {
+    queuecaller.leave(evt);
+  });
+
+  // Cdr Status Events
+
+  // Raised when a CDR is generated.
+  ami.on('cdr', function(evt) {
+    call.add(evt);
+  });
+
+  // Hangup Status Events
+  ami.on('hangup', function(evt) {
+    //agent.hangup(evt);
+  });
+
+  // Recordings Events
+  ami.on('monitorstart', function(evt) {
+    // console.log('evt', evt);
+  });
+
+  ami.on('monitorstop', function(evt) {
+    // console.log('evt', evt);
+    recording.create(evt, 'outbound');
+  });
+
+  ami.on('blindtransfer', function(evt) {
+    // console.log('blindtransfer', evt);
+    evt.type = 'blind';
+    tranfer.createBlind(evt);
+  });
+
+  ami.on('attendedtransfer', function(evt) {
+    // console.log('attendedtransfer', evt);
+    evt.type = 'attended';
+    tranfer.createAttended(evt);
+  });
+
+  // Variable Events
+  ami.on('varset', function(evt) {
+    var event = getVariable(evt);
+    switch (event.variable) {
+      case 'mixmonitor_filename':
+        recording.create(event, 'inbound');
+        break;
+      case 'queuestatus':
+        queuecaller.exit(event);
+        break;
+      default:
+        // console.log('Variable not managed:', event.variable);
+        break;
+    }
+  });
+
+  require('./../fax').register(ami);
+  require('../../api/ami/ami.ami').register(ami);
+};
index 4317a57..0c4d403 100644 (file)
@@ -1 +1,111 @@
-var _0x16d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6C\x6F\x67\x69\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x4C\x4F\x47\x49\x4E","\x65\x6E\x74\x65\x72\x64\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67\x6F\x75\x74","\x65\x78\x69\x74\x64\x61\x74\x65","\x70\x61\x75\x73\x65","\x50\x41\x55\x53\x45","\x70\x61\x75\x73\x65\x64","\x72\x65\x61\x73\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x16d5[0];var moment=require(_0x16d5[1]);var member=require(_0x16d5[3])[_0x16d5[2]];function Member(){console[_0x16d5[5]](_0x16d5[4])}Member[_0x16d5[7]][_0x16d5[6]]=function(_0x7d17x4){_0x7d17x4[_0x16d5[8]]=0;_0x7d17x4[_0x16d5[9]]=_0x16d5[10];_0x7d17x4[_0x16d5[11]]=moment()[_0x16d5[13]](_0x16d5[12]);findOrCreate(_0x7d17x4)};Member[_0x16d5[7]][_0x16d5[14]]=function(_0x7d17x4){_0x7d17x4[_0x16d5[8]]=0;_0x7d17x4[_0x16d5[9]]=_0x16d5[10];_0x7d17x4[_0x16d5[15]]=moment()[_0x16d5[13]](_0x16d5[12]);findAndUpdate(_0x7d17x4)};Member[_0x16d5[7]][_0x16d5[16]]=function(_0x7d17x4){_0x7d17x4[_0x16d5[8]]=1;_0x7d17x4[_0x16d5[9]]=_0x16d5[17];var _0x7d17x5=parseInt(_0x7d17x4[_0x16d5[18]],10);if(_0x7d17x5){_0x7d17x4[_0x16d5[11]]=moment()[_0x16d5[13]](_0x16d5[12]);findOrCreate(_0x7d17x4)}else {if(_0x7d17x4[_0x16d5[19]]){delete _0x7d17x4[_0x16d5[19]]};_0x7d17x4[_0x16d5[15]]=moment()[_0x16d5[13]](_0x16d5[12]);findAndUpdate(_0x7d17x4)}};function findOrCreate(_0x7d17x4){}function findAndUpdate(_0x7d17x4){}module[_0x16d5[20]]=Member
\ No newline at end of file
+'use strict';
+
+var moment = require('moment');
+
+var member = require('../../models').ReportMember;
+
+function Member() {
+  console.log('Member Initialization...');
+
+
+}
+
+Member.prototype.login = function (evt) {
+  evt.state = 0;
+  evt.statedesc = 'LOGIN';
+
+  evt.enterdate = moment().format("YYYY-MM-DD HH:mm:ss");
+
+  findOrCreate(evt);
+}
+
+Member.prototype.logout = function (evt) {
+  evt.state = 0;
+  evt.statedesc = 'LOGIN';
+
+  evt.exitdate = moment().format("YYYY-MM-DD HH:mm:ss");
+  findAndUpdate(evt);
+}
+
+Member.prototype.pause = function (evt) {
+  evt.state = 1;
+  evt.statedesc = 'PAUSE';
+
+  var paused = parseInt(evt.paused, 10);
+  if (paused) {
+    evt.enterdate = moment().format("YYYY-MM-DD HH:mm:ss");
+    findOrCreate(evt);
+  } else {
+    if (evt.reason) {
+      delete evt.reason;
+    }
+
+    evt.exitdate = moment().format("YYYY-MM-DD HH:mm:ss");
+    findAndUpdate(evt);
+  }
+}
+
+function findOrCreate(evt) {
+  // member.
+  // findOne({
+  //   where: {
+  //     queue: evt.queue,
+  //     membername: evt.membername,
+  //     state: evt.state,
+  //   }
+  // });
+
+  // member
+  //   .findOrCreate({
+  //     where: {
+  //       queue: evt.queue,
+  //       membername: evt.membername,
+  //       state: evt.state,
+  //       enterdate: {
+  //         $ne: null
+  //       },
+  //       exitdate: null
+  //     },
+  //     defaults: evt
+  //   })
+  //   .spread(function(mem, created) {
+  //     if (created) {
+  //       console.log('[member] member created');
+  //     } else {
+  //       console.log('[member] member exist');
+  //       mem
+  //         .updateAttributes({
+  //           exitdate: moment().format("YYYY-MM-DD HH:mm:ss")
+  //         })
+  //         .then(function(res) {
+  //           console.log('[member] member updated');
+  //           findOrCreate(evt);
+  //         });
+  //     }
+  //   });
+}
+
+function findAndUpdate(evt) {
+  // var member = require('../../models').ReportMember;
+  // member
+  //   .update(evt, {
+  //     where: {
+  //       queue: evt.queue,
+  //       membername: evt.membername,
+  //       state: evt.state,
+  //       enterdate: {
+  //         $ne: null
+  //       },
+  //       exitdate: null,
+  //       reason: null
+  //     }
+  //   })
+  //   .then(function(member) {
+  //     console.log('[member] member updated');
+  //   })
+  //   .catch(function(err) {
+  //     console.error('[member] member error: ' + err);
+  //   });
+}
+
+module.exports = Member;
index 8d5995b..d5ebc2a 100644 (file)
@@ -1 +1,69 @@
-var _0x30dd=["\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6A\x6F\x69\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x65\x61\x76\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x76\x61\x6C\x75\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x5D\x20\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x5D\x20\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x20\x75\x70\x64\x61\x74\x65\x64","\x69\x6E\x66\x6F","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x30dd[0]);var ReportQueue=require(_0x30dd[2])[_0x30dd[1]];function QueueCaller(){console[_0x30dd[4]](_0x30dd[3])}QueueCaller[_0x30dd[6]][_0x30dd[5]]=function(_0xa424x4){_0xa424x4[_0x30dd[7]]=moment()[_0x30dd[9]](_0x30dd[8]);return create(_0xa424x4)};QueueCaller[_0x30dd[6]][_0x30dd[10]]=function(_0xa424x4){_0xa424x4[_0x30dd[11]]=moment()[_0x30dd[9]](_0x30dd[8]);return findAndUpdate(_0xa424x4)};QueueCaller[_0x30dd[6]][_0x30dd[12]]=function(_0xa424x4){_0xa424x4[_0x30dd[13]]=true;_0xa424x4[_0x30dd[14]]=moment()[_0x30dd[9]](_0x30dd[8]);return findAndUpdate(_0xa424x4)};QueueCaller[_0x30dd[6]][_0x30dd[15]]=function(_0xa424x4){_0xa424x4[_0x30dd[16]]=true;_0xa424x4[_0x30dd[17]]=moment()[_0x30dd[9]](_0x30dd[8]);return findAndUpdate(_0xa424x4)};QueueCaller[_0x30dd[6]][_0x30dd[18]]=function(_0xa424x4){_0xa424x4[_0x30dd[13]]=false;_0xa424x4[_0x30dd[14]]=null;_0xa424x4[_0x30dd[19]]=true;_0xa424x4[_0x30dd[20]]=moment()[_0x30dd[9]](_0x30dd[8]);_0xa424x4[_0x30dd[21]]=_0xa424x4[_0x30dd[23]][_0x30dd[22]]();return findAndUpdate(_0xa424x4)};function create(_0xa424x4){return ReportQueue[_0x30dd[29]](_0xa424x4)[_0x30dd[28]](function(_0xa424x7){console[_0x30dd[4]](_0x30dd[27])})[_0x30dd[26]](function(_0xa424x6){console[_0x30dd[25]](_0x30dd[24]+_0xa424x6)})}function findAndUpdate(_0xa424x4){return ReportQueue[_0x30dd[34]](_0xa424x4,{where:{uniqueid:_0xa424x4[_0x30dd[33]]},individualHooks:true})[_0x30dd[28]](function(_0xa424x7){console[_0x30dd[32]](_0x30dd[31])})[_0x30dd[26]](function(_0xa424x6){console[_0x30dd[25]](_0x30dd[30]+_0xa424x6)})}module[_0x30dd[35]]=QueueCaller
\ No newline at end of file
+var moment = require('moment');
+
+var ReportQueue = require('../../models').ReportQueue;
+
+function QueueCaller() {
+  console.log('QueueCaller Initialization...');
+}
+
+QueueCaller.prototype.join = function(evt) {
+  evt.queuecallerjoinAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return create(evt);
+}
+
+QueueCaller.prototype.leave = function(evt) {
+  evt.queuecallerleaveAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return findAndUpdate(evt);
+}
+
+QueueCaller.prototype.abandon = function(evt) {
+  evt.queuecallerabandon = true;
+  evt.queuecallerabandonAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return findAndUpdate(evt);
+}
+
+QueueCaller.prototype.complete = function(evt) {
+  evt.queuecallercomplete = true;
+  evt.queuecallercompleteAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return findAndUpdate(evt);
+}
+
+QueueCaller.prototype.exit = function(evt) {
+  evt.queuecallerabandon = false;
+  evt.queuecallerabandonAt = null;
+
+  evt.queuecallerexit = true;
+  evt.queuecallerexitAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  evt.queuecallerexitreason = evt.value.toLowerCase();
+
+  return findAndUpdate(evt);
+}
+
+function create(evt) {
+  return ReportQueue
+    .create(evt)
+    .then(function(queue) {
+      console.log('[report] queue created');
+    })
+    .catch(function(err) {
+      console.error('[report] queue ' + err);
+    });
+}
+
+function findAndUpdate(evt) {
+  return ReportQueue
+    .update(evt, {
+      where: {
+        uniqueid: evt.uniqueid
+      },
+      individualHooks: true
+    })
+    .then(function(queue) {
+      console.info('[queue_caller] queue_caller updated');
+    })
+    .catch(function(err) {
+      console.error('[queue_caller] queue_caller error: ' + err);
+    });
+}
+
+module.exports = QueueCaller;
index 3994f7d..f7417d4 100644 (file)
@@ -1 +1,54 @@
-var _0xa543=["\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x64\x64\x65\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x6F\x67\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x64\x41\x74","\x70\x61\x75\x73\x65\x64","\x70\x65\x6E\x61\x6C\x74\x79","\x72\x65\x6D\x6F\x76\x65\x64","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x73\x74\x61\x74\x75\x73","\x5B\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x6D\x65\x6D\x62\x65\x72\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x6D\x65\x6D\x62\x65\x72","\x74\x68\x65\x6E","\x71\x75\x65\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0xa543[0]);var UserHasVoiceQueue=require(_0xa543[2])[_0xa543[1]];function QueueMember(){console[_0xa543[4]](_0xa543[3])}QueueMember[_0xa543[6]][_0xa543[5]]=function(_0xb5c8x4){_0xb5c8x4[_0xa543[7]]=true;_0xb5c8x4[_0xa543[8]]=moment()[_0xa543[10]](_0xa543[9]);return findAndUpdate(_0xb5c8x4)};QueueMember[_0xa543[6]][_0xa543[11]]=function(_0xb5c8x4){_0xb5c8x4[_0xa543[12]]=(parseInt(_0xb5c8x4[_0xa543[13]],10))?moment()[_0xa543[10]](_0xa543[9]):null;return findAndUpdate(_0xb5c8x4)};QueueMember[_0xa543[6]][_0xa543[14]]=function(_0xb5c8x4){return findAndUpdate(_0xb5c8x4)};QueueMember[_0xa543[6]][_0xa543[15]]=function(_0xb5c8x4){_0xb5c8x4[_0xa543[7]]=false;_0xb5c8x4[_0xa543[8]]=null;return findAndUpdate(_0xb5c8x4)};QueueMember[_0xa543[6]][_0xa543[16]]=function(_0xb5c8x4){return findAndUpdate(_0xb5c8x4)};QueueMember[_0xa543[6]][_0xa543[17]]=function(_0xb5c8x4){return findAndUpdate(_0xb5c8x4)};function findAndUpdate(_0xb5c8x4,_0xb5c8x6){return UserHasVoiceQueue[_0xa543[25]](_0xb5c8x4,{where:{queue:_0xb5c8x4[_0xa543[23]],membername:_0xb5c8x4[_0xa543[24]]},individualHooks:true})[_0xa543[22]](function(_0xb5c8x8){console[_0xa543[4]](_0xa543[21])})[_0xa543[20]](function(_0xb5c8x7){console[_0xa543[19]](_0xa543[18]+_0xb5c8x7)})}module[_0xa543[26]]=QueueMember
\ No newline at end of file
+var moment = require('moment');
+var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
+
+function QueueMember() {
+  console.log('QueueMember Initialization...');
+}
+
+QueueMember.prototype.added = function(evt) {
+  evt.logged = true;
+  evt.loggedAt = moment().format("YYYY-MM-DD HH:mm:ss");
+  return findAndUpdate(evt);
+}
+
+QueueMember.prototype.pause = function(evt) {
+  evt.pausedAt = (parseInt(evt.paused, 10)) ? moment().format("YYYY-MM-DD HH:mm:ss") : null;
+  return findAndUpdate(evt);
+}
+
+QueueMember.prototype.penalty = function(evt) {
+  return findAndUpdate(evt);
+}
+
+QueueMember.prototype.removed = function(evt) {
+  evt.logged = false;
+  evt.loggedAt = null;
+  return findAndUpdate(evt);
+}
+
+QueueMember.prototype.ringinuse = function(evt) {
+  return findAndUpdate(evt);
+}
+
+QueueMember.prototype.status = function(evt) {
+  return findAndUpdate(evt);
+}
+
+function findAndUpdate(evt, options) {
+  return UserHasVoiceQueue
+    .update(evt, {
+      where: {
+        queue: evt.queue,
+        membername: evt.membername
+      },
+      individualHooks: true
+    })
+    .then(function(member) {
+      console.log('[queuemember] update member');
+    })
+    .catch(function(err) {
+      console.error('[queuemember] update member error: ' + err);
+    });
+}
+
+module.exports = QueueMember;
index 05f3b17..1d22902 100644 (file)
@@ -1 +1,22 @@
-var _0xf82e=["\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x79\x70\x65","\x72\x63\x6F\x72\x64\x69\x6E\x67\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x65\x78\x70\x6F\x72\x74\x73"];var VoiceRecording=require(_0xf82e[1])[_0xf82e[0]];function Recording(){console[_0xf82e[3]](_0xf82e[2])}Recording[_0xf82e[5]][_0xf82e[4]]=function(_0xccdbx3,_0xccdbx4){create(_0xccdbx3,_0xccdbx4)};function create(_0xccdbx3,_0xccdbx4){_0xccdbx3[_0xf82e[6]]=_0xccdbx4;return VoiceRecording[_0xf82e[4]](_0xccdbx3)[_0xf82e[10]](function(){})[_0xf82e[9]](function(_0xccdbx6){console[_0xf82e[8]](_0xf82e[7]+_0xccdbx6)})}module[_0xf82e[11]]=Recording
\ No newline at end of file
+var VoiceRecording = require('../../models').VoiceRecording;
+
+function Recording() {
+  console.log('Recording Initialization...');
+}
+
+Recording.prototype.create = function(evt, type) {
+  create(evt, type);
+}
+
+function create(evt, type) {
+  evt.type = type;
+
+  return VoiceRecording
+    .create(evt)
+    .then(function() {})
+    .catch(function(err) {
+      console.error('rcording ' + err);
+    });
+}
+
+module.exports = Recording;
index 8c301a4..0a82a2b 100644 (file)
@@ -1 +1,19 @@
-var _0xdf62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4E\x65\x77\x20\x73\x6F\x63\x6B\x65\x74\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x6C\x6F\x67","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x74\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdf62[0];function Socket(_0xae9cx2,_0xae9cx3){console[_0xdf62[2]](_0xdf62[1]);var _0xae9cx4=require(_0xdf62[4])[_0xdf62[3]];return {test:function(){console[_0xdf62[2]](_0xdf62[5])}}}module[_0xdf62[6]]=Socket
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+function Socket(socket, ami) {
+  console.log('New socket connection');
+
+  var ReportAgent = require('../../models').ReportAgent;
+
+  return {
+    test: function () {
+      console.log('test');
+    }
+  }
+}
+
+module.exports = Socket;
index 777606d..9c903b6 100644 (file)
@@ -1 +1,43 @@
-var _0x31d2=["\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x54\x72\x61\x6E\x73\x66\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x61\x6E\x73\x66\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x42\x6C\x69\x6E\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5B\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x41\x74\x74\x65\x6E\x64\x65\x64","\x61\x74\x74\x65\x6E\x64\x65\x64","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x31d2[0]);var ReportTransfer=require(_0x31d2[2])[_0x31d2[1]];function Transfer(){console[_0x31d2[4]](_0x31d2[3])}Transfer[_0x31d2[6]][_0x31d2[5]]=function(_0xc73dx4){return ReportTransfer[_0x31d2[12]](_0xc73dx4)[_0x31d2[11]](function(_0xc73dx6){console[_0x31d2[4]](_0x31d2[10])})[_0x31d2[9]](function(_0xc73dx5){console[_0x31d2[8]](_0x31d2[7]+_0xc73dx5)})};Transfer[_0x31d2[6]][_0x31d2[13]]=function(_0xc73dx4){return ReportTransfer[_0x31d2[12]]({type:_0x31d2[14],transferercalleridnum:_0xc73dx4[_0x31d2[15]],transferercalleridname:_0xc73dx4[_0x31d2[16]],transfererconnectedlinenum:_0xc73dx4[_0x31d2[17]],transfererconnectedlinename:_0xc73dx4[_0x31d2[18]],transferercontext:_0xc73dx4[_0x31d2[19]],transfererexten:_0xc73dx4[_0x31d2[20]],transfereecontext:_0xc73dx4[_0x31d2[21]],transfereeexten:_0xc73dx4[_0x31d2[22]],transfereruniqueid:_0xc73dx4[_0x31d2[23]],transfererlinkedid:_0xc73dx4[_0x31d2[24]],extension:_0xc73dx4[_0x31d2[20]]})[_0x31d2[11]](function(_0xc73dx6){console[_0x31d2[4]](_0x31d2[10])})[_0x31d2[9]](function(_0xc73dx5){console[_0x31d2[8]](_0x31d2[7]+_0xc73dx5)})};module[_0x31d2[25]]=Transfer
\ No newline at end of file
+var moment = require('moment');
+var ReportTransfer = require('../../models').ReportTransfer;
+
+function Transfer() {
+  console.log('Transfer Initialization...');
+}
+
+Transfer.prototype.createBlind = function(evt) {
+  return ReportTransfer
+    .create(evt)
+    .then(function(member) {
+      console.log('[tranfer] created');
+    })
+    .catch(function(err) {
+      console.error('[tranfer] created error: ' + err);
+    });
+}
+
+Transfer.prototype.createAttended = function(evt) {
+  return ReportTransfer
+    .create({
+      type: 'attended',
+      transferercalleridnum: evt.origtransferercalleridnum,
+      transferercalleridname: evt.origtransferercalleridname,
+      transfererconnectedlinenum: evt.secondtransfererconnectedlinenum,
+      transfererconnectedlinename: evt.secondtransfererconnectedlinename,
+      transferercontext: evt.origtransferercontext,
+      transfererexten: evt.origtransfererexten,
+      transfereecontext: evt.secondtransferercontext,
+      transfereeexten: evt.secondtransfererexten,
+      transfereruniqueid: evt.secondtransfereruniqueid,
+      transfererlinkedid: evt.secondtransfererlinkedid,
+      extension: evt.origtransfererexten,
+    })
+    .then(function(member) {
+      console.log('[tranfer] created');
+    })
+    .catch(function(err) {
+      console.error('[tranfer] created error: ' + err);
+    });
+}
+
+module.exports = Transfer;
index 6603970..638620f 100644 (file)
@@ -1 +1,124 @@
-var _0x8146=["\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","","\x72\x65\x67\x69\x73\x74\x65\x72\x20\x3D\x3E\x20\x25\x73\x0A","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x6C\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x5B\x25\x73\x5D\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x74\x68\x65\x72\x46\x69\x65\x6C\x64\x73","\x25\x73\x0A","\x3B","\x73\x70\x6C\x69\x74","\x25\x73\x3D\x25\x73\x0A","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C\x6F\x77","\x72\x65\x67\x69\x73\x74\x72\x79","\x63\x61\x74\x63\x68","\x6D\x61\x70","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x54\x72\x75\x6E\x6B\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];var TrunkModel=require(_0x8146[1])[_0x8146[0]];var fs=require(_0x8146[2]);var util=require(_0x8146[3]);var path=require(_0x8146[4]);var config=require(_0x8146[5]);var _=require(_0x8146[6]);function Trunk(_0xb186x8){console[_0x8146[8]](_0x8146[7]);TrunkModel[_0x8146[9]](function(_0xb186x9){trunksRewrite(_0xb186x9,_0xb186x8,false)});TrunkModel[_0x8146[10]](function(_0xb186x9){trunksRewrite(_0xb186x9,_0xb186x8,false)});TrunkModel[_0x8146[11]](function(_0xb186x9){trunksRewrite(_0xb186x9,_0xb186x8,true)})}function trunksRewrite(_0xb186x9,_0xb186x8,_0xb186xb){var _0xb186xc=_0x8146[12];var _0xb186xd=_0x8146[12];var _0xb186xe=_0x8146[13];if(!_0xb186xb){var _0xb186xf=_[_0x8146[15]](_0xb186x9[_0x8146[14]]);delete _0xb186xf[_0x8146[16]];delete _0xb186xf[_0x8146[17]];_0xb186xc+=util[_0x8146[20]](_0x8146[18],_0xb186xf[_0x8146[19]]);if(_0xb186xf[_0x8146[21]]){_0xb186xc+=util[_0x8146[20]](_0x8146[22],_0xb186xf[_0x8146[21]]);delete _0xb186xf[_0x8146[21]]};for(var _0xb186x10 in _0xb186xf){if(_0xb186xf[_0xb186x10]){switch(_0xb186x10){case _0x8146[27]:var _0xb186x11=_0xb186xf[_0xb186x10][_0x8146[24]](_0x8146[23]);_0xb186x11[_0x8146[26]](function(_0xb186x12){_0xb186xc+=util[_0x8146[20]](_0x8146[25],_0xb186x10,_0xb186x12)});break;default:_0xb186xc+=util[_0x8146[20]](_0x8146[25],_0xb186x10,_0xb186xf[_0xb186x10])}}};if(_0xb186xf[_0x8146[28]]){_0xb186xd+=util[_0x8146[20]](_0xb186xe,_0xb186xf[_0x8146[28]])}};return TrunkModel[_0x8146[41]]({where:{name:{$ne:_0xb186x9[_0x8146[19]]}}})[_0x8146[40]](function(_0xb186x14){var _0xb186x15=_[_0x8146[30]](_0xb186x14,_0x8146[14]);_0xb186x15[_0x8146[26]](function(_0xb186x16){delete _0xb186x16[_0x8146[16]];delete _0xb186x16[_0x8146[17]];_0xb186xc+=util[_0x8146[20]](_0x8146[18],_0xb186x16[_0x8146[19]]);if(_0xb186x16[_0x8146[21]]){_0xb186xc+=util[_0x8146[20]](_0x8146[22],_0xb186x16[_0x8146[21]]);delete _0xb186x16[_0x8146[21]]};for(var _0xb186x10 in _0xb186x16){if(_0xb186x16[_0xb186x10]){switch(_0xb186x10){case _0x8146[27]:var _0xb186x11=_0xb186x16[_0xb186x10][_0x8146[24]](_0x8146[23]);_0xb186x11[_0x8146[26]](function(_0xb186x12){_0xb186xc+=util[_0x8146[20]](_0x8146[25],_0xb186x10,_0xb186x12)});break;default:_0xb186xc+=util[_0x8146[20]](_0x8146[25],_0xb186x10,_0xb186x16[_0xb186x10])}}};if(_0xb186x16[_0x8146[28]]){_0xb186xd+=util[_0x8146[20]](_0xb186xe,_0xb186x16[_0x8146[28]])}});fs[_0x8146[39]](path[_0x8146[33]](config[_0x8146[31]],_0x8146[32]),_0xb186xc,{flags:_0x8146[34],mode:parseInt(_0x8146[35],8)},function(_0xb186x13){if(_0xb186x13){throw _0xb186x13};console[_0x8146[8]](_0x8146[36]);fs[_0x8146[39]](path[_0x8146[33]](config[_0x8146[31]],_0x8146[37]),_0xb186xd,{flags:_0x8146[34],mode:parseInt(_0x8146[35],8)},function(_0xb186x13){if(_0xb186x13){throw _0xb186x13};reload(_0xb186x8);console[_0x8146[8]](_0x8146[38])})})})[_0x8146[29]](function(_0xb186x13){console[_0x8146[8]](_0xb186x13)})}function reload(_0xb186x8){_0xb186x8[_0x8146[44]]({Action:_0x8146[42]},function(_0xb186x13,_0xb186x18){if(_0xb186x13){console[_0x8146[43]](_0xb186x13)}else {console[_0x8146[8]](_0xb186x18)}})}module[_0x8146[45]]=Trunk
\ No newline at end of file
+var TrunkModel = require('../../models').Trunk;
+var fs = require('fs');
+var util = require('util');
+var path = require('path');
+var config = require('../../config/environment');
+var _ = require('lodash');
+
+function Trunk(ami) {
+  console.log('Trunk Initialization...');
+  TrunkModel.afterCreate(function(doc) {
+    trunksRewrite(doc, ami, false);
+  })
+  TrunkModel.afterUpdate(function(doc) {
+    trunksRewrite(doc, ami, false);
+  })
+  TrunkModel.afterDelete(function(doc) {
+    trunksRewrite(doc, ami, true);
+  })
+}
+
+function trunksRewrite(doc, ami, deleteTrunk) {
+  var trunksFile = '';
+  var trunksRegistersFile = '';
+  var registryString = 'register => %s\n';
+  if (!deleteTrunk) {
+    var newTrunk = _.clone(doc.dataValues);
+    delete newTrunk.createdAt;
+    delete newTrunk.updatedAt;
+    trunksFile += util.format('[%s]\n', newTrunk.name);
+    if (newTrunk.otherFields) {
+      trunksFile += util.format('%s\n', newTrunk.otherFields);
+      delete newTrunk.otherFields;
+    }
+    for (var key in newTrunk) {
+      if (newTrunk[key]) {
+        switch (key) {
+          case 'allow':
+            var codecs = newTrunk[key].split(';');
+            codecs.forEach(function(elem) {
+              trunksFile += util.format('%s=%s\n', key, elem);
+            })
+            break;
+          default:
+            trunksFile += util.format('%s=%s\n', key, newTrunk[key]);
+        }
+      }
+    }
+    if (newTrunk.registry) {
+      trunksRegistersFile += util.format(registryString, newTrunk.registry);
+    }
+  }
+  return TrunkModel
+    .findAll({
+      where: {
+        name: {
+          $ne: doc.name
+        }
+      }
+    })
+    .then(function(trunks) {
+      var oldTrunks = _.map(trunks, 'dataValues');
+      oldTrunks.forEach(function(element) {
+        delete element.createdAt;
+        delete element.updatedAt;
+        trunksFile += util.format('[%s]\n', element.name);
+        if (element.otherFields) {
+          trunksFile += util.format('%s\n', element.otherFields);
+          delete element.otherFields;
+        }
+        for (var key in element) {
+          if (element[key]) {
+            switch (key) {
+              case 'allow':
+                var codecs = element[key].split(';');
+                codecs.forEach(function(elem) {
+                  trunksFile += util.format('%s=%s\n', key, elem);
+                })
+                break;
+              default:
+                trunksFile += util.format('%s=%s\n', key, element[key]);
+            }
+          }
+        }
+        if (element.registry) {
+          trunksRegistersFile += util.format(registryString, element.registry);
+        }
+      });
+      fs.writeFile(path.join(config.asteriskConf, 'sip_xcally_trunks.conf'), trunksFile, {
+        flags: 'w',
+        mode: parseInt('0777', 8)
+      }, function(err) {
+        if (err) throw err;
+        console.log("Trunks file saved!");
+        fs.writeFile(path.join(config.asteriskConf, 'sip_xcally_registers.conf'), trunksRegistersFile, {
+          flags: 'w',
+          mode: parseInt('0777', 8)
+        }, function(err) {
+          if (err) throw err;
+          reload(ami);
+          console.log("Trunks register file saved!");
+        });
+      });
+
+
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function reload(ami) {
+  ami.action({
+    Action: 'Reload'
+  }, function(err, res) {
+    if (err) {
+      console.error(err);
+    } else {
+      console.log(res);
+    }
+  });
+}
+
+
+module.exports = Trunk;
index a8c29e1..4db66fb 100644 (file)
@@ -1 +1,50 @@
-var _0xc498=["\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x65\x55\x70\x64\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x74\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x49\x50\x2F","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x65\x76\x69\x63\x65","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x71\x75\x65\x75\x65","\x65\x76\x65\x6E\x74","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0xc498[0]);var UserModel=require(_0xc498[2])[_0xc498[1]];function User(){console[_0xc498[4]](_0xc498[3])}User[_0xc498[6]][_0xc498[5]]=function(_0xe801x4){var _0xe801x5={status:_0xe801x4[_0xc498[7]],statusAt:moment()[_0xc498[9]](_0xc498[8])};var _0xe801x6={name:_0xe801x4[_0xc498[13]][_0xc498[12]](_0xc498[10],_0xc498[11])};return findAndUpdate(_0xe801x5,_0xe801x6)};User[_0xc498[6]][_0xc498[14]]=function(_0xe801x7,_0xe801x4){var _0xe801x5={queueStatus:_0xe801x7,queueStatusAt:moment()[_0xc498[9]](_0xc498[8]),lastQueue:_0xe801x4[_0xc498[15]]};var _0xe801x6=(_0xe801x4[_0xc498[16]]===_0xc498[17])?{lastQueue:_0xe801x4[_0xc498[15]]}:{name:_0xe801x4[_0xc498[18]]};return findAndUpdate(_0xe801x5,_0xe801x6)};function findAndUpdate(_0xe801x5,_0xe801x6){return UserModel[_0xc498[24]](_0xe801x5,{where:_0xe801x6,individualHooks:true})[_0xc498[23]](function(_0xe801xa){console[_0xc498[4]](_0xc498[22])})[_0xc498[21]](function(_0xe801x9){console[_0xc498[20]](_0xc498[19]+_0xe801x9)})}module[_0xc498[25]]=User
\ No newline at end of file
+var moment = require('moment');
+var UserModel = require('../../models').User;
+
+function User() {
+  console.log('QueueMember Initialization...');
+}
+
+User.prototype.stateUpdate = function(evt) {
+  var obj = {
+    status: evt.state,
+    statusAt: moment().format("YYYY-MM-DD HH:mm:ss")
+  }
+  var condition = {
+    name: evt.device.replace('SIP/', '')
+  };
+  return findAndUpdate(obj, condition);
+}
+
+User.prototype.queueStatusUpdate = function(status, evt) {
+  var obj = {
+    queueStatus: status,
+    queueStatusAt: moment().format("YYYY-MM-DD HH:mm:ss"),
+    lastQueue: evt.queue
+  }
+  var condition = (evt.event === 'QueueCallerAbandon') ? {
+    lastQueue: evt.queue
+  } : {
+    name: evt.membername
+  };
+  return findAndUpdate(obj, condition);
+}
+
+
+function findAndUpdate(obj, condition) {
+  // console.log('userupdate', condition);
+  // console.log('status', obj.status);
+  return UserModel
+    .update(obj, {
+      where: condition,
+      individualHooks: true
+    })
+    .then(function(member) {
+      console.log('[user] status update');
+    })
+    .catch(function(err) {
+      console.error('[user] status update error: ' + err);
+    });
+}
+
+module.exports = User;
index 164ff2e..4b4a8ef 100644 (file)
@@ -1 +1,92 @@
-var _0xd22d=["\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x44\x65\x6C\x65\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","","\x5B\x25\x73\x5D\x0A\x73\x77\x69\x74\x63\x68\x20\x3D\x3E\x20\x52\x65\x61\x6C\x74\x69\x6D\x65\x0A","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x43\x6F\x6E\x74\x65\x78\x74\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x68","\x6E","\x61\x6E\x79","\x48\x61\x6E\x67\x75\x70","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var VoiceContext=require(_0xd22d[1])[_0xd22d[0]];var VoiceExtension=require(_0xd22d[1])[_0xd22d[2]];var fs=require(_0xd22d[3]);var util=require(_0xd22d[4]);var path=require(_0xd22d[5]);var config=require(_0xd22d[6]);function Context(_0x7398x8){VoiceContext[_0xd22d[12]](function(_0x7398x9){if(_0x7398x9[_0xd22d[8]](_0xd22d[7])){throw  new Error(_0xd22d[9])};if(_0x7398x9[_0xd22d[10]]){throw  new Error(_0xd22d[11])}});VoiceContext[_0xd22d[14]](function(_0x7398xa){if(_0x7398xa[_0xd22d[10]]){throw  new Error(_0xd22d[13])}});VoiceContext[_0xd22d[15]](function(_0x7398xb){rewriteContexts(_0x7398xb,_0x7398x8,false);createHangup(_0x7398xb)});VoiceContext[_0xd22d[16]](function(_0x7398xb){rewriteContexts(_0x7398xb,_0x7398x8,true)})}function rewriteContexts(_0x7398xb,_0x7398x8,_0x7398xd){var _0x7398xe=_0xd22d[17];if(!_0x7398xd){_0x7398xe=util[_0xd22d[19]](_0xd22d[18],_0x7398xb[_0xd22d[7]])};VoiceContext[_0xd22d[35]]({where:{id:{$ne:_0x7398xb[_0xd22d[34]]}}})[_0xd22d[33]](function(_0x7398x10){_0x7398x10[_0xd22d[22]](function(_0x7398x11){_0x7398xe+=util[_0xd22d[19]](_0xd22d[18],_0x7398x11[_0xd22d[7]])});fs[_0xd22d[32]](path[_0xd22d[25]](config[_0xd22d[23]],_0xd22d[24]),_0x7398xe,{flags:_0xd22d[26],mode:parseInt(_0xd22d[27],8)},function(_0x7398xf){if(_0x7398xf){throw _0x7398xf};console[_0xd22d[20]](_0xd22d[28]);_0x7398x8[_0xd22d[31]]({Action:_0xd22d[29]},function(_0x7398xf,_0x7398x12){if(_0x7398xf){console[_0xd22d[30]](_0x7398xf)}else {console[_0xd22d[20]](_0x7398x12)}})})})[_0xd22d[21]](function(_0x7398xf){console[_0xd22d[20]](_0x7398xf)})}function createHangup(_0x7398xb){var _0x7398x14={context:_0x7398xb[_0xd22d[7]],exten:_0xd22d[36],priority:_0xd22d[37],VoiceContextId:_0x7398xb[_0xd22d[34]],type:_0xd22d[38],app:_0xd22d[39]};VoiceExtension[_0xd22d[41]](_0x7398x14)[_0xd22d[33]](function(_0x7398x12){console[_0xd22d[20]](_0xd22d[40])})[_0xd22d[21]](function(_0x7398xf){console[_0xd22d[20]](_0x7398xf)})}module[_0xd22d[42]]=Context
\ No newline at end of file
+var VoiceContext = require('../../models').VoiceContext;
+var VoiceExtension = require('../../models').VoiceExtension;
+var fs = require('fs');
+var util = require('util');
+var path = require('path');
+var config = require('../../config/environment');
+
+function Context(ami) {
+  VoiceContext.beforeUpdate(function(updatedContext) {
+    if (updatedContext.changed('name')) {
+      throw new Error("You can't modify a context name");
+    }
+    if (updatedContext.defaultEntry) {
+      throw new Error("You can't modify a default context");
+    }
+  });
+
+  VoiceContext.beforeDelete(function(context) {
+    if (context.defaultEntry) {
+      throw new Error("You can't delete a default context");
+    }
+  });
+  VoiceContext.afterCreate(function(doc) {
+    rewriteContexts(doc, ami, false);
+    createHangup(doc);
+  })
+
+  VoiceContext.afterDelete(function(doc) {
+    rewriteContexts(doc, ami, true);
+  })
+}
+
+function rewriteContexts(doc, ami, deleteContext) {
+  var contextValues = '';
+  if (!deleteContext) {
+    contextValues = util.format('[%s]\nswitch => Realtime\n', doc.name);
+  }
+  VoiceContext
+    .findAll({
+      where: {
+        id: {
+          $ne: doc.id
+        }
+      }
+    })
+    .then(function(contexts) {
+      contexts.forEach(function(element) {
+        contextValues += util.format('[%s]\nswitch => Realtime\n', element.name);
+      });
+      fs.writeFile(path.join(config.asteriskConf, 'extensions_xcally_contexts.conf'), contextValues, {
+        flags: 'w',
+        mode: parseInt('0777', 8)
+      }, function(err) {
+        if (err) throw err;
+        console.log("Contexts file saved!");
+        ami.action({
+          Action: 'Reload',
+        }, function(err, res) {
+          if (err) {
+            console.error(err);
+          } else {
+            console.log(res);
+          }
+        });
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function createHangup(doc) {
+  var data = {
+    context: doc.name,
+    exten: 'h',
+    priority: 'n',
+    VoiceContextId: doc.id,
+    type: 'any',
+    app: 'Hangup'
+  };
+
+  VoiceExtension
+    .create(data)
+    .then(function(res) {
+      console.log('hangup extension created');
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+module.exports = Context;
index 9d50cc5..e69de29 100644 (file)
@@ -1 +0,0 @@
-var _0xd7e2=[]
\ No newline at end of file
index ee6e2cb..a47295f 100644 (file)
@@ -1 +1,125 @@
-var _0xcd9b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x20\x53\x74\x61\x72\x74\x69\x6E\x67\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x50\x72\x6F\x63\x65\x73\x73\x65\x73"];_0xcd9b[0];var util=require(_0xcd9b[1]);var Process=require(_0xcd9b[2]);module[_0xcd9b[3]]=function(_0xb315x3){console[_0xcd9b[5]](_0xcd9b[4]);var _0xb315x4= new Process();_0xb315x4[_0xcd9b[6]](function(_0xb315x5,_0xb315x6){if(_0xb315x6){console[_0xcd9b[5]](_0xb315x6);return}})}
\ No newline at end of file
+'use strict';
+var util = require('util');
+var Process = require('./process');
+
+module.exports = function(ami) {
+
+  console.log('Autodialer Starting...');
+  var proc = new Process();
+
+  proc.getProcesses(function(res, err) {
+    if(err)
+    {
+      console.log(err);
+      return;
+    }
+    // console.log(res.Contacts);
+    // if (util.isArray(res.Contacts))
+    // {
+    //   var contact = res.Contacts;
+    //   console.log(contact);
+    // }
+    // else
+    // {
+    //   var contacts = res.Contacts;
+    //   if (contacts.length)
+    //   {
+    //     contacts.forEach(function(contact) {
+    //       console.log(contact);
+    //     })
+    //   }
+    // }
+
+
+
+  });
+
+}
+
+// var _ = require('lodash');
+//
+// var agents = ['SIP/massimiliano.bungaro', 'SIP/daniele.cinti'];
+// var channels = [];
+// var peers = [];
+// var contacts = ['600', '600', '600'];
+//
+// var ami;
+//
+// function coreshow() {
+//   channels = [];
+//   if (contacts.length > 0) {
+//     ami.action({
+//       action: 'CoreShowChannels'
+//     }, function(err, res) {
+//       if (err) {
+//         console.log(err);
+//       }
+//       console.log(res);
+//     });
+//   }
+//
+// }
+//
+// function peerstatus() {
+//   peers = [];
+//   if (contacts.length > 0) {
+//     ami.action({
+//       action: 'SIPpeerstatus'
+//     }, function(err, res) {
+//       if (err) {
+//         console.log(err);
+//       }
+//       console.log(res);
+//     })
+//   }
+// }
+//
+// module.exports = function(asterisk_manager) {
+//
+//   ami = asterisk_manager;
+//
+//   peerstatus();
+//
+//   ami.on('peerstatus', function(evt) {
+//     if (evt.peerstatus == 'Reachable') {
+//       peers.push(evt.peer);
+//     }
+//   });
+//
+//   ami.on('coreshowchannel', function(evt) {
+//     channels.push(evt.channel.split('-')[0]);
+//   });
+//
+//   ami.on('sippeerstatuscomplete', function(evt) {
+//     coreshow();
+//   });
+//
+//   ami.on('coreshowchannelscomplete', function(evt) {
+//     console.log('Agents registered ', peers);
+//     console.log('Agents in call ', channels);
+//
+//
+//     var agent = _.find(agents, function(agent) {
+//       return !_.includes(channels, agent);
+//     });
+//
+//     if (agent) {
+//       if (_.includes(peers, agent)) {
+//         ami.action({
+//           action: 'originate',
+//           channel: agent,
+//           exten: contacts.pop(),
+//           context: 'demo',
+//           priority: 1,
+//           async: true
+//         }, function(err, res) {
+//           if (err) {
+//             console.log(err);
+//           }
+//           console.log(res);
+//         });
+//       }
+//     }
+//     peerstatus();
+//   });
+// };
index a0ac995..7974168 100644 (file)
@@ -1 +1,26 @@
-var _0x9c98=["\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x50\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x50\x72\x6F\x63\x65\x73\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x50\x72\x6F\x63\x65\x73\x73\x65\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];var AutodialerProcess=require(_0x9c98[1])[_0x9c98[0]];var Contact=require(_0x9c98[1])[_0x9c98[2]];function Process(){console[_0x9c98[4]](_0x9c98[3])}Process[_0x9c98[6]][_0x9c98[5]]=function(_0x79c4x4){AutodialerProcess[_0x9c98[9]]({where:{enable:true},include:[Contact]})[_0x9c98[8]](function(_0x79c4x6){_0x79c4x4(_0x79c4x6)})[_0x9c98[7]](function(_0x79c4x5){_0x79c4x4(null,_0x79c4x5)})};module[_0x9c98[10]]=Process
\ No newline at end of file
+var AutodialerProcess = require('../../models').AutodialerProcess;
+var Contact = require('../../models').Contact;
+
+function Process() {
+  console.log('Process Initialization...');
+}
+
+Process.prototype.getProcesses = function(callback) {
+
+  AutodialerProcess
+  .findAll({
+    where: {
+      enable: true
+    },
+    include: [Contact]
+  })
+  .then(function(res) {
+    callback(res);
+  })
+  .catch(function(err) {
+    callback(null, err);
+  });
+
+}
+
+module.exports = Process;
index 983715c..d31e0c8 100644 (file)
@@ -1 +1,155 @@
-var _0x3172=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x46\x61\x78\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x66\x6F\x72\x45\x61\x63\x68","\x41\x6C\x6C","\x24\x6F\x72","\x41\x6E\x79","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x74\x69\x6D\x65\x6F\x75\x74","\x65\x78\x70\x6F\x72\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x61\x78","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x65\x72\x72\x6F\x72","\x61\x6C\x6C","\x73\x63\x6F\x70\x65"];_0x3172[0];var _=require(_0x3172[1]);var config=require(_0x3172[2]);var moment=require(_0x3172[3]);var sequelize=require(_0x3172[5])[_0x3172[4]];var Automation=require(_0x3172[5])[_0x3172[6]];var FaxRoom=require(_0x3172[5])[_0x3172[7]];var Settings=require(_0x3172[5])[_0x3172[8]];var automationTimeout;var activeAutomations={};function executeAutomation(_0x8164xb){var _0x8164xc={where:{$and:[],$or:[]}};var _0x8164xd={};_0x8164xb[_0x3172[14]][_0x3172[13]](function(_0x8164xe){_0x8164xc[_0x3172[12]][_0x3172[11]][_0x3172[10]](getCondition(_0x8164xe[_0x3172[9]]))});_0x8164xb[_0x3172[16]][_0x3172[13]](function(_0x8164xe){_0x8164xc[_0x3172[12]][_0x3172[15]][_0x3172[10]](getCondition(_0x8164xe[_0x3172[9]]))});return FaxRoom[_0x3172[25]](_0x8164xc)[_0x3172[24]](function(_0x8164x10){_0x8164x10[_0x3172[13]](function(_0x8164x11){_0x8164xb[_0x3172[23]][_0x3172[13]](function(_0x8164x12){switch(_0x8164x12[_0x3172[22]]){case _0x3172[21]:setStatus(_0x8164x11[_0x3172[19]],_0x8164x12[_0x3172[20]]);break;default:}})})})[_0x3172[18]](function(_0x8164xf){console[_0x3172[17]](_0x8164xf)})}function setStatus(_0x8164x14,_0x8164x15){return FaxRoom[_0x3172[26]]({status:_0x8164x15},{where:{id:_0x8164x14}})[_0x3172[18]](function(_0x8164xf){console[_0x3172[17]](_0x8164xf)})}function getCondition(_0x8164xe){var _0x8164x17={};switch(_0x8164xe[_0x3172[27]]){case _0x3172[21]:switch(_0x8164xe[_0x3172[31]]){case _0x3172[29]:_0x8164x17[_0x8164xe[_0x3172[27]]]=_0x8164xe[_0x3172[28]];break;case _0x3172[30]:_0x8164x17[_0x8164xe[_0x3172[27]]]={$ne:_0x8164xe[_0x3172[28]]};break;default:};break;case _0x3172[40]:var _0x8164x18=moment()[_0x3172[35]](parseInt(_0x8164xe[_0x3172[28]],10),_0x3172[34])[_0x3172[33]](_0x3172[32]);switch(_0x8164xe[_0x3172[31]]){case _0x3172[36]:_0x8164x17[_0x8164xe[_0x3172[27]]]={lt:_0x8164x18};break;case _0x3172[37]:_0x8164x17[_0x8164xe[_0x3172[27]]]={$lte:_0x8164x18};break;case _0x3172[38]:_0x8164x17[_0x8164xe[_0x3172[27]]]={$gt:_0x8164x18};break;case _0x3172[39]:_0x8164x17[_0x8164xe[_0x3172[27]]]={$gte:_0x8164x18};break;default:};break;default:};return _0x8164x17}function createInterval(_0x8164xb){activeAutomations[_0x3172[41]+_0x8164xb[_0x3172[19]]]=setInterval(function(){executeAutomation(_0x8164xb)},_0x8164xb[_0x3172[42]]*1000)}module[_0x3172[43]]=function(){Automation[_0x3172[46]](function(_0x8164x1a,_0x8164x1b){if(_0x8164x1a[_0x3172[21]]&&_0x8164x1a[_0x3172[44]]===_0x3172[45]){createInterval(_0x8164x1a)}});Automation[_0x3172[47]](function(_0x8164x1a,_0x8164x1b){if(activeAutomations[_0x3172[41]+_0x8164x1a[_0x3172[19]]]){clearInterval(activeAutomations[_0x3172[41]+_0x8164x1a[_0x3172[19]]])};if(_0x8164x1a[_0x3172[21]]&&_0x8164x1a[_0x3172[44]]===_0x3172[45]){createInterval(_0x8164x1a)}});Automation[_0x3172[48]](function(_0x8164x1a,_0x8164x1b){if(activeAutomations[_0x3172[41]+_0x8164x1a[_0x3172[19]]]){clearInterval(activeAutomations[_0x3172[41]+_0x8164x1a[_0x3172[19]]])}});Automation[_0x3172[51]](_0x3172[50])[_0x3172[25]]({where:{status:true,channel:_0x3172[45]}})[_0x3172[24]](function(_0x8164x1c){_0x8164x1c[_0x3172[13]](function(_0x8164xb){createInterval(_0x8164xb)})})[_0x3172[18]](function(_0x8164xf){console[_0x3172[49]](_0x8164xf)})}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var config = require('../environment');
+var moment = require('moment');
+// var stringifyObject = require('stringify-object');
+
+var sequelize = require('../../models').sequelize;
+var Automation = require('../../models').Automation;
+var FaxRoom = require('../../models').FaxRoom;
+var Settings = require('../../models').Settings;
+var automationTimeout;
+var activeAutomations = {};
+
+function executeAutomation(faxAutomation) {
+  var query = {
+    where: {
+      $and: [],
+      $or: []
+    }
+  };
+  var actions = {};
+  faxAutomation.All.forEach(function(condition) {
+    query.where.$and.push(getCondition(condition.dataValues));
+  });
+  faxAutomation.Any.forEach(function(condition) {
+    query.where.$or.push(getCondition(condition.dataValues));
+  });
+
+  return FaxRoom
+    .findAll(query)
+    .then(function(faxes) {
+      faxes.forEach(function(fax) {
+        faxAutomation.Actions.forEach(function(action) {
+          switch (action.action) {
+            case 'status':
+              setStatus(fax.id, action.data1);
+              break;
+            default:
+          }
+        });
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function setStatus(ticketId, newStatus) {
+  return FaxRoom.update({
+      status: newStatus,
+    }, {
+      where: {
+        id: ticketId
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getCondition(condition) {
+  var result = {};
+  switch (condition.field) {
+    case 'status':
+      switch (condition.operator) {
+        case 'equals':
+          result[condition.field] = condition.value;
+          break;
+        case 'not_equals':
+          result[condition.field] = {
+            $ne: condition.value
+          };
+          break;
+        default:
+      }
+      break;
+    case 'createdAt':
+      var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss");
+      switch (condition.operator) {
+        case 'greater':
+          result[condition.field] = {
+            lt: compareDate
+          };
+          break;
+        case 'greater_or_equal':
+          result[condition.field] = {
+            $lte: compareDate
+          };
+          break;
+        case 'less':
+          result[condition.field] = {
+            $gt: compareDate
+          };
+          break;
+        case 'less_or_equal':
+          result[condition.field] = {
+            $gte: compareDate
+          };
+          break;
+        default:
+      }
+      break;
+    default:
+  }
+  return result;
+}
+
+function createInterval(faxAutomation) {
+  activeAutomations['interval' + faxAutomation.id] = setInterval(function() {
+    executeAutomation(faxAutomation);
+  }, faxAutomation.timeout * 1000);
+}
+
+module.exports = function() {
+
+  Automation.afterCreate(function(doc, options) {
+    if (doc.status && doc.channel === 'fax') {
+      createInterval(doc);
+    }
+  });
+
+  Automation.afterUpdate(function(doc, options) {
+    if (activeAutomations['interval' + doc.id]) {
+      clearInterval(activeAutomations['interval' + doc.id]);
+    }
+    if (doc.status && doc.channel === 'fax') {
+      createInterval(doc);
+    }
+  });
+
+  Automation.afterDelete(function(doc, options) {
+    if (activeAutomations['interval' + doc.id]) {
+      clearInterval(activeAutomations['interval' + doc.id]);
+    }
+  });
+
+  Automation
+    .scope('all')
+    .findAll({
+      where: {
+        status: true,
+        channel: 'fax'
+      }
+    })
+    .then(function(faxAutomations) {
+
+      faxAutomations.forEach(function(faxAutomation) {
+        createInterval(faxAutomation);
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+};
index ad718f3..dfd4a14 100644 (file)
@@ -1 +1,154 @@
-var _0x6e70=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x66\x6F\x72\x45\x61\x63\x68","\x41\x6C\x6C","\x24\x6F\x72","\x41\x6E\x79","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x74\x69\x6D\x65\x6F\x75\x74","\x65\x78\x70\x6F\x72\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x61\x69\x6C","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x65\x72\x72\x6F\x72","\x61\x6C\x6C","\x73\x63\x6F\x70\x65"];_0x6e70[0];var _=require(_0x6e70[1]);var config=require(_0x6e70[2]);var moment=require(_0x6e70[3]);var sequelize=require(_0x6e70[5])[_0x6e70[4]];var Automation=require(_0x6e70[5])[_0x6e70[6]];var MailRoom=require(_0x6e70[5])[_0x6e70[7]];var Settings=require(_0x6e70[5])[_0x6e70[8]];var activeAutomations={};function executeAutomation(_0xce86xa){var _0xce86xb={where:{$and:[],$or:[]}};var _0xce86xc={};_0xce86xa[_0x6e70[14]][_0x6e70[13]](function(_0xce86xd){_0xce86xb[_0x6e70[12]][_0x6e70[11]][_0x6e70[10]](getCondition(_0xce86xd[_0x6e70[9]]))});_0xce86xa[_0x6e70[16]][_0x6e70[13]](function(_0xce86xd){_0xce86xb[_0x6e70[12]][_0x6e70[15]][_0x6e70[10]](getCondition(_0xce86xd[_0x6e70[9]]))});return MailRoom[_0x6e70[25]](_0xce86xb)[_0x6e70[24]](function(_0xce86xf){_0xce86xf[_0x6e70[13]](function(_0xce86x10){_0xce86xa[_0x6e70[23]][_0x6e70[13]](function(_0xce86x11){switch(_0xce86x11[_0x6e70[22]]){case _0x6e70[21]:setStatus(_0xce86x10[_0x6e70[19]],_0xce86x11[_0x6e70[20]]);break;default:}})})})[_0x6e70[18]](function(_0xce86xe){console[_0x6e70[17]](_0xce86xe)})}function setStatus(_0xce86x13,_0xce86x14){return MailRoom[_0x6e70[26]]({status:_0xce86x14},{where:{id:_0xce86x13}})[_0x6e70[18]](function(_0xce86xe){console[_0x6e70[17]](_0xce86xe)})}function getCondition(_0xce86xd){var _0xce86x16={};switch(_0xce86xd[_0x6e70[27]]){case _0x6e70[21]:switch(_0xce86xd[_0x6e70[31]]){case _0x6e70[29]:_0xce86x16[_0xce86xd[_0x6e70[27]]]=_0xce86xd[_0x6e70[28]];break;case _0x6e70[30]:_0xce86x16[_0xce86xd[_0x6e70[27]]]={$ne:_0xce86xd[_0x6e70[28]]};break;default:};break;case _0x6e70[40]:var _0xce86x17=moment()[_0x6e70[35]](parseInt(_0xce86xd[_0x6e70[28]],10),_0x6e70[34])[_0x6e70[33]](_0x6e70[32]);switch(_0xce86xd[_0x6e70[31]]){case _0x6e70[36]:_0xce86x16[_0xce86xd[_0x6e70[27]]]={lt:_0xce86x17};break;case _0x6e70[37]:_0xce86x16[_0xce86xd[_0x6e70[27]]]={$lte:_0xce86x17};break;case _0x6e70[38]:_0xce86x16[_0xce86xd[_0x6e70[27]]]={$gt:_0xce86x17};break;case _0x6e70[39]:_0xce86x16[_0xce86xd[_0x6e70[27]]]={$gte:_0xce86x17};break;default:};break;default:};return _0xce86x16}function createInterval(_0xce86xa){activeAutomations[_0x6e70[41]+_0xce86xa[_0x6e70[19]]]=setInterval(function(){executeAutomation(_0xce86xa)},_0xce86xa[_0x6e70[42]]*1000)}module[_0x6e70[43]]=function(){Automation[_0x6e70[46]](function(_0xce86x19,_0xce86x1a){if(_0xce86x19[_0x6e70[21]]&&_0xce86x19[_0x6e70[44]]===_0x6e70[45]){createInterval(_0xce86x19)}});Automation[_0x6e70[47]](function(_0xce86x19,_0xce86x1a){if(activeAutomations[_0x6e70[41]+_0xce86x19[_0x6e70[19]]]){clearInterval(activeAutomations[_0x6e70[41]+_0xce86x19[_0x6e70[19]]])};if(_0xce86x19[_0x6e70[21]]&&_0xce86x19[_0x6e70[44]]===_0x6e70[45]){createInterval(_0xce86x19)}});Automation[_0x6e70[48]](function(_0xce86x19,_0xce86x1a){if(activeAutomations[_0x6e70[41]+_0xce86x19[_0x6e70[19]]]){clearInterval(activeAutomations[_0x6e70[41]+_0xce86x19[_0x6e70[19]]])}});Automation[_0x6e70[51]](_0x6e70[50])[_0x6e70[25]]({where:{status:true,channel:_0x6e70[45]}})[_0x6e70[24]](function(_0xce86x1b){_0xce86x1b[_0x6e70[13]](function(_0xce86xa){createInterval(_0xce86xa)})})[_0x6e70[18]](function(_0xce86xe){console[_0x6e70[49]](_0xce86xe)})}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var config = require('../environment');
+var moment = require('moment');
+// var stringifyObject = require('stringify-object');
+
+var sequelize = require('../../models').sequelize;
+var Automation = require('../../models').Automation;
+var MailRoom = require('../../models').MailRoom;
+var Settings = require('../../models').Settings;
+var activeAutomations = {};
+
+function executeAutomation(mailAutomation) {
+  var query = {
+    where: {
+      $and: [],
+      $or: []
+    }
+  };
+  var actions = {};
+  mailAutomation.All.forEach(function(condition) {
+    query.where.$and.push(getCondition(condition.dataValues));
+  });
+  mailAutomation.Any.forEach(function(condition) {
+    query.where.$or.push(getCondition(condition.dataValues));
+  });
+
+  return MailRoom
+    .findAll(query)
+    .then(function(mails) {
+      mails.forEach(function(mail) {
+        mailAutomation.Actions.forEach(function(action) {
+          switch (action.action) {
+            case 'status':
+              setStatus(mail.id, action.data1);
+              break;
+            default:
+          }
+        });
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function setStatus(ticketId, newStatus) {
+  return MailRoom.update({
+      status: newStatus,
+    }, {
+      where: {
+        id: ticketId
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function getCondition(condition) {
+  var result = {};
+  switch (condition.field) {
+    case 'status':
+      switch (condition.operator) {
+        case 'equals':
+          result[condition.field] = condition.value;
+          break;
+        case 'not_equals':
+          result[condition.field] = {
+            $ne: condition.value
+          };
+          break;
+        default:
+      }
+      break;
+    case 'createdAt':
+      var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss");
+      switch (condition.operator) {
+        case 'greater':
+          result[condition.field] = {
+            lt: compareDate
+          };
+          break;
+        case 'greater_or_equal':
+          result[condition.field] = {
+            $lte: compareDate
+          };
+          break;
+        case 'less':
+          result[condition.field] = {
+            $gt: compareDate
+          };
+          break;
+        case 'less_or_equal':
+          result[condition.field] = {
+            $gte: compareDate
+          };
+          break;
+        default:
+      }
+      break;
+    default:
+  }
+  return result;
+}
+
+function createInterval(mailAutomation) {
+  activeAutomations['interval' + mailAutomation.id] = setInterval(function() {
+    executeAutomation(mailAutomation);
+  }, mailAutomation.timeout * 1000);
+}
+
+module.exports = function() {
+
+  Automation.afterCreate(function(doc, options) {
+    if (doc.status && doc.channel === 'mail') {
+      createInterval(doc);
+    }
+  });
+
+  Automation.afterUpdate(function(doc, options) {
+    if (activeAutomations['interval' + doc.id]) {
+      clearInterval(activeAutomations['interval' + doc.id]);
+    }
+    if (doc.status && doc.channel === 'mail') {
+      createInterval(doc);
+    }
+  });
+
+  Automation.afterDelete(function(doc, options) {
+    if (activeAutomations['interval' + doc.id]) {
+      clearInterval(activeAutomations['interval' + doc.id]);
+    }
+  });
+
+  Automation
+    .scope('all')
+    .findAll({
+      where: {
+        status: true,
+        channel: 'mail'
+      }
+    })
+    .then(function(mailAutomations) {
+
+      mailAutomations.forEach(function(mailAutomation) {
+        createInterval(mailAutomation);
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+};
index 228ce43..1b2d7a3 100644 (file)
@@ -1 +1,74 @@
-var _0xe2ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x73\x65\x72\x76\x65\x2D\x66\x61\x76\x69\x63\x6F\x6E","\x6D\x6F\x72\x67\x61\x6E","\x63\x6F\x6D\x70\x72\x65\x73\x73\x69\x6F\x6E","\x62\x6F\x64\x79\x2D\x70\x61\x72\x73\x65\x72","\x65\x78\x70\x72\x65\x73\x73\x2D\x71\x75\x65\x72\x79\x2D\x69\x6E\x74","\x6D\x65\x74\x68\x6F\x64\x2D\x6F\x76\x65\x72\x72\x69\x64\x65","\x63\x6F\x6F\x6B\x69\x65\x2D\x70\x61\x72\x73\x65\x72","\x65\x72\x72\x6F\x72\x68\x61\x6E\x64\x6C\x65\x72","\x70\x61\x74\x68","\x70\x61\x73\x73\x70\x6F\x72\x74","\x65\x78\x70\x72\x65\x73\x73\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x2D\x66\x6C\x61\x73\x68","\x65\x78\x70\x72\x65\x73\x73\x2D\x6D\x79\x73\x71\x6C\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x65\x6E\x76","\x67\x65\x74","\x76\x69\x65\x77\x73","\x72\x6F\x6F\x74","\x2F\x73\x65\x72\x76\x65\x72\x2F\x76\x69\x65\x77\x73","\x73\x65\x74","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72\x46\x69\x6C\x65","\x65\x6A\x73","\x65\x6E\x67\x69\x6E\x65","\x76\x69\x65\x77\x20\x65\x6E\x67\x69\x6E\x65","\x75\x73\x65","\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6A\x73\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x68\x6F\x73\x74","\x64\x62","\x70\x6F\x72\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x64\x61\x74\x61\x62\x61\x73\x65","\x63\x6F\x6F\x6B\x69\x65","\x6E\x61\x6D\x65","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x70\x75\x62\x6C\x69\x63","\x66\x61\x76\x69\x63\x6F\x6E\x2E\x69\x63\x6F","\x6A\x6F\x69\x6E","\x73\x74\x61\x74\x69\x63","\x61\x70\x70\x50\x61\x74\x68","\x2F\x70\x75\x62\x6C\x69\x63","\x64\x65\x76","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x2D\x6C\x69\x76\x65\x72\x65\x6C\x6F\x61\x64","\x2E\x74\x6D\x70","\x63\x6C\x69\x65\x6E\x74"];_0xe2ed[0];var express=require(_0xe2ed[1]);var favicon=require(_0xe2ed[2]);var morgan=require(_0xe2ed[3]);var compression=require(_0xe2ed[4]);var bodyParser=require(_0xe2ed[5]);var queryParser=require(_0xe2ed[6]);var methodOverride=require(_0xe2ed[7]);var cookieParser=require(_0xe2ed[8]);var errorHandler=require(_0xe2ed[9]);var path=require(_0xe2ed[10]);var passport=require(_0xe2ed[11]);var session=require(_0xe2ed[12]);var flash=require(_0xe2ed[13]);var SessionStore=require(_0xe2ed[14]);var session=require(_0xe2ed[12]);var config=require(_0xe2ed[15]);module[_0xe2ed[16]]=function(_0xaf8fx10){var _0xaf8fx11=_0xaf8fx10[_0xe2ed[18]](_0xe2ed[17]);_0xaf8fx10[_0xe2ed[22]](_0xe2ed[19],config[_0xe2ed[20]]+_0xe2ed[21]);_0xaf8fx10[_0xe2ed[26]](_0xe2ed[23],require(_0xe2ed[25])[_0xe2ed[24]]);_0xaf8fx10[_0xe2ed[22]](_0xe2ed[27],_0xe2ed[23]);_0xaf8fx10[_0xe2ed[28]](compression());_0xaf8fx10[_0xe2ed[28]](bodyParser[_0xe2ed[29]]({extended:false}));_0xaf8fx10[_0xe2ed[28]](bodyParser[_0xe2ed[30]]());_0xaf8fx10[_0xe2ed[28]](methodOverride());_0xaf8fx10[_0xe2ed[28]](cookieParser());_0xaf8fx10[_0xe2ed[28]](passport[_0xe2ed[31]]());_0xaf8fx10[_0xe2ed[28]](session({secret:config[_0xe2ed[33]][_0xe2ed[32]],store: new SessionStore({host:config[_0xe2ed[35]][_0xe2ed[34]],port:config[_0xe2ed[35]][_0xe2ed[36]],user:config[_0xe2ed[35]][_0xe2ed[37]],password:config[_0xe2ed[35]][_0xe2ed[38]],database:config[_0xe2ed[35]][_0xe2ed[39]]}),cookie:config[_0xe2ed[33]][_0xe2ed[40]],name:config[_0xe2ed[33]][_0xe2ed[41]],resave:true,saveUninitialized:true}));if(_0xe2ed[42]===_0xaf8fx11){_0xaf8fx10[_0xe2ed[28]](favicon(path[_0xe2ed[45]](config[_0xe2ed[20]],_0xe2ed[43],_0xe2ed[44])));_0xaf8fx10[_0xe2ed[28]](express[_0xe2ed[46]](path[_0xe2ed[45]](config[_0xe2ed[20]],_0xe2ed[43])));_0xaf8fx10[_0xe2ed[22]](_0xe2ed[47],config[_0xe2ed[20]]+_0xe2ed[48]);_0xaf8fx10[_0xe2ed[28]](morgan(_0xe2ed[49]))};if(_0xe2ed[50]===_0xaf8fx11||_0xe2ed[51]===_0xaf8fx11){_0xaf8fx10[_0xe2ed[28]](require(_0xe2ed[52])());_0xaf8fx10[_0xe2ed[28]](express[_0xe2ed[46]](path[_0xe2ed[45]](config[_0xe2ed[20]],_0xe2ed[53])));_0xaf8fx10[_0xe2ed[28]](express[_0xe2ed[46]](path[_0xe2ed[45]](config[_0xe2ed[20]],_0xe2ed[54])));_0xaf8fx10[_0xe2ed[22]](_0xe2ed[47],_0xe2ed[54]);_0xaf8fx10[_0xe2ed[28]](morgan(_0xe2ed[49]));_0xaf8fx10[_0xe2ed[28]](errorHandler())};_0xaf8fx10[_0xe2ed[28]](flash())}
\ No newline at end of file
+/**
+ * Express configuration
+ */
+
+'use strict';
+
+var express = require('express');
+var favicon = require('serve-favicon');
+var morgan = require('morgan');
+var compression = require('compression');
+var bodyParser = require('body-parser');
+var queryParser = require('express-query-int');
+var methodOverride = require('method-override');
+var cookieParser = require('cookie-parser');
+var errorHandler = require('errorhandler');
+var path = require('path');
+var passport = require('passport');
+var session = require('express-session');
+var flash = require('connect-flash');
+var SessionStore = require('express-mysql-session');
+var session = require('express-session');
+var config = require('./environment');
+
+module.exports = function (app) {
+  var env = app.get('env');
+
+  app.set('views', config.root + '/server/views');
+  app.engine('html', require('ejs').renderFile);
+  app.set('view engine', 'html');
+  app.use(compression());
+  app.use(bodyParser.urlencoded({
+    extended: false
+  }));
+  app.use(bodyParser.json());
+  // app.use(queryParser());
+  app.use(methodOverride());
+  app.use(cookieParser());
+  app.use(passport.initialize());
+
+  // Express/MySQL session storage
+  app.use(session({
+    secret: config.session.secret,
+    store: new SessionStore({
+      host: config.db.host,
+      port: config.db.port,
+      user: config.db.username,
+      password: config.db.password,
+      database: config.db.database
+    }),
+    cookie: config.session.cookie,
+    name: config.session.name,
+    resave: true,
+    saveUninitialized: true
+  }));
+
+  if ('production' === env) {
+    app.use(favicon(path.join(config.root, 'public', 'favicon.ico')));
+    app.use(express.static(path.join(config.root, 'public')));
+    app.set('appPath', config.root + '/public');
+    app.use(morgan('dev'));
+  }
+
+  if ('development' === env || 'test' === env) {
+    app.use(require('connect-livereload')());
+    app.use(express.static(path.join(config.root, '.tmp')));
+    app.use(express.static(path.join(config.root, 'client')));
+    app.set('appPath', 'client');
+    app.use(morgan('dev'));
+    app.use(errorHandler()); // Error handler - has to be last
+  }
+
+  // Connect flash for flash messages
+  app.use(flash());
+};
index 0593743..c64343b 100644 (file)
@@ -1 +1,240 @@
-var _0x62ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x74\x69\x66\x66\x2D\x74\x6F\x2D\x70\x6E\x67","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x66\x73","\x70\x61\x74\x68","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x45\x76\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x69\x64","\x49\x4E\x43\x4F\x4D\x49\x4E\x47","\x46\x41\x58","\x63\x72\x65\x61\x74\x65","\x73\x65\x74\x46\x72\x6F\x6D","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x74\x54\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x76\x34","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x69\x6E\x62\x6F\x75\x6E\x64","\x2E\x70\x64\x66","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x20","\x20","\x54\x68\x65\x20\x66\x69\x6C\x65\x20","\x20\x65\x78\x69\x74\x73","\x20\x77\x61\x73\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x69\x6E\x20\x50\x44\x46","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x74\x73","\x65\x78\x69\x73\x74\x73","\x4E\x45\x57","\x6F\x6E","\x73\x65\x6E\x64\x66\x61\x78","\x2A\x2A\x2A\x53\x65\x6E\x64\x46\x41\x58\x2A\x2A\x2A","\x6C\x6F\x67","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x76\x61\x72\x73\x65\x74","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x53\x65\x74\x3A\x20","\x76\x61\x6C\x75\x65","\x46\x41\x49\x4C\x45\x44","\x53\x45\x4E\x54","\x66\x61\x78\x65\x72\x72\x6F\x72","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x6C\x61\x73\x74\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72\x65\x76\x65\x6E\x74","\x46\x61\x78","\x53\x45\x4E\x44\x49\x4E\x47","\x75\x75\x69\x64","\x46\x41\x58\x53\x74\x61\x74\x75\x73\x3A\x20","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x61\x6D\x69"];_0x62ad[0];var _=require(_0x62ad[1]);var uuidLib=require(_0x62ad[2]);var ConvertTiff=require(_0x62ad[3]);var exec=require(_0x62ad[5])[_0x62ad[4]];var fs=require(_0x62ad[6]);var path=require(_0x62ad[7]);var FaxMessage=require(_0x62ad[9])[_0x62ad[8]];var FaxRoom=require(_0x62ad[9])[_0x62ad[10]];var Contact=require(_0x62ad[9])[_0x62ad[11]];var Event=require(_0x62ad[9])[_0x62ad[12]];var config=require(_0x62ad[13]);exports[_0x62ad[14]]=function(_0x6692xc){_0x6692xc[_0x62ad[50]](_0x62ad[15],function(_0x6692xd){FaxRoom[_0x62ad[24]]({status:_0x62ad[49],from:_0x6692xd[_0x62ad[27]],FaxAccountId:1})[_0x62ad[45]](function(_0x6692xf){_0x6692xd[_0x62ad[18]]=_0x62ad[19];_0x6692xd[_0x62ad[20]]=_0x6692xf[_0x62ad[21]];FaxMessage[_0x62ad[24]](_0x6692xd)[_0x62ad[45]](function(_0x6692x10){Event[_0x62ad[24]]({name:_0x62ad[22],channel:_0x62ad[23],FaxRoomId:_0x6692xf[_0x62ad[21]],FaxAccountId:1})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)});Contact[_0x62ad[28]]({where:{phone:_0x6692xd[_0x62ad[27]]},defaults:{phone:_0x6692xd[_0x62ad[27]],fullname:_0x6692xd[_0x62ad[27]]}})[_0x62ad[26]](function(_0x6692x11,_0x6692x12){_0x6692x10[_0x62ad[25]](_0x6692x11)});Contact[_0x62ad[28]]({where:{phone:_0x6692xd[_0x62ad[30]]},defaults:{phone:_0x6692xd[_0x62ad[30]],fullname:_0x6692xd[_0x62ad[30]]}})[_0x62ad[26]](function(_0x6692x11,_0x6692x12){_0x6692x10[_0x62ad[29]](_0x6692x11)});var _0x6692x13=uuidLib[_0x62ad[31]]();var _0x6692x14=_0x6692xd[_0x62ad[32]];var _0x6692x15=path[_0x62ad[39]](config[_0x62ad[33]],_0x62ad[34],_0x62ad[35],_0x62ad[36],_0x62ad[37],_0x6692x13+_0x62ad[38]);var _0x6692x16=_0x62ad[40]+_0x6692x14+_0x62ad[41]+_0x6692x15;fs[_0x62ad[48]](_0x6692x14,function(_0x6692x17){if(_0x6692x17){console[_0x62ad[16]](_0x62ad[42]+_0x6692x14+_0x62ad[43]);exec(_0x6692x16,function(_0x6692xe){if(_0x6692xe){console[_0x62ad[16]](_0x6692xe)}else {_0x6692x10[_0x62ad[46]]({filenamePDF:_0x6692x13+_0x62ad[38]})[_0x62ad[45]](function(){console[_0x62ad[16]](_0x62ad[42]+_0x6692x14+_0x62ad[44])})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})}})}else {console[_0x62ad[16]](_0x62ad[42]+_0x6692x14+_0x62ad[47])}})})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})});_0x6692xc[_0x62ad[50]](_0x62ad[51],function(_0x6692xd){console[_0x62ad[53]](_0x62ad[52]);FaxMessage[_0x62ad[55]]({where:{uniqueid:_0x6692xd[_0x62ad[54]]}})[_0x62ad[45]](function(_0x6692x10){if(_0x6692x10){_0x6692x10[_0x62ad[46]](_0x6692xd)}})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})});_0x6692xc[_0x62ad[50]](_0x62ad[56],function(_0x6692xd){if(_0x6692xd[_0x62ad[59]][_0x62ad[58]](_0x62ad[57])){FaxMessage[_0x62ad[55]]({where:{uniqueid:_0x6692xd[_0x62ad[54]]}})[_0x62ad[45]](function(_0x6692x10){if(_0x6692x10){console[_0x62ad[53]](_0x62ad[60],_0x62ad[18],_0x6692xd[_0x62ad[61]]);_0x6692x10[_0x62ad[46]]({status:_0x6692xd[_0x62ad[61]]==_0x62ad[62]?_0x62ad[62]:_0x62ad[63]})}})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})}else {if(_0x6692xd[_0x62ad[59]][_0x62ad[58]](_0x62ad[64])){FaxMessage[_0x62ad[55]]({where:{uniqueid:_0x6692xd[_0x62ad[54]]}})[_0x62ad[45]](function(_0x6692x10){if(_0x6692x10){console[_0x62ad[53]](_0x62ad[60],_0x62ad[16],_0x6692xd[_0x62ad[61]]);_0x6692x10[_0x62ad[46]]({error:_0x6692xd[_0x62ad[61]]})}})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})}else {if(_0x6692xd[_0x62ad[59]][_0x62ad[58]](_0x62ad[65])){FaxMessage[_0x62ad[55]]({where:{uniqueid:_0x6692xd[_0x62ad[54]]}})[_0x62ad[45]](function(_0x6692x10){if(_0x6692x10){console[_0x62ad[53]](_0x62ad[60],_0x62ad[66],_0x6692xd[_0x62ad[61]]);_0x6692x10[_0x62ad[46]]({laststatus:_0x6692xd[_0x62ad[61]]})}})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})}}}});_0x6692xc[_0x62ad[50]](_0x62ad[67],function(_0x6692xd){if(_0x6692xd[_0x62ad[67]]===_0x62ad[68]){FaxMessage[_0x62ad[55]]({where:{uuid:_0x6692xd[_0x62ad[70]]}})[_0x62ad[45]](function(_0x6692x10){if(_0x6692x10){_0x6692xd[_0x62ad[18]]=_0x62ad[69];_0x6692x10[_0x62ad[46]](_0x6692xd)}})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})}});_0x6692xc[_0x62ad[50]](_0x62ad[57],function(_0x6692xd){FaxMessage[_0x62ad[55]]({where:{uniqueid:_0x6692xd[_0x62ad[54]]}})[_0x62ad[45]](function(_0x6692x10){if(_0x6692x10){console[_0x62ad[53]](_0x62ad[71],_0x6692xd[_0x62ad[54]],_0x6692xd[_0x62ad[18]]);_0x6692x10[_0x62ad[46]]({operation:_0x6692xd[_0x62ad[72]],laststatus:_0x6692xd[_0x62ad[18]]})}})[_0x62ad[17]](function(_0x6692xe){console[_0x62ad[16]](_0x6692xe)})});require(_0x62ad[73])[_0x62ad[14]](_0x6692xc)}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var uuidLib = require('node-uuid');
+var ConvertTiff = require('tiff-to-png');
+var exec = require('child_process').exec;
+var fs = require('fs');
+var path = require('path');
+
+var FaxMessage = require('../models').FaxMessage;
+var FaxRoom = require('../models').FaxRoom;
+var Contact = require('../models').Contact;
+var Event = require('../models').Event;
+var config = require('./environment');
+
+exports.register = function(ami) {
+
+  ami.on('receivefax', function(evt) {
+
+    FaxRoom
+      .create({
+        status: 'NEW',
+        from: evt.remotestationid,
+        FaxAccountId: 1, //TODO Handle account ID
+      })
+      .then(function(faxRoom) {
+
+        evt.status = 'RECEIVED';
+        evt.FaxRoomId = faxRoom.id;
+
+        FaxMessage
+          .create(evt)
+          .then(function(faxMessage) {
+
+            Event
+              .create({
+                name: 'INCOMING',
+                channel: 'FAX',
+                FaxRoomId: faxRoom.id,
+                FaxAccountId: 1 //TODO Handle account ID
+              })
+              .catch(function(err) {
+                console.error(err);
+              });
+
+            Contact
+              .findOrCreate({
+                where: {
+                  phone: evt.remotestationid
+                },
+                defaults: {
+                  phone: evt.remotestationid,
+                  fullname: evt.remotestationid
+                }
+              })
+              .spread(function(contact, created) {
+                faxMessage.setFrom(contact);
+              });
+
+            Contact
+              .findOrCreate({
+                where: {
+                  phone: evt.localstationid
+                },
+                defaults: {
+                  phone: evt.localstationid,
+                  fullname: evt.localstationid
+                }
+              })
+              .spread(function(contact, created) {
+                faxMessage.setTo(contact);
+              });
+
+            //Convert tiff to png
+            var uuid = uuidLib.v4();
+            var inputPath = evt.filename; //Restore for normal usage
+            // var inputPath = '/tmp/sample.tif' //Used for testing
+            var resultPath = path.join(config.root, 'server', 'files', 'fax', 'inbound', uuid + '.pdf');
+            var command = 'convert ' + inputPath + ' ' + resultPath;
+            fs.exists(inputPath, function(exists) {
+              if (exists) {
+                console.error('The file ' + inputPath + ' exits');
+                //Install ImageMagick for doing that!
+                exec(command, function(err) {
+                  if (err) {
+                    console.error(err);
+                  } else {
+                    faxMessage.updateAttributes({
+                        filenamePDF: uuid + '.pdf'
+                      })
+                      .then(function() {
+                        console.error('The file ' + inputPath + ' was converted in PDF');
+                      })
+                      .catch(function(err) {
+                        console.error(err);
+                      });
+                  }
+                });
+              } else {
+                console.error('The file ' + inputPath + ' does not exits');
+              }
+            });
+          })
+          .catch(function(err) {
+            console.error(err);
+          });
+
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  });
+
+  ami.on('sendfax', function(evt) {
+    console.log('***SendFAX***');
+
+    FaxMessage
+      .findOne({
+        where: {
+          uniqueid: evt.uniqueid
+        }
+      })
+      .then(function(faxMessage) {
+        if (faxMessage) {
+          faxMessage.updateAttributes(evt);
+        }
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+
+  });
+
+  ami.on('varset', function(evt) {
+    if (evt.variable.hasOwnProperty('faxstatus')) {
+      FaxMessage
+        .findOne({
+          where: {
+            uniqueid: evt.uniqueid
+          }
+        })
+        .then(function(faxMessage) {
+          if (faxMessage) {
+            console.log('VarSet: ', 'status', evt.value);
+            faxMessage.updateAttributes({
+              status: evt.value == 'FAILED' ? 'FAILED' : 'SENT'
+            });
+          }
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    } else if (evt.variable.hasOwnProperty('faxerror')) {
+      FaxMessage
+        .findOne({
+          where: {
+            uniqueid: evt.uniqueid
+          }
+        })
+        .then(function(faxMessage) {
+          if (faxMessage) {
+            console.log('VarSet: ', 'error', evt.value);
+            faxMessage.updateAttributes({
+              error: evt.value
+            });
+          }
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    } else if (evt.variable.hasOwnProperty('faxstatusstring')) {
+      FaxMessage
+        .findOne({
+          where: {
+            uniqueid: evt.uniqueid
+          }
+        })
+        .then(function(faxMessage) {
+          if (faxMessage) {
+            console.log('VarSet: ', 'laststatus', evt.value);
+            faxMessage.updateAttributes({
+              laststatus: evt.value
+            });
+          }
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    }
+
+  });
+
+  ami.on('userevent', function(evt) {
+    if (evt.userevent === 'Fax') {
+      FaxMessage
+        .findOne({
+          where: {
+            uuid: evt.uuid
+          }
+        })
+        .then(function(faxMessage) {
+          if (faxMessage) {
+            evt.status = 'SENDING';
+            faxMessage.updateAttributes(evt);
+          }
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    }
+
+  });
+
+  ami.on('faxstatus', function(evt) {
+    FaxMessage
+      .findOne({
+        where: {
+          uniqueid: evt.uniqueid
+        }
+      })
+      .then(function(faxMessage) {
+        if (faxMessage) {
+
+          console.log('FAXStatus: ', evt.uniqueid, evt.status);
+
+          faxMessage.updateAttributes({
+            operation: evt.operation,
+            laststatus: evt.status
+          });
+        }
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+
+  })
+
+  require('../api/fax_message/fax_message.ami').register(ami);
+
+};
index 895503f..5237ece 100644 (file)
@@ -1 +1,45 @@
-var _0x9d4b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x4D\x6F\x76\x65","\x68\x69\x73\x74\x6F\x72\x79","\x65\x78\x70\x6F\x72\x74\x73","\x30\x20\x35\x39\x20\x32\x33\x20\x2A\x20\x2A\x20\x2A","\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x68\x69\x73\x74\x6F\x72\x79\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x68\x69\x73\x74\x6F\x72\x79\x20\x75\x70\x64\x61\x74\x65\x64","\x74\x68\x65\x6E","\x6D\x6F\x76\x65","\x61\x6C\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74"];_0x9d4b[0];var Promise=require(_0x9d4b[1]);var sequelize=require(_0x9d4b[3])[_0x9d4b[2]];var ReportMove=require(_0x9d4b[4]);var Models=require(_0x9d4b[3]);var HistoryModels=require(_0x9d4b[3])[_0x9d4b[5]];module[_0x9d4b[6]]=function(_0xec57x6){var _0xec57x7= new _0xec57x6({cronTime:_0x9d4b[7],onTick:function(){console[_0x9d4b[9]](_0x9d4b[8]);return sequelize[_0x9d4b[16]](function(_0xec57x9){return Promise[_0x9d4b[15]]([])[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportCall,HistoryModels.ReportCallHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportAgent,HistoryModels.ReportAgentHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportMember,HistoryModels.ReportMemberHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportQueue,HistoryModels.ReportQueueHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportIntegration,HistoryModels.ReportIntegrationHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportMailSession,HistoryModels.ReportMailSessionHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportChat,HistoryModels.ReportChatHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportChatSession,HistoryModels.ReportChatSessionHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportMail,HistoryModels.ReportMailHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportSquare,HistoryModels.ReportSquareHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportSquareDetail,HistoryModels.ReportSquareDetailHistory))[_0x9d4b[13]](ReportMove[_0x9d4b[14]](_0xec57x9,Models.ReportTransfer,HistoryModels.ReportTransferHistory))[_0x9d4b[13]](function(){console[_0x9d4b[9]](_0x9d4b[12])})})[_0x9d4b[11]](function(_0xec57x8){console[_0x9d4b[10]](_0xec57x8)})}});_0xec57x7[_0x9d4b[17]]()}
\ No newline at end of file
+'use strict';
+
+var Promise = require('bluebird');
+var sequelize = require('../../models').sequelize;
+
+var ReportMove = require('./reportMove');
+var Models = require('../../models');
+var HistoryModels = require('../../models').history;
+
+module.exports = function(CronJob) {
+
+  // Every 1 Minute
+  var job = new CronJob({
+    // cronTime: '10 * * * * *',
+    cronTime: '0 59 23 * * *',
+    // cronTime: '* * * * *',
+    onTick: function() {
+      console.log('updating history...');
+      return sequelize.transaction(function(t) {
+          return Promise
+            .all([])
+            .then(ReportMove.move(t, Models.ReportCall, HistoryModels.ReportCallHistory))
+            .then(ReportMove.move(t, Models.ReportAgent, HistoryModels.ReportAgentHistory))
+            .then(ReportMove.move(t, Models.ReportMember, HistoryModels.ReportMemberHistory))
+            .then(ReportMove.move(t, Models.ReportQueue, HistoryModels.ReportQueueHistory))
+            .then(ReportMove.move(t, Models.ReportIntegration, HistoryModels.ReportIntegrationHistory))
+            .then(ReportMove.move(t, Models.ReportMailSession, HistoryModels.ReportMailSessionHistory))
+            .then(ReportMove.move(t, Models.ReportChat, HistoryModels.ReportChatHistory))
+            .then(ReportMove.move(t, Models.ReportChatSession, HistoryModels.ReportChatSessionHistory))
+            .then(ReportMove.move(t, Models.ReportMail, HistoryModels.ReportMailHistory))
+            .then(ReportMove.move(t, Models.ReportSquare, HistoryModels.ReportSquareHistory))
+            .then(ReportMove.move(t, Models.ReportSquareDetail, HistoryModels.ReportSquareDetailHistory))
+            .then(ReportMove.move(t, Models.ReportTransfer, HistoryModels.ReportTransferHistory))
+            .then(function() {
+              console.log('history updated');
+            })
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    }
+  });
+
+  job.start();
+}
index cf7e845..c8b3643 100644 (file)
@@ -1 +1,41 @@
-var _0x7019=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65\x64\x20\x52\x65\x70\x6F\x72\x74\x73\x20\x68\x69\x73\x74\x6F\x72\x79","\x6C\x6F\x67","\x74\x68\x65\x6E","\x69\x64","\x6D\x61\x70","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x7019[0];var _=require(_0x7019[1]);var moment=require(_0x7019[2]);exports[_0x7019[3]]=function(_0xe7a7x3,_0xe7a7x4,_0xe7a7x5){return function(){var _0xe7a7x6;return _0xe7a7x4[_0x7019[13]]({where:{createdAt:{$lte:moment()[_0x7019[12]](_0x7019[11])}},raw:true})[_0x7019[6]](function(_0xe7a7x7){_0xe7a7x6=_0xe7a7x7;return _0xe7a7x5[_0x7019[10]](_0xe7a7x7,{individualHooks:true,transaction:_0xe7a7x3})})[_0x7019[6]](function(){return _0xe7a7x4[_0x7019[9]]({where:{id:_[_0x7019[8]](_0xe7a7x6,_0x7019[7])}},{individualHooks:true,transaction:_0xe7a7x3})})[_0x7019[6]](function(){console[_0x7019[5]](_0x7019[4])})}}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var moment = require('moment');
+
+exports.move = function(t, Report, ReportHistory) {
+  return function() {
+    var _items;
+    return Report
+      .findAll({
+        where: {
+          createdAt: {
+            $lte: moment().format("YYYY-MM-DD HH:mm:ss")
+          }
+        },
+        raw: true
+      })
+      .then(function(items) {
+        _items = items;
+        return ReportHistory
+          .bulkCreate(items, {
+            individualHooks: true,
+            transaction: t
+          });
+      })
+      .then(function() {
+        return Report
+          .destroy({
+            where: {
+              id: _.map(_items, 'id')
+            }
+          }, {
+            individualHooks: true,
+            transaction: t
+          });
+      })
+      .then(function() {
+        console.log('updated Reports history');
+      })
+  }
+}
index f0c48ee..5bbc7c6 100644 (file)
@@ -1 +1,220 @@
-var _0xa386=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6D\x61\x69\x6C\x2D\x6C\x69\x73\x74\x65\x6E\x65\x72\x32","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x73\x6F\x75\x72\x63\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x5F\x63\x6F\x6E\x66\x69\x67","\x69\x6D\x61\x70","\x4D\x41\x49\x4C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x49\x4D\x41\x50\x20\x55\x50\x44\x41\x54\x45\x44","\x6C\x6F\x67","\x73\x74\x6F\x70","\x20\x49\x4D\x41\x50\x20\x44\x45\x53\x54\x52\x4F\x59","\x69\x6D\x61\x70\x20\x65\x78\x69\x73\x74\x73","\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x66\x69\x6C\x74\x65\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2F","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x6E\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x68\x54\x69\x6D\x65\x6F\x75\x74","\x6B\x65\x65\x70\x61\x6C\x69\x76\x65","\x73\x74\x61\x72\x74","\x73\x65\x72\x76\x65\x72\x3A\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x20\x49\x4D\x41\x50\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6F\x6E","\x73\x65\x72\x76\x65\x72\x3A\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x20\x49\x4D\x41\x50\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x20\x49\x4D\x41\x50\x20\x45\x52\x52\x4F\x52","\x45\x52\x52\x4F\x52","\x6D\x61\x69\x6C","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x6D\x73\x67","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x73\x75\x62\x6A\x65\x63\x74","\x66\x72\x6F\x6D","\x61\x64\x64\x72\x65\x73\x73","\x6D\x61\x70","\x74\x6F","\x63\x63","\x62\x63\x63","\x68\x74\x6D\x6C","\x74\x65\x78\x74","\x63\x72\x65\x61\x74\x65","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x66\x69\x6E\x64\x4F\x6E\x65","\x3B","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa386[0];var _=require(_0xa386[1]);var path=require(_0xa386[2]);var config=require(_0xa386[3]);var ImapListener=require(_0xa386[4]);var MailServerIn=require(_0xa386[6])[_0xa386[5]];var MailMessage=require(_0xa386[6])[_0xa386[7]];var MailAttachment=require(_0xa386[6])[_0xa386[8]];var MailRoom=require(_0xa386[6])[_0xa386[9]];var Contact=require(_0xa386[6])[_0xa386[10]];var ContactEmail=require(_0xa386[6])[_0xa386[11]];var sequelize=require(_0xa386[6])[_0xa386[12]];function Imap(_0x429cxd){var _0x429cxe;function _0x429cxf(_0x429cxd){if(!_0x429cxd[_0xa386[14]](_0xa386[13])&&!_0x429cxd[_0xa386[14]](_0xa386[15])&&_0x429cxd[_0xa386[16]]===_0x429cxe[_0xa386[19]][_0xa386[18]][_0xa386[17]]){console[_0xa386[22]](_0xa386[20]+_0x429cxd[_0xa386[16]]+_0xa386[21]);_0x429cxe[_0xa386[23]]();_0x429cx11(_0x429cxd)}}function _0x429cx10(_0x429cxd){if(_0x429cxd[_0xa386[16]]===_0x429cxe[_0xa386[19]][_0xa386[18]][_0xa386[17]]){console[_0xa386[22]](_0xa386[20]+_0x429cxd[_0xa386[16]]+_0xa386[24]);_0x429cxe[_0xa386[23]]();_0x429cxe=null}}function _0x429cx11(_0x429cxd){if(_0x429cxe){console[_0xa386[22]](_0xa386[25]);_0x429cxe[_0xa386[23]](_0x429cxd);_0x429cxe=null};_0x429cxe= new ImapListener({username:_0x429cxd[_0xa386[16]],password:_0x429cxd[_0xa386[26]],host:_0x429cxd[_0xa386[27]],port:_0x429cxd[_0xa386[28]],tls:_0x429cxd[_0xa386[29]],tlsOptions:{rejectUnauthorized:false},mailbox:_0x429cxd[_0xa386[30]],searchFilter:[_0x429cxd[_0xa386[31]]],markSeen:true,fetchUnreadOnStart:true,mailParserOptions:{streamAttachments:false},attachments:true,attachmentOptions:{directory:path[_0xa386[37]](config[_0xa386[32]],_0xa386[33],_0xa386[34],_0xa386[35],_0xa386[36])},connTimeout:_0x429cxd[_0xa386[38]],authTimeout:_0x429cxd[_0xa386[39]],keepalive:_0x429cxd[_0xa386[40]]});_0x429cxe[_0xa386[41]]();_0x429cxe[_0xa386[51]](_0xa386[42],function(){console[_0xa386[22]](_0xa386[20]+_0x429cxd[_0xa386[16]]+_0xa386[43]);return MailServerIn[_0xa386[50]](_0x429cxd[_0xa386[49]])[_0xa386[48]](function(_0x429cx13){return _0x429cx13[_0xa386[47]]({state:_0xa386[46]})})[_0xa386[45]](function(_0x429cx12){console[_0xa386[44]](_0x429cx12)})});_0x429cxe[_0xa386[51]](_0xa386[52],function(){console[_0xa386[22]](_0xa386[20]+_0x429cxd[_0xa386[53]]+_0xa386[54]);return MailServerIn[_0xa386[50]](_0x429cxd[_0xa386[49]])[_0xa386[48]](function(_0x429cx13){if(_0x429cx13){return _0x429cx13[_0xa386[47]]({state:_0xa386[55]})}})[_0xa386[45]](function(_0x429cx12){console[_0xa386[44]](_0x429cx12)})});_0x429cxe[_0xa386[51]](_0xa386[44],function(_0x429cx12){console[_0xa386[22]](_0xa386[20]+_0x429cxd[_0xa386[53]]+_0xa386[56],_0x429cx12);return MailServerIn[_0xa386[50]](_0x429cxd[_0xa386[49]])[_0xa386[48]](function(_0x429cx13){if(_0x429cx13){return _0x429cx13[_0xa386[47]]({state:_0xa386[57],source:_0x429cx12[_0xa386[15]]})}})[_0xa386[45]](function(_0x429cx12){console[_0xa386[44]](_0x429cx12)})});_0x429cxe[_0xa386[51]](_0xa386[58],function(_0x429cx14,_0x429cx15,_0x429cx16){var _0x429cx17;var _0x429cx18;var _0x429cx19,_0x429cx1a,_0x429cx1b,_0x429cx1c;return sequelize[_0xa386[76]](function(_0x429cx1d){if(_0x429cx14[_0xa386[59]]){return MailMessage[_0xa386[74]]({where:{messageId:_0x429cx14[_0xa386[59]][0]},include:[{all:true}]})[_0xa386[48]](function(_0x429cx1f){return _0x429cx1f[_0xa386[73]]()})[_0xa386[48]](function(_0x429cx1e){_0x429cx17=_0x429cx1e;console[_0xa386[22]](_0xa386[60],_0x429cx14);return MailMessage[_0xa386[72]]({messageId:_0x429cx14[_0xa386[61]],status:_0xa386[62],subject:_0x429cx14[_0xa386[63]],from:_[_0xa386[66]](_0x429cx14[_0xa386[64]],_0xa386[65]),to:_0x429cx14[_0xa386[67]]?_[_0xa386[66]](_0x429cx14[_0xa386[67]],_0xa386[65]):[],cc:_0x429cx14[_0xa386[68]]?_[_0xa386[66]](_0x429cx14[_0xa386[68]],_0xa386[65]):[],bcc:_0x429cx14[_0xa386[69]]?_[_0xa386[66]](_0x429cx14[_0xa386[69]],_0xa386[65]):[],html:_0x429cx14[_0xa386[70]]||null,text:_0x429cx14[_0xa386[71]]||null,MailAttachments:_0x429cx14[_0xa386[35]]||[],MailRoomId:_0x429cx1e[_0xa386[49]]},{include:[{model:MailAttachment}],transaction:_0x429cx1d})})}else {return MailRoom[_0xa386[72]]({roomId:_0x429cx14[_0xa386[61]],subject:_0x429cx14[_0xa386[63]],from:_[_0xa386[66]](_0x429cx14[_0xa386[64]],_0xa386[65])[_0xa386[37]](_0xa386[75]),MailMessages:[{messageId:_0x429cx14[_0xa386[61]],subject:_0x429cx14[_0xa386[63]],from:_[_0xa386[66]](_0x429cx14[_0xa386[64]],_0xa386[65]),to:_0x429cx14[_0xa386[67]]?_[_0xa386[66]](_0x429cx14[_0xa386[67]],_0xa386[65]):[],cc:_0x429cx14[_0xa386[68]]?_[_0xa386[66]](_0x429cx14[_0xa386[68]],_0xa386[65]):[],bcc:_0x429cx14[_0xa386[69]]?_[_0xa386[66]](_0x429cx14[_0xa386[69]],_0xa386[65]):[],status:_0xa386[62],html:_0x429cx14[_0xa386[70]]||null,text:_0x429cx14[_0xa386[71]]||null,MailAttachments:_0x429cx14[_0xa386[35]]||[]}],MailAccountId:_0x429cxd[_0xa386[53]]},{transaction:_0x429cx1d,include:[{model:MailMessage,include:[{model:MailAttachment}]}]})}})[_0xa386[45]](function(_0x429cx12){console[_0xa386[44]](_0x429cx12)})});_0x429cxe[_0xa386[51]](_0xa386[77],function(_0x429cx20){console[_0xa386[22]](_0x429cx20[_0xa386[2]])})}_0x429cx11(_0x429cxd);MailServerIn[_0xa386[78]](function(_0x429cxd){_0x429cxf(_0x429cxd)});MailServerIn[_0xa386[79]](function(_0x429cxd){_0x429cx10(_0x429cxd)});return {}}module[_0xa386[80]]=Imap
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var path = require('path');
+
+var config = require('../environment');
+
+var ImapListener = require("mail-listener2");
+var MailServerIn = require('../../models').MailServerIn;
+var MailMessage = require('../../models').MailMessage;
+var MailAttachment = require('../../models').MailAttachment;
+var MailRoom = require('../../models').MailRoom;
+var Contact = require('../../models').Contact;
+var sequelize = require('../../models').sequelize;
+
+function Imap() {
+  console.log('Imap Initialization...');
+  this.imap = null;
+}
+
+Imap.prototype.init = function(doc) {
+  var self = this;
+  self.onSave(doc);
+
+  MailServerIn.afterUpdate(function(doc) {
+    if (self.imap && doc.id === self.imap.mailServerInId) {
+      self.onUpdate(doc);
+    }
+  });
+  MailServerIn.afterDestroy(function(doc) {
+    if (self.imap && doc.id === self.imap.mailServerInId) {
+      self.onRemove(doc);
+    }
+  });
+};
+
+Imap.prototype.onSave = function(doc) {
+  if (this.imap) {
+    this.imap.stop();
+    this.imap = null;
+  }
+
+  this.imap = new ImapListener({
+    username: doc.username,
+    password: doc.password,
+    host: doc.host,
+    port: doc.port,
+    tls: doc.ssl,
+    tlsOptions: {
+      rejectUnauthorized: false
+    },
+    mailbox: doc.mailbox, // mailbox to monitor
+    searchFilter: [doc.filter], // the search filter being used after an IDLE notification has been retrieved
+    markSeen: true, // all fetched email willbe marked as seen and not fetched next time
+    fetchUnreadOnStart: true, // use it only if you want to get all unread email on lib start. Default is `false`,,
+    mailParserOptions: {
+      streamAttachments: false
+    }, // options to be passed to mailParser lib.
+    attachments: true, // download attachments as they are encountered to the project directory
+    attachmentOptions: {
+      directory: path.join(config.root, 'server', 'files', 'attachments', '/')
+    }, // specify a download directory for attachments,
+    connTimeout: doc.connTimeout,
+    authTimeout: doc.authTimeout,
+    keepalive: doc.keepalive
+  });
+
+  this.imap.start();
+
+  this.imap.on("server:connected", function() {
+    console.log("MAIL - Account " + doc.username + " IMAP CONNECTED");
+    // SETUP CONNECTED STATUS
+    return MailServerIn
+      .findById(doc.id)
+      .then(function(msi) {
+        return msi
+          .update({
+            state: 'CONNECTED'
+          });
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  });
+
+  this.imap.on("server:disconnected", function() {
+    console.log("MAIL - Account " + doc.MailAccountId + " IMAP DISCONNECTED");
+    return MailServerIn
+      .findById(doc.id)
+      .then(function(msi) {
+        if (msi) {
+          return msi
+            .update({
+              state: 'DISCONNECTED'
+            });
+        }
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  });
+
+  this.imap.on("error", function(err) {
+    console.log("MAIL - Account " + doc.MailAccountId + " IMAP ERROR", err);
+    return MailServerIn
+      .findById(doc.id)
+      .then(function(msi) {
+        if (msi) {
+          return msi
+            .update({
+              state: 'ERROR',
+              source: err.source
+            });
+        }
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  });
+
+  this.imap.on("mail", function(msg, seqno, attributes) {
+    var _mRoom;
+    var _mMessage;
+    var _mFrom, _mTo, _mCc, _mBcc;
+
+    return sequelize.transaction(function(t) {
+      if (msg.inReplyTo) {
+        return MailMessage
+          .findOne({
+            where: {
+              messageId: msg.inReplyTo[0]
+            },
+            include: [{
+              all: true
+            }]
+          })
+          .then(function(mailMessageParent) {
+            return mailMessageParent
+              .getMailRoom();
+          })
+          .then(function(mailRoom) {
+            _mRoom = mailRoom;
+            console.log('msg', msg);
+
+            return MailMessage
+              .create({
+                messageId: msg.messageId,
+                status: 'RECEIVED',
+                subject: msg.subject,
+                from: _.map(msg.from, 'address'),
+                to: msg.to ? _.map(msg.to, 'address') : [],
+                cc: msg.cc ? _.map(msg.cc, 'address') : [],
+                bcc: msg.bcc ? _.map(msg.bcc, 'address') : [],
+                html: msg.html || null,
+                text: msg.text || null,
+                MailAttachments: msg.attachments || [],
+                MailRoomId: mailRoom.id,
+              }, {
+                include: [{
+                  model: MailAttachment
+                }],
+                transaction: t
+              });
+          });
+
+      } else {
+        return MailRoom
+          .create({
+            roomId: msg.messageId,
+            subject: msg.subject,
+            from: _.map(msg.from, 'address').join(';'),
+            MailMessages: [{
+              messageId: msg.messageId,
+              subject: msg.subject,
+              from: _.map(msg.from, 'address'),
+              to: msg.to ? _.map(msg.to, 'address') : [],
+              cc: msg.cc ? _.map(msg.cc, 'address') : [],
+              bcc: msg.bcc ? _.map(msg.bcc, 'address') : [],
+              status: 'RECEIVED',
+              html: msg.html || null,
+              text: msg.text || null,
+              MailAttachments: msg.attachments || []
+            }],
+            MailAccountId: doc.MailAccountId
+          }, {
+            transaction: t,
+            include: [{
+              model: MailMessage,
+              include: [{
+                model: MailAttachment
+              }]
+            }]
+          });
+      }
+    }).catch(function(err) {
+      console.error(err);
+    });
+  });
+
+  this.imap.on("attachment", function(attachment) {
+    console.log(attachment.path);
+  });
+
+  this.imap.mailServerInId = doc.id;
+}
+
+Imap.prototype.onUpdate = function(doc) {
+  if (!doc.changed('state') && !doc.changed('source')) {
+    console.log("MAIL - Account " + doc.username + " IMAP UPDATED");
+    this.onSave(doc);
+  }
+}
+
+Imap.prototype.onRemove = function(doc) {
+  console.log("MAIL - Account " + doc.username + " IMAP DESTROY");
+  this.imap.stop();
+  this.imap = null;
+}
+
+module.exports = Imap;
index 8d848a8..7d00997 100644 (file)
@@ -1 +1,23 @@
-var _0xc92d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6D\x61\x70","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xc92d[0];var Imap=require(_0xc92d[1]);var MailServerIn=require(_0xc92d[3])[_0xc92d[2]];module[_0xc92d[4]]=function(){MailServerIn[_0xc92d[5]](function(_0x9b37x3){ new Imap(_0x9b37x3)});return MailServerIn[_0xc92d[10]]()[_0xc92d[9]](function(_0x9b37x5){_0x9b37x5[_0xc92d[8]](function(_0x9b37x6){ new Imap(_0x9b37x6)})})[_0xc92d[7]](function(_0x9b37x4){console[_0xc92d[6]](_0x9b37x4)})}
\ No newline at end of file
+'use strict';
+
+var MailServerIn = require('../../models').MailServerIn;
+var Imap = require('./imap');
+
+module.exports = function() {
+  MailServerIn.afterCreate(function(doc) {
+    var imap = new Imap();
+    imap.init(doc);
+  });
+
+  return MailServerIn
+    .findAll()
+    .then(function(servers) {
+      servers.forEach(function(server) {
+        var imap = new Imap();
+        imap.init(server)
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
index 14dd7e9..8b87bc5 100644 (file)
@@ -1 +1,24 @@
-var _0x283c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x66\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x70\x61\x72\x73\x65","\x64\x69\x72","\x6E\x61\x6D\x65","\x6D\x61\x69\x6E","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x283c[0];var path=require(_0x283c[1]);var fs=require(_0x283c[2]);var Integration=require(_0x283c[4])[_0x283c[3]];module[_0x283c[5]]=function(_0x4c87x4,_0x4c87x5){Integration[_0x283c[16]]()[_0x283c[15]](function(_0x4c87x7){_0x4c87x7[_0x283c[14]](function(_0x4c87x8){var _0x4c87x9=path[_0x283c[8]](_0x4c87x8[_0x283c[1]]);var _0x4c87xa=path[_0x283c[12]](_0x4c87x9[_0x283c[9]],_0x4c87x9[_0x283c[10]],_0x4c87x8[_0x283c[11]]);if(fs[_0x283c[13]](_0x4c87xa)){require(_0x4c87xa)(_0x4c87x4,_0x4c87x5)}})})[_0x283c[7]](function(_0x4c87x6){console[_0x283c[6]](_0x4c87x6)})}
\ No newline at end of file
+'use strict';
+
+var path = require('path');
+var fs = require('fs');
+
+var Integration = require('../models').Integration;
+
+module.exports = function(io, ami) {
+
+  Integration
+    .findAll()
+    .then(function(integrations) {
+      integrations.forEach(function(integration) {
+        var info = path.parse(integration.path);
+        var file = path.join(info.dir, info.name, integration.main);
+        if (fs.existsSync(file)) {
+          require(file)(io, ami);
+        }
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+};
index 552cdca..46f19fb 100644 (file)
@@ -1 +1,120 @@
-var _0x6e20=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x54\x72\x69\x67\x67\x65\x72\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x76\x61\x72\x73\x65\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x6B\x65\x79\x73","\x68\x65\x61\x64","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x70\x75\x73\x68","\x6F\x6E","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x72\x65\x73\x75\x6C\x74","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x7A\x65\x6E\x64\x65\x73\x6B","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A\x20","\x73\x74\x61\x74\x65","\x6D\x61\x70","\x69\x6E\x64\x65\x78\x4F\x66","\x61\x63\x74\x69\x76\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x41\x66\x74\x65\x72\x20\x64\x65\x73\x74\x72\x6F\x79\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6e20[0];var _=require(_0x6e20[1]);var IntegrationModel=require(_0x6e20[3])[_0x6e20[2]];var Variable=require(_0x6e20[3])[_0x6e20[4]];var Zendesk=require(_0x6e20[5]);function Integration(_0xe553x6){console[_0x6e20[7]](_0x6e20[6]);var _0xe553x7= new Zendesk();var _0xe553x8=[];var _0xe553x9=[];var _0xe553xa={};_0xe553x6[_0x6e20[17]](_0x6e20[8],function(_0xe553xb){if(!_0xe553xa[_0x6e20[10]](_0xe553xb[_0x6e20[9]])){_0xe553xa[_0xe553xb[_0x6e20[9]]]=[]};if(_0xe553xb[_0x6e20[10]](_0x6e20[11])&&_0xe553xb[_0x6e20[10]](_0x6e20[12])){var _0xe553xc=_[_0x6e20[15]](_0xe553x9,{"\x6E\x61\x6D\x65":_[_0x6e20[14]](_[_0x6e20[13]](_0xe553xb[_0x6e20[11]]))});if(_0xe553xc>=0){var _0xe553xd={name:_[_0x6e20[14]](_[_0x6e20[13]](_0xe553xb[_0x6e20[11]])),value:_0xe553xb[_0x6e20[12]]};_0xe553xa[_0xe553xb[_0x6e20[9]]][_0x6e20[16]](_0xe553xd)}}});Variable[_0x6e20[19]]()[_0x6e20[18]](function(_0xe553xe){_0xe553x9=_0xe553xe;synchVariables(_0xe553x9)});IntegrationModel[_0x6e20[19]]({where:{active:1}})[_0x6e20[18]](function(_0xe553xf){_0xe553x8=_0xe553xf;synchIntegrations(_0xe553x8)});this[_0x6e20[20]]=function(_0xe553x10,_0xe553x11,_0xe553x12){console[_0x6e20[7]](_0x6e20[21]);if(integrationIsActive(_0xe553x10[_0x6e20[22]],_0xe553x8)){switch(_0xe553x10[_0x6e20[22]]){case _0x6e20[27]:_0xe553x7[_0x6e20[26]](_0xe553x10[_0x6e20[23]],_0xe553x10[_0x6e20[24]],_0xe553x12,_0xe553x11,_[_0x6e20[25]](_0xe553xa,_0xe553x11[_0x6e20[9]]));break;default:console[_0x6e20[7]](_0x6e20[28],_0xe553x10[_0x6e20[22]])}}}}function integrationIsActive(_0xe553x14,_0xe553x15){var _0xe553x16=_[_0x6e20[30]](_0xe553x15,_0x6e20[29]);if(_[_0x6e20[31]](_0xe553x16,_0xe553x14)>=0){return true};return false}function synchIntegrations(_0xe553x15){IntegrationModel[_0x6e20[37]](function(_0xe553x11){if(_0xe553x11[_0x6e20[32]]){updateCollection(_0xe553x15,_0xe553x11)}else {_[_0x6e20[34]](_0xe553x15,{id:_0xe553x11[_0x6e20[33]]})};console[_0x6e20[7]](_0x6e20[35],_0xe553x15[_0x6e20[36]])})}function synchVariables(_0xe553x15){Variable[_0x6e20[39]](function(_0xe553x11){updateCollection(_0xe553x15,_0xe553x11);console[_0x6e20[7]](_0x6e20[38],_0xe553x15[_0x6e20[36]])});Variable[_0x6e20[37]](function(_0xe553x11){updateCollection(_0xe553x15,_0xe553x11);console[_0x6e20[7]](_0x6e20[40],_0xe553x15[_0x6e20[36]])});Variable[_0x6e20[42]](function(_0xe553x11){_[_0x6e20[34]](_0xe553x15,{id:_0xe553x11[_0x6e20[33]]});console[_0x6e20[7]](_0x6e20[41],_0xe553x15[_0x6e20[36]])})}function updateCollection(_0xe553x1a,_0xe553x11){var _0xe553x1b=_[_0x6e20[43]](_0xe553x1a,{id:_0xe553x11[_0x6e20[33]]});var _0xe553xc=_0xe553x1a[_0x6e20[31]](_0xe553x1b);if(_0xe553x1b){_[_0x6e20[44]](_0xe553x1a[_0xe553xc],_0xe553x11)}else {_0xe553x1a[_0x6e20[45]](_0xe553x11)}}module[_0x6e20[46]]=Integration
\ No newline at end of file
+'use strict';
+
+// Library
+var _ = require('lodash');
+// Models
+var IntegrationModel = require('../../models').Integration;
+var Variable = require('../../models').Variable;
+// Integration service
+var Zendesk = require('./zendesk');
+
+function Integration(ami) {
+  console.log('Trigger Integration Initialization...');
+
+  var zendesk = new Zendesk();
+
+  var activeIntegrations = [];
+  var activeVariables = [];
+  var channelVariables = {};
+
+  ami.on('varset', function(evt) {
+    if (!channelVariables.hasOwnProperty(evt.uniqueid)) {
+      channelVariables[evt.uniqueid] = [];
+    }
+    if (evt.hasOwnProperty('variable') && evt.hasOwnProperty('value')) {
+      var index = _.findIndex(activeVariables, {
+        'name': _.head(_.keys(evt.variable))
+      });
+      if (index >= 0) {
+        var variable = {
+          name: _.head(_.keys(evt.variable)),
+          value: evt.value
+        };
+        channelVariables[evt.uniqueid].push(variable);
+      }
+    }
+  });
+
+  Variable
+    .findAll()
+    .then(function(variables) {
+      activeVariables = variables;
+      synchVariables(activeVariables);
+    })
+
+  IntegrationModel
+    .findAll({
+      where: {
+        active: 1
+      }
+    })
+    .then(function(integrations) {
+      activeIntegrations = integrations;
+      synchIntegrations(activeIntegrations);
+    });
+
+  this.manageEvent = function(rule, doc, channel) {
+    console.log('Integration: manageEvent');
+    if (integrationIsActive(rule.data1, activeIntegrations)) {
+      switch (rule.data1) {
+        case 'zendesk':
+          zendesk.handleEvent(rule.data2, rule.data3, channel, doc, _.result(channelVariables, doc.uniqueid));
+          break;
+        default:
+          console.log('Integration not recognized: ', rule.data1);
+      }
+    }
+  }
+}
+
+function integrationIsActive(integration, active) {
+  var integratioNames = _.map(active, 'state');
+  if (_.indexOf(integratioNames, integration) >= 0) {
+    return true;
+  }
+  return false;
+}
+
+function synchIntegrations(active) {
+  IntegrationModel.afterUpdate(function(doc) {
+    if (doc.active) {
+      updateCollection(active, doc);
+    } else {
+      _.remove(active, {
+        id: doc.id
+      });
+    }
+    console.log('After update, integrations are ', active.length);
+  });
+}
+
+function synchVariables(active) {
+  Variable.afterCreate(function(doc) {
+    updateCollection(active, doc);
+    console.log('After create, Variables are ', active.length);
+  });
+  Variable.afterUpdate(function(doc) {
+    updateCollection(active, doc);
+    console.log('After update, Variables are ', active.length);
+  });
+  Variable.afterDestroy(function(doc) {
+    _.remove(active, {
+      id: doc.id
+    });
+    console.log('After destroy, Variables are ', active.length);
+  });
+}
+
+function updateCollection(collection, doc) {
+  var oldItem = _.find(collection, {
+    id: doc.id
+  });
+  var index = collection.indexOf(oldItem);
+  if (oldItem) {
+    _.merge(collection[index], doc);
+  } else {
+    collection.unshift(doc);
+  }
+}
+
+module.exports = Integration;
index d0fadb9..5abebe0 100644 (file)
@@ -1 +1,530 @@
-var _0xcf17=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x5A\x65\x6E\x64\x65\x73\x6B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x69\x64","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0xcf17[0];var _=require(_0xcf17[1]);var util=require(_0xcf17[2]);var rp=require(_0xcf17[3]);var ZendeskIntegration=require(_0xcf17[5])[_0xcf17[4]];var ZendeskConfiguration=require(_0xcf17[5])[_0xcf17[6]];var ReportIntegration=require(_0xcf17[5])[_0xcf17[7]];function Zendesk(){console[_0xcf17[9]](_0xcf17[8])}Zendesk[_0xcf17[11]][_0xcf17[10]]=function(_0x4013x8,_0x4013x9,_0x4013xa,_0x4013xb,_0x4013xc){var _0x4013xd={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined};if(!_0x4013x8|| !_0x4013x9){console[_0xcf17[13]](_0xcf17[12]);return};ZendeskConfiguration[_0xcf17[16]]({where:{id:_0x4013x9,AccountId:_0x4013x8},include:[{all:true,include:[{all:true}]}]})[_0xcf17[15]](handleEntityNotFound())[_0xcf17[15]](handleConnection(_0x4013xd))[_0xcf17[15]](searchAgent(_0x4013xd,_0x4013xa,_0x4013xb))[_0xcf17[15]](handleAgent(_0x4013xd,_0x4013xa,_0x4013xb))[_0xcf17[15]](searchAdmin(_0x4013xd))[_0xcf17[15]](handleAdmin(_0x4013xd))[_0xcf17[15]](searchEndUser(_0x4013xd,_0x4013xa,_0x4013xb))[_0xcf17[15]](handleEndUser(_0x4013xd,_0x4013xa,_0x4013xb))[_0xcf17[15]](endUserCreation(_0x4013xd,_0x4013xa,_0x4013xb))[_0xcf17[15]](handleEndUserCreation(_0x4013xd,_0x4013xa,_0x4013xb))[_0xcf17[15]](ticketCreation(_0x4013xd,_0x4013xb,_0x4013xc))[_0xcf17[15]](handleTicketDisplay(_0x4013xd))[_0xcf17[15]](handleReportIntegration(_0x4013xd,_0x4013xa,_0x4013xb,_0x4013x8))[_0xcf17[15]](handleEnd(_0x4013xd))[_0xcf17[14]](handleError(_0x4013xd,_0x4013xa,_0x4013xb,_0x4013x8))};function handleEntityNotFound(){return function(_0x4013xf){if(!_0x4013xf){return null};return _0x4013xf}}function handleConnection(_0x4013xd){return function(_0x4013x11){var _0x4013x12=getAccountConfiguration(_0x4013x11.ZendeskAccount);_0x4013xd[_0xcf17[17]]=_0x4013x11;_0x4013xd[_0xcf17[18]]=_0x4013x12[_0xcf17[18]];_0x4013xd[_0xcf17[19]]=_0x4013x12[_0xcf17[19]]}}function getAccountConfiguration(_0x4013x14){var _0x4013x15={uri:stripTrailingSlash(_0x4013x14[_0xcf17[20]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xcf17[21],"\x41\x63\x63\x65\x70\x74":_0xcf17[21]}};var _0x4013x16=_0x4013x14[_0xcf17[22]];if(_0x4013x14[_0xcf17[23]]===_0xcf17[24]){_0x4013x16=_0x4013x16+_0xcf17[25]+_0x4013x14[_0xcf17[24]]}else {if(_0x4013x14[_0xcf17[23]]===_0xcf17[26]){_0x4013x16=_0x4013x16+_0xcf17[27]+_0x4013x14[_0xcf17[26]]}};_0x4013x15[_0xcf17[19]][_0xcf17[28]]=_0xcf17[29]+ new Buffer(_0x4013x16).toString(_0xcf17[30]);return _0x4013x15}function searchAgent(_0x4013xd,_0x4013xa,_0x4013xb){return function(){console[_0xcf17[9]](_0xcf17[31],getValueFromPropertyName(_0x4013xb,getAgentSearchPropertyFromChannel(_0x4013xa)));return rp({uri:_0x4013xd[_0xcf17[18]]+_0xcf17[32],qs:{"\x71\x75\x65\x72\x79":util[_0xcf17[34]](_0xcf17[33],getValueFromPropertyName(_0x4013xb,getAgentSearchPropertyFromChannel(_0x4013xa)))},headers:_0x4013xd[_0xcf17[19]],json:true})}}function getAgentSearchPropertyFromChannel(_0x4013xa){var _0x4013x19=_0xcf17[35];if(_0x4013xa){switch(_0x4013xa){case _0xcf17[37]:_0x4013x19=_0xcf17[36];break;default:_0x4013x19=_0xcf17[36];console[_0xcf17[13]](_0xcf17[38],_0x4013xa)}};return _0x4013x19}function getValueFromPropertyName(_0x4013xb,_0x4013x19){return _[_0xcf17[39]](_0x4013xb,_0x4013x19)}function handleAgent(_0x4013xd,_0x4013xa,_0x4013x1c){return function(_0x4013xb){if(_0x4013xb[_0xcf17[41]][_0xcf17[40]]>0&&_0x4013xb[_0xcf17[42]]>0){console[_0xcf17[9]](_0xcf17[43],getValueFromPropertyName(_0x4013x1c,getAgentSearchPropertyFromChannel(_0x4013xa)));_0x4013xd[_0xcf17[44]]=getMatchObject(_0x4013xb[_0xcf17[41]],_0xcf17[45],getValueFromPropertyName(_0x4013x1c,getAgentSearchPropertyFromChannel(_0x4013xa)));return _0x4013xd[_0xcf17[44]]};return}}function getMatchObject(_0x4013x1e,_0x4013x19,_0x4013x1f){var _0x4013x20=_[_0xcf17[16]](_0x4013x1e,{property:_0x4013x1f});if(_0x4013x20){return _0x4013x20};return _[_0xcf17[46]](_0x4013x1e)}function searchAdmin(_0x4013xd){return function(_0x4013xb){if(_0x4013xb){return};console[_0xcf17[9]](_0xcf17[47]);return rp({uri:_0x4013xd[_0xcf17[18]]+_0xcf17[48],headers:_0x4013xd[_0xcf17[19]],json:true})}}function handleAdmin(_0x4013xd){return function(_0x4013xb){if(!_0x4013xb){return};if(_0x4013xb[_0xcf17[49]]){console[_0xcf17[9]](_0xcf17[50]);_0x4013xd[_0xcf17[44]]=_0x4013xb[_0xcf17[49]]};return}}function searchEndUser(_0x4013xd,_0x4013xa,_0x4013xb){return function(){console[_0xcf17[9]](_0xcf17[51],getValueFromPropertyName(_0x4013xb,getEndUserSearchPropertyFromChannel(_0x4013xa)));return rp({uri:_0x4013xd[_0xcf17[18]]+_0xcf17[32],qs:{"\x71\x75\x65\x72\x79":util[_0xcf17[34]](_0xcf17[52],getEndUserSearchQueryFromChannel(_0x4013xa),getValueFromPropertyName(_0x4013xb,getEndUserSearchPropertyFromChannel(_0x4013xa)))},headers:_0x4013xd[_0xcf17[19]],json:true})}}function getEndUserSearchQueryFromChannel(_0x4013xa){var _0x4013x19=_0xcf17[35];if(_0x4013xa){switch(_0x4013xa){case _0xcf17[37]:_0x4013x19=_0xcf17[53];break;default:_0x4013x19=_0xcf17[53];console[_0xcf17[13]](_0xcf17[38],_0x4013xa)}};return _0x4013x19}function getEndUserSearchPropertyFromChannel(_0x4013xa){var _0x4013x19=_0xcf17[35];if(_0x4013xa){switch(_0x4013xa){case _0xcf17[37]:_0x4013x19=_0xcf17[54];break;default:_0x4013x19=_0xcf17[54];console[_0xcf17[13]](_0xcf17[38],_0x4013xa)}};return _0x4013x19}function getEndUserNamePropertyFromChannel(_0x4013xa){var _0x4013x19=_0xcf17[35];if(_0x4013xa){switch(_0x4013xa){case _0xcf17[37]:_0x4013x19=_0xcf17[55];break;default:_0x4013x19=_0xcf17[55];console[_0xcf17[13]](_0xcf17[38],_0x4013xa)}};return _0x4013x19}function handleEndUser(_0x4013xd,_0x4013xa,_0x4013x1c){return function(_0x4013xb){if(_0x4013xb[_0xcf17[41]][_0xcf17[40]]>0&&_0x4013xb[_0xcf17[42]]>0){console[_0xcf17[9]](_0xcf17[56],getValueFromPropertyName(_0x4013x1c,getEndUserSearchPropertyFromChannel(_0x4013xa)));_0x4013xd[_0xcf17[57]]=_0x4013xb[_0xcf17[41]][0];return _0x4013xd[_0xcf17[57]]};return}}function endUserCreation(_0x4013xd,_0x4013xa,_0x4013x1c){return function(_0x4013xb){if(_0x4013xb){return};console[_0xcf17[9]](_0xcf17[58],getValueFromPropertyName(_0x4013x1c,getEndUserSearchPropertyFromChannel(_0x4013xa)));console[_0xcf17[9]](getJsonForEndUserCreation(_0x4013xa,_0x4013x1c));return rp({uri:_0x4013xd[_0xcf17[18]]+_0xcf17[59],method:_0xcf17[60],body:{user:getJsonForEndUserCreation(_0x4013xa,_0x4013x1c)},headers:_0x4013xd[_0xcf17[19]],json:true})}}function getJsonForEndUserCreation(_0x4013xa,_0x4013xb){var _0x4013x2a={role:_0xcf17[61]};switch(_0x4013xa){case _0xcf17[37]:if(_0x4013xb[_0xcf17[55]]){_0x4013x2a[_0xcf17[45]]=getValueFromPropertyName(_0x4013xb,getEndUserNamePropertyFromChannel(_0x4013xa))}else {_0x4013x2a[_0xcf17[45]]=util[_0xcf17[34]](_0xcf17[62],getValueFromPropertyName(_0x4013xb,getAgentSearchPropertyFromChannel(_0x4013xa)))};_0x4013x2a[_0xcf17[53]]=getValueFromPropertyName(_0x4013xb,getEndUserSearchPropertyFromChannel(_0x4013xa));break;default:console[_0xcf17[13]](_0xcf17[38],_0x4013xa)};return _0x4013x2a}function handleEndUserCreation(_0x4013xd,_0x4013xa,_0x4013x1c){return function(_0x4013xb){if(!_0x4013xb){return};if(_0x4013xb[_0xcf17[49]]){console[_0xcf17[9]](_0xcf17[63],getValueFromPropertyName(_0x4013x1c,getEndUserSearchPropertyFromChannel(_0x4013xa)));_0x4013xd[_0xcf17[57]]=_0x4013xb[_0xcf17[49]]};return}}function ticketCreation(_0x4013xd,_0x4013x1c,_0x4013xc){return function(){var _0x4013x2d={requester_id:_0x4013xd[_0xcf17[44]][_0xcf17[64]],submitter_id:_0x4013xd[_0xcf17[57]][_0xcf17[64]],assignee_id:_0x4013xd[_0xcf17[57]][_0xcf17[64]],tags:createTagsFromConfiguration(_0x4013xd),subject:createSubjectFromConfiguration(_0x4013xd,_0x4013x1c,_0x4013xc),description:createDescriptionFromConfiguration(_0x4013xd,_0x4013x1c,_0x4013xc),custom_fields:createCustomFieldsFromConfiguration(_0x4013xd,_0x4013x1c,_0x4013xc)};var _0x4013x2e=createFieldsFromConfiguration(_0x4013xd);if(_0x4013x2e[_0xcf17[40]]>0){_[_0xcf17[66]](_0x4013x2e,function(_0x4013x2f){_0x4013x2d[_0x4013x2f[_0xcf17[64]]]=_0x4013x2f[_0xcf17[65]]})};console[_0xcf17[9]](_0xcf17[67],_0x4013x2d);return rp({uri:_0x4013xd[_0xcf17[18]]+_0xcf17[68],method:_0xcf17[60],body:{ticket:_0x4013x2d},headers:_0x4013xd[_0xcf17[19]],json:true})}}function createTagsFromConfiguration(_0x4013xd){var _0x4013x31=[];if(_0x4013xd[_0xcf17[17]][_0xcf17[69]][_0xcf17[40]]>0){_0x4013x31=_[_0xcf17[70]](_0x4013xd[_0xcf17[17]].Tags,_0xcf17[45])};return _0x4013x31}function createSubjectFromConfiguration(_0x4013xd,_0x4013x1c,_0x4013xc){var _0x4013x33=_0xcf17[35];var _0x4013x34=[];if(_0x4013xd[_0xcf17[17]][_0xcf17[71]][_0xcf17[40]]>0){var _0x4013x35=_[_0xcf17[72]](_0x4013xd[_0xcf17[17]].Subject,[_0xcf17[64]]);_[_0xcf17[66]](_0x4013x35,function(_0x4013x36){if(_0x4013x36[_0xcf17[73]]===_0xcf17[74]){_0x4013x34[_0xcf17[76]](_0x4013x36[_0xcf17[75]])}else {if(_0x4013x36[_0xcf17[73]]===_0xcf17[77]&&_0x4013x36[_0xcf17[78]]){var _0x4013x37=getValueFromPropertyName(_0x4013x1c,_0x4013x36[_0xcf17[78]]);if(_0x4013x37){_0x4013x34[_0xcf17[76]](_0x4013x37.toString())}}else {if(_0x4013x36[_0xcf17[73]]===_0xcf17[79]){var _0x4013x38=_[_0xcf17[16]](_0x4013xc,{"\x6E\x61\x6D\x65":_0x4013x36[_0xcf17[80]][_0xcf17[45]]});if(_0x4013x38){_0x4013x34[_0xcf17[76]](_0x4013x38[_0xcf17[65]].toString())}}}}});_0x4013x33=_0x4013x34[_0xcf17[82]](_0xcf17[81])};return _0x4013x33}function createDescriptionFromConfiguration(_0x4013xd,_0x4013x1c,_0x4013xc){var _0x4013x3a=_0xcf17[35];var _0x4013x34=[];if(_0x4013xd[_0xcf17[17]][_0xcf17[83]][_0xcf17[40]]>0){var _0x4013x3b=_[_0xcf17[72]](_0x4013xd[_0xcf17[17]].Description,[_0xcf17[64]]);_[_0xcf17[66]](_0x4013x3b,function(_0x4013x36){if(_0x4013x36[_0xcf17[73]]===_0xcf17[74]){_0x4013x34[_0xcf17[76]](_0x4013x36[_0xcf17[75]])}else {if(_0x4013x36[_0xcf17[73]]===_0xcf17[84]){if(_0x4013x36[_0xcf17[85]]===_0xcf17[74]){_0x4013x34[_0xcf17[76]](util[_0xcf17[34]](_0xcf17[86],_0x4013x36[_0xcf17[87]],_0x4013x36[_0xcf17[88]]))}else {if(_0x4013x36[_0xcf17[85]]===_0xcf17[77]&&_0x4013x36[_0xcf17[78]]){var _0x4013x37=getValueFromPropertyName(_0x4013x1c,_0x4013x36[_0xcf17[78]]);if(_0x4013x37){_0x4013x34[_0xcf17[76]](util[_0xcf17[34]](_0xcf17[86],_0x4013x36[_0xcf17[87]],_0x4013x37.toString()))}}else {if(_0x4013x36[_0xcf17[85]]===_0xcf17[79]){var _0x4013x38=_[_0xcf17[16]](_0x4013xc,{"\x6E\x61\x6D\x65":_0x4013x36[_0xcf17[80]][_0xcf17[45]]});if(_0x4013x38){_0x4013x34[_0xcf17[76]](util[_0xcf17[34]](_0xcf17[86],_0x4013x36[_0xcf17[87]],_0x4013x38[_0xcf17[65]].toString()))}}}}}}});_0x4013x3a=_0x4013x34[_0xcf17[82]](_0xcf17[89])};return _0x4013x3a}function createCustomFieldsFromConfiguration(_0x4013xd,_0x4013x1c,_0x4013xc){var _0x4013x3d=[];var _0x4013x3e=[];if(_0x4013xd[_0xcf17[17]][_0xcf17[90]][_0xcf17[40]]>0){_0x4013x3d=_[_0xcf17[91]](_0x4013xd[_0xcf17[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xcf17[66]](_0x4013x3d,function(_0x4013x2f){if(_0x4013x2f[_0xcf17[73]]===_0xcf17[74]){_0x4013x3e[_0xcf17[76]]({id:_0x4013x2f[_0xcf17[92]],value:_0x4013x2f[_0xcf17[75]]})}else {if(_0x4013x2f[_0xcf17[73]]===_0xcf17[77]){var _0x4013x37=getValueFromPropertyName(_0x4013x1c,_0x4013x2f[_0xcf17[78]]);if(_0x4013x37){_0x4013x3e[_0xcf17[76]]({id:_0x4013x2f[_0xcf17[92]],value:_0x4013x37.toString()})}}else {if(_0x4013x2f[_0xcf17[73]]===_0xcf17[79]){var _0x4013x38=_[_0xcf17[16]](_0x4013xc,{"\x6E\x61\x6D\x65":_0x4013x2f[_0xcf17[80]][_0xcf17[45]]});if(_0x4013x38){_0x4013x3e[_0xcf17[76]]({id:_0x4013x2f[_0xcf17[92]],value:_0x4013x38[_0xcf17[65]].toString()})}}}}})};return _0x4013x3e}function createFieldsFromConfiguration(_0x4013xd){var _0x4013x2e=[];var _0x4013x3e=[];if(_0x4013xd[_0xcf17[17]][_0xcf17[90]][_0xcf17[40]]>0){_0x4013x2e=_[_0xcf17[91]](_0x4013xd[_0xcf17[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xcf17[66]](_0x4013x2e,function(_0x4013x2f){if(_0x4013x2f[_0xcf17[73]]===_0xcf17[74]){_0x4013x3e[_0xcf17[76]]({id:_0x4013x2f[_0xcf17[93]],value:_0x4013x2f[_0xcf17[75]]})}})};return _0x4013x3e}function handleTicketDisplay(_0x4013xd){return function(_0x4013xb){if(_0x4013xb[_0xcf17[94]]){console[_0xcf17[9]](_0xcf17[95]);_0x4013xd[_0xcf17[94]]=_0x4013xb[_0xcf17[94]];var _0x4013x41=util[_0xcf17[34]](_0xcf17[96],_0x4013xd[_0xcf17[44]][_0xcf17[64]],_0x4013xd[_0xcf17[94]][_0xcf17[64]]);return rp({uri:_0x4013xd[_0xcf17[18]]+_0x4013x41,method:_0xcf17[60],headers:_0x4013xd[_0xcf17[19]],json:true})};return}}function handleReportIntegration(_0x4013xd,_0x4013xa,_0x4013xb,_0x4013x8){return function(){_0x4013xb=_0x4013xb[_0xcf17[97]];delete _0x4013xb[_0xcf17[64]];_0x4013xb[_0xcf17[98]]=_0xcf17[99];_0x4013xb[_0xcf17[100]]=_0x4013xa;_0x4013xb[_0xcf17[101]]=_0xcf17[102];_0x4013xb[_0xcf17[103]]=_0x4013xd[_0xcf17[94]][_0xcf17[64]];_0x4013xb[_0xcf17[104]]=_0x4013x8;return ReportIntegration[_0xcf17[105]](_0x4013xb)}}function handleEnd(_0x4013xd,_0x4013xb,_0x4013xa){return function(){console[_0xcf17[9]](util[_0xcf17[34]](_0xcf17[106],_0x4013xd[_0xcf17[94]][_0xcf17[64]],_0x4013xd[_0xcf17[44]][_0xcf17[64]]));_0x4013xd=undefined;return}}function handleError(_0x4013xd,_0x4013xa,_0x4013xb,_0x4013x8){return function(_0x4013x45){console[_0xcf17[13]](_0xcf17[107]);console[_0xcf17[13]](_0xcf17[108],_0x4013x45[_0xcf17[109]]);console[_0xcf17[13]](_0xcf17[110],_0x4013x45[_0xcf17[111]]);_0x4013xd=undefined;delete _0x4013xb[_0xcf17[64]];_0x4013xb=_0x4013xb[_0xcf17[97]];_0x4013xb[_0xcf17[98]]=_0xcf17[99];_0x4013xb[_0xcf17[100]]=_0x4013xa;_0x4013xb[_0xcf17[101]]=_0xcf17[112];_0x4013xb[_0xcf17[104]]=_0x4013x8;ReportIntegration[_0xcf17[105]](_0x4013xb)[_0xcf17[15]](function(){return})[_0xcf17[14]](function(_0x4013x45){console[_0xcf17[13]](_0xcf17[113]);return})}}function stripTrailingSlash(_0x4013x47){if(_0x4013x47[_0xcf17[114]](-1)===_0xcf17[115]){return _0x4013x47[_0xcf17[114]](0,_0x4013x47[_0xcf17[40]]-1)};return _0x4013x47}module[_0xcf17[116]]=Zendesk
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var rp = require('request-promise');
+
+var ZendeskIntegration = require('../../models').ZendeskIntegration;
+var ZendeskConfiguration = require('../../models').ZendeskConfiguration;
+var ReportIntegration = require('../../models').ReportIntegration;
+
+function Zendesk() {
+  console.log('Zendesk integration initialization...');
+}
+
+Zendesk.prototype.handleEvent = function(integrationId, configurationId, channel, data, variables) {
+
+  var zendeskData = {
+    uri: undefined,
+    headers: undefined,
+    agent: undefined,
+    enduser: undefined,
+    ticket: undefined,
+    configuration: undefined
+  };
+
+  if (!integrationId || !configurationId) {
+    console.error('Passed parameters are not enough to create a new ticket: miss IntegrationId or ConfigurationId');
+    return;
+  }
+
+  ZendeskConfiguration
+    .find({
+      where: {
+        id: configurationId,
+        AccountId: integrationId
+      },
+      include: [{
+        all: true,
+        include: [{
+          all: true
+        }]
+      }]
+    })
+    .then(handleEntityNotFound())
+    .then(handleConnection(zendeskData))
+    .then(searchAgent(zendeskData, channel, data))
+    .then(handleAgent(zendeskData, channel, data))
+    .then(searchAdmin(zendeskData))
+    .then(handleAdmin(zendeskData))
+    .then(searchEndUser(zendeskData, channel, data))
+    .then(handleEndUser(zendeskData, channel, data))
+    .then(endUserCreation(zendeskData, channel, data))
+    .then(handleEndUserCreation(zendeskData, channel, data))
+    .then(ticketCreation(zendeskData, data, variables))
+    .then(handleTicketDisplay(zendeskData))
+    .then(handleReportIntegration(zendeskData, channel, data, integrationId))
+    .then(handleEnd(zendeskData))
+    .catch(handleError(zendeskData, channel, data, integrationId));
+
+};
+
+function handleEntityNotFound() {
+  return function(entity) {
+    if (!entity) {
+      return null;
+    }
+    return entity;
+  };
+}
+
+function handleConnection(zendeskData) {
+  return function(configuration) {
+    var accConfiguration = getAccountConfiguration(configuration.ZendeskAccount);
+    zendeskData.configuration = configuration;
+    zendeskData.uri = accConfiguration.uri;
+    zendeskData.headers = accConfiguration.headers;
+  }
+}
+
+function getAccountConfiguration(account) {
+  var authJson = {
+    uri: stripTrailingSlash(account.remoteUri),
+    headers: {
+      'Authorization': undefined,
+      'Content-Type': 'application/json',
+      'Accept': 'application/json'
+    }
+  };
+  var auth = account.username;
+  if (account.authType === 'password') {
+    auth = auth + ':' + account.password;
+  } else if (account.authType === 'token') {
+    auth = auth + '/token:' + account.token;
+  }
+  authJson.headers.Authorization = 'Basic ' + new Buffer(auth).toString('base64');
+  return authJson;
+}
+
+function searchAgent(zendeskData, channel, data) {
+  return function() {
+    console.log('[Zendesk] Agent to search:', getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel)));
+    return rp({
+      uri: zendeskData.uri + '/search.json',
+      qs: {
+        // 'query': "type:user role:agent name:Andrea Bianco"
+        'query': util.format("type:user role:agent name:%s", getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel)))
+      },
+      headers: zendeskData.headers,
+      json: true
+    });
+  }
+}
+
+function getAgentSearchPropertyFromChannel(channel) {
+  var property = '';
+  if (channel) {
+    switch (channel) {
+      case 'voice':
+        property = 'destcalleridname';
+        break;
+      default:
+        property = 'destcalleridname';
+        console.error('Channel not recognized:', channel);
+    }
+  }
+  return property;
+}
+
+function getValueFromPropertyName(data, property) {
+  return _.result(data, property);
+}
+
+function handleAgent(zendeskData, channel, event) {
+  return function(data) {
+    if (data.results.length > 0 && data.count > 0) {
+      console.log('[Zendesk] Agent found:', getValueFromPropertyName(event, getAgentSearchPropertyFromChannel(channel)));
+      zendeskData.agent = getMatchObject(data.results, 'name', getValueFromPropertyName(event, getAgentSearchPropertyFromChannel(channel)));
+      return zendeskData.agent;
+    }
+    return;
+  }
+}
+
+function getMatchObject(collection, property, valueToSearch) {
+  var valueFound = _.find(collection, {
+    property: valueToSearch
+  });
+  if (valueFound) {
+    return valueFound;
+  }
+  return _.first(collection);
+}
+
+function searchAdmin(zendeskData) {
+  return function(data) {
+    if (data) {
+      return;
+    }
+    console.log('[Zendesk] Agent not found. Use the admin account');
+    return rp({
+      uri: zendeskData.uri + '/users/me.json',
+      headers: zendeskData.headers,
+      json: true
+    });
+  }
+}
+
+function handleAdmin(zendeskData) {
+  return function(data) {
+    if (!data) {
+      return;
+    }
+    if (data.user) {
+      console.log('[Zendesk] Admin selected');
+      zendeskData.agent = data.user;
+    }
+    return;
+  }
+}
+
+function searchEndUser(zendeskData, channel, data) {
+  return function() {
+    console.log('[Zendesk] End User to search:', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel)));
+    return rp({
+      uri: zendeskData.uri + '/search.json',
+      qs: {
+        'query': util.format("type:user role:end-user %s:%s", getEndUserSearchQueryFromChannel(channel), getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel)))
+      },
+      headers: zendeskData.headers,
+      json: true
+    });
+  }
+}
+
+function getEndUserSearchQueryFromChannel(channel) {
+  var property = '';
+  if (channel) {
+    switch (channel) {
+      case 'voice':
+        property = 'phone';
+        break;
+      default:
+        property = 'phone';
+        console.error('Channel not recognized:', channel);
+    }
+  }
+  return property;
+}
+
+function getEndUserSearchPropertyFromChannel(channel) {
+  var property = '';
+  if (channel) {
+    switch (channel) {
+      case 'voice':
+        // TODO: Change with rigth field name: destconnectedlinenum
+        property = 'destconnectedlinenum';
+        break;
+      default:
+        property = 'destconnectedlinenum';
+        console.error('Channel not recognized:', channel);
+    }
+  }
+  return property;
+}
+
+function getEndUserNamePropertyFromChannel(channel) {
+  var property = '';
+  if (channel) {
+    switch (channel) {
+      case 'voice':
+        property = 'destconnectedlinename';
+        break;
+      default:
+        property = 'destconnectedlinename';
+        console.error('Channel not recognized:', channel);
+    }
+  }
+  return property;
+}
+
+function handleEndUser(zendeskData, channel, event) {
+  return function(data) {
+    if (data.results.length > 0 && data.count > 0) {
+      console.log('[Zendesk] End User found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel)));
+      zendeskData.enduser = data.results[0];
+      return zendeskData.enduser;
+    }
+    return;
+  }
+}
+
+function endUserCreation(zendeskData, channel, event) {
+  return function(data) {
+    if (data) {
+      return;
+    }
+    console.log('[Zendesk] End User not found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel)));
+    console.log(getJsonForEndUserCreation(channel, event));
+    return rp({
+      uri: zendeskData.uri + '/users.json',
+      method: 'POST',
+      body: {
+        user: getJsonForEndUserCreation(channel, event)
+      },
+      headers: zendeskData.headers,
+      json: true
+    });
+  }
+}
+
+function getJsonForEndUserCreation(channel, data) {
+  var user = {
+    role: 'end-user'
+  };
+
+  switch (channel) {
+    case 'voice':
+      if (data.destconnectedlinename) {
+        user.name = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel));
+      } else {
+        user.name = util.format('Caller - %s', getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel)))
+      }
+      user.phone = getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel));
+      break;
+    default:
+      console.error('Channel not recognized:', channel);
+  }
+
+  return user;
+}
+
+function handleEndUserCreation(zendeskData, channel, event) {
+  return function(data) {
+    if (!data) {
+      return;
+    }
+    if (data.user) {
+      console.log('[Zendesk] End User created: ', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel)));
+      zendeskData.enduser = data.user;
+    }
+    return;
+  }
+}
+
+function ticketCreation(zendeskData, event, variables) {
+  return function() {
+    var ticketBody = {
+      //Standard Field
+      requester_id: zendeskData.agent.id,
+      submitter_id: zendeskData.enduser.id,
+      assignee_id: zendeskData.enduser.id,
+      //Tag
+      tags: createTagsFromConfiguration(zendeskData),
+      //Configurated Field
+      subject: createSubjectFromConfiguration(zendeskData, event, variables),
+      description: createDescriptionFromConfiguration(zendeskData, event, variables),
+      custom_fields: createCustomFieldsFromConfiguration(zendeskData, event, variables)
+    };
+    var fields = createFieldsFromConfiguration(zendeskData);
+    if (fields.length > 0) {
+      _.forEach(fields, function(item) {
+        ticketBody[item.id] = item.value;
+      });
+    }
+    console.log('[Zendesk] Ticket body:', ticketBody);
+    return rp({
+      uri: zendeskData.uri + '/tickets.json',
+      method: 'POST',
+      body: {
+        ticket: ticketBody
+      },
+      headers: zendeskData.headers,
+      json: true
+    });
+  }
+}
+
+function createTagsFromConfiguration(zendeskData) {
+  var tags = [];
+  if (zendeskData.configuration.Tags.length > 0) {
+    tags = _.map(zendeskData.configuration.Tags, 'name');
+  }
+  return tags;
+}
+
+function createSubjectFromConfiguration(zendeskData, event, variables) {
+  var subject = '';
+  var stringsArray = [];
+  if (zendeskData.configuration.Subject.length > 0) {
+    var subjectConfiguration = _.sortBy(zendeskData.configuration.Subject, ['id']);
+    _.forEach(subjectConfiguration, function(value) {
+      if (value.type === 'string') {
+        stringsArray.push(value.content);
+      } else if (value.type === 'variable' && value.variableName) {
+        var prop = getValueFromPropertyName(event, value.variableName);
+        if (prop) {
+          stringsArray.push(prop.toString());
+        }
+      } else if (value.type === 'customVariable') {
+        var varFound = _.find(variables, {
+          'name': value.Variable.name
+        });
+        if (varFound) {
+          stringsArray.push(varFound.value.toString());
+        }
+      }
+    });
+    subject = stringsArray.join(' ');
+  }
+  return subject;
+}
+
+function createDescriptionFromConfiguration(zendeskData, event, variables) {
+  var description = '';
+  var stringsArray = [];
+  if (zendeskData.configuration.Description.length > 0) {
+    var descriptionConfiguration = _.sortBy(zendeskData.configuration.Description, ['id']);
+    _.forEach(descriptionConfiguration, function(value) {
+      if (value.type === 'string') {
+        stringsArray.push(value.content);
+      } else if (value.type === 'keyValue') {
+        if (value.keyType === 'string') {
+          stringsArray.push(util.format('%s: %s', value.key, value.keyContent));
+        } else if (value.keyType === 'variable' && value.variableName) {
+          var prop = getValueFromPropertyName(event, value.variableName);
+          if (prop) {
+            stringsArray.push(util.format('%s: %s', value.key, prop.toString()));
+          }
+        } else if (value.keyType === 'customVariable') {
+          var varFound = _.find(variables, {
+            'name': value.Variable.name
+          });
+          if (varFound) {
+            stringsArray.push(util.format('%s: %s', value.key, varFound.value.toString()));
+          }
+        }
+      }
+    });
+    description = stringsArray.join('\n');
+  }
+  return description;
+}
+
+function createCustomFieldsFromConfiguration(zendeskData, event, variables) {
+  var customFields = [];
+  var fieldArray = [];
+  if (zendeskData.configuration.Field.length > 0) {
+    customFields = _.filter(zendeskData.configuration.Field, {
+      'customField': true
+    });
+    _.forEach(customFields, function(item) {
+      if (item.type === 'string') {
+        fieldArray.push({
+          id: item.idField,
+          value: item.content
+        });
+      } else if (item.type === 'variable') {
+        var prop = getValueFromPropertyName(event, item.variableName);
+        if (prop) {
+          fieldArray.push({
+            id: item.idField,
+            value: prop.toString()
+          });
+        }
+      } else if (item.type === 'customVariable') {
+        var varFound = _.find(variables, {
+          'name': item.Variable.name
+        });
+        if (varFound) {
+          fieldArray.push({
+            id: item.idField,
+            value: varFound.value.toString()
+          });
+        }
+      }
+    });
+  }
+  return fieldArray;
+}
+
+function createFieldsFromConfiguration(zendeskData) {
+  var fields = [];
+  var fieldArray = [];
+  if (zendeskData.configuration.Field.length > 0) {
+    fields = _.filter(zendeskData.configuration.Field, {
+      'customField': false
+    });
+    _.forEach(fields, function(item) {
+      if (item.type === 'string') {
+        fieldArray.push({
+          id: item.nameField,
+          value: item.content
+        });
+      }
+    });
+  }
+  return fieldArray;
+}
+
+function handleTicketDisplay(zendeskData) {
+  return function(data) {
+    if (data.ticket) {
+      console.log('[Zendesk] Ticket created');
+      zendeskData.ticket = data.ticket;
+      var urlDisplay = util.format('/channels/voice/agents/%d/tickets/%d/display.json', zendeskData.agent.id, zendeskData.ticket.id);
+      return rp({
+        uri: zendeskData.uri + urlDisplay,
+        method: 'POST',
+        headers: zendeskData.headers,
+        json: true
+      });
+    }
+    return;
+  }
+}
+
+function handleReportIntegration(zendeskData, channel, data, integrationId) {
+  return function() {
+    data = data.dataValues;
+    delete data.id;
+    data.integration = 'zendesk';
+    data.eventChannel = channel;
+    data.exitStatus = 'success';
+    data.ticketId = zendeskData.ticket.id;
+    data.integrationId = integrationId;
+    return ReportIntegration.create(data);
+  }
+}
+
+function handleEnd(zendeskData, data, channel) {
+  return function() {
+    console.log(util.format('[Zendesk] Ticket %d displayed to agent %d', zendeskData.ticket.id, zendeskData.agent.id));
+    zendeskData = undefined;
+    return;
+  }
+}
+
+function handleError(zendeskData, channel, data, integrationId) {
+  return function(err) {
+    console.error('[Zendesk] Error in ticket creation');
+    console.error('[Zendesk] Message:', err.message);
+    console.error('[Zendesk] Stack:', err.stack);
+    zendeskData = undefined;
+
+    delete data.id;
+    data = data.dataValues;
+    data.integration = 'zendesk';
+    data.eventChannel = channel;
+    data.exitStatus = 'failed';
+    data.integrationId = integrationId;
+    ReportIntegration
+      .create(data)
+      .then(function() {
+        return;
+      })
+      .catch(function(err) {
+        console.error('[Zendesk] Error in Report integration create');
+        return;
+      });
+  }
+}
+
+function stripTrailingSlash(str) {
+  if (str.substr(-1) === '/') {
+    return str.substr(0, str.length - 1);
+  }
+  return str;
+}
+
+module.exports = Zendesk;
index b84b87f..fb29ba1 100644 (file)
@@ -1 +1,61 @@
-var _0x8316=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x75\x74\x69\x6C","\x75\x72\x6C","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x53\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x67\x65\x74\x55\x75\x69\x64","\x2F\x63\x68\x65\x63\x6B","\x6C\x6F\x67","\x2A\x20\x2A\x20\x2A\x20\x2A\x20\x2A","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x75\x70\x64\x61\x74\x65","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x73\x74\x61\x72\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8316[0];var config=require(_0x8316[1]);var rp=require(_0x8316[2]);var util=require(_0x8316[3]);var url=require(_0x8316[4]);var CronJob=require(_0x8316[6])[_0x8316[5]];var Settings=require(_0x8316[8])[_0x8316[7]];var license=require(_0x8316[9]);var provisioning=config[_0x8316[10]]+_0x8316[11]+license[_0x8316[12]]()+_0x8316[13];console[_0x8316[14]](provisioning);function licenseManager(){var _0x3fcbxa= new CronJob({cronTime:_0x8316[15],onTick:function(){var _0x3fcbxb;return rp({uri:provisioning,json:true})[_0x8316[22]](function(_0x3fcbxe){_0x3fcbxb=_0x3fcbxe;return Settings[_0x8316[21]]({where:{id:1}})})[_0x8316[20]](function(_0x3fcbxd){return _0x3fcbxd[_0x8316[19]]({license:_0x3fcbxb[_0x8316[18]]})})[_0x8316[17]](function(_0x3fcbxc){console[_0x8316[16]](_0x3fcbxc)})},start:false});_0x3fcbxa[_0x8316[23]]();return {}}module[_0x8316[24]]=licenseManager
\ No newline at end of file
+'use strict';
+
+var config = require('../environment');
+var rp = require('request-promise');
+var util = require('util');
+var url = require('url');
+var CronJob = require('cron').CronJob;
+var Settings = require('../../models').Settings;
+var license = require('./license.service');
+
+var provisioning = config.provisioning + '/servers/' + license.getUuid() + '/check';
+console.log(provisioning);
+
+
+// Define the factory
+function licenseManager() {
+  // Store the settings in a closure
+  var job = new CronJob({
+    cronTime: '* * * * *',
+    onTick: function() {
+      // console.log('Check License Start');
+      var _data;
+
+      return rp({
+          uri: provisioning,
+          json: true // Automatically stringifies the body to JSON
+        })
+        .then(function(data) {
+          _data = data;
+
+          return Settings
+            .findOrCreate({
+              where: {
+                id: 1
+              }
+            });
+        })
+        .spread(function(settings) {
+          return settings
+            .update({
+              license: _data.license
+            });
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    },
+    start: false
+  });
+
+  job.start();
+  return {
+
+    // Define a sync function
+    // getLicence: function getLicence() {
+    //   return settings;
+    // },
+  };
+}
+
+module.exports = licenseManager;
index e7e4ca5..05c372a 100644 (file)
@@ -1 +1,361 @@
-var _0x7780=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6F\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67\x73","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x6C\x69\x6E\x75\x78","\x6F\x75\x74\x70\x75\x74","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x73\x6C\x69\x63\x65","\x0A","\x73\x70\x6C\x69\x74","\x62\x6C\x6B\x69\x64\x20\x2D\x67\x20\x26\x26\x20\x62\x6C\x6B\x69\x64","\x6D\x61\x74\x63\x68","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x65\x78\x65\x63","\x6D\x61\x70","\x75\x75\x69\x64","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x70\x61\x72\x73\x65","\x63\x68\x61\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65","\x6D\x61\x69\x6C","\x66\x61\x78","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E","\x69\x73\x53\x61\x6D\x65\x4F\x72\x42\x65\x66\x6F\x72\x65","\x75\x73\x65\x72\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x75\x73\x65\x72\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x6F\x75\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x6F\x6E\x6C\x69\x6E\x65","\x61\x67\x65\x6E\x74\x73","\x2D","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x67\x65\x74\x55\x75\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x68\x61\x73\x43\x68\x61\x74","\x68\x61\x73\x4D\x61\x69\x6C","\x68\x61\x73\x46\x61\x78","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x63\x72\x79\x70\x74"];_0x7780[0];var compose=require(_0x7780[1]);var moment=require(_0x7780[2]);var crypto=require(_0x7780[3]);var util=require(_0x7780[4]);var os=require(_0x7780[5]);var config=require(_0x7780[6]);var User=require(_0x7780[8])[_0x7780[7]];var Telephone=require(_0x7780[8])[_0x7780[9]];var Settings=require(_0x7780[8])[_0x7780[10]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,description:_0x7780[11]};function getUuid(){if(os[_0x7780[12]]()!==_0x7780[13]){var _0x4914xc=exec(_0x7780[15],{silent:true})[_0x7780[14]];var _0x4914xd=_0x4914xc[_0x7780[18]](_0x7780[17])[_0x7780[16]](0,-1);return _0x4914xd[0]}else {var _0x4914xc=exec(_0x7780[19],{silent:true})[_0x7780[14]];var _0x4914xd=_0x4914xc[_0x7780[18]](_0x7780[17])[_0x7780[16]](0,-1)[_0x7780[23]](function(_0x4914xe){var _0x4914xf,_0x4914x10,_0x4914xd;_0x4914x10= new RegExp(/(\w+)\=\"([^\"]+)/g);_0x4914xf={partition:_0x4914xe[_0x7780[20]](/^(\S+)\:\ /)[1]};while(_0x4914xd=_0x4914x10[_0x7780[22]](_0x4914xe)){_0x4914xf[_0x4914xd[1][_0x7780[21]]()]=_0x4914xd[2]};return _0x4914xf});return _0x4914xd[0][_0x7780[24]]}}function hasChat(){return compose()[_0x7780[32]](function(_0x4914x12,_0x4914x13,_0x4914x14){return Settings[_0x7780[31]]({where:{id:1}})[_0x7780[30]](function(_0x4914x16){var _0x4914x17=null,_0x4914x18=false;if(_0x4914x16[_0x7780[26]]){_0x4914x17=decrypt(_0x4914x16[_0x7780[26]]);_0x4914x17=JSON[_0x7780[27]](_0x4914x17)}else {_0x4914x17=demoLicense};_0x4914x18=_0x4914x17[_0x7780[28]];if(!_0x4914x18){return _0x4914x13[_0x7780[29]](403)};return _0x4914x14()})[_0x7780[25]](function(_0x4914x15){return _0x4914x14(_0x4914x15)})})}function hasMail(){return compose()[_0x7780[32]](function(_0x4914x12,_0x4914x13,_0x4914x14){return Settings[_0x7780[31]]({where:{id:1}})[_0x7780[30]](function(_0x4914x16){var _0x4914x17=null,_0x4914x1a=false;if(_0x4914x16[_0x7780[26]]){_0x4914x17=decrypt(_0x4914x16[_0x7780[26]]);_0x4914x17=JSON[_0x7780[27]](_0x4914x17)}else {_0x4914x17=demoLicense};_0x4914x1a=_0x4914x17[_0x7780[33]];if(!_0x4914x1a){return _0x4914x13[_0x7780[29]](403)};return _0x4914x14()})[_0x7780[25]](function(_0x4914x15){return _0x4914x14(_0x4914x15)})})}function hasFax(){return compose()[_0x7780[32]](function(_0x4914x12,_0x4914x13,_0x4914x14){return Settings[_0x7780[31]]({where:{id:1}})[_0x7780[30]](function(_0x4914x16){var _0x4914x17=null,_0x4914x1c=false;if(_0x4914x16[_0x7780[26]]){_0x4914x17=decrypt(_0x4914x16[_0x7780[26]]);_0x4914x17=JSON[_0x7780[27]](_0x4914x17)}else {_0x4914x17=demoLicense};_0x4914x1c=_0x4914x17[_0x7780[34]];if(!_0x4914x1c){return _0x4914x13[_0x7780[29]](403)};return _0x4914x14()})[_0x7780[25]](function(_0x4914x15){return _0x4914x14(_0x4914x15)})})}function isValidDate(){return compose()[_0x7780[32]](function(_0x4914x12,_0x4914x13,_0x4914x14){return Settings[_0x7780[31]]({where:{id:1}})[_0x7780[30]](function(_0x4914x16){var _0x4914x17=null,_0x4914x1e=false;if(_0x4914x16[_0x7780[26]]){_0x4914x17=decrypt(_0x4914x16[_0x7780[26]]);_0x4914x17=JSON[_0x7780[27]](_0x4914x17);if(moment()[_0x7780[36]](_0x4914x17[_0x7780[35]])){_0x4914x1e=true}};if(!_0x4914x1e){return _0x4914x13[_0x7780[29]](403)};return _0x4914x14()})[_0x7780[25]](function(_0x4914x15){return _0x4914x14(_0x4914x15)})})}function isUsersLimit(){return compose()[_0x7780[32]](function(_0x4914x12,_0x4914x13,_0x4914x14){var _0x4914x20;return Settings[_0x7780[31]]({where:{id:1}})[_0x7780[30]](function(_0x4914x16){_0x4914x20=_0x4914x16;return User[_0x7780[44]]({where:{$or:[{role:_0x7780[42]},{role:_0x7780[43]}]}})})[_0x7780[41]](function(_0x4914x21){var _0x4914x17=null,_0x4914x22=false;if(_0x4914x20[_0x7780[26]]){_0x4914x17=decrypt(_0x4914x20[_0x7780[26]]);_0x4914x17=JSON[_0x7780[27]](_0x4914x17)}else {_0x4914x17=demoLicense};if(_0x4914x17[_0x7780[37]]>_0x4914x21){_0x4914x22=true};if(!_0x4914x22){return _0x4914x13[_0x7780[40]](403)[_0x7780[39]]({message:_0x7780[38]})};return _0x4914x14()})[_0x7780[25]](function(_0x4914x15){return _0x4914x14(_0x4914x15)})})}function isTelephonesLimit(){return compose()[_0x7780[32]](function(_0x4914x12,_0x4914x13,_0x4914x14){var _0x4914x20;return Settings[_0x7780[31]]({where:{id:1}})[_0x7780[30]](function(_0x4914x16){_0x4914x20=_0x4914x16;return User[_0x7780[44]]({where:{role:_0x7780[47]}})})[_0x7780[41]](function(_0x4914x24){var _0x4914x17=null,_0x4914x22=false;if(_0x4914x20[_0x7780[26]]){_0x4914x17=decrypt(_0x4914x20[_0x7780[26]]);_0x4914x17=JSON[_0x7780[27]](_0x4914x17)}else {_0x4914x17=demoLicense};if(_0x4914x17[_0x7780[45]]>_0x4914x24){_0x4914x22=true};if(!_0x4914x22){return _0x4914x13[_0x7780[40]](403)[_0x7780[39]]({message:_0x7780[46]})};return _0x4914x14()})[_0x7780[25]](function(_0x4914x15){return _0x4914x14(_0x4914x15)})})}function isValidAgent(){return function(_0x4914x26){var _0x4914x20;var _0x4914x27=false;if(_0x4914x26[_0x7780[48]]===_0x7780[42]||_0x4914x26[_0x7780[48]]===_0x7780[43]||(_0x4914x26[_0x7780[48]]===_0x7780[49]&&_0x4914x26[_0x7780[50]])){_0x4914x27=true};return Settings[_0x7780[31]]({where:{id:1}})[_0x7780[30]](function(_0x4914x16){_0x4914x20=_0x4914x16;return User[_0x7780[44]]({where:{role:_0x7780[49],online:true}})})[_0x7780[41]](function(_0x4914x28){var _0x4914x17=null;if(_0x4914x20[_0x7780[26]]){_0x4914x17=decrypt(_0x4914x20[_0x7780[26]]);_0x4914x17=JSON[_0x7780[27]](_0x4914x17)}else {_0x4914x17=demoLicense};if(_0x4914x17[_0x7780[51]]>_0x4914x28){_0x4914x27=true};return _0x4914x27})}}function decrypt(_0x4914x2a){var _0x4914x2b=getUuid();var _0x4914x2c=_0x4914x2b[_0x7780[18]](_0x7780[52])[4];var _0x4914x2d=_0x4914x2b[_0x7780[18]](_0x7780[52])[0];var _0x4914x2e=crypto[_0x7780[56]](_0x7780[53],util[_0x7780[55]](_0x7780[54],_0x4914x2c,_0x4914x2b,_0x4914x2d));var _0x4914x17=_0x4914x2e[_0x7780[59]](_0x4914x2a,_0x7780[57],_0x7780[58]);_0x4914x17+=_0x4914x2e[_0x7780[60]](_0x7780[58]);return _0x4914x17}exports[_0x7780[61]]=getUuid;exports[_0x7780[62]]=isValidDate;exports[_0x7780[63]]=isUsersLimit;exports[_0x7780[64]]=isTelephonesLimit;exports[_0x7780[65]]=hasChat;exports[_0x7780[66]]=hasMail;exports[_0x7780[67]]=hasFax;exports[_0x7780[68]]=isValidAgent;exports[_0x7780[69]]=demoLicense;exports[_0x7780[70]]=decrypt
\ No newline at end of file
+'use strict';
+
+var compose = require('composable-middleware');
+var moment = require('moment');
+var crypto = require('crypto');
+var util = require('util');
+var os = require('os');
+
+var config = require('../environment');
+
+
+var User = require('../../models').User;
+var Telephone = require('../../models').Telephone;
+var Settings = require('../../models').Settings;
+
+var demoLicense = {
+  users: 1,
+  agents: 1,
+  telephones: 0,
+  chat: false,
+  mail: false,
+  fax: false,
+  description: 'DEMO LICENSE'
+};
+
+function getUuid() {
+  if (os.platform() !== 'linux') {
+    var out = exec('dmidecode --string system-uuid', {
+      silent: true
+    }).output;
+    var result = out.split('\n').slice(0, -1);
+    return result[0];
+  } else {
+    var out = exec('blkid -g && blkid', {
+      silent: true
+    }).output;
+    var result = out.split('\n').slice(0, -1).map(function(line) {
+      var part, regex, result;
+      regex = new RegExp(/(\w+)\=\"([^\"]+)/g);
+      part = {
+        partition: line.match(/^(\S+)\:\ /)[1]
+      };
+      while (result = regex.exec(line)) {
+        part[result[1].toLowerCase()] = result[2];
+      }
+      return part;
+    });
+    return result[0].uuid;
+  }
+}
+
+/**
+ * Checks if the chat meets the requirements
+ */
+function hasChat() {
+
+  return compose()
+    .use(function(req, res, next) {
+      return Settings
+        .findOrCreate({
+          where: {
+            id: 1
+          }
+        })
+        .spread(function(settings) {
+          var license = null,
+            chat = false;
+
+          if (settings.license) {
+            license = decrypt(settings.license);
+            license = JSON.parse(license);
+          } else {
+            license = demoLicense;
+          }
+
+          chat = license.chat;
+
+          if (!chat) return res.sendStatus(403);
+          return next();
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    });
+}
+
+/**
+ * Checks if the mail meets the requirements
+ */
+function hasMail() {
+
+  return compose()
+    .use(function(req, res, next) {
+      return Settings
+        .findOrCreate({
+          where: {
+            id: 1
+          }
+        })
+        .spread(function(settings) {
+          var license = null,
+            mail = false;
+
+          if (settings.license) {
+            license = decrypt(settings.license);
+            license = JSON.parse(license);
+          } else {
+            license = demoLicense;
+          }
+
+          mail = license.mail;
+
+          if (!mail) return res.sendStatus(403);
+          return next();
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    });
+}
+
+/**
+ * Checks if the fax meets the requirements
+ */
+function hasFax() {
+
+  return compose()
+    .use(function(req, res, next) {
+      return Settings
+        .findOrCreate({
+          where: {
+            id: 1
+          }
+        })
+        .spread(function(settings) {
+          var license = null,
+            fax = false;
+
+          if (settings.license) {
+            license = decrypt(settings.license);
+            license = JSON.parse(license);
+          } else {
+            license = demoLicense;
+          }
+
+          fax = license.fax;
+
+          if (!fax) return res.sendStatus(403);
+          return next();
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    });
+}
+
+/**
+ * Checks if the date meets the requirements
+ */
+function isValidDate() {
+
+  return compose()
+    .use(function(req, res, next) {
+      return Settings
+        .findOrCreate({
+          where: {
+            id: 1
+          }
+        })
+        .spread(function(settings) {
+          var license = null,
+            date = false;
+
+          if (settings.license) {
+            license = decrypt(settings.license);
+            license = JSON.parse(license);
+
+            if (moment().isSameOrBefore(license.expiration)) {
+              date = true;
+            }
+          }
+
+          if (!date) return res.sendStatus(403);
+          return next();
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    });
+}
+
+/**
+ * Checks if the users meets the requirements
+ */
+function isUsersLimit() {
+
+  return compose()
+    .use(function(req, res, next) {
+      var _settings;
+
+      return Settings
+        .findOrCreate({
+          where: {
+            id: 1
+          }
+        })
+        .spread(function(settings) {
+          _settings = settings;
+
+          return User
+            .count({
+              where: {
+                $or: [{
+                  role: 'admin'
+                }, {
+                  role: 'user'
+                }]
+              }
+            });
+        })
+        .then(function(users) {
+          var license = null,
+            valid = false;
+
+          if (_settings.license) {
+            license = decrypt(_settings.license);
+            license = JSON.parse(license);
+          } else {
+            license = demoLicense;
+          }
+
+          if (license.users > users) valid = true;
+
+          if (!valid) return res.status(403).send({
+            message: 'Maximum users limit have been reached'
+          });
+          return next();
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    });
+}
+
+/**
+ * Checks if the telephone meets the requirements
+ */
+function isTelephonesLimit() {
+
+  return compose()
+    .use(function(req, res, next) {
+      var _settings;
+
+      return Settings
+        .findOrCreate({
+          where: {
+            id: 1
+          }
+        })
+        .spread(function(settings) {
+          _settings = settings;
+
+          return User
+            .count({
+              where: {
+                role: 'telephone'
+              }
+            });
+        })
+        .then(function(telephones) {
+          var license = null,
+            valid = false;
+
+          if (_settings.license) {
+            license = decrypt(_settings.license);
+            license = JSON.parse(license);
+          } else {
+            license = demoLicense;
+          }
+
+          if (license.telephones > telephones) valid = true;
+
+          if (!valid) return res.status(403).send({
+            message: 'Maximum telephones limit have been reached'
+          });
+          return next();
+        })
+        .catch(function(err) {
+          return next(err);
+        });
+    });
+}
+
+/**
+ * Checks if the telephone meets the requirements
+ */
+function isValidAgent() {
+  return function(user) {
+    var _settings;
+    var _valid = false;
+
+    if (user.role === 'admin' || user.role === 'user' || (user.role === 'agent' && user.online)) {
+      _valid = true;
+    }
+
+    return Settings
+      .findOrCreate({
+        where: {
+          id: 1
+        }
+      })
+      .spread(function(settings) {
+        _settings = settings;
+
+        return User
+          .count({
+            where: {
+              role: 'agent',
+              online: true
+            }
+          });
+      })
+      .then(function(agents) {
+        var license = null;
+
+        if (_settings.license) {
+          license = decrypt(_settings.license);
+          license = JSON.parse(license);
+        } else {
+          license = demoLicense;
+        }
+
+        if (license.agents > agents) _valid = true;
+
+        return _valid;
+      });
+  }
+}
+
+function decrypt(cypher) {
+  var uuid = getUuid();
+  var prefix = uuid.split('-')[4];
+  var suffix = uuid.split('-')[0];
+
+  var decipher = crypto.createDecipher('aes-256-ctr', util.format('%s:%s:%s', prefix, uuid, suffix));
+  var license = decipher.update(cypher, 'base64', 'utf8')
+  license += decipher.final('utf8');
+
+  return license;
+}
+
+exports.getUuid = getUuid;
+exports.isValidDate = isValidDate;
+exports.isUsersLimit = isUsersLimit;
+exports.isTelephonesLimit = isTelephonesLimit;
+exports.hasChat = hasChat;
+exports.hasMail = hasMail;
+exports.hasFax = hasFax;
+exports.isValidAgent = isValidAgent;
+exports.demoLicense = demoLicense;
+exports.decrypt = decrypt;
index a9aa6fe..58ae668 100644 (file)
@@ -1 +1,23 @@
-var _0xa6b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x78\x63\x61\x6C\x6C\x79\x73\x68\x75\x74\x74\x6C\x65\x2D\x73\x65\x63\x72\x65\x74","\x61\x70\x70\x2D\x69\x64","\x73\x65\x63\x72\x65\x74",""];_0xa6b1[0];module[_0xa6b1[1]]={DOMAIN:_0xa6b1[2],SESSION_SECRET:_0xa6b1[3],FACEBOOK_ID:_0xa6b1[4],FACEBOOK_SECRET:_0xa6b1[5],TWITTER_ID:_0xa6b1[4],TWITTER_SECRET:_0xa6b1[5],GOOGLE_ID:_0xa6b1[4],GOOGLE_SECRET:_0xa6b1[5],DEBUG:_0xa6b1[6]}
\ No newline at end of file
+'use strict';
+
+// Use local.env.js for environment variables that grunt will set when the server starts locally.
+// Use for your api keys, secrets, etc. This file should not be tracked by git.
+//
+// You will need to set these on the server you deploy to.
+
+module.exports = {
+  DOMAIN:           'http://localhost:9000',
+  SESSION_SECRET:   'xcallyshuttle-secret',
+
+  FACEBOOK_ID:      'app-id',
+  FACEBOOK_SECRET:  'secret',
+
+  TWITTER_ID:       'app-id',
+  TWITTER_SECRET:   'secret',
+
+  GOOGLE_ID:        'app-id',
+  GOOGLE_SECRET:    'secret',
+
+  // Control debug level for modules using visionmedia/debug
+  DEBUG: ''
+};
index 402bc40..1542f7e 100644 (file)
@@ -1 +1,120 @@
-var _0xfe80=["\x77\x69\x6E\x73\x74\x6F\x6E","\x70\x61\x74\x68","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x6D\x69\x74\x45\x72\x72\x73","\x64\x65\x62\x75\x67","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74\x73","\x64\x65\x62\x75\x67\x54\x6F\x46\x69\x6C\x65","\x6C\x6F\x67\x67\x69\x6E\x67","\x64\x65\x62\x75\x67\x2D\x66\x69\x6C\x65","\x61\x64\x64","\x69\x6E\x66\x6F\x2D\x66\x69\x6C\x65","\x69\x6E\x66\x6F","\x77\x61\x72\x6E\x2D\x66\x69\x6C\x65","\x77\x61\x72\x6E","\x65\x72\x72\x6F\x72\x2D\x66\x69\x6C\x65","\x65\x72\x72\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x65\x61\x6D"];var winston=require(_0xfe80[0]);var path=require(_0xfe80[1]);var config=require(_0xfe80[2]);winston[_0xfe80[3]]=true;var debug= new winston.Logger({transports:[ new winston[_0xfe80[5]].Console({level:_0xfe80[4],handleExceptions:true,json:false,colorize:true})]});if(config[_0xfe80[7]][_0xfe80[6]]){debug[_0xfe80[9]](winston[_0xfe80[5]].File,{name:_0xfe80[8],level:_0xfe80[4],filename:config[_0xfe80[7]][_0xfe80[4]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false})};var info= new winston.Logger({transports:[ new winston[_0xfe80[5]].File({name:_0xfe80[10],level:_0xfe80[11],filename:config[_0xfe80[7]][_0xfe80[11]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xfe80[5]].Console({level:_0xfe80[11],handleExceptions:true,json:false,colorize:true})]});var warn= new winston.Logger({transports:[ new winston[_0xfe80[5]].File({name:_0xfe80[12],level:_0xfe80[13],filename:config[_0xfe80[7]][_0xfe80[13]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xfe80[5]].Console({level:_0xfe80[13],handleExceptions:true,json:false,colorize:true})]});var error= new winston.Logger({transports:[ new winston[_0xfe80[5]].File({name:_0xfe80[14],level:_0xfe80[15],filename:config[_0xfe80[7]][_0xfe80[15]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xfe80[5]].Console({level:_0xfe80[15],handleExceptions:true,json:false,colorize:true})]});var loggers={debug:function(_0xcabfx9,_0xcabfxa){debug[_0xfe80[4]](_0xcabfx9,_0xcabfxa)},info:function(_0xcabfx9,_0xcabfxa){info[_0xfe80[11]](_0xcabfx9,_0xcabfxa)},warn:function(_0xcabfx9,_0xcabfxa){warn[_0xfe80[13]](_0xcabfx9,_0xcabfxa)},error:function(_0xcabfx9,_0xcabfxa){error[_0xfe80[15]](_0xcabfx9,_0xcabfxa)},log:function(_0xcabfxb,_0xcabfx9,_0xcabfxa){var _0xcabfxc=exports[_0xcabfxb];_0xcabfxc(_0xcabfx9,_0xcabfxa)}};module[_0xfe80[16]]=loggers;module[_0xfe80[16]][_0xfe80[17]]={write:function(_0xcabfxd,_0xcabfxe){loggers[_0xfe80[11]](_0xcabfxd)}}
\ No newline at end of file
+var winston = require('winston');
+var path = require('path');
+var config = require('./environment');
+
+winston.emitErrs = true;
+
+var debug = new winston.Logger({
+  transports: [
+    new winston.transports.Console({
+      level: 'debug',
+      handleExceptions: true,
+      json: false,
+      colorize: true
+    })
+  ]
+});
+
+if (config.logging.debugToFile) {
+  debug.add(
+    winston.transports.File, {
+      name: 'debug-file',
+      level: 'debug',
+      filename: config.logging.debug,
+      handleExceptions: true,
+      json: true,
+      maxsize: 5242880, //5MB
+      maxFiles: 5,
+      colorize: false
+    }
+  );
+}
+
+var info = new winston.Logger({
+  transports: [
+    new winston.transports.File({
+      name: 'info-file',
+      level: 'info',
+      filename: config.logging.info,
+      handleExceptions: true,
+      json: true,
+      maxsize: 5242880, //5MB
+      maxFiles: 5,
+      colorize: false
+    }),
+    new winston.transports.Console({
+      level: 'info',
+      handleExceptions: true,
+      json: false,
+      colorize: true
+    })
+  ]
+});
+
+var warn = new winston.Logger({
+  transports: [
+    new winston.transports.File({
+      name: 'warn-file',
+      level: 'warn',
+      filename: config.logging.warn,
+      handleExceptions: true,
+      json: true,
+      maxsize: 5242880, //5MB
+      maxFiles: 5,
+      colorize: false
+    }),
+    new winston.transports.Console({
+      level: 'warn',
+      handleExceptions: true,
+      json: false,
+      colorize: true
+    })
+  ]
+});
+
+var error = new winston.Logger({
+  transports: [
+    new winston.transports.File({
+      name: 'error-file',
+      level: 'error',
+      filename: config.logging.error,
+      handleExceptions: true,
+      json: true,
+      maxsize: 5242880, //5MB
+      maxFiles: 5,
+      colorize: false
+    }),
+    new winston.transports.Console({
+      level: 'error',
+      handleExceptions: true,
+      json: false,
+      colorize: true
+    })
+  ]
+});
+
+var loggers = {
+  debug: function(msg, callback) {
+    debug.debug(msg, callback);
+  },
+  info: function(msg, callback) {
+    info.info(msg, callback);
+  },
+  warn: function(msg, callback) {
+    warn.warn(msg, callback);
+  },
+  error: function(msg, callback) {
+    error.error(msg, callback);
+  },
+  log: function(level, msg, callback) {
+    var lvl = exports[level];
+    lvl(msg, callback);
+  }
+};
+
+module.exports = loggers;
+module.exports.stream = {
+  write: function(message, encoding) {
+    loggers.info(message);
+  }
+};
index 39d1e5c..a9c95ea 100644 (file)
@@ -1 +1,246 @@
-var _0x4116=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x6F\x72\x69\x67\x69\x6E","\x77\x65\x62\x63\x68\x61\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x77\x65\x62\x73\x69\x74\x65\x69\x64","\x69\x64","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x77\x65\x62\x73\x69\x74\x65\x61\x64\x64\x72\x65\x73\x73","\x61\x64\x64\x72\x65\x73\x73","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x65\x78\x74\x65\x72\x6E\x61\x6C","\x76\x69\x73\x69\x74\x6F\x72\x69\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x61\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x62\x65\x65\x70\x61\x6C\x6C","\x61\x67\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x45\x6E\x64\x20\x63\x68\x61\x74\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x74\x68\x65\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x61\x62\x61\x6E\x64\x6F\x6E","\x75\x6E\x73\x65\x72\x76\x65\x64","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x65\x72\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x43\x68\x61\x74\x52\x6F\x6F\x6D\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2E\x2E","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0x4116[0];var _=require(_0x4116[1]);var moment=require(_0x4116[2]);var util=require(_0x4116[3]);var async=require(_0x4116[4]);var Util=require(_0x4116[5]);var ChatApplication=require(_0x4116[7])[_0x4116[6]];var ChatVisitor=require(_0x4116[7])[_0x4116[8]];var ChatWebsite=require(_0x4116[7])[_0x4116[9]];var ChatQueue=require(_0x4116[7])[_0x4116[10]];var ChatRoom=require(_0x4116[7])[_0x4116[11]];var ReportChat=require(_0x4116[7])[_0x4116[12]];var ReportChatSession=require(_0x4116[7])[_0x4116[13]];var Interval=require(_0x4116[7])[_0x4116[14]];var User=require(_0x4116[7])[_0x4116[15]];var Session=require(_0x4116[16]);module[_0x4116[17]]=function(){console[_0x4116[19]](_0x4116[18]);ChatVisitor[_0x4116[22]](function(_0x4ff6x10){if(_0x4ff6x10[_0x4116[20]]===_0x4116[21]){handleVisitor(_0x4ff6x10)}})};function handleEntityNotFound(_0x4ff6x12){return function(_0x4ff6x13){if(!_0x4ff6x13){throw {message:_0x4ff6x12}};return _0x4ff6x13}}function handleChatWebsite(_0x4ff6x15){return function(_0x4ff6x16){_0x4ff6x15[_0x4116[23]]=_0x4ff6x16[_0x4116[24]];_0x4ff6x15[_0x4116[25]]=_0x4ff6x16[_0x4116[26]];_0x4ff6x15[_0x4116[27]]=_0x4ff6x16[_0x4116[28]];return _0x4ff6x16[_0x4116[34]]({order:_0x4116[29],include:[{model:ChatQueue,attributes:[_0x4116[24],_0x4116[26],_0x4116[30],_0x4116[31]],include:[{model:User,attributes:[_0x4116[24],_0x4116[26],_0x4116[32],_0x4116[33]]}]},{model:User,attributes:[_0x4116[24],_0x4116[26],_0x4116[32],_0x4116[33]]},{model:Interval,include:[{all:true}]}]})}}function handleChatRoom(_0x4ff6x15,_0x4ff6x18){return function(_0x4ff6x19){_0x4ff6x19[_0x4116[36]](function(_0x4ff6x1a){_0x4ff6x18[_0x4116[35]](_0x4ff6x1a)});_0x4ff6x18=_0x4ff6x19;return ChatRoom[_0x4116[39]]({type:_0x4116[37],ChatVisitorId:_0x4ff6x15[_0x4116[38]],ChatWebsiteId:_0x4ff6x15[_0x4116[23]]},{include:[{all:true}]})}}function handleApps(_0x4ff6x15,_0x4ff6x18){return function(_0x4ff6x1c){var _0x4ff6x1d=[];_0x4ff6x15[_0x4116[40]]=_0x4ff6x1c[_0x4116[24]];_0x4ff6x15[_0x4116[41]]=util[_0x4116[44]](_0x4116[42],moment()[_0x4116[43]](),_0x4ff6x1c[_0x4116[24]]);ReportChatSession[_0x4116[39]](_[_0x4116[47]](_0x4ff6x15))[_0x4116[46]](function(_0x4ff6x1e){console[_0x4116[45]](_0x4ff6x1e)});_0x4ff6x18[_0x4116[36]](function(_0x4ff6x1a,_0x4ff6x1f){var _0x4ff6x20=_[_0x4116[47]](_0x4ff6x15);_0x4ff6x20[_0x4116[48]]=_0x4ff6x1a[_0x4116[30]];_0x4ff6x20[_0x4116[49]]=_0x4ff6x1a[_0x4116[50]];switch(_0x4ff6x1a[_0x4116[50]]){case _0x4116[56]:_0x4ff6x20[_0x4116[51]]=_0x4ff6x1a[_0x4116[10]][_0x4116[24]];_0x4ff6x20[_0x4116[52]]=_0x4ff6x1a[_0x4116[10]][_0x4116[26]];_0x4ff6x20[_0x4116[31]]=_0x4ff6x1a[_0x4116[10]][_0x4116[31]];_0x4ff6x20[_0x4116[53]]=_0x4ff6x1a[_0x4116[10]][_0x4116[30]];_0x4ff6x20[_0x4116[54]]=_[_0x4116[55]](_0x4ff6x1a[_0x4116[10]].Users,function(_0x4ff6x21){return {id:_0x4ff6x21[_0x4116[24]],name:_0x4ff6x21[_0x4116[26]]}});break;case _0x4116[58]:_0x4ff6x20[_0x4116[53]]=_0x4ff6x1a[_0x4116[30]];_0x4ff6x20[_0x4116[31]]=_0x4116[57];_0x4ff6x20[_0x4116[54]]=[{id:_0x4ff6x1a[_0x4116[15]][_0x4116[24]],name:_0x4ff6x1a[_0x4116[15]][_0x4116[26]]}];break;default:};if(_0x4ff6x1d[_0x4116[59]]){_0x4ff6x1d[_0x4116[35]](function(_0x4ff6x22,_0x4ff6x23){if(_0x4ff6x22){return _0x4ff6x23(null,_0x4ff6x22)}else { new Session(_0x4ff6x20,_0x4ff6x23)}})}else {_0x4ff6x1d[_0x4116[35]](function(_0x4ff6x23){ new Session(_0x4ff6x20,_0x4ff6x23)})}});async[_0x4116[64]](_0x4ff6x1d,function(_0x4ff6x1e,_0x4ff6x24,_0x4ff6x25){if(_0x4ff6x1e){console[_0x4116[45]](_0x4ff6x1e)};console[_0x4116[19]](_0x4116[60]);if(!_0x4ff6x24){return ReportChatSession[_0x4116[63]]({unmanagedAt:moment()[_0x4116[44]](_0x4116[62])},{where:{uniqueid:_0x4ff6x15[_0x4116[41]]},individualHooks:true})[_0x4116[61]](handleUnmanaged(_0x4ff6x15))};if(_0x4ff6x25){return ReportChatSession[_0x4116[63]]({abandonAt:moment()[_0x4116[44]](_0x4116[62])},{where:{uniqueid:_0x4ff6x15[_0x4116[41]]},individualHooks:true})[_0x4116[61]](handleAbandon(_0x4ff6x15))};return})}}function handleAbandon(_0x4ff6x15){return function(_0x4ff6x27){return ChatVisitor[_0x4116[63]]({status:_0x4116[65]},{where:{id:_0x4ff6x15[_0x4116[38]]}})}}function handleUnmanaged(_0x4ff6x15){return function(_0x4ff6x27){return ChatVisitor[_0x4116[63]]({status:_0x4116[66]},{where:{id:_0x4ff6x15[_0x4116[38]]}})}}function handleVisitor(_0x4ff6x10){var _0x4ff6x18=[];var _0x4ff6x15={visitorid:_0x4ff6x10[_0x4116[24]],visitorname:_0x4ff6x10[_0x4116[67]],visitoremail:_0x4ff6x10[_0x4116[68]],websiteid:_0x4ff6x10[_0x4116[69]],joinAt:moment()[_0x4116[44]](_0x4116[62])};return ChatWebsite[_0x4116[74]](_0x4ff6x10.ChatWebsiteId)[_0x4116[61]](handleEntityNotFound(_0x4116[73]))[_0x4116[61]](handleChatWebsite(_0x4ff6x15))[_0x4116[61]](handleEntityNotFound(_0x4116[72]))[_0x4116[61]](handleChatRoom(_0x4ff6x15,_0x4ff6x18))[_0x4116[61]](handleEntityNotFound(_0x4116[71]))[_0x4116[61]](handleApps(_0x4ff6x15,_0x4ff6x18))[_0x4116[46]](function(_0x4ff6x1e){console[_0x4116[45]](_0x4116[70],_0x4ff6x1e)})}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var moment = require('moment');
+var util = require('util');
+var async = require('async');
+
+var Util = require('../../util');
+
+var ChatApplication = require('../../../models').ChatApplication;
+var ChatVisitor = require('../../../models').ChatVisitor;
+var ChatWebsite = require('../../../models').ChatWebsite;
+var ChatQueue = require('../../../models').ChatQueue;
+var ChatRoom = require('../../../models').ChatRoom;
+
+var ReportChat = require('../../../models').ReportChat;
+var ReportChatSession = require('../../../models').ReportChatSession;
+var Interval = require('../../../models').Interval;
+var User = require('../../../models').User;
+
+var Session = require('./session');
+
+module.exports = function() {
+  console.log('Chat Routing Initialization..');
+
+  ChatVisitor.afterCreate(function(visitor) {
+    if (visitor.origin === 'webchat') {
+      handleVisitor(visitor);
+    }
+  });
+}
+
+function handleEntityNotFound(message) {
+  return function(entity) {
+    if (!entity) {
+      throw {
+        message: message
+      };
+    }
+    return entity;
+  };
+}
+
+function handleChatWebsite(_report) {
+  return function(website) {
+    _report.websiteid = website.id;
+    _report.websitename = website.name;
+    _report.websiteaddress = website.address;
+
+    return website
+      .getChatApplications({
+        order: 'priority ASC',
+        include: [{
+          model: ChatQueue,
+          attributes: ['id', 'name', 'timeout', 'strategy'],
+          include: [{
+            model: User,
+            attributes: ['id', 'name', 'online', 'chatPause']
+          }]
+        }, {
+          model: User,
+          attributes: ['id', 'name', 'online', 'chatPause']
+        }, {
+          model: Interval,
+          include: [{
+            all: true
+          }]
+        }]
+      });
+  }
+}
+
+function handleChatRoom(_report, _apps) {
+  return function(apps) {
+    apps.forEach(function(app) {
+      _apps.push(app);
+    });
+
+    _apps = apps;
+    // START CREATE/ASSIGN CHAT ROOM
+    return ChatRoom
+      .create({
+        type: 'external',
+        ChatVisitorId: _report.visitorid,
+        ChatWebsiteId: _report.websiteid
+      }, {
+        include: [{
+          all: true
+        }]
+      });
+  }
+}
+
+function handleApps(_report, _apps) {
+  return function(room) {
+    var waterfall = [];
+
+    _report.roomid = room.id;
+    _report.uniqueid = util.format('%s.%s', moment().unix(), room.id);
+
+    ReportChatSession
+      .create(_.cloneDeep(_report))
+      .catch(function(err) {
+        console.error(err);
+      });
+
+    _apps.forEach(function(app, index) {
+      var data = _.cloneDeep(_report);
+
+      data.apptimeout = app.timeout;
+      data.application = app.app;
+
+      switch (app.app) {
+        case 'queue':
+          data.queueid = app.ChatQueue.id;
+          data.queuename = app.ChatQueue.name;
+          data.strategy = app.ChatQueue.strategy;
+
+          data.queuetimeout = app.ChatQueue.timeout;
+          data.agents = _.map(app.ChatQueue.Users, function(agent) {
+            return {
+              id: agent.id,
+              name: agent.name
+            }
+          });
+
+          break;
+
+        case 'agent':
+          data.queuetimeout = app.timeout;
+          data.strategy = 'beepall';
+
+          data.agents = [{
+            id: app.User.id,
+            name: app.User.name
+          }];
+
+          break;
+
+        default:
+      }
+
+      if (waterfall.length) {
+        waterfall.push(function(exit, callback) {
+          if (exit) {
+            return callback(null, exit);
+          } else {
+            new Session(data, callback);
+          }
+        });
+      } else {
+        // PRIMA CALLBACK NESSUN DATO
+        waterfall.push(function(callback) {
+          new Session(data, callback);
+        });
+      }
+    });
+
+    async.waterfall(waterfall, function(err, managed, abandon) {
+      if (err) {
+        console.error(err);
+      }
+
+      console.log('End chat routing..');
+
+      if (!managed) {
+        return ReportChatSession
+          .update({
+            unmanagedAt: moment().format("YYYY-MM-DD HH:mm:ss")
+          }, {
+            where: {
+              uniqueid: _report.uniqueid
+            },
+            individualHooks: true
+          })
+          .then(handleUnmanaged(_report));
+      }
+
+      if (abandon) {
+        return ReportChatSession
+          .update({
+            abandonAt: moment().format("YYYY-MM-DD HH:mm:ss")
+          }, {
+            where: {
+              uniqueid: _report.uniqueid
+            },
+            individualHooks: true
+          })
+          .then(handleAbandon(_report));
+      }
+
+      return;
+    });
+  }
+}
+
+function handleAbandon(_report) {
+  //Chat session abandon
+  return function(reportChatSession) {
+    return ChatVisitor
+      .update({
+        status: 'abandon'
+      }, {
+        where: {
+          id: _report.visitorid
+        }
+      });
+  }
+}
+
+function handleUnmanaged(_report) {
+  return function(reportChatSession) {
+    //Chat session not managed
+    return ChatVisitor
+      .update({
+        status: 'unserved'
+      }, {
+        where: {
+          id: _report.visitorid
+        }
+      });
+  }
+}
+
+function handleVisitor(visitor) {
+  var _apps = [];
+  var _report = {
+    visitorid: visitor.id,
+    visitorname: visitor.fullname,
+    visitoremail: visitor.email,
+    websiteid: visitor.ChatWebsiteId,
+    joinAt: moment().format("YYYY-MM-DD HH:mm:ss")
+  };
+
+  return ChatWebsite
+    .findById(visitor.ChatWebsiteId)
+    .then(handleEntityNotFound('Unknown ChatWebsite..'))
+    .then(handleChatWebsite(_report))
+    .then(handleEntityNotFound('Unknown ChatWebsite Applications..'))
+    .then(handleChatRoom(_report, _apps))
+    .then(handleEntityNotFound('Unknown ChatRoom..'))
+    .then(handleApps(_report, _apps))
+    .catch(function(err) {
+      console.error('err', err);
+    });
+}
index abe3db7..7d02670 100644 (file)
@@ -1 +1,280 @@
-var _0x3586=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x4E\x65\x77\x20\x43\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x72\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x72\x6F\x6F\x6D\x69\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x66\x69\x6C\x74\x65\x72","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x6E\x61\x6D\x65","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x73\x68\x69\x66\x74","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x75\x73\x68","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x73\x74\x72\x61\x74\x65\x67\x79","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74\x69\x64","\x61\x67\x65\x6E\x74\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x76\x69\x73\x69\x74\x6F\x72\x69\x64","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\x77\x65\x62\x73\x69\x74\x65\x69\x64","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x77\x65\x62\x73\x69\x74\x65\x61\x64\x64\x72\x65\x73\x73","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3586[0];var _=require(_0x3586[1]);var moment=require(_0x3586[2]);var Agent=require(_0x3586[4])[_0x3586[3]];var ChatRoom=require(_0x3586[4])[_0x3586[5]];var ChatApplication=require(_0x3586[4])[_0x3586[6]];var ReportChat=require(_0x3586[4])[_0x3586[7]];var ReportChatSession=require(_0x3586[4])[_0x3586[8]];function Session(_0x590cx9,_0x590cxa){console[_0x3586[10]](_0x3586[9]);console[_0x3586[10]](_0x3586[11],_0x590cx9);var _0x590cxb=0;var _0x590cxc,_0x590cxd;Agent[_0x3586[35]]({where:{id:{$in:_[_0x3586[34]](_0x590cx9[_0x3586[33]],_0x3586[16])},online:true,mailPause:false},include:[{model:ChatRoom,attributes:[_0x3586[16],_0x3586[18]]}],attributes:[_0x3586[16],_0x3586[24],_0x3586[14]]})[_0x3586[32]](function(_0x590cxf){var _0x590cx10=_[_0x3586[20]](_0x590cxf,function(_0x590cx11){if(_0x590cx11[_0x3586[14]]===0){return true}else {return _0x590cx11[_0x3586[14]]>_[_0x3586[20]](_0x590cx11.ChatRooms,function(_0x590cx12){return _0x590cx12[_0x3586[16]]!==_0x590cx9[_0x3586[17]]&&_0x590cx12[_0x3586[18]]!==_0x3586[19]})[_0x3586[15]]}});var _0x590cx13=[];var _0x590cx14;var _0x590cx11;_0x590cx9[_0x3586[21]]=((_0x590cx9[_0x3586[22]]-_0x590cxb)>_0x590cx9[_0x3586[23]])?_0x590cx9[_0x3586[23]]:(_0x590cx9[_0x3586[22]]-_0x590cxb);switch(_0x590cx9[_0x3586[31]]){case _0x3586[29]:_0x590cx14=_[_0x3586[25]](_0x590cx10,_0x590cx13,_0x3586[24]);_0x590cx11=_0x590cx14[_0x3586[26]]();if(_0x590cx11){_0x590cx9[_0x3586[27]]=[{id:_0x590cx11[_0x3586[16]],name:_0x590cx11[_0x3586[24]]}];_0x590cx13[_0x3586[28]]({id:_0x590cx11[_0x3586[16]],name:_0x590cx11[_0x3586[24]]});saveReport(_0x590cx9)}else {_0x590cx13=[];_0x590cx11=_0x590cx10[_0x3586[26]]();if(_0x590cx11){_0x590cx13[_0x3586[28]]({id:_0x590cx11[_0x3586[16]],name:_0x590cx11[_0x3586[24]]});saveReport(_0x590cx9)}};break;case _0x3586[30]:_0x590cx9[_0x3586[27]]=_0x590cx10;saveReport(_0x590cx9);break;default:};_0x590cxd=setTimeout(function(){clearInterval(_0x590cxc);return _0x590cxa(null,false)},_0x590cx9[_0x3586[22]]*1000);_0x590cxc=setInterval(function(){_0x590cxb+=_0x590cx9[_0x3586[23]];return Agent[_0x3586[35]]({where:{id:{$in:_[_0x3586[34]](_0x590cx9[_0x3586[33]],_0x3586[16])},online:true,mailPause:false},include:[{model:ChatRoom,attributes:[_0x3586[16],_0x3586[18]]}],attributes:[_0x3586[16],_0x3586[24],_0x3586[14]]})[_0x3586[32]](function(_0x590cxf){_0x590cx10=_[_0x3586[20]](_0x590cxf,function(_0x590cx11){if(_0x590cx11[_0x3586[14]]===0){return true}else {return _0x590cx11[_0x3586[14]]>_[_0x3586[20]](_0x590cx11.ChatRooms,function(_0x590cx12){return _0x590cx12[_0x3586[16]]!==_0x590cx9[_0x3586[17]]&&_0x590cx12[_0x3586[18]]!==_0x3586[19]})[_0x3586[15]]}});_0x590cx9[_0x3586[21]]=((_0x590cx9[_0x3586[22]]-_0x590cxb)>_0x590cx9[_0x3586[23]])?_0x590cx9[_0x3586[23]]:(_0x590cx9[_0x3586[22]]-_0x590cxb);switch(_0x590cx9[_0x3586[31]]){case _0x3586[29]:_0x590cx14=_[_0x3586[25]](_0x590cx10,_0x590cx13,_0x3586[24]);_0x590cx11=_0x590cx14[_0x3586[26]]();if(_0x590cx11){_0x590cx9[_0x3586[27]]=[{id:_0x590cx11[_0x3586[16]],name:_0x590cx11[_0x3586[24]]}];_0x590cx13[_0x3586[28]]({id:_0x590cx11[_0x3586[16]],name:_0x590cx11[_0x3586[24]]});saveReport(_0x590cx9)}else {_0x590cx13=[];_0x590cx11=_0x590cx10[_0x3586[26]]();if(_0x590cx11){_0x590cx9[_0x3586[27]]=[{id:_0x590cx11[_0x3586[16]],name:_0x590cx11[_0x3586[24]]}];_0x590cx13[_0x3586[28]]({id:_0x590cx11[_0x3586[16]],name:_0x590cx11[_0x3586[24]]});saveReport(_0x590cx9)}};break;case _0x3586[30]:_0x590cx9[_0x3586[27]]=_0x590cx10;saveReport(_0x590cx9);break;default:}})[_0x3586[13]](function(_0x590cxe){console[_0x3586[12]](_0x590cxe)})},_0x590cx9[_0x3586[23]]*1000)})[_0x3586[13]](function(_0x590cxe){console[_0x3586[12]](_0x590cxe)});ReportChat[_0x3586[49]](function(_0x590cx15){if(_0x590cx15[_0x3586[37]](_0x3586[36])){return ChatRoom[_0x3586[48]](_0x590cx15[_0x3586[17]])[_0x3586[32]](function(ChatRoom){return ChatRoom[_0x3586[47]](_0x590cx15[_0x3586[39]],{individualHooks:true})})[_0x3586[32]](function(){return ReportChatSession[_0x3586[46]]({application:_0x590cx15[_0x3586[38]],agentid:_0x590cx15[_0x3586[39]],agentname:_0x590cx15[_0x3586[40]],queueid:_0x590cx15[_0x3586[41]]||null,queuename:_0x590cx15[_0x3586[42]]||null,leaveAt:moment()[_0x3586[44]](_0x3586[43])},{where:{uniqueid:_0x590cx15[_0x3586[45]]},individualHooks:true})})[_0x3586[32]](function(){clearInterval(_0x590cxc);clearTimeout(_0x590cxd);return _0x590cxa(null,true)})[_0x3586[13]](function(_0x590cxe){console[_0x3586[12]](_0x590cxe)})}});ReportChatSession[_0x3586[49]](function(_0x590cx15){if(_0x590cx15[_0x3586[37]](_0x3586[50])){return ChatRoom[_0x3586[48]](_0x590cx15[_0x3586[17]])[_0x3586[32]](function(ChatRoom){return ChatRoom[_0x3586[46]]({status:_0x3586[19]})})[_0x3586[32]](function(){clearInterval(_0x590cxc);clearTimeout(_0x590cxd);return _0x590cxa(null,true,true)})[_0x3586[13]](function(_0x590cxe){console[_0x3586[12]](_0x590cxe)})}});return {}}function saveReport(_0x590cx9){var _0x590cx17=[];_0x590cx9[_0x3586[27]][_0x3586[57]](function(_0x590cx11,_0x590cx18){_0x590cx17[_0x3586[28]]({uniqueid:_0x590cx9[_0x3586[45]],visitorid:_0x590cx9[_0x3586[51]],visitorname:_0x590cx9[_0x3586[52]],visitoremail:_0x590cx9[_0x3586[53]],timeslot:_0x590cx9[_0x3586[21]],websiteid:_0x590cx9[_0x3586[54]],websitename:_0x590cx9[_0x3586[55]],websiteaddress:_0x590cx9[_0x3586[56]],application:_0x590cx9[_0x3586[38]],agentname:_0x590cx11[_0x3586[24]],agentid:_0x590cx11[_0x3586[16]],queueid:_0x590cx9[_0x3586[41]]||null,queuename:_0x590cx9[_0x3586[42]]||null,roomid:_0x590cx9[_0x3586[17]]||null,calledAt:moment()[_0x3586[44]](_0x3586[43])})});if(_0x590cx17[_0x3586[15]]){return ReportChat[_0x3586[58]](_0x590cx17,{individualHooks:true})[_0x3586[13]](function(_0x590cxe){console[_0x3586[12]](_0x590cxe)})}}module[_0x3586[59]]=Session
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var moment = require('moment');
+
+var Agent = require('../../../models').User;
+var ChatRoom = require('../../../models').ChatRoom;
+var ChatApplication = require('../../../models').ChatApplication;
+var ReportChat = require('../../../models').ReportChat;
+var ReportChatSession = require('../../../models').ReportChatSession;
+
+// Define the factory
+function Session(report, callback) {
+  console.log('New Chat session...');
+  console.log('report', report);
+  var elapsed = 0;
+  var interval, timeout;
+
+  Agent
+    .findAll({
+      where: {
+        id: {
+          $in: _.map(report.agents, 'id'),
+        },
+        online: true,
+        mailPause: false
+      },
+      include: [{
+        model: ChatRoom,
+        attributes: ['id', 'status']
+      }],
+      attributes: ['id', 'name', 'chatCapacity']
+    })
+    .then(function(agents) {
+      var set1 = _.filter(agents, function(agent) {
+        if (agent.chatCapacity === 0) {
+          return true;
+        } else {
+          return agent.chatCapacity > _.filter(agent.ChatRooms, function(room) {
+            return room.id !== report.roomid && room.status !== 'CLOSED'
+          }).length;
+        }
+      });
+      var set2 = [];
+
+      var diff;
+      var agent;
+
+      report.timeslot = ((report.apptimeout - elapsed) > report.queuetimeout) ? report.queuetimeout : (report.apptimeout - elapsed);
+
+      switch (report.strategy) {
+        case 'rrmemory':
+          diff = _.differenceBy(set1, set2, 'name');
+          agent = diff.shift();
+
+          if (agent) {
+            report.available = [{
+              id: agent.id,
+              name: agent.name
+            }];
+
+            set2.push({
+              id: agent.id,
+              name: agent.name
+            });
+            saveReport(report);
+
+          } else {
+            set2 = [];
+            agent = set1.shift();
+
+            if (agent) {
+              set2.push({
+                id: agent.id,
+                name: agent.name
+              });
+              saveReport(report);
+            }
+          }
+
+          break;
+        case 'beepall':
+          report.available = set1;
+          saveReport(report);
+
+          break;
+        default:
+      }
+
+      // APPLICATION TIMEOUT
+      timeout = setTimeout(function() {
+        clearInterval(interval);
+        return callback(null, false);
+      }, report.apptimeout * 1000);
+
+      interval = setInterval(function() {
+        elapsed += report.queuetimeout;
+
+        return Agent
+          .findAll({
+            where: {
+              id: {
+                $in: _.map(report.agents, 'id'),
+              },
+              online: true,
+              mailPause: false
+            },
+            include: [{
+              model: ChatRoom,
+              attributes: ['id', 'status']
+            }],
+            attributes: ['id', 'name', 'chatCapacity']
+          })
+          .then(function(agents) {
+            set1 = _.filter(agents, function(agent) {
+              if (agent.chatCapacity === 0) {
+                return true;
+              } else {
+                return agent.chatCapacity > _.filter(agent.ChatRooms, function(room) {
+                  return room.id !== report.roomid && room.status !== 'CLOSED'
+                }).length;
+              }
+            });
+
+            report.timeslot = ((report.apptimeout - elapsed) > report.queuetimeout) ? report.queuetimeout : (report.apptimeout - elapsed);
+
+            switch (report.strategy) {
+              case 'rrmemory':
+                diff = _.differenceBy(set1, set2, 'name');
+                agent = diff.shift();
+
+                if (agent) {
+                  report.available = [{
+                    id: agent.id,
+                    name: agent.name
+                  }];
+
+                  set2.push({
+                    id: agent.id,
+                    name: agent.name
+                  });
+
+                  saveReport(report);
+
+                } else {
+                  set2 = [];
+                  agent = set1.shift();
+
+                  if (agent) {
+                    report.available = [{
+                      id: agent.id,
+                      name: agent.name
+                    }];
+
+                    set2.push({
+                      id: agent.id,
+                      name: agent.name
+                    });
+                    saveReport(report);
+                  }
+                }
+
+                break;
+              case 'beepall':
+                report.available = set1;
+                saveReport(report);
+
+                break;
+              default:
+            }
+          })
+          .catch(function(err) {
+            console.error(err);
+          });
+
+      }, report.queuetimeout * 1000);
+
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+
+  // INTERROMPO IL ROUTING
+  ReportChat.afterUpdate(function(doc) {
+    if (doc.changed('connectid')) {
+      return ChatRoom
+        .findById(doc.roomid)
+        .then(function(ChatRoom) {
+          return ChatRoom
+            .addUser(doc.agentid, {
+              individualHooks: true
+            });
+        })
+        .then(function() {
+          return ReportChatSession
+            .update({
+              application: doc.application,
+              agentid: doc.agentid,
+              agentname: doc.agentname,
+              queueid: doc.queueid || null,
+              queuename: doc.queuename || null,
+              leaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
+            }, {
+              where: {
+                uniqueid: doc.uniqueid
+              },
+              individualHooks: true
+            });
+        })
+        .then(function() {
+          clearInterval(interval);
+          clearTimeout(timeout);
+          return callback(null, true);
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    }
+  });
+
+  ReportChatSession.afterUpdate(function(doc) {
+    if (doc.changed('abandon')) {
+      return ChatRoom
+        .findById(doc.roomid)
+        .then(function(ChatRoom) {
+          return ChatRoom
+            .update({
+              status: 'CLOSED'
+            })
+        })
+        .then(function() {
+          clearInterval(interval);
+          clearTimeout(timeout);
+          return callback(null, true, true);
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    }
+  });
+
+  return {};
+}
+
+function saveReport(report) {
+  var reports = [];
+
+  report.available.forEach(function(agent, index) {
+    reports.push({
+      uniqueid: report.uniqueid,
+      visitorid: report.visitorid,
+      visitorname: report.visitorname,
+      visitoremail: report.visitoremail,
+      timeslot: report.timeslot,
+      websiteid: report.websiteid,
+      websitename: report.websitename,
+      websiteaddress: report.websiteaddress,
+      application: report.application,
+      agentname: agent.name,
+      agentid: agent.id,
+      queueid: report.queueid || null,
+      queuename: report.queuename || null,
+      roomid: report.roomid || null,
+      calledAt: moment().format("YYYY-MM-DD HH:mm:ss")
+    });
+  });
+
+  if (reports.length) {
+    return ReportChat
+      .bulkCreate(reports, {
+        individualHooks: true
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  }
+}
+
+// Export this file as a module
+module.exports = Session;
index 926d14a..9268b24 100644 (file)
@@ -1 +1,216 @@
-var _0xc721=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x61\x64\x64\x72\x65\x73\x73","\x61\x64\x64\x72\x65\x73\x73","\x66\x69\x64\x65\x6C\x69\x74\x79","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x63\x72\x65\x61\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x65\x6E\x67\x74\x68","\x70\x75\x73\x68","\x61\x70\x70","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x66\x6F\x72\x45\x61\x63\x68","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65","\x45\x6E\x64\x20\x6D\x61\x69\x6C\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x65\x72\x72","\x74\x68\x65\x6E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D"];_0xc721[0];var _=require(_0xc721[1]);var moment=require(_0xc721[2]);var util=require(_0xc721[3]);var async=require(_0xc721[4]);var Util=require(_0xc721[5]);var ReportMail=require(_0xc721[7])[_0xc721[6]];var ReportMailSession=require(_0xc721[7])[_0xc721[8]];var MailMessage=require(_0xc721[7])[_0xc721[9]];var MailQueue=require(_0xc721[7])[_0xc721[10]];var Interval=require(_0xc721[7])[_0xc721[11]];var User=require(_0xc721[7])[_0xc721[12]];var Session=require(_0xc721[13]);module[_0xc721[14]]=function(){console[_0xc721[16]](_0xc721[15]);MailMessage[_0xc721[19]](function(_0x8466xd){if(_0x8466xd[_0xc721[17]]===_0xc721[18]){handleMessage(_0x8466xd)}})};function handleEntityNotFound(_0x8466xd){return function(_0x8466xf){if(!_0x8466xf){throw {message:_0x8466xd}};return _0x8466xf}}function handleMailRoom(_0x8466x11,_0x8466x12){return function(_0x8466x13){_0x8466x11[_0xc721[20]]=_0x8466x13[_0xc721[21]];_0x8466x11[_0xc721[22]]=util[_0xc721[25]](_0xc721[23],moment()[_0xc721[24]](),_0x8466x13[_0xc721[21]]);_0x8466x11[_0xc721[26]]=_0x8466x13[_0xc721[26]];_0x8466x12[_0xc721[27]]=_[_0xc721[29]](_0x8466x13.Users,function(_0x8466x14){return {id:_0x8466x14[_0xc721[21]],name:_0x8466x14[_0xc721[28]]}});return _0x8466x13[_0xc721[30]]()}}function handleMailAccount(_0x8466x11,_0x8466x12){return function(_0x8466x16){_0x8466x11[_0xc721[31]]=_0x8466x16[_0xc721[21]];_0x8466x11[_0xc721[32]]=_0x8466x16[_0xc721[28]];_0x8466x11[_0xc721[33]]=_0x8466x16[_0xc721[34]];_0x8466x12[_0xc721[35]]=_0x8466x16[_0xc721[35]];if(_0x8466x16[_0xc721[35]]){_0x8466x12[_0xc721[36]]=_0x8466x12[_0xc721[37]]=_0x8466x16[_0xc721[38]];_0x8466x12[_0xc721[35]]=_0x8466x16[_0xc721[38]];_0x8466x12[_0xc721[39]]=_0xc721[40]};return _0x8466x16[_0xc721[44]]({order:_0xc721[41],include:[{model:MailQueue,attributes:[_0xc721[21],_0xc721[28],_0xc721[38],_0xc721[39]],include:[{model:User,attributes:[_0xc721[21],_0xc721[28],_0xc721[42],_0xc721[43]]}]},{model:User,attributes:[_0xc721[21],_0xc721[28],_0xc721[42],_0xc721[43]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0x8466x11,_0x8466x12){return function(_0x8466x18){var _0x8466x19=[];ReportMailSession[_0xc721[48]](_[_0xc721[47]](_0x8466x11))[_0xc721[46]](function(_0x8466x1a){console[_0xc721[45]](_0x8466x1a)});if(_0x8466x12[_0xc721[35]]){_0x8466x11[_0xc721[37]]=_0x8466x12[_0xc721[35]];_0x8466x11[_0xc721[36]]=_0x8466x12[_0xc721[35]];_0x8466x11[_0xc721[27]]=_0x8466x12[_0xc721[27]];_0x8466x11[_0xc721[49]]=_0xc721[35];_0x8466x11[_0xc721[39]]=_0xc721[40];var _0x8466x1b=_[_0xc721[47]](_0x8466x11);if(_0x8466x1b[_0xc721[27]][_0xc721[50]]){_0x8466x19[_0xc721[51]](function(_0x8466x1c){ new Session(_0x8466x1b,_0x8466x1c)})}};_0x8466x18[_0xc721[57]](function(_0x8466x1d,_0x8466x1e){var _0x8466x1b=_[_0xc721[47]](_0x8466x11);_0x8466x1b[_0xc721[36]]=_0x8466x1d[_0xc721[38]];_0x8466x1b[_0xc721[49]]=_0x8466x1d[_0xc721[52]];switch(_0x8466x1d[_0xc721[52]]){case _0xc721[55]:_0x8466x1b[_0xc721[53]]=_0x8466x1d[_0xc721[10]][_0xc721[21]];_0x8466x1b[_0xc721[54]]=_0x8466x1d[_0xc721[10]][_0xc721[28]];_0x8466x1b[_0xc721[39]]=_0x8466x1d[_0xc721[10]][_0xc721[39]];_0x8466x1b[_0xc721[37]]=_0x8466x1d[_0xc721[10]][_0xc721[38]];_0x8466x1b[_0xc721[27]]=_[_0xc721[29]](_0x8466x1d[_0xc721[10]].Users,function(_0x8466x1f){return {id:_0x8466x1f[_0xc721[21]],name:_0x8466x1f[_0xc721[28]]}});break;case _0xc721[56]:_0x8466x1b[_0xc721[37]]=_0x8466x1d[_0xc721[38]];_0x8466x1b[_0xc721[39]]=_0xc721[40];_0x8466x1b[_0xc721[27]]=[{id:_0x8466x1d[_0xc721[12]][_0xc721[21]],name:_0x8466x1d[_0xc721[12]][_0xc721[28]]}];break;default:};if(_0x8466x19[_0xc721[50]]){_0x8466x19[_0xc721[51]](function(_0x8466x20,_0x8466x1c){if(_0x8466x20){_0x8466x1c(null,_0x8466x20)}else { new Session(_0x8466x1b,_0x8466x1c)}})}else {_0x8466x19[_0xc721[51]](function(_0x8466x1c){ new Session(_0x8466x1b,_0x8466x1c)})}});async[_0xc721[61]](_0x8466x19,function(_0x8466x1a,_0x8466x21){if(_0x8466x1a){console[_0xc721[45]](_0x8466x1a)};if(!_0x8466x21){return ReportMailSession[_0xc721[59]]({queuecallerleaveAt:moment()[_0xc721[25]](_0xc721[58]),queuecallerunmanagedAt:moment()[_0xc721[25]](_0xc721[58])},{where:{uniqueid:_0x8466x11[_0xc721[22]]},individualHooks:true})};console[_0xc721[16]](_0xc721[60])})}}function handleMessage(_0x8466xd){var _0x8466x12={agents:[]};var _0x8466x11={messageid:_0x8466xd[_0xc721[21]],queuecallerjoinAt:moment()[_0xc721[25]](_0xc721[58])};return _0x8466xd[_0xc721[66]]({include:[{model:User,attributes:[_0xc721[21],_0xc721[28],_0xc721[42],_0xc721[43]]}]})[_0xc721[63]](handleEntityNotFound(_0xc721[65]))[_0xc721[63]](handleMailRoom(_0x8466x11,_0x8466x12))[_0xc721[63]](handleEntityNotFound(_0xc721[64]))[_0xc721[63]](handleMailAccount(_0x8466x11,_0x8466x12))[_0xc721[63]](handleApps(_0x8466x11,_0x8466x12))[_0xc721[46]](function(_0x8466x1a){console[_0xc721[45]](_0xc721[62],_0x8466x1a)})}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var moment = require('moment');
+var util = require('util');
+var async = require('async');
+
+var Util = require('../../util');
+
+var ReportMail = require('../../../models').ReportMail;
+var ReportMailSession = require('../../../models').ReportMailSession;
+var MailMessage = require('../../../models').MailMessage;
+var MailQueue = require('../../../models').MailQueue;
+var Interval = require('../../../models').Interval;
+var User = require('../../../models').User;
+
+var Session = require('./session');
+
+module.exports = function() {
+  console.log('Mail Routing Initialization..');
+
+  MailMessage.afterCreate(function(message) {
+    if (message.status === 'RECEIVED') {
+      handleMessage(message);
+    }
+  });
+}
+
+function handleEntityNotFound(message) {
+  return function(entity) {
+    if (!entity) {
+      throw {
+        message: message
+      };
+    }
+    return entity;
+  };
+}
+
+function handleMailRoom(_report, _fidelity) {
+  return function(room) {
+    _report.roomid = room.id;
+    _report.uniqueid = util.format('%s.%s', moment().unix(), room.id);
+    _report.subject = room.subject;
+    _fidelity.agents = _.map(room.Users, function(user) {
+      return {
+        id: user.id,
+        name: user.name
+      };
+    });
+
+    return room
+      .getMailAccount();
+  }
+}
+
+function handleMailAccount(_report, _fidelity) {
+  return function(account) {
+    _report.accountid = account.id;
+    _report.accountname = account.name;
+    _report.accountaddress = account.address;
+
+    _fidelity.fidelity = account.fidelity;
+
+    if (account.fidelity) {
+      _fidelity.apptimeout = _fidelity.queuetimeout = account.timeout;
+      _fidelity.fidelity = account.timeout;
+      _fidelity.strategy = 'beepall';
+    }
+
+    return account
+      .getMailApplications({
+        order: 'priority ASC',
+        include: [{
+          model: MailQueue,
+          attributes: ['id', 'name', 'timeout', 'strategy'],
+          include: [{
+            model: User,
+            attributes: ['id', 'name', 'online', 'mailPause']
+          }]
+        }, {
+          model: User,
+          attributes: ['id', 'name', 'online', 'mailPause']
+        }, {
+          model: Interval,
+          include: [{
+            all: true
+          }]
+        }]
+      });
+  }
+}
+
+function handleApps(_report, _fidelity) {
+  return function(apps) {
+    var waterfall = [];
+
+    ReportMailSession
+      .create(_.cloneDeep(_report))
+      .catch(function(err) {
+        console.error(err);
+      });
+
+    if (_fidelity.fidelity) {
+      _report.queuetimeout = _fidelity.fidelity;
+      _report.apptimeout = _fidelity.fidelity;
+      _report.agents = _fidelity.agents;
+      _report.application = 'fidelity';
+      _report.strategy = 'beepall';
+
+      var data = _.cloneDeep(_report);
+      if (data.agents.length) {
+        waterfall.push(function(callback) {
+          new Session(data, callback);
+        });
+      }
+    }
+
+    apps.forEach(function(app, index) {
+
+      var data = _.cloneDeep(_report);
+
+      data.apptimeout = app.timeout;
+      data.application = app.app;
+
+      switch (app.app) {
+        case 'queue':
+          data.queueid = app.MailQueue.id;
+          data.queuename = app.MailQueue.name;
+          data.strategy = app.MailQueue.strategy;
+
+          data.queuetimeout = app.MailQueue.timeout;
+          data.agents = _.map(app.MailQueue.Users, function(agent) {
+            return {
+              id: agent.id,
+              name: agent.name
+            }
+          });
+
+          break;
+        case 'agent':
+          data.queuetimeout = app.timeout;
+          data.strategy = 'beepall';
+
+          data.agents = [{
+            id: app.User.id,
+            name: app.User.name
+          }];
+
+          break;
+        default:
+      }
+
+      if (waterfall.length) {
+        waterfall.push(function(exit, callback) {
+          if (exit) {
+            callback(null, exit);
+          } else {
+            new Session(data, callback);
+          }
+        });
+      } else {
+        // PRIMA CALLBACK NESSUN DATO
+        waterfall.push(function(callback) {
+          new Session(data, callback);
+        });
+      }
+    });
+
+    async.waterfall(waterfall, function(err, managed) {
+      if (err) {
+        console.error(err);
+      }
+      if (!managed) {
+        return ReportMailSession
+          .update({
+            queuecallerleaveAt: moment().format("YYYY-MM-DD HH:mm:ss"),
+            queuecallerunmanagedAt: moment().format("YYYY-MM-DD HH:mm:ss")
+          }, {
+            where: {
+              uniqueid: _report.uniqueid
+            },
+            individualHooks: true
+          });
+      }
+
+      console.log('End mail routing..');
+    });
+  }
+}
+
+function handleMessage(message) {
+  var _fidelity = {
+    agents: []
+  };
+  var _report = {
+    messageid: message.id,
+    queuecallerjoinAt: moment().format("YYYY-MM-DD HH:mm:ss")
+  };
+
+  return message
+    .getMailRoom({
+      include: [{
+        model: User,
+        attributes: ['id', 'name', 'online', 'mailPause']
+      }]
+    })
+    .then(handleEntityNotFound('Unknown MailRoom..'))
+    .then(handleMailRoom(_report, _fidelity))
+    .then(handleEntityNotFound('Unknown MailAccount..'))
+    .then(handleMailAccount(_report, _fidelity))
+    .then(handleApps(_report, _fidelity))
+    .catch(function(err) {
+      console.error('err', err);
+    });
+}
index 62f7d26..171d4af 100644 (file)
@@ -1 +1,258 @@
-var _0xe400=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4E\x65\x77\x20\x4D\x61\x69\x6C\x20\x73\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x72\x6F\x6F\x6D\x69\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x66\x69\x6C\x74\x65\x72","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x6E\x61\x6D\x65","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x73\x68\x69\x66\x74","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x75\x73\x68","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x73\x74\x72\x61\x74\x65\x67\x79","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x66\x69\x64\x65\x6C\x69\x74\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x75\x62\x6A\x65\x63\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x61\x64\x64\x72\x65\x73\x73","\x6D\x65\x73\x73\x61\x67\x65\x69\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe400[0];var _=require(_0xe400[1]);var moment=require(_0xe400[2]);var Agent=require(_0xe400[4])[_0xe400[3]];var MailRoom=require(_0xe400[4])[_0xe400[5]];var MailApplication=require(_0xe400[4])[_0xe400[6]];var ReportMail=require(_0xe400[4])[_0xe400[7]];var ReportMailSession=require(_0xe400[4])[_0xe400[8]];function Session(_0xecf5x9,_0xecf5xa){console[_0xe400[10]](_0xe400[9]);var _0xecf5xb=0;var _0xecf5xc,_0xecf5xd;Agent[_0xe400[34]]({where:{id:{$in:_[_0xe400[33]](_0xecf5x9[_0xe400[32]],_0xe400[15])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0xe400[15],_0xe400[17]]}],attributes:[_0xe400[15],_0xe400[23],_0xe400[13]]})[_0xe400[31]](function(_0xecf5xf){var _0xecf5x10=_[_0xe400[19]](_0xecf5xf,function(_0xecf5x11){if(_0xecf5x11[_0xe400[13]]===0){return true}else {return _0xecf5x11[_0xe400[13]]>_[_0xe400[19]](_0xecf5x11.MailRooms,function(_0xecf5x12){return _0xecf5x12[_0xe400[15]]!==_0xecf5x9[_0xe400[16]]&&_0xecf5x12[_0xe400[17]]!==_0xe400[18]})[_0xe400[14]]}});var _0xecf5x13=[];var _0xecf5x14;var _0xecf5x11;_0xecf5x9[_0xe400[20]]=((_0xecf5x9[_0xe400[21]]-_0xecf5xb)>_0xecf5x9[_0xe400[22]])?_0xecf5x9[_0xe400[22]]:(_0xecf5x9[_0xe400[21]]-_0xecf5xb);switch(_0xecf5x9[_0xe400[30]]){case _0xe400[28]:_0xecf5x14=_[_0xe400[24]](_0xecf5x10,_0xecf5x13,_0xe400[23]);_0xecf5x11=_0xecf5x14[_0xe400[25]]();if(_0xecf5x11){_0xecf5x9[_0xe400[26]]=[{id:_0xecf5x11[_0xe400[15]],name:_0xecf5x11[_0xe400[23]]}];_0xecf5x13[_0xe400[27]]({id:_0xecf5x11[_0xe400[15]],name:_0xecf5x11[_0xe400[23]]});saveReport(_0xecf5x9)}else {_0xecf5x13=[];_0xecf5x11=_0xecf5x10[_0xe400[25]]();if(_0xecf5x11){_0xecf5x13[_0xe400[27]]({id:_0xecf5x11[_0xe400[15]],name:_0xecf5x11[_0xe400[23]]});saveReport(_0xecf5x9)}};break;case _0xe400[29]:_0xecf5x9[_0xe400[26]]=_0xecf5x10;saveReport(_0xecf5x9);break;default:};_0xecf5xd=setTimeout(function(){clearInterval(_0xecf5xc);return _0xecf5xa(null,false)},_0xecf5x9[_0xe400[21]]*1000);_0xecf5xc=setInterval(function(){_0xecf5xb+=_0xecf5x9[_0xe400[22]];return Agent[_0xe400[34]]({where:{id:{$in:_[_0xe400[33]](_0xecf5x9[_0xe400[32]],_0xe400[15])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0xe400[15],_0xe400[17]]}],attributes:[_0xe400[15],_0xe400[23],_0xe400[13]]})[_0xe400[31]](function(_0xecf5xf){_0xecf5x10=_[_0xe400[19]](_0xecf5xf,function(_0xecf5x11){if(_0xecf5x11[_0xe400[13]]===0){return true}else {return _0xecf5x11[_0xe400[13]]>_[_0xe400[19]](_0xecf5x11.MailRooms,function(_0xecf5x12){return _0xecf5x12[_0xe400[15]]!==_0xecf5x9[_0xe400[16]]&&_0xecf5x12[_0xe400[17]]!==_0xe400[18]})[_0xe400[14]]}});_0xecf5x9[_0xe400[20]]=((_0xecf5x9[_0xe400[21]]-_0xecf5xb)>_0xecf5x9[_0xe400[22]])?_0xecf5x9[_0xe400[22]]:(_0xecf5x9[_0xe400[21]]-_0xecf5xb);switch(_0xecf5x9[_0xe400[30]]){case _0xe400[28]:_0xecf5x14=_[_0xe400[24]](_0xecf5x10,_0xecf5x13,_0xe400[23]);_0xecf5x11=_0xecf5x14[_0xe400[25]]();if(_0xecf5x11){_0xecf5x9[_0xe400[26]]=[{id:_0xecf5x11[_0xe400[15]],name:_0xecf5x11[_0xe400[23]]}];_0xecf5x13[_0xe400[27]]({id:_0xecf5x11[_0xe400[15]],name:_0xecf5x11[_0xe400[23]]});saveReport(_0xecf5x9)}else {_0xecf5x13=[];_0xecf5x11=_0xecf5x10[_0xe400[25]]();if(_0xecf5x11){_0xecf5x9[_0xe400[26]]=[{id:_0xecf5x11[_0xe400[15]],name:_0xecf5x11[_0xe400[23]]}];_0xecf5x13[_0xe400[27]]({id:_0xecf5x11[_0xe400[15]],name:_0xecf5x11[_0xe400[23]]});saveReport(_0xecf5x9)}};break;case _0xe400[29]:_0xecf5x9[_0xe400[26]]=_0xecf5x10;saveReport(_0xecf5x9);break;default:}})[_0xe400[12]](function(_0xecf5xe){console[_0xe400[11]](_0xecf5xe)})},_0xecf5x9[_0xe400[22]]*1000)})[_0xe400[12]](function(_0xecf5xe){console[_0xe400[11]](_0xecf5xe)});ReportMail[_0xe400[49]](function(_0xecf5x15){if(_0xecf5x15[_0xe400[36]](_0xe400[35])){return MailRoom[_0xe400[48]](_0xecf5x15[_0xe400[16]])[_0xe400[31]](function(_0xecf5x16){return _0xecf5x16[_0xe400[47]](_0xecf5x15[_0xe400[38]],{individualHooks:true})})[_0xe400[31]](function(){return ReportMailSession[_0xe400[46]]({application:_0xecf5x15[_0xe400[37]],memberid:_0xecf5x15[_0xe400[38]],membername:_0xecf5x15[_0xe400[39]],queue:_0xecf5x15[_0xe400[40]]||null,queuename:_0xecf5x15[_0xe400[41]]||null,fidelity:_0xecf5x15[_0xe400[37]]===_0xe400[42]?_0xecf5x15[_0xe400[20]]:null,queuecallerleaveAt:moment()[_0xe400[44]](_0xe400[43])},{where:{uniqueid:_0xecf5x15[_0xe400[45]]},individualHooks:true})})[_0xe400[31]](function(){clearInterval(_0xecf5xc);clearTimeout(_0xecf5xd);return _0xecf5xa(null,true)})[_0xe400[12]](function(_0xecf5xe){console[_0xe400[11]](_0xecf5xe)})}});return {}}function saveReport(_0xecf5x9){var _0xecf5x18=[];_0xecf5x9[_0xe400[26]][_0xe400[55]](function(_0xecf5x11,_0xecf5x19){_0xecf5x18[_0xe400[27]]({uniqueid:_0xecf5x9[_0xe400[45]],timeslot:_0xecf5x9[_0xe400[20]],subject:_0xecf5x9[_0xe400[50]],accountid:_0xecf5x9[_0xe400[51]],accountname:_0xecf5x9[_0xe400[52]],accountaddress:_0xecf5x9[_0xe400[53]],application:_0xecf5x9[_0xe400[37]],membername:_0xecf5x11[_0xe400[23]],memberid:_0xecf5x11[_0xe400[15]],queue:_0xecf5x9[_0xe400[40]]||null,queuename:_0xecf5x9[_0xe400[41]]||null,roomid:_0xecf5x9[_0xe400[16]]||null,messageid:_0xecf5x9[_0xe400[54]]||null,calledAt:moment()[_0xe400[44]](_0xe400[43])})});if(_0xecf5x18[_0xe400[14]]){return ReportMail[_0xe400[56]](_0xecf5x18,{individualHooks:true})[_0xe400[12]](function(_0xecf5xe){console[_0xe400[11]](_0xecf5xe)})}}module[_0xe400[57]]=Session
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var moment = require('moment');
+
+var Agent = require('../../../models').User;
+var MailRoom = require('../../../models').MailRoom;
+var MailApplication = require('../../../models').MailApplication;
+var ReportMail = require('../../../models').ReportMail;
+var ReportMailSession = require('../../../models').ReportMailSession;
+
+// Define the factory
+function Session(report, callback) {
+  console.log('New Mail session...');
+  var elapsed = 0;
+  var interval, timeout;
+
+  Agent
+    .findAll({
+      where: {
+        id: {
+          $in: _.map(report.agents, 'id'),
+        },
+        online: true,
+        mailPause: false
+      },
+      include: [{
+        model: MailRoom,
+        attributes: ['id', 'status']
+      }],
+      attributes: ['id', 'name', 'mailCapacity']
+    })
+    .then(function(agents) {
+      var set1 = _.filter(agents, function(agent) {
+        if (agent.mailCapacity === 0) {
+          return true;
+        } else {
+          return agent.mailCapacity > _.filter(agent.MailRooms, function(room) {
+            return room.id !== report.roomid && room.status !== 'CLOSED'
+          }).length;
+        }
+      });
+      var set2 = [];
+
+      var diff;
+      var agent;
+
+      report.timeslot = ((report.apptimeout - elapsed) > report.queuetimeout) ? report.queuetimeout : (report.apptimeout - elapsed);
+
+      switch (report.strategy) {
+        case 'rrmemory':
+          diff = _.differenceBy(set1, set2, 'name');
+          agent = diff.shift();
+
+          if (agent) {
+            report.available = [{
+              id: agent.id,
+              name: agent.name
+            }];
+
+            set2.push({
+              id: agent.id,
+              name: agent.name
+            });
+            saveReport(report);
+
+          } else {
+            set2 = [];
+            agent = set1.shift();
+
+            if (agent) {
+              set2.push({
+                id: agent.id,
+                name: agent.name
+              });
+              saveReport(report);
+            }
+          }
+
+          break;
+        case 'beepall':
+          report.available = set1;
+          saveReport(report);
+
+          break;
+        default:
+      }
+
+      // APPLICATION TIMEOUT
+      timeout = setTimeout(function() {
+        clearInterval(interval);
+        return callback(null, false);
+      }, report.apptimeout * 1000);
+
+      interval = setInterval(function() {
+        elapsed += report.queuetimeout;
+
+        return Agent
+          .findAll({
+            where: {
+              id: {
+                $in: _.map(report.agents, 'id'),
+              },
+              online: true,
+              mailPause: false
+            },
+            include: [{
+              model: MailRoom,
+              attributes: ['id', 'status']
+            }],
+            attributes: ['id', 'name', 'mailCapacity']
+          })
+          .then(function(agents) {
+            set1 = _.filter(agents, function(agent) {
+              if (agent.mailCapacity === 0) {
+                return true;
+              } else {
+                return agent.mailCapacity > _.filter(agent.MailRooms, function(room) {
+                  return room.id !== report.roomid && room.status !== 'CLOSED'
+                }).length;
+              }
+            });
+
+            report.timeslot = ((report.apptimeout - elapsed) > report.queuetimeout) ? report.queuetimeout : (report.apptimeout - elapsed);
+
+            switch (report.strategy) {
+              case 'rrmemory':
+                diff = _.differenceBy(set1, set2, 'name');
+                agent = diff.shift();
+
+                if (agent) {
+                  report.available = [{
+                    id: agent.id,
+                    name: agent.name
+                  }];
+
+                  set2.push({
+                    id: agent.id,
+                    name: agent.name
+                  });
+
+                  saveReport(report);
+
+                } else {
+                  set2 = [];
+                  agent = set1.shift();
+
+                  if (agent) {
+                    report.available = [{
+                      id: agent.id,
+                      name: agent.name
+                    }];
+
+                    set2.push({
+                      id: agent.id,
+                      name: agent.name
+                    });
+                    saveReport(report);
+                  }
+                }
+
+                break;
+              case 'beepall':
+                report.available = set1;
+                saveReport(report);
+
+                break;
+              default:
+            }
+          })
+          .catch(function(err) {
+            console.error(err);
+          });
+
+      }, report.queuetimeout * 1000);
+
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+
+  // INTERROMPO IL ROUTING
+  ReportMail.afterUpdate(function(doc) {
+    if (doc.changed('connectid')) {
+      return MailRoom
+        .findById(doc.roomid)
+        .then(function(mailRoom) {
+          return mailRoom
+            .addUser(doc.memberid, {
+              individualHooks: true
+            });
+        })
+        .then(function() {
+          return ReportMailSession
+            .update({
+              application: doc.application,
+              memberid: doc.memberid,
+              membername: doc.membername,
+              queue: doc.queue || null,
+              queuename: doc.queuename || null,
+              fidelity: doc.application === 'fidelity' ? doc.timeslot : null,
+              queuecallerleaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
+            }, {
+              where: {
+                uniqueid: doc.uniqueid
+              },
+              individualHooks: true
+            });
+        })
+        .then(function() {
+          clearInterval(interval);
+          clearTimeout(timeout);
+          return callback(null, true);
+        })
+        .catch(function(err) {
+          console.error(err);
+        });
+    }
+  });
+
+  return {};
+}
+
+function saveReport(report) {
+  var reports = [];
+
+  report.available.forEach(function(agent, index) {
+    reports.push({
+      uniqueid: report.uniqueid,
+      timeslot: report.timeslot,
+      subject: report.subject,
+      accountid: report.accountid,
+      accountname: report.accountname,
+      accountaddress: report.accountaddress,
+      application: report.application,
+      membername: agent.name,
+      memberid: agent.id,
+      queue: report.queue || null,
+      queuename: report.queuename || null,
+      roomid: report.roomid || null,
+      messageid: report.messageid || null,
+      calledAt: moment().format("YYYY-MM-DD HH:mm:ss")
+    });
+  });
+
+  if (reports.length) {
+    return ReportMail
+      .bulkCreate(reports, {
+        individualHooks: true
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  }
+}
+
+// Export this file as a module
+module.exports = Session;
index fd500a1..f15b870 100644 (file)
@@ -1 +1,1236 @@
-var _0x6b49=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x73","\x6C\x6F\x67","\x74\x68\x65\x6E","\x6C\x6F\x63\x61\x6C","\x61\x67\x65\x6E\x74","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x43\x61\x72\x65\x72\x69","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69","\x37\x35\x78\x63\x61\x6C\x6C\x79\x37\x35","\x64\x79\x6E\x61\x6D\x69\x63","\x46\x52\x49\x45\x4E\x44","\x75\x64\x70","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x79\x65\x73","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x44\x61\x6E\x69\x65\x6C\x65\x20\x43\x69\x6E\x74\x69","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69","\x41\x6E\x64\x72\x65\x61\x20\x42\x69\x61\x6E\x63\x6F","\x61\x6E\x64\x72\x65\x61\x2E\x62\x69\x61\x6E\x63\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x6E\x64\x72\x65\x61\x2E\x62\x69\x61\x6E\x63\x6F","\x4D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x20\x42\x75\x6E\x67\x61\x72\x6F","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F","\x56\x61\x6C\x65\x72\x69\x6F\x20\x43\x69\x6F\x74\x74\x61","\x76\x61\x6C\x65\x72\x69\x6F\x2E\x63\x69\x6F\x74\x74\x61\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x76\x61\x6C\x65\x72\x69\x6F\x2E\x63\x69\x6F\x74\x74\x61","\x61\x64\x6D\x69\x6E","\x43\x6C\x61\x72\x6F\x74\x65\x63\x68","\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x63\x6C\x61\x72\x6F\x74\x65\x63\x68","\x41\x62\x69\x67\x61\x65\x6C","\x61\x62\x69\x67\x61\x65\x6C\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x62\x69\x67\x61\x65\x6C","\x54\x6F\x6E\x79\x20\x52\x75\x73\x73\x65\x6C\x6C","\x74\x6F\x6E\x79\x72\x40\x78\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x2E\x63\x6F\x2E\x7A\x61","\x74\x6F\x6E\x79\x2E\x72\x75\x73\x73\x65\x6C\x6C","\x43\x6F\x6C\x69\x6E\x20\x46\x61\x69\x72","\x63\x6F\x6C\x69\x6E\x66\x40\x78\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x2E\x63\x6F\x2E\x7A\x61","\x63\x6F\x6C\x69\x6E\x2E\x66\x61\x69\x72","\x44\x69\x65\x67\x6F\x20\x47\x6F\x73\x6D\x61\x72","\x64\x69\x65\x67\x6F\x2E\x67\x6F\x73\x6D\x61\x72\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x69\x65\x67\x6F\x2E\x67\x6F\x73\x6D\x61\x72","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x49\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x69\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x69\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F","\x75\x70\x64","\x41\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x20\x42\x65\x73\x73\x6F\x6E\x65","\x61\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x2E\x62\x65\x73\x73\x6F\x6E\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x2E\x62\x65\x73\x73\x6F\x6E\x65","\x46\x65\x6C\x69\x63\x65\x20\x42\x72\x69\x73\x63\x65\x73\x65","\x66\x65\x6C\x69\x63\x65\x2E\x62\x72\x69\x73\x63\x65\x73\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x66\x65\x6C\x69\x63\x65\x2E\x62\x72\x69\x73\x63\x65\x73\x65","\x78\x43\x61\x6C\x6C\x79","\x69\x6E\x66\x6F\x2E\x78\x63\x61\x6C\x6C\x79\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x78\x63\x61\x6C\x6C\x79","\x33\x38\x38\x78\x73\x68\x75\x74\x74\x6C\x65\x33\x38\x38","\x4A\x6F\x68\x6E\x20\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x4A\x61\x6E\x65\x20\x4D\x69\x6C\x6C\x65\x72","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x74\x72\x75\x6E\x6B\x73","\x63\x69\x74\x61\x6C\x69\x61","\x66\x72\x69\x65\x6E\x64","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x30\x31\x31\x31\x39\x38\x32\x37\x37\x37\x30","\x54\x21\x4E\x50\x6E\x76\x2D\x71\x6A\x43\x4D\x65\x39\x76","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x69\x74","\x76\x6F\x69\x70\x2E\x65\x75\x74\x65\x6C\x69\x61\x2E\x69\x74","\x72\x66\x63\x32\x38\x33\x33","\x20\x22\x22\x20\x3C\x3E","\x75\x6C\x61\x77\x3B\x61\x6C\x61\x77\x3B\x67\x73\x6D","\x6E\x6F","\x54\x72\x75\x6E\x6B","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73","\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44","\x75\x73\x65\x72\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x55\x53\x45\x52\x53","\x61\x67\x65\x6E\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x47\x45\x4E\x54\x53","\x74\x65\x61\x6D\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x45\x41\x4D\x53","\x63\x68\x61\x74","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x54","\x76\x6F\x69\x63\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45","\x6D\x61\x69\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x41\x49\x4C","\x66\x61\x78","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x46\x41\x58","\x61\x75\x64\x69\x6F","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x55\x44\x49\x4F","\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x41\x4C\x4C\x59\x53\x51\x55\x41\x52\x45","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x4E\x41\x4C\x59\x54\x49\x43\x53","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x41\x4C\x54\x49\x4D\x45","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x53","\x73\x65\x74\x74\x69\x6E\x67\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x45\x54\x54\x49\x4E\x47\x53","\x4D\x6F\x64\x75\x6C\x65","\x63\x61\x74\x63\x68","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x71\x75\x65\x75\x65\x20\x31","\x69\x64","\x6D\x61\x70","\x61\x64\x64\x55\x73\x65\x72\x73","\x54\x31","\x66\x69\x6E\x64\x4F\x6E\x65","\x54\x65\x61\x6D","\x43\x51\x31","\x43\x51\x31\x20\x44\x65\x73\x63","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x63\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x71\x75\x65\x75\x65\x20\x31","\x74\x65\x61\x6D\x20\x66\x6F\x75\x6E\x64","\x74\x65\x73\x74","\x4D\x51\x31","\x4D\x51\x31\x20\x44\x65\x73\x63","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x66\x61\x78\x20\x71\x75\x65\x75\x65\x20\x31","\x46\x51\x31","\x46\x51\x31\x20\x44\x65\x73\x63","\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x44\x65\x66\x61\x75\x6C\x74\x20\x54\x65\x61\x6D","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x73\x65\x72\x76\x65\x72\x20\x69\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x73\x65\x72\x76\x65\x72\x20\x6F\x75\x74","\x73\x6D\x74\x70\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x68\x6F\x6B\x75\x63\x6C\x6F\x6B\x61","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x69\x6D\x61\x70\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x49\x4E\x42\x4F\x58","\x55\x4E\x53\x45\x45\x4E","\x49\x4D\x41\x50","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x78\x43\x61\x6C\x6C\x79\x20\x44\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x66\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74","\x73\x65\x74\x54\x72\x75\x6E\x6B","\x47\x6F\x74\x6F","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78\x2C\x73\x2C\x31","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x31","\x71\x75\x65\x75\x65","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x32","\x46\x41\x31\x20\x44\x65\x73\x63","\x46\x41\x31","\x78\x43\x41\x4C\x4C\x59","\x39\x36\x30\x30","\x31\x34\x34\x30\x30","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x66\x61\x78\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x76\x6F\x69\x63\x65\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73","\x4E\x6F\x4F\x70","\x46\x61\x78\x20\x55\x55\x49\x44\x3A\x20\x24\x7B\x46\x41\x58\x55\x55\x49\x44\x7D","\x55\x73\x65\x72\x45\x76\x65\x6E\x74","\x46\x61\x78\x2C\x75\x75\x69\x64\x3A\x20\x24\x7B\x46\x41\x58\x55\x55\x49\x44\x7D","\x53\x65\x74","\x46\x41\x58\x4F\x50\x54\x28\x66\x69\x6C\x65\x6E\x61\x6D\x65\x29\x3A\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3A\x24\x7B\x45\x43\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3A\x24\x7B\x46\x41\x58\x48\x45\x41\x44\x45\x52\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3A\x24\x7B\x4C\x4F\x43\x41\x4C\x49\x44\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3A\x24\x7B\x4D\x41\x58\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3A\x24\x7B\x4D\x49\x4E\x52\x41\x54\x45\x7D","\x53\x65\x6E\x64\x46\x41\x58","\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D\x2C\x64","\x45\x52\x52\x4F\x52\x20\x22\x24\x7B\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x7D\x22\x20\x22\x4E\x4F\x5F\x53\x54\x41\x54\x55\x53\x22\x20\x22\x4E\x4F\x5F\x50\x41\x47\x45\x53\x22","\x68","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x7D","\x46\x61\x78\x53\x74\x61\x74\x75\x73\x20\x3A\x20\x24\x7B\x46\x41\x58\x53\x54\x41\x54\x55\x53\x7D","\x46\x61\x78\x53\x74\x61\x74\x75\x73\x53\x74\x72\x69\x6E\x67\x20\x3A\x20\x24\x7B\x46\x41\x58\x53\x54\x41\x54\x55\x53\x53\x54\x52\x49\x4E\x47\x7D","\x46\x61\x78\x45\x72\x72\x6F\x72\x20\x3A\x20\x24\x7B\x46\x41\x58\x45\x52\x52\x4F\x52\x7D","\x52\x65\x6D\x6F\x74\x65\x53\x74\x61\x74\x69\x6F\x6E\x49\x44\x20\x3A\x20\x24\x7B\x52\x45\x4D\x4F\x54\x45\x53\x54\x41\x54\x49\x4F\x4E\x49\x44\x7D","\x46\x61\x78\x50\x61\x67\x65\x73\x20\x3A\x20\x24\x7B\x46\x41\x58\x50\x41\x47\x45\x53\x7D","\x46\x61\x78\x42\x69\x74\x52\x61\x74\x65\x20\x3A\x20\x24\x7B\x46\x41\x58\x42\x49\x54\x52\x41\x54\x45\x7D","\x46\x61\x78\x52\x65\x73\x6F\x6C\x75\x74\x69\x6F\x6E\x20\x3A\x20\x24\x7B\x46\x41\x58\x52\x45\x53\x4F\x4C\x55\x54\x49\x4F\x4E\x7D","\x4F\x4B\x20\x22\x24\x7B\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x7D\x22\x20\x22\x24\x7B\x46\x41\x58\x53\x54\x41\x54\x55\x53\x53\x54\x52\x49\x4E\x47\x7D\x22\x20\x22\x24\x7B\x46\x41\x58\x50\x41\x47\x45\x53\x7D\x22","\x2A\x2A\x2A\x2A\x20\x46\x41\x58\x20\x52\x45\x43\x45\x49\x56\x45\x44\x20\x66\x72\x6F\x6D\x20\x24\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D\x20\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x24\x7B\x45\x50\x4F\x43\x48\x7D\x2C\x2C\x25\x63\x29\x7D\x20\x2A\x2A\x2A\x2A","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3A\x79\x65\x73","\x46\x49\x4C\x45\x4E\x41\x4D\x45\x3A\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D","\x46\x41\x58\x46\x49\x4C\x45\x3A\x24\x7B\x46\x49\x4C\x45\x4E\x41\x4D\x45\x7D\x2E\x74\x69\x66","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3A\x52\x65\x63\x65\x69\x76\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x24\x7B\x45\x50\x4F\x43\x48\x7D\x2C\x2C\x25\x59\x2D\x25\x6D\x2D\x25\x64\x20\x25\x48\x3A\x25\x4D\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x7D","\x2A\x2A\x2A\x2A\x20\x52\x45\x43\x45\x49\x56\x49\x4E\x47\x20\x46\x41\x58\x20\x3A\x20\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D\x20\x2A\x2A\x2A\x2A","\x52\x65\x63\x65\x69\x76\x65\x46\x61\x78","\x2F\x74\x6D\x70\x2F\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D","\x48\x61\x6E\x67\x75\x70","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x73\x71\x75\x61\x72\x65\x20\x70\x72\x6F\x6A\x65\x63\x74\x73","\x70\x72\x6F\x6A\x65\x63\x74\x31","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x70\x72\x6F\x6A\x65\x63\x74","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x78\x43\x61\x6C\x6C\x79\x20\x53\x68\x6F\x70","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x73\x68\x6F\x70\x2F","\x23\x66\x35\x31\x31\x31\x31","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x73\x71\x75\x61\x72\x65\x64","\x57\x65\x20\x61\x72\x65\x20\x68\x65\x72\x65\x21","\x51\x75\x65\x73\x74\x69\x6F\x6E\x73\x3F\x20\x49\x6E\x73\x65\x72\x74\x20\x79\x6F\x75\x72\x20\x6E\x61\x6D\x65\x20\x61\x6E\x64\x20\x65\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73\x20\x74\x6F\x20\x73\x74\x61\x72\x74\x20\x61\x20\x6C\x69\x76\x65\x2D\x63\x68\x61\x74\x20\x77\x69\x74\x68\x20\x6F\x75\x72\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x74\x65\x61\x6D\x2E","\x59\x6F\x75\x72\x20\x6E\x61\x6D\x65","\x59\x6F\x75\x72\x20\x65\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73","\x43\x68\x61\x74","\x43\x6F\x6E\x74\x61\x63\x74\x20\x75\x73","\x3C\x73\x74\x72\x6F\x6E\x67\x3E\x57\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x6F\x6E\x6C\x69\x6E\x65\x2E\x3C\x2F\x73\x74\x72\x6F\x6E\x67\x3E\x3C\x62\x72\x20\x2F\x3E\x49\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x6D\x65\x61\x6E\x20\x77\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x74\x68\x65\x72\x65\x20\x74\x6F\x20\x68\x65\x6C\x70\x20\x2D\x20\x6C\x65\x61\x76\x65\x20\x79\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x62\x65\x6C\x6F\x77\x20\x61\x6E\x64\x20\x77\x65\x27\x6C\x6C\x20\x62\x65\x20\x69\x6E\x20\x74\x6F\x75\x63\x68\x20\x61\x73\x20\x73\x6F\x6F\x6E\x20\x61\x73\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E\x27","\x59\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x4C\x65\x61\x76\x65\x20\x6D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x31","\x56\x61\x72\x69\x61\x62\x6C\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x68\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x66\x69\x6C\x65\x73","\x76\x61\x72\x2F\x6C\x69\x62\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x68","\x61\x6C\x70\x68\x61","\x77\x61\x76","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67\x73","\x4D\x6F\x74\x69\x6F\x6E\x20\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6C\x6F\x63\x6B","\x43\x6C\x6F\x63\x6B","\x68\x68\x3A\x6D\x6D\x3A\x73\x73\x20\x61","\x64\x64\x64\x64\x2C\x20\x4D\x4D\x4D\x4D\x20\x44\x6F\x20\x59\x59\x59\x59","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x69\x66\x72\x61\x6D\x65","\x49\x66\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x65\x6D\x6F\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x73\x68\x6F\x70\x2F","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x65\x6E\x64\x65\x73\x6B","\x31\x2E\x30\x2E\x30","\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x73\x2E\x72\x2E\x6C\x2E","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x7A\x65\x6E\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x5A\x65\x6E\x64\x65\x73\x6B","\x44\x65\x73\x6B\x2E\x63\x6F\x6D","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x44\x65\x73\x6B\x2E\x63\x6F\x6D","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x32\x2E\x70\x6E\x67","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x46\x72\x65\x73\x68\x64\x65\x73\x6B","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2E\x70\x6E\x67","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x46\x72\x65\x73\x68\x64\x65\x73\x6B","\x53\x75\x67\x61\x72\x43\x52\x4D","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x32\x2E\x70\x6E\x67","\x73\x75\x67\x61\x72\x63\x72\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x53\x75\x67\x61\x72\x43\x52\x4D","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x6F\x74\x69\x6F\x6E\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x72\x6F\x63\x6B\x65\x74\x22\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x42\x61\x73\x69\x63\x20\x4E\x6F\x64\x65\x22\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x7D\x5D","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x75\x73\x74\x6F\x6D\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x42\x61\x73\x69\x63\x20\x4E\x6F\x64\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x4D\x6F\x74\x69\x6F\x6E\x20\x53\x65\x72\x76\x69\x63\x65","\x53\x65\x72\x76\x69\x63\x65"];_0x6b49[0];var _=require(_0x6b49[1]);var models=require(_0x6b49[2]);models[_0x6b49[69]][_0x6b49[68]]([{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[8],email:_0x6b49[9],name:_0x6b49[10],password:_0x6b49[11],defaultuser:_0x6b49[10],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1000},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[20],email:_0x6b49[21],name:_0x6b49[22],password:_0x6b49[11],defaultuser:_0x6b49[22],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1001},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[23],email:_0x6b49[24],name:_0x6b49[25],password:_0x6b49[11],defaultuser:_0x6b49[25],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1002},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[26],email:_0x6b49[27],name:_0x6b49[28],password:_0x6b49[11],defaultuser:_0x6b49[28],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1003},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[29],email:_0x6b49[30],name:_0x6b49[31],password:_0x6b49[11],defaultuser:_0x6b49[31],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1004},{provider:_0x6b49[6],role:_0x6b49[32],fullname:_0x6b49[33],email:_0x6b49[34],name:_0x6b49[35],password:_0x6b49[35],defaultuser:_0x6b49[35],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1005},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[36],email:_0x6b49[37],name:_0x6b49[38],password:_0x6b49[11],defaultuser:_0x6b49[38],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1006},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[39],email:_0x6b49[40],name:_0x6b49[41],password:_0x6b49[35],defaultuser:_0x6b49[41],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1007},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[42],email:_0x6b49[43],name:_0x6b49[44],password:_0x6b49[35],defaultuser:_0x6b49[44],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1008},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[45],email:_0x6b49[46],name:_0x6b49[47],password:_0x6b49[11],defaultuser:_0x6b49[47],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1009},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[48],email:_0x6b49[49],name:_0x6b49[50],password:_0x6b49[11],defaultuser:_0x6b49[50],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[51],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1010},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[52],email:_0x6b49[53],name:_0x6b49[54],password:_0x6b49[11],defaultuser:_0x6b49[54],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[51],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1011},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[55],email:_0x6b49[56],name:_0x6b49[57],password:_0x6b49[11],defaultuser:_0x6b49[57],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[51],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1012},{provider:_0x6b49[6],role:_0x6b49[32],fullname:_0x6b49[58],email:_0x6b49[59],name:_0x6b49[60],password:_0x6b49[61],defaultuser:_0x6b49[60],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1013},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[62],email:_0x6b49[63],name:_0x6b49[64],password:_0x6b49[11],defaultuser:_0x6b49[64],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1014},{provider:_0x6b49[6],role:_0x6b49[7],fullname:_0x6b49[65],email:_0x6b49[66],name:_0x6b49[67],password:_0x6b49[11],defaultuser:_0x6b49[67],host:_0x6b49[12],type:_0x6b49[13],transport:_0x6b49[14],allow:_0x6b49[15],qualify:_0x6b49[16],nat:_0x6b49[17],disallow:_0x6b49[18],context:_0x6b49[19],internal:1015}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[3])});models[_0x6b49[83]][_0x6b49[68]]([{name:_0x6b49[71],type:_0x6b49[72],insecure:_0x6b49[73],defaultuser:_0x6b49[74],secret:_0x6b49[75],password:_0x6b49[75],context:_0x6b49[76],language:_0x6b49[77],host:_0x6b49[78],fromdomain:_0x6b49[78],dtmfmode:_0x6b49[79],qualify:_0x6b49[16],nat:_0x6b49[17],callerid:_0x6b49[80],limitonpeers:_0x6b49[16],callcounter:_0x6b49[16],disallow:_0x6b49[18],allow:_0x6b49[81],canreinvite:_0x6b49[82],directmedia:_0x6b49[82]}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[70])});models[_0x6b49[113]][_0x6b49[68]]([{name:_0x6b49[85],title:_0x6b49[86]},{name:_0x6b49[87],title:_0x6b49[88]},{name:_0x6b49[89],title:_0x6b49[90]},{name:_0x6b49[91],title:_0x6b49[92]},{name:_0x6b49[93],title:_0x6b49[94]},{name:_0x6b49[95],title:_0x6b49[96]},{name:_0x6b49[97],title:_0x6b49[98]},{name:_0x6b49[99],title:_0x6b49[100]},{name:_0x6b49[101],title:_0x6b49[102]},{name:_0x6b49[103],title:_0x6b49[104]},{name:_0x6b49[105],title:_0x6b49[106]},{name:_0x6b49[107],title:_0x6b49[108]},{name:_0x6b49[109],title:_0x6b49[110]},{name:_0x6b49[111],title:_0x6b49[112]}],{ignoreDuplicates:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[84])});models[_0x6b49[121]][_0x6b49[125]]({name:_0x6b49[119],description:_0x6b49[138],defaultEntry:true})[_0x6b49[5]](function(_0xf810x4){models[_0x6b49[69]][_0x6b49[137]]({where:{role:_0x6b49[7]}})[_0x6b49[5]](function(_0xf810x5){_0xf810x4[_0x6b49[118]](_[_0x6b49[117]](_0xf810x5,_0x6b49[116]))[_0x6b49[5]](function(){models[_0x6b49[126]][_0x6b49[125]]({name:_0x6b49[122],description:_0x6b49[123],timeout:5,strategy:_0x6b49[124]})[_0x6b49[5]](function(_0xf810x6){console[_0x6b49[4]](_0x6b49[115]);models[_0x6b49[121]][_0x6b49[120]]({where:{name:_0x6b49[119]},include:[{all:true}]})[_0x6b49[5]](function(_0xf810x4){_0xf810x6[_0x6b49[118]](_[_0x6b49[117]](_0xf810x4.Users,_0x6b49[116]))[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){})});models[_0x6b49[132]][_0x6b49[125]]({name:_0x6b49[130],description:_0x6b49[131],timeout:5,strategy:_0x6b49[124]})[_0x6b49[5]](function(_0xf810x7){console[_0x6b49[4]](_0x6b49[127]);models[_0x6b49[121]][_0x6b49[120]]({where:{name:_0x6b49[119]},include:[{all:true}]})[_0x6b49[5]](function(_0xf810x4){if(_0xf810x4){console[_0x6b49[4]](_0x6b49[128])}else {console[_0x6b49[4]](_0x6b49[129])};_0xf810x7[_0x6b49[118]](_[_0x6b49[117]](_0xf810x4.Users,_0x6b49[116]))[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){})});models[_0x6b49[136]][_0x6b49[125]]({name:_0x6b49[134],description:_0x6b49[135],timeout:5,strategy:_0x6b49[124]})[_0x6b49[5]](function(_0xf810x8){console[_0x6b49[4]](_0x6b49[133]);models[_0x6b49[121]][_0x6b49[120]]({where:{name:_0x6b49[119]},include:[{all:true}]})[_0x6b49[5]](function(_0xf810x4){_0xf810x8[_0x6b49[118]](_[_0x6b49[117]](_0xf810x4.Users,_0x6b49[116]))[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){})})})[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){});models[_0x6b49[152]][_0x6b49[125]]({name:_0x6b49[151],description:_0x6b49[151],address:_0x6b49[143]})[_0x6b49[5]](function(_0xf810x9){console[_0x6b49[4]](_0x6b49[139]);models[_0x6b49[150]][_0x6b49[125]]({description:_0x6b49[60],host:_0x6b49[146],username:_0x6b49[143],password:_0x6b49[144],port:143,mailbox:_0x6b49[147],ssl:false,delete:false,filter:_0x6b49[148],protocol:_0x6b49[149],MailAccountId:_0xf810x9[_0x6b49[116]]})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[140]);models[_0x6b49[145]][_0x6b49[125]]({description:_0x6b49[60],host:_0x6b49[142],username:_0x6b49[143],password:_0x6b49[144],port:587,ssl:false,MailAccountId:_0xf810x9[_0x6b49[116]]})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[141])})[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){})});models[_0x6b49[168]][_0x6b49[125]]({description:_0x6b49[163],name:_0x6b49[164],phone:_0x6b49[74],ecm:true,faxheader:_0x6b49[165],localid:_0x6b49[74],maxrate:_0x6b49[166],minrate:_0x6b49[167]})[_0x6b49[5]](function(_0xf810xa){console[_0x6b49[4]](_0x6b49[153]);models[_0x6b49[83]][_0x6b49[120]]({where:{name:_0x6b49[71]}})[_0x6b49[5]](function(_0xf810xb){_0xf810xa[_0x6b49[154]](_0xf810xb)[_0x6b49[114]](function(_0xf810x3){});models[_0x6b49[158]][_0x6b49[125]]({context:_0x6b49[76],exten:_0x6b49[74],priority:1,app:_0x6b49[155],appdata:_0x6b49[156],type:_0x6b49[157]})})[_0x6b49[114]](function(_0xf810x3){});models[_0x6b49[136]][_0x6b49[137]]()[_0x6b49[5]](function(_0xf810xc){models[_0x6b49[161]][_0x6b49[125]]({app:_0x6b49[160],appdata:_0xf810xc[0][_0x6b49[116]],priority:1,timeout:30,FaxAccountId:_0xf810xa[_0x6b49[116]],FaxQueueId:_0xf810xc[0][_0x6b49[116]]})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[159])})[_0x6b49[114]](function(_0xf810x3){});models[_0x6b49[161]][_0x6b49[125]]({app:_0x6b49[160],appdata:_0xf810xc[1][_0x6b49[116]],priority:2,timeout:30,FaxAccountId:_0xf810xa[_0x6b49[116]],FaxQueueId:_0xf810xc[1][_0x6b49[116]]})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[162])})[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){});models[_0x6b49[158]][_0x6b49[68]]([{context:_0x6b49[170],exten:_0x6b49[171],priority:1,app:_0x6b49[172],appdata:_0x6b49[173],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:2,app:_0x6b49[174],appdata:_0x6b49[175],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:3,app:_0x6b49[176],appdata:_0x6b49[177],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:4,app:_0x6b49[176],appdata:_0x6b49[178],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:5,app:_0x6b49[176],appdata:_0x6b49[179],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:6,app:_0x6b49[176],appdata:_0x6b49[180],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:7,app:_0x6b49[176],appdata:_0x6b49[181],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:8,app:_0x6b49[176],appdata:_0x6b49[182],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:9,app:_0x6b49[183],appdata:_0x6b49[184],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[171],priority:10,app:_0x6b49[172],appdata:_0x6b49[185],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:1,app:_0x6b49[172],appdata:_0x6b49[187],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:2,app:_0x6b49[172],appdata:_0x6b49[188],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:3,app:_0x6b49[172],appdata:_0x6b49[189],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:4,app:_0x6b49[172],appdata:_0x6b49[190],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:5,app:_0x6b49[172],appdata:_0x6b49[191],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:6,app:_0x6b49[172],appdata:_0x6b49[192],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:7,app:_0x6b49[172],appdata:_0x6b49[193],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:8,app:_0x6b49[172],appdata:_0x6b49[194],type:_0x6b49[170]},{context:_0x6b49[170],exten:_0x6b49[186],priority:9,app:_0x6b49[172],appdata:_0x6b49[195],type:_0x6b49[170]}],{ignoreDuplicates:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[169])});models[_0x6b49[158]][_0x6b49[68]]([{context:_0x6b49[157],exten:_0x6b49[171],priority:1,app:_0x6b49[172],appdata:_0x6b49[196],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:2,app:_0x6b49[176],appdata:_0x6b49[197],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:3,app:_0x6b49[176],appdata:_0x6b49[198],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:4,app:_0x6b49[176],appdata:_0x6b49[199],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:5,app:_0x6b49[176],appdata:_0x6b49[200],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:6,app:_0x6b49[176],appdata:_0x6b49[180],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:7,app:_0x6b49[176],appdata:_0x6b49[181],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:8,app:_0x6b49[176],appdata:_0x6b49[182],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:9,app:_0x6b49[172],appdata:_0x6b49[187],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:10,app:_0x6b49[172],appdata:_0x6b49[201],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:11,app:_0x6b49[172],appdata:_0x6b49[202],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:12,app:_0x6b49[172],appdata:_0x6b49[203],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:13,app:_0x6b49[172],appdata:_0x6b49[204],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:14,app:_0x6b49[172],appdata:_0x6b49[205],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:15,app:_0x6b49[206],appdata:_0x6b49[207],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[171],priority:16,app:_0x6b49[208],type:_0x6b49[157]},{context:_0x6b49[157],exten:_0x6b49[186],priority:1,app:_0x6b49[172],appdata:_0x6b49[187],type:_0x6b49[157]}],{ignoreDuplicates:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[169])});models[_0x6b49[212]][_0x6b49[68]]([{name:_0x6b49[210],description:_0x6b49[211]}],{ignoreDuplicates:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[209])});models[_0x6b49[229]][_0x6b49[125]]({name:_0x6b49[215],description:_0x6b49[215],address:_0x6b49[216],color:_0x6b49[217],color_focus:_0x6b49[217],color_button:_0x6b49[217],remote:_0x6b49[218],animation:true,header_shape:_0x6b49[219],header_online:_0x6b49[220],online_message:_0x6b49[221],username_placeholder:_0x6b49[222],email_placeholder:_0x6b49[223],start_chat_button:_0x6b49[224],header_offline:_0x6b49[225],offline_message:_0x6b49[226],enquiry_message_placeholder:_0x6b49[227],enquiry_button:_0x6b49[228],download_transcript:true})[_0x6b49[5]](function(_0xf810xd){console[_0x6b49[4]](_0x6b49[213]);models[_0x6b49[126]][_0x6b49[137]]()[_0x6b49[5]](function(_0xf810xe){models[_0x6b49[214]][_0x6b49[125]]({app:_0x6b49[160],appdata:_0xf810xe[0][_0x6b49[116]],priority:1,timeout:30,ChatWebsiteId:_0xf810xd[_0x6b49[116]],ChatQueueId:_0xf810xe[0][_0x6b49[116]]})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[159])})[_0x6b49[114]](function(_0xf810x3){});models[_0x6b49[214]][_0x6b49[125]]({app:_0x6b49[160],appdata:_0xf810xe[1][_0x6b49[116]],priority:2,timeout:30,ChatWebsiteId:_0xf810xd[_0x6b49[116]],ChatQueueId:_0xf810xe[1][_0x6b49[116]]})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[162])})[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){})})[_0x6b49[114]](function(_0xf810x3){});models[_0x6b49[232]][_0x6b49[68]]([{name:_0x6b49[231],description:_0x6b49[211]}],{ignoreDuplicates:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[230])});models[_0x6b49[236]][_0x6b49[68]]([{name:_0x6b49[19],description:_0x6b49[234],defaultEntry:true},{name:_0x6b49[76],description:_0x6b49[234],defaultEntry:true},{name:_0x6b49[157],description:_0x6b49[234],defaultEntry:true},{name:_0x6b49[170],description:_0x6b49[234],defaultEntry:true},{name:_0x6b49[235],description:_0x6b49[234],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[233])});models[_0x6b49[243]][_0x6b49[68]]([{name:_0x6b49[238],mode:_0x6b49[239],directory:_0x6b49[240],sort:_0x6b49[241],format:_0x6b49[242],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[237])});models[_0x6b49[245]][_0x6b49[68]]([{id:1,min_internal:1000,soundPath:_0x6b49[244]}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[237])});models[_0x6b49[257]][_0x6b49[68]]([{id:1,name:_0x6b49[246],model:JSON[_0x6b49[256]]({title:_0x6b49[246],rows:[{columns:[{styleClass:_0x6b49[247],widgets:[{type:_0x6b49[248],title:_0x6b49[249],config:{timePattern:_0x6b49[250],datePattern:_0x6b49[251]}}]},{styleClass:_0x6b49[252],widgets:[{type:_0x6b49[253],title:_0x6b49[254],config:{url:_0x6b49[255]}}]}]}]}),defaultEntry:true,editable:false}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[237])});models[_0x6b49[281]][_0x6b49[68]]([{name:_0x6b49[259],version:_0x6b49[260],active:false,author:_0x6b49[261],logo:_0x6b49[262],state:_0x6b49[263],description:_0x6b49[264]},{name:_0x6b49[265],version:_0x6b49[260],active:false,author:_0x6b49[261],logo:_0x6b49[266],state:_0x6b49[267],description:_0x6b49[268]},{name:_0x6b49[269],version:_0x6b49[260],active:false,author:_0x6b49[261],logo:_0x6b49[270],state:_0x6b49[271],description:_0x6b49[272]},{name:_0x6b49[273],version:_0x6b49[260],active:false,author:_0x6b49[261],logo:_0x6b49[274],state:_0x6b49[275],description:_0x6b49[276]},{name:_0x6b49[277],version:_0x6b49[260],active:false,author:_0x6b49[261],logo:_0x6b49[278],state:_0x6b49[279],description:_0x6b49[280]}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[258])});models[_0x6b49[284]][_0x6b49[68]]([{id:1,tree:_0x6b49[282]},{id:2,tree:_0x6b49[283]}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[258])});models[_0x6b49[286]][_0x6b49[68]]([{id:1,name:_0x6b49[285],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x6b49[5]](function(){console[_0x6b49[4]](_0x6b49[258])})
\ No newline at end of file
+/**
+ * Populate DB with sample data on server start
+ * to disable, edit config/environment/index.js, and set `seedDB: false`
+ */
+
+'use strict';
+
+var _ = require('lodash');
+var models = require('../models');
+
+models.User
+  .bulkCreate([{
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Giuseppe Careri',
+    email: 'giuseppe.careri@xcally.com',
+    name: 'giuseppe.careri',
+    password: '75xcally75',
+    defaultuser: 'giuseppe.careri',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1000
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Daniele Cinti',
+    email: 'daniele.cinti@xcally.com',
+    name: 'daniele.cinti',
+    password: '75xcally75',
+    defaultuser: 'daniele.cinti',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1001
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Andrea Bianco',
+    email: 'andrea.bianco@xcally.com',
+    name: 'andrea.bianco',
+    password: '75xcally75',
+    defaultuser: 'andrea.bianco',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1002
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Massimiliano Bungaro',
+    email: 'massimiliano.bungaro@xcally.com',
+    name: 'massimiliano.bungaro',
+    password: '75xcally75',
+    defaultuser: 'massimiliano.bungaro',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1003
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Valerio Ciotta',
+    email: 'valerio.ciotta@xcally.com',
+    name: 'valerio.ciotta',
+    password: '75xcally75',
+    defaultuser: 'valerio.ciotta',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1004
+  }, {
+    provider: 'local',
+    role: 'admin',
+    fullname: 'Clarotech',
+    email: 'clarotech@xcally.com',
+    name: 'clarotech',
+    password: 'clarotech',
+    defaultuser: 'clarotech',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1005
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Abigael',
+    email: 'abigael@xcally.com',
+    name: 'abigael',
+    password: '75xcally75',
+    defaultuser: 'abigael',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1006
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Tony Russell',
+    email: 'tonyr@xclarotech.co.za',
+    name: 'tony.russell',
+    password: 'clarotech',
+    defaultuser: 'tony.russell',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1007
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Colin Fair',
+    email: 'colinf@xclarotech.co.za',
+    name: 'colin.fair',
+    password: 'clarotech',
+    defaultuser: 'colin.fair',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1008
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Diego Gosmar',
+    email: 'diego.gosmar@xcally.com',
+    name: 'diego.gosmar',
+    password: '75xcally75',
+    defaultuser: 'diego.gosmar',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1009
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Giuseppe Innamorato',
+    email: 'giuseppe.innamorato@xcally.com',
+    name: 'giuseppe.innamorato',
+    password: '75xcally75',
+    defaultuser: 'giuseppe.innamorato',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'upd',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1010
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Alessandra Bessone',
+    email: 'alessandra.bessone@xcally.com',
+    name: 'alessandra.bessone',
+    password: '75xcally75',
+    defaultuser: 'alessandra.bessone',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'upd',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1011
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Felice Briscese',
+    email: 'felice.briscese@xcally.com',
+    name: 'felice.briscese',
+    password: '75xcally75',
+    defaultuser: 'felice.briscese',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'upd',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1012
+  }, {
+    provider: 'local',
+    role: 'admin',
+    fullname: 'xCally',
+    email: 'info.xcally@xcally.com',
+    name: 'xcally',
+    password: '388xshuttle388',
+    defaultuser: 'xcally',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1013
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'John Doe',
+    email: 'john.doe@gmail.com',
+    name: 'john.doe',
+    password: '75xcally75',
+    defaultuser: 'john.doe',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1014
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Jane Miller',
+    email: 'jane.miller@gmail.com',
+    name: 'jane.miller',
+    password: '75xcally75',
+    defaultuser: 'jane.miller',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1015
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating users');
+  });
+
+models.Trunk
+  .bulkCreate([{
+    name: 'citalia',
+    type: 'friend',
+    insecure: 'port,invite',
+    defaultuser: '01119827770',
+    secret: 'T!NPnv-qjCMe9v',
+    password: 'T!NPnv-qjCMe9v',
+    context: 'from-voip-provider',
+    language: 'it',
+    host: 'voip.eutelia.it',
+    fromdomain: 'voip.eutelia.it',
+    dtmfmode: 'rfc2833',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    callerid: ' "" <>',
+    limitonpeers: 'yes',
+    callcounter: 'yes',
+    disallow: 'all',
+    allow: 'ulaw;alaw;gsm',
+    canreinvite: 'no',
+    directmedia: 'no'
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating trunks');
+  });
+
+
+// Init modules table
+models.Module
+  .bulkCreate([{
+    name: "dashboard",
+    title: "APPLICATION_DASHBOARD"
+  }, {
+    name: "users",
+    title: "APPLICATION_USERS"
+  }, {
+    name: "agents",
+    title: "APPLICATION_AGENTS"
+  }, {
+    name: "teams",
+    title: "APPLICATION_TEAMS"
+  }, {
+    name: "chat",
+    title: "APPLICATION_CHAT"
+  }, {
+    name: "voice",
+    title: "APPLICATION_VOICE"
+  }, {
+    name: "mail",
+    title: "APPLICATION_MAIL"
+  }, {
+    name: "fax",
+    title: "APPLICATION_FAX"
+  }, {
+    name: "audio",
+    title: "APPLICATION_AUDIO"
+  }, {
+    name: "callysquare",
+    title: "APPLICATION_CALLYSQUARE"
+  }, {
+    name: "analytics",
+    title: "APPLICATION_ANALYTICS"
+  }, {
+    name: "realtime",
+    title: "APPLICATION_REALTIME"
+  }, {
+    name: "voicemails",
+    title: "APPLICATION_VOICEMAILS"
+  }, {
+    name: "settings",
+    title: "APPLICATION_SETTINGS"
+  }], {
+    ignoreDuplicates: true
+  }).then(function() {
+    console.log('Finished populating modules');
+  });
+
+models.Team
+  .create({
+    name: "T1",
+    description: "Default Team",
+    defaultEntry: true
+  })
+  .then(function(team) {
+
+    models.User
+      .findAll({
+        where: {
+          role: 'agent'
+        }
+      })
+      .then(function(users) {
+        team
+          .addUsers(_.map(users, 'id'))
+          .then(function() {
+            models.ChatQueue
+              .create({
+                name: "CQ1",
+                description: "CQ1 Desc",
+                timeout: 5,
+                strategy: "rrmemory"
+              })
+              .then(function(chatQueue) {
+                console.log('Finished populating chat queue 1');
+
+                models.Team
+                  .findOne({
+                    where: {
+                      name: 'T1'
+                    },
+                    include: [{
+                      all: true
+                    }]
+                  })
+                  .then(function(team) {
+                    chatQueue
+                      .addUsers(_.map(team.Users, 'id'))
+                      .catch(function(err) {
+                        // console.error(err);
+                      });
+                  })
+                  .catch(function(err) {
+                    // console.error(err);
+                  });
+              });
+
+            models.MailQueue
+              .create({
+                name: "MQ1",
+                description: "MQ1 Desc",
+                timeout: 5,
+                strategy: "rrmemory"
+              })
+              .then(function(mailQueue) {
+                console.log('Finished populating mail queue 1');
+
+                models.Team
+                  .findOne({
+                    where: {
+                      name: 'T1'
+                    },
+                    include: [{
+                      all: true
+                    }]
+                  })
+                  .then(function(team) {
+                    if (team) {
+                      console.log('team found');
+                    } else {
+                      console.log('test');
+                    }
+                    mailQueue
+                      .addUsers(_.map(team.Users, 'id'))
+                      .catch(function(err) {
+                        // console.error(err);
+                      });
+                  })
+                  .catch(function(err) {
+                    // console.error(err);
+                  });
+              });
+
+            models.FaxQueue
+              .create({
+                name: "FQ1",
+                description: "FQ1 Desc",
+                timeout: 5,
+                strategy: "rrmemory"
+              })
+              .then(function(faxQueue) {
+                console.log('Finished populating fax queue 1');
+
+                models.Team
+                  .findOne({
+                    where: {
+                      name: 'T1'
+                    },
+                    include: [{
+                      all: true
+                    }]
+                  })
+                  .then(function(team) {
+                    faxQueue
+                      .addUsers(_.map(team.Users, 'id'))
+                      .catch(function(err) {
+                        // console.error(err);
+                      });
+                  })
+                  .catch(function(err) {
+                    // console.error(err);
+                  });
+              });
+          })
+          .catch(function(err) {
+            // console.error(err);
+          });
+      })
+      .catch(function(err) {
+        // console.error(err);
+      });
+  })
+  .catch(function(err) {
+    // console.error(err);
+  });
+
+models.MailAccount
+  .create({
+    name: "xCally Development",
+    description: "xCally Development",
+    address: "development@xcally.com"
+  })
+  .then(function(mailAccount) {
+    console.log('Finished populating mail account');
+    models.MailServerIn
+      .create({
+        description: 'xcally',
+        host: 'imap.xcally.com',
+        username: 'development@xcally.com',
+        password: 'phokucloka',
+        port: 143,
+        mailbox: 'INBOX',
+        ssl: false,
+        delete: false,
+        filter: 'UNSEEN',
+        protocol: 'IMAP',
+        MailAccountId: mailAccount.id
+      })
+      .then(function() {
+        console.log('Finished populating mail server in');
+        models.MailServerOut
+          .create({
+            description: 'xcally',
+            host: 'smtp.xcally.com',
+            username: 'development@xcally.com',
+            password: 'phokucloka',
+            port: 587,
+            ssl: false,
+            MailAccountId: mailAccount.id
+          })
+          .then(function() {
+            console.log('Finished populating mail server out');
+          })
+          .catch(function(err) {
+            // console.error(err);
+          });
+      })
+      .catch(function(err) {
+        // console.error(err);
+      });
+  });
+
+models.FaxAccount
+  .create({
+    description: 'FA1 Desc',
+    name: 'FA1',
+    phone: '01119827770',
+    ecm: true,
+    faxheader: 'xCALLY',
+    localid: '01119827770',
+    maxrate: '9600',
+    minrate: '14400',
+  })
+  .then(function(faxAccount) {
+    console.log('Finished populating fax account');
+
+    models.Trunk
+      .findOne({
+        where: {
+          name: 'citalia'
+        }
+      })
+      .then(function(trunk) {
+        faxAccount
+          .setTrunk(trunk)
+          .catch(function(err) {
+            // console.error(err);
+          });
+
+
+        models.VoiceExtension
+          .create({
+            context: 'from-voip-provider',
+            exten: '01119827770',
+            priority: 1,
+            app: 'Goto',
+            appdata: 'inbound-fax,s,1',
+            type: 'inbound-fax'
+          })
+
+      })
+      .catch(function(err) {
+        // console.error(err);
+      });
+
+    models.FaxQueue
+      .findAll()
+      .then(function(faxQueues) {
+        models.FaxApplication
+          .create({
+            app: 'queue',
+            appdata: faxQueues[0].id,
+            priority: 1,
+            timeout: 30,
+            FaxAccountId: faxAccount.id,
+            FaxQueueId: faxQueues[0].id
+          })
+          .then(function() {
+            console.log('Finished populating chat website application 1');
+          })
+          .catch(function(err) {
+            // console.error(err);
+          });
+
+        models.FaxApplication
+          .create({
+            app: 'queue',
+            appdata: faxQueues[1].id,
+            priority: 2,
+            timeout: 30,
+            FaxAccountId: faxAccount.id,
+            FaxQueueId: faxQueues[1].id
+          })
+          .then(function() {
+            console.log('Finished populating chat website application 2');
+          })
+          .catch(function(err) {
+            // console.error(err);
+          });
+      })
+      .catch(function(err) {
+        // console.error(err);
+      });
+  })
+  .catch(function(err) {
+    // console.error(err);
+  });
+// models.FaxAccount
+//   .create({
+//     description: 'FA1 Desc',
+//     name: 'FA1',
+//     phone: '01119827770',
+//     ecm: true,
+//     faxheader: 'xCALLY',
+//     localid: '01119827770',
+//     maxrate: '9600',
+//     minrate: '14400',
+//   })
+//   .then(function (faxAccount) {
+//     console.log('Finished populating fax account');
+//
+//     models.Trunk
+//       .findOne({
+//         where: {
+//           name: 'citalia'
+//         }
+//       })
+//       .then(function (trunk) {
+//         faxAccount
+//           .setTrunk(trunk)
+//           .catch(function (err) {
+//             // console.error(err);
+//           });
+//
+//
+//         models.VoiceExtension
+//           .create({
+//             context: 'from-voip-provider',
+//             exten: '01119827770',
+//             priority: 1,
+//             app: 'Goto',
+//             appdata: 'inbound-fax,s,1',
+//             type: 'inbound-fax',
+//             TrunkId: trunk.name
+//           })
+//
+//       })
+//       .catch(function (err) {
+//         // console.error(err);
+//       });
+//
+//     models.FaxQueue
+//       .findAll()
+//       .then(function (faxQueues) {
+//         models.FaxApplication
+//           .create({
+//             app: 'queue',
+//             appdata: faxQueues[0].id,
+//             priority: 1,
+//             timeout: 30,
+//             FaxAccountId: faxAccount.id,
+//             FaxQueueId: faxQueues[0].id
+//           })
+//           .then(function () {
+//             console.log('Finished populating chat website application 1');
+//           })
+//           .catch(function (err) {
+//             // console.error(err);
+//           });
+//
+//         models.FaxApplication
+//           .create({
+//             app: 'queue',
+//             appdata: faxQueues[1].id,
+//             priority: 2,
+//             timeout: 30,
+//             FaxAccountId: faxAccount.id,
+//             FaxQueueId: faxQueues[1].id
+//           })
+//           .then(function () {
+//             console.log('Finished populating chat website application 2');
+//           })
+//           .catch(function (err) {
+//             // console.error(err);
+//           });
+//       })
+//       .catch(function (err) {
+//         // console.error(err);
+//       });
+//   })
+//   .catch(function (err) {
+//     // console.error(err);
+//   });
+
+models.VoiceExtension
+  .bulkCreate([{
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 1,
+    app: 'NoOp',
+    appdata: 'Fax UUID: ${FAXUUID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 2,
+    app: 'UserEvent',
+    appdata: 'Fax,uuid: ${FAXUUID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 3,
+    app: 'Set',
+    appdata: 'FAXOPT(filename):${FAXFILE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 4,
+    app: 'Set',
+    appdata: 'FAXOPT(ecm):${ECM}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 5,
+    app: 'Set',
+    appdata: 'FAXOPT(headerinfo):${FAXHEADER}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 6,
+    app: 'Set',
+    appdata: 'FAXOPT(localstationid):${LOCALID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 7,
+    app: 'Set',
+    appdata: 'FAXOPT(maxrate):${MAXRATE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 8,
+    app: 'Set',
+    appdata: 'FAXOPT(minrate):${MINRATE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 9,
+    app: 'SendFAX',
+    appdata: '${FAXFILE},d',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 10,
+    app: 'NoOp',
+    appdata: 'ERROR "${TIMESTAMP}" "NO_STATUS" "NO_PAGES"',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 1,
+    app: 'NoOp',
+    appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 2,
+    app: 'NoOp',
+    appdata: 'FaxStatus : ${FAXSTATUS}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 3,
+    app: 'NoOp',
+    appdata: 'FaxStatusString : ${FAXSTATUSSTRING}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 4,
+    app: 'NoOp',
+    appdata: 'FaxError : ${FAXERROR}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 5,
+    app: 'NoOp',
+    appdata: 'RemoteStationID : ${REMOTESTATIONID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 6,
+    app: 'NoOp',
+    appdata: 'FaxPages : ${FAXPAGES}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 7,
+    app: 'NoOp',
+    appdata: 'FaxBitRate : ${FAXBITRATE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 8,
+    app: 'NoOp',
+    appdata: 'FaxResolution : ${FAXRESOLUTION}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 9,
+    app: 'NoOp',
+    appdata: 'OK "${TIMESTAMP}" "${FAXSTATUSSTRING}" "${FAXPAGES}"',
+    type: 'outbound-fax'
+  }], {
+    ignoreDuplicates: true
+  })
+  .then(function() {
+    console.log('Finished populating fax outbound voice extension');
+  });
+
+models.VoiceExtension
+  .bulkCreate([{
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 1,
+    app: 'NoOp',
+    appdata: '**** FAX RECEIVED from ${CALLERID(num)} ${STRFTIME(${EPOCH},,%c)} ****',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 2,
+    app: 'Set',
+    appdata: 'FAXOPT(ecm):yes',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 3,
+    app: 'Set',
+    appdata: 'FILENAME:${UNIQUEID}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 4,
+    app: 'Set',
+    appdata: 'FAXFILE:${FILENAME}.tif',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 5,
+    app: 'Set',
+    appdata: 'FAXOPT(headerinfo):Received by XeniaLAB ${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 6,
+    app: 'Set',
+    appdata: 'FAXOPT(localstationid):${LOCALID}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 7,
+    app: 'Set',
+    appdata: 'FAXOPT(maxrate):${MAXRATE}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 8,
+    app: 'Set',
+    appdata: 'FAXOPT(minrate):${MINRATE}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 9,
+    app: 'NoOp',
+    appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 10,
+    app: 'NoOp',
+    appdata: 'FAXOPT(headerinfo) : ${FAXOPT(headerinfo)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 11,
+    app: 'NoOp',
+    appdata: 'FAXOPT(localstationid) : ${FAXOPT(localstationid)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 12,
+    app: 'NoOp',
+    appdata: 'FAXOPT(maxrate) : ${FAXOPT(maxrate)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 13,
+    app: 'NoOp',
+    appdata: 'FAXOPT(minrate) : ${FAXOPT(minrate)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 14,
+    app: 'NoOp',
+    appdata: '**** RECEIVING FAX : ${FAXFILE} ****',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 15,
+    app: 'ReceiveFax',
+    appdata: '/tmp/${FAXFILE}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 16,
+    app: 'Hangup',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 'h',
+    priority: 1,
+    app: 'NoOp',
+    appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
+    type: 'inbound-fax'
+  }], {
+    ignoreDuplicates: true
+  })
+  .then(function() {
+    console.log('Finished populating fax outbound voice extension');
+  });
+
+models.SquareProject
+  .bulkCreate([{
+    name: "project1",
+    description: "description project"
+  }], {
+    ignoreDuplicates: true
+  }).then(function() {
+    console.log('Finished populating square projects');
+  });
+
+models.ChatWebsite
+  .create({
+    name: 'xCally Shop',
+    description: 'xCally Shop',
+    address: 'http://www.xcally.com/shop/',
+    color: '#f51111',
+    color_focus: '#f51111',
+    color_button: '#f51111',
+    remote: 'http://localhost:9000',
+    animation: true,
+    header_shape: 'squared',
+    header_online: 'We are here!',
+    online_message: 'Questions? Insert your name and email address to start a live-chat with our support team.',
+    username_placeholder: 'Your name',
+    email_placeholder: 'Your email address',
+    start_chat_button: 'Chat',
+    header_offline: 'Contact us',
+    offline_message: "<strong>We're not online.</strong><br />It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.'",
+    enquiry_message_placeholder: 'Your message...',
+    enquiry_button: 'Leave message',
+    download_transcript: true
+  })
+  .then(function(chatWebsite) {
+    console.log('Finished populating chat website');
+    models.ChatQueue
+      .findAll()
+      .then(function(chatQueues) {
+        models.ChatApplication
+          .create({
+            app: 'queue',
+            appdata: chatQueues[0].id,
+            priority: 1,
+            timeout: 30,
+            ChatWebsiteId: chatWebsite.id,
+            ChatQueueId: chatQueues[0].id
+          })
+          .then(function() {
+            console.log('Finished populating chat website application 1');
+          })
+          .catch(function(err) {
+            // console.error(err);
+          });
+
+        models.ChatApplication
+          .create({
+            app: 'queue',
+            appdata: chatQueues[1].id,
+            priority: 2,
+            timeout: 30,
+            ChatWebsiteId: chatWebsite.id,
+            ChatQueueId: chatQueues[1].id
+          })
+          .then(function() {
+            console.log('Finished populating chat website application 2');
+          })
+          .catch(function(err) {
+            // console.error(err);
+          });
+      })
+      .catch(function(err) {
+        // console.error(err);
+      });
+  })
+  .catch(function(err) {
+    // console.error(err);
+  });
+
+models.Variable
+  .bulkCreate([{
+    name: "variable1",
+    description: "description project"
+  }], {
+    ignoreDuplicates: true
+  }).then(function() {
+    console.log('Finished populating variables');
+  });
+
+models.VoiceContext
+  .bulkCreate([{
+    name: "from-sip",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "from-voip-provider",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "inbound-fax",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "outbound-fax",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "from-voicemail",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating context variables');
+  });
+
+models.VoiceMusicOnHold
+  .bulkCreate([{
+    name: "default",
+    mode: "files",
+    directory: 'var/lib/asterisk/moh',
+    sort: 'alpha',
+    format: 'wav',
+    defaultEntry: true
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating moh variables');
+  });
+
+models.Settings
+  .bulkCreate([{
+    id: 1,
+    min_internal: 1000,
+    soundPath: '/var/opt/motion/server/files/sounds/converted'
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating moh variables');
+  });
+
+models.Dashboard
+  .bulkCreate([{
+    id: 1,
+    name: 'Motion Dashboard',
+    model: JSON.stringify({
+      title: 'Motion Dashboard',
+      rows: [{
+        columns: [{
+          styleClass: 'col-md-4',
+          widgets: [{
+            type: 'clock',
+            title: 'Clock',
+            config: {
+              timePattern: 'hh:mm:ss a',
+              datePattern: 'dddd, MMMM Do YYYY'
+            }
+          }]
+        }, {
+          styleClass: 'col-md-8',
+          widgets: [{
+            type: 'iframe',
+            title: 'Iframe',
+            config: {
+              url: 'https://demo.xcally.com/shop/'
+            }
+          }]
+        }]
+      }]
+    }),
+    defaultEntry: true,
+    editable: false
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating moh variables');
+  });
+
+models.Integration
+  .bulkCreate([{
+    name: 'Zendesk',
+    version: '1.0.0',
+    active: false,
+    author: 'XeniaLAB s.r.l.',
+    logo: 'assets/images/media/zendesk2.png',
+    state: 'zendesk',
+    description: 'Description for Zendesk'
+  }, {
+    name: 'Desk.com',
+    version: '1.0.0',
+    active: false,
+    author: 'XeniaLAB s.r.l.',
+    logo: 'assets/images/media/desk2.png',
+    state: 'desk',
+    description: 'Description for Desk.com'
+  }, {
+    name: 'Salesforce',
+    version: '1.0.0',
+    active: false,
+    author: 'XeniaLAB s.r.l.',
+    logo: 'assets/images/media/salesforce2.png',
+    state: 'salesforce',
+    description: 'Description for Salesforce'
+  }, {
+    name: 'Freshdesk',
+    version: '1.0.0',
+    active: false,
+    author: 'XeniaLAB s.r.l.',
+    logo: 'assets/images/media/freshdesk.png',
+    state: 'freshdesk',
+    description: 'Description for Freshdesk'
+  }, {
+    name: 'SugarCRM',
+    version: '1.0.0',
+    active: false,
+    author: 'XeniaLAB s.r.l.',
+    logo: 'assets/images/media/sugarcrm2.png',
+    state: 'sugarcrm',
+    description: 'Description for SugarCRM'
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating integrations');
+  });
+
+models.ReportTree
+  .bulkCreate([{
+    id: 1,
+    tree: '[{"id":"1","parent":"#","text":"Motion Reports","icon":"icon-rocket","state":{"selected":true,"opened":true}},{"id":"2","parent":"1","text":"Basic Node","state":{"selected":false,"opened":false}}]',
+  }, {
+    id: 2,
+    tree: '[{"id":"1","text":"Custom Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"2","text":"Basic Node","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"}]'
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating integrations');
+  });
+
+models.Service
+  .bulkCreate([{
+    id: 1,
+    name: 'Motion Service',
+    defaultEntry: true
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating integrations');
+  });
index 023f91f..4b844ca 100644 (file)
@@ -1 +1,550 @@
-var _0x7266=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x74\x68\x65\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x73","\x6C\x6F\x67","\x61\x67\x65\x6E\x74","\x66\x69\x6C\x74\x65\x72","\x44\x65\x66\x61\x75\x6C\x74\x20\x54\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x54\x65\x61\x6D","\x6C\x6F\x63\x61\x6C","\x61\x64\x6D\x69\x6E","\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72","\x61\x64\x6D\x69\x6E\x40\x61\x64\x6D\x69\x6E\x2E\x63\x6F\x6D","\x70\x61\x73\x73\x77\x6F\x72\x64","\x78\x63\x61\x6C\x6C\x79","\x64\x79\x6E\x61\x6D\x69\x63","\x46\x52\x49\x45\x4E\x44","\x75\x64\x70","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x79\x65\x73","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x4A\x6F\x68\x6E\x20\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x73\x68\x75\x74\x74\x6C\x65\x35\x35","\x4A\x61\x6E\x65\x20\x4D\x69\x6C\x6C\x65\x72","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73","\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44","\x75\x73\x65\x72\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x55\x53\x45\x52\x53","\x61\x67\x65\x6E\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x47\x45\x4E\x54\x53","\x74\x65\x61\x6D\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x45\x41\x4D\x53","\x63\x68\x61\x74","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x54","\x76\x6F\x69\x63\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45","\x6D\x61\x69\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x41\x49\x4C","\x66\x61\x78","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x46\x41\x58","\x61\x75\x64\x69\x6F","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x55\x44\x49\x4F","\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x41\x4C\x4C\x59\x53\x51\x55\x41\x52\x45","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x4E\x41\x4C\x59\x54\x49\x43\x53","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x41\x4C\x54\x49\x4D\x45","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x53","\x73\x65\x74\x74\x69\x6E\x67\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x45\x54\x54\x49\x4E\x47\x53","\x4D\x6F\x64\x75\x6C\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x66\x61\x78\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x76\x6F\x69\x63\x65\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73","\x4E\x6F\x4F\x70","\x46\x61\x78\x20\x55\x55\x49\x44\x3A\x20\x24\x7B\x46\x41\x58\x55\x55\x49\x44\x7D","\x55\x73\x65\x72\x45\x76\x65\x6E\x74","\x46\x61\x78\x2C\x75\x75\x69\x64\x3A\x20\x24\x7B\x46\x41\x58\x55\x55\x49\x44\x7D","\x53\x65\x74","\x46\x41\x58\x4F\x50\x54\x28\x66\x69\x6C\x65\x6E\x61\x6D\x65\x29\x3A\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3A\x24\x7B\x45\x43\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3A\x24\x7B\x46\x41\x58\x48\x45\x41\x44\x45\x52\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3A\x24\x7B\x4C\x4F\x43\x41\x4C\x49\x44\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3A\x24\x7B\x4D\x41\x58\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3A\x24\x7B\x4D\x49\x4E\x52\x41\x54\x45\x7D","\x53\x65\x6E\x64\x46\x41\x58","\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D\x2C\x64","\x45\x52\x52\x4F\x52\x20\x22\x24\x7B\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x7D\x22\x20\x22\x4E\x4F\x5F\x53\x54\x41\x54\x55\x53\x22\x20\x22\x4E\x4F\x5F\x50\x41\x47\x45\x53\x22","\x68","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x7D","\x46\x61\x78\x53\x74\x61\x74\x75\x73\x20\x3A\x20\x24\x7B\x46\x41\x58\x53\x54\x41\x54\x55\x53\x7D","\x46\x61\x78\x53\x74\x61\x74\x75\x73\x53\x74\x72\x69\x6E\x67\x20\x3A\x20\x24\x7B\x46\x41\x58\x53\x54\x41\x54\x55\x53\x53\x54\x52\x49\x4E\x47\x7D","\x46\x61\x78\x45\x72\x72\x6F\x72\x20\x3A\x20\x24\x7B\x46\x41\x58\x45\x52\x52\x4F\x52\x7D","\x52\x65\x6D\x6F\x74\x65\x53\x74\x61\x74\x69\x6F\x6E\x49\x44\x20\x3A\x20\x24\x7B\x52\x45\x4D\x4F\x54\x45\x53\x54\x41\x54\x49\x4F\x4E\x49\x44\x7D","\x46\x61\x78\x50\x61\x67\x65\x73\x20\x3A\x20\x24\x7B\x46\x41\x58\x50\x41\x47\x45\x53\x7D","\x46\x61\x78\x42\x69\x74\x52\x61\x74\x65\x20\x3A\x20\x24\x7B\x46\x41\x58\x42\x49\x54\x52\x41\x54\x45\x7D","\x46\x61\x78\x52\x65\x73\x6F\x6C\x75\x74\x69\x6F\x6E\x20\x3A\x20\x24\x7B\x46\x41\x58\x52\x45\x53\x4F\x4C\x55\x54\x49\x4F\x4E\x7D","\x4F\x4B\x20\x22\x24\x7B\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x7D\x22\x20\x22\x24\x7B\x46\x41\x58\x53\x54\x41\x54\x55\x53\x53\x54\x52\x49\x4E\x47\x7D\x22\x20\x22\x24\x7B\x46\x41\x58\x50\x41\x47\x45\x53\x7D\x22","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x2A\x2A\x2A\x2A\x20\x46\x41\x58\x20\x52\x45\x43\x45\x49\x56\x45\x44\x20\x66\x72\x6F\x6D\x20\x24\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D\x20\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x24\x7B\x45\x50\x4F\x43\x48\x7D\x2C\x2C\x25\x63\x29\x7D\x20\x2A\x2A\x2A\x2A","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3A\x79\x65\x73","\x46\x49\x4C\x45\x4E\x41\x4D\x45\x3A\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D","\x46\x41\x58\x46\x49\x4C\x45\x3A\x24\x7B\x46\x49\x4C\x45\x4E\x41\x4D\x45\x7D\x2E\x74\x69\x66","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3A\x52\x65\x63\x65\x69\x76\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x24\x7B\x45\x50\x4F\x43\x48\x7D\x2C\x2C\x25\x59\x2D\x25\x6D\x2D\x25\x64\x20\x25\x48\x3A\x25\x4D\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x20\x3A\x20\x24\x7B\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x7D","\x2A\x2A\x2A\x2A\x20\x52\x45\x43\x45\x49\x56\x49\x4E\x47\x20\x46\x41\x58\x20\x3A\x20\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D\x20\x2A\x2A\x2A\x2A","\x52\x65\x63\x65\x69\x76\x65\x46\x61\x78","\x2F\x74\x6D\x70\x2F\x24\x7B\x46\x41\x58\x46\x49\x4C\x45\x7D","\x48\x61\x6E\x67\x75\x70","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x73\x71\x75\x61\x72\x65\x20\x70\x72\x6F\x6A\x65\x63\x74\x73","\x70\x72\x6F\x6A\x65\x63\x74\x31","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x70\x72\x6F\x6A\x65\x63\x74","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x31","\x56\x61\x72\x69\x61\x62\x6C\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x68\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x66\x69\x6C\x65\x73","\x76\x61\x72\x2F\x6C\x69\x62\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x68","\x61\x6C\x70\x68\x61","\x77\x61\x76","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x73\x65\x74\x74\x69\x6E\x67\x73","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67\x73","\x4D\x6F\x74\x69\x6F\x6E\x20\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6C\x6F\x63\x6B","\x43\x6C\x6F\x63\x6B","\x68\x68\x3A\x6D\x6D\x3A\x73\x73\x20\x61","\x64\x64\x64\x64\x2C\x20\x4D\x4D\x4D\x4D\x20\x44\x6F\x20\x59\x59\x59\x59","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x69\x66\x72\x61\x6D\x65","\x49\x66\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x65\x6D\x6F\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x73\x68\x6F\x70\x2F","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x65\x6E\x64\x65\x73\x6B","\x31\x2E\x30\x2E\x30","\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x73\x2E\x72\x2E\x6C\x2E","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x7A\x65\x6E\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x5A\x65\x6E\x64\x65\x73\x6B","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x6F\x74\x69\x6F\x6E\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x72\x6F\x63\x6B\x65\x74\x22\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x42\x61\x73\x69\x63\x20\x4E\x6F\x64\x65\x22\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x7D\x5D","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x75\x73\x74\x6F\x6D\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x42\x61\x73\x69\x63\x20\x4E\x6F\x64\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x4D\x6F\x74\x69\x6F\x6E\x20\x53\x65\x72\x76\x69\x63\x65","\x53\x65\x72\x76\x69\x63\x65"];_0x7266[0];var _=require(_0x7266[1]);var models=require(_0x7266[2]);var _users;var _team;models[_0x7266[34]][_0x7266[33]]([{provider:_0x7266[12],role:_0x7266[13],fullname:_0x7266[14],email:_0x7266[15],name:_0x7266[13],password:_0x7266[16],defaultuser:_0x7266[17],host:_0x7266[18],type:_0x7266[19],transport:_0x7266[20],allow:_0x7266[21],qualify:_0x7266[22],nat:_0x7266[23],disallow:_0x7266[24],context:_0x7266[25],internal:1000},{provider:_0x7266[12],role:_0x7266[7],fullname:_0x7266[26],email:_0x7266[27],name:_0x7266[28],password:_0x7266[29],defaultuser:_0x7266[28],host:_0x7266[18],type:_0x7266[19],transport:_0x7266[20],allow:_0x7266[21],qualify:_0x7266[22],nat:_0x7266[23],disallow:_0x7266[24],context:_0x7266[25],internal:1001},{provider:_0x7266[12],role:_0x7266[7],fullname:_0x7266[30],email:_0x7266[31],name:_0x7266[32],password:_0x7266[29],defaultuser:_0x7266[32],host:_0x7266[18],type:_0x7266[19],transport:_0x7266[20],allow:_0x7266[21],qualify:_0x7266[22],nat:_0x7266[23],disallow:_0x7266[24],context:_0x7266[25],internal:1002}],{ignoreDuplicates:true,individualHooks:true})[_0x7266[4]](function(_0x57abx6){console[_0x7266[6]](_0x7266[5]);_users=_[_0x7266[8]](_0x57abx6,{role:_0x7266[7]});return models[_0x7266[11]][_0x7266[10]]({name:_0x7266[9],description:_0x7266[9],defaultEntry:true})})[_0x7266[4]](function(_0x57abx5){_team=_0x57abx5;return _team[_0x7266[3]](_users)});models[_0x7266[64]][_0x7266[33]]([{name:_0x7266[36],title:_0x7266[37]},{name:_0x7266[38],title:_0x7266[39]},{name:_0x7266[40],title:_0x7266[41]},{name:_0x7266[42],title:_0x7266[43]},{name:_0x7266[44],title:_0x7266[45]},{name:_0x7266[46],title:_0x7266[47]},{name:_0x7266[48],title:_0x7266[49]},{name:_0x7266[50],title:_0x7266[51]},{name:_0x7266[52],title:_0x7266[53]},{name:_0x7266[54],title:_0x7266[55]},{name:_0x7266[56],title:_0x7266[57]},{name:_0x7266[58],title:_0x7266[59]},{name:_0x7266[60],title:_0x7266[61]},{name:_0x7266[62],title:_0x7266[63]}],{ignoreDuplicates:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[35])});models[_0x7266[92]][_0x7266[33]]([{context:_0x7266[66],exten:_0x7266[67],priority:1,app:_0x7266[68],appdata:_0x7266[69],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:2,app:_0x7266[70],appdata:_0x7266[71],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:3,app:_0x7266[72],appdata:_0x7266[73],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:4,app:_0x7266[72],appdata:_0x7266[74],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:5,app:_0x7266[72],appdata:_0x7266[75],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:6,app:_0x7266[72],appdata:_0x7266[76],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:7,app:_0x7266[72],appdata:_0x7266[77],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:8,app:_0x7266[72],appdata:_0x7266[78],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:9,app:_0x7266[79],appdata:_0x7266[80],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[67],priority:10,app:_0x7266[68],appdata:_0x7266[81],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:1,app:_0x7266[68],appdata:_0x7266[83],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:2,app:_0x7266[68],appdata:_0x7266[84],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:3,app:_0x7266[68],appdata:_0x7266[85],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:4,app:_0x7266[68],appdata:_0x7266[86],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:5,app:_0x7266[68],appdata:_0x7266[87],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:6,app:_0x7266[68],appdata:_0x7266[88],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:7,app:_0x7266[68],appdata:_0x7266[89],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:8,app:_0x7266[68],appdata:_0x7266[90],type:_0x7266[66]},{context:_0x7266[66],exten:_0x7266[82],priority:9,app:_0x7266[68],appdata:_0x7266[91],type:_0x7266[66]}],{ignoreDuplicates:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[65])});models[_0x7266[92]][_0x7266[33]]([{context:_0x7266[93],exten:_0x7266[67],priority:1,app:_0x7266[68],appdata:_0x7266[94],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:2,app:_0x7266[72],appdata:_0x7266[95],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:3,app:_0x7266[72],appdata:_0x7266[96],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:4,app:_0x7266[72],appdata:_0x7266[97],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:5,app:_0x7266[72],appdata:_0x7266[98],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:6,app:_0x7266[72],appdata:_0x7266[76],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:7,app:_0x7266[72],appdata:_0x7266[77],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:8,app:_0x7266[72],appdata:_0x7266[78],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:9,app:_0x7266[68],appdata:_0x7266[83],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:10,app:_0x7266[68],appdata:_0x7266[99],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:11,app:_0x7266[68],appdata:_0x7266[100],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:12,app:_0x7266[68],appdata:_0x7266[101],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:13,app:_0x7266[68],appdata:_0x7266[102],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:14,app:_0x7266[68],appdata:_0x7266[103],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:15,app:_0x7266[104],appdata:_0x7266[105],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[67],priority:16,app:_0x7266[106],type:_0x7266[93]},{context:_0x7266[93],exten:_0x7266[82],priority:1,app:_0x7266[68],appdata:_0x7266[83],type:_0x7266[93]}],{ignoreDuplicates:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[65])});models[_0x7266[110]][_0x7266[33]]([{name:_0x7266[108],description:_0x7266[109]}],{ignoreDuplicates:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[107])});models[_0x7266[113]][_0x7266[33]]([{name:_0x7266[112],description:_0x7266[109]}],{ignoreDuplicates:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[111])});models[_0x7266[118]][_0x7266[33]]([{name:_0x7266[25],description:_0x7266[115],defaultEntry:true},{name:_0x7266[116],description:_0x7266[115],defaultEntry:true},{name:_0x7266[93],description:_0x7266[115],defaultEntry:true},{name:_0x7266[66],description:_0x7266[115],defaultEntry:true},{name:_0x7266[117],description:_0x7266[115],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[114])});models[_0x7266[125]][_0x7266[33]]([{name:_0x7266[120],mode:_0x7266[121],directory:_0x7266[122],sort:_0x7266[123],format:_0x7266[124],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[119])});models[_0x7266[128]][_0x7266[10]]({min_internal:1003,soundPath:_0x7266[127]})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[126])});models[_0x7266[140]][_0x7266[33]]([{id:1,name:_0x7266[129],model:JSON[_0x7266[139]]({title:_0x7266[129],rows:[{columns:[{styleClass:_0x7266[130],widgets:[{type:_0x7266[131],title:_0x7266[132],config:{timePattern:_0x7266[133],datePattern:_0x7266[134]}}]},{styleClass:_0x7266[135],widgets:[{type:_0x7266[136],title:_0x7266[137],config:{url:_0x7266[138]}}]}]}]}),defaultEntry:true,editable:false}],{ignoreDuplicates:true,individualHooks:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[119])});models[_0x7266[148]][_0x7266[33]]([{name:_0x7266[142],version:_0x7266[143],active:false,author:_0x7266[144],logo:_0x7266[145],state:_0x7266[146],description:_0x7266[147]}],{ignoreDuplicates:true,individualHooks:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[141])});models[_0x7266[151]][_0x7266[33]]([{id:1,tree:_0x7266[149]},{id:2,tree:_0x7266[150]}],{ignoreDuplicates:true,individualHooks:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[141])});models[_0x7266[153]][_0x7266[33]]([{id:1,name:_0x7266[152],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x7266[4]](function(){console[_0x7266[6]](_0x7266[141])})
\ No newline at end of file
+/**
+ * Populate DB with sample data on server start
+ * to disable, edit config/environment/index.js, and set `seedDB: false`
+ */
+
+'use strict';
+
+var _ = require('lodash');
+var models = require('../models');
+var _users;
+var _team;
+
+models.User
+  .bulkCreate([{
+    provider: 'local',
+    role: 'admin',
+    fullname: 'Administrator',
+    email: 'admin@admin.com',
+    name: 'admin',
+    password: 'password',
+    defaultuser: 'xcally',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1000
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'John Doe',
+    email: 'john.doe@gmail.com',
+    name: 'john.doe',
+    password: 'shuttle55',
+    defaultuser: 'john.doe',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1001
+  }, {
+    provider: 'local',
+    role: 'agent',
+    fullname: 'Jane Miller',
+    email: 'jane.miller@gmail.com',
+    name: 'jane.miller',
+    password: 'shuttle55',
+    defaultuser: 'jane.miller',
+    host: 'dynamic',
+    type: 'FRIEND',
+    transport: 'udp',
+    allow: 'alaw;ulaw;gsm',
+    qualify: 'yes',
+    nat: 'force_rport,comedia',
+    disallow: 'all',
+    context: 'from-sip',
+    internal: 1002
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function(users) {
+    console.log('Finished populating users');
+    _users = _.filter(users, {
+      role: 'agent'
+    });
+    return models.Team
+      .create({
+        name: "Default Team",
+        description: "Default Team",
+        defaultEntry: true
+      });
+  }).then(function(team) {
+    _team = team;
+    return _team.setUsers(_users);
+  });
+
+// Init modules table
+models.Module
+  .bulkCreate([{
+    name: "dashboard",
+    title: "APPLICATION_DASHBOARD"
+  }, {
+    name: "users",
+    title: "APPLICATION_USERS"
+  }, {
+    name: "agents",
+    title: "APPLICATION_AGENTS"
+  }, {
+    name: "teams",
+    title: "APPLICATION_TEAMS"
+  }, {
+    name: "chat",
+    title: "APPLICATION_CHAT"
+  }, {
+    name: "voice",
+    title: "APPLICATION_VOICE"
+  }, {
+    name: "mail",
+    title: "APPLICATION_MAIL"
+  }, {
+    name: "fax",
+    title: "APPLICATION_FAX"
+  }, {
+    name: "audio",
+    title: "APPLICATION_AUDIO"
+  }, {
+    name: "callysquare",
+    title: "APPLICATION_CALLYSQUARE"
+  }, {
+    name: "analytics",
+    title: "APPLICATION_ANALYTICS"
+  }, {
+    name: "realtime",
+    title: "APPLICATION_REALTIME"
+  }, {
+    name: "voicemails",
+    title: "APPLICATION_VOICEMAILS"
+  }, {
+    name: "settings",
+    title: "APPLICATION_SETTINGS"
+  }], {
+    ignoreDuplicates: true
+  }).then(function() {
+    console.log('Finished populating modules');
+  });
+
+models.VoiceExtension
+  .bulkCreate([{
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 1,
+    app: 'NoOp',
+    appdata: 'Fax UUID: ${FAXUUID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 2,
+    app: 'UserEvent',
+    appdata: 'Fax,uuid: ${FAXUUID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 3,
+    app: 'Set',
+    appdata: 'FAXOPT(filename):${FAXFILE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 4,
+    app: 'Set',
+    appdata: 'FAXOPT(ecm):${ECM}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 5,
+    app: 'Set',
+    appdata: 'FAXOPT(headerinfo):${FAXHEADER}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 6,
+    app: 'Set',
+    appdata: 'FAXOPT(localstationid):${LOCALID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 7,
+    app: 'Set',
+    appdata: 'FAXOPT(maxrate):${MAXRATE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 8,
+    app: 'Set',
+    appdata: 'FAXOPT(minrate):${MINRATE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 9,
+    app: 'SendFAX',
+    appdata: '${FAXFILE},d',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 's',
+    priority: 10,
+    app: 'NoOp',
+    appdata: 'ERROR "${TIMESTAMP}" "NO_STATUS" "NO_PAGES"',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 1,
+    app: 'NoOp',
+    appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 2,
+    app: 'NoOp',
+    appdata: 'FaxStatus : ${FAXSTATUS}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 3,
+    app: 'NoOp',
+    appdata: 'FaxStatusString : ${FAXSTATUSSTRING}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 4,
+    app: 'NoOp',
+    appdata: 'FaxError : ${FAXERROR}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 5,
+    app: 'NoOp',
+    appdata: 'RemoteStationID : ${REMOTESTATIONID}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 6,
+    app: 'NoOp',
+    appdata: 'FaxPages : ${FAXPAGES}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 7,
+    app: 'NoOp',
+    appdata: 'FaxBitRate : ${FAXBITRATE}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 8,
+    app: 'NoOp',
+    appdata: 'FaxResolution : ${FAXRESOLUTION}',
+    type: 'outbound-fax'
+  }, {
+    context: 'outbound-fax',
+    exten: 'h',
+    priority: 9,
+    app: 'NoOp',
+    appdata: 'OK "${TIMESTAMP}" "${FAXSTATUSSTRING}" "${FAXPAGES}"',
+    type: 'outbound-fax'
+  }], {
+    ignoreDuplicates: true
+  })
+  .then(function() {
+    console.log('Finished populating fax outbound voice extension');
+  });
+
+models.VoiceExtension
+  .bulkCreate([{
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 1,
+    app: 'NoOp',
+    appdata: '**** FAX RECEIVED from ${CALLERID(num)} ${STRFTIME(${EPOCH},,%c)} ****',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 2,
+    app: 'Set',
+    appdata: 'FAXOPT(ecm):yes',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 3,
+    app: 'Set',
+    appdata: 'FILENAME:${UNIQUEID}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 4,
+    app: 'Set',
+    appdata: 'FAXFILE:${FILENAME}.tif',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 5,
+    app: 'Set',
+    appdata: 'FAXOPT(headerinfo):Received by XeniaLAB ${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 6,
+    app: 'Set',
+    appdata: 'FAXOPT(localstationid):${LOCALID}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 7,
+    app: 'Set',
+    appdata: 'FAXOPT(maxrate):${MAXRATE}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 8,
+    app: 'Set',
+    appdata: 'FAXOPT(minrate):${MINRATE}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 9,
+    app: 'NoOp',
+    appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 10,
+    app: 'NoOp',
+    appdata: 'FAXOPT(headerinfo) : ${FAXOPT(headerinfo)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 11,
+    app: 'NoOp',
+    appdata: 'FAXOPT(localstationid) : ${FAXOPT(localstationid)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 12,
+    app: 'NoOp',
+    appdata: 'FAXOPT(maxrate) : ${FAXOPT(maxrate)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 13,
+    app: 'NoOp',
+    appdata: 'FAXOPT(minrate) : ${FAXOPT(minrate)}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 14,
+    app: 'NoOp',
+    appdata: '**** RECEIVING FAX : ${FAXFILE} ****',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 15,
+    app: 'ReceiveFax',
+    appdata: '/tmp/${FAXFILE}',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 's',
+    priority: 16,
+    app: 'Hangup',
+    type: 'inbound-fax'
+  }, {
+    context: 'inbound-fax',
+    exten: 'h',
+    priority: 1,
+    app: 'NoOp',
+    appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
+    type: 'inbound-fax'
+  }], {
+    ignoreDuplicates: true
+  })
+  .then(function() {
+    console.log('Finished populating fax outbound voice extension');
+  });
+
+models.SquareProject
+  .bulkCreate([{
+    name: "project1",
+    description: "description project"
+  }], {
+    ignoreDuplicates: true
+  }).then(function() {
+    console.log('Finished populating square projects');
+  });
+
+models.Variable
+  .bulkCreate([{
+    name: "variable1",
+    description: "description project"
+  }], {
+    ignoreDuplicates: true
+  }).then(function() {
+    console.log('Finished populating variables');
+  });
+
+models.VoiceContext
+  .bulkCreate([{
+    name: "from-sip",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "from-voip-provider",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "inbound-fax",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "outbound-fax",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }, {
+    name: "from-voicemail",
+    description: "Default context (DO NOT DELETE)",
+    defaultEntry: true
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating context variables');
+  });
+
+models.VoiceMusicOnHold
+  .bulkCreate([{
+    name: "default",
+    mode: "files",
+    directory: 'var/lib/asterisk/moh',
+    sort: 'alpha',
+    format: 'wav',
+    defaultEntry: true
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating moh variables');
+  });
+
+models.Settings
+  .create({
+    min_internal: 1003,
+    soundPath: '/var/opt/motion/server/files/sounds/converted'
+  }).then(function() {
+    console.log('Finished populating settings');
+  });
+
+models.Dashboard
+  .bulkCreate([{
+    id: 1,
+    name: 'Motion Dashboard',
+    model: JSON.stringify({
+      title: 'Motion Dashboard',
+      rows: [{
+        columns: [{
+          styleClass: 'col-md-4',
+          widgets: [{
+            type: 'clock',
+            title: 'Clock',
+            config: {
+              timePattern: 'hh:mm:ss a',
+              datePattern: 'dddd, MMMM Do YYYY'
+            }
+          }]
+        }, {
+          styleClass: 'col-md-8',
+          widgets: [{
+            type: 'iframe',
+            title: 'Iframe',
+            config: {
+              url: 'https://demo.xcally.com/shop/'
+            }
+          }]
+        }]
+      }]
+    }),
+    defaultEntry: true,
+    editable: false
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating moh variables');
+  });
+
+models.Integration
+  .bulkCreate([{
+    name: 'Zendesk',
+    version: '1.0.0',
+    active: false,
+    author: 'XeniaLAB s.r.l.',
+    logo: 'assets/images/media/zendesk2.png',
+    state: 'zendesk',
+    description: 'Description for Zendesk'
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating integrations');
+  });
+
+models.ReportTree
+  .bulkCreate([{
+    id: 1,
+    tree: '[{"id":"1","parent":"#","text":"Motion Reports","icon":"icon-rocket","state":{"selected":true,"opened":true}},{"id":"2","parent":"1","text":"Basic Node","state":{"selected":false,"opened":false}}]',
+  }, {
+    id: 2,
+    tree: '[{"id":"1","text":"Custom Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"2","text":"Basic Node","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"}]'
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating integrations');
+  });
+
+models.Service
+  .bulkCreate([{
+    id: 1,
+    name: 'Motion Service',
+    defaultEntry: true
+  }], {
+    ignoreDuplicates: true,
+    individualHooks: true
+  }).then(function() {
+    console.log('Finished populating integrations');
+  });
index 59aafdf..c0f02c5 100644 (file)
@@ -1 +1,23 @@
-var _0xe12b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x73\x6D\x74\x70","\x65\x78\x70\x6F\x72\x74\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xe12b[0];var MailServerOut=require(_0xe12b[2])[_0xe12b[1]];var Smtp=require(_0xe12b[3]);module[_0xe12b[4]]=function(){MailServerOut[_0xe12b[5]](function(_0x8c75x3){ new Smtp(_0x8c75x3)});return MailServerOut[_0xe12b[10]]()[_0xe12b[9]](function(_0x8c75x5){_0x8c75x5[_0xe12b[8]](function(_0x8c75x6){ new Smtp(_0x8c75x6)})})[_0xe12b[7]](function(_0x8c75x4){console[_0xe12b[6]](_0x8c75x4)})}
\ No newline at end of file
+'use strict';
+
+var MailServerOut = require('../../models').MailServerOut;
+var Smtp = require('./smtp');
+
+module.exports = function() {
+  MailServerOut.afterCreate(function(server) {
+    var smtp = new Smtp();
+    smtp.init(server);
+  });
+
+  return MailServerOut
+    .findAll()
+    .then(function(servers) {
+      servers.forEach(function(server) {
+        var smtp = new Smtp();
+        smtp.init(server);
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
index a164182..a75b6c8 100644 (file)
@@ -1 +1,267 @@
-var _0x2a27=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72\x2D\x73\x6D\x74\x70\x2D\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x41\x49\x4C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x20\x53\x4D\x54\x50\x20\x43\x52\x45\x41\x54\x45","\x6C\x6F\x67","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x75\x73\x65\x72","\x61\x75\x74\x68","\x6F\x70\x74\x69\x6F\x6E\x73","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74\x65\x72","\x20\x53\x4D\x54\x50\x20\x55\x50\x44\x41\x54\x45","\x5B\x4D\x41\x49\x4C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x53\x4D\x54\x50\x20\x44\x45\x53\x54\x52\x4F\x59","\x73\x74\x61\x74\x75\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x49\x6E\x74\x65\x72\x6E\x61\x6C\x20\x53\x65\x72\x76\x65\x72\x20\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x53\x45\x4E\x54","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x74\x6F","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x70\x61\x74\x68","\x6E\x61\x6D\x65","\x6D\x61\x70","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x61\x64\x64\x55\x73\x65\x72","\x61\x64\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x66\x69\x6E\x64\x4F\x6E\x65","\x69\x6E\x66\x6F","\x73\x70\x72\x65\x61\x64","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x3B","\x6A\x6F\x69\x6E","\x4F\x50\x45\x4E","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2a27[0];var _=require(_0x2a27[1]);var Promise=require(_0x2a27[2]);var nodemailer=require(_0x2a27[3]);var htmlToText=require(_0x2a27[4]);var smtpTransport=require(_0x2a27[5]);var Agent=require(_0x2a27[7])[_0x2a27[6]];var Contact=require(_0x2a27[7])[_0x2a27[8]];var MailRoom=require(_0x2a27[7])[_0x2a27[9]];var MailMessage=require(_0x2a27[7])[_0x2a27[10]];var ContactEmail=require(_0x2a27[7])[_0x2a27[11]];var MailServerOut=require(_0x2a27[7])[_0x2a27[12]];function Smtp(_0x99d0xd){var _0x99d0xe;var _0x99d0xf;function _0x99d0x10(_0x99d0xd){console[_0x2a27[16]](_0x2a27[13]+_0x99d0xd[_0x2a27[14]]+_0x2a27[15]);_0x99d0xf=_0x99d0xd;_0x99d0xe=nodemailer[_0x2a27[21]](smtpTransport({host:_0x99d0xd[_0x2a27[17]],port:_0x99d0xd[_0x2a27[18]],secure:_0x99d0xd[_0x2a27[19]],debug:true,auth:{user:_0x99d0xd[_0x2a27[14]],pass:_0x99d0xd[_0x2a27[20]]}}))}function _0x99d0x11(_0x99d0xd){if(!_0x99d0xd[_0x2a27[23]](_0x2a27[22])&&_0x99d0xe[_0x2a27[27]][_0x2a27[26]][_0x2a27[25]][_0x2a27[24]]===_0x99d0xd[_0x2a27[14]]){console[_0x2a27[16]](_0x2a27[13]+_0x99d0xd[_0x2a27[14]]+_0x2a27[28]);_0x99d0xe=null;_0x99d0xe=nodemailer[_0x2a27[21]](smtpTransport({host:_0x99d0xd[_0x2a27[17]],port:_0x99d0xd[_0x2a27[18]],secure:_0x99d0xd[_0x2a27[19]],debug:true,auth:{user:_0x99d0xd[_0x2a27[14]],pass:_0x99d0xd[_0x2a27[20]]}}))}}function _0x99d0x12(_0x99d0xd){if(_0x99d0xe[_0x2a27[27]][_0x2a27[26]][_0x2a27[25]][_0x2a27[24]]===_0x99d0xd[_0x2a27[14]]){console[_0x2a27[16]](_0x2a27[29]+_0x99d0xd[_0x2a27[14]]+_0x2a27[30]);_0x99d0xe=null}}function _0x99d0x13(_0x99d0x14,_0x99d0x15){if(_0x99d0x14[_0x2a27[31]]===_0x2a27[32]&&_0x99d0xe[_0x2a27[27]][_0x2a27[26]][_0x2a27[25]][_0x2a27[24]]===_0x99d0x14[_0x2a27[34]][_0x2a27[33]]){var _0x99d0x16;var _0x99d0x17=_0x99d0x14;var _0x99d0x18,_0x99d0x19,_0x99d0x1a,_0x99d0x1b;if(_0x99d0x17[_0x2a27[35]]){return MailMessage[_0x2a27[61]]({where:{messageId:_0x99d0x17[_0x2a27[35]]}})[_0x2a27[46]](function(_0x99d0x22){return _0x99d0x22[_0x2a27[60]]()})[_0x2a27[46]](function(_0x99d0x21){_0x99d0x16=_0x99d0x21;return _0x99d0x16[_0x2a27[59]](_0x99d0x17,{transaction:_0x99d0x15?_0x99d0x15[_0x2a27[44]]:null})})[_0x2a27[46]](function(){return _0x99d0x16[_0x2a27[58]](_0x99d0x17.UserId,{transaction:_0x99d0x15?_0x99d0x15[_0x2a27[44]]:null})})[_0x2a27[46]](function(_0x99d0x20){_0x99d0x1b=_[_0x2a27[56]](_0x99d0x20,function(_0x99d0x1f){return _0x99d0x1f[0]});return})[_0x2a27[46]](function(){var _0x99d0x1e={status:_0x99d0x17[_0x2a27[31]],from:_0x99d0x17[_0x2a27[33]],to:_0x99d0x17[_0x2a27[47]],cc:_0x99d0x17[_0x2a27[48]],subject:_0x99d0x17[_0x2a27[49]],html:_0x99d0x17[_0x2a27[50]],text:_0x99d0x17[_0x2a27[50]]?htmlToText[_0x2a27[51]](_0x99d0x17[_0x2a27[50]],{wordwrap:false}):null,headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0x99d0x17[_0x2a27[52]]){_0x99d0x1e[_0x2a27[53]]=_[_0x2a27[56]](_0x99d0x17.MailAttachments,function(_0x99d0x1f){return {path:_0x99d0x1f[_0x2a27[54]],filename:_0x99d0x1f[_0x2a27[55]]}})};return _0x99d0xe[_0x2a27[57]](_0x99d0x1e)})[_0x2a27[46]](function(_0x99d0x1d){return _0x99d0x17[_0x2a27[45]]({messageId:_0x99d0x1d[_0x2a27[42]],status:_0x2a27[43]},{transaction:_0x99d0x15?_0x99d0x15[_0x2a27[44]]:null})})[_0x2a27[41]](function(_0x99d0x1c){console[_0x2a27[37]](_0x2a27[36],_0x99d0x1c);throw {message:_0x99d0x1c[_0x2a27[38]]||_0x99d0x1c[_0x2a27[39]]||_0x2a27[40]}})}else {return MailRoom[_0x2a27[69]]({where:{id:_0x99d0x17[_0x2a27[64]]},defaults:{subject:_0x99d0x17[_0x2a27[49]],from:_0x99d0x17[_0x2a27[33]][_0x2a27[66]](_0x2a27[65]),status:_0x2a27[67],MailAccountId:_0x99d0xf[_0x2a27[68]]},transaction:_0x99d0x15?_0x99d0x15[_0x2a27[44]]:null})[_0x2a27[63]](function(_0x99d0x21){_0x99d0x16=_0x99d0x21;return _0x99d0x16[_0x2a27[59]](_0x99d0x17,{transaction:_0x99d0x15?_0x99d0x15[_0x2a27[44]]:null})})[_0x2a27[46]](function(){return _0x99d0x16[_0x2a27[58]](_0x99d0x17.UserId,{transaction:_0x99d0x15?_0x99d0x15[_0x2a27[44]]:null})})[_0x2a27[46]](function(){var _0x99d0x1e={status:_0x99d0x17[_0x2a27[31]],from:_0x99d0x17[_0x2a27[33]],to:_0x99d0x17[_0x2a27[47]],cc:_0x99d0x17[_0x2a27[48]],subject:_0x99d0x17[_0x2a27[49]],html:_0x99d0x17[_0x2a27[50]],text:_0x99d0x17[_0x2a27[50]]?htmlToText[_0x2a27[51]](_0x99d0x17[_0x2a27[50]],{wordwrap:false}):null,headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0x99d0x17[_0x2a27[52]]){_0x99d0x1e[_0x2a27[53]]=_[_0x2a27[56]](_0x99d0x17.MailAttachments,function(_0x99d0x1f){return {path:_0x99d0x1f[_0x2a27[54]],filename:_0x99d0x1f[_0x2a27[55]]}})};return _0x99d0xe[_0x2a27[57]](_0x99d0x1e)})[_0x2a27[46]](function(_0x99d0x1d){console[_0x2a27[16]](_0x2a27[62],_0x99d0x1d);return _0x99d0x17[_0x2a27[45]]({messageId:_0x99d0x1d[_0x2a27[42]],status:_0x2a27[43]},{transaction:_0x99d0x15?_0x99d0x15[_0x2a27[44]]:null})})[_0x2a27[41]](function(_0x99d0x1c){console[_0x2a27[37]](_0x2a27[36],_0x99d0x1c);throw {message:_0x99d0x1c[_0x2a27[38]]||_0x99d0x1c[_0x2a27[39]]||_0x2a27[40]}})}}}_0x99d0x10(_0x99d0xd);MailServerOut[_0x2a27[70]](function(_0x99d0xd){return _0x99d0x11(_0x99d0xd)});MailServerOut[_0x2a27[71]](function(_0x99d0xd){return _0x99d0x12(_0x99d0xd)});MailMessage[_0x2a27[72]](function(_0x99d0xd,_0x99d0x15){return _0x99d0x13(_0x99d0xd,_0x99d0x15)});return {}}module[_0x2a27[73]]=Smtp
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Promise = require('bluebird');
+var nodemailer = require('nodemailer');
+var htmlToText = require('html-to-text');
+var smtpTransport = require('nodemailer-smtp-transport');
+
+var sequelize = require('../../models').sequelize;
+var Agent = require('../../models').User;
+var Contact = require('../../models').Contact;
+var MailRoom = require('../../models').MailRoom;
+var MailAccount = require('../../models').MailAccount;
+var MailMessage = require('../../models').MailMessage;
+var ContactEmail = require('../../models').ContactEmail;
+var MailServerOut = require('../../models').MailServerOut;
+
+function Smtp() {
+  console.log('Smtp Initialization...');
+  this.smtp = null;
+}
+
+Smtp.prototype.init = function(doc) {
+  var self = this;
+  self.onSave(doc);
+
+  MailServerOut.afterUpdate(function(doc) {
+    if (self.smtp && doc.id === self.smtp.mailServerOutId) {
+      self.onUpdate(doc);
+    }
+  });
+  MailServerOut.afterDestroy(function(doc) {
+    if (self.smtp && doc.id === self.smtp.mailServerOutId) {
+      self.onRemove(doc);
+    }
+  });
+  MailMessage.afterCreate(function(doc) {
+    if (self.smtp && self.smtp.username === doc.dataValues.from) {
+      self.onSend(doc);
+    }
+  });
+};
+
+Smtp.prototype.onSave = function(doc) {
+  console.log("MAIL - Account " + doc.username + " SMTP CREATE");
+  this.smtp = nodemailer.createTransport(smtpTransport({
+    host: doc.host,
+    port: doc.port,
+    secure: doc.ssl,
+    debug: true,
+    auth: {
+      user: doc.username,
+      pass: doc.password
+    }
+  }));
+
+  this.smtp.mailAccountId = doc.MailAccountId;
+  this.smtp.mailServerOutId = doc.id;
+  this.smtp.username = doc.username;
+}
+
+Smtp.prototype.onUpdate = function(doc) {
+  if (!doc.changed('state')) {
+    console.log("MAIL - Account " + doc.username + " SMTP UPDATE");
+    this.smtp = null;
+    this.smtp = nodemailer.createTransport(smtpTransport({
+      host: doc.host,
+      port: doc.port,
+      secure: doc.ssl,
+      debug: true,
+      auth: {
+        user: doc.username,
+        pass: doc.password
+      }
+    }));
+
+    this.smtp.mailAccountId = doc.MailAccountId;
+    this.smtp.mailServerOutId = doc.id;
+    this.smtp.username = doc.username;
+  }
+}
+
+Smtp.prototype.onRemove = function(doc) {
+  console.log("[MAIL - Account " + doc.username + " SMTP DESTROY");
+  this.smtp = null;
+}
+
+Smtp.prototype.onSend = function(mailMessage) {
+  var self = this;
+
+  if (mailMessage.status === 'SENDING') {
+    var _mRoom;
+    var _mMessage = mailMessage;
+    var _mFrom, _mTo, _mCc, _mBcc;
+
+    if (_mMessage.inReplyTo) {
+      return MailMessage
+        .findOne({
+          where: {
+            messageId: _mMessage.inReplyTo
+          }
+        })
+        .then(function(mailMessageParent) {
+          return mailMessageParent
+            .getMailRoom({
+              include: {
+                model: MailAccount
+              }
+            });
+        })
+        .then(function(mailRoom) {
+          _mRoom = mailRoom;
+          return _mRoom
+            .addMailMessage(_mMessage);
+        })
+        .then(function() {
+          return _mRoom
+            .addUser(_mMessage.UserId);
+        })
+        .then(function() {
+          var mail = {
+            status: _mMessage.status,
+            from: _mMessage.from,
+            to: _mMessage.to,
+            cc: _mMessage.cc,
+            subject: _mMessage.subject,
+            html: _mMessage.html,
+            text: _mMessage.html ? htmlToText.fromString(_mMessage.html, {
+              wordwrap: false
+            }) : null
+          };
+
+          if (_mMessage.MailAttachments) {
+            mail.attachments = _.map(_mMessage.MailAttachments, function(elm) {
+              return {
+                path: elm.path,
+                filename: elm.name
+              }
+            });
+          }
+
+          return self
+            .smtp
+            .sendMail(mail);
+        })
+        .then(function(info) {
+          return _mMessage
+            .update({
+              messageId: info.messageId,
+              status: 'SENT'
+            })
+            .then(function() {
+              return MailServerOut
+                .update({
+                  state: 'CONNECTED'
+                }, {
+                  where: {
+                    MailAccountId: _mRoom.MailAccountId
+                  }
+                });
+            });
+        })
+        .catch(function(err) {
+          return _mMessage
+            .update({
+              status: 'FAILED'
+            })
+            .then(function() {
+              return MailServerOut
+                .update({
+                  state: 'ERROR',
+                  source: err.errno
+                }, {
+                  where: {
+                    MailAccountId: _mRoom.MailAccountId
+                  }
+                });
+            });
+        });
+    } else {
+      return MailRoom
+        .findOrCreate({
+          where: {
+            id: _mMessage.MailRoomId
+          },
+          defaults: {
+            subject: _mMessage.subject,
+            from: _mMessage.from.join(';'),
+            MailAccountId: self.smtp.mailAccountId
+          },
+          include: {
+            model: MailAccount
+          }
+        })
+        .spread(function(mailRoom) {
+          _mRoom = mailRoom;
+          return _mRoom
+            .addMailMessage(_mMessage.id);
+        })
+        .then(function() {
+          return _mRoom
+            .addUser(_mMessage.UserId);
+        })
+        .then(function() {
+          var mail = {
+            status: _mMessage.status,
+            from: _mMessage.from,
+            to: _mMessage.to,
+            cc: _mMessage.cc,
+            subject: _mMessage.subject,
+            html: _mMessage.html,
+            text: _mMessage.html ? htmlToText.fromString(_mMessage.html, {
+              wordwrap: false
+            }) : null
+          };
+
+          if (_mMessage.MailAttachments) {
+            mail.attachments = _.map(_mMessage.MailAttachments, function(elm) {
+              return {
+                path: elm.path,
+                filename: elm.name
+              }
+            });
+          }
+          return self.smtp
+            .sendMail(mail);
+        })
+        .then(function(info) {
+          return _mMessage
+            .update({
+              messageId: info.messageId,
+              status: 'SENT'
+            })
+            .then(function() {
+              return MailServerOut
+                .update({
+                  state: 'CONNECTED'
+                }, {
+                  where: {
+                    MailAccountId: _mRoom.MailAccountId
+                  }
+                });
+            });
+        })
+        .catch(function(err) {
+          console.error('err', err);
+          return _mMessage
+            .update({
+              status: 'FAILED'
+            })
+            .then(function() {
+              return MailServerOut
+                .update({
+                  state: 'ERROR',
+                  source: err.errno
+                }, {
+                  where: {
+                    MailAccountId: _mRoom.MailAccountId
+                  }
+                });
+            });
+        });
+    }
+  }
+}
+
+module.exports = Smtp;
index 43d673d..7c38a56 100644 (file)
@@ -1 +1,200 @@
-var _0x51e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x73\x65\x72\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x75\x73\x65\x72\x20\x6F\x66\x66\x6C\x69\x6E\x65","\x6E\x61\x6D\x65","\x6C\x6F\x67","\x74\x68\x65\x6E","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x6E\x6F\x20\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x75\x73\x65\x72\x20\x6F\x6E\x6C\x69\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x74\x6F\x6F\x6C\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74\x2F\x61\x67\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x65\x6E\x71\x75\x69\x72\x79\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2F\x6D\x61\x69\x6C\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67\x2F\x74\x61\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x2F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x2F\x74\x72\x75\x6E\x6B\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2F\x75\x73\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x2F\x73\x6F\x75\x6E\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x74\x72\x69\x63\x2F\x6D\x65\x74\x72\x69\x63\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x73\x65\x72\x76\x69\x63\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79\x2F\x78\x63\x68\x61\x74\x74\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x66\x6F","\x5B\x25\x73\x5D\x20\x25\x73","\x61\x64\x64\x72\x65\x73\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x61\x75\x74\x68\x6F\x72\x69\x7A\x65","\x73\x6F\x63\x6B\x65\x74\x69\x6F\x2D\x6A\x77\x74","\x75\x73\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x68\x61\x6E\x64\x73\x68\x61\x6B\x65","\x3A","\x70\x6F\x72\x74","\x44\x4F\x4D\x41\x49\x4E","\x65\x6E\x76","\x71\x75\x65\x72\x79","\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44"];_0x51e6[0];var moment=require(_0x51e6[1]);var config=require(_0x51e6[2]);var User=require(_0x51e6[4])[_0x51e6[3]];function onDisconnect(_0x794fx5){if(_0x794fx5[_0x51e6[5]]){return User[_0x51e6[14]](_0x794fx5[_0x51e6[5]])[_0x51e6[11]](function(_0x794fx7){if(!_0x794fx7){throw  new Error(_0x51e6[12])};return _0x794fx7[_0x51e6[13]]({online:false})})[_0x51e6[11]](function(_0x794fx7){console[_0x51e6[10]](_0x51e6[8],_0x794fx7[_0x51e6[9]])})[_0x51e6[7]](function(_0x794fx6){console[_0x51e6[6]](_0x794fx6)})}else {console[_0x51e6[10]](_0x51e6[12])}}function onConnect(_0x794fx5){if(_0x794fx5[_0x51e6[5]]){return User[_0x51e6[14]](_0x794fx5[_0x51e6[5]])[_0x51e6[11]](function(_0x794fx7){if(!_0x794fx7){throw  new Error(_0x51e6[12])};return _0x794fx7[_0x51e6[13]]({online:true,lastLoginAt:moment()[_0x51e6[111]](_0x51e6[110])})})[_0x51e6[11]](function(_0x794fx7){console[_0x51e6[10]](_0x51e6[15],_0x794fx7[_0x51e6[9]]);if(_0x794fx7[_0x51e6[16]]!==_0x51e6[17]){require(_0x51e6[19])[_0x51e6[18]](_0x794fx5)};require(_0x51e6[20])[_0x51e6[18]](_0x794fx5);require(_0x51e6[21])[_0x51e6[18]](_0x794fx5);require(_0x51e6[22])[_0x51e6[18]](_0x794fx5);require(_0x51e6[23])[_0x51e6[18]](_0x794fx5);require(_0x51e6[24])[_0x51e6[18]](_0x794fx5);require(_0x51e6[25])[_0x51e6[18]](_0x794fx5);require(_0x51e6[26])[_0x51e6[18]](_0x794fx5);require(_0x51e6[27])[_0x51e6[18]](_0x794fx5);require(_0x51e6[28])[_0x51e6[18]](_0x794fx5);require(_0x51e6[29])[_0x51e6[18]](_0x794fx5);require(_0x51e6[30])[_0x51e6[18]](_0x794fx5);require(_0x51e6[31])[_0x51e6[18]](_0x794fx5);require(_0x51e6[32])[_0x51e6[18]](_0x794fx5);require(_0x51e6[33])[_0x51e6[18]](_0x794fx5);require(_0x51e6[34])[_0x51e6[18]](_0x794fx5);require(_0x51e6[35])[_0x51e6[18]](_0x794fx5);require(_0x51e6[36])[_0x51e6[18]](_0x794fx5);require(_0x51e6[37])[_0x51e6[18]](_0x794fx5);require(_0x51e6[38])[_0x51e6[18]](_0x794fx5);require(_0x51e6[39])[_0x51e6[18]](_0x794fx5);require(_0x51e6[40])[_0x51e6[18]](_0x794fx5);require(_0x51e6[41])[_0x51e6[18]](_0x794fx5);require(_0x51e6[42])[_0x51e6[18]](_0x794fx5);require(_0x51e6[43])[_0x51e6[18]](_0x794fx5);require(_0x51e6[44])[_0x51e6[18]](_0x794fx5);require(_0x51e6[45])[_0x51e6[18]](_0x794fx5);require(_0x51e6[46])[_0x51e6[18]](_0x794fx5);require(_0x51e6[47])[_0x51e6[18]](_0x794fx5);require(_0x51e6[48])[_0x51e6[18]](_0x794fx5);require(_0x51e6[49])[_0x51e6[18]](_0x794fx5);require(_0x51e6[50])[_0x51e6[18]](_0x794fx5);require(_0x51e6[51])[_0x51e6[18]](_0x794fx5);require(_0x51e6[52])[_0x51e6[18]](_0x794fx5);require(_0x51e6[53])[_0x51e6[18]](_0x794fx5);require(_0x51e6[54])[_0x51e6[18]](_0x794fx5);require(_0x51e6[55])[_0x51e6[18]](_0x794fx5);require(_0x51e6[56])[_0x51e6[18]](_0x794fx5);require(_0x51e6[57])[_0x51e6[18]](_0x794fx5);require(_0x51e6[58])[_0x51e6[18]](_0x794fx5);require(_0x51e6[59])[_0x51e6[18]](_0x794fx5);require(_0x51e6[60])[_0x51e6[18]](_0x794fx5);require(_0x51e6[61])[_0x51e6[18]](_0x794fx5);require(_0x51e6[62])[_0x51e6[18]](_0x794fx5);require(_0x51e6[63])[_0x51e6[18]](_0x794fx5);require(_0x51e6[64])[_0x51e6[18]](_0x794fx5);require(_0x51e6[65])[_0x51e6[18]](_0x794fx5);require(_0x51e6[66])[_0x51e6[18]](_0x794fx5);require(_0x51e6[67])[_0x51e6[18]](_0x794fx5);require(_0x51e6[68])[_0x51e6[18]](_0x794fx5);require(_0x51e6[69])[_0x51e6[18]](_0x794fx5);require(_0x51e6[70])[_0x51e6[18]](_0x794fx5);require(_0x51e6[71])[_0x51e6[18]](_0x794fx5);require(_0x51e6[72])[_0x51e6[18]](_0x794fx5);require(_0x51e6[73])[_0x51e6[18]](_0x794fx5);require(_0x51e6[74])[_0x51e6[18]](_0x794fx5);require(_0x51e6[75])[_0x51e6[18]](_0x794fx5);require(_0x51e6[76])[_0x51e6[18]](_0x794fx5);require(_0x51e6[77])[_0x51e6[18]](_0x794fx5);require(_0x51e6[78])[_0x51e6[18]](_0x794fx5);require(_0x51e6[79])[_0x51e6[18]](_0x794fx5);require(_0x51e6[80])[_0x51e6[18]](_0x794fx5);require(_0x51e6[81])[_0x51e6[18]](_0x794fx5);require(_0x51e6[82])[_0x51e6[18]](_0x794fx5);require(_0x51e6[83])[_0x51e6[18]](_0x794fx5);require(_0x51e6[84])[_0x51e6[18]](_0x794fx5);require(_0x51e6[85])[_0x51e6[18]](_0x794fx5);require(_0x51e6[86])[_0x51e6[18]](_0x794fx5);require(_0x51e6[87])[_0x51e6[18]](_0x794fx5);require(_0x51e6[88])[_0x51e6[18]](_0x794fx5);require(_0x51e6[89])[_0x51e6[18]](_0x794fx5);require(_0x51e6[90])[_0x51e6[18]](_0x794fx5);require(_0x51e6[91])[_0x51e6[18]](_0x794fx5);require(_0x51e6[92])[_0x51e6[18]](_0x794fx5);require(_0x51e6[93])[_0x51e6[18]](_0x794fx5);require(_0x51e6[94])[_0x51e6[18]](_0x794fx5);require(_0x51e6[95])[_0x51e6[18]](_0x794fx5);require(_0x51e6[96])[_0x51e6[18]](_0x794fx5);require(_0x51e6[97])[_0x51e6[18]](_0x794fx5);require(_0x51e6[98])[_0x51e6[18]](_0x794fx5);require(_0x51e6[99])[_0x51e6[18]](_0x794fx5);require(_0x51e6[100])[_0x51e6[18]](_0x794fx5);require(_0x51e6[101])[_0x51e6[18]](_0x794fx5);require(_0x51e6[102])[_0x51e6[18]](_0x794fx5);require(_0x51e6[103])[_0x51e6[18]](_0x794fx5);require(_0x51e6[104])[_0x51e6[18]](_0x794fx5);require(_0x51e6[105])[_0x51e6[18]](_0x794fx5);require(_0x51e6[106])[_0x51e6[18]](_0x794fx5);require(_0x51e6[107])[_0x51e6[18]](_0x794fx5);require(_0x51e6[108])[_0x51e6[18]](_0x794fx5);require(_0x51e6[109])[_0x51e6[18]](_0x794fx5)})[_0x51e6[7]](function(_0x794fx6){console[_0x51e6[6]](_0x794fx6)})}else {console[_0x51e6[10]](_0x51e6[12])};_0x794fx5[_0x51e6[116]](_0x51e6[112],function(_0x794fx9){console[_0x51e6[112]](_0x51e6[113],_0x794fx5[_0x51e6[114]],JSON[_0x51e6[115]](_0x794fx9,null,2))})}module[_0x51e6[117]]=function(_0x794fxa){_0x794fxa[_0x51e6[122]](require(_0x51e6[121])[_0x51e6[120]]({secret:config[_0x51e6[119]][_0x51e6[118]],handshake:true}));_0x794fxa[_0x51e6[116]](_0x51e6[123],function(_0x794fx5){_0x794fx5[_0x51e6[114]]=_0x794fx5[_0x51e6[124]][_0x51e6[114]]!==null?_0x794fx5[_0x51e6[124]][_0x51e6[114]][_0x51e6[114]]+_0x51e6[125]+_0x794fx5[_0x51e6[124]][_0x51e6[114]][_0x51e6[126]]:process[_0x51e6[128]][_0x51e6[127]];_0x794fx5[_0x51e6[5]]=_0x794fx5[_0x51e6[124]][_0x51e6[129]][_0x51e6[5]];_0x794fx5[_0x51e6[16]]=_0x794fx5[_0x51e6[124]][_0x51e6[129]][_0x51e6[16]];_0x794fx5[_0x51e6[9]]=_0x794fx5[_0x51e6[124]][_0x51e6[129]][_0x51e6[9]];_0x794fx5[_0x51e6[130]]=_0x794fx5[_0x51e6[124]][_0x51e6[129]][_0x51e6[130]];_0x794fx5[_0x51e6[131]]= new Date();_0x794fx5[_0x51e6[116]](_0x51e6[132],function(){onDisconnect(_0x794fx5);console[_0x51e6[112]](_0x51e6[133],_0x794fx5[_0x51e6[124]][_0x51e6[114]])});onConnect(_0x794fx5);console[_0x51e6[112]](_0x51e6[134],_0x794fx5[_0x51e6[124]][_0x51e6[114]])})}
\ No newline at end of file
+/**
+ * Socket.io configuration
+ */
+
+'use strict';
+
+var moment = require('moment');
+var config = require('./environment');
+var User = require('../models').User;
+
+function onDisconnect(socket) {
+  if (socket.userId) {
+    return User
+      .findById(socket.userId)
+      .then(function(user) {
+        if (!user) {
+          throw new Error('socket: no user found');
+        }
+        return user
+          .update({
+            online: false
+          });
+      })
+      .then(function(user) {
+        console.log('socket: user offline', user.name);
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  } else {
+    console.log('socket: no user found');
+  }
+}
+
+function onConnect(socket) {
+  if (socket.userId) {
+    return User
+      .findById(socket.userId)
+      .then(function(user) {
+        if (!user) {
+          throw new Error('socket: no user found');
+        }
+        return user
+          .update({
+            online: true,
+            lastLoginAt: moment().format("YYYY-MM-DD HH:mm:ss")
+          })
+      })
+      .then(function(user) {
+        console.log('socket: user online', user.name);
+        // Custom admin/user socket modules
+        if (user.role !== 'agent') {
+          require('./tools/dashboard').register(socket);
+        }
+
+        // Insert sockets below
+        require('../api/report_call/report_call.socket').register(socket);
+        require('../api/chat_proactive_action/chat_proactive_action.socket').register(socket);
+        // require('../api/report_jscripty_input/report_jscripty_input.socket').register(socket);
+        // require('../api/report_jscripty_question/report_jscripty_question.socket').register(socket);
+        // require('../api/report_jscripty_session/report_jscripty_session.socket').register(socket);
+        require('../api/canned_answer/canned_answer.socket').register(socket);
+        require('../api/chat_websites_field/chat_websites_field.socket').register(socket);
+        require('../api/voice_recording/voice_recording.socket').register(socket);
+        require('../api/license/license.socket').register(socket);
+        require('../api/jscripty_project/jscripty_project.socket').register(socket);
+
+        //Ordered alphabetically
+        require('../api/agent/agent.socket').register(socket);
+        require('../api/ami/ami.socket').register(socket);
+        require('../api/automation/automation.socket').register(socket);
+        require('../api/chat_application/chat_application.socket').register(socket);
+        require('../api/chat_enquiry/enquiry.socket').register(socket);
+        require('../api/chat_message/chat_message.socket').register(socket);
+        require('../api/chat_queue/chat_queue.socket').register(socket);
+        require('../api/chat_room/chat_room.socket').register(socket);
+        require('../api/chat_visitor/chat_visitor.socket').register(socket);
+        require('../api/chat_website/chat_website.socket').register(socket);
+        require('../api/company/company.socket').register(socket);
+        require('../api/contact_manager/contact_manager.socket').register(socket);
+        require('../api/dashboard/dashboard.socket').register(socket);
+        require('../api/desk_account/desk_account.socket').register(socket);
+        require('../api/desk_configuration/desk_configuration.socket').register(socket);
+        require('../api/desk_field/desk_field.socket').register(socket);
+        require('../api/fax_account/fax_account.socket').register(socket);
+        require('../api/fax_application/fax_application.socket').register(socket);
+        require('../api/fax_message/fax_message.socket').register(socket);
+        require('../api/fax_queue/fax_queue.socket').register(socket);
+        require('../api/fax_room/fax_room.socket').register(socket);
+        require('../api/freshdesk_account/freshdesk_account.socket').register(socket);
+        require('../api/freshdesk_configuration/freshdesk_configuration.socket').register(socket);
+        require('../api/freshdesk_field/freshdesk_field.socket').register(socket);
+        require('../api/integration/integration.socket').register(socket);
+        require('../api/interval/interval.socket').register(socket);
+        require('../api/mail_account/mail_account.socket').register(socket);
+        require('../api/mail_application/mail_application.socket').register(socket);
+        require('../api/mail_attachment/mail_attachment.socket').register(socket);
+        require('../api/mail_message/mail_message.socket').register(socket);
+        require('../api/mail_queue/mail_queue.socket').register(socket);
+        require('../api/mail_room/mail_room.socket').register(socket);
+        require('../api/mail_server_in/mail_server_in.socket').register(socket);
+        require('../api/mail_template/mail_template.socket').register(socket);
+        require('../api/module/module.socket').register(socket);
+        require('../api/motionbar/motionbar.socket').register(socket);
+        require('../api/default_report/default_report.socket').register(socket);
+        require('../api/custom_report/custom_report.socket').register(socket);
+        require('../api/report_tree/report_tree.socket').register(socket);
+        require('../api/report_agent/report_agent.socket').register(socket);
+        require('../api/report_chat/report_chat.socket').register(socket);
+        require('../api/report_chat_session/report_chat_session.socket').register(socket);
+        require('../api/report_integration/report_integration.socket').register(socket);
+        require('../api/report_mail/report_mail.socket').register(socket);
+        require('../api/report_mail_session/report_mail_session.socket').register(socket);
+        require('../api/report_queue/report_queue.socket').register(socket);
+        require('../api/salesforce_account/salesforce_account.socket').register(socket);
+        require('../api/salesforce_configuration/salesforce_configuration.socket').register(socket);
+        require('../api/salesforce_field/salesforce_field.socket').register(socket);
+        require('../api/setting/setting.socket').register(socket);
+        require('../api/square_odbc/square_odbc.socket').register(socket);
+        require('../api/square_project/square_project.socket').register(socket);
+        require('../api/sugarcrm_account/sugarcrm_account.socket').register(socket);
+        require('../api/sugarcrm_configuration/sugarcrm_configuration.socket').register(socket);
+        require('../api/sugarcrm_field/sugarcrm_field.socket').register(socket);
+        require('../api/tag/tag.socket').register(socket);
+        require('../api/team/team.socket').register(socket);
+        require('../api/trigger/trigger.socket').register(socket);
+        require('../api/trunk/trunk.socket').register(socket);
+        require('../api/user/user.socket').register(socket);
+        require('../api/sound/sound.socket').register(socket);
+        require('../api/user_has_chat_queue/user_has_chat_queue.socket').register(socket);
+        require('../api/user_has_chat_room/user_has_chat_room.socket').register(socket);
+        require('../api/user_has_fax_queue/user_has_fax_queue.socket').register(socket);
+        require('../api/user_has_mail_queue/user_has_mail_queue.socket').register(socket);
+        require('../api/user_has_team/user_has_team.socket').register(socket);
+        require('../api/user_has_voice_queue/user_has_voice_queue.socket').register(socket);
+        require('../api/user_has_service/user_has_service.socket').register(socket);
+        require('../api/variable/variable.socket').register(socket);
+        require('../api/chanspy/chanspy.socket').register(socket);
+        require('../api/metric/metric.socket').register(socket);
+        require('../api/extracted_report/extracted_report.socket').register(socket);
+        require('../api/voice_context/voice_context.socket').register(socket);
+        require('../api/voice_extension/voice_extension.socket').register(socket);
+        require('../api/voice_musiconhold/voice_musiconhold.socket').register(socket);
+        require('../api/voice_queue/voice_queue.socket').register(socket);
+        require('../api/service/service.socket').register(socket);
+        require('../api/voice_voicemail/voice_voicemail.socket').register(socket);
+        require('../api/voice_voicemail_messages/voice_voicemail_messages.socket').register(socket);
+        require('../api/xchatty/xchatty.socket').register(socket);
+        require('../api/zendesk_account/zendesk_account.socket').register(socket);
+        require('../api/zendesk_configuration/zendesk_configuration.socket').register(socket);
+        require('../api/zendesk_field/zendesk_field.socket').register(socket);
+
+      })
+      .catch(function(err) {
+        console.error(err);
+      });
+  } else {
+    console.log('socket: no user found');
+  }
+
+  socket.on('info', function(data) {
+    console.info('[%s] %s', socket.address, JSON.stringify(data, null, 2));
+  });
+}
+
+module.exports = function(socketio) {
+  // socket.io (v1.x.x) is powered by debug.
+  // In order to see all the debug output, set DEBUG (in server/config/local.env.js) to including the desired scope.
+  //
+  // ex: DEBUG: "http*,socket.io:socket"
+
+  // We can authenticate socket.io users and access their token through socket.handshake.decoded_token
+  //
+  // 1. You will need to send the token in `client/components/socket/socket.service.js`
+  //
+  // 2. Require authentication here:
+  socketio.use(require('socketio-jwt').authorize({
+    secret: config.session.secret,
+    handshake: true
+  }));
+
+  socketio.on('connection', function(socket) {
+    socket.address = socket.handshake.address !== null ? socket.handshake.address.address + ':' + socket.handshake.address.port : process.env.DOMAIN;
+    socket.userId = socket.handshake.query.userId;
+    socket.role = socket.handshake.query.role;
+    socket.name = socket.handshake.query.name;
+    socket.source = socket.handshake.query.source;
+    socket.connectedAt = new Date();
+
+    // Call onDisconnect.
+    socket.on('disconnect', function() {
+      onDisconnect(socket);
+      console.info('[%s] SOCKET DISCONNECTED', socket.handshake.address);
+    });
+
+    // Call onConnect.
+    onConnect(socket);
+    console.info('[%s] SOCKET CONNECTED', socket.handshake.address);
+  });
+};
index a592141..24ecca5 100644 (file)
@@ -1 +1,116 @@
-var _0xf96d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x61\x6C\x6C","\x61\x75\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf96d[0];var fs=require(_0xf96d[1]);var util=require(_0xf96d[2]);var path=require(_0xf96d[3]);var config=require(_0xf96d[4]);var ChanSpyModel=require(_0xf96d[6])[_0xf96d[5]];var User=require(_0xf96d[6])[_0xf96d[7]];var VoiceExtension=require(_0xf96d[6])[_0xf96d[8]];var sequelize=require(_0xf96d[6])[_0xf96d[9]];function ChanSpy(){ChanSpyModel[_0xf96d[10]](function(_0x506dxa){createSpyExtensions(_0x506dxa)});ChanSpyModel[_0xf96d[11]](function(_0x506dxa){deleteSpyExtensions(_0x506dxa);createSpyExtensions(_0x506dxa)});ChanSpyModel[_0xf96d[12]](function(_0x506dxa){deleteSpyExtensions(_0x506dxa)})}function deleteSpyExtensions(_0x506dxa){return sequelize[_0xf96d[17]](function(_0x506dxd){return VoiceExtension[_0xf96d[16]]({where:{ChanSpyId:_0x506dxa[_0xf96d[15]]},transaction:_0x506dxd})})[_0xf96d[14]](function(_0x506dxc){console[_0xf96d[13]](_0x506dxc)})}function createSpyExtensions(_0x506dxa){return sequelize[_0xf96d[17]](function(_0x506dxd){return User[_0xf96d[37]](_0xf96d[36])[_0xf96d[35]]({where:{chanspy:true}})[_0xf96d[34]](function(_0x506dxf){var _0x506dx10=[];_0x506dxf[_0xf96d[33]](function(_0x506dx11){var _0x506dx12=[];var _0x506dx13=1;if(_0x506dxa[_0xf96d[19]]){_0x506dx12[_0xf96d[28]]({context:_0xf96d[20],exten:util[_0xf96d[24]](_0xf96d[21],_0x506dxa[_0xf96d[22]],_0x506dx11[_0xf96d[23]]),priority:_0x506dx13,app:_0xf96d[25],appdata:_0x506dxa[_0xf96d[26]],UserId:_0x506dx11[_0xf96d[15]],ChanSpyId:_0x506dxa[_0xf96d[15]],type:_0xf96d[27]});_0x506dx13++};_0x506dx12[_0xf96d[28]]({context:_0xf96d[20],exten:util[_0xf96d[24]](_0xf96d[21],_0x506dxa[_0xf96d[22]],_0x506dx11[_0xf96d[23]]),priority:_0x506dx13,app:_0xf96d[5],appdata:util[_0xf96d[24]](_0xf96d[29],_0x506dx11[_0xf96d[23]],_0x506dxa[_0xf96d[30]]),UserId:_0x506dx11[_0xf96d[15]],ChanSpyId:_0x506dxa[_0xf96d[15]],type:_0xf96d[27]});_0x506dx13=1;if(_0x506dxa[_0xf96d[19]]){_0x506dx12[_0xf96d[28]]({context:_0xf96d[20],exten:util[_0xf96d[24]](_0xf96d[21],_0x506dxa[_0xf96d[22]],_0x506dx11[_0xf96d[31]]),priority:_0x506dx13,app:_0xf96d[25],appdata:_0x506dxa[_0xf96d[26]],UserId:_0x506dx11[_0xf96d[15]],ChanSpyId:_0x506dxa[_0xf96d[15]],type:_0xf96d[27]});_0x506dx13++};_0x506dx12[_0xf96d[28]]({context:_0xf96d[20],exten:util[_0xf96d[24]](_0xf96d[21],_0x506dxa[_0xf96d[22]],_0x506dx11[_0xf96d[31]]),priority:_0x506dx13,app:_0xf96d[5],appdata:util[_0xf96d[24]](_0xf96d[29],_0x506dx11[_0xf96d[23]],_0x506dxa[_0xf96d[30]]),UserId:_0x506dx11[_0xf96d[15]],ChanSpyId:_0x506dxa[_0xf96d[15]],type:_0xf96d[27]});_0x506dx10[_0xf96d[28]](VoiceExtension[_0xf96d[32]](_0x506dx12,{transaction:_0x506dxd}))});return _0x506dx10})[_0xf96d[18]]()})[_0xf96d[14]](function(_0x506dxc){console[_0xf96d[13]](_0x506dxc)})}module[_0xf96d[38]]=ChanSpy
\ No newline at end of file
+'use strict';
+
+var fs = require('fs');
+var util = require('util');
+var path = require('path');
+var config = require('../../config/environment');
+var ChanSpyModel = require('../../models').ChanSpy;
+var User = require('../../models').User;
+var VoiceExtension = require('../../models').VoiceExtension;
+var sequelize = require('../../models').sequelize;
+
+
+function ChanSpy() {
+  ChanSpyModel.afterCreate(function(doc) {
+    createSpyExtensions(doc);
+  })
+  ChanSpyModel.afterUpdate(function(doc) {
+    deleteSpyExtensions(doc);
+    createSpyExtensions(doc);
+  })
+  ChanSpyModel.afterDelete(function(doc) {
+    deleteSpyExtensions(doc);
+  })
+}
+
+
+function deleteSpyExtensions(doc) {
+  return sequelize.transaction(function(t) {
+      return VoiceExtension
+        .destroy({
+          where: {
+            ChanSpyId: doc.id
+          },
+          transaction: t
+        });
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function createSpyExtensions(doc) {
+  return sequelize.transaction(function(t) {
+      return User
+        .scope('agent')
+        .findAll({
+          where: {
+            chanspy: true
+          }
+        })
+        .then(function(agents) {
+          var bulkSpies = [];
+          agents.forEach(function(elem) {
+            var spies = [];
+            var priority = 1;
+            if (doc.auth) {
+              spies.push({
+                context: 'from-sip',
+                exten: util.format('%s%s', doc.prefix, elem.name),
+                priority: priority,
+                app: 'Authenticate',
+                appdata: doc.password,
+                UserId: elem.id,
+                ChanSpyId: doc.id,
+                type: 'system'
+              });
+              priority++;
+            }
+            spies.push({
+              context: 'from-sip',
+              exten: util.format('%s%s', doc.prefix, elem.name),
+              priority: priority,
+              app: 'ChanSpy',
+              appdata: util.format('SIP/%s,%s', elem.name, doc.options),
+              UserId: elem.id,
+              ChanSpyId: doc.id,
+              type: 'system'
+            });
+            priority = 1;
+            if (doc.auth) {
+              spies.push({
+                context: 'from-sip',
+                exten: util.format('%s%s', doc.prefix, elem.internal),
+                priority: priority,
+                app: 'Authenticate',
+                appdata: doc.password,
+                UserId: elem.id,
+                ChanSpyId: doc.id,
+                type: 'system'
+              });
+              priority++;
+            }
+            spies.push({
+              context: 'from-sip',
+              exten: util.format('%s%s', doc.prefix, elem.internal),
+              priority: priority,
+              app: 'ChanSpy',
+              appdata: util.format('SIP/%s,%s', elem.name, doc.options),
+              UserId: elem.id,
+              ChanSpyId: doc.id,
+              type: 'system'
+            });
+            bulkSpies.push(VoiceExtension.bulkCreate(spies, {
+              transaction: t
+            }));
+          });
+          return bulkSpies;
+        })
+        .all();
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+module.exports = ChanSpy;
index a15c749..b6a70e1 100644 (file)
@@ -1 +1,50 @@
-var _0x15a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72\x49\x64","\x45\x72\x72\x6F\x72\x3A","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64","\x73\x65\x72\x76\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x15a1[0];var _=require(_0x15a1[1]);var moment=require(_0x15a1[2]);var ChatRoomModel=require(_0x15a1[4])[_0x15a1[3]];var ChatVisitorModel=require(_0x15a1[4])[_0x15a1[5]];var ReportChatSessionModel=require(_0x15a1[4])[_0x15a1[6]];function ChatRoom(){ChatRoomModel[_0x15a1[25]](function(_0x2b8bx7){if(_0x2b8bx7[_0x15a1[8]](_0x15a1[7])&&_0x2b8bx7[_0x15a1[7]]===_0x15a1[9]){if(_0x2b8bx7[_0x15a1[10]]){return ChatVisitorModel[_0x15a1[24]](_0x2b8bx7.ChatVisitorId)[_0x15a1[18]](function(_0x2b8bxa){if(_0x2b8bxa){var _0x2b8bxb=_[_0x15a1[22]](_0x2b8bxa,{status:_0x15a1[21]});return _0x2b8bxb[_0x15a1[23]]()}})[_0x15a1[18]](function(){return ReportChatSessionModel[_0x15a1[20]]({where:{roomid:_0x2b8bx7[_0x15a1[19]]}})})[_0x15a1[18]](function(_0x2b8bx9){if(_0x2b8bx9){return _0x2b8bx9[_0x15a1[17]]({complete:true,completeReason:_0x2b8bx7[_0x15a1[14]],completeAt:moment()[_0x15a1[16]](_0x15a1[15])})}})[_0x15a1[13]](function(_0x2b8bx8){console[_0x15a1[12]](_0x15a1[11],_0x2b8bx8)})}}})}module[_0x15a1[26]]=ChatRoom
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var moment = require('moment');
+
+var ChatRoomModel = require('../../models').ChatRoom;
+var ChatVisitorModel = require('../../models').ChatVisitor;
+var ReportChatSessionModel = require('../../models').ReportChatSession;
+
+function ChatRoom() {
+  ChatRoomModel.afterUpdate(function(doc) {
+    if (doc.changed('status') && doc.status === 'CLOSED') {
+      if (doc.ChatVisitorId) {
+        return ChatVisitorModel
+          .findById(doc.ChatVisitorId)
+          .then(function(chatVisitor) {
+            if (chatVisitor) {
+              var updated = _.merge(chatVisitor, {
+                status: 'served'
+              });
+              return updated.save();
+            }
+          })
+          .then(function() {
+            return ReportChatSessionModel
+              .find({
+                where: {
+                  roomid: doc.id
+                }
+              })
+          })
+          .then(function(reportChatSession) {
+            if (reportChatSession) {
+              return reportChatSession
+                .update({
+                  complete: true,
+                  completeReason: doc.completeReason,
+                  completeAt: moment().format("YYYY-MM-DD HH:mm:ss")
+                })
+            }
+          })
+          .catch(function(err) {
+            console.log('Error:', err);
+          });
+      }
+    }
+  })
+}
+
+module.exports = ChatRoom;
index 3fb9f6a..f829996 100644 (file)
@@ -1 +1,307 @@
-var _0xd49c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x63\x68\x61\x6E\x67\x65\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x63\x6F\x75\x6E\x74","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x63\x74\x69\x76\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x6C\x6F\x67","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x6E\x73\x77\x65\x72\x65\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x76\x61\x6C\x75\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x75\x6E\x6D\x61\x6E\x61\x6E\x67\x65\x64","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x67\x6C\x6F\x62\x61\x6C\x64\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x76\x67\x64\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22\x2C\x20\x31\x2C\x20\x30\x29\x29\x20\x2F\x20\x43\x4F\x55\x4E\x54\x28\x2A\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22"];_0xd49c[0];var sequelize=require(_0xd49c[2])[_0xd49c[1]];var models=require(_0xd49c[2]);exports[_0xd49c[3]]=function(_0xfd84x3){models[_0xd49c[5]][_0xd49c[4]](function(_0xfd84x4){onWaiting(_0xfd84x3,_0xfd84x4)});models[_0xd49c[5]][_0xd49c[8]](function(_0xfd84x4){if(_0xfd84x4[_0xd49c[7]](_0xd49c[6])){onWaiting(_0xfd84x3,_0xfd84x4);onActive(_0xfd84x3,_0xfd84x4)}});models[_0xd49c[5]][_0xd49c[8]](function(_0xfd84x4){if(_0xfd84x4[_0xd49c[7]](_0xd49c[9])||_0xfd84x4[_0xd49c[7]](_0xd49c[10])){onAbandon(_0xfd84x3,_0xfd84x4);onActive(_0xfd84x3,_0xfd84x4);onAvgAnswerTime(_0xfd84x3,_0xfd84x4);onAvgTalkTime(_0xfd84x3,_0xfd84x4);onAbandonRate(_0xfd84x3,_0xfd84x4);onAnswerRate(_0xfd84x3,_0xfd84x4);onTotalOffered(_0xfd84x3,_0xfd84x4);onUnmanaged(_0xfd84x3,_0xfd84x4)}});models[_0xd49c[13]][_0xd49c[8]](function(_0xfd84x4){if(_0xfd84x4[_0xd49c[7]](_0xd49c[11])){manualOutboundAnswerRate(_0xfd84x3,_0xfd84x4);manualOutboundAnswered(_0xfd84x3,_0xfd84x4);manualOutbound(_0xfd84x3,_0xfd84x4)};if(_0xfd84x4[_0xd49c[7]](_0xd49c[12])){manualOutboundAvgDuration(_0xfd84x3,_0xfd84x4);manualOutboundGlobalDuration(_0xfd84x3,_0xfd84x4)}})};function onWaiting(_0xfd84x3,_0xfd84x4){return models[_0xd49c[5]][_0xd49c[19]]({where:{queuecallerleaveAt:null}})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[16],{value:_0xfd84x7})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onActive(_0xfd84x3,_0xfd84x4){return models[_0xd49c[5]][_0xd49c[19]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[20],{value:_0xfd84x7})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onAbandon(_0xfd84x3,_0xfd84x4){return models[_0xd49c[5]][_0xd49c[19]]({where:{queuecallerabandon:true}})[_0xd49c[18]](function(_0xfd84x7){console[_0xd49c[22]](_0xd49c[21]);_0xfd84x3[_0xd49c[17]](_0xd49c[21],{value:_0xfd84x7})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onComplete(_0xfd84x3,_0xfd84x4){return models[_0xd49c[5]][_0xd49c[19]]({where:{queuecallercomplete:true}})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[23],{value:_0xfd84x7})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onAvgAnswerTime(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[26],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[24],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onAvgTalkTime(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[31],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[30],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onAnswerRate(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[33],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[32],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onAbandonRate(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[35],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[34],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onTotalOffered(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[37],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[36],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function onUnmanaged(_0xfd84x3,_0xfd84x4){return models[_0xd49c[5]][_0xd49c[19]]({where:{queuecallerexit:true}})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[38],{value:_0xfd84x7})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function manualOutbound(_0xfd84x3,_0xfd84x4){console[_0xd49c[22]](_0xd49c[39]);return models[_0xd49c[13]][_0xd49c[19]]({where:{type:_0xd49c[41]}})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[40],{value:_0xfd84x7})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function manualOutboundGlobalDuration(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[43],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[42],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function manualOutboundAvgDuration(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[45],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[44],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function manualOutboundAnswered(_0xfd84x3,_0xfd84x4){return models[_0xd49c[13]][_0xd49c[19]]({where:{disposition:_0xd49c[47],type:_0xd49c[41]}})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[46],{value:_0xfd84x7})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}function manualOutboundAnswerRate(_0xfd84x3,_0xfd84x4){return sequelize[_0xd49c[29]](_0xd49c[49],{type:sequelize[_0xd49c[28]][_0xd49c[27]]})[_0xd49c[18]](function(_0xfd84x7){_0xfd84x3[_0xd49c[17]](_0xd49c[48],{value:_0xfd84x7[0][_0xd49c[25]]})})[_0xd49c[15]](function(_0xfd84x6){console[_0xd49c[14]](_0xfd84x6)})}
\ No newline at end of file
+/**
+ * Broadcast updates to client when the model changes
+ */
+
+'use strict';
+
+var sequelize = require('../../models').sequelize;
+var models = require('../../models');
+
+exports.register = function(socket) {
+  // Inbound Events
+  models.ReportQueue.afterCreate(function(doc) {
+    onWaiting(socket, doc);
+  });
+  models.ReportQueue.afterUpdate(function(doc) {
+    if (doc.changed('queuecallerleaveAt')) {
+      onWaiting(socket, doc);
+      onActive(socket, doc);
+    }
+  });
+  models.ReportQueue.afterUpdate(function(doc) {
+    if (doc.changed('queuecallerabandon') || doc.changed('queuecallercomplete')) {
+      onAbandon(socket, doc);
+      onComplete(socket, doc);
+      onActive(socket, doc);
+      onAvgAnswerTime(socket, doc);
+      onAvgTalkTime(socket, doc);
+      onAbandonRate(socket, doc);
+      onAnswerRate(socket, doc);
+      onTotalOffered(socket, doc);
+      onUnmanaged(socket, doc);
+    }
+  });
+
+  // Outbound Events
+  models.ReportCall.afterUpdate(function(doc) {
+    if (doc.changed('disposition')) {
+      manualOutboundAnswerRate(socket, doc);
+      manualOutboundAnswered(socket, doc);
+      manualOutbound(socket, doc);
+    }
+    if (doc.changed('duration')) {
+      manualOutboundAvgDuration(socket, doc);
+      manualOutboundGlobalDuration(socket, doc);
+    }
+  });
+}
+
+function onWaiting(socket, doc) {
+  return models
+    .ReportQueue
+    .count({
+      where: {
+        queuecallerleaveAt: null
+      }
+    })
+    .then(function(data) {
+      socket.emit('dashboard:waiting', {
+        value: data
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onActive(socket, doc) {
+  return models
+    .ReportQueue
+    .count({
+      where: {
+        queuecallerexit: false,
+        queuecallerabandon: false,
+        queuecallercomplete: false,
+        queuecallerleaveAt: {
+          $ne: null
+        }
+      }
+    })
+    .then(function(data) {
+      socket.emit('dashboard:active', {
+        value: data
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onAbandon(socket, doc) {
+  return models
+    .ReportQueue
+    .count({
+      where: {
+        queuecallerabandon: true
+      }
+    })
+    .then(function(data) {
+      console.log('dashboard:abandoned');
+      socket.emit('dashboard:abandoned', {
+        value: data
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onComplete(socket, doc) {
+  return models
+    .ReportQueue
+    .count({
+      where: {
+        queuecallercomplete: true
+      }
+    })
+    .then(function(data) {
+      socket.emit('dashboard:answered', {
+        value: data
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onAvgAnswerTime(socket, doc) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as value FROM report_agent WHERE agentcomplete = 1', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:avganswertime', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onAvgTalkTime(socket, doc) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(ROUND(AVG(talktime), 0)) as value FROM report_agent WHERE agentcomplete = 1', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:avgtalktime', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onAnswerRate(socket, doc) {
+  return sequelize
+    .query('SELECT ROUND(SUM(queuecallercomplete) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:answerrate', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+// Get Answered Calls
+function onAbandonRate(socket, doc) {
+  return sequelize
+    .query('SELECT ROUND(SUM(queuecallerabandon) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:abandonrate', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onTotalOffered(socket, doc) {
+  return sequelize
+    .query('SELECT COUNT(distinct uniqueid) as value FROM report_queue', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:totaloffered', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+function onUnmanaged(socket, doc) {
+  return models
+    .ReportQueue
+    .count({
+      where: {
+        queuecallerexit: true
+      }
+    })
+    .then(function(data) {
+      socket.emit('dashboard:unmananged', {
+        value: data
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+// Get Answered Calls
+function manualOutbound(socket, doc) {
+  console.log('manualOutbound');
+  return models
+    .ReportCall
+    .count({
+      where: {
+        type: 'outbound'
+      }
+    })
+    .then(function(data) {
+      socket.emit('dashboard:manualoutbound', {
+        value: data
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+// Get Answered Calls
+function manualOutboundGlobalDuration(socket, doc) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(SUM(duration)) as value FROM report_call WHERE type=\"outbound\"', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:manualoutboundglobalduration', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+// Get Answered Calls
+function manualOutboundAvgDuration(socket, doc) {
+  return sequelize
+    .query('SELECT SEC_TO_TIME(ROUND(AVG(duration), 0)) as value FROM report_call WHERE type=\"outbound\"', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:manualoutboundavgduration', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+// Get Answered Calls
+function manualOutboundAnswered(socket, doc) {
+  return models
+    .ReportCall
+    .count({
+      where: {
+        disposition: 'ANSWERED',
+        type: 'outbound'
+      }
+    })
+    .then(function(data) {
+      socket.emit('dashboard:manualoutboundanswered', {
+        value: data
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+// Get Answered Calls
+function manualOutboundAnswerRate(socket, doc) {
+  return sequelize
+    .query('SELECT ROUND(SUM(IF(disposition=\"ANSWERED\", 1, 0)) / COUNT(*) * 100, 1) as value FROM report_call WHERE type=\"outbound\"', {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(data) {
+      socket.emit('dashboard:manualoutboundanswerrate', {
+        value: data[0].value
+      });
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
index fb74aa6..8e605bb 100644 (file)
@@ -1 +1,14 @@
-var _0x67fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2F\x75\x73\x65\x72","\x2E\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2E\x2F\x63\x68\x61\x74\x52\x6F\x6F\x6D","\x65\x78\x70\x6F\x72\x74\x73"];_0x67fe[0];var Interval=require(_0x67fe[1]);var User=require(_0x67fe[2]);var ChanSpy=require(_0x67fe[3]);var ChatRoom=require(_0x67fe[4]);module[_0x67fe[5]]=function(){ new Interval(); new User(); new ChanSpy(); new ChatRoom()}
\ No newline at end of file
+'use strict';
+
+var Interval = require('./interval');
+var User = require('./user');
+var ChanSpy = require('./chanspy');
+var ChatRoom = require('./chatRoom');
+
+module.exports = function() {
+  // Tools Mangament
+  new Interval();
+  new User();
+  new ChanSpy();
+  new ChatRoom();
+}
index 4b3b3c6..223b7bf 100644 (file)
@@ -1 +1,74 @@
-var _0x3b42=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x62\x65\x66\x6F\x72\x65\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x63\x61\x74\x63\x68","\x50\x52\x49\x4D\x41\x52\x59","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x61\x70\x70","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x49\x44","\x61\x70\x70\x64\x61\x74\x61","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x3b42[0];var _=require(_0x3b42[1]);var util=require(_0x3b42[2]);var IntervalModel=require(_0x3b42[4])[_0x3b42[3]];var VoiceExtension=require(_0x3b42[4])[_0x3b42[5]];var veUtil=require(_0x3b42[6]);var sequelize=require(_0x3b42[4])[_0x3b42[7]];var Applications=veUtil[_0x3b42[8]];function Interval(){console[_0x3b42[10]](_0x3b42[9]);IntervalModel[_0x3b42[11]](function(_0xd900x9){updatevoiceExtension(_0xd900x9)});IntervalModel[_0x3b42[13]](function(_0xd900x9){if(_0xd900x9[_0x3b42[12]]!==null){updatevoiceExtension(_0xd900x9)}});IntervalModel[_0x3b42[14]](function(_0xd900x9){if(_0xd900x9[_0x3b42[12]]!==null){updatevoiceExtension(_0xd900x9)}})}function updatevoiceExtension(_0xd900x9){var _0xd900xb=_0xd900x9[_0x3b42[12]]===null?_0xd900x9[_0x3b42[15]]:_0xd900x9[_0x3b42[12]];return VoiceExtension[_0x3b42[33]]({where:{VoiceExtensionId:null},include:[{model:VoiceExtension,as:_0x3b42[8],where:{IntervalId:_0xd900xb},attributes:[_0x3b42[28],_0x3b42[29],_0x3b42[12],_0x3b42[30],_0x3b42[31],_0x3b42[32]]}]})[_0x3b42[27]](function(_0xd900xd){_0xd900xd[_0x3b42[26]](function(_0xd900xe){return sequelize[_0x3b42[25]](function(_0xd900xf){return veUtil[_0x3b42[24]]({body:_0xd900xe[_0x3b42[23]],params:{id:_0xd900xe[_0x3b42[15]]}},_0xd900xf)})[_0x3b42[16]](sequelize.UniqueConstraintError,function(_0xd900xc){if(_0xd900xc[_0x3b42[18]][_0x3b42[17]]){_0xd900xc[_0x3b42[19]]=_0x3b42[20];_0xd900xc[_0x3b42[21]]=_0x3b42[22]};console[_0x3b42[10]](_0xd900xc)})[_0x3b42[16]](function(_0xd900xc){console[_0x3b42[10]](_0xd900xc)})})})[_0x3b42[16]](function(_0xd900xc){console[_0x3b42[10]](_0xd900xc)})}module[_0x3b42[34]]=Interval
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var util = require('util');
+var IntervalModel = require('../../models').Interval;
+var VoiceExtension = require('../../models').VoiceExtension;
+var veUtil = require('../../utils/voice_extension');
+var sequelize = require('../../models').sequelize;
+var Applications = veUtil.Applications;
+
+function Interval() {
+  console.log('Interval Initialization..');
+  IntervalModel.afterUpdate(function(interval) {
+    updatevoiceExtension(interval);
+  })
+
+  IntervalModel.beforeDestroy(function(interval) {
+    if (interval.IntervalId !== null) {
+      updatevoiceExtension(interval);
+    }
+  })
+
+  IntervalModel.afterCreate(function(interval) {
+    if (interval.IntervalId !== null) {
+      updatevoiceExtension(interval);
+    }
+  })
+}
+
+function updatevoiceExtension(interval) {
+  var IntervalId = interval.IntervalId === null ? interval.id : interval.IntervalId;
+  return VoiceExtension
+    .findAll({
+      where: {
+        VoiceExtensionId: null
+      },
+      include: [{
+        model: VoiceExtension,
+        as: 'Applications',
+        where: {
+          IntervalId: IntervalId
+        },
+        attributes: ['app', 'interval', 'IntervalId', 'callerID', 'appdata', 'type']
+      }]
+    })
+    .then(function(voiceExtensions) {
+      voiceExtensions.forEach(function(elem) {
+        return sequelize.transaction(function(t) {
+            return veUtil.routeUpdate({
+              body: elem.dataValues,
+              params: {
+                id: elem.id
+              }
+            }, t);
+          })
+          .catch(sequelize.UniqueConstraintError, function(err) {
+            if (err.fields.PRIMARY) {
+              err.message = 'Extension/context combination already exist';
+              err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
+            }
+            console.log(err);
+          })
+          .catch(function(err) {
+            console.log(err);
+          });
+      });
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+
+module.exports = Interval;
index 63e6d88..74cef06 100644 (file)
@@ -1 +1,215 @@
-var _0xe4ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x68\x61\x6E\x53\x70\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x68\x61\x6E\x73\x70\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x61\x74\x63\x68","\x61\x6C\x6C","\x61\x75\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x69\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x73\x61\x76\x65","\x65\x78\x74\x65\x6E","\x5F\x70\x72\x65\x76\x69\x6F\x75\x73\x44\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x61\x70\x70\x64\x61\x74\x61","\x53\x49\x50\x2F","\x67\x65\x74\x55\x73\x65\x72\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x44\x69\x61\x6C","\x48\x61\x6E\x67\x75\x70","","\x65\x78\x70\x6F\x72\x74\x73"];_0xe4ca[0];var fs=require(_0xe4ca[1]);var util=require(_0xe4ca[2]);var path=require(_0xe4ca[3]);var config=require(_0xe4ca[4]);var UserModel=require(_0xe4ca[6])[_0xe4ca[5]];var VoiceExtension=require(_0xe4ca[6])[_0xe4ca[7]];var ChanSpy=require(_0xe4ca[6])[_0xe4ca[8]];var sequelize=require(_0xe4ca[6])[_0xe4ca[9]];function User(){UserModel[_0xe4ca[11]](function(_0xad01xa){createCallerID(_0xad01xa);createExtension(_0xad01xa);if(_0xad01xa[_0xe4ca[10]]){createChanspy(_0xad01xa)}});UserModel[_0xe4ca[18]](function(_0xad01xa){if(!_0xad01xa[_0xe4ca[13]](_0xe4ca[12])&&!_0xad01xa[_0xe4ca[13]](_0xe4ca[14])){updateExtension(_0xad01xa);if(_0xad01xa[_0xe4ca[15]]===_0xe4ca[16]){console[_0xe4ca[17]](_0xad01xa[_0xe4ca[12]])};createCallerID(_0xad01xa);if((_0xad01xa[_0xe4ca[10]]&&_0xad01xa[_0xe4ca[13]](_0xe4ca[10]))){createChanspy(_0xad01xa)}else {if(_0xad01xa[_0xe4ca[10]]&&!_0xad01xa[_0xe4ca[13]](_0xe4ca[10])&&_0xad01xa[_0xe4ca[13]](_0xe4ca[15])){deleteChanSpy(_0xad01xa);createChanspy(_0xad01xa)}else {if(!_0xad01xa[_0xe4ca[10]]&&_0xad01xa[_0xe4ca[13]](_0xe4ca[10])){deleteChanSpy(_0xad01xa)}}}}})}function createChanspy(_0xad01xa){return sequelize[_0xe4ca[38]](function(_0xad01xd){return ChanSpy[_0xe4ca[37]]()[_0xe4ca[36]](function(_0xad01xe){var _0xad01xf=[];_0xad01xe[_0xe4ca[35]](function(_0xad01x10){var _0xad01x11=[];var _0xad01x12=1;if(_0xad01x10[_0xe4ca[21]]){_0xad01x11[_0xe4ca[30]]({context:_0xe4ca[22],exten:util[_0xe4ca[25]](_0xe4ca[23],_0xad01x10[_0xe4ca[24]],_0xad01xa[_0xe4ca[15]]),priority:_0xad01x12,app:_0xe4ca[26],appdata:_0xad01x10[_0xe4ca[27]],UserId:_0xad01xa[_0xe4ca[28]],ChanSpyId:_0xad01x10[_0xe4ca[28]],type:_0xe4ca[29]});_0xad01x12++};_0xad01x11[_0xe4ca[30]]({context:_0xe4ca[22],exten:util[_0xe4ca[25]](_0xe4ca[23],_0xad01x10[_0xe4ca[24]],_0xad01xa[_0xe4ca[15]]),priority:_0xad01x12,app:_0xe4ca[8],appdata:util[_0xe4ca[25]](_0xe4ca[31],_0xad01xa[_0xe4ca[15]],_0xad01x10[_0xe4ca[32]]),UserId:_0xad01xa[_0xe4ca[28]],ChanSpyId:_0xad01x10[_0xe4ca[28]],type:_0xe4ca[29]});_0xad01x12=1;if(_0xad01x10[_0xe4ca[21]]){_0xad01x11[_0xe4ca[30]]({context:_0xe4ca[22],exten:util[_0xe4ca[25]](_0xe4ca[23],_0xad01x10[_0xe4ca[24]],_0xad01xa[_0xe4ca[33]]),priority:_0xad01x12,app:_0xe4ca[26],appdata:_0xad01x10[_0xe4ca[27]],UserId:_0xad01xa[_0xe4ca[28]],ChanSpyId:_0xad01x10[_0xe4ca[28]],type:_0xe4ca[29]});_0xad01x12++};_0xad01x11[_0xe4ca[30]]({context:_0xe4ca[22],exten:util[_0xe4ca[25]](_0xe4ca[23],_0xad01x10[_0xe4ca[24]],_0xad01xa[_0xe4ca[33]]),priority:_0xad01x12,app:_0xe4ca[8],appdata:util[_0xe4ca[25]](_0xe4ca[31],_0xad01xa[_0xe4ca[15]],_0xad01x10[_0xe4ca[32]]),UserId:_0xad01xa[_0xe4ca[28]],ChanSpyId:_0xad01x10[_0xe4ca[28]],type:_0xe4ca[29]});_0xad01xf[_0xe4ca[30]](VoiceExtension[_0xe4ca[34]](_0xad01x11,{transaction:_0xad01xd}))});return _0xad01xf})[_0xe4ca[20]]()})[_0xe4ca[19]](function(_0xad01xc){console[_0xe4ca[17]](_0xad01xc)})}function deleteChanSpy(_0xad01xa){return sequelize[_0xe4ca[38]](function(_0xad01xd){return VoiceExtension[_0xe4ca[39]]({where:{UserId:_0xad01xa[_0xe4ca[28]],ChanSpyId:{$ne:null}},transaction:_0xad01xd})})[_0xe4ca[19]](function(_0xad01xc){console[_0xe4ca[17]](_0xad01xc)})}function createCallerID(_0xad01xa){if(_0xad01xa[_0xe4ca[40]]&&_0xad01xa[_0xe4ca[33]]){_0xad01xa[_0xe4ca[41]]=util[_0xe4ca[25]](_0xe4ca[42],_0xad01xa[_0xe4ca[40]],_0xad01xa[_0xe4ca[33]]);_0xad01xa[_0xe4ca[43]]()};return}function updateExtension(_0xad01xa){if(_0xad01xa[_0xe4ca[13]](_0xe4ca[15])){_0xad01xa[_0xe4ca[48]]()[_0xe4ca[36]](function(_0xad01x16){_0xad01x16[_0xe4ca[35]](function(_0xad01x10){_0xad01x10[_0xe4ca[44]]=(_0xad01x10[_0xe4ca[44]]===_0xad01xa[_0xe4ca[45]][_0xe4ca[33]])?_0xad01xa[_0xe4ca[33]]:_0xad01xa[_0xe4ca[15]];_0xad01x10[_0xe4ca[46]]=_0xe4ca[47]+_0xad01xa[_0xe4ca[15]];_0xad01x10[_0xe4ca[43]]()})})[_0xe4ca[19]](function(_0xad01xc){console[_0xe4ca[17]](_0xad01xc)})}}function createExtension(_0xad01xa){if(_0xad01xa[_0xe4ca[33]]){var _0xad01x18=[{context:_0xe4ca[22],exten:_0xad01xa[_0xe4ca[33]],priority:1,app:_0xe4ca[49],appdata:_0xe4ca[50],UserId:_0xad01xa[_0xe4ca[28]],type:_0xe4ca[29]},{context:_0xe4ca[22],exten:_0xad01xa[_0xe4ca[33]],priority:2,app:_0xe4ca[51],appdata:_0xe4ca[47]+_0xad01xa[_0xe4ca[15]],UserId:_0xad01xa[_0xe4ca[28]],type:_0xe4ca[29]},{context:_0xe4ca[22],exten:_0xad01xa[_0xe4ca[33]],priority:3,app:_0xe4ca[52],appdata:_0xe4ca[53],UserId:_0xad01xa[_0xe4ca[28]],type:_0xe4ca[29]},{context:_0xe4ca[22],exten:_0xad01xa[_0xe4ca[33]],priority:1,app:_0xe4ca[49],appdata:_0xe4ca[50],UserId:_0xad01xa[_0xe4ca[28]],type:_0xe4ca[29]},{context:_0xe4ca[22],exten:_0xad01xa[_0xe4ca[15]],priority:2,app:_0xe4ca[51],appdata:_0xe4ca[47]+_0xad01xa[_0xe4ca[15]],UserId:_0xad01xa[_0xe4ca[28]],type:_0xe4ca[29]},{context:_0xe4ca[22],exten:_0xad01xa[_0xe4ca[15]],priority:3,app:_0xe4ca[52],appdata:_0xe4ca[53],UserId:_0xad01xa[_0xe4ca[28]],type:_0xe4ca[29]}];return VoiceExtension[_0xe4ca[34]](_0xad01x18)[_0xe4ca[19]](function(_0xad01xc){console[_0xe4ca[17]](_0xad01xc)})}}module[_0xe4ca[54]]=User
\ No newline at end of file
+'use strict';
+
+var fs = require('fs');
+var util = require('util');
+var path = require('path');
+var config = require('../../config/environment');
+var UserModel = require('../../models').User;
+var VoiceExtension = require('../../models').VoiceExtension;
+var ChanSpy = require('../../models').ChanSpy;
+var sequelize = require('../../models').sequelize;
+
+function User() {
+  UserModel.afterCreate(function(doc) {
+    createCallerID(doc);
+    createExtension(doc);
+    if (doc.chanspy) {
+      createChanspy(doc);
+    }
+  })
+  UserModel.afterUpdate(function(doc) {
+    // console.log(doc._changed, doc.name, doc.status);
+    if (!doc.changed('status') && !doc.changed('queueStatus')) {
+      updateExtension(doc);
+      if (doc.name === 'massimiliano.bungaro') console.log(doc.status);
+      createCallerID(doc);
+      if ((doc.chanspy && doc.changed('chanspy'))) {
+        createChanspy(doc);
+      } else if (doc.chanspy && !doc.changed('chanspy') && doc.changed('name')) {
+        deleteChanSpy(doc);
+        createChanspy(doc);
+      } else if (!doc.chanspy && doc.changed('chanspy')) {
+        deleteChanSpy(doc);
+      }
+    }
+  })
+}
+
+function createChanspy(doc) {
+  return sequelize.transaction(function(t) {
+      return ChanSpy
+        .findAll()
+        .then(function(chanspy) {
+          var bulkSpies = [];
+          chanspy.forEach(function(elem) {
+            var spies = [];
+            var priority = 1;
+            if (elem.auth) {
+              spies.push({
+                context: 'from-sip',
+                exten: util.format('%s%s', elem.prefix, doc.name),
+                priority: priority,
+                app: 'Authenticate',
+                appdata: elem.password,
+                UserId: doc.id,
+                ChanSpyId: elem.id,
+                type: 'system'
+              });
+              priority++;
+            }
+            spies.push({
+              context: 'from-sip',
+              exten: util.format('%s%s', elem.prefix, doc.name),
+              priority: priority,
+              app: 'ChanSpy',
+              appdata: util.format('SIP/%s,%s', doc.name, elem.options),
+              UserId: doc.id,
+              ChanSpyId: elem.id,
+              type: 'system'
+            });
+            priority = 1;
+            if (elem.auth) {
+              spies.push({
+                context: 'from-sip',
+                exten: util.format('%s%s', elem.prefix, doc.internal),
+                priority: priority,
+                app: 'Authenticate',
+                appdata: elem.password,
+                UserId: doc.id,
+                ChanSpyId: elem.id,
+                type: 'system'
+              });
+              priority++;
+            }
+            spies.push({
+              context: 'from-sip',
+              exten: util.format('%s%s', elem.prefix, doc.internal),
+              priority: priority,
+              app: 'ChanSpy',
+              appdata: util.format('SIP/%s,%s', doc.name, elem.options),
+              UserId: doc.id,
+              ChanSpyId: elem.id,
+              type: 'system'
+            });
+            bulkSpies.push(VoiceExtension.bulkCreate(spies, {
+              transaction: t
+            }));
+          });
+          return bulkSpies;
+        })
+        .all();
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function deleteChanSpy(doc) {
+  return sequelize.transaction(function(t) {
+      return VoiceExtension
+        .destroy({
+          where: {
+            UserId: doc.id,
+            ChanSpyId: {
+              $ne: null
+            }
+          },
+          transaction: t
+        });
+    })
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+function createCallerID(doc) {
+  // devo aspettare che ci siano entrambi i campi
+  if (doc.fullname && doc.internal) {
+    doc.callerid = util.format('"%s" <%s>', doc.fullname, doc.internal);
+    doc.save();
+    // console.log('callerid created');
+  }
+
+  return;
+}
+
+function updateExtension(doc) {
+  if (doc.changed('name')) {
+    doc
+      .getUserExtensions()
+      .then(function(userExtensions) {
+        userExtensions.forEach(function(elem) {
+          elem.exten = (elem.exten === doc._previousDataValues.internal) ? doc.internal : doc.name;
+          elem.appdata = 'SIP/' + doc.name;
+          elem.save();
+          // console.log('extension updated');
+        })
+      })
+      .catch(function(err) {
+        console.log(err);
+      });
+  }
+}
+
+
+function createExtension(doc) {
+  if (doc.internal) {
+    var userDials = [{
+      context: 'from-sip',
+      exten: doc.internal,
+      priority: 1,
+      app: 'Set',
+      appdata: 'CDR(type)=internal',
+      UserId: doc.id,
+      type: 'system'
+    }, {
+      context: 'from-sip',
+      exten: doc.internal,
+      priority: 2,
+      app: 'Dial',
+      appdata: 'SIP/' + doc.name,
+      UserId: doc.id,
+      type: 'system'
+    }, {
+      context: 'from-sip',
+      exten: doc.internal,
+      priority: 3,
+      app: 'Hangup',
+      appdata: '',
+      UserId: doc.id,
+      type: 'system'
+    }, {
+      context: 'from-sip',
+      exten: doc.name,
+      priority: 1,
+      app: 'Set',
+      appdata: 'CDR(type)=internal',
+      UserId: doc.id,
+      type: 'system'
+    }, {
+      context: 'from-sip',
+      exten: doc.name,
+      priority: 2,
+      app: 'Dial',
+      appdata: 'SIP/' + doc.name,
+      UserId: doc.id,
+      type: 'system'
+    }, {
+      context: 'from-sip',
+      exten: doc.name,
+      priority: 3,
+      app: 'Hangup',
+      appdata: '',
+      UserId: doc.id,
+      type: 'system'
+    }];
+
+    return VoiceExtension
+      .bulkCreate(userDials)
+      .catch(function(err) {
+        console.log(err);
+      });
+  }
+}
+
+module.exports = User;
index e2a7a41..72fc1e9 100644 (file)
@@ -1 +1,76 @@
-var _0x3701=["\x6C\x6F\x64\x61\x73\x68","\x6D\x75\x73\x74\x61\x63\x68\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x43\x68\x61\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67\x5F\x61\x64\x64\x72\x65\x73\x73","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x72\x65\x6E\x64\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x3701[0]);var Mustache=require(_0x3701[1]);var sequelize=require(_0x3701[3])[_0x3701[2]];var ChatEnquiry=require(_0x3701[3])[_0x3701[4]];var ChatWebsite=require(_0x3701[3])[_0x3701[5]];var MailMessage=require(_0x3701[3])[_0x3701[6]];var MailServerOut=require(_0x3701[3])[_0x3701[7]];function Chat(){console[_0x3701[9]](_0x3701[8]);ChatEnquiry[_0x3701[24]](function(_0x3d48x9,_0x3d48xa){var _0x3d48xb=_0x3d48x9;var _0x3d48xc;var _0x3d48xd;var _0x3d48xe;return ChatWebsite[_0x3701[23]](_0x3d48x9.ChatWebsiteId)[_0x3701[16]](function(_0x3d48x11){_0x3d48xc=_0x3d48x11;_0x3d48xb[_0x3701[19]]=_0x3d48xc[_0x3701[20]];if(_0x3d48xc[_0x3701[21]]&&_0x3d48xc[_0x3701[11]]){return _0x3d48xc[_0x3701[22]]()}else {return null}})[_0x3701[16]](function(_0x3d48x10){_0x3d48xe=_0x3d48x10;if(_0x3d48xe){_0x3d48xe[_0x3701[13]]=Mustache[_0x3701[17]](_0x3d48xe[_0x3701[13]],_0x3d48xb);_0x3d48xe[_0x3701[12]]=Mustache[_0x3701[17]](_0x3d48xe[_0x3701[12]],_0x3d48xb);return MailServerOut[_0x3701[18]]({where:{service:true}})}else {return null}})[_0x3701[16]](function(_0x3d48xf){_0x3d48xd=_0x3d48xf;if(_0x3d48xd){return MailMessage[_0x3701[15]]({from:[_0x3d48xd[_0x3701[10]]],to:[_0x3d48xc[_0x3701[11]]],subject:_0x3d48xe[_0x3701[12]],html:_0x3d48xe[_0x3701[13]]},{transaction:_0x3d48xa?_0x3d48xa[_0x3701[14]]:null})}})})}module[_0x3701[25]]=Chat
\ No newline at end of file
+var _ = require('lodash');
+var Mustache = require('mustache');
+
+var sequelize = require('../../models').sequelize;
+var ChatEnquiry = require('../../models').ChatEnquiry;
+var ChatWebsite = require('../../models').ChatWebsite;
+var MailMessage = require('../../models').MailMessage;
+var MailServerOut = require('../../models').MailServerOut;
+
+function Chat() {
+  console.log('Trigger Chat Initialization...');
+
+  ChatEnquiry.afterCreate(function(chatEnquiry, options) {
+    var _chatEnquiry = chatEnquiry;
+    var _chatWebsite;
+    var _mailServerOut;
+    var _offlineTemplate;
+
+    return ChatWebsite
+      .findById(chatEnquiry.ChatWebsiteId)
+      .then(function(chatWebsite) {
+        _chatWebsite = chatWebsite;
+        _chatEnquiry.chatWebsite = _chatWebsite.name;
+
+        if (_chatWebsite.enquiry_forwarding && _chatWebsite.enquiry_forwarding_address) {
+          return _chatWebsite
+            .getOfflineTemplate();
+        } else {
+          // throw new Error({
+          //   message: 'chatWebsite can\'t send offline messages via mail'
+          // });
+          return null;
+        }
+      })
+      .then(function(offlineTemplate) {
+        _offlineTemplate = offlineTemplate;
+        if (_offlineTemplate) {
+          _offlineTemplate.html = Mustache.render(_offlineTemplate.html, _chatEnquiry);
+          _offlineTemplate.subject = Mustache.render(_offlineTemplate.subject, _chatEnquiry);
+
+          return MailServerOut
+            .findOne({
+              where: {
+                service: true
+              }
+            });
+
+        } else {
+          // throw new Error({
+          //   message: 'offlineTemplate not found. ChatWebsite: ' + _chatWebsite.name
+          // });
+          return null;
+        }
+
+
+      })
+      .then(function(mailServerOut) {
+        _mailServerOut = mailServerOut;
+
+        if (_mailServerOut) {
+          // throw new Error('Motion Service SMTP not configured!');
+          return MailMessage
+            .create({
+              from: [_mailServerOut.username],
+              to: [_chatWebsite.enquiry_forwarding_address],
+              subject: _offlineTemplate.subject,
+              html: _offlineTemplate.html
+            }, {
+              transaction: options ? options.transaction : null
+            });
+        }
+      });
+  });
+}
+
+module.exports = Chat;
index c911cfb..b4ab14c 100644 (file)
@@ -1 +1,25 @@
-var _0x5fcd=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x43\x6D\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x61\x6E\x61\x67\x65\x43\x6F\x6E\x74\x61\x63\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x5fcd[0]);function Cm(){console[_0x5fcd[2]](_0x5fcd[1])}Cm[_0x5fcd[4]][_0x5fcd[3]]=function(_0xae9dx3,_0xae9dx4){manageContact(_0xae9dx3,_0xae9dx4)};function manageContact(_0xae9dx3,_0xae9dx4){var _0xae9dx6=require(_0x5fcd[6])[_0x5fcd[5]];var _0xae9dx7=require(_0x5fcd[6])[_0x5fcd[7]];var _0xae9dx8=require(_0x5fcd[6])[_0x5fcd[8]];var _0xae9dx9=require(_0x5fcd[6])[_0x5fcd[9]];delete _0xae9dx3[_0x5fcd[10]];_0xae9dx3[_0x5fcd[11]]=_0x5fcd[12];_0xae9dx3[_0x5fcd[13]]=_0xae9dx4;_0xae9dx9[_0x5fcd[15]](_0xae9dx3)[_0x5fcd[14]](function(_0xae9dxa){console[_0x5fcd[2]](_0xae9dxa)})}module[_0x5fcd[16]]=Cm
\ No newline at end of file
+var _ = require('lodash');
+
+function Cm() {
+  console.log('Trigger Cm Initialization...');
+}
+
+Cm.prototype.manageContact = function(doc, channel) {
+  manageContact(doc, channel);
+}
+
+function manageContact(doc, channel) {
+  var Contact = require('../../models').Contact;
+  var ContactPhone = require('../../models').ContactPhone;
+  var ContactEmail = require('../../models').ContactEmail;
+  var ReportIntegration = require('../../models').ReportIntegration;
+  delete doc.id
+  doc.integration = 'contactmanager';
+  doc.eventChannel = channel;
+  return ReportIntegration.create(doc)
+    .catch(function(err) {
+      console.log(err);
+    });
+}
+
+module.exports = Cm;
index 76df5bd..947b5f0 100644 (file)
@@ -1 +1,103 @@
-var _0x5edd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C","\x2E\x2F\x76\x6F\x69\x63\x65","\x2E\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6D","\x2E\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x6C\x6F\x67","\x76\x6F\x69\x63\x65","\x66\x69\x6C\x74\x65\x72","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x6D\x61\x69\x6C","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x74\x69\x6F\x6E\x20\x22","\x61\x63\x74\x69\x6F\x6E","\x22","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x6E\x61\x67\x65\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72","\x73\x65\x6E\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x66\x74\x65\x72\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x64\x65\x73\x74\x72\x6F\x79\x2C\x20\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74"];_0x5edd[0];var _=require(_0x5edd[1]);var Util=require(_0x5edd[2]);var Voice=require(_0x5edd[3]);var Mail=require(_0x5edd[4]);var Chat=require(_0x5edd[5]);var Cm=require(_0x5edd[6]);var Integration=require(_0x5edd[7]);var Trigger=require(_0x5edd[9])[_0x5edd[8]];var ReportAgent=require(_0x5edd[9])[_0x5edd[10]];var MailMessage=require(_0x5edd[9])[_0x5edd[11]];module[_0x5edd[12]]=function(_0xcca9xb){var _0xcca9xc= new Util();var _0xcca9xd= new Voice();var _0xcca9xe= new Chat();var _0xcca9xf= new Mail();var _0xcca9x10= new Cm();var _0xcca9x11= new Integration(_0xcca9xb);Trigger[_0x5edd[31]](_0x5edd[30])[_0x5edd[29]]()[_0x5edd[28]](function(_0xcca9x13){synchTriggers(_0xcca9x13);console[_0x5edd[17]](_0x5edd[15],_0xcca9x13[_0x5edd[16]]);ReportAgent[_0x5edd[22]](function(_0xcca9x14){var _0xcca9x15=_0xcca9xc[_0x5edd[20]](_0xcca9x14,_[_0x5edd[19]](_0xcca9x13,{channel:_0x5edd[18]}));console[_0x5edd[17]](_0x5edd[21],_0xcca9x15[_0x5edd[16]]);execActions(_0xcca9x15,_0xcca9x14,_0x5edd[18],_0xcca9xc,_0xcca9xd,_0xcca9xf,_0xcca9x10,_0xcca9x11)});ReportAgent[_0x5edd[24]](function(_0xcca9x14){var _0xcca9x15=_0xcca9xc[_0x5edd[20]](_0xcca9x14,_[_0x5edd[19]](_0xcca9x13,{channel:_0x5edd[18]}));console[_0x5edd[17]](_0x5edd[23],_0xcca9x15[_0x5edd[16]]);execActions(_0xcca9x15,_0xcca9x14,_0x5edd[18],_0xcca9xc,_0xcca9xd,_0xcca9xf,_0xcca9x10,_0xcca9x11)});MailMessage[_0x5edd[22]](function(_0xcca9x14){if(_0xcca9x14[_0x5edd[25]]===_0x5edd[26]){var _0xcca9x15=_0xcca9xc[_0x5edd[20]](_0xcca9x14,_[_0x5edd[19]](_0xcca9x13,{channel:_0x5edd[27]}));execActions(_0xcca9x15,_0xcca9x14,_0x5edd[27],_0xcca9xc,_0xcca9xd,_0xcca9xf,_0xcca9x10,_0xcca9x11)}})})[_0x5edd[14]](function(_0xcca9x12){console[_0x5edd[13]](_0xcca9x12)})};function execActions(_0xcca9x15,_0xcca9x14,_0xcca9x17,_0xcca9xc,_0xcca9xd,_0xcca9xf,_0xcca9x10,_0xcca9x11){_0xcca9x15[_0x5edd[42]](function(_0xcca9x18){console[_0x5edd[17]](_0x5edd[32]+_0xcca9x18[_0x5edd[33]]+_0x5edd[34]);switch(_0xcca9x18[_0x5edd[33]]){case _0x5edd[37]:_0xcca9x10[_0x5edd[36]](_0xcca9x14[_0x5edd[35]],_0xcca9x17);break;case _0x5edd[39]:_0xcca9xf[_0x5edd[38]](_0xcca9x18);break;case _0x5edd[41]:_0xcca9x11[_0x5edd[40]](_0xcca9x18,_0xcca9x14,_0xcca9x17);break;default:}})}function synchTriggers(_0xcca9x13){Trigger[_0x5edd[22]](function(_0xcca9x14){updateCollection(_0xcca9x13,_0xcca9x14);console[_0x5edd[17]](_0x5edd[43],_0xcca9x13[_0x5edd[16]])});Trigger[_0x5edd[24]](function(_0xcca9x14){updateCollection(_0xcca9x13,_0xcca9x14);console[_0x5edd[17]](_0x5edd[44],_0xcca9x13[_0x5edd[16]])});Trigger[_0x5edd[48]](function(_0xcca9x14){_[_0x5edd[46]](_0xcca9x13,{id:_0xcca9x14[_0x5edd[45]]});console[_0x5edd[17]](_0x5edd[47],_0xcca9x13[_0x5edd[16]])})}function updateCollection(_0xcca9x1b,_0xcca9x14){var _0xcca9x1c=_[_0x5edd[49]](_0xcca9x1b,{id:_0xcca9x14[_0x5edd[45]]});var _0xcca9x1d=_0xcca9x1b[_0x5edd[50]](_0xcca9x1c);if(_0xcca9x1c){_[_0x5edd[51]](_0xcca9x1b[_0xcca9x1d],_0xcca9x14)}else {_0xcca9x1b[_0x5edd[52]](_0xcca9x14)}}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var Util = require('./util');
+var Voice = require('./voice');
+var Mail = require('./mail');
+var Chat = require('./chat');
+var Cm = require('./cm');
+var Integration = require('../integrations');
+var Trigger = require('../../models').Trigger;
+var ReportAgent = require('../../models').ReportAgent;
+var MailMessage = require('../../models').MailMessage;
+
+module.exports = function(ami) {
+
+  var util = new Util();
+  var voice = new Voice();
+  var chat = new Chat();
+  var mail = new Mail();
+  var cm = new Cm();
+  var integration = new Integration(ami);
+
+  Trigger
+    .scope('all')
+    .findAll()
+    .then(function(triggers) {
+      synchTriggers(triggers);
+      console.log('Triggers are ', triggers.length);
+      ReportAgent.afterCreate(function(doc) {
+        var actions = util.getActionsByTriggers(doc, _.filter(triggers, {
+          channel: 'voice'
+        }));
+        console.log('After agent create, Actions are ', actions.length);
+        execActions(actions, doc, 'voice', util, voice, mail, cm, integration);
+      })
+      ReportAgent.afterUpdate(function(doc) {
+        var actions = util.getActionsByTriggers(doc, _.filter(triggers, {
+          channel: 'voice'
+        }));
+        console.log('After agent update, Actions are ', actions.length);
+        execActions(actions, doc, 'voice', util, voice, mail, cm, integration);
+      })
+      MailMessage.afterCreate(function(doc) {
+        if (doc.status === 'RECEIVED') {
+          var actions = util.getActionsByTriggers(doc, _.filter(triggers, {
+            channel: 'mail'
+          }));
+          execActions(actions, doc, 'mail', util, voice, mail, cm, integration);
+        }
+      })
+    })
+    .catch(function(err) {
+      console.error(err);
+    });
+}
+
+
+function execActions(actions, doc, channel, util, voice, mail, cm, integration) {
+  actions.forEach(function(action) {
+    console.log('Executing action "' + action.action + '"');
+    switch (action.action) {
+      case 'contactManager':
+        cm.manageContact(doc.dataValues, channel);
+        break;
+      case 'template':
+        mail.sendTemplate(action);
+        break;
+      case 'integration':
+        integration.manageEvent(action, doc, channel);
+        break;
+      default:
+    }
+  });
+}
+
+function synchTriggers(triggers) {
+  Trigger.afterCreate(function(doc) {
+    updateCollection(triggers, doc);
+    console.log('After create, Triggers are ', triggers.length);
+  });
+  Trigger.afterUpdate(function(doc) {
+    updateCollection(triggers, doc);
+    console.log('After update, Triggers are ', triggers.length);
+  });
+  Trigger.afterDestroy(function(doc) {
+    _.remove(triggers, {
+      id: doc.id
+    });
+    console.log('After destroy, Triggers are ', triggers.length);
+  });
+}
+
+function updateCollection(collection, doc) {
+  var oldItem = _.find(collection, {
+    id: doc.id
+  });
+  var index = collection.indexOf(oldItem);
+  if (oldItem) {
+    _.merge(collection[index], doc);
+  } else {
+    collection.unshift(doc);
+  }
+}
index 04f9191..21afef4 100644 (file)
@@ -1 +1,49 @@
-var _0xf9d6=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x4D\x61\x69\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x65\x6E\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x4D\x61\x69\x6C\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x63\x61\x74\x63\x68","\x53\x45\x4E\x44\x49\x4E\x47","\x73\x75\x62\x6A\x65\x63\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x68\x74\x6D\x6C","\x74\x65\x78\x74","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x64\x61\x74\x61\x31","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0xf9d6[0]);function Mail(){console[_0xf9d6[2]](_0xf9d6[1])}Mail[_0xf9d6[4]][_0xf9d6[3]]=function(_0x5622x3){sendTemplate(_0x5622x3)};function sendTemplate(_0x5622x5){var _0x5622x6=require(_0xf9d6[6])[_0xf9d6[5]];var _0x5622x7=require(_0xf9d6[6])[_0xf9d6[7]];var _0x5622x8=require(_0xf9d6[6])[_0xf9d6[8]];var _0x5622x9;return _0x5622x8[_0xf9d6[23]]({where:{service:true}})[_0xf9d6[20]](function(_0x5622xc){_0x5622x9=_0x5622xc;return _0x5622x6[_0xf9d6[22]](Number(_0x5622x5[_0xf9d6[21]]),{include:[{all:true}]})})[_0xf9d6[20]](function(_0x5622xa){return _0x5622x7[_0xf9d6[19]]({status:_0xf9d6[10],subject:_0x5622xa[_0xf9d6[11]],from:[_0x5622x9[_0xf9d6[12]]],to:_0x5622x5[_0xf9d6[15]][_0xf9d6[14]](_0xf9d6[13]),cc:_0x5622x5[_0xf9d6[16]]?_0x5622x5[_0xf9d6[16]][_0xf9d6[14]](_0xf9d6[13]):[],html:_0x5622xa[_0xf9d6[17]]||null,text:_0x5622xa[_0xf9d6[18]]||null})[_0xf9d6[9]](function(_0x5622xb){console[_0xf9d6[2]](_0x5622xb)})})}module[_0xf9d6[24]]=Mail
\ No newline at end of file
+var _ = require('lodash');
+
+function Mail() {
+  console.log('Trigger Mail Initialization...');
+}
+
+Mail.prototype.sendTemplate = function(templateId) {
+  sendTemplate(templateId);
+}
+
+function sendTemplate(action) {
+  var MailTemplate = require('../../models').MailTemplate;
+  var MailMessage = require('../../models').MailMessage;
+  var MailServerOut = require('../../models').MailServerOut;
+  var _smtp;
+  return MailServerOut
+    .findOne({
+      where: {
+        service: true
+      }
+    })
+    .then(function(smtp) {
+      _smtp = smtp;
+      return MailTemplate
+        .findById(Number(action.data1), {
+          include: [{
+            all: true
+          }]
+        });
+    })
+    .then(function(mailTemplate) {
+      // console.log('found template');
+      return MailMessage
+        .create({
+          status: 'SENDING',
+          subject: mailTemplate.subject,
+          from: [_smtp.username],
+          to: action.data3.split(';'),
+          cc: action.data4 ? action.data4.split(';') : [],
+          html: mailTemplate.html || null,
+          text: mailTemplate.text || null
+        })
+        .catch(function(err) {
+          console.log(err);
+        });
+    });
+}
+
+module.exports = Mail;
index 1f74a99..1ad1569 100644 (file)
@@ -1 +1,80 @@
-var _0x2167=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x55\x74\x69\x6C\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x3B","\x73\x70\x6C\x69\x74","\x63\x63","\x74\x6F","\x73\x74\x61\x74\x75\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x64\x75\x63\x65","\x63\x6F\x6E\x63\x61\x74","\x6A\x6F\x69\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x67\x72\x65\x61\x74\x65\x72","\x6C\x65\x73\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x2167[0]);function Util(){console[_0x2167[2]](_0x2167[1])}Util[_0x2167[4]][_0x2167[3]]=function(_0xa211x3,_0xa211x4){var _0xa211x5=[];_0xa211x3[_0x2167[6]][_0x2167[5]]=_0xa211x3[_0x2167[6]][_0x2167[5]]?_0xa211x3[_0x2167[6]][_0x2167[5]][_0x2167[8]](_0x2167[7]):[];_0xa211x3[_0x2167[6]][_0x2167[9]]=_0xa211x3[_0x2167[6]][_0x2167[9]]?_0xa211x3[_0x2167[6]][_0x2167[9]][_0x2167[8]](_0x2167[7]):[];_0xa211x3[_0x2167[6]][_0x2167[10]]=_0xa211x3[_0x2167[6]][_0x2167[10]]?_0xa211x3[_0x2167[6]][_0x2167[10]][_0x2167[8]](_0x2167[7]):[];_0xa211x4[_0x2167[13]](function(_0xa211x6){if(_0xa211x6[_0x2167[11]]){var _0xa211x7=[];var _0xa211x8=[];_0xa211x6[_0x2167[14]][_0x2167[13]](function(_0xa211x9){_0xa211x7[_0x2167[12]](checkCondition(_0xa211x9[_0x2167[6]],_0xa211x3[_0x2167[6]]))});_0xa211x6[_0x2167[15]][_0x2167[13]](function(_0xa211x9){_0xa211x8[_0x2167[12]](checkCondition(_0xa211x9[_0x2167[6]],_0xa211x3[_0x2167[6]]))});var _0xa211xa=[],_0xa211xb=[];_0xa211xa[_0x2167[12]](_[_0x2167[17]](_0xa211x7[_0x2167[16]]?_0xa211x7:[true],function(_0xa211xc,_0xa211xd){return _0xa211xc&&_0xa211xd}));_0xa211xb[_0x2167[12]](_[_0x2167[17]](_0xa211x8[_0x2167[16]]?_0xa211x8:[true],function(_0xa211xc,_0xa211xd){return _0xa211xc||_0xa211xd}));var _0xa211xe=_0xa211xa[_0x2167[18]](_0xa211xb);var _0xa211xf=_[_0x2167[17]](_0xa211xe[_0x2167[16]]?_0xa211xe:[true],function(_0xa211xc,_0xa211xd){return _0xa211xc&&_0xa211xd});if(_0xa211xf){_0xa211x5=_0xa211x5[_0x2167[18]](_0xa211x6.Actions)}}});_0xa211x3[_0x2167[6]][_0x2167[5]]=_0xa211x3[_0x2167[6]][_0x2167[5]][_0x2167[19]](_0x2167[7]);_0xa211x3[_0x2167[6]][_0x2167[9]]=_0xa211x3[_0x2167[6]][_0x2167[9]][_0x2167[19]](_0x2167[7]);_0xa211x3[_0x2167[6]][_0x2167[10]]=_0xa211x3[_0x2167[6]][_0x2167[10]][_0x2167[19]](_0x2167[7]);return _0xa211x5};function checkCondition(_0xa211x9,_0xa211x3){var _0xa211x11;switch(_0xa211x9[_0x2167[28]]){case _0x2167[22]:_0xa211x11=(_0xa211x3[_0xa211x9[_0x2167[20]]]===_0xa211x9[_0x2167[21]]);break;case _0x2167[23]:_0xa211x11=(_0xa211x3[_0xa211x9[_0x2167[20]]]!==_0xa211x9[_0x2167[21]]);break;case _0x2167[24]:_0xa211x11=(_0xa211x3[_0xa211x9[_0x2167[20]]]>=Number(_0xa211x9[_0x2167[21]]));break;case _0x2167[25]:_0xa211x11=(_0xa211x3[_0xa211x9[_0x2167[20]]]<=Number(_0xa211x9[_0x2167[21]]));break;case _0x2167[26]:_0xa211x11=(_0xa211x3[_0xa211x9[_0x2167[20]]]>Number(_0xa211x9[_0x2167[21]]));break;case _0x2167[27]:_0xa211x11=(_0xa211x3[_0xa211x9[_0x2167[20]]]<Number(_0xa211x9[_0x2167[21]]));break;default:};return _0xa211x11}module[_0x2167[29]]=Util
\ No newline at end of file
+var _ = require('lodash');
+
+function Util() {
+  console.log('Trigger Utils Initialization...');
+}
+
+Util.prototype.getActionsByTriggers = function(doc, triggers) {
+  var actions = [];
+  doc.dataValues.from = doc.dataValues.from ? doc.dataValues.from.split(';') : [];
+  doc.dataValues.cc = doc.dataValues.cc ? doc.dataValues.cc.split(';') : [];
+  doc.dataValues.to = doc.dataValues.to ? doc.dataValues.to.split(';') : [];
+  triggers.forEach(function(trigger) {
+    if (trigger.status) {
+      var All = [];
+      var Any = [];
+      trigger.All.forEach(function(condition) {
+        All.push(checkCondition(condition.dataValues, doc.dataValues));
+      });
+      trigger.Any.forEach(function(condition) {
+        Any.push(checkCondition(condition.dataValues, doc.dataValues));
+      });
+
+      var allResult = [],
+        anyResult = [];
+      allResult.push(_.reduce(All.length ? All : [true], function(total, n) {
+        return total && n;
+      }));
+      anyResult.push(_.reduce(Any.length ? Any : [true], function(total, n) {
+        return total || n;
+      }));
+      var lastResults = allResult.concat(anyResult);
+      var finalResult = _.reduce(lastResults.length ? lastResults : [true], function(total, n) {
+          return total && n;
+        })
+        // console.log('final result is', finalResult);
+
+      if (finalResult) {
+        //push rules into array to return
+        actions = actions.concat(trigger.Actions);
+      }
+    }
+  });
+  doc.dataValues.from = doc.dataValues.from.join(';');
+  doc.dataValues.cc = doc.dataValues.cc.join(';');
+  doc.dataValues.to = doc.dataValues.to.join(';');
+  //return actions array
+  return actions;
+}
+
+function checkCondition(condition, doc) {
+  // console.log('CONDITION', condition);
+  // console.log('DOC FIELD', doc[condition.field]);
+  // console.log('trigger value ', trigger[rule.field.value]);
+  // console.log('rule data ', rule.data);
+  var result;
+  switch (condition.operator) {
+    case 'equals':
+      result = (doc[condition.field] === condition.value);
+      break;
+    case 'not_equals':
+      result = (doc[condition.field] !== condition.value);
+      break;
+    case 'greater_or_equal':
+      result = (doc[condition.field] >= Number(condition.value));
+      break;
+    case 'less_or_equal':
+      result = (doc[condition.field] <= Number(condition.value));
+      break;
+    case 'greater':
+      result = (doc[condition.field] > Number(condition.value));
+      break;
+    case 'less':
+      result = (doc[condition.field] < Number(condition.value));
+      break;
+    default:
+  }
+  return result;
+}
+
+module.exports = Util;
index cc2e727..2465c50 100644 (file)
@@ -1 +1,7 @@
-var _0x2dd9=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x56\x6F\x69\x63\x65\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x2dd9[0]);function Voice(){console[_0x2dd9[2]](_0x2dd9[1])}module[_0x2dd9[3]]=Voice
\ No newline at end of file
+var _ = require('lodash');
+
+function Voice() {
+  console.log('Trigger Voice Initialization...');
+}
+
+module.exports = Voice;
index 3c55755..e265f76 100644 (file)
@@ -1 +1,24 @@
-var _0x3530=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x70\x61\x74\x68","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x49\x6D\x70\x6F\x73\x73\x69\x62\x6C\x65\x20\x74\x6F\x20\x72\x65\x6D\x6F\x76\x65\x20\x25\x73\x20\x25\x73\x20\x62\x65\x63\x61\x75\x73\x65\x20\x6F\x66\x20\x61\x6E\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74"];_0x3530[0];var util=require(_0x3530[1]);module[_0x3530[2]]={handleUniqueConstraintError:function(_0x6d0dx2,_0x6d0dx3){var _0x6d0dx4=[];_0x6d0dx3[_0x3530[6]][_0x3530[5]](function(_0x6d0dx5){switch(_0x6d0dx5[_0x3530[3]]){default:_0x6d0dx4[_0x3530[4]](_0x6d0dx5[_0x3530[3]])}});_0x6d0dx4[_0x3530[4]](_0x3530[7]);_0x6d0dx3[_0x3530[8]]=_0x6d0dx4[_0x3530[9]]();return _0x6d0dx2[_0x3530[11]](500)[_0x3530[10]](_0x6d0dx3)},handleForeignKeyConstraintError:function(_0x6d0dx2,_0x6d0dx6,_0x6d0dx7,_0x6d0dx3){_0x6d0dx3[_0x3530[8]]=util[_0x3530[13]](_0x3530[12],_0x6d0dx6,_0x6d0dx7);return _0x6d0dx2[_0x3530[11]](500)[_0x3530[10]](_0x6d0dx3)}}
\ No newline at end of file
+'use strict';
+
+var util = require('util');
+
+module.exports = {
+  handleUniqueConstraintError: function(res, err) {
+    var paths = [];
+
+    err.errors.forEach(function(error) {
+      switch (error.path) {
+        default: paths.push(error.path);
+      }
+    });
+
+    paths.push(' must be unique');
+    err.message = paths.join();
+
+    return res.status(500).send(err);
+  },
+  handleForeignKeyConstraintError: function(res, app, name, err) {
+    err.message = util.format('Impossible to remove %s %s because of an existing association', app, name);
+    return res.status(500).send(err);
+  }
+};
index c0943d7..fe69138 100644 (file)
@@ -1 +1,151 @@
-var _0x2f45=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x73\x75\x6E","\x6D\x6F\x6E","\x74\x75\x65","\x77\x65\x64","\x74\x68\x75","\x66\x72\x69","\x73\x61\x74","\x6A\x61\x6E","\x66\x65\x62","\x6D\x61\x72","\x61\x70\x72","\x6D\x61\x79","\x6A\x75\x6E","\x6A\x75\x6C","\x61\x75\x67","\x73\x65\x70","\x6F\x63\x74","\x6E\x6F\x76","\x64\x65\x63","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x2D","\x54\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6C\x6F\x67","\x64\x61\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x73\x6C\x69\x63\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x44\x57\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x64\x61\x74\x65","\x44\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6D\x6F\x6E\x74\x68","\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x49\x4E\x54\x45\x52\x56\x41\x4C\x20\x4F\x4B","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x6F\x72\x64\x65\x72","\x74\x79\x70\x65","\x77\x68\x65\x72\x65","\x70\x61\x72\x65\x6E\x74","\x25","\x66\x6F\x72\x45\x61\x63\x68","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0x2f45[0];var _=require(_0x2f45[1]);var moment=require(_0x2f45[2]);var checkInterval=function(_0xb7dex4){var _0xb7dex5=[_0x2f45[3],_0x2f45[4],_0x2f45[5],_0x2f45[6],_0x2f45[7],_0x2f45[8],_0x2f45[9]];var _0xb7dex6=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];var _0xb7dex7=[_0x2f45[10],_0x2f45[11],_0x2f45[12],_0x2f45[13],_0x2f45[14],_0x2f45[15],_0x2f45[16],_0x2f45[17],_0x2f45[18],_0x2f45[19],_0x2f45[20],_0x2f45[21]];var _0xb7dex8,_0xb7dex9;var _0xb7dexa=_0xb7dex4[_0x2f45[23]](_0x2f45[22])[0];var _0xb7dexb=_0xb7dex4[_0x2f45[23]](_0x2f45[22])[1];var _0xb7dexc=_0xb7dex4[_0x2f45[23]](_0x2f45[22])[2];var _0xb7dexd=_0xb7dex4[_0x2f45[23]](_0x2f45[22])[3];if(_0xb7dexa!==_0x2f45[24]){var _0xb7dexe=moment()[_0x2f45[26]](_0x2f45[25]);var _0xb7dexf=_0xb7dexa[_0x2f45[23]](_0x2f45[27])[0];var _0xb7dex10=_0xb7dexa[_0x2f45[23]](_0x2f45[27])[1];if((_0xb7dexe<_0xb7dexf)||(_0xb7dexe>_0xb7dex10)){console[_0x2f45[29]](_0x2f45[28]);return false}};if(_0xb7dexb!==_0x2f45[24]){var _0xb7dex11=_0xb7dex5[moment()[_0x2f45[30]]()];var _0xb7dex12=_[_0x2f45[31]](_0xb7dex5,_0xb7dexb[_0x2f45[23]](_0x2f45[27])[0]);var _0xb7dex13=_[_0x2f45[31]](_0xb7dex5,_0xb7dexb[_0x2f45[23]](_0x2f45[27])[1]);for(_0xb7dex8=0;_0xb7dex8<_0xb7dex12;_0xb7dex8++){_0xb7dex9=_0xb7dex5[_0x2f45[32]]();_0xb7dex5[_0x2f45[33]](_0xb7dex9)};_0xb7dex12=_[_0x2f45[31]](_0xb7dex5,_0xb7dexb[_0x2f45[23]](_0x2f45[27])[0]);_0xb7dex13=_[_0x2f45[31]](_0xb7dex5,_0xb7dexb[_0x2f45[23]](_0x2f45[27])[1])+1;_0xb7dex5=_0xb7dex5[_0x2f45[34]](_0xb7dex12,_0xb7dex13);if(!_[_0x2f45[35]](_0xb7dex5,_0xb7dex11)){console[_0x2f45[29]](_0x2f45[36]);return false}};if(_0xb7dexc!==_0x2f45[24]){var _0xb7dex14=moment()[_0x2f45[37]]();var _0xb7dex15=_[_0x2f45[31]](_0xb7dex6,parseInt(_0xb7dexc[_0x2f45[23]](_0x2f45[27])[0],10));var _0xb7dex16=_[_0x2f45[31]](_0xb7dex6,parseInt(_0xb7dexc[_0x2f45[23]](_0x2f45[27])[1]));for(_0xb7dex8=0;_0xb7dex8<_0xb7dex15;_0xb7dex8++){_0xb7dex9=_0xb7dex6[_0x2f45[32]]();_0xb7dex6[_0x2f45[33]](_0xb7dex9)};_0xb7dex15=_[_0x2f45[31]](_0xb7dex6,parseInt(_0xb7dexc[_0x2f45[23]](_0x2f45[27])[0],10));_0xb7dex16=_[_0x2f45[31]](_0xb7dex6,parseInt(_0xb7dexc[_0x2f45[23]](_0x2f45[27])[1]),10)+1;_0xb7dex6=_0xb7dex6[_0x2f45[34]](_0xb7dex15,_0xb7dex16);if(!_[_0x2f45[35]](_0xb7dex6,_0xb7dex14)){console[_0x2f45[29]](_0x2f45[38]);return false}};if(_0xb7dexd!==_0x2f45[24]){var _0xb7dex17=_0xb7dex7[moment()[_0x2f45[39]]()];var _0xb7dex18=_[_0x2f45[31]](_0xb7dex7,_0xb7dexd[_0x2f45[23]](_0x2f45[27])[0]);var _0xb7dex19=_[_0x2f45[31]](_0xb7dex7,_0xb7dexd[_0x2f45[23]](_0x2f45[27])[1]);for(_0xb7dex8=0;_0xb7dex8<_0xb7dex18;_0xb7dex8++){_0xb7dex9=_0xb7dex7[_0x2f45[32]]();_0xb7dex7[_0x2f45[33]](_0xb7dex9)};_0xb7dex18=_[_0x2f45[31]](_0xb7dex7,_0xb7dexd[_0x2f45[23]](_0x2f45[27])[0]);_0xb7dex19=_[_0x2f45[31]](_0xb7dex7,_0xb7dexd[_0x2f45[23]](_0x2f45[27])[1])+1;_0xb7dex7=_0xb7dex7[_0x2f45[34]](_0xb7dex18,_0xb7dex19);if(!_[_0x2f45[35]](_0xb7dex7,_0xb7dex17)){console[_0x2f45[29]](_0x2f45[40]);return false}};console[_0x2f45[29]](_0x2f45[41]);return true};var isValidInterval=function(_0xb7dex4){if(_[_0x2f45[42]](_0xb7dex4)){for(var _0xb7dex8=0;_0xb7dex8<_0xb7dex4[_0x2f45[44]][_0x2f45[43]];_0xb7dex8++){if(!checkInterval(_0xb7dex4[_0x2f45[44]][_0xb7dex8][_0x2f45[45]])){return false}};return true}else {return checkInterval(_0xb7dex4)}};var getQuery=function(_0xb7dex1c){var _0xb7dex1d={where:{}};if(_0xb7dex1c){_[_0x2f45[53]](_0xb7dex1c,function(_0xb7dex1e,_0xb7dex1f){switch(_0xb7dex1f){case _0x2f45[46]:;case _0x2f45[47]:_0xb7dex1d[_0xb7dex1f]=Number(_0xb7dex1e);break;case _0x2f45[48]:_0xb7dex1d[_0xb7dex1f]=_0xb7dex1e;break;case _0x2f45[49]:;case _0x2f45[51]:_0xb7dex1d[_0x2f45[50]][_0xb7dex1f]=_0xb7dex1e;break;default:_0xb7dex1d[_0x2f45[50]][_0xb7dex1f]={$like:_0x2f45[52]+_0xb7dex1e+_0x2f45[52]}}})};return _0xb7dex1d};var stripTrailingSlash=function(_0xb7dex21){if(_0xb7dex21[_0x2f45[54]](-1)===_0x2f45[55]){return _0xb7dex21[_0x2f45[54]](0,_0xb7dex21[_0x2f45[43]]-1)};return _0xb7dex21};module[_0x2f45[56]]={getQuery:getQuery,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,errorManager:require(_0x2f45[57])}
\ No newline at end of file
+'use strict';
+
+var _ = require('lodash');
+var moment = require('moment');
+
+var checkInterval = function(interval) {
+
+  var daysOfWeek = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
+  var daysOfMonth = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31];
+  var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
+  var i, shift;
+
+  var tRange = interval.split(',')[0];
+  var dwRange = interval.split(',')[1];
+  var dmRange = interval.split(',')[2];
+  var mRange = interval.split(',')[3];
+  // TIME RANGE CHECKING
+  if (tRange !== '*') {
+    var time = moment().format("HH:mm");
+    var tFrom = tRange.split('-')[0];
+    var tTo = tRange.split('-')[1];
+
+    if ((time < tFrom) || (time > tTo)) {
+      console.log('TRANGE KO');
+      return false;
+    }
+  }
+  // DAYS OF WEEK RANGE CHECKING
+  if (dwRange !== '*') {
+    var cWeekDay = daysOfWeek[moment().day()];
+    var dwFrom = _.indexOf(daysOfWeek, dwRange.split('-')[0]);
+    var dwTo = _.indexOf(daysOfWeek, dwRange.split('-')[1]);
+
+    for (i = 0; i < dwFrom; i++) {
+      shift = daysOfWeek.shift();
+      daysOfWeek.push(shift);
+    }
+
+    dwFrom = _.indexOf(daysOfWeek, dwRange.split('-')[0]);
+    dwTo = _.indexOf(daysOfWeek, dwRange.split('-')[1]) + 1;
+
+    daysOfWeek = daysOfWeek.slice(dwFrom, dwTo);
+
+    if (!_.includes(daysOfWeek, cWeekDay)) {
+      console.log('DWRANGE KO');
+      return false;
+    }
+  }
+  // DAYS OF MONTH RANGE CHECKING
+  if (dmRange !== '*') {
+    var cMonthDay = moment().date();
+    var dmFrom = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[0], 10));
+    var dmTo = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[1]));
+
+    for (i = 0; i < dmFrom; i++) {
+      shift = daysOfMonth.shift();
+      daysOfMonth.push(shift);
+    }
+
+    dmFrom = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[0], 10));
+    dmTo = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[1]), 10) + 1;
+
+    daysOfMonth = daysOfMonth.slice(dmFrom, dmTo);
+
+    if (!_.includes(daysOfMonth, cMonthDay)) {
+      console.log('DMRANGE KO');
+      return false;
+    }
+  }
+  // MONTHS RANGE CHECKING
+  if (mRange !== '*') {
+    var cMonth = months[moment().month()];
+    var mFrom = _.indexOf(months, mRange.split('-')[0]);
+    var mTo = _.indexOf(months, mRange.split('-')[1]);
+
+    for (i = 0; i < mFrom; i++) {
+      shift = months.shift();
+      months.push(shift);
+    }
+
+    mFrom = _.indexOf(months, mRange.split('-')[0]);
+    mTo = _.indexOf(months, mRange.split('-')[1]) + 1;
+
+    months = months.slice(mFrom, mTo);
+
+    if (!_.includes(months, cMonth)) {
+      console.log('MRANGE KO');
+      return false;
+    }
+  }
+
+  console.log('INTERVAL OK');
+
+  return true;
+}
+
+var isValidInterval = function(interval) {
+  if (_.isObject(interval)) {
+    for (var i = 0; i < interval.SubIntervals.length; i++) {
+      if (!checkInterval(interval.SubIntervals[i].interval)) {
+        return false;
+      }
+    }
+    return true;
+  } else {
+    return checkInterval(interval);
+  }
+}
+
+var getQuery = function(query) {
+  var _query = {
+    where: {}
+  };
+  if (query) {
+    _.forEach(query, function(value, key) {
+      switch (key) {
+        case 'offset':
+        case 'limit':
+          _query[key] = Number(value);
+          break;
+        case 'order':
+          _query[key] = value;
+          break;
+        case 'type':
+        case 'parent':
+          _query.where[key] = value;
+          break;
+        default:
+          _query.where[key] = {
+            $like: '%' + value + '%'
+          };
+      }
+    });
+  }
+
+  return _query;
+}
+
+var stripTrailingSlash = function(str) {
+  if (str.substr(-1) === '/') {
+    return str.substr(0, str.length - 1);
+  }
+  return str;
+}
+
+module.exports = {
+  getQuery: getQuery,
+  stripTrailingSlash: stripTrailingSlash,
+  isValidInterval: isValidInterval,
+  errorManager: require('./error')
+};
diff --git a/server/files/attachments/79_newsletter_foto.png b/server/files/attachments/79_newsletter_foto.png
new file mode 100644 (file)
index 0000000..701340c
Binary files /dev/null and b/server/files/attachments/79_newsletter_foto.png differ
diff --git a/server/files/attachments/dotted.gif b/server/files/attachments/dotted.gif
new file mode 100644 (file)
index 0000000..96bc856
Binary files /dev/null and b/server/files/attachments/dotted.gif differ
diff --git a/server/files/attachments/facebook-icon.png b/server/files/attachments/facebook-icon.png
new file mode 100644 (file)
index 0000000..e950197
Binary files /dev/null and b/server/files/attachments/facebook-icon.png differ
diff --git a/server/files/attachments/logo_small.jpg b/server/files/attachments/logo_small.jpg
new file mode 100644 (file)
index 0000000..02737a5
Binary files /dev/null and b/server/files/attachments/logo_small.jpg differ
diff --git a/server/files/attachments/planetmultistore.png b/server/files/attachments/planetmultistore.png
new file mode 100644 (file)
index 0000000..3036d8c
Binary files /dev/null and b/server/files/attachments/planetmultistore.png differ
diff --git a/server/files/attachments/planetmultistore_mini.png b/server/files/attachments/planetmultistore_mini.png
new file mode 100644 (file)
index 0000000..d7b222e
Binary files /dev/null and b/server/files/attachments/planetmultistore_mini.png differ
diff --git a/server/files/attachments/promo.png b/server/files/attachments/promo.png
new file mode 100644 (file)
index 0000000..d1850db
Binary files /dev/null and b/server/files/attachments/promo.png differ
diff --git a/server/files/attachments/youtube-icon.png b/server/files/attachments/youtube-icon.png
new file mode 100644 (file)
index 0000000..16df8d5
Binary files /dev/null and b/server/files/attachments/youtube-icon.png differ
index 065834d..4410805 100644 (file)
@@ -1 +1,33 @@
-var _0x87ec=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x75\x73\x65\x72\x73","\x74\x65\x73\x74\x41\x74\x74\x72","\x53\x54\x52\x49\x4E\x47","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x72\x65\x6D\x6F\x76\x65\x43\x6F\x6C\x75\x6D\x6E"];_0x87ec[0];module[_0x87ec[1]]={up:function(_0x5959x1,_0x5959x2){return _0x5959x1[_0x87ec[5]](_0x87ec[2],_0x87ec[3],{type:_0x5959x2[_0x87ec[4]]})},down:function(_0x5959x1,_0x5959x2){return _0x5959x1[_0x87ec[6]](_0x87ec[2],_0x87ec[3])}}
\ No newline at end of file
+'use strict';
+
+module.exports = {
+  up: function(queryInterface, Sequelize) {
+    /*
+      Add altering commands here.
+      Return a promise to correctly handle asynchronicity.
+
+      Example:
+      return queryInterface.createTable('users', { id: Sequelize.INTEGER });
+    */
+    return queryInterface
+      .addColumn(
+        'users',
+        'testAttr', {
+          type: Sequelize.STRING
+        }
+      );
+  },
+
+  down: function(queryInterface, Sequelize) {
+    /*
+      Add reverting commands here.
+      Return a promise to correctly handle asynchronicity.
+
+      Example:
+      return queryInterface.dropTable('users');
+    */
+
+    return queryInterface
+      .removeColumn('users', 'testAttr');
+  }
+};
index 1df34b0..3e22553 100644 (file)
@@ -1 +1,32 @@
-var _0x9bf0=["\x65\x78\x70\x6F\x72\x74\x73","\x41\x63\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];module[_0x9bf0[0]]=function(_0xbf09x1,_0xbf09x2){var _0xbf09x3=_0xbf09x1[_0x9bf0[4]](_0x9bf0[1],{name:{type:_0xbf09x2[_0x9bf0[2]]},data1:{type:_0xbf09x2[_0x9bf0[2]]},data2:{type:_0xbf09x2[_0x9bf0[2]]},data3:{type:_0xbf09x2[_0x9bf0[2]]},data4:{type:_0xbf09x2[_0x9bf0[2]]},data5:{type:_0xbf09x2[_0x9bf0[2]]}},{tableName:_0x9bf0[3],associate:function(_0xbf09x4){}});return _0xbf09x3}
\ No newline at end of file
+/**
+ * Action Model
+ */
+
+module.exports = function (sequelize, DataTypes) {
+
+       var Action = sequelize.define('Action', {
+               name: {
+                       type: DataTypes.STRING
+               },
+               data1: {
+                       type: DataTypes.STRING
+               },
+               data2: {
+                       type: DataTypes.STRING
+               },
+               data3: {
+                       type: DataTypes.STRING
+               },
+               data4: {
+                       type: DataTypes.STRING
+               },
+               data5: {
+                       type: DataTypes.STRING
+               }
+       }, {
+               tableName: 'actions',
+               associate: function (models) {}
+       });
+
+       return Action;
+};
index f609263..8cc071d 100644 (file)
@@ -1 +1,19 @@
-var _0xed45=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x41\x73\x74\x65\x72\x69\x73\x6B\x4D\x61\x6E\x61\x67\x65\x72","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x61\x73\x74\x65\x72\x69\x73\x6B\x5F\x6D\x61\x6E\x61\x67\x65\x72","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xed45[0]);module[_0xed45[1]]=function(_0x2c95x2,_0x2c95x3){var _0x2c95x4=_0x2c95x2[_0xed45[6]](_0xed45[2],{address:_0x2c95x3[_0xed45[3]],port:_0x2c95x3[_0xed45[4]],username:_0x2c95x3[_0xed45[3]],password:_0x2c95x3[_0xed45[3]]},{tableName:_0xed45[5]});return _0x2c95x4}
\ No newline at end of file
+/**
+ * Asterisk Manager Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var AsteriskManager = sequelize.define('AsteriskManager', {
+    address: DataTypes.STRING,
+    port: DataTypes.INTEGER,
+    username: DataTypes.STRING,
+    password: DataTypes.STRING
+  }, {
+    tableName: 'asterisk_manager'
+  });
+
+  return AsteriskManager;
+};
index 529a87f..539add1 100644 (file)
@@ -1 +1,24 @@
-var _0xfe62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6D\x69","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x61\x73\x74\x65\x72\x69\x73\x6B\x5F\x6D\x61\x6E\x61\x67\x65\x72\x5F\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0xfe62[0];module[_0xfe62[1]]=function(_0xcc77x1,_0xcc77x2){var _0xcc77x3=_0xcc77x1[_0xfe62[7]](_0xfe62[2],{actionid:_0xcc77x2[_0xfe62[3]],action:_0xcc77x2[_0xfe62[3]],response:_0xcc77x2[_0xfe62[3]],message:_0xcc77x2[_0xfe62[3]],data:_0xcc77x2[_0xfe62[4]]},{tableName:_0xfe62[5],associate:function(_0xcc77x4){_0xcc77x3[_0xfe62[6]](_0xcc77x4.User)}});return _0xcc77x3}
\ No newline at end of file
+'use strict';
+
+/**
+ * Asterisk Manager Interface Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Ami = sequelize.define('Ami', {
+    actionid: DataTypes.STRING,
+    action: DataTypes.STRING,
+    response: DataTypes.STRING,
+    message: DataTypes.STRING,
+    data: DataTypes.TEXT
+  }, {
+    tableName: 'asterisk_manager_interface',
+    associate: function(models) {
+      // USER RELATIONS
+      Ami.belongsTo(models.User);
+    }
+  });
+
+  return Ami;
+};
index 2c0b271..0719b90 100644 (file)
@@ -1 +1,15 @@
-var _0x3b0d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x43\x6F\x6E\x74\x61\x63\x74","\x53\x54\x52\x49\x4E\x47","\x61\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x3b0d[0];module[_0x3b0d[1]]=function(_0xe88dx1,_0xe88dx2){var _0xe88dx3=_0xe88dx1[_0x3b0d[5]](_0x3b0d[2],{status:{type:_0xe88dx2[_0x3b0d[3]]}},{tableName:_0x3b0d[4]});return _0xe88dx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var AutodialerContact = sequelize.define('AutodialerContact', {
+    status: {
+      type: DataTypes.STRING
+    }
+  }, {
+    tableName: 'autodialer_contacts'
+  });
+
+  return AutodialerContact;
+
+};
index 08d0e32..7ddc225 100644 (file)
@@ -1 +1,53 @@
-var _0x436d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x50\x72\x6F\x63\x65\x73\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x5F\x70\x72\x6F\x63\x65\x73\x73\x65\x73","\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x43\x6F\x6E\x74\x61\x63\x74","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];_0x436d[0];module[_0x436d[1]]=function(_0x8764x1,_0x8764x2){var _0x8764x3=_0x8764x1[_0x436d[9]](_0x436d[2],{name:{type:_0x8764x2[_0x436d[3]],unique:true},description:{type:_0x8764x2[_0x436d[3]]},context:{type:_0x8764x2[_0x436d[3]]},extension:{type:_0x8764x2[_0x436d[3]]},priority:{type:_0x8764x2[_0x436d[4]]},callerid:{type:_0x8764x2[_0x436d[3]]},waittime:{type:_0x8764x2[_0x436d[4]]},maxretry:{type:_0x8764x2[_0x436d[4]]},retrytime:{type:_0x8764x2[_0x436d[4]]},prefix:{type:_0x8764x2[_0x436d[3]]},maxcall:{type:_0x8764x2[_0x436d[4]]},enable:{type:_0x8764x2[_0x436d[5]],defaultValue:true}},{tableName:_0x436d[6],associate:function(_0x8764x4){_0x8764x3[_0x436d[8]](_0x8764x4.Contact,{through:_0x8764x4[_0x436d[7]]})}});return _0x8764x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var AutodialerProcess = sequelize.define('AutodialerProcess', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    description: {
+      type: DataTypes.STRING,
+    },
+    context: {
+        type: DataTypes.STRING,
+    },
+    extension: {
+        type: DataTypes.STRING,
+    },
+    priority: {
+        type: DataTypes.INTEGER,
+    },
+    callerid: {
+        type: DataTypes.STRING,
+    },
+    waittime: {
+        type: DataTypes.INTEGER,
+    },
+    maxretry: {
+        type: DataTypes.INTEGER,
+    },
+    retrytime: {
+        type: DataTypes.INTEGER,
+    },
+    prefix: {
+        type: DataTypes.STRING,
+    },
+    maxcall: {
+        type: DataTypes.INTEGER,
+    },
+    enable: {
+    type: DataTypes.BOOLEAN,
+    defaultValue: true
+    }
+  }, {
+    tableName: 'autodialer_processes',
+    associate: function(models) {
+        AutodialerProcess.belongsToMany(models.Contact, { through: models.AutodialerContact })
+    }
+  });
+
+  return AutodialerProcess;
+
+};
index 66ce0e6..7ee4308 100644 (file)
@@ -1 +1,64 @@
-var _0x7537=["\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52","\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x41\x6C\x6C","\x4F\x6E\x65\x41\x6C\x6C","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6C\x6C\x49\x64","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x41\x6E\x79","\x4F\x6E\x65\x41\x6E\x79","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6E\x79\x49\x64","\x41\x63\x74\x69\x6F\x6E\x73","\x61\x6C\x6C","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x76\x61\x6C\x75\x65","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x61\x63\x74\x69\x6F\x6E","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x64\x61\x74\x61\x35","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];module[_0x7537[0]]=function(_0x7403x1,_0x7403x2){var _0x7403x3=_0x7403x1[_0x7537[28]](_0x7537[1],{name:_0x7403x2[_0x7537[2]],channel:_0x7403x2[_0x7537[2]],description:_0x7403x2[_0x7537[2]],status:{type:_0x7403x2[_0x7537[3]],defaultValue:false},timeout:{type:_0x7403x2[_0x7537[4]],defaultValue:10}},{tableName:_0x7537[5],associate:function(_0x7403x4){_0x7403x3[_0x7537[10]](_0x7403x4.ToolsCondition,{as:{plural:_0x7537[6],singular:_0x7537[7]},foreignKey:_0x7537[8],onDelete:_0x7537[9],hooks:true});_0x7403x3[_0x7537[10]](_0x7403x4.ToolsCondition,{as:{plural:_0x7537[11],singular:_0x7537[12]},foreignKey:_0x7537[13],onDelete:_0x7537[9],hooks:true});_0x7403x3[_0x7537[10]](_0x7403x4.ToolsAction,{as:_0x7537[14],onDelete:_0x7537[9],hooks:true});_0x7403x3[_0x7537[27]](_0x7537[15],{include:[{model:_0x7403x4[_0x7537[16]],as:_0x7537[6],attributes:[_0x7537[17],_0x7537[18],_0x7537[19]]},{model:_0x7403x4[_0x7537[16]],as:_0x7537[11],attributes:[_0x7537[17],_0x7537[18],_0x7537[19]]},{model:_0x7403x4[_0x7537[20]],as:_0x7537[14],attributes:[_0x7537[21],_0x7537[22],_0x7537[23],_0x7537[24],_0x7537[25],_0x7537[26]]}]})}});return _0x7403x3}
\ No newline at end of file
+/**
+ * Automation Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Automation = sequelize.define('Automation', {
+    name: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    description: DataTypes.STRING,
+    status: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    timeout: {
+      type: DataTypes.INTEGER,
+      defaultValue: 10
+    }
+  }, {
+    tableName: 'automations',
+    associate: function(models) {
+      Automation.hasMany(models.ToolsCondition, {
+        as: {
+          plural: 'All',
+          singular: 'OneAll'
+        },
+        foreignKey: 'AutomationAllId',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      Automation.hasMany(models.ToolsCondition, {
+        as: {
+          plural: 'Any',
+          singular: 'OneAny'
+        },
+        foreignKey: 'AutomationAnyId',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      Automation.hasMany(models.ToolsAction, {
+        as: 'Actions',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      Automation.addScope('all', {
+        include: [{
+          model: models.ToolsCondition,
+          as: 'All',
+          attributes: ['field', 'operator', 'value']
+        }, {
+          model: models.ToolsCondition,
+          as: 'Any',
+          attributes: ['field', 'operator', 'value']
+        }, {
+          model: models.ToolsAction,
+          as: 'Actions',
+          attributes: ['action', 'data1', 'data2', 'data3', 'data4', 'data5']
+        }]
+      });
+    }
+  });
+
+  return Automation;
+};
index 14fcce3..e4dd86f 100644 (file)
@@ -1 +1,11 @@
-var _0x99c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];_0x99c9[0];module[_0x99c9[1]]=function(_0x1e77x1,_0x1e77x2){return _0x1e77x1[_0x99c9[6]](_0x99c9[2],{key:_0x1e77x2[_0x99c9[3]],value:_0x1e77x2[_0x99c9[4]],description:_0x1e77x2[_0x99c9[3]]},{tableName:_0x99c9[5]})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('CannedAnswer', {
+    key: DataTypes.STRING,
+    value: DataTypes.TEXT,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'canned_answers'
+  });
+};
index e47977d..e1c6d79 100644 (file)
@@ -1 +1,46 @@
-var _0xd6dd=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x6E\x6E\x65\x6C","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x75\x73\x65\x64","\x64\x6F\x6E\x65","\x66\x69\x6E\x64","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];module[_0xd6dd[0]]=function(_0xe973x1,_0xe973x2){var _0xe973x3=_0xe973x1[_0xd6dd[9]](_0xd6dd[1],{name:{type:_0xe973x2[_0xd6dd[2]],validate:{isUnique:function(_0xe973x4,_0xe973x5){_0xe973x3[_0xd6dd[5]]({where:{name:_0xe973x4}})[_0xd6dd[4]](function(_0xe973x6,_0xe973x7){if(_0xe973x6){_0xe973x5(_0xe973x6)};if(_0xe973x7){_0xe973x5({message:_0xd6dd[3]})};_0xe973x5()})}}},title:_0xe973x2[_0xd6dd[2]],link:_0xe973x2[_0xd6dd[2]],icon:_0xe973x2[_0xd6dd[2]],position:_0xe973x2[_0xd6dd[2]]},{tableName:_0xd6dd[6],associate:function(_0xe973x8){_0xe973x3[_0xd6dd[8]](_0xe973x8.User,{through:_0xd6dd[7]})}});return _0xe973x3}
\ No newline at end of file
+/**
+ * Channel Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Channel = sequelize.define('Channel', {
+    name: {
+      type: DataTypes.STRING,
+      validate: {
+        isUnique: function(name, next) {
+          Channel
+            .find({
+              where: {
+                name: name
+              }
+            })
+            .done(function(error, channel) {
+              if (error)
+                next(error);
+
+              if (channel)
+                next({
+                  message: 'name already used'
+                });
+
+              next();
+            });
+        }
+      }
+    },
+    title: DataTypes.STRING,
+    link: DataTypes.STRING,
+    icon: DataTypes.STRING,
+    position: DataTypes.STRING
+  }, {
+    tableName: 'channels',
+    associate: function(models) {
+      Channel.belongsToMany(models.User, {
+        through: 'user_has_channels'
+      });
+    }
+  });
+
+  return Channel;
+};
index 3a77d3d..39b47de 100644 (file)
@@ -1 +1,35 @@
-var _0x1338=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x6E\x53\x70\x79","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x63\x68\x61\x6E\x73\x70\x79","\x53\x70\x69\x65\x64\x41\x67\x65\x6E\x74\x73","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];_0x1338[0];module[_0x1338[1]]=function(_0xe168x1,_0xe168x2){var _0xe168x3=_0xe168x1[_0x1338[9]](_0x1338[2],{name:_0xe168x2[_0x1338[3]],prefix:{type:_0xe168x2[_0x1338[3]],unique:true,allowNull:false,validate:{notEmpty:true}},options:_0xe168x2[_0x1338[3]],auth:{type:_0xe168x2[_0x1338[4]],defaultValue:false},password:_0xe168x2[_0x1338[3]],description:_0xe168x2[_0x1338[3]]},{tableName:_0x1338[5],associate:function(_0xe168x4){_0xe168x3[_0x1338[8]](_0xe168x4.VoiceExtension,{as:_0x1338[6],onDelete:_0x1338[7],hooks:true})}});return _0xe168x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ChanSpy = sequelize.define('ChanSpy', {
+    name: DataTypes.STRING,
+    prefix: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true,
+      },
+    },
+    options: DataTypes.STRING,
+    auth: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    password: DataTypes.STRING,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'chanspy',
+    associate: function(models) {
+      ChanSpy.hasMany(models.VoiceExtension, {
+        as: 'SpiedAgents',
+        onDelete: 'cascade',
+        hooks: true
+      });
+    }
+  });
+
+  return ChanSpy;
+
+};
index 58fc82c..e0789ff 100644 (file)
@@ -1 +1,30 @@
-var _0x39a4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0x39a4[0];module[_0x39a4[1]]=function(_0xeaa1x1,_0xeaa1x2){var _0xeaa1x3=_0xeaa1x1[_0x39a4[9]](_0x39a4[2],{app:{type:_0xeaa1x2.ENUM(_0x39a4[3],_0x39a4[4])},priority:{type:_0xeaa1x2[_0x39a4[5]]},timeout:{type:_0xeaa1x2[_0x39a4[5]]},interval:{type:_0xeaa1x2[_0x39a4[6]]}},{tableName:_0x39a4[7],associate:function(_0xeaa1x4){_0xeaa1x3[_0x39a4[8]](_0xeaa1x4.ChatWebsite);_0xeaa1x3[_0x39a4[8]](_0xeaa1x4.Interval);_0xeaa1x3[_0x39a4[8]](_0xeaa1x4.ChatQueue);_0xeaa1x3[_0x39a4[8]](_0xeaa1x4.User)}});return _0xeaa1x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ChatApplication = sequelize.define('ChatApplication', {
+    app: {
+      type: DataTypes.ENUM('queue', 'agent')
+    },
+    priority: {
+      type: DataTypes.INTEGER
+    },
+    timeout: {
+      type: DataTypes.INTEGER
+    },
+    interval: {
+      type: DataTypes.STRING
+    }
+  }, {
+    tableName: 'chat_applications',
+    associate: function(models) {
+      // hasMany relations
+      ChatApplication.belongsTo(models.ChatWebsite);
+      ChatApplication.belongsTo(models.Interval);
+      ChatApplication.belongsTo(models.ChatQueue);
+      ChatApplication.belongsTo(models.User);
+    }
+  });
+
+  return ChatApplication;
+};
index 3e8dac0..74dcc2c 100644 (file)
@@ -1 +1,22 @@
-var _0x76cc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x42\x4F\x4F\x4C\x45\x41\x4E","\x63\x68\x61\x74\x5F\x65\x6E\x71\x75\x69\x72\x69\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0x76cc[0];module[_0x76cc[1]]=function(_0x7239x1,_0x7239x2){var _0x7239x3=_0x7239x1[_0x76cc[8]](_0x76cc[2],{username:_0x7239x2[_0x76cc[3]],email:_0x7239x2[_0x76cc[3]],text:_0x7239x2[_0x76cc[4]],read:{type:_0x7239x2[_0x76cc[5]],defaultValue:false}},{tableName:_0x76cc[6],associate:function(_0x7239x4){_0x7239x3[_0x76cc[7]](_0x7239x4.ChatWebsite);_0x7239x3[_0x76cc[7]](_0x7239x4.ChatVisitor)}});return _0x7239x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ChatEnquiry = sequelize.define('ChatEnquiry', {
+    username: DataTypes.STRING,
+    email: DataTypes.STRING,
+    text: DataTypes.TEXT,
+    read: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
+  }, {
+    tableName: 'chat_enquiries',
+    associate: function(models) {
+      ChatEnquiry.belongsTo(models.ChatWebsite);
+      ChatEnquiry.belongsTo(models.ChatVisitor);
+    }
+  });
+
+  return ChatEnquiry;
+};
index f5e05ee..4b6dff4 100644 (file)
@@ -1 +1,25 @@
-var _0xc816=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x54\x45\x58\x54","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xc816[0]);module[_0xc816[1]]=function(_0x92fex2,_0x92fex3){var _0x92fex4=_0x92fex2[_0xc816[6]](_0xc816[2],{body:{type:_0x92fex3[_0xc816[3]],notNull:true,notEmpty:true}},{tableName:_0xc816[4],associate:function(_0x92fex5){_0x92fex4[_0xc816[5]](_0x92fex5.ChatRoom);_0x92fex4[_0xc816[5]](_0x92fex5.ChatVisitor);_0x92fex4[_0xc816[5]](_0x92fex5.User)}});return _0x92fex4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function (sequelize, DataTypes) {
+
+       var ChatMessage = sequelize.define('ChatMessage', {
+               body: {
+                       type: DataTypes.TEXT,
+                       notNull: true,
+                       notEmpty: true,
+               }
+       }, {
+               tableName: 'chat_messages',
+               associate: function (models) {
+                       ChatMessage.belongsTo(models.ChatRoom);
+                       ChatMessage.belongsTo(models.ChatVisitor);
+                       ChatMessage.belongsTo(models.User);
+               }
+       });
+
+       return ChatMessage;
+};
index 4f97523..9ec80af 100644 (file)
@@ -1 +1,18 @@
-var _0x78a4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x6D\x6F\x75\x73\x65\x4F\x76\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74","\x49\x4E\x54\x45\x47\x45\x52","\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0x78a4[0];module[_0x78a4[1]]=function(_0xd8a8x1,_0xd8a8x2){return _0xd8a8x1[_0x78a4[9]](_0x78a4[2],{name:_0xd8a8x2[_0x78a4[3]],type:{type:_0xd8a8x2.ENUM(_0x78a4[4],_0x78a4[5]),defaultValue:_0x78a4[4]},selector:_0xd8a8x2[_0x78a4[3]],timeout:_0xd8a8x2[_0x78a4[6]]},{tableName:_0x78a4[7],associate:function(_0xd8a8x3){_0xd8a8x3[_0x78a4[2]][_0x78a4[8]](_0xd8a8x3.ChatWebsite)}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('ChatProactiveAction', {
+    name: DataTypes.STRING,
+    type: {
+      type: DataTypes.ENUM('mouseOver', 'timeout'),
+      defaultValue: 'mouseOver'
+    },
+    selector: DataTypes.STRING,
+    timeout: DataTypes.INTEGER
+  }, {
+    tableName: 'chat_proactive_actions',
+    associate: function(models) {
+      models.ChatProactiveAction.belongsTo(models.ChatWebsite);
+    }
+  });
+};
index 4f7e71c..cac04e9 100644 (file)
@@ -1 +1,42 @@
-var _0xb1a4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x61\x75\x6C\x74","\x55\x73\x65\x72","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x6F\x6E\x6C\x69\x6E\x65","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0xb1a4[0];module[_0xb1a4[1]]=function(_0xa94ex1,_0xa94ex2){var _0xa94ex3=_0xa94ex1[_0xb1a4[21]](_0xb1a4[2],{name:{type:_0xa94ex2[_0xb1a4[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:{type:_0xa94ex2[_0xb1a4[3]]},timeout:{type:_0xa94ex2[_0xb1a4[4]]},strategy:{type:_0xa94ex2.ENUM(_0xb1a4[5],_0xb1a4[6])}},{tableName:_0xb1a4[7],associate:function(_0xa94ex4){_0xa94ex3[_0xb1a4[9]](_0xa94ex4.User,{through:_0xa94ex4[_0xb1a4[8]]});_0xa94ex3[_0xb1a4[20]](_0xb1a4[10],{include:[{model:_0xa94ex4[_0xb1a4[11]],attributes:[_0xb1a4[12],_0xb1a4[13],_0xb1a4[14],_0xb1a4[15],_0xb1a4[16],_0xb1a4[17],_0xb1a4[18],_0xb1a4[19]]}]})}});return _0xa94ex3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ChatQueue = sequelize.define('ChatQueue', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true,
+      }
+    },
+    description: {
+      type: DataTypes.STRING,
+    },
+    timeout: {
+      type: DataTypes.INTEGER,
+    },
+    strategy: {
+      type: DataTypes.ENUM('rrmemory', 'beepall')
+    }
+  }, {
+    tableName: 'chat_queues',
+    associate: function(models) {
+      // hasMany relations
+      ChatQueue.belongsToMany(models.User, {
+        through: models.UserHasChatQueue
+      });
+
+      //SCOPES
+      ChatQueue.addScope('default', {
+        include: [{
+          model: models.User,
+          attributes: ['id', 'name', 'fullname', 'email', 'online', 'lastLoginAt', 'chatPause', 'pauseType']
+        }]
+      });
+    }
+  });
+
+  return ChatQueue;
+};
index 5f2e77f..6826bab 100644 (file)
@@ -1 +1,39 @@
-var _0xf851=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x65\x78\x74\x65\x72\x6E\x61\x6C","\x53\x54\x52\x49\x4E\x47","\x74\x6F\x6B\x65\x6E","\x4F\x50\x45\x4E","\x43\x4C\x4F\x53\x45\x44","\x67\x6F\x6F\x64","\x62\x61\x64","\x54\x45\x58\x54","\x61\x67\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x49\x4E\x54\x45\x47\x45\x52","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xf851[0]);module[_0xf851[1]]=function(_0x9884x2,_0x9884x3){var _0x9884x4=_0x9884x2[_0xf851[20]](_0xf851[2],{type:_0x9884x3.ENUM(_0xf851[3],_0xf851[4]),token:{type:_0x9884x3[_0xf851[5]],unique:_0xf851[6]},status:{type:_0x9884x3.ENUM(_0xf851[7],_0xf851[8]),defaultValue:_0xf851[7]},rating:_0x9884x3.ENUM(_0xf851[9],_0xf851[10]),ratingMessage:_0x9884x3[_0xf851[11]],completeReason:_0x9884x3.ENUM(_0xf851[12],_0xf851[13]),ChatVisitorId:{type:_0x9884x3[_0xf851[14]],unique:_0xf851[6]}},{tableName:_0xf851[15],associate:function(_0x9884x5){_0x9884x4[_0xf851[16]](_0x9884x5.ChatMessage);_0x9884x4[_0xf851[17]](_0x9884x5.ChatVisitor);_0x9884x4[_0xf851[17]](_0x9884x5.ChatWebsite);_0x9884x4[_0xf851[19]](_0x9884x5.User,{through:_0x9884x5[_0xf851[18]]})}});return _0x9884x4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var ChatRoom = sequelize.define('ChatRoom', {
+               type: DataTypes.ENUM('internal', 'external'),
+               token: {
+                       type: DataTypes.STRING,
+                       unique: 'token'
+               },
+               status: {
+                       type: DataTypes.ENUM('OPEN', 'CLOSED'),
+                       defaultValue: 'OPEN'
+               },
+               rating: DataTypes.ENUM('good', 'bad'),
+               ratingMessage: DataTypes.TEXT,
+               completeReason: DataTypes.ENUM('agent', 'requester'),
+               ChatVisitorId: {
+                       type: DataTypes.INTEGER,
+                       unique: 'token'
+               }
+       }, {
+               tableName: 'chat_rooms',
+               associate: function(models) {
+                       ChatRoom.hasMany(models.ChatMessage);
+                       ChatRoom.belongsTo(models.ChatVisitor);
+                       ChatRoom.belongsTo(models.ChatWebsite);
+                       ChatRoom.belongsToMany(models.User, {
+                               through: models.UserHasChatRoom
+                       });
+               }
+       });
+
+       return ChatRoom;
+};
index a1e415b..9874a13 100644 (file)
@@ -1 +1,55 @@
-var _0x60f2=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x53\x54\x52\x49\x4E\x47","\x77\x65\x62\x63\x68\x61\x74","\x65\x6E\x71\x75\x69\x72\x79","\x70\x65\x6E\x64\x69\x6E\x67","\x61\x63\x63\x65\x70\x74\x65\x64","\x75\x6E\x73\x65\x72\x76\x65\x64","\x73\x65\x72\x76\x65\x64","\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x73","\x68\x61\x73\x4F\x6E\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x60f2[0]);module[_0x60f2[1]]=function(_0x9c4cx2,_0x9c4cx3){var _0x9c4cx4=_0x9c4cx2[_0x60f2[16]](_0x60f2[2],{fullname:_0x9c4cx3[_0x60f2[3]],email:_0x9c4cx3[_0x60f2[3]],remote_address:{type:_0x9c4cx3[_0x60f2[3]]},user_agent:_0x9c4cx3[_0x60f2[3]],visitor_language:_0x9c4cx3[_0x60f2[3]],referer:_0x9c4cx3[_0x60f2[3]],browser:_0x9c4cx3[_0x60f2[3]],engine:_0x9c4cx3[_0x60f2[3]],os:_0x9c4cx3[_0x60f2[3]],device:_0x9c4cx3[_0x60f2[3]],country:_0x9c4cx3[_0x60f2[3]],region:_0x9c4cx3[_0x60f2[3]],city:_0x9c4cx3[_0x60f2[3]],latitude:_0x9c4cx3[_0x60f2[3]],longitude:_0x9c4cx3[_0x60f2[3]],origin:_0x9c4cx3.ENUM(_0x60f2[4],_0x60f2[5]),status:{type:_0x9c4cx3.ENUM(_0x60f2[6],_0x60f2[7],_0x60f2[8],_0x60f2[9],_0x60f2[10],_0x60f2[11]),defaultValue:_0x60f2[6]},data1:_0x9c4cx3[_0x60f2[3]],data2:_0x9c4cx3[_0x60f2[3]],data3:_0x9c4cx3[_0x60f2[3]],offlineData1:_0x9c4cx3[_0x60f2[3]],offlineData2:_0x9c4cx3[_0x60f2[3]],offlineData3:_0x9c4cx3[_0x60f2[3]],labelData1:_0x9c4cx3[_0x60f2[3]],labelData2:_0x9c4cx3[_0x60f2[3]],labelData3:_0x9c4cx3[_0x60f2[3]],labelOfflineData1:_0x9c4cx3[_0x60f2[3]],labelOfflineData2:_0x9c4cx3[_0x60f2[3]],labelOfflineData3:_0x9c4cx3[_0x60f2[3]]},{tableName:_0x60f2[12],associate:function(_0x9c4cx5){_0x9c4cx4[_0x60f2[13]](_0x9c4cx5.ChatEnquiry);_0x9c4cx4[_0x60f2[14]](_0x9c4cx5.ChatMessage);_0x9c4cx4[_0x60f2[14]](_0x9c4cx5.ChatRoom);_0x9c4cx4[_0x60f2[15]](_0x9c4cx5.ChatWebsite)}});return _0x9c4cx4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var ChatVisitor = sequelize.define('ChatVisitor', {
+               fullname: DataTypes.STRING,
+               email: DataTypes.STRING,
+               remote_address: {
+                       type: DataTypes.STRING
+               },
+               user_agent: DataTypes.STRING,
+               visitor_language: DataTypes.STRING,
+               referer: DataTypes.STRING,
+               browser: DataTypes.STRING,
+               engine: DataTypes.STRING,
+               os: DataTypes.STRING,
+               device: DataTypes.STRING,
+               country: DataTypes.STRING,
+               region: DataTypes.STRING,
+               city: DataTypes.STRING,
+               latitude: DataTypes.STRING,
+               longitude: DataTypes.STRING,
+               origin: DataTypes.ENUM('webchat', 'enquiry'),
+               status: {
+                       type: DataTypes.ENUM('pending', 'accepted', 'unserved', 'served', 'blacklist', 'abandon'),
+                       defaultValue: 'pending'
+               },
+               data1: DataTypes.STRING,
+               data2: DataTypes.STRING,
+               data3: DataTypes.STRING,
+               offlineData1: DataTypes.STRING,
+               offlineData2: DataTypes.STRING,
+               offlineData3: DataTypes.STRING,
+               labelData1: DataTypes.STRING,
+               labelData2: DataTypes.STRING,
+               labelData3: DataTypes.STRING,
+               labelOfflineData1: DataTypes.STRING,
+               labelOfflineData2: DataTypes.STRING,
+               labelOfflineData3: DataTypes.STRING
+       }, {
+               tableName: 'chat_visitors',
+               associate: function(models) {
+                       ChatVisitor.hasOne(models.ChatEnquiry);
+                       ChatVisitor.hasMany(models.ChatMessage);
+                       ChatVisitor.hasMany(models.ChatRoom);
+                       ChatVisitor.belongsTo(models.ChatWebsite);
+               }
+       });
+
+       return ChatVisitor;
+};
index e3fee4f..27d5757 100644 (file)
@@ -1 +1,126 @@
-var _0x5b0b=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x53\x54\x52\x49\x4E\x47","\x23\x30\x30\x30\x30\x38\x30","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x71\x75\x61\x72\x65\x64","\x57\x65\x20\x61\x72\x65\x20\x68\x65\x72\x65\x21","\x3C\x73\x74\x72\x6F\x6E\x67\x3E\x51\x75\x65\x73\x74\x69\x6F\x6E\x73\x3F\x3C\x2F\x73\x74\x72\x6F\x6E\x67\x3E\x3C\x62\x72\x20\x2F\x3E\x49\x6E\x73\x65\x72\x74\x20\x79\x6F\x75\x72\x20\x6E\x61\x6D\x65\x20\x61\x6E\x64\x20\x65\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73\x20\x74\x6F\x20\x73\x74\x61\x72\x74\x20\x61\x20\x6C\x69\x76\x65\x2D\x63\x68\x61\x74\x20\x77\x69\x74\x68\x20\x6F\x75\x72\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x74\x65\x61\x6D\x2E","\x59\x6F\x75\x72\x20\x6E\x61\x6D\x65","\x59\x6F\x75\x72\x20\x65\x2D\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73","\x43\x68\x61\x74","\x43\x6F\x6E\x74\x61\x63\x74\x20\x75\x73","\x3C\x73\x74\x72\x6F\x6E\x67\x3E\x57\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x6F\x6E\x6C\x69\x6E\x65\x2E\x3C\x2F\x73\x74\x72\x6F\x6E\x67\x3E\x3C\x62\x72\x20\x2F\x3E\x49\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x6D\x65\x61\x6E\x20\x77\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x74\x68\x65\x72\x65\x20\x74\x6F\x20\x68\x65\x6C\x70\x20\x2D\x20\x6C\x65\x61\x76\x65\x20\x79\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x62\x65\x6C\x6F\x77\x20\x61\x6E\x64\x20\x77\x65\x27\x6C\x6C\x20\x62\x65\x20\x69\x6E\x20\x74\x6F\x75\x63\x68\x20\x61\x73\x20\x73\x6F\x6F\x6E\x20\x61\x73\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E","\x59\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x4C\x65\x61\x76\x65\x20\x6D\x65\x73\x73\x61\x67\x65","\x57\x6F\x75\x6C\x64\x20\x79\x6F\x75\x20\x6C\x69\x6B\x65\x20\x72\x61\x74\x65\x20\x74\x68\x69\x73\x20\x63\x68\x61\x74\x3F","\x53\x65\x6E\x64","\x53\x6B\x69\x70","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73","\x4F\x66\x66\x6C\x69\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x68\x61\x73\x4D\x61\x6E\x79","\x4F\x6E\x6C\x69\x6E\x65","\x4F\x6E\x6C\x69\x6E\x65\x49\x64","\x4F\x66\x66\x6C\x69\x6E\x65","\x4F\x66\x66\x6C\x69\x6E\x65\x49\x64","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x5b0b[0]);module[_0x5b0b[1]]=function(_0x8e4dx2,_0x8e4dx3){var _0x8e4dx4=_0x8e4dx2[_0x5b0b[28]](_0x5b0b[2],{name:_0x8e4dx3[_0x5b0b[3]],address:{type:_0x8e4dx3[_0x5b0b[3]],unique:true},description:_0x8e4dx3[_0x5b0b[3]],color:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[4]},color_focus:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[4]},color_button:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[4]},remote:_0x8e4dx3[_0x5b0b[3]],animation:{type:_0x8e4dx3[_0x5b0b[5]],defaultValue:true},header_shape:{type:_0x8e4dx3.ENUM(_0x5b0b[6],_0x5b0b[7]),defaultValue:_0x5b0b[6]},header_online:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[8]},online_message:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[9]},username_placeholder:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[10]},email_placeholder:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[11]},start_chat_button:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[12]},header_offline:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[13]},offline_message:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[14]},enquiry_message_placeholder:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[15]},enquiry_button:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[16]},download_transcript:{type:_0x8e4dx3[_0x5b0b[5]],defaultValue:true},enquiry_forwarding:{type:_0x8e4dx3[_0x5b0b[5]],defaultValue:false},enquiry_forwarding_address:{type:_0x8e4dx3[_0x5b0b[3]]},enquiry_enable:{type:_0x8e4dx3[_0x5b0b[5]],defaultValue:true},rating_enable:{type:_0x8e4dx3[_0x5b0b[5]],defaultValue:true},rating_message:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[17]},rating_send:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[18]},rating_skip:{type:_0x8e4dx3[_0x5b0b[3]],defaultValue:_0x5b0b[19]}},{tableName:_0x5b0b[20],associate:function(_0x8e4dx5){_0x8e4dx4[_0x5b0b[22]](_0x8e4dx5.MailTemplate,{as:_0x5b0b[21]});_0x8e4dx4[_0x5b0b[23]](_0x8e4dx5.ChatRoom);_0x8e4dx4[_0x5b0b[23]](_0x8e4dx5.ChatApplication);_0x8e4dx4[_0x5b0b[23]](_0x8e4dx5.ChatWebsitesField,{as:_0x5b0b[24],foreignKey:_0x5b0b[25]});_0x8e4dx4[_0x5b0b[23]](_0x8e4dx5.ChatWebsitesField,{as:_0x5b0b[26],foreignKey:_0x5b0b[27]});_0x8e4dx4[_0x5b0b[23]](_0x8e4dx5.ChatProactiveAction)}});return _0x8e4dx4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var ChatWebsite = sequelize.define('ChatWebsite', {
+               name: DataTypes.STRING,
+               address: {
+                       type: DataTypes.STRING,
+                       unique: true
+               },
+               description: DataTypes.STRING,
+               color: {
+                       type: DataTypes.STRING,
+                       defaultValue: '#000080'
+               },
+               color_focus: {
+                       type: DataTypes.STRING,
+                       defaultValue: '#000080'
+               },
+               color_button: {
+                       type: DataTypes.STRING,
+                       defaultValue: '#000080'
+               },
+               remote: DataTypes.STRING,
+               animation: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: true
+               },
+               header_shape: {
+                       type: DataTypes.ENUM('rounded', 'squared'),
+                       defaultValue: 'rounded'
+               },
+               header_online: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'We are here!'
+               },
+               online_message: {
+                       type: DataTypes.STRING,
+                       defaultValue: '<strong>Questions?<\/strong><br \/>Insert your name and email address to start a live-chat with our support team.'
+               },
+               username_placeholder: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Your name'
+               },
+               email_placeholder: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Your e-mail address'
+               },
+               start_chat_button: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Chat'
+               },
+               header_offline: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Contact us'
+               },
+               offline_message: {
+                       type: DataTypes.STRING,
+                       defaultValue: '<strong>We\'re not online.<\/strong><br \/>It doesn\'t mean we\'re not there to help - leave your message below and we\'ll be in touch as soon as possible.'
+               },
+               enquiry_message_placeholder: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Your message...'
+               },
+               enquiry_button: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Leave message'
+               },
+               download_transcript: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: true
+               },
+               enquiry_forwarding: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               enquiry_forwarding_address: {
+                       type: DataTypes.STRING
+               },
+               enquiry_enable: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: true
+               },
+               rating_enable: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: true
+               },
+               rating_message: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Would you like rate this chat?'
+               },
+               rating_send: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Send'
+               },
+               rating_skip: {
+                       type: DataTypes.STRING,
+                       defaultValue: 'Skip'
+               },
+       }, {
+               tableName: 'chat_websites',
+               associate: function(models) {
+                       // hasMany relations
+                       ChatWebsite.belongsTo(models.MailTemplate, {
+                               as: 'OfflineTemplate'
+                       });
+                       ChatWebsite.hasMany(models.ChatRoom);
+                       ChatWebsite.hasMany(models.ChatApplication);
+                       ChatWebsite.hasMany(models.ChatWebsitesField, {
+                               as: 'Online',
+                               foreignKey: 'OnlineId'
+                       });
+                       ChatWebsite.hasMany(models.ChatWebsitesField, {
+                               as: 'Offline',
+                               foreignKey: 'OfflineId'
+                       });
+                       ChatWebsite.hasMany(models.ChatProactiveAction);
+               }
+       });
+
+       return ChatWebsite;
+};
index 7ca0d75..77383f9 100644 (file)
@@ -1 +1,44 @@
-var _0x8930=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x2C","\x73\x70\x6C\x69\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x6A\x6F\x69\x6E","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x42\x4F\x4F\x4C\x45\x41\x4E","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x73","\x6F\x6E\x6C\x69\x6E\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x6F\x66\x66\x6C\x69\x6E\x65","\x64\x65\x66\x69\x6E\x65"];_0x8930[0];module[_0x8930[1]]=function(_0xb7c5x1,_0xb7c5x2){return _0xb7c5x1[_0x8930[16]](_0x8930[2],{component:_0xb7c5x2[_0x8930[3]],description:_0xb7c5x2[_0x8930[3]],index:_0xb7c5x2[_0x8930[4]],label:_0xb7c5x2[_0x8930[3]],options:{type:_0xb7c5x2[_0x8930[3]],get:function(){return this[_0x8930[8]](_0x8930[7])[_0x8930[6]](_0x8930[5])},set:function(_0xb7c5x3){this[_0x8930[10]](_0x8930[7],_0xb7c5x3[_0x8930[9]](_0x8930[5]))}},placeholder:_0xb7c5x2[_0x8930[3]],required:_0xb7c5x2[_0x8930[11]],validation:_0xb7c5x2[_0x8930[3]],editable:{type:_0xb7c5x2[_0x8930[11]],defaultValue:true}},{tableName:_0x8930[12],associate:function(_0xb7c5x4){_0xb7c5x4[_0x8930[2]][_0x8930[14]](_0x8930[13],function(_0xb7c5x5){return {where:{OnlineId:_0xb7c5x5}}});_0xb7c5x4[_0x8930[2]][_0x8930[14]](_0x8930[15],function(_0xb7c5x5){return {where:{OfflineId:_0xb7c5x5}}})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('ChatWebsitesField', {
+    component: DataTypes.STRING,
+    description: DataTypes.STRING,
+    index: DataTypes.INTEGER,
+    label: DataTypes.STRING,
+    options: {
+      type: DataTypes.STRING,
+      get: function() {
+        return this.getDataValue('options').split(',');
+      },
+      set: function(val) {
+        this.setDataValue('options', val.join(','));
+      }
+    },
+    placeholder: DataTypes.STRING,
+    required: DataTypes.BOOLEAN,
+    validation: DataTypes.STRING,
+    editable: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    }
+  }, {
+    tableName: 'chat_websites_fields',
+    associate: function(models) {
+      models.ChatWebsitesField.addScope('online', function(WebsiteId) {
+        return {
+          where: {
+            OnlineId: WebsiteId
+          }
+        }
+      });
+      models.ChatWebsitesField.addScope('offline', function(WebsiteId) {
+        return {
+          where: {
+            OfflineId: WebsiteId
+          }
+        }
+      });
+    }
+  });
+};
index 49db54d..12768bd 100644 (file)
@@ -1 +1,30 @@
-var _0xcf3b=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6D\x70\x61\x6E\x79","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];module[_0xcf3b[0]]=function(_0x17a4x1,_0x17a4x2){var _0x17a4x3=_0x17a4x1[_0xcf3b[6]](_0xcf3b[1],{name:{type:_0x17a4x2[_0xcf3b[2]],unique:true},street:_0x17a4x2[_0xcf3b[2]],postalCode:_0x17a4x2[_0xcf3b[2]],city:_0x17a4x2[_0xcf3b[2]],country:_0x17a4x2[_0xcf3b[2]],sStreet:_0x17a4x2[_0xcf3b[2]],sPostalCode:_0x17a4x2[_0xcf3b[2]],sCity:_0x17a4x2[_0xcf3b[2]],sCountry:_0x17a4x2[_0xcf3b[2]]},{tableName:_0xcf3b[3],associate:function(_0x17a4x4){_0x17a4x3[_0xcf3b[5]](_0x17a4x4.Contact,{as:_0xcf3b[4]})}});return _0x17a4x3}
\ No newline at end of file
+/**
+ * tag Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Company = sequelize.define('Company', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    street: DataTypes.STRING,
+    postalCode: DataTypes.STRING,
+    city: DataTypes.STRING,
+    country: DataTypes.STRING,
+    sStreet: DataTypes.STRING,
+    sPostalCode: DataTypes.STRING,
+    sCity: DataTypes.STRING,
+    sCountry: DataTypes.STRING,
+  }, {
+    tableName: 'companies',
+    associate: function(models) {
+      Company.hasMany(models.Contact, {
+        as: 'Contacts'
+      });
+    }
+  });
+
+  return Company;
+};
index e21f06c..7987c94 100644 (file)
@@ -1 +1,42 @@
-var _0x8999=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x68\x61\x73\x5F\x70\x68\x6F\x6E\x65\x73","\x50\x68\x6F\x6E\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x68\x61\x73\x5F\x65\x6D\x61\x69\x6C\x73","\x45\x6D\x61\x69\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74\x48\x61\x73\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x73\x65\x72\x76\x69\x63\x65","\x53\x65\x72\x76\x69\x63\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];module[_0x8999[0]]=function(_0xd857x1,_0xd857x2){var _0xd857x3=_0xd857x1[_0x8999[15]](_0x8999[1],{fullname:{type:_0xd857x2[_0x8999[2]],validate:{notEmpty:true}},tags:_0xd857x2[_0x8999[2]],street:_0xd857x2[_0x8999[2]],postalCode:_0xd857x2[_0x8999[2]],city:_0xd857x2[_0x8999[2]],country:_0xd857x2[_0x8999[2]],dateOfBirth:_0xd857x2[_0x8999[2]],description:_0xd857x2[_0x8999[2]]},{tableName:_0x8999[3],associate:function(_0xd857x4){_0xd857x3[_0x8999[6]](_0xd857x4.ContactPhone,{through:_0x8999[4],as:_0x8999[5]});_0xd857x3[_0x8999[6]](_0xd857x4.ContactEmail,{through:_0x8999[7],as:_0x8999[8]});_0xd857x3[_0x8999[6]](_0xd857x4.CustomField,{through:_0xd857x4[_0x8999[9]],as:_0x8999[10]});_0xd857x3[_0x8999[11]](_0xd857x4.Company);_0xd857x3[_0x8999[11]](_0xd857x4.User);_0xd857x3[_0x8999[11]](_0xd857x4.Service);_0xd857x3[_0x8999[14]](_0x8999[12],{include:[_0xd857x4[_0x8999[13]]]})}});return _0xd857x3}
\ No newline at end of file
+/**
+ * Contact Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Contact = sequelize.define('Contact', {
+    firstName: {
+      type: DataTypes.STRING,
+      validate: {
+        notEmpty: true
+      }
+    },
+    lastName: DataTypes.STRING,
+    tags: DataTypes.STRING,
+    street: DataTypes.STRING,
+    postalCode: DataTypes.STRING,
+    city: DataTypes.STRING,
+    country: DataTypes.STRING,
+    dateOfBirth: DataTypes.STRING,
+    description: DataTypes.STRING,
+    phone: DataTypes.STRING,
+    mobile: DataTypes.STRING,
+    fax: DataTypes.STRING,
+    email: DataTypes.STRING,
+  }, {
+    tableName: 'contacts',
+    associate: function(models) {
+      Contact.belongsTo(models.Company);
+      Contact.belongsTo(models.User);
+      Contact.belongsTo(models.Service);
+      Contact.addScope('service', {
+        include: [models.Service]
+      });
+      Contact.addScope('user', {
+        include: [models.User]
+      });
+    }
+  });
+
+  return Contact;
+};
diff --git a/server/models/contact_email.js b/server/models/contact_email.js
deleted file mode 100644 (file)
index e3b014e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var _0xb70e=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x65\x6D\x61\x69\x6C\x73","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x68\x61\x73\x5F\x65\x6D\x61\x69\x6C\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];module[_0xb70e[0]]=function(_0x6bf5x1,_0x6bf5x2){var _0x6bf5x3=_0x6bf5x1[_0xb70e[6]](_0xb70e[1],{email:{type:_0x6bf5x2[_0xb70e[2]],primaryKey:true}},{tableName:_0xb70e[3],associate:function(_0x6bf5x4){_0x6bf5x3[_0xb70e[5]](_0x6bf5x4.Contact,{through:_0xb70e[4]})}});return _0x6bf5x3}
\ No newline at end of file
diff --git a/server/models/contact_has_custom_field.js b/server/models/contact_has_custom_field.js
deleted file mode 100644 (file)
index 2c14e04..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var _0xde3c=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74\x48\x61\x73\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x68\x61\x73\x5F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xde3c[0]);module[_0xde3c[1]]=function(_0x6d63x2,_0x6d63x3){var _0x6d63x4=_0x6d63x2[_0xde3c[5]](_0xde3c[2],{value:_0x6d63x3[_0xde3c[3]]},{tableName:_0xde3c[4]});return _0x6d63x4}
\ No newline at end of file
diff --git a/server/models/contact_phone.js b/server/models/contact_phone.js
deleted file mode 100644 (file)
index 7f95206..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var _0x8521=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x70\x68\x6F\x6E\x65\x73","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x68\x61\x73\x5F\x70\x68\x6F\x6E\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x49\x6E\x62\x6F\x75\x6E\x64\x73","\x73\x6F\x75\x72\x63\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x64\x65\x66\x69\x6E\x65"];module[_0x8521[0]]=function(_0x3a97x1,_0x3a97x2){var _0x3a97x3=_0x3a97x1[_0x8521[11]](_0x8521[1],{phone:{type:_0x3a97x2[_0x8521[2]],primaryKey:true}},{tableName:_0x8521[3],associate:function(_0x3a97x4){_0x3a97x3[_0x8521[5]](_0x3a97x4.Contact,{through:_0x8521[4]});_0x3a97x3[_0x8521[8]](_0x3a97x4.ReportCall,{as:_0x8521[6],foreignKey:_0x8521[7],constraints:false});_0x3a97x3[_0x8521[8]](_0x3a97x4.ReportCall,{as:_0x8521[9],foreignKey:_0x8521[10],constraints:false})}});return _0x3a97x3}
\ No newline at end of file
index 7fef21b..829d8e7 100644 (file)
@@ -1 +1,22 @@
-var _0xed56=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x43\x6F\x6E\x74\x61\x63\x74\x48\x61\x73\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];module[_0xed56[0]]=function(_0xf8dfx1,_0xf8dfx2){var _0xf8dfx3=_0xf8dfx1[_0xed56[7]](_0xed56[1],{name:{type:_0xf8dfx2[_0xed56[2]],unique:true},type:_0xf8dfx2[_0xed56[2]],active:{type:_0xf8dfx2[_0xed56[3]],defaultValue:true},values:_0xf8dfx2[_0xed56[2]]},{tableName:_0xed56[4],associate:function(_0xf8dfx4){_0xf8dfx3[_0xed56[6]](_0xf8dfx4.Contact,{through:_0xf8dfx4[_0xed56[5]]})}});return _0xf8dfx3}
\ No newline at end of file
+/**
+ * customfield Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var CustomField = sequelize.define('CustomField', {
+    name: DataTypes.STRING,
+    alias: DataTypes.STRING,
+    type: DataTypes.STRING,
+    active: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    values: DataTypes.STRING
+  }, {
+    tableName: 'custom_fields',
+    associate: function(models) {}
+  });
+
+  return CustomField;
+};
index b380ed9..fe9d484 100644 (file)
@@ -1 +1,32 @@
-var _0xd54b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x73","\x46\x69\x65\x6C\x64\x73","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x66\x69\x65\x6C\x64\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x61\x6C\x69\x61\x73","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x4D\x65\x74\x72\x69\x63\x49\x64","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0xd54b[0];module[_0xd54b[1]]=function(_0x2abbx1,_0x2abbx2){var _0x2abbx3=_0x2abbx1[_0xd54b[18]](_0xd54b[2],{name:_0x2abbx2[_0xd54b[3]],description:_0x2abbx2[_0xd54b[3]],parent:_0x2abbx2[_0xd54b[3]],table:_0x2abbx2[_0xd54b[3]],conditions:_0x2abbx2[_0xd54b[4]]},{paranoid:true,tableName:_0xd54b[5],associate:function(_0x2abbx4){_0x2abbx3[_0xd54b[8]](_0x2abbx4.ReportField,{as:_0xd54b[6],onDelete:_0xd54b[7],hooks:true});_0x2abbx3[_0xd54b[17]](_0xd54b[9],{include:[{model:_0x2abbx4[_0xd54b[10]],as:_0xd54b[6],required:false,attributes:[_0xd54b[11],_0xd54b[12],_0xd54b[13],_0xd54b[14],_0xd54b[15],_0xd54b[16]]}]})}});return _0x2abbx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var CustomReport = sequelize.define('CustomReport', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    parent: DataTypes.STRING,
+    table: DataTypes.STRING,
+    conditions: DataTypes.TEXT
+  }, {
+    paranoid: true,
+    tableName: 'custom_reports',
+    associate: function(models) {
+      CustomReport.hasMany(models.ReportField, {
+        as: 'Fields',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      CustomReport.addScope('fields', {
+        include: [{
+          model: models.ReportField,
+          as: 'Fields',
+          required: false,
+          attributes: ['field', 'alias', 'function', 'groupBy', 'orderBy', 'MetricId']
+        }]
+      });
+    }
+  });
+
+  return CustomReport;
+};
index 9c8ce8f..b47660b 100644 (file)
@@ -1 +1,61 @@
-var _0x8830=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x42\x4F\x4F\x4C\x45\x41\x4E","\x34\x2D\x38","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x8830[0];module[_0x8830[1]]=function(_0xe368x1,_0xe368x2){var _0xe368x3=_0xe368x1[_0x8830[8]](_0x8830[2],{name:{type:_0xe368x2[_0x8830[3]]},description:{type:_0xe368x2[_0x8830[3]]},model:{type:_0xe368x2[_0x8830[4]]},collapsible:{type:_0xe368x2[_0x8830[5]],defaultValue:true},editable:{type:_0xe368x2[_0x8830[5]],defaultValue:true},maximizable:{type:_0xe368x2[_0x8830[5]],defaultValue:true},structure:{type:_0xe368x2.STRING(32),defaultValue:_0x8830[6]},enableconfirmdelete:{type:_0xe368x2[_0x8830[5]],defaultValue:true},defaultEntry:{type:_0xe368x2[_0x8830[5]],defaultValue:0},admin:{type:_0xe368x2[_0x8830[5]],defaultValue:true},user:{type:_0xe368x2[_0x8830[5]],defaultValue:true},agent:{type:_0xe368x2[_0x8830[5]],defaultValue:true},visible:{type:_0xe368x2[_0x8830[5]],defaultValue:true}},{tableName:_0x8830[7]});return _0xe368x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Dashboard = sequelize.define('Dashboard', {
+    name: {
+      type: DataTypes.STRING,
+    },
+    description: {
+      type: DataTypes.STRING,
+    },
+    model: {
+      type: DataTypes.TEXT,
+    },
+    collapsible: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    editable: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    maximizable: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    structure: {
+      type: DataTypes.STRING(32),
+      defaultValue: '4-8'
+    },
+    enableconfirmdelete: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    defaultEntry: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: 0
+    },
+    admin: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    user: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    agent: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    visible: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    }
+  }, {
+    tableName: 'dashboards'
+  });
+
+  return Dashboard;
+
+};
index 72a831b..16cdd08 100644 (file)
@@ -1 +1,23 @@
-var _0x426f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x73","\x46\x69\x65\x6C\x64\x73","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];_0x426f[0];module[_0x426f[1]]=function(_0x8e65x1,_0x8e65x2){var _0x8e65x3=_0x8e65x1[_0x426f[9]](_0x426f[2],{name:_0x8e65x2[_0x426f[3]],description:_0x8e65x2[_0x426f[3]],parent:_0x8e65x2[_0x426f[3]],table:_0x8e65x2[_0x426f[3]],conditions:_0x8e65x2[_0x426f[4]]},{tableName:_0x426f[5],associate:function(_0x8e65x4){_0x8e65x3[_0x426f[8]](_0x8e65x4.ReportField,{as:_0x426f[6],onDelete:_0x426f[7],hooks:true})}});return _0x8e65x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var DefaultReport = sequelize.define('DefaultReport', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    parent: DataTypes.STRING,
+    table: DataTypes.STRING,
+    conditions: DataTypes.TEXT
+  }, {
+    tableName: 'default_reports',
+    associate: function(models) {
+      DefaultReport.hasMany(models.ReportField, {
+        as: 'Fields',
+        onDelete: 'cascade',
+        hooks: true
+      });
+    }
+  });
+
+  return DefaultReport;
+};
index a4c7e8b..12615eb 100644 (file)
@@ -1 +1,45 @@
-var _0x963d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x62\x61\x73\x69\x63","\x6F\x61\x75\x74\x68","\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x6E\x61\x6D\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x963d[0];module[_0x963d[1]]=function(_0xf1b3x1,_0xf1b3x2){var _0xf1b3x3=_0xf1b3x1[_0x963d[15]](_0x963d[2],{name:_0xf1b3x2[_0x963d[3]],description:_0xf1b3x2[_0x963d[3]],username:{type:_0xf1b3x2[_0x963d[3]],unique:true},remoteUri:{type:_0xf1b3x2[_0x963d[3]],unique:true},authType:{type:_0xf1b3x2.ENUM(_0x963d[4],_0x963d[5]),defaultValue:_0x963d[4]},password:_0xf1b3x2[_0x963d[3]],consumerKey:_0xf1b3x2[_0x963d[3]],consumerSecret:_0xf1b3x2[_0x963d[3]],token:_0xf1b3x2[_0x963d[3]],tokenSecret:_0xf1b3x2[_0x963d[3]]},{tableName:_0x963d[6],associate:function(_0xf1b3x4){_0xf1b3x3[_0x963d[9]](_0xf1b3x4.DeskConfiguration,{as:_0x963d[7],foreignKey:_0x963d[8]});_0xf1b3x3[_0x963d[14]](_0x963d[10],{include:[{model:_0xf1b3x4[_0x963d[11]],as:_0x963d[7],required:false,attributes:[_0x963d[12],_0x963d[13]]}]})}});return _0xf1b3x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var DeskAccount = sequelize.define('DeskAccount', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    username: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    remoteUri: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    authType: {
+      type: DataTypes.ENUM('basic', 'oauth'),
+      defaultValue: 'basic'
+    },
+    password: DataTypes.STRING,
+    consumerKey: DataTypes.STRING,
+    consumerSecret: DataTypes.STRING,
+    token: DataTypes.STRING,
+    tokenSecret: DataTypes.STRING
+  }, {
+    tableName: 'desk_accounts',
+    associate: function(models) {
+      DeskAccount.hasMany(models.DeskConfiguration, {
+        as: 'Configurations',
+        foreignKey: 'AccountId'
+      });
+      DeskAccount.addScope('configurations', {
+        include: [{
+          model: models.DeskConfiguration,
+          as: 'Configurations',
+          required: false,
+          attributes: ['id', 'name']
+        }]
+      });
+    }
+  });
+
+  return DeskAccount;
+
+};
index bab89d7..fb92e7e 100644 (file)
@@ -1 +1,27 @@
-var _0x5b59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x53\x75\x62\x6A\x65\x63\x74","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x46\x69\x65\x6C\x64","\x46\x69\x65\x6C\x64\x49\x64","\x64\x65\x66\x69\x6E\x65"];_0x5b59[0];module[_0x5b59[1]]=function(_0xd6ecx1,_0xd6ecx2){return _0xd6ecx1[_0x5b59[14]](_0x5b59[2],{name:_0xd6ecx2[_0x5b59[3]],description:_0xd6ecx2[_0x5b59[3]]},{tableName:_0x5b59[4],associate:function(_0xd6ecx3){_0xd6ecx3[_0x5b59[2]][_0x5b59[6]](_0xd6ecx3.DeskAccount,{foreignKey:_0x5b59[5]});_0xd6ecx3[_0x5b59[2]][_0x5b59[9]](_0xd6ecx3.DeskField,{as:_0x5b59[7],foreignKey:_0x5b59[8]});_0xd6ecx3[_0x5b59[2]][_0x5b59[9]](_0xd6ecx3.DeskField,{as:_0x5b59[10],foreignKey:_0x5b59[11]});_0xd6ecx3[_0x5b59[2]][_0x5b59[9]](_0xd6ecx3.DeskField,{as:_0x5b59[12],foreignKey:_0x5b59[13]})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('DeskConfiguration', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'desk_configurations',
+    associate: function(models) {
+      models.DeskConfiguration.belongsTo(models.DeskAccount, {
+        foreignKey: 'AccountId'
+      });
+      models.DeskConfiguration.hasMany(models.DeskField, {
+        as: 'Subject',
+        foreignKey: 'SubjectId'
+      });
+      models.DeskConfiguration.hasMany(models.DeskField, {
+        as: 'Description',
+        foreignKey: 'DescriptionId'
+      });
+      models.DeskConfiguration.hasMany(models.DeskField, {
+        as: 'Field',
+        foreignKey: 'FieldId'
+      });
+    }
+  });
+};
index 832b43c..befea49 100644 (file)
@@ -1 +1,26 @@
-var _0xc26d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x5F\x76\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0xc26d[0];module[_0xc26d[1]]=function(_0x6541x1,_0x6541x2){return _0x6541x1[_0xc26d[10]](_0xc26d[2],{type:{type:_0x6541x2.ENUM(_0xc26d[3],_0xc26d[4],_0xc26d[5]),defaultValue:_0xc26d[3]},content:_0x6541x2[_0xc26d[6]],key:_0x6541x2[_0xc26d[6]],keyType:{type:_0x6541x2.ENUM(_0xc26d[3],_0xc26d[4])},keyContent:_0x6541x2[_0xc26d[6]],idField:_0x6541x2[_0xc26d[6]],customField:{type:_0x6541x2[_0xc26d[7]],defaultValue:true}},{tableName:_0xc26d[8],associate:function(_0x6541x3){_0x6541x3[_0xc26d[2]][_0xc26d[9]](_0x6541x3.Variable)}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('DeskField', {
+    type: {
+      type: DataTypes.ENUM('string', 'variable', 'key_value'),
+      defaultValue: 'string'
+    },
+    content: DataTypes.STRING,
+    key: DataTypes.STRING,
+    keyType: {
+      type: DataTypes.ENUM('string', 'variable')
+    },
+    keyContent: DataTypes.STRING,
+    idField: DataTypes.STRING,
+    customField: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    }
+  }, {
+    tableName: 'desk_fields',
+    associate: function(models) {
+      models.DeskField.belongsTo(models.Variable);
+    }
+  });
+};
index f39f968..fba2c1c 100644 (file)
@@ -1 +1,45 @@
-var _0xb455=["\x65\x78\x70\x6F\x72\x74\x73","\x45\x76\x65\x6E\x74","\x49\x4E\x43\x4F\x4D\x49\x4E\x47","\x4F\x55\x54\x47\x4F\x49\x4E\x47","\x41\x54\x54\x45\x4D\x50\x54","\x41\x53\x53\x49\x47\x4E\x45\x44","\x55\x4E\x41\x53\x53\x49\x47\x4E\x45\x44","\x4D\x41\x49\x4C","\x43\x48\x41\x54","\x46\x41\x58","\x56\x4F\x49\x43\x45","\x49\x4E\x54\x45\x47\x45\x52","\x65\x76\x65\x6E\x74\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];module[_0xb455[0]]=function(_0x7d4ex1,_0x7d4ex2){var _0x7d4ex3=_0x7d4ex1[_0xb455[14]](_0xb455[1],{name:{type:_0x7d4ex2.ENUM(_0xb455[2],_0xb455[3],_0xb455[4],_0xb455[5],_0xb455[6])},channel:{type:_0x7d4ex2.ENUM(_0xb455[7],_0xb455[8],_0xb455[9],_0xb455[10])},timeout:{type:_0x7d4ex2[_0xb455[11]]},holdtime:{type:_0x7d4ex2[_0xb455[11]]}},{tableName:_0xb455[12],associate:function(_0x7d4ex4){_0x7d4ex3[_0xb455[13]](_0x7d4ex4.User);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.MailRoom);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.MailMessage);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.MailQueue);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.MailAccount);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.MailApplication);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.FaxRoom);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.FaxQueue);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.FaxAccount);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.FaxApplication);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.ChatRoom);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.ChatQueue);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.ChatWebsite);_0x7d4ex3[_0xb455[13]](_0x7d4ex4.ChatApplication)}});return _0x7d4ex3}
\ No newline at end of file
+/**
+ * Event Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+       var Event = sequelize.define('Event', {
+               name: {
+                       type: DataTypes.ENUM('INCOMING', 'OUTGOING', 'ATTEMPT', 'ASSIGNED', 'UNASSIGNED')
+               },
+               channel: {
+                       type: DataTypes.ENUM('MAIL', 'CHAT', 'FAX', 'VOICE'),
+               },
+               timeout: {
+                       type: DataTypes.INTEGER
+               },
+               holdtime: {
+                       type: DataTypes.INTEGER
+               }
+       }, {
+               tableName: 'events',
+               associate: function(models) {
+                       // USER RELATIONS
+                       Event.belongsTo(models.User);
+                       // MAIL RELATIONS
+                       Event.belongsTo(models.MailRoom);
+                       Event.belongsTo(models.MailMessage);
+                       Event.belongsTo(models.MailQueue);
+                       Event.belongsTo(models.MailAccount);
+                       Event.belongsTo(models.MailApplication);
+                       // FAX RELATIONS
+                       Event.belongsTo(models.FaxRoom);
+                       Event.belongsTo(models.FaxQueue);
+                       Event.belongsTo(models.FaxAccount);
+                       Event.belongsTo(models.FaxApplication);
+                       // CHAT RELATIONS
+                       Event.belongsTo(models.ChatRoom);
+                       Event.belongsTo(models.ChatQueue);
+                       Event.belongsTo(models.ChatWebsite);
+                       Event.belongsTo(models.ChatApplication);
+               }
+       });
+
+       return Event;
+};
index 6457ad7..984f130 100644 (file)
@@ -1 +1,27 @@
-var _0x3661=["\x65\x78\x70\x6F\x72\x74\x73","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x4C\x6F\x61\x64\x69\x6E\x67","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x73","\x64\x65\x66\x69\x6E\x65"];module[_0x3661[0]]=function(_0xf68dx1,_0xf68dx2){var _0xf68dx3=_0xf68dx1[_0x3661[6]](_0x3661[1],{name:_0xf68dx2[_0x3661[2]],output:_0xf68dx2[_0x3661[2]],savename:_0xf68dx2[_0x3661[2]],startDate:_0xf68dx2[_0x3661[3]],endDate:_0xf68dx2[_0x3661[3]],status:{type:_0xf68dx2[_0x3661[2]],defaultValue:_0x3661[4]}},{tableName:_0x3661[5]});return _0xf68dx3}
\ No newline at end of file
+/**
+ * tag Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ExtractedReport = sequelize.define('ExtractedReport', {
+    name: DataTypes.STRING,
+    output: DataTypes.STRING, //csv,pdf,..
+    savename: DataTypes.STRING,
+    startDate: DataTypes.DATE,
+    endDate: DataTypes.DATE,
+    status: {
+      type: DataTypes.STRING,
+      defaultValue: 'Loading'
+    }
+  }, {
+    tableName: 'extracted_reports',
+    // associate: function(models) {
+    //   Tag.belongsToMany(models.Contact, {
+    //     through: 'contact_tags'
+    //   });
+    // }
+  });
+
+  return ExtractedReport;
+};
index 8fea0f0..71a9227 100644 (file)
@@ -1 +1,40 @@
-var _0x9160=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x39\x36\x30\x30","\x31\x34\x34\x30\x30","\x33\x33\x36\x30\x30","\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x9160[0]);module[_0x9160[1]]=function(_0xd86ax2,_0xd86ax3){var _0xd86ax4=_0xd86ax2[_0x9160[10]](_0x9160[2],{description:_0xd86ax3[_0x9160[3]],name:_0xd86ax3[_0x9160[3]],phone:{type:_0xd86ax3[_0x9160[3]],unique:true},ecm:{type:_0xd86ax3[_0x9160[4]],defaultValue:false},faxheader:_0xd86ax3[_0x9160[3]],localid:_0xd86ax3[_0x9160[3]],maxrate:{type:_0xd86ax3.ENUM(_0x9160[5],_0x9160[6],_0x9160[7]),defaultValue:_0x9160[7]},minrate:{type:_0xd86ax3.ENUM(_0x9160[5],_0x9160[6],_0x9160[7]),defaultValue:_0x9160[5]}},{tableName:_0x9160[8],associate:function(_0xd86ax5){_0xd86ax4[_0x9160[9]](_0xd86ax5.FaxRoom);_0xd86ax4[_0x9160[9]](_0xd86ax5.FaxApplication)}});return _0xd86ax4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var FaxAccount = sequelize.define('FaxAccount', {
+               description: DataTypes.STRING,
+               name: DataTypes.STRING,
+               phone: {
+                       type: DataTypes.STRING,
+                       unique: true
+               },
+               ecm: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               faxheader: DataTypes.STRING,
+               localid: DataTypes.STRING,
+               maxrate: {
+                       type: DataTypes.ENUM('9600', '14400', '33600'),
+                       defaultValue: '33600'
+               },
+               minrate: {
+                       type: DataTypes.ENUM('9600', '14400', '33600'),
+                       defaultValue: '9600'
+               }
+       }, {
+               tableName: 'fax_accounts',
+               associate: function(models) {
+                       // FaxAccount.belongsTo(models.Trunk);
+                       FaxAccount.hasMany(models.FaxRoom);
+                       FaxAccount.hasMany(models.FaxApplication);
+               }
+       });
+
+       return FaxAccount;
+};
index ab81681..b4c6d10 100644 (file)
@@ -1 +1,33 @@
-var _0xfcd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x2A\x7C\x2A\x7C\x2A\x7C\x2A","\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0xfcd7[0];module[_0xfcd7[1]]=function(_0xfc3ax1,_0xfc3ax2){var _0xfc3ax3=_0xfc3ax1[_0xfcd7[10]](_0xfcd7[2],{app:{type:_0xfc3ax2.ENUM(_0xfcd7[3],_0xfcd7[4])},appdata:{type:_0xfc3ax2[_0xfcd7[5]]},priority:{type:_0xfc3ax2[_0xfcd7[5]]},timeout:{type:_0xfc3ax2[_0xfcd7[5]]},interval:{type:_0xfc3ax2[_0xfcd7[6]],defaultValue:_0xfcd7[7]}},{tableName:_0xfcd7[8],associate:function(_0xfc3ax4){_0xfc3ax3[_0xfcd7[9]](_0xfc3ax4.FaxAccount);_0xfc3ax3[_0xfcd7[9]](_0xfc3ax4.FaxQueue);_0xfc3ax3[_0xfcd7[9]](_0xfc3ax4.User)}});return _0xfc3ax3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var FaxApplication = sequelize.define('FaxApplication', {
+    app: {
+      type: DataTypes.ENUM('queue', 'agent')
+    },
+    appdata: {
+      type: DataTypes.INTEGER
+    },
+    priority: {
+      type: DataTypes.INTEGER
+    },
+    timeout: {
+      type: DataTypes.INTEGER
+    },
+    interval: {
+      type: DataTypes.STRING,
+      defaultValue: '*|*|*|*'
+    }
+  }, {
+    tableName: 'fax_applications',
+    associate: function(models) {
+      // hasMany relations
+      FaxApplication.belongsTo(models.FaxAccount);
+      FaxApplication.belongsTo(models.FaxQueue);
+      FaxApplication.belongsTo(models.User);
+    }
+  });
+
+  return FaxApplication;
+};
index 7f5a1aa..78700ac 100644 (file)
@@ -1 +1,63 @@
-var _0x619f=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x52\x45\x43\x45\x49\x56\x45\x44","\x4E\x4F\x54\x20\x53\x45\x4E\x54","\x53\x45\x4E\x44\x49\x4E\x47","\x53\x45\x4E\x54","\x46\x41\x49\x4C\x45\x44","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x46\x72\x6F\x6D","\x54\x6F","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x619f[0]);module[_0x619f[1]]=function(_0xc793x2,_0xc793x3){var _0xc793x4=_0xc793x2[_0x619f[16]](_0x619f[2],{actionid:_0xc793x3[_0x619f[3]],channel:_0xc793x3[_0x619f[3]],channelstate:_0xc793x3[_0x619f[4]],channelstatedesc:_0xc793x3[_0x619f[3]],calleridnum:_0xc793x3[_0x619f[3]],calleridname:_0xc793x3[_0x619f[3]],connectedlinenum:_0xc793x3[_0x619f[3]],connectedlinename:_0xc793x3[_0x619f[3]],status:{type:_0xc793x3.ENUM(_0x619f[5],_0x619f[6],_0x619f[7],_0x619f[8],_0x619f[9]),allowNull:true},read:{type:_0xc793x3[_0x619f[10]],defaultValue:false},favorite:{type:_0xc793x3[_0x619f[10]],defaultValue:false},language:_0xc793x3[_0x619f[3]],accountcode:_0xc793x3[_0x619f[3]],context:_0xc793x3[_0x619f[3]],exten:_0xc793x3[_0x619f[3]],priority:_0xc793x3[_0x619f[4]],uniqueid:_0xc793x3[_0x619f[3]],localstationid:_0xc793x3[_0x619f[3]],remotestationid:_0xc793x3[_0x619f[3]],pagestransferred:_0xc793x3[_0x619f[4]],resolution:_0xc793x3[_0x619f[3]],transferrate:_0xc793x3[_0x619f[3]],filename:_0xc793x3[_0x619f[3]],filenamePDF:_0xc793x3[_0x619f[3]],operation:_0xc793x3[_0x619f[3]],uuid:_0xc793x3[_0x619f[3]],laststatus:_0xc793x3[_0x619f[3]],error:_0xc793x3[_0x619f[3]],body:_0xc793x3[_0x619f[11]]},{tableName:_0x619f[12],associate:function(_0xc793x5){_0xc793x4[_0x619f[13]](_0xc793x5.FaxRoom);_0xc793x4[_0x619f[13]](_0xc793x5.Contact,{as:_0x619f[14]});_0xc793x4[_0x619f[13]](_0xc793x5.Contact,{as:_0x619f[15]})}});return _0xc793x4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var FaxMessage = sequelize.define('FaxMessage', {
+               actionid: DataTypes.STRING,
+               channel: DataTypes.STRING,
+               channelstate: DataTypes.INTEGER,
+               channelstatedesc: DataTypes.STRING,
+               calleridnum: DataTypes.STRING,
+               calleridname: DataTypes.STRING,
+               connectedlinenum: DataTypes.STRING,
+               connectedlinename: DataTypes.STRING,
+               status: {
+                       type: DataTypes.ENUM('RECEIVED', 'NOT SENT', 'SENDING', 'SENT',
+                               'FAILED'),
+                       allowNull: true
+               },
+               read: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               favorite: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               language: DataTypes.STRING,
+               accountcode: DataTypes.STRING,
+               context: DataTypes.STRING,
+               exten: DataTypes.STRING,
+               priority: DataTypes.INTEGER,
+               uniqueid: DataTypes.STRING,
+               localstationid: DataTypes.STRING,
+               remotestationid: DataTypes.STRING,
+               pagestransferred: DataTypes.INTEGER,
+               resolution: DataTypes.STRING,
+               transferrate: DataTypes.STRING,
+               filename: DataTypes.STRING,
+               filenamePDF: DataTypes.STRING,
+               operation: DataTypes.STRING,
+               uuid: DataTypes.STRING,
+               laststatus: DataTypes.STRING,
+               error: DataTypes.STRING,
+               body: DataTypes.TEXT
+       }, {
+               tableName: 'fax_messages',
+               associate: function(models) {
+                       FaxMessage.belongsTo(models.FaxRoom);
+                       FaxMessage.belongsTo(models.Contact, {
+                               as: 'From'
+                       });
+                       FaxMessage.belongsTo(models.Contact, {
+                               as: 'To'
+                       });
+               }
+       });
+
+       return FaxMessage;
+};
index 023c90c..035bad7 100644 (file)
@@ -1 +1,36 @@
-var _0x464f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];_0x464f[0];module[_0x464f[1]]=function(_0xa4abx1,_0xa4abx2){var _0xa4abx3=_0xa4abx1[_0x464f[10]](_0x464f[2],{name:{type:_0xa4abx2[_0x464f[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:{type:_0xa4abx2[_0x464f[3]]},timeout:{type:_0xa4abx2[_0x464f[4]]},strategy:{type:_0xa4abx2.ENUM(_0x464f[5],_0x464f[6])}},{tableName:_0x464f[7],associate:function(_0xa4abx4){_0xa4abx3[_0x464f[9]](_0xa4abx4.User,{hooks:true,through:_0xa4abx4[_0x464f[8]]})}});return _0xa4abx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var FaxQueue = sequelize.define('FaxQueue', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true,
+      }
+    },
+    description: {
+      type: DataTypes.STRING,
+    },
+    timeout: {
+      type: DataTypes.INTEGER,
+    },
+    strategy: {
+      type: DataTypes.ENUM('rrmemory', 'beepall')
+    }
+  }, {
+    tableName: 'fax_queues',
+    associate: function(models) {
+      // hasMany relations
+      FaxQueue.belongsToMany(models.User, {
+        hooks: true,
+        through: models.UserHasFaxQueue
+      });
+    }
+  });
+
+  return FaxQueue;
+
+};
index 5aed333..112966e 100644 (file)
@@ -1 +1,25 @@
-var _0x11d3=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x53\x54\x52\x49\x4E\x47","\x4E\x45\x57","\x4F\x50\x45\x4E","\x50\x45\x4E\x44\x49\x4E\x47","\x53\x4F\x4C\x56\x45\x44","\x43\x4C\x4F\x53\x45\x44","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x11d3[0]);module[_0x11d3[1]]=function(_0x1b2fx2,_0x1b2fx3){var _0x1b2fx4=_0x1b2fx2[_0x11d3[12]](_0x11d3[2],{roomId:_0x1b2fx3[_0x11d3[3]],from:_0x1b2fx3[_0x11d3[3]],status:_0x1b2fx3.ENUM(_0x11d3[4],_0x11d3[5],_0x11d3[6],_0x11d3[7],_0x11d3[8])},{tableName:_0x11d3[9],associate:function(_0x1b2fx5){_0x1b2fx4[_0x11d3[10]](_0x1b2fx5.FaxMessage);_0x1b2fx4[_0x11d3[11]](_0x1b2fx5.FaxAccount);_0x1b2fx4[_0x11d3[11]](_0x1b2fx5.User)}});return _0x1b2fx4}
\ No newline at end of file
+/**
+ * Fax Room Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var FaxRoom = sequelize.define('FaxRoom', {
+    roomId: DataTypes.STRING,
+    // subject: DataTypes.STRING,
+    from: DataTypes.STRING,
+    status: DataTypes.ENUM('NEW', 'OPEN', 'PENDING', 'SOLVED', 'CLOSED')
+  }, {
+    tableName: 'fax_rooms',
+    associate: function(models) {
+      // hasMany relations
+      FaxRoom.hasMany(models.FaxMessage);
+      FaxRoom.belongsTo(models.FaxAccount);
+      FaxRoom.belongsTo(models.User);
+    }
+  });
+
+  return FaxRoom;
+};
index 8654cbb..f9f9f2b 100644 (file)
@@ -1 +1,33 @@
-var _0xa5a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x6E\x61\x6D\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0xa5a8[0];module[_0xa5a8[1]]=function(_0x4a21x1,_0x4a21x2){return _0x4a21x1[_0xa5a8[13]](_0xa5a8[2],{name:_0x4a21x2[_0xa5a8[3]],description:_0x4a21x2[_0xa5a8[3]],username:{type:_0x4a21x2[_0xa5a8[3]],unique:true},remoteUri:{type:_0x4a21x2[_0xa5a8[3]],unique:true},apiKey:_0x4a21x2[_0xa5a8[3]]},{tableName:_0xa5a8[4],associate:function(_0x4a21x3){_0x4a21x3[_0xa5a8[2]][_0xa5a8[7]](_0x4a21x3.FreshdeskConfiguration,{as:_0xa5a8[5],foreignKey:_0xa5a8[6]});_0x4a21x3[_0xa5a8[2]][_0xa5a8[12]](_0xa5a8[8],{include:[{model:_0x4a21x3[_0xa5a8[9]],as:_0xa5a8[5],required:false,attributes:[_0xa5a8[10],_0xa5a8[11]]}]})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('FreshdeskAccount', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    username: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    remoteUri: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    apiKey: DataTypes.STRING
+  }, {
+    tableName: 'freshdesk_accounts',
+    associate: function(models) {
+      models.FreshdeskAccount.hasMany(models.FreshdeskConfiguration, {
+        as: 'Configurations',
+        foreignKey: 'AccountId'
+      });
+      models.FreshdeskAccount.addScope('configurations', {
+        include: [{
+          model: models.FreshdeskConfiguration,
+          as: 'Configurations',
+          required: false,
+          attributes: ['id', 'name']
+        }]
+      });
+    }
+  });
+};
index 6743a6f..4a1299a 100644 (file)
@@ -1 +1,27 @@
-var _0x9cc2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x53\x75\x62\x6A\x65\x63\x74","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x46\x69\x65\x6C\x64","\x46\x69\x65\x6C\x64\x49\x64","\x64\x65\x66\x69\x6E\x65"];_0x9cc2[0];module[_0x9cc2[1]]=function(_0x3d8ax1,_0x3d8ax2){return _0x3d8ax1[_0x9cc2[14]](_0x9cc2[2],{name:_0x3d8ax2[_0x9cc2[3]],description:_0x3d8ax2[_0x9cc2[3]]},{tableName:_0x9cc2[4],associate:function(_0x3d8ax3){_0x3d8ax3[_0x9cc2[2]][_0x9cc2[6]](_0x3d8ax3.FreshdeskAccount,{foreignKey:_0x9cc2[5]});_0x3d8ax3[_0x9cc2[2]][_0x9cc2[9]](_0x3d8ax3.FreshdeskField,{as:_0x9cc2[7],foreignKey:_0x9cc2[8]});_0x3d8ax3[_0x9cc2[2]][_0x9cc2[9]](_0x3d8ax3.FreshdeskField,{as:_0x9cc2[10],foreignKey:_0x9cc2[11]});_0x3d8ax3[_0x9cc2[2]][_0x9cc2[9]](_0x3d8ax3.FreshdeskField,{as:_0x9cc2[12],foreignKey:_0x9cc2[13]})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('FreshdeskConfiguration', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'freshdesk_configurations',
+    associate: function(models) {
+      models.FreshdeskConfiguration.belongsTo(models.FreshdeskAccount, {
+        foreignKey: 'AccountId'
+      });
+      models.FreshdeskConfiguration.hasMany(models.FreshdeskField, {
+        as: 'Subject',
+        foreignKey: 'SubjectId'
+      });
+      models.FreshdeskConfiguration.hasMany(models.FreshdeskField, {
+        as: 'Description',
+        foreignKey: 'DescriptionId'
+      });
+      models.FreshdeskConfiguration.hasMany(models.FreshdeskField, {
+        as: 'Field',
+        foreignKey: 'FieldId'
+      });
+    }
+  });
+};
index 0a5b0a5..a1c54c9 100644 (file)
@@ -1 +1,26 @@
-var _0x5e07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x5F\x76\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0x5e07[0];module[_0x5e07[1]]=function(_0x5880x1,_0x5880x2){return _0x5880x1[_0x5e07[10]](_0x5e07[2],{type:{type:_0x5880x2.ENUM(_0x5e07[3],_0x5e07[4],_0x5e07[5]),defaultValue:_0x5e07[3]},content:_0x5880x2[_0x5e07[6]],key:_0x5880x2[_0x5e07[6]],keyType:{type:_0x5880x2.ENUM(_0x5e07[3],_0x5e07[4])},keyContent:_0x5880x2[_0x5e07[6]],idField:_0x5880x2[_0x5e07[6]],customField:{type:_0x5880x2[_0x5e07[7]],defaultValue:true}},{tableName:_0x5e07[8],associate:function(_0x5880x3){_0x5880x3[_0x5e07[2]][_0x5e07[9]](_0x5880x3.Variable)}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('FreshdeskField', {
+    type: {
+      type: DataTypes.ENUM('string', 'variable', 'key_value'),
+      defaultValue: 'string'
+    },
+    content: DataTypes.STRING,
+    key: DataTypes.STRING,
+    keyType: {
+      type: DataTypes.ENUM('string', 'variable')
+    },
+    keyContent: DataTypes.STRING,
+    idField: DataTypes.STRING,
+    customField: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    }
+  }, {
+    tableName: 'freshdesk_fields',
+    associate: function(models) {
+      models.FreshdeskField.belongsTo(models.Variable);
+    }
+  });
+};
index ce4bfaa..5c42540 100644 (file)
@@ -1 +1,74 @@
-var _0xe335=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65"];var moment=require(_0xe335[0]);module[_0xe335[1]]=function(_0x8fedx2,_0x8fedx3){var _0x8fedx4=_0x8fedx2[_0xe335[12]](_0xe335[2],{uniqueid:_0x8fedx3[_0xe335[3]],calleridnum:_0x8fedx3[_0xe335[3]],calleridname:_0x8fedx3[_0xe335[3]],queue:_0x8fedx3[_0xe335[3]],interface:_0x8fedx3[_0xe335[3]],membername:_0x8fedx3[_0xe335[3]],agentcalledAt:_0x8fedx3[_0xe335[4]],agentconnectAt:{type:_0x8fedx3[_0xe335[4]],get:function(){return moment(this[_0xe335[8]](_0xe335[7]))[_0xe335[6]](_0xe335[5])}},holdtime:_0x8fedx3[_0xe335[9]],agentcomplete:{type:_0x8fedx3[_0xe335[10]],defaultValue:false},agentcompleteAt:_0x8fedx3[_0xe335[4]],talktime:_0x8fedx3[_0xe335[9]],agentacw:{type:_0x8fedx3[_0xe335[10]],defaultValue:false},acwtime:_0x8fedx3[_0xe335[9]],reason:_0x8fedx3[_0xe335[3]],agentringnoanswer:{type:_0x8fedx3[_0xe335[10]],defaultValue:false},agentringnoanswerAt:_0x8fedx3[_0xe335[4]],agentdump:{type:_0x8fedx3[_0xe335[10]],defaultValue:false},agentdumpAt:_0x8fedx3[_0xe335[4]],lastevent:_0x8fedx3[_0xe335[3]],channel:_0x8fedx3[_0xe335[3]],channelstate:_0x8fedx3[_0xe335[9]],channelstatedesc:_0x8fedx3[_0xe335[3]],connectedlinenum:_0x8fedx3[_0xe335[3]],connectedlinename:_0x8fedx3[_0xe335[3]],language:_0x8fedx3[_0xe335[3]],accountcode:_0x8fedx3[_0xe335[3]],context:_0x8fedx3[_0xe335[3]],exten:_0x8fedx3[_0xe335[3]],priority:_0x8fedx3[_0xe335[3]],destchannel:_0x8fedx3[_0xe335[3]],destchannelstate:_0x8fedx3[_0xe335[9]],destchannelstatedesc:_0x8fedx3[_0xe335[3]],destcalleridnum:_0x8fedx3[_0xe335[3]],destcalleridname:_0x8fedx3[_0xe335[3]],destconnectedlinenum:_0x8fedx3[_0xe335[3]],destconnectedlinename:_0x8fedx3[_0xe335[3]],destlanguage:_0x8fedx3[_0xe335[3]],destaccountcode:_0x8fedx3[_0xe335[3]],destcontext:_0x8fedx3[_0xe335[3]],destexten:_0x8fedx3[_0xe335[3]],destpriority:_0x8fedx3[_0xe335[3]],destuniqueid:_0x8fedx3[_0xe335[3]]},{tableName:_0xe335[11]});_0x8fedx4[_0xe335[14]](_0xe335[13]);return _0x8fedx4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+  var ReportAgentHistory = sequelize.define('ReportAgentHistory', {
+    uniqueid: DataTypes.STRING,
+    calleridnum: DataTypes.STRING,
+    calleridname: DataTypes.STRING,
+    queue: DataTypes.STRING,
+    interface: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    agentcalledAt: DataTypes.DATE,
+    agentconnectAt: {
+      type: DataTypes.DATE,
+      get: function() {
+        return moment(this.getDataValue('agentconnectAt')).format("MM-DD-YYYY HH:mm");
+      },
+    },
+    holdtime: DataTypes.INTEGER,
+    agentcomplete: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentcompleteAt: DataTypes.DATE,
+    talktime: DataTypes.INTEGER,
+    agentacw: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    acwtime: DataTypes.INTEGER,
+    reason: DataTypes.STRING,
+    agentringnoanswer: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentringnoanswerAt: DataTypes.DATE,
+    agentdump: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentdumpAt: DataTypes.DATE,
+    lastevent: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    channelstate: DataTypes.INTEGER,
+    channelstatedesc: DataTypes.STRING,
+    connectedlinenum: DataTypes.STRING,
+    connectedlinename: DataTypes.STRING,
+    language: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    context: DataTypes.STRING,
+    exten: DataTypes.STRING,
+    priority: DataTypes.STRING,
+    destchannel: DataTypes.STRING,
+    destchannelstate: DataTypes.INTEGER,
+    destchannelstatedesc: DataTypes.STRING,
+    destcalleridnum: DataTypes.STRING,
+    destcalleridname: DataTypes.STRING,
+    destconnectedlinenum: DataTypes.STRING,
+    destconnectedlinename: DataTypes.STRING,
+    destlanguage: DataTypes.STRING,
+    destaccountcode: DataTypes.STRING,
+    destcontext: DataTypes.STRING,
+    destexten: DataTypes.STRING,
+    destpriority: DataTypes.STRING,
+    destuniqueid: DataTypes.STRING
+  }, {
+    tableName: 'report_agent_history'
+  });
+
+  ReportAgentHistory.removeAttribute('id');
+  return ReportAgentHistory;
+};
index a0d30d5..0bda734 100644 (file)
@@ -1 +1,60 @@
-var _0xfa94=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x45\x4E\x55\x4D","\x69\x6E\x62\x6F\x75\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x44\x41\x54\x45","","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x48\x69\x73\x74\x6F\x72\x79\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x48\x69\x73\x74\x6F\x72\x79\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];module[_0xfa94[0]]=function(_0x4d1fx1,_0x4d1fx2){var _0x4d1fx3=_0x4d1fx1[_0xfa94[17]](_0xfa94[1],{uniqueid:{type:_0x4d1fx2[_0xfa94[2]],unique:true},type:{type:_0x4d1fx2[_0xfa94[3]],values:[_0xfa94[4],_0xfa94[5],_0xfa94[6]]},tag:_0x4d1fx2[_0xfa94[2]],accountcode:_0x4d1fx2[_0xfa94[2]],source:_0x4d1fx2[_0xfa94[2]],destination:_0x4d1fx2[_0xfa94[2]],destinationcontext:_0x4d1fx2[_0xfa94[2]],callerid:_0x4d1fx2[_0xfa94[2]],channel:_0x4d1fx2[_0xfa94[2]],destinationchannel:_0x4d1fx2[_0xfa94[2]],lastapplication:_0x4d1fx2[_0xfa94[2]],lastdata:_0x4d1fx2[_0xfa94[2]],starttime:_0x4d1fx2[_0xfa94[7]],answertime:{type:_0x4d1fx2[_0xfa94[7]],set:function(_0x4d1fx4){if(_0x4d1fx4!==_0xfa94[8]){this[_0xfa94[10]](_0xfa94[9],_0x4d1fx4)}else {this[_0xfa94[10]](_0xfa94[9],null)}}},endtime:_0x4d1fx2[_0xfa94[7]],duration:_0x4d1fx2[_0xfa94[11]],billableseconds:_0x4d1fx2[_0xfa94[11]],disposition:_0x4d1fx2[_0xfa94[2]],amaflags:_0x4d1fx2[_0xfa94[2]],userfield:_0x4d1fx2[_0xfa94[2]]},{tableName:_0xfa94[12],associate:function(_0x4d1fx5){_0x4d1fx3[_0xfa94[15]](_0x4d1fx5.ReportQueueHistory,{as:_0xfa94[13],foreignKey:_0xfa94[14],constraints:false});_0x4d1fx3[_0xfa94[15]](_0x4d1fx5.ReportAgentHistory,{as:_0xfa94[16],foreignKey:_0xfa94[14],constraints:false})}});return _0x4d1fx3}
\ No newline at end of file
+/**
+ * CDR Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportCallHistory = sequelize.define('ReportCallHistory', {
+    uniqueid: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    type: {
+      type: DataTypes.ENUM,
+      values: ['inbound', 'internal', 'outbound']
+    },
+    tag: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    source: DataTypes.STRING,
+    destination: DataTypes.STRING,
+    destinationcontext: DataTypes.STRING,
+    callerid: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    destinationchannel: DataTypes.STRING,
+    lastapplication: DataTypes.STRING,
+    lastdata: DataTypes.STRING,
+    starttime: DataTypes.DATE,
+    answertime: {
+      type: DataTypes.DATE,
+      set: function(answertime) {
+        if (answertime !== '') {
+          this.setDataValue('answertime', answertime);
+        } else {
+          this.setDataValue('answertime', null);
+        }
+      }
+    },
+    endtime: DataTypes.DATE,
+    duration: DataTypes.INTEGER,
+    billableseconds: DataTypes.INTEGER,
+    disposition: DataTypes.STRING,
+    amaflags: DataTypes.STRING,
+    userfield: DataTypes.STRING
+  }, {
+    tableName: 'report_call_history',
+    associate: function(models) {
+      ReportCallHistory.hasMany(models.ReportQueueHistory, {
+        as: 'HistoryQueueCalls',
+        foreignKey: 'uniqueid',
+        constraints: false
+      });
+      ReportCallHistory.hasMany(models.ReportAgentHistory, {
+        as: 'HistoryReportAgents',
+        foreignKey: 'uniqueid',
+        constraints: false
+      });
+    }
+  });
+
+  return ReportCallHistory;
+};
index 7afb083..fabf94d 100644 (file)
@@ -1 +1,45 @@
-var _0xdda1=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x63\x61\x6C\x6C\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0xdda1[0]);module[_0xdda1[1]]=function(_0xca6ex2,_0xca6ex3){var _0xca6ex4=_0xca6ex2[_0xdda1[16]](_0xdda1[2],{uniqueid:_0xca6ex3[_0xdda1[3]],timeslot:_0xca6ex3[_0xdda1[4]],websitename:_0xca6ex3[_0xdda1[3]],websiteaddress:_0xca6ex3[_0xdda1[3]],websiteid:_0xca6ex3[_0xdda1[4]],application:_0xca6ex3[_0xdda1[3]],agentid:_0xca6ex3[_0xdda1[4]],agentname:_0xca6ex3[_0xdda1[3]],visitorid:_0xca6ex3[_0xdda1[3]],visitorname:_0xca6ex3[_0xdda1[3]],visitoremail:_0xca6ex3[_0xdda1[3]],queueid:_0xca6ex3[_0xdda1[4]],queuename:_0xca6ex3[_0xdda1[3]],roomid:_0xca6ex3[_0xdda1[4]],reason:{type:_0xca6ex3[_0xdda1[3]],defaultValue:_0xdda1[5]},connectid:{type:_0xca6ex3[_0xdda1[3]],unique:true,set:function(_0xca6ex5){this[_0xdda1[8]](_0xdda1[6],this[_0xdda1[7]]);this[_0xdda1[8]](_0xdda1[9],_0xdda1[10]);this[_0xdda1[8]](_0xdda1[11],moment()[_0xdda1[13]](_0xdda1[12]))}},calledAt:_0xca6ex3[_0xdda1[14]],connectedAt:_0xca6ex3[_0xdda1[14]]},{tableName:_0xdda1[15]});return _0xca6ex4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportChatHistory = sequelize.define('ReportChatHistory', {
+
+    uniqueid: DataTypes.STRING,
+    timeslot: DataTypes.INTEGER,
+    websitename: DataTypes.STRING,
+    websiteaddress: DataTypes.STRING,
+    websiteid: DataTypes.INTEGER,
+    application: DataTypes.STRING,
+    agentid: DataTypes.INTEGER,
+    agentname: DataTypes.STRING,
+    visitorid: DataTypes.STRING,
+    visitorname: DataTypes.STRING,
+    visitoremail: DataTypes.STRING,
+    queueid: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    reason: {
+      type: DataTypes.STRING,
+      defaultValue: 'called'
+    },
+    connectid: {
+      type: DataTypes.STRING,
+      unique: true,
+      set: function(agentconnectedAt) {
+        this.setDataValue('connectid', this.uniqueid);
+        this.setDataValue('reason', 'connect');
+        this.setDataValue('connectedAt', moment().format("YYYY-MM-DD HH:mm:ss"));
+      }
+    },
+    calledAt: DataTypes.DATE,
+    connectedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_chat_history'
+  });
+
+  return ReportChatHistory;
+};
index 633c15c..11f3b8a 100644 (file)
@@ -1 +1,45 @@
-var _0x778b=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x61\x67\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x778b[0]);module[_0x778b[1]]=function(_0x680dx2,_0x680dx3){var _0x680dx4=_0x680dx2[_0x778b[10]](_0x778b[2],{uniqueid:{type:_0x680dx3[_0x778b[3]],unique:true},websitename:_0x680dx3[_0x778b[3]],websiteaddress:_0x680dx3[_0x778b[3]],websiteid:_0x680dx3[_0x778b[4]],application:_0x680dx3[_0x778b[3]],visitorid:_0x680dx3[_0x778b[3]],visitorname:_0x680dx3[_0x778b[3]],visitoremail:_0x680dx3[_0x778b[3]],agentid:_0x680dx3[_0x778b[3]],agentname:_0x680dx3[_0x778b[3]],queueid:_0x680dx3[_0x778b[4]],queuename:_0x680dx3[_0x778b[3]],roomid:_0x680dx3[_0x778b[4]],abandon:{type:_0x680dx3[_0x778b[5]],defaulValue:false},abandonAt:_0x680dx3[_0x778b[6]],complete:{type:_0x680dx3[_0x778b[5]],defaulValue:false},completeReason:_0x680dx3.ENUM(_0x778b[7],_0x778b[8]),completeAt:_0x680dx3[_0x778b[6]],joinAt:_0x680dx3[_0x778b[6]],leaveAt:_0x680dx3[_0x778b[6]],unmanagedAt:_0x680dx3[_0x778b[6]]},{tableName:_0x778b[9]});return _0x680dx4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportChatSessionHistory = sequelize.define('ReportChatSessionHistory', {
+    uniqueid: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    websitename: DataTypes.STRING,
+    websiteaddress: DataTypes.STRING,
+    websiteid: DataTypes.INTEGER,
+    application: DataTypes.STRING,
+    visitorid: DataTypes.STRING,
+    visitorname: DataTypes.STRING,
+    visitoremail: DataTypes.STRING,
+    agentid: DataTypes.STRING,
+    agentname: DataTypes.STRING,
+    queueid: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    abandon: {
+      type: DataTypes.BOOLEAN,
+      defaulValue: false
+    },
+    abandonAt: DataTypes.DATE,
+    complete: {
+      type: DataTypes.BOOLEAN,
+      defaulValue: false
+    },
+    completeReason: DataTypes.ENUM('agent', 'requester'),
+    completeAt: DataTypes.DATE,
+    joinAt: DataTypes.DATE,
+    leaveAt: DataTypes.DATE,
+    unmanagedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_chat_session_history'
+  });
+
+  return ReportChatSessionHistory;
+};
index 9631b81..d481e00 100644 (file)
@@ -1 +1,86 @@
-var _0xa1a2=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x53\x45\x4E\x54","\x53\x45\x4E\x44\x49\x4E\x47","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x41\x49\x4C\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65"];module[_0xa1a2[0]]=function(_0xf4d5x1,_0xf4d5x2){var _0xf4d5x3=_0xf4d5x1[_0xa1a2[12]](_0xa1a2[1],{integration:_0xf4d5x2[_0xa1a2[2]],eventChannel:_0xf4d5x2[_0xa1a2[2]],exitStatus:_0xf4d5x2[_0xa1a2[2]],ticketId:_0xf4d5x2[_0xa1a2[2]],integrationId:_0xf4d5x2[_0xa1a2[3]],uniqueid:_0xf4d5x2[_0xa1a2[2]],calleridnum:_0xf4d5x2[_0xa1a2[2]],calleridname:_0xf4d5x2[_0xa1a2[2]],queue:_0xf4d5x2[_0xa1a2[2]],interface:_0xf4d5x2[_0xa1a2[2]],membername:_0xf4d5x2[_0xa1a2[2]],agentcalledAt:_0xf4d5x2[_0xa1a2[4]],agentconnectAt:_0xf4d5x2[_0xa1a2[4]],holdtime:_0xf4d5x2[_0xa1a2[3]],agentcomplete:{type:_0xf4d5x2[_0xa1a2[5]],defaultValue:false},agentcompleteAt:_0xf4d5x2[_0xa1a2[4]],talktime:_0xf4d5x2[_0xa1a2[3]],agentacw:{type:_0xf4d5x2[_0xa1a2[5]],defaultValue:false},acwtime:_0xf4d5x2[_0xa1a2[3]],reason:_0xf4d5x2[_0xa1a2[2]],agentringnoanswer:{type:_0xf4d5x2[_0xa1a2[5]],defaultValue:false},agentringnoanswerAt:_0xf4d5x2[_0xa1a2[4]],agentdump:{type:_0xf4d5x2[_0xa1a2[5]],defaultValue:false},agentdumpAt:_0xf4d5x2[_0xa1a2[4]],lastevent:_0xf4d5x2[_0xa1a2[2]],channel:_0xf4d5x2[_0xa1a2[2]],channelstate:_0xf4d5x2[_0xa1a2[3]],channelstatedesc:_0xf4d5x2[_0xa1a2[2]],connectedlinenum:_0xf4d5x2[_0xa1a2[2]],connectedlinename:_0xf4d5x2[_0xa1a2[2]],language:_0xf4d5x2[_0xa1a2[2]],accountcode:_0xf4d5x2[_0xa1a2[2]],context:_0xf4d5x2[_0xa1a2[2]],exten:_0xf4d5x2[_0xa1a2[2]],priority:_0xf4d5x2[_0xa1a2[2]],destchannel:_0xf4d5x2[_0xa1a2[2]],destchannelstate:_0xf4d5x2[_0xa1a2[3]],destchannelstatedesc:_0xf4d5x2[_0xa1a2[2]],destcalleridnum:_0xf4d5x2[_0xa1a2[2]],destcalleridname:_0xf4d5x2[_0xa1a2[2]],destconnectedlinenum:_0xf4d5x2[_0xa1a2[2]],destconnectedlinename:_0xf4d5x2[_0xa1a2[2]],destlanguage:_0xf4d5x2[_0xa1a2[2]],destaccountcode:_0xf4d5x2[_0xa1a2[2]],destcontext:_0xf4d5x2[_0xa1a2[2]],destexten:_0xf4d5x2[_0xa1a2[2]],destpriority:_0xf4d5x2[_0xa1a2[2]],destuniqueid:_0xf4d5x2[_0xa1a2[2]],messageId:_0xf4d5x2[_0xa1a2[2]],inReplyTo:_0xf4d5x2[_0xa1a2[2]],subject:_0xf4d5x2[_0xa1a2[2]],from:_0xf4d5x2[_0xa1a2[2]],to:_0xf4d5x2[_0xa1a2[2]],cc:_0xf4d5x2[_0xa1a2[2]],attachment:_0xf4d5x2[_0xa1a2[6]],html:_0xf4d5x2[_0xa1a2[6]],text:_0xf4d5x2[_0xa1a2[6]],status:{type:_0xf4d5x2.ENUM(_0xa1a2[7],_0xa1a2[8],_0xa1a2[9],_0xa1a2[10])}},{tableName:_0xa1a2[11]});_0xf4d5x3[_0xa1a2[14]](_0xa1a2[13]);return _0xf4d5x3}
\ No newline at end of file
+/**
+ * report_integrations Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportIntegrationHistory = sequelize.define('ReportIntegrationHistory', {
+    integration: DataTypes.STRING,
+    eventChannel: DataTypes.STRING,
+    exitStatus: DataTypes.STRING,
+    ticketId: DataTypes.STRING,
+    integrationId: DataTypes.INTEGER,
+    uniqueid: DataTypes.STRING,
+    calleridnum: DataTypes.STRING,
+    calleridname: DataTypes.STRING,
+    queue: DataTypes.STRING,
+    interface: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    agentcalledAt: DataTypes.DATE,
+    agentconnectAt: DataTypes.DATE,
+    holdtime: DataTypes.INTEGER,
+    agentcomplete: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentcompleteAt: DataTypes.DATE,
+    talktime: DataTypes.INTEGER,
+    agentacw: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    acwtime: DataTypes.INTEGER,
+    reason: DataTypes.STRING,
+    agentringnoanswer: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentringnoanswerAt: DataTypes.DATE,
+    agentdump: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentdumpAt: DataTypes.DATE,
+    lastevent: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    channelstate: DataTypes.INTEGER,
+    channelstatedesc: DataTypes.STRING,
+    connectedlinenum: DataTypes.STRING,
+    connectedlinename: DataTypes.STRING,
+    language: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    context: DataTypes.STRING,
+    exten: DataTypes.STRING,
+    priority: DataTypes.STRING,
+    destchannel: DataTypes.STRING,
+    destchannelstate: DataTypes.INTEGER,
+    destchannelstatedesc: DataTypes.STRING,
+    destcalleridnum: DataTypes.STRING,
+    destcalleridname: DataTypes.STRING,
+    destconnectedlinenum: DataTypes.STRING,
+    destconnectedlinename: DataTypes.STRING,
+    destlanguage: DataTypes.STRING,
+    destaccountcode: DataTypes.STRING,
+    destcontext: DataTypes.STRING,
+    destexten: DataTypes.STRING,
+    destpriority: DataTypes.STRING,
+    destuniqueid: DataTypes.STRING,
+    messageId: DataTypes.STRING,
+    inReplyTo: DataTypes.STRING,
+    subject: DataTypes.STRING,
+    from: DataTypes.STRING,
+    to: DataTypes.STRING,
+    cc: DataTypes.STRING,
+    attachment: DataTypes.TEXT,
+    html: DataTypes.TEXT,
+    text: DataTypes.TEXT,
+    status: {
+      type: DataTypes.ENUM('SENT', 'SENDING', 'RECEIVED', 'FAILED')
+    }
+  }, {
+    tableName: 'report_integration_history'
+  });
+
+  ReportIntegrationHistory.removeAttribute('id');
+  return ReportIntegrationHistory;
+};
index 8c9149f..0af6acd 100644 (file)
@@ -1 +1,43 @@
-var _0x3d9b=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x63\x61\x6C\x6C\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x3d9b[0]);module[_0x3d9b[1]]=function(_0xe9c6x2,_0xe9c6x3){var _0xe9c6x4=_0xe9c6x2[_0x3d9b[16]](_0x3d9b[2],{uniqueid:_0xe9c6x3[_0x3d9b[3]],timeslot:_0xe9c6x3[_0x3d9b[4]],subject:_0xe9c6x3[_0x3d9b[3]],accountid:_0xe9c6x3[_0x3d9b[3]],accountname:_0xe9c6x3[_0x3d9b[3]],accountaddress:_0xe9c6x3[_0x3d9b[3]],application:_0xe9c6x3[_0x3d9b[3]],memberid:_0xe9c6x3[_0x3d9b[4]],membername:_0xe9c6x3[_0x3d9b[3]],queue:_0xe9c6x3[_0x3d9b[4]],queuename:_0xe9c6x3[_0x3d9b[3]],roomid:_0xe9c6x3[_0x3d9b[4]],messageid:_0xe9c6x3[_0x3d9b[4]],reason:{type:_0xe9c6x3[_0x3d9b[3]],defaultValue:_0x3d9b[5]},connectid:{type:_0xe9c6x3[_0x3d9b[3]],unique:true,set:function(_0xe9c6x5){this[_0x3d9b[8]](_0x3d9b[6],this[_0x3d9b[7]]);this[_0x3d9b[8]](_0x3d9b[9],_0x3d9b[10]);this[_0x3d9b[8]](_0x3d9b[11],moment()[_0x3d9b[13]](_0x3d9b[12]))}},calledAt:_0xe9c6x3[_0x3d9b[14]],connectedAt:_0xe9c6x3[_0x3d9b[14]]},{tableName:_0x3d9b[15]});return _0xe9c6x4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportMailHistory = sequelize.define('ReportMailHistory', {
+    uniqueid: DataTypes.STRING,
+    timeslot: DataTypes.INTEGER,
+    subject: DataTypes.STRING,
+    accountid: DataTypes.STRING,
+    accountname: DataTypes.STRING,
+    accountaddress: DataTypes.STRING,
+    application: DataTypes.STRING,
+    memberid: DataTypes.INTEGER,
+    membername: DataTypes.STRING,
+    queue: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    messageid: DataTypes.INTEGER,
+    reason: {
+      type: DataTypes.STRING,
+      defaultValue: 'called'
+    },
+    connectid: {
+      type: DataTypes.STRING,
+      unique: true,
+      set: function(agentconnectedAt) {
+        this.setDataValue('connectid', this.uniqueid);
+        this.setDataValue('reason', 'connect');
+        this.setDataValue('connectedAt', moment().format("YYYY-MM-DD HH:mm:ss"));
+      }
+    },
+    calledAt: DataTypes.DATE,
+    connectedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_mail_history'
+  });
+
+  return ReportMailHistory;
+};
index f7ca8ae..e25f7ae 100644 (file)
@@ -1 +1,38 @@
-var _0xb404=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0xb404[0]);module[_0xb404[1]]=function(_0xc20ax2,_0xc20ax3){var _0xc20ax4=_0xc20ax2[_0xb404[7]](_0xb404[2],{uniqueid:{type:_0xc20ax3[_0xb404[3]],unique:true},subject:_0xc20ax3[_0xb404[3]],accountid:_0xc20ax3[_0xb404[3]],accountname:_0xc20ax3[_0xb404[3]],accountaddress:_0xc20ax3[_0xb404[3]],application:_0xc20ax3[_0xb404[3]],memberid:_0xc20ax3[_0xb404[3]],membername:_0xc20ax3[_0xb404[3]],queue:_0xc20ax3[_0xb404[4]],queuename:_0xc20ax3[_0xb404[3]],roomid:_0xc20ax3[_0xb404[4]],fidelity:{type:_0xc20ax3[_0xb404[4]],defaultValue:0},holdtime:_0xc20ax3[_0xb404[4]],queuecallerjoinAt:_0xc20ax3[_0xb404[5]],queuecallerleaveAt:_0xc20ax3[_0xb404[5]],queuecallerunmanagedAt:_0xc20ax3[_0xb404[5]],queuecallerabandonedAt:_0xc20ax3[_0xb404[5]]},{tableName:_0xb404[6]});return _0xc20ax4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportMailSession = sequelize.define('ReportMailSessionHistory', {
+    uniqueid: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    subject: DataTypes.STRING,
+    accountid: DataTypes.STRING,
+    accountname: DataTypes.STRING,
+    accountaddress: DataTypes.STRING,
+    application: DataTypes.STRING,
+    memberid: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    queue: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    fidelity: {
+      type: DataTypes.INTEGER,
+      defaultValue: 0
+    },
+    holdtime: DataTypes.INTEGER,
+    queuecallerjoinAt: DataTypes.DATE,
+    queuecallerleaveAt: DataTypes.DATE,
+    queuecallerunmanagedAt: DataTypes.DATE,
+    queuecallerabandonedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_mail_session_history'
+  });
+
+  return ReportMailSession;
+};
index e95f559..b19ec9b 100644 (file)
@@ -1 +1,32 @@
-var _0xa087=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65"];module[_0xa087[0]]=function(_0x7532x1,_0x7532x2){var _0x7532x3=_0x7532x1[_0xa087[7]](_0xa087[1],{channel:_0x7532x2[_0xa087[2]],membername:_0x7532x2[_0xa087[2]],interface:_0x7532x2[_0xa087[2]],type:{type:_0x7532x2[_0xa087[2]],defaultValue:_0xa087[3]},duration:_0x7532x2[_0xa087[4]],enterAt:_0x7532x2[_0xa087[5]],exitAt:_0x7532x2[_0xa087[5]],data1:_0x7532x2[_0xa087[2]],data2:_0x7532x2[_0xa087[2]],data3:_0x7532x2[_0xa087[2]],data4:_0x7532x2[_0xa087[2]],data5:_0x7532x2[_0xa087[2]]},{tableName:_0xa087[6]});_0x7532x3[_0xa087[9]](_0xa087[8]);return _0x7532x3}
\ No newline at end of file
+/**
+ * DIAL Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportMemberHistory = sequelize.define('ReportMemberHistory', {
+    channel: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    interface: DataTypes.STRING,
+    type: {
+      type: DataTypes.STRING,
+      defaultValue: 'DEFAULT PAUSE'
+    },
+    duration: DataTypes.INTEGER,
+    enterAt: DataTypes.DATE,
+    exitAt: DataTypes.DATE,
+    data1: DataTypes.STRING,
+    data2: DataTypes.STRING,
+    data3: DataTypes.STRING,
+    data4: DataTypes.STRING,
+    data5: DataTypes.STRING
+  }, {
+    tableName: 'report_member_history',
+    // indexes: [{
+    //   fields: ['membername', 'enterdate', 'exitdate']
+    // }]
+  });
+
+  ReportMemberHistory.removeAttribute('id');
+  return ReportMemberHistory;
+};
index f515147..8b1c216 100644 (file)
@@ -1 +1,49 @@
-var _0x4c2e=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65"];module[_0x4c2e[0]]=function(_0x7365x1,_0x7365x2){var _0x7365x3=_0x7365x1[_0x4c2e[7]](_0x4c2e[1],{uniqueid:_0x7365x2[_0x4c2e[2]],calleridnum:_0x7365x2[_0x4c2e[2]],calleridname:_0x7365x2[_0x4c2e[2]],queue:_0x7365x2[_0x4c2e[2]],queuecallerjoinAt:_0x7365x2[_0x4c2e[3]],queuecallerleaveAt:_0x7365x2[_0x4c2e[3]],position:_0x7365x2[_0x4c2e[4]],count:_0x7365x2[_0x4c2e[4]],queuecallerabandon:{type:_0x7365x2[_0x4c2e[5]],defaultValue:false},queuecallerabandonAt:_0x7365x2[_0x4c2e[3]],queuecallercomplete:{type:_0x7365x2[_0x4c2e[5]],defaultValue:false},queuecallercompleteAt:_0x7365x2[_0x4c2e[3]],queuecallerexit:{type:_0x7365x2[_0x4c2e[5]],defaultValue:false},queuecallerexitAt:_0x7365x2[_0x4c2e[3]],queuecallerexitreason:_0x7365x2[_0x4c2e[2]],originalposition:_0x7365x2[_0x4c2e[4]],channel:_0x7365x2[_0x4c2e[2]],channelstate:_0x7365x2[_0x4c2e[4]],channelstatedesc:_0x7365x2[_0x4c2e[2]],connectedlinenum:_0x7365x2[_0x4c2e[2]],connectedlinename:_0x7365x2[_0x4c2e[2]],language:_0x7365x2[_0x4c2e[2]],accountcode:_0x7365x2[_0x4c2e[2]],context:_0x7365x2[_0x4c2e[2]],exten:_0x7365x2[_0x4c2e[2]],priority:_0x7365x2[_0x4c2e[2]]},{tableName:_0x4c2e[6]});_0x7365x3[_0x4c2e[9]](_0x4c2e[8]);return _0x7365x3}
\ No newline at end of file
+/**
+ * QueueLog Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportQueueHistory = sequelize.define('ReportQueueHistory', {
+    uniqueid: DataTypes.STRING,
+    calleridnum: DataTypes.STRING,
+    calleridname: DataTypes.STRING,
+    queue: DataTypes.STRING,
+    queuecallerjoinAt: DataTypes.DATE,
+    queuecallerleaveAt: DataTypes.DATE,
+    position: DataTypes.INTEGER,
+    count: DataTypes.INTEGER,
+    queuecallerabandon: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    queuecallerabandonAt: DataTypes.DATE,
+    queuecallercomplete: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    queuecallercompleteAt: DataTypes.DATE,
+    queuecallerexit: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    queuecallerexitAt: DataTypes.DATE,
+    queuecallerexitreason: DataTypes.STRING,
+    originalposition: DataTypes.INTEGER,
+    channel: DataTypes.STRING,
+    channelstate: DataTypes.INTEGER,
+    channelstatedesc: DataTypes.STRING,
+    connectedlinenum: DataTypes.STRING,
+    connectedlinename: DataTypes.STRING,
+    language: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    context: DataTypes.STRING,
+    exten: DataTypes.STRING,
+    priority: DataTypes.STRING,
+  }, {
+    tableName: 'report_queue_history'
+  });
+
+  ReportQueueHistory.removeAttribute('id');
+  return ReportQueueHistory;
+};
index e983354..f918cf2 100644 (file)
@@ -1 +1,25 @@
-var _0x4365=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];module[_0x4365[0]]=function(_0x5595x1,_0x5595x2){var _0x5595x3=_0x5595x1[_0x4365[4]](_0x4365[1],{uniqueid:{type:_0x5595x2[_0x4365[2]]},node:{type:_0x5595x2[_0x4365[2]]},application:{type:_0x5595x2[_0x4365[2]]},data:{type:_0x5595x2[_0x4365[2]]}},{tableName:_0x4365[3]});return _0x5595x3}
\ No newline at end of file
+/**
+ * Context Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportSquareDetailHistory = sequelize.define('ReportSquareDetailHistory', {
+    uniqueid: {
+      type: DataTypes.STRING,
+    },
+    node: {
+      type: DataTypes.STRING,
+    },
+    application: {
+      type: DataTypes.STRING,
+    },
+    data: {
+      type: DataTypes.STRING,
+    }
+  }, {
+    tableName: 'report_square_details_history'
+  });
+
+  return ReportSquareDetailHistory;
+};
index 1b6e745..d56f92c 100644 (file)
@@ -1 +1,89 @@
-var _0xdf83=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];module[_0xdf83[0]]=function(_0xc287x1,_0xc287x2){var _0xc287x3=_0xc287x1[_0xdf83[5]](_0xdf83[1],{network:{type:_0xc287x2[_0xdf83[2]]},network_script:{type:_0xc287x2[_0xdf83[2]]},request:{type:_0xc287x2[_0xdf83[2]]},channel:{type:_0xc287x2[_0xdf83[2]]},language:{type:_0xc287x2[_0xdf83[2]]},type:{type:_0xc287x2[_0xdf83[2]]},uniqueid:{type:_0xc287x2[_0xdf83[2]]},version:{type:_0xc287x2[_0xdf83[2]]},callerid:{type:_0xc287x2[_0xdf83[2]]},calleridname:{type:_0xc287x2[_0xdf83[2]]},callingpres:{type:_0xc287x2[_0xdf83[2]]},callingani2:{type:_0xc287x2[_0xdf83[2]]},callington:{type:_0xc287x2[_0xdf83[2]]},callingtns:{type:_0xc287x2[_0xdf83[2]]},dnid:{type:_0xc287x2[_0xdf83[2]]},rdnis:{type:_0xc287x2[_0xdf83[2]]},context:{type:_0xc287x2[_0xdf83[2]]},extension:{type:_0xc287x2[_0xdf83[2]]},priority:{type:_0xc287x2[_0xdf83[2]]},enhanced:{type:_0xc287x2[_0xdf83[2]]},accountcode:{type:_0xc287x2[_0xdf83[2]]},threadid:{type:_0xc287x2[_0xdf83[2]]},project_name:{type:_0xc287x2[_0xdf83[2]]},joinAt:{type:_0xc287x2[_0xdf83[3]]},leaveAt:{type:_0xc287x2[_0xdf83[3]],unique:true}},{tableName:_0xdf83[4]});return _0xc287x3}
\ No newline at end of file
+/**
+ * Context Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportSquareHistory = sequelize.define('ReportSquareHistory', {
+    network: {
+      type: DataTypes.STRING,
+    },
+    network_script: {
+      type: DataTypes.STRING,
+    },
+    request: {
+      type: DataTypes.STRING,
+    },
+    channel: {
+      type: DataTypes.STRING,
+    },
+    language: {
+      type: DataTypes.STRING,
+    },
+    type: {
+      type: DataTypes.STRING,
+    },
+    uniqueid: {
+      type: DataTypes.STRING,
+    },
+    version: {
+      type: DataTypes.STRING,
+    },
+    callerid: {
+      type: DataTypes.STRING,
+    },
+    calleridname: {
+      type: DataTypes.STRING,
+    },
+    callingpres: {
+      type: DataTypes.STRING,
+    },
+    callingani2: {
+      type: DataTypes.STRING,
+    },
+    callington: {
+      type: DataTypes.STRING,
+    },
+    callingtns: {
+      type: DataTypes.STRING,
+    },
+    dnid: {
+      type: DataTypes.STRING,
+    },
+    rdnis: {
+      type: DataTypes.STRING,
+    },
+    context: {
+      type: DataTypes.STRING,
+    },
+    extension: {
+      type: DataTypes.STRING,
+    },
+    priority: {
+      type: DataTypes.STRING,
+    },
+    enhanced: {
+      type: DataTypes.STRING,
+    },
+    accountcode: {
+      type: DataTypes.STRING,
+    },
+    threadid: {
+      type: DataTypes.STRING,
+    },
+    project_name: {
+      type: DataTypes.STRING,
+    },
+    joinAt: {
+      type: DataTypes.DATE,
+    },
+    leaveAt: {
+      type: DataTypes.DATE,
+      unique: true
+    }
+  }, {
+    tableName: 'report_square_history'
+  });
+
+  return ReportSquareHistory;
+};
index ea4f3ca..aec5d4b 100644 (file)
@@ -1 +1,25 @@
-var _0xede2=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x61\x6E\x73\x66\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x62\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64","\x53\x54\x52\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x61\x6E\x73\x66\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];module[_0xede2[0]]=function(_0xb349x1,_0xb349x2){var _0xb349x3=_0xb349x1[_0xede2[6]](_0xede2[1],{type:_0xb349x2.ENUM(_0xede2[2],_0xede2[3]),transferercalleridnum:_0xb349x2[_0xede2[4]],transferercalleridname:_0xb349x2[_0xede2[4]],transfererconnectedlinenum:_0xb349x2[_0xede2[4]],transfererconnectedlinename:_0xb349x2[_0xede2[4]],transferercontext:_0xb349x2[_0xede2[4]],transfererexten:_0xb349x2[_0xede2[4]],transfereecontext:_0xb349x2[_0xede2[4]],transfereeexten:_0xb349x2[_0xede2[4]],transfereruniqueid:_0xb349x2[_0xede2[4]],transfererlinkedid:_0xb349x2[_0xede2[4]],extension:_0xb349x2[_0xede2[4]]},{tableName:_0xede2[5]});return _0xb349x3}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportTransferHistory = sequelize.define('ReportTransferHistory', {
+    type: DataTypes.ENUM('blind', 'attended'),
+    transferercalleridnum: DataTypes.STRING,
+    transferercalleridname: DataTypes.STRING,
+    transfererconnectedlinenum: DataTypes.STRING,
+    transfererconnectedlinename: DataTypes.STRING,
+    transferercontext: DataTypes.STRING,
+    transfererexten: DataTypes.STRING,
+    transfereecontext: DataTypes.STRING,
+    transfereeexten: DataTypes.STRING,
+    transfereruniqueid: DataTypes.STRING,
+    transfererlinkedid: DataTypes.STRING,
+    extension: DataTypes.STRING,
+  }, {
+    tableName: 'report_transfer_history'
+  });
+
+  return ReportTransferHistory;
+};
index c438900..c664092 100644 (file)
@@ -1 +1,75 @@
-var _0xaf40=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x6F\x6E\x66\x69\x67","\x50\x72\x6F\x6D\x69\x73\x65","\x64\x61\x74\x61\x62\x61\x73\x65","\x64\x62","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x6F\x73\x74","\x6D\x79\x73\x71\x6C","\x5A","\x66\x6F\x72\x6D\x61\x74","\x6A\x6F\x69\x6E","\x69\x6D\x70\x6F\x72\x74","\x6E\x61\x6D\x65","\x66\x6F\x72\x45\x61\x63\x68","\x69\x73\x46\x69\x6C\x65","\x6C\x73\x74\x61\x74\x53\x79\x6E\x63","\x2E","\x69\x6E\x64\x65\x78\x4F\x66","\x2E\x73\x70\x65\x63\x2E","\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x66\x69\x6C\x74\x65\x72","\x72\x65\x61\x64\x64\x69\x72\x53\x79\x6E\x63","\x61\x73\x73\x6F\x63\x69\x61\x74\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79\x73","\x68\x69\x73\x74\x6F\x72\x79","\x64\x62\x5F\x68\x69\x73\x74\x6F\x72\x79","\x48\x69\x73\x74\x6F\x72\x79\x49\x6E\x62\x6F\x75\x6E\x64\x73","\x73\x6F\x75\x72\x63\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x48\x69\x73\x74\x6F\x72\x79\x4F\x75\x74\x62\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xaf40[0];var fs=require(_0xaf40[1]);var path=require(_0xaf40[2]);var config=require(_0xaf40[3]);var Sequelize=require(_0xaf40[4]);var moment=require(_0xaf40[5]);Sequelize[_0xaf40[7]][_0xaf40[6]]({warnings:{wForgottenReturn:false}});var sequelize= new Sequelize(config[_0xaf40[9]][_0xaf40[8]],config[_0xaf40[9]][_0xaf40[10]],config[_0xaf40[9]][_0xaf40[11]],{host:config[_0xaf40[9]][_0xaf40[12]],dialect:_0xaf40[13],timezone:moment()[_0xaf40[15]](_0xaf40[14]),logging:false});var db={};fs[_0xaf40[27]](__dirname)[_0xaf40[26]](function(_0xa8dbx8){return (fs[_0xaf40[21]](path[_0xaf40[16]](__dirname,_0xa8dbx8))[_0xaf40[20]]())&&(_0xa8dbx8[_0xaf40[23]](_0xaf40[22])!==0)&&(_0xa8dbx8[_0xaf40[23]](_0xaf40[24])=== -1)&&(_0xa8dbx8!==_0xaf40[25])})[_0xaf40[19]](function(_0xa8dbx8){var _0xa8dbx9=sequelize[_0xaf40[17]](path[_0xaf40[16]](__dirname,_0xa8dbx8));db[_0xa8dbx9[_0xaf40[18]]]=_0xa8dbx9});Object[_0xaf40[31]](db)[_0xaf40[19]](function(_0xa8dbxa){if(db[_0xa8dbxa][_0xaf40[30]][_0xaf40[29]](_0xaf40[28])){db[_0xa8dbxa][_0xaf40[30]][_0xaf40[28]](db)}});db[_0xaf40[32]]={};var sequelize_history= new Sequelize(config[_0xaf40[33]][_0xaf40[8]],config[_0xaf40[33]][_0xaf40[10]],config[_0xaf40[33]][_0xaf40[11]],{host:config[_0xaf40[33]][_0xaf40[12]],dialect:_0xaf40[13],timezone:moment()[_0xaf40[15]](_0xaf40[14]),logging:false});fs[_0xaf40[27]](path[_0xaf40[16]](__dirname,_0xaf40[32]))[_0xaf40[26]](function(_0xa8dbx8){return (fs[_0xaf40[21]](path[_0xaf40[16]](__dirname,_0xaf40[32],_0xa8dbx8))[_0xaf40[20]]())&&(_0xa8dbx8[_0xaf40[23]](_0xaf40[22])!==0)&&(_0xa8dbx8[_0xaf40[23]](_0xaf40[24])=== -1)&&(_0xa8dbx8!==_0xaf40[25])})[_0xaf40[19]](function(_0xa8dbx8){var _0xa8dbx9=sequelize_history[_0xaf40[17]](path[_0xaf40[16]](__dirname,_0xaf40[32],_0xa8dbx8));db[_0xaf40[32]][_0xa8dbx9[_0xaf40[18]]]=_0xa8dbx9});Object[_0xaf40[31]](db[_0xaf40[32]])[_0xaf40[19]](function(_0xa8dbxa){if(db[_0xaf40[32]][_0xa8dbxa][_0xaf40[30]][_0xaf40[29]](_0xaf40[28])){db[_0xaf40[32]][_0xa8dbxa][_0xaf40[30]][_0xaf40[28]](db[_0xaf40[32]])}});db[_0xaf40[37]][_0xaf40[36]](db[_0xaf40[32]].ReportCallHistory,{as:_0xaf40[34],foreignKey:_0xaf40[35],constraints:false});db[_0xaf40[37]][_0xaf40[36]](db[_0xaf40[32]].ReportCallHistory,{as:_0xaf40[38],foreignKey:_0xaf40[39],constraints:false});db[_0xaf40[4]]=sequelize;db[_0xaf40[40]]=sequelize_history;db[_0xaf40[41]]=Sequelize;module[_0xaf40[42]]=db
\ No newline at end of file
+"use strict";
+
+var fs = require("fs");
+var path = require("path");
+var config = require('../config/environment');
+var Sequelize = require("sequelize");
+var moment = require('moment');
+
+//Used to disable all warnings for Promise!
+Sequelize.Promise.config({
+  // Enables all warnings except forgotten return statements.
+  warnings: {
+    wForgottenReturn: false
+  }
+});
+
+var sequelize = new Sequelize(config.db.database, config.db.username, config.db.password, {
+  host: config.db.host,
+  dialect: 'mysql',
+  timezone: moment().format("Z"),
+  logging: false
+});
+
+var db = {};
+
+fs
+  .readdirSync(__dirname)
+  .filter(function(file) {
+    return (fs.lstatSync(path.join(__dirname, file)).isFile()) &&
+      (file.indexOf(".") !== 0) && (file.indexOf('.spec.') === -1) && (file !== "index.js");
+  })
+  .forEach(function(file) {
+    var model = sequelize["import"](path.join(__dirname, file));
+    db[model.name] = model;
+  });
+
+// Invoke associations on each of the models
+Object.keys(db).forEach(function(modelName) {
+  if (db[modelName].options.hasOwnProperty('associate')) {
+    db[modelName].options.associate(db);
+  }
+});
+
+db.history = {};
+
+var sequelize_history = new Sequelize(config.db_history.database, config.db_history.username, config.db_history.password, {
+  host: config.db_history.host,
+  dialect: 'mysql',
+  timezone: moment().format("Z"),
+  logging: false
+});
+
+fs
+  .readdirSync(path.join(__dirname, 'history'))
+  .filter(function(file) {
+    return (fs.lstatSync(path.join(__dirname, 'history', file)).isFile()) &&
+      (file.indexOf(".") !== 0) && (file.indexOf('.spec.') === -1) && (file !== "index.js");
+  })
+  .forEach(function(file) {
+    var model = sequelize_history["import"](path.join(__dirname, 'history', file));
+    db.history[model.name] = model;
+  });
+
+// Invoke associations on each of the models
+Object.keys(db.history).forEach(function(modelName) {
+  if (db.history[modelName].options.hasOwnProperty('associate')) {
+    db.history[modelName].options.associate(db.history);
+  }
+});
+
+db.sequelize = sequelize;
+db.sequelize_history = sequelize_history;
+db.Sequelize = Sequelize;
+
+module.exports = db;
index c1e0ea1..1cbee6f 100644 (file)
@@ -1 +1,65 @@
-var _0x4a50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x75\x6E\x69\x71\x75\x65\x5F\x6E\x61\x6D\x65\x5F\x61\x6E\x64\x5F\x76\x65\x72\x73\x69\x6F\x6E","\x61\x70\x70\x2E\x6A\x73","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x4a50[0];module[_0x4a50[1]]=function(_0xd21bx1,_0xd21bx2){var _0xd21bx3=_0xd21bx1[_0x4a50[9]](_0x4a50[2],{name:{type:_0xd21bx2[_0x4a50[3]],allowNull:false,unique:_0x4a50[4],validate:{notEmpty:true}},version:{type:_0xd21bx2[_0x4a50[3]],allowNull:false,unique:_0x4a50[4],validate:{notEmpty:true}},main:{type:_0xd21bx2[_0x4a50[3]],defaultValue:_0x4a50[5]},filename:{type:_0xd21bx2[_0x4a50[3]]},path:{type:_0xd21bx2[_0x4a50[3]]},type:{type:_0xd21bx2[_0x4a50[3]]},size:{type:_0xd21bx2[_0x4a50[6]]},active:{type:_0xd21bx2[_0x4a50[7]],defaultValue:false},author:_0xd21bx2[_0x4a50[3]],logo:_0xd21bx2[_0x4a50[3]],state:{type:_0xd21bx2[_0x4a50[3]],unique:true},description:_0xd21bx2[_0x4a50[3]]},{tableName:_0x4a50[8]});return _0xd21bx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Integration = sequelize.define('Integration', {
+    name: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      unique: 'unique_name_and_version',
+      validate: {
+        notEmpty: true
+      }
+    },
+    version: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      unique: 'unique_name_and_version',
+      validate: {
+        notEmpty: true
+      }
+    },
+    main: {
+      type: DataTypes.STRING,
+      defaultValue: 'app.js'
+    },
+    filename: {
+      type: DataTypes.STRING,
+      // allowNull: false,
+      // validate: {
+      //   notEmpty: true
+      // }
+    },
+    path: {
+      type: DataTypes.STRING,
+      // allowNull: false,
+      // validate: {
+      //   notEmpty: true
+      // }
+    },
+    type: {
+      type: DataTypes.STRING,
+      // allowNull: false
+    },
+    size: {
+      type: DataTypes.INTEGER,
+      // allowNull: false
+    },
+    active: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    author: DataTypes.STRING,
+    logo: DataTypes.STRING,
+    state: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    description: DataTypes.STRING
+  }, {
+    tableName: 'integrations'
+  });
+
+  return Integration;
+
+};
index 72b411e..19e66f4 100644 (file)
@@ -1 +1,53 @@
-var _0xcea1=["\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x54\x52\x49\x4E\x47","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x72\x65\x73\x74\x72\x69\x63\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];module[_0xcea1[0]]=function(_0xa848x1,_0xa848x2){var _0xa848x3=_0xa848x1[_0xcea1[16]](_0xcea1[1],{name:{type:_0xa848x2[_0xcea1[2]]},description:_0xa848x2[_0xcea1[2]],interval:{type:_0xa848x2[_0xcea1[2]],allowNull:true}},{tableName:_0xcea1[3],associate:function(_0xa848x4){_0xa848x3[_0xcea1[6]](_0xa848x4.Interval,{as:_0xcea1[4],onDelete:_0xcea1[5],hooks:true,required:false});_0xa848x3[_0xcea1[6]](_0xa848x4.VoiceExtension,{as:_0xcea1[7],foreignKey:_0xcea1[8],onDelete:_0xcea1[9]});_0xa848x3[_0xcea1[6]](_0xa848x4.MailApplication,{as:_0xcea1[10]});_0xa848x3[_0xcea1[6]](_0xa848x4.MailApplication,{as:_0xcea1[11]});_0xa848x3[_0xcea1[15]](_0xcea1[12],{include:[{model:_0xa848x4[_0xcea1[1]],as:_0xcea1[4],required:false,attributes:[_0xcea1[13],_0xcea1[14]]}]});_0xa848x3[_0xcea1[15]](_0xcea1[3],{where:{IntervalId:null}})}});return _0xa848x3}
\ No newline at end of file
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+  var Interval = sequelize.define('Interval', {
+    name: {
+      type: DataTypes.STRING
+    },
+    description: DataTypes.STRING,
+    interval: {
+      type: DataTypes.STRING,
+      allowNull: true
+    }
+  }, {
+    tableName: 'intervals',
+    associate: function(models) {
+      Interval.hasMany(models.Interval, {
+        as: 'SubIntervals',
+        onDelete: 'cascade',
+        hooks: true,
+        required: false
+      });
+      Interval.hasMany(models.VoiceExtension, {
+        as: 'VoiceExtensions',
+        foreignKey: 'IntervalId',
+        onDelete: 'restrict'
+      });
+      Interval.hasMany(models.MailApplication, {
+        as: 'MailApplications'
+      });
+      Interval.hasMany(models.MailApplication, {
+        as: 'ChatApplications'
+      });
+      // SCOPES MANAGEMENT
+      Interval.addScope('subintervals', {
+        include: [{
+          model: models.Interval,
+          as: 'SubIntervals',
+          required: false,
+          attributes: ['name', 'interval']
+        }]
+      });
+
+      Interval.addScope('intervals', {
+        where: {
+          IntervalId: null
+        }
+      });
+    }
+  });
+
+
+  return Interval;
+};
index 2b1bb02..c31f2e2 100644 (file)
@@ -1 +1,30 @@
-var _0x6d81=["\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x70\x72\x6F\x6A\x65\x63\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];module[_0x6d81[0]]=function(_0xff05x1,_0xff05x2){var _0xff05x3=_0xff05x1[_0x6d81[7]](_0x6d81[1],{name:{type:_0xff05x2[_0x6d81[2]],unique:true},description:_0xff05x2[_0x6d81[2]],draft:_0xff05x2[_0x6d81[3]],production:_0xff05x2[_0x6d81[3]]},{tableName:_0x6d81[4],associate:function(_0xff05x4){_0xff05x3[_0x6d81[6]](_0xff05x4.ReportJscriptySession,{foreignKey:_0x6d81[5]});_0xff05x3[_0x6d81[6]](_0xff05x4.ReportJscriptyQuestion,{foreignKey:_0x6d81[5]})}});return _0xff05x3}
\ No newline at end of file
+/**
+ * Fax Room Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var JscriptyProject = sequelize.define('JscriptyProject', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    description: DataTypes.STRING,
+    draft: DataTypes.TEXT,
+    production: DataTypes.TEXT
+  }, {
+    tableName: 'jscripty_projects',
+    associate: function(models) {
+      JscriptyProject.hasMany(models.ReportJscriptySession, {
+        // as: 'sessions',
+        foreignKey: 'projectId'
+      });
+      JscriptyProject.hasMany(models.ReportJscriptyQuestion, {
+        // as: 'questions',
+        foreignKey: 'projectId'
+      });
+    }
+  });
+
+  return JscriptyProject;
+};
index bfa8a3d..4e69e7b 100644 (file)
@@ -1 +1,72 @@
-var _0x7168=["\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52","\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4F\x6E\x65","\x64\x65\x66\x61\x75\x6C\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x69\x64","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x73\x6C","\x64\x65\x6C\x65\x74\x65","\x66\x69\x6C\x74\x65\x72","\x73\x74\x61\x74\x65","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x6E\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x68\x54\x69\x6D\x65\x6F\x75\x74","\x6B\x65\x65\x70\x61\x6C\x69\x76\x65","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x73\x65\x72\x76\x69\x63\x65","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x55\x73\x65\x72","\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];module[_0x7168[0]]=function(_0x5b31x1,_0x5b31x2){var _0x5b31x3=_0x5b31x1[_0x7168[34]](_0x7168[1],{description:_0x5b31x2[_0x7168[2]],name:{type:_0x5b31x2[_0x7168[2]]},address:{type:_0x5b31x2[_0x7168[2]],unique:true},fidelity:{type:_0x5b31x2[_0x7168[3]],defaultValue:false},timeout:{type:_0x5b31x2[_0x7168[4]],defaultValue:0}},{tableName:_0x7168[5],associate:function(_0x5b31x4){_0x5b31x3[_0x7168[6]](_0x5b31x4.MailRoom);_0x5b31x3[_0x7168[6]](_0x5b31x4.MailApplication);_0x5b31x3[_0x7168[8]](_0x5b31x4.MailServerIn,{onDelete:_0x7168[7],hooks:true});_0x5b31x3[_0x7168[8]](_0x5b31x4.MailServerOut,{onDelete:_0x7168[7],hooks:true});_0x5b31x3[_0x7168[33]](_0x7168[9],{include:[{model:_0x5b31x4[_0x7168[10]],attributes:[_0x7168[11],_0x7168[12],_0x7168[13],_0x7168[14],_0x7168[15],_0x7168[16],_0x7168[17],_0x7168[18],_0x7168[19],_0x7168[20],_0x7168[21],_0x7168[22],_0x7168[23]]},{model:_0x5b31x4[_0x7168[24]],attributes:[_0x7168[11],_0x7168[12],_0x7168[13],_0x7168[14],_0x7168[15],_0x7168[16],_0x7168[25],_0x7168[19]]},{model:_0x5b31x4[_0x7168[26]],include:[{model:_0x5b31x4[_0x7168[27]],attributes:[_0x7168[11],_0x7168[28],_0x7168[29],_0x7168[30],_0x7168[31]]},{model:_0x5b31x4[_0x7168[32]]}]}]})}});return _0x5b31x3}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+       var MailAccount = sequelize.define('MailAccount', {
+               description: DataTypes.STRING,
+               name: {
+                       type: DataTypes.STRING
+               },
+               address: {
+                       type: DataTypes.STRING,
+                       unique: true,
+                       isEmail: true,
+                       set: function(address) {
+                               if (address) {
+                                       this.setDataValue('address', address.toLowerCase());
+                               }
+                       },
+               },
+               fidelity: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               timeout: {
+                       type: DataTypes.INTEGER,
+                       defaultValue: 0
+               }
+       }, {
+               tableName: 'mail_accounts',
+               associate: function(models) {
+                       // RELATIONS
+                       MailAccount.hasMany(models.MailRoom);
+                       MailAccount.hasMany(models.MailApplication);
+                       MailAccount.hasOne(models.MailServerIn, {
+                               onDelete: 'cascade',
+                               hooks: true
+                       });
+                       MailAccount.hasOne(models.MailServerOut, {
+                               onDelete: 'cascade',
+                               hooks: true
+                       });
+
+                       // SCOPES
+                       MailAccount.addScope('default', {
+                               include: [{
+                                       model: models.MailServerIn,
+                                       attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'delete', 'filter', 'state', 'mailbox', 'connTimeout', 'authTimeout', 'keepalive']
+                               }, {
+                                       model: models.MailServerOut,
+                                       attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'service', 'state']
+                               }, {
+                                       model: models.MailApplication,
+                                       include: [{
+                                               model: models.User,
+                                               attributes: ['id',
+                                                       'name',
+                                                       'email',
+                                                       'internal',
+                                                       'fullname'
+                                               ]
+                                       }, {
+                                               model: models.MailQueue
+                                       }]
+                               }]
+                       });
+               }
+       });
+
+       return MailAccount;
+};
index 73672a5..f4a7a03 100644 (file)
@@ -1 +1,36 @@
-var _0x718d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x72\x65\x73\x74\x72\x69\x63\x74","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0x718d[0];module[_0x718d[1]]=function(_0xeffbx1,_0xeffbx2){var _0xeffbx3=_0xeffbx1[_0x718d[10]](_0x718d[2],{app:{type:_0xeffbx2.ENUM(_0x718d[3],_0x718d[4])},priority:{type:_0xeffbx2[_0x718d[5]]},timeout:{type:_0xeffbx2[_0x718d[5]]},interval:{type:_0xeffbx2[_0x718d[6]]}},{tableName:_0x718d[7],associate:function(_0xeffbx4){_0xeffbx3[_0x718d[9]](_0xeffbx4.User,{onDelete:_0x718d[8]});_0xeffbx3[_0x718d[9]](_0xeffbx4.Interval);_0xeffbx3[_0x718d[9]](_0xeffbx4.MailQueue,{onDelete:_0x718d[8]});_0xeffbx3[_0x718d[9]](_0xeffbx4.MailAccount,{onDelete:_0x718d[8]})}});return _0xeffbx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var MailApplication = sequelize.define('MailApplication', {
+    app: {
+      type: DataTypes.ENUM('queue', 'agent')
+    },
+    priority: {
+      type: DataTypes.INTEGER
+    },
+    timeout: {
+      type: DataTypes.INTEGER
+    },
+    interval: {
+      type: DataTypes.STRING
+    }
+  }, {
+    tableName: 'mail_applications',
+    associate: function(models) {
+      // hasMany relations
+      MailApplication.belongsTo(models.User, {
+        onDelete: 'restrict'
+      });
+      MailApplication.belongsTo(models.Interval);
+      MailApplication.belongsTo(models.MailQueue, {
+        onDelete: 'restrict'
+      });
+      MailApplication.belongsTo(models.MailAccount, {
+        onDelete: 'restrict'
+      });
+    }
+  });
+
+  return MailApplication;
+};
index 0425b7d..9b2efb5 100644 (file)
@@ -1 +1,21 @@
-var _0xd800=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xd800[0]);module[_0xd800[1]]=function(_0xcb8ex2,_0xcb8ex3){var _0xcb8ex4=_0xcb8ex2[_0xd800[6]](_0xd800[2],{domain:_0xcb8ex3[_0xd800[3]],size:_0xcb8ex3[_0xd800[4]],path:_0xcb8ex3[_0xd800[3]],name:_0xcb8ex3[_0xd800[3]],basename:_0xcb8ex3[_0xd800[3]],type:_0xcb8ex3[_0xd800[3]]},{tableName:_0xd800[5]});return _0xcb8ex4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function (sequelize, DataTypes) {
+
+       var MailAttachment = sequelize.define('MailAttachment', {
+               domain: DataTypes.STRING,
+               size: DataTypes.INTEGER,
+               path: DataTypes.STRING,
+               name: DataTypes.STRING,
+               basename: DataTypes.STRING,
+               type: DataTypes.STRING
+       }, {
+               tableName: 'mail_attachments'
+       });
+
+       return MailAttachment;
+};
index f405344..218cb9c 100644 (file)
@@ -1 +1,23 @@
-var _0xe38d=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x42\x4F\x4F\x4C\x45\x41\x4E","\x6D\x61\x69\x6C\x5F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xe38d[0]);module[_0xe38d[1]]=function(_0x8108x2,_0x8108x3){var _0x8108x4=_0x8108x2[_0xe38d[7]](_0xe38d[2],{name:_0x8108x3[_0xe38d[3]],description:_0x8108x3[_0xe38d[3]],conditions:_0x8108x3[_0xe38d[4]],actions:_0x8108x3[_0xe38d[4]],status:{type:_0x8108x3[_0xe38d[5]],defaultValue:false}},{tableName:_0xe38d[6]});return _0x8108x4}
\ No newline at end of file
+/**
+ * User Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var MailAutomation = sequelize.define('MailAutomation', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    conditions: DataTypes.TEXT,
+    actions: DataTypes.TEXT,
+    status: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
+  }, {
+    tableName: 'mail_automations'
+  });
+
+  return MailAutomation;
+};
index cabe552..f71ad58 100644 (file)
@@ -1 +1,84 @@
-var _0xcced=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x53\x54\x52\x49\x4E\x47","\x66\x72\x6F\x6D","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x3B","\x73\x70\x6C\x69\x74","\x6A\x6F\x69\x6E","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x74\x6F","\x63\x63","\x62\x63\x63","\x54\x45\x58\x54","\x42\x4C\x4F\x42","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x53\x45\x4E\x54","\x53\x45\x4E\x44\x49\x4E\x47","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x41\x49\x4C\x45\x44","\x4E\x4F\x54\x45","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x63\x61\x73\x63\x61\x64\x65","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xcced[0]);module[_0xcced[1]]=function(_0xb47dx2,_0xb47dx3){var _0xb47dx4=_0xb47dx2[_0xcced[26]](_0xcced[2],{messageId:_0xb47dx3[_0xcced[3]],inReplyTo:_0xb47dx3[_0xcced[3]],subject:_0xb47dx3[_0xcced[3]],from:{type:_0xb47dx3[_0xcced[3]],get:function(){return this[_0xcced[5]](_0xcced[4])?this[_0xcced[5]](_0xcced[4])[_0xcced[7]](_0xcced[6]):[]},set:function(_0xb47dx5){this[_0xcced[9]](_0xcced[4],_0xb47dx5[_0xcced[8]](_0xcced[6]))}},to:{type:_0xb47dx3[_0xcced[3]],get:function(){return this[_0xcced[5]](_0xcced[10])?this[_0xcced[5]](_0xcced[10])[_0xcced[7]](_0xcced[6]):[]},set:function(_0xb47dx5){this[_0xcced[9]](_0xcced[10],_0xb47dx5[_0xcced[8]](_0xcced[6]))}},cc:{type:_0xb47dx3[_0xcced[3]],get:function(){return this[_0xcced[5]](_0xcced[11])?this[_0xcced[5]](_0xcced[11])[_0xcced[7]](_0xcced[6]):[]},set:function(_0xb47dx5){this[_0xcced[9]](_0xcced[11],_0xb47dx5[_0xcced[8]](_0xcced[6]))}},bcc:{type:_0xb47dx3[_0xcced[3]],get:function(){return this[_0xcced[5]](_0xcced[12])?this[_0xcced[5]](_0xcced[12])[_0xcced[7]](_0xcced[6]):[]},set:function(_0xb47dx5){this[_0xcced[9]](_0xcced[12],_0xb47dx5[_0xcced[8]](_0xcced[6]))}},attachment:_0xb47dx3[_0xcced[13]],text:{type:_0xb47dx3[_0xcced[14]],get:function(){if(this[_0xcced[5]](_0xcced[15])){return this[_0xcced[5]](_0xcced[15]).toString()}}},html:{type:_0xb47dx3[_0xcced[14]],get:function(){if(this[_0xcced[5]](_0xcced[16])){return this[_0xcced[5]](_0xcced[16]).toString()}}},reason:_0xb47dx3[_0xcced[13]],status:{type:_0xb47dx3.ENUM(_0xcced[17],_0xcced[18],_0xcced[19],_0xcced[20],_0xcced[21]),defaultValue:_0xcced[18]}},{tableName:_0xcced[22],paranoid:true,associate:function(_0xb47dx6){_0xb47dx4[_0xcced[23]](_0xb47dx6.MailAttachment);_0xb47dx4[_0xcced[24]](_0xb47dx6.User);_0xb47dx4[_0xcced[24]](_0xb47dx6.MailRoom,{onDelete:_0xcced[25]});_0xb47dx4[_0xcced[24]](_0xb47dx6.ContactEmail,{foreignKey:_0xcced[4],constraints:false})}});return _0xb47dx4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var MailMessage = sequelize.define('MailMessage', {
+               messageId: DataTypes.STRING,
+               inReplyTo: DataTypes.STRING,
+               subject: DataTypes.STRING,
+               from: {
+                       type: DataTypes.STRING,
+                       get: function() {
+                               return this.getDataValue('from') ? this.getDataValue('from').split(';') : [];
+                       },
+                       set: function(val) {
+                               this.setDataValue('from', val.join(';'));
+                       }
+               },
+               to: {
+                       type: DataTypes.STRING,
+                       get: function() {
+                               return this.getDataValue('to') ? this.getDataValue('to').split(';') : [];
+                       },
+                       set: function(val) {
+                               this.setDataValue('to', val.join(';'));
+                       }
+               },
+               cc: {
+                       type: DataTypes.STRING,
+                       get: function() {
+                               return this.getDataValue('cc') ? this.getDataValue('cc').split(';') : [];
+                       },
+                       set: function(val) {
+                               this.setDataValue('cc', val.join(';'));
+                       }
+               },
+               bcc: {
+                       type: DataTypes.STRING,
+                       get: function() {
+                               return this.getDataValue('bcc') ? this.getDataValue('bcc').split(';') : [];
+                       },
+                       set: function(val) {
+                               this.setDataValue('bcc', val.join(';'));
+                       }
+               },
+               attachment: DataTypes.TEXT,
+               text: {
+                       type: DataTypes.BLOB,
+                       get: function() {
+                               if (this.getDataValue('text')) {
+                                       return this.getDataValue('text').toString();
+                               }
+                       }
+               },
+               html: {
+                       type: DataTypes.BLOB,
+                       get: function() {
+                               if (this.getDataValue('html')) {
+                                       return this.getDataValue('html').toString();
+                               }
+                       }
+               },
+               reason: DataTypes.TEXT,
+               status: {
+                       type: DataTypes.ENUM('SENT', 'SENDING', 'RECEIVED', 'FAILED', 'NOTE'),
+                       defaultValue: 'SENDING'
+               }
+       }, {
+               tableName: 'mail_messages',
+               paranoid: true,
+               associate: function(models) {
+                       MailMessage.hasMany(models.MailAttachment);
+                       MailMessage.belongsTo(models.User);
+                       MailMessage.belongsTo(models.MailRoom, {
+                               onDelete: 'cascade'
+                       });
+               }
+       });
+
+       return MailMessage;
+};
index 80ec283..421dc37 100644 (file)
@@ -1 +1,37 @@
-var _0x2081=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x61\x75\x6C\x74","\x55\x73\x65\x72","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x6F\x6E\x6C\x69\x6E\x65","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x2081[0];module[_0x2081[1]]=function(_0xf14dx1,_0xf14dx2){var _0xf14dx3=_0xf14dx1[_0x2081[21]](_0x2081[2],{name:{type:_0xf14dx2[_0x2081[3]],unique:true},description:{type:_0xf14dx2[_0x2081[3]]},timeout:{type:_0xf14dx2[_0x2081[4]]},strategy:{type:_0xf14dx2.ENUM(_0x2081[5],_0x2081[6])}},{tableName:_0x2081[7],associate:function(_0xf14dx4){_0xf14dx3[_0x2081[9]](_0xf14dx4.User,{through:_0xf14dx4[_0x2081[8]]});_0xf14dx3[_0x2081[20]](_0x2081[10],{include:[{model:_0xf14dx4[_0x2081[11]],attributes:[_0x2081[12],_0x2081[13],_0x2081[14],_0x2081[15],_0x2081[16],_0x2081[17],_0x2081[18],_0x2081[19]]}]})}});return _0xf14dx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var MailQueue = sequelize.define('MailQueue', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    description: {
+      type: DataTypes.STRING,
+    },
+    timeout: {
+      type: DataTypes.INTEGER,
+    },
+    strategy: {
+      type: DataTypes.ENUM('rrmemory', 'beepall')
+    }
+  }, {
+    tableName: 'mail_queues',
+    associate: function(models) {
+      // RELATIONS
+      MailQueue.belongsToMany(models.User, {
+        through: models.UserHasMailQueue
+      });
+      //SCOPES
+      MailQueue.addScope('default', {
+        include: [{
+          model: models.User,
+          attributes: ['id', 'name', 'fullname', 'email', 'online', 'lastLoginAt', 'mailPause', 'pauseType']
+        }]
+      });
+    }
+  });
+
+  return MailQueue;
+};
index a910ac6..13d7977 100644 (file)
@@ -1 +1,63 @@
-var _0xfefd=["\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x4E\x45\x57","\x4F\x50\x45\x4E","\x43\x4C\x4F\x53\x45\x44","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x61\x75\x6C\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x61\x64\x64\x53\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74","\x64\x65\x66\x69\x6E\x65"];module[_0xfefd[0]]=function(_0xe4d8x1,_0xe4d8x2){var _0xe4d8x3=_0xe4d8x1[_0xfefd[25]](_0xfefd[1],{subject:_0xe4d8x2[_0xfefd[2]],from:_0xe4d8x2[_0xfefd[2]],attachment:{type:_0xe4d8x2[_0xfefd[3]],defaultValue:false},status:{type:_0xe4d8x2.ENUM(_0xfefd[4],_0xfefd[5],_0xfefd[6]),defaultValue:_0xfefd[4]}},{tableName:_0xfefd[7],paranoid:true,associate:function(_0xe4d8x4){_0xe4d8x3[_0xfefd[8]](_0xe4d8x4.MailMessage);_0xe4d8x3[_0xfefd[9]](_0xe4d8x4.MailAccount);_0xe4d8x3[_0xfefd[11]](_0xe4d8x4.User,{through:_0xfefd[10]});_0xe4d8x3[_0xfefd[23]](_0xfefd[12],{order:[[_0xfefd[13],_0xfefd[14]]],include:[{model:_0xe4d8x4[_0xfefd[15]]},{model:_0xe4d8x4[_0xfefd[16]],include:[{model:_0xe4d8x4[_0xfefd[17]]},{model:_0xe4d8x4[_0xfefd[18]],attributes:[_0xfefd[19],_0xfefd[20],_0xfefd[21],_0xfefd[22]]}]},{model:_0xe4d8x4[_0xfefd[18]],attributes:[_0xfefd[19],_0xfefd[20],_0xfefd[21],_0xfefd[22]]}]});_0xe4d8x3[_0xfefd[23]](_0xfefd[24],function(_0xe4d8x5){return {include:[{model:_0xe4d8x4[_0xfefd[18]],where:{id:_0xe4d8x5}}]}})}});return _0xe4d8x3}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+
+module.exports = function(sequelize, DataTypes) {
+       var MailRoom = sequelize.define('MailRoom', {
+               subject: DataTypes.STRING,
+               from: DataTypes.STRING,
+               attachment: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               status: {
+                       type: DataTypes.ENUM('NEW', 'OPEN', 'CLOSED'),
+                       defaultValue: 'NEW'
+               }
+       }, {
+               tableName: 'mail_rooms',
+               paranoid: true,
+               associate: function(models) {
+                       // BINDING
+                       MailRoom.hasMany(models.MailMessage);
+                       MailRoom.belongsTo(models.MailAccount);
+                       MailRoom.belongsToMany(models.User, {
+                               through: 'user_has_mail_rooms'
+                       });
+                       // SCOPES
+                       MailRoom.addScope('default', {
+                               order: [
+                                       ['createdAt', 'DESC']
+                               ],
+                               include: [{
+                                       model: models.MailAccount
+                               }, {
+                                       model: models.MailMessage,
+                                       include: [{
+                                               model: models.MailAttachment
+                                       }, {
+                                               model: models.User,
+                                               attributes: ['id', 'name', 'fullname', 'email']
+                                       }]
+                               }, {
+                                       model: models.User,
+                                       attributes: ['id', 'name', 'fullname', 'email']
+                               }]
+                       });
+
+                       MailRoom.addScope('agent', function(id) {
+                               return {
+                                       include: [{
+                                               model: models.User,
+                                               where: {
+                                                       id: id
+                                               }
+                                       }]
+                               }
+                       });
+               }
+       });
+
+       return MailRoom;
+};
index 76f6245..20b29e9 100644 (file)
@@ -1 +1,14 @@
-var _0xc376=["\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x41\x53\x53\x49\x47\x4E\x45\x44","\x52\x45\x50\x4C\x49\x45\x44","\x41\x52\x43\x48\x49\x56\x45\x44","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x5F\x73\x74\x61\x74\x65\x73","\x64\x65\x66\x69\x6E\x65"];module[_0xc376[0]]=function(_0xc721x1,_0xc721x2){var _0xc721x3=_0xc721x1[_0xc376[7]](_0xc376[1],{status:_0xc721x2.ENUM(_0xc376[2],_0xc376[3],_0xc376[4],_0xc376[5])},{tableName:_0xc376[6]});return _0xc721x3}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+       var MailRoomStatus = sequelize.define('MailRoomStatus', {
+               status: DataTypes.ENUM('RECEIVED', 'ASSIGNED', 'REPLIED', 'ARCHIVED')
+       }, {
+               tableName: 'mail_room_states'
+       });
+
+       return MailRoomStatus;
+};
index a363033..b53c443 100644 (file)
@@ -1 +1,71 @@
-var _0xf550=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x55\x4E\x53\x45\x45\x4E","\x49\x4D\x41\x50","\x50\x4F\x50\x33","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x45\x52\x52\x4F\x52","\x55\x4E\x4B\x4E\x4F\x57\x4E","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x69\x6E","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xf550[0]);module[_0xf550[1]]=function(_0xbc80x2,_0xbc80x3){var _0xbc80x4=_0xbc80x2[_0xf550[14]](_0xf550[2],{description:_0xbc80x3[_0xf550[3]],host:_0xbc80x3[_0xf550[3]],username:{type:_0xbc80x3[_0xf550[3]],unique:true},password:_0xbc80x3[_0xf550[3]],port:_0xbc80x3[_0xf550[4]],mailbox:_0xbc80x3[_0xf550[3]],ssl:{type:_0xbc80x3[_0xf550[5]],defaultValue:false},delete:{type:_0xbc80x3[_0xf550[5]],defaultValue:false},filter:{type:_0xbc80x3.ENUM(_0xf550[6]),defaultValue:_0xf550[6]},protocol:{type:_0xbc80x3.ENUM(_0xf550[7],_0xf550[8]),defaultValue:_0xf550[7]},state:{type:_0xbc80x3.ENUM(_0xf550[9],_0xf550[10],_0xf550[11],_0xf550[12]),defaultValue:_0xf550[12]},connTimeout:{type:_0xbc80x3[_0xf550[4]],defaultValue:10000},authTimeout:{type:_0xbc80x3[_0xf550[4]],defaultValue:5000},keepalive:{type:_0xbc80x3[_0xf550[5]],defaultValue:true}},{tableName:_0xf550[13]});return _0xbc80x4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var MailServerIn = sequelize.define('MailServerIn', {
+               description: DataTypes.STRING,
+               host: DataTypes.STRING,
+               username: {
+                       type: DataTypes.STRING,
+                       unique: true
+               },
+               password: DataTypes.STRING,
+               port: DataTypes.INTEGER,
+               mailbox: DataTypes.STRING,
+               ssl: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               delete: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               filter: {
+                       type: DataTypes.ENUM('UNSEEN'),
+                       defaultValue: 'UNSEEN'
+               },
+               protocol: {
+                       type: DataTypes.ENUM('IMAP', 'POP3'),
+                       defaultValue: 'IMAP'
+               },
+               state: {
+                       type: DataTypes.ENUM('CONNECTED', 'DISCONNECTED', 'ERROR', 'UNKNOWN'),
+                       defaultValue: 'UNKNOWN'
+               },
+               source: {
+                       type: DataTypes.STRING
+               },
+               connTimeout: {
+                       type: DataTypes.INTEGER,
+                       defaultValue: 10000,
+                       get: function() {
+                               return this.getDataValue('connTimeout') ? this.getDataValue('connTimeout') / 1000 : null;
+                       },
+                       set: function(val) {
+                               this.setDataValue('connTimeout', val * 1000);
+                       }
+               },
+               authTimeout: {
+                       type: DataTypes.INTEGER,
+                       defaultValue: 5000,
+                       get: function() {
+                               return this.getDataValue('authTimeout') ? this.getDataValue('authTimeout') / 1000 : null;
+                       },
+                       set: function(val) {
+                               this.setDataValue('authTimeout', val * 1000);
+                       }
+               },
+               keepalive: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: true
+               }
+       }, {
+               tableName: 'mail_servers_in'
+       });
+
+       return MailServerIn;
+};
index 8568447..e1c6486 100644 (file)
@@ -1 +1,33 @@
-var _0x9fd0=["\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x45\x52\x52\x4F\x52","\x55\x4E\x4B\x4E\x4F\x57\x4E","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x6F\x75\x74","\x64\x65\x66\x69\x6E\x65"];module[_0x9fd0[0]]=function(_0xe062x1,_0xe062x2){var _0xe062x3=_0xe062x1[_0x9fd0[10]](_0x9fd0[1],{description:_0xe062x2[_0x9fd0[2]],host:_0xe062x2[_0x9fd0[2]],username:{type:_0xe062x2[_0x9fd0[2]],unique:true},password:_0xe062x2[_0x9fd0[2]],port:_0xe062x2[_0x9fd0[3]],ssl:{type:_0xe062x2[_0x9fd0[4]],defaultValue:false},service:{type:_0xe062x2[_0x9fd0[4]],defaultValue:false},state:{type:_0xe062x2.ENUM(_0x9fd0[5],_0x9fd0[6],_0x9fd0[7],_0x9fd0[8]),defaultValue:_0x9fd0[8]}},{tableName:_0x9fd0[9]});return _0xe062x3}
\ No newline at end of file
+/**
+ *
+ */
+module.exports = function(sequelize, DataTypes) {
+
+       var MailServerOut = sequelize.define('MailServerOut', {
+               description: DataTypes.STRING,
+               host: DataTypes.STRING,
+               username: {
+                       type: DataTypes.STRING,
+                       unique: true
+               },
+               password: DataTypes.STRING,
+               port: DataTypes.INTEGER,
+               ssl: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               service: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               state: {
+                       type: DataTypes.ENUM('CONNECTED', 'DISCONNECTED', 'ERROR', 'UNKNOWN'),
+                       defaultValue: 'UNKNOWN'
+               },
+               source: DataTypes.STRING
+       }, {
+               tableName: 'mail_servers_out'
+       });
+
+       return MailServerOut;
+};
index 971926b..4856564 100644 (file)
@@ -1 +1,21 @@
-var _0xf57b=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x54\x65\x6D\x70\x6C\x61\x74\x65","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x6D\x61\x69\x6C\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xf57b[0]);module[_0xf57b[1]]=function(_0x8063x2,_0x8063x3){var _0x8063x4=_0x8063x2[_0xf57b[6]](_0xf57b[2],{name:_0x8063x3[_0xf57b[3]],description:_0x8063x3[_0xf57b[3]],subject:_0x8063x3[_0xf57b[3]],attachment:_0x8063x3[_0xf57b[4]],html:_0x8063x3[_0xf57b[4]],text:_0x8063x3[_0xf57b[4]]},{tableName:_0xf57b[5]});return _0x8063x4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var MailTemplate = sequelize.define('MailTemplate', {
+               name: DataTypes.STRING,
+               description: DataTypes.STRING,
+               subject: DataTypes.STRING,
+               attachment: DataTypes.TEXT,
+               html: DataTypes.TEXT,
+               text: DataTypes.TEXT
+       }, {
+               tableName: 'mail_templates'
+       });
+
+       return MailTemplate;
+};
index 0fab128..73be985 100644 (file)
@@ -1 +1,23 @@
-var _0x9eb9=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x54\x72\x69\x67\x67\x65\x72","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x42\x4F\x4F\x4C\x45\x41\x4E","\x6D\x61\x69\x6C\x5F\x74\x72\x69\x67\x67\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x9eb9[0]);module[_0x9eb9[1]]=function(_0x98d8x2,_0x98d8x3){var _0x98d8x4=_0x98d8x2[_0x9eb9[7]](_0x9eb9[2],{name:_0x98d8x3[_0x9eb9[3]],description:_0x98d8x3[_0x9eb9[3]],conditions:_0x98d8x3[_0x9eb9[4]],actions:_0x98d8x3[_0x9eb9[4]],status:{type:_0x98d8x3[_0x9eb9[5]],defaultValue:false}},{tableName:_0x9eb9[6]});return _0x98d8x4}
\ No newline at end of file
+/**
+ * User Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var MailTrigger = sequelize.define('MailTrigger', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    conditions: DataTypes.TEXT,
+    actions: DataTypes.TEXT,
+    status: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
+  }, {
+    tableName: 'mail_triggers'
+  });
+
+  return MailTrigger;
+};
index 9c8c55b..dfd57d2 100644 (file)
@@ -1 +1,37 @@
-var _0x7c43=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x65\x74\x72\x69\x63","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x6D\x65\x74\x72\x69\x63\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x61\x74\x74\x72","\x6E\x61\x6D\x65","\x74\x61\x62\x6C\x65","\x6D\x65\x74\x72\x69\x63","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x7c43[0];module[_0x7c43[1]]=function(_0xabd2x1,_0xabd2x2){var _0xabd2x3=_0xabd2x1[_0x7c43[13]](_0x7c43[2],{name:{type:_0xabd2x2[_0x7c43[3]],unique:true,validate:{notEmpty:true}},table:_0xabd2x2[_0x7c43[3]],metric:_0xabd2x2[_0x7c43[4]],description:_0xabd2x2[_0x7c43[3]]},{tableName:_0x7c43[5],associate:function(_0xabd2x4){_0xabd2x3[_0x7c43[7]](_0xabd2x4.ReportField,{as:_0x7c43[6]});_0xabd2x3[_0x7c43[12]](_0x7c43[8],{attributes:[_0x7c43[9],_0x7c43[10],_0x7c43[11]]})}});return _0xabd2x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Metric = sequelize.define('Metric', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      validate: {
+        notEmpty: true
+      },
+    },
+    table: DataTypes.STRING,
+    metric: DataTypes.TEXT,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'metrics',
+    associate: function(models) {
+      Metric.hasMany(models.ReportField, {
+        as: 'ReportFields'
+      });
+      Metric.addScope('attr', {
+        attributes: ['name', 'table', 'metric']
+      });
+      // Metric.addScope('fields', {
+      //   include: [{
+      //     model: models.ReportField,
+      //     as: 'ReportFields',
+      //     required: false
+      //   }]
+      // });
+    }
+  });
+
+  return Metric;
+
+};
index 2f51921..c2bef6c 100644 (file)
@@ -1 +1,27 @@
-var _0x13df=["\x65\x78\x70\x6F\x72\x74\x73","\x4D\x6F\x64\x75\x6C\x65","\x53\x54\x52\x49\x4E\x47","\x6D\x6F\x64\x75\x6C\x65\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x6F\x64\x75\x6C\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];module[_0x13df[0]]=function(_0xce48x1,_0xce48x2){var _0xce48x3=_0xce48x1[_0x13df[6]](_0x13df[1],{name:{type:_0xce48x2[_0x13df[2]],unique:true,allowNull:false,validate:{notEmpty:true}},title:_0xce48x2[_0x13df[2]]},{tableName:_0x13df[3],associate:function(_0xce48x4){_0xce48x3[_0x13df[5]](_0xce48x4.User,{through:_0x13df[4]})}});return _0xce48x3}
\ No newline at end of file
+/**
+ * Module Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Module = sequelize.define('Module', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true
+      }
+    },
+    title: DataTypes.STRING
+  }, {
+    tableName: 'modules',
+    associate: function(models) {
+      Module.belongsToMany(models.User, {
+        through: 'user_has_modules'
+      });
+    }
+  });
+
+  return Module;
+};
index d0ba023..ad6cba8 100644 (file)
@@ -1 +1,32 @@
-var _0x31d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x45\x4E\x55\x4D","\x68\x61\x6E\x67\x75\x70","\x69\x6E\x63\x6F\x6D\x69\x6E\x67","\x61\x63\x74\x69\x76\x65","\x53\x54\x52\x49\x4E\x47","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x41\x64\x6D\x69\x6E","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x55\x73\x65\x72","\x64\x65\x66\x69\x6E\x65"];_0x31d8[0];module[_0x31d8[1]]=function(_0x6e20x1,_0x6e20x2){var _0x6e20x3=_0x6e20x1[_0x31d8[12]](_0x31d8[2],{action:{type:_0x6e20x2[_0x31d8[3]],values:[_0x31d8[4]],allowNull:false},state:{type:_0x6e20x2[_0x31d8[3]],values:[_0x31d8[5],_0x31d8[6]]},phone:{type:_0x6e20x2[_0x31d8[7]]}},{tableName:_0x31d8[8],associate:function(_0x6e20x4){_0x6e20x3[_0x31d8[10]](_0x6e20x4.User,{as:_0x31d8[9]});_0x6e20x3[_0x31d8[10]](_0x6e20x4.User,{as:_0x31d8[11]})}});return _0x6e20x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Motionbar = sequelize.define('Motionbar', {
+    action: {
+      type: DataTypes.ENUM,
+      values: ['hangup'],
+      allowNull: false
+    },
+    state: {
+      type: DataTypes.ENUM,
+      values: ['incoming', 'active'],
+    },
+    phone: {
+      type: DataTypes.STRING
+    }
+  }, {
+    tableName: 'motionbar',
+    associate: function(models) {
+      Motionbar.belongsTo(models.User, {
+        as: 'Admin'
+      });
+      Motionbar.belongsTo(models.User, {
+        as: 'User'
+      });
+    }
+  });
+
+  return Motionbar;
+
+};
index e3d3e0d..ee1ef95 100644 (file)
@@ -1 +1,25 @@
-var _0x25d1=["\x65\x78\x70\x6F\x72\x74\x73","\x50\x61\x75\x73\x65","\x53\x54\x52\x49\x4E\x47","\x70\x61\x75\x73\x65\x73","\x64\x65\x66\x69\x6E\x65"];module[_0x25d1[0]]=function(_0x37acx1,_0x37acx2){var _0x37acx3=_0x37acx1[_0x25d1[4]](_0x25d1[1],{name:{type:_0x37acx2[_0x25d1[2]],unique:true,allowNull:false,validate:{notEmpty:true}},description:{type:_0x37acx2[_0x25d1[2]]}},{tableName:_0x25d1[3],associate:function(_0x37acx4){}});return _0x37acx3}
\ No newline at end of file
+/**
+ * tag Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Pause = sequelize.define('Pause', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true,
+      }
+    },
+    description: {
+      type: DataTypes.STRING
+    }
+  }, {
+    tableName: 'pauses',
+    associate: function(models) {}
+  });
+
+  return Pause;
+};
index d949c26..a7628cf 100644 (file)
@@ -1 +1,71 @@
-var _0x9d38=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];module[_0x9d38[0]]=function(_0x4461x1,_0x4461x2){var _0x4461x3=_0x4461x1[_0x9d38[9]](_0x9d38[1],{uniqueid:_0x4461x2[_0x9d38[2]],calleridnum:_0x4461x2[_0x9d38[2]],calleridname:_0x4461x2[_0x9d38[2]],queue:_0x4461x2[_0x9d38[2]],interface:_0x4461x2[_0x9d38[2]],membername:_0x4461x2[_0x9d38[2]],agentcalledAt:_0x4461x2[_0x9d38[3]],agentconnectAt:_0x4461x2[_0x9d38[3]],agentcompleteAt:_0x4461x2[_0x9d38[3]],agentringnoanswerAt:_0x4461x2[_0x9d38[3]],agentdumpAt:_0x4461x2[_0x9d38[3]],holdtime:_0x4461x2[_0x9d38[4]],agentcomplete:{type:_0x4461x2[_0x9d38[5]],defaultValue:false},agentringnoanswer:{type:_0x4461x2[_0x9d38[5]],defaultValue:false},agentdump:{type:_0x4461x2[_0x9d38[5]],defaultValue:false},talktime:_0x4461x2[_0x9d38[4]],agentacw:{type:_0x4461x2[_0x9d38[5]],defaultValue:false},acwtime:_0x4461x2[_0x9d38[4]],reason:_0x4461x2[_0x9d38[2]],lastevent:_0x4461x2[_0x9d38[2]],channel:_0x4461x2[_0x9d38[2]],channelstate:_0x4461x2[_0x9d38[4]],channelstatedesc:_0x4461x2[_0x9d38[2]],connectedlinenum:_0x4461x2[_0x9d38[2]],connectedlinename:_0x4461x2[_0x9d38[2]],language:_0x4461x2[_0x9d38[2]],accountcode:_0x4461x2[_0x9d38[2]],context:_0x4461x2[_0x9d38[2]],exten:_0x4461x2[_0x9d38[2]],priority:_0x4461x2[_0x9d38[2]],destchannel:_0x4461x2[_0x9d38[2]],destchannelstate:_0x4461x2[_0x9d38[4]],destchannelstatedesc:_0x4461x2[_0x9d38[2]],destcalleridnum:_0x4461x2[_0x9d38[2]],destcalleridname:_0x4461x2[_0x9d38[2]],destconnectedlinenum:_0x4461x2[_0x9d38[2]],destconnectedlinename:_0x4461x2[_0x9d38[2]],destlanguage:_0x4461x2[_0x9d38[2]],destaccountcode:_0x4461x2[_0x9d38[2]],destcontext:_0x4461x2[_0x9d38[2]],destexten:_0x4461x2[_0x9d38[2]],destpriority:_0x4461x2[_0x9d38[2]],destuniqueid:_0x4461x2[_0x9d38[2]]},{tableName:_0x9d38[6],indexes:[{fields:[_0x9d38[7],_0x9d38[8]]}]});return _0x4461x3}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportAgent = sequelize.define('ReportAgent', {
+    uniqueid: DataTypes.STRING,
+    calleridnum: DataTypes.STRING,
+    calleridname: DataTypes.STRING,
+    queue: DataTypes.STRING,
+    interface: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    agentcalledAt: DataTypes.DATE,
+    agentconnectAt: DataTypes.DATE,
+    agentcompleteAt: DataTypes.DATE,
+    agentringnoanswerAt: DataTypes.DATE,
+    agentdumpAt: DataTypes.DATE,
+    holdtime: DataTypes.INTEGER,
+    agentcomplete: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentringnoanswer: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentdump: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    talktime: DataTypes.INTEGER,
+    agentacw: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    acwtime: DataTypes.INTEGER,
+    reason: DataTypes.STRING,
+    lastevent: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    channelstate: DataTypes.INTEGER,
+    channelstatedesc: DataTypes.STRING,
+    connectedlinenum: DataTypes.STRING,
+    connectedlinename: DataTypes.STRING,
+    language: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    context: DataTypes.STRING,
+    exten: DataTypes.STRING,
+    priority: DataTypes.STRING,
+    destchannel: DataTypes.STRING,
+    destchannelstate: DataTypes.INTEGER,
+    destchannelstatedesc: DataTypes.STRING,
+    destcalleridnum: DataTypes.STRING,
+    destcalleridname: DataTypes.STRING,
+    destconnectedlinenum: DataTypes.STRING,
+    destconnectedlinename: DataTypes.STRING,
+    destlanguage: DataTypes.STRING,
+    destaccountcode: DataTypes.STRING,
+    destcontext: DataTypes.STRING,
+    destexten: DataTypes.STRING,
+    destpriority: DataTypes.STRING,
+    destuniqueid: DataTypes.STRING
+  }, {
+    tableName: 'report_agent',
+    indexes: [{
+      fields: ['uniqueid', 'destuniqueid']
+    }]
+  });
+
+  return ReportAgent;
+};
index fdf5d16..44e7515 100644 (file)
@@ -1 +1,60 @@
-var _0x46b7=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x53\x54\x52\x49\x4E\x47","\x45\x4E\x55\x4D","\x69\x6E\x62\x6F\x75\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x44\x41\x54\x45","","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];module[_0x46b7[0]]=function(_0xf021x1,_0xf021x2){var _0xf021x3=_0xf021x1[_0x46b7[17]](_0x46b7[1],{uniqueid:{type:_0xf021x2[_0x46b7[2]],unique:true},type:{type:_0xf021x2[_0x46b7[3]],values:[_0x46b7[4],_0x46b7[5],_0x46b7[6]]},tag:_0xf021x2[_0x46b7[2]],accountcode:_0xf021x2[_0x46b7[2]],source:_0xf021x2[_0x46b7[2]],destination:_0xf021x2[_0x46b7[2]],destinationcontext:_0xf021x2[_0x46b7[2]],callerid:_0xf021x2[_0x46b7[2]],channel:_0xf021x2[_0x46b7[2]],destinationchannel:_0xf021x2[_0x46b7[2]],lastapplication:_0xf021x2[_0x46b7[2]],lastdata:_0xf021x2[_0x46b7[2]],starttime:_0xf021x2[_0x46b7[7]],answertime:{type:_0xf021x2[_0x46b7[7]],set:function(_0xf021x4){if(_0xf021x4!==_0x46b7[8]){this[_0x46b7[10]](_0x46b7[9],_0xf021x4)}else {this[_0x46b7[10]](_0x46b7[9],null)}}},endtime:_0xf021x2[_0x46b7[7]],duration:_0xf021x2[_0x46b7[11]],billableseconds:_0xf021x2[_0x46b7[11]],disposition:_0xf021x2[_0x46b7[2]],amaflags:_0xf021x2[_0x46b7[2]],userfield:_0xf021x2[_0x46b7[2]]},{tableName:_0x46b7[12],associate:function(_0xf021x5){_0xf021x3[_0x46b7[15]](_0xf021x5.ReportQueue,{as:_0x46b7[13],foreignKey:_0x46b7[14],constraints:false});_0xf021x3[_0x46b7[15]](_0xf021x5.ReportAgent,{as:_0x46b7[16],foreignKey:_0x46b7[14],constraints:false})}});return _0xf021x3}
\ No newline at end of file
+/**
+ * CDR Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportCall = sequelize.define('ReportCall', {
+    uniqueid: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    type: {
+      type: DataTypes.ENUM,
+      values: ['inbound', 'internal', 'outbound']
+    },
+    tag: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    source: DataTypes.STRING,
+    destination: DataTypes.STRING,
+    destinationcontext: DataTypes.STRING,
+    callerid: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    destinationchannel: DataTypes.STRING,
+    lastapplication: DataTypes.STRING,
+    lastdata: DataTypes.STRING,
+    starttime: DataTypes.DATE,
+    answertime: {
+      type: DataTypes.DATE,
+      set: function(answertime) {
+        if (answertime !== '') {
+          this.setDataValue('answertime', answertime);
+        } else {
+          this.setDataValue('answertime', null);
+        }
+      }
+    },
+    endtime: DataTypes.DATE,
+    duration: DataTypes.INTEGER,
+    billableseconds: DataTypes.INTEGER,
+    disposition: DataTypes.STRING,
+    amaflags: DataTypes.STRING,
+    userfield: DataTypes.STRING
+  }, {
+    tableName: 'report_call',
+    associate: function(models) {
+      ReportCall.hasMany(models.ReportQueue, {
+        as: 'QueueCalls',
+        foreignKey: 'uniqueid',
+        constraints: false
+      })
+      ReportCall.hasMany(models.ReportAgent, {
+        as: 'ReportAgents',
+        foreignKey: 'uniqueid',
+        constraints: false
+      })
+    }
+  });
+
+  return ReportCall;
+};
index b032d86..8f1febf 100644 (file)
@@ -1 +1,45 @@
-var _0x60e7=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x63\x61\x6C\x6C\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x60e7[0]);module[_0x60e7[1]]=function(_0xa283x2,_0xa283x3){var _0xa283x4=_0xa283x2[_0x60e7[16]](_0x60e7[2],{uniqueid:_0xa283x3[_0x60e7[3]],timeslot:_0xa283x3[_0x60e7[4]],websitename:_0xa283x3[_0x60e7[3]],websiteaddress:_0xa283x3[_0x60e7[3]],websiteid:_0xa283x3[_0x60e7[4]],application:_0xa283x3[_0x60e7[3]],agentid:_0xa283x3[_0x60e7[4]],agentname:_0xa283x3[_0x60e7[3]],visitorid:_0xa283x3[_0x60e7[3]],visitorname:_0xa283x3[_0x60e7[3]],visitoremail:_0xa283x3[_0x60e7[3]],queueid:_0xa283x3[_0x60e7[4]],queuename:_0xa283x3[_0x60e7[3]],roomid:_0xa283x3[_0x60e7[4]],reason:{type:_0xa283x3[_0x60e7[3]],defaultValue:_0x60e7[5]},connectid:{type:_0xa283x3[_0x60e7[3]],unique:true,set:function(_0xa283x5){this[_0x60e7[8]](_0x60e7[6],this[_0x60e7[7]]);this[_0x60e7[8]](_0x60e7[9],_0x60e7[10]);this[_0x60e7[8]](_0x60e7[11],moment()[_0x60e7[13]](_0x60e7[12]))}},calledAt:_0xa283x3[_0x60e7[14]],connectedAt:_0xa283x3[_0x60e7[14]]},{tableName:_0x60e7[15]});return _0xa283x4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportChat = sequelize.define('ReportChat', {
+
+    uniqueid: DataTypes.STRING,
+    timeslot: DataTypes.INTEGER,
+    websitename: DataTypes.STRING,
+    websiteaddress: DataTypes.STRING,
+    websiteid: DataTypes.INTEGER,
+    application: DataTypes.STRING,
+    agentid: DataTypes.INTEGER,
+    agentname: DataTypes.STRING,
+    visitorid: DataTypes.STRING,
+    visitorname: DataTypes.STRING,
+    visitoremail: DataTypes.STRING,
+    queueid: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    reason: {
+      type: DataTypes.STRING,
+      defaultValue: 'called'
+    },
+    connectid: {
+      type: DataTypes.STRING,
+      unique: true,
+      set: function(agentconnectedAt) {
+        this.setDataValue('connectid', this.uniqueid);
+        this.setDataValue('reason', 'connect');
+        this.setDataValue('connectedAt', moment().format("YYYY-MM-DD HH:mm:ss"));
+      }
+    },
+    calledAt: DataTypes.DATE,
+    connectedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_chat'
+  });
+
+  return ReportChat;
+};
index 5fb26a9..4ee5fc2 100644 (file)
@@ -1 +1,45 @@
-var _0xe53c=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x61\x67\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0xe53c[0]);module[_0xe53c[1]]=function(_0x87afx2,_0x87afx3){var _0x87afx4=_0x87afx2[_0xe53c[10]](_0xe53c[2],{uniqueid:{type:_0x87afx3[_0xe53c[3]],unique:true},websitename:_0x87afx3[_0xe53c[3]],websiteaddress:_0x87afx3[_0xe53c[3]],websiteid:_0x87afx3[_0xe53c[4]],application:_0x87afx3[_0xe53c[3]],visitorid:_0x87afx3[_0xe53c[3]],visitorname:_0x87afx3[_0xe53c[3]],visitoremail:_0x87afx3[_0xe53c[3]],agentid:_0x87afx3[_0xe53c[3]],agentname:_0x87afx3[_0xe53c[3]],queueid:_0x87afx3[_0xe53c[4]],queuename:_0x87afx3[_0xe53c[3]],roomid:_0x87afx3[_0xe53c[4]],abandon:{type:_0x87afx3[_0xe53c[5]],defaulValue:false},abandonAt:_0x87afx3[_0xe53c[6]],complete:{type:_0x87afx3[_0xe53c[5]],defaulValue:false},completeReason:_0x87afx3.ENUM(_0xe53c[7],_0xe53c[8]),completeAt:_0x87afx3[_0xe53c[6]],joinAt:_0x87afx3[_0xe53c[6]],leaveAt:_0x87afx3[_0xe53c[6]],unmanagedAt:_0x87afx3[_0xe53c[6]]},{tableName:_0xe53c[9]});return _0x87afx4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportChatSession = sequelize.define('ReportChatSession', {
+    uniqueid: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    websitename: DataTypes.STRING,
+    websiteaddress: DataTypes.STRING,
+    websiteid: DataTypes.INTEGER,
+    application: DataTypes.STRING,
+    visitorid: DataTypes.STRING,
+    visitorname: DataTypes.STRING,
+    visitoremail: DataTypes.STRING,
+    agentid: DataTypes.STRING,
+    agentname: DataTypes.STRING,
+    queueid: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    abandon: {
+      type: DataTypes.BOOLEAN,
+      defaulValue: false
+    },
+    abandonAt: DataTypes.DATE,
+    complete: {
+      type: DataTypes.BOOLEAN,
+      defaulValue: false
+    },
+    completeReason: DataTypes.ENUM('agent', 'requester'),
+    completeAt: DataTypes.DATE,
+    joinAt: DataTypes.DATE,
+    leaveAt: DataTypes.DATE,
+    unmanagedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_chat_session'
+  });
+
+  return ReportChatSession;
+};
index 38fb0ca..208b861 100644 (file)
@@ -1 +1,22 @@
-var _0xef23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x69\x65\x6C\x64\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x6D\x65\x74\x72\x69\x63\x73","\x4D\x65\x74\x72\x69\x63","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0xef23[0];module[_0xef23[1]]=function(_0xa6e8x1,_0xa6e8x2){var _0xa6e8x3=_0xa6e8x1[_0xef23[10]](_0xef23[2],{field:_0xa6e8x2[_0xef23[3]],alias:_0xa6e8x2[_0xef23[3]],function:_0xa6e8x2[_0xef23[3]],groupBy:_0xa6e8x2[_0xef23[4]],orderBy:_0xa6e8x2[_0xef23[3]]},{tableName:_0xef23[5],associate:function(_0xa6e8x4){_0xa6e8x3[_0xef23[6]](_0xa6e8x4.Metric);_0xa6e8x3[_0xef23[9]](_0xef23[7],{include:[_0xa6e8x4[_0xef23[8]]]})}});return _0xa6e8x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportField = sequelize.define('ReportField', {
+    field: DataTypes.STRING,
+    alias: DataTypes.STRING,
+    function: DataTypes.STRING,
+    groupBy: DataTypes.BOOLEAN,
+    orderBy: DataTypes.STRING
+  }, {
+    tableName: 'report_fields',
+    associate: function(models) {
+      ReportField.belongsTo(models.Metric);
+      ReportField.addScope('metrics', {
+        include: [models.Metric]
+      });
+    }
+  });
+
+  return ReportField;
+};
index 655c2eb..a285620 100644 (file)
@@ -1 +1,86 @@
-var _0x6a39=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x53\x45\x4E\x54","\x53\x45\x4E\x44\x49\x4E\x47","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x41\x49\x4C\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x64\x65\x66\x69\x6E\x65"];module[_0x6a39[0]]=function(_0x1b4ex1,_0x1b4ex2){var _0x1b4ex3=_0x1b4ex1[_0x6a39[12]](_0x6a39[1],{integration:_0x1b4ex2[_0x6a39[2]],eventChannel:_0x1b4ex2[_0x6a39[2]],exitStatus:_0x1b4ex2[_0x6a39[2]],ticketId:_0x1b4ex2[_0x6a39[2]],integrationId:_0x1b4ex2[_0x6a39[3]],contacts:_0x1b4ex2[_0x6a39[2]],uniqueid:_0x1b4ex2[_0x6a39[2]],calleridnum:_0x1b4ex2[_0x6a39[2]],calleridname:_0x1b4ex2[_0x6a39[2]],queue:_0x1b4ex2[_0x6a39[2]],interface:_0x1b4ex2[_0x6a39[2]],membername:_0x1b4ex2[_0x6a39[2]],agentcalledAt:_0x1b4ex2[_0x6a39[4]],agentconnectAt:_0x1b4ex2[_0x6a39[4]],holdtime:_0x1b4ex2[_0x6a39[3]],agentcomplete:{type:_0x1b4ex2[_0x6a39[5]],defaultValue:false},agentcompleteAt:_0x1b4ex2[_0x6a39[4]],talktime:_0x1b4ex2[_0x6a39[3]],agentacw:{type:_0x1b4ex2[_0x6a39[5]],defaultValue:false},acwtime:_0x1b4ex2[_0x6a39[3]],reason:_0x1b4ex2[_0x6a39[2]],agentringnoanswer:{type:_0x1b4ex2[_0x6a39[5]],defaultValue:false},agentringnoanswerAt:_0x1b4ex2[_0x6a39[4]],agentdump:{type:_0x1b4ex2[_0x6a39[5]],defaultValue:false},agentdumpAt:_0x1b4ex2[_0x6a39[4]],lastevent:_0x1b4ex2[_0x6a39[2]],channel:_0x1b4ex2[_0x6a39[2]],channelstate:_0x1b4ex2[_0x6a39[3]],channelstatedesc:_0x1b4ex2[_0x6a39[2]],connectedlinenum:_0x1b4ex2[_0x6a39[2]],connectedlinename:_0x1b4ex2[_0x6a39[2]],language:_0x1b4ex2[_0x6a39[2]],accountcode:_0x1b4ex2[_0x6a39[2]],context:_0x1b4ex2[_0x6a39[2]],exten:_0x1b4ex2[_0x6a39[2]],priority:_0x1b4ex2[_0x6a39[2]],destchannel:_0x1b4ex2[_0x6a39[2]],destchannelstate:_0x1b4ex2[_0x6a39[3]],destchannelstatedesc:_0x1b4ex2[_0x6a39[2]],destcalleridnum:_0x1b4ex2[_0x6a39[2]],destcalleridname:_0x1b4ex2[_0x6a39[2]],destconnectedlinenum:_0x1b4ex2[_0x6a39[2]],destconnectedlinename:_0x1b4ex2[_0x6a39[2]],destlanguage:_0x1b4ex2[_0x6a39[2]],destaccountcode:_0x1b4ex2[_0x6a39[2]],destcontext:_0x1b4ex2[_0x6a39[2]],destexten:_0x1b4ex2[_0x6a39[2]],destpriority:_0x1b4ex2[_0x6a39[2]],destuniqueid:_0x1b4ex2[_0x6a39[2]],messageId:_0x1b4ex2[_0x6a39[2]],inReplyTo:_0x1b4ex2[_0x6a39[2]],subject:_0x1b4ex2[_0x6a39[2]],from:_0x1b4ex2[_0x6a39[2]],to:_0x1b4ex2[_0x6a39[2]],cc:_0x1b4ex2[_0x6a39[2]],attachment:_0x1b4ex2[_0x6a39[6]],html:_0x1b4ex2[_0x6a39[6]],text:_0x1b4ex2[_0x6a39[6]],status:{type:_0x1b4ex2.ENUM(_0x6a39[7],_0x6a39[8],_0x6a39[9],_0x6a39[10])}},{tableName:_0x6a39[11]});return _0x1b4ex3}
\ No newline at end of file
+/**
+ * report_integrations Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportIntegration = sequelize.define('ReportIntegration', {
+    integration: DataTypes.STRING,
+    eventChannel: DataTypes.STRING,
+    exitStatus: DataTypes.STRING,
+    ticketId: DataTypes.STRING,
+    integrationId: DataTypes.INTEGER,
+    contacts: DataTypes.STRING,
+    uniqueid: DataTypes.STRING,
+    calleridnum: DataTypes.STRING,
+    calleridname: DataTypes.STRING,
+    queue: DataTypes.STRING,
+    interface: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    agentcalledAt: DataTypes.DATE,
+    agentconnectAt: DataTypes.DATE,
+    holdtime: DataTypes.INTEGER,
+    agentcomplete: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentcompleteAt: DataTypes.DATE,
+    talktime: DataTypes.INTEGER,
+    agentacw: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    acwtime: DataTypes.INTEGER,
+    reason: DataTypes.STRING,
+    agentringnoanswer: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentringnoanswerAt: DataTypes.DATE,
+    agentdump: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+    },
+    agentdumpAt: DataTypes.DATE,
+    lastevent: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    channelstate: DataTypes.INTEGER,
+    channelstatedesc: DataTypes.STRING,
+    connectedlinenum: DataTypes.STRING,
+    connectedlinename: DataTypes.STRING,
+    language: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    context: DataTypes.STRING,
+    exten: DataTypes.STRING,
+    priority: DataTypes.STRING,
+    destchannel: DataTypes.STRING,
+    destchannelstate: DataTypes.INTEGER,
+    destchannelstatedesc: DataTypes.STRING,
+    destcalleridnum: DataTypes.STRING,
+    destcalleridname: DataTypes.STRING,
+    destconnectedlinenum: DataTypes.STRING,
+    destconnectedlinename: DataTypes.STRING,
+    destlanguage: DataTypes.STRING,
+    destaccountcode: DataTypes.STRING,
+    destcontext: DataTypes.STRING,
+    destexten: DataTypes.STRING,
+    destpriority: DataTypes.STRING,
+    destuniqueid: DataTypes.STRING,
+    messageId: DataTypes.STRING,
+    inReplyTo: DataTypes.STRING,
+    subject: DataTypes.STRING,
+    from: DataTypes.STRING,
+    to: DataTypes.STRING,
+    cc: DataTypes.STRING,
+    attachment: DataTypes.TEXT,
+    html: DataTypes.TEXT,
+    text: DataTypes.TEXT,
+    status: {
+      type: DataTypes.ENUM('SENT', 'SENDING', 'RECEIVED', 'FAILED')
+    }
+  }, {
+    tableName: 'report_integration'
+  });
+
+  return ReportIntegration;
+};
index b0948c2..5a3d4f5 100644 (file)
@@ -1 +1,12 @@
-var _0x5729=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x69\x6E\x70\x75\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x5729[0];module[_0x5729[1]]=function(_0xdca9x1,_0xdca9x2){return _0xdca9x1[_0x5729[6]](_0x5729[2],{input_id:_0xdca9x2[_0x5729[3]],input_type:_0xdca9x2[_0x5729[4]],input_label:_0xdca9x2[_0x5729[4]],input_value:_0xdca9x2[_0x5729[4]]},{tableName:_0x5729[5]})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('ReportJscriptyInput', {
+    input_id: DataTypes.INTEGER,
+    input_type: DataTypes.STRING,
+    input_label: DataTypes.STRING,
+    input_value: DataTypes.STRING
+  }, {
+    tableName: 'report_jscripty_inputs'
+  });
+};
index 0459bed..f6080f4 100644 (file)
@@ -1 +1,34 @@
-var _0x52ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x63\x61\x73\x63\x61\x64\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x69\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x74\x79\x70\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6C\x61\x62\x65\x6C","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x74\x65\x78\x74","\x63\x6F\x75\x6E\x74","\x63\x6F\x6C","\x66\x6E","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x52ba[0];module[_0x52ba[1]]=function(_0x9fedx1,_0x9fedx2){return _0x9fedx1[_0x52ba[18]](_0x52ba[2],{question_id:_0x9fedx2[_0x52ba[3]],question_type:_0x9fedx2[_0x52ba[4]],question_label:_0x9fedx2[_0x52ba[4]],question_text:_0x9fedx2[_0x52ba[4]],question_answer:_0x9fedx2[_0x52ba[4]],question_other_label:_0x9fedx2[_0x52ba[4]],question_other_answer:_0x9fedx2[_0x52ba[4]]},{tableName:_0x52ba[5],associate:function(_0x9fedx3){_0x9fedx3[_0x52ba[2]][_0x52ba[8]](_0x9fedx3.ReportJscriptyInput,{onDelete:_0x52ba[6],foreignKey:_0x52ba[7]});_0x9fedx3[_0x52ba[2]][_0x52ba[17]](_0x52ba[9],function(_0x9fedx4){return {where:{projectId:_0x9fedx4},attributes:[_0x52ba[10],_0x52ba[11],_0x52ba[12],_0x52ba[13],[_0x9fedx1[_0x52ba[16]](_0x52ba[14],_0x9fedx1[_0x52ba[15]](_0x52ba[10])),_0x52ba[14]]],group:[_0x52ba[10],_0x52ba[11],_0x52ba[12],_0x52ba[13]]}})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('ReportJscriptyQuestion', {
+    question_id: DataTypes.INTEGER,
+    question_type: DataTypes.STRING,
+    question_label: DataTypes.STRING,
+    question_text: DataTypes.STRING,
+    question_answer: DataTypes.STRING,
+    question_other_label: DataTypes.STRING,
+    question_other_answer: DataTypes.STRING
+
+  }, {
+    tableName: 'report_jscripty_questions',
+    associate: function(models) {
+      models.ReportJscriptyQuestion.hasMany(models.ReportJscriptyInput, {
+        onDelete: 'cascade',
+        foreignKey: 'questionId'
+
+      });
+      models.ReportJscriptyQuestion.addScope('questionSummary', function(projectId) {
+        return {
+          where: {
+            projectId: projectId
+
+          },
+          attributes: ['question_id', 'question_type', 'question_label', 'question_text', [sequelize.fn('count', sequelize.col('question_id')), 'count']],
+          group: ['question_id', 'question_type', 'question_label', 'question_text']
+        }
+
+      });
+    }
+  });
+};
index 21d4237..12a8447 100644 (file)
@@ -1 +1,51 @@
-var _0x9bfb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E","\x49\x4E\x54\x45\x47\x45\x52","\x73\x74\x61\x72\x74\x65\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x69\x6E\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x44\x41\x54\x45","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x63\x61\x73\x63\x61\x64\x65","\x73\x65\x73\x73\x69\x6F\x6E\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x41\x6E\x64\x49\x6E\x70\x75\x74","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x9bfb[0];var moment=require(_0x9bfb[1]);module[_0x9bfb[2]]=function(_0x6f17x2,_0x6f17x3){return _0x6f17x2[_0x9bfb[23]](_0x9bfb[3],{session_id:{type:_0x6f17x3[_0x9bfb[4]],primaryKey:true,autoIncrement:true},status:{type:_0x6f17x3.ENUM(_0x9bfb[5],_0x9bfb[6],_0x9bfb[7])},last_question_id:_0x6f17x3[_0x9bfb[4]],completedAt:{type:_0x6f17x3[_0x9bfb[8]],get:function(){return this[_0x9bfb[10]](_0x9bfb[9])?moment(this[_0x9bfb[10]](_0x9bfb[9]))[_0x9bfb[12]](_0x9bfb[11]):_0x9bfb[13]}},createdAt:{type:_0x6f17x3[_0x9bfb[8]],get:function(){return moment(this[_0x9bfb[10]](_0x9bfb[14]))[_0x9bfb[12]](_0x9bfb[11])}}},{tableName:_0x9bfb[15],associate:function(_0x6f17x4){_0x6f17x4[_0x9bfb[3]][_0x9bfb[18]](_0x6f17x4.ReportJscriptyQuestion,{onDelete:_0x9bfb[16],foreignKey:_0x9bfb[17]});_0x6f17x4[_0x9bfb[3]][_0x9bfb[22]](_0x9bfb[19],function(_0x6f17x5){return {where:{ProjectId:_0x6f17x5},include:[{model:_0x6f17x4[_0x9bfb[20]],include:[{model:_0x6f17x4[_0x9bfb[21]]}]}]}})}})}
\ No newline at end of file
+'use strict';
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('ReportJscriptySession', {
+    session_id: {
+      type: DataTypes.INTEGER,
+      primaryKey: true,
+      autoIncrement: true
+    },
+    status: {
+      type: DataTypes.ENUM('started', 'completed', 'incomplete')
+    },
+    last_question_id: DataTypes.INTEGER,
+    completedAt: {
+      type: DataTypes.DATE,
+      get: function() {
+        // 'this' allows you to access attributes of the instance
+        return this.getDataValue('completedAt') ? moment(this.getDataValue('completedAt')).format("MM-DD-YYYY HH:mm") : '';
+      }
+    },
+    createdAt: {
+      type: DataTypes.DATE,
+      get: function() {
+        // 'this' allows you to access attributes of the instance
+        return moment(this.getDataValue('createdAt')).format("MM-DD-YYYY HH:mm");
+      }
+    }
+  }, {
+    tableName: 'report_jscripty_sessions',
+    associate: function(models) {
+      models.ReportJscriptySession.hasMany(models.ReportJscriptyQuestion, {
+        onDelete: 'cascade',
+        foreignKey: 'sessionId'
+      });
+      models.ReportJscriptySession.addScope('questionsAndInput', function(projectId) {
+        return {
+          where: {
+            ProjectId: projectId
+          },
+          include: [{
+            model: models.ReportJscriptyQuestion,
+            include: [{
+              model: models.ReportJscriptyInput
+            }]
+          }]
+        }
+      });
+    }
+  });
+};
index 8928ff9..d4327ea 100644 (file)
@@ -1 +1,43 @@
-var _0xf619=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x63\x61\x6C\x6C\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0xf619[0]);module[_0xf619[1]]=function(_0xae31x2,_0xae31x3){var _0xae31x4=_0xae31x2[_0xf619[16]](_0xf619[2],{uniqueid:_0xae31x3[_0xf619[3]],timeslot:_0xae31x3[_0xf619[4]],subject:_0xae31x3[_0xf619[3]],accountid:_0xae31x3[_0xf619[3]],accountname:_0xae31x3[_0xf619[3]],accountaddress:_0xae31x3[_0xf619[3]],application:_0xae31x3[_0xf619[3]],memberid:_0xae31x3[_0xf619[4]],membername:_0xae31x3[_0xf619[3]],queue:_0xae31x3[_0xf619[4]],queuename:_0xae31x3[_0xf619[3]],roomid:_0xae31x3[_0xf619[4]],messageid:_0xae31x3[_0xf619[4]],reason:{type:_0xae31x3[_0xf619[3]],defaultValue:_0xf619[5]},connectid:{type:_0xae31x3[_0xf619[3]],unique:true,set:function(_0xae31x5){this[_0xf619[8]](_0xf619[6],this[_0xf619[7]]);this[_0xf619[8]](_0xf619[9],_0xf619[10]);this[_0xf619[8]](_0xf619[11],moment()[_0xf619[13]](_0xf619[12]))}},calledAt:_0xae31x3[_0xf619[14]],connectedAt:_0xae31x3[_0xf619[14]]},{tableName:_0xf619[15]});return _0xae31x4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportMail = sequelize.define('ReportMail', {
+    uniqueid: DataTypes.STRING,
+    timeslot: DataTypes.INTEGER,
+    subject: DataTypes.STRING,
+    accountid: DataTypes.STRING,
+    accountname: DataTypes.STRING,
+    accountaddress: DataTypes.STRING,
+    application: DataTypes.STRING,
+    memberid: DataTypes.INTEGER,
+    membername: DataTypes.STRING,
+    queue: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    messageid: DataTypes.INTEGER,
+    reason: {
+      type: DataTypes.STRING,
+      defaultValue: 'called'
+    },
+    connectid: {
+      type: DataTypes.STRING,
+      unique: true,
+      set: function(agentconnectedAt) {
+        this.setDataValue('connectid', this.uniqueid);
+        this.setDataValue('reason', 'connect');
+        this.setDataValue('connectedAt', moment().format("YYYY-MM-DD HH:mm:ss"));
+      }
+    },
+    calledAt: DataTypes.DATE,
+    connectedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_mail'
+  });
+
+  return ReportMail;
+};
index a335a71..903631e 100644 (file)
@@ -1 +1,37 @@
-var _0x394d=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x394d[0]);module[_0x394d[1]]=function(_0xc1acx2,_0xc1acx3){var _0xc1acx4=_0xc1acx2[_0x394d[7]](_0x394d[2],{uniqueid:{type:_0xc1acx3[_0x394d[3]],unique:true},subject:_0xc1acx3[_0x394d[3]],accountid:_0xc1acx3[_0x394d[3]],accountname:_0xc1acx3[_0x394d[3]],accountaddress:_0xc1acx3[_0x394d[3]],application:_0xc1acx3[_0x394d[3]],memberid:_0xc1acx3[_0x394d[3]],membername:_0xc1acx3[_0x394d[3]],queue:_0xc1acx3[_0x394d[4]],queuename:_0xc1acx3[_0x394d[3]],roomid:_0xc1acx3[_0x394d[4]],fidelity:{type:_0xc1acx3[_0x394d[4]],defaultValue:0},holdtime:_0xc1acx3[_0x394d[4]],queuecallerjoinAt:_0xc1acx3[_0x394d[5]],queuecallerleaveAt:_0xc1acx3[_0x394d[5]],queuecallerunmanagedAt:_0xc1acx3[_0x394d[5]],queuecallerabandonedAt:_0xc1acx3[_0x394d[5]]},{tableName:_0x394d[6]});return _0xc1acx4}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+  var ReportMailSession = sequelize.define('ReportMailSession', {
+    uniqueid: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    subject: DataTypes.STRING,
+    accountid: DataTypes.STRING,
+    accountname: DataTypes.STRING,
+    accountaddress: DataTypes.STRING,
+    application: DataTypes.STRING,
+    memberid: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    queue: DataTypes.INTEGER,
+    queuename: DataTypes.STRING,
+    roomid: DataTypes.INTEGER,
+    fidelity: {
+      type: DataTypes.INTEGER,
+      defaultValue: 0
+    },
+    holdtime: DataTypes.INTEGER,
+    queuecallerjoinAt: DataTypes.DATE,
+    queuecallerleaveAt: DataTypes.DATE,
+    queuecallerunmanagedAt: DataTypes.DATE,
+    queuecallerabandonedAt: DataTypes.DATE
+  }, {
+    tableName: 'report_mail_session'
+  });
+
+  return ReportMailSession;
+};
index fcce18b..e4aac4e 100644 (file)
@@ -1 +1,33 @@
-var _0x61bd=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x53\x54\x52\x49\x4E\x47","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x61bd[0]);module[_0x61bd[1]]=function(_0x1a85x2,_0x1a85x3){var _0x1a85x4=_0x1a85x2[_0x61bd[8]](_0x61bd[2],{channel:_0x1a85x3[_0x61bd[3]],membername:_0x1a85x3[_0x61bd[3]],interface:_0x1a85x3[_0x61bd[3]],type:{type:_0x1a85x3[_0x61bd[3]],defaultValue:_0x61bd[4]},duration:_0x1a85x3[_0x61bd[5]],enterAt:_0x1a85x3[_0x61bd[6]],exitAt:_0x1a85x3[_0x61bd[6]],data1:_0x1a85x3[_0x61bd[3]],data2:_0x1a85x3[_0x61bd[3]],data3:_0x1a85x3[_0x61bd[3]],data4:_0x1a85x3[_0x61bd[3]],data5:_0x1a85x3[_0x61bd[3]]},{tableName:_0x61bd[7]});return _0x1a85x4}
\ No newline at end of file
+/**
+ * DIAL Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportMember = sequelize.define('ReportMember', {
+    channel: DataTypes.STRING,
+    membername: DataTypes.STRING,
+    interface: DataTypes.STRING,
+    type: {
+      type: DataTypes.STRING,
+      defaultValue: 'DEFAULT PAUSE'
+    },
+    duration: DataTypes.INTEGER,
+    enterAt: DataTypes.DATE,
+    exitAt: DataTypes.DATE,
+    data1: DataTypes.STRING,
+    data2: DataTypes.STRING,
+    data3: DataTypes.STRING,
+    data4: DataTypes.STRING,
+    data5: DataTypes.STRING
+  }, {
+    tableName: 'report_member',
+    // indexes: [{
+    //   fields: ['membername', 'enterdate', 'exitdate']
+    // }]
+  });
+
+  return ReportMember;
+};
index f1e0fe4..b06b742 100644 (file)
@@ -1 +1,63 @@
-var _0x2595=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x2595[0]);module[_0x2595[1]]=function(_0xfd0dx2,_0xfd0dx3){var _0xfd0dx4=_0xfd0dx2[_0x2595[18]](_0x2595[2],{uniqueid:_0xfd0dx3[_0x2595[3]],calleridnum:_0xfd0dx3[_0x2595[3]],calleridname:_0xfd0dx3[_0x2595[3]],queue:_0xfd0dx3[_0x2595[3]],queuecallerjoinAt:_0xfd0dx3[_0x2595[4]],queuecallerleaveAt:{type:_0xfd0dx3[_0x2595[4]],set:function(_0xfd0dx5){var _0xfd0dx6=moment(_0xfd0dx5);var _0xfd0dx7=moment(this[_0x2595[8]](_0x2595[7]))[_0x2595[6]](_0x2595[5]);this[_0x2595[10]](_0x2595[9],_0xfd0dx5);this[_0x2595[10]](_0x2595[11],_0xfd0dx6[_0x2595[13]](_0xfd0dx7,_0x2595[12]))}},position:_0xfd0dx3[_0x2595[14]],count:_0xfd0dx3[_0x2595[14]],queuecallerabandon:{type:_0xfd0dx3[_0x2595[15]],defaultValue:false},queuecallerabandonAt:_0xfd0dx3[_0x2595[4]],queuecallercomplete:{type:_0xfd0dx3[_0x2595[15]],defaultValue:false},queuecallercompleteAt:_0xfd0dx3[_0x2595[4]],queuecallerexit:{type:_0xfd0dx3[_0x2595[15]],defaultValue:false},queuecallerexitAt:_0xfd0dx3[_0x2595[4]],queuecallerexitreason:_0xfd0dx3[_0x2595[3]],originalposition:_0xfd0dx3[_0x2595[14]],channel:_0xfd0dx3[_0x2595[3]],channelstate:_0xfd0dx3[_0x2595[14]],channelstatedesc:_0xfd0dx3[_0x2595[3]],connectedlinenum:_0xfd0dx3[_0x2595[3]],connectedlinename:_0xfd0dx3[_0x2595[3]],language:_0xfd0dx3[_0x2595[3]],accountcode:_0xfd0dx3[_0x2595[3]],context:_0xfd0dx3[_0x2595[3]],exten:_0xfd0dx3[_0x2595[3]],priority:_0xfd0dx3[_0x2595[3]],holdtime:_0xfd0dx3[_0x2595[14]]},{tableName:_0x2595[16],indexes:[{fields:[_0x2595[17]]}]});return _0xfd0dx4}
\ No newline at end of file
+/**
+ * QueueLog Model
+ */
+
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportQueue = sequelize.define('ReportQueue', {
+    uniqueid: DataTypes.STRING,
+    calleridnum: DataTypes.STRING,
+    calleridname: DataTypes.STRING,
+    queue: DataTypes.STRING,
+    queuecallerjoinAt: DataTypes.DATE,
+    queuecallerleaveAt: {
+      type: DataTypes.DATE,
+      set: function(queuecallerleaveAt) {
+        var a = moment(queuecallerleaveAt);
+        var b = moment(this.getDataValue('queuecallerjoinAt')).format("YYYY-MM-DD HH:mm:ss");
+
+        this.setDataValue('queuecallerleaveAt', queuecallerleaveAt);
+        this.setDataValue('holdtime', a.diff(b, 'seconds'));
+      }
+    },
+    position: DataTypes.INTEGER,
+    count: DataTypes.INTEGER,
+    queuecallerabandon: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    queuecallerabandonAt: DataTypes.DATE,
+    queuecallercomplete: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    queuecallercompleteAt: DataTypes.DATE,
+    queuecallerexit: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    queuecallerexitAt: DataTypes.DATE,
+    queuecallerexitreason: DataTypes.STRING,
+    originalposition: DataTypes.INTEGER,
+    channel: DataTypes.STRING,
+    channelstate: DataTypes.INTEGER,
+    channelstatedesc: DataTypes.STRING,
+    connectedlinenum: DataTypes.STRING,
+    connectedlinename: DataTypes.STRING,
+    language: DataTypes.STRING,
+    accountcode: DataTypes.STRING,
+    context: DataTypes.STRING,
+    exten: DataTypes.STRING,
+    priority: DataTypes.STRING,
+    holdtime: DataTypes.INTEGER
+  }, {
+    tableName: 'report_queue',
+    indexes: [{
+      fields: ['uniqueid']
+    }]
+  });
+
+  return ReportQueue;
+};
index 17b2b7e..62a8e0c 100644 (file)
@@ -1 +1,89 @@
-var _0xafae=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65","\x64\x65\x66\x69\x6E\x65"];module[_0xafae[0]]=function(_0x3fa9x1,_0x3fa9x2){var _0x3fa9x3=_0x3fa9x1[_0xafae[5]](_0xafae[1],{network:{type:_0x3fa9x2[_0xafae[2]]},network_script:{type:_0x3fa9x2[_0xafae[2]]},request:{type:_0x3fa9x2[_0xafae[2]]},channel:{type:_0x3fa9x2[_0xafae[2]]},language:{type:_0x3fa9x2[_0xafae[2]]},type:{type:_0x3fa9x2[_0xafae[2]]},uniqueid:{type:_0x3fa9x2[_0xafae[2]]},version:{type:_0x3fa9x2[_0xafae[2]]},callerid:{type:_0x3fa9x2[_0xafae[2]]},calleridname:{type:_0x3fa9x2[_0xafae[2]]},callingpres:{type:_0x3fa9x2[_0xafae[2]]},callingani2:{type:_0x3fa9x2[_0xafae[2]]},callington:{type:_0x3fa9x2[_0xafae[2]]},callingtns:{type:_0x3fa9x2[_0xafae[2]]},dnid:{type:_0x3fa9x2[_0xafae[2]]},rdnis:{type:_0x3fa9x2[_0xafae[2]]},context:{type:_0x3fa9x2[_0xafae[2]]},extension:{type:_0x3fa9x2[_0xafae[2]]},priority:{type:_0x3fa9x2[_0xafae[2]]},enhanced:{type:_0x3fa9x2[_0xafae[2]]},accountcode:{type:_0x3fa9x2[_0xafae[2]]},threadid:{type:_0x3fa9x2[_0xafae[2]]},project_name:{type:_0x3fa9x2[_0xafae[2]]},joinAt:{type:_0x3fa9x2[_0xafae[3]]},leaveAt:{type:_0x3fa9x2[_0xafae[3]],unique:true}},{tableName:_0xafae[4]});return _0x3fa9x3}
\ No newline at end of file
+/**
+ * Context Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportSquare = sequelize.define('ReportSquare', {
+    network: {
+      type: DataTypes.STRING,
+    },
+    network_script: {
+      type: DataTypes.STRING,
+    },
+    request: {
+      type: DataTypes.STRING,
+    },
+    channel: {
+      type: DataTypes.STRING,
+    },
+    language: {
+      type: DataTypes.STRING,
+    },
+    type: {
+      type: DataTypes.STRING,
+    },
+    uniqueid: {
+      type: DataTypes.STRING,
+    },
+    version: {
+      type: DataTypes.STRING,
+    },
+    callerid: {
+      type: DataTypes.STRING,
+    },
+    calleridname: {
+      type: DataTypes.STRING,
+    },
+    callingpres: {
+      type: DataTypes.STRING,
+    },
+    callingani2: {
+      type: DataTypes.STRING,
+    },
+    callington: {
+      type: DataTypes.STRING,
+    },
+    callingtns: {
+      type: DataTypes.STRING,
+    },
+    dnid: {
+      type: DataTypes.STRING,
+    },
+    rdnis: {
+      type: DataTypes.STRING,
+    },
+    context: {
+      type: DataTypes.STRING,
+    },
+    extension: {
+      type: DataTypes.STRING,
+    },
+    priority: {
+      type: DataTypes.STRING,
+    },
+    enhanced: {
+      type: DataTypes.STRING,
+    },
+    accountcode: {
+      type: DataTypes.STRING,
+    },
+    threadid: {
+      type: DataTypes.STRING,
+    },
+    project_name: {
+      type: DataTypes.STRING,
+    },
+    joinAt: {
+      type: DataTypes.DATE,
+    },
+    leaveAt: {
+      type: DataTypes.DATE,
+      unique: true
+    }
+  }, {
+    tableName: 'report_square'
+  });
+
+  return ReportSquare;
+};
index 55fbf18..b9a2f4c 100644 (file)
@@ -1 +1,25 @@
-var _0x56c7=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x53\x54\x52\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x64\x65\x66\x69\x6E\x65"];module[_0x56c7[0]]=function(_0xac03x1,_0xac03x2){var _0xac03x3=_0xac03x1[_0x56c7[4]](_0x56c7[1],{uniqueid:{type:_0xac03x2[_0x56c7[2]]},node:{type:_0xac03x2[_0x56c7[2]]},application:{type:_0xac03x2[_0x56c7[2]]},data:{type:_0xac03x2[_0x56c7[2]]}},{tableName:_0x56c7[3]});return _0xac03x3}
\ No newline at end of file
+/**
+ * Context Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportSquareDetail = sequelize.define('ReportSquareDetail', {
+    uniqueid: {
+      type: DataTypes.STRING,
+    },
+    node: {
+      type: DataTypes.STRING,
+    },
+    application: {
+      type: DataTypes.STRING,
+    },
+    data: {
+      type: DataTypes.STRING,
+    }
+  }, {
+    tableName: 'report_square_details'
+  });
+
+  return ReportSquareDetail;
+};
index 9ae14a1..f507511 100644 (file)
@@ -1 +1,25 @@
-var _0x3428=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64","\x53\x54\x52\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x61\x6E\x73\x66\x65\x72","\x64\x65\x66\x69\x6E\x65"];module[_0x3428[0]]=function(_0x4e47x1,_0x4e47x2){var _0x4e47x3=_0x4e47x1[_0x3428[6]](_0x3428[1],{type:_0x4e47x2.ENUM(_0x3428[2],_0x3428[3]),transferercalleridnum:_0x4e47x2[_0x3428[4]],transferercalleridname:_0x4e47x2[_0x3428[4]],transfererconnectedlinenum:_0x4e47x2[_0x3428[4]],transfererconnectedlinename:_0x4e47x2[_0x3428[4]],transferercontext:_0x4e47x2[_0x3428[4]],transfererexten:_0x4e47x2[_0x3428[4]],transfereecontext:_0x4e47x2[_0x3428[4]],transfereeexten:_0x4e47x2[_0x3428[4]],transfereruniqueid:_0x4e47x2[_0x3428[4]],transfererlinkedid:_0x4e47x2[_0x3428[4]],extension:_0x4e47x2[_0x3428[4]]},{tableName:_0x3428[5]});return _0x4e47x3}
\ No newline at end of file
+/**
+ * Agent Log Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportTransfer = sequelize.define('ReportTransfer', {
+    type: DataTypes.ENUM('blind', 'attended'),
+    transferercalleridnum: DataTypes.STRING,
+    transferercalleridname: DataTypes.STRING,
+    transfererconnectedlinenum: DataTypes.STRING,
+    transfererconnectedlinename: DataTypes.STRING,
+    transferercontext: DataTypes.STRING,
+    transfererexten: DataTypes.STRING,
+    transfereecontext: DataTypes.STRING,
+    transfereeexten: DataTypes.STRING,
+    transfereruniqueid: DataTypes.STRING,
+    transfererlinkedid: DataTypes.STRING,
+    extension: DataTypes.STRING,
+  }, {
+    tableName: 'report_transfer'
+  });
+
+  return ReportTransfer;
+};
index 4e9d00d..2c14bfe 100644 (file)
@@ -1 +1,12 @@
-var _0x2e11=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x54\x45\x58\x54","\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x2e11[0];module[_0x2e11[1]]=function(_0xd827x1,_0xd827x2){var _0xd827x3=_0xd827x1[_0x2e11[5]](_0x2e11[2],{tree:_0xd827x2[_0x2e11[3]]},{tableName:_0x2e11[4]});return _0xd827x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportTree = sequelize.define('ReportTree', {
+    tree: DataTypes.TEXT
+  }, {
+    tableName: 'report_trees'
+  });
+
+  return ReportTree;
+};
index 31d5c19..0ea5fa6 100644 (file)
@@ -1 +1,33 @@
-var _0x86e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x6E\x61\x6D\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x86e6[0];module[_0x86e6[1]]=function(_0xa7c6x1,_0xa7c6x2){return _0xa7c6x1[_0x86e6[13]](_0x86e6[2],{name:_0xa7c6x2[_0x86e6[3]],description:_0xa7c6x2[_0x86e6[3]],username:{type:_0xa7c6x2[_0x86e6[3]],unique:true},remoteUri:_0xa7c6x2[_0x86e6[3]],password:_0xa7c6x2[_0x86e6[3]],clientId:_0xa7c6x2[_0x86e6[3]],clientSecret:_0xa7c6x2[_0x86e6[3]],securityToken:_0xa7c6x2[_0x86e6[3]]},{tableName:_0x86e6[4],associate:function(_0xa7c6x3){_0xa7c6x3[_0x86e6[2]][_0x86e6[7]](_0xa7c6x3.SalesforceConfiguration,{as:_0x86e6[5],foreignKey:_0x86e6[6]});_0xa7c6x3[_0x86e6[2]][_0x86e6[12]](_0x86e6[8],{include:[{model:_0xa7c6x3[_0x86e6[9]],as:_0x86e6[5],required:false,attributes:[_0x86e6[10],_0x86e6[11]]}]})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('SalesforceAccount', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    username: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    remoteUri: DataTypes.STRING,
+    password: DataTypes.STRING,
+    clientId: DataTypes.STRING,
+    clientSecret: DataTypes.STRING,
+    securityToken: DataTypes.STRING
+  }, {
+    tableName: 'salesforce_accounts',
+    associate: function(models) {
+      models.SalesforceAccount.hasMany(models.SalesforceConfiguration, {
+        as: 'Configurations',
+        foreignKey: 'AccountId'
+      });
+      models.SalesforceAccount.addScope('configurations', {
+        include: [{
+          model: models.SalesforceConfiguration,
+          as: 'Configurations',
+          required: false,
+          attributes: ['id', 'name']
+        }]
+      });
+    }
+  });
+};
index ec079f6..6850116 100644 (file)
@@ -1 +1,27 @@
-var _0xd29a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x53\x75\x62\x6A\x65\x63\x74","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x46\x69\x65\x6C\x64","\x46\x69\x65\x6C\x64\x49\x64","\x64\x65\x66\x69\x6E\x65"];_0xd29a[0];module[_0xd29a[1]]=function(_0xc455x1,_0xc455x2){return _0xc455x1[_0xd29a[14]](_0xd29a[2],{name:_0xc455x2[_0xd29a[3]],description:_0xc455x2[_0xd29a[3]]},{tableName:_0xd29a[4],associate:function(_0xc455x3){_0xc455x3[_0xd29a[2]][_0xd29a[6]](_0xc455x3.SalesforceAccount,{foreignKey:_0xd29a[5]});_0xc455x3[_0xd29a[2]][_0xd29a[9]](_0xc455x3.SalesforceField,{as:_0xd29a[7],foreignKey:_0xd29a[8]});_0xc455x3[_0xd29a[2]][_0xd29a[9]](_0xc455x3.SalesforceField,{as:_0xd29a[10],foreignKey:_0xd29a[11]});_0xc455x3[_0xd29a[2]][_0xd29a[9]](_0xc455x3.SalesforceField,{as:_0xd29a[12],foreignKey:_0xd29a[13]})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('SalesforceConfiguration', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'salesforce_configurations',
+    associate: function(models) {
+      models.SalesforceConfiguration.belongsTo(models.SalesforceAccount, {
+        foreignKey: 'AccountId'
+      });
+      models.SalesforceConfiguration.hasMany(models.SalesforceField, {
+        as: 'Subject',
+        foreignKey: 'SubjectId'
+      });
+      models.SalesforceConfiguration.hasMany(models.SalesforceField, {
+        as: 'Description',
+        foreignKey: 'DescriptionId'
+      });
+      models.SalesforceConfiguration.hasMany(models.SalesforceField, {
+        as: 'Field',
+        foreignKey: 'FieldId'
+      });
+    }
+  });
+};
index 2ff5c2f..f3a3501 100644 (file)
@@ -1 +1,22 @@
-var _0xbd7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x5F\x76\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0xbd7e[0];module[_0xbd7e[1]]=function(_0x8dcax1,_0x8dcax2){return _0x8dcax1[_0xbd7e[9]](_0xbd7e[2],{type:{type:_0x8dcax2.ENUM(_0xbd7e[3],_0xbd7e[4],_0xbd7e[5]),defaultValue:_0xbd7e[3]},content:_0x8dcax2[_0xbd7e[6]],key:_0x8dcax2[_0xbd7e[6]],keyType:{type:_0x8dcax2.ENUM(_0xbd7e[3],_0xbd7e[4])},keyContent:_0x8dcax2[_0xbd7e[6]],idField:_0x8dcax2[_0xbd7e[6]]},{tableName:_0xbd7e[7],associate:function(_0x8dcax3){_0x8dcax3[_0xbd7e[2]][_0xbd7e[8]](_0x8dcax3.Variable)}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('SalesforceField', {
+    type: {
+      type: DataTypes.ENUM('string', 'variable', 'key_value'),
+      defaultValue: 'string'
+    },
+    content: DataTypes.STRING,
+    key: DataTypes.STRING,
+    keyType: {
+      type: DataTypes.ENUM('string', 'variable')
+    },
+    keyContent: DataTypes.STRING,
+    idField: DataTypes.STRING
+  }, {
+    tableName: 'salesforce_fields',
+    associate: function(models) {
+      models.SalesforceField.belongsTo(models.Variable);
+    }
+  });
+};
index 2997fbb..a8efea2 100644 (file)
@@ -1 +1,42 @@
-var _0x69ea=["\x65\x78\x70\x6F\x72\x74\x73","\x53\x65\x72\x76\x69\x63\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x73\x65\x72\x76\x69\x63\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x53\x65\x72\x76\x69\x63\x65","\x73\x65\x72\x76\x69\x63\x65","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x61\x73\x63\x61\x64\x65","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];module[_0x69ea[0]]=function(_0x42d1x1,_0x42d1x2){var _0x42d1x3=_0x42d1x1[_0x69ea[15]](_0x69ea[1],{name:{type:_0x42d1x2[_0x69ea[2]],unique:true},description:{type:_0x42d1x2[_0x69ea[2]],allowNull:true},defaultEntry:{type:_0x42d1x2[_0x69ea[3]],defaultValue:false}},{tableName:_0x69ea[4],associate:function(_0x42d1x4){_0x42d1x3[_0x69ea[7]](_0x42d1x4.User,{through:_0x42d1x4[_0x69ea[5]],foreignKey:_0x69ea[6]});_0x42d1x3[_0x69ea[9]](_0x42d1x4.CustomField,{as:_0x69ea[8],required:false});_0x42d1x3[_0x69ea[9]](_0x42d1x4.Contact,{as:_0x69ea[10],onDelete:_0x69ea[11]});_0x42d1x3[_0x69ea[14]](_0x69ea[12],{include:[{model:_0x42d1x4[_0x69ea[13]],as:_0x69ea[8]}]})}});return _0x42d1x3}
\ No newline at end of file
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+  var Service = sequelize.define('Service', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    description: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    defaultEntry: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
+  }, {
+    tableName: 'services',
+    associate: function(models) {
+      Service.belongsToMany(models.User, {
+        through: models.UserHasService,
+        foreignKey: 'service'
+      });
+      Service.hasMany(models.CustomField, {
+        as: 'CustomFields',
+        required: false
+      });
+      Service.hasMany(models.Contact, {
+        as: 'Contacts',
+        onDelete: 'cascade'
+      });
+      Service.addScope('customFields', {
+        include: [{
+          model: models.CustomField,
+          as: 'CustomFields'
+        }]
+      });
+    }
+  });
+
+  return Service;
+};
index 2adb180..a7b7931 100644 (file)
@@ -1 +1,32 @@
-var _0x3911=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x65\x74\x74\x69\x6E\x67\x73","\x54\x45\x58\x54","\x53\x54\x52\x49\x4E\x47","\x73\x65\x74\x74\x69\x6E\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0x3911[0];module[_0x3911[1]]=function(_0xe9afx1,_0xe9afx2){var _0xe9afx3=_0xe9afx1[_0x3911[6]](_0x3911[2],{license:_0xe9afx2[_0x3911[3]],min_internal:{type:_0xe9afx2.INTEGER(11),unique:true,defaultValue:1000},min_mailbox:{type:_0xe9afx2.INTEGER(11),unique:true,defaultValue:1000},agi_port:{type:_0xe9afx2.INTEGER(11),defaultValue:4573},automation_timeout:{type:_0xe9afx2.INTEGER(11),defaultValue:3600},soundPath:_0xe9afx2[_0x3911[4]]},{tableName:_0x3911[5]});return _0xe9afx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Settings = sequelize.define('Settings', {
+    license: DataTypes.TEXT,
+    min_internal: {
+      type: DataTypes.INTEGER(11),
+      unique: true,
+      defaultValue: 1000
+    },
+    min_mailbox: {
+      type: DataTypes.INTEGER(11),
+      unique: true,
+      defaultValue: 1000
+    },
+    agi_port: {
+      type: DataTypes.INTEGER(11),
+      defaultValue: 4573
+    },
+    automation_timeout: {
+      type: DataTypes.INTEGER(11),
+      defaultValue: 3600
+    },
+    soundPath: DataTypes.STRING
+  }, {
+    tableName: 'settings'
+  });
+
+  return Settings;
+
+};
index 4b28905..3b5ab98 100644 (file)
@@ -1 +1,36 @@
-var _0x359b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6F\x75\x6E\x64","\x53\x54\x52\x49\x4E\x47","","\x54\x68\x65\x20\x6E\x61\x6D\x65\x20\x63\x61\x6E\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79\x21","\x46\x4C\x4F\x41\x54","\x42\x49\x47\x49\x4E\x54","\x49\x4E\x54\x45\x47\x45\x52","\x73\x6F\x75\x6E\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x359b[0];module[_0x359b[1]]=function(_0xcfc1x1,_0xcfc1x2){var _0xcfc1x3=_0xcfc1x1[_0x359b[10]](_0x359b[2],{name:_0xcfc1x2[_0x359b[3]],save_name:_0xcfc1x2[_0x359b[3]],display_name:{type:_0xcfc1x2[_0x359b[3]],allowNull:false,defaultValue:_0x359b[4],validate:{notEmpty:{msg:_0x359b[5]}}},description:_0xcfc1x2[_0x359b[3]],original_format:_0xcfc1x2[_0x359b[3]],original_duration:_0xcfc1x2[_0x359b[6]],original_sampleCount:_0xcfc1x2[_0x359b[7]],original_channelCount:_0xcfc1x2[_0x359b[8]],original_bitRate:_0xcfc1x2[_0x359b[7]],original_sampleRate:_0xcfc1x2[_0x359b[8]],converted_format:_0xcfc1x2[_0x359b[3]],converted_duration:_0xcfc1x2[_0x359b[6]],converted_sampleCount:_0xcfc1x2[_0x359b[7]],converted_channelCount:_0xcfc1x2[_0x359b[8]],converted_bitRate:_0xcfc1x2[_0x359b[7]],converted_sampleRate:_0xcfc1x2[_0x359b[8]]},{tableName:_0x359b[9]});return _0xcfc1x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+       var Sound = sequelize.define('Sound', {
+               name: DataTypes.STRING,
+               save_name: DataTypes.STRING,
+               display_name: {
+                       type: DataTypes.STRING,
+                       allowNull: false,
+                       defaultValue: '',
+                       validate: {
+                               notEmpty: {
+                                       msg: "The name cannot be empty!"
+                               } // don't allow empty strings
+                       }
+               },
+               description: DataTypes.STRING,
+               original_format: DataTypes.STRING,
+               original_duration: DataTypes.FLOAT,
+               original_sampleCount: DataTypes.BIGINT,
+               original_channelCount: DataTypes.INTEGER,
+               original_bitRate: DataTypes.BIGINT,
+               original_sampleRate: DataTypes.INTEGER,
+               converted_format: DataTypes.STRING,
+               converted_duration: DataTypes.FLOAT,
+               converted_sampleCount: DataTypes.BIGINT,
+               converted_channelCount: DataTypes.INTEGER,
+               converted_bitRate: DataTypes.BIGINT,
+               converted_sampleRate: DataTypes.INTEGER
+       }, {
+               tableName: 'sounds'
+       });
+
+       return Sound;
+};
index 7de8a43..a8a9bf8 100644 (file)
@@ -1 +1,24 @@
-var _0x985b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x53\x54\x52\x49\x4E\x47","\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63","\x64\x65\x66\x69\x6E\x65"];_0x985b[0];module[_0x985b[1]]=function(_0x39f5x1,_0x39f5x2){var _0x39f5x3=_0x39f5x1[_0x985b[5]](_0x985b[2],{name:{type:_0x39f5x2[_0x985b[3]],unique:true,allowNull:false,validate:{notEmpty:true}},dsn:{type:_0x39f5x2[_0x985b[3]]},description:_0x39f5x2[_0x985b[3]]},{tableName:_0x985b[4]});return _0x39f5x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var SquareOdbc = sequelize.define('SquareOdbc', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true
+      },
+    },
+    dsn: {
+      type: DataTypes.STRING,
+    },
+    description: DataTypes.STRING
+  }, {
+    tableName: 'square_odbc'
+  });
+
+  return SquareOdbc;
+
+};
index 2341388..e9f9ccd 100644 (file)
@@ -1 +1,29 @@
-var _0x8771=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x6C\x6F\x6E\x67","\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x8771[0];module[_0x8771[1]]=function(_0x3c78x1,_0x3c78x2){var _0x3c78x3=_0x3c78x1[_0x8771[7]](_0x8771[2],{name:{type:_0x3c78x2[_0x8771[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:_0x3c78x2[_0x8771[3]],preproduction:{type:_0x3c78x2[_0x8771[4]],length:_0x8771[5]},production:{type:_0x3c78x2[_0x8771[4]],length:_0x8771[5]}},{tableName:_0x8771[6]});return _0x3c78x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var SquareProject = sequelize.define('SquareProject', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true
+      }
+    },
+    description: DataTypes.STRING,
+    preproduction: {
+      type: DataTypes.TEXT,
+      length: 'long'
+    },
+    production: {
+      type: DataTypes.TEXT,
+      length: 'long'
+    }
+  }, {
+    tableName: 'square_projects',
+  });
+
+  return SquareProject;
+
+};
index fd94279..1130f64 100644 (file)
@@ -1 +1,29 @@
-var _0x2589=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x6E\x61\x6D\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x2589[0];module[_0x2589[1]]=function(_0x4507x1,_0x4507x2){return _0x4507x1[_0x2589[13]](_0x2589[2],{name:_0x4507x2[_0x2589[3]],description:_0x4507x2[_0x2589[3]],username:{type:_0x4507x2[_0x2589[3]]},remoteUri:_0x4507x2[_0x2589[3]],password:_0x4507x2[_0x2589[3]]},{tableName:_0x2589[4],associate:function(_0x4507x3){_0x4507x3[_0x2589[2]][_0x2589[7]](_0x4507x3.SugarcrmConfiguration,{as:_0x2589[5],foreignKey:_0x2589[6]});_0x4507x3[_0x2589[2]][_0x2589[12]](_0x2589[8],{include:[{model:_0x4507x3[_0x2589[9]],as:_0x2589[5],required:false,attributes:[_0x2589[10],_0x2589[11]]}]})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('SugarcrmAccount', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    username: {
+      type: DataTypes.STRING
+    },
+    remoteUri: DataTypes.STRING,
+    password: DataTypes.STRING
+  }, {
+    tableName: 'sugarcrm_accounts',
+    associate: function(models) {
+      models.SugarcrmAccount.hasMany(models.SugarcrmConfiguration, {
+        as: 'Configurations',
+        foreignKey: 'AccountId'
+      });
+      models.SugarcrmAccount.addScope('configurations', {
+        include: [{
+          model: models.SugarcrmConfiguration,
+          as: 'Configurations',
+          required: false,
+          attributes: ['id', 'name']
+        }]
+      });
+    }
+  });
+};
index 2895316..cae512a 100644 (file)
@@ -1 +1,27 @@
-var _0x87dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x53\x75\x62\x6A\x65\x63\x74","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x46\x69\x65\x6C\x64","\x46\x69\x65\x6C\x64\x49\x64","\x64\x65\x66\x69\x6E\x65"];_0x87dc[0];module[_0x87dc[1]]=function(_0x67bax1,_0x67bax2){return _0x67bax1[_0x87dc[14]](_0x87dc[2],{name:_0x67bax2[_0x87dc[3]],description:_0x67bax2[_0x87dc[3]]},{tableName:_0x87dc[4],associate:function(_0x67bax3){_0x67bax3[_0x87dc[2]][_0x87dc[6]](_0x67bax3.SugarcrmAccount,{foreignKey:_0x87dc[5]});_0x67bax3[_0x87dc[2]][_0x87dc[9]](_0x67bax3.SugarcrmField,{as:_0x87dc[7],foreignKey:_0x87dc[8]});_0x67bax3[_0x87dc[2]][_0x87dc[9]](_0x67bax3.SugarcrmField,{as:_0x87dc[10],foreignKey:_0x87dc[11]});_0x67bax3[_0x87dc[2]][_0x87dc[9]](_0x67bax3.SugarcrmField,{as:_0x87dc[12],foreignKey:_0x87dc[13]})}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('SugarcrmConfiguration', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'sugarcrm_configurations',
+    associate: function(models) {
+      models.SugarcrmConfiguration.belongsTo(models.SugarcrmAccount, {
+        foreignKey: 'AccountId'
+      });
+      models.SugarcrmConfiguration.hasMany(models.SugarcrmField, {
+        as: 'Subject',
+        foreignKey: 'SubjectId'
+      });
+      models.SugarcrmConfiguration.hasMany(models.SugarcrmField, {
+        as: 'Description',
+        foreignKey: 'DescriptionId'
+      });
+      models.SugarcrmConfiguration.hasMany(models.SugarcrmField, {
+        as: 'Field',
+        foreignKey: 'FieldId'
+      });
+    }
+  });
+};
index eb697cd..7998058 100644 (file)
@@ -1 +1,22 @@
-var _0xccd1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x5F\x76\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0xccd1[0];module[_0xccd1[1]]=function(_0x6481x1,_0x6481x2){return _0x6481x1[_0xccd1[9]](_0xccd1[2],{type:{type:_0x6481x2.ENUM(_0xccd1[3],_0xccd1[4],_0xccd1[5]),defaultValue:_0xccd1[3]},content:_0x6481x2[_0xccd1[6]],key:_0x6481x2[_0xccd1[6]],keyType:{type:_0x6481x2.ENUM(_0xccd1[3],_0xccd1[4])},keyContent:_0x6481x2[_0xccd1[6]],idField:_0x6481x2[_0xccd1[6]]},{tableName:_0xccd1[7],associate:function(_0x6481x3){_0x6481x3[_0xccd1[2]][_0xccd1[8]](_0x6481x3.Variable)}})}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+  return sequelize.define('SugarcrmField', {
+    type: {
+      type: DataTypes.ENUM('string', 'variable', 'key_value'),
+      defaultValue: 'string'
+    },
+    content: DataTypes.STRING,
+    key: DataTypes.STRING,
+    keyType: {
+      type: DataTypes.ENUM('string', 'variable')
+    },
+    keyContent: DataTypes.STRING,
+    idField: DataTypes.STRING
+  }, {
+    tableName: 'sugarcrm_fields',
+    associate: function(models) {
+      models.SugarcrmField.belongsTo(models.Variable);
+    }
+  });
+};
index 2ef33ea..ff7b5ca 100644 (file)
@@ -1 +1,35 @@
-var _0xd8d7=["\x65\x78\x70\x6F\x72\x74\x73","\x54\x61\x67","\x53\x54\x52\x49\x4E\x47","\x74\x61\x67\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];module[_0xd8d7[0]]=function(_0x9f5cx1,_0x9f5cx2){var _0x9f5cx3=_0x9f5cx1[_0xd8d7[8]](_0xd8d7[1],{name:{type:_0x9f5cx2[_0xd8d7[2]],unique:true,allowNull:false,validate:{notEmpty:true}},description:_0x9f5cx2[_0xd8d7[2]]},{tableName:_0xd8d7[3],associate:function(_0x9f5cx4){_0x9f5cx3[_0xd8d7[5]](_0x9f5cx4.ZendeskConfiguration,{through:_0xd8d7[4]});_0x9f5cx3[_0xd8d7[7]](_0xd8d7[6],{include:[{all:true}]})}});return _0x9f5cx3}
\ No newline at end of file
+/**
+ * tag Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Tag = sequelize.define('Tag', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true,
+      }
+    },
+    description: DataTypes.STRING
+  }, {
+    tableName: 'tags',
+    associate: function(models) {
+      Tag.belongsToMany(models.ZendeskConfiguration, {
+        through: 'zendesk_configuration_has_tags'
+      });
+      Tag.addScope('configuration', {
+        include: [{
+          all: true
+        }]
+      });
+      // Tag.belongsToMany(models.Contact, {
+      //   through: 'contact_tags'
+      // });
+    }
+  });
+
+  return Tag;
+};
index a5655d7..e2d6f73 100644 (file)
@@ -1 +1,42 @@
-var _0x719c=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x54\x65\x61\x6D","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x74\x65\x61\x6D\x73","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x61\x75\x6C\x74","\x55\x73\x65\x72","\x61\x67\x65\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x719c[0]);module[_0x719c[1]]=function(_0xcc04x2,_0xcc04x3){var _0xcc04x4=_0xcc04x2[_0x719c[17]](_0x719c[2],{name:{type:_0xcc04x3[_0x719c[3]],allowNull:false,unique:true},description:{type:_0xcc04x3[_0x719c[3]]},defaultEntry:{type:_0xcc04x3[_0x719c[4]],defaultValue:0}},{tableName:_0x719c[5],associate:function(_0xcc04x5){_0xcc04x4[_0x719c[7]](_0xcc04x5.User,{through:_0xcc04x5[_0x719c[6]]});_0xcc04x4[_0x719c[16]](_0x719c[8],{include:[{model:_0xcc04x5[_0x719c[9]],where:{role:_0x719c[10]},required:false,attributes:[_0x719c[11],_0x719c[12],_0x719c[13],_0x719c[14],_0x719c[15]]}]})}});return _0xcc04x4}
\ No newline at end of file
+/**
+ * User Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Team = sequelize.define('Team', {
+    name: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      unique: true
+    },
+    description: {
+      type: DataTypes.STRING
+    },
+    defaultEntry: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: 0
+    }
+  }, {
+    tableName: 'teams',
+    associate: function(models) {
+      Team.belongsToMany(models.User, {
+        through: models.UserHasTeam
+      });
+      Team.addScope('default', {
+        include: [{
+          model: models.User,
+          where: {
+            role: 'agent'
+          },
+          required: false,
+          attributes: ['id', 'name', 'fullname', 'email', 'internal']
+        }]
+      });
+    }
+  });
+
+  return Team;
+};
index 3497287..105d888 100644 (file)
@@ -1 +1,507 @@
-var _0x74b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x6D\x64\x35","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x73\x61\x6C\x74","\x6D\x61\x6B\x65\x53\x61\x6C\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x65\x6E\x63\x72\x79\x70\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x6D\x64\x35\x73\x65\x63\x72\x65\x74","\x3A\x61\x73\x74\x65\x72\x69\x73\x6B\x3A","\x6D\x64\x35\x50\x61\x73\x73\x77\x6F\x72\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x79\x6E\x61\x6D\x69\x63","\x66\x72\x69\x65\x6E\x64","\x75\x73\x65\x72","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x75\x64\x70","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x65\x6E","\x61\x6C\x6C","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x73\x65\x72\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x62\x61\x73\x65\x36\x34","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","","\x70\x62\x6B\x64\x66\x32\x53\x79\x6E\x63","\x64\x65\x66\x69\x6E\x65"];_0x74b0[0];var crypto=require(_0x74b0[1]);var md5=require(_0x74b0[2]);var _=require(_0x74b0[3]);module[_0x74b0[4]]=function(_0x5917x4,_0x5917x5){var _0x5917x6=_0x5917x4[_0x74b0[60]](_0x74b0[5],{name:{type:_0x5917x5[_0x74b0[6]],unique:true,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i},set:function(_0x5917x7){this[_0x74b0[8]](_0x74b0[7],_0x5917x7);this[_0x74b0[8]](_0x74b0[9],_0x5917x7)}},password:{type:_0x5917x5[_0x74b0[6]],allowNull:false,validate:{notEmpty:true},set:function(_0x5917x8){this[_0x74b0[10]]=this[_0x74b0[11]]();this[_0x74b0[8]](_0x74b0[12],this[_0x74b0[13]](_0x5917x8));this[_0x74b0[8]](_0x74b0[14],this[_0x74b0[16]](this[_0x74b0[7]]+_0x74b0[15]+_0x5917x8))}},internal:{type:_0x5917x5.INTEGER(11),unique:true,set:function(_0x5917x9){this[_0x74b0[8]](_0x74b0[17],_0x5917x9);this[_0x74b0[8]](_0x74b0[18],_0x5917x9)}},ipaddr:{type:_0x5917x5[_0x74b0[6]],allowNull:true},port:{type:_0x5917x5.INTEGER(5),allowNull:true},regseconds:{type:_0x5917x5.INTEGER(11),allowNull:true},defaultuser:{type:_0x5917x5[_0x74b0[6]],allowNull:true},fullcontact:{type:_0x5917x5[_0x74b0[6]],allowNull:true},regserver:{type:_0x5917x5[_0x74b0[6]],allowNull:true},useragent:{type:_0x5917x5[_0x74b0[6]],allowNull:true},lastms:{type:_0x5917x5.INTEGER(11),allowNull:true},host:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[19]},type:{type:_0x5917x5.ENUM(_0x74b0[20],_0x74b0[21],_0x74b0[22]),allowNull:true,defaultValue:_0x74b0[20]},context:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[23]},permit:{type:_0x5917x5[_0x74b0[6]],allowNull:true},deny:{type:_0x5917x5[_0x74b0[6]],allowNull:true},secret:{type:_0x5917x5[_0x74b0[6]],allowNull:true},md5secret:{type:_0x5917x5[_0x74b0[6]],allowNull:true},remotesecret:{type:_0x5917x5[_0x74b0[6]],allowNull:true},transport:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[24]},dtmfmode:{type:_0x5917x5.ENUM(_0x74b0[25],_0x74b0[26],_0x74b0[27],_0x74b0[28],_0x74b0[29]),allowNull:true,defaultValue:_0x74b0[25]},directmedia:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31],_0x74b0[32],_0x74b0[33]),allowNull:true,defaultValue:_0x74b0[31]},nat:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[34]},callgroup:{type:_0x5917x5[_0x74b0[6]],allowNull:true},pickupgroup:{type:_0x5917x5[_0x74b0[6]],allowNull:true},language:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[35]},disallow:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[36]},allow:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[37]},insecure:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[38]},trustrpid:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true,defaultValue:_0x74b0[31]},progressinband:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31],_0x74b0[39]),allowNull:true},promiscredir:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},useclientcode:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},accountcode:{type:_0x5917x5.INTEGER(11),allowNull:true},setvar:{type:_0x5917x5[_0x74b0[6]],allowNull:true},callerid:{type:_0x5917x5[_0x74b0[6]],allowNull:true,defaultValue:_0x74b0[40]},amaflags:{type:_0x5917x5[_0x74b0[6]],allowNull:true},callcounter:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true,defaultValue:_0x74b0[30]},busylevel:{type:_0x5917x5.INTEGER(11),allowNull:true},allowoverlap:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},allowsubscribe:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},videosupport:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},maxcallbitrate:{type:_0x5917x5.INTEGER(11),allowNull:true},rfc2833compensate:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},mailbox:{type:_0x5917x5[_0x74b0[6]],allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x74\x69\x6D\x65\x72\x73":{type:_0x5917x5.ENUM(_0x74b0[41],_0x74b0[42],_0x74b0[43]),allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x65\x78\x70\x69\x72\x65\x73":{type:_0x5917x5.INTEGER(11),allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x6D\x69\x6E\x73\x65":{type:_0x5917x5.INTEGER(11),allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x72\x65\x66\x72\x65\x73\x68\x65\x72":{type:_0x5917x5.ENUM(_0x74b0[44],_0x74b0[45]),allowNull:true},t38pt_usertpsource:{type:_0x5917x5[_0x74b0[6]],allowNull:true},regexten:{type:_0x5917x5[_0x74b0[6]],allowNull:true},fromdomain:{type:_0x5917x5[_0x74b0[6]],allowNull:true},fromuser:{type:_0x5917x5[_0x74b0[6]],allowNull:true},qualify:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true,defaultValue:_0x74b0[30]},defaultip:{type:_0x5917x5[_0x74b0[6]],allowNull:true},rtptimeout:{type:_0x5917x5.INTEGER(11),allowNull:true},rtpholdtimeout:{type:_0x5917x5.INTEGER(11),allowNull:true},sendrpid:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true,defaultValue:_0x74b0[31]},outboundproxy:{type:_0x5917x5[_0x74b0[6]],allowNull:true},callbackextension:{type:_0x5917x5[_0x74b0[6]],allowNull:true},timert1:{type:_0x5917x5.INTEGER(11),allowNull:true},timerb:{type:_0x5917x5.INTEGER(11),allowNull:true},qualifyfreq:{type:_0x5917x5.INTEGER(11),allowNull:true},constantssrc:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},contactpermit:{type:_0x5917x5[_0x74b0[6]],allowNull:true},contactdeny:{type:_0x5917x5[_0x74b0[6]],allowNull:true},usereqphone:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true,defaultValue:_0x74b0[31]},textsupport:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},faxdetect:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},buggymwi:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},auth:{type:_0x5917x5[_0x74b0[6]],allowNull:true},fullname:{type:_0x5917x5[_0x74b0[6]],allowNull:true},trunkname:{type:_0x5917x5[_0x74b0[6]],allowNull:true},cid_number:{type:_0x5917x5[_0x74b0[6]],allowNull:true},callingpres:{type:_0x5917x5.ENUM(_0x74b0[46],_0x74b0[47],_0x74b0[48],_0x74b0[49],_0x74b0[50],_0x74b0[51],_0x74b0[52],_0x74b0[53]),allowNull:true},mohinterpret:{type:_0x5917x5[_0x74b0[6]],allowNull:true},mohsuggest:{type:_0x5917x5[_0x74b0[6]],allowNull:true},parkinglot:{type:_0x5917x5[_0x74b0[6]],allowNull:true},hasvoicemail:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},subscribemwi:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},vmexten:{type:_0x5917x5[_0x74b0[6]],allowNull:true},description:{type:_0x5917x5[_0x74b0[6]],allowNull:true},autoframing:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},limitonpeers:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true,defaultValue:_0x74b0[30]},rtpkeepalive:{type:_0x5917x5.INTEGER(11),allowNull:true},"\x63\x61\x6C\x6C\x2D\x6C\x69\x6D\x69\x74":{type:_0x5917x5.INTEGER(11),allowNull:true,defaultValue:null},g726nonstandard:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},ignoresdpversion:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},allowtransfer:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},dynamic:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true},encryption:{type:_0x5917x5.ENUM(_0x74b0[30],_0x74b0[31]),allowNull:true,defaultValue:_0x74b0[31]},registry:{type:_0x5917x5[_0x74b0[6]],allowNull:true}},{tableName:_0x74b0[54],defaultScope:{where:{role:_0x74b0[55]}},instanceMethods:{authenticate:function(_0x5917xa){return this[_0x74b0[13]](_0x5917xa)===this[_0x74b0[12]]},makeSalt:function(){return crypto[_0x74b0[57]](16).toString(_0x74b0[56])},encryptPassword:function(_0x5917x8){if(!_0x5917x8||!this[_0x74b0[10]]){return _0x74b0[58]};var _0x5917xb= new Buffer(this[_0x74b0[10]],_0x74b0[56]);return crypto[_0x74b0[59]](_0x5917x8,_0x5917xb,10000,64).toString(_0x74b0[56])},md5Password:function(_0x5917x8){if(!_0x5917x8){return _0x74b0[58]};return md5(_0x5917x8)}},associate:function(_0x5917xc){}});return _0x5917x6}
\ No newline at end of file
+'use strict';
+
+var crypto = require('crypto');
+var md5 = require('md5');
+var _ = require('lodash');
+
+module.exports = function(sequelize, DataTypes) {
+  var Telephone = sequelize.define('Telephone', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      validate: {
+        notEmpty: true,
+        is: /^[A-Za-z0-9\.\_]+$/i
+      },
+      set: function(name) {
+        this.setDataValue('name', name);
+        this.setDataValue('defaultuser', name);
+      }
+    },
+    password: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      validate: {
+        notEmpty: true
+      },
+      set: function(password) {
+        this.salt = this.makeSalt();
+        this.setDataValue('password', this.encryptPassword(password));
+        this.setDataValue('md5secret', this.md5Password(this.name + ':asterisk:' + password));
+      }
+    },
+    internal: {
+      type: DataTypes.INTEGER(11),
+      unique: true,
+      set: function(internal) {
+        this.setDataValue('internal', internal);
+        this.setDataValue('accountcode', internal);
+      }
+    },
+    ipaddr: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    port: {
+      type: DataTypes.INTEGER(5),
+      allowNull: true,
+    },
+    regseconds: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    defaultuser: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fullcontact: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    regserver: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    useragent: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    lastms: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    host: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'dynamic'
+    },
+    type: {
+      type: DataTypes.ENUM('friend', 'user', 'peer'),
+      allowNull: true,
+      defaultValue: 'friend'
+    },
+    context: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'from-sip'
+    },
+    permit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    deny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    secret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    md5secret: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    remotesecret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    transport: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'udp'
+    },
+    dtmfmode: {
+      type: DataTypes.ENUM('rfc2833', 'info', 'shortinfo', 'inband',
+        'auto'),
+      allowNull: true,
+      defaultValue: 'rfc2833'
+    },
+    directmedia: {
+      type: DataTypes.ENUM('yes', 'no', 'nonat', 'update'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    nat: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'force_rport,comedia'
+    },
+    callgroup: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    pickupgroup: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    language: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'en'
+    },
+    disallow: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'all'
+    },
+    allow: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'alaw;ulaw;gsm'
+    },
+    insecure: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'port,invite'
+    },
+    trustrpid: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    progressinband: {
+      type: DataTypes.ENUM('yes', 'no', 'never'),
+      allowNull: true,
+    },
+    promiscredir: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    useclientcode: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    accountcode: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    setvar: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callerid: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: '"" <>'
+    },
+    amaflags: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callcounter: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    busylevel: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    allowoverlap: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    allowsubscribe: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    videosupport: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    maxcallbitrate: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rfc2833compensate: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    mailbox: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    "session-timers": {
+      type: DataTypes.ENUM('accept', 'refuse', 'originate'),
+      allowNull: true,
+    },
+    "session-expires": {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    "session-minse": {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    "session-refresher": {
+      type: DataTypes.ENUM('uac', 'uas'),
+      allowNull: true,
+    },
+    t38pt_usertpsource: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    regexten: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fromdomain: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fromuser: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    qualify: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    defaultip: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    rtptimeout: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rtpholdtimeout: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    sendrpid: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    outboundproxy: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callbackextension: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    timert1: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    timerb: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    qualifyfreq: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    constantssrc: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    contactpermit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    contactdeny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    usereqphone: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    textsupport: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    faxdetect: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    buggymwi: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    auth: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fullname: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    trunkname: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    cid_number: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callingpres: {
+      type: DataTypes.ENUM('ALLOWED_NOT_SCREENED',
+        'ALLOWED_PASSED_SCREEN', 'ALLOWED_FAILED_SCREEN', 'ALLOWED',
+        'PROHIB_NOT_SCREENED', 'PROHIB_PASSED_SCREEN',
+        'PROHIB_FAILED_SCREEN', 'PROHIB'),
+      allowNull: true,
+    },
+    mohinterpret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    mohsuggest: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    parkinglot: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    hasvoicemail: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    subscribemwi: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    vmexten: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    description: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    autoframing: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    limitonpeers: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    rtpkeepalive: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    "call-limit": {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: null
+    },
+    g726nonstandard: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    ignoresdpversion: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    allowtransfer: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    dynamic: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    encryption: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    registry: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    }
+  }, {
+    tableName: 'users',
+    defaultScope: {
+      where: {
+        role: 'telephone'
+      }
+    },
+    instanceMethods: {
+      /**
+       * Authenticate - check if the passwords are the same
+       *
+       * @param {String} plainText
+       *        {function} callBack
+       * @api public
+       */
+      authenticate: function(plainText) {
+        return this.encryptPassword(plainText) === this.password;
+      },
+      /**
+       * Make salt
+       *
+       * @return {String}
+       * @api public
+       */
+      makeSalt: function() {
+        return crypto.randomBytes(16).toString('base64');
+      },
+      /**
+       * Encrypt password
+       *
+       * @param {String} password
+       * @return {String}
+       * @api public
+       */
+      encryptPassword: function(password) {
+        if (!password || !this.salt) return '';
+        var salt = new Buffer(this.salt, 'base64');
+        return crypto.pbkdf2Sync(password, salt, 10000, 64).toString(
+          'base64');
+      },
+      /**
+       * md5 password
+       *
+       * @param {String} password
+       * @return {String}
+       * @api public
+       */
+      md5Password: function(password) {
+        if (!password) return '';
+        return md5(password);
+      }
+    },
+    associate: function(models) {
+      // BELOGNS TO MANY
+      // Telephone.hasMany(models.ChatMessage);
+      // Telephone.hasMany(models.Contact);
+      // Telephone.belongsToMany(models.Module, {
+      //   through: 'user_has_modules'
+      // });
+      // Telephone.belongsToMany(models.Channel, {
+      //   through: 'user_has_channels'
+      // });
+      // Telephone.belongsToMany(models.Team, {
+      //   through: models.UserHasTeam
+      // });
+      // Telephone.belongsToMany(models.ChatRoom, {
+      //   through: models.UserHasChatRoom
+      // });
+      // Telephone.belongsToMany(models.MailQueue, {
+      //   through: models.UserHasMailQueue
+      // });
+      // Telephone.belongsToMany(models.ChatQueue, {
+      //   through: models.UserHasChatQueue
+      // });
+      // Telephone.belongsToMany(models.VoiceQueue, {
+      //   through: models.UserHasVoiceQueue
+      // });
+      // Telephone.hasMany(models.VoiceExtension, {
+      //   foreignKey: 'UserId',
+      //   as: 'UserExtensions',
+      //   onDelete: 'cascade'
+      // });
+    }
+  });
+
+  return Telephone;
+}
index b203144..9097c07 100644 (file)
@@ -1 +1,32 @@
-var _0x13bc=["\x65\x78\x70\x6F\x72\x74\x73","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x74\x6F\x6F\x6C\x73\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];module[_0x13bc[0]]=function(_0xfa61x1,_0xfa61x2){var _0xfa61x3=_0xfa61x1[_0x13bc[4]](_0x13bc[1],{action:{type:_0xfa61x2[_0x13bc[2]]},data1:{type:_0xfa61x2[_0x13bc[2]]},data2:{type:_0xfa61x2[_0x13bc[2]]},data3:{type:_0xfa61x2[_0x13bc[2]]},data4:{type:_0xfa61x2[_0x13bc[2]]},data5:{type:_0xfa61x2[_0x13bc[2]]}},{tableName:_0x13bc[3],associate:function(_0xfa61x4){}});return _0xfa61x3}
\ No newline at end of file
+/**
+ * Tools Actions Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ToolsAction = sequelize.define('ToolsAction', {
+    action: {
+      type: DataTypes.STRING
+    },
+    data1: {
+      type: DataTypes.STRING
+    },
+    data2: {
+      type: DataTypes.STRING
+    },
+    data3: {
+      type: DataTypes.STRING
+    },
+    data4: {
+      type: DataTypes.STRING
+    },
+    data5: {
+      type: DataTypes.STRING
+    }
+  }, {
+    tableName: 'tools_actions',
+    associate: function(models) {}
+  });
+
+  return ToolsAction;
+};
index 172c9a1..cb0b603 100644 (file)
@@ -1 +1,18 @@
-var _0xc3d4=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x74\x6F\x6F\x6C\x73\x5F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xc3d4[0]);module[_0xc3d4[1]]=function(_0xcd0bx2,_0xcd0bx3){var _0xcd0bx4=_0xcd0bx2[_0xc3d4[5]](_0xc3d4[2],{field:_0xcd0bx3[_0xc3d4[3]],operator:_0xcd0bx3[_0xc3d4[3]],value:_0xcd0bx3[_0xc3d4[3]]},{tableName:_0xc3d4[4]});return _0xcd0bx4}
\ No newline at end of file
+/**
+ * Tools Conditions Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ToolsCondition = sequelize.define('ToolsCondition', {
+    field: DataTypes.STRING,
+    operator: DataTypes.STRING,
+    value: DataTypes.STRING
+  }, {
+    tableName: 'tools_conditions'
+  });
+
+  return ToolsCondition;
+};
index 7bddec9..2953319 100644 (file)
@@ -1 +1,60 @@
-var _0x7ecd=["\x65\x78\x70\x6F\x72\x74\x73","\x54\x72\x69\x67\x67\x65\x72","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x74\x72\x69\x67\x67\x65\x72\x73","\x41\x6C\x6C","\x4F\x6E\x65\x41\x6C\x6C","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x41\x6E\x79","\x4F\x6E\x65\x41\x6E\x79","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x41\x63\x74\x69\x6F\x6E\x73","\x61\x6C\x6C","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x76\x61\x6C\x75\x65","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x61\x63\x74\x69\x6F\x6E","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x64\x61\x74\x61\x35","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];module[_0x7ecd[0]]=function(_0x5898x1,_0x5898x2){var _0x5898x3=_0x5898x1[_0x7ecd[27]](_0x7ecd[1],{name:_0x5898x2[_0x7ecd[2]],channel:_0x5898x2[_0x7ecd[2]],description:_0x5898x2[_0x7ecd[2]],status:{type:_0x5898x2[_0x7ecd[3]],defaultValue:false}},{tableName:_0x7ecd[4],associate:function(_0x5898x4){_0x5898x3[_0x7ecd[9]](_0x5898x4.ToolsCondition,{as:{plural:_0x7ecd[5],singular:_0x7ecd[6]},foreignKey:_0x7ecd[7],onDelete:_0x7ecd[8],hooks:true});_0x5898x3[_0x7ecd[9]](_0x5898x4.ToolsCondition,{as:{plural:_0x7ecd[10],singular:_0x7ecd[11]},foreignKey:_0x7ecd[12],onDelete:_0x7ecd[8],hooks:true});_0x5898x3[_0x7ecd[9]](_0x5898x4.ToolsAction,{as:_0x7ecd[13],onDelete:_0x7ecd[8],hooks:true});_0x5898x3[_0x7ecd[26]](_0x7ecd[14],{include:[{model:_0x5898x4[_0x7ecd[15]],as:_0x7ecd[5],attributes:[_0x7ecd[16],_0x7ecd[17],_0x7ecd[18]]},{model:_0x5898x4[_0x7ecd[15]],as:_0x7ecd[10],attributes:[_0x7ecd[16],_0x7ecd[17],_0x7ecd[18]]},{model:_0x5898x4[_0x7ecd[19]],as:_0x7ecd[13],attributes:[_0x7ecd[20],_0x7ecd[21],_0x7ecd[22],_0x7ecd[23],_0x7ecd[24],_0x7ecd[25]]}]})}});return _0x5898x3}
\ No newline at end of file
+/**
+ * Trigger Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Trigger = sequelize.define('Trigger', {
+    name: DataTypes.STRING,
+    channel: DataTypes.STRING,
+    description: DataTypes.STRING,
+    status: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
+  }, {
+    tableName: 'triggers',
+    associate: function(models) {
+      Trigger.hasMany(models.ToolsCondition, {
+        as: {
+          plural: 'All',
+          singular: 'OneAll'
+        },
+        foreignKey: 'TriggerAllId',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      Trigger.hasMany(models.ToolsCondition, {
+        as: {
+          plural: 'Any',
+          singular: 'OneAny'
+        },
+        foreignKey: 'TriggerAnyId',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      Trigger.hasMany(models.ToolsAction, {
+        as: 'Actions',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      Trigger.addScope('all', {
+        include: [{
+          model: models.ToolsCondition,
+          as: 'All',
+          attributes: ['field', 'operator', 'value']
+        }, {
+          model: models.ToolsCondition,
+          as: 'Any',
+          attributes: ['field', 'operator', 'value']
+        }, {
+          model: models.ToolsAction,
+          as: 'Actions',
+          attributes: ['action', 'data1', 'data2', 'data3', 'data4', 'data5']
+        }]
+      });
+    }
+  });
+
+  return Trigger;
+};
index 8f21b73..e9ff649 100644 (file)
@@ -1 +1,458 @@
-var _0x64ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x6D\x64\x35","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x54\x72\x75\x6E\x6B","\x53\x54\x52\x49\x4E\x47","\x66\x72\x69\x65\x6E\x64","\x75\x73\x65\x72","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x64\x70","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x65\x6E","\x61\x6C\x6C","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x6C\x77\x61\x79\x73","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x64\x79\x6E\x61\x6D\x69\x63","\x66\x69\x6E\x67\x65\x72\x70\x72\x69\x6E\x74","\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65","\x61\x63\x74\x69\x76\x65","\x70\x61\x73\x73\x69\x76\x65","\x61\x63\x74\x70\x61\x73\x73","\x75\x70\x64\x61\x74\x65\x2C\x6E\x6F\x6E\x61\x74","\x74\x72\x75\x6E\x6B\x73","\x64\x65\x66\x69\x6E\x65"];_0x64ab[0];var crypto=require(_0x64ab[1]);var md5=require(_0x64ab[2]);var _=require(_0x64ab[3]);module[_0x64ab[4]]=function(_0x1991x4,_0x1991x5){var _0x1991x6=_0x1991x4[_0x64ab[51]](_0x64ab[5],{name:{type:_0x1991x5[_0x64ab[6]],primaryKey:true},type:{type:_0x1991x5.ENUM(_0x64ab[7],_0x64ab[8],_0x64ab[9]),allowNull:true,defaultValue:_0x64ab[7]},context:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[10]},callingpres:{type:_0x1991x5.ENUM(_0x64ab[11],_0x64ab[12],_0x64ab[13],_0x64ab[14],_0x64ab[15],_0x64ab[16],_0x64ab[17],_0x64ab[18]),allowNull:true},permit:{type:_0x1991x5[_0x64ab[6]],allowNull:true},deny:{type:_0x1991x5[_0x64ab[6]],allowNull:true},secret:{type:_0x1991x5[_0x64ab[6]],allowNull:true},md5secret:{type:_0x1991x5[_0x64ab[6]],allowNull:true},remotesecret:{type:_0x1991x5[_0x64ab[6]],allowNull:true},transport:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[19]},dtmfmode:{type:_0x1991x5.ENUM(_0x64ab[20],_0x64ab[21],_0x64ab[22],_0x64ab[23],_0x64ab[24]),allowNull:true,defaultValue:_0x64ab[20]},directmedia:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26],_0x64ab[27],_0x64ab[28],_0x64ab[29]),allowNull:true,defaultValue:_0x64ab[26]},directrtpsetup:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[26]},directmediapermit:{type:_0x1991x5[_0x64ab[6]],allowNull:true},directmediadeny:{type:_0x1991x5[_0x64ab[6]],allowNull:true},nat:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[30]},callgroup:{type:_0x1991x5[_0x64ab[6]],allowNull:true},namedcallgroup:{type:_0x1991x5[_0x64ab[6]],allowNull:true},pickupgroup:{type:_0x1991x5[_0x64ab[6]],allowNull:true},namedpickupgroup:{type:_0x1991x5[_0x64ab[6]],allowNull:true},language:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[31]},tonezone:{type:_0x1991x5[_0x64ab[6]],allowNull:true},disallow:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[32]},allow:{type:_0x1991x5[_0x64ab[6]],allowNull:false,defaultValue:_0x64ab[33]},autoframing:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},insecure:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[34]},trustrpid:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[26]},trust_id_outbound:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[26]},progressinband:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26],_0x64ab[35]),allowNull:true},promiscredir:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},useclientcode:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},accountcode:{type:_0x1991x5.INTEGER(11),allowNull:true},setvar:{type:_0x1991x5[_0x64ab[6]],allowNull:true},callerid:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[36]},amaflags:{type:_0x1991x5[_0x64ab[6]],allowNull:true},callcounter:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[25]},busylevel:{type:_0x1991x5.INTEGER(11),allowNull:true},allowoverlap:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},allowsubscribe:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},allowtransfer:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},ignoresdpversion:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},subscribecontext:{type:_0x1991x5[_0x64ab[6]],allowNull:true},template:{type:_0x1991x5[_0x64ab[6]],allowNull:true},videosupport:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26],_0x64ab[37]),allowNull:true,defaultValue:_0x64ab[26]},maxcallbitrate:{type:_0x1991x5.INTEGER(11),allowNull:true},rfc2833compensate:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},mailbox:{type:_0x1991x5[_0x64ab[6]],allowNull:true},session_timers:{type:_0x1991x5.ENUM(_0x64ab[38],_0x64ab[39],_0x64ab[40]),allowNull:true},session_expires:{type:_0x1991x5.INTEGER(11),allowNull:true},session_minse:{type:_0x1991x5.INTEGER(11),allowNull:true},session_refresher:{type:_0x1991x5.ENUM(_0x64ab[41],_0x64ab[42]),allowNull:true,defaultValue:_0x64ab[42]},t38pt_usertpsource:{type:_0x1991x5[_0x64ab[6]],allowNull:true},regexten:{type:_0x1991x5[_0x64ab[6]],allowNull:true},fromdomain:{type:_0x1991x5[_0x64ab[6]],allowNull:true},fromuser:{type:_0x1991x5[_0x64ab[6]],allowNull:true},host:{type:_0x1991x5[_0x64ab[6]],allowNull:true,defaultValue:_0x64ab[43]},port:{type:_0x1991x5.INTEGER(5),allowNull:true},qualify:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[25]},keepalive:{type:_0x1991x5.INTEGER(11),allowNull:true},defaultip:{type:_0x1991x5[_0x64ab[6]],allowNull:true},defaultuser:{type:_0x1991x5[_0x64ab[6]],allowNull:true},rtptimeout:{type:_0x1991x5.INTEGER(11),allowNull:true},rtpholdtimeout:{type:_0x1991x5.INTEGER(11),allowNull:true},rtpkeepalive:{type:_0x1991x5.INTEGER(11),allowNull:true},sendrpid:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[26]},outboundproxy:{type:_0x1991x5[_0x64ab[6]],allowNull:true},callbackextension:{type:_0x1991x5[_0x64ab[6]],allowNull:true},timert1:{type:_0x1991x5.INTEGER(11),allowNull:true},timerb:{type:_0x1991x5.INTEGER(11),allowNull:true},qualifyfreq:{type:_0x1991x5.INTEGER(11),allowNull:true},contactpermit:{type:_0x1991x5[_0x64ab[6]],allowNull:true},contactdeny:{type:_0x1991x5[_0x64ab[6]],allowNull:true},contactacl:{type:_0x1991x5[_0x64ab[6]],allowNull:true},unsolicited_mailbox:{type:_0x1991x5[_0x64ab[6]],allowNull:true},use_q850_reason:{type:_0x1991x5[_0x64ab[6]],allowNull:true},maxforwards:{type:_0x1991x5.INTEGER(11),allowNull:true},encryption:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[26]},avpf:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},force_avp:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},icesupport:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},dtlsenable:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},dtlsverify:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26],_0x64ab[44],_0x64ab[45]),allowNull:true},dtlsrekey:{type:_0x1991x5.INTEGER(11),allowNull:true},dtlscertfile:{type:_0x1991x5[_0x64ab[6]],allowNull:true},dtlsprivatekey:{type:_0x1991x5[_0x64ab[6]],allowNull:true},dtlscipher:{type:_0x1991x5[_0x64ab[6]],allowNull:true},dtlscafile:{type:_0x1991x5[_0x64ab[6]],allowNull:true},dtlscapath:{type:_0x1991x5[_0x64ab[6]],allowNull:true},dtlssetup:{type:_0x1991x5.ENUM(_0x64ab[46],_0x64ab[47],_0x64ab[48]),allowNull:true},dtlsfingerprint:{type:_0x1991x5[_0x64ab[6]],allowNull:true},usereqphone:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true,defaultValue:_0x64ab[26]},recordonfeature:{type:_0x1991x5[_0x64ab[6]],allowNull:true},recordofffeature:{type:_0x1991x5[_0x64ab[6]],allowNull:true},call_limit:{type:_0x1991x5.INTEGER(11),allowNull:true,defaultValue:null},registertrying:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},subscribemwi:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26]),allowNull:true},vmexten:{type:_0x1991x5[_0x64ab[6]],allowNull:true},mohinterpret:{type:_0x1991x5[_0x64ab[6]],allowNull:true},mohsuggest:{type:_0x1991x5[_0x64ab[6]],allowNull:true},parkinglot:{type:_0x1991x5[_0x64ab[6]],allowNull:true},description:{type:_0x1991x5[_0x64ab[6]],allowNull:true},canreinvite:{type:_0x1991x5.ENUM(_0x64ab[25],_0x64ab[26],_0x64ab[27],_0x64ab[28],_0x64ab[49]),allowNull:true,defaultValue:_0x64ab[26]},registry:{type:_0x1991x5[_0x64ab[6]],allowNull:true},otherFields:{type:_0x1991x5[_0x64ab[6]],allowNull:true}},{tableName:_0x64ab[50]});return _0x1991x6}
\ No newline at end of file
+'use strict';
+
+var crypto = require('crypto');
+var md5 = require('md5');
+var _ = require('lodash');
+
+module.exports = function(sequelize, DataTypes) {
+  var Trunk = sequelize.define('Trunk', {
+    name: {
+      type: DataTypes.STRING,
+      primaryKey: true
+    },
+    type: {
+      type: DataTypes.ENUM('friend', 'user', 'peer'),
+      allowNull: true,
+      defaultValue: 'friend'
+    },
+    context: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'from-sip'
+    },
+    callingpres: {
+      type: DataTypes.ENUM('ALLOWED_NOT_SCREENED',
+        'ALLOWED_PASSED_SCREEN', 'ALLOWED_FAILED_SCREEN', 'ALLOWED',
+        'PROHIB_NOT_SCREENED', 'PROHIB_PASSED_SCREEN',
+        'PROHIB_FAILED_SCREEN', 'PROHIB'),
+      allowNull: true,
+    },
+    permit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    deny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    secret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    md5secret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    remotesecret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    transport: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'udp'
+    },
+    dtmfmode: {
+      type: DataTypes.ENUM('rfc2833', 'info', 'shortinfo', 'inband',
+        'auto'),
+      allowNull: true,
+      defaultValue: 'rfc2833'
+    },
+    directmedia: {
+      type: DataTypes.ENUM('yes', 'no', 'nonat', 'update', 'outgoing'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    directrtpsetup: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    directmediapermit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    directmediadeny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    nat: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'force_rport,comedia'
+    },
+    callgroup: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    namedcallgroup: { //We are in named call groups engineering,sales,netgroup,protgroup
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    pickupgroup: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    namedpickupgroup: { //We can do call pick-p for named call group sales
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    language: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'en'
+    },
+    tonezone: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    disallow: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'all'
+    },
+    allow: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      defaultValue: 'alaw;ulaw;gsm'
+    },
+    autoframing: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    insecure: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'port,invite'
+    },
+    trustrpid: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    trust_id_outbound: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    progressinband: {
+      type: DataTypes.ENUM('yes', 'no', 'never'),
+      allowNull: true,
+    },
+    promiscredir: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    useclientcode: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    accountcode: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    setvar: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callerid: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: '"" <>'
+    },
+    amaflags: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callcounter: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    busylevel: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    allowoverlap: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    allowsubscribe: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    allowtransfer: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    ignoresdpversion: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    subscribecontext: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    template: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    videosupport: {
+      type: DataTypes.ENUM('yes', 'no', 'always'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    maxcallbitrate: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rfc2833compensate: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    mailbox: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    session_timers: {
+      type: DataTypes.ENUM('accept', 'refuse', 'originate'),
+      allowNull: true,
+    },
+    session_expires: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    session_minse: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    session_refresher: {
+      type: DataTypes.ENUM('uac', 'uas'),
+      allowNull: true,
+      defaultValue: 'uas'
+    },
+    t38pt_usertpsource: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    regexten: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fromdomain: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fromuser: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    host: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'dynamic'
+    },
+    port: {
+      type: DataTypes.INTEGER(5),
+      allowNull: true,
+    },
+    qualify: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    keepalive: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    defaultip: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    defaultuser: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    rtptimeout: { // Terminate call if 60 seconds of no RTP or RTCP activity on the audio channel  when we're not on hold.
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rtpholdtimeout: { // Terminate call if 300 seconds of no RTP or RTCP activity on the audio channel when we're on hold (must be > rtptimeout)
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rtpkeepalive: { // Send keepalives in the RTP stream to keep NAT open (default is off - zero)
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    sendrpid: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    outboundproxy: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callbackextension: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    timert1: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    timerb: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    qualifyfreq: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    contactpermit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    contactdeny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    contactacl: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    unsolicited_mailbox: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    use_q850_reason: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    maxforwards: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    encryption: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    avpf: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    force_avp: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    icesupport: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    dtlsenable: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    dtlsverify: {
+      type: DataTypes.ENUM('yes', 'no', 'fingerprint', 'certificate'),
+      allowNull: true
+    },
+    dtlsrekey: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    dtlscertfile: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlsprivatekey: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlscipher: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlscafile: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlscapath: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlssetup: {
+      type: DataTypes.ENUM('active', 'passive', 'actpass'),
+      allowNull: true
+    },
+    dtlsfingerprint: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    usereqphone: { //This provider requires ";user=phone" on URI
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    recordonfeature: { //Feature to use when INFO with Record: on is received.
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    recordofffeature: { //Feature to use when INFO with Record: off is received.
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    call_limit: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: null
+    },
+    registertrying: { //Send a 100 Trying when the device registers.
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    subscribemwi: { //Only send notifications if this phone subscribes for mailbox notification
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    vmexten: { // dialplan extension to reach mailbox. defaults to global vmexten which defaults to "asterisk"
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    mohinterpret: { // This option specifies a preference for which music on hold class this channel should listen to when put on hold
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    mohsuggest: { //  This option specifies which music on hold class to suggest to the peer channel when this channel places the peer on hold.
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    parkinglot: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    description: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    canreinvite: {
+      type: DataTypes.ENUM('yes', 'no', 'nonat', 'update', 'update,nonat'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    registry: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    otherFields: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    }
+  }, {
+    tableName: 'trunks'
+  });
+
+  return Trunk;
+}
index e82015a..47b64dd 100644 (file)
@@ -1 +1,917 @@
-var _0xd038=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x6D\x64\x35","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x65\x6D\x61\x69\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x73\x61\x6C\x74","\x6D\x61\x6B\x65\x53\x61\x6C\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x65\x6E\x63\x72\x79\x70\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x6D\x64\x35\x73\x65\x63\x72\x65\x74","\x3A\x61\x73\x74\x65\x72\x69\x73\x6B\x3A","\x6D\x64\x35\x50\x61\x73\x73\x77\x6F\x72\x64","\x6C\x6F\x63\x61\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x55\x4E\x4B\x4E\x4F\x57\x4E","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x70\x61\x75\x73\x65\x64","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x44\x65\x66\x61\x75\x6C\x74\x20\x50\x61\x75\x73\x65","\x49\x4E\x54\x45\x47\x45\x52","\x70\x68\x6F\x6E\x65\x42\x61\x72\x55\x6E\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x61\x6C","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x70\x68\x6F\x6E\x65\x42\x61\x72\x55\x6E\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x61\x6C\x4E\x75\x6D\x62\x65\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x4E\x6F\x52\x65\x70\x6C\x79","\x70\x68\x6F\x6E\x65\x42\x61\x72\x4E\x6F\x52\x65\x70\x6C\x79\x4E\x75\x6D\x62\x65\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x42\x75\x73\x79","\x70\x68\x6F\x6E\x65\x42\x61\x72\x42\x75\x73\x79\x4E\x75\x6D\x62\x65\x72","\x66\x72\x69\x65\x6E\x64","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x64\x70","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x65\x6E","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x6C\x77\x61\x79\x73","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x64\x79\x6E\x61\x6D\x69\x63","\x66\x69\x6E\x67\x65\x72\x70\x72\x69\x6E\x74","\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65","\x61\x63\x74\x69\x76\x65","\x70\x61\x73\x73\x69\x76\x65","\x61\x63\x74\x70\x61\x73\x73","\x75\x70\x64\x61\x74\x65\x2C\x6E\x6F\x6E\x61\x74","\x75\x73\x65\x72\x73","\x62\x61\x73\x65\x36\x34","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","","\x70\x62\x6B\x64\x66\x32\x53\x79\x6E\x63","\x68\x61\x73\x4D\x61\x6E\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x6F\x64\x75\x6C\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x65\x72\x76\x69\x63\x65","\x55\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x63\x61\x73\x63\x61\x64\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x71\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x77\x68\x65\x72\x65","\x74\x72\x75\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x69\x64","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x68\x6F\x73\x74","\x6E\x61\x74","\x74\x79\x70\x65","\x61\x6C\x6C\x6F\x77","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x70\x68\x6F\x6E\x65\x42\x61\x72\x41\x75\x74\x6F\x41\x6E\x73\x77\x65\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x45\x6E\x61\x62\x6C\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x63\x68\x61\x6E\x73\x70\x79","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x73\x74\x61\x74\x75\x73\x41\x74","\x6C\x61\x73\x74\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x61\x67\x65\x6E\x74","\x69\x70\x61\x64\x64\x72","\x66\x75\x6C\x6C\x63\x6F\x6E\x74\x61\x63\x74","\x70\x6F\x72\x74","\x6C\x61\x73\x74\x6D\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x66\x69\x6E\x65"];_0xd038[0];var crypto=require(_0xd038[1]);var md5=require(_0xd038[2]);var _=require(_0xd038[3]);var moment=require(_0xd038[4]);var VoiceQueue=require(_0xd038[6])[_0xd038[5]];module[_0xd038[7]]=function(_0xa001x6,_0xa001x7){var _0xa001x8=_0xa001x6[_0xd038[149]](_0xd038[8],{name:{type:_0xa001x7[_0xd038[9]],unique:true,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i},set:function(_0xa001x9){this[_0xd038[11]](_0xd038[10],_0xa001x9);this[_0xd038[11]](_0xd038[12],_0xa001x9)}},fullname:{type:_0xa001x7[_0xd038[9]],allowNull:false},email:{type:_0xa001x7[_0xd038[9]],unique:true,set:function(_0xa001xa){if(_0xa001xa){this[_0xd038[11]](_0xd038[13],_0xa001xa[_0xd038[14]]())}},defaultValue:null},role:{type:_0xa001x7.ENUM(_0xd038[15],_0xd038[16],_0xd038[17],_0xd038[18])},password:{type:_0xa001x7[_0xd038[9]],allowNull:false,validate:{notEmpty:true},set:function(_0xa001xb){this[_0xd038[19]]=this[_0xd038[20]]();this[_0xd038[11]](_0xd038[21],this[_0xd038[22]](_0xa001xb));this[_0xd038[11]](_0xd038[23],this[_0xd038[25]](this[_0xd038[10]]+_0xd038[24]+_0xa001xb))}},provider:{type:_0xa001x7[_0xd038[9]],defaultValue:_0xd038[26]},internal:{type:_0xa001x7.INTEGER(11),unique:true,set:function(_0xa001xc){this[_0xd038[11]](_0xd038[27],_0xa001xc);this[_0xd038[11]](_0xd038[28],_0xa001xc)}},salt:{type:_0xa001x7[_0xd038[9]]},phone:{type:_0xa001x7[_0xd038[9]]},mobile:{type:_0xa001x7[_0xd038[9]]},address:{type:_0xa001x7[_0xd038[9]]},zipcode:{type:_0xa001x7[_0xd038[9]]},userpic:{type:_0xa001x7[_0xd038[9]]},city:{type:_0xa001x7[_0xd038[9]]},country:{type:_0xa001x7[_0xd038[9]]},online:{type:_0xa001x7[_0xd038[29]],defaultValue:false},lastLoginAt:{type:_0xa001x7[_0xd038[30]]},status:{type:_0xa001x7[_0xd038[9]],defaultValue:_0xd038[31]},statusAt:{type:_0xa001x7[_0xd038[30]]},queueStatus:{type:_0xa001x7[_0xd038[9]],defaultValue:_0xd038[32]},queueStatusAt:{type:_0xa001x7[_0xd038[30]]},lastQueue:{type:_0xa001x7[_0xd038[9]]},voicePause:{type:_0xa001x7[_0xd038[29]],defaultValue:false,set:function(_0xa001xd){this[_0xd038[11]](_0xd038[33],_0xa001xd);if(_0xa001xd){this[_0xd038[11]](_0xd038[34],_0xd038[35]);this[_0xd038[11]](_0xd038[36],moment()[_0xd038[38]](_0xd038[37]))}else {this[_0xd038[11]](_0xd038[34],_0xd038[32]);this[_0xd038[11]](_0xd038[36],moment()[_0xd038[38]](_0xd038[37]))}}},chatPause:{type:_0xa001x7[_0xd038[29]],defaultValue:false},mailPause:{type:_0xa001x7[_0xd038[29]],defaultValue:false},faxPause:{type:_0xa001x7[_0xd038[29]],defaultValue:false},pauseType:{type:_0xa001x7[_0xd038[9]],defaultValue:_0xd038[39]},lastPauseAt:{type:_0xa001x7[_0xd038[30]]},chatCapacity:{type:_0xa001x7[_0xd038[40]],defaultValue:0},mailCapacity:{type:_0xa001x7[_0xd038[40]],defaultValue:0},faxCapacity:{type:_0xa001x7[_0xd038[40]],defaultValue:0},phoneBarAutoAnswer:{type:_0xa001x7[_0xd038[29]],defaultValue:false},phoneBarEnableSettings:{type:_0xa001x7[_0xd038[29]],defaultValue:false},phoneBarUnconditionalNumber:{type:_0xa001x7[_0xd038[9]],get:function(){if(this[_0xd038[42]](_0xd038[41])){return this[_0xd038[42]](_0xd038[43])};return null}},phoneBarNoReplyNumber:{type:_0xa001x7[_0xd038[9]],get:function(){if(this[_0xd038[42]](_0xd038[44])){return this[_0xd038[42]](_0xd038[45])};return null}},phoneBarBusyNumber:{type:_0xa001x7[_0xd038[9]],get:function(){if(this[_0xd038[42]](_0xd038[46])){return this[_0xd038[42]](_0xd038[47])};return null}},phoneBarUnconditional:{type:_0xa001x7[_0xd038[29]],defaultValue:false},phoneBarNoReply:{type:_0xa001x7[_0xd038[29]],defaultValue:false},phoneBarBusy:{type:_0xa001x7[_0xd038[29]],defaultValue:false},phoneBarPort:{type:_0xa001x7.INTEGER(5),allowNull:true},chanspy:{type:_0xa001x7[_0xd038[29]],defaultValue:false},description:{type:_0xa001x7[_0xd038[9]],allowNull:true},ipaddr:{type:_0xa001x7[_0xd038[9]],allowNull:true},port:{type:_0xa001x7.INTEGER(5),allowNull:true},regseconds:{type:_0xa001x7.INTEGER(11),allowNull:true},fullcontact:{type:_0xa001x7[_0xd038[9]],allowNull:true},regserver:{type:_0xa001x7[_0xd038[9]],allowNull:true},useragent:{type:_0xa001x7[_0xd038[9]],allowNull:true},lastms:{type:_0xa001x7.INTEGER(11),allowNull:true},type:{type:_0xa001x7.ENUM(_0xd038[48],_0xd038[16],_0xd038[49]),allowNull:true,defaultValue:_0xd038[48]},context:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[50]},callingpres:{type:_0xa001x7.ENUM(_0xd038[51],_0xd038[52],_0xd038[53],_0xd038[54],_0xd038[55],_0xd038[56],_0xd038[57],_0xd038[58]),allowNull:true},permit:{type:_0xa001x7[_0xd038[9]],allowNull:true},deny:{type:_0xa001x7[_0xd038[9]],allowNull:true},secret:{type:_0xa001x7[_0xd038[9]],allowNull:true},md5secret:{type:_0xa001x7[_0xd038[9]],allowNull:true},remotesecret:{type:_0xa001x7[_0xd038[9]],allowNull:true},transport:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[59]},dtmfmode:{type:_0xa001x7.ENUM(_0xd038[60],_0xd038[61],_0xd038[62],_0xd038[63],_0xd038[64]),allowNull:true,defaultValue:_0xd038[60]},directmedia:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66],_0xd038[67],_0xd038[68],_0xd038[69]),allowNull:true,defaultValue:_0xd038[66]},directrtpsetup:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[66]},directmediapermit:{type:_0xa001x7[_0xd038[9]],allowNull:true},directmediadeny:{type:_0xa001x7[_0xd038[9]],allowNull:true},nat:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[70]},callgroup:{type:_0xa001x7[_0xd038[9]],allowNull:true},namedcallgroup:{type:_0xa001x7[_0xd038[9]],allowNull:true},pickupgroup:{type:_0xa001x7[_0xd038[9]],allowNull:true},namedpickupgroup:{type:_0xa001x7[_0xd038[9]],allowNull:true},language:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[71]},tonezone:{type:_0xa001x7[_0xd038[9]],allowNull:true},allow:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[72]},disallow:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:null},autoframing:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},insecure:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[73]},trustrpid:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[66]},trust_id_outbound:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[66]},progressinband:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66],_0xd038[74]),allowNull:true},promiscredir:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},useclientcode:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},accountcode:{type:_0xa001x7.INTEGER(11),allowNull:true},setvar:{type:_0xa001x7[_0xd038[9]],allowNull:true},callerid:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[75]},amaflags:{type:_0xa001x7[_0xd038[9]],allowNull:true},callcounter:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[65]},busylevel:{type:_0xa001x7.INTEGER(11),allowNull:true},allowoverlap:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},allowsubscribe:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},allowtransfer:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},ignoresdpversion:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},subscribecontext:{type:_0xa001x7[_0xd038[9]],allowNull:true},template:{type:_0xa001x7[_0xd038[9]],allowNull:true},videosupport:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66],_0xd038[76]),allowNull:true,defaultValue:_0xd038[66]},maxcallbitrate:{type:_0xa001x7.INTEGER(11),allowNull:true},rfc2833compensate:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},mailbox:{type:_0xa001x7[_0xd038[9]],allowNull:true},session_timers:{type:_0xa001x7.ENUM(_0xd038[77],_0xd038[78],_0xd038[79]),allowNull:true},session_expires:{type:_0xa001x7.INTEGER(11),allowNull:true},session_minse:{type:_0xa001x7.INTEGER(11),allowNull:true},session_refresher:{type:_0xa001x7.ENUM(_0xd038[80],_0xd038[81]),allowNull:true,defaultValue:_0xd038[81]},t38pt_usertpsource:{type:_0xa001x7[_0xd038[9]],allowNull:true},regexten:{type:_0xa001x7[_0xd038[9]],allowNull:true},fromdomain:{type:_0xa001x7[_0xd038[9]],allowNull:true},fromuser:{type:_0xa001x7[_0xd038[9]],allowNull:true},host:{type:_0xa001x7[_0xd038[9]],allowNull:true,defaultValue:_0xd038[82]},qualify:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[65]},keepalive:{type:_0xa001x7.INTEGER(11),allowNull:true},defaultip:{type:_0xa001x7[_0xd038[9]],allowNull:true},defaultuser:{type:_0xa001x7[_0xd038[9]],allowNull:true},rtptimeout:{type:_0xa001x7.INTEGER(11),allowNull:true},rtpholdtimeout:{type:_0xa001x7.INTEGER(11),allowNull:true},rtpkeepalive:{type:_0xa001x7.INTEGER(11),allowNull:true},sendrpid:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[66]},outboundproxy:{type:_0xa001x7[_0xd038[9]],allowNull:true},callbackextension:{type:_0xa001x7[_0xd038[9]],allowNull:true},timert1:{type:_0xa001x7.INTEGER(11),allowNull:true},timerb:{type:_0xa001x7.INTEGER(11),allowNull:true},qualifyfreq:{type:_0xa001x7.INTEGER(11),allowNull:true},contactpermit:{type:_0xa001x7[_0xd038[9]],allowNull:true},contactdeny:{type:_0xa001x7[_0xd038[9]],allowNull:true},contactacl:{type:_0xa001x7[_0xd038[9]],allowNull:true},unsolicited_mailbox:{type:_0xa001x7[_0xd038[9]],allowNull:true},use_q850_reason:{type:_0xa001x7[_0xd038[9]],allowNull:true},maxforwards:{type:_0xa001x7.INTEGER(11),allowNull:true},encryption:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[66]},avpf:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},force_avp:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},icesupport:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},dtlsenable:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},dtlsverify:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66],_0xd038[83],_0xd038[84]),allowNull:true},dtlsrekey:{type:_0xa001x7.INTEGER(11),allowNull:true},dtlscertfile:{type:_0xa001x7[_0xd038[9]],allowNull:true},dtlsprivatekey:{type:_0xa001x7[_0xd038[9]],allowNull:true},dtlscipher:{type:_0xa001x7[_0xd038[9]],allowNull:true},dtlscafile:{type:_0xa001x7[_0xd038[9]],allowNull:true},dtlscapath:{type:_0xa001x7[_0xd038[9]],allowNull:true},dtlssetup:{type:_0xa001x7.ENUM(_0xd038[85],_0xd038[86],_0xd038[87]),allowNull:true},dtlsfingerprint:{type:_0xa001x7[_0xd038[9]],allowNull:true},usereqphone:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true,defaultValue:_0xd038[66]},recordonfeature:{type:_0xa001x7[_0xd038[9]],allowNull:true},recordofffeature:{type:_0xa001x7[_0xd038[9]],allowNull:true},call_limit:{type:_0xa001x7.INTEGER(11),allowNull:true,defaultValue:null},registertrying:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},subscribemwi:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66]),allowNull:true},vmexten:{type:_0xa001x7[_0xd038[9]],allowNull:true},mohinterpret:{type:_0xa001x7[_0xd038[9]],allowNull:true},mohsuggest:{type:_0xa001x7[_0xd038[9]],allowNull:true},parkinglot:{type:_0xa001x7[_0xd038[9]],allowNull:true},canreinvite:{type:_0xa001x7.ENUM(_0xd038[65],_0xd038[66],_0xd038[67],_0xd038[68],_0xd038[88]),allowNull:true,defaultValue:_0xd038[66]}},{tableName:_0xd038[89],instanceMethods:{authenticate:function(_0xa001xe){return this[_0xd038[22]](_0xa001xe)===this[_0xd038[21]]},makeSalt:function(){return crypto[_0xd038[91]](16).toString(_0xd038[90])},encryptPassword:function(_0xa001xb){if(!_0xa001xb||!this[_0xd038[19]]){return _0xd038[92]};var _0xa001xf= new Buffer(this[_0xd038[19]],_0xd038[90]);return crypto[_0xd038[93]](_0xa001xb,_0xa001xf,10000,64).toString(_0xd038[90])},md5Password:function(_0xa001xb){if(!_0xa001xb){return _0xd038[92]};return md5(_0xa001xb)}},associate:function(_0xa001x10){_0xa001x8[_0xd038[94]](_0xa001x10.ChatMessage);_0xa001x8[_0xd038[94]](_0xa001x10.MailMessage);_0xa001x8[_0xd038[94]](_0xa001x10.Contact);_0xa001x8[_0xd038[94]](_0xa001x10.Action);_0xa001x8[_0xd038[96]](_0xa001x10.Module,{through:_0xd038[95]});_0xa001x8[_0xd038[96]](_0xa001x10.Channel,{through:_0xd038[97]});_0xa001x8[_0xd038[96]](_0xa001x10.MailRoom,{through:_0xd038[98]});_0xa001x8[_0xd038[96]](_0xa001x10.Team,{through:_0xa001x10[_0xd038[99]]});_0xa001x8[_0xd038[96]](_0xa001x10.ChatRoom,{through:_0xa001x10[_0xd038[100]]});_0xa001x8[_0xd038[96]](_0xa001x10.MailQueue,{through:_0xa001x10[_0xd038[101]],required:false});_0xa001x8[_0xd038[96]](_0xa001x10.FaxQueue,{through:_0xa001x10[_0xd038[102]],required:false});_0xa001x8[_0xd038[96]](_0xa001x10.ChatQueue,{through:_0xa001x10[_0xd038[103]],required:false});_0xa001x8[_0xd038[96]](_0xa001x10.VoiceQueue,{through:_0xa001x10[_0xd038[104]],required:false});_0xa001x8[_0xd038[96]](_0xa001x10.Service,{through:_0xa001x10[_0xd038[105]]});_0xa001x8[_0xd038[94]](_0xa001x10.VoiceExtension,{foreignKey:_0xd038[106],as:_0xd038[107],onDelete:_0xd038[108],hooks:true});_0xa001x8[_0xd038[109]](_0xd038[16],{where:{role:{$in:[_0xd038[15],_0xd038[16]]}}});_0xa001x8[_0xd038[109]](_0xd038[110],{include:[_0xa001x10[_0xd038[5]],_0xa001x10[_0xd038[111]],_0xa001x10[_0xd038[112]],_0xa001x10[_0xd038[113]]]});_0xa001x8[_0xd038[109]](_0xd038[18],{where:{role:_0xd038[18]}});_0xa001x8[_0xd038[109]](_0xd038[114],function(_0xa001x11){var _0xa001x12={where:{}};if(_0xa001x11[_0xd038[33]]){_0xa001x12[_0xd038[115]][_0xd038[33]]=(_0xa001x11[_0xd038[33]]===_0xd038[116])?true:false;delete _0xa001x11[_0xd038[33]]}else {if(_0xa001x11[_0xd038[117]]){_0xa001x12[_0xd038[115]][_0xd038[117]]=(_0xa001x11[_0xd038[117]]===_0xd038[116])?true:false;delete _0xa001x11[_0xd038[117]]}else {if(_0xa001x11[_0xd038[118]]){_0xa001x12[_0xd038[115]][_0xd038[118]]=(_0xa001x11[_0xd038[118]]===_0xd038[116])?true:false;delete _0xa001x11[_0xd038[118]]}else {if(_0xa001x11[_0xd038[119]]){_0xa001x12[_0xd038[115]][_0xd038[119]]=(_0xa001x11[_0xd038[119]]===_0xd038[116])?true:false;delete _0xa001x11[_0xd038[119]]}}}};return _0xa001x12});_0xa001x8[_0xd038[109]](_0xd038[120],function(_0xa001x11){var _0xa001x12={where:{}};if(_0xa001x11[_0xd038[121]]){_0xa001x12[_0xd038[115]][_0xd038[121]]=(_0xa001x11[_0xd038[121]]===_0xd038[116])?true:false;delete _0xa001x11[_0xd038[121]]};return _0xa001x12});_0xa001x8[_0xd038[109]](_0xd038[122],function(_0xa001x11){var _0xa001x12={where:{}};if(_0xa001x11[_0xd038[123]]){_0xa001x12[_0xd038[115]][_0xd038[123]]=_0xa001x11[_0xd038[123]];delete _0xa001x11[_0xd038[123]]};return _0xa001x12});_0xa001x8[_0xd038[109]](_0xd038[124],function(_0xa001x11){var _0xa001x12={where:{}};if(_0xa001x11[_0xd038[34]]){_0xa001x12[_0xd038[115]][_0xd038[34]]=_0xa001x11[_0xd038[34]];delete _0xa001x11[_0xd038[34]]};return _0xa001x12});_0xa001x8[_0xd038[109]](_0xd038[17],{where:{role:_0xd038[17]},attributes:[_0xd038[125],_0xd038[10],_0xd038[13],_0xd038[27],_0xd038[126],_0xd038[28],_0xd038[127],_0xd038[128],_0xd038[129],_0xd038[130],_0xd038[131],_0xd038[132],_0xd038[133],_0xd038[134],_0xd038[121],_0xd038[135],_0xd038[136],_0xd038[137],_0xd038[41],_0xd038[44],_0xd038[46],_0xd038[43],_0xd038[45],_0xd038[47],_0xd038[138],_0xd038[33],_0xd038[119],_0xd038[117],_0xd038[118],_0xd038[139],_0xd038[140],_0xd038[123],_0xd038[141],_0xd038[34],_0xd038[36],_0xd038[142],_0xd038[143],_0xd038[144],_0xd038[145],_0xd038[146],_0xd038[147],_0xd038[148]]})}});return _0xa001x8}
\ No newline at end of file
+'use strict';
+
+var crypto = require('crypto');
+var md5 = require('md5');
+var _ = require('lodash');
+var moment = require('moment');
+var VoiceQueue = require('.').VoiceQueue;
+
+module.exports = function(sequelize, DataTypes) {
+  var User = sequelize.define('User', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      validate: {
+        notEmpty: true,
+        is: /^[A-Za-z0-9\.\_]+$/i
+      },
+      set: function(name) {
+        this.setDataValue('name', name);
+        this.setDataValue('defaultuser', name);
+      }
+    },
+    fullname: {
+      type: DataTypes.STRING,
+      allowNull: false,
+    },
+    email: {
+      type: DataTypes.STRING,
+      unique: true,
+      isEmail: true,
+      set: function(email) {
+        if (email) {
+          this.setDataValue('email', email.toLowerCase());
+        }
+      },
+      defaultValue: null
+    },
+    role: {
+      type: DataTypes.ENUM('admin', 'user', 'agent', 'telephone')
+    },
+    password: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      validate: {
+        notEmpty: true
+      },
+      set: function(password) {
+        this.salt = this.makeSalt();
+        this.setDataValue('password', this.encryptPassword(password));
+        this.setDataValue('md5secret', this.md5Password(this.name + ':asterisk:' + password));
+      }
+    },
+    provider: {
+      type: DataTypes.STRING,
+      defaultValue: 'local'
+    },
+    internal: {
+      type: DataTypes.INTEGER(11),
+      unique: true,
+      set: function(internal) {
+        this.setDataValue('internal', internal);
+        this.setDataValue('accountcode', internal);
+      }
+    },
+    salt: {
+      type: DataTypes.STRING
+    },
+    phone: {
+      type: DataTypes.STRING
+    },
+    mobile: {
+      type: DataTypes.STRING
+    },
+    address: {
+      type: DataTypes.STRING
+    },
+    zipcode: {
+      type: DataTypes.STRING
+    },
+    userpic: {
+      type: DataTypes.STRING
+    },
+    city: {
+      type: DataTypes.STRING
+    },
+    country: {
+      type: DataTypes.STRING
+    },
+    online: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    lastLoginAt: {
+      type: DataTypes.DATE
+    },
+    status: {
+      type: DataTypes.STRING,
+      defaultValue: 'UNKNOWN'
+    },
+    statusAt: {
+      type: DataTypes.DATE
+    },
+    queueStatus: {
+      type: DataTypes.STRING,
+      defaultValue: 'complete'
+    },
+    queueStatusAt: {
+      type: DataTypes.DATE
+    },
+    lastQueue: {
+      type: DataTypes.STRING
+    },
+    voicePause: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false,
+      set: function(voicePause) {
+        this.setDataValue('voicePause', voicePause);
+        if (voicePause) {
+          this.setDataValue('queueStatus', 'paused');
+          this.setDataValue('queueStatusAt', moment().format("YYYY-MM-DD HH:mm:ss"));
+        } else {
+          this.setDataValue('queueStatus', 'complete');
+          this.setDataValue('queueStatusAt', moment().format("YYYY-MM-DD HH:mm:ss"));
+        }
+      }
+    },
+    chatPause: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    mailPause: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    faxPause: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    pauseType: {
+      type: DataTypes.STRING,
+      defaultValue: 'Default Pause'
+    },
+    lastPauseAt: {
+      type: DataTypes.DATE
+    },
+    chatCapacity: {
+      type: DataTypes.INTEGER,
+      defaultValue: 0
+    },
+    mailCapacity: {
+      type: DataTypes.INTEGER,
+      defaultValue: 0
+    },
+    faxCapacity: {
+      type: DataTypes.INTEGER,
+      defaultValue: 0
+    },
+    phoneBarAutoAnswer: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    phoneBarEnableSettings: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    phoneBarUnconditionalNumber: {
+      type: DataTypes.STRING,
+      get: function() {
+        if (this.getDataValue('phoneBarUnconditional')) {
+          return this.getDataValue('phoneBarUnconditionalNumber');
+        }
+        return null;
+      }
+    },
+    phoneBarNoReplyNumber: {
+      type: DataTypes.STRING,
+      get: function() {
+        if (this.getDataValue('phoneBarNoReply')) {
+          return this.getDataValue('phoneBarNoReplyNumber');
+        }
+        return null;
+      }
+    },
+    phoneBarBusyNumber: {
+      type: DataTypes.STRING,
+      get: function() {
+        if (this.getDataValue('phoneBarBusy')) {
+          return this.getDataValue('phoneBarBusyNumber');
+        }
+        return null;
+      }
+    },
+    phoneBarUnconditional: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    phoneBarNoReply: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    phoneBarBusy: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    phoneBarListenPort: {
+      type: DataTypes.INTEGER(5),
+      defaultValue: 5060
+    },
+    phoneBarECTail: {
+      type: DataTypes.INTEGER(5),
+      defaultValue: 200
+    },
+    phoneBarExpires: {
+      type: DataTypes.INTEGER(5),
+      defaultValue: 3600
+    },
+    phoneBarNameServer: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    phoneBarStunServer: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    phoneBarVADEnabled: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    phoneBarNoUDP: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    phoneBarNoTCP: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    phoneBarLogLevel: {
+      type: DataTypes.INTEGER(5),
+      defaultValue: 1
+    },
+    phoneBarPublishEnabled: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    chanspy: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    description: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    ipaddr: { //REALTIME ASTERISK
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    port: { //REALTIME ASTERISK
+      type: DataTypes.INTEGER(5),
+      allowNull: true,
+    },
+    regseconds: { //REALTIME ASTERISK
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    fullcontact: { //REALTIME ASTERISK
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    regserver: { //REALTIME ASTERISK
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    useragent: { //REALTIME ASTERISK
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    lastms: { //REALTIME ASTERISK
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    type: {
+      type: DataTypes.ENUM('friend', 'user', 'peer'),
+      allowNull: true,
+      defaultValue: 'friend'
+    },
+    context: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'from-sip'
+    },
+    callingpres: {
+      type: DataTypes.ENUM('ALLOWED_NOT_SCREENED',
+        'ALLOWED_PASSED_SCREEN', 'ALLOWED_FAILED_SCREEN', 'ALLOWED',
+        'PROHIB_NOT_SCREENED', 'PROHIB_PASSED_SCREEN',
+        'PROHIB_FAILED_SCREEN', 'PROHIB'),
+      allowNull: true,
+    },
+    permit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    deny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    secret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    md5secret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    remotesecret: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    transport: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'udp'
+    },
+    dtmfmode: {
+      type: DataTypes.ENUM('rfc2833', 'info', 'shortinfo', 'inband',
+        'auto'),
+      allowNull: true,
+      defaultValue: 'rfc2833'
+    },
+    directmedia: {
+      type: DataTypes.ENUM('yes', 'no', 'nonat', 'update', 'outgoing'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    directrtpsetup: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    directmediapermit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    directmediadeny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    nat: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'force_rport,comedia'
+    },
+    callgroup: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    namedcallgroup: { //We are in named call groups engineering,sales,netgroup,protgroup
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    pickupgroup: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    namedpickupgroup: { //We can do call pick-p for named call group sales
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    language: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'en'
+    },
+    tonezone: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    allow: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'alaw;ulaw;gsm'
+    },
+    disallow: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    autoframing: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    insecure: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'port,invite'
+    },
+    trustrpid: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    trust_id_outbound: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    progressinband: {
+      type: DataTypes.ENUM('yes', 'no', 'never'),
+      allowNull: true,
+    },
+    promiscredir: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    useclientcode: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    accountcode: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    setvar: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callerid: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: '"" <>'
+    },
+    amaflags: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callcounter: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    busylevel: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    allowoverlap: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    allowsubscribe: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    allowtransfer: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    ignoresdpversion: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    subscribecontext: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    template: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    videosupport: {
+      type: DataTypes.ENUM('yes', 'no', 'always'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    maxcallbitrate: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rfc2833compensate: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    mailbox: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    session_timers: {
+      type: DataTypes.ENUM('accept', 'refuse', 'originate'),
+      allowNull: true,
+    },
+    session_expires: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    session_minse: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    session_refresher: {
+      type: DataTypes.ENUM('uac', 'uas'),
+      allowNull: true,
+      defaultValue: 'uas'
+    },
+    t38pt_usertpsource: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    regexten: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fromdomain: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    fromuser: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    host: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'dynamic'
+    },
+    qualify: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    keepalive: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    defaultip: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    defaultuser: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    rtptimeout: { // Terminate call if 60 seconds of no RTP or RTCP activity on the audio channel  when we're not on hold.
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rtpholdtimeout: { // Terminate call if 300 seconds of no RTP or RTCP activity on the audio channel when we're on hold (must be > rtptimeout)
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    rtpkeepalive: { // Send keepalives in the RTP stream to keep NAT open (default is off - zero)
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    sendrpid: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    outboundproxy: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    callbackextension: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    timert1: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    timerb: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    qualifyfreq: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    contactpermit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    contactdeny: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    contactacl: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    unsolicited_mailbox: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    use_q850_reason: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    maxforwards: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    encryption: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    avpf: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    force_avp: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    icesupport: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    dtlsenable: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true
+    },
+    dtlsverify: {
+      type: DataTypes.ENUM('yes', 'no', 'fingerprint', 'certificate'),
+      allowNull: true
+    },
+    dtlsrekey: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    dtlscertfile: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlsprivatekey: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlscipher: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlscafile: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlscapath: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    dtlssetup: {
+      type: DataTypes.ENUM('active', 'passive', 'actpass'),
+      allowNull: true
+    },
+    dtlsfingerprint: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    usereqphone: { //This provider requires ";user=phone" on URI
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    recordonfeature: { //Feature to use when INFO with Record: on is received.
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    recordofffeature: { //Feature to use when INFO with Record: off is received.
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    call_limit: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: null
+    },
+    registertrying: { //Send a 100 Trying when the device registers.
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    subscribemwi: { //Only send notifications if this phone subscribes for mailbox notification
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    vmexten: { // dialplan extension to reach mailbox. defaults to global vmexten which defaults to "asterisk"
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    mohinterpret: { // This option specifies a preference for which music on hold class this channel should listen to when put on hold
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    mohsuggest: { //  This option specifies which music on hold class to suggest to the peer channel when this channel places the peer on hold.
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    parkinglot: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    canreinvite: {
+      type: DataTypes.ENUM('yes', 'no', 'nonat', 'update', 'update,nonat'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+  }, {
+    tableName: 'users',
+    instanceMethods: {
+      /**
+       * Authenticate - check if the passwords are the same
+       *
+       * @param {String} plainText
+       *        {function} callBack
+       * @api public
+       */
+      authenticate: function(plainText) {
+        return this.encryptPassword(plainText) === this.password;
+      },
+      /**
+       * Make salt
+       *
+       * @return {String}
+       * @api public
+       */
+      makeSalt: function() {
+        return crypto.randomBytes(16).toString('base64');
+      },
+      /**
+       * Encrypt password
+       *
+       * @param {String} password
+       * @return {String}
+       * @api public
+       */
+      encryptPassword: function(password) {
+        if (!password || !this.salt) return '';
+        var salt = new Buffer(this.salt, 'base64');
+        return crypto.pbkdf2Sync(password, salt, 10000, 64).toString(
+          'base64');
+      },
+      /**
+       * md5 password
+       *
+       * @param {String} password
+       * @return {String}
+       * @api public
+       */
+      md5Password: function(password) {
+        if (!password) return '';
+        return md5(password);
+      }
+    },
+    associate: function(models) {
+      // BELOGNS TO MANY
+      User.hasMany(models.ChatMessage);
+      User.hasMany(models.MailMessage);
+      User.hasMany(models.Contact);
+      User.hasMany(models.Action);
+      User.belongsToMany(models.Module, {
+        through: 'user_has_modules'
+      });
+      User.belongsToMany(models.Channel, {
+        through: 'user_has_channels'
+      });
+      User.belongsToMany(models.MailRoom, {
+        through: 'user_has_mail_rooms'
+      });
+      User.belongsToMany(models.Team, {
+        through: models.UserHasTeam
+      });
+      User.belongsToMany(models.ChatRoom, {
+        through: models.UserHasChatRoom
+      });
+      User.belongsToMany(models.MailQueue, {
+        through: models.UserHasMailQueue,
+        required: false
+      });
+      User.belongsToMany(models.FaxQueue, {
+        through: models.UserHasFaxQueue,
+        required: false
+      });
+      User.belongsToMany(models.ChatQueue, {
+        through: models.UserHasChatQueue,
+        required: false
+      });
+      User.belongsToMany(models.VoiceQueue, {
+        through: models.UserHasVoiceQueue,
+        required: false
+      });
+      User.belongsToMany(models.Service, {
+        through: models.UserHasService
+      });
+      User.hasMany(models.VoiceExtension, {
+        foreignKey: 'UserId',
+        as: 'UserExtensions',
+        onDelete: 'cascade',
+        hooks: true
+      });
+
+      // SCOPES MANAGEMENT
+      User.addScope('user', {
+        where: {
+          role: {
+            $in: ['admin', 'user']
+          },
+        }
+      });
+      User.addScope('queues', {
+        include: [models.VoiceQueue, models.ChatQueue, models.MailQueue, models.FaxQueue]
+      });
+      User.addScope('telephone', {
+        where: {
+          role: 'telephone'
+        }
+      });
+      User.addScope('checkPauseStatus', function(query) {
+        var scope = {
+          where: {}
+        };
+        if (query.voicePause) {
+          scope.where.voicePause = (query.voicePause === 'true') ? true : false;
+          delete query.voicePause;
+        } else if (query.faxPause) {
+          scope.where.faxPause = (query.faxPause === 'true') ? true : false;
+          delete query.faxPause;
+        } else if (query.chatPause) {
+          scope.where.chatPause = (query.chatPause === 'true') ? true : false;
+          delete query.chatPause;
+        } else if (query.mailPause) {
+          scope.where.mailPause = (query.mailPause === 'true') ? true : false;
+          delete query.mailPause;
+        }
+        return scope;
+      });
+      User.addScope('checkOnlineStatus', function(query) {
+        var scope = {
+          where: {}
+        };
+        if (query.online) {
+          scope.where.online = (query.online === 'true') ? true : false;
+          delete query.online;
+        }
+        return scope;
+      });
+      User.addScope('checkSipStatus', function(query) {
+        var scope = {
+          where: {}
+        };
+        if (query.status) {
+          scope.where.status = query.status;
+          delete query.status;
+        }
+        return scope;
+      });
+      User.addScope('checkQueueStatus', function(query) {
+        var scope = {
+          where: {}
+        };
+        if (query.queueStatus) {
+          scope.where.queueStatus = query.queueStatus;
+          delete query.queueStatus;
+        }
+        return scope;
+      });
+      User.addScope('agent', {
+        where: {
+          role: 'agent'
+        },
+        attributes: ['id',
+          'name',
+          'email',
+          'internal',
+          'fullname',
+          'accountcode',
+          'transport',
+          'host',
+          'nat',
+          'type',
+          'allow',
+          'chatCapacity',
+          'mailCapacity',
+          'faxCapacity',
+          'online',
+          'lastLoginAt',
+          'phoneBarAutoAnswer',
+          'phoneBarEnableSettings',
+          'phoneBarUnconditional',
+          'phoneBarNoReply',
+          'phoneBarBusy',
+          'phoneBarUnconditionalNumber',
+          'phoneBarNoReplyNumber',
+          'phoneBarBusyNumber',
+          'phoneBarListenPort',
+          'chanspy',
+          'voicePause',
+          'mailPause',
+          'faxPause',
+          'chatPause',
+          'pauseType',
+          'lastPauseAt',
+          'status',
+          'statusAt',
+          'queueStatus',
+          'queueStatusAt',
+          'lastQueue',
+          'useragent',
+          'ipaddr',
+          'fullcontact',
+          'port',
+          'lastms',
+          'description'
+        ]
+      });
+    }
+  });
+
+  return User;
+}
index aee50e6..6479a3d 100644 (file)
@@ -1 +1,22 @@
-var _0x19fc=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x19fc[0]);module[_0x19fc[1]]=function(_0x6484x2,_0x6484x3){var _0x6484x4=_0x6484x2[_0x19fc[6]](_0x19fc[2],{penalty:{type:_0x6484x3[_0x19fc[3]],defaultValue:0},queue:{type:_0x6484x3[_0x19fc[4]]}},{tableName:_0x19fc[5]});return _0x6484x4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var UserHasChatQueue = sequelize.define('UserHasChatQueue', {
+               penalty: {
+                       type: DataTypes.INTEGER,
+                       defaultValue: 0
+               },
+               queue: {
+                       type: DataTypes.STRING
+               },
+       }, {
+               tableName: 'user_has_chat_queues'
+       });
+
+       return UserHasChatQueue;
+};
index f659d2e..277debd 100644 (file)
@@ -1 +1,19 @@
-var _0x8e2a=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x8e2a[0]);module[_0x8e2a[1]]=function(_0x898fx2,_0x898fx3){var _0x898fx4=_0x898fx2[_0x8e2a[6]](_0x8e2a[2],{LastMessageRead:{type:_0x898fx3[_0x8e2a[3]],defaultValue:0},Hide:{type:_0x898fx3[_0x8e2a[4]],defaultValue:false}},{tableName:_0x8e2a[5]});return _0x898fx4}
\ No newline at end of file
+
+/**
+       * Chat Website Model
+       */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var UserHasChatRoom = sequelize.define('UserHasChatRoom', {
+                       LastMessageRead: { type: DataTypes.INTEGER, defaultValue: 0 },
+                       Hide: { type: DataTypes.BOOLEAN, defaultValue: false }
+               }, {
+                       tableName: 'user_has_chat_rooms'
+               }
+       );
+
+       return UserHasChatRoom;
+};
index 68168ba..3bcb67d 100644 (file)
@@ -1 +1,22 @@
-var _0x7b42=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x7b42[0]);module[_0x7b42[1]]=function(_0xcaaex2,_0xcaaex3){var _0xcaaex4=_0xcaaex2[_0x7b42[6]](_0x7b42[2],{penalty:{type:_0xcaaex3[_0x7b42[3]],defaultValue:0},queue:{type:_0xcaaex3[_0x7b42[4]]}},{tableName:_0x7b42[5]});return _0xcaaex4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var UserHasFaxQueue = sequelize.define('UserHasFaxQueue', {
+               penalty: {
+                       type: DataTypes.INTEGER,
+                       defaultValue: 0
+               },
+               queue: {
+                       type: DataTypes.STRING
+               }
+       }, {
+               tableName: 'user_has_fax_queues'
+       });
+
+       return UserHasFaxQueue;
+};
index 8cd870f..c6358cb 100644 (file)
@@ -1 +1,22 @@
-var _0xbc95=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xbc95[0]);module[_0xbc95[1]]=function(_0x790ax2,_0x790ax3){var _0x790ax4=_0x790ax2[_0xbc95[6]](_0xbc95[2],{penalty:{type:_0x790ax3[_0xbc95[3]],defaultValue:0},queue:{type:_0x790ax3[_0xbc95[4]]}},{tableName:_0xbc95[5]});return _0x790ax4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var UserHasMailQueue = sequelize.define('UserHasMailQueue', {
+               penalty: {
+                       type: DataTypes.INTEGER,
+                       defaultValue: 0
+               },
+               queue: {
+                       type: DataTypes.STRING
+               }
+       }, {
+               tableName: 'user_has_mail_queues'
+       });
+
+       return UserHasMailQueue;
+};
index 35d2d20..a3ff23d 100644 (file)
@@ -1 +1,21 @@
-var _0x28c3=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x53\x65\x72\x76\x69\x63\x65","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x28c3[0]);module[_0x28c3[1]]=function(_0x28dbx2,_0x28dbx3){var _0x28dbx4=_0x28dbx2[_0x28c3[6]](_0x28c3[2],{membername:{type:_0x28dbx3[_0x28c3[3]]}},{tableName:_0x28c3[4],indexes:[{name:_0x28c3[5],fields:[_0x28c3[5]]}]});return _0x28dbx4}
\ No newline at end of file
+/**
+ * 
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+       var UserHasService = sequelize.define('UserHasService', {
+               membername: {
+                       type: DataTypes.STRING
+               }
+       }, {
+               tableName: 'user_has_services',
+               indexes: [{
+                       name: 'membername',
+                       fields: ['membername']
+               }]
+       });
+
+       return UserHasService;
+};
index f2f483e..a0c38b6 100644 (file)
@@ -1 +1,14 @@
-var _0x978b=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x978b[0]);module[_0x978b[1]]=function(_0x640ax2,_0x640ax3){var _0x640ax4=_0x640ax2[_0x978b[4]](_0x978b[2],{},{tableName:_0x978b[3]});return _0x640ax4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+
+       var UserHasTeam = sequelize.define('UserHasTeam', {}, {
+               tableName: 'user_has_teams'
+       });
+
+       return UserHasTeam;
+};
index 1f6bd2c..24791d4 100644 (file)
@@ -1 +1,117 @@
-var _0xb54e=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x30","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x46\x52\x4F\x4D\x5F\x55\x4E\x49\x58\x54\x49\x4D\x45","\x25\x59\x2D\x25\x6D\x2D\x25\x64\x20\x25\x48\x3A\x25\x69\x3A\x25\x73","\x66\x6E","\x73\x74\x61\x74\x75\x73","\x55\x4E\x4B\x4E\x4F\x57\x4E","\x4E\x4F\x54\x5F\x49\x4E\x55\x53\x45","\x31","\x49\x4E\x55\x53\x45","\x32","\x42\x55\x53\x59","\x33","\x49\x4E\x56\x41\x4C\x49\x44","\x34","\x55\x4E\x41\x56\x41\x49\x4C\x41\x42\x4C\x45","\x35","\x52\x49\x4E\x47\x49\x4E\x47","\x36","\x52\x49\x4E\x47\x49\x4E\x55\x53\x45","\x37","\x4F\x4E\x48\x4F\x4C\x44","\x38","\x73\x74\x61\x74\x75\x73\x64\x65\x73\x63","\x73\x74\x61\x74\x75\x73\x41\x74","\x4E\x4F\x57","\x70\x61\x75\x73\x65\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xb54e[0]);module[_0xb54e[1]]=function(_0xe53cx2,_0xe53cx3){var _0xe53cx4=_0xe53cx2[_0xb54e[37]](_0xb54e[2],{logged:{type:_0xe53cx3[_0xb54e[3]],defaultValue:false},loggedAt:{type:_0xe53cx3[_0xb54e[4]]},ringinuse:{type:_0xe53cx3[_0xb54e[3]]},penalty:{type:_0xe53cx3[_0xb54e[5]],defaultValue:0},stateinterface:{type:_0xe53cx3[_0xb54e[6]]},queue:{type:_0xe53cx3[_0xb54e[6]]},membername:{type:_0xe53cx3[_0xb54e[6]]},interface:{type:_0xe53cx3[_0xb54e[6]]},membership:{type:_0xe53cx3[_0xb54e[6]]},callstaken:{type:_0xe53cx3[_0xb54e[5]]},lastcall:{type:_0xe53cx3[_0xb54e[4]],set:function(_0xe53cx5){if(_0xe53cx5===_0xb54e[7]){this[_0xb54e[9]](_0xb54e[8],null)}else {this[_0xb54e[9]](_0xb54e[8],_0xe53cx2[_0xb54e[12]](_0xb54e[10],_0xe53cx5,_0xb54e[11]))}}},status:{type:_0xe53cx3[_0xb54e[5]],set:function(_0xe53cx6){this[_0xb54e[9]](_0xb54e[13],_0xe53cx6);var _0xe53cx7=_0xb54e[14];switch(_0xe53cx6){case _0xb54e[7]:_0xe53cx7=_0xb54e[14];break;case _0xb54e[16]:_0xe53cx7=_0xb54e[15];break;case _0xb54e[18]:_0xe53cx7=_0xb54e[17];break;case _0xb54e[20]:_0xe53cx7=_0xb54e[19];break;case _0xb54e[22]:_0xe53cx7=_0xb54e[21];break;case _0xb54e[24]:_0xe53cx7=_0xb54e[23];break;case _0xb54e[26]:_0xe53cx7=_0xb54e[25];break;case _0xb54e[28]:_0xe53cx7=_0xb54e[27];break;case _0xb54e[30]:_0xe53cx7=_0xb54e[29];break};this[_0xb54e[9]](_0xb54e[31],_0xe53cx7);this[_0xb54e[9]](_0xb54e[32],_0xe53cx2[_0xb54e[12]](_0xb54e[33]))}},statusdesc:{type:_0xe53cx3[_0xb54e[6]]},statusAt:{type:_0xe53cx3[_0xb54e[4]]},paused:{type:_0xe53cx3[_0xb54e[3]],defaultValue:false,set:function(_0xe53cx8){this[_0xb54e[9]](_0xb54e[34],parseInt(_0xe53cx8,10)?true:false)}},pausedAt:{type:_0xe53cx3[_0xb54e[4]]},reason:{type:_0xe53cx3[_0xb54e[6]]}},{tableName:_0xb54e[35],indexes:[{name:_0xb54e[36],fields:[_0xb54e[36]]}]});return _0xe53cx4}
\ No newline at end of file
+/**
+ * Chat Website Model
+ */
+
+var crypto = require('crypto');
+
+module.exports = function(sequelize, DataTypes) {
+       var UserHasVoiceQueue = sequelize.define('UserHasVoiceQueue', {
+               logged: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false
+               },
+               loggedAt: {
+                       type: DataTypes.DATE
+               },
+               ringinuse: {
+                       type: DataTypes.BOOLEAN
+               },
+               penalty: {
+                       type: DataTypes.INTEGER,
+                       defaultValue: 0
+               },
+               stateinterface: {
+                       type: DataTypes.STRING
+               },
+               queue: {
+                       type: DataTypes.STRING
+               },
+               membername: {
+                       type: DataTypes.STRING
+               },
+               interface: {
+                       type: DataTypes.STRING
+               },
+               membership: {
+                       type: DataTypes.STRING
+               },
+               callstaken: {
+                       type: DataTypes.INTEGER
+               },
+               lastcall: {
+                       type: DataTypes.DATE,
+                       set: function(lastcall) {
+                               if (lastcall === '0') {
+                                       this.setDataValue('lastcall', null);
+                               } else {
+                                       this.setDataValue('lastcall', sequelize.fn('FROM_UNIXTIME', lastcall, '%Y-%m-%d %H:%i:%s'));
+                               }
+                       }
+               },
+               status: {
+                       type: DataTypes.INTEGER,
+                       set: function(status) {
+                               this.setDataValue('status', status);
+                               var detail = 'UNKNOWN';
+                               switch (status) {
+                                       case '0':
+                                               detail = 'UNKNOWN';
+                                               break;
+                                       case '1':
+                                               detail = 'NOT_INUSE';
+                                               break;
+                                       case '2':
+                                               detail = 'INUSE';
+                                               break;
+                                       case '3':
+                                               detail = 'BUSY';
+                                               break;
+                                       case '4':
+                                               detail = 'INVALID';
+                                               break;
+                                       case '5':
+                                               detail = 'UNAVAILABLE';
+                                               break;
+                                       case '6':
+                                               detail = 'RINGING';
+                                               break;
+                                       case '7':
+                                               detail = 'RINGINUSE';
+                                               break;
+                                       case '8':
+                                               detail = 'ONHOLD';
+                                               break;
+                               }
+                               this.setDataValue('statusdesc', detail);
+                               this.setDataValue('statusAt', sequelize.fn('NOW'))
+                       },
+               },
+               statusdesc: {
+                       type: DataTypes.STRING
+               },
+               statusAt: {
+                       type: DataTypes.DATE
+               },
+               paused: {
+                       type: DataTypes.BOOLEAN,
+                       defaultValue: false,
+                       set: function(paused) {
+                               this.setDataValue('paused', parseInt(paused, 10) ? true : false);
+                       }
+               },
+               pausedAt: {
+                       type: DataTypes.DATE
+               },
+               reason: {
+                       type: DataTypes.STRING
+               }
+       }, {
+               tableName: 'user_has_voice_queues',
+               indexes: [{
+                       name: 'membername',
+                       fields: ['membername']
+               }]
+       });
+
+       return UserHasVoiceQueue;
+};
index 9f1d5ab..68778bc 100644 (file)
@@ -1 +1,33 @@
-var _0x311d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x54\x52\x49\x4E\x47","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x66\x69\x65\x6C\x64\x73","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x311d[0];module[_0x311d[1]]=function(_0xe659x1,_0xe659x2){var _0xe659x3=_0xe659x1[_0x311d[8]](_0x311d[2],{name:{type:_0xe659x2[_0x311d[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:_0xe659x2[_0x311d[3]]},{tableName:_0x311d[4],associate:function(_0xe659x4){_0xe659x3[_0x311d[5]](_0xe659x4.ZendeskField);_0xe659x3[_0x311d[5]](_0xe659x4.DeskField);_0xe659x3[_0x311d[5]](_0xe659x4.SalesforceField);_0xe659x3[_0x311d[5]](_0xe659x4.FreshdeskField);_0xe659x3[_0x311d[5]](_0xe659x4.SugarcrmField);_0xe659x3[_0x311d[7]](_0x311d[6],{include:[{all:true}]})}});return _0xe659x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Variable = sequelize.define('Variable', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true,
+      allowNull: false,
+      validate: {
+        notEmpty: true,
+      },
+    },
+    description: DataTypes.STRING
+  }, {
+    tableName: 'variables',
+    associate: function(models) {
+      Variable.hasMany(models.ZendeskField);
+      Variable.hasMany(models.DeskField);
+      Variable.hasMany(models.SalesforceField);
+      Variable.hasMany(models.FreshdeskField);
+      Variable.hasMany(models.SugarcrmField);
+      Variable.addScope('fields', {
+        include: [{
+          all: true
+        }]
+      });
+    }
+  });
+
+  return Variable;
+
+};
index 7cecf7e..e81e9ab 100644 (file)
@@ -1 +1,32 @@
-var _0xa1b6=["\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4F\x6E\x65","\x64\x65\x66\x69\x6E\x65"];module[_0xa1b6[0]]=function(_0xfa69x1,_0xfa69x2){var _0xfa69x3=_0xfa69x1[_0xa1b6[7]](_0xa1b6[1],{name:{type:_0xfa69x2[_0xa1b6[2]],unique:true},description:{type:_0xfa69x2[_0xa1b6[2]],allowNull:true},defaultEntry:{type:_0xfa69x2[_0xa1b6[3]],defaultValue:0}},{tableName:_0xa1b6[4],associate:function(_0xfa69x4){_0xfa69x3[_0xa1b6[6]](_0xfa69x4.VoiceExtension,{onDelete:_0xa1b6[5],hooks:true})}});return _0xfa69x3}
\ No newline at end of file
+/**
+ * Context Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var VoiceContext = sequelize.define('VoiceContext', {
+    name: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    description: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    defaultEntry: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: 0
+    }
+  }, {
+    tableName: 'voice_contexts',
+    associate: function(models) {
+      VoiceContext.hasOne(models.VoiceExtension, {
+        onDelete: 'cascade',
+        hooks: true
+      });
+    }
+
+  });
+
+  return VoiceContext;
+};
index bfd7f5e..6d42a6e 100644 (file)
@@ -1 +1,112 @@
-var _0x4118=["\x75\x74\x69\x6C","\x72\x65\x76\x65\x72\x73\x65\x2D\x6D\x75\x73\x74\x61\x63\x68\x65","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6D\x70\x6F\x73\x69\x74\x65\x49\x6E\x64\x65\x78","\x31","\x2D\x2D","\x4E\x6F\x4F\x70","\x69\x64","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x61\x70\x70","\x44\x69\x61\x6C","\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x53\x49\x50\x2F\x7B\x7B\x74\x72\x75\x6E\x6B\x7D\x7D\x2F\x7B\x7B\x70\x72\x65\x66\x69\x78\x7D\x7D\x24\x7B\x45\x58\x54\x45\x4E\x3A\x7B\x7B\x63\x75\x74\x64\x69\x67\x69\x74\x73\x7D\x7D\x7D","\x61\x70\x70\x64\x61\x74\x61","\x74\x72\x75\x6E\x6B","\x63\x61\x6C\x6C\x65\x72\x49\x44","","\x63\x75\x74\x64\x69\x67\x69\x74\x73","\x70\x72\x65\x66\x69\x78","\x2C","\x73\x70\x6C\x69\x74","\x69\x6E\x62\x6F\x75\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73\x79\x73\x74\x65\x6D","\x61\x6E\x79","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x61\x73\x63\x61\x64\x65","\x68\x61\x73\x4D\x61\x6E\x79","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x61\x64\x64\x53\x63\x6F\x70\x65","\x72\x6F\x75\x74\x65\x73","\x64\x65\x66\x69\x6E\x65"];var util=require(_0x4118[0]);var reverseMustache=require(_0x4118[1]);module[_0x4118[2]]=function(_0x473bx3,_0x473bx4){var _0x473bx5=_0x473bx3[_0x4118[41]](_0x4118[3],{context:{type:_0x473bx4[_0x4118[4]],allowNull:false,unique:_0x4118[5],validate:{notEmpty:true,is:/[A-Za-z0-9\.\_]+$/i}},exten:{type:_0x473bx4[_0x4118[4]],allowNull:false,unique:_0x4118[5]},priority:{type:_0x473bx4[_0x4118[4]],allowNull:false,defaultValue:_0x4118[6],unique:_0x4118[5]},tag:{type:_0x473bx4[_0x4118[4]],allowNull:false,defaultValue:_0x4118[7]},app:{type:_0x473bx4[_0x4118[4]],allowNull:false,defaultValue:_0x4118[8]},appdata:{type:_0x473bx4[_0x4118[4]],allowNull:true,get:function(){if(!this[_0x4118[10]](_0x4118[9])){if(this[_0x4118[10]](_0x4118[11])===_0x4118[12]&&this[_0x4118[10]](_0x4118[13])===_0x4118[14]){var _0x473bx6=reverseMustache({template:_0x4118[15],content:this[_0x4118[10]](_0x4118[16])});return [_0x473bx6[_0x4118[17]],this[_0x4118[10]](_0x4118[18])||_0x4118[19],_0x473bx6[_0x4118[20]],_0x473bx6[_0x4118[21]]]}else {return this[_0x4118[10]](_0x4118[16])[_0x4118[23]](_0x4118[22])}}else {return this[_0x4118[10]](_0x4118[16])}}},type:{type:_0x473bx4.ENUM(_0x4118[24],_0x4118[14],_0x4118[25],_0x4118[26],_0x4118[27],_0x4118[28],_0x4118[29]),allowNull:false},description:{type:_0x473bx4[_0x4118[4]]},interval:{type:_0x473bx4[_0x4118[4]]},IntervalId:{type:_0x473bx4[_0x4118[30]]},isApp:{type:_0x473bx4[_0x4118[31]],defaultValue:false},callerID:{type:_0x473bx4[_0x4118[4]],allowNull:true},record:{type:_0x473bx4[_0x4118[31]],defaultValue:false}},{tableName:_0x4118[32],associate:function(_0x473bx7){_0x473bx5[_0x4118[35]](_0x473bx7.VoiceExtension,{as:_0x4118[33],onDelete:_0x4118[34],hooks:true});_0x473bx5[_0x4118[39]](_0x4118[36],{include:[{model:_0x473bx7[_0x4118[3]],as:_0x4118[33],required:false,where:{isApp:true},attributes:[_0x4118[11],_0x4118[37],_0x4118[38],_0x4118[18],_0x4118[16],_0x4118[13]]}]});_0x473bx5[_0x4118[39]](_0x4118[40],{where:{VoiceExtensionId:null}})}});return _0x473bx5}
\ No newline at end of file
+/* jshint indent: 2 */
+var util = require('util');
+var reverseMustache = require('reverse-mustache');
+
+module.exports = function(sequelize, DataTypes) {
+  var VoiceExtension = sequelize.define('VoiceExtension', {
+    context: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      unique: 'compositeIndex',
+      validate: {
+        notEmpty: true,
+        is: /[A-Za-z0-9\.\_]+$/i
+      },
+    },
+    exten: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      unique: 'compositeIndex'
+    },
+    priority: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      defaultValue: '1',
+      unique: 'compositeIndex'
+    },
+    tag: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      defaultValue: '--'
+    },
+    app: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      defaultValue: 'NoOp'
+    },
+    appdata: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      get: function() {
+        // 'this' allows you to access attributes of the instance
+        if (!this.getDataValue('id')) {
+          if (this.getDataValue('app') === 'Dial' && this.getDataValue('type') === 'outbound') {
+            var appdata = reverseMustache({
+              template: 'SIP/{{trunk}}/{{prefix}}${EXTEN:{{cutdigits}}}',
+              content: this.getDataValue('appdata')
+            });
+            return [appdata.trunk, this.getDataValue('callerID') || '', appdata.cutdigits, appdata.prefix];
+          } else {
+            return this.getDataValue('appdata').split(',');
+          }
+        } else {
+          return this.getDataValue('appdata');
+        }
+      },
+    },
+    type: {
+      type: DataTypes.ENUM('inbound', 'outbound', 'internal', 'inbound-fax', 'outbound-fax', 'system', 'any'),
+      allowNull: false,
+    },
+    description: {
+      type: DataTypes.STRING,
+    },
+    interval: {
+      type: DataTypes.STRING,
+    },
+    IntervalId: {
+      type: DataTypes.INTEGER,
+    },
+    isApp: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    callerID: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    record: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
+  }, {
+    tableName: 'voice_extensions',
+    associate: function(models) {
+      VoiceExtension.hasMany(models.VoiceExtension, {
+        as: 'Applications',
+        onDelete: 'cascade',
+        hooks: true
+      });
+      // SCOPES MANAGEMENT
+      VoiceExtension.addScope('application', {
+        include: [{
+          model: models.VoiceExtension,
+          as: 'Applications',
+          required: false,
+          where: {
+            isApp: true
+          },
+          attributes: ['app', 'interval', 'IntervalId', 'callerID', 'appdata', 'type']
+        }]
+      });
+
+      VoiceExtension.addScope('routes', {
+        where: {
+          VoiceExtensionId: null
+        }
+      });
+    }
+  });
+
+  return VoiceExtension;
+};
index f5063c1..c405ca3 100644 (file)
@@ -1 +1,71 @@
-var _0xf91f=["\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x53\x54\x52\x49\x4E\x47","\x63\x75\x73\x74\x6F\x6D","\x66\x69\x6C\x65\x73","\x6D\x70\x33\x6E\x62","\x71\x75\x69\x65\x74\x6D\x70\x33\x6E\x62","\x71\x75\x69\x65\x74\x6D\x70\x33","\x6D\x70\x33","\x61\x6C\x70\x68\x61","\x77\x61\x76","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50","\x42\x4F\x4F\x4C\x45\x41\x4E","\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x64\x65\x66\x69\x6E\x65","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x6D\x6F\x68\x20\x63\x6C\x61\x73\x73\x20\x6E\x61\x6D\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x6D\x6F\x68\x20\x63\x6C\x61\x73\x73","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x6D\x6F\x68\x20\x63\x6C\x61\x73\x73","\x62\x65\x66\x6F\x72\x65\x44\x65\x6C\x65\x74\x65"];module[_0xf91f[0]]=function(_0x58f5x1,_0x58f5x2){var _0x58f5x3=_0x58f5x1[_0xf91f[14]](_0xf91f[1],{name:{type:_0x58f5x2[_0xf91f[2]],allowNull:false,unique:true},mode:{type:_0x58f5x2.ENUM(_0xf91f[3],_0xf91f[4],_0xf91f[5],_0xf91f[6],_0xf91f[7],_0xf91f[8]),allowNull:true,defaultValue:_0xf91f[4]},directory:{type:_0x58f5x2[_0xf91f[2]],allowNull:true},application:{type:_0x58f5x2[_0xf91f[2]],allowNull:true},digit:{type:_0x58f5x2[_0xf91f[2]],allowNull:true},sort:{type:_0x58f5x2[_0xf91f[2]],allowNull:true,defaultValue:_0xf91f[9]},format:{type:_0x58f5x2[_0xf91f[2]],allowNull:true,defaultValue:_0xf91f[10]},stamp:{type:_0xf91f[11]},defaultEntry:{type:_0x58f5x2[_0xf91f[12]],defaultValue:0}},{tableName:_0xf91f[13]});_0x58f5x3[_0xf91f[20]](function(_0x58f5x4){if(_0x58f5x4[_0xf91f[16]](_0xf91f[15])){throw  new Error({message:_0xf91f[17]})};if(_0x58f5x4[_0xf91f[18]]){throw  new Error({message:_0xf91f[19]})}});_0x58f5x3[_0xf91f[22]](function(_0x58f5x4){if(_0x58f5x4[_0xf91f[18]]){throw  new Error({message:_0xf91f[21]})}});return _0x58f5x3}
\ No newline at end of file
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+  var VoiceMusicOnHold = sequelize.define('VoiceMusicOnHold', {
+    name: {
+      type: DataTypes.STRING,
+      allowNull: false,
+      unique: true
+    },
+    mode: {
+      type: DataTypes.ENUM('custom', 'files', 'mp3nb', 'quietmp3nb', 'quietmp3', 'mp3'),
+      allowNull: true,
+      defaultValue: 'files'
+    },
+    directory: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    application: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    digit: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    sort: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'alpha'
+    },
+    format: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'wav'
+    },
+    stamp: {
+      type: 'TIMESTAMP'
+    },
+    defaultEntry: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: 0
+    }
+  }, {
+    tableName: 'voice_musiconhold'
+  });
+
+  VoiceMusicOnHold.beforeUpdate(function(moh) {
+    if (moh.changed('name')) {
+      throw new Error({
+        message: "You can't modify a moh class name"
+      });
+    }
+    if (moh.defaultEntry) {
+      throw new Error({
+        message: "You can't modify a default moh class"
+      });
+    }
+  });
+
+
+  VoiceMusicOnHold.beforeDelete(function(moh) {
+    if (moh.defaultEntry) {
+      throw new Error({
+        message: "You can't delete a default moh class"
+      });
+    }
+  });
+
+  return VoiceMusicOnHold;
+};
index a06f558..71d35c8 100644 (file)
@@ -1 +1,305 @@
-var _0xceaa=["\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x53\x54\x52\x49\x4E\x47","\x64\x65\x66\x61\x75\x6C\x74","","\x72\x69\x6E\x67\x61\x6C\x6C","\x6C\x65\x61\x73\x74\x72\x65\x63\x65\x6E\x74","\x66\x65\x77\x65\x73\x74\x63\x61\x6C\x6C\x73","\x72\x61\x6E\x64\x6F\x6D","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x6C\x69\x6E\x65\x61\x72","\x77\x72\x61\x6E\x64\x6F\x6D","\x72\x72\x6F\x72\x64\x65\x72\x65\x64","\x79\x65\x73","\x6E\x6F","\x61\x6C\x6C","\x6F\x6E\x63\x65","\x30","\x35","\x31\x30","\x31\x35","\x32\x30","\x33\x30","\x42\x4F\x4F\x4C\x45\x41\x4E","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x71\x75\x65\x75\x65\x20\x6E\x61\x6D\x65","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65"];module[_0xceaa[0]]=function(_0x16b0x1,_0x16b0x2){var _0x16b0x3=_0x16b0x1[_0xceaa[28]](_0xceaa[1],{name:{type:_0x16b0x2[_0xceaa[2]],primaryKey:true,unique:true,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},musiconhold:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:_0xceaa[3]},announce:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:_0xceaa[4]},strategy:{type:_0x16b0x2.ENUM(_0xceaa[5],_0xceaa[6],_0xceaa[7],_0xceaa[8],_0xceaa[9],_0xceaa[10],_0xceaa[11],_0xceaa[12]),allowNull:false,defaultValue:_0xceaa[5]},servicelevel:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},context:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},penaltymemberslimit:{type:_0x16b0x2.INTEGER(11),allowNull:true},timeout:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},retry:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},timeoutpriority:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},weight:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},wrapuptime:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},autofill:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[13]},autopause:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14],_0xceaa[15]),allowNull:true,defaultValue:_0xceaa[14]},autopausedelay:{type:_0x16b0x2.INTEGER(11),allowNull:true},autopausebusy:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},autopauseunavail:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},maxlen:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},setinterfacevar:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},setqueueentryvar:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defautValue:_0xceaa[14]},setqueuevar:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},membermacro:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},membergosub:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},announce_frequency:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},min_announce_frequency:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},periodic_announce_frequency:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},random_periodic_announce:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},relative_periodic_announce:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[13]},announce_holdtime:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14],_0xceaa[16]),allowNull:true,defaultValue:_0xceaa[14]},announce_position:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:_0xceaa[14]},announce_to_first_user:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true},announce_position_limit:{type:_0x16b0x2.INTEGER(11),allowNull:true},announce_round_seconds:{type:_0x16b0x2.ENUM(_0xceaa[17],_0xceaa[18],_0xceaa[19],_0xceaa[20],_0xceaa[21],_0xceaa[22]),allowNull:true,defaultValue:_0xceaa[17]},monitor_format:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:_0xceaa[4]},monitor_type:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},queue_youarenext:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_thereare:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_callswaiting:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_holdtime:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_minute:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_minutes:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_seconds:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_thankyou:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:null},queue_reporthold:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},queue_quantity1:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},queue_quantity2:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},queue_periodic_announce:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},queue_less_than:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},periodic_announce:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:_0xceaa[4]},joinempty:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:_0xceaa[13]},leavewhenempty:{type:_0x16b0x2[_0xceaa[2]],allowNull:true,defaultValue:_0xceaa[14]},reportholdtime:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},ringinuse:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},memberdelay:{type:_0x16b0x2.INTEGER(11),allowNull:true,defaultValue:0},timeoutrestart:{type:_0x16b0x2.ENUM(_0xceaa[13],_0xceaa[14]),allowNull:true,defaultValue:_0xceaa[14]},defaultrule:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},description:{type:_0x16b0x2[_0xceaa[2]],allowNull:true},acw:{type:_0x16b0x2[_0xceaa[23]],defaultValue:0},acwTimeout:{type:_0x16b0x2.INTEGER(11),defaultValue:10}},{tableName:_0xceaa[24],associate:function(_0x16b0x4){_0x16b0x3[_0xceaa[27]](_0x16b0x4.User,{through:_0x16b0x4[_0xceaa[25]],foreignKey:_0xceaa[26],required:false})}});_0x16b0x3[_0xceaa[32]](function(_0x16b0x5){if(_0x16b0x5[_0xceaa[30]](_0xceaa[29])){throw  new Error(_0xceaa[31])}});return _0x16b0x3}
\ No newline at end of file
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+  var VoiceQueue = sequelize.define('VoiceQueue', {
+    name: {
+      type: DataTypes.STRING,
+      primaryKey: true,
+      unique: true,
+      validate: {
+        notEmpty: true,
+        is: /^[A-Za-z0-9\.\_]+$/i
+      },
+    },
+    musiconhold: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'default'
+    },
+    announce: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: ''
+    },
+    strategy: {
+      type: DataTypes.ENUM('ringall', 'leastrecent', 'fewestcalls', 'random', 'rrmemory', 'linear', 'wrandom', 'rrordered'),
+      allowNull: false,
+      defaultValue: 'ringall'
+    },
+    servicelevel: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    context: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    penaltymemberslimit: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    timeout: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    retry: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    timeoutpriority: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    weight: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    wrapuptime: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    autofill: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    autopause: {
+      type: DataTypes.ENUM('yes', 'no', 'all'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    autopausedelay: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    autopausebusy: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    autopauseunavail: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    maxlen: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    setinterfacevar: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    setqueueentryvar: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defautValue: 'no'
+    },
+    setqueuevar: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    membermacro: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    membergosub: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    announce_frequency: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    min_announce_frequency: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    periodic_announce_frequency: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    random_periodic_announce: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    relative_periodic_announce: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    announce_holdtime: {
+      type: DataTypes.ENUM('yes', 'no', 'once'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    announce_position: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    announce_to_first_user: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+    },
+    announce_position_limit: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+    },
+    announce_round_seconds: {
+      type: DataTypes.ENUM('0', '5', '10', '15', '20', '30'),
+      allowNull: true,
+      defaultValue: '0'
+    },
+    monitor_format: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: ''
+    },
+    monitor_type: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    queue_youarenext: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_thereare: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_callswaiting: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_holdtime: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_minute: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_minutes: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_seconds: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_thankyou: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: null
+    },
+    queue_reporthold: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    queue_quantity1: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    queue_quantity2: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    queue_periodic_announce: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    queue_less_than: {
+      type: DataTypes.STRING,
+      allowNull: true
+    },
+    periodic_announce: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: ''
+    },
+    joinempty: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'yes'
+    },
+    leavewhenempty: {
+      type: DataTypes.STRING,
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    reportholdtime: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    ringinuse: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    memberdelay: {
+      type: DataTypes.INTEGER(11),
+      allowNull: true,
+      defaultValue: 0
+    },
+    timeoutrestart: {
+      type: DataTypes.ENUM('yes', 'no'),
+      allowNull: true,
+      defaultValue: 'no'
+    },
+    defaultrule: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    description: {
+      type: DataTypes.STRING,
+      allowNull: true,
+    },
+    acw: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: 0
+    },
+    acwTimeout: {
+      type: DataTypes.INTEGER(11),
+      defaultValue: 10
+    }
+  }, {
+    tableName: 'voice_queues',
+    associate: function(models) {
+      VoiceQueue.belongsToMany(models.User, {
+        through: models.UserHasVoiceQueue,
+        foreignKey: 'queue',
+        required: false
+      });
+    }
+  });
+
+  VoiceQueue.beforeUpdate(function(updatedQueue) {
+    if (updatedQueue.changed('name')) {
+      throw new Error("You can't modify a queue name");
+    }
+  });
+
+  return VoiceQueue;
+};
index cd9c5b5..736aa24 100644 (file)
@@ -1 +1,75 @@
-var _0x9b0e=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x9b0e[0]);module[_0x9b0e[1]]=function(_0x757dx2,_0x757dx3){var _0x757dx4=_0x757dx2[_0x9b0e[11]](_0x9b0e[2],{uniqueid:{type:_0x757dx3[_0x9b0e[3]],primaryKey:true},channel:{type:_0x757dx3[_0x9b0e[3]]},calleridnum:{type:_0x757dx3[_0x9b0e[3]]},calleridname:{type:_0x757dx3[_0x9b0e[3]]},connectedlinenum:{type:_0x757dx3[_0x9b0e[3]]},connectedlinename:{type:_0x757dx3[_0x9b0e[3]]},language:{type:_0x757dx3[_0x9b0e[3]]},accountcode:{type:_0x757dx3[_0x9b0e[3]]},context:{type:_0x757dx3[_0x9b0e[3]]},exten:{type:_0x757dx3[_0x9b0e[3]]},value:{type:_0x757dx3[_0x9b0e[3]]},type:{type:_0x757dx3[_0x9b0e[3]]},rating:{type:_0x757dx3[_0x9b0e[4]],defaultValue:0,validate:{max:5,min:0}},createdAt:{type:_0x757dx3[_0x9b0e[5]],get:function(){return moment(this[_0x9b0e[9]](_0x9b0e[8]))[_0x9b0e[7]](_0x9b0e[6])}},updatedAt:{type:_0x757dx3[_0x9b0e[5]],get:function(){return moment(this[_0x9b0e[9]](_0x9b0e[8]))[_0x9b0e[7]](_0x9b0e[6])}}},{tableName:_0x9b0e[10],associate:function(_0x757dx5){}});return _0x757dx4}
\ No newline at end of file
+/* jshint indent: 2 */
+var moment = require('moment');
+
+module.exports = function(sequelize, DataTypes) {
+  var VoiceRecording = sequelize.define('VoiceRecording', {
+    uniqueid: {
+      type: DataTypes.STRING,
+      primaryKey: true
+    },
+    channel: {
+      type: DataTypes.STRING
+    },
+    calleridnum: {
+      type: DataTypes.STRING
+    },
+    calleridname: {
+      type: DataTypes.STRING
+    },
+    connectedlinenum: {
+      type: DataTypes.STRING
+    },
+    connectedlinename: {
+      type: DataTypes.STRING
+    },
+    language: {
+      type: DataTypes.STRING
+    },
+    accountcode: {
+      type: DataTypes.STRING
+    },
+    context: {
+      type: DataTypes.STRING
+    },
+    exten: {
+      type: DataTypes.STRING
+    },
+    value: {
+      type: DataTypes.STRING
+    },
+    type: {
+      type: DataTypes.STRING
+    },
+    rating: {
+      type: DataTypes.INTEGER,
+      defaultValue: 0,
+      validate: {
+        max: 5,
+        min: 0
+      }
+    },
+    createdAt: {
+      type: DataTypes.DATE,
+      get: function() {
+        // 'this' allows you to access attributes of the instance
+        return moment(this.getDataValue('agentconnectAt')).format("MM-DD-YYYY HH:mm");
+      }
+    },
+    updatedAt: {
+      type: DataTypes.DATE,
+      get: function() {
+        // 'this' allows you to access attributes of the instance
+        return moment(this.getDataValue('agentconnectAt')).format("MM-DD-YYYY HH:mm");
+      }
+    }
+  }, {
+    tableName: 'voice_recordings',
+    associate: function(models) {
+      // VoiceRecording.belongsTo(models.ReportCall, {
+      //   foreignKey: 'uniqueid'
+      // });
+    }
+  });
+
+  return VoiceRecording;
+};
index c9646a2..f814f4b 100644 (file)
@@ -1 +1,144 @@
-var _0x9cfe=["\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x53\x54\x52\x49\x4E\x47","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x6F\x6E\x74\x65\x73\x74\x5F\x6D\x61\x69\x6C\x62\x6F\x78","","\x63\x65\x6E\x74\x72\x61\x6C","\x79\x65\x73","\x6E\x6F","\x54\x49\x4E\x59\x49\x4E\x54\x28\x34\x29","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x62\x6F\x78\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x74\x65\x78\x74","\x64\x65\x66\x69\x6E\x65"];module[_0x9cfe[0]]=function(_0xdf38x1,_0xdf38x2){var _0xdf38x3=_0xdf38x1[_0x9cfe[15]](_0x9cfe[1],{uniqueid:{type:_0xdf38x2.INTEGER(4),primaryKey:true,allowNull:false,autoIncrement:true},customer_id:{type:_0xdf38x2[_0x9cfe[2]]},context:{type:_0xdf38x2[_0x9cfe[2]],defaultValue:_0x9cfe[3],unique:_0x9cfe[4]},mailbox:{type:_0xdf38x2[_0x9cfe[2]],defaultValue:_0x9cfe[5],allowNull:false,unique:_0x9cfe[4]},password:{type:_0xdf38x2[_0x9cfe[2]]},fullname:{type:_0xdf38x2[_0x9cfe[2]]},email:{type:_0xdf38x2[_0x9cfe[2]]},pager:{type:_0xdf38x2[_0x9cfe[2]]},tz:{type:_0xdf38x2[_0x9cfe[2]],defaultValue:_0x9cfe[6]},attach:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[7],allowNull:false},saycid:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[7],allowNull:false},dialout:{type:_0xdf38x2[_0x9cfe[2]]},callback:{type:_0xdf38x2[_0x9cfe[2]]},review:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},operator:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},envelope:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},sayduration:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},saydurationm:{type:_0x9cfe[9],defaultValue:1,allowNull:false},sendvoicemail:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},"\x64\x65\x6C\x65\x74\x65":{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},nextaftercmd:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[7],allowNull:false},forcename:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},forcegreetings:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[8],allowNull:false},hidefromdir:{type:_0xdf38x2.ENUM(_0x9cfe[7],_0x9cfe[8]),defaultValue:_0x9cfe[7],allowNull:false},stamp:{type:_0x9cfe[10]},emailsubject:{type:_0xdf38x2[_0x9cfe[2]]},emailbody:{type:_0xdf38x2[_0x9cfe[2]]},name:{type:_0xdf38x2[_0x9cfe[2]]},maxsecs:{type:_0xdf38x2.INTEGER(255),defaultValue:180,allowNull:false},maxmsg:{type:_0xdf38x2.INTEGER(255),defaultValue:100,allowNull:false}},{tableName:_0x9cfe[11],indexes:[{name:_0x9cfe[12],fields:[_0x9cfe[13],_0x9cfe[14]]}]});return _0xdf38x3}
\ No newline at end of file
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+  var VoiceVoicemail = sequelize.define('VoiceVoicemail', {
+    uniqueid: {
+      type: DataTypes.INTEGER(4),
+      primaryKey: true,
+      allowNull: false,
+      autoIncrement: true
+    },
+    customer_id: {
+      type: DataTypes.STRING,
+    },
+    context: {
+      type: DataTypes.STRING,
+      defaultValue: 'from-voicemail',
+      unique: 'contest_mailbox'
+    },
+    mailbox: {
+      type: DataTypes.STRING,
+      defaultValue: '',
+      allowNull: false,
+      unique: 'contest_mailbox'
+    },
+    password: {
+      type: DataTypes.STRING,
+    },
+    fullname: {
+      type: DataTypes.STRING,
+    },
+    email: {
+      type: DataTypes.STRING,
+    },
+    pager: {
+      type: DataTypes.STRING,
+    },
+    tz: {
+      type: DataTypes.STRING,
+      defaultValue: 'central'
+    },
+    attach: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'yes',
+      allowNull: false
+    },
+    saycid: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'yes',
+      allowNull: false
+    },
+    dialout: {
+      type: DataTypes.STRING,
+    },
+    callback: {
+      type: DataTypes.STRING,
+    },
+    review: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    operator: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    envelope: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    sayduration: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    saydurationm: {
+      type: 'TINYINT(4)',
+      defaultValue: 1,
+      allowNull: false
+    },
+    sendvoicemail: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    'delete': {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    nextaftercmd: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'yes',
+      allowNull: false
+    },
+    forcename: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    forcegreetings: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'no',
+      allowNull: false
+    },
+    hidefromdir: {
+      type: DataTypes.ENUM('yes', 'no'),
+      defaultValue: 'yes',
+      allowNull: false
+    },
+    stamp: {
+      type: 'TIMESTAMP'
+    },
+    emailsubject: {
+      type: DataTypes.STRING,
+    },
+    emailbody: {
+      type: DataTypes.STRING,
+    },
+    name: {
+      type: DataTypes.STRING,
+    },
+    maxsecs: {
+      type: DataTypes.INTEGER(255),
+      defaultValue: 180,
+      allowNull: false
+    },
+    maxmsg: {
+      type: DataTypes.INTEGER(255),
+      defaultValue: 100,
+      allowNull: false
+    }
+
+  }, {
+    tableName: 'voice_voicemail',
+    indexes: [{
+      name: 'mailbox_context',
+      fields: ['mailbox', 'context']
+    }]
+  });
+
+  return VoiceVoicemail;
+};
index fbe0649..fbfc691 100644 (file)
@@ -1 +1,83 @@
-var _0x8a0d=["\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x53\x54\x52\x49\x4E\x47","","\x6C\x6F\x6E\x67","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x74\x65\x78\x74","\x6D\x61\x69\x6C\x62\x6F\x78\x63\x6F\x6E\x74\x65\x78\x74","\x77\x68\x65\x72\x65","\x6D\x61\x69\x6C\x62\x6F\x78\x75\x73\x65\x72","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x69\x72","\x64\x65\x66\x69\x6E\x65"];module[_0x8a0d[0]]=function(_0x99b9x1,_0x99b9x2){var _0x99b9x3=_0x99b9x1[_0x8a0d[14]](_0x8a0d[1],{msgnum:{type:_0x99b9x2.INTEGER(11),defaultValue:0,allowNull:false},dir:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},context:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},macrocontext:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},callerid:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},origtime:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},duration:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},mailboxuser:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},mailboxcontext:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},recording:{type:_0x99b9x2.BLOB(_0x8a0d[4]),defaultValue:null},flag:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},msg_id:{type:_0x99b9x2[_0x8a0d[2]],defaultValue:_0x8a0d[3]},stamp:{type:_0x8a0d[5],allowNull:false}},{tableName:_0x8a0d[6],associate:function(_0x99b9x4){_0x99b9x3[_0x8a0d[12]](_0x8a0d[7],function(_0x99b9x5){var _0x99b9x6={where:{}};if(_0x99b9x5[_0x8a0d[8]]&&_0x99b9x5[_0x8a0d[7]]){where:{_0x99b9x6[_0x8a0d[10]][_0x8a0d[9]]=_0x99b9x5[_0x8a0d[8]];_0x99b9x6[_0x8a0d[10]][_0x8a0d[11]]=_0x99b9x5[_0x8a0d[7]]}delete _0x99b9x5[_0x8a0d[8]];delete _0x99b9x5[_0x8a0d[7]]};return _0x99b9x6})},indexes:[{name:_0x8a0d[13],fields:[_0x8a0d[13]]}]});return _0x99b9x3}
\ No newline at end of file
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+  var VoiceVoicemailMessages = sequelize.define('VoiceVoicemailMessages', {
+    msgnum: {
+      type: DataTypes.INTEGER(11),
+      defaultValue: 0,
+      allowNull: false
+    },
+    dir: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    context: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    macrocontext: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    callerid: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    origtime: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    duration: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    mailboxuser: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    mailboxcontext: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    recording: {
+      type: DataTypes.BLOB('long'),
+      defaultValue: null
+    },
+    flag: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    msg_id: {
+      type: DataTypes.STRING,
+      defaultValue: ''
+    },
+    stamp: {
+      type: 'TIMESTAMP',
+      allowNull: false
+    }
+  }, {
+    tableName: 'voice_voicemail_messages',
+    associate: function(models) {
+      VoiceVoicemailMessages.addScope('mailbox', function(query) {
+        var scope = {
+          where: {}
+        };
+        if (query.context && query.mailbox) {
+          where: {
+            scope.where.mailboxcontext = query.context;
+            scope.where.mailboxuser = query.mailbox;
+          }
+          delete query.context;
+          delete query.mailbox;
+        }
+        return scope;
+      });
+    },
+    indexes: [{
+      name: 'dir',
+      fields: ['dir']
+    }]
+  });
+
+  return VoiceVoicemailMessages;
+};
index 21a791c..899cf38 100644 (file)
@@ -1 +1,42 @@
-var _0xfd3e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x6E\x61\x6D\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0xfd3e[0];module[_0xfd3e[1]]=function(_0x7984x1,_0x7984x2){var _0x7984x3=_0x7984x1[_0xfd3e[15]](_0xfd3e[2],{name:_0x7984x2[_0xfd3e[3]],description:_0x7984x2[_0xfd3e[3]],username:{type:_0x7984x2[_0xfd3e[3]],unique:true},password:_0x7984x2[_0xfd3e[3]],token:_0x7984x2[_0xfd3e[3]],remoteUri:{type:_0x7984x2[_0xfd3e[3]],unique:true},authType:{type:_0x7984x2.ENUM(_0xfd3e[4],_0xfd3e[5]),defaultValue:_0xfd3e[4]}},{tableName:_0xfd3e[6],associate:function(_0x7984x4){_0x7984x3[_0xfd3e[9]](_0x7984x4.ZendeskConfiguration,{as:_0xfd3e[7],foreignKey:_0xfd3e[8]});_0x7984x3[_0xfd3e[14]](_0xfd3e[10],{include:[{model:_0x7984x4[_0xfd3e[11]],as:_0xfd3e[7],required:false,attributes:[_0xfd3e[12],_0xfd3e[13]]}]})}});return _0x7984x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ZendeskAccount = sequelize.define('ZendeskAccount', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING,
+    username: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    password: DataTypes.STRING,
+    token: DataTypes.STRING,
+    remoteUri: {
+      type: DataTypes.STRING,
+      unique: true
+    },
+    authType: {
+      type: DataTypes.ENUM('password', 'token'),
+      defaultValue: 'password'
+    }
+  }, {
+    tableName: 'zendesk_accounts',
+    associate: function(models) {
+      ZendeskAccount.hasMany(models.ZendeskConfiguration, {
+        as: 'Configurations',
+        foreignKey: 'AccountId'
+      });
+      ZendeskAccount.addScope('configurations', {
+        include: [{
+          model: models.ZendeskConfiguration,
+          as: 'Configurations',
+          required: false,
+          attributes: ['id', 'name']
+        }]
+      });
+    }
+  });
+
+  return ZendeskAccount;
+
+};
index 208f706..9363273 100644 (file)
@@ -1 +1,44 @@
-var _0x3ff7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x54\x52\x49\x4E\x47","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x61\x63\x63\x6F\x75\x6E\x74","\x61\x64\x64\x53\x63\x6F\x70\x65","\x53\x75\x62\x6A\x65\x63\x74","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x68\x61\x73\x4D\x61\x6E\x79","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x46\x69\x65\x6C\x64","\x46\x69\x65\x6C\x64\x49\x64","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];_0x3ff7[0];module[_0x3ff7[1]]=function(_0x31d5x1,_0x31d5x2){var _0x31d5x3=_0x31d5x1[_0x3ff7[18]](_0x3ff7[2],{name:_0x31d5x2[_0x3ff7[3]],description:_0x31d5x2[_0x3ff7[3]]},{tableName:_0x3ff7[4],associate:function(_0x31d5x4){_0x31d5x3[_0x3ff7[6]](_0x31d5x4.ZendeskAccount,{foreignKey:_0x3ff7[5]});_0x31d5x3[_0x3ff7[8]](_0x3ff7[7],function(_0x31d5x5){return {where:{AccountId:_0x31d5x5},include:[{all:true}]}});_0x31d5x3[_0x3ff7[11]](_0x31d5x4.ZendeskField,{as:_0x3ff7[9],foreignKey:_0x3ff7[10]});_0x31d5x3[_0x3ff7[11]](_0x31d5x4.ZendeskField,{as:_0x3ff7[12],foreignKey:_0x3ff7[13]});_0x31d5x3[_0x3ff7[11]](_0x31d5x4.ZendeskField,{as:_0x3ff7[14],foreignKey:_0x3ff7[15]});_0x31d5x3[_0x3ff7[17]](_0x31d5x4.Tag,{through:_0x3ff7[16]})}});return _0x31d5x3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ZendeskConfiguration = sequelize.define('ZendeskConfiguration', {
+    name: DataTypes.STRING,
+    description: DataTypes.STRING
+  }, {
+    tableName: 'zendesk_configurations',
+    associate: function(models) {
+      ZendeskConfiguration.belongsTo(models.ZendeskAccount, {
+        foreignKey: 'AccountId'
+      });
+      ZendeskConfiguration.addScope('account', function(AccountId) {
+        return {
+          where: {
+            AccountId: AccountId
+          },
+          include: [{
+            all: true
+          }]
+        }
+      });
+      ZendeskConfiguration.hasMany(models.ZendeskField, {
+        as: 'Subject',
+        foreignKey: 'SubjectId'
+      });
+      ZendeskConfiguration.hasMany(models.ZendeskField, {
+        as: 'Description',
+        foreignKey: 'DescriptionId'
+      });
+      ZendeskConfiguration.hasMany(models.ZendeskField, {
+        as: 'Field',
+        foreignKey: 'FieldId'
+      });
+      ZendeskConfiguration.belongsToMany(models.Tag, {
+        through: 'zendesk_configuration_has_tags'
+      });
+    }
+  });
+
+  return ZendeskConfiguration;
+
+};
index 1c32df9..278c7fa 100644 (file)
@@ -1 +1,32 @@
-var _0x5589=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0x5589[0];module[_0x5589[1]]=function(_0xc2cfx1,_0xc2cfx2){var _0xc2cfx3=_0xc2cfx1[_0x5589[12]](_0x5589[2],{type:{type:_0xc2cfx2.ENUM(_0x5589[3],_0x5589[4],_0x5589[5],_0x5589[6]),defaultValue:_0x5589[3]},content:_0xc2cfx2[_0x5589[7]],key:_0xc2cfx2[_0x5589[7]],keyType:{type:_0xc2cfx2.ENUM(_0x5589[3],_0x5589[4],_0x5589[5])},keyContent:_0xc2cfx2[_0x5589[7]],idField:_0xc2cfx2[_0x5589[8]],nameField:_0xc2cfx2[_0x5589[7]],customField:{type:_0xc2cfx2[_0x5589[9]],defaultValue:true},variableName:_0xc2cfx2[_0x5589[7]]},{tableName:_0x5589[10],associate:function(_0xc2cfx4){_0xc2cfx3[_0x5589[11]](_0xc2cfx4.Variable)}});return _0xc2cfx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ZendeskField = sequelize.define('ZendeskField', {
+    type: {
+      type: DataTypes.ENUM('string', 'variable', 'customVariable', 'keyValue'),
+      defaultValue: 'string'
+    },
+    content: DataTypes.STRING,
+    key: DataTypes.STRING,
+    keyType: {
+      type: DataTypes.ENUM('string', 'variable', 'customVariable')
+    },
+    keyContent: DataTypes.STRING,
+    idField: DataTypes.INTEGER,
+    nameField: DataTypes.STRING,
+    customField: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    variableName: DataTypes.STRING
+  }, {
+    tableName: 'zendesk_fields',
+    associate: function(models) {
+      ZendeskField.belongsTo(models.Variable);
+    }
+  });
+
+  return ZendeskField;
+
+};
index 511b217..11e609a 100644 (file)
@@ -1 +1,150 @@
-var _0x61d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x72\x72\x6F\x72\x73","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x65\x6E\x76","\x67\x65\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x61\x6C\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x75\x73\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x61\x6E\x73\x77\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72","\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x63\x75\x73\x74\x6F\x6D","\x2E\x2F\x61\x70\x69\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x74\x72\x65\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x74\x72\x69\x63","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64","\x2E\x2F\x61\x70\x69\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x75\x70\x64\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x70\x64\x61\x74\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x61\x67\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72","\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6D\x70\x61\x6E\x79","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x73\x65\x72\x76\x69\x63\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x65\x72\x76\x69\x63\x65","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x65\x72\x76\x69\x63\x65","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2F\x61\x70\x69\x2F\x74\x61\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x65\x6E\x71\x75\x69\x72\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x65\x6E\x71\x75\x69\x72\x79","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x76\x69\x73\x69\x74\x6F\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x69\x6E","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x6F\x75\x74","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79","\x2E\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79","\x2F\x61\x75\x74\x68","\x2E\x2F\x61\x75\x74\x68","\x2F\x3A\x75\x72\x6C\x28\x61\x70\x69\x7C\x61\x75\x74\x68\x7C\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x70\x70\x7C\x62\x6F\x77\x65\x72\x5F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x73\x73\x65\x74\x73\x29\x2F\x2A","\x72\x6F\x75\x74\x65","\x2F\x2A","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x75\x62\x6C\x69\x63","\x6A\x6F\x69\x6E","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6C\x69\x65\x6E\x74","\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x61\x6C\x6C"];_0x61d6[0];var config=require(_0x61d6[1]);var errors=require(_0x61d6[2]);var path=require(_0x61d6[3]);var moment=require(_0x61d6[4]);module[_0x61d6[5]]=function(_0x92d0x5){var _0x92d0x6=_0x92d0x5[_0x61d6[7]](_0x61d6[6]);_0x92d0x5[_0x61d6[10]](_0x61d6[8],require(_0x61d6[9]));_0x92d0x5[_0x61d6[10]](_0x61d6[11],require(_0x61d6[12]));_0x92d0x5[_0x61d6[10]](_0x61d6[13],require(_0x61d6[14]));_0x92d0x5[_0x61d6[10]](_0x61d6[15],require(_0x61d6[16]));_0x92d0x5[_0x61d6[10]](_0x61d6[17],require(_0x61d6[18]));_0x92d0x5[_0x61d6[10]](_0x61d6[19],require(_0x61d6[20]));_0x92d0x5[_0x61d6[10]](_0x61d6[21],require(_0x61d6[22]));_0x92d0x5[_0x61d6[10]](_0x61d6[23],require(_0x61d6[24]));_0x92d0x5[_0x61d6[10]](_0x61d6[25],require(_0x61d6[26]));_0x92d0x5[_0x61d6[10]](_0x61d6[27],require(_0x61d6[28]));_0x92d0x5[_0x61d6[10]](_0x61d6[29],require(_0x61d6[30]));_0x92d0x5[_0x61d6[10]](_0x61d6[31],require(_0x61d6[32]));_0x92d0x5[_0x61d6[10]](_0x61d6[33],require(_0x61d6[34]));_0x92d0x5[_0x61d6[10]](_0x61d6[35],require(_0x61d6[36]));_0x92d0x5[_0x61d6[10]](_0x61d6[37],require(_0x61d6[38]));_0x92d0x5[_0x61d6[10]](_0x61d6[39],require(_0x61d6[40]));_0x92d0x5[_0x61d6[10]](_0x61d6[41],require(_0x61d6[42]));_0x92d0x5[_0x61d6[10]](_0x61d6[43],require(_0x61d6[44]));_0x92d0x5[_0x61d6[10]](_0x61d6[45],require(_0x61d6[46]));_0x92d0x5[_0x61d6[10]](_0x61d6[47],require(_0x61d6[48]));_0x92d0x5[_0x61d6[10]](_0x61d6[49],require(_0x61d6[50]));_0x92d0x5[_0x61d6[10]](_0x61d6[51],require(_0x61d6[52]));_0x92d0x5[_0x61d6[10]](_0x61d6[53],require(_0x61d6[54]));_0x92d0x5[_0x61d6[10]](_0x61d6[55],require(_0x61d6[56]));_0x92d0x5[_0x61d6[10]](_0x61d6[57],require(_0x61d6[58]));_0x92d0x5[_0x61d6[10]](_0x61d6[59],require(_0x61d6[60]));_0x92d0x5[_0x61d6[10]](_0x61d6[61],require(_0x61d6[62]));_0x92d0x5[_0x61d6[10]](_0x61d6[63],require(_0x61d6[64]));_0x92d0x5[_0x61d6[10]](_0x61d6[65],require(_0x61d6[66]));_0x92d0x5[_0x61d6[10]](_0x61d6[67],require(_0x61d6[68]));_0x92d0x5[_0x61d6[10]](_0x61d6[69],require(_0x61d6[70]));_0x92d0x5[_0x61d6[10]](_0x61d6[71],require(_0x61d6[72]));_0x92d0x5[_0x61d6[10]](_0x61d6[73],require(_0x61d6[74]));_0x92d0x5[_0x61d6[10]](_0x61d6[75],require(_0x61d6[76]));_0x92d0x5[_0x61d6[10]](_0x61d6[77],require(_0x61d6[78]));_0x92d0x5[_0x61d6[10]](_0x61d6[79],require(_0x61d6[80]));_0x92d0x5[_0x61d6[10]](_0x61d6[81],require(_0x61d6[82]));_0x92d0x5[_0x61d6[10]](_0x61d6[83],require(_0x61d6[84]));_0x92d0x5[_0x61d6[10]](_0x61d6[85],require(_0x61d6[86]));_0x92d0x5[_0x61d6[10]](_0x61d6[87],require(_0x61d6[88]));_0x92d0x5[_0x61d6[10]](_0x61d6[89],require(_0x61d6[90]));_0x92d0x5[_0x61d6[10]](_0x61d6[91],require(_0x61d6[92]));_0x92d0x5[_0x61d6[10]](_0x61d6[93],require(_0x61d6[94]));_0x92d0x5[_0x61d6[10]](_0x61d6[95],require(_0x61d6[96]));_0x92d0x5[_0x61d6[10]](_0x61d6[97],require(_0x61d6[98]));_0x92d0x5[_0x61d6[10]](_0x61d6[99],require(_0x61d6[100]));_0x92d0x5[_0x61d6[10]](_0x61d6[101],require(_0x61d6[102]));_0x92d0x5[_0x61d6[10]](_0x61d6[103],require(_0x61d6[104]));_0x92d0x5[_0x61d6[10]](_0x61d6[105],require(_0x61d6[106]));_0x92d0x5[_0x61d6[10]](_0x61d6[107],require(_0x61d6[108]));_0x92d0x5[_0x61d6[10]](_0x61d6[109],require(_0x61d6[110]));_0x92d0x5[_0x61d6[10]](_0x61d6[111],require(_0x61d6[112]));_0x92d0x5[_0x61d6[10]](_0x61d6[113],require(_0x61d6[114]));_0x92d0x5[_0x61d6[10]](_0x61d6[115],require(_0x61d6[116]));_0x92d0x5[_0x61d6[10]](_0x61d6[117],require(_0x61d6[118]));_0x92d0x5[_0x61d6[10]](_0x61d6[119],require(_0x61d6[120]));_0x92d0x5[_0x61d6[10]](_0x61d6[121],require(_0x61d6[122]));_0x92d0x5[_0x61d6[10]](_0x61d6[123],require(_0x61d6[124]));_0x92d0x5[_0x61d6[10]](_0x61d6[125],require(_0x61d6[126]));_0x92d0x5[_0x61d6[10]](_0x61d6[127],require(_0x61d6[128]));_0x92d0x5[_0x61d6[10]](_0x61d6[129],require(_0x61d6[130]));_0x92d0x5[_0x61d6[10]](_0x61d6[131],require(_0x61d6[132]));_0x92d0x5[_0x61d6[10]](_0x61d6[133],require(_0x61d6[134]));_0x92d0x5[_0x61d6[10]](_0x61d6[135],require(_0x61d6[136]));_0x92d0x5[_0x61d6[10]](_0x61d6[137],require(_0x61d6[138]));_0x92d0x5[_0x61d6[10]](_0x61d6[139],require(_0x61d6[140]));_0x92d0x5[_0x61d6[10]](_0x61d6[141],require(_0x61d6[142]));_0x92d0x5[_0x61d6[10]](_0x61d6[143],require(_0x61d6[144]));_0x92d0x5[_0x61d6[10]](_0x61d6[145],require(_0x61d6[146]));_0x92d0x5[_0x61d6[10]](_0x61d6[147],require(_0x61d6[148]));_0x92d0x5[_0x61d6[10]](_0x61d6[149],require(_0x61d6[150]));_0x92d0x5[_0x61d6[10]](_0x61d6[151],require(_0x61d6[152]));_0x92d0x5[_0x61d6[10]](_0x61d6[153],require(_0x61d6[154]));_0x92d0x5[_0x61d6[10]](_0x61d6[155],require(_0x61d6[156]));_0x92d0x5[_0x61d6[10]](_0x61d6[157],require(_0x61d6[158]));_0x92d0x5[_0x61d6[10]](_0x61d6[159],require(_0x61d6[160]));_0x92d0x5[_0x61d6[10]](_0x61d6[161],require(_0x61d6[162]));_0x92d0x5[_0x61d6[10]](_0x61d6[163],require(_0x61d6[164]));_0x92d0x5[_0x61d6[10]](_0x61d6[165],require(_0x61d6[166]));_0x92d0x5[_0x61d6[10]](_0x61d6[167],require(_0x61d6[168]));_0x92d0x5[_0x61d6[10]](_0x61d6[169],require(_0x61d6[170]));_0x92d0x5[_0x61d6[10]](_0x61d6[171],require(_0x61d6[172]));_0x92d0x5[_0x61d6[10]](_0x61d6[153],require(_0x61d6[154]));_0x92d0x5[_0x61d6[10]](_0x61d6[173],require(_0x61d6[174]));_0x92d0x5[_0x61d6[10]](_0x61d6[175],require(_0x61d6[176]));_0x92d0x5[_0x61d6[10]](_0x61d6[177],require(_0x61d6[178]));_0x92d0x5[_0x61d6[10]](_0x61d6[179],require(_0x61d6[180]));_0x92d0x5[_0x61d6[10]](_0x61d6[181],require(_0x61d6[182]));_0x92d0x5[_0x61d6[10]](_0x61d6[183],require(_0x61d6[184]));_0x92d0x5[_0x61d6[10]](_0x61d6[185],require(_0x61d6[186]));_0x92d0x5[_0x61d6[10]](_0x61d6[187],require(_0x61d6[188]));_0x92d0x5[_0x61d6[10]](_0x61d6[189],require(_0x61d6[190]));_0x92d0x5[_0x61d6[10]](_0x61d6[191],require(_0x61d6[192]));_0x92d0x5[_0x61d6[10]](_0x61d6[193],require(_0x61d6[194]));_0x92d0x5[_0x61d6[10]](_0x61d6[195],require(_0x61d6[196]));_0x92d0x5[_0x61d6[10]](_0x61d6[197],require(_0x61d6[198]));_0x92d0x5[_0x61d6[10]](_0x61d6[199],require(_0x61d6[200]));_0x92d0x5[_0x61d6[202]](_0x61d6[201])[_0x61d6[7]](errors[404]);_0x92d0x5[_0x61d6[213]](_0x61d6[203],function(_0x92d0x7,_0x92d0x8,_0x92d0x9){var _0x92d0xa={};if(_0x61d6[204]===_0x92d0x6){_0x92d0xa[_0x61d6[205]]=path[_0x61d6[207]](config[_0x61d6[205]],_0x61d6[206])};if(_0x61d6[208]===_0x92d0x6||_0x61d6[209]===_0x92d0x6){_0x92d0xa[_0x61d6[205]]=path[_0x61d6[207]](config[_0x61d6[205]],_0x61d6[210])};_0x92d0x8[_0x61d6[212]](_0x61d6[211],_0x92d0xa)})}
\ No newline at end of file
+/**
+ * Main application routes
+ */
+
+'use strict';
+
+var config = require('./config/environment');
+var errors = require('./components/errors');
+var path = require('path');
+var moment = require('moment');
+
+module.exports = function(app) {
+  var env = app.get('env');
+
+  // Insert routes below
+  app.use('/api/report/calls', require('./api/report_call'));
+  app.use('/api/chat/proactives', require('./api/chat_proactive_action'));
+
+  app.use('/api/chat/websites/fields', require('./api/chat_websites_field'));
+  app.use('/api/answers', require('./api/canned_answer'));
+  app.use('/api/actions', require('./api/action'));
+  app.use('/api/pauses', require('./api/pause'));
+  app.use('/api/voice/recordings', require('./api/voice_recording'));
+  app.use('/api/jscripty/projects', require('./api/jscripty_project'));
+  app.use('/api/telephones', require('./api/telephone'));
+  app.use('/api/licenses', require('./api/license'));
+  app.use('/api/sugarcrm/fields', require('./api/sugarcrm_field'));
+  app.use('/api/sugarcrm/configurations', require('./api/sugarcrm_configuration'));
+  app.use('/api/sugarcrm/accounts', require('./api/sugarcrm_account'));
+  app.use('/api/freshdesk/fields', require('./api/freshdesk_field'));
+  app.use('/api/freshdesk/configurations', require('./api/freshdesk_configuration'));
+  app.use('/api/freshdesk/accounts', require('./api/freshdesk_account'));
+  app.use('/api/salesforce/fields', require('./api/salesforce_field'));
+  app.use('/api/salesforce/configurations', require('./api/salesforce_configuration'));
+  app.use('/api/salesforce/accounts', require('./api/salesforce_account'));
+  app.use('/api/desk/fields', require('./api/desk_field'));
+  app.use('/api/desk/configurations', require('./api/desk_configuration'));
+  app.use('/api/desk/accounts', require('./api/desk_account'));
+  app.use('/api/analytics/reports/default', require('./api/default_report'));
+  app.use('/api/analytics/reports/custom', require('./api/custom_report'));
+  app.use('/api/analytics/reports/trees', require('./api/report_tree'));
+  app.use('/api/analytics/metrics', require('./api/metric'));
+  app.use('/api/analytics/extracted', require('./api/extracted_report'));
+  app.use('/api/updates', require('./api/update'));
+  app.use('/api/report/chat/sessions', require('./api/report_chat_session'));
+  app.use('/api/zendesk/fields', require('./api/zendesk_field'));
+  app.use('/api/report/chats', require('./api/report_chat'));
+  app.use('/api/zendesk/configurations', require('./api/zendesk_configuration'));
+  app.use('/api/motionbar', require('./api/motionbar'));
+  app.use('/api/report/mail/sessions', require('./api/report_mail_session'));
+  app.use('/api/report/mails', require('./api/report_mail'));
+  app.use('/api/widgets', require('./api/widget'));
+  app.use('/api/zendesk/accounts', require('./api/zendesk_account'));
+  app.use('/api/report/queues', require('./api/report_queue'));
+  app.use('/api/report/integrations', require('./api/report_integration'));
+  app.use('/api/report/agents', require('./api/report_agent'));
+  app.use('/api/dashboards', require('./api/dashboard'));
+  app.use('/api/settings', require('./api/setting'));
+  app.use('/api/triggers', require('./api/trigger'));
+  app.use('/api/automations', require('./api/automation'));
+  app.use('/api/mail/templates', require('./api/mail_template'));
+  app.use('/api/ami', require('./api/ami'));
+  app.use('/api/integrations', require('./api/integration'));
+  app.use('/api/voice/musiconholds', require('./api/voice_musiconhold'));
+  app.use('/api/voice/voicemails/messages', require('./api/voice_voicemail_messages'));
+  app.use('/api/voice/voicemails', require('./api/voice_voicemail'));
+  app.use('/api/contactmanager/contacts', require('./api/contact_manager'));
+  app.use('/api/contactmanager/companies', require('./api/company'));
+  app.use('/api/contactmanager/services', require('./api/service'));
+  app.use('/api/contactmanager/user_has_services', require('./api/user_has_service'));
+  app.use('/api/intervals', require('./api/interval'));
+  app.use('/api/voice/extensions', require('./api/voice_extension'));
+  app.use('/api/voice/contexts', require('./api/voice_context'));
+  app.use('/api/voice/user_has_queues', require('./api/user_has_voice_queue'));
+  app.use('/api/voice/queues', require('./api/voice_queue'));
+  app.use('/api/trunks', require('./api/trunk'));
+  app.use('/api/chat/applications', require('./api/chat_application'));
+  app.use('/api/chat/user_has_queues', require('./api/user_has_chat_queue'));
+  app.use('/api/square/odbc', require('./api/square_odbc'));
+  app.use('/api/fax/applications', require('./api/fax_application'));
+  app.use('/api/fax/user_has_queues', require('./api/user_has_fax_queue'));
+  app.use('/api/fax/queues', require('./api/fax_queue'));
+  app.use('/api/mail/attachments', require('./api/mail_attachment'));
+  app.use('/api/user_has_teams', require('./api/user_has_team'));
+  app.use('/api/variables', require('./api/variable'));
+  app.use('/api/chanspy', require('./api/chanspy'));
+  app.use('/api/tags', require('./api/tag'));
+  app.use('/api/square/projects', require('./api/square_project'));
+  app.use('/api/chat/queues', require('./api/chat_queue'));
+  app.use('/api/fax/messages', require('./api/fax_message'));
+  app.use('/api/fax/rooms', require('./api/fax_room'));
+  app.use('/api/fax/accounts', require('./api/fax_account'));
+  app.use('/api/agents', require('./api/agent'));
+  app.use('/api/chat/enquiries', require('./api/chat_enquiry'));
+  app.use('/api/chat/messages', require('./api/chat_message'));
+  app.use('/api/chat/rooms', require('./api/chat_room'));
+  app.use('/api/chat/visitors', require('./api/chat_visitor'));
+  app.use('/api/chat/websites', require('./api/chat_website'));
+  app.use('/api/chat/queues', require('./api/chat_queue'));
+  app.use('/api/mail/accounts', require('./api/mail_account'));
+  app.use('/api/mail/messages', require('./api/mail_message'));
+  app.use('/api/mail/rooms', require('./api/mail_room'));
+  app.use('/api/mail/servers/in', require('./api/mail_server_in'));
+  app.use('/api/mail/servers/out', require('./api/mail_server_out'));
+  app.use('/api/mail/queues', require('./api/mail_queue'));
+  app.use('/api/mail/user_has_queues', require('./api/user_has_mail_queue'));
+  app.use('/api/mail/applications', require('./api/mail_application'));
+  app.use('/api/teams', require('./api/team'));
+  app.use('/api/sounds', require('./api/sound'));
+  app.use('/api/users', require('./api/user'));
+  app.use('/api/chat/user_has_rooms', require('./api/user_has_chat_room'));
+  app.use('/api/xchatty', require('./api/xchatty'));
+  app.use('/auth', require('./auth'));
+
+  // All undefined asset or api routes should return a 404
+  app.route('/:url(api|auth|components|app|bower_components|assets)/*').get(
+    errors[404]);
+
+  // All other routes should redirect to the index.html
+  app.all("/*", function(req, res, next) {
+
+    var options = {};
+
+    if ('production' === env) {
+      options.root = path.join(config.root, 'public');
+    }
+
+    if ('development' === env || 'test' === env) {
+      options.root = path.join(config.root, 'client');
+    }
+
+    res.sendFile('index.html', options);
+  });
+
+  // app
+  //   .route('/*')
+  //   .get(function(req, res) {
+  //
+  //     var options = {
+  //       root: config.root,
+  //       dotfiles: 'deny',
+  //       headers: {
+  //         'x-timestamp': Date.now(),
+  //         'x-sent': true
+  //       }
+  //     };
+  //
+  //     res.sendFile('index.html', options);
+  //   });
+};
index 5912fe8..5a75ac6 100644 (file)
@@ -1 +1,87 @@
-var _0x5be2=["\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x62\x75\x69\x6C\x64\x52\x65\x70\x6F\x72\x74","","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x66\x69\x65\x6C\x64","\x66\x6F\x72\x6D\x61\x74","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43","\x25\x73\x28\x25\x73\x29","\x25\x73\x20\x41\x53\x20\x27\x25\x73\x27","\x61\x6C\x69\x61\x73","\x70\x75\x73\x68","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x25\x73\x20\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x72\x6F\x75\x70","\x70\x61\x72\x73\x65","\x28\x29","\x53\x45\x4C\x45\x43\x54","\x20","\x2C","\x6A\x6F\x69\x6E","\x20\x46\x52\x4F\x4D\x20","\x74\x61\x62\x6C\x65","\x20\x57\x48\x45\x52\x45\x20","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3E\x3D\x20\x27","\x27","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3C\x3D\x20\x27","\x65\x6E\x64\x44\x61\x74\x65","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x66\x69\x6E\x64","\x20\x4C\x49\x4B\x45\x20\x27\x25","\x25\x27","\x66\x6F\x72\x4F\x77\x6E","\x6C\x65\x6E\x67\x74\x68","\x20\x41\x4E\x44\x20","\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20","\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20","\x28","\x72\x75\x6C\x65\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x76\x61\x6C\x75\x65","\x29"];var _=require(_0x5be2[0]);var util=require(_0x5be2[1]);exports[_0x5be2[2]]=function(_0xdd32x3,_0xdd32x4){var _0xdd32x5=[],_0xdd32x6=[],_0xdd32x7=[];_[_0x5be2[20]](_0xdd32x3.Fields,function(_0xdd32x8){var _0xdd32x9=_0x5be2[3];if(_0xdd32x8[_0x5be2[4]]){switch(_0xdd32x8[_0x5be2[4]]){case _0x5be2[8]:_0xdd32x9=util[_0x5be2[7]](_0x5be2[5],_0xdd32x8[_0x5be2[6]]);break;case _0x5be2[10]:_0xdd32x9=util[_0x5be2[7]](_0x5be2[9],_0xdd32x8[_0x5be2[6]],_0xdd32x8[_0x5be2[6]]);break;case _0x5be2[12]:_0xdd32x9=util[_0x5be2[7]](_0x5be2[11],_0xdd32x8[_0x5be2[6]],_0xdd32x8[_0x5be2[6]]);break;default:_0xdd32x9=util[_0x5be2[7]](_0x5be2[13],_0xdd32x8[_0x5be2[4]],_0xdd32x8[_0x5be2[6]])}}else {_0xdd32x9=_0xdd32x8[_0x5be2[6]]};_0xdd32x5[_0x5be2[16]](util[_0x5be2[7]](_0x5be2[14],_0xdd32x9,_0xdd32x8[_0x5be2[15]]));if(_0xdd32x8[_0x5be2[17]]){_0xdd32x6[_0x5be2[16]](_0xdd32x8[_0x5be2[6]])};if(_0xdd32x8[_0x5be2[18]]){_0xdd32x7[_0x5be2[16]](util[_0x5be2[7]](_0x5be2[19],_0xdd32x8[_0x5be2[6]],_0xdd32x8[_0x5be2[18]]))}});var _0xdd32xa=_0xdd32x3[_0x5be2[21]]?getConditions(JSON[_0x5be2[23]](_0xdd32x3[_0x5be2[21]])[_0x5be2[22]]):_0x5be2[24];var _0xdd32xb=_0x5be2[25];_0xdd32xb+=_0x5be2[26]+_0xdd32x5[_0x5be2[28]](_0x5be2[27]);_0xdd32xb+=_0x5be2[29]+_0xdd32x3[_0x5be2[30]];_0xdd32xb+=_0xdd32xa!==_0x5be2[24]?_0x5be2[31]+_0xdd32xa:_0x5be2[3];var _0xdd32xc,_0xdd32xd;var _0xdd32xe=[];if(_0xdd32x4){_[_0x5be2[42]](_0xdd32x4,function(_0xdd32xf,_0xdd32x10){switch(_0xdd32x10){case _0x5be2[34]:_0xdd32xe[_0x5be2[16]](_0x5be2[32]+_0xdd32xf+_0x5be2[33]);break;case _0x5be2[36]:_0xdd32xe[_0x5be2[16]](_0x5be2[35]+_0xdd32xf+_0x5be2[33]);break;case _0x5be2[37]:;case _0x5be2[38]:break;default:var _0xdd32x11=_[_0x5be2[39]](_0xdd32x3.Fields,{alias:_0xdd32x10});if(_0xdd32x11){_0xdd32xe[_0x5be2[16]](_0xdd32x11[_0x5be2[6]]+_0x5be2[40]+_0xdd32xf+_0x5be2[41])}else {_0xdd32xe[_0x5be2[16]](_0xdd32x10+_0x5be2[40]+_0xdd32xf+_0x5be2[41])}}})};if(_0xdd32xe[_0x5be2[43]]){_0xdd32xb+=((_0xdd32xa!==_0x5be2[24])?_0x5be2[44]:_0x5be2[31])+_0xdd32xe[_0x5be2[28]](_0x5be2[44])};_0xdd32xb+=_0xdd32x6[_0x5be2[43]]?_0x5be2[45]+_0xdd32x6[_0x5be2[28]](_0x5be2[27]):_0x5be2[3];_0xdd32xb+=_0xdd32x7[_0x5be2[43]]?_0x5be2[46]+_0xdd32x7[_0x5be2[28]](_0x5be2[27]):_0x5be2[3];return _0xdd32xb};function getConditions(_0xdd32x13){if(!_0xdd32x13){return _0x5be2[24]};for(var _0xdd32x14=_0x5be2[47],_0xdd32x15=0;_0xdd32x15<_0xdd32x13[_0x5be2[48]][_0x5be2[43]];_0xdd32x15++){_0xdd32x15>0&&(_0xdd32x14+=_0x5be2[26]+_0xdd32x13[_0x5be2[49]]+_0x5be2[26]);_0xdd32x14+=_0xdd32x13[_0x5be2[48]][_0xdd32x15][_0x5be2[22]]?getConditions(_0xdd32x13[_0x5be2[48]][_0xdd32x15][_0x5be2[22]]):_0xdd32x13[_0x5be2[48]][_0xdd32x15][_0x5be2[6]]+_0x5be2[26]+_0xdd32x13[_0x5be2[48]][_0xdd32x15][_0x5be2[50]]+_0x5be2[51]+(_0xdd32x13[_0x5be2[48]][_0xdd32x15][_0x5be2[50]]===_0x5be2[52]?_0x5be2[53]+_0xdd32x13[_0x5be2[48]][_0xdd32x15][_0x5be2[54]]+_0x5be2[53]:_0xdd32x13[_0x5be2[48]][_0xdd32x15][_0x5be2[54]])+_0x5be2[33]};return _0xdd32x14+_0x5be2[55]}
\ No newline at end of file
+var _ = require('lodash');
+var util = require('util');
+
+exports.buildReport = function(report, query) {
+  var fields = [],
+    groupBy = [],
+    orderBy = [];
+  _.forEach(report.Fields, function(elem) {
+    var field = '';
+    if (elem.function) {
+      switch (elem.function) {
+        case 'COUNT DISTINCT':
+          field = util.format('COUNT(DISTINCT %s)', elem.field);
+          break;
+        case 'GROUP_CONCAT ASC':
+          field = util.format('GROUP_CONCAT(%s ORDER BY %s ASC)', elem.field, elem.field);
+          break;
+        case 'GROUP_CONCAT DESC':
+          field = util.format('GROUP_CONCAT(%s ORDER BY %s DESC)', elem.field, elem.field);
+          break;
+        default:
+          field = util.format('%s(%s)', elem.function, elem.field);
+      }
+    } else {
+      field = elem.field;
+    }
+    fields.push(util.format('%s AS \'%s\'', field, elem.alias));
+    if (elem.groupBy) {
+      groupBy.push(elem.field);
+    }
+    if (elem.orderBy) {
+      orderBy.push(util.format('%s %s', elem.field, elem.orderBy));
+    }
+  });
+
+  var conditions = report.conditions ? getConditions(JSON.parse(report.conditions).group) : '()';
+  var resultQuery = 'SELECT';
+  // query += fields.length ? ' ' + fields.join(',') : ' *';//right if you want to select all fields also
+  resultQuery += ' ' + fields.join(','); //generate a wrong query if there isn' t any field
+  resultQuery += ' FROM ' + report.table;
+  resultQuery += conditions !== '()' ? ' WHERE ' + conditions : '';
+  var startDate, endDate;
+  var otherConditions = [];
+  if (query) {
+    _.forOwn(query, function(value, key) {
+      switch (key) {
+        case 'startDate':
+          otherConditions.push('createdAt >= \'' + value + '\'');
+          break;
+        case 'endDate':
+          otherConditions.push('createdAt <= \'' + value + '\'');
+          break;
+        case 'offset':
+        case 'limit':
+          break;
+        default:
+          var column = _.find(report.Fields, {
+            alias: key
+          });
+          if (column) {
+            otherConditions.push(column.field + ' LIKE \'%' + value + '%\'');
+          } else {
+            otherConditions.push(key + ' LIKE \'%' + value + '%\'');
+          }
+      }
+    });
+  }
+  if (otherConditions.length) {
+    resultQuery += ((conditions !== '()') ? ' AND ' : ' WHERE ') + otherConditions.join(' AND ');
+  }
+  resultQuery += groupBy.length ? ' GROUP BY ' + groupBy.join(',') : '';
+  resultQuery += orderBy.length ? ' ORDER BY ' + orderBy.join(',') : '';
+
+  return resultQuery;
+}
+
+function getConditions(group) {
+
+  if (!group) return "()";
+  for (var str = "(", i = 0; i < group.rules.length; i++) {
+    i > 0 && (str += " " + group.operator + " ");
+    str += group.rules[i].group ?
+      getConditions(group.rules[i].group) :
+      group.rules[i].field + " " + group.rules[i].condition + " '" + (group.rules[i].condition === 'LIKE' ? "%" + group.rules[i].value + "%" : group.rules[i].value) + "'";
+  }
+  return str + ')';
+}
index 21fce26..0d973b7 100644 (file)
@@ -1 +1,197 @@
-var _0x1ccc=["\x74\x6F\x2D\x63\x73\x76","\x70\x64\x66\x6D\x61\x6B\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x73","\x6D\x6F\x6D\x65\x6E\x74","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x66\x6F\x6E\x74\x73","\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x6A\x6F\x69\x6E","\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x44\x46","\x70\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x43\x53\x56","\x63\x73\x76","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x62\x75\x69\x6C\x64\x52\x65\x70\x6F\x72\x74","\x6C\x6F\x67","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x65\x6D\x70\x74\x79","\x71\x75\x65\x72\x79\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F","\x6E\x61\x6D\x65","\x5F","\x2E\x70\x64\x66","\x61\x6C\x69\x61\x73","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x68\x65\x61\x64\x65\x72","\x73\x74\x61\x72\x74\x44\x61\x74\x65","","\x20\x2D\x20","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65\x45\x78\x61\x6D\x70\x6C\x65","\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x73","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x72\x72\x6F\x72","\x70\x64\x66\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x66\x69\x6E\x69\x73\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x70\x69\x70\x65","\x65\x6E\x64","\x70\x64\x66\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2E\x63\x73\x76","\x63\x73\x76\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x63\x73\x76\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x77\x69\x74\x68\x20\x65\x72\x72\x6F\x72\x20\x3A\x20","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];var csv=require(_0x1ccc[0]);var pdfMake=require(_0x1ccc[1]);var _=require(_0x1ccc[2]);var util=require(_0x1ccc[3]);var ExtractedReport=require(_0x1ccc[5])[_0x1ccc[4]];var sequelize=require(_0x1ccc[5])[_0x1ccc[6]];var fs=require(_0x1ccc[7]);var moment=require(_0x1ccc[8]);var sr=require(_0x1ccc[9]);var path=require(_0x1ccc[10]);var config=require(_0x1ccc[11]);var reportBuildUtils=require(_0x1ccc[12]);var fonts={Roboto:{normal:path[_0x1ccc[15]](config[_0x1ccc[13]],_0x1ccc[14]),bold:path[_0x1ccc[15]](config[_0x1ccc[13]],_0x1ccc[16]),italics:path[_0x1ccc[15]](config[_0x1ccc[13]],_0x1ccc[17]),bolditalics:path[_0x1ccc[15]](config[_0x1ccc[13]],_0x1ccc[17])}};exports[_0x1ccc[18]]=function(_0xf987xe,_0xf987xf,_0xf987x10){general(_0xf987xe,_0xf987xf,_0xf987x10,_0x1ccc[19])};exports[_0x1ccc[20]]=function(_0xf987xe,_0xf987xf,_0xf987x10){general(_0xf987xe,_0xf987xf,_0xf987x10,_0x1ccc[21])};function general(_0xf987xe,_0xf987xf,_0xf987x10,_0xf987x12){extract(_0xf987xe,_0xf987xf,_0xf987x10,_0xf987x12)}function extract(_0xf987xe,_0xf987x14,_0xf987x10,_0xf987x12){var _0xf987xf=reportBuildUtils[_0x1ccc[23]](_0xf987xe[_0x1ccc[22]],_0xf987x14);sequelize[_0x1ccc[33]](_0xf987xf,{type:sequelize[_0x1ccc[32]][_0x1ccc[31]]})[_0x1ccc[30]](function(_0xf987x16){if(_0xf987x16){if(_0xf987x16[_0x1ccc[27]]){switch(_0xf987x12){case _0x1ccc[19]:createPdf(_0xf987x16,_0xf987xe,_0xf987x14,_0xf987x10);break;case _0x1ccc[21]:createCsv(_0xf987x16,_0xf987xe,_0xf987x14,_0xf987x10);break;default:createCsv(_0xf987x16,_0xf987xe,_0xf987x14,_0xf987x10)}}else {updateExtracted(_0xf987x10,null,_0x1ccc[28])}}else {updateExtracted(_0xf987x10,null,_0x1ccc[29])}})[_0x1ccc[26]](function(_0xf987x15){console[_0x1ccc[24]](_0xf987x15);updateExtracted(_0xf987x10,null,_0x1ccc[25])})}function createPdf(_0xf987x16,_0xf987xe,_0xf987x14,_0xf987x18){var _0xf987x19=sr({length:20,prefix:_0x1ccc[34]+_0xf987xe[_0x1ccc[35]]+_0x1ccc[36],suffix:_0x1ccc[37]});var _0xf987x1a=[];_[_0x1ccc[41]](_0xf987xe.Fields,function(_0xf987x1b){_0xf987x1a[_0x1ccc[40]]({text:_0xf987x1b[_0x1ccc[38]],style:_0x1ccc[39]})});var _0xf987x1c=[_0xf987x1a];_[_0x1ccc[41]](_0xf987x16,function(_0xf987x1b){var _0xf987x1d=[];_[_0x1ccc[44]](_0xf987x1b,function(_0xf987x1e,_0xf987x1f){_0xf987x1d[_0x1ccc[40]](_0xf987x1e instanceof Date?moment(_0xf987x1e)[_0x1ccc[43]](_0x1ccc[42]).toString():_0xf987x1e)});_0xf987x1c[_0x1ccc[40]](_0xf987x1d)});var _0xf987x20={content:[{text:_0xf987xe[_0x1ccc[35]],style:_0x1ccc[45]},_0xf987x14[_0x1ccc[46]]?moment(_0xf987x14[_0x1ccc[46]])[_0x1ccc[43]](_0x1ccc[42]).toString():_0x1ccc[47]+_0x1ccc[48]+_0xf987x14[_0x1ccc[49]]?moment(_0xf987x14[_0x1ccc[49]])[_0x1ccc[43]](_0x1ccc[42]).toString():_0x1ccc[47],{style:_0x1ccc[50],table:{headerRows:1,body:_0xf987x1c}}],styles:{header:{fontSize:18,bold:true,margin:[0,0,0,10]},subheader:{fontSize:16,bold:true,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:true,fontSize:13,color:_0x1ccc[51]}}};var _0xf987x21= new pdfMake(fonts);var _0xf987x22=_0xf987x21[_0x1ccc[52]](_0xf987x20);if(_0xf987x22){var _0xf987x23=fs[_0x1ccc[54]](config[_0x1ccc[53]]+_0xf987x19);_0xf987x23[_0x1ccc[57]](_0x1ccc[55],function(){updateExtracted(_0xf987x18,null,_0x1ccc[56])});_0xf987x23[_0x1ccc[57]](_0x1ccc[58],function(){updateExtracted(_0xf987x18,_0xf987x19,_0x1ccc[59])});_0xf987x22[_0x1ccc[60]](_0xf987x23);_0xf987x22[_0x1ccc[61]]()}else {updateExtracted(_0xf987x18,null,_0x1ccc[62])}}function createCsv(_0xf987x16,_0xf987xe,_0xf987x14,_0xf987x18){var _0xf987x19=sr({length:20,prefix:_0x1ccc[34]+_0xf987xe[_0x1ccc[35]]+_0x1ccc[36],suffix:_0x1ccc[63]});var _0xf987x25=csv(_0xf987x16);if(_0xf987x25){fs[_0x1ccc[65]](config[_0x1ccc[53]]+_0xf987x19,_0xf987x25,function(_0xf987x15){if(_0xf987x15){console[_0x1ccc[24]](_0xf987x15);updateExtracted(_0xf987x18,null,_0x1ccc[64])}else {updateExtracted(_0xf987x18,_0xf987x19,_0x1ccc[59])}})}else {updateExtracted(_0xf987x18,null,_0x1ccc[66])}}function updateExtracted(_0xf987x18,_0xf987x19,_0xf987x27){ExtractedReport[_0x1ccc[69]]({status:_0xf987x27,savename:_0xf987x19},{where:{id:_0xf987x18}})[_0x1ccc[30]](function(){console[_0x1ccc[24]](_0x1ccc[68])})[_0x1ccc[26]](function(_0xf987x15){console[_0x1ccc[24]](_0x1ccc[67]+_0xf987x15)})}
\ No newline at end of file
+var csv = require('to-csv');
+var pdfMake = require('pdfmake');
+var _ = require('lodash');
+var util = require('util');
+var ExtractedReport = require('../models').ExtractedReport;
+var sequelize = require('../models').sequelize;
+var fs = require('fs');
+var moment = require('moment');
+var sr = require('simple-random');
+var path = require('path');
+var config = require('../config/environment');
+var reportBuildUtils = require('./report_build');
+var fonts = {
+  Roboto: {
+    normal: path.join(config.fonts, 'Roboto-Regular.ttf'),
+    bold: path.join(config.fonts, 'Roboto-Medium.ttf'),
+    italics: path.join(config.fonts, 'Roboto-Italic.ttf'),
+    bolditalics: path.join(config.fonts, 'Roboto-Italic.ttf')
+  }
+};
+
+exports.extractPDF = function(report, query, extractedId) {
+  // console.log('--loaded external extractPDF function, calling general...');
+  general(report, query, extractedId, 'pdf');
+}
+
+exports.extractCSV = function(report, query, extractedId) {
+  // console.log('--loaded external extractCSV function, calling general...');
+  general(report, query, extractedId, 'csv');
+}
+
+function general(report, query, extractedId, type) {
+  // console.log('--general function, calling extract function...');
+  extract(report, query, extractedId, type);
+}
+
+function extract(report, dataQuery, extractedId, type) {
+  // console.log('--extract function, building query...');
+  var query = reportBuildUtils.buildReport(report.dataValues, dataQuery);
+  // console.log('--the query is :', query);
+  // console.log('--extracting the report...');
+  sequelize.query(query, {
+      type: sequelize.QueryTypes.SELECT
+    })
+    .then(function(res) {
+      if (res) {
+        if (res.length) {
+          // console.log('--report extracted, creating output as: ' + type);
+          switch (type) {
+            case 'pdf':
+              createPdf(res, report, dataQuery, extractedId);
+              break;
+            case 'csv':
+              createCsv(res, report, dataQuery, extractedId);
+              break;
+            default:
+              createCsv(res, report, dataQuery, extractedId);
+          }
+        } else {
+          updateExtracted(extractedId, null, 'empty');
+        }
+      } else {
+        // console.log('--error executing the report query');
+        updateExtracted(extractedId, null, 'query extraction error');
+
+      }
+    })
+    .catch(function(err) {
+      console.log(err);
+      updateExtracted(extractedId, null, 'query error');
+    });
+}
+
+function createPdf(res, report, dataQuery, id) {
+  // console.log('--pdf function, creating pdf output...');
+  var filename = sr({
+    length: 20,
+    prefix: "report_" + report.name + '_',
+    suffix: ".pdf"
+  });
+  var tableHeader = [];
+  _.forEach(report.Fields, function(elem) {
+    tableHeader.push({
+      text: elem.alias,
+      style: 'tableHeader'
+    });
+  });
+  var tableBody = [tableHeader];
+  _.forEach(res, function(elem) {
+    var row = [];
+    _.forOwn(elem, function(value, key) {
+      row.push(value instanceof Date ? moment(value).format("MM-DD-YYYY HH:mm").toString() : value);
+    });
+    tableBody.push(row);
+  });
+  var pdfContent = {
+    content: [{
+        text: report.name,
+        style: 'header'
+      },
+      dataQuery.startDate ? moment(dataQuery.startDate).format("MM-DD-YYYY HH:mm").toString() : '' + ' - ' + dataQuery.endDate ? moment(dataQuery.endDate).format("MM-DD-YYYY HH:mm").toString() :
+      '', {
+        style: 'tableExample',
+        table: {
+          headerRows: 1,
+          // keepWithHeaderRows: 1,
+          // dontBreakRows: true,
+          body: tableBody
+        }
+      }
+    ],
+    styles: {
+      header: {
+        fontSize: 18,
+        bold: true,
+        margin: [0, 0, 0, 10]
+      },
+      subheader: {
+        fontSize: 16,
+        bold: true,
+        margin: [0, 10, 0, 5]
+      },
+      tableExample: {
+        margin: [0, 5, 0, 15]
+      },
+      tableHeader: {
+        bold: true,
+        fontSize: 13,
+        color: 'black'
+      }
+    }
+  };
+
+  var printer = new pdfMake(fonts);
+  var pdfDoc = printer.createPdfKitDocument(pdfContent);
+  if (pdfDoc) {
+    // pdfDoc is a stream so you can pipe it to the file system
+    var writeStream = fs.createWriteStream(config.reports + filename);
+    writeStream.on('error', function() {
+      // console.log('--pdf write error');
+      updateExtracted(id, null, 'pdf write error')
+    });
+    writeStream.on('finish', function() {
+      // console.log('--pdf write finished');
+      updateExtracted(id, filename, 'completed')
+    });
+    pdfDoc.pipe(writeStream);
+    pdfDoc.end();
+  } else {
+    // console.log('--pdf creation error');
+    updateExtracted(id, null, 'pdf creation error')
+  }
+}
+
+function createCsv(res, report, dataQuery, id) {
+  // console.log(res);
+  // console.log('--csv function, creating pdf output...');
+  var filename = sr({
+    length: 20,
+    prefix: "report_" + report.name + '_',
+    suffix: ".csv"
+  });
+  var csv_report = csv(res);
+  if (csv_report) {
+    fs.writeFile(config.reports + filename, csv_report, function(err) {
+      if (err) {
+        // console.log('--csv write error');
+        console.log(err);
+        updateExtracted(id, null, 'csv write error')
+      } else {
+        // console.log('--csv write completed');
+        updateExtracted(id, filename, 'completed')
+      }
+    });
+  } else {
+    // console.log('--csv creation error');
+    updateExtracted(id, null, 'csv creation error')
+  }
+}
+
+function updateExtracted(id, filename, status) {
+  // console.log('--updating the extracted report db row..');
+  ExtractedReport.update({
+      status: status,
+      savename: filename
+    }, {
+      where: {
+        id: id
+      }
+    })
+    .then(function() {
+      console.log('--Finished extracting report');
+    })
+    .catch(function(err) {
+      console.log('--Finished extracting report with error : ' + err);
+    });
+}
index c0a64bb..210cfd3 100644 (file)
@@ -1 +1,214 @@
-var _0x6f9f=["\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x69\x64","\x62\x6F\x64\x79","\x74\x68\x65\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65","\x61\x6C\x6C","\x65\x78\x74\x65\x6E","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x61\x67\x29\x3D\x25\x73","\x74\x61\x67","\x2D\x2D","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x25\x73\x3F\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73\x3A\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x61\x70\x70","\x44\x69\x61\x6C","\x61\x70\x70\x64\x61\x74\x61","\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29\x3D\x25\x73","\x4E\x6F\x4F\x50","\x53\x6B\x69\x70\x70\x65\x64\x20\x43\x61\x6C\x6C\x65\x72\x49\x44\x20\x53\x65\x74","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x77\x61\x76\x2C\x61\x62","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x51\x75\x65\x75\x65","\x41\x6E\x73\x77\x65\x72","","\x53\x6B\x69\x70\x70\x65\x64\x20\x41\x6E\x73\x77\x65\x72","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x24\x7B\x45\x58\x54\x45\x4E\x3A\x25\x64\x7D","\x2C","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73"];var _=require(_0x6f9f[0]);var util=require(_0x6f9f[1]);var Interval=require(_0x6f9f[3])[_0x6f9f[2]];var sequelize=require(_0x6f9f[3])[_0x6f9f[4]];var VoiceExtension=require(_0x6f9f[3])[_0x6f9f[5]];exports[_0x6f9f[6]]=createApplications;exports[_0x6f9f[7]]=function(_0x6c52x6,_0x6c52x7){var sequelize=require(_0x6f9f[3])[_0x6f9f[4]];var VoiceExtension=require(_0x6f9f[3])[_0x6f9f[5]];if(_0x6c52x6[_0x6f9f[9]][_0x6f9f[8]]){delete _0x6c52x6[_0x6f9f[9]][_0x6f9f[8]]};return VoiceExtension[_0x6f9f[16]](_0x6c52x6[_0x6f9f[9]],{where:{id:_0x6c52x6[_0x6f9f[14]][_0x6f9f[8]]},transaction:_0x6c52x7})[_0x6f9f[10]](function(_0x6c52x8){if(_0x6c52x6[_0x6f9f[9]][_0x6f9f[11]]){_0x6c52x6[_0x6f9f[9]][_0x6f9f[8]]=_0x6c52x6[_0x6f9f[14]][_0x6f9f[8]];return VoiceExtension[_0x6f9f[15]]({where:{VoiceExtensionId:_0x6c52x6[_0x6f9f[14]][_0x6f9f[8]]},transaction:_0x6c52x7})}})[_0x6f9f[10]](function(){if(_0x6c52x6[_0x6f9f[9]][_0x6f9f[11]]&&Array[_0x6f9f[12]](_0x6c52x6[_0x6f9f[9]].Applications)&&_0x6c52x6[_0x6f9f[9]][_0x6f9f[11]][_0x6f9f[13]]){return _0x6c52x6[_0x6f9f[9]]}})[_0x6f9f[10]](createApplications(_0x6c52x6[_0x6f9f[9]].Applications,_0x6c52x7))};function createApplications(_0x6c52xa,_0x6c52x7){var Interval=require(_0x6f9f[3])[_0x6f9f[2]];var VoiceExtension=require(_0x6f9f[3])[_0x6f9f[5]];return function(_0x6c52x8){if(_0x6c52x8){return Interval[_0x6f9f[61]]()[_0x6f9f[10]](function(_0x6c52xb){var _0x6c52xc=2;var _0x6c52xd={exten:_0x6c52x8[_0x6f9f[18]],type:_0x6c52x8[_0x6f9f[19]],context:_0x6c52x8[_0x6f9f[20]],VoiceExtensionId:_0x6c52x8[_0x6f9f[8]]};var _0x6c52xe=[];var _0x6c52xf=6;var _0x6c52x10=[];_0x6c52x10[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[21],appdata:util[_0x6f9f[23]](_0x6f9f[22],_0x6c52x8[_0x6f9f[19]]),priority:_0x6c52xc},_0x6c52xd));_0x6c52xc++;if(_0x6c52x8[_0x6f9f[19]]===_0x6f9f[26]){_0x6c52x10[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[21],appdata:util[_0x6f9f[23]](_0x6f9f[27],_0x6c52x8[_0x6f9f[28]]||_0x6f9f[29]),priority:_0x6c52xc},_0x6c52xd));_0x6c52xc++};_0x6c52xe[_0x6f9f[25]](VoiceExtension[_0x6f9f[30]](_0x6c52x10,{transaction:_0x6c52x7}));_0x6c52xa[_0x6f9f[40]](function(_0x6c52x11){var _0x6c52x12=[];var _0x6c52x13=[];if(_0x6c52x11[_0x6f9f[31]]){var _0x6c52x14=_[_0x6f9f[32]](_0x6c52xb,{IntervalId:_0x6c52x11[_0x6f9f[31]]});_0x6c52x12=_0x6c52x14[_0x6f9f[13]]?_[_0x6f9f[34]](_0x6c52x14,_0x6f9f[33]):[_0x6f9f[35]];var _0x6c52x15=_[_0x6f9f[36]](_0x6c52xb,{id:_0x6c52x11[_0x6f9f[31]]});_0x6c52x11[_0x6f9f[33]]=_0x6c52x15?_0x6c52x15[_0x6f9f[37]]:_0x6f9f[35]}else {_0x6c52x12=[_0x6c52x11[_0x6f9f[33]]]};var _0x6c52x16=_0x6c52x12[_0x6f9f[13]];_0x6c52x12[_0x6f9f[40]](function(_0x6c52x17,_0x6c52x18){_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[38],appdata:util[_0x6f9f[23]](_0x6f9f[39],_0x6c52x17,_0x6c52x8[_0x6f9f[20]],_0x6c52xc+(_0x6c52x16-_0x6c52x18),_0x6c52x8[_0x6f9f[20]],((_0x6c52x18+1)<_0x6c52x16)?_0x6c52xc+1:_0x6c52xc+_0x6c52xf),priority:_0x6c52xc},_0x6c52xd));_0x6c52xc++});if(_0x6c52x11[_0x6f9f[41]]===_0x6f9f[42]&&_0x6c52x11[_0x6f9f[43]][1]&&_0x6c52x8[_0x6f9f[19]]===_0x6f9f[26]){_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[21],appdata:util[_0x6f9f[23]](_0x6f9f[44],_0x6c52x11[_0x6f9f[43]][1]),priority:_0x6c52xc},_0x6c52xd))}else {_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[45],appdata:_0x6f9f[46],priority:_0x6c52xc},_0x6c52xd))};_0x6c52xc++;if(_0x6c52x11[_0x6f9f[41]]===_0x6f9f[42]&&_0x6c52x8[_0x6f9f[47]]&&_0x6c52x8[_0x6f9f[19]]===_0x6f9f[26]){_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[48],appdata:_0x6f9f[49],priority:_0x6c52xc},_0x6c52xd))}else {_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[45],appdata:_0x6f9f[50],priority:_0x6c52xc},_0x6c52xd))};_0x6c52xc++;if(_0x6c52x11[_0x6f9f[41]]===_0x6f9f[51]){_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[52],appdata:_0x6f9f[53],priority:_0x6c52xc},_0x6c52xd))}else {_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[45],appdata:_0x6f9f[54],priority:_0x6c52xc},_0x6c52xd))};_0x6c52xc++;if(_0x6c52x11[_0x6f9f[41]]===_0x6f9f[42]&&_0x6c52x8[_0x6f9f[19]]===_0x6f9f[26]){_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6c52x11[_0x6f9f[41]],appdata:util[_0x6f9f[23]](_0x6f9f[55],_0x6c52x11[_0x6f9f[43]][0],_0x6c52x11[_0x6f9f[43]][3]||_0x6f9f[53],_0x6c52x11[_0x6f9f[43]][2]||0),priority:_0x6c52xc,IntervalId:_0x6c52x11[_0x6f9f[31]]||null,interval:_0x6c52x11[_0x6f9f[33]]||_0x6f9f[35],isApp:true,callerID:_0x6c52x11[_0x6f9f[43]][1]||null},_0x6c52xd))}else {_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6c52x11[_0x6f9f[41]],appdata:_0x6c52x11[_0x6f9f[43]][_0x6f9f[57]](_0x6f9f[56]),priority:_0x6c52xc,IntervalId:_0x6c52x11[_0x6f9f[31]],interval:_0x6c52x11[_0x6f9f[33]]||_0x6f9f[35],isApp:true},_0x6c52xd))};_0x6c52xc++;if(_0x6c52x11[_0x6f9f[41]]===_0x6f9f[42]&&_0x6c52x8[_0x6f9f[47]]&&_0x6c52x8[_0x6f9f[19]]===_0x6f9f[26]){_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[58],appdata:_0x6f9f[53],priority:_0x6c52xc},_0x6c52xd))}else {_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[45],appdata:_0x6f9f[59],priority:_0x6c52xc},_0x6c52xd))};_0x6c52xc++;_0x6c52x13[_0x6f9f[25]](_[_0x6f9f[24]]({app:_0x6f9f[45],appdata:_0x6c52x11[_0x6f9f[41]]+_0x6f9f[60],priority:_0x6c52xc},_0x6c52xd));_0x6c52xc++;_0x6c52xe[_0x6f9f[25]](VoiceExtension[_0x6f9f[30]](_0x6c52x13,{transaction:_0x6c52x7}))});return _0x6c52xe})[_0x6f9f[17]]()}}}function handleError(_0x6c52x1a,_0x6c52x1b){return _0x6c52x1a[_0x6f9f[63]](500)[_0x6f9f[62]](_0x6c52x1b)}
\ No newline at end of file
+var _ = require('lodash');
+var util = require('util');
+var Interval = require('../models').Interval;
+var sequelize = require('../models').sequelize;
+var VoiceExtension = require('../models').VoiceExtension;
+
+exports.createApps = createApplications;
+
+exports.routeUpdate = function(req, t) {
+  var sequelize = require('../models').sequelize;
+  var VoiceExtension = require('../models').VoiceExtension;
+  if (req.body.id) {
+    delete req.body.id;
+  }
+  return VoiceExtension
+    .update(req.body, {
+      where: {
+        id: req.params.id
+      },
+      transaction: t
+    })
+    .then(function(route) {
+      if (req.body.Applications) {
+        req.body.id = req.params.id;
+        return VoiceExtension
+          .destroy({
+            where: {
+              VoiceExtensionId: req.params.id
+            },
+            transaction: t
+          });
+      }
+    })
+    .then(function() {
+      if (req.body.Applications && Array.isArray(req.body.Applications) && req.body.Applications.length) {
+        return req.body;
+      }
+    })
+    .then(createApplications(req.body.Applications, t));
+}
+
+
+function createApplications(applications, t) {
+  var Interval = require('../models').Interval;
+  var VoiceExtension = require('../models').VoiceExtension;
+  return function(route) {
+    if (route) {
+      return Interval
+        .findAll() //find all existing intervals
+        .then(function(intervals) {
+          var priority = 2;
+          var routeDefault = {
+            exten: route.exten,
+            type: route.type,
+            context: route.context,
+            VoiceExtensionId: route.id
+          };
+          var bulkApps = [];
+          var applicationLength = 6; //update in case of adding other rows in the extension
+          var firstRows = [];
+          firstRows.push(_.merge({
+              app: 'Set',
+              appdata: util.format('CDR(type)=%s', route.type),
+              priority: priority
+            },
+            routeDefault));
+          priority++;
+          if (route.type === 'outbound') {
+            firstRows.push(_.merge({
+                app: 'Set',
+                appdata: util.format('CDR(tag)=%s', route.tag || '--'),
+                priority: priority
+              },
+              routeDefault));
+            priority++;
+          }
+          bulkApps.push(VoiceExtension.bulkCreate(firstRows, {
+            transaction: t
+          }));
+          applications.forEach(function(application) {
+            var appIntervals = [];
+            var extension = [];
+            if (application.IntervalId) { //if the interval for the app is chosen by a list we search for the subintervals
+              var foundIntervals = _.filter(intervals, {
+                IntervalId: application.IntervalId
+              });
+              appIntervals = foundIntervals.length ? _.map(foundIntervals, 'interval') : ['*,*,*,*']; //if the interval list has no subintervals the interval is always
+              var parentInterval = _.find(intervals, {
+                id: application.IntervalId
+              });
+              application.interval = parentInterval ? parentInterval.name : '*,*,*,*';
+            } else { //otherwise i will have the interval directly from the app, i still use an array to keep the creation logic the same
+              appIntervals = [application.interval];
+            }
+            var intLength = appIntervals.length;
+            appIntervals.forEach(function(elem, index) {
+              extension.push(_.merge({
+                  app: 'GotoIfTime',
+                  appdata: util.format('%s?%s,${EXTEN},%s:%s,${EXTEN},%s', elem, route.context, priority + (intLength - index), route.context, ((index + 1) < intLength) ? priority +
+                    1 : priority +
+                    applicationLength),
+                  priority: priority
+                },
+                routeDefault));
+              priority++;
+            });
+            if (application.app === 'Dial' && application.appdata[1] && route.type === 'outbound') {
+              extension.push(_.merge({
+                  app: 'Set',
+                  appdata: util.format('CALLERID(all)=%s', application.appdata[1]),
+                  priority: priority
+                },
+                routeDefault));
+            } else {
+              extension.push(_.merge({
+                  app: 'NoOP',
+                  appdata: 'Skipped CallerID Set',
+                  priority: priority
+                },
+                routeDefault));
+            }
+            priority++;
+            if (application.app === 'Dial' && route.record && route.type === 'outbound') {
+              extension.push(_.merge({
+                  app: 'MixMonitor',
+                  appdata: '${UNIQUEID}.wav,ab',
+                  priority: priority
+                },
+                routeDefault));
+            } else {
+              extension.push(_.merge({
+                  app: 'NoOP',
+                  appdata: 'Skipped MixMonitor',
+                  priority: priority
+                },
+                routeDefault));
+            }
+            priority++;
+            if (application.app === 'Queue') {
+              extension.push(_.merge({
+                  app: 'Answer',
+                  appdata: '',
+                  priority: priority
+                },
+                routeDefault));
+            } else {
+              extension.push(_.merge({
+                  app: 'NoOP',
+                  appdata: 'Skipped Answer',
+                  priority: priority
+                },
+                routeDefault));
+            }
+            priority++;
+            if (application.app === 'Dial' && route.type === 'outbound') {
+              extension.push(_.merge({
+                  app: application.app,
+                  appdata: util.format('SIP/%s/%s${EXTEN:%d}', application.appdata[0], application.appdata[3] || '', application.appdata[2] || 0),
+                  priority: priority,
+                  IntervalId: application.IntervalId || null,
+                  interval: application.interval || '*,*,*,*',
+                  isApp: true,
+                  callerID: application.appdata[1] || null
+                },
+                routeDefault));
+            } else {
+              extension.push(_.merge({
+                  app: application.app,
+                  appdata: application.appdata.join(','),
+                  priority: priority,
+                  IntervalId: application.IntervalId,
+                  interval: application.interval || '*,*,*,*',
+                  isApp: true
+                },
+                routeDefault));
+            }
+            priority++;
+            if (application.app === 'Dial' && route.record && route.type === 'outbound') {
+              extension.push(_.merge({
+                  app: 'StopMixMonitor',
+                  appdata: '',
+                  priority: priority
+                },
+                routeDefault));
+            } else {
+              extension.push(_.merge({
+                  app: 'NoOP',
+                  appdata: 'Skipped StopMixMonitor',
+                  priority: priority
+                },
+                routeDefault));
+            }
+            priority++;
+            extension.push(_.merge({
+                app: 'NoOP',
+                appdata: application.app + ' Application End',
+                priority: priority
+              },
+              routeDefault));
+            priority++;
+            bulkApps.push(VoiceExtension.bulkCreate(extension, {
+              transaction: t
+            }));
+          });
+          return bulkApps;
+        })
+        .all();
+    }
+  }
+}
+
+function handleError(res, err) {
+  return res.status(500).send(err);
+}